Add error when using *nix build with Windows executable

Originally commit 8c7dcf265c

Co-authored-by: ghorsington <neigh@coder.horse>
This commit is contained in:
aldelaro5andghorsington authored and js6pak committed 2024-09-17 18:50:35 +02:00
1 parent b891cecab9
commit a5b7dabc1d
2 files changed
+12

No files matched your search

@@ -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"
;;
@@ -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"
;;