[Python-checkins] python/nondist/sandbox/msi msilib.py,1.2,1.3
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Fri Jan 2 15:42:26 EST 2004
Update of /cvsroot/python/python/nondist/sandbox/msi
In directory sc8-pr-cvs1:/tmp/cvs-serv17402
Modified Files:
msilib.py
Log Message:
Locate cabarc in registry.
Add value= to radiobuttons.
Support control conditions.
Index: msilib.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/msi/msilib.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** msilib.py 30 Dec 2003 15:02:42 -0000 1.2
--- msilib.py 2 Jan 2004 20:42:24 -0000 1.3
***************
*** 6,10 ****
import pythoncom
from win32com.client import constants
! import re, string, os, sets, glob, popen2, sys
Win64 = 0
--- 6,10 ----
import pythoncom
from win32com.client import constants
! import re, string, os, sets, glob, popen2, sys, _winreg
Win64 = 0
***************
*** 357,361 ****
except OSError:
pass
! f = popen2.popen4(r"cabarc.exe n %s.cab @%s.txt" % (self.name, self.name))[0]
for line in f:
if line.startswith(" -- adding "):
--- 357,374 ----
except OSError:
pass
! for k, v in [(r"Software\Microsoft\VisualStudio\7.1\Setup\VS", "VS7CommonBinDir"),
! (r"Software\Microsoft\Win32SDK\Directories", "Install Dir")]:
! try:
! key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, k)
! except WindowsError:
! continue
! cabarc = os.path.join(_winreg.QueryValueEx(key, v)[0], r"Bin", "cabarc.exe")
! _winreg.CloseKey(key)
! assert os.path.exists(cabarc), cabarc
! break
! else:
! print "WARNING: cabarc.exe not found in registry"
! cabarc = "cabarc.exe"
! f = popen2.popen4(r'"%s" n %s.cab @%s.txt' % (cabarc, self.name, self.name))[0]
for line in f:
if line.startswith(" -- adding "):
***************
*** 526,529 ****
--- 539,546 ----
[(self.dlg.name, self.name, ev, attr)])
+ def condition(self, action, condition):
+ add_data(self.dlg.db, "ControlCondition",
+ [(self.dlg.name, self.name, action, condition)])
+
class RadioButtonGroup(Control):
def __init__(self, dlg, name, property):
***************
*** 533,539 ****
self.index = 1
! def add(self, name, x, y, w, h, text):
add_data(self.dlg.db, "RadioButton",
! [(self.property, self.index, name,
x, y, w, h, text, None)])
self.index += 1
--- 550,558 ----
self.index = 1
! def add(self, name, x, y, w, h, text, value = None):
! if value is None:
! value = name
add_data(self.dlg.db, "RadioButton",
! [(self.property, self.index, value,
x, y, w, h, text, None)])
self.index += 1
More information about the Python-checkins
mailing list