From a5b7dabc1d8d18489d2835cbc25d888ac421268b Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Sun, 15 Sep 2024 18:31:17 -0400 Subject: [PATCH] Add error when using *nix build with Windows executable Originally commit 8c7dcf265c5bf52800fa356fd3403a4dcadb82f3 Co-authored-by: ghorsington --- Runtimes/Unity/Doorstop/run_bepinex_il2cpp.sh | 6 ++++++ Runtimes/Unity/Doorstop/run_bepinex_mono.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Runtimes/Unity/Doorstop/run_bepinex_il2cpp.sh b/Runtimes/Unity/Doorstop/run_bepinex_il2cpp.sh index e947ee4..86ef48c 100644 --- a/Runtimes/Unity/Doorstop/run_bepinex_il2cpp.sh +++ b/Runtimes/Unity/Doorstop/run_bepinex_il2cpp.sh @@ -183,6 +183,12 @@ echo "${executable_path}" # Figure out the arch of the executable with file file_out="$(LD_PRELOAD="" file -b "${executable_path}")" case "${file_out}" in + *PE32*) + echo "The executable is a Windows executable file. You must use Wine/Proton and BepInEx for Windows with this executable." + echo "Uninstall BepInEx for *nix and install BepInEx for Windows instead." + echo "More info: https://docs.bepinex.dev/articles/advanced/steam_interop.html#protonwine" + exit 1 + ;; *64-bit*) arch="x64" ;; diff --git a/Runtimes/Unity/Doorstop/run_bepinex_mono.sh b/Runtimes/Unity/Doorstop/run_bepinex_mono.sh index aaa7496..2f743c1 100644 --- a/Runtimes/Unity/Doorstop/run_bepinex_mono.sh +++ b/Runtimes/Unity/Doorstop/run_bepinex_mono.sh @@ -184,6 +184,12 @@ echo "${executable_path}" # Figure out the arch of the executable with file file_out="$(LD_PRELOAD="" file -b "${executable_path}")" case "${file_out}" in + *PE32*) + echo "The executable is a Windows executable file. You must use Wine/Proton and BepInEx for Windows with this executable." + echo "Uninstall BepInEx for *nix and install BepInEx for Windows instead." + echo "More info: https://docs.bepinex.dev/articles/advanced/steam_interop.html#protonwine" + exit 1 + ;; *64-bit*) arch="x64" ;;