[Crossfire-wiki] [Crossfire DokuWiki] page changed: user:cavesomething:crosscompiling_for_windows
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Thu May 20 08:48:08 CDT 2010
A page in your DokuWiki was added or changed. Here are the details:
Date : 2010/05/20 08:48
User : cavehippo
Edit Summary:
@@ -71,14 +71,14 @@
=== Configuring ===
You will need to create a configure script if you don't have one already, try running
<code>
- LIBS=pthreadGC2; ./autogen.sh --host=i586-mingw32msvc --with-sdl-exec-prefix=/usr/i586-mingw32msvc
+ ./autogen.sh --host=i586-mingw32msvc --with-sdl-exec-prefix=/usr/i586-mingw32msvc
</code>
if you already have a configure script, then you can run it directly:
<code>
- LIBS=pthreadGC2; ./configure --host=i586-mingw32msvc --with-sdl-exec-prefix=/usr/i586-mingw32msvc
+ ./configure --host=i586-mingw32msvc --with-sdl-exec-prefix=/usr/i586-mingw32msvc
</code>
(if you are using a different version of pthread, then change LIBS as appropriate).
@@ -108,8 +108,39 @@
=== Compilation ===
You may well see errors here, bodge the source code until they go away.
+
+ At the time of writing, the SVN client compiles cleanly, as long as -DMINGW is passed when compiling gtk-v2/src/config.c
+
+ However, in order to let it link, I have needed to comment out references to gtk_rc_add_default_file and gtk_rc_set_default_files
+
+ The following is a diff if you want to apply that
+
+ <code>
+ Index: config.c
+ ===================================================================
+ --- config.c (revision 13271)
+ +++ config.c (working copy)
+ @@ -210,7 +210,7 @@
+ * theme change grows the list. Only one theme should be in the list
+ * at a time.
+ */
+ - gtk_rc_set_default_files(default_files);
+ +// gtk_rc_set_default_files(default_files);
+
+ /*
+ * If a client-configured theme has been selected (something other than
+ @@ -232,7 +232,7 @@
+ LOG(LOG_ERROR, "config.c::load_theme",
+ "Unable to find theme file %s", path);
+
+ - gtk_rc_add_default_file(path);
+ +// gtk_rc_add_default_file(path);
+ }
+
+ if (reload) {
+ </code>
=== Linking ===
All being well, it will compile the c code and fail dismally in the linker step.
@@ -118,17 +149,8 @@
go to gtk-v2/src and run
<code>
i586-mingw32msvc-gcc -mwindows -g -O2 -mms-bitfields -Wall -o crossfire-client-gtk2.exe about.o account.o config.o image.o info.o inventory.o keys.o main.o map.o magicmap.o menubar.o metaserver.o opengl.o pickup.o png.o sdl.o skills.o sound.o spells.o stats.o ../../common/libcfclient.a /usr/i586-mingw32msvc/lib/libgdk_pixbuf-2.0.dll.a /usr/i586-mingw32msvc/lib/libglade-2.0.dll.a /usr/i586-mingw32msvc/lib/libpango-1.0.dll.a /usr/i586-mingw32msvc/lib/libgtk-win32-2.0.dll.a -lpthreadGC2 -lgdk-win32-2.0 -latk-1.0 -lpangoft2-1.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lfreetype -lfontconfig -llibgobject-2.0 -lgmodule-2.0 -llibglib-2.0 -lwsock32 -lwinmm -lpng12 -lz -lm -llibcurl -lgailutil -lSDL -lSDL_image -lmingw32 -lSDLmain -mwindows /usr/i586-mingw32msvc/lib/libSDL.dll.a
</code>
-
- This will require you to put
- * libgtk-win32-2.0.dll.a
- * libgdk_pixbuf-2.0.dll.a
- * libglade-2.0.dll.a
- * libpango-1.0.dll.a
- * libgtk-win32-2.0.dll.a
- * libSDL.dll.a
- in your common/ directory beforehand. All these files should already be in /usr/i586-mingw32msvc/lib somewhere.
That should give you a .exe file.
Now grab lots of dll files from /usr/i586-mingw32msvc/bin and put them in gtk-v2/src
@@ -161,9 +183,9 @@
* libgthread-2.0-0.dll
* libpangowin32-1.0-0.dll
* libxml2.dll
- and add more if you need them.
+ and add more if you need them, keep going until a windows system can actually run the binary from gtk-v2/src.
=== Client Images ===
The windows package is distributed with the client image files already included, for the unix clients, this is a separate package.
download the latest crossfire-client-images-x.y.z.tar.gz file from sourceforge, and untar into gtk-v2/src, this will ensure that they are included in the package.
@@ -172,12 +194,12 @@
Finally....
Install nsis, on a debian-like system the package is called nsis
- go to gtk-v2/src and run makensis gtkclient.nsi
+ go to gtk-v2/win32 and run makensis gtkclient.nsi
You should have an installer file crossfire-client-windows.exe
This can now be installed on a windows system.
IP-Address : 81.141.58.188
Old Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:crosscompiling_for_windows?rev=1274327572
New Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:crosscompiling_for_windows
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list