2020-04-07 04:53:23 +02:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
|
|
cd build || exit 1
|
|
|
|
|
2018-07-16 03:12:43 +02:00
|
|
|
if [ "$DEPLOY_APPIMAGE" = "true" ]; then
|
2020-04-09 06:33:38 +02:00
|
|
|
DESTDIR=appdir ninja install
|
|
|
|
QT_APPIMAGE="linuxdeployqt.AppImage"
|
2020-04-07 04:53:23 +02:00
|
|
|
|
|
|
|
curl -sL "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" > "$QT_APPIMAGE"
|
|
|
|
chmod a+x "$QT_APPIMAGE"
|
|
|
|
"./$QT_APPIMAGE" --appimage-extract
|
|
|
|
./squashfs-root/AppRun ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
|
|
|
|
ls ./appdir/usr/lib/
|
|
|
|
rm -r ./appdir/usr/share/doc
|
|
|
|
rm ./appdir/usr/lib/libxcb*
|
|
|
|
cp "$(readlink -f /lib/x86_64-linux-gnu/libnsl.so.1)" ./appdir/usr/lib/libnsl.so.1
|
|
|
|
export PATH=/rpcs3/build/squashfs-root/usr/bin/:${PATH}
|
2018-07-16 03:12:43 +02:00
|
|
|
|
2020-04-09 06:33:38 +02:00
|
|
|
# Embed newer libstdc++ for distros that don't come with it (ubuntu 16.04)
|
|
|
|
mkdir -p appdir/usr/optional/ ; mkdir -p appdir/usr/optional/libstdc++/
|
|
|
|
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./appdir/usr/optional/libstdc++/
|
|
|
|
rm ./appdir/AppRun
|
|
|
|
curl -sL https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/AppRun-patched-x86_64 -o ./appdir/AppRun
|
|
|
|
chmod a+x ./appdir/AppRun
|
|
|
|
curl -sL https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/exec-x86_64.so -o ./appdir/usr/optional/exec.so
|
2020-04-07 04:53:23 +02:00
|
|
|
|
2020-04-09 06:33:38 +02:00
|
|
|
# Compile checker binary for AppImageKit-checkrt
|
2020-04-07 04:53:23 +02:00
|
|
|
|
2020-04-09 06:33:38 +02:00
|
|
|
# This may need updating if you update the compiler or rpcs3 uses newer c++ features
|
|
|
|
# See https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/config/abi/pre/gnu.ver
|
|
|
|
# for which definitions correlate to which CXXABI version.
|
|
|
|
# Currently we target a minimum of GLIBCXX_3.4.26 and CXXABI_1.3.11
|
|
|
|
printf "#include <bits/stdc++.h>\nint main(){std::make_exception_ptr(0);std::pmr::get_default_resource();}" | $CXX -x c++ -std=c++2a -o ./appdir/usr/optional/checker -
|
2020-04-07 04:53:23 +02:00
|
|
|
|
2020-04-09 06:33:38 +02:00
|
|
|
# Package it up and send it off
|
|
|
|
./squashfs-root/usr/bin/appimagetool /rpcs3/build/appdir
|
|
|
|
ls
|
2020-04-07 04:53:23 +02:00
|
|
|
|
2020-04-09 06:33:38 +02:00
|
|
|
COMM_TAG="$(grep 'version{.*}' ../rpcs3/rpcs3_version.cpp | awk -F[\{,] '{printf "%d.%d.%d", $2, $3, $4}')"
|
|
|
|
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-07 04:53:23 +02:00
|
|
|
|
2020-04-09 06:33:38 +02:00
|
|
|
mv ./RPCS3*.AppImage "$RPCS3_APPIMAGE"
|
2020-04-07 04:53:23 +02:00
|
|
|
|
2020-04-09 06:33:38 +02:00
|
|
|
# If we're building using Azure Pipelines, let's copy over the AppImage artifact
|
|
|
|
if [ -n "$BUILD_ARTIFACTSTAGINGDIRECTORY" ]; then
|
|
|
|
cp "$RPCS3_APPIMAGE" ~/artifacts
|
|
|
|
fi
|
2020-04-07 04:53:23 +02:00
|
|
|
|
2020-04-09 06:33:38 +02:00
|
|
|
FILESIZE=$(stat -c %s ./rpcs3*.AppImage)
|
2020-11-23 00:07:21 +01:00
|
|
|
SHA256SUM=$(sha256sum ./rpcs3*.AppImage | awk '{ print $1 }')
|
|
|
|
echo "${SHA256SUM};${FILESIZE}B" > /rpcs3/GitHubReleaseMessage.txt
|
|
|
|
|
2018-07-16 03:12:43 +02:00
|
|
|
fi
|
2020-04-09 06:33:38 +02:00
|
|
|
|
2018-07-16 03:12:43 +02:00
|
|
|
if [ "$DEPLOY_PPA" = "true" ]; then
|
2020-04-09 06:33:38 +02:00
|
|
|
export DEBFULLNAME="RPCS3 Build Bot"
|
2018-07-16 03:12:43 +02:00
|
|
|
fi
|