|
1 | 1 | #!/bin/sh -e |
2 | 2 |
|
3 | | -# SPDX-FileCopyrightText: 2025 QDash |
| 3 | +# SPDX-FileCopyrightText: 2025 crueter |
4 | 4 | # SPDX-License-Identifier: GPL-3.0-or-later |
5 | 5 |
|
6 | 6 | # This script assumes you're in the source directory |
7 | 7 |
|
8 | | -export APPIMAGE_EXTRACT_AND_RUN=1 |
9 | | -export BASE_ARCH="$(uname -m)" |
| 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/qml/useful-tools/quick-sharun.sh" |
10 | 10 |
|
11 | | -SHARUN="https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-${BASE_ARCH}-aio" |
12 | | -URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-${BASE_ARCH}" |
| 11 | +export ICON="$PWD"/dist/org.Q-FRC.QDash.svg |
| 12 | +export DESKTOP="$PWD"/dist/org.Q-FRC.QDash.desktop |
| 13 | +export OPTIMIZE_LAUNCH=1 |
13 | 14 |
|
14 | 15 | case "$1" in |
15 | 16 | amd64|"") |
@@ -47,93 +48,21 @@ QDash_TAG=$(git describe --tags --abbrev=0) |
47 | 48 | echo "Making \"$QDash_TAG\" build" |
48 | 49 | VERSION="$QDash_TAG" |
49 | 50 |
|
50 | | -# NOW MAKE APPIMAGE |
51 | | -mkdir -p ./AppDir |
52 | | -cd ./AppDir |
| 51 | +export UPINFO="gh-releases-zsync|Q-FRC|QDash|latest|*$ARCH.AppImage.zsync" |
| 52 | +export OUTNAME=QDash-"$VERSION"-"$ARCH".AppImage |
53 | 53 |
|
54 | | -cp ../dist/org.Q-FRC.QDash.desktop . |
55 | | -cp ../dist/org.Q-FRC.QDash.svg . |
| 54 | +# Deploy dependencies |
| 55 | +wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun |
| 56 | +chmod +x ./quick-sharun |
| 57 | +./quick-sharun "$BUILDDIR"/QDash/Native/QDash |
56 | 58 |
|
57 | | -ln -sf ./org.Q-FRC.QDash.svg ./.DirIcon |
| 59 | +# MAKE APPIMAGE WITH URUNTIME |
| 60 | +wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime2appimage |
| 61 | +chmod +x ./uruntime2appimage |
| 62 | +./uruntime2appimage |
58 | 63 |
|
59 | | -UPINFO='gh-releases-zsync|Q-FRC|QDash|latest|*.AppImage.zsync' |
60 | | - |
61 | | -LIBDIR="/usr/lib" |
62 | | - |
63 | | -# Workaround for Gentoo |
64 | | -if [ ! -d "$LIBDIR/qt6" ] |
65 | | -then |
66 | | - LIBDIR="/usr/lib64" |
67 | | -fi |
68 | | - |
69 | | -# Workaround for Debian |
70 | | -if [ ! -d "$LIBDIR/qt6" ] |
71 | | -then |
72 | | - LIBDIR="/usr/lib/${BASE_ARCH}-linux-gnu" |
| 64 | +if [ "$DEVEL" = 'true' ]; then |
| 65 | + rm -f ./*.AppImage.zsync |
73 | 66 | fi |
74 | 67 |
|
75 | | -# Bundle all libs |
76 | | - |
77 | | -wget --retry-connrefused --tries=30 "$SHARUN" -O ./sharun-aio |
78 | | -chmod +x ./sharun-aio |
79 | | -xvfb-run -a ./sharun-aio l -p -v -e -s -k \ |
80 | | - ../$BUILDDIR/QDash/Native/QDash \ |
81 | | - $LIBDIR/libXss.so* \ |
82 | | - $LIBDIR/libdecor-0.so* \ |
83 | | - $LIBDIR/qt6/plugins/audio/* \ |
84 | | - $LIBDIR/qt6/plugins/bearer/* \ |
85 | | - $LIBDIR/qt6/plugins/imageformats/* \ |
86 | | - $LIBDIR/qt6/plugins/iconengines/* \ |
87 | | - $LIBDIR/qt6/plugins/platforms/* \ |
88 | | - $LIBDIR/qt6/plugins/platformthemes/* \ |
89 | | - $LIBDIR/qt6/plugins/platforminputcontexts/* \ |
90 | | - $LIBDIR/qt6/plugins/styles/* \ |
91 | | - $LIBDIR/qt6/plugins/xcbglintegrations/* \ |
92 | | - $LIBDIR/qt6/plugins/wayland-*/* |
93 | | - |
94 | | -rm -f ./sharun-aio |
95 | | - |
96 | | -# Copy QML Files |
97 | | -mkdir -p shared/lib/qt6/qml |
98 | | -set +e |
99 | | -cp -r $LIBDIR/qt6/qml/Qt{,Core,Multimedia,Network,Quick} shared/lib/qt6/qml/ |
100 | | -set -e |
101 | | - |
102 | | -# Prepare sharun |
103 | | -if [ "$ARCH" = 'aarch64' ]; then |
104 | | - # allow the host vulkan to be used for aarch64 given the sad situation |
105 | | - echo 'SHARUN_ALLOW_SYS_VKICD=1' > ./.env |
106 | | -fi |
107 | | - |
108 | | -# Workaround for Gentoo |
109 | | -if [ -d "shared/libproxy" ]; then |
110 | | - cp shared/libproxy/* lib/ |
111 | | -fi |
112 | | - |
113 | | -ln -f ./sharun ./AppRun |
114 | | -./sharun -g |
115 | | - |
116 | | -# turn appdir into appimage |
117 | | -cd .. |
118 | | -wget -q "$URUNTIME" -O ./uruntime |
119 | | -chmod +x ./uruntime |
120 | | - |
121 | | -#Add udpate info to runtime |
122 | | -echo "Adding update information \"$UPINFO\" to runtime..." |
123 | | -./uruntime --appimage-addupdinfo "$UPINFO" |
124 | | - |
125 | | -echo "Generating AppImage..." |
126 | | -./uruntime --appimage-mkdwarfs -f \ |
127 | | - --set-owner 0 --set-group 0 \ |
128 | | - --no-history --no-create-timestamp \ |
129 | | - --compression zstd:level=22 -S26 -B32 \ |
130 | | - --header uruntime \ |
131 | | - -N 4 \ |
132 | | - -i ./AppDir -o QDash-"$VERSION"-"$ARCH".AppImage |
133 | | - |
134 | | - # --categorize=hotness --hotness-list=.ci/linux/QDash.dwfsprof \ |
135 | | -if [ "$DEVEL" != 'true' ]; then |
136 | | - echo "Generating zsync file..." |
137 | | - zsyncmake *.AppImage -u *.AppImage |
138 | | -fi |
139 | 68 | echo "All Done!" |
0 commit comments