| 1 | ; Puzzlebox Brainstorms Windows Installer
|
|---|
| 2 |
|
|---|
| 3 | ; NOTE: this .NSI script is designed for NSIS v1.8+
|
|---|
| 4 |
|
|---|
| 5 | Name "Puzzlebox Brainstorms"
|
|---|
| 6 | OutFile "PuzzleboxBrainstorms-0.6.0-setup.exe"
|
|---|
| 7 |
|
|---|
| 8 | ; Some default compiler settings (uncomment and change at will):
|
|---|
| 9 | ; SetCompress auto ; (can be off or force)
|
|---|
| 10 | ; SetDatablockOptimize on ; (can be off)
|
|---|
| 11 | ; CRCCheck on ; (can be off)
|
|---|
| 12 | ; AutoCloseWindow false ; (can be true for the window go away automatically at end)
|
|---|
| 13 | ; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
|
|---|
| 14 | ; SetDateSave off ; (can be on to have files restored to their orginal date)
|
|---|
| 15 |
|
|---|
| 16 | LicenseText "You must agree to this license before installing."
|
|---|
| 17 | LicenseData "LICENSE.txt"
|
|---|
| 18 |
|
|---|
| 19 | InstallDir "$PROGRAMFILES\Puzzlebox Brainstorms"
|
|---|
| 20 | InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox Brainstorms\Puzzlebox Brainstorms" ""
|
|---|
| 21 | ;DirShow show ; (make this hide to not let the user change it)
|
|---|
| 22 | DirText "Select the directory to install Puzzlebox Brainstorms into:"
|
|---|
| 23 |
|
|---|
| 24 | InstallColors /windows
|
|---|
| 25 |
|
|---|
| 26 | Section "" ; (default section)
|
|---|
| 27 | SetOutPath "$INSTDIR"
|
|---|
| 28 | ; add files / whatever that need to be installed here.
|
|---|
| 29 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox Brainstorms\Puzzlebox Brainstorms" "" "$INSTDIR"
|
|---|
| 30 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox Brainstorms\Puzzlebox Brainstorms" "DisplayName" "Puzzlebox Brainstorms (remove only)"
|
|---|
| 31 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox Brainstorms\Puzzlebox Brainstorms" "UninstallString" '"$INSTDIR\PuzzlesboxBrainstorms-Uninstall.exe"'
|
|---|
| 32 |
|
|---|
| 33 | File dist\brainstorms-local.exe
|
|---|
| 34 | File dist\brainstorms-network.exe
|
|---|
| 35 | ; File dist\msvcr71.dll
|
|---|
| 36 | File dist\python25.dll
|
|---|
| 37 | File dist\w9xpopen.exe
|
|---|
| 38 | File puzzlebox_brainstorms_configuration.ini
|
|---|
| 39 |
|
|---|
| 40 | SetOutPath $INSTDIR\docs
|
|---|
| 41 | File LICENSE.txt
|
|---|
| 42 |
|
|---|
| 43 | File docs\readme.txt
|
|---|
| 44 |
|
|---|
| 45 | SetOutPath $INSTDIR\emokey
|
|---|
| 46 | File emokey\puzzlebox_brainstorms.ekm
|
|---|
| 47 | File emokey\puzzlebox_brainstorms-wheelchair.ekm
|
|---|
| 48 |
|
|---|
| 49 | SetOutPath $INSTDIR\emoscript
|
|---|
| 50 | File emoscript\puzzlebox_brainstorms-test_drive-push_pull.emo
|
|---|
| 51 | File emoscript\puzzlebox_brainstorms-training-pull.emo
|
|---|
| 52 | File emoscript\puzzlebox_brainstorms-training-push.emo
|
|---|
| 53 |
|
|---|
| 54 | SetOutPath $INSTDIR\images
|
|---|
| 55 | File images\1-upper_left-orange.png
|
|---|
| 56 | File images\1-upper_left-white.png
|
|---|
| 57 | File images\2-up-orange.png
|
|---|
| 58 | File images\2-up-white.png
|
|---|
| 59 | File images\3-upper_right-orange.png
|
|---|
| 60 | File images\3-upper_right-white.png
|
|---|
| 61 | File images\7-lower_left-orange.png
|
|---|
| 62 | File images\7-lower_left-white.png
|
|---|
| 63 | File images\8-down-orange.png
|
|---|
| 64 | File images\8-down-white.png
|
|---|
| 65 | File images\9-lower_right-orange.png
|
|---|
| 66 | File images\9-lower_right-white.png
|
|---|
| 67 | File images\puzzlebox.ico
|
|---|
| 68 | File images\puzzlebox_logo.png
|
|---|
| 69 | File images\brainstorms-aileron_left.svg
|
|---|
| 70 | File images\brainstorms-aileron_right.svg
|
|---|
| 71 | File images\brainstorms-elevator_forward.svg
|
|---|
| 72 | File images\brainstorms-elevator_reverse.svg
|
|---|
| 73 | File images\brainstorms-fly_forward.svg
|
|---|
| 74 | File images\brainstorms-hover.svg
|
|---|
| 75 | File images\brainstorms-land_arrow.svg
|
|---|
| 76 | File images\brainstorms-rudder-left.svg
|
|---|
| 77 | File images\brainstorms-rudder-right.svg
|
|---|
| 78 | File images\brainstorms_stop.svg
|
|---|
| 79 | File images\brainstorms_wheelchair_forward.svg
|
|---|
| 80 | File images\brainstorms_wheelchair_left.svg
|
|---|
| 81 | File images\brainstorms_wheelchair_reverse.svg
|
|---|
| 82 | File images\brainstorms_wheelchair_right.svg
|
|---|
| 83 | File images\braintorms-throttle_up.svg
|
|---|
| 84 | File images\puzzlebox_helicopter.svg
|
|---|
| 85 |
|
|---|
| 86 | SetOutPath $INSTDIR\lib
|
|---|
| 87 | File dist\lib\library.zip
|
|---|
| 88 |
|
|---|
| 89 | ;SetOutPath $INSTDIR\fonts
|
|---|
| 90 | ; File dist\fonts\tahomabd.ttf
|
|---|
| 91 | ; File dist\fonts\tahoma.ttf
|
|---|
| 92 |
|
|---|
| 93 | ;SetOutPath $INSTDIR\package
|
|---|
| 94 | ; File package\vcredist_x86.exe
|
|---|
| 95 | ;
|
|---|
| 96 | ;ExecWait 'package\Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"'
|
|---|
| 97 |
|
|---|
| 98 | SetOutPath $INSTDIR\package
|
|---|
| 99 | File packaging\win32\vcredist_x86.exe
|
|---|
| 100 |
|
|---|
| 101 | ExecWait '"$INSTDIR\package\vcredist_x86.exe" /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"'
|
|---|
| 102 |
|
|---|
| 103 |
|
|---|
| 104 | ; write out uninstaller
|
|---|
| 105 | WriteUninstaller "$INSTDIR\PuzzleboxBrainstorms-Uninstall.exe"
|
|---|
| 106 |
|
|---|
| 107 | SectionEnd ; end of default section
|
|---|
| 108 |
|
|---|
| 109 |
|
|---|
| 110 | Section "Start Menu + Desktop Icons"
|
|---|
| 111 | ; SetOutPath "$SMPROGRAMS\Puzzlebox Brainstorms"
|
|---|
| 112 | SetOutPath $INSTDIR
|
|---|
| 113 | CreateDirectory "$SMPROGRAMS\Puzzlebox Brainstorms"
|
|---|
| 114 | CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox Brainstorms.lnk" \
|
|---|
| 115 | "$INSTDIR\brainstorms-local.exe" \
|
|---|
| 116 | "" "$INSTDIR\images\puzzlebox.ico" "0" ""
|
|---|
| 117 | CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Edit Puzzlebox Brainstorms Configuration.lnk" \
|
|---|
| 118 | "$INSTDIR\puzzlebox_brainstorms_configuration.ini" \
|
|---|
| 119 | "" "" "0" ""
|
|---|
| 120 | CreateShortCut "$SMPROGRAMS\Puzzlebox Brainstorms\Uninstall Puzzlebox Brainstorms.lnk" \
|
|---|
| 121 | "$INSTDIR\PuzzleboxBrainstorms-Uninstall.exe"
|
|---|
| 122 | CreateShortCut "$DESKTOP\Puzzlebox Brainstorms.lnk" \
|
|---|
| 123 | "$INSTDIR\brainstorms-local.exe" \
|
|---|
| 124 | "" "$INSTDIR\images\puzzlebox.ico" "0" ""
|
|---|
| 125 | SectionEnd
|
|---|
| 126 |
|
|---|
| 127 |
|
|---|
| 128 | ; begin uninstall settings/section
|
|---|
| 129 | UninstallText "This will uninstall Puzzlebox Brainstorms from your system"
|
|---|
| 130 |
|
|---|
| 131 | Section Uninstall
|
|---|
| 132 | ; add delete commands to delete whatever files/registry keys/etc you installed here.
|
|---|
| 133 | Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Puzzlebox Brainstorms.lnk"
|
|---|
| 134 | Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Edit Puzzlebox Brainstorms Configuration.lnk"
|
|---|
| 135 | Delete "$SMPROGRAMS\Puzzlebox Brainstorms\Uninstall Puzzlebox Brainstorms.lnk"
|
|---|
| 136 | RMDir "$SMPROGRAMS\Puzzlebox Brainstorms"
|
|---|
| 137 | Delete "$DESKTOP\Puzzlebox Brainstorms.lnk"
|
|---|
| 138 |
|
|---|
| 139 |
|
|---|
| 140 | Delete $INSTDIR\brainstorms-local.exe
|
|---|
| 141 | Delete $INSTDIR\brainstorms-network.exe
|
|---|
| 142 | ; Delete $INSTDIR\msvcr71.dll
|
|---|
| 143 | Delete $INSTDIR\python25.dll
|
|---|
| 144 | Delete $INSTDIR\w9xpopen.exe
|
|---|
| 145 | Delete $INSTDIR\puzzlebox_brainstorms_configuration.ini
|
|---|
| 146 |
|
|---|
| 147 | Delete $INSTDIR\docs\LICENSE.txt
|
|---|
| 148 | Delete $INSTDIR\docs\readme.txt
|
|---|
| 149 | RMDir $INSTDIR\docs
|
|---|
| 150 |
|
|---|
| 151 |
|
|---|
| 152 | Delete $INSTDIR\emokey\puzzlebox_brainstorms.ekm
|
|---|
| 153 | Delete $INSTDIR\emokey\puzzlebox_brainstorms-wheelchair.ekm
|
|---|
| 154 | Delete $INSTDIR\emoscript\puzzlebox_brainstorms-test_drive-push_pull.emo
|
|---|
| 155 | Delete $INSTDIR\emoscript\puzzlebox_brainstorms-training-pull.emo
|
|---|
| 156 | Delete $INSTDIR\emoscript\puzzlebox_brainstorms-training-push.emo
|
|---|
| 157 | RMDir $INSTDIR\emokey
|
|---|
| 158 | RMDir $INSTDIR\emoscript
|
|---|
| 159 |
|
|---|
| 160 | Delete $INSTDIR\images\1-upper_left-orange.png
|
|---|
| 161 | Delete $INSTDIR\images\1-upper_left-white.png
|
|---|
| 162 | Delete $INSTDIR\images\2-up-orange.png
|
|---|
| 163 | Delete $INSTDIR\images\2-up-white.png
|
|---|
| 164 | Delete $INSTDIR\images\3-upper_right-orange.png
|
|---|
| 165 | Delete $INSTDIR\images\3-upper_right-white.png
|
|---|
| 166 | Delete $INSTDIR\images\7-lower_left-orange.png
|
|---|
| 167 | Delete $INSTDIR\images\7-lower_left-white.png
|
|---|
| 168 | Delete $INSTDIR\images\8-down-orange.png
|
|---|
| 169 | Delete $INSTDIR\images\8-down-white.png
|
|---|
| 170 | Delete $INSTDIR\images\9-lower_right-orange.png
|
|---|
| 171 | Delete $INSTDIR\images\9-lower_right-white.png
|
|---|
| 172 | Delete $INSTDIR\images\puzzlebox.ico
|
|---|
| 173 | Delete $INSTDIR\images\puzzlebox_logo.png
|
|---|
| 174 | Delete $INSTDIR\images\brainstorms-aileron_left.svg
|
|---|
| 175 | Delete $INSTDIR\images\brainstorms-aileron_right.svg
|
|---|
| 176 | Delete $INSTDIR\images\brainstorms-elevator_forward.svg
|
|---|
| 177 | Delete $INSTDIR\images\brainstorms-elevator_reverse.svg
|
|---|
| 178 | Delete $INSTDIR\images\brainstorms-fly_forward.svg
|
|---|
| 179 | Delete $INSTDIR\images\brainstorms-hover.svg
|
|---|
| 180 | Delete $INSTDIR\images\brainstorms-land_arrow.svg
|
|---|
| 181 | Delete $INSTDIR\images\brainstorms-rudder-left.svg
|
|---|
| 182 | Delete $INSTDIR\images\brainstorms-rudder-right.svg
|
|---|
| 183 | Delete $INSTDIR\images\brainstorms_stop.svg
|
|---|
| 184 | Delete $INSTDIR\images\brainstorms_wheelchair_forward.svg
|
|---|
| 185 | Delete $INSTDIR\images\brainstorms_wheelchair_left.svg
|
|---|
| 186 | Delete $INSTDIR\images\brainstorms_wheelchair_reverse.svg
|
|---|
| 187 | Delete $INSTDIR\images\brainstorms_wheelchair_right.svg
|
|---|
| 188 | Delete $INSTDIR\images\braintorms-throttle_up.svg
|
|---|
| 189 | Delete $INSTDIR\images\puzzlebox_helicopter.svg
|
|---|
| 190 | RMDir $INSTDIR\images
|
|---|
| 191 |
|
|---|
| 192 | ; Delete $INSTDIR\fonts\tahomabd.ttf
|
|---|
| 193 | ; Delete $INSTDIR\fonts\tahoma.ttf
|
|---|
| 194 | ; RMDir $INSTDIR\fonts
|
|---|
| 195 |
|
|---|
| 196 | Delete $INSTDIR\lib\library.zip
|
|---|
| 197 | RMDir $INSTDIR\lib
|
|---|
| 198 |
|
|---|
| 199 | Delete $INSTDIR\package\vcredist_x86.exe
|
|---|
| 200 | RMDir $INSTDIR\package
|
|---|
| 201 |
|
|---|
| 202 | ; RMDIR $INSTDIR
|
|---|
| 203 |
|
|---|
| 204 | Delete "$INSTDIR\PuzzleboxBrainstorms-Uninstall.exe"
|
|---|
| 205 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox Brainstorms\Puzzlebox Brainstorms"
|
|---|
| 206 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox Brainstorms"
|
|---|
| 207 | ;RMDir "$INSTDIR"
|
|---|
| 208 |
|
|---|
| 209 |
|
|---|
| 210 | RMDIR $INSTDIR
|
|---|
| 211 |
|
|---|
| 212 |
|
|---|
| 213 | ; if $INSTDIR was removed, skip these next ones
|
|---|
| 214 | IfFileExists $INSTDIR 0 Removed
|
|---|
| 215 | MessageBox MB_YESNO|MB_ICONQUESTION \
|
|---|
| 216 | "Remove all files in your Puzzlebox Brainstorms directory? (If you have anything \
|
|---|
| 217 | you created that you want to keep, click No)" IDNO Removed
|
|---|
| 218 | Delete $INSTDIR\*.* ; this would be skipped if the user hits no
|
|---|
| 219 | RMDir /r $INSTDIR
|
|---|
| 220 | IfFileExists $INSTDIR 0 Removed
|
|---|
| 221 | MessageBox MB_OK|MB_ICONEXCLAMATION \
|
|---|
| 222 | "Note: $INSTDIR could not be removed."
|
|---|
| 223 | Removed:
|
|---|
| 224 |
|
|---|
| 225 |
|
|---|
| 226 | SectionEnd ; end of uninstall section
|
|---|
| 227 |
|
|---|
| 228 | ; eof
|
|---|
| 229 |
|
|---|