| X-Chat 2 Free Windows Builds |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
|
|
![]() ![]() ![]() |
| Daemon404 |
Posted: May 27, 2005 12:34 am
|
||||||||||||||||||
![]() Unofficial X-Chat Builder ![]() ![]() Group: XCCE Project Testers Posts: 20 Member No.: 2 Joined: May 26, 2005 |
This guide will tell you how to compie MiniGTK as a static library and a shared DLL. This was done with MS Visual C++ .NET 2003. I have not tried ti with anythign else. What you need: MinGW - Get it . MS Visual C++ (edit by Pu7o: You can also use the delicious MSVC++ Toolkit, available . If you do, you should unzip archive on the toolkit's installation directory.) MiniGTK Source Code - Get it . libiconv 1.9.2 Source Code - Get it . Cygwin - Get it . How: First of all, extract glibgtkpango244.tar.bz2 with WinRAR or some other archiving utility. Also, extract libiconv-1.9.2.tar.gz to the same directory. Open a Visual Studio Command Prompt windows and cd to the directory where you extracted everything. Now, you have to set the PATH to you cygwin and mingw bin directories. For Example:
The %PATH% is very important. Now, cd to gtk\gtk. run nmake -f makefile.msc. Let it do its thing until it finishes. The LIB file will automatically be moved to the directory where you extracted everything. Next, cd to ..\gdk\win32 and run nmake -f makefile.msc. Now, cd to .. and run nmake -f makefile.msc. Once its done, ti will automatically move teh LIB fiel to teh same directory as the gtk lib. Now, copy libiconv-1.9.2\include\iconv.h.msvc-static to glib\glib and rename it to iconv.h. cd to the directory where you extracted everything. Then, cd to glib/glib. Run nmake -f makefile.msc. It will eventualyl fail, and complain about iconv.lib. Ignore this. cd to gnulib. Run nmake -f makefile.msc. Now cd to .. and run nmake -f makefile.msc glib-2.2s.lib. Copy glib-2.2s.lib to the same directory as teh otehr libs you built. Now, cd to ../gobject and run nmake -f makefile.msc. It will quickly fail and give you anotehr iconv.lib thing. Ignore it. Now run nmake -f makefile.msc gobject-2.2s.lib. Copy the lib to folder where you have all of the rest of the libs. Next, cd to ../gmodule. Run nmake -f makefile.msc. It will fail and complain about glib. Ignore this. Run link -lib /out:gmodule-2.2s.lib gmodule.obj. Copy the lib to the place with teh rest fo the libs you built. cd to ..\build\win32\dirent. Run nmake -f makefile.msc. Copy the lib to the place with the rest fo the libs you built. cd back to the directory where you extracted everything. Now, cd to gtk\gdk-pixbuf. Run nmake -f makefile.msc. It will eventually fail and complain abotu glib. Ignore it. Run nmake -f makefile.msc gdk_pixbuf-2.2s.lib. Copy the lib to teh same directory as teh rest. cd back to the directory where you extracted everything. Now, cd to pango\pango and re-type "nmake -f makefile.msc". It will fail and complain about glib. Ignore it. The libs you need have already been build before the error occurred. Copy both libs to the directory with teh rest of them. cd back to the directory where you extracted everything. Now, cd to libiconv-1.9.2. Run:
Run make. Then, cd to lib\.libs and run teh following:
Copy the newly create lib file to teh same directory as the rest. cd back to teh directory with all teh libs you built. In this directory, create a file called empty.c and put this in it:
then run
. Now, edit makefile.msc so it looks like this:
Next, edit minigtk.def and remove the following from it
To create minigtk.dll, run nmake -f makefile.msc. To make the static library run nmake -f makefile.msc static. Ignore the warnings. To link it to xchat, use Pu7os guide. If there are any errors in this guide, please post them. EDIT by Pu7o: MinGW should be in the path first, not cygwin. EDIT by Daemon404 : I have gotten gettext to work as a shared library. Do This with cygwin, mingw, and msvc in your path: Get the source code for gettext-0.10.40 (Must be that specific version) and extract it. cd to the directory and run sh configure --disable-shared --enable-static and then run make. Find teh newly create libintl.a and cd to intl\.libs and create a fiel named gettext.def with thsio in it:
Then run:
Refer to pu7o's guide abotu linkign to minigtk to fidn otu hwo to get gettext.lib out of intl.dll using exports.sed. Then all you have to to is add gettext.lib to the LIBS=... line of makefile.msc and have it in the same dir as minigtk-static.lib, etc. Edit by Pu7o: Changed "intl.dll" to "minintl.dll" for the following reason: Intl.dll is the name used by the full gettext library. Using intl.dll for this "miniature-version" of libintl could cause compatibility problems with other programs which might use gettext. Edit by Daemon404 (Again): I have been able to statically link my minint to xchat using teh great program DLL to Lib by Binary-Soft. :-) Edit by Pu7o: Added part about visual c++ toolkit, with the archive zip file. The archive.zip file is based on by boing with some extra needed files from the platform SDK. (a few .h files and comdlg32.lib) Edit by Pu7o: Changed links to reflect the new MiniGTK. Edit by Daemon404. It is also possible to compile MiniGTK with MSVC 6.0. I just did it. You need to add /Zm1000 to the command line arguments in makefile.msc in glib\glib This post has been edited by Daemon404 on June 24, 2005 01:02 am |
||||||||||||||||||
| Pu7o |
Posted: May 27, 2005 06:46 am
|
|
Administrator ![]() ![]() ![]() Group: Admin Posts: 40 Member No.: 1 Joined: May 14, 2005 |
neat, thanks for the guide!
|
| Pu7o |
Posted: May 27, 2005 02:58 pm
|
|
Administrator ![]() ![]() ![]() Group: Admin Posts: 40 Member No.: 1 Joined: May 14, 2005 |
if anyone knows a better way of getting the errno and _alloca symbols to work, please post here, as the described way is bound to break something
|
| Daemon404 |
Posted: May 27, 2005 09:15 pm
|
![]() Unofficial X-Chat Builder ![]() ![]() Group: XCCE Project Testers Posts: 20 Member No.: 2 Joined: May 26, 2005 |
Yeah, if i compile gettext-0.10.40 and link ti with teh _alloca trick, it works but then after i link it to xchat, I run xchat.exe and it crashes on startup, doesnt even show the server list.
|
| Daemon404 |
Posted: May 28, 2005 06:15 pm
|
![]() Unofficial X-Chat Builder ![]() ![]() Group: XCCE Project Testers Posts: 20 Member No.: 2 Joined: May 26, 2005 |
Ok, i have gotten gettext to work with a special build of intl.dll, and ill update thsi guide in a sec. Sucks though that it cant be statically linked.
|
| Pu7o |
Posted: May 31, 2005 07:59 pm
|
|
Administrator ![]() ![]() ![]() Group: Admin Posts: 40 Member No.: 1 Joined: May 14, 2005 |
you don't need dll to lib to use a static intl.lib, you can use gettext 0.13 and it will work (i tried it). Also, with gettext 0.13 you won't even need to fake an _alloca symbol
|
| Daemon404 |
Posted: May 31, 2005 09:15 pm
|
![]() Unofficial X-Chat Builder ![]() ![]() Group: XCCE Project Testers Posts: 20 Member No.: 2 Joined: May 26, 2005 |
still need to for iconv though.
|
| Pu7o |
Posted: May 31, 2005 10:59 pm
|
|
Administrator ![]() ![]() ![]() Group: Admin Posts: 40 Member No.: 1 Joined: May 14, 2005 |
why don't you use the MSVC build system for iconv?
(i.e. nmake -f makefile.msvc MFLAGS=-MD NO_NLS=1) |
| Pu7o |
Posted: May 31, 2005 11:04 pm
|
|
Administrator ![]() ![]() ![]() Group: Admin Posts: 40 Member No.: 1 Joined: May 14, 2005 |
here's how you can define _alloca correctly:
in the libiconv source, there's an alloca.c file. Compile it and create an alloca.lib file, and link to it. simple as that |
| Daemon404 |
Posted: June 01, 2005 02:04 am
|
![]() Unofficial X-Chat Builder ![]() ![]() Group: XCCE Project Testers Posts: 20 Member No.: 2 Joined: May 26, 2005 |
i liek using teh bare minimum for everything, my xchat.exe is only 3.04 MB and is linked to verythign it needs. MinGW helps create smaller files.
|
| Pu7o |
Posted: June 01, 2005 01:20 pm
|
|
Administrator ![]() ![]() ![]() Group: Admin Posts: 40 Member No.: 1 Joined: May 14, 2005 |
ok, the alloca.c file didn't work, but now i found where mingw has its alloca implementation, which we can use on msvc. on /mingw/lib/gcc-lib/mingw32/3.2.3/libgcc.a
(yes, even though it's a gcc library, it will work for msvc if converted to .lib and will provide a working _alloca implementation) |
| Daemon404 |
Posted: June 02, 2005 02:02 am
|
![]() Unofficial X-Chat Builder ![]() ![]() Group: XCCE Project Testers Posts: 20 Member No.: 2 Joined: May 26, 2005 |
You dont even need libgcc.a anymore, because evrything is built with MSVC (With the exception of my minintl.lib and minintl.dll)
|
| Daemon404 |
Posted: June 24, 2005 01:02 am
|
![]() Unofficial X-Chat Builder ![]() ![]() Group: XCCE Project Testers Posts: 20 Member No.: 2 Joined: May 26, 2005 |
It is also possible to compile MiniGTK with MSVC 6.0. I just did it. You need to add /Zm1000 to the command line arguments in makefile.msc in glib\glib
|
| MasterC |
|
||
|
Unregistered |
Hi, I get the fallowing error, while doing the first nmake -f makefile.msc:
What should I do? kind regards Chris |
||
|
|
| Daemon404 |
Posted: June 30, 2005 03:19 am
|
![]() Unofficial X-Chat Builder ![]() ![]() Group: XCCE Project Testers Posts: 20 Member No.: 2 Joined: May 26, 2005 |
make sure that the LIBS dir is defined. are you running the shortcut called: Visual Studio .NET 2003 Command Prompt. Because that should work. with no defiend of anything besides whats in the guide in the PATH. I know this works, i have doen this on 3 systems, and i evenn compiled it on windows 98 with visual c++ 6. i don't knwo what the issue could be.
|
| TomB |
Posted: July 25, 2005 11:20 pm
|
||
|
Unregistered |
I get this error |
||
|
|
| Guest |
Posted: July 26, 2005 12:57 am
|
|
Unregistered |
the dynamic minigtk doesn't work very well. Try the static one.
|
|
|
| Daemon404 |
Posted: July 26, 2005 03:55 pm
|
![]() Unofficial X-Chat Builder ![]() ![]() Group: XCCE Project Testers Posts: 20 Member No.: 2 Joined: May 26, 2005 |
The dynamic one works fine as long as you add teh extra symbols you need.
|
![]() |
![]() ![]() ![]() |