mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-21 17:05:04 -05:00
udpate mac launch script to set SHIP_HOME (#2831)
This commit is contained in:
parent
f9cfcde627
commit
5f0f2731ee
1
.gitignore
vendored
1
.gitignore
vendored
@ -444,6 +444,7 @@ install_manifest.txt
|
|||||||
compile_commands.json
|
compile_commands.json
|
||||||
CTestTestfile.cmake
|
CTestTestfile.cmake
|
||||||
_deps
|
_deps
|
||||||
|
_packages
|
||||||
*/extract_assets_cmake*
|
*/extract_assets_cmake*
|
||||||
/build*
|
/build*
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SNAME="$(dirname $0)"
|
SNAME="$(dirname $0)"
|
||||||
export DATA_SHARE="$HOME/Library/Application Support/com.shipofharkinian.soh"
|
export SHIP_HOME="$HOME/Library/Application Support/com.shipofharkinian.soh"
|
||||||
export SNAME
|
export SNAME
|
||||||
export RESPATH="${SNAME%/MacOS*}/Resources"
|
export RESPATH="${SNAME%/MacOS*}/Resources"
|
||||||
export LIBPATH="${SNAME%/MacOS*}/Frameworks"
|
export LIBPATH="${SNAME%/MacOS*}/Frameworks"
|
||||||
export DYLD_FALLBACK_LIBRARY_PATH="$LIBPATH"
|
export DYLD_FALLBACK_LIBRARY_PATH="$LIBPATH"
|
||||||
|
|
||||||
if [ ! -e "$DATA_SHARE" ]; then mkdir "$DATA_SHARE"; fi
|
if [ ! -e "$SHIP_HOME" ]; then mkdir "$SHIP_HOME"; fi
|
||||||
|
|
||||||
# If either OTR doesn't exist kick off the OTR gen process
|
# If either OTR doesn't exist kick off the OTR gen process
|
||||||
if [ ! -e "$DATA_SHARE"/oot.otr ] || [ ! -e "$DATA_SHARE"/oot-mq.otr ]; then
|
if [ ! -e "$SHIP_HOME"/oot.otr ] || [ ! -e "$SHIP_HOME"/oot-mq.otr ]; then
|
||||||
|
|
||||||
# If no ROMs exist kick off the file selection prompts
|
# If no ROMs exist kick off the file selection prompts
|
||||||
while [ ! -e "$DATA_SHARE"/*.*64 ] && [ ! -e "$DATA_SHARE"/oot*.otr ]; do
|
while [ ! -e "$SHIP_HOME"/*.*64 ] && [ ! -e "$SHIP_HOME"/oot*.otr ]; do
|
||||||
|
|
||||||
SHOULD_PROMPT_FOR_ROM=1
|
SHOULD_PROMPT_FOR_ROM=1
|
||||||
while [ $SHOULD_PROMPT_FOR_ROM -eq 1 ]; do
|
while [ $SHOULD_PROMPT_FOR_ROM -eq 1 ]; do
|
||||||
@ -63,7 +63,7 @@ if [ ! -e "$DATA_SHARE"/oot.otr ] || [ ! -e "$DATA_SHARE"/oot-mq.otr ]; then
|
|||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cp "$DROPROM" "$DATA_SHARE"
|
cp "$DROPROM" "$SHIP_HOME"
|
||||||
|
|
||||||
# Ask user if they would also like to select the other variant (MQ/Vanilla)
|
# Ask user if they would also like to select the other variant (MQ/Vanilla)
|
||||||
if [ $ROM_TYPE -eq 0 ] && [[ -z "$UPLOAD_ANOTHER_RESULT" ]]; then
|
if [ $ROM_TYPE -eq 0 ] && [[ -z "$UPLOAD_ANOTHER_RESULT" ]]; then
|
||||||
@ -93,10 +93,10 @@ if [ ! -e "$DATA_SHARE"/oot.otr ] || [ ! -e "$DATA_SHARE"/oot-mq.otr ]; then
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# At this point we should now have 1 or more valid roms in $DATA_SHARE directory
|
# At this point we should now have 1 or more valid roms in $SHIP_HOME directory
|
||||||
|
|
||||||
# Prepare tmp dir
|
# Prepare tmp dir
|
||||||
for ROMPATH in "$DATA_SHARE"/*.*64
|
for ROMPATH in "$SHIP_HOME"/*.*64
|
||||||
do
|
do
|
||||||
ASSETDIR="$(mktemp -d /tmp/assets-XXXXX)"
|
ASSETDIR="$(mktemp -d /tmp/assets-XXXXX)"
|
||||||
export ASSETDIR
|
export ASSETDIR
|
||||||
@ -132,7 +132,7 @@ if [ ! -e "$DATA_SHARE"/oot.otr ] || [ ! -e "$DATA_SHARE"/oot-mq.otr ]; then
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Only generate OTR if we don't have on of this type yet
|
# Only generate OTR if we don't have on of this type yet
|
||||||
if [ -e "$DATA_SHARE"/"$OTRNAME" ]; then
|
if [ -e "$SHIP_HOME"/"$OTRNAME" ]; then
|
||||||
rm -r "$ASSETDIR"
|
rm -r "$ASSETDIR"
|
||||||
continue;
|
continue;
|
||||||
fi
|
fi
|
||||||
@ -141,12 +141,12 @@ if [ ! -e "$DATA_SHARE"/oot.otr ] || [ ! -e "$DATA_SHARE"/oot-mq.otr ]; then
|
|||||||
assets/extractor/ZAPD.out ed -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
|
assets/extractor/ZAPD.out ed -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
|
||||||
if [ -e "$ASSETDIR"/oot.otr ]; then
|
if [ -e "$ASSETDIR"/oot.otr ]; then
|
||||||
osascript -e 'display notification "OTR successfully generated" with title "Ship Of Harkinian"'
|
osascript -e 'display notification "OTR successfully generated" with title "Ship Of Harkinian"'
|
||||||
cp "$ASSETDIR"/oot.otr "$DATA_SHARE"/"$OTRNAME"
|
cp "$ASSETDIR"/oot.otr "$SHIP_HOME"/"$OTRNAME"
|
||||||
rm -r "$ASSETDIR"
|
rm -r "$ASSETDIR"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -e "$DATA_SHARE"/oot*.otr ]; then
|
if [ ! -e "$SHIP_HOME"/oot*.otr ]; then
|
||||||
osascript -e 'display notification "OTR failed to generate" with title "Ship Of Harkinian"'
|
osascript -e 'display notification "OTR failed to generate" with title "Ship Of Harkinian"'
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user