User:Osk/GSWin

From CrossWire Bible Society
Jump to: navigation, search

A whiteboard for me to work out a more complete & explicit set of instructions for building GnomeSword in MinGW


Set up MinGW/MSYS

  • Download MinGW from the following URL, run the installer, select Candidate, then select the base system plus g++
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780
  • Download MSYS from the following URL (using the current release installer, not the tech preview) and do a default install (type y, y, c:/mingw during the post-install setup)
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24963
  • Download msysDTK from the following URL and do a default install
http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1
  • Download m4-1.4.7-MSYS from the following URL and extract m4.exe to c:/msys/bin
http://downloads.sourceforge.net/mingw/m4-1.4.7-MSYS.tar.bz2?modtime=1162303978&big_mirror=1
  • Open an MSYS terminal window (using the icon on your desktop, for example)
  • Download, build, and install recent versions of autoconf, automake, and libtool:
curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.63.tar.gz
tar zxfv autoconf-2.63.tar.gz
./autoconf-2.63/configure --prefix=/mingw && make && make install
curl -O http://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.gz
tar zxfv automake-1.9.6.tar.gz
./automake-1.9.6/configure --prefix=/mingw && make && make install
curl -O http://ftp.gnu.org/gnu/libtool/libtool-2.2.6a.tar.gz
tar zxfv libtool-2.2.6a.tar.gz
./libtool-2.2.6a/configure --prefix=/mingw && make && make install
  • Download SVN:
http://subversion.tigris.org/files/documents/15/44095/svn-win32-1.5.4.zip
  • Unzip svn-win32-1.5.4 to C:\msys\1.0\local

Setting up required libraries

  • Install zlib & libcurl:
curl -O http://www.zlib.net/zlib-1.2.3.tar.gz
tar zxfv zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/mingw && make && make install
cd ..
curl -O http://curl.haxx.se/download/curl-7.19.2.tar.gz
tar zxfv curl-7.19.2.tar.gz
./curl-7.19.2/configure --prefix=/mingw && make && make install
  • install gnome versions of utilities
     http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
create a directory c:\msys\1.0\dev
add it to your path (in profile)
unpack everything there
you need at this point:
 pkg-config: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-0.23-2.zip
 gettext: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-0.14.5.zip
 gettext-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-dev-0.14.5.zip
 gettext-runtime: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17.zip
 gettext-runtime-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev-0.17.zip
  • add this line to your profile
     export PKG_CONFIG_PATH=/dev/lib/pkgconfig
  • compile sword-1.5.11 from source
     with libcurl is easier than ftplib
     you will have to manually alter makefile to link against regex
  • download gnomesword 2.4.1
  • download lots of gnome libs and unpack them in dev
     for everything, you need the normal and developer package
     atk, cairo, fontconfig, freetype, gail, gconf, glib, gnome-common, gnome-doc-utils, gnome-vfs,
     goocanvas, gtk+, gtkhtml-3.18, intltool, libart, libbonobo, libbonoboui, libbzip, libffi, 
     libglade, libgnome, libgnomecanvas, libgnome, libgnomeprint, libgnomeprintui, libgnomeui,
     libiconv, libIDL, libpng, libxml2, ORBIT, popt, pthreads, zlib, pango
     For these 2, you only need the binaries:
     expat, gnurx
  • alter configure script to allow compilation without scrollkeeper
  • apply linux/windows diff
     hopefully most will be unnecessary soon
     mailed to gnomesword-developers
  • run configure with --enable-gtkhtml --disable-scrollkeeper --prefix=/mingw
  • make
     you will have to alter the makefile in libs to link against libcurl.dll (-lcurl doesn't work)
  • make install
  • run gnomesword
  • getting gnomesword free from mingw is another topic.
  • Windows XP look

To get the windows XP look, go to /dev/share/themes/MS-Windows/gtk-2.0 copy gtkrc to /dev/etc/gtk-2.0/gtkrc

Helpful links

  1. http://live.gnome.org/Planner/Windows
  2. http://www.go-evolution.org/Building_Evolution_on_Windows
  3. http://www.mingw.org/wiki/msys

Articles found so far

  1. http://live.gnome.org/Cross%20compiling%20GTK%2B%20for%20Win32
  2. http://www.gnome-db.org/GnomeDbMinGW (has good tutorial to set up MINGW compiling on windows
  3. http://www.daniweb.com/forums/thread86245.html (Order of commandline options for GCC is important)

Building of other GTK/Gnome projects

  1. https://develop.participatoryculture.org/trac/democracy/wiki/BuildingMiroWithMinGW

Other stuff

  1. http://linux.softpedia.com/get/Text-Editing-Processing/IDEs/MinGW-Developer-Studio-14939.shtml Allows compiling and cross compiling of GTK applications