Setting up a Windows Build Environment: Difference between revisions

From Bluefish Wiki
Jump to navigation Jump to search
m (Updaed PCRE package and config info)
(Update instructions to build the Windows build environment.)
 
(41 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[File:Win32r5079.png|320px|thumb|right]]
== Windows Build Status ==
 
Binary and plugins are running and should be fully functional. If you encounter unexpected behaviour or bugs, please report your problem to [https://bugzilla.gnome.org/enter_bug.cgi?product=bluefish our BTS].
 
=== Current Known Issues ===
 
* Socket code doesn't work so files can't be opened externally in a currently running copy of bluefish.
* Launching of external programs doesn't work.
* Editing of UTF files with a BOM headers is not currently supported.
 
=== Recent Build Environment Changes ===
 
If you are maintaining a build environment for Bluefish please check this subsection occasionally for important changes!
 
;2011-02-07
:The MingW project has created a new installer, which makes things much easier but also changes the way to create the build environment.
 
;2009-12-10
:If you build your own installers we now use a unicode version of NSIS, [http://www.scratchpaper.com/home Unicode NSIS], to support UTF-8 encoded translations.
 
;2009-09-23:
:The GNOME packages have been updated to reflect those versions which are included with Pidgin's GTK+ installer.  This is currently being used as our target runtime environment for the Installer version of Bluefish.  If you're first setting up your build environment you can skip this section as the information provided below is always up to date.  If you already have a build environment setup you will need to update a few packages to the versions provided below.  These include atk (1.26.0->1.24.0), glib (2.20.4->2.18.4), gtk+ (2.16.5->2.14.7), and pango (1.24.5->1.22.4).
 
:If you don't intend to run your builds of Bluefish outside of your MSYS environment this change is not required.  However if you do wish to do so and wish to remain with GTK+ 2.16 you can use the [http://gtk-win.sourceforge.net/ GTK-Win] installer.  This version is not officially supported by the windows development team as of yet because while it's fine for Bluefish it does break some features in Pidgin so keep this in mind if you use both programs.
 
 
== Setting up your Build Environment ==
 
The first step is of course to install and setup the MingW and MSYS environments. Start with the [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20101030/mingw-get-inst-20101030.exe/download automated MinGW installer]. When you are asked for the installation location you have to choose a path without spaces like <tt>C:\MinGW</tt> (but not necessarily this one). From the optional components choose at least the C++ compiler and the MSYS base system.
 
If you know what you are doing, you might alternatively download and unpack (unzip/untar/...) the packages manually or via the <tt>mingw-get</tt> tool.


== Windows Build Status ==


* Current Known issues:
=== Updating the Build Environment ===
** Socket code doesn't work so files can't be opened in a currently running copy of bluefish.


In a second step all further necessary software needs to be updated and/or installed. You can download and extract them manually or via the <tt>mingw-get</tt> tool. To unzip things we need at least the <tt>unzip</tt> too:


==Setting up your Build Environment==
<pre>mingw-get update
mingw-get install msys-unzip msys-wget</pre>


The first step is of course to download all the packages required.  You can extract them pretty much anywhere but for the purposes of this guide I used C:\MinGW.  Keep in mind that C:\MingGW will be the root directory (/) and that in MSYS /usr is the same as /, therefore /usr/local when viewed from the windows side will be C:\MinGW\local.
All MinGW and MSYS packages can be retrieved and installed using this way as long as some internet connection is available.


;<nowiki>/ (C:\MinGW)</nowiki> ''MSYS/MiNGW Packages''
We further need some software by third parties (GNOME packages and it's dependencies). Extract them to the location, where MSYS has been installed. This place is usually <tt>C:\MinGW\msys\1.0\</tt>. Keep in mind, that this place is equal to the root directory <tt>/</tt> and to <tt>/usr/</tt> (as both are the same) in MSYS. And also <tt>/local</tt> and <tt>/usr/local</tt> are equal too. ''We install all third party software into <tt>/usr/local</tt>!'':
:[http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download autoconf-2.63-1-msys-1.0.11-bin.tar.lzma]
:[http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download automake-1.11-1-msys-1.0.11-bin.tar.lzma]
:[http://zh.sourceforge.jp/frs/g_redir.php?m=jaist&f=%2Fmingw%2FGNU+Binutils%2FCurrent+Release_+GNU+binutils-2.19.1%2Fbinutils-2.19.1-mingw32-bin.tar.gz binutils-2.19.1-mingw32-bin.tar.gz]
:[http://sourceforge.net/projects/mingw/files/MSYS%20bison/bison-2.4.1-1/bison-2.4.1-1-msys-1.0.11-bin.tar.lzma/download bison-2.4.1-1-msys-1.0.11-bin.tar.lzma]
:[http://en.sourceforge.jp/frs/redir.php?m=jaist&f=%2Fmingw%2F35404%2Fcrypt-1.1-1-MSYS-1.0.11-1.tar.bz2 crypt-1.1-1-MSYS-1.0.11-1.tar.bz2]
:[http://en.sourceforge.jp/frs/redir.php?m=osdn&f=%2Fmingw%2F35404%2Fflex-2.5.33-MSYS-1.0.11-1.tar.bz2 flex-2.5.33-MSYS-1.0.11-1.tar.bz2]
:[http://en.sourceforge.jp/frs/redir.php?m=keihanna&f=%2Fmingw%2F35400%2Fgawk-3.1.5-MSYS-1.0.11-1.tar.bz2 gawk-3.1.5-MSYS-1.0.11-1.tar.bz2]
:[http://zh.sourceforge.jp/frs/redir.php?m=jaist&f=%2Fmingw%2F35108%2Fgcc-core-3.4.5-20060117-3.tar.gz gcc-core-3.4.5-20060117-3.tar.gz]
:[http://zh.sourceforge.jp/frs/redir.php?m=osdn&f=%2Fmingw%2F35108%2Fgcc-g%2B%2B-3.4.5-20060117-3.tar.gz gcc-g++-3.4.5-20060117-3.tar.gz]
:[http://zh.sourceforge.jp/frs/redir.php?m=jaist&f=%2Fmingw%2F35108%2Fgcc-g77-3.4.5-20060117-3.tar.gz gcc-g77-3.4.5-20060117-3.tar.gz]
:[http://zh.sourceforge.jp/frs/g_redir.php?m=jaist&f=%2Fmingw%2FGNU+Source-Level+Debugger%2FRelease+Candidate_+GDB+6.8-3%2Fgdb-6.8-mingw-3.tar.bz2 gdb-6.8-mingw-3.tar.bz2]
:[http://en.sourceforge.jp/frs/redir.php?m=keihanna&f=%2Fmingw%2F35404%2Fgdbm-1.8.3-MSYS-1.0.11-1.tar.bz2 gdbm-1.8.3-MSYS-1.0.11-1.tar.bz2]
:[http://en.sourceforge.jp/frs/redir.php?m=globalbase&f=%2Fmingw%2F35404%2Fguile-1.8.4-MSYS-1.0.11-1-bin.tar.gz guile-1.8.4-MSYS-1.0.11-1-bin.tar.gz]
:[http://en.sourceforge.jp/frs/redir.php?m=jaist&f=%2Fmingw%2F35404%2Fguile-1.8.4-MSYS-1.0.11-1-dll17.tar.gz guile-1.8.4-MSYS-1.0.11-1-dll17.tar.gz]
:[http://sourceforge.net/projects/mingw/files/MSYS%20gzip/gzip-1.3.12-1/gzip-1.3.12-1-msys-1.0.11-bin.tar.lzma/download gzip-1.3.12-1-msys-1.0.11-bin.tar]
:[http://downloads.sourceforge.net/project/mingw/MSYS%20libtool/libtool-2.2.7a-1/libltdl-2.2.7a-1-msys-1.0.11-dll-7.tar.lzma?use_mirror=iweb libltdl-2.2.7a-1-msys-1.0.11-dll-7.tar.lzma]
:[http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma]
:[http://en.sourceforge.jp/frs/redir.php?m=keihanna&f=%2Fmingw%2F35404%2Flndir-6.8.1.0-MSYS-1.0.11-1.tar.bz2 lndir-6.8.1.0-MSYS-1.0.11-1.tar.bz2]
:[http://sourceforge.net/projects/mingw/files/MSYS%20m4/m4-1.4.13-1/m4-1.4.13-1-msys-1.0.11-bin.tar.lzma/download m4-1.4.13-1-msys-1.0.11-bin.tar.lzma]
:[http://sourceforge.net/projects/mingw/files/MSYS%20man/man-1.6f-1/man-1.6f-1-msys-1.0.11-bin.tar.lzma/download man-1.6f-1-msys-1.0.11-bin.tar.lzma]
:[http://zh.sourceforge.jp/frs/g_redir.php?m=jaist&f=%2Fmingw%2FMinGW+Runtime%2Fmingwrt-3.15.2%2Fmingwrt-3.15.2-mingw32-dev.tar.gz mingwrt-3.15.2-mingw32-dev.tar.gz]
:[http://zh.sourceforge.jp/frs/g_redir.php?m=jaist&f=%2Fmingw%2FMinGW+Runtime%2Fmingwrt-3.15.2%2Fmingwrt-3.15.2-mingw32-dll.tar.gz mingwrt-3.15.2-mingw32-dll.tar.gz]
:[http://zh.sourceforge.jp/frs/g_redir.php?m=jaist&f=%2Fmingw%2FMinGW+Utilities%2Fmingw-utils%2Frelease+0.3%2Fmingw-utils-0.3.tar.gz mingw-utils-0.3.tar.gz]
:[http://en.sourceforge.jp/frs/redir.php?m=osdn&f=%2Fmingw%2F35400%2FmsysCORE-1.0.11-rc-1-bin.tar.gz msysCORE-1.0.11-rc-1-bin.tar.gz]
:[http://sourceforge.net/projects/mingw/files/MSYS%20perl/perl-5.6.1_2-1/perl-5.6.1_2-1-msys-1.0.11-bin.tar.lzma/download perl-5.6.1_2-1-msys-1.0.11-bin.tar.lzma]
:[http://subversion.tigris.org/files/documents/15/43931/svn-win32-1.5.3.zip svn-win32-1.5.3.zip]
:[http://en.sourceforge.jp/frs/redir.php?m=jaist&f=%2Fmingw%2F35404%2Fvim-7.1-MSYS-1.0.11-1-bin.tar.gz vim-7.1-MSYS-1.0.11-1-bin.tar.gz]
:[http://zh.sourceforge.jp/frs/g_redir.php?m=jaist&f=%2Fmingw%2FMinGW+API+for+MS-Windows%2FCurrent+Release_+w32api-3.13%2Fw32api-3.13-mingw32-dev.tar.gz w32api-3.13-mingw32-dev.tar.gz]


;<nowiki>/local (C:\MinGW\local)</nowiki> ''GNOME Packages''
;''GNOME Packages'' install into MSYS local directory "<tt>/local</tt>" (<tt>C:\MinGW\local\</tt> or <tt>C:\Programs\msys\1.0\local\</tt>)
:[http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.26/atk_1.26.0-1_win32.zip atk_1.26.0-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+-bundle_2.14.7-20090119_win32.zip gtk+-bundle_2.14.7-20090119_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.26/atk-dev_1.26.0-1_win32.zip atk-dev_1.26.0-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip expat_2.0.1-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat-dev_2.0.1-1_win32.zip expat-dev_2.0.1-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip intltool_0.40.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool-dev_0.40.4-1_win32.zip intltool-dev_0.40.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libgnurx-2.5.zip libgnurx-2.5.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libgnurx-dev-2.5.zip libgnurx-dev-2.5.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2_2.7.7-1_win32.zip libxml2_2.7.7-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2-dev_2.7.7-1_win32.zip libxml2-dev_2.7.7-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/GConf/2.22/GConf_2.22.0-3_win32.zip GConf_2.22.0-3_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/GConf/2.22/GConf-dev_2.22.0-3_win32.zip GConf-dev_2.22.0-3_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2_2.14.16-1_win32.zip ORBit2_2.14.16-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2-dev_2.14.16-1_win32.zip ORBit2-dev_2.14.16-1_win32.zip]
<!--:[http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.24/atk_1.24.0-1_win32.zip atk_1.24.0-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.24/atk-dev_1.24.0-1_win32.zip atk-dev_1.24.0-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.8-1_win32.zip cairo_1.8.8-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.8-1_win32.zip cairo_1.8.8-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.8.8-1_win32.zip cairo-dev_1.8.8-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.8.8-1_win32.zip cairo-dev_1.8.8-1_win32.zip]
Line 53: Line 68:
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev-0.17.zip gettext-runtime-dev-0.17.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev-0.17.zip gettext-runtime-dev-0.17.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-tools-0.17.zip gettext-tools-0.17.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-tools-0.17.zip gettext-tools-0.17.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.20/glib_2.20.4-1_win32.zip glib_2.20.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib_2.18.4-1_win32.zip glib_2.18.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.20/glib-dev_2.20.4-1_win32.zip glib-dev_2.20.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib-dev_2.18.4-1_win32.zip glib-dev_2.18.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-common/2.11/gnome-common-2.11.0.zip gnome-common-2.11.0.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/gnome-common/2.11/gnome-common-2.11.0.zip gnome-common-2.11.0.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+_2.16.5-1_win32.zip gtk+_2.16.5-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+_2.14.7-1_win32.zip gtk+_2.14.7-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+-dev_2.16.5-1_win32.zip gtk+-dev_2.16.5-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+-dev_2.14.7-1_win32.zip gtk+-dev_2.14.7-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip intltool_0.40.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip intltool_0.40.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool-dev_0.40.4-1_win32.zip intltool-dev_0.40.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/intltool/0.40/intltool-dev_0.40.4-1_win32.zip intltool-dev_0.40.4-1_win32.zip]
Line 69: Line 84:
:[http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2-dev_2.14.16-1_win32.zip ORBit2-dev_2.14.16-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2-dev_2.14.16-1_win32.zip ORBit2-dev_2.14.16-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2_2.14.16-1_win32.zip ORBit2_2.14.16-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/ORBit2/2.14/ORBit2_2.14.16-1_win32.zip ORBit2_2.14.16-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.24/pango_1.24.5-1_win32.zip pango_1.24.5-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango_1.22.4-1_win32.zip pango_1.22.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.24/pango-dev_1.24.5-1_win32.zip pango-dev_1.24.5-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango-dev_1.22.4-1_win32.zip pango-dev_1.22.4-1_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-0.23-2.zip pkg-config-0.23-2.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip pkg-config_0.23-3_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip pkg-config-dev_0.23-3_win32.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-1.2.3.zip zlib-1.2.3.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-1.2.3.zip zlib-1.2.3.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-dev-1.2.3.zip zlib-dev-1.2.3.zip]
:[http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-dev-1.2.3.zip zlib-dev-1.2.3.zip]-->
 
;''External Packages'' install into MSYS local directory "<tt>/local</tt>" (<tt>C:\MinGW\local\</tt> or <tt>C:\Programs\msys\1.0\local\</tt>)
:[http://sourceforge.net/projects/win32svn/files/1.6.15/svn-win32-1.6.15.zip/download svn-win32-1.6.15.zip]


;<nowiki>/local (C:\MinGW\local)</nowiki> ''Custom Packages''
=== The Perl Issue ===
:[ftp://kernel86.muleslow.net/mingw/pcre-7.9-bin-MinGW-20090902.tbz2 pcre-7.9-bin-MinGW-20090902.tbz2]
:[ftp://kernel86.muleslow.net/mingw/aspell-0.60.6-bin-MinGW-20090901.tbz2 aspell-0.60.6-bin-MinGW-20090901.tbz2]
:[ftp://kernel86.muleslow.net/mingw/enchant-1.5.0-bin-MinGW-20090901.tbz2 enchant-1.5.0-bin-MinGW-20090901.tbz2]


A full set of dictionaries for Aspell 0.60.6 can be found here: [ftp://kernel86.muleslow.net/mingw/aspell/lang/ ftp://kernel86.muleslow.net/mingw/aspell/lang/]
The last thing you need is Perl.  The MSYS version is 5.6.1 which is not new enough to pass the configure script for a lot of programs including Bluefish. I use the MSYS 5.6.1 version for autoconf/automake/autogen.sh and an external version such as [http://www.activestate.com/activeperl/ ActiveState's] for anything that needs a newer version. Install the ActivePerl Perl version. Then edit <tt>/etc/fstab</tt> in your MSYS enviroment (usually <tt></tt>) and add the following line:


The last thing you need is Perl.  The MSYS version is 5.6.1 which is not new enough to pass the configure script for a lot of programs including Bluefish.  I use the MSYS 5.6.1 version for autoconf/automake/autogen.sh and an external version such as ActiveState's in /opt/perl for anything that needs a newer version.
<pre>c:/programs/perl /opt/perl</pre>


so Perl is mounted to the MSYS environment.


== Configuring your Build Environment ==  
== Configuring your Build Environment ==  


You only need to set a few environment variables and settings as follows:
You might set a few environment variables as follows.
 
<pre>PATH="/bin:/local/bin:/opt/perl/bin"
<pre>PATH="/bin:/local/bin:/opt/perl/bin"
C_INCLUDE_PATH="/include:/local/include"
C_INCLUDE_PATH="/include:/local/include"
LIBRARY_PATH="/lib:/local/lib"
LIBRARY_PATH="/lib:/local/lib"</pre>
echo /local/share/aclocal > /share/aclocal/dirlist
ln -s /local/bin/libxml2-2.dll /local/bin/libxml2.dll</pre>


;Alternatively pass [http://bluefish.svn.sf.net/viewvc/bluefish/trunk/bluefish/config.site/config.msys our config.site script] for MSYS to configure to adjust PATH/CFLAGS/LDFLAGS easily.


To strip the prefixes from the Makefiles before you build Bluefish you can download or create this simple script I made, [ftp://kernel86.muleslow.net/mingw/strip_prefix.sh strip_prefix.sh]. Place it in /usr/local/bin or somewhere in the path.
Further we need to adjust the macro search path for aclocal:
 
<pre>echo /local/share/aclocal > /mingw/share/aclocal/dirlist</pre>
 
Because of a linker bug in the <tt>gconftool-2</tt> binary add this symbolic link:
 
<pre>ln -s /local/bin/libxml2-2.dll /local/bin/libxml2.dll</pre>
 
 
== Building External Packages ==
 
To build bluefish we need some libraries not available from the MinGW/MSYS project.
 
=== Installing Pre-Compiled Packages ===
 
Shawn Novak provides pre-compiled tarballs, which you just need to extract to <tt>/local</tt>:
 
;''Custom Packages'' install into MSYS local directory "<tt>/local</tt>" (<tt>C:\MinGW\local\</tt> or <tt>C:\Programs\msys\1.0\local\</tt>)
<!--:[http://www.muleslow.net/files/mingw/pcre-7.9-bin-MinGW-20090902.tbz2 pcre-7.9-bin-MinGW-20090902.tbz2]-->
:[http://www.muleslow.net/files/mingw/aspell-0.60.6-bin-MinGW-20090901.tbz2 aspell-0.60.6-bin-MinGW-20090901.tbz2]
:[http://www.muleslow.net/files/mingw/enchant-1.5.0-bin-MinGW-20090901.tbz2 enchant-1.5.0-bin-MinGW-20090901.tbz2]
 
A full set of dictionaries for Aspell 0.60.6 can be found here: [http://www.muleslow.net/files/aspell/lang/ http://www.muleslow.net/files/aspell/lang/]
 
=== Building and Installing from the Source ===
 
If you wish to build your own version of these custom packages, these are the configure parameters used for the ones provided.
<ref>Note by Daniel Leidert: I further pass a short <tt>msys.site</tt> script with the following content to <tt>configure</tt>:


strip_prefix.sh:
<pre>#!/bin/sh
<pre>#!/bin/sh
PATH="/opt/perl/bin:$PATH"
prefix=/local
exec_prefix='${prefix}'
enable_shared=yes
enable_static=no
enable_maintainer_mode=yes
LDFLAGS="-L/local/lib -L/lib"
CFLAGS="-g -Wall -O2 -I/local/include -I/include -mwindows"
CPPFLAGS="-g -Wall -O2 -I/local/include -I/include"</pre>
The configure script is then called as follows together with the switches as shown above:
<pre>./configure CONFIG_SITE=msys.site ...configure options see above...</pre>
</ref>
;[ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.6.tar.gz Aspell 0.60.6]
In the aspell source add
#include "asc_ctype.hpp"


for i in $(find ./ -name Makefile | grep -v plugin); do
to the includes at '''common/file_util.cpp'''.
    echo Checking: $i
    cat $i | sed s/'${prefix}\/'// | sed s/'${exec_prefix}\/'// > ${i}.tst
    rm $i
    mv ${i}.tst $i
done</pre>


./configure --prefix=/local --disable-rpath --enable-win32-relocatable
;[http://www.abisource.com/downloads/enchant/1.6.0/enchant-1.6.0.tar.gz Enchant 1.6.0]
./configure --prefix=/local --enable-aspell --disable-ispell --disable-myspell
<!--;[ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.tar.bz2 PCRE 7.9] (UTF-8 support is a '''must''')
./configure --prefix=/local --enable-utf8 --enable-unicode-properties
-->
;[http://ftp.gnome.org/pub/GNOME/sources/gucharmap/2.32/gucharmap-2.32.1.tar.bz2 gucharmap 2.32]
Unfortunately gucharmap does not build out-of-the-box. The following instructions were taken from the [http://article.gmane.org/gmane.comp.web.bluefish.devel/2197 mailing list]. First apply the following patch by Daniel Leidert [http://www.muleslow.net/files/mingw/patches/gucharmap26.diff gucharmap26.diff] and then configure with the following commands.
patch -p0 <gucharmap26.diff
intltoolize -f
libtoolize -f
aclocal -I m4/ --force
autoheader -f
automake -f
autoconf -f
./configure --disable-gconf --disable-schemas-install --disable-scrollkeeper


== Building Bluefish ==
== Building Bluefish ==


Check out the latest windows branch:
Check out the latest code from trunk:
<pre>svn checkout https://bluefish.svn.sourceforge.net/svnroot/bluefish/branches/bluefish_windows</pre>
 
<pre>svn checkout https://bluefish.svn.sourceforge.net/svnroot/bluefish/trunk/bluefish</pre>
 
Run <tt>autogen.sh</tt> (uses perl 5.6.1). Then run <tt>configure</tt> (make sure, Perl from <tt>/opt/perl/bin</tt> is used; e.g. adjust PATH) and make:


Run autogen.sh with perl 5.6.1 and then switch /bin/perl to your 5.8.1 or newer version or perl and run configure:
<pre>./autogen.sh
<pre>./configure LDFLAGS=-lgnurx CFLAGS=-mwindows
./configure CONFIG_SITE=config.site/config.msys
./strip_prefix.sh
make
make</pre>
make install</pre>


Drop the CFLAGS option to configure for a console window for debug output and of course run configure with '--enable-debugging-output' for a full debug build.


== Debugging Bluefish ==


== Building External Packages ==
For console debugging output, configure bluefish by passing '--enable-debugging-output' to <tt>./configure</tt>. Further CFLAGS should contain '-g' (default, also explicitly set by <tt>config.msys</tt>).
 
If you wish to build your own versions of the custom packages these are the configure parameters used for the ones provided.
For debugging crashes install the [https://sourceforge.net/projects/mingw/files/GNU%20Source-Level%20Debugger/Current%20Release_%20gdb-5.2.1/gdb-5.2.1-1.exe/download GNU Debugger (GDB)].


Aspell 0.60.6: ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.6.tar.gz
<pre>./configure --prefix=/local --disable-rpath --enable-win32-relocatable</pre>


Enchant 1.5.0: http://www.abisource.com/downloads/enchant/1.5.0/enchant-1.5.0.tar.gz
== Create the Installer ==
<pre>./configure --prefix=/local --enable-aspell --disable-ispell --disable-myspell</pre>
To compile the installer you'll need to have [http://www.scratchpaper.com/home Unicode NSIS] with the [http://nsis.sourceforge.net/UnTGZ_plug-in UnTGZ] plugin installed. You should also have makensis.exe in your path (such as in /opt/nsis).


PCRE 7.9: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.tar.bz2
To build the installer configure and build Bluefish with the following commands.
<pre>./configure --prefix=/local --enable-utf8 --enable-unicode-properties</pre>


gucharmap 2.26: http://ftp.gnome.org/pub/GNOME/sources/gucharmap/2.26/gucharmap-2.26.3.tar.bz2
<pre>
./configure CONFIG_SITE=win32/config.nsis
cd win32
make -f Makefile.mingw installer
</pre>


'' These instructions taken from the mailing list: http://article.gmane.org/gmane.comp.web.bluefish.devel/2197 ''


First apply the following patch by Daniel Leidert: [ftp://kernel86.muleslow.net/mingw/gucharmap26.diff gucharmap26.diff] and then configure with the following commands.
==Notes and references==
References: <references/>


<pre>intltoolize -f
==See also==
libtoolize -f
[[Installing_Bluefish#Installing_Bluefish_on_Windows_XP.2FVista.2F7_.2832_bit.29|Existing win32 builds]]
aclocal -I m4/ --force
autoheader -f
automake -f
autoconf -f
./configure --disable-gconf --disable-schemas-install --disable-scrollkeeper</pre>

Latest revision as of 17:55, 7 February 2011

Windows Build Status[edit]

Binary and plugins are running and should be fully functional. If you encounter unexpected behaviour or bugs, please report your problem to our BTS.

Current Known Issues[edit]

  • Socket code doesn't work so files can't be opened externally in a currently running copy of bluefish.
  • Launching of external programs doesn't work.
  • Editing of UTF files with a BOM headers is not currently supported.

Recent Build Environment Changes[edit]

If you are maintaining a build environment for Bluefish please check this subsection occasionally for important changes!

2011-02-07
The MingW project has created a new installer, which makes things much easier but also changes the way to create the build environment.
2009-12-10
If you build your own installers we now use a unicode version of NSIS, Unicode NSIS, to support UTF-8 encoded translations.
2009-09-23
The GNOME packages have been updated to reflect those versions which are included with Pidgin's GTK+ installer. This is currently being used as our target runtime environment for the Installer version of Bluefish. If you're first setting up your build environment you can skip this section as the information provided below is always up to date. If you already have a build environment setup you will need to update a few packages to the versions provided below. These include atk (1.26.0->1.24.0), glib (2.20.4->2.18.4), gtk+ (2.16.5->2.14.7), and pango (1.24.5->1.22.4).
If you don't intend to run your builds of Bluefish outside of your MSYS environment this change is not required. However if you do wish to do so and wish to remain with GTK+ 2.16 you can use the GTK-Win installer. This version is not officially supported by the windows development team as of yet because while it's fine for Bluefish it does break some features in Pidgin so keep this in mind if you use both programs.


Setting up your Build Environment[edit]

The first step is of course to install and setup the MingW and MSYS environments. Start with the automated MinGW installer. When you are asked for the installation location you have to choose a path without spaces like C:\MinGW (but not necessarily this one). From the optional components choose at least the C++ compiler and the MSYS base system.

If you know what you are doing, you might alternatively download and unpack (unzip/untar/...) the packages manually or via the mingw-get tool.


Updating the Build Environment[edit]

In a second step all further necessary software needs to be updated and/or installed. You can download and extract them manually or via the mingw-get tool. To unzip things we need at least the unzip too:

mingw-get update
mingw-get install msys-unzip msys-wget

All MinGW and MSYS packages can be retrieved and installed using this way as long as some internet connection is available.

We further need some software by third parties (GNOME packages and it's dependencies). Extract them to the location, where MSYS has been installed. This place is usually C:\MinGW\msys\1.0\. Keep in mind, that this place is equal to the root directory / and to /usr/ (as both are the same) in MSYS. And also /local and /usr/local are equal too. We install all third party software into /usr/local!:

GNOME Packages install into MSYS local directory "/local" (C:\MinGW\local\ or C:\Programs\msys\1.0\local\)
gtk+-bundle_2.14.7-20090119_win32.zip
expat_2.0.1-1_win32.zip
expat-dev_2.0.1-1_win32.zip
intltool_0.40.4-1_win32.zip
intltool-dev_0.40.4-1_win32.zip
libgnurx-2.5.zip
libgnurx-dev-2.5.zip
libxml2_2.7.7-1_win32.zip
libxml2-dev_2.7.7-1_win32.zip
GConf_2.22.0-3_win32.zip
GConf-dev_2.22.0-3_win32.zip
ORBit2_2.14.16-1_win32.zip
ORBit2-dev_2.14.16-1_win32.zip
External Packages install into MSYS local directory "/local" (C:\MinGW\local\ or C:\Programs\msys\1.0\local\)
svn-win32-1.6.15.zip

The Perl Issue[edit]

The last thing you need is Perl. The MSYS version is 5.6.1 which is not new enough to pass the configure script for a lot of programs including Bluefish. I use the MSYS 5.6.1 version for autoconf/automake/autogen.sh and an external version such as ActiveState's for anything that needs a newer version. Install the ActivePerl Perl version. Then edit /etc/fstab in your MSYS enviroment (usually ) and add the following line:

c:/programs/perl /opt/perl

so Perl is mounted to the MSYS environment.

Configuring your Build Environment[edit]

You might set a few environment variables as follows.

PATH="/bin:/local/bin:/opt/perl/bin"
C_INCLUDE_PATH="/include:/local/include"
LIBRARY_PATH="/lib:/local/lib"
Alternatively pass our config.site script for MSYS to configure to adjust PATH/CFLAGS/LDFLAGS easily.

Further we need to adjust the macro search path for aclocal:

echo /local/share/aclocal > /mingw/share/aclocal/dirlist

Because of a linker bug in the gconftool-2 binary add this symbolic link:

ln -s /local/bin/libxml2-2.dll /local/bin/libxml2.dll


Building External Packages[edit]

To build bluefish we need some libraries not available from the MinGW/MSYS project.

Installing Pre-Compiled Packages[edit]

Shawn Novak provides pre-compiled tarballs, which you just need to extract to /local:

Custom Packages install into MSYS local directory "/local" (C:\MinGW\local\ or C:\Programs\msys\1.0\local\)
aspell-0.60.6-bin-MinGW-20090901.tbz2
enchant-1.5.0-bin-MinGW-20090901.tbz2

A full set of dictionaries for Aspell 0.60.6 can be found here: http://www.muleslow.net/files/aspell/lang/

Building and Installing from the Source[edit]

If you wish to build your own version of these custom packages, these are the configure parameters used for the ones provided. <ref>Note by Daniel Leidert: I further pass a short msys.site script with the following content to configure:

#!/bin/sh
PATH="/opt/perl/bin:$PATH"
prefix=/local
exec_prefix='${prefix}'
enable_shared=yes
enable_static=no
enable_maintainer_mode=yes
LDFLAGS="-L/local/lib -L/lib"
CFLAGS="-g -Wall -O2 -I/local/include -I/include -mwindows"
CPPFLAGS="-g -Wall -O2 -I/local/include -I/include"

The configure script is then called as follows together with the switches as shown above:

./configure CONFIG_SITE=msys.site ...configure options see above...

</ref>

Aspell 0.60.6

In the aspell source add

#include "asc_ctype.hpp"

to the includes at common/file_util.cpp.

./configure --prefix=/local --disable-rpath --enable-win32-relocatable
Enchant 1.6.0
./configure --prefix=/local --enable-aspell --disable-ispell --disable-myspell
gucharmap 2.32

Unfortunately gucharmap does not build out-of-the-box. The following instructions were taken from the mailing list. First apply the following patch by Daniel Leidert gucharmap26.diff and then configure with the following commands.

patch -p0 <gucharmap26.diff
intltoolize -f
libtoolize -f
aclocal -I m4/ --force
autoheader -f
automake -f
autoconf -f
./configure --disable-gconf --disable-schemas-install --disable-scrollkeeper

Building Bluefish[edit]

Check out the latest code from trunk:

svn checkout https://bluefish.svn.sourceforge.net/svnroot/bluefish/trunk/bluefish

Run autogen.sh (uses perl 5.6.1). Then run configure (make sure, Perl from /opt/perl/bin is used; e.g. adjust PATH) and make:

./autogen.sh
./configure CONFIG_SITE=config.site/config.msys
make
make install


Debugging Bluefish[edit]

For console debugging output, configure bluefish by passing '--enable-debugging-output' to ./configure. Further CFLAGS should contain '-g' (default, also explicitly set by config.msys).

For debugging crashes install the GNU Debugger (GDB).


Create the Installer[edit]

To compile the installer you'll need to have Unicode NSIS with the UnTGZ plugin installed. You should also have makensis.exe in your path (such as in /opt/nsis).

To build the installer configure and build Bluefish with the following commands.

./configure CONFIG_SITE=win32/config.nsis
cd win32
make -f Makefile.mingw installer


Notes and references[edit]

References: <references/>

See also[edit]

Existing win32 builds