scriptable-client-installers/T7x/ver/test3.nsi
2023-12-15 16:09:19 -05:00

91 lines
2.1 KiB
Plaintext

!include "MUI2.nsh"
!define MUI_ICON "Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "Contrib\Graphics\UGX\banner.bmp"
!define MUI_PAGE_HEADER_TEXT "Welcome to the Boiii Application Setup"
!define MUI_PAGE_HEADER_SUBTEXT "Follow the instructions to install Boiii Application."
!define MUI_DIRECTORYPAGE_TEXT_TOP "Choose the folder in which to install Boiii Application."
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Installation Folder"
!define MUI_FINISHPAGE_NOAUTOCLOSE
; Set the default installation directory
InstallDir $PROGRAMFILES\BoiiiApplication
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Custom finish page
Page custom MyFinishPageCreate MyFinishPageLeave
; Finish page
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
Name "Boiii Application"
OutFile "BoiiiInstaller.exe"
ShowInstDetails show
ShowUnInstDetails show
Icon "${MUI_ICON}"
BrandingText "Boiii Application Setup"
Var Dialog
Var CreateShortcut
Function MyFinishPageCreate
nsDialogs::Create 1018
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}
${NSD_CreateLabel} 0 0 100% 12u "Installation completed successfully."
Pop $0
${NSD_CreateCheckbox} 0 -13u 100% 12u "Create a desktop shortcut"
Pop $CreateShortcut
${NSD_Check} $CreateShortcut
nsDialogs::Show
FunctionEnd
Function MyFinishPageLeave
${NSD_GetState} $CreateShortcut $0
StrCpy $CreateShortcut $0
FunctionEnd
Section "Main Application" SecMain
SetOutPath $INSTDIR
File "boiii.exe"
SectionEnd
Section "LocalAppData Files" SecData
SetOutPath $LOCALAPPDATA\boiii
File /r "boiii\*.*"
SectionEnd
Section "Create Desktop Shortcut"
${If} $CreateShortcut == ${BST_CHECKED}
CreateShortcut "$DESKTOP\Boiii.lnk" "$INSTDIR\boiii.exe"
${EndIf}
SectionEnd
Section "Uninstall"
Delete $INSTDIR\boiii.exe
Delete "$DESKTOP\Boiii.lnk"
RMDir /r $LOCALAPPDATA\boiii
RMDir $INSTDIR
SectionEnd