; Puzzlebox Brainstorms Windows Installer ; NOTE: this .NSI script is designed for NSIS v1.8+ Name "Puzzlebox ThinkGear Emulator" OutFile "Puzzlebox-ThinkGearEmulator-0.2.0-setup.exe" ; Some default compiler settings (uncomment and change at will): ; SetCompress auto ; (can be off or force) ; SetDatablockOptimize on ; (can be off) ; CRCCheck on ; (can be off) ; AutoCloseWindow false ; (can be true for the window go away automatically at end) ; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable) ; SetDateSave off ; (can be on to have files restored to their orginal date) LicenseText "You must agree to this license before installing." LicenseData "license.txt" InstallDir "$PROGRAMFILES\Puzzlebox ThinkGear Emulator" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator" "" ;DirShow show ; (make this hide to not let the user change it) DirText "Select the directory to install Puzzlebox ThinkGear Emulator into:" InstallColors /windows Section "" ; (default section) SetOutPath "$INSTDIR" ; add files / whatever that need to be installed here. WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator" "" "$INSTDIR" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator" "DisplayName" "Puzzlebox ThinkGear Emulator (remove only)" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator" "UninstallString" '"$INSTDIR\Puzzlesbox-ThinkGearEmulator-Uninstall.exe"' File dist\bz2.pyd File dist\images\puzzlebox.ico File dist\libgcc_s_dw2-1.dll File dist\library.zip File dist\mingwm10.dll ; File dist\msvcr71.dll File dist\puzzlebox_thinkgear_emulator_configuration.ini File dist\puzzlebox_thinkgear_server.exe File dist\PyQt4.QtCore.pyd File dist\PyQt4.QtNetwork.pyd File dist\python25.dll File dist\QtCore4.dll File dist\QtNetwork4.dll File dist\simplejson._speedups.pyd File dist\sip.pyd File dist\unicodedata.pyd File dist\w9xpopen.exe SetOutPath $INSTDIR\images File dist\images\puzzlebox.ico File package\vcredist_x86.exe ExecWait 'package\Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"' ; write out uninstaller WriteUninstaller "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe" SectionEnd ; end of default section Section "Start Menu + Desktop Icons" ; SetOutPath "$SMPROGRAMS\Puzzlebox ThinkGear Emulator" SetOutPath $INSTDIR CreateDirectory "$SMPROGRAMS\Puzzlebox ThinkGear Emulator" ; CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Client.lnk" \ ; "$INSTDIR\puzzlebox_thinkgear_client.exe" \ ; "" "$INSTDIR\images\puzzlebox.ico" "0" "SW_SHOWMINIMIZED" CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Server.lnk" \ "$INSTDIR\puzzlebox_thinkgear_server.exe" \ "" "$INSTDIR\images\puzzlebox.ico" "0" "SW_SHOWMINIMIZED" CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Edit Puzzlebox ThinkGear Emulator Configuration.lnk" \ "$INSTDIR\puzzlebox_thinkgear_emulator_configuration.ini" \ "" "" "0" "" CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Uninstall Puzzlebox ThinkGear Emulator.lnk" \ "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe" SectionEnd ; begin uninstall settings/section UninstallText "This will uninstall Puzzlebox ThinkGear Emulator from your system" Section Uninstall ; add delete commands to delete whatever files/registry keys/etc you installed here. ; Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Client.lnk" Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Server.lnk" Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Edit Puzzlebox ThinkGear Emulator Configuration.lnk" Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Uninstall Puzzlebox ThinkGear Emulator.lnk" RMDir "$SMPROGRAMS\Puzzlebox ThinkGear Emulator" Delete $INSTDIR\bz2.pyd Delete $INSTDIR\libgcc_s_dw2-1.dll Delete $INSTDIR\library.zip Delete $INSTDIR\mingwm10.dll Delete $INSTDIR\msvcr71.dll Delete $INSTDIR\puzzlebox_thinkgear_emulator_configuration.ini Delete $INSTDIR\puzzlebox_thinkgear_server.exe Delete $INSTDIR\PyQt4.QtCore.pyd Delete $INSTDIR\PyQt4.QtNetwork.pyd Delete $INSTDIR\python25.dll Delete $INSTDIR\QtCore4.dll Delete $INSTDIR\QtNetwork4.dll Delete $INSTDIR\simplejson._speedups.pyd Delete $INSTDIR\sip.pyd Delete $INSTDIR\unicodedata.pyd Delete $INSTDIR\w9xpopen.exe Delete $INSTDIR\images\puzzlebox.ico RMDir $INSTDIR\images RMDIR $INSTDIR Delete "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox ThinkGear Emulator" RMDir "$INSTDIR" ; if $INSTDIR was removed, skip these next ones IfFileExists $INSTDIR 0 Removed MessageBox MB_YESNO|MB_ICONQUESTION \ "Remove all files in your Puzzlebox ThinkGear Emulator directory? (If you have anything \ you created that you want to keep, click No)" IDNO Removed Delete $INSTDIR\*.* ; this would be skipped if the user hits no RMDir /r $INSTDIR IfFileExists $INSTDIR 0 Removed MessageBox MB_OK|MB_ICONEXCLAMATION \ "Note: $INSTDIR could not be removed." Removed: SectionEnd ; end of uninstall section ; eof