[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 15:02:28 CDT 2010
A page in your DokuWiki was added or changed. Here are the details:
Date : 2010/05/20 15:02
User : cavehippo
Edit Summary:
@@ -19,9 +19,8 @@
#!/bin/sh
PKG_CONFIG_LIBDIR=/usr/i586-mingw32msvc/lib/pkgconfig \
PKG_CONFIG_PATH=/usr/i586-mingw32msvc/lib/pkgconfig pkg-config $*
</code>
-
===== Get the GTK libraries =====
You will need the gtk libraries, fortunately there is a all-in-one bundle available from [[http://www.gtk.org/download-windows.html]]
unzip this somewhere convenient.
@@ -106,15 +105,18 @@
configure: Will put data in .
configure:
configure: Build options
configure: Will build GTK2 client? yes
- configure: With OpenGL renderer? no
+ configure: With OpenGL renderer? yes
configure: With SDL renderer? yes
configure: Will build sound server? no
configure:
configure: Scripting options
configure: Will include lua interface? no
</code>
+
+ If you are compiling with SDL support then the line 'With SDL renderer?' should say 'yes'
+ If you are compiling with OpenGL support then the line 'With OpenGL renderer?' should say 'yes'
You have a Makefile now, so run make.
===== Compilation =====
@@ -156,14 +158,33 @@
All being well, it will compile the c code and fail dismally in the linker step.
That's ok, we didn't pass the right configure-time options to link it properly anyway.
- go to gtk-v2/src and run
+ go to gtk-v2/src and run the linker step manually, what you will need to use will depend on which compile-time options you have.
+
+ Without either SDL or OpenGL support enabled, 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 -lopengl32 -lglu32 -lglut
+ 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 -lmingw32 -mwindows
</code>
- (if you are not using openGL, omit the last 3 options: -lopengl32 -lglu32 -lglut)
+ if you are compiling with SDL, then add
+
+ <code>
+ -lSDL -lSDL_image -lSDLmain /usr/i586-mingw32msvc/lib/libSDL.dll.a
+ </code>
+
+ if you are compiling with OpenGL, then add
+
+ <code>
+ -lopengl32 -lglu32 -lglut
+ </code>
+
+ If you are doing both then you'll end up with the following
+
+ <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 -lopengl32 -lglu32 -lglut
+ </code>
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
@@ -182,9 +203,8 @@
* iconv.dll
* libfontconfig-1.dll
* libglib-2.0-0.dll
* libpango-1.0-0.dll
- * SDL.dll
* libatk-1.0-0.dll
* libgdk_pixbuf-2.0-0.dll
* libgmodule-2.0-0.dll
* libpangocairo-1.0-0.dll
@@ -195,8 +215,9 @@
* libgio-2.0-0.dll
* libgthread-2.0-0.dll
* libpangowin32-1.0-0.dll
* libxml2.dll
+ * SDL.dll (even if you didn't compile with SDL support, because the nsis script needs it, edit the nsi file if you really don't want to include it)
and add more if you need them, keep going until a windows system can actually run the binary from gtk-v2/src.
===== Client Images =====
@@ -236,6 +257,5 @@
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=1274384085
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