Shipwright/soh/macosx/soh-macos.sh.in

25 lines
646 B
Bash
Executable File

#!/bin/bash
SNAME="$(dirname $0)"
export SHIP_HOME="$HOME/Library/Application Support/com.shipofharkinian.soh"
export SNAME
export RESPATH="${SNAME%/MacOS*}/Resources"
export LIBPATH="${SNAME%/MacOS*}/Frameworks"
export DYLD_FALLBACK_LIBRARY_PATH="$LIBPATH"
if [ ! -e "$SHIP_HOME" ]; then mkdir "$SHIP_HOME"; fi
if [ ! -e "$SHIP_HOME"/mods ]; then
mkdir -p "$SHIP_HOME"/mods
touch "$SHIP_HOME"/mods/custom_otr_files_go_here.txt
fi
arch_name="$(uname -m)"
launch_arch="arm64"
if [ "${arch_name}" = "x86_64" ] && [ "$(sysctl -in sysctl.proc_translated)" != "1" ]; then
launch_arch="x86_64"
fi
arch -${launch_arch} "$RESPATH"/soh-macos
exit