Skip to content

Commit

Permalink
Fix build script: properly pass --onedir param
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Aug 7, 2024
1 parent afb71af commit a8697b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build_desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ jobs:

- run: pip install -r requirements.txt

- name: Build Web UI
working-directory: ./studio/web_ui
run: npm install . && npm run build

- run: sh ./desktop/build_desktop_app.sh
- uses: actions/upload-artifact@v4
with:
Expand Down
13 changes: 6 additions & 7 deletions desktop/build_desktop_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ cd ..

# build the web ui
cd studio/web_ui
npm install
npm run build
cd ../..

APP_STYPE="--onefile"
APP_TYPE="--onefile"
if [ "$(uname)" == "Darwin" ]; then
echo "Building MacOS app"
APP_STYPE="--onedir"
APP_TYPE="--onedir"
fi

echo $APP_STYPE

# Builds the desktop app
# TODO: use a spec instead of long winded command line
pyinstaller --windowed $APP_STYLE --icon="../icon.png" \
pyinstaller --windowed $(printf %s "$APP_TYPE") --icon="../icon.png" \
--add-data "../taskbar.png:." --add-data "../../studio/web_ui/build:./studio/web_ui/build" \
-n fune --noconfirm --distpath=./desktop/build/dist --workpath=./desktop/build/work \
--specpath=./desktop/build --osx-bundle-identifier=net.scosman.fune \
--noconfirm --distpath=./desktop/build/dist --workpath=./desktop/build/work \
-n fune --specpath=./desktop/build --osx-bundle-identifier=net.scosman.fune \
--paths=. ./desktop/desktop.py

0 comments on commit a8697b5

Please sign in to comment.