Skip to content

Commit 38c7d66

Browse files
[BUILD] Do not strip ZAPD (void-linux#598)
* [BUILD] Do not strip ZAPD * [BUILD] Reuse Icon Asset * [APPIMAGE] Handle paths with spaces
1 parent e8bfa61 commit 38c7d66

3 files changed

Lines changed: 24 additions & 27 deletions

File tree

appimage/appimage.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ curl -sSfLO "https://github.com/AppImage/AppImageKit/releases/download/continuou
66
chmod a+x appimagetool*.AppImage
77

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

1213
mkdir -p AppDir/usr/share/applications
@@ -20,18 +21,14 @@ chmod +x AppDir/usr/bin/{soh.elf,OTRGui,soh.sh}
2021

2122
cd AppDir && ln -s ./usr/bin/soh.sh ./AppRun && cd ..
2223

23-
export UPD_INFO="gh-releases-zsync|HarbourMasters|Shipwright-linux|zelda64|SOH-Linux.AppImage.zsync"
24+
export UPD_INFO="gh-releases-zsync|HarbourMasters|Shipwright-linux|develop|SOH-Linux.AppImage.zsync"
2425
./linuxdeploy-x86_64.AppImage --appimage-extract-and-run \
2526
--appdir=./AppDir/ \
2627
-d ./AppDir/soh.desktop \
2728
-i ./AppDir/soh.png \
28-
-e ./AppDir/usr/bin/soh.elf \
29-
-e ./AppDir/usr/bin/assets/extractor/ZAPD.out
30-
31-
mv ./AppDir/usr/bin/ZAPD.out ./AppDir/usr/bin/assets/extractor/ZAPD.out
32-
cd ./AppDir/usr/bin/assets/extractor/
33-
patchelf --set-rpath "\$ORIGIN/../../../lib" ZAPD.out
29+
-e ./AppDir/usr/bin/soh.elf
30+
3431
cd /soh
3532

36-
./appimagetool-x86_64.AppImage --appimage-extract-and-run ./AppDir "SOH-Linux.AppImage" -u "gh-releases-zsync|HarbourMasters|Shipwright-linux|zelda64|SOH-Linux.AppImage.zsync"
33+
./appimagetool-x86_64.AppImage --appimage-extract-and-run ./AppDir "SOH-Linux.AppImage"
3734

appimage/soh.png

-12.8 MB
Binary file not shown.

appimage/soh.sh

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/bin/bash
22
HERE="$(dirname "$(readlink -f "${0}")")"/../..
33

4-
export PATH=$HERE/bin:$HERE/usr/bin:$PATH
4+
export PATH="$HERE"/bin:"$HERE"/usr/bin:"$PATH"
55

6-
while [[ ! -e $PWD/oot.otr ]]; do
7-
export ASSETDIR=$(mktemp -d /tmp/assets-XXXXX)
8-
ln -s $HERE/usr/bin/{assets,soh.elf,OTRGui} $ASSETDIR
9-
export OLDPWD=$PWD
10-
mkdir -p $ASSETDIR/tmp
11-
mkdir -p $ASSETDIR/Extract/assets
12-
if [ -e $PWD/*.*64 ]; then
13-
ln -s $OLDPWD/*.*64 $ASSETDIR/tmp/rom.z64
14-
cp -r $ASSETDIR/assets/game/ship_of_harkinian $ASSETDIR/Extract/assets/
15-
cd $ASSETDIR
16-
case $(sha1sum -b $ASSETDIR/tmp/rom.z64 | awk '{ print $1 }') in
6+
while [[ ! -e "$PWD"/oot.otr ]]; do
7+
export ASSETDIR="$(mktemp -d /tmp/assets-XXXXX)"
8+
ln -s "$HERE"/usr/bin/{assets,soh.elf,OTRGui} "$ASSETDIR"
9+
export OLDPWD="$PWD"
10+
mkdir -p "$ASSETDIR"/tmp
11+
mkdir -p "$ASSETDIR"/Extract/assets
12+
if [ -e "$PWD"/*.*64 ]; then
13+
ln -s "$OLDPWD"/*.*64 "$ASSETDIR"/tmp/rom.z64
14+
cp -r "$ASSETDIR"/assets/game/ship_of_harkinian "$ASSETDIR"/Extract/assets/
15+
cd "$ASSETDIR"
16+
case $(sha1sum -b "$ASSETDIR"/tmp/rom.z64 | awk '{ print $1 }') in
1717
cee6bc3c2a634b41728f2af8da54d9bf8cc14099)
1818
ROM=GC_NMQ_D;;
1919
0227d7c0074f2d0ac935631990da8ec5914597b4)
@@ -23,8 +23,8 @@ while [[ ! -e $PWD/oot.otr ]]; do
2323
exit;;
2424
esac
2525
echo "Processing..."
26-
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
27-
cp "$ASSETDIR"/oot.otr $OLDPWD
26+
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
27+
cp "$ASSETDIR"/oot.otr "$OLDPWD"
2828
echo "Restart $APPIMAGE to play!"
2929
sleep 3
3030
rm -r "$ASSETDIR"
@@ -34,8 +34,8 @@ while [[ ! -e $PWD/oot.otr ]]; do
3434
exit
3535
fi
3636
done
37-
cd $OWD
38-
ln -s "$HERE/usr/bin/gamecontrollerdb.txt" $PWD
39-
"$HERE/usr/bin/soh.elf"
40-
unlink $PWD/gamecontrollerdb.txt
37+
cd "$OWD"
38+
ln -s "$HERE"/usr/bin/gamecontrollerdb.txt "$PWD"
39+
"$HERE"/usr/bin/soh.elf
40+
unlink "$PWD"/gamecontrollerdb.txt
4141
exit

0 commit comments

Comments
 (0)