Skip to content

Commit 144ddf7

Browse files
committed
Set environment variables for Kivy to prevent graphics initialization during build
1 parent 61a25f7 commit 144ddf7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/android.build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
python-version: '3.11'
2929

30-
- name: Get pip cache dir
30+
- name: Get pip cache dir
3131
id: pip-cache
3232
run: |
3333
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

.github/workflows/desktop.build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ jobs:
7272
xvfb-run --auto-servernum pyinstaller fiscalberry-gui.spec
7373
else
7474
echo "Running PyInstaller directly on $RUNNER_OS..."
75-
KIVY_NO_WINDOW=1 pyinstaller fiscalberry-gui.spec
75+
# Set environment variables to prevent Kivy from trying to initialize graphics
76+
export KIVY_NO_WINDOW=1
77+
export KIVY_GL_BACKEND=mock
78+
export KIVY_GRAPHICS=mock
79+
pyinstaller fiscalberry-gui.spec
7680
fi
7781
7882
- name: List dist directory contents (after build) # Keep this for debugging if needed

0 commit comments

Comments
 (0)