Browse Source

Skip installing pylauncher if pyw command exists

Closes gh-37
Thomas Kluyver 10 years ago
parent
commit
e61b937b85
1 changed files with 6 additions and 0 deletions
  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 %]