|
| 1 | +#!/bin/bash -ex |
| 2 | + |
| 3 | +branch=`echo ${GITHUB_REF##*/}` |
| 4 | + |
| 5 | +BUILDBIN=/dolphin/dolphin/build/Binaries |
| 6 | +BINFILE=dolphin-emu-x86_64.AppImage |
| 7 | +LOG_FILE=$HOME/curl.log |
| 8 | +CXX=g++-9 |
| 9 | + |
| 10 | +# QT 5.14.2 |
| 11 | +# source /opt/qt514/bin/qt514-env.sh |
| 12 | +QT_BASE_DIR=/opt/qt514 |
| 13 | +export QTDIR=$QT_BASE_DIR |
| 14 | +export PATH=$QT_BASE_DIR/bin:$PATH |
| 15 | +export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH |
| 16 | +export PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH |
| 17 | + |
| 18 | +cd /tmp |
| 19 | + curl -sLO "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" |
| 20 | + curl -sLO "https://github.com/AppImage/AppImageUpdate/releases/download/continuous/AppImageUpdate-x86_64.AppImage" |
| 21 | + chmod a+x AppImageUpdate-x86_64.AppImage |
| 22 | + chmod a+x linuxdeployqt*.AppImage |
| 23 | +./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract |
| 24 | +cd $HOME |
| 25 | +mkdir -p squashfs-root/usr/bin |
| 26 | +cp -P "$BUILDBIN"/dolphin-emu $HOME/squashfs-root/usr/bin/ |
| 27 | + |
| 28 | +curl -sL https://raw.githubusercontent.com/qurious-pixel/dolphin/$branch/Data/dolphin-emu.svg -o ./squashfs-root/dolphin-emu.svg |
| 29 | +curl -sL https://raw.githubusercontent.com/qurious-pixel/dolphin/$branch/Data/dolphin-emu.desktop -o ./squashfs-root/dolphin-emu.desktop |
| 30 | +curl -sL https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64 -o ./squashfs-root/runtime |
| 31 | +mkdir -p squashfs-root/usr/share/applications && cp ./squashfs-root/dolphin-emu.desktop ./squashfs-root/usr/share/applications |
| 32 | +mkdir -p squashfs-root/usr/share/icons && cp ./squashfs-root/dolphin-emu.svg ./squashfs-root/usr/share/icons |
| 33 | +mkdir -p squashfs-root/usr/share/icons/hicolor/scalable/apps && cp ./squashfs-root/dolphin-emu.svg ./squashfs-root/usr/share/icons/hicolor/scalable/apps |
| 34 | +mkdir -p squashfs-root/usr/share/pixmaps && cp ./squashfs-root/dolphin-emu.svg ./squashfs-root/usr/share/pixmaps |
| 35 | +mkdir -p squashfs-root/usr/optional/ ; mkdir -p squashfs-root/usr/optional/libstdc++/ |
| 36 | + |
| 37 | +mkdir -p squashfs-root/usr/share/dolphin-emu |
| 38 | +cp -R /dolphin/dolphin/Data/Sys ./squashfs-root/usr/bin |
| 39 | +curl -sL "https://raw.githubusercontent.com/qurious-pixel/dolphin/$branch/travis/appimage/update.sh" -o $HOME/squashfs-root/update.sh |
| 40 | +curl -sL "https://raw.githubusercontent.com/qurious-pixel/dolphin/$branch/travis/appimage/AppRun" -o $HOME/squashfs-root/AppRun |
| 41 | +curl -sL "https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/AppRun-patched-x86_64" -o $HOME/squashfs-root/AppRun-patched |
| 42 | +curl -sL "https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/exec-x86_64.so" -o $HOME/squashfs-root/usr/optional/exec.so |
| 43 | +chmod a+x ./squashfs-root/AppRun |
| 44 | +chmod a+x ./squashfs-root/runtime |
| 45 | +chmod a+x ./squashfs-root/AppRun-patched |
| 46 | +chmod a+x ./squashfs-root/update.sh |
| 47 | +#cp /tmp/libssl.so.47 /tmp/libcrypto.so.45 /usr/lib/x86_64-linux-gnu/ |
| 48 | +cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 squashfs-root/usr/optional/libstdc++/ |
| 49 | +printf "#include <bits/stdc++.h>\nint main(){std::make_exception_ptr(0);std::pmr::get_default_resource();}" | $CXX -x c++ -std=c++2a -o $HOME/squashfs-root/usr/optional/checker - |
| 50 | + |
| 51 | +echo $DOLPHINVER > $HOME/squashfs-root/version.txt |
| 52 | +cp $HOME/squashfs-root/version.txt /dolphin |
| 53 | + |
| 54 | +unset QT_PLUGIN_PATH |
| 55 | +unset LD_LIBRARY_PATH |
| 56 | +unset QTDIR |
| 57 | + |
| 58 | +# /tmp/squashfs-root/AppRun $HOME/squashfs-root/usr/bin/dolphin-emu -appimage -unsupported-allow-new-glibc -no-copy-copyright-files -no-translations -bundle-non-qt-libs |
| 59 | +/tmp/squashfs-root/AppRun $HOME/squashfs-root/usr/bin/dolphin-emu -unsupported-allow-new-glibc -no-copy-copyright-files -no-translations -bundle-non-qt-libs |
| 60 | +export PATH=$(readlink -f /tmp/squashfs-root/usr/bin/):$PATH |
| 61 | + |
| 62 | +# Add AppImageUpdate as the internal updater |
| 63 | +mv /tmp/AppImageUpdate-x86_64.AppImage $HOME/squashfs-root/usr/bin/AppImageUpdate |
| 64 | + |
| 65 | +# Add dialog as the fallback |
| 66 | +cp /usr/bin/dialog ./squashfs-root/usr/bin/ |
| 67 | +cp /lib/x86_64-linux-gnu/libncursesw.so.5 $HOME/squashfs-root/usr/lib/ |
| 68 | +cp /lib/x86_64-linux-gnu/libtinfo.so.5 $HOME/squashfs-root/usr/lib/ |
| 69 | + |
| 70 | +# Copy libOpenGL deps |
| 71 | +cp /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 $HOME/squashfs-root/usr/lib/ |
| 72 | + |
| 73 | +# Package AppImage |
| 74 | +/tmp/squashfs-root/usr/bin/appimagetool $HOME/squashfs-root -u "gh-releases-zsync|qurious-pixel|dolphin|continuous|Dolphin_Emulator-x86_64.AppImage.zsync" |
| 75 | + |
| 76 | +mkdir $HOME/artifacts/ |
| 77 | +mkdir -p /dolphin/artifacts/ |
| 78 | +mv Dolphin_Emulator-x86_64.AppImage* $HOME/artifacts |
| 79 | +cp -R $HOME/artifacts/ /dolphin/ |
| 80 | +cp $BUILDBIN/dolphin-emu /dolphin/artifacts |
| 81 | +chmod -R 777 /dolphin/artifacts |
| 82 | +cd /dolphin/artifacts |
| 83 | +ls -al /dolphin/artifacts/ |
| 84 | +#curl --upload-file Dolphin_Emulator-x86_64.AppImage https://transfersh.com/Dolphin_Emulator-x86_64.AppImage |
0 commit comments