2020-04-07 02:53:23 +00:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
|
|
cd build || exit 1
|
|
|
|
|
2024-09-29 02:07:27 +00:00
|
|
|
CPU_ARCH="${1:-x86_64}"
|
|
|
|
|
2018-07-16 01:12:43 +00:00
|
|
|
if [ "$DEPLOY_APPIMAGE" = "true" ]; then
|
2023-04-28 02:16:59 +00:00
|
|
|
DESTDIR=AppDir ninja install
|
2020-04-07 02:53:23 +00:00
|
|
|
|
2024-09-29 10:39:08 +00:00
|
|
|
curl -fsSLo /usr/bin/linuxdeploy "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$CPU_ARCH.AppImage"
|
2023-04-28 02:16:59 +00:00
|
|
|
chmod +x /usr/bin/linuxdeploy
|
2024-09-29 10:39:08 +00:00
|
|
|
curl -fsSLo /usr/bin/linuxdeploy-plugin-qt "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-$CPU_ARCH.AppImage"
|
2023-04-28 02:16:59 +00:00
|
|
|
chmod +x /usr/bin/linuxdeploy-plugin-qt
|
2024-09-29 02:07:27 +00:00
|
|
|
curl -fsSLo linuxdeploy-plugin-checkrt.sh https://github.com/darealshinji/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt.sh
|
2023-05-06 07:54:20 +00:00
|
|
|
chmod +x ./linuxdeploy-plugin-checkrt.sh
|
2018-07-16 01:12:43 +00:00
|
|
|
|
2024-04-12 05:59:18 +00:00
|
|
|
export EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so"
|
2024-10-01 10:20:17 +00:00
|
|
|
export EXTRA_QT_PLUGINS="svg;wayland-decoration-client;wayland-graphics-integration-client;wayland-shell-integration;waylandcompositor"
|
2024-09-30 20:01:22 +00:00
|
|
|
|
2024-10-03 17:23:56 +00:00
|
|
|
APPIMAGE_EXTRACT_AND_RUN=1 linuxdeploy --appdir AppDir --plugin qt --plugin checkrt
|
2023-04-30 01:33:49 +00:00
|
|
|
|
|
|
|
# Remove libwayland-client because it has platform-dependent exports and breaks other OSes
|
|
|
|
rm -f ./AppDir/usr/lib/libwayland-client.so*
|
|
|
|
|
2024-03-05 17:54:47 +00:00
|
|
|
# Remove libvulkan because it causes issues with gamescope
|
|
|
|
rm -f ./AppDir/usr/lib/libvulkan.so*
|
|
|
|
|
2023-04-30 11:12:11 +00:00
|
|
|
# Remove git directory containing local commit history file
|
|
|
|
rm -rf ./AppDir/usr/share/rpcs3/git
|
|
|
|
|
2023-04-30 01:33:49 +00:00
|
|
|
linuxdeploy --appimage-extract
|
|
|
|
./squashfs-root/plugins/linuxdeploy-plugin-appimage/usr/bin/appimagetool AppDir -g
|
2020-04-07 02:53:23 +00:00
|
|
|
|
2024-09-29 23:27:11 +00:00
|
|
|
APPIMAGE_SUFFIX="linux_${CPU_ARCH}"
|
2024-09-29 23:44:09 +00:00
|
|
|
if [ "$CPU_ARCH" = "x86_64" ]; then
|
2024-09-29 23:27:11 +00:00
|
|
|
# Preserve back compat. Previous versions never included the full arch.
|
|
|
|
APPIMAGE_SUFFIX="linux64"
|
|
|
|
fi
|
|
|
|
|
2022-01-05 08:32:13 +00:00
|
|
|
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ../rpcs3/rpcs3_version.cpp)
|
2020-04-09 04:33:38 +00:00
|
|
|
COMM_COUNT="$(git rev-list --count HEAD)"
|
|
|
|
COMM_HASH="$(git rev-parse --short=8 HEAD)"
|
2024-09-29 23:27:11 +00:00
|
|
|
RPCS3_APPIMAGE="rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_${APPIMAGE_SUFFIX}.AppImage"
|
2020-04-07 02:53:23 +00:00
|
|
|
|
2020-04-09 04:33:38 +00:00
|
|
|
mv ./RPCS3*.AppImage "$RPCS3_APPIMAGE"
|
2020-04-07 02:53:23 +00:00
|
|
|
|
2021-04-04 08:34:12 +00:00
|
|
|
# If we're building using a CI, let's copy over the AppImage artifact
|
2020-04-09 04:33:38 +00:00
|
|
|
if [ -n "$BUILD_ARTIFACTSTAGINGDIRECTORY" ]; then
|
2021-04-04 08:34:12 +00:00
|
|
|
cp "$RPCS3_APPIMAGE" "$ARTDIR"
|
2020-04-09 04:33:38 +00:00
|
|
|
fi
|
2020-04-07 02:53:23 +00:00
|
|
|
|
2020-04-09 04:33:38 +00:00
|
|
|
FILESIZE=$(stat -c %s ./rpcs3*.AppImage)
|
2020-11-22 23:07:21 +00:00
|
|
|
SHA256SUM=$(sha256sum ./rpcs3*.AppImage | awk '{ print $1 }')
|
2021-04-04 08:34:12 +00:00
|
|
|
echo "${SHA256SUM};${FILESIZE}B" > "$RELEASE_MESSAGE"
|
2018-07-16 01:12:43 +00:00
|
|
|
fi
|