Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUILD] Do not strip ZAPD #598

Merged
merged 3 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions appimage/appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ curl -sSfLO "https://github.com/AppImage/AppImageKit/releases/download/continuou
chmod a+x appimagetool*.AppImage

mkdir -p AppDir/usr/bin
cp appimage/{soh.desktop,soh.png,soh.sh} AppDir/
cp appimage/{soh.desktop,soh.sh} AppDir/
cp soh/macosx/sohIcon.png AppDir/soh.png
curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o AppDir/usr/bin/gamecontrollerdb.txt

mkdir -p AppDir/usr/share/applications
Expand All @@ -20,18 +21,14 @@ 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"
export UPD_INFO="gh-releases-zsync|HarbourMasters|Shipwright-linux|develop|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
-e ./AppDir/usr/bin/soh.elf

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"
./appimagetool-x86_64.AppImage --appimage-extract-and-run ./AppDir "SOH-Linux.AppImage"

Binary file removed appimage/soh.png
Binary file not shown.
36 changes: 18 additions & 18 deletions appimage/soh.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"/../..

export PATH=$HERE/bin:$HERE/usr/bin:$PATH
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
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)
Expand All @@ -23,8 +23,8 @@ while [[ ! -e $PWD/oot.otr ]]; do
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
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"
Expand All @@ -34,8 +34,8 @@ while [[ ! -e $PWD/oot.otr ]]; do
exit
fi
done
cd $OWD
ln -s "$HERE/usr/bin/gamecontrollerdb.txt" $PWD
"$HERE/usr/bin/soh.elf"
unlink $PWD/gamecontrollerdb.txt
cd "$OWD"
ln -s "$HERE"/usr/bin/gamecontrollerdb.txt "$PWD"
"$HERE"/usr/bin/soh.elf
unlink "$PWD"/gamecontrollerdb.txt
exit