From b885a15effe6fa476b5645a1c8f95fe51cd109c0 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Tue, 21 Jun 2011 16:32:52 -0400 Subject: [PATCH] Modified program to launch a Linux binary and wait for it (using the Linux API system() call) instead of just providing a simple popup --- README | 13 ++++--------- steamstub.c | 2 +- steamstub.exe | Bin 87503 -> 87483 bytes 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/README b/README index 880b320..a60e010 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Steam stub is a simple Windows program that pops up a dialog box and closes once you click 'Ok' on it. It is intended for Linux users running Steam under wine. +Steamproxy is a simple Windows program that executes a Linux program with the Linux system() library function, then exits after that program returns. It is intended for Linux users running Steam under wine. Why would you want such a simple program? Why would I write a Windows program for Linux users? Read on to find out! @@ -6,13 +6,8 @@ Here's the scenario: You're running Steam in wine. Steam is great; it lets you e Steam created a solution for that - you can launch non-Steam games from the Steam interface. You can't use all of the nifty Steam features, but you can at least let your friends know what you're doing. -But what if you play Steam on Linux, and you play Linux-native games like vegastrike? You can launch a Linux binary from Steam, but Steam can't track the fact that you're playing it. This is because wine doesn't know anything about Linux binaries. +But what if you play Steam on Linux, and you play Linux-native games like vegastrike? You can launch a Linux binary from Steam, but Steam can't track the fact that you're playing it. This is because wine doesn't know anything about Linux binaries (this isn't quite true - wine will happily execute a Linux binary, but it does a fork() and exec() and immediately forgets about it, which means the call returns immediately without blocking, so Steam would think the game had closed even though it's still running). -So, this is my hack to solve the problem: add a non-Steam game, like vegastrike, to Steam, then launch a small 'stub' program that Steam can recognize while you go off and play your Linux game. Then, you can come back and close the stub program when you finish with your Linux game. +So, this is my hack to solve the problem: add a non-Steam game, like vegastrike, to Steam, but instead of pointing at the binary directly, launch a small 'proxy' program that Steam can recognize that, in turn, launches your Linux game. -steamstub is a trivial Windows application written to solve exactly this problem. I've included the .exe in the repository because it is fairly small, and most people don't have the mingw32 compiler tools handy on their system. The md5sum for steamstub.exe is: - -2602faed31858d240d87feeb2293a374 - - -If you don't trust me (and really, it is good security practice not to trust random executable files you find on github), just install mingw32-gcc and use it to compile steamstub.c. +It's easy to compile; if you have make, gcc, glibc-devel and wine installed, you should have everything you need. Just run 'make'! diff --git a/steamstub.c b/steamstub.c index 9134295..eaa6a3c 100644 --- a/steamstub.c +++ b/steamstub.c @@ -16,7 +16,7 @@ make int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { - system("gedit"); + system(lpCmdLine); return 0; } diff --git a/steamstub.exe b/steamstub.exe index 0b650bceba16cfc47e6edfeb84b824fc9a03fe4a..331f84da138a6df888ee459707d9c62945985e7f 100755 GIT binary patch delta 1598 zcmYjReMsDO7=NDo`8(%w^KSP#Z98@1sik?2(Xx%`?GNAPbO@P9r{P$^Lfe9ZmUH({ zvKHEmr^3ZzHC&S#tZ`PWT<4%-^g^68|HjW`k4fA5HY~=1>qm<@vTlFn1YcCjvnfDhyVG$^`XMDcbxtG zXSYrM(R=3D?3K}_Dd+JjEz}NwrB49Ij$UBb#wuv*=r(#+Ju5PvfSvN3UEoF@OrrNH z*k4p+@X|6CS7z)xmvI_?I}Vvqv=M!)m_szHh}+L8<`N}jnW=Z)xjgEu(ryO5rES$=WxUVcSd-24K&Brhkr{Va_va2889{C& zxplaEF)?gqKP5vRuH#Pmz{6!cFF$&Ct78FmL$M#$5w%5&w`_ z{e3-q_w9eCx2EseKD{LbcS^5B)ssQ7`MKPd@=BGTYd9{QevWvT!0!xZWu>Hovf$?j zI2_%wp5JE<%hf^-*is&`7x6~zP+r7enPCsp_2}P4{PyaME^n6eNizlawP-_-FLFi~ zS0x`ZQ(mT?=o^*XWB66C!l68#&-MA3-g2&m*(0uMFf<;0yqdo=aO{>459zT}A)eG@ zch_+}+;7$KgX+Fk$Gg?NV>6d>ZFFEW2fe&UUT@%lIe~r?@<{`4%G2M|Z|%_#2IEEp z=bN)IXJt(zqI3FUV6Ku24G1?kB0LY@ymV_g0X2beP9{8#uw7?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