From eac02e614ba8eacd3f903716ae11c87679df74c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 18 Nov 2004 08:00:33 +0000 Subject: [PATCH] Add missing have_tcl conditions --- Tools/msi/msi.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py index 4b81be2b799..2c9a9ac03c5 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"),