2018-07-16 01:12:43 +00:00
|
|
|
#!/bin/env bash -ex
|
|
|
|
shopt -s nocasematch
|
|
|
|
cd build
|
|
|
|
if [ "$DEPLOY_APPIMAGE" = "true" ]; then
|
|
|
|
DESTDIR=appdir ninja install
|
|
|
|
curl -sLO "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
|
|
|
chmod a+x linuxdeployqt*.AppImage
|
2018-09-20 18:12:43 +00:00
|
|
|
./linuxdeployqt*.AppImage --appimage-extract
|
|
|
|
./squashfs-root/AppRun ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
|
2018-07-16 01:12:43 +00:00
|
|
|
ls ./appdir/usr/lib/
|
|
|
|
rm -r ./appdir/usr/share/doc
|
2018-09-15 04:09:57 +00:00
|
|
|
rm ./appdir/usr/lib/libxcb*
|
2018-10-26 04:14:02 +00:00
|
|
|
cp $(readlink -f /lib/x86_64-linux-gnu/libnsl.so.1) ./appdir/usr/lib/libnsl.so.1
|
2018-07-16 01:12:43 +00:00
|
|
|
export PATH=/rpcs3/build/squashfs-root/usr/bin/:${PATH}
|
|
|
|
|
2018-09-15 04:09:57 +00:00
|
|
|
# Embed newer libstdc++ for distros that don't come with it (ubuntu 14.04, 16.04)
|
2018-07-16 01:12:43 +00:00
|
|
|
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
|
2018-12-04 23:35:25 +00:00
|
|
|
curl -sL https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/AppRun-patched-x86_64 -o ./appdir/AppRun
|
2018-07-16 01:12:43 +00:00
|
|
|
chmod a+x ./appdir/AppRun
|
2018-12-04 23:35:25 +00:00
|
|
|
curl -sL https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/exec-x86_64.so -o ./appdir/usr/optional/exec.so
|
|
|
|
|
|
|
|
# Compile checker binary for AppImageKit-checkrt
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
printf "#include <memory>\nint main(){std::make_exception_ptr(0);}" | $CXX -x c++ -o ./appdir/usr/optional/checker -
|
|
|
|
|
2018-07-16 01:12:43 +00:00
|
|
|
# Package it up and send it off
|
|
|
|
./squashfs-root/usr/bin/appimagetool /rpcs3/build/appdir
|
|
|
|
ls
|
|
|
|
COMM_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))"
|
|
|
|
COMM_COUNT="$(git rev-list --count HEAD)"
|
2018-12-31 00:41:02 +00:00
|
|
|
curl -sLO https://github.com/hcorion/uploadtool/raw/master/upload.sh
|
|
|
|
|
|
|
|
mv ./RPCS3*.AppImage rpcs3-${COMM_TAG}-${COMM_COUNT}-${TRAVIS_COMMIT:0:8}_linux64.AppImage
|
|
|
|
|
2019-09-16 01:24:06 +00:00
|
|
|
FILESIZE=($(stat -c %s ./rpcs3*.AppImage))
|
2018-12-31 00:41:02 +00:00
|
|
|
SHA256SUM=($(sha256sum ./rpcs3*.AppImage))
|
|
|
|
|
|
|
|
unset TRAVIS_REPO_SLUG
|
|
|
|
REPO_SLUG=RPCS3/rpcs3-binaries-linux \
|
2019-09-16 01:24:06 +00:00
|
|
|
UPLOADTOOL_BODY="$SHA256SUM;${FILESIZE}B"\
|
2018-12-31 00:41:02 +00:00
|
|
|
RELEASE_NAME=build-${TRAVIS_COMMIT}\
|
|
|
|
RELEASE_TITLE=${COMM_TAG}-${COMM_COUNT}\
|
|
|
|
REPO_COMMIT=d812f1254a1157c80fd402f94446310560f54e5f\
|
|
|
|
bash upload.sh rpcs3*.AppImage
|
2018-07-16 01:12:43 +00:00
|
|
|
fi
|
|
|
|
if [ "$DEPLOY_PPA" = "true" ]; then
|
|
|
|
export DEBFULLNAME="RPCS3 Build Bot"
|
|
|
|
fi
|