Difference between revisions of "Frontends:Xiphos/Windows"

From CrossWire Bible Society
Jump to: navigation, search
(Setting up required libraries)
m (Refdoc moved page Frontend:Xiphos/Windows to Frontends:Xiphos/Windows without leaving a redirect)
 
(48 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==MinGW==
+
==Read First==
 +
While almost everything on this page remains accurate, and is highly useful for a reference, this will no longer lead to a successful build against the 2.4.x branch. The biggest reason is the addition of using the ImageMagick api. Hopefully soon there will be a much smoother process for all of this.
  
MinGW is minimalist GNU for Windows.[http://www.mingw.org/]
+
==Tools==
  
One lives in hope....
+
For general tools, here are some recommendations:
  
===Needs===
+
* svn: for commandline svn, try this:
 +
      http://subversion.tigris.org/files/documents/15/44049/Setup-Subversion-1.5.3.msi
 +
for windows explorer integrated, try this:
 +
      http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.5.5.14361-win32-svn-1.5.4.msi?download
  
# building of relevant libaries
+
* text editing: use an editor that handles unix line endings and preserves them. Examples include notepad++, vim (vi is included in msys), and emacs.
# building of GS itself
+
      emacs: http://ftp.gnu.org/gnu/emacs/windows/emacs-22.3-bin-i386.zip
 +
      notepad++: http://downloads.sourceforge.net/notepad-plus/npp.5.1.1.Installer.exe?use_mirror=
  
 +
* zip: for commandline unzip, try this:
 +
      http://gnuwin32.sourceforge.net/packages/unzip.htm
 +
for windows gui (or command line), try 7zip:
 +
      http://www.7-zip.org/
 +
 +
* wget: for downloading via wget:
 +
      http://gnuwin32.sourceforge.net/packages/wget.htm
 +
 +
* gdb: for debugging:
 +
      http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=20507&release_id=594520
 +
 +
* gdb: the most useful thing to do with gdb is to place it directly into "C:\Program Files\CrossWire\Gnomesword\bin", open a windows command prompt, cd to that directory, and run from there. I do this to run Gnomesword without gdb as well.
 +
 +
* console: I use Console2 from here:
 +
      http://downloads.sourceforge.net/console/Console-2.00b141-Beta.zip
 +
 +
* There have been various complaints and issues with the shell that comes with msys (specific to gnomesword, gdb doesn't play well with the msys shell), so I recommend using either Console2 above, or using the windows command prompt. Either way, you can start your normal bash session with this command:
 +
      C:\msys\1.0\bin\sh --login
 +
 +
* NOTE: please use only the tools recommended here. Especially, do not download and use other utilities from gnuwin32, because some of them have known conflicts. Also, do not use cygwin tools, or other perl distributions, etc. Unfortunately there are many different incompatible ports of various gnu tools. You have been warned!!
  
 
==Setting up MinGW==
 
==Setting up MinGW==
Line 27: Line 52:
 
       export INTLTOOL_PERL=/c/strawberry/perl/bin/perl
 
       export INTLTOOL_PERL=/c/strawberry/perl/bin/perl
  
==Setting up required libraries==
+
==Setting up Utilities==
  
For all following instructions, when you run configure do it with --prefix=/mingw
+
For all the utilities, when you run configure do it with --prefix=/mingw
  
* install gnome versions of utilities
+
* install gnome versions of utilities (direct links below)     
      http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
 
 
: create a directory c:\msys\1.0\dev
 
: create a directory c:\msys\1.0\dev
: add it to your path (in profile)
+
: add this line to your profile
 +
      export PATH=$PATH:/dev/bin:/c/mingw/bin   
 
: unpack everything there
 
: unpack everything there
: you need at this point:
+
: you need these utilities at this point:
 +
: all these are from http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
 
   pkg-config: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-0.23-2.zip
 
   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: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-0.14.5.zip
Line 42: Line 68:
 
   gettext-runtime: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17.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
 
   gettext-runtime-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev-0.17.zip
 +
  glib: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib_2.18.3-1_win32.zip
 +
 +
* based on reports, this may not be enough to get everything going. It is recommended that you skip down to http://www.crosswire.org/wiki/index.php/Gnomesword_for_Windows#Download_Gnome_Libraries and download all of those, then come back here.
  
 
* add this line to your profile
 
* add this line to your profile
Line 49: Line 78:
 
* upgrade automake to 1.9 from source
 
* upgrade automake to 1.9 from source
 
       http://ftp.gnu.org/gnu/automake/
 
       http://ftp.gnu.org/gnu/automake/
 +
 +
==Compiling Sword==
 +
 
* install libcurl
 
* install libcurl
 
       http://curl.haxx.se/download.html
 
       http://curl.haxx.se/download.html
       (direct linke) http://www.gknw.net/mirror/curl/win32/curl-7.19.0-devel-mingw32.zip
+
       (direct link) http://www.gknw.net/mirror/curl/win32/curl-7.19.0-devel-mingw32.zip
 +
      everything in the zip file needs to be extracted to the appropriate directory under /dev
 +
      you will need to make a directory /dev/lib/pkgconfig and put libcurl.pc there
 
       find curl-config script from linux and copy it to /mingw/bin
 
       find curl-config script from linux and copy it to /mingw/bin
 +
 +
*compile clucene
 +
      http://downloads.sourceforge.net/clucene/clucene-core-0.9.21b.zip
 +
      ./configure --prefix=/dev
 +
      make
 +
      make install
 +
 
* compile sword-1.5.11 from source
 
* compile sword-1.5.11 from source
       with libcurl is easier than ftplib
+
       use libcurl, not ftplib
       you will have to manually alter makefile to link against regex
+
       you will have to manually alter makefile to link against regex (do this in sword-1.5.11/lib/Makefile, line "#am__objects_3 = regex.lo", take out "#")
* download gnomesword 2.4.1
+
      compiling utilities is broken with mingw
 +
      you do not need to compile with icu
 +
      you will need to add -lz to sword-1.5.11/Makefile on the line "LIBS"
 +
 
 +
==Download Gnome Libraries==
 
* download lots of gnome libs and unpack them in dev
 
* download lots of gnome libs and unpack them in dev
 
       for everything, you need the normal and developer package
 
       for everything, you need the normal and developer package
       atk, cairo, fontconfig, freetype, gail, gconf, glib, gnome-common, gnome-doc-utils, gnome-vfs,
+
       atk: http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.24/atk_1.24.0-1_win32.zip
       goocanvas, gtk+, gtkhtml-3.18, intltool, libart, libbonobo, libbonoboui, libbzip, libffi,
+
      atk-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.24/atk-dev_1.24.0-1_win32.zip     
       libglade, libgnome, libgnomecanvas, libgnome, libgnomeprint, libgnomeprintui, libgnomeui,
+
      cairo: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.0-1_win32.zip
       libiconv, libIDL, libpng, libxml2, ORBIT, popt, pthreads, zlib, pango
+
      cairo-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.8.0-1_win32.zip
       For these 2, you only need the binaries:
+
      fontconfig: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig-2.4.2-tml-20071015.zip
       expat, gnurx
+
      fontconfig-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig-dev-2.4.2-tml-20071015.zip
 +
      freetype: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype-2.3.6.zip
 +
      freetype-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype-dev-2.3.6.zip
 +
      gail: http://ftp.gnome.org/pub/gnome/binaries/win32/gail/1.22/gail-1.22.0.zip
 +
      gail-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/gail/1.22/gail-dev-1.22.0.zip
 +
      gconf: http://ftp.gnome.org/pub/gnome/binaries/win32/GConf/2.22/GConf-2.22.0.zip
 +
      gconf-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/GConf/2.22/GConf-dev-2.22.0.zip
 +
      glib-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib-dev_2.18.3-1_win32.zip
 +
      gnome-common: http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-common/2.11/gnome-common-2.11.0.zip
 +
      gnome-doc-utils: http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-doc-utils/0.12/gnome-doc-utils-0.12.0.zip
 +
      gnome-vfs: http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-vfs/2.24/gnome-vfs_2.24.0-1_win32.zip
 +
      gnome-vfs-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-vfs/2.24/gnome-vfs-dev_2.24.0-1_win32.zip
 +
      gtk+: http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+_2.14.5-1_win32.zip
 +
       gtk+-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+-dev_2.14.5-1_win32.zip
 +
      gtkhtml-3.18: http://ftp.gnome.org/pub/gnome/binaries/win32/gtkhtml/3.18/gtkhtml-3.18.2.zip
 +
      gtkhtml-3.18-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/gtkhtml/3.18/gtkhtml-dev-3.18.2.zip
 +
      intltool: http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
 +
      intltool-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool-dev_0.40.4-1_win32.zip
 +
      libart: http://ftp.gnome.org/pub/gnome/binaries/win32/libart_lgpl/2.3/libart_lgpl-2.3.20.zip
 +
      libart-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libart_lgpl/2.3/libart_lgpl-dev-2.3.20.zip   
 +
      libbonobo: http://ftp.gnome.org/pub/gnome/binaries/win32/libbonobo/2.24/libbonobo_2.24.0-1_win32.zip
 +
      libbonobo-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libbonobo/2.24/libbonobo-dev_2.24.0-1_win32.zip
 +
      libbonoboui: http://ftp.gnome.org/pub/gnome/binaries/win32/libbonoboui/2.24/libbonoboui_2.24.0-1_win32.zip
 +
      libbonoboui-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libbonoboui/2.24/libbonoboui-dev_2.24.0-1_win32.zip
 +
      libffi: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libffi_3.0.6-1_win32.zip
 +
       libffi-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libffi-dev_3.0.6-1_win32.zip
 +
      libglade: http://ftp.gnome.org/pub/gnome/binaries/win32/libglade/2.6/libglade_2.6.3-1_win32.zip
 +
      libglade-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libglade/2.6/libglade-dev_2.6.3-1_win32.zip
 +
      libgnome: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnome/2.24/libgnome_2.24.1-1_win32.zip
 +
      libgnome-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnome/2.24/libgnome-dev_2.24.1-1_win32.zip
 +
      libgnomecanvas: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomecanvas/2.20/libgnomecanvas-2.20.1.zip
 +
      libgnomecanvas-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomecanvas/2.20/libgnomecanvas-dev-2.20.1.zip
 +
      libgnomeprint: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeprint/2.12/libgnomeprint-2.12.1.zip
 +
      libgnomeprint-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeprint/2.12/libgnomeprint-dev-2.12.1.zip
 +
      libgnomeprintui: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeprintui/2.12/libgnomeprintui-2.12.1.zip
 +
      libgnomeprintui-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeprintui/2.12/libgnomeprintui-dev-2.12.1.zip
 +
       libiconv: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libiconv-1.9.1.bin.woe32.zip
 +
      libIDL: http://ftp.gnome.org/pub/gnome/binaries/win32/libIDL/0.8/libIDL_0.8.11-1_win32.zip
 +
      libIDL-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libIDL/0.8/libIDL-dev_0.8.11-1_win32.zip
 +
      libpng: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.2.32-1_win32.zip
 +
      libpng-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng-dev_1.2.32-1_win32.zip
 +
      libxml2: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2-2.6.27.zip
 +
      libxml2-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2-dev-2.6.27.zip
 +
      orbit: http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2_2.14.16-1_win32.zip
 +
      orbit-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2-dev_2.14.16-1_win32.zip
 +
      popt: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/popt-1.10.2-tml-20050828.zip
 +
      popt-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/popt-dev-1.10.2-tml-20050828.zip
 +
      pthreads: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pthreads-win32-2.7.0.zip
 +
      pthreads-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pthreads-win32-2.7.0.zip
 +
      zlib: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-1.2.3.zip
 +
      zlib-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-dev-1.2.3.zip
 +
      pango: http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango_1.22.2-1_win32.zip
 +
       pango-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango-dev_1.22.2-1_win32.zip
 +
      expat: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat-2.0.0.zip
 +
      gnurx: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libgnurx-2.5.zip
 +
       gnurx-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libgnurx-dev-2.5.zip
 +
      libgnomeui: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeui/2.22/libgnomeui-2.22.1.zip
 +
      libgnomeui-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeui/2.22/libgnomeui-dev-2.22.1.zip
 +
      libjpeg: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libjpeg-6b-4.zip
 +
 
 +
==xml2po and themes==
 
* setup xml2po
 
* setup xml2po
       install python 2.5
+
       install python 2.5 http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi
 
       ensure that python is on your path (windows environment variable)
 
       ensure that python is on your path (windows environment variable)
 
       edit /dev/bin/xml2po shebang line to just say #! python
 
       edit /dev/bin/xml2po shebang line to just say #! python
       install python libxml2 from here http://users.skynet.be/sbi/libxml-python/
+
       install python libxml2 from here: http://users.skynet.be/sbi/libxml-python/binaries/libxml2-python-2.6.27.win32-py2.5.exe
 
* install iconv
 
* install iconv
 
       You will need this version of iconv http://gnuwin32.sourceforge.net/packages/libiconv.htm.
 
       You will need this version of iconv http://gnuwin32.sourceforge.net/packages/libiconv.htm.
 +
* install gnome-icon-theme
 +
      http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-icon-theme/2.24/gnome-icon-theme_2.24.0-1_win32.zip
 +
      You may need to rename share/icons/gnome/ to share/icons/hicolor. This theme is required by the studypad
 +
 +
==Compile Gnomesword==
 +
* download gnomesword 2.4.1
 
* alter configure script to allow compilation without scrollkeeper
 
* alter configure script to allow compilation without scrollkeeper
 +
      find the line "if test x$SCROLLKEEPER_CONFIG = xno; then
 +
      comment this line and the next five lines, including this one:
 +
      SCROLLKEEPER_BUILD_REQUIRED=0.3.5
 
* update gnomesword to latest 2.4.x svn
 
* update gnomesword to latest 2.4.x svn
* run configure with --enable-gtkhtml --disable-scrollkeeper --prefix=/mingw
+
* save this to a shell script in your gnomesword directory (take out the forced linebreak)
 +
      #! /bin/sh
 +
      ./configure --enable-gtkhtml --disable-scrollkeeper --enable-maintainer-mode --prefix=/dev
 +
      sed 's/SWORD_LIBS = -Lc:\/msys\/1.0\/dev\/lib -lsword -lz/SWORD_LIBS = [forced linebreak; remove]
 +
-Lc:\/msys\/1.0\/dev\/lib -lsword \/dev\/bin\/libcurl.dll \/dev\/lib\/libclucene.a -lz/' src/gnome2/Makefile > src/gnome2/Makefile2
 +
      cp src/gnome2/Makefile2 src/gnome2/Makefile
 +
      rm src/gnome2/Makefile2
 +
* run the script
 
* make
 
* make
      you will have to alter the makefile in libs to link against libcurl.dll (-lcurl doesn't work)
 
 
* make install
 
* make install
 
* run gnomesword
 
* run gnomesword
 
* getting gnomesword free from mingw is another topic.
 
  
 
* Windows XP look
 
* Windows XP look
Line 86: Line 204:
 
go to /dev/share/themes/MS-Windows/gtk-2.0
 
go to /dev/share/themes/MS-Windows/gtk-2.0
 
copy gtkrc to /dev/etc/gtk-2.0/gtkrc
 
copy gtkrc to /dev/etc/gtk-2.0/gtkrc
 +
 +
* Linking Gnomesword to avoid having console open:
 +
      in src/gnome2/Makefile, find GNOME_LIBS and add -mwindows to the end
 +
 +
* This will produce an executable that does not need the console. Unfortunately, when you run it, gconfd starts up and opens a console that remains open. This can be closed with no consequence to Gnomesword, but it is still annoying. The best way to run Gnomesword (if you're wanting to run without the console), is to create a .bat file in the gnomesword directory with this line:
 +
      start gnomesword %*
 +
 +
This will very briefly flash a console window which disappears immediately. Because gnucash does this as well, I think that we will probably have to include this file with the installer and link to it from the start menu.
 +
 +
==Moving Gnomesword to its own directory==
 +
 +
* Create a folder "C:\Program Files\Gnomesword"
 +
* under that, create bin, share, libexec, etc, lib
 +
* in bin, copy all of the dll's from /dev/bin
 +
* in bin, copy gnomesword.exe
 +
* in bin, copy gnome-open.exe, gpsawn-win32-helper-exe, gspawn-win32-helper-console.exe from /dev/bin
 +
* in etc, copy everything from /dev/etc
 +
* in lib, copy from /dev/lib bonobo (folder), bonobo-2.0 (folder), GConf (folder), gnome-vfs-2.0 (folder), gtk-2.0 (folder), gtkhtml (folder), libglade (folder), libgnomeprint (folder), locale (folder), orbit-2.0 (folder), libpango-1.0.dll.a, libpangocairo-1.0.dll.a, libpangoft2-1.0.dll.a, libpangowin32-1.0.dll.a
 +
* in libexec, you need bonobo-activation-server.exe and gconfd-2.exe, copied from /dev/libexec
 +
* in share, you need doc, gnome, gnomesword, gtkhtml-3.14, i18n, icons, idl, locale, locale-langpack (umm, mine I copied from linux), pixmaps, sword, themes, xml
 +
 +
I really don't know that everything here is necessary. Some of it definitely is, some perhaps not.
  
 
==Helpful links==
 
==Helpful links==
Line 105: Line 245:
  
 
# http://linux.softpedia.com/get/Text-Editing-Processing/IDEs/MinGW-Developer-Studio-14939.shtml Allows compiling and cross compiling of GTK applications
 
# http://linux.softpedia.com/get/Text-Editing-Processing/IDEs/MinGW-Developer-Studio-14939.shtml Allows compiling and cross compiling of GTK applications
 +
 +
 +
[[Category:SWORD Frontends]]

Latest revision as of 16:52, 10 January 2018

Read First

While almost everything on this page remains accurate, and is highly useful for a reference, this will no longer lead to a successful build against the 2.4.x branch. The biggest reason is the addition of using the ImageMagick api. Hopefully soon there will be a much smoother process for all of this.

Tools

For general tools, here are some recommendations:

  • svn: for commandline svn, try this:
     http://subversion.tigris.org/files/documents/15/44049/Setup-Subversion-1.5.3.msi

for windows explorer integrated, try this:

     http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.5.5.14361-win32-svn-1.5.4.msi?download
  • text editing: use an editor that handles unix line endings and preserves them. Examples include notepad++, vim (vi is included in msys), and emacs.
     emacs: http://ftp.gnu.org/gnu/emacs/windows/emacs-22.3-bin-i386.zip
     notepad++: http://downloads.sourceforge.net/notepad-plus/npp.5.1.1.Installer.exe?use_mirror=
  • zip: for commandline unzip, try this:
     http://gnuwin32.sourceforge.net/packages/unzip.htm

for windows gui (or command line), try 7zip:

     http://www.7-zip.org/
  • wget: for downloading via wget:
     http://gnuwin32.sourceforge.net/packages/wget.htm
  • gdb: for debugging:
     http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=20507&release_id=594520
  • gdb: the most useful thing to do with gdb is to place it directly into "C:\Program Files\CrossWire\Gnomesword\bin", open a windows command prompt, cd to that directory, and run from there. I do this to run Gnomesword without gdb as well.
  • console: I use Console2 from here:
     http://downloads.sourceforge.net/console/Console-2.00b141-Beta.zip
  • There have been various complaints and issues with the shell that comes with msys (specific to gnomesword, gdb doesn't play well with the msys shell), so I recommend using either Console2 above, or using the windows command prompt. Either way, you can start your normal bash session with this command:
     C:\msys\1.0\bin\sh --login
  • NOTE: please use only the tools recommended here. Especially, do not download and use other utilities from gnuwin32, because some of them have known conflicts. Also, do not use cygwin tools, or other perl distributions, etc. Unfortunately there are many different incompatible ports of various gnu tools. You have been warned!!

Setting up MinGW

A tutorial for how to set up a MinGW build environment.

  • Install MinGW base system only
     http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780
  • Install MSYS (Be sure to grab the current release installer, not the tech preview.)
     http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24963
  • Install msysDTK directly over msys (direct link to file)
     http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1
  • Install m4-1.4.7-MSYS into your msys /bin
     http://downloads.sourceforge.net/mingw/m4-1.4.7-MSYS.tar.bz2?modtime=1162303978&big_mirror=1
  • Install strawberry perl in default location
     http://strawberryperl.com/
  • Set the environment variable INTLTOOL_PERL=/path/to/strawberry/bin/perl by adding the following line to c:\msys\1.0\etc\profile:
     export INTLTOOL_PERL=/c/strawberry/perl/bin/perl

Setting up Utilities

For all the utilities, when you run configure do it with --prefix=/mingw

  • install gnome versions of utilities (direct links below)
create a directory c:\msys\1.0\dev
add this line to your profile
     export PATH=$PATH:/dev/bin:/c/mingw/bin    
unpack everything there
you need these utilities at this point:
all these are from http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
 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
 glib: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib_2.18.3-1_win32.zip
  • add this line to your profile
     export PKG_CONFIG_PATH=/dev/lib/pkgconfig
  • upgrade autoconf to 2.63 from source
     http://ftp.gnu.org/gnu/autoconf/
  • upgrade automake to 1.9 from source
     http://ftp.gnu.org/gnu/automake/

Compiling Sword

  • install libcurl
     http://curl.haxx.se/download.html
     (direct link) http://www.gknw.net/mirror/curl/win32/curl-7.19.0-devel-mingw32.zip
     everything in the zip file needs to be extracted to the appropriate directory under /dev
     you will need to make a directory /dev/lib/pkgconfig and put libcurl.pc there
     find curl-config script from linux and copy it to /mingw/bin
  • compile clucene
     http://downloads.sourceforge.net/clucene/clucene-core-0.9.21b.zip
     ./configure --prefix=/dev
     make
     make install
  • compile sword-1.5.11 from source
     use libcurl, not ftplib
     you will have to manually alter makefile to link against regex (do this in sword-1.5.11/lib/Makefile, line "#am__objects_3 = regex.lo", take out "#")
     compiling utilities is broken with mingw
     you do not need to compile with icu
     you will need to add -lz to sword-1.5.11/Makefile on the line "LIBS"

Download Gnome Libraries

  • download lots of gnome libs and unpack them in dev
     for everything, you need the normal and developer package
     atk: http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.24/atk_1.24.0-1_win32.zip
     atk-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.24/atk-dev_1.24.0-1_win32.zip      
     cairo: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.0-1_win32.zip
     cairo-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.8.0-1_win32.zip
     fontconfig: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig-2.4.2-tml-20071015.zip
     fontconfig-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig-dev-2.4.2-tml-20071015.zip
     freetype: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype-2.3.6.zip
     freetype-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype-dev-2.3.6.zip
     gail: http://ftp.gnome.org/pub/gnome/binaries/win32/gail/1.22/gail-1.22.0.zip
     gail-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/gail/1.22/gail-dev-1.22.0.zip
     gconf: http://ftp.gnome.org/pub/gnome/binaries/win32/GConf/2.22/GConf-2.22.0.zip
     gconf-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/GConf/2.22/GConf-dev-2.22.0.zip
     glib-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib-dev_2.18.3-1_win32.zip
     gnome-common: http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-common/2.11/gnome-common-2.11.0.zip
     gnome-doc-utils: http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-doc-utils/0.12/gnome-doc-utils-0.12.0.zip
     gnome-vfs: http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-vfs/2.24/gnome-vfs_2.24.0-1_win32.zip
     gnome-vfs-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-vfs/2.24/gnome-vfs-dev_2.24.0-1_win32.zip
     gtk+: http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+_2.14.5-1_win32.zip
     gtk+-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+-dev_2.14.5-1_win32.zip
     gtkhtml-3.18: http://ftp.gnome.org/pub/gnome/binaries/win32/gtkhtml/3.18/gtkhtml-3.18.2.zip
     gtkhtml-3.18-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/gtkhtml/3.18/gtkhtml-dev-3.18.2.zip
     intltool: http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
     intltool-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool-dev_0.40.4-1_win32.zip
     libart: http://ftp.gnome.org/pub/gnome/binaries/win32/libart_lgpl/2.3/libart_lgpl-2.3.20.zip
     libart-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libart_lgpl/2.3/libart_lgpl-dev-2.3.20.zip    
     libbonobo: http://ftp.gnome.org/pub/gnome/binaries/win32/libbonobo/2.24/libbonobo_2.24.0-1_win32.zip
     libbonobo-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libbonobo/2.24/libbonobo-dev_2.24.0-1_win32.zip
     libbonoboui: http://ftp.gnome.org/pub/gnome/binaries/win32/libbonoboui/2.24/libbonoboui_2.24.0-1_win32.zip
     libbonoboui-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libbonoboui/2.24/libbonoboui-dev_2.24.0-1_win32.zip
     libffi: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libffi_3.0.6-1_win32.zip
     libffi-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libffi-dev_3.0.6-1_win32.zip
     libglade: http://ftp.gnome.org/pub/gnome/binaries/win32/libglade/2.6/libglade_2.6.3-1_win32.zip
     libglade-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libglade/2.6/libglade-dev_2.6.3-1_win32.zip
     libgnome: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnome/2.24/libgnome_2.24.1-1_win32.zip
     libgnome-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnome/2.24/libgnome-dev_2.24.1-1_win32.zip
     libgnomecanvas: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomecanvas/2.20/libgnomecanvas-2.20.1.zip
     libgnomecanvas-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomecanvas/2.20/libgnomecanvas-dev-2.20.1.zip
     libgnomeprint: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeprint/2.12/libgnomeprint-2.12.1.zip
     libgnomeprint-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeprint/2.12/libgnomeprint-dev-2.12.1.zip
     libgnomeprintui: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeprintui/2.12/libgnomeprintui-2.12.1.zip
     libgnomeprintui-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeprintui/2.12/libgnomeprintui-dev-2.12.1.zip
     libiconv: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libiconv-1.9.1.bin.woe32.zip
     libIDL: http://ftp.gnome.org/pub/gnome/binaries/win32/libIDL/0.8/libIDL_0.8.11-1_win32.zip
     libIDL-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libIDL/0.8/libIDL-dev_0.8.11-1_win32.zip
     libpng: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.2.32-1_win32.zip
     libpng-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng-dev_1.2.32-1_win32.zip
     libxml2: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2-2.6.27.zip
     libxml2-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2-dev-2.6.27.zip
     orbit: http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2_2.14.16-1_win32.zip
     orbit-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2-dev_2.14.16-1_win32.zip
     popt: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/popt-1.10.2-tml-20050828.zip
     popt-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/popt-dev-1.10.2-tml-20050828.zip
     pthreads: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pthreads-win32-2.7.0.zip
     pthreads-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pthreads-win32-2.7.0.zip
     zlib: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-1.2.3.zip
     zlib-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-dev-1.2.3.zip
     pango: http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango_1.22.2-1_win32.zip
     pango-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango-dev_1.22.2-1_win32.zip
     expat: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat-2.0.0.zip
     gnurx: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libgnurx-2.5.zip
     gnurx-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libgnurx-dev-2.5.zip
     libgnomeui: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeui/2.22/libgnomeui-2.22.1.zip
     libgnomeui-dev: http://ftp.gnome.org/pub/gnome/binaries/win32/libgnomeui/2.22/libgnomeui-dev-2.22.1.zip
     libjpeg: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libjpeg-6b-4.zip

xml2po and themes

  • setup xml2po
     install python 2.5 http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi
     ensure that python is on your path (windows environment variable)
     edit /dev/bin/xml2po shebang line to just say #! python
     install python libxml2 from here: http://users.skynet.be/sbi/libxml-python/binaries/libxml2-python-2.6.27.win32-py2.5.exe
  • install iconv
     You will need this version of iconv http://gnuwin32.sourceforge.net/packages/libiconv.htm.
  • install gnome-icon-theme
     http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-icon-theme/2.24/gnome-icon-theme_2.24.0-1_win32.zip
     You may need to rename share/icons/gnome/ to share/icons/hicolor. This theme is required by the studypad

Compile Gnomesword

  • download gnomesword 2.4.1
  • alter configure script to allow compilation without scrollkeeper
     find the line "if test x$SCROLLKEEPER_CONFIG = xno; then
     comment this line and the next five lines, including this one:
     SCROLLKEEPER_BUILD_REQUIRED=0.3.5
  • update gnomesword to latest 2.4.x svn
  • save this to a shell script in your gnomesword directory (take out the forced linebreak)
     #! /bin/sh
     ./configure --enable-gtkhtml --disable-scrollkeeper --enable-maintainer-mode --prefix=/dev
     sed 's/SWORD_LIBS = -Lc:\/msys\/1.0\/dev\/lib -lsword -lz/SWORD_LIBS = [forced linebreak; remove]
-Lc:\/msys\/1.0\/dev\/lib -lsword \/dev\/bin\/libcurl.dll \/dev\/lib\/libclucene.a -lz/' src/gnome2/Makefile > src/gnome2/Makefile2
     cp src/gnome2/Makefile2 src/gnome2/Makefile
     rm src/gnome2/Makefile2
  • run the script
  • make
  • make install
  • run gnomesword
  • 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

  • Linking Gnomesword to avoid having console open:
     in src/gnome2/Makefile, find GNOME_LIBS and add -mwindows to the end
  • This will produce an executable that does not need the console. Unfortunately, when you run it, gconfd starts up and opens a console that remains open. This can be closed with no consequence to Gnomesword, but it is still annoying. The best way to run Gnomesword (if you're wanting to run without the console), is to create a .bat file in the gnomesword directory with this line:
     start gnomesword %*

This will very briefly flash a console window which disappears immediately. Because gnucash does this as well, I think that we will probably have to include this file with the installer and link to it from the start menu.

Moving Gnomesword to its own directory

  • Create a folder "C:\Program Files\Gnomesword"
  • under that, create bin, share, libexec, etc, lib
  • in bin, copy all of the dll's from /dev/bin
  • in bin, copy gnomesword.exe
  • in bin, copy gnome-open.exe, gpsawn-win32-helper-exe, gspawn-win32-helper-console.exe from /dev/bin
  • in etc, copy everything from /dev/etc
  • in lib, copy from /dev/lib bonobo (folder), bonobo-2.0 (folder), GConf (folder), gnome-vfs-2.0 (folder), gtk-2.0 (folder), gtkhtml (folder), libglade (folder), libgnomeprint (folder), locale (folder), orbit-2.0 (folder), libpango-1.0.dll.a, libpangocairo-1.0.dll.a, libpangoft2-1.0.dll.a, libpangowin32-1.0.dll.a
  • in libexec, you need bonobo-activation-server.exe and gconfd-2.exe, copied from /dev/libexec
  • in share, you need doc, gnome, gnomesword, gtkhtml-3.14, i18n, icons, idl, locale, locale-langpack (umm, mine I copied from linux), pixmaps, sword, themes, xml

I really don't know that everything here is necessary. Some of it definitely is, some perhaps not.

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