diff --git a/src/scripts/ophis.nsi b/src/scripts/ophis.nsi index ac5af7d..d1156a8 100644 --- a/src/scripts/ophis.nsi +++ b/src/scripts/ophis.nsi @@ -1,8 +1,12 @@ ; Script generated by the HM NIS Edit Script Wizard. +Unicode true +SetCompressor /SOLID lzma +RequestExecutionlevel admin + ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "Ophis" -!define PRODUCT_VERSION "2.1" +!define PRODUCT_VERSION "2.2" !define PRODUCT_PUBLISHER "Michael Martin" !define PRODUCT_WEB_SITE "https://michaelcmartin.github.com/Ophis" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\ophis.exe" @@ -37,7 +41,6 @@ var ICONS_GROUP ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page -; !define MUI_FINISHPAGE_RUN "$INSTDIR\ophis.exe" !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" !insertmacro MUI_PAGE_FINISH @@ -50,28 +53,28 @@ var ICONS_GROUP ; MUI end ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -OutFile "Ophis-${PRODUCT_VERSION}-win32-installer.exe" -InstallDir "$PROGRAMFILES\Ophis" +OutFile "Ophis-${PRODUCT_VERSION}-win64-installer.exe" +InstallDir "$PROGRAMFILES64\Ophis" InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" ShowInstDetails show ShowUnInstDetails show 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 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 + 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\petscii.map" File "..\..\examples\hello1.oph" @@ -86,10 +89,8 @@ Section "Ophis" SEC01 File "..\..\examples\structuredemo.oph" File "..\..\examples\fibonacci.oph" File "..\..\examples\kinematics.oph" - # Remove the older copies of hi_stella if needed - Delete "$INSTDIR\examples\hi_stella\hi_stella.oph" - Delete "$INSTDIR\examples\hi_stella\README.txt" - RMDir "$INSTDIR\examples\hi_stella" + File "..\..\examples\hello_a800.oph" + File "..\..\examples\hello_apple2.oph" SetOutPath "$INSTDIR\examples\stella" File "..\..\examples\stella\hi_stella.oph" File "..\..\examples\stella\colortest.oph" @@ -123,6 +124,7 @@ SectionEnd Section -Post WriteUninstaller "$INSTDIR\uninst.exe" + SetRegView 64 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}" "UninstallString" "$INSTDIR\uninst.exe" @@ -146,6 +148,8 @@ FunctionEnd Section Uninstall !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP Delete "$INSTDIR\uninst.exe" + Delete "$INSTDIR\examples\hello_apple2.oph" + Delete "$INSTDIR\examples\hello_a800.oph" Delete "$INSTDIR\examples\kinematics.oph" Delete "$INSTDIR\examples\structuredemo.oph" Delete "$INSTDIR\examples\fibonacci.oph" @@ -160,8 +164,15 @@ Section Uninstall Delete "$INSTDIR\examples\hello1.oph" Delete "$INSTDIR\examples\petscii.map" Delete "$INSTDIR\examples\c64-1.oph" - Delete "$INSTDIR\w9xpopen.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\README.txt" Delete "$INSTDIR\examples\stella\hi_stella.oph" @@ -192,6 +203,7 @@ Section Uninstall RMDir "$INSTDIR\platform" RMDir "$INSTDIR" + SetRegView 64 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" SetAutoClose true diff --git a/src/win_setup.py b/src/win_setup.py index 6e5322b..eb91566 100644 --- a/src/win_setup.py +++ b/src/win_setup.py @@ -1,10 +1,5 @@ -from distutils.core import setup import py2exe -import sys -sys.argv.append('py2exe') - -setup(options={'py2exe': {'bundle_files': 1}}, - packages=['Ophis'], - zipfile=None, - console=[{'script': "scripts/ophis"}]) +py2exe.freeze(options={'bundle_files': 1, 'packages': ['Ophis']}, + console=[{'script': "scripts/ophis"}], + zipfile='modules.zip') diff --git a/vendor/vcredist_x86.exe b/vendor/vcredist_x86.exe deleted file mode 100644 index b8a3da8..0000000 Binary files a/vendor/vcredist_x86.exe and /dev/null differ