mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 22:55:46 +01:00
Fix randomly opened windows in PyInstaller app (#38)
This commit is contained in:
parent
eff14400e0
commit
b168ba8313
3 changed files with 19 additions and 9 deletions
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
|
@ -35,13 +35,13 @@ jobs:
|
|||
- os: macos-latest
|
||||
CMD_BUILD: |
|
||||
brew install create-dmg
|
||||
poetry run make bundle_mac version=$GITHUB_REF_NAME
|
||||
poetry run make bundle_mac
|
||||
- os: ubuntu-latest
|
||||
CMD_BUILD: |
|
||||
poetry run make bundle_linux version=$GITHUB_REF_NAME
|
||||
poetry run make bundle_linux
|
||||
- os: windows-latest
|
||||
CMD_BUILD: |
|
||||
poetry run make bundle_windows version=$env:GITHUB_REF_NAME
|
||||
poetry run make bundle_windows
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
|
|
@ -63,6 +63,8 @@ jobs:
|
|||
|
||||
- run: poetry install
|
||||
- run: ${{ matrix.CMD_BUILD }}
|
||||
env:
|
||||
BUZZ_VERSION: ${{ github.ref_name }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Buzz
|
||||
|
|
|
|||
16
Makefile
16
Makefile
|
|
@ -1,3 +1,11 @@
|
|||
mac_app_path := ./dist/Buzz.app
|
||||
mac_zip_path := ./dist/Buzz-$$BUZZ_VERSION-mac.zip
|
||||
mac_dmg_path := ./dist/Buzz-$$BUZZ_VERSION-mac.dmg
|
||||
|
||||
unix_zip_path := ./dist/Buzz-$$BUZZ_VERSION-unix.tar.gz
|
||||
|
||||
windows_zip_path := ./dist/Buzz-$$BUZZ_VERSION-windows.tar.gz
|
||||
|
||||
buzz:
|
||||
make clean
|
||||
pyinstaller --noconfirm Buzz.spec
|
||||
|
|
@ -13,23 +21,19 @@ version:
|
|||
|
||||
bundle_linux:
|
||||
make buzz
|
||||
tar -czf dist/buzz-${version}-unix.tar.gz dist/Buzz
|
||||
tar -czf ${unix_zip_path} dist/Buzz
|
||||
|
||||
bundle_windows:
|
||||
make buzz
|
||||
tar -czf dist/buzz-${version}-windows.tar.gz dist/Buzz
|
||||
tar -czf ${windows_zip_path} dist/Buzz
|
||||
|
||||
# MAC
|
||||
|
||||
mac_app_path := ./dist/Buzz.app
|
||||
mac_zip_path := ./dist/Buzz-$$BUZZ_VERSION-mac.zip
|
||||
mac_dmg_path := ./dist/Buzz-$$BUZZ_VERSION-mac.dmg
|
||||
|
||||
bundle_mac:
|
||||
make buzz
|
||||
|
||||
bundle_mac_local:
|
||||
source .env
|
||||
make buzz
|
||||
make codesign_all_mac
|
||||
make zip_mac
|
||||
|
|
|
|||
4
main.py
4
main.py
|
|
@ -1,8 +1,12 @@
|
|||
import logging
|
||||
import multiprocessing
|
||||
|
||||
from gui import Application
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Stop PyInstaller from randomly opening multiple windows: https://stackoverflow.com/a/32677108/9830227
|
||||
multiprocessing.freeze_support()
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
format="[%(asctime)s] %(module)s.%(funcName)s:%(lineno)d %(levelname)s -> %(message)s")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue