I *think* I've figured out a way to make regular Unix programs with winelib. My idea is, make winemaker generate a C file called "winelib-wrap.c" that contains: #include <stddef.h> int main(void) { return (int) WinMain(NULL, NULL, NULL, NULL); } Then link it with the EXE encapusulated in a .so, and it SHOULD work. I'll try it on the 01-stdole32.c. It gave me a SIGSEGV, but maybe someone would fix it. Samuel Lauber -- _____________________________________________________________ Web-based SMS services available at http://www.operamail.com.
From your mailbox to local or overseas cell phones.
Powered by Outblaze
It's not that easy, that approach doesn't take C++ static constructors into account, nor the address space manipulation that takes effect. It is possible to allow people to start winelib apps like "./foo" but hardly a big deal. You need to have a program which does: (pseudocode) int main(int argc, char *argv[]) { self = readlink("/proc/self/exe"); exec("wine " + self, argc, argv); } "main()" may already be taken, so you might need to intercept stuff at the ELF bootstrap level. thanks -mike
participants (2)
-
Mike Hearn -
Sam Lauber