[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-devel] Instructions for Building Pan from CVS for Windows

From: DPA
Subject: Re: [Pan-devel] Instructions for Building Pan from CVS for Windows
Date: Wed, 01 Mar 2006 13:03:01 -0500
User-agent: Thunderbird 1.5 (Windows/20051201)

Umm I have no idea how this got posted so many times, I am sorry if anyone received this multiple times.

DPA wrote:
Sorry for the long delay in doing this, I went back and downloaded a fresh copy from CVS and applied all the patches I had. After eliminating all the misc changes I made (It had gotten pretty dirty!) it seems that the only patches required were the ones that K.Haley posted. So outside of some tweaks to mingw all the credit for this should go to him.

I created an Installer package for the Win32 version and sent the link to Charles, earlier he offered to host it so if it passes his quality standards it hopefully will be available.
Any comments and suggestions for these instructions are encouraged!

My next project is to get Pan to build and run with a newer version of the GTK Runtime Enviroment.

Below is the Readme.mingw that Charles wrote. My additions and notes are added inline with: ****************************************

If you download MinGW 5.0.0 it asks you which version you would like to install; previous, current, or proposed. Select previous.
* MinGW ( 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\ .
Modify the file C:\MinGW\Include\Unistd.h to comment out lines 23 through 27. It should look similar to this:
/*int ftruncate(int, off_t);
__CRT_INLINE int ftruncate(int __fd, off_t __length)
 return _chsize (__fd, __length);
This change was necessary to resolve this error when compiling Pan (Anyone know a cleaner solution?): c:/mingw/include/unistd.h:23: error: conflicting types for 'g_win32_ftruncate' C:/msys/1.0/opt/gtk/include/glib-2.0/glib/gwin32.h:72: error: previous declaration of 'g_win32_ftruncate' was here c:/mingw/include/unistd.h:23: error: conflicting types for 'g_win32_ftruncate' C:/msys/1.0/opt/gtk/include/glib-2.0/glib/gwin32.h:72: error: previous declaration of 'g_win32_ftruncate' was here
* Copy the .profile file from the bottom of this document into
  c:\msys\1.0\home\yourname\.profile .

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* --
 into c:\msys\1.0\opt\gtk
 I used version 2.2.4-3 for both.
* edit /opt/gtk/bin/glib-gettextize, replace "/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.


+ Pan needs libxml2 to run.
* Snag a tarball from and untar it in your msys home directory. [Use libxml2-2.6.2, because 2.6.3 and higher break with "_impl__xmlFree undefined"] [Update: as of 2.6.16, _impl__xmlFree still persists, so stick with 2.6.2.]
* ./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"
 to c:\msys\1.0\opt\pcre\
* Edit /opt/pcre/bin/pcre-config:
 + set 'prefix' to /cygdrive/c/devel/pcre
 + set 'exec_prefix_set' to yes
* Update your .bash_profile. Make sure this version of pcre-config is ahead of the cygwin one in your path.
* Sanity check: "$ pcre-config --libs" should give meaningful output now.

2.4 GNOME-COMMON (only needed when building Pan from CVS)
+ Pan's needs gnome-common
* Unroll a tarball from to your msys home directory.
* ./configure --prefix=/opt/gnome-common; make; make install
* vi /opt/gnome-common/share/aclocal/gnome2-macros/ --
change the default values for autoconf, libtool, and automake to sync with the versions in msys.

* 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

* Get a tarball or CVS snapshot of Pan.
Checkout the latest snapshot from CVS with:
export CVSROOT=":pserver:address@hidden:/cvs/gnome"
cvs -z3 checkout pan
* If building from CVS, make these changes:
1. Remove the lines "AC_PROG_INTLTOOL" and "AM_ICONV()" from 2. Remove the INTLTOOL, DESKTOP, and PRODUCTIVITY lines from the top-level
 (I'd welcome help from savvy hackers about how to avoid these removals.)
Update the to install pcreposix.dll and libxml2.dll with the setup package:
---        Wed Dec 10 23:13:50 2003
+++   Sun Feb 26 23:32:38 2006
@@ -60,6 +60,8 @@
Source: "c:\msys\1.0\home\shk\pan\COPYING"; DestDir: "{app}";Components: component_app; Flags: ignoreversion Source: "c:\msys\1.0\home\shk\pan\CREDITS"; DestDir: "{app}";Components: component_app; Flags: ignoreversion Source: "c:\msys\1.0\home\shk\pan\"; DestDir: "{app}";DestName: "README.txt"; Components: component_app; Flags:ignoreversion +Source: "c:\msys\1.0\opt\pcre\bin\pcreposix.dll"; DestDir: "{app}";Components: component_app; Flags: ignoreversion +Source: "c:\msys\1.0\opt\gtk\lib\libxml2.dll"; DestDir: "{app}";Components: component_app; Flags: ignoreversion Source: "c:\msys\1.0\opt\pcre\bin\pcre.dll"; DestDir: "{sys}";Components: component_app; Flags: onlyifdoesntexist Source: "c:\msys\1.0\home\shk\pan\po\"; DestDir:"{reg:HKLM\SOFTWARE\GTK\2.0,Path|{app}}\share\locale\ca\LC_MESSAGES\";DestName: ""; Components: component_i18n; Flags: ignoreversion Source: "c:\msys\1.0\home\shk\pan\po\"; DestDir:"{reg:HKLM\SOFTWARE\GTK\2.0,Path|{app}}\share\locale\cs\LC_MESSAGES\";DestName: ""; Components: component_i18n; Flags: ignoreversion

Apply the following patches provided by K. Haley (Note: the patch to did not seem to work for me, but I think that is due to the old version of libxml I was running. I removed the line AC_PROG_INTLTOOL([0.21]) as Charles walkthrough described and it built and ran fine)
Index: gmime/gmime-stream.h
--- gmime/gmime-stream.h    (revision 159)
+++ gmime/gmime-stream.h    (working copy)
@@ -34,7 +34,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <stdarg.h>
+#include <stdio.h>
#include "gmime-type-utils.h"

#define GMIME_TYPE_STREAM            (g_mime_stream_get_type ())
Index: pan/util.c
--- pan/util.c    (revision 258)
+++ pan/util.c    (working copy)
@@ -24,12 +24,13 @@
#include <string.h>
#include <time.h>

+#include <glib.h>
+#include <gtk/gtk.h>
#ifdef G_OS_WIN32
#include <windows.h> /* for ShellExecute */

-#include <glib.h>
-#include <gtk/gtk.h>

#include <pan/base/argset.h>
#include <pan/base/debug.h>
@@ -241,7 +242,7 @@
pan_url_show (const char * url)
#ifdef G_OS_WIN32
-    ShellExecute (NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
+    ShellExecute (NULL, "open", url, NULL, NULL, /*SW_SHOWNORMAL*/ 1);
    const char * browser_string;
    const char * march;
Index: pan/prefs.c
--- pan/prefs.c    (revision 159)
+++ pan/prefs.c    (working copy)
@@ -107,6 +107,7 @@
#ifdef G_OS_WIN32
#define DEFAULT_EXTERNAL_EDITOR "notepad %t"
#define DEFAULT_WEB_BROWSER "mozilla %s"
#define DEFAULT_EXTERNAL_EDITOR "xterm -e vi %t"
---    (revision 313)
+++    (working copy)
@@ -9,7 +9,7 @@
+AC_PROG_INTLTOOL([0.21], [no-xml])

dnl init prerequisite versions
@@ -194,7 +194,7 @@
case $build_os in
-       CFLAGS="$CFLAGS -mms-bitfields -mwin32 -mwindows"
+       LIBS="$LIBS -lshell32 -lws2_32"
* run ./ from pan's top-level directory. This will take a long time.
* *drum roll...* make!

* Make sure pan.iss and exist
* go into pan/po/ directory and make the mo files
make mo doesn't seem to work for me so I had to do
msgfmt xx.po -o where xx is each country code. I could have scripted this or dug into why make mo did not work but it took less than 5 minutes to do it by hand so I just did it this way
* Install INNO Setup version 4 (or higher) from
* Open c:\msys\1.0\home\yourname\pan\pan.iss inside the inno installer
Edit the pan.iss file to change the paths to properly reflect your current paths so if your username is smith replace home\shk with home\smith
* Should compile and build without a hitch, placing the setup file in c:\

APPENDIX: MY .profile

 # Life with MinGW
 export CFLAGS="$CFLAGS -mwindows -mno-cygwin -mms-bitfields"
 export CPPFLAGS="$CPPFLAGS -I/c/mingw/include -DWINDOWS -DWIN32"
 export PATH="$PATH:/c/mingw/bin"
 export CVSROOT=":pserver:address@hidden:/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"

 export LIBXML2_HOME="/opt/libxml2"

 export PCRE_HOME="/opt/pcre"
 export PATH="$PATH:$PCRE_HOME/bin"

 # this is only needed if you're building from CVS
 export GNOME_COMMON_HOME="/opt/gnome-common"

 echo "Loaded .profile..."

Pan-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]