Martin von Löwis avatar Martin von Löwis committed ea957d9

Add missing have_tcl conditions

Comments (0)

Files changed (1)

     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")
 
 
     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, "",
               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"),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.