BepInEx
BepInEx copied to clipboard
run_bepinex.sh doesn't properly search for executable that varies in name from the game title
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
- Install TSP:UD on macOS via steam.
- Download BepInEx and extract it.
- Copy TSPUD.app from the steam directory to BepInEx's root directory.
- Edit the shell script to contain
executable_name="TSPUD.app" -
chmod +x run_bepinex.sh -
./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