Преглед на файлове

Update run script to work with macOS Steam

ghorsington преди 4 години
родител
ревизия
580b09e1a9
променени са 1 файла, в които са добавени 7 реда и са изтрити 1 реда
  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}"`;