Skip to content

Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit

Prevent non-game helper processes from appearing in the Dock

NotProtonNotae308be3432c
diff --git a/steam-shim/Makefile.in b/steam-shim/Makefile.in
index f18827d..31a8b1d 100644
--- a/steam-shim/Makefile.in
+++ b/steam-shim/Makefile.in
@@ -2,7 +2,7 @@ MODULE = steam.exe
# CXX_PE_LIBS is Wine's own PE libc++, libc++abi, libunwind, msvcp140 and vcruntime140.
# mingw's libstdc++ mismatches these and leaves std::basic_string and
# _Unwind_SjLj_Resume undefined. dlls/dmsynth imports the same way.
-IMPORTS = $(CXX_PE_LIBS) user32 advapi32 shlwapi shell32 msi ole32
+IMPORTS = $(CXX_PE_LIBS) user32 advapi32 shlwapi shell32 msi
EXTRADLLFLAGS = -mwindows -mcygwin -static-libgcc
# __WINESRC__ is re-added because WINE_EXTERNAL drops it, and ERR() and ARRAY_SIZE()
diff --git a/steam-shim/build.sh b/steam-shim/build.sh
index 2187bfa..aaf05ce 100755
--- a/steam-shim/build.sh
+++ b/steam-shim/build.sh
@@ -79,6 +79,10 @@ set -- $("$here/../bridge/pe-info.py" "$out")
# The shim statically links jsoncpp and weighs ~14 MB. Anything near zero means
# the link dropped objects.
[ "$size" -gt 1000000 ] || { echo "==> only $size bytes, the link dropped objects"; exit 1; }
+if grep -qa 'ole32\.dll' "$out"; then
+ echo "==> the shim imports ole32, so a helper run would show up in the Dock"
+ exit 1
+fi
echo "==> built $out $1 $size bytes $2 (timestamp and checksum zeroed)"
[ "$install" -eq 1 ] || { echo "==> not installing, pass --install to deploy"; exit 0; }
diff --git a/steam-shim/steam.cpp b/steam-shim/steam.cpp
index 3e79005..e5033a5 100644
--- a/steam-shim/steam.cpp
+++ b/steam-shim/steam.cpp
@@ -1338,8 +1338,6 @@ static HANDLE run_process(BOOL *should_await, BOOL game_process)
dos = wine_get_dos_file_name(scratchA);
- CoInitialize(NULL);
-
console = SHGetFileInfoW(dos, 0, &sfi, sizeof(sfi), SHGFI_EXETYPE);
if (console)
{