diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-11-18 08:00:33 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-11-18 08:00:33 (GMT) |
commit | eac02e614ba8eacd3f903716ae11c87679df74c9 (patch) | |
tree | ca2362565d5a932882000aa7b00b71ab625cc065 /Tools | |
parent | 2a216794f044ea8ff3a8880e9a978c5c912d23d1 (diff) | |
download | cpython-eac02e614ba8eacd3f903716ae11c87679df74c9.zip cpython-eac02e614ba8eacd3f903716ae11c87679df74c9.tar.gz cpython-eac02e614ba8eacd3f903716ae11c87679df74c9.tar.bz2 |
Add missing have_tcl conditions
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/msi/msi.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py index 4b81be2..2c9a9ac 100644 --- a/Tools/msi/msi.py +++ b/Tools/msi/msi.py @@ -330,8 +330,10 @@ def add_ui(db): add_data(db, "Binary", [("Script", msilib.Binary("inst.vbs"))]) # See "Custom Action Type 6" add_data(db, "CustomAction", - [("CheckDir", 6, "Script", "CheckDir"), - ("UpdateEditIDLE", 6, "Script", "UpdateEditIDLE")]) + [("CheckDir", 6, "Script", "CheckDir")]) + if have_tcl: + add_data(db, "CustomAction", + [("UpdateEditIDLE", 6, "Script", "UpdateEditIDLE")]) os.unlink("inst.vbs") @@ -1035,6 +1037,16 @@ def add_registry(db): ewi = "Edit with IDLE" pat2 = r"Software\Classes\%sPython.%sFile\DefaultIcon" pat3 = r"Software\Classes\%sPython.%sFile" + tcl_verbs = [] + if have_tcl: + tcl_verbs=[ + ("py.IDLE", -1, pat % (testprefix, "", ewi), "", + r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -n -e "%1"', + "REGISTRY.tcl"), + ("pyw.IDLE", -1, pat % (testprefix, "NoCon", ewi), "", + r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -n -e "%1"', + "REGISTRY.tcl"), + ] add_data(db, "Registry", [# Extensions ("py.ext", -1, r"Software\Classes\."+ext, "", @@ -1057,12 +1069,7 @@ def add_registry(db): r'"[TARGETDIR]pythonw.exe" "%1" %*', "REGISTRY.def"), ("pyc.open", -1, pat % (testprefix, "Compiled", "open"), "", r'"[TARGETDIR]python.exe" "%1" %*', "REGISTRY.def"), - ("py.IDLE", -1, pat % (testprefix, "", ewi), "", - r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -n -e "%1"', - "REGISTRY.tcl"), - ("pyw.IDLE", -1, pat % (testprefix, "NoCon", ewi), "", - r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -n -e "%1"', - "REGISTRY.tcl"), + ] + tcl_verbs + [ #Icons ("py.icon", -1, pat2 % (testprefix, ""), "", r'[TARGETDIR]py.ico', "REGISTRY.def"), |