Skip to content

Commit bab17d5

Browse files
committed
Update build workflow and spec files to include additional Kivy dependencies and correct icon paths for GUI and CLI executables
1 parent bbd3afe commit bab17d5

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

.github/workflows/desktop.build.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,18 @@ jobs:
4848
if: runner.os == 'Linux'
4949
run: |
5050
sudo apt-get update
51-
sudo apt-get install -y libcups2-dev # Add other Kivy deps if needed (e.g., libsdl2-dev libgstreamer1.0-dev)
51+
sudo apt-get install -y \
52+
libcups2-dev \
53+
# Add Kivy dependencies
54+
libsdl2-dev \
55+
libsdl2_image-dev \
56+
libsdl2_mixer-dev \
57+
libsdl2_ttf-dev \
58+
libgstreamer1.0-dev \
59+
libgstreamer-plugins-base1.0-dev \
60+
libmtdev-dev \
61+
# Add xvfb
62+
xvfb
5263
5364
# Add steps for macOS dependencies if needed (e.g., using brew)
5465
# - name: Install macOS dependencies (if applicable)
@@ -59,18 +70,23 @@ jobs:
5970
- name: Install PyInstaller
6071
run: python -m pip install --upgrade pip pyinstaller
6172

62-
# --- Build CLI ---
63-
- name: Install CLI dependencies
64-
run: pip install -r requirements.cli.txt
73+
# --- Build GUI ---
74+
- name: Install GUI dependencies (includes Kivy)
75+
run: pip install -r requirements.kivy.txt # This should include CLI deps too
6576

66-
- name: Build CLI executable (${{ matrix.os_name }})
67-
run: pyinstaller fiscalberry-cli.spec
77+
- name: Build GUI executable (${{ matrix.os_name }})
78+
# Wrap pyinstaller command with xvfb-run for Linux builds
79+
run: |
80+
if [ "$RUNNER_OS" == "Linux" ]; then
81+
xvfb-run --auto-servernum pyinstaller fiscalberry-gui.spec
82+
else
83+
pyinstaller fiscalberry-gui.spec
84+
fi
6885
69-
- name: Rename CLI artifact
86+
- name: Rename GUI artifact
7087
shell: bash # Use bash for consistent mv/move commands
7188
run: |
72-
mkdir -p artifacts
73-
mv ${{ matrix.artifact_path_cli }} artifacts/fiscalberry-cli-${{ matrix.asset_suffix_cli }}
89+
mv ${{ matrix.artifact_path_gui }} artifacts/fiscalberry-gui-${{ matrix.asset_suffix_gui }}
7490
7591
# --- Build GUI ---
7692
- name: Install GUI dependencies (includes Kivy)
@@ -112,7 +128,7 @@ jobs:
112128
run: |
113129
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace fiscalberry-arm /bin/bash -c "
114130
pip install -r requirements.cli.txt &&
115-
pyinstaller fiscalberry-pi.spec &&
131+
pyinstaller fiscalberry-cli.spec &&
116132
ls -la dist"
117133
118134
- name: Rename Pi CLI artifact

fiscalberry-cli.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ exe = EXE(
3535
target_arch=None,
3636
codesign_identity=None,
3737
entitlements_file=None,
38-
icon=['src/assets/fiscalberry.ico'],
38+
icon=['src/fiscalberry/ui/assets/fiscalberry.ico'],
3939
)

fiscalberry-gui.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ exe = EXE(
3535
target_arch=None,
3636
codesign_identity=None,
3737
entitlements_file=None,
38-
icon=['src/assets/fiscalberry.ico'],
38+
icon=['src/fiscalberry/ui/assets/fiscalberry.ico'],
3939
)

0 commit comments

Comments
 (0)