source: thinkgear_emulator/Puzzlebox-ThinkGearEmulator.nsi @ 100

Last change on this file since 100 was 92, checked in by sc, 11 years ago
File size: 5.8 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\images\puzzlebox.ico
35 File dist\libgcc_s_dw2-1.dll
36 File dist\library.zip
37 File dist\mingwm10.dll
38; File dist\msvcr71.dll
39 File dist\puzzlebox_thinkgear_emulator_configuration.ini
40 File dist\puzzlebox_thinkgear_server.exe
41 File dist\PyQt4.QtCore.pyd
42 File dist\PyQt4.QtNetwork.pyd
43 File dist\python25.dll
44 File dist\QtCore4.dll
45 File dist\QtNetwork4.dll
46 File dist\simplejson._speedups.pyd
47 File dist\sip.pyd
48 File dist\unicodedata.pyd
49 File dist\w9xpopen.exe
50
51
52SetOutPath $INSTDIR\images
53 File dist\images\puzzlebox.ico
54
55 File package\vcredist_x86.exe
56
57ExecWait 'package\Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"'
58
59
60; write out uninstaller
61WriteUninstaller "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe"
62
63SectionEnd ; end of default section
64
65
66Section "Start Menu + Desktop Icons"
67;  SetOutPath "$SMPROGRAMS\Puzzlebox ThinkGear Emulator"
68  SetOutPath $INSTDIR
69  CreateDirectory "$SMPROGRAMS\Puzzlebox ThinkGear Emulator"
70;  CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Client.lnk" \
71;                 "$INSTDIR\puzzlebox_thinkgear_client.exe" \
72;                 ""  "$INSTDIR\images\puzzlebox.ico"  "0"  "SW_SHOWMINIMIZED"
73  CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Server.lnk" \
74                 "$INSTDIR\puzzlebox_thinkgear_server.exe" \
75                 ""  "$INSTDIR\images\puzzlebox.ico"  "0"  "SW_SHOWMINIMIZED"
76  CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Edit Puzzlebox ThinkGear Emulator Configuration.lnk" \
77                 "$INSTDIR\puzzlebox_thinkgear_emulator_configuration.ini" \
78                 ""  ""  "0"  ""
79  CreateShortCut "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Uninstall Puzzlebox ThinkGear Emulator.lnk" \
80                 "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe"
81SectionEnd
82
83
84; begin uninstall settings/section
85UninstallText "This will uninstall Puzzlebox ThinkGear Emulator from your system"
86
87Section Uninstall
88; add delete commands to delete whatever files/registry keys/etc you installed here.
89; Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Client.lnk"
90 Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator Network Server.lnk"
91 Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Edit Puzzlebox ThinkGear Emulator Configuration.lnk"
92 Delete "$SMPROGRAMS\Puzzlebox ThinkGear Emulator\Uninstall Puzzlebox ThinkGear Emulator.lnk"
93   RMDir "$SMPROGRAMS\Puzzlebox ThinkGear Emulator"
94
95
96 Delete $INSTDIR\bz2.pyd
97 Delete $INSTDIR\libgcc_s_dw2-1.dll
98 Delete $INSTDIR\library.zip
99 Delete $INSTDIR\mingwm10.dll
100 Delete $INSTDIR\msvcr71.dll
101 Delete $INSTDIR\puzzlebox_thinkgear_emulator_configuration.ini
102 Delete $INSTDIR\puzzlebox_thinkgear_server.exe
103 Delete $INSTDIR\PyQt4.QtCore.pyd
104 Delete $INSTDIR\PyQt4.QtNetwork.pyd
105 Delete $INSTDIR\python25.dll
106 Delete $INSTDIR\QtCore4.dll
107 Delete $INSTDIR\QtNetwork4.dll
108 Delete $INSTDIR\simplejson._speedups.pyd
109 Delete $INSTDIR\sip.pyd
110 Delete $INSTDIR\unicodedata.pyd
111 Delete $INSTDIR\w9xpopen.exe
112
113
114 Delete $INSTDIR\images\puzzlebox.ico
115
116 RMDir $INSTDIR\images
117
118 RMDIR $INSTDIR
119
120Delete "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe"
121DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator"
122DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox ThinkGear Emulator"
123RMDir "$INSTDIR"
124
125  ; if $INSTDIR was removed, skip these next ones
126  IfFileExists $INSTDIR 0 Removed
127    MessageBox MB_YESNO|MB_ICONQUESTION \
128      "Remove all files in your Puzzlebox ThinkGear Emulator directory? (If you have anything \
129you created that you want to keep, click No)" IDNO Removed
130    Delete $INSTDIR\*.* ; this would be skipped if the user hits no
131    RMDir /r $INSTDIR
132    IfFileExists $INSTDIR 0 Removed
133      MessageBox MB_OK|MB_ICONEXCLAMATION \
134                 "Note: $INSTDIR could not be removed."
135  Removed:
136
137
138SectionEnd ; end of uninstall section
139
140; eof
141
Note: See TracBrowser for help on using the repository browser.