python.iss 18.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

; This is the whole ball of wax for an Inno installer for Python.
; To use, download Inno Setup from http://www.jrsoftware.org/isdl.htm/,
; install it, and double-click on this file.  That launches the Inno
; script compiler.  The GUI is extemely simple, and has only one button
; you may not recognize instantly:  click it.  You're done.  It builds
; the installer into PCBuild/Python-2.2a1.exe.  Size and speed of the
; installer are competitive with the Wise installer; Inno uninstall
11 12
; seems much quicker than Wise (but also feebler, and the uninstall
; log is in some un(human)readable binary format).
13 14 15 16 17 18
;
; What's Done
; -----------
; All the usual Windows Python files are installed by this now.
; All the usual Windows Python Start menu entries are created and
; work fine.
19 20 21 22 23
; .py, .pyw, .pyc and .pyo extensions are registered.
;     PROBLEM:  Inno uninstall does not restore their previous registry
;               associations (if any).  Wise did.  This will make life
;               difficult for alpha (etc) testers.
; The Python install is fully functional for "typical" uses.
24 25 26
;
; What's Not Done
; ---------------
27
; None of "Mark Hammond's" registry entries are written.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
; No installation of files is done into the system dir:
;     The MS DLLs aren't handled at all by this yet.
;     Python22.dll is unpacked into the main Python dir.
;
; Inno can't do different things on NT/2000 depending on whether the user
; has Admin privileges, so I don't know how to "solve" either of those,
; short of building two installers (one *requiring* Admin privs, the
; other not doing anything that needs Admin privs).
;
; Inno has no concept of variables, so lots of lines in this file need
; to be fiddled by hand across releases.  Simplest way out:  stick this
; file in a giant triple-quoted r-string (note that backslashes are
; required all over the place here -- forward slashes DON'T WORK in
; Inno), and use %(yadda)s string interpolation to do substitutions; i.e.,
; write a very simple Python program to *produce* this script.

[Setup]
45 46 47 48 49
AppName=Python and combined Win32 Extensions
AppVerName=Python 2.2.2 and combined Win32 Extensions 150
AppId=Python 2.2.2.150
AppVersion=2.2.2.150
AppCopyright=Python is Copyright  2001 Python Software Foundation. Win32 Extensions are Copyright  1996-2001 Greg Stein and Mark Hammond.
50 51 52 53

; Default install dir; value of {app} later (unless user overrides).
; {sd} = system root drive, probably "C:".
DefaultDirName={sd}\Python22
54
;DefaultDirName={pf}\Python
55

56
; Start menu folder name; value of {group} later (unless user overrides).
57 58 59
DefaultGroupName=Python 2.2

; Point SourceDir to one above PCBuild = src.
60 61 62 63 64 65 66
; means this script can run unchanged from anyone's CVS tree, no matter
; what they called the top-level directories.
SourceDir=.
OutputDir=..
OutputBaseFilename=Python-2.2.2-Win32-150-Setup

AppPublisher=PythonLabs at Digital Creations
67 68 69 70
AppPublisherURL=http://www.python.org
AppSupportURL=http://www.python.org
AppUpdatesURL=http://www.python.org

71 72
AlwaysCreateUninstallIcon=true
ChangesAssociations=true
73
UninstallLogMode=new
74 75 76 77
AllowNoIcons=true
AdminPrivilegesRequired=true
UninstallDisplayIcon={app}\pyc.ico
WizardDebug=false
78 79

; The fewer screens the better; leave these commented.
80 81 82

Compression=bzip
InfoBeforeFile=LICENSE.txt
83
;InfoBeforeFile=Misc\NEWS
84

85 86 87 88
; uncomment the following line if you want your installation to run on NT 3.51 too.
; MinVersion=4,3.51

[Types]
89
Name: normal; Description: Select desired components; Flags: iscustom
90 91

[Components]
92 93 94 95 96
Name: main; Description: Python and Win32 Extensions; Types: normal
Name: docs; Description: Python documentation (HTML); Types: normal
Name: tk; Description: TCL/TK, tkinter, and Idle; Types: normal
Name: tools; Description: Python utility scripts (Tools\); Types: normal
Name: test; Description: Python test suite (Lib\test\); Types: normal
97 98

[Tasks]
99
Name: extensions; Description: Register file associations (.py, .pyw, .pyc, .pyo); Components: main; Check: IsAdminLoggedOn
100 101 102 103 104 105 106

[Files]
; Caution:  Using forward slashes instead screws up in amazing ways.
; Unknown:  By the time Components (and other attrs) are added to these lines, they're
; going to get awfully long.  But don't see a way to continue logical lines across
; physical lines.

107 108 109 110 111 112 113 114
Source: LICENSE.txt; DestDir: {app}; CopyMode: alwaysoverwrite
Source: README.txt; DestDir: {app}; CopyMode: alwaysoverwrite
Source: News.txt; DestDir: {app}; CopyMode: alwaysoverwrite
Source: *.ico; DestDir: {app}; CopyMode: alwaysoverwrite; Components: main

Source: python.exe; DestDir: {app}; CopyMode: alwaysoverwrite; Components: main
Source: pythonw.exe; DestDir: {app}; CopyMode: alwaysoverwrite; Components: main
Source: w9xpopen.exe; DestDir: {app}; CopyMode: alwaysoverwrite; Components: main
115 116


117 118 119
Source: DLLs\tcl83.dll; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: tk
Source: DLLs\tk83.dll; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: tk
Source: tcl\*.*; DestDir: {app}\tcl; CopyMode: alwaysoverwrite; Components: tk; Flags: recursesubdirs
120

121 122 123
Source: sysdir\python22.dll; DestDir: {sys}; CopyMode: alwaysskipifsameorolder; Components: main; Flags: sharedfile restartreplace
Source: sysdir\PyWinTypes22.dll; DestDir: {sys}; CopyMode: alwaysskipifsameorolder; Components: main; Flags: restartreplace sharedfile
Source: sysdir\pythoncom22.dll; DestDir: {sys}; CopyMode: alwaysskipifsameorolder; Components: main; Flags: restartreplace sharedfile
124

125 126
Source: DLLs\_socket.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\_socket.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
127

128 129
Source: DLLs\_sre.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\_sre.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
130

131 132
Source: DLLs\_symtable.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\_symtable.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
133

134 135
Source: DLLs\_testcapi.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\_testcapi.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
136

137 138
Source: DLLs\_tkinter.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: tk
Source: libs\_tkinter.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: tk
139

140 141
Source: DLLs\mmap.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\mmap.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
142

143 144
Source: DLLs\parser.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\parser.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
145

146 147
Source: DLLs\pyexpat.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\pyexpat.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
148

149 150
Source: DLLs\select.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\select.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
151

152 153
Source: DLLs\unicodedata.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\unicodedata.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
154

155 156
Source: DLLs\winreg.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\winreg.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
157

158 159
Source: DLLs\winsound.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\winsound.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
160

161 162
Source: DLLs\zlib.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
Source: libs\zlib.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
163

164
Source: libs\python22.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main
165

166
Source: DLLs\expat.dll; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main
167 168 169



170
Source: Lib\*.py; DestDir: {app}\Lib; CopyMode: alwaysoverwrite; Components: main
171
Source: Lib\compiler\*.*; DestDir: {app}\Lib\compiler; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
172 173 174
Source: Lib\distutils\*.*; DestDir: {app}\Lib\distutils; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
Source: Lib\email\*.*; DestDir: {app}\Lib\email; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
Source: Lib\encodings\*.*; DestDir: {app}\Lib\encodings; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
175
Source: Lib\hotshot\*.*; DestDir: {app}\Lib\hotshot; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
176 177
Source: Lib\lib-old\*.*; DestDir: {app}\Lib\lib-old; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
Source: Lib\xml\*.*; DestDir: {app}\Lib\xml; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
178
Source: Lib\hotshot\*.*; DestDir: {app}\Lib\hotshot; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
179
Source: Lib\test\*.*; DestDir: {app}\Lib\test; CopyMode: alwaysoverwrite; Components: test; Flags: recursesubdirs
180
Source: Lib\tkinter\*.py; DestDir: {app}\Lib\tkinter; CopyMode: alwaysoverwrite; Components: tk; Flags: recursesubdirs
181

182
Source: Lib\site-packages\README.txt; DestDir: {app}\Lib\site-packages; CopyMode: alwaysoverwrite; Components: main
183

184 185 186 187
Source: Lib\site-packages\PyWin32.chm; DestDir: {app}\Lib\site-packages; CopyMode: alwaysoverwrite; Components: docs
Source: Lib\site-packages\win32\*.*; DestDir: {app}\Lib\site-packages\win32; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
Source: Lib\site-packages\win32com\*.*; DestDir: {app}\Lib\site-packages\win32com; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
Source: Lib\site-packages\win32comext\*.*; DestDir: {app}\Lib\site-packages\win32comext; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
188

189
Source: include\*.h; DestDir: {app}\include; CopyMode: alwaysoverwrite; Components: main
190

191
Source: Tools\idle\*.*; DestDir: {app}\Tools\idle; CopyMode: alwaysoverwrite; Components: tk; Flags: recursesubdirs
192

193 194 195 196
Source: Tools\pynche\*.*; DestDir: {app}\Tools\pynche; CopyMode: alwaysoverwrite; Components: tools; Flags: recursesubdirs
Source: Tools\scripts\*.*; DestDir: {app}\Tools\Scripts; CopyMode: alwaysoverwrite; Components: tools; Flags: recursesubdirs
Source: Tools\webchecker\*.*; DestDir: {app}\Tools\webchecker; CopyMode: alwaysoverwrite; Components: tools; Flags: recursesubdirs
Source: Tools\versioncheck\*.*; DestDir: {app}\Tools\versioncheck; CopyMode: alwaysoverwrite; Components: tools; Flags: recursesubdirs
197

198
Source: Doc\*.*; DestDir: {app}\Doc; CopyMode: alwaysoverwrite; Flags: recursesubdirs; Components: docs
199 200 201


[Icons]
202 203 204 205 206
Name: {group}\Python (command line); Filename: {app}\python.exe; WorkingDir: {app}; Components: main
Name: {group}\Python Manuals; Filename: {app}\Doc\index.html; WorkingDir: {app}; Components: docs
Name: {group}\Win32 Extensions Help; Filename: {app}\Lib\site-packages\PyWin32.chm; WorkingDir: {app}\Lib\site-packages; Components: docs
Name: {group}\Module Docs; Filename: {app}\pythonw.exe; WorkingDir: {app}; Parameters: """{app}\Tools\Scripts\pydoc.pyw"""; Components: tools
Name: {group}\IDLE (Python GUI); Filename: {app}\pythonw.exe; WorkingDir: {app}; Parameters: """{app}\Tools\idle\idle.pyw"""; Components: tools
207 208 209

[Registry]
; Register .py
210 211 212 213 214
Tasks: extensions; Root: HKCR; Subkey: .py; ValueType: string; ValueName: ; ValueData: Python File; Flags: uninsdeletevalue
Tasks: extensions; Root: HKCR; Subkey: .py; ValueType: string; ValueName: Content Type; ValueData: text/plain; Flags: uninsdeletevalue
Tasks: extensions; Root: HKCR; Subkey: Python File; ValueType: string; ValueName: ; ValueData: Python File; Flags: uninsdeletekey
Tasks: extensions; Root: HKCR; Subkey: Python File\DefaultIcon; ValueType: string; ValueName: ; ValueData: {app}\Py.ico
Tasks: extensions; Root: HKCR; Subkey: Python File\shell\open\command; ValueType: string; ValueName: ; ValueData: """{app}\python.exe"" ""%1"" %*"
215 216

; Register .pyc
217 218 219 220
Tasks: extensions; Root: HKCR; Subkey: .pyc; ValueType: string; ValueName: ; ValueData: Python CompiledFile; Flags: uninsdeletevalue
Tasks: extensions; Root: HKCR; Subkey: Python CompiledFile; ValueType: string; ValueName: ; ValueData: Compiled Python File; Flags: uninsdeletekey
Tasks: extensions; Root: HKCR; Subkey: Python CompiledFile\DefaultIcon; ValueType: string; ValueName: ; ValueData: {app}\pyc.ico
Tasks: extensions; Root: HKCR; Subkey: Python CompiledFile\shell\open\command; ValueType: string; ValueName: ; ValueData: """{app}\python.exe"" ""%1"" %*"
221 222

; Register .pyo
223
Tasks: extensions; Root: HKCR; Subkey: .pyo; ValueType: string; ValueName: ; ValueData: Python CompiledFile; Flags: uninsdeletevalue
224 225

; Register .pyw
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
Tasks: extensions; Root: HKCR; Subkey: .pyw; ValueType: string; ValueName: ; ValueData: Python NoConFile; Flags: uninsdeletevalue
Tasks: extensions; Root: HKCR; Subkey: .pyw; ValueType: string; ValueName: Content Type; ValueData: text/plain; Flags: uninsdeletevalue
Tasks: extensions; Root: HKCR; Subkey: Python NoConFile; ValueType: string; ValueName: ; ValueData: Python File (no console); Flags: uninsdeletekey
Tasks: extensions; Root: HKCR; Subkey: Python NoConFile\DefaultIcon; ValueType: string; ValueName: ; ValueData: {app}\Py.ico
Tasks: extensions; Root: HKCR; Subkey: Python NoConFile\shell\open\command; ValueType: string; ValueName: ; ValueData: """{app}\pythonw.exe"" ""%1"" %*"


; Python Registry Keys
Root: HKLM; Subkey: SOFTWARE\Python; Flags: uninsdeletekeyifempty; Check: IsAdminLoggedOn
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\PythonPath; ValueData: "{app}\Lib;{app}\DLLs"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\PythonPath\win32; ValueData: "{app}\lib\site-packages\win32;{app}\lib\site-packages\win32\lib"; Flags: uninsdeletekey
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\PythonPath\win32com; ValueData: C:\Python\lib\site-packages; Flags: uninsdeletekey
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\Modules; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\Modules\pythoncom; ValueData: {sys}\pythoncom22.dll; Flags: uninsdeletekey
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\Modules\pywintypes; ValueData: {sys}\PyWinTypes22.dll; Flags: uninsdeletekey
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\InstallPath; ValueData: {app}; Flags: uninsdeletekeyifempty; ValueType: string
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\InstallPath\InstallGroup; ValueData: {group}; Flags: uninsdeletekey
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\Help; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\Help\Main Python Documentation; ValueType: string; ValueData: {app}\Doc\index.html; Flags: uninsdeletekey; Components: docs
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\Help\Python Win32 Documentation; ValueType: string; ValueData: {app}\lib\site-packages\PyWin32.chm; Flags: uninsdeletekey; Components: docs

[_ISTool]
EnableISX=true


[Code]
Program Setup;

Function IsAdminNotLoggedOn(): Boolean;
begin
  Result := Not IsAdminLoggedOn();
end;

begin
end.




[UninstallDelete]
268 269 270
Name: {app}\Lib\compiler\*.pyc; Type: files
Name: {app}\Lib\compiler\*.pyo; Type: files
Name: {app}\Lib\compiler; Type: dirifempty
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
Name: {app}\Lib\distutils\command\*.pyc; Type: files
Name: {app}\Lib\distutils\command\*.pyo; Type: files
Name: {app}\Lib\distutils\command; Type: dirifempty
Name: {app}\Lib\distutils\*.pyc; Type: files
Name: {app}\Lib\distutils\*.pyo; Type: files
Name: {app}\Lib\distutils; Type: dirifempty
Name: {app}\Lib\email\test\*.pyc; Type: files
Name: {app}\Lib\email\test\*.pyo; Type: files
Name: {app}\Lib\email\test; Type: dirifempty
Name: {app}\Lib\email\*.pyc; Type: files
Name: {app}\Lib\email\*.pyo; Type: files
Name: {app}\Lib\email; Type: dirifempty
Name: {app}\Lib\encodings\*.pyc; Type: files
Name: {app}\Lib\encodings\*.pyo; Type: files
Name: {app}\Lib\encodings; Type: dirifempty
286 287 288
Name: {app}\Lib\hotshot\*.pyc; Type: files
Name: {app}\Lib\hotshot\*.pyo; Type: files
Name: {app}\Lib\hotshot; Type: dirifempty
289 290 291
Name: {app}\Lib\lib-old\*.pyc; Type: files
Name: {app}\Lib\lib-old\*.pyo; Type: files
Name: {app}\Lib\lib-old; Type: dirifempty
292 293 294
Name: {app}\Lib\tkinter\*.pyc; Type: files
Name: {app}\Lib\tkinter\*.pyo; Type: files
Name: {app}\Lib\tkinter; Type: dirifempty
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
Name: {app}\Lib\test\*.pyc; Type: files
Name: {app}\Lib\test\*.pyo; Type: files
Name: {app}\Lib\test; Type: dirifempty
Name: {app}\Lib\xml\dom\*.pyc; Type: files
Name: {app}\Lib\xml\dom\*.pyo; Type: files
Name: {app}\Lib\xml\dom; Type: dirifempty
Name: {app}\Lib\xml\parsers\*.pyc; Type: files
Name: {app}\Lib\xml\parsers\*.pyo; Type: files
Name: {app}\Lib\xml\parsers; Type: dirifempty
Name: {app}\Lib\xml\sax\*.pyc; Type: files
Name: {app}\Lib\xml\sax\*.pyo; Type: files
Name: {app}\Lib\xml\sax; Type: dirifempty
Name: {app}\Lib\xml\*.pyc; Type: files
Name: {app}\Lib\xml\*.pyo; Type: files
Name: {app}\Lib\xml; Type: dirifempty

Name: {app}\Lib\site-packages\win32; Type: filesandordirs
Name: {app}\Lib\site-packages\win32com; Type: filesandordirs
Name: {app}\Lib\site-packages\win32comext; Type: filesandordirs
Name: {app}\Lib\site-packages\pythoncom.py*; Type: files
Name: {app}\Lib\site-packages; Type: dirifempty

Name: {app}\Lib\*.pyc; Type: files
Name: {app}\Lib; Type: dirifempty

Name: {app}\Tools\pynche\*.pyc; Type: files
Name: {app}\Tools\pynche\*.pyo; Type: files
Name: {app}\Tools\pynche; Type: dirifempty

Name: {app}\Tools\idle\*.pyc; Type: files
Name: {app}\Tools\idle\*.pyo; Type: files
Name: {app}\Tools\idle; Type: dirifempty

Name: {app}\Tools\scripts\*.pyc; Type: files
Name: {app}\Tools\scripts\*.pyo; Type: files
Name: {app}\Tools\scripts; Type: dirifempty

Name: {app}\Tools\versioncheck\*.pyc; Type: files
Name: {app}\Tools\versioncheck\*.pyo; Type: files
Name: {app}\Tools\versioncheck; Type: dirifempty

Name: {app}\Tools\webchecker\*.pyc; Type: files
Name: {app}\Tools\webchecker\*.pyo; Type: files
Name: {app}\Tools\webchecker; Type: dirifempty

Name: {app}\Tools; Type: dirifempty
341