[Python-checkins] python/nondist/sandbox/msi msi.py, 1.29, 1.30 msilib.py, 1.12, 1.13

loewis at users.sourceforge.net loewis at users.sourceforge.net
Tue Aug 17 14:56:30 CEST 2004


Update of /cvsroot/python/python/nondist/sandbox/msi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14387

Modified Files:
	msi.py msilib.py 
Log Message:
Conditionalize extension registration.
Add support for "Change" installations.

Index: msi.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/msi/msi.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** msi.py	17 Aug 2004 11:51:51 -0000	1.29
--- msi.py	17 Aug 2004 12:56:03 -0000	1.30
***************
*** 134,137 ****
--- 134,140 ----
  sys32cond = "(Windows9x or (Privileged and ALLUSERS))"
  
+ # Install extensions if the feature goes into
+ # INSTALLSTATE_ADVERTISED or INSTALLSTATE_LOCAL
+ want_extensions = "(&Extensions = 1) or (&Extensions = 3)"
  
  def build_database():
***************
*** 150,154 ****
          w64 = ""
      db = msilib.init_database("python-%s%s.msi" % (full_current_version, w64), 
! 		          schema, ProductName="Python "+full_current_version,
                    ProductCode=product_code,
                    ProductVersion=current_version,
--- 153,157 ----
          w64 = ""
      db = msilib.init_database("python-%s%s.msi" % (full_current_version, w64), 
!                   schema, ProductName="Python "+full_current_version,
                    ProductCode=product_code,
                    ProductVersion=current_version,
***************
*** 160,163 ****
--- 163,175 ----
      msilib.change_sequence(sequence.InstallExecuteSequence,
                             "RemoveExistingProducts", 1510)
+     # Conditionalize Extension information
+     msilib.change_sequence(sequence.InstallExecuteSequence,
+                             "RegisterClassInfo", cond=want_extensions)
+     msilib.change_sequence(sequence.InstallExecuteSequence,
+                             "RegisterExtensionInfo", cond=want_extensions)
+     msilib.change_sequence(sequence.InstallExecuteSequence,
+                             "RegisterProgIdInfo", cond=want_extensions)
+     msilib.change_sequence(sequence.InstallExecuteSequence,
+                             "RegisterMIMEInfo", cond=want_extensions)
      msilib.add_tables(db, sequence)
      # We cannot set ALLUSERS in the property table, as this cannot be
***************
*** 654,670 ****
      maint.text("BodyText", 135, 63, 230, 42, 3,
                 "Select whether you want to repair or remove [ProductName].")
!     g=maint.radiogroup("RepairRadioGroup", 135, 108, 230, 48, 3,
                          "MaintenanceForm_Action", "", "Next")
!     g.add("Repair", 0, 0, 200, 17, "&Repair [ProductName]")
!     g.add("Remove", 0, 18, 200, 17, "Re&move [ProductName]")
      
      maint.back("< Back", None, active=False)
      c=maint.next("Finish", "Cancel")
      # Reinstall: Change progress dialog to "Repair", then invoke reinstall
      # Also set list of reinstalled features to "ALL"
!     c.event("[REINSTALL]", "ALL", 'MaintenanceForm_Action="Repair"', 1)
!     c.event("[Progress1]", "Repairing", 'MaintenanceForm_Action="Repair"', 2)
!     c.event("[Progress2]", "repaires", 'MaintenanceForm_Action="Repair"', 3)
!     c.event("Reinstall", "ALL", 'MaintenanceForm_Action="Repair"', 4)
  
      # Uninstall: Change progress to "Remove", then invoke uninstall
--- 666,688 ----
      maint.text("BodyText", 135, 63, 230, 42, 3,
                 "Select whether you want to repair or remove [ProductName].")
!     g=maint.radiogroup("RepairRadioGroup", 135, 108, 230, 60, 3,
                          "MaintenanceForm_Action", "", "Next")
!     g.add("Change", 0, 0, 200, 17, "&Change [ProductName]")
!     g.add("Repair", 0, 18, 200, 17, "&Repair [ProductName]")
!     g.add("Remove", 0, 36, 200, 17, "Re&move [ProductName]")
      
      maint.back("< Back", None, active=False)
      c=maint.next("Finish", "Cancel")
+     # Change installation: Change progress dialog to "Change", then ask
+     # for feature selection
+     c.event("[Progress1]", "Change", 'MaintenanceForm_Action="Change"', 1)
+     c.event("[Progress2]", "changes", 'MaintenanceForm_Action="Change"', 2)
+     c.event("NewDialog", "SelectFeaturesDlg", 'MaintenanceForm_Action="Change"', 3)
      # Reinstall: Change progress dialog to "Repair", then invoke reinstall
      # Also set list of reinstalled features to "ALL"
!     c.event("[REINSTALL]", "ALL", 'MaintenanceForm_Action="Repair"', 4)
!     c.event("[Progress1]", "Repairing", 'MaintenanceForm_Action="Repair"', 5)
!     c.event("[Progress2]", "repaires", 'MaintenanceForm_Action="Repair"', 6)
!     c.event("Reinstall", "ALL", 'MaintenanceForm_Action="Repair"', 7)
  
      # Uninstall: Change progress to "Remove", then invoke uninstall
***************
*** 923,931 ****
                ("REGISTRY.tcl", msilib.gen_uuid(), "TARGETDIR", 4,
                 "&%s <> 2" % ext_feature.id, "py.IDLE")])
!     # See "FeatureComponents Table"
      add_data(db, "FeatureComponents",
               [(default_feature.id, "REGISTRY"),
                (ext_feature.id, "REGISTRY.def"),
!               (tcltk.id, "REGISTRY.tcl")])
  
      pat = r"Software\Classes\%sPython.%sFile\shell\%s\command"
--- 941,955 ----
                ("REGISTRY.tcl", msilib.gen_uuid(), "TARGETDIR", 4,
                 "&%s <> 2" % ext_feature.id, "py.IDLE")])
!     # See "FeatureComponents Table".
!     # The association between TclTk and pythonw.exe is necessary to make ICE59
!     # happy, because the installer otherwise believes that the IDLE and PyDoc
!     # shortcuts might get installed without pythonw.exe being install. This
!     # is not true, since installing TclTk will install the default feature, which
!     # will cause pythonw.exe to be installed.
      add_data(db, "FeatureComponents",
               [(default_feature.id, "REGISTRY"),
                (ext_feature.id, "REGISTRY.def"),
!               (tcltk.id, "REGISTRY.tcl"),
!               (tcltk.id, "pythonw.exe")])
  
      pat = r"Software\Classes\%sPython.%sFile\shell\%s\command"

Index: msilib.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/msi/msilib.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** msilib.py	17 Aug 2004 11:51:51 -0000	1.12
--- msilib.py	17 Aug 2004 12:56:03 -0000	1.13
***************
*** 242,246 ****
  
  class _Unspecified:pass
! def change_sequence(seq, action, seqno, cond = _Unspecified):
      "Change the sequence number of an action in a sequence list"
      for i in range(len(seq)):
--- 242,246 ----
  
  class _Unspecified:pass
! def change_sequence(seq, action, seqno=_Unspecified, cond = _Unspecified):
      "Change the sequence number of an action in a sequence list"
      for i in range(len(seq)):
***************
*** 248,251 ****
--- 248,253 ----
              if cond is _Unspecified:
                  cond = seq[i][1]
+             if seqno is _Unspecified:
+                 seqno = seq[i][2]
              seq[i] = (action, cond, seqno)
              return



More information about the Python-checkins mailing list