Philip Van Hoof
22 May 2003 04:01:05 +0200
After a lot of trying and trying .. I got the System.Windows.Forms using
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 ;-)
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
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
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:email@example.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