Initial commit
This commit is contained in:
1 parent
fd83ad9ccc
commit
2ce845c51d
18 files changed
+686
-1
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# Build the exe. Run from the project root with the venv activated:
|
||||
# .\build.ps1 windowed build (no console), for release
|
||||
# .\build.ps1 -Console keeps a console window so startup errors are visible
|
||||
param([switch]$Console)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$windowMode = if ($Console) { "--console" } else { "--windowed" }
|
||||
|
||||
$appName = python -c "import sys; sys.path.insert(0, 'src'); from config import APP_NAME; print(APP_NAME)"
|
||||
if (-not $appName) { throw "Could not read APP_NAME from src\config.py" }
|
||||
|
||||
pyinstaller --noconfirm --clean --onedir $windowMode `
|
||||
--name $appName `
|
||||
--icon assets\images\icon.png `
|
||||
--add-data "assets;assets" `
|
||||
--hidden-import keyring.backends.Windows `
|
||||
--hidden-import pystray._win32 `
|
||||
src\main.py
|
||||
|
||||
Write-Host "Built: dist\$appName\$appName.exe"
|
||||
Reference in new issue
Block a user