Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use lib4bin to bundle everything #16

Merged
merged 1 commit into from
Jan 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 19 additions & 39 deletions dolphin-emu-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,51 +32,31 @@ wget --retry-connrefused --tries=30 "$ICON" -O ./dolphin-emu.png
# Bundle all libs
wget --retry-connrefused --tries=30 "$LIB4BN" -O ./lib4bin
chmod +x ./lib4bin

xvfb-run -a -- ./lib4bin -p -v -r -e -s -k /usr/local/bin/dolphin-*

# when compiled portable this directory needs a capital S
cp -rv /usr/local/bin/Sys ./bin/Sys

# Deploy Qt manually xd
mkdir -p ./shared/lib/qt6/plugins
cp -vr /usr/lib/qt6/plugins/iconengines ./shared/lib/qt6/plugins
cp -vr /usr/lib/qt6/plugins/imageformats ./shared/lib/qt6/plugins
cp -vr /usr/lib/qt6/plugins/platforms ./shared/lib/qt6/plugins
cp -vr /usr/lib/qt6/plugins/platformthemes ./shared/lib/qt6/plugins || true
cp -vr /usr/lib/qt6/plugins/styles ./shared/lib/qt6/plugins
cp -vr /usr/lib/qt6/plugins/xcbglintegrations ./shared/lib/qt6/plugins
cp -vr /usr/lib/qt6/plugins/wayland-* ./shared/lib/qt6/plugins || true
ldd ./shared/lib/qt6/plugins/*/* 2>/dev/null \
| awk -F"[> ]" '{print $4}' | xargs -I {} cp -nv {} ./shared/lib || true

# Bundle pipewire and alsa
cp -vr /usr/lib/pipewire-0.3 ./shared/lib
cp -vr /usr/lib/spa-0.2 ./shared/lib
cp -vr /usr/lib/alsa-lib ./shared/lib

# add gpu libs
cp -vr /usr/lib/libGLX* ./shared/lib || true
cp -vr /usr/lib/libEGL* ./shared/lib || true
cp -vr /usr/lib/dri ./shared/lib
cp -vn /usr/lib/libvulkan* ./shared/lib
ldd ./shared/lib/dri/* \
./shared/lib/libvulkan* \
./shared/lib/libEGL* \
./shared/lib/libGLX* 2>/dev/null \
| awk -F"[> ]" '{print $4}' | xargs -I {} cp -nv {} ./shared/lib || true

# Bunble opengl and vulkan share files
mkdir -p ./share/vulkan
cp -vr /usr/share/glvnd ./share
cp -vr /usr/share/vulkan/icd.d ./share/vulkan
sed -i 's|/usr/lib||g;s|/.*-linux-gnu||g;s|"/|"|g' ./share/vulkan/icd.d/*
xvfb-run -a -- ./lib4bin -p -v -r -e -s -k \
/usr/local/bin/dolphin-* \
/usr/lib/libGLX* \
/usr/lib/libEGL* \
/usr/lib/dri/* \
/usr/lib/libvulkan* \
/usr/lib/qt6/plugins/iconengines/* \
/usr/lib/qt6/plugins/imageformats/* \
/usr/lib/qt6/plugins/platforms/* \
/usr/lib/qt6/plugins/platformthemes/* \
/usr/lib/qt6/plugins/styles/* \
/usr/lib/qt6/plugins/xcbglintegrations/* \
/usr/lib/qt6/plugins/wayland-*/* \
/usr/lib/pipewire-0.3/* \
/usr/lib/spa-0.2/*/* \
/usr/lib/alsa-lib/*

# copy locales, the dolphin binary expects them here
mkdir -p ./Source/Core
cp -r /usr/local/bin/DolphinQt ./Source/Core
find ./Source/Core/DolphinQt -type f ! -name 'dolphin-emu.mo' -delete

# when compiled portable this directory needs a capital S
cp -rv /usr/local/bin/Sys ./bin/Sys

# Prepare sharun
ln ./sharun ./AppRun
./sharun -g
Expand Down
Loading