1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 12:12:50 +01:00
rpcs3/.ci/deploy-linux.sh

44 lines
1.9 KiB
Bash
Raw Normal View History

#!/bin/sh -ex
cd build || exit 1
2018-07-16 03:12:43 +02:00
if [ "$DEPLOY_APPIMAGE" = "true" ]; then
DESTDIR=AppDir ninja install
curl -sL -o /usr/bin/linuxdeploy https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x /usr/bin/linuxdeploy
curl -sL -o /usr/bin/linuxdeploy-plugin-qt https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x /usr/bin/linuxdeploy-plugin-qt
curl -sL -o linuxdeploy-plugin-checkrt.sh https://github.com/linuxdeploy/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-x86_64.sh
chmod +x ./linuxdeploy-plugin-checkrt.sh
2018-07-16 03:12:43 +02:00
EXTRA_QT_PLUGINS="svg;" APPIMAGE_EXTRACT_AND_RUN=1 linuxdeploy --appdir AppDir --plugin qt
# Remove libwayland-client because it has platform-dependent exports and breaks other OSes
rm -f ./AppDir/usr/lib/libwayland-client.so*
2023-04-30 13:12:11 +02:00
# Remove git directory containing local commit history file
rm -rf ./AppDir/usr/share/rpcs3/git
./linuxdeploy-plugin-checkrt.sh --appdir AppDir
linuxdeploy --appimage-extract
./squashfs-root/plugins/linuxdeploy-plugin-appimage/usr/bin/appimagetool AppDir -g
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ../rpcs3/rpcs3_version.cpp)
2020-04-09 06:33:38 +02:00
COMM_COUNT="$(git rev-list --count HEAD)"
COMM_HASH="$(git rev-parse --short=8 HEAD)"
RPCS3_APPIMAGE="rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_linux64.AppImage"
2020-04-09 06:33:38 +02:00
mv ./RPCS3*.AppImage "$RPCS3_APPIMAGE"
2021-04-04 10:34:12 +02:00
# If we're building using a CI, let's copy over the AppImage artifact
2020-04-09 06:33:38 +02:00
if [ -n "$BUILD_ARTIFACTSTAGINGDIRECTORY" ]; then
2021-04-04 10:34:12 +02:00
cp "$RPCS3_APPIMAGE" "$ARTDIR"
2020-04-09 06:33:38 +02:00
fi
2020-04-09 06:33:38 +02:00
FILESIZE=$(stat -c %s ./rpcs3*.AppImage)
SHA256SUM=$(sha256sum ./rpcs3*.AppImage | awk '{ print $1 }')
2021-04-04 10:34:12 +02:00
echo "${SHA256SUM};${FILESIZE}B" > "$RELEASE_MESSAGE"
2018-07-16 03:12:43 +02:00
fi