How to build Pan on Windows FIXME: http://sources.redhat.com/ml/cygwin/1999-05/msg00249.html tells how to associate Pan.ico with Pan.exe Last updated May 4, 2004: Confirmed that these steps still work on a fresh Windows 98 box. If you have any feedback on how to make this build process easier, please contact me at charles@rebelbase.com. 1: MINGW =========== * MinGW (www.mingw.org) is the Minimalist GNU for Windows. Unlike cygwin, apps built with MinGW don't require any middleware libraries to run. That's why I chose it over cygwin for Pan. * Download the "MinGW" installer exe and install into c:\mingw\ . * Download the "MSYS" and "MSYS Developer Toolkit" installer exes and install into c:\msys\ . * Copy the .profile file from the bottom of this document into c:\msys\1.0\home\yourname. 2: LIBRARY PREREQUISITES ======================== I installed each of the prerequisites in its own directory underneath c:\msys\1.0\opt\, so that (1) they're easy to blow away piece-by-piece to upgrade to newer versions, and (2) they show up as /opt/gtk, /opt/libxml, and so on from msys, which is reasonably clear. If you choose a different hierarchy make sure to tweak your .profile. 2.1 GTK ======= + pan needs gtk to run. * Install the latest "GTK Runtime Environment" and "GTK Development Environment" -- *IN THAT ORDER* -- from http://sourceforge.net/projects/gtk-win/ into c:\msys\1.0\opt\gtk. I used version 2.2.4-3 for both. * edit /opt/gtk/bin/glib-gettextize, replace both occurances of "/target" with "/opt/gtk" * sanity check: you should now be able to run gtk-demo.exe from msys. * sanity check: the pixbuf demo inside of gtk-demo.exe should work without an error dialog. 2.2 LIBXML2 =========== + Pan needs libxml2 to run. * Snag a tarball from ftp://xmlsoft.org/ and untar it in your msys home directory. [Use libxml2-2.6.2 -- but 2.6.3 and higher break with "_imp__xmlFree undefined"] * ./configure --prefix=/opt/libxml2; make; make install * edit /opt/libxml2/lib/pkgconfig/libxml-2.0.pc: Add " -lws2_32 " to the end of the "Libs:" line. * Sanity check: "$ pkg-config --cflags libxml-2.0" should give meaningful output now. * Sanity check: "$ pkg-config --libs libxml-2.0" should also work, and include -lws2_32 2.3 PCRE ======== * Like XNews and slrn, Pan uses the perl-compatable regex library. * Download and unzip pre-built pcre "Binaries" and "Developers files" from http://gnuwin32.sourceforge.net/packages/pcre.htm to c:\msys\1.0\opt\pcre\ * Edit /opt/pcre/bin/pcre-config: + set 'prefix' to /opt/pcre + set 'exec_prefix_set' to yes * Sanity check: "$ pcre-config --libs" should return "-L/opt/pcre/lib -lpcre". 2.4 GNOME-COMMON (only needed when building Pan) ================================================================= + Both Pan and GNet's autogen.sh need gnome-common. Skip this step if you're building both Pan and GNet from tarballs. * Unroll a tarball from ftp.gnome.org/pub/gnome/sources/gnome-common to your msys home directory. * ./configure --prefix=/opt/gnome-common; make; make install * vi /opt/gnome-common/share/aclocal/gnome2-macros/autogen.sh -- change the values for REQUIRED_*_VERSION of autoconf, libtool, and automake to sync with the versions in msys. 2.5 PREREQUISITE SUMMARY ======================== * At this point, you must have the following subdirectories: + /opt/gtk + /opt/libxml2 + /opt/pcre * And, if you plan on building from CVS, you'll also need: + /opt/gnome-common 3: BUILDING PAN.EXE =================== * Get a tarball or CVS snapshot of Pan. * If building from CVS, make these changes: 1. Remove the lines "AC_PROG_INTLTOOL" and "AM_ICONV()" from configure.in. 2. Remove all mention of INTLTOOL, DESKTOP, and lines from the top-level Makefile.am (I'd welcome help from savvy hackers about how to avoid these removals.) * run ./autogen.sh from pan's top-level directory. This will take a long time. * *drum roll...* make! 4: BULDING PAN-SETUP.EXE ======================== * Install INNO Setup version 4 (or higher) from http://www.jrsoftware.org/is4.php * Open c:\msys\1.0\home\yourname\pan\pan.iss inside the inno installer * Should run and compile without a hitch, placing the setup file in c:\ APPENDIX: MY .profile ===================== # Life with MinGW export CFLAGS="$CFLAGS -mno-cygwin -mms-bitfields" export CPPFLAGS="$CPPFLAGS -I/c/mingw/include" export PATH="$PATH:/c/mingw/bin" export CVSROOT=":pserver:charles@cvs.gnome.org:/cvs/gnome" # GTK export GTK_HOME="/opt/gtk" export CPPFLAGS="$CPPFLAGS -I$GTK_HOME/include" export PATH="$GTK_HOME/bin:$GTK_HOME/lib:$PATH" export PKG_CONFIG_PATH="$GTK_HOME/lib/pkgconfig:$PKG_CONFIG_PATH" export ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $GTK_HOME/share/aclocal" export LIBICONV="$GTK_HOME/lib/iconv.dll" # LIBXML2 export LIBXML2_HOME="/opt/libxml2" export PKG_CONFIG_PATH="$LIBXML2_HOME/lib/pkgconfig:$PKG_CONFIG_PATH" # PCRE export PCRE_HOME="/opt/pcre" export PATH="$PATH:$PCRE_HOME/bin" # GNOME-COMMON # this section is only needed if you're building from CVS export GNOME_COMMON_HOME="/opt/gnome-common" export PATH="$PATH:$GNOME_COMMON_HOME/bin" export ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $GNOME_COMMON_HOME/share/aclocal"