Forráskód Böngészése

Update run script to work with macOS Steam

ghorsington 4 éve
szülő
commit
580b09e1a9
1 módosított fájl, 7 hozzáadás és 1 törlés
  1. 7 1
      doorstop/run_bepinex.sh

+ 7 - 1
doorstop/run_bepinex.sh

@@ -51,8 +51,14 @@ case $os_type in
 esac
 
 # Special case: if there is an arg, use that as executable path
+# Linux: arg is path to the executable
+# MacOS: arg is path to the .app folder which we need to resolve to the exectuable
 if [ -n "$1" ]; then
-    executable_path=$1;
+    case $os_type in
+        Linux*)     executable_path=$1;;
+        Darwin*)    executable_name=`basename "$1" .app`;
+                    executable_path=$1/Contents/MacOS/$executable_name;;
+    esac
 fi
 
 executable_type=`file -b "${executable_path}"`;