; Puzzlebox Brainstorms Windows Installer ; NOTE: this .NSI script is designed for NSIS v1.8+ Name "Puzzlebox ThinkGear Emulator" OutFile "Puzzlebox-ThinkGearEmulator-0.1.4-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\_ctypes.pyd File dist\_hashlib.pyd File dist\jpeg.dll File dist\libfreetype-6.dll File dist\libogg-0.dll File dist\libpng12-0.dll File dist\library.zip File dist\libtiff.dll File dist\libvorbis-0.dll File dist\libvorbisfile-3.dll ; File dist\MSVCR71.dll File dist\puzzlebox_brainstorms_client_thinkgear.exe File dist\puzzlebox_thinkgear_emulator_configuration.ini File dist\puzzlebox_brainstorms_server_thinkgear.exe File dist\pyexpat.pyd File dist\pygame._arraysurfarray.pyd File dist\pygame.base.pyd File dist\pygame.bufferproxy.pyd File dist\pygame.cdrom.pyd File dist\pygame.color.pyd File dist\pygame.constants.pyd File dist\pygame.display.pyd File dist\pygame.draw.pyd File dist\pygame.event.pyd File dist\pygame.fastevent.pyd File dist\pygame.font.pyd File dist\pygame.imageext.pyd File dist\pygame.image.pyd File dist\pygame.joystick.pyd File dist\pygame.key.pyd File dist\pygame.mask.pyd File dist\pygame.mixer_music.pyd File dist\pygame.mixer.pyd File dist\pygame.mouse.pyd File dist\pygame.movie.pyd File dist\pygame._numericsndarray.pyd File dist\pygame._numericsurfarray.pyd File dist\pygame.overlay.pyd File dist\pygame.pixelarray.pyd File dist\pygame.rect.pyd File dist\pygame.rwobject.pyd File dist\pygame.scrap.pyd File dist\pygame.surface.pyd File dist\pygame.surflock.pyd File dist\pygame.time.pyd File dist\pygame.transform.pyd File dist\python25.dll File dist\SDL.dll File dist\SDL_image.dll File dist\SDL_mixer.dll File dist\SDL_ttf.dll File dist\select.pyd File dist\simplejson._speedups.pyd File dist\smpeg.dll File dist\_socket.pyd File dist\_ssl.pyd File dist\unicodedata.pyd File dist\w9xpopen.exe File dist\zlib1.dll 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_brainstorms_client_thinkgear.exe" \ "" "$INSTDIR\images\puzzlebox.ico" "0" "SW_SHOWMINIMIZED" CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Server.lnk" \ "$INSTDIR\puzzlebox_brainstorms_server_thinkgear.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\_ctypes.pyd Delete $INSTDIR\_hashlib.pyd Delete $INSTDIR\jpeg.dll Delete $INSTDIR\libfreetype-6.dll Delete $INSTDIR\libogg-0.dll Delete $INSTDIR\libpng12-0.dll Delete $INSTDIR\library.zip Delete $INSTDIR\libtiff.dll Delete $INSTDIR\libvorbis-0.dll Delete $INSTDIR\libvorbisfile-3.dll ; Delete $INSTDIR\MSVCR71.dll Delete $INSTDIR\puzzlebox_brainstorms_client_thinkgear.exe Delete $INSTDIR\puzzlebox_thinkgear_emulator_configuration.ini Delete $INSTDIR\puzzlebox_brainstorms_server_thinkgear.exe Delete $INSTDIR\pyexpat.pyd Delete $INSTDIR\pygame._arraysurfarray.pyd Delete $INSTDIR\pygame.base.pyd Delete $INSTDIR\pygame.bufferproxy.pyd Delete $INSTDIR\pygame.cdrom.pyd Delete $INSTDIR\pygame.color.pyd Delete $INSTDIR\pygame.constants.pyd Delete $INSTDIR\pygame.display.pyd Delete $INSTDIR\pygame.draw.pyd Delete $INSTDIR\pygame.event.pyd Delete $INSTDIR\pygame.fastevent.pyd Delete $INSTDIR\pygame.font.pyd Delete $INSTDIR\pygame.imageext.pyd Delete $INSTDIR\pygame.image.pyd Delete $INSTDIR\pygame.joystick.pyd Delete $INSTDIR\pygame.key.pyd Delete $INSTDIR\pygame.mask.pyd Delete $INSTDIR\pygame.mixer_music.pyd Delete $INSTDIR\pygame.mixer.pyd Delete $INSTDIR\pygame.mouse.pyd Delete $INSTDIR\pygame.movie.pyd Delete $INSTDIR\pygame._numericsndarray.pyd Delete $INSTDIR\pygame._numericsurfarray.pyd Delete $INSTDIR\pygame.overlay.pyd Delete $INSTDIR\pygame.pixelarray.pyd Delete $INSTDIR\pygame.rect.pyd Delete $INSTDIR\pygame.rwobject.pyd Delete $INSTDIR\pygame.scrap.pyd Delete $INSTDIR\pygame.surface.pyd Delete $INSTDIR\pygame.surflock.pyd Delete $INSTDIR\pygame.time.pyd Delete $INSTDIR\pygame.transform.pyd Delete $INSTDIR\python25.dll Delete $INSTDIR\SDL.dll Delete $INSTDIR\SDL_image.dll Delete $INSTDIR\SDL_mixer.dll Delete $INSTDIR\SDL_ttf.dll Delete $INSTDIR\select.pyd Delete $INSTDIR\simplejson._speedups.pyd Delete $INSTDIR\smpeg.dll Delete $INSTDIR\_socket.pyd Delete $INSTDIR\_ssl.pyd Delete $INSTDIR\unicodedata.pyd Delete $INSTDIR\w9xpopen.exe Delete $INSTDIR\zlib1.dll 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