BepInEx icon indicating copy to clipboard operation
BepInEx copied to clipboard

run_bepinex.sh doesn't properly search for executable that varies in name from the game title

Open emctague opened this issue 3 years ago • 0 comments

What happened?

Trying to use run_bepinex.sh with a copy of The Stanley Parable: Ultra Deluxe on macOS, BepInEx searches for the wrong filename - it tries to use the full title, whereas the actual executable lacks the colon in its name, with Unity substituting it with an underscore for compatibility. It seems, however, that the CFBundleExecutable property BepInEx relies on to find the executable isn't sanitized properly and doesn't match up with the real executable filename, so this script should run some additional sanitization.

Steps to reproduce

  1. Install TSP:UD on macOS via steam.
  2. Download BepInEx and extract it.
  3. Copy TSPUD.app from the steam directory to BepInEx's root directory.
  4. Edit the shell script to contain executable_name="TSPUD.app"
  5. chmod +x run_bepinex.sh
  6. ./run_bepinex.sh

BepInEx Distribution

Stable from GitHub

Log outputs

/Users/t/Downloads/BepInEx_unix_5/TSPUD.app/Contents/MacOS/The Stanley Parable: Ultra Deluxe
Cannot identify executable type (got cannot open `/Users/t/Downloads/BepInEx_unix_5/TSPUD.app/Contents/MacOS/The Stanley Parable: Ultra Deluxe' (No such file or directory))!

Environment

- OS: MacOS 12.3.1
- BepInEx: 5.4.19
- Game: The Stanley Parable: Ultra Deluxe

emctague avatar May 10 '22 15:05 emctague