Skip to content

Commit

Permalink
build without console window (#216)
Browse files Browse the repository at this point in the history
Co-authored-by: Josef Haupt <[email protected]>
  • Loading branch information
Josef-Haupt and Josef Haupt authored Dec 18, 2023
1 parent fe07b15 commit 11d5ae5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BirdNET-Analyzer-full.spec
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ gui = Analysis(
noarchive=False,
module_collection_mode={
'gradio': 'py', # Collect gradio package as source .py files
'tensorflow': 'py'
},
)
gui_pyz = PYZ(gui.pure, gui.zipped_data, cipher=block_cipher)
Expand All @@ -70,7 +71,7 @@ gui_exe = EXE(
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
Expand Down
4 changes: 4 additions & 0 deletions gui.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import concurrent.futures
import os
import sys

if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
sys.stdout = open('logs.txt', 'w') # divert stdout to logs.txt file

from multiprocessing import freeze_support
from pathlib import Path

Expand Down

0 comments on commit 11d5ae5

Please sign in to comment.