source: thinkgear_emulator/Puzzlebox-ThinkGearEmulator.nsi @ 81

Last change on this file since 81 was 72, checked in by sc, 11 years ago

thinkgear_emulator:

  • split out into separate directory
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.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
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\_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
50SetOutPath $INSTDIR\images
51 File dist\images\puzzlebox.ico
52
53 File package\vcredist_x86.exe
54
55ExecWait 'package\Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"'
56
57
58; write out uninstaller
59WriteUninstaller "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe"
60
61SectionEnd ; end of default section
62
63
64Section "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"
79SectionEnd
80
81
82; begin uninstall settings/section
83UninstallText "This will uninstall Puzzlebox ThinkGear Emulator from your system"
84
85Section 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
118Delete "$INSTDIR\Puzzlebox-ThinkGearEmulator-Uninstall.exe"
119DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Puzzlebox ThinkGear Emulator\Puzzlebox ThinkGear Emulator"
120DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Puzzlebox ThinkGear Emulator"
121RMDir "$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 \
127you 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
136SectionEnd ; end of uninstall section
137
138; eof
139
Note: See TracBrowser for help on using the repository browser.