Control-panel app. Works with mingw, need help with winegcc

2008-03-31 Thread pure_evil
Okay, this is as far as apparently I can make it on my own.

This is the *basic* control panel applet. I used Dev-c++ (it's C though). 
It compiles with mingw and works flawlessly - you know, exports what it should 
export etc. etc. etc. The result, copied onto c:\windows\system32 shows up in 
the control panel and launches Notepad.

However, I can't for the life of me get it to compile with winegcc (skip the 
usual throw out inlude windows.h and insert cpl.h... THEN it gets 
hairier).

Help?



skeleton.tar.gz
Description: application/tgz



re: Control-panel app. Works with mingw, need help with winegcc

2008-03-31 Thread Dan Kegel
pure_evil wrote:
 Here's source for a .cpl that compiles fine with dev-c++.
 How can I make it work with winegcc?

I had to do this to make winegcc happy:

--- skeleton/skeleton.c 2008-03-31 09:00:55.0 -0700
+++ skeleton.ok/skeleton.c  2008-03-31 11:34:24.128617000 -0700
@@ -24,12 +24,12 @@

 #include skeleton.h

-LONG APIENTRY Applet1(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam);
+LONG APIENTRY Applet1(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam);
 HINSTANCE hApplet = 0;

 APPLET Applets[1] = { {CPLICON, CPLNAME, CPLDESC, Applet1} };

-LONG APIENTRY Applet1(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam)
+LONG APIENTRY Applet1(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
 {return 1; }

 LONG CALLBACK

but then I was able to generate a DLL that worked with control like this:

  winegcc -mwindows skeleton.c -c -I ../wine-git/include
  winegcc -shared skeleton.dll.specskeleton.o   -o
skeleton.dll.so  -lkernel32 -lntdll -lshell32  -L
../wine-git/libs/wine
  wine control skeleton.dll.so

Worked first try. (Good thing, too, since I was just copying what wine already
does to build its dlls, and I wouldn't have known what to do if it failed.)

Does that work for you?
- Dan




Re: Control-panel app. Works with mingw, need help with winegcc

2008-03-31 Thread pure_evil
 Worked first try. (Good thing, too, since I was just copying what wine
 already does to build its dlls, and I wouldn't have known what to do if it
 failed.)

 Does that work for you?
 - Dan

Steven Edwards beat you to it, he sent me a patch ;) 

It works! It's alive!

@all sorry folks 'bout the can't-be-done from days past; It can and has been 
done! A big thank you for Steven, you're my hero!

Now, to get on with the executables :D