2020-12-29 23:00:29 +04:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
2020-12-30 00:45:36 +04:00
|
|
|
BUILDBIN=/yuzu/build/bin
|
2020-12-29 23:00:29 +04:00
|
|
|
BINFILE=yuzu-x86_64.AppImage
|
|
|
|
LOG_FILE=$HOME/curl.log
|
|
|
|
BRANCH=`echo ${GITHUB_REF##*/}`
|
2021-07-11 03:18:34 +04:00
|
|
|
export CC=${GCC_BINARY}
|
|
|
|
export CXX=${GXX_BINARY}
|
2020-12-29 23:00:29 +04:00
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
curl -sLO "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
|
|
|
curl -sLO "https://github.com/$GITHUB_REPOSITORY/raw/$BRANCH/.github/workflows/update.tar.gz"
|
2022-05-30 17:55:06 +04:00
|
|
|
curl -sL https://github.com$(curl https://github.com/probonopd/go-appimage/releases | grep "mkappimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) -o mkappimage.AppImage
|
2020-12-29 23:00:29 +04:00
|
|
|
tar -xzf update.tar.gz
|
|
|
|
chmod a+x linuxdeployqt*.AppImage
|
2022-05-30 17:55:06 +04:00
|
|
|
chmod a+x mkappimage.AppImage
|
2020-12-29 23:00:29 +04:00
|
|
|
./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract
|
|
|
|
cd $HOME
|
|
|
|
mkdir -p squashfs-root/usr/bin
|
|
|
|
cp -P "$BUILDBIN"/yuzu $HOME/squashfs-root/usr/bin/
|
|
|
|
|
|
|
|
curl -sL https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$BRANCH/dist/yuzu.svg -o ./squashfs-root/yuzu.svg
|
|
|
|
curl -sL https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$BRANCH/dist/yuzu.desktop -o ./squashfs-root/yuzu.desktop
|
|
|
|
curl -sL https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64 -o ./squashfs-root/runtime
|
|
|
|
mkdir -p squashfs-root/usr/share/applications && cp ./squashfs-root/yuzu.desktop ./squashfs-root/usr/share/applications
|
|
|
|
mkdir -p squashfs-root/usr/share/icons && cp ./squashfs-root/yuzu.svg ./squashfs-root/usr/share/icons
|
|
|
|
mkdir -p squashfs-root/usr/share/icons/hicolor/scalable/apps && cp ./squashfs-root/yuzu.svg ./squashfs-root/usr/share/icons/hicolor/scalable/apps
|
|
|
|
mkdir -p squashfs-root/usr/share/pixmaps && cp ./squashfs-root/yuzu.svg ./squashfs-root/usr/share/pixmaps
|
|
|
|
curl -sL "https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$BRANCH/.github/workflows/update.sh" -o $HOME/squashfs-root/update.sh
|
|
|
|
chmod a+x ./squashfs-root/runtime
|
|
|
|
chmod a+x ./squashfs-root/update.sh
|
|
|
|
|
2021-02-03 02:21:01 +04:00
|
|
|
version=$(cat /yuzu/README.md | grep -o 'early-access [[:digit:]]*' | cut -c 14-17)
|
|
|
|
echo EA-$version > $HOME/squashfs-root/version.txt
|
2020-12-29 23:00:29 +04:00
|
|
|
|
|
|
|
unset QT_PLUGIN_PATH
|
|
|
|
unset LD_LIBRARY_PATH
|
|
|
|
unset QTDIR
|
|
|
|
|
2020-12-30 03:08:29 +04:00
|
|
|
mkdir $HOME/artifacts/
|
|
|
|
mkdir -p /yuzu/artifacts/version
|
|
|
|
# Version AppImage
|
2021-07-11 03:18:34 +04:00
|
|
|
mkdir -p squashfs-root/usr/optional/{libstdc++,libgcc_s}
|
2021-10-26 07:19:05 +04:00
|
|
|
mkdir -p squashfs-root/usr/lib
|
2021-07-11 03:18:34 +04:00
|
|
|
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./squashfs-root/usr/optional/libstdc++/
|
2022-07-19 02:55:36 +04:00
|
|
|
cp /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 ./squashfs-root/usr/optional/libgcc_s/
|
2021-10-26 07:19:05 +04:00
|
|
|
cp /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 ./squashfs-root/usr/lib
|
2021-07-30 02:13:10 +04:00
|
|
|
curl -sSfL https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/AppRun-patched-x86_64 -o ./squashfs-root/AppRun.wrapped
|
|
|
|
# create AppRun
|
|
|
|
cat << 'EOF' > $HOME/squashfs-root/AppRun
|
|
|
|
#! /usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
this_dir="$(readlink -f "$(dirname "$0")")"
|
|
|
|
#GDK_PIXBUF
|
|
|
|
export GDK_PIXBUF_MODULEDIR=$(pkg-config --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0)
|
|
|
|
export GDK_PIXBUF_MODULE_FILE=$(pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0)
|
|
|
|
exec "$this_dir"/AppRun.wrapped "$@"
|
|
|
|
EOF
|
|
|
|
chmod a+x ./squashfs-root/{AppRun,AppRun.wrapped}
|
2021-07-11 03:18:34 +04:00
|
|
|
curl -sSfL https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/exec-x86_64.so -o ./squashfs-root/usr/optional/exec.so
|
|
|
|
printf "#include <sstream>\n#include <exception>\n#include <memory_resource>\nint main(){auto x = std::stringbuf();x.get_allocator();std::make_exception_ptr(0);std::pmr::get_default_resource();}" \
|
|
|
|
| $CXX -x c++ -std=c++2a -o ./squashfs-root/usr/optional/checker -
|
|
|
|
# Build AppDir
|
2020-12-29 23:00:29 +04:00
|
|
|
/tmp/squashfs-root/AppRun $HOME/squashfs-root/usr/bin/yuzu -unsupported-allow-new-glibc -no-copy-copyright-files -no-translations -bundle-non-qt-libs
|
|
|
|
export PATH=$(readlink -f /tmp/squashfs-root/usr/bin/):$PATH
|
2021-01-01 02:20:36 +04:00
|
|
|
mkdir $HOME/squashfs-root/usr/plugins/platformthemes/
|
2021-07-11 03:18:34 +04:00
|
|
|
cp /opt/qt515/plugins/platformthemes/libqgtk3.so $HOME/squashfs-root/usr/plugins/platformthemes/
|
2022-05-30 17:55:06 +04:00
|
|
|
rm $HOME/squashfs-root/usr/lib/libglib-2.0.so.0
|
|
|
|
VERSION=pineapple /tmp/mkappimage.AppImage --appimage-extract-and-run $HOME/squashfs-root
|
|
|
|
mv ./yuzu-pineapple-x86_64.AppImage /yuzu/artifacts/version/Yuzu-EA-$version.AppImage
|
2020-12-30 03:08:29 +04:00
|
|
|
|
|
|
|
# Continuous AppImage
|
2021-07-30 02:13:10 +04:00
|
|
|
mv $HOME/squashfs-root/AppRun.wrapped ./squashfs-root/AppRun-patched
|
|
|
|
rm $HOME/squashfs-root/AppRun
|
2020-12-30 03:08:29 +04:00
|
|
|
curl -sL "https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$BRANCH/.github/workflows/AppRun" -o $HOME/squashfs-root/AppRun
|
|
|
|
chmod a+x ./squashfs-root/AppRun
|
2020-12-29 23:00:29 +04:00
|
|
|
mv /tmp/update/AppImageUpdate $HOME/squashfs-root/usr/bin/
|
|
|
|
mv /tmp/update/* $HOME/squashfs-root/usr/lib/
|
2020-12-30 03:44:52 +04:00
|
|
|
/tmp/squashfs-root/usr/bin/appimagetool $HOME/squashfs-root -u "gh-releases-zsync|pineappleEA|pineapple-src|continuous|yuzu-x86_64.AppImage.zsync"
|
2022-05-31 18:49:29 +04:00
|
|
|
# mv yuzu-x86_64.AppImage old.AppImage
|
|
|
|
#VERSION=pineapple /tmp/mkappimage.AppImage --appimage-extract-and-run $HOME/squashfs-root -u "gh-releases-zsync|pineappleEA|pineapple-src|continuous|yuzu-x86_64.AppImage.zsync"
|
2020-12-29 23:00:29 +04:00
|
|
|
|
2022-05-31 18:49:29 +04:00
|
|
|
#mv yuzu-pineapple-x86_64.AppImage yuzu-x86_64.AppImage
|
2020-12-29 23:00:29 +04:00
|
|
|
mv yuzu-x86_64.AppImage* /yuzu/artifacts
|
2020-12-30 03:08:29 +04:00
|
|
|
|
2020-12-29 23:00:29 +04:00
|
|
|
cp -R $HOME/artifacts/ /yuzu/
|
2021-02-11 21:54:21 +04:00
|
|
|
#cp "$BUILDBIN"/yuzu /yuzu/artifacts/version/
|
2020-12-29 23:00:29 +04:00
|
|
|
chmod -R 777 /yuzu/artifacts
|
|
|
|
cd /yuzu/artifacts
|
|
|
|
ls -al /yuzu/artifacts/
|
|
|
|
ls -al /yuzu/artifacts/version
|