From e48d9039dacf60dad6a6098d1b90ee970c59b9c7 Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Mon, 29 Jul 2024 20:01:28 -0700 Subject: [PATCH] Replace cmd build script with PowerShell script --- build-windows.bat | 4 ---- build-windows.ps1 | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) delete mode 100755 build-windows.bat create mode 100644 build-windows.ps1 diff --git a/build-windows.bat b/build-windows.bat deleted file mode 100755 index c727049..0000000 --- a/build-windows.bat +++ /dev/null @@ -1,4 +0,0 @@ -pyinstaller -i=icon.ico --windowed --onefile --hidden-import tornado.web --add-data icon.ico:files --add-data README.md:files --add-data GPL-3.0.txt:files --add-data CC-BY-SA-4.0.txt:files --name=navpoint.exe main.py -"C:\Program Files (x86)\NSIS\makensis.exe" .\windows_installer.nsi -move "dist\navpoint.exe" "dist\navpoint-windows-%PROCESSOR_ARCHITECTURE%-portable.exe" -move "dist\NavpointInstaller.exe" "dist\navpoint-windows-%PROCESSOR_ARCHITECTURE%-installer.exe" diff --git a/build-windows.ps1 b/build-windows.ps1 new file mode 100644 index 0000000..58d272f --- /dev/null +++ b/build-windows.ps1 @@ -0,0 +1,9 @@ +pyinstaller --icon "icon.ico" --windowed --onefile --hidden-import "tornado.web" --add-data "icon.ico:files" --add-data "README.md:files" --add-data "GPL-3.0.txt:files" --add-data "CC-BY-SA-4.0.txt:files" --name "navpoint.exe" "main.py" +& "C:\Program Files (x86)\NSIS\makensis.exe" ".\windows_installer.nsi" + +$distName = "navpoint-windows-$env:PROCESSOR_ARCHITECTURE" + +Remove-Item -Path "dist\$distName-*" + +Move-Item -Path "dist\navpoint.exe" -Destination "dist\$distName-portable.exe" +Move-Item -Path "dist\NavpointInstaller.exe" -Destination "dist\$distName-installer.exe"