Skip to content

Commit 3f183b4

Browse files
Modified app to use bootstrap file for launch
1 parent 91c572b commit 3f183b4

File tree

4 files changed

+442
-43
lines changed

4 files changed

+442
-43
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,6 @@ jobs:
4949
fuse \
5050
libfuse2
5151
52-
- name: Set up Python and install dependencies
53-
run: |
54-
# Create virtual environment with system site packages for GTK
55-
python3 -m venv venv --system-site-packages
56-
source venv/bin/activate
57-
pip install --upgrade pip
58-
# Install all required Python packages
59-
pip install pulsectl sounddevice numpy scipy qrcode Pillow netifaces
60-
6152
- name: Download AppImage tools
6253
run: |
6354
wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
@@ -73,42 +64,21 @@ jobs:
7364
mkdir -p AppDir/usr/share/applications
7465
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
7566
mkdir -p AppDir/usr/lib/pulselink
76-
mkdir -p AppDir/usr/lib/python3/site-packages
7767
7868
# Copy all Python source files
7969
cp -r Linux/* AppDir/usr/lib/pulselink/
8070
81-
# Copy Python dependencies from venv
82-
source venv/bin/activate
83-
SITE_PACKAGES=$(python3 -c "import site; print(site.getsitepackages()[0])")
84-
85-
# Copy all installed packages
86-
cp -r venv/lib/python*/site-packages/* AppDir/usr/lib/python3/site-packages/ 2>/dev/null || true
87-
88-
# Also copy numpy, scipy libs which may have additional files
89-
for pkg in numpy scipy sounddevice pulsectl qrcode PIL netifaces; do
90-
if [ -d "venv/lib/python3.10/site-packages/$pkg" ]; then
91-
cp -r "venv/lib/python3.10/site-packages/$pkg" AppDir/usr/lib/python3/site-packages/
92-
fi
93-
done
94-
95-
# Copy .so files for numpy/scipy
96-
find venv/lib -name "*.so*" -exec cp {} AppDir/usr/lib/python3/site-packages/ \; 2>/dev/null || true
97-
98-
# Create launcher script that uses bundled packages
71+
# Create launcher script that runs bootstrap.py
9972
cat > AppDir/usr/bin/pulselink << 'LAUNCHER'
10073
#!/bin/bash
101-
# PulseLink launcher - uses bundled Python packages with system GTK
74+
# PulseLink launcher - runs bootstrap which handles deps
10275
10376
SELF=$(readlink -f "$0")
10477
HERE=${SELF%/*}
10578
APPDIR=${HERE%/usr/bin}
10679
107-
# Set up Python path to use bundled packages first, then system
108-
export PYTHONPATH="${APPDIR}/usr/lib/python3/site-packages:${APPDIR}/usr/lib/pulselink:${PYTHONPATH}"
109-
110-
# Run with system Python (for GTK support)
111-
exec python3 "${APPDIR}/usr/lib/pulselink/main.py" "$@"
80+
# Run bootstrap with system Python (for GTK support)
81+
exec python3 "${APPDIR}/usr/lib/pulselink/bootstrap.py" "$@"
11282
LAUNCHER
11383
chmod +x AppDir/usr/bin/pulselink
11484

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@
1313
.externalNativeBuild
1414
.cxx
1515
local.properties
16-
__pycache__/

0 commit comments

Comments
 (0)