pyapp_installpy.nsi 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. [% extends "pyapp.nsi" %]
  2. [% block ui_pages %]
  3. [# We only need to add COMPONENTS, but they have to be in order #]
  4. !insertmacro MUI_PAGE_WELCOME
  5. !insertmacro MUI_PAGE_COMPONENTS
  6. !insertmacro MUI_PAGE_DIRECTORY
  7. !insertmacro MUI_PAGE_INSTFILES
  8. !insertmacro MUI_PAGE_FINISH
  9. [% endblock ui_pages %]
  10. [% block sections %]
  11. Section "Python ${PY_VERSION}" sec_py
  12. DetailPrint "Installing Python ${PY_MAJOR_VERSION}, ${BITNESS} bit"
  13. [% if ib.py_version_tuple >= (3, 5) %]
  14. [% set filename = 'python-' ~ ib.py_version ~ ('-amd64' if ib.py_bitness==64 else '') ~ '.exe' %]
  15. File "[[filename]]"
  16. ExecWait '"$INSTDIR\[[filename]]" /passive Include_test=0 InstallAllUsers=1'
  17. [% else %]
  18. [% set filename = 'python-' ~ ib.py_version ~ ('.amd64' if ib.py_bitness==64 else '') ~ '.msi' %]
  19. File "[[filename]]"
  20. ExecWait 'msiexec /i "$INSTDIR\[[filename]]" \
  21. /qb ALLUSERS=1 TARGETDIR="$COMMONFILES${BITNESS}\Python\${PY_MAJOR_VERSION}"'
  22. [% endif %]
  23. Delete "$INSTDIR\[[filename]]"
  24. SectionEnd
  25. [[ super() ]]
  26. [% endblock sections %]
  27. [% block mouseover_messages %]
  28. StrCmp $0 ${sec_py} 0 +2
  29. SendMessage $R0 ${WM_SETTEXT} 0 "STR:The Python interpreter. \
  30. This is required for ${PRODUCT_NAME} to run."
  31. [[ super() ]]
  32. [% endblock mouseover_messages %]