|
3 | 3 | set -ex |
4 | 4 |
|
5 | 5 | ARCH="$(uname -m)" |
6 | | -SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/quick-sharun.sh" |
7 | | -URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH" |
8 | | -URUNTIME_LITE="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-lite-$ARCH" |
9 | 6 |
|
10 | 7 | if [ "$1" = 'v3' ] && [ "$ARCH" = 'x86_64' ]; then |
11 | 8 | echo "Making x86-64-v3 optimized build of citron..." |
|
19 | 16 | ARCH_FLAGS="-march=armv8-a -mtune=generic -O3" |
20 | 17 | fi |
21 | 18 |
|
22 | | -UPINFO="gh-releases-zsync|$(echo "$GITHUB_REPOSITORY" | tr '/' '|')|latest|*$ARCH.AppImage.zsync" |
23 | | - |
24 | 19 | # BUILD CITRON, fallback to mirror if upstream repo fails to clone |
25 | 20 | git clone --recursive "https://git.citron-emu.org/citron/emu.git" ./citron && ( |
26 | 21 | cd ./citron |
@@ -74,13 +69,21 @@ git clone --recursive "https://git.citron-emu.org/citron/emu.git" ./citron && ( |
74 | 69 | echo "$VERSION" >~/version |
75 | 70 | ) |
76 | 71 | rm -rf ./citron |
| 72 | + |
| 73 | +# Deploy AppImage |
77 | 74 | VERSION="$(cat ~/version)" |
| 75 | +URUNTIME="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/uruntime2appimage.sh" |
| 76 | +SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/quick-sharun.sh" |
| 77 | + |
| 78 | +export ADD_HOOKS="self-updater.bg.hook" |
| 79 | +export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync" |
| 80 | +export OUTNAME=Citron-"$VERSION"-anylinux-"$ARCH".AppImage |
| 81 | +export DESKTOP=/usr/share/applications/org.citron_emu.citron.desktop |
| 82 | +export ICON=/usr/share/icons/hicolor/scalable/apps/org.citron_emu.citron.svg |
| 83 | +export DEPLOY_OPENGL=1 |
| 84 | +export DEPLOY_VULKAN=1 |
| 85 | +export DEPLOY_PIPEWIRE=1 |
78 | 86 |
|
79 | | -# PREPARE APPDIR |
80 | | -mkdir -p ./AppDir |
81 | | -cp -v /usr/share/applications/*citron*.desktop ./AppDir |
82 | | -cp -v /usr/share/icons/hicolor/scalable/apps/*citron*.svg ./AppDir |
83 | | -cp -v /usr/share/icons/hicolor/scalable/apps/*citron*.svg ./AppDir/.DirIcon |
84 | 87 | if [ "$DEVEL" = 'true' ]; then |
85 | 88 | sed -i 's|Name=citron|Name=citron nightly|' ./AppDir/*.desktop |
86 | 89 | UPINFO="$(echo "$UPINFO" | sed 's|latest|nightly|')" |
|
89 | 92 | # ADD LIBRARIES |
90 | 93 | wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun |
91 | 94 | chmod +x ./quick-sharun |
92 | | -DEPLOY_OPENGL=1 DEPLOY_VULKAN=1 DEPLOY_PIPEWIRE=1 \ |
93 | | - ./quick-sharun /usr/bin/citron* /usr/lib/libgamemode.so* |
94 | | -ln ./AppDir/sharun ./AppDir/AppRun |
| 95 | +./quick-sharun /usr/bin/citron* /usr/lib/libgamemode.so* |
95 | 96 |
|
96 | | -# Prepare sharun |
| 97 | +# allow the host vulkan to be used for aarch64 given the sad situation |
97 | 98 | if [ "$ARCH" = 'aarch64' ]; then |
98 | | - # allow the host vulkan to be used for aarch64 given the sad situation |
99 | 99 | echo 'SHARUN_ALLOW_SYS_VKICD=1' > ./AppDir/.env |
100 | 100 | fi |
101 | 101 |
|
102 | | -# turn appdir into appimage |
103 | | -wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime |
104 | | -wget --retry-connrefused --tries=30 "$URUNTIME_LITE" -O ./uruntime-lite |
105 | | -chmod +x ./uruntime* |
106 | | - |
107 | | -# Add udpate info to runtime |
108 | | -echo "Adding update information \"$UPINFO\" to runtime..." |
109 | | -./uruntime-lite --appimage-addupdinfo "$UPINFO" |
110 | | - |
111 | | -echo "Generating AppImage..." |
112 | | -./uruntime \ |
113 | | - --appimage-mkdwarfs -f \ |
114 | | - --set-owner 0 --set-group 0 \ |
115 | | - --no-history --no-create-timestamp \ |
116 | | - --compression zstd:level=22 -S26 -B8 \ |
117 | | - --header uruntime-lite \ |
118 | | - -i ./AppDir \ |
119 | | - -o ./Citron-"$VERSION"-anylinux-"$ARCH".AppImage |
120 | | - |
121 | | -echo "Generating zsync file..." |
122 | | -zsyncmake *.AppImage -u *.AppImage |
123 | | - |
124 | | -echo "All Done!" |
| 102 | +# MAKE APPIMAGE WITH URUNTIME |
| 103 | +wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime2appimage |
| 104 | +chmod +x ./uruntime2appimage |
| 105 | +./uruntime2appimage |
0 commit comments