Add app icon and update build process
This commit is contained in:
@@ -19,11 +19,16 @@ def build():
|
||||
system = platform.system()
|
||||
print(f"Detected OS: {system}")
|
||||
|
||||
# Determine separator for --add-data
|
||||
sep = ";" if system == "Windows" else ":"
|
||||
|
||||
# Base command
|
||||
base_cmd = [
|
||||
sys.executable, "-m", "PyInstaller",
|
||||
"--onefile",
|
||||
"--windowed",
|
||||
"--paths", "src",
|
||||
f"--add-data=app_icon.png{sep}.",
|
||||
"src/main.py"
|
||||
]
|
||||
|
||||
@@ -31,6 +36,8 @@ def build():
|
||||
name = "TeletextEditor_Linux"
|
||||
elif system == "Windows":
|
||||
name = "TeletextEditor_Windows.exe"
|
||||
# Add icon for Windows executable
|
||||
base_cmd.append("--icon=app_icon.ico")
|
||||
else:
|
||||
print(f"Unsupported platform: {system}")
|
||||
return
|
||||
@@ -57,4 +64,4 @@ def build():
|
||||
|
||||
if __name__ == "__main__":
|
||||
clean_build_dirs()
|
||||
build()
|
||||
build()
|
||||
Reference in New Issue
Block a user