|
2 | 2 |
|
3 | 3 | set -ex |
4 | 4 |
|
5 | | -export ARCH="$(uname -m)" |
6 | | - |
| 5 | +ARCH="$(uname -m)" |
7 | 6 | REPO="https://github.com/azahar-emu/azahar.git" |
8 | 7 | GRON="https://raw.githubusercontent.com/xonixx/gron.awk/refs/heads/main/gron.awk" |
9 | | -URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH" |
10 | | -SHARUN="https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-$ARCH-aio" |
| 8 | +URUNTIME="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/uruntime2appimage.sh" |
| 9 | +SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/quick-sharun.sh" |
11 | 10 |
|
12 | 11 | if [ "$1" = 'v3' ] && [ "$ARCH" = 'x86_64' ]; then |
13 | 12 | echo "Making x86-64-v3 optimized build of azahar..." |
|
21 | 20 | ARCH_FLAGS="-march=armv8-a -mtune=generic -O3 -flto=thin -DNDEBUG" |
22 | 21 | fi |
23 | 22 |
|
24 | | -UPINFO="gh-releases-zsync|$(echo "$GITHUB_REPOSITORY" | tr '/' '|')|latest|*$ARCH.AppImage.zsync" |
25 | | - |
26 | 23 | # Determine to build nightly or stable |
27 | 24 | if [ "DEVEL" = 'true' ]; then |
28 | 25 | echo "Making nightly build of azahar..." |
|
38 | 35 | fi |
39 | 36 | echo "$VERSION" > ~/version |
40 | 37 |
|
| 38 | +export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync" |
| 39 | +export OUTNAME=Azahar-Enhanced-"$VERSION"-anylinux-"$ARCH".AppImage |
| 40 | + |
41 | 41 | # BUILD AZAAHR |
42 | 42 | ( |
43 | 43 | cd ./azahar |
@@ -69,72 +69,29 @@ echo "$VERSION" > ~/version |
69 | 69 | ) |
70 | 70 | rm -rf ./azahar |
71 | 71 |
|
72 | | -# NOW MAKE APPIMAGE |
| 72 | +# PREPARE APPDIR |
73 | 73 | mkdir ./AppDir |
74 | | -cd ./AppDir |
75 | | - |
76 | | -cp -v /usr/share/applications/org.azahar_emu.Azahar.desktop ./azahar.desktop |
77 | | -cp -v /usr/share/icons/hicolor/512x512/apps/org.azahar_emu.Azahar.png ./azahar.png |
78 | | -cp -v /usr/share/icons/hicolor/512x512/apps/org.azahar_emu.Azahar.png ./.DirIcon |
79 | | - |
| 74 | +cp -v /usr/share/applications/org.azahar_emu.Azahar.desktop ./AppDir/azahar.desktop |
| 75 | +cp -v /usr/share/icons/hicolor/512x512/apps/org.azahar_emu.Azahar.png ./AppDir/azahar.png |
| 76 | +cp -v /usr/share/icons/hicolor/512x512/apps/org.azahar_emu.Azahar.png ./AppDir/.DirIcon |
80 | 77 | if [ "$DEVEL" = 'true' ]; then |
81 | | - sed -i 's|Name=Azahar|Name=Azahar nightly|' ./azahar.desktop |
| 78 | + sed -i 's|Name=Azahar|Name=Azahar nightly|' ./AppDir/azahar.desktop |
82 | 79 | UPINFO="$(echo "$UPINFO" | sed 's|latest|nightly|')" |
83 | 80 | fi |
84 | 81 |
|
85 | | -# Bundle all libs |
86 | | -wget --retry-connrefused --tries=30 "$SHARUN" -O ./sharun-aio |
87 | | -chmod +x ./sharun-aio |
88 | | -xvfb-run -a ./sharun-aio l -p -v -e -s -k \ |
89 | | - /usr/bin/azahar* \ |
90 | | - /usr/lib/lib*GL* \ |
91 | | - /usr/lib/dri/* \ |
92 | | - /usr/lib/vdpau/* \ |
93 | | - /usr/lib/libvulkan* \ |
94 | | - /usr/lib/libVkLayer* \ |
95 | | - /usr/lib/libXss.so* \ |
96 | | - /usr/lib/libdecor-0.so* \ |
97 | | - /usr/lib/libgamemode.so* \ |
98 | | - /usr/lib/qt6/plugins/audio/* \ |
99 | | - /usr/lib/qt6/plugins/bearer/* \ |
100 | | - /usr/lib/qt6/plugins/imageformats/* \ |
101 | | - /usr/lib/qt6/plugins/iconengines/* \ |
102 | | - /usr/lib/qt6/plugins/platforms/* \ |
103 | | - /usr/lib/qt6/plugins/platformthemes/* \ |
104 | | - /usr/lib/qt6/plugins/platforminputcontexts/* \ |
105 | | - /usr/lib/qt6/plugins/styles/* \ |
106 | | - /usr/lib/qt6/plugins/xcbglintegrations/* \ |
107 | | - /usr/lib/qt6/plugins/wayland-*/* \ |
108 | | - /usr/lib/pulseaudio/* \ |
109 | | - /usr/lib/pipewire-*/* \ |
110 | | - /usr/lib/spa-*/*/* \ |
111 | | - /usr/lib/alsa-lib/* |
112 | | -rm -f ./sharun-aio |
| 82 | +# ADD LIBRARIES |
| 83 | +wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun |
| 84 | +chmod +x ./quick-sharun |
| 85 | +DEPLOY_OPENGL=1 DEPLOY_VULKAN=1 DEPLOY_PIPEWIRE=1 \ |
| 86 | + ./quick-sharun /usr/bin/azahar* /usr/lib/libgamemode.so* |
| 87 | +ln ./AppDir/sharun ./AppDir/AppRun |
113 | 88 |
|
114 | | -# Prepare sharun |
115 | | -if [ "$ARCH" = 'aarch64' ]; then # allow using host vk for aarch64 given the sad situation |
116 | | - echo 'SHARUN_ALLOW_SYS_VKICD=1' >> ./.env |
| 89 | +# allow using host vk for aarch64 given the sad situation |
| 90 | +if [ "$ARCH" = 'aarch64' ]; then |
| 91 | + echo 'SHARUN_ALLOW_SYS_VKICD=1' >> ./AppDir/.env |
117 | 92 | fi |
118 | | -ln ./sharun ./AppRun |
119 | | -./sharun -g |
120 | | - |
121 | | -# turn appdir into appimage |
122 | | -cd .. |
123 | | -wget -q "$URUNTIME" -O ./uruntime |
124 | | -chmod +x ./uruntime |
125 | | - |
126 | | -#Add udpate info to runtime |
127 | | -echo "Adding update information \"$UPINFO\" to runtime..." |
128 | | -./uruntime --appimage-addupdinfo "$UPINFO" |
129 | | - |
130 | | -echo "Generating AppImage..." |
131 | | -./uruntime --appimage-mkdwarfs -f \ |
132 | | - --set-owner 0 --set-group 0 \ |
133 | | - --no-history --no-create-timestamp \ |
134 | | - --compression zstd:level=22 -S26 -B8 \ |
135 | | - --header uruntime \ |
136 | | - -i ./AppDir -o Azahar-Enhanced-"$VERSION"-anylinux-"$ARCH".AppImage |
137 | 93 |
|
138 | | -echo "Generating zsync file..." |
139 | | -zsyncmake *.AppImage -u *.AppImage |
140 | | -echo "All Done!" |
| 94 | +# MAKE APPIMAGE WITH URUNTIME |
| 95 | +wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime2appimage |
| 96 | +chmod +x ./uruntime2appimage |
| 97 | +./uruntime2appimage |
0 commit comments