1 | ; Puzzlebox Brainstorms Windows Installer
|
---|
2 |
|
---|
3 | ; NOTE: this .NSI script is designed for NSIS v1.8+
|
---|
4 |
|
---|
5 | Name "Puzzlebox ThinkGear Emulator"
|
---|
6 | OutFile "Puzzlebox-ThinkGearEmulator-0.1.4-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 ThinkGear Emulator"
|
---|
20 | InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator" ""
|
---|
21 | ;DirShow show ; (make this hide to not let the user change it)
|
---|
22 | DirText "Select the directory to install Puzzlebox ThinkGear Emulator 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 ThinkGear Emulator\Puzzlebox ThinkGear Emulator" "" "$INSTDIR"
|
---|
30 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator" "DisplayName" "Puzzlebox ThinkGear Emulator (remove only)"
|
---|
31 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator" "UninstallString" '"$INSTDIR\Puzzlesbox-ThinkGearEmulator-Uninstall.exe"'
|
---|
32 |
|
---|
33 | File dist\bz2.pyd
|
---|
34 | File dist\_ctypes.pyd
|
---|
35 | File dist\_hashlib.pyd
|
---|
36 | File dist\library.zip
|
---|
37 | File dist\msvcr71.dll
|
---|
38 | File dist\puzzlebox_thinkgear_client.exe
|
---|
39 | File dist\puzzlebox_thinkgear_emulator_configuration.ini
|
---|
40 | File dist\puzzlebox_thinkgear_server.exe
|
---|
41 | File dist\pyexpat.pyd
|
---|
42 | File dist\python25.dll
|
---|
43 | File dist\select.pyd
|
---|
44 | File dist\simplejson._speedups.pyd
|
---|
45 | File dist\_socket.pyd
|
---|
46 | File dist\_ssl.pyd
|
---|
47 | File dist\unicodedata.pyd
|
---|
48 | File dist\w9xpopen.exe
|
---|
49 |
|
---|
50 | SetOutPath $INSTDIR\images
|
---|
51 | File dist\images\puzzlebox.ico
|
---|
52 |
|
---|
53 | File package\vcredist_x86.exe
|
---|
54 |
|
---|
55 | ExecWait 'package\Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"'
|
---|
56 |
|
---|
57 |
|
---|
58 | ; write out uninstaller
|
---|
59 | WriteUninstaller "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe"
|
---|
60 |
|
---|
61 | SectionEnd ; end of default section
|
---|
62 |
|
---|
63 |
|
---|
64 | Section "Start Menu + Desktop Icons"
|
---|
65 | ; SetOutPath "$SMPROGRAMS\Puzzlebox ThinkGear Emulator"
|
---|
66 | SetOutPath $INSTDIR
|
---|
67 | CreateDirectory "$SMPROGRAMS\Puzzlebox ThinkGear Emulator"
|
---|
68 | CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Client.lnk" \
|
---|
69 | "$INSTDIR\puzzlebox_thinkgear_client.exe" \
|
---|
70 | "" "$INSTDIR\images\puzzlebox.ico" "0" "SW_SHOWMINIMIZED"
|
---|
71 | CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Server.lnk" \
|
---|
72 | "$INSTDIR\puzzlebox_thinkgear_server.exe" \
|
---|
73 | "" "$INSTDIR\images\puzzlebox.ico" "0" "SW_SHOWMINIMIZED"
|
---|
74 | CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Edit Puzzlebox ThinkGear Emulator Configuration.lnk" \
|
---|
75 | "$INSTDIR\puzzlebox_thinkgear_emulator_configuration.ini" \
|
---|
76 | "" "" "0" ""
|
---|
77 | CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Uninstall Puzzlebox ThinkGear Emulator.lnk" \
|
---|
78 | "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe"
|
---|
79 | SectionEnd
|
---|
80 |
|
---|
81 |
|
---|
82 | ; begin uninstall settings/section
|
---|
83 | UninstallText "This will uninstall Puzzlebox ThinkGear Emulator from your system"
|
---|
84 |
|
---|
85 | Section Uninstall
|
---|
86 | ; add delete commands to delete whatever files/registry keys/etc you installed here.
|
---|
87 | Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Client.lnk"
|
---|
88 | Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Server.lnk"
|
---|
89 | Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Edit Puzzlebox ThinkGear Emulator Configuration.lnk"
|
---|
90 | Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Uninstall Puzzlebox ThinkGear Emulator.lnk"
|
---|
91 | RMDir "$SMPROGRAMS\Puzzlebox ThinkGear Emulator"
|
---|
92 |
|
---|
93 |
|
---|
94 | Delete $INSTDIR\bz2.pyd
|
---|
95 | Delete $INSTDIR\_ctypes.pyd
|
---|
96 | Delete $INSTDIR\_hashlib.pyd
|
---|
97 | Delete $INSTDIR\library.zip
|
---|
98 | Delete $INSTDIR\msvcr71.dll
|
---|
99 | Delete $INSTDIR\puzzlebox_thinkgear_client.exe
|
---|
100 | Delete $INSTDIR\puzzlebox_thinkgear_emulator_configuration.ini
|
---|
101 | Delete $INSTDIR\puzzlebox_thinkgear_server.exe
|
---|
102 | Delete $INSTDIR\pyexpat.pyd
|
---|
103 | Delete $INSTDIR\python25.dll
|
---|
104 | Delete $INSTDIR\select.pyd
|
---|
105 | Delete $INSTDIR\simplejson._speedups.pyd
|
---|
106 | Delete $INSTDIR\_socket.pyd
|
---|
107 | Delete $INSTDIR\_ssl.pyd
|
---|
108 | Delete $INSTDIR\unicodedata.pyd
|
---|
109 | Delete $INSTDIR\w9xpopen.exe
|
---|
110 |
|
---|
111 |
|
---|
112 | Delete $INSTDIR\images\puzzlebox.ico
|
---|
113 |
|
---|
114 | RMDir $INSTDIR\images
|
---|
115 |
|
---|
116 | RMDIR $INSTDIR
|
---|
117 |
|
---|
118 | Delete "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe"
|
---|
119 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator"
|
---|
120 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox ThinkGear Emulator"
|
---|
121 | RMDir "$INSTDIR"
|
---|
122 |
|
---|
123 | ; if $INSTDIR was removed, skip these next ones
|
---|
124 | IfFileExists $INSTDIR 0 Removed
|
---|
125 | MessageBox MB_YESNO|MB_ICONQUESTION \
|
---|
126 | "Remove all files in your Puzzlebox ThinkGear Emulator directory? (If you have anything \
|
---|
127 | you created that you want to keep, click No)" IDNO Removed
|
---|
128 | Delete $INSTDIR\*.* ; this would be skipped if the user hits no
|
---|
129 | RMDir /r $INSTDIR
|
---|
130 | IfFileExists $INSTDIR 0 Removed
|
---|
131 | MessageBox MB_OK|MB_ICONEXCLAMATION \
|
---|
132 | "Note: $INSTDIR could not be removed."
|
---|
133 | Removed:
|
---|
134 |
|
---|
135 |
|
---|
136 | SectionEnd ; end of uninstall section
|
---|
137 |
|
---|
138 | ; eof
|
---|
139 |
|
---|