135135# b) it is NT, the user is privileged, and has chosen per-machine installation
136136sys32cond = "(Windows9x or (Privileged and ALLUSERS))"
137137
138- # Install extensions if the feature goes into
139- # INSTALLSTATE_ADVERTISED or INSTALLSTATE_LOCAL
140- want_extensions = "(&Extensions = 1) or (&Extensions = 3)"
141-
142138def build_database ():
143139 """Generate an empty database, with just the schema and the
144140 Summary information stream."""
@@ -164,15 +160,6 @@ def build_database():
164160 # back in case the installation is interrupted
165161 msilib .change_sequence (sequence .InstallExecuteSequence ,
166162 "RemoveExistingProducts" , 1510 )
167- # Conditionalize Extension information
168- msilib .change_sequence (sequence .InstallExecuteSequence ,
169- "RegisterClassInfo" , cond = want_extensions )
170- msilib .change_sequence (sequence .InstallExecuteSequence ,
171- "RegisterExtensionInfo" , cond = want_extensions )
172- msilib .change_sequence (sequence .InstallExecuteSequence ,
173- "RegisterProgIdInfo" , cond = want_extensions )
174- msilib .change_sequence (sequence .InstallExecuteSequence ,
175- "RegisterMIMEInfo" , cond = want_extensions )
176163 msilib .add_tables (db , sequence )
177164 # We cannot set ALLUSERS in the property table, as this cannot be
178165 # reset if the user choses a per-user installation. Instead, we
@@ -825,6 +812,8 @@ def add_files(db):
825812 root .add_file ("PCBuild/python.exe" )
826813 root .start_component ("pythonw.exe" , keyfile = "pythonw.exe" )
827814 root .add_file ("PCBuild/pythonw.exe" )
815+ root .start_component ("launcher.exe" , feature = ext_feature , keyfile = "launcher.exe" )
816+ root .add_file ("PCBuild/launcher.exe" )
828817
829818 # msidbComponentAttributesSharedDllRefCount = 8, see "Component Table"
830819 dlldir = PyDirectory (db , cab , root , srcdir , "DLLDIR" , "." )
@@ -998,7 +987,8 @@ def add_registry(db):
998987 if have_tcl :
999988 tcldata = [
1000989 ("REGISTRY.tcl" , msilib .gen_uuid (), "TARGETDIR" , 4 ,
1001- "&%s <> 2" % ext_feature .id , "py.IDLE" )]
990+ "&%s <> 2" % ext_feature .id ,
991+ "py.IDLE" )]
1002992 add_data (db , "Component" ,
1003993 # msidbComponentAttributesRegistryKeyPath = 4
1004994 [("REGISTRY" , msilib .gen_uuid (), "TARGETDIR" , 4 , None ,
@@ -1027,16 +1017,16 @@ def add_registry(db):
10271017 pat3 = r"Software\Classes\%sPython.%sFile"
10281018 # Advertised extensions
10291019 add_data (db , "Extension" ,
1030- [("py" , "python .exe" , "Python.File" , None , default_feature .id ),
1031- ("pyw" , "pythonw .exe" , "Python.NoConFile" , None , default_feature .id ),
1032- ("pyc" , "python .exe" , "Python.CompiledFile" , None , default_feature .id ),
1033- ("pyo" , "python .exe" , "Python.CompiledFile" , None , default_feature .id )])
1020+ [("py" , "launcher .exe" , "Python.File" , None , ext_feature .id ),
1021+ ("pyw" , "launcher .exe" , "Python.NoConFile" , None , ext_feature .id ),
1022+ ("pyc" , "launcher .exe" , "Python.CompiledFile" , None , ext_feature .id ),
1023+ ("pyo" , "launcher .exe" , "Python.CompiledFile" , None , ext_feature .id )])
10341024 # add_data(db, "MIME") XXX
10351025 add_data (db , "Verb" ,
1036- [("py" , "open" , 1 , None , r'"%1"' ),
1026+ [("py" , "open" , 1 , None , r'-console "%1"' ),
10371027 ("pyw" , "open" , 1 , None , r'"%1"' ),
1038- ("pyc" , "open" , 1 , None , r'"%1"' ),
1039- ("pyo" , "open" , 1 , None , r'"%1"' )])
1028+ ("pyc" , "open" , 1 , None , r'-console "%1"' ),
1029+ ("pyo" , "open" , 1 , None , r'-console "%1"' )])
10401030 add_data (db , "ProgId" ,
10411031 [("Python.File" , None , None , "Python File" , "python_icon.exe" , 0 ),
10421032 ("Python.NoConFile" , None , None , "Python File (no console)" , "python_icon.exe" , 0 ),
0 commit comments