;NSIS Modern Style UI ;Example Script version 1.1 ;Written by Joost Verburg !define NAME "777AVG Morning Supply Train Interdiction" ;Define your own software name here !define VERSION "1.0 (Initial Release)" ;Define your own software version here !define TOLWYN "c:\tolwyn\build" ;${TOLWYN} !define ICO "C:\tolwyn\icons\highcolor" ; ${ICO} !define TEMP1 $R0 !define TEMP2 $R1 !verbose 3 !include "${NSISDIR}\Examples\WinMessages.nsh" !verbose 4 ;-------------------------------- ;General Caption "Morning Supply Train Interdiction" Name "${NAME} ${VERSION}" OutFile "${TOLWYN}\777avg_gnd-atck_train_01.exe" SetOverwrite on ;Branding Stuff and Display Properties BGGradient B0B5D0 303550 ffffff ;888fb8 XPStyle on WindowIcon on SetFont "Trebuchet MS" 9 InstallColors B0B5D0 303550 SetDateSave on SetDatablockOptimize on icon "${ICO}\adni18-installer-C-no48xp.ico" UninstallIcon "${ICO}\adni18-uninstall-C-no48xp.ico" InstProgressFlags smooth colored ;CheckBitmap "${NSISDIR}\Contrib\Icons\modern.bmp" ;ChangeUI all "${NSISDIR}\Contrib\UIs\modern.exe" ;ChangeUI all "${NSISDIR}\Contrib\UIs\modern2.exe" Function .onInit ;Displays a splash screen SetOutPath $TEMP File /oname=spltmp.bmp "${TOLWYN}\foo.bmp" File /oname=spltmp.exe "${NSISDIR}\Bin\splash.exe" ExecWait '"$TEMP\spltmp.exe" 2000 $HWNDPARENT $TEMP\spltmp' Delete $TEMP\spltmp.exe Delete $TEMP\spltmp.bmp FunctionEnd ;User interface ;Define Icons Here And UI and Such ;License dialog LicenseBkColor B0B5D0 LicenseText "Scroll down to read the entire agreement.$\nYou must agree to this agreement in order to install this softwrare.$\n" LicenseData "${TOLWYN}\license.txt" ;Component-select dialog ;ComponentText "Check the components you want to install and uncheck the components you don't want to install. Click Next to continue." ;Folder-select dialog ;Not sure about the trailing " " in this. AutoCloseWindow false ShowInstDetails show ShowUninstDetails show DirText "Type or Browse to your IL2 Installation Folder to install ${NAME}." "Subdirectories will automatically be chosen." ComponentText "This will install ${NAME} on your computer:" ;Uninstaller UninstallText "This will uninstall ${NAME} from your system." ;-------------------------------- ;Installer Sections section sleep 200 sectionend Section ;Add your stuff here DetailPrint "Processing Your Request..." SetCompress Auto SetOverwrite on SetOutPath "$INSTDIR\missions\net\coop\777avg" File "C:\tolwyn\build\777avg_gnd-atck_train_01.*" SectionEnd Section "Create uninstaller" ;Add your stuff here WriteUninstaller "$INSTDIR\missions\net\coop\777avg\777avg_gnd-atck_train_01_UNINSTALL.exe" SectionEnd Section -post WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayName" "${NAME} (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "UninstallString" '"$INSTDIR\missions\net\coop\777avg\777avg_gnd-atck_train_01_Uninstall.exe"' SectionEnd Function .onInstSuccess bringtofront MessageBox MB_YESNO|MB_ICONQUESTION "Setup has completed. View readme file now?" IDNO NoReadme ExecShell open '$INSTDIR\missions\net\coop\777avg\777avg_gnd-atck_train_01.txt' ExecShell open '$INSTDIR\missions\net\coop\777avg\777avg_gnd-atck_train_01.jpg' NoReadme: FunctionEnd ;-------------------------------- ;Uninstaller Section Section "Uninstall" sleep 450 DetailPrint "Processing Your Request..." Delete "$INSTDIR\missions\net\coop\777avg\777avg_gnd-atck_train_01.*" Delete "$INSTDIR\missions\net\coop\777avg\777avg_gnd-atck_train_01_Uninstall.exe" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${NAME}" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" SectionEnd ;eof