Skip to content
This repository was archived by the owner on Sep 13, 2025. It is now read-only.

Commit 97d40ea

Browse files
Samueru-samacrueter
andcommitted
use quick-sharun (#225)
* use debloated packages installer, add mesa that does not link to llvm * oops * oops2 * use wrapper scripts * check qml deployment * oops * disable webview on macos * use both arm64 and amd64 targets for macOS * use aqt * fixup ccache Signed-off-by: crueter <crueter@eden-emu.dev> --------- Signed-off-by: crueter <crueter@eden-emu.dev> Co-authored-by: crueter <crueter@eden-emu.dev>
1 parent ea1ad39 commit 97d40ea

File tree

8 files changed

+62
-141
lines changed

8 files changed

+62
-141
lines changed

.ci/linux/build.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -e
22

3-
# SPDX-FileCopyrightText: 2025 QDash
3+
# SPDX-FileCopyrightText: 2025 crueter
44
# SPDX-License-Identifier: GPL-3.0-or-later
55

66
export ARCH="$(uname -m)"
@@ -10,25 +10,21 @@ case "$1" in
1010
echo "Making amd64-v3 optimized build of QDash"
1111
ARCH="amd64_v3"
1212
ARCH_FLAGS="-march=x86-64-v3"
13-
export USE_CCACHE=true
1413
;;
1514
steamdeck)
1615
echo "Making Steam Deck (Zen 2) optimized build of QDash"
1716
ARCH="steamdeck"
1817
ARCH_FLAGS="-march=znver2 -mtune=znver2"
19-
export USE_CCACHE=true
2018
;;
2119
rog-ally|allyx)
2220
echo "Making ROG Ally X (Zen 4) optimized build of QDash"
2321
ARCH="rog-ally-x"
24-
ARCH_FLAGS="-march=znver3 -mtune=znver4" # GH actions runner is a Zen 3 CPU, so a small workaround
25-
export USE_CCACHE=true
22+
ARCH_FLAGS="-march=znver4 -mtune=znver4"
2623
;;
2724
legacy)
2825
echo "Making amd64 generic build of QDash"
2926
ARCH=amd64
3027
ARCH_FLAGS="-march=x86-64 -mtune=generic"
31-
export USE_CCACHE=true
3228
;;
3329
aarch64)
3430
echo "Making armv8-a build of QDash"

.ci/linux/get-dependencies.sh

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
#!/bin/sh
22

3-
set -eux
4-
5-
sed -i 's/DownloadUser/#DownloadUser/g' /etc/pacman.conf
3+
# SPDX-FileCopyrightText: 2025 crueter
4+
# SPDX-License-Identifier: GPL-3.0-or-later
65

7-
if [ "$(uname -m)" = 'x86_64' ]; then
8-
PKG_TYPE='x86_64.pkg.tar.zst'
9-
else
10-
PKG_TYPE='aarch64.pkg.tar.xz'
11-
fi
6+
set -eux
127

13-
QT6_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/qt6-base-iculess-$PKG_TYPE"
14-
LIBXML_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/libxml2-iculess-$PKG_TYPE"
15-
OPUS_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/opus-nano-$PKG_TYPE"
8+
ARCH="$(uname -m)"
9+
EXTRA_PACKAGES="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/get-debloated-pkgs.sh"
1610

1711
echo "Installing build dependencies..."
1812
echo "---------------------------------------------------------------"
@@ -40,14 +34,8 @@ pacman -Syu --noconfirm \
4034
zip \
4135
zsync
4236

43-
echo "Installing debloated pckages..."
44-
echo "---------------------------------------------------------------"
45-
wget --retry-connrefused --tries=30 "$QT6_URL" -O ./qt6-base-iculess.pkg.tar.zst
46-
wget --retry-connrefused --tries=30 "$LIBXML_URL" -O ./libxml2-iculess.pkg.tar.zst
47-
wget --retry-connrefused --tries=30 "$OPUS_URL" -O ./opus-nano.pkg.tar.zst
48-
49-
pacman -U --noconfirm ./*.pkg.tar.zst
50-
rm -f ./*.pkg.tar.zst
51-
52-
echo "All done!"
37+
echo "Installing debloated packages..."
5338
echo "---------------------------------------------------------------"
39+
wget --retry-connrefused --tries=30 "$EXTRA_PACKAGES" -O ./get-debloated-pkgs.sh
40+
chmod +x ./get-debloated-pkgs.sh
41+
./get-debloated-pkgs.sh --add-mesa --prefer-nano qt6-base-mini libxml2-mini opus-mini

.ci/linux/package.sh

Lines changed: 18 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/sh -e
22

3-
# SPDX-FileCopyrightText: 2025 QDash
3+
# SPDX-FileCopyrightText: 2025 crueter
44
# SPDX-License-Identifier: GPL-3.0-or-later
55

66
# This script assumes you're in the source directory
77

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"
1010

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
1314

1415
case "$1" in
1516
amd64|"")
@@ -47,93 +48,21 @@ QDash_TAG=$(git describe --tags --abbrev=0)
4748
echo "Making \"$QDash_TAG\" build"
4849
VERSION="$QDash_TAG"
4950

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
5353

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
5658

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
5863

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
7366
fi
7467

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
13968
echo "All Done!"

.ci/macos/build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash -e
22

3-
# SPDX-FileCopyrightText: 2025 eden Emulator Project
3+
# SPDX-FileCopyrightText: 2025 crueter
44
# SPDX-License-Identifier: GPL-3.0-or-later
55

66
if [ "$USE_CCACHE" = "true" ]; then
7-
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DUSE_CCACHE=ON)
7+
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache)
88
fi
99

1010
if [ "$BUILD_TYPE" = "" ]; then
@@ -16,7 +16,8 @@ export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
1616
mkdir -p build && cd build
1717
cmake .. -G Ninja \
1818
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
19-
-DCMAKE_OSX_ARCHITECTURES="arm64" \
19+
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
20+
-DQDASH_WEBVIEW=OFF \
2021
-DBUILD_SHARED_LIBS=OFF \
2122
"${EXTRA_CMAKE_FLAGS[@]}"
2223

.ci/macos/package.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
set -ex
1+
#!/bin/sh -ex
2+
3+
# SPDX-FileCopyrightText: 2025 crueter
4+
# SPDX-License-Identifier: GPL-3.0-or-later
25

36
cd build
47
rm -rf QDash.app

.ci/windows/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash -e
22

3-
# SPDX-FileCopyrightText: 2025 eden Emulator Project
3+
# SPDX-FileCopyrightText: 2025 crueter
44
# SPDX-License-Identifier: GPL-3.0-or-later
55

66
if [ "$USE_CCACHE" = "true" ]; then
7-
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DUSE_CCACHE=ON)
7+
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache)
88
fi
99

1010
if [ "$WINDEPLOYQT" == "" ]; then

.ci/windows/package.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#!/bin/sh
2+
3+
# SPDX-FileCopyrightText: 2025 crueter
4+
# SPDX-License-Identifier: GPL-3.0-or-later
5+
16
QDash_TAG=$(git describe --tags --abbrev=0)
27
echo "Making \"$QDash_TAG\" build"
38
VERSION="$QDash_TAG"

.github/workflows/build.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
description: Whether or not this is a development build
1414
type: string
1515
default: true
16+
env:
17+
qt_version: 6.9.1
18+
qt_modules: qtmultimedia
1619

1720
jobs:
1821
linux:
@@ -49,10 +52,9 @@ jobs:
4952
./.ci/linux/get-dependencies.sh
5053
5154
- name: Setup CCache
52-
if: matrix.arch != 'aarch64'
5355
uses: hendrikmuhs/ccache-action@v1.2
5456
with:
55-
key: ${{ runner.os }}-${{ inputs.build_type }}
57+
key: ${{ runner.os }}-${{ matrix.arch }}-${{ inputs.build_type }}
5658

5759
- name: Cache Build Deps
5860
uses: actions/cache@v4
@@ -64,6 +66,7 @@ jobs:
6466
run: |
6567
export TARGET=appimage
6668
export BUILD_TYPE=${{ inputs.build_type }}
69+
export USE_CCACHE=true
6770
6871
chmod a+x .ci/linux/build.sh
6972
.ci/linux/build.sh ${{ matrix.pkg_arch }}
@@ -106,17 +109,9 @@ jobs:
106109
include:
107110
- runs-on: windows-latest
108111
arch: amd64
109-
qt_arch: win64_msvc2022_64
110-
qt_version: 6.9.1
111-
qt_modules: qtmultimedia
112-
ccache: true
113112

114113
- runs-on: windows-11-arm
115114
arch: arm64
116-
qt_arch: win64_msvc2022_arm64
117-
qt_version: 6.9.1
118-
qt_modules: qtmultimedia
119-
ccache: false
120115

121116
steps:
122117
- name: Checkout
@@ -127,8 +122,8 @@ jobs:
127122
- name: Install Qt
128123
uses: jurplel/install-qt-action@v4
129124
with:
130-
version: ${{ matrix.qt_version }}
131-
modules: ${{ matrix.qt_modules }}
125+
version: ${{ env.qt_version }}
126+
modules: ${{ env.qt_modules }}
132127
cache: 'true'
133128

134129
- name: Set up MSVC
@@ -145,10 +140,9 @@ jobs:
145140
pip install jinja2
146141
147142
- name: Setup CCache
148-
if: matrix.arch != 'arm64'
149143
uses: hendrikmuhs/ccache-action@v1.2
150144
with:
151-
key: ${{ runner.os }}-${{ inputs.build_type }}
145+
key: ${{ runner.os }}-${{ matrix.arch }}-${{ inputs.build_type }}
152146

153147
- name: Cache Build Deps
154148
uses: actions/cache@v4
@@ -159,10 +153,9 @@ jobs:
159153
- name: Build
160154
shell: bash
161155
run: |
162-
export PATH="${PATH}:${{ runner.workspace }}/Qt/${{ matrix.qt_version }}/${{ matrix.qt_arch }}/bin"
163156
export DEVEL=true
164157
export WINDEPLOYQT=windeployqt
165-
export USE_CCACHE=${{ matrix.ccache }}
158+
export USE_CCACHE=true
166159
167160
./.ci/windows/build.sh
168161
@@ -207,6 +200,13 @@ jobs:
207200
with:
208201
fetch-depth: 0
209202

203+
- name: Install Qt
204+
uses: jurplel/install-qt-action@v4
205+
with:
206+
version: ${{ env.qt_version }}
207+
modules: ${{ env.qt_modules }}
208+
cache: 'true'
209+
210210
- name: Install CMake
211211
uses: lukka/get-cmake@v4.0.1
212212

@@ -230,7 +230,7 @@ jobs:
230230
- name: Install Dependencies
231231
run: |
232232
brew update
233-
brew install llvm ninja qt@6
233+
brew install llvm ninja
234234
pip install jinja2
235235
236236
- name: Configure & Build
@@ -243,8 +243,7 @@ jobs:
243243
244244
- name: Package
245245
run: |
246-
export PATH="$PATH;$(brew --prefix qt@6)/bin"
247-
export QML_SOURCES_PATHS="$(brew --prefix qt@6)/share/qt/qml"
246+
export QML_SOURCES_PATHS="$QML2_IMPORT_PATH"
248247
249248
chmod a+x .ci/macos/package.sh
250249
.ci/macos/package.sh

0 commit comments

Comments
 (0)