mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-16 15:40:12 +01:00
build(windows): fix PyInstaller packaging\n\n- Add spec file with hiddenimports and data dirs\n- Use spec in release workflow; fallback to --paths code\n- Insert ./code into sys.path when frozen to resolve local imports
This commit is contained in:
parent
e52dfd7bb5
commit
8fa040a05a
3 changed files with 46 additions and 2 deletions
7
.github/workflows/github-release.yml
vendored
7
.github/workflows/github-release.yml
vendored
|
|
@ -29,7 +29,12 @@ jobs:
|
|||
- name: Build executable (PyInstaller)
|
||||
shell: powershell
|
||||
run: |
|
||||
pyinstaller --onefile --name mtg-deckbuilder code/main.py
|
||||
# Build using spec for reliable packaging
|
||||
pyinstaller mtg_deckbuilder.spec
|
||||
if (!(Test-Path dist/mtg-deckbuilder.exe)) {
|
||||
Write-Host 'Spec build failed; retrying simple build with --paths code'
|
||||
pyinstaller --onefile --name mtg-deckbuilder --paths code code/main.py
|
||||
}
|
||||
if (!(Test-Path dist/mtg-deckbuilder.exe)) { throw 'Build failed: dist/mtg-deckbuilder.exe not found' }
|
||||
|
||||
- name: Upload artifact (Windows EXE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue