source: thinkgear_emulator/Puzzlebox-ThinkGearEmulator.nsi @ 120

Last change on this file since 120 was 118, checked in by sc, 11 years ago

Puzzlebox-ThinkGearEmulator?.nsi:

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