Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5c61a8

Browse files
committed
Leave the Inno script in better shape. Added registration of .py etc
extensions -- but Inno uninstall doesn't restore previous ones (if any), so that's another step backwards.
1 parent c7cdc63 commit b5c61a8

1 file changed

Lines changed: 51 additions & 16 deletions

File tree

PCbuild/python.iss

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,23 @@
88
; you may not recognize instantly: click it. You're done. It builds
99
; the installer into PCBuild/Python-2.2a1.exe. Size and speed of the
1010
; installer are competitive with the Wise installer; Inno uninstall
11-
; seems much quicker than Wise.
11+
; seems much quicker than Wise (but also feebler, and the uninstall
12+
; log is in some un(human)readable binary format).
1213
;
1314
; What's Done
1415
; -----------
1516
; All the usual Windows Python files are installed by this now.
1617
; All the usual Windows Python Start menu entries are created and
1718
; work fine.
18-
; The Python install is fully functional for "typical" uses (e.g.,
19-
; nothing I ever do with Python requires more than this).
19+
; .py, .pyw, .pyc and .pyo extensions are registered.
20+
; PROBLEM: Inno uninstall does not restore their previous registry
21+
; associations (if any). Wise did. This will make life
22+
; difficult for alpha (etc) testers.
23+
; The Python install is fully functional for "typical" uses.
2024
;
2125
; What's Not Done
2226
; ---------------
23-
; No registry entries are written.
27+
; None of "Mark Hammond's" registry entries are written.
2428
; No installation of files is done into the system dir:
2529
; The MS DLLs aren't handled at all by this yet.
2630
; Python22.dll is unpacked into the main Python dir.
@@ -38,21 +42,21 @@
3842
; write a very simple Python program to *produce* this script.
3943

4044
[Setup]
45+
; Note: we *want* the version number to show up everywhere.
4146
; Which of these controls App Path???
4247
AppName=Python 2.2 alpha 1
4348
AppVerName=Python 2.2 alpha 1
49+
AppId=Python 2.2
4450
AppVersion=2.2a1
4551
AppCopyright=Copyright © 2001 Python Software Foundation
4652

4753
; Default install dir; value of {app} later (unless user overrides).
4854
; {sd} = system root drive, probably "C:".
4955
DefaultDirName={sd}\Python22
5056

51-
; Start menu folder name.
57+
; Start menu folder name; value of {group} later (unless user overrides).
5258
DefaultGroupName=Python 2.2
5359

54-
AppId=Python 2.2
55-
5660
; Point SourceDir to one above PCBuild = src.
5761
; YAY! That actually worked: means this script can run unchanged from anyone's
5862
; CVS tree, no matter what they called the top-level directories. Wise
@@ -61,27 +65,34 @@ SourceDir=..
6165
OutputDir=PCBuild
6266
OutputBaseFilename=Python-2.2a1
6367

64-
AppPublisher=PythonLabs at Digicool
68+
AppPublisher=PythonLabs at Digital Creations
6569
AppPublisherURL=http://www.python.org
6670
AppSupportURL=http://www.python.org
6771
AppUpdatesURL=http://www.python.org
6872

6973
AlwaysCreateUninstallIcon=yes
7074
ChangesAssociations=yes
7175
UninstallLogMode=new
76+
77+
; The fewer screens the better; leave these commented.
7278
;LicenseFile=LICENSE
7379
;InfoBeforeFile=Misc\NEWS
80+
7481
; uncomment the following line if you want your installation to run on NT 3.51 too.
7582
; MinVersion=4,3.51
7683

7784
[Types]
7885
Name: normal; Description: "Select desired components"; Flags: iscustom
7986

8087
[Components]
81-
Name: main; Description: "Python interpreter and library"; Types: normal
82-
Name: docs; Description: "Python documentation (HTML)"; Types: normal
83-
Name: tools; Description: "Python utility scripts"; Types: normal
84-
Name: test; Description: "Python test suite (Lib\test\)"; Types: normal
88+
Name: main; Description: "Python interpreter, library and Tk"; Types: normal
89+
Name: docs; Description: "Python documentation (HTML)"; Types: normal
90+
Name: tools; Description: "Python utility scripts (Tools\)"; Types: normal
91+
Name: test; Description: "Python test suite (Lib\test\)"; Types: normal
92+
93+
[Tasks]
94+
Name: startmenu; Description: "Create Start menu shortcuts"; Components: main docs tools
95+
Name: extensions; Description: "Register file extensions (.py, .pyw, .pyc, .pyo)"; Components: main
8596

8697
[Files]
8798
; Caution: Using forward slashes instead screws up in amazing ways.
@@ -199,8 +210,32 @@ Source: Lib\test\audiotest.au; DestDir: "{app}\Lib\test"; CopyMode: alway
199210
Source: Lib\test\output\*.*; DestDir: "{app}\Lib\test\output"; CopyMode: alwaysoverwrite; Components: test
200211

201212
[Icons]
202-
Name: "{group}\IDLE (Python GUI)"; Filename: "{app}\pythonw.exe"; WorkingDir: "{app}"; Parameters: "{app}\Tools\idle\idle.pyw"
203-
Name: "{group}\Module Docs"; Filename: "{app}\pythonw.exe"; WorkingDir: "{app}"; Parameters: "{app}\Tools\Scripts\pydoc.pyw"
204-
Name: "{group}\Python (command line)"; Filename: "{app}\python.exe"; WorkingDir: "{app}"
205-
Name: "{group}\Python Manuals"; Filename: "{app}\Doc\index.html"; WorkingDir: "{app}"
213+
Tasks: startmenu; Name: "{group}\IDLE (Python GUI)"; Filename: "{app}\pythonw.exe"; WorkingDir: "{app}"; Parameters: """{app}\Tools\idle\idle.pyw"""; Components: tools
214+
Tasks: startmenu; Name: "{group}\Module Docs"; Filename: "{app}\pythonw.exe"; WorkingDir: "{app}"; Parameters: """{app}\Tools\Scripts\pydoc.pyw"""; Components: tools
215+
Tasks: startmenu; Name: "{group}\Python (command line)"; Filename: "{app}\python.exe"; WorkingDir: "{app}"; Components: main
216+
Tasks: startmenu; Name: "{group}\Python Manuals"; Filename: "{app}\Doc\index.html"; WorkingDir: "{app}"; Components: docs
217+
218+
[Registry]
219+
; Register .py
220+
Tasks: extensions; Root: HKCR; Subkey: ".py"; ValueType: string; ValueName: ""; ValueData: "Python File"; Flags: uninsdeletevalue
221+
Tasks: extensions; Root: HKCR; Subkey: ".py"; ValueType: string; ValueName: "Content Type"; ValueData: "text/plain"; Flags: uninsdeletevalue
222+
Tasks: extensions; Root: HKCR; Subkey: "Python File"; ValueType: string; ValueName: ""; ValueData: "Python File"; Flags: uninsdeletekey
223+
Tasks: extensions; Root: HKCR; Subkey: "Python File\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Py.ico"
224+
Tasks: extensions; Root: HKCR; Subkey: "Python File\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\python.exe"" ""%1"" %*"
225+
226+
; Register .pyc
227+
Tasks: extensions; Root: HKCR; Subkey: ".pyc"; ValueType: string; ValueName: ""; ValueData: "Python CompiledFile"; Flags: uninsdeletevalue
228+
Tasks: extensions; Root: HKCR; Subkey: "Python CompiledFile"; ValueType: string; ValueName: ""; ValueData: "Compiled Python File"; Flags: uninsdeletekey
229+
Tasks: extensions; Root: HKCR; Subkey: "Python CompiledFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\pyc.ico"
230+
Tasks: extensions; Root: HKCR; Subkey: "Python CompiledFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\python.exe"" ""%1"" %*"
231+
232+
; Register .pyo
233+
Tasks: extensions; Root: HKCR; Subkey: ".pyo"; ValueType: string; ValueName: ""; ValueData: "Python CompiledFile"; Flags: uninsdeletevalue
234+
235+
; Register .pyw
236+
Tasks: extensions; Root: HKCR; Subkey: ".pyw"; ValueType: string; ValueName: ""; ValueData: "Python NoConFile"; Flags: uninsdeletevalue
237+
Tasks: extensions; Root: HKCR; Subkey: ".pyw"; ValueType: string; ValueName: "Content Type"; ValueData: "text/plain"; Flags: uninsdeletevalue
238+
Tasks: extensions; Root: HKCR; Subkey: "Python NoConFile"; ValueType: string; ValueName: ""; ValueData: "Python File (no console)"; Flags: uninsdeletekey
239+
Tasks: extensions; Root: HKCR; Subkey: "Python NoConFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Py.ico"
240+
Tasks: extensions; Root: HKCR; Subkey: "Python NoConFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\pythonw.exe"" ""%1"" %*"
206241

0 commit comments

Comments
 (0)