diff options
| author | qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> | 2022-07-05 18:10:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-05 21:10:14 -0400 |
| commit | fd0fb25de18ee327caab2f975468cc80c5f23384 (patch) | |
| tree | 95586ee335e7e49d1d65bf88c0e94202489c2c1c /appimage | |
| parent | a2d64864dd581e4b72ea4d9911040db923541491 (diff) | |
[CI] Create an Appimage for 64bit builds (#570)
* [CI] Create AppImage file
* [CI] Updated Jenkinsfile
* [MISC] fix indentation
* [MISC] Fix indentation
* [MISC] Fix indentation
* [CI] 7z appimage and readme
Diffstat (limited to 'appimage')
| -rwxr-xr-x | appimage/appimage.sh | 37 | ||||
| -rw-r--r-- | appimage/soh.desktop | 9 | ||||
| -rw-r--r-- | appimage/soh.sh | 41 |
3 files changed, 87 insertions, 0 deletions
diff --git a/appimage/appimage.sh b/appimage/appimage.sh new file mode 100755 index 000000000..42c54576a --- /dev/null +++ b/appimage/appimage.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" +chmod a+x linuxdeploy*.AppImage +curl -sSfLO "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" +chmod a+x appimagetool*.AppImage + +mkdir -p AppDir/usr/bin +cp appimage/{soh.desktop,soh.png,soh.sh} AppDir/ +curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o AppDir/usr/bin/gamecontrollerdb.txt + +mkdir -p AppDir/usr/share/applications +mkdir -p AppDir/usr/share/icons/hicolor/scalable/apps +mkdir -p AppDir/usr/lib + +mv AppDir/soh.sh AppDir/usr/bin +cp -r build/* AppDir/usr/bin + +chmod +x AppDir/usr/bin/{soh.elf,OTRGui,soh.sh} + +cd AppDir && ln -s ./usr/bin/soh.sh ./AppRun && cd .. + +export UPD_INFO="gh-releases-zsync|HarbourMasters|Shipwright-linux|zelda64|SOH-Linux.AppImage.zsync" +./linuxdeploy-x86_64.AppImage --appimage-extract-and-run \ + --appdir=./AppDir/ \ + -d ./AppDir/soh.desktop \ + -i ./AppDir/soh.png \ + -e ./AppDir/usr/bin/soh.elf \ + -e ./AppDir/usr/bin/assets/extractor/ZAPD.out + +mv ./AppDir/usr/bin/ZAPD.out ./AppDir/usr/bin/assets/extractor/ZAPD.out +cd ./AppDir/usr/bin/assets/extractor/ +patchelf --set-rpath "\$ORIGIN/../../../lib" ZAPD.out +cd /soh + +./appimagetool-x86_64.AppImage --appimage-extract-and-run ./AppDir "SOH-Linux.AppImage" -u "gh-releases-zsync|HarbourMasters|Shipwright-linux|zelda64|SOH-Linux.AppImage.zsync" + diff --git a/appimage/soh.desktop b/appimage/soh.desktop new file mode 100644 index 000000000..a637d03c3 --- /dev/null +++ b/appimage/soh.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=SOH +Exec=AppRun +Terminal=false +Icon=soh +Type=Application +Categories=Game; +Name[en_US]= diff --git a/appimage/soh.sh b/appimage/soh.sh new file mode 100644 index 000000000..29a7841c4 --- /dev/null +++ b/appimage/soh.sh @@ -0,0 +1,41 @@ +#!/bin/bash +HERE="$(dirname "$(readlink -f "${0}")")"/../.. + +export PATH=$HERE/bin:$HERE/usr/bin:$PATH + +while [[ ! -e $PWD/oot.otr ]]; do + export ASSETDIR=$(mktemp -d /tmp/assets-XXXXX) + ln -s $HERE/usr/bin/{assets,soh.elf,OTRGui} $ASSETDIR + export OLDPWD=$PWD + mkdir -p $ASSETDIR/tmp + mkdir -p $ASSETDIR/Extract/assets + if [ -e $PWD/*.*64 ]; then + ln -s $OLDPWD/*.*64 $ASSETDIR/tmp/rom.z64 + cp -r $ASSETDIR/assets/game/ship_of_harkinian $ASSETDIR/Extract/assets/ + cd $ASSETDIR + case $(sha1sum -b $ASSETDIR/tmp/rom.z64 | awk '{ print $1 }') in + cee6bc3c2a634b41728f2af8da54d9bf8cc14099) + ROM=GC_NMQ_D;; + 0227d7c0074f2d0ac935631990da8ec5914597b4) + ROM=GC_NMQ_PAL_F;; + *) + echo -e "\nrom hash does not match\n" + exit;; + esac + echo "Processing..." + assets/extractor/ZAPD.out ed -eh -i assets/extractor/xmls/${ROM} -b tmp/rom.z64 -fl assets/extractor/filelists -o placeholder -osf placeholder -gsf 1 -rconf assets/extractor/Config_${ROM}.xml -se OTR > /dev/null 2>&1 + cp "$ASSETDIR"/oot.otr $OLDPWD + echo "Restart $APPIMAGE to play!" + sleep 3 + rm -r "$ASSETDIR" + break + else + echo -e "\nPlace ROM in this folder\n" + exit + fi +done + cd $OWD + ln -s "$HERE/usr/bin/gamecontrollerdb.txt" $PWD + "$HERE/usr/bin/soh.elf" + unlink $PWD/gamecontrollerdb.txt +exit |
