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

Bundle all libs, use Artix linux as base #7

Merged
merged 68 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
c4da8e9
Update Dolphin_sharun.yml
Samueru-sama Jan 11, 2025
f6ea228
Update Dolphin_sharun.yml
Samueru-sama Jan 11, 2025
db73425
Update Dolphin_sharun.yml
Samueru-sama Jan 11, 2025
72d9739
Update Dolphin_sharun.yml
Samueru-sama Jan 11, 2025
1a96675
Update Dolphin_sharun.yml
Samueru-sama Jan 11, 2025
1696c21
Update Dolphin_sharun.yml
Samueru-sama Jan 11, 2025
a347e94
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
5300b43
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
c3b6061
Delete libunionpreload.so
Samueru-sama Jan 12, 2025
4654598
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
03ee0b2
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
1c7cd6a
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
8ac0d4b
Delete AppRun
Samueru-sama Jan 12, 2025
d8d23fb
Delete files directory
Samueru-sama Jan 12, 2025
c600dab
explain code
Samueru-sama Jan 12, 2025
13b84a3
kek
Samueru-sama Jan 12, 2025
38cca10
use upstream icon and .desktop
Samueru-sama Jan 12, 2025
2c313d2
Delete dolphin-emu.desktop since we pull it from upstream
Samueru-sama Jan 12, 2025
377ece6
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
4dd415c
make .zsync file
Samueru-sama Jan 12, 2025
612a168
oops
Samueru-sama Jan 12, 2025
ea8ac7b
no idea what this is xd
Samueru-sama Jan 12, 2025
be9604e
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
8f56252
bundle pipewire
Samueru-sama Jan 12, 2025
0b9d13f
debian is cursed
Samueru-sama Jan 12, 2025
13603ea
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
ee4cbd5
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
2966bf9
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
6991342
remove duplicates
Samueru-sama Jan 12, 2025
5f3a07f
add alsa libs
Samueru-sama Jan 12, 2025
8ebeb59
add vulkan and opengl loaders
Samueru-sama Jan 12, 2025
fe7c3b7
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
042c497
mmmmm
Samueru-sama Jan 12, 2025
573f25b
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
2875f4c
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
75ed1b6
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
fca7df7
deploy vulkan
Samueru-sama Jan 12, 2025
028689b
Update Dolphin_sharun.yml
Samueru-sama Jan 12, 2025
1e148e4
weird
Samueru-sama Jan 12, 2025
1b7e7f0
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
d2e01be
Add files via upload
Samueru-sama Jan 13, 2025
d7f199c
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
7887578
Update dolphin-emu-appimage.sh
Samueru-sama Jan 13, 2025
7cda803
kek
Samueru-sama Jan 13, 2025
69e8348
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
33d004c
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
efc9cd3
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
119198e
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
6e29d31
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
5ba9c1e
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
9ea4f13
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
c3b0af8
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
7d8eaf1
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
f20aa79
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
bcc5455
Update dolphin-emu-appimage.sh
Samueru-sama Jan 13, 2025
6b936e7
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
c47b505
Update dolphin-emu-appimage.sh
Samueru-sama Jan 13, 2025
86ec496
Update dolphin-emu-appimage.sh
Samueru-sama Jan 13, 2025
439abf5
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
a23d698
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
d4d52f5
Update dolphin-emu-appimage.sh
Samueru-sama Jan 13, 2025
54a3fcb
Update dolphin-emu-appimage.sh
Samueru-sama Jan 13, 2025
4440c9a
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
041a8eb
Update dolphin-emu-appimage.sh
Samueru-sama Jan 13, 2025
791051b
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
275db4a
Update Dolphin_sharun.yml
Samueru-sama Jan 13, 2025
91c316f
Update dolphin-emu-appimage.sh
Samueru-sama Jan 13, 2025
e913cbb
Merge branch 'main' into Artixlinux
Samueru-sama Jan 13, 2025
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
180 changes: 29 additions & 151 deletions .github/workflows/Dolphin_sharun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,173 +20,51 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build-stable"
build-stable:
# The type of runner that the job will run on
build:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
container: artixlinux/artixlinux:latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Prerequisites
run: |
sudo apt update && sudo apt install -y \
build-essential \
ca-certificates \
ccache \
cmake \
curl \
desktop-file-utils \
dialog \
dpkg \
ffmpeg \
g++ \
g++-11 \
gcc \
gcc-11 \
gettext \
git \
libao-dev \
libasound2-dev \
libavcodec-dev \
libavdevice-dev \
libavformat-dev \
libavutil-dev \
libbluetooth-dev \
libbz2-dev \
libc6-dev \
libc++abi-dev \
libc++-dev \
libcurl4-openssl-dev \
libevdev-dev \
libfmt-dev \
libfuse2 \
libgl1-mesa-dev \
libglu1-mesa-dev \
libgtk2.0-dev \
libhidapi-dev \
liblz4-dev \
liblzma-dev \
liblzo2-dev \
libmbedtls-dev \
libminiupnpc-dev \
libopus-dev \
libpangocairo-1.0-0 \
libpipewire-0.3-0 \
libpipewire-0.3-modules \
libpng-dev \
libpugixml-dev \
libpulse-dev \
libqt6svg6-dev \
libreadline-dev \
libsdl1.2-dev \
libsfml-dev \
libspa-0.2-dev \
libspa-0.2-modules \
libssl-dev \
libstdc++6 \
libswscale-dev \
libsystemd-dev \
libudev-dev
libudev-dev \
libusb-1.0-0-dev \
libwayland-dev \
libxcb-cursor0 \
libxcb-cursor-dev \
libxcb-icccm4 \
libxcb-image0-dev \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxext-dev \
libxi-dev \
libxrandr-dev \
libzip-dev \
libzstd-dev \
make \
mesa-common-dev \
mesa-utils \
mesa-vulkan-drivers \
ninja-build \
p7zip \
p7zip-full \
pipewire-alsa \
pipewire-audio-client-libraries \
pkg-config \
pulseaudio \
qt6-base-private-dev \
qt6ct \
wget \
x11-utils \
xvfb \
zenity \
zlib1g-dev
version=$(apt-cache pkgnames | sed -nr 's/^gcc-(([0-9]+\.?)+)$/\1/p' \
| sort -n | tail -n1)
echo "The latest available GCC version: $version"
sudo apt-get install gcc-$version g++-$version
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$version 60 \
--slave /usr/bin/g++ g++ /usr/bin/g++-$version
sudo apt remove --purge llvm-* clang-* -y
sudo apt autoremove -y
LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin"
wget -q -c "$LIB4BN" ; chmod a+x lib4bin
wget -q "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" -O qtplugin ; chmod a+x qtplugin
wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" -O linuxdeploy ; chmod a+x linuxdeploy
wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" -O appimagetool ; chmod a+x appimagetool
git clone --filter="blob:none" --depth=1 -b master https://github.com/dolphin-emu/dolphin.git dolphin-emu
#export VERSION2=$(git tag | tail -n 1)
mkdir lucas/
mkdir lucas/usr/
mkdir lucas/usr/lib/
mkdir -p lucas2/shared/lib/
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ${{github.workspace}}/lucas2/shared/lib/
cp dolphin-emu.desktop dolphin-emu.png lucas2/
cp ${{github.workspace}}/files/AppRun lucas2/
cd ./dolphin-emu
git submodule update --init --recursive
[ "${COMMIT:=}" ] && git fetch --unshallow --tags && git checkout "$COMMIT"
HEAD="$(git rev-parse --short HEAD)"
DATE="$(git show -s --format=%cd --date=format:%Y.%m.%d)"
VERSION="${DATE}_$HEAD"
#export PATH=$PATH:$( find ${{github.workspace}}/qt/6.7.3/ -type d -printf ":%p" )
#export QMAKE="${{github.workspace}}/qt/6.7.3/gcc_64/bin/"
#export CMAKE_PREFIX_PATH="${{github.workspace}}/qt/6.7.3/gcc_64/"
#export QT_DIR="$QT_DIR:${{github.workspace}}/qt/6.7.3/gcc_64/lib/cmake/Qt6/"
mkdir -p "$HOME/.ccache"
mkdir Build && cd Build
cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DLINUX_LOCAL_DEV=true -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/lucas/usr/"
ninja install
cd ..
cd ..
sed -i 's/DownloadUser/#DownloadUser/g' /etc/pacman.conf
pacman -Syu --noconfirm base-devel \
strace \
patchelf \
curl \
wget \
git \
artix-archlinux-support \
llvm \
mesa \
xorg-server-xvfb \
vulkan-radeon \
vulkan-intel \
vulkan-nouveau

pacman-key --init && pacman-key --populate archlinux
printf "\n[extra]\nInclude = /etc/pacman.d/mirrorlist-arch\n" | tee -a /etc/pacman.conf
pacman -Syu --noconfirm zsync \
dolphin-emu \
pulseaudio \
pulseaudio-alsa \
pipewire-audio \
qt6ct

# Runs a set of commands using the runners shell
- name: Build appimage
run: |

#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$( find ${{github.workspace}}/qt/6.7.3/ -type d -printf ":%p" )
#echo $LD_LIBRARY_PATH
export PATH="$PATH:${{github.workspace}}"
cd lucas2/
chmod a+x ./AppRun
xvfb-run -- lib4bin -p -v -r -e -s -k "${{github.workspace}}/lucas/usr/bin/dolphin-emu-nogui" "${{github.workspace}}/lucas/usr/bin/dolphin-tool" "${{github.workspace}}/lucas/usr/bin/dolphin-emu"
./sharun -g
find "${{github.workspace}}/lucas2/shared/lib/home/" -type f | xargs -i -t -exec cp -Lr "${{github.workspace}}/lucas2/shared/lib"
cd ..
find . -iname 'Sys' | xargs -i -t -exec cp -r {} ${GITHUB_WORKSPACE}/lucas2/bin/
find -iname ${GITHUB_WORKSPACE} 'libxcb-cursor**' | xargs -i -t -exec cp -Lr {} ${{github.workspace}}/lucas2/shared/lib/
find ${GITHUB_WORKSPACE} -iname 'libqxcb**' | xargs -i -t -exec cp -Lr {} ${{github.workspace}}/lucas2/shared/lib/
find ${GITHUB_WORKSPACE} -iname 'libQt6XcbQpa.so.6' | xargs -i -t -exec cp -Lr {} ${{github.workspace}}/lucas2/shared/lib/
ARCH=x86_64 VERSION=git ./appimagetool -n lucas2/
chmod +x ./dolphin-emu-appimage.sh
./dolphin-emu-appimage.sh

- name: release
uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303"
with:
title: Continuous Sharun
automatic_release_tag: continuous-Sharun
prerelease: false
automatic_release_tag: continuous-Sharun-Artixlinux
prerelease: true
draft: false
files: /home/runner/work/Dolphin_emu_Appimage/Dolphin_emu_Appimage/*.AppImage*
repo_token: "${{ secrets.GITHUB_TOKEN }}"
11 changes: 0 additions & 11 deletions AppRun

This file was deleted.

96 changes: 96 additions & 0 deletions dolphin-emu-appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#/bin/sh

set -eu

export APPIMAGE_EXTRACT_AND_RUN=1
export ARCH="$(uname -m)"
APPIMAGETOOL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$ARCH.AppImage"
LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin"
#DESKTOP="https://raw.githubusercontent.com/dolphin-emu/dolphin/refs/heads/master/Data/dolphin-emu.desktop" @ This is insanely outdated lmao
ICON="https://github.com/dolphin-emu/dolphin/blob/master/Data/dolphin-emu.png?raw=true"
UPINFO="gh-releases-zsync|$(echo "$GITHUB_REPOSITORY" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"

# Prepare AppDir
mkdir -p ./AppDir && cd ./AppDir

echo '[Desktop Entry]
Version=1.0
Icon=dolphin-emu
Exec=dolphin-emu
Terminal=false
Type=Application
Categories=Game;Emulator;
Name=Dolphin Emulator
GenericName=Wii/GameCube Emulator
StartupWMClass=dolphin-emu
Comment=A Wii/GameCube Emulator
X-AppImage-Version=5.0-16793' > ./dolphin-emu.desktop

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/bin/dolphin-*

# for some reason the dir needs a capital S?
cp -r /usr/share/dolphin-emu/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/*

# Fix dolphin having a full hardcoded path /usr/share/dolphin-emu/sys
git clone https://github.com/fritzw/ld-preload-open.git preload.tmp
( cd preload.tmp && make all && mv ./path-mapping.so ../ )
rm -rf ./preload.tmp

echo 'PATH_MAPPING="/usr/share/dolphin-emu/sys:${SHARUN_DIR}/bin/Sys"
LD_PRELOAD=${SHARUN_DIR}/path-mapping.so' > ./.env

# Prepare sharun
ln ./sharun ./AppRun
./sharun -g
cd ..

# Make AppImage with the static appimage runtime (removes libfuse2 dependency).
wget --retry-connrefused --tries=30 "$APPIMAGETOOL" -O ./appimagetool
chmod +x ./appimagetool

./appimagetool -n -u "$UPINFO" AppDir/

echo "$PWD"
ls .

echo "All done!"
11 changes: 0 additions & 11 deletions dolphin-emu.desktop

This file was deleted.

Loading
Loading