瀏覽代碼

Skip installing pylauncher if pyw command exists

Closes gh-37
Thomas Kluyver 10 年之前
父節點
當前提交
e61b937b85
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      nsist/pyapp_w_pylauncher.nsi

+ 6 - 0
nsist/pyapp_w_pylauncher.nsi

@@ -5,9 +5,15 @@
 [[ super() ]]
 
 Section "PyLauncher" sec_pylauncher
+    ; Check for the existence of the pyw command, skip installing if it exists
+    nsExec::Exec 'where pyw'
+    Pop $0
+    IntCmp $0 0 SkipPylauncher
+    ; Extract the py/pyw launcher msi and run it.
     File "launchwin${ARCH_TAG}.msi"
     ExecWait 'msiexec /i "$INSTDIR\launchwin${ARCH_TAG}.msi" /qb ALLUSERS=1'
     Delete "$INSTDIR\launchwin${ARCH_TAG}.msi"
+    SkipPylauncher:
 SectionEnd
 [% endblock %]