[Python-checkins] python/nondist/sandbox/msi msi.py,1.6,1.7

loewis at projects.sourceforge.net loewis at projects.sourceforge.net
Sun Feb 1 13:05:33 EST 2004


Update of /cvsroot/python/python/nondist/sandbox/msi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20170
Modified Files:
	msi.py 
Log Message:
Change DEFAULTPYTHON to a feature (ext_feature)
Install pythonxy.dll to System32
Make shortcuts advertised
Index: msi.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/msi/msi.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** msi.py	17 Jan 2004 20:51:24 -0000	1.6
--- msi.py	1 Feb 2004 18:05:31 -0000	1.7
***************
*** 67,70 ****
--- 67,75 ----
 testprefix = ''
 
+ if msilib.Win64:
+ SystemFolderName = "[SystemFolder64]"
+ else:
+ SystemFolderName = "[SystemFolder]"
+ 
 msilib.reset()
 
***************
*** 85,90 ****
 msilib.add_tables(db, sequence)
 add_data(db, "Property", [("UpgradeCode", uc),
! ("DEFAULTPYTHON", "1"),
! ("WhichUsers", "ALL")])
 db.Commit()
 return db
--- 90,95 ----
 msilib.add_tables(db, sequence)
 add_data(db, "Property", [("UpgradeCode", uc),
! ("WhichUsers", "ALL"),
! ])
 db.Commit()
 return db
***************
*** 204,207 ****
--- 209,214 ----
 ("InitialTargetDir", 307, "TARGETDIR",
 "[WindowsVolume]Python%s%s" % (major, minor)),
+ ("SetDLLDirToTarget", 307, "DLLDIR", "[TARGETDIR]"),
+ ("SetDLLDirToSystem32", 307, "DLLDIR", SystemFolderName),
 ])
 
***************
*** 210,213 ****
--- 217,223 ----
 [("PrepareDlg", None, 140),
 ("InitialTargetDir", 'TARGETDIR=""', 750),
+ # In the user interface, assume all-users installation if privileged.
+ ("SetDLLDirToSystem32", 'DLLDIR="" and Privileged', 751),
+ ("SetDLLDirToTarget", 'DLLDIR="" and not Privileged', 752),
 ("SelectDirectoryDlg", "Not Installed", 1230),
 # XXX notyet
***************
*** 216,220 ****
 ("ProgressDlg", None, 1280)])
 add_data(db, "AdminUISequence",
! [("InitialTargetDir", 'TARGETDIR=""', 750)])
 
 #####################################################################
--- 226,243 ----
 ("ProgressDlg", None, 1280)])
 add_data(db, "AdminUISequence",
! [("InitialTargetDir", 'TARGETDIR=""', 750),
! ("SetDLLDirToTarget", 'DLLDIR=""', 751),
! ])
! 
! # Execute Sequences
! add_data(db, "InstallExecuteSequence",
! [("InitialTargetDir", 'TARGETDIR=""', 750),
! ("SetDLLDirToSystem32", 'DLLDIR="" and ALLUSERS', 751),
! ("SetDLLDirToTarget", 'DLLDIR="" and not ALLUSERS', 752),
! ])
! add_data(db, "AdminExecuteSequence",
! [("InitialTargetDir", 'TARGETDIR=""', 750),
! ("SetDLLDirToTarget", 'DLLDIR=""', 751),
! ])
 
 #####################################################################
***************
*** 425,433 ****
 "OK", "OK", "OK")
 advanced.title("Advanced Options")
! #0x10: Numeric property
! advanced.control("Default", "CheckBox", 135, 60, 160, 20, 19,
! "DEFAULTPYTHON", "Install as Default Python Installation",
! "AdminInstall", None)
! g = advanced.radiogroup("AdminInstall", 135, 90, 160, 50, 3,
 "WhichUsers", "", "OK")
 # ALLUSERS should not be tempered with on W9x
--- 448,452 ----
 "OK", "OK", "OK")
 advanced.title("Advanced Options")
! g = advanced.radiogroup("AdminInstall", 135, 60, 160, 50, 3,
 "WhichUsers", "", "OK")
 # ALLUSERS should not be tempered with on W9x
***************
*** 444,448 ****
 c.condition("Hide", "NOT Windows9x") 
 
! advanced.cancel("Ok", "Default", name="OK").event("EndDialog", "Return")
 
 #####################################################################
--- 463,470 ----
 c.condition("Hide", "NOT Windows9x") 
 
! c = advanced.cancel("Ok", "AdminInstall", name="OK")
! c.event("DoAction", "SetDLLDirToTarget", 'WhichUsers="JUSTME"', 1)
! c.event("DoAction", "SetDLLDirToSystem32", 'WhichUsers="ALL"', 2)
! c.event("EndDialog", "Return", order = 3)
 
 #####################################################################
***************
*** 518,535 ****
 
 def add_features(db):
! global default_feature, tcltk, htmlfiles, tools, testsuite
 default_feature = Feature(db, "DefaultFeature", "Python",
 "Python Interpreter and Libraries",
 1, directory = "TARGETDIR")
! tcltk = Feature(db, "TclTk", "Tcl/Tk", "Tkinter, IDLE, pydoc", 3,
 parent = default_feature)
 htmlfiles = Feature(db, "Documentation", "Documentation",
! "Python HTMLHelp File", 5, parent = default_feature)
 tools = Feature(db, "Tools", "Utility Scripts",
! "Python utility scripts (Tools/", 7, 
! 		 parent = default_feature)
 testsuite = Feature(db, "Testsuite", "Test suite",
! "Python test suite (Lib/test/)", 9, 
! 			parent = default_feature)
 
 def extract_msvcr71():
--- 540,561 ----
 
 def add_features(db):
! global default_feature, tcltk, htmlfiles, tools, testsuite, ext_feature
 default_feature = Feature(db, "DefaultFeature", "Python",
 "Python Interpreter and Libraries",
 1, directory = "TARGETDIR")
! ext_feature = Feature(db, "Extensions", "Register Extensions",
! "Make this Python installation the default Python installation", 3,
! parent = default_feature)
! tcltk = Feature(db, "TclTk", "Tcl/Tk", "Tkinter, IDLE, pydoc", 5,
 parent = default_feature)
 htmlfiles = Feature(db, "Documentation", "Documentation",
! "Python HTMLHelp File", 7, parent = default_feature)
 tools = Feature(db, "Tools", "Utility Scripts",
! "Python utility scripts (Tools/", 9, 
! parent = default_feature)
 testsuite = Feature(db, "Testsuite", "Test suite",
! "Python test suite (Lib/test/)", 11,
! parent = default_feature)
! 
 
 def extract_msvcr71():
***************
*** 560,565 ****
 root = Directory(db, cab, None, srcdir, "TARGETDIR", "SourceDir")
 default_feature.set_current()
- root.add_file("PCBuild/python.exe")
- root.add_file("PCBuild/pythonw.exe")
 root.add_file("PCBuild/w9xpopen.exe")
 root.add_file("PC/py.ico")
--- 586,589 ----
***************
*** 568,577 ****
 root.add_file("NEWS.txt", src="Misc/NEWS")
 root.add_file("LICENSE.txt", src="LICENSE")
! 
! root.add_file("PCBuild/python%s%s.dll" % (major, minor)) # XXX separate component for system32
 # XXX determine dependencies
 version, lang = extract_msvcr71()
! root.add_file("msvcr71.dll", src=os.path.abspath("msvcr71.dll"),
! version=version, language=lang)
 tmpfiles.append("msvcr71.dll")
 
--- 592,607 ----
 root.add_file("NEWS.txt", src="Misc/NEWS")
 root.add_file("LICENSE.txt", src="LICENSE")
! # msidbComponentAttributesSharedDllRefCount = 8
! root.start_component("python.exe", flags = 8, keyfile="python.exe")
! root.add_file("PCBuild/python.exe")
! root.start_component("pythonw.exe", flags = 8, keyfile="pythonw.exe")
! root.add_file("PCBuild/pythonw.exe")
! 
! dlldir = Directory(db, cab, root, srcdir, "DLLDIR", ".")
! dlldir.add_file("PCBuild/python%s%s.dll" % (major, minor))
 # XXX determine dependencies
 version, lang = extract_msvcr71()
! dlldir.add_file("msvcr71.dll", src=os.path.abspath("msvcr71.dll"),
! version=version, language=lang)
 tmpfiles.append("msvcr71.dll")
 
***************
*** 709,718 ****
 "InstallPath"),
 ("REGISTRY.def", msilib.gen_uuid(), "TARGETDIR", 4,
! "DEFAULTPYTHON=1", None),
 ("REGISTRY.tcl", msilib.gen_uuid(), "TARGETDIR", 4,
! "DEFAULTPYTHON=1", None)])
 add_data(db, "FeatureComponents",
 [(default_feature.id, "REGISTRY"),
! (default_feature.id, "REGISTRY.def"),
 (tcltk.id, "REGISTRY.tcl")])
 
--- 739,748 ----
 "InstallPath"),
 ("REGISTRY.def", msilib.gen_uuid(), "TARGETDIR", 4,
! None, "py.ext"),
 ("REGISTRY.tcl", msilib.gen_uuid(), "TARGETDIR", 4,
! "&%s <> 2" % ext_feature.id, "py.IDLE")])
 add_data(db, "FeatureComponents",
 [(default_feature.id, "REGISTRY"),
! (ext_feature.id, "REGISTRY.def"),
 (tcltk.id, "REGISTRY.tcl")])
 
***************
*** 783,816 ****
 [("ProgramMenuFolder", "TARGETDIR", "."),
 ("MenuDir", "ProgramMenuFolder", "PY%s%s|%sPython %s.%s" % (major,minor,testprefix,major,minor))])
 add_data(db, "Shortcut",
 [# Advertised shortcuts: targets are features, not files
 # The key file of the component is then entered as the real target
! # XXX, advertised shortcuts don't work, so make them unadvertised
! # for now
! #("IDLE", "MenuDir", "IDLE|IDLE (Python GUI)", "pythonw.exe",
! # default_feature.id, r"[TARGETDIR]Lib\idlelib\idle.pyw",
! # None, None, None, None, None, "TARGETDIR"),
! #("PyDoc", "MenuDir", "MODDOCS|Module Docs", "pythonw.exe",
! # default_feature.id, r"[TARGETDIR]Tools\scripts\pydocgui.pyw",
! # None, None, None, None, None, "TARGETDIR"),
! #("Python", "MenuDir", "PYTHON|Python (command line)", "python.exe",
! # default_feature.id, None,
! # None, None, None, None, None, "TARGETDIR"),
! ("IDLE", "MenuDir", "IDLE|IDLE (Python GUI)", "REGISTRY",
! r"[TARGETDIR]pythonw.exe", r"[TARGETDIR]Lib\idlelib\idle.pyw",
! None, None, None, None, None, "TARGETDIR"),
! ("PyDoc", "MenuDir", "MODDOCS|Module Docs", "REGISTRY",
! r"[TARGETDIR]pythonw.exe", r"[TARGETDIR]Tools\scripts\pydocgui.pyw",
! None, None, None, None, None, "TARGETDIR"),
! ("Python", "MenuDir", "PYTHON|Python (command line)", "REGISTRY",
! r"[TARGETDIR]python.exe", None,
! None, None, None, None, None, "TARGETDIR"),
! # Non-advertised features: must be associated with a registry component
 ("Manual", "MenuDir", "MANUAL|Python Manuals", "REGISTRY",
 r"[TARGETDIR]Doc\python%s%s.chm" % (major, minor), None,
 None, None, None, None, None, None),
- # XXX: System64Folder on Win64
 ("Uninstall", "MenuDir", "UNINST|Uninstall Python", "REGISTRY",
! "[SystemFolder]msiexec", "/x%s" % product_code,
 None, None, None, None, None, None),
 ])
--- 813,836 ----
 [("ProgramMenuFolder", "TARGETDIR", "."),
 ("MenuDir", "ProgramMenuFolder", "PY%s%s|%sPython %s.%s" % (major,minor,testprefix,major,minor))])
+ add_data(db, "RemoveFile",
+ [("MenuDir", "TARGETDIR", None, "MenuDir", 2)])
 add_data(db, "Shortcut",
 [# Advertised shortcuts: targets are features, not files
 # The key file of the component is then entered as the real target
! ("IDLE", "MenuDir", "IDLE|IDLE (Python GUI)", "pythonw.exe",
! tcltk.id, r"[TARGETDIR]Lib\idlelib\idle.pyw",
! None, None, None, "py.ico", None, "TARGETDIR"),
! ("PyDoc", "MenuDir", "MODDOCS|Module Docs", "pythonw.exe",
! default_feature.id, r"[TARGETDIR]Tools\scripts\pydocgui.pyw",
! None, None, None, "py.ico", None, "TARGETDIR"),
! ("Python", "MenuDir", "PYTHON|Python (command line)", "python.exe",
! default_feature.id, None,
! None, None, None, "py.ico", None, "TARGETDIR"),
! ## Non-advertised features: must be associated with a registry component
 ("Manual", "MenuDir", "MANUAL|Python Manuals", "REGISTRY",
 r"[TARGETDIR]Doc\python%s%s.chm" % (major, minor), None,
 None, None, None, None, None, None),
 ("Uninstall", "MenuDir", "UNINST|Uninstall Python", "REGISTRY",
! SystemFolderName+"msiexec", "/x%s" % product_code,
 None, None, None, None, None, None),
 ])


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /