Added makefile for ease of compilation
This commit is contained in:
parent
ebe97a9264
commit
2ce5e62829
11
Makefile
Normal file
11
Makefile
Normal file
|
@ -0,0 +1,11 @@
|
|||
# winegcc is required to compile this program correctly, because
|
||||
# we need access to some Linux API
|
||||
|
||||
ALL: steamstub.exe
|
||||
|
||||
steamstub.exe: steamstub.c
|
||||
winegcc -m32 -o $@ steamstub.c
|
||||
mv steamstub.exe.so steamstub.exe
|
||||
|
||||
clean:
|
||||
rm -f steamstub.exe steamstub.exe.so
|
11
steamstub.c
11
steamstub.c
|
@ -1,17 +1,22 @@
|
|||
/* steamstub.c - A Windows program for Linux
|
||||
|
||||
Useful as a wrapper to execute a Linux binary from Windows, and block on its
|
||||
return (i.e. getting the Linux system() functionality for Linux binaries from
|
||||
inside Windows binaries, such as Steam)
|
||||
|
||||
compile it with:
|
||||
|
||||
mingw32-gcc -o steamstub.exe steamstub.c
|
||||
make
|
||||
|
||||
nb: on fedora, the mingw32 C compiler is called i686-pc-mingw32-gcc
|
||||
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
MessageBox (NULL, "The Steam Stub is now running. Go play your Linux game, and come back and click the 'OK' button on this dialog box once you are done playing it." , "Steam Stub", 0);
|
||||
system("gedit");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
BIN
steamstub.exe
BIN
steamstub.exe
Binary file not shown.
Reference in New Issue
Block a user