From 1acf30509e6a6b33b52d3527711925e50c6b62f3 Mon Sep 17 00:00:00 2001 From: Nathan Harris <648059+Derjyn@users.noreply.github.com> Date: Fri, 12 May 2023 14:34:13 -0700 Subject: [PATCH] Update installer.nsi This updated installer now uses an *.exe created via PyInstaller, rather than the previous *.py script. This makes it easier to use for many, and may resolve any issues with shortcuts executing Python and the script itself. --- installer.nsi | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/installer.nsi b/installer.nsi index 62f0440..60a7de4 100644 --- a/installer.nsi +++ b/installer.nsi @@ -2,7 +2,7 @@ ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "LilPGP" -!define PRODUCT_VERSION "1.0" +!define PRODUCT_VERSION "v0.0.2-alpha" !define PRODUCT_PUBLISHER "Derjyn" !define PRODUCT_WEB_SITE "https://github.com/Derjyn" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" @@ -53,15 +53,20 @@ Section "MainSection" SEC01 File "dependencies\python-3.11.3-amd64.exe" SetOutPath "$INSTDIR" SetOverwrite ifnewer - File "LilPGP.py" + File "LilPGP.exe" CreateDirectory "$SMPROGRAMS\LilPGP" - CreateShortCut "$SMPROGRAMS\LilPGP\LilPGP.lnk" "$INSTDIR\LilPGP.py" - CreateShortCut "$DESKTOP\LilPGP.lnk" "python" "$\"$INSTDIR\LilPGP.py$\"" + CreateShortCut "$SMPROGRAMS\LilPGP\LilPGP.lnk" "$INSTDIR\LilPGP.exe" + CreateShortCut "$DESKTOP\LilPGP.lnk" "$INSTDIR\LilPGP.exe" + ShellLink::SetRunAsAdministrator "$SMPROGRAMS\LilPGP\LilPGP.lnk" + ShellLink::SetRunAsAdministrator "$DESKTOP\LilPGP.lnk" SectionEnd Section "Silent Installs" SEC02 ExecWait '"$INSTDIR\dependencies\python-3.11.3-amd64.exe" /quiet InstallAllUsers=1 PrependPath=1' + Delete "$INSTDIR\dependencies\python-3.11.3-amd64.exe" ExecWait '"$INSTDIR\dependencies\gpg4win-4.1.0.exe" /S' + Delete "$INSTDIR\dependencies\gpg4win-4.1.0.exe" + RMDir "$INSTDIR\dependencies" nsExec::ExecToStack 'cmd /c "pip install -U python-gnupg"' SectionEnd @@ -90,7 +95,7 @@ FunctionEnd Section Uninstall Delete "$INSTDIR\uninst.exe" - Delete "$INSTDIR\LilPGP.py" + Delete "$INSTDIR\LilPGP.exe" Delete "$INSTDIR\dependencies\python-3.11.3-amd64.exe" Delete "$INSTDIR\dependencies\gpg4win-4.1.0.exe" Delete "$INSTDIR\test_dir\test_file_c.txt" @@ -108,4 +113,4 @@ Section Uninstall DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" SetAutoClose true -SectionEnd \ No newline at end of file +SectionEnd