mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2025-01-02 14:29:35 +00:00
Update installer scripts for modern py2exe
This commit is contained in:
parent
a1911f7cda
commit
e69fe05fac
@ -1,8 +1,12 @@
|
|||||||
; Script generated by the HM NIS Edit Script Wizard.
|
; Script generated by the HM NIS Edit Script Wizard.
|
||||||
|
|
||||||
|
Unicode true
|
||||||
|
SetCompressor /SOLID lzma
|
||||||
|
RequestExecutionlevel admin
|
||||||
|
|
||||||
; HM NIS Edit Wizard helper defines
|
; HM NIS Edit Wizard helper defines
|
||||||
!define PRODUCT_NAME "Ophis"
|
!define PRODUCT_NAME "Ophis"
|
||||||
!define PRODUCT_VERSION "2.1"
|
!define PRODUCT_VERSION "2.2"
|
||||||
!define PRODUCT_PUBLISHER "Michael Martin"
|
!define PRODUCT_PUBLISHER "Michael Martin"
|
||||||
!define PRODUCT_WEB_SITE "https://michaelcmartin.github.com/Ophis"
|
!define PRODUCT_WEB_SITE "https://michaelcmartin.github.com/Ophis"
|
||||||
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\ophis.exe"
|
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\ophis.exe"
|
||||||
@ -37,7 +41,6 @@ var ICONS_GROUP
|
|||||||
; Instfiles page
|
; Instfiles page
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
; Finish page
|
; Finish page
|
||||||
; !define MUI_FINISHPAGE_RUN "$INSTDIR\ophis.exe"
|
|
||||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
|
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
|
||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
@ -50,28 +53,28 @@ var ICONS_GROUP
|
|||||||
; MUI end ------
|
; MUI end ------
|
||||||
|
|
||||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||||
OutFile "Ophis-${PRODUCT_VERSION}-win32-installer.exe"
|
OutFile "Ophis-${PRODUCT_VERSION}-win64-installer.exe"
|
||||||
InstallDir "$PROGRAMFILES\Ophis"
|
InstallDir "$PROGRAMFILES64\Ophis"
|
||||||
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
||||||
ShowInstDetails show
|
ShowInstDetails show
|
||||||
ShowUnInstDetails show
|
ShowUnInstDetails show
|
||||||
|
|
||||||
Section "Ophis" SEC01
|
Section "Ophis" SEC01
|
||||||
DetailPrint "Ensuring C++ Runtime is up to date..."
|
|
||||||
SetDetailsPrint none
|
|
||||||
InitPluginsDir
|
|
||||||
SetOutPath "$PLUGINSDIR"
|
|
||||||
File "..\..\vendor\vcredist_x86.exe"
|
|
||||||
ExecWait '"$PLUGINSDIR\vcredist_x86.exe" /q'
|
|
||||||
SetDetailsPrint both
|
SetDetailsPrint both
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
SetOverwrite ifnewer
|
|
||||||
File /oname=README.txt "..\..\README"
|
|
||||||
File "..\..\doc\ophismanual.pdf"
|
|
||||||
File "..\dist\ophis.exe"
|
|
||||||
File "..\dist\w9xpopen.exe"
|
|
||||||
SetOutPath "$INSTDIR\examples"
|
|
||||||
SetOverwrite try
|
SetOverwrite try
|
||||||
|
File /oname=README.txt "..\..\README"
|
||||||
|
File "..\dist\ophis.exe"
|
||||||
|
File "..\dist\libcrypto-1_1.dll"
|
||||||
|
File "..\dist\libffi-7.dll"
|
||||||
|
File "..\dist\libssl-1_1.dll"
|
||||||
|
File "..\dist\tcl86t.dll"
|
||||||
|
File "..\dist\tk86t.dll"
|
||||||
|
File "..\dist\vcruntime140.dll"
|
||||||
|
File "..\dist\vcruntime140_1.dll"
|
||||||
|
File "..\dist\modules.zip"
|
||||||
|
File "..\..\doc\ophismanual.pdf"
|
||||||
|
SetOutPath "$INSTDIR\examples"
|
||||||
File "..\..\examples\c64-1.oph"
|
File "..\..\examples\c64-1.oph"
|
||||||
File "..\..\examples\petscii.map"
|
File "..\..\examples\petscii.map"
|
||||||
File "..\..\examples\hello1.oph"
|
File "..\..\examples\hello1.oph"
|
||||||
@ -86,10 +89,8 @@ Section "Ophis" SEC01
|
|||||||
File "..\..\examples\structuredemo.oph"
|
File "..\..\examples\structuredemo.oph"
|
||||||
File "..\..\examples\fibonacci.oph"
|
File "..\..\examples\fibonacci.oph"
|
||||||
File "..\..\examples\kinematics.oph"
|
File "..\..\examples\kinematics.oph"
|
||||||
# Remove the older copies of hi_stella if needed
|
File "..\..\examples\hello_a800.oph"
|
||||||
Delete "$INSTDIR\examples\hi_stella\hi_stella.oph"
|
File "..\..\examples\hello_apple2.oph"
|
||||||
Delete "$INSTDIR\examples\hi_stella\README.txt"
|
|
||||||
RMDir "$INSTDIR\examples\hi_stella"
|
|
||||||
SetOutPath "$INSTDIR\examples\stella"
|
SetOutPath "$INSTDIR\examples\stella"
|
||||||
File "..\..\examples\stella\hi_stella.oph"
|
File "..\..\examples\stella\hi_stella.oph"
|
||||||
File "..\..\examples\stella\colortest.oph"
|
File "..\..\examples\stella\colortest.oph"
|
||||||
@ -123,6 +124,7 @@ SectionEnd
|
|||||||
|
|
||||||
Section -Post
|
Section -Post
|
||||||
WriteUninstaller "$INSTDIR\uninst.exe"
|
WriteUninstaller "$INSTDIR\uninst.exe"
|
||||||
|
SetRegView 64
|
||||||
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\ophis.exe"
|
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\ophis.exe"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
|
||||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
||||||
@ -146,6 +148,8 @@ FunctionEnd
|
|||||||
Section Uninstall
|
Section Uninstall
|
||||||
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
|
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
|
||||||
Delete "$INSTDIR\uninst.exe"
|
Delete "$INSTDIR\uninst.exe"
|
||||||
|
Delete "$INSTDIR\examples\hello_apple2.oph"
|
||||||
|
Delete "$INSTDIR\examples\hello_a800.oph"
|
||||||
Delete "$INSTDIR\examples\kinematics.oph"
|
Delete "$INSTDIR\examples\kinematics.oph"
|
||||||
Delete "$INSTDIR\examples\structuredemo.oph"
|
Delete "$INSTDIR\examples\structuredemo.oph"
|
||||||
Delete "$INSTDIR\examples\fibonacci.oph"
|
Delete "$INSTDIR\examples\fibonacci.oph"
|
||||||
@ -160,8 +164,15 @@ Section Uninstall
|
|||||||
Delete "$INSTDIR\examples\hello1.oph"
|
Delete "$INSTDIR\examples\hello1.oph"
|
||||||
Delete "$INSTDIR\examples\petscii.map"
|
Delete "$INSTDIR\examples\petscii.map"
|
||||||
Delete "$INSTDIR\examples\c64-1.oph"
|
Delete "$INSTDIR\examples\c64-1.oph"
|
||||||
Delete "$INSTDIR\w9xpopen.exe"
|
|
||||||
Delete "$INSTDIR\ophis.exe"
|
Delete "$INSTDIR\ophis.exe"
|
||||||
|
Delete "$INSTDIR\libcrypto-1_1.dll"
|
||||||
|
Delete "$INSTDIR\libffi-7.dll"
|
||||||
|
Delete "$INSTDIR\libssl-1_1.dll"
|
||||||
|
Delete "$INSTDIR\tcl86t.dll"
|
||||||
|
Delete "$INSTDIR\tk86t.dll"
|
||||||
|
Delete "$INSTDIR\vcruntime140.dll"
|
||||||
|
Delete "$INSTDIR\vcruntime140_1.dll"
|
||||||
|
Delete "$INSTDIR\modules.zip"
|
||||||
Delete "$INSTDIR\ophismanual.pdf"
|
Delete "$INSTDIR\ophismanual.pdf"
|
||||||
Delete "$INSTDIR\README.txt"
|
Delete "$INSTDIR\README.txt"
|
||||||
Delete "$INSTDIR\examples\stella\hi_stella.oph"
|
Delete "$INSTDIR\examples\stella\hi_stella.oph"
|
||||||
@ -192,6 +203,7 @@ Section Uninstall
|
|||||||
RMDir "$INSTDIR\platform"
|
RMDir "$INSTDIR\platform"
|
||||||
RMDir "$INSTDIR"
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
|
SetRegView 64
|
||||||
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
||||||
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
||||||
SetAutoClose true
|
SetAutoClose true
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
from distutils.core import setup
|
|
||||||
import py2exe
|
import py2exe
|
||||||
import sys
|
|
||||||
|
|
||||||
sys.argv.append('py2exe')
|
py2exe.freeze(options={'bundle_files': 1, 'packages': ['Ophis']},
|
||||||
|
console=[{'script': "scripts/ophis"}],
|
||||||
setup(options={'py2exe': {'bundle_files': 1}},
|
zipfile='modules.zip')
|
||||||
packages=['Ophis'],
|
|
||||||
zipfile=None,
|
|
||||||
console=[{'script': "scripts/ophis"}])
|
|
||||||
|
BIN
vendor/vcredist_x86.exe
vendored
BIN
vendor/vcredist_x86.exe
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user