Skip to content

Commit 9a72892

Browse files
committed
run.sh: Add error and exit when Windows executable is detected
1 parent 627a3a5 commit 9a72892

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

assets/nix/run.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ executable_path=$(resolve_executable_path "${executable_path}")
192192
# Figure out the arch of the executable with file
193193
file_out="$(LD_PRELOAD="" file -b "${executable_path}")"
194194
case "${file_out}" in
195+
*PE32*)
196+
echo "The executable is a Windows executable file. You must use Wine/Proton and BepInEx for Windows with this executable." 1>&2
197+
echo "Uninstall BepInEx for *nix and install BepInEx for Windows instead." 1>&2
198+
echo "More info: https://docs.bepinex.dev/articles/advanced/steam_interop.html#protonwine" 1>&2
199+
exit 1
200+
;;
195201
*64-bit*)
196202
arch="x64"
197203
;;

0 commit comments

Comments
 (0)