Skip to content

Commit

Permalink
feat: add build script for packaging application with PyInstaller in …
Browse files Browse the repository at this point in the history
…bash
  • Loading branch information
LyubomirT committed Oct 6, 2024
1 parent 3b8e778 commit 896c5b3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build.sh
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"

0 comments on commit 896c5b3

Please sign in to comment.