Skip to content

Commit

Permalink
Added the new PyInstaller build script!
Browse files Browse the repository at this point in the history
  • Loading branch information
theJayTea authored Oct 16, 2024
1 parent c7d08c6 commit 72917fd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pyinstaller-build-script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import subprocess

def run_pyinstaller_build():
pyinstaller_command = [
"pyinstaller",
"--onefile",
"--windowed",
"--add-data", "icons;icons",
"--add-data", "background.png;.",
"--add-data", "background_popup.png;.",
"--icon=icons/app_icon.ico",
"main.py"
]

try:
subprocess.run(pyinstaller_command, check=True)
print("Build completed successfully!")
except subprocess.CalledProcessError as e:
print(f"Build failed with error: {e}")
sys.exit(1)

if __name__ == "__main__":
run_pyinstaller_build()

0 comments on commit 72917fd

Please sign in to comment.