@@ -5,20 +5,17 @@ set -ex
55export ARCH=" $( uname -m) "
66
77REPO=" https://github.com/azahar-emu/azahar.git"
8- LIB4BN=" https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin"
98GRON=" https://raw.githubusercontent.com/xonixx/gron.awk/refs/heads/main/gron.awk"
109URUNTIME=" https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH "
11- UPINFO=" gh-releases-zsync|$( echo " $GITHUB_REPOSITORY " | tr ' /' ' |' ) |latest|*$ARCH .AppImage.zsync"
12-
13- if [ " $ARCH " = ' x86_64' ]; then
14- if [ " $1 " = ' v3' ]; then
15- echo " Making x86-64-v3 optimized build of azahar..."
16- ARCH=" ${ARCH} _v3"
17- ARCH_FLAGS=" -march=x86-64-v3 -O3 -flto=thin -DNDEBUG"
18- else
19- echo " Making x86-64 generic build of azahar..."
20- ARCH_FLAGS=" -march=x86-64 -mtune=generic -O3 -flto=thin -DNDEBUG"
21- fi
10+ SHARUN=" https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-$ARCH -aio"
11+
12+ if [ " $1 " = ' v3' ] && [ " $ARCH " = ' x86_64' ]; then
13+ echo " Making x86-64-v3 optimized build of azahar..."
14+ ARCH=" ${ARCH} _v3"
15+ ARCH_FLAGS=" -march=x86-64-v3 -O3 -flto=thin -DNDEBUG"
16+ elif [ " $ARCH " = ' x86_64' ]; then
17+ echo " Making x86-64 generic build of azahar..."
18+ ARCH_FLAGS=" -march=x86-64 -mtune=generic -O3 -flto=thin -DNDEBUG"
2219else
2320 echo " Making aarch64 build of azahar..."
2421 ARCH_FLAGS=" -march=armv8-a -mtune=generic -O3 -flto=thin -DNDEBUG"
@@ -30,42 +27,40 @@ UPINFO="gh-releases-zsync|$(echo "$GITHUB_REPOSITORY" | tr '/' '|')|latest|*$ARC
3027if [ " DEVEL" = ' true' ]; then
3128 echo " Making nightly build of azahar..."
3229 VERSION=" $( git ls-remote " $REPO " HEAD | cut -c 1-9) "
33- git clone " $REPO " ./azahar
30+ git clone --recursive -j $( nproc ) " $REPO " ./azahar
3431else
3532 echo " Making stable build of azahar..."
3633 wget " $GRON " -O ./gron.awk
3734 chmod +x ./gron.awk
3835 VERSION=$( wget https://api.github.com/repos/azahar-emu/azahar/tags -O - \
3936 | ./gron.awk | awk -F' =|"' ' /name/ {print $3; exit}' )
40- git clone --branch " $VERSION " --single-branch " $REPO " ./azahar
37+ git clone --recursive -j $( nproc ) -- branch " $VERSION " --single-branch " $REPO " ./azahar
4138fi
4239echo " $VERSION " > ~ /version
4340
4441# BUILD AZAAHR
4542(
4643 cd ./azahar
47- git submodule update --init --recursive -j$( nproc)
48-
4944 # HACK
5045 sed -i ' 10a #include <memory>' ./src/video_core/shader/shader_jit_a64_compiler.*
5146
5247 mkdir ./build
5348 cd ./build
54- cmake .. -DCMAKE_CXX_COMPILER=clang++ \
55- -DCMAKE_C_COMPILER=clang \
56- -DCMAKE_INSTALL_PREFIX=/usr \
57- -DENABLE_QT_TRANSLATION=ON \
58- -DUSE_SYSTEM_BOOST=OFF \
59- -DCMAKE_BUILD_TYPE=Release \
60- -DUSE_DISCORD_PRESENCE=OFF \
61- -DCMAKE_C_FLAGS=" $ARCH_FLAGS " \
62- -DUSE_SYSTEM_VULKAN_HEADERS=ON \
63- -DENABLE_LTO=OFF \
64- -DUSE_SYSTEM_GLSLANG=ON \
65- -DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON \
66- -DCITRA_USE_PRECOMPILED_HEADERS=OFF \
67- -DCMAKE_C_FLAGS=" $ARCH_FLAGS " \
68- -DCMAKE_CXX_FLAGS=" $ARCH_FLAGS " \
49+ cmake .. -DCMAKE_CXX_COMPILER=clang++ \
50+ -DCMAKE_C_COMPILER=clang \
51+ -DCMAKE_INSTALL_PREFIX=/usr \
52+ -DENABLE_QT_TRANSLATION=ON \
53+ -DUSE_SYSTEM_BOOST=OFF \
54+ -DCMAKE_BUILD_TYPE=Release \
55+ -DUSE_DISCORD_PRESENCE=OFF \
56+ -DCMAKE_C_FLAGS=" $ARCH_FLAGS " \
57+ -DUSE_SYSTEM_VULKAN_HEADERS=ON \
58+ -DENABLE_LTO=OFF \
59+ -DUSE_SYSTEM_GLSLANG=ON \
60+ -DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON \
61+ -DCITRA_USE_PRECOMPILED_HEADERS=OFF \
62+ -DCMAKE_C_FLAGS=" $ARCH_FLAGS " \
63+ -DCMAKE_CXX_FLAGS=" $ARCH_FLAGS " \
6964 -Wno-dev
7065 cmake --build . -- -j" $( nproc) "
7166 sudo make install
@@ -86,39 +81,37 @@ if [ "$DEVEL" = 'true' ]; then
8681fi
8782
8883# Bundle all libs
89- wget --retry-connrefused --tries=30 " $LIB4BN " -O ./lib4bin
90- chmod +x ./lib4bin
91- xvfb-run -a -- ./lib4bin -p -v -e -s -k \
92- /usr/bin/azahar* \
93- /usr/lib/libGLX* \
94- /usr/lib/libGL.so* \
95- /usr/lib/libEGL* \
96- /usr/lib/dri/* \
97- /usr/lib/vdpau/* \
98- /usr/lib/libvulkan* \
99- /usr/lib/libVkLayer* \
100- /usr/lib/libXss.so* \
101- /usr/lib/libdecor-0.so* \
102- /usr/lib/libgamemode.so* \
103- /usr/lib/qt6/plugins/audio/* \
104- /usr/lib/qt6/plugins/bearer/* \
105- /usr/lib/qt6/plugins/imageformats/* \
106- /usr/lib/qt6/plugins/iconengines/* \
107- /usr/lib/qt6/plugins/platforms/* \
108- /usr/lib/qt6/plugins/platformthemes/* \
109- /usr/lib/qt6/plugins/platforminputcontexts/* \
110- /usr/lib/qt6/plugins/styles/* \
111- /usr/lib/qt6/plugins/xcbglintegrations/* \
112- /usr/lib/qt6/plugins/wayland-* /* \
113- /usr/lib/pulseaudio/* \
114- /usr/lib/pipewire-* /* \
115- /usr/lib/spa-* /* /* \
84+ wget --retry-connrefused --tries=30 " $SHARUN " -O ./sharun-aio
85+ chmod +x ./sharun-aio
86+ xvfb-run -a ./sharun-aio l -p -v -e -s -k \
87+ /usr/bin/azahar* \
88+ /usr/lib/lib* GL* \
89+ /usr/lib/dri/* \
90+ /usr/lib/vdpau/* \
91+ /usr/lib/libvulkan* \
92+ /usr/lib/libVkLayer* \
93+ /usr/lib/libXss.so* \
94+ /usr/lib/libdecor-0.so* \
95+ /usr/lib/libgamemode.so* \
96+ /usr/lib/qt6/plugins/audio/* \
97+ /usr/lib/qt6/plugins/bearer/* \
98+ /usr/lib/qt6/plugins/imageformats/* \
99+ /usr/lib/qt6/plugins/iconengines/* \
100+ /usr/lib/qt6/plugins/platforms/* \
101+ /usr/lib/qt6/plugins/platformthemes/* \
102+ /usr/lib/qt6/plugins/platforminputcontexts/* \
103+ /usr/lib/qt6/plugins/styles/* \
104+ /usr/lib/qt6/plugins/xcbglintegrations/* \
105+ /usr/lib/qt6/plugins/wayland-* /* \
106+ /usr/lib/pulseaudio/* \
107+ /usr/lib/pipewire-* /* \
108+ /usr/lib/spa-* /* /* \
116109 /usr/lib/alsa-lib/*
110+ rm -f ./sharun-aio
117111
118112# Prepare sharun
119- if [ " $ARCH " = ' aarch64' ]; then
120- # allow the host vulkan to be used for aarch64 given the sed situation
121- echo ' SHARUN_ALLOW_SYS_VKICD=1' > ./.env
113+ if [ " $ARCH " = ' aarch64' ]; then # allow using host vk for aarch64 given the sad situation
114+ echo ' SHARUN_ALLOW_SYS_VKICD=1' >> ./.env
122115fi
123116ln ./sharun ./AppRun
124117./sharun -g
@@ -133,11 +126,11 @@ echo "Adding update information \"$UPINFO\" to runtime..."
133126./uruntime --appimage-addupdinfo " $UPINFO "
134127
135128echo " Generating AppImage..."
136- ./uruntime --appimage-mkdwarfs -f \
137- --set-owner 0 --set-group 0 \
138- --no-history --no-create-timestamp \
129+ ./uruntime --appimage-mkdwarfs -f \
130+ --set-owner 0 --set-group 0 \
131+ --no-history --no-create-timestamp \
139132 --compression zstd:level=22 -S26 -B8 \
140- --header uruntime \
133+ --header uruntime \
141134 -i ./AppDir -o Azahar-Enhanced-" $VERSION " -anylinux-" $ARCH " .AppImage
142135
143136echo " Generating zsync file..."
0 commit comments