1
0
Fork 0

Added post-install helper script for Win32 release.

This commit is contained in:
LoRd_MuldeR 2022-10-27 22:06:17 +02:00
parent 57e3b0be9c
commit 393120ac58
Signed by: mulder
GPG Key ID: 2B5913365F57E03F
3 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,6 @@
@echo off
cd /d "%~dp0"
if exist "bin" rmdir /s /q "bin"
mkdir "bin"
"%NSIS3_HOME%\makensis.exe" /V4 /INPUTCHARSET UTF8 post-install-launcher.nsi
pause

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,67 @@
!include FileFunc.nsh
!include WinVer.nsh
Unicode true
XPStyle on
ManifestSupportedOS all
RequestExecutionLevel user
AutoCloseWindow true
InstallColors FFD74A 000000
ShowInstDetails show
OutFile "bin\post-install-launcher.exe"
Icon "post-install-launcher.ico"
ChangeUI all "${NSISDIR}\Contrib\UIs\sdbarker_tiny.exe"
Caption "Almost there..."
SubCaption 1 " "
SubCaption 2 " "
SubCaption 3 " "
SubCaption 4 " "
!macro PrintStatusMessage message
SetDetailsPrint both
DetailPrint "${message}"
SetDetailsPrint listonly
Sleep 333
!macroend
Section ""
!insertmacro PrintStatusMessage "Detecting operating system, please wait..."
${IfNot} ${AtLeastBuild} 7601
MessageBox MB_ICONSTOP|MB_TOPMOST "This application runs on Windows 7 (SP1) or later!"
ExecShell "open" "https://support.microsoft.com/en-us/windows/install-windows-7-service-pack-1-sp1-b3da2c0f-cdb6-0572-8596-bab972897f61"
Quit
${EndIf}
!insertmacro PrintStatusMessage "Detecting installed .NET Framework version, please wait..."
SetRegView 32
ClearErrors
ReadRegDWORD $0 HKLM 'SOFTWARE\WOW6432Node\Microsoft\NET Framework Setup\NDP\v4\Full' 'Release'
${IfNot} ${Errors}
DetailPrint "Installed release: $0"
${IfThen} $0 >= 528040 ${|} Goto launch_application ${|}
${Else}
DetailPrint ".NET Framework not found!"
${Endif}
!insertmacro PrintStatusMessage "Installing .NET Framework 4.8, please wait..."
${Do}
ClearErrors
${If} ${AtLeastBuild} 19042
ExecShellWait /ALLOWERRORUI "runas" "$EXEDIR\ndp481-web.exe" /passive
${Else}
ExecShellWait /ALLOWERRORUI "runas" "$EXEDIR\ndp48-web.exe" /passive
${EndIf}
${IfNot} ${Errors}
${OrIf} ${Cmd} `MessageBox MB_ICONEXCLAMATION|MB_RETRYCANCEL|MB_TOPMOST "Failed to launch .NET Framework installer!" IDCANCEL`
${ExitDo}
${EndIf}
${Loop}
launch_application:
!insertmacro PrintStatusMessage "Launching the application, please wait..."
${GetParent} $EXEDIR $1
SetOutPath "$1"
ExecShell /ALLOWERRORUI "open" "$OUTDIR\slunkcrypt-gui.exe"
SectionEnd