pyapp_w_pylauncher.nsi 802 B

12345678910111213141516171819202122232425
  1. [% extends "pyapp.nsi" %]
  2. [# For Python 2, add the py/pyw Windows launcher. Python 3 includes it already. #]
  3. [% block sections %]
  4. [[ super() ]]
  5. Section "PyLauncher" sec_pylauncher
  6. ; Check for the existence of the pyw command, skip installing if it exists
  7. nsExec::Exec 'where pyw'
  8. Pop $0
  9. IntCmp $0 0 SkipPylauncher
  10. ; Extract the py/pyw launcher msi and run it.
  11. File "launchwin${ARCH_TAG}.msi"
  12. ExecWait 'msiexec /i "$INSTDIR\launchwin${ARCH_TAG}.msi" /qb ALLUSERS=1'
  13. Delete "$INSTDIR\launchwin${ARCH_TAG}.msi"
  14. SkipPylauncher:
  15. SectionEnd
  16. [% endblock %]
  17. [% block mouseover_messages %]
  18. [[ super() ]]
  19. StrCmp $0 ${sec_app} "" +2
  20. SendMessage $R0 ${WM_SETTEXT} 0 "STR:The Python launcher. \
  21. This is required for ${PRODUCT_NAME} to run."
  22. [% endblock %]