-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add build script for packaging application with PyInstaller in …
…bash
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# Get the directory of the current script | ||
scriptDir="$(dirname "$(readlink -f "$0")")" | ||
|
||
# Build the executable using PyInstaller | ||
pyinstaller --noconfirm --onedir --windowed --icon "$scriptDir/src/img.ico" --add-data "$scriptDir/src/logo.png:." --add-data "$scriptDir/src/style.css:." "$scriptDir/src/main.py" | ||
|
||
# Copy the logo.png, style.css, and darkmode.css to the dist/main folder | ||
cp "$scriptDir/src/logo.png" "$scriptDir/dist/main/" | ||
cp "$scriptDir/src/style.css" "$scriptDir/dist/main/" | ||
cp "$scriptDir/src/darkmode.css" "$scriptDir/dist/main/" | ||
|
||
# Copy the translations folder to the dist/main folder | ||
cp -r "$scriptDir/src/translations" "$scriptDir/dist/main/" | ||
|
||
# Delete the build folder | ||
rm -rf "$scriptDir/build" | ||
|
||
# Delete the spec file | ||
rm "$scriptDir/main.spec" |