[Mono-list] Windows.Forms

Urs Muff umuff@quark.com
Thu, 22 May 2003 08:11:58 -0600


How come Windows.Forms does not work on Win32 without Wine?  
That does not really make sense to me.  
Isn't Wine supposed to emulate Win32?
Can't the assembly detect what OS its running and the either use Wine, or
just directly use the kernel?  
Why are the DLL-names hard coded using libxxx.dll.so naming conventions
[since I get an error message that libxxx.dll.so.dll is missing]?  
Isn't that platform specific and a general issue for any share
library/PInvoke and should only use xxx, and then depending on the platform
it gets expanded to libxxx.dll.so on Unix [actually why not libxxx.so, since
java does that too], or to xxx.dll on Win32.

I guess those might be just stupid questions, but to me the design choices
are not apparent and/or transparent...

- URS C. MUFF
SOFTWARE ARCHITECT	- RESEARCH LAB
QUARK INC.

> -----Original Message-----
> From: Philip Van Hoof [mailto:spamfrommailing@freax.org]
> Sent: Wednesday, May 21, 2003 8:01 PM
> To: mono-list@ximian.com; Mono Winforms
> 
> 
> Hi there,
> 
> After a lot of trying and trying .. I got the System.Windows.Forms using
> libWine working.
> 
> Now that it works .. you can find the prove that a newbie Mono developer
> can get these wine patches working (after trying for an hour or two)
> here : http://www.freax.be/MyFirstSWFOnMono.png  ;-)
> 
> tadaaa!!
> 
> Note that my test.cs-file was created using VS.NET (2003). It is a
> standard Windows Forms application with no extra components added.
> 
> I compiled it with something like ..
> 
> mcs test.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
> /r:System.Data.dll
> 
> 
> 
> Some other problems that I ran into :
> 
> 1) You must read the file wine-shared-20030519/wine/README, not just the
> instructions on the website ! Those online instructions will install a
> wine-binary. This is 'not' what you need in order to get
> System.Windows.Forms working. (Thanks to Miguel who explained this to me
> on IRC, hehe -I should read before doing things, I know-)
> 
> 2) It does not hurt if you did installed it the wrong way first (except
> that now your current wine installation has been overwritten, hehe
> -great, my KaZaaLite does not work anymore-). But then make sure that
> you distclean/clean the patched wine source before recompiling using
> "make wine-shared". Else the -DMONO wont be compiled in each library.
> (it took me 45 minutes to figure out why it was not working and why
> running "mono test.exe" was showing me the "how to use"-help of wine
> after it initialized System.Windows.Forms. Well not cleaning that
> sourcetree was the reason).
> 
> 3) I had to make a symlink from libwinnt.dll.so to libntdll.dll.so. For
> some reason the build created libwinnt.dll.so in stead of
> libntdll.dll.so which is the library that Mono will load once it
> detected that System.Windows.Forms will be used.
> 
> ln -s /usr/lib/libwinnt.dll.so /usr/lib/libntdll.dll.so
> 
> 
> Maybe that symlink is totally wrong .. well, here, it does work this
> way...
> 
> 4) I also had to rebuild mono and mcs from scratch and from CVS. Yes
> that means rebuilding your corlib.dll too. I guess most of you guys know
> how to build mcs. If not try something like this :
> 
> * Install mono (and mono-devel) from RPM or using apt-get
> 
> * export CVSROOT=':pserver:anonymous@anoncvs.go-mono.com:/mono' && cvs
> -z3 co mono mcs && cd mcs && make -f makefile.gnu ; cd ../mono &&
> ./autogen.sh --prefix=/usr && make && make install && cd ../mcs && cp
> class/lib/corlib.dll /usr/lib ; make -f makefile.gnu && make -f
> makefile.gnu install prefix=/usr
> 
> 
> 5) Back to the wine-sources: In stead of running "./configure" I had to
> use "./configure --prefix=/usr" (which is also the prefix that I used to
> install mono on my development desktop-computer). This way all
> .dll.so-files are installed in /usr/lib/ in stead of /usr/local/lib/.
> Don't worry about your wine-installation .. the fine guys at openlinksw
> have renamed the files.
> 
> 6) Run "export SWF=1" before starting an application (or put it in your
> profile or startup-scripts)
> 
> 
> 
> Okay, have fun :)
> 
> 
> --
> Philip Van Hoof a.k.a. freax
> me at freax dot org
> http://www.freax.be -- http://www.freax.eu.org -- http://www.freax.org
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list