Setting up a Windows Build Environment: Difference between revisions

From Bluefish Wiki
Jump to navigation Jump to search
m Comment out binutils for the moment.
Update instructions to build the Windows build environment.
 
(32 intermediate revisions by 3 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 ===


== Windows Build Status ==
* 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 ===


* Current Known issues:
If you are maintaining a build environment for Bluefish please check this subsection occasionally for important changes!
** Socket code doesn't work so files can't be opened in a currently running copy of bluefish.


;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.


== Setting up your 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.


The first step is of course to install and setup the MingW and MSYS environments. Start with the [https://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.4/MinGW-5.1.4.exe/download automated MinGW installer]. During installation choose the g++ compiler too ('''do not choose MingW make'''). The preferred location is <tt>C:\MinGW</tt>, but it's not necessary to choose this path. In a second step install the [https://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/Current%20Release_%20MSYS-1.0.11/MSYS-1.0.11.exe/download MSYS base system]. It will ask you for the location of the MingW environment. If you e.g. installed it to <tt>P:\Programs\MinGW</tt>, then type
;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).


<pre>p:/programs/mingw</pre>
: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.


when you are asked for the location (JFTR: this information will be put into <tt>/etc/fstab</tt> in the MSYS environment).


If you know what you are doing, you might alternatively download and unpack (unzip/untar/...) the packages manually.
== 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.


=== Updating the Build Environment ===
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.


In a second step all necessary software needs to be updated and/or installed. You can download and extract them manually. Extract them to the location, where MSYS has been installed. This place is usually <tt>C:\Programs\msys\1.0\</tt> (or <tt>C:\MingGW\</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. JFTR: Also <tt>/local</tt> and <tt>/usr/local</tt> are equal too.


=== Updating the Build Environment ===


;''MinGW Packages'' install into MingW root (<tt>C:\MinGW\</tt>)
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:
:[https://sourceforge.net/projects/mingw/files/MinGW%20API%20for%20MS-Windows/Current%20Release_%20w32api-3.13/w32api-3.13-mingw32-dev.tar.gz/download w32api-3.13-mingw32-dev.tar.gz]
:[https://sourceforge.net/projects/mingw/files/MinGW%20Utilities/mingw-utils/release%200.3/mingw-utils-0.3.tar.gz/download mingw-utils-0.3.tar.gz]
:[https://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingwrt-3.16/mingwrt-3.16-mingw32-dev.tar.gz/download mingwrt-3.16-mingw32-dev.tar.gz]
:[https://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingwrt-3.16/mingwrt-3.16-mingw32-dll.tar.gz/download mingwrt-3.16-mingw32-dll.tar.gz]
<!-- :[https://sourceforge.net/projects/mingw/files/GNU%20Binutils/Current%20Release_%20GNU%20binutils-2.19.1/binutils-2.19.1-mingw32-bin.tar.gz/download binutils-2.19.1-mingw32-bin.tar.gz] -->


<pre>mingw-get update
mingw-get install msys-unzip msys-wget</pre>


;''MSYS Packages'' install into MSYS root directory "<tt>/</tt>" (<tt>C:\Programs\msys\1.0\</tt> or <tt>C:\MinGW\</tt>)
All MinGW and MSYS packages can be retrieved and installed using this way as long as some internet connection is available.
:[https://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/Current%20Release_%20MSYS-1.0.11/msysCORE-1.0.11-bin.tar.gz/download msysCORE-1.0.11-bin.tar.gz]
:[https://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]
:[https://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]
:[https://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]
:[https://sourceforge.net/projects/mingw/files/MSYS%20bzip2/bzip2-1.0.5-1/bzip2-1.0.5-1-msys-1.0.11-bin.tar.gz/download bzip2-1.0.5-1-msys-1.0.11-bin.tar.gz]
:[https://sourceforge.net/projects/mingw/files/MSYS%20crypt/crypt-1.1_1-2/crypt-1.1_1-2-msys-1.0.11-bin.tar.lzma/download crypt-1.1_1-2-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20findutils/findutils-4.4.2-1/findutils-4.4.2-1-msys-1.0.11-bin.tar.lzma/download findutils-4.4.2-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20flex/flex-2.5.35-1/flex-2.5.35-1-msys-1.0.11-bin.tar.lzma/download flex-2.5.35-1-msys-1.0.11-bin.tar.lzma ]
:[https://sourceforge.net/projects/mingw/files/MSYS%20gawk/gawk-3.1.7-1/gawk-3.1.7-1-msys-1.0.11-bin.tar.lzma/download gawk-3.1.7-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20gdbm/gdbm-1.8.3-2/gdbm-1.8.3-2-msys-1.0.11-bin.tar.lzma/download gdbm-1.8.3-2-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20gettext/gettext-0.17-1/gettext-0.17-1-msys-1.0.11-bin.tar.lzma/download gettext-0.17-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20grep/grep-2.5.4-1/grep-2.5.4-1-msys-1.0.11-bin.tar.lzma/download grep-2.5.4-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20groff/groff-1.20.1-1/groff-1.20.1-1-msys-1.0.11-bin.tar.lzma/download groff-1.20.1-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20guile/guile-1.8.7-1/guile-1.8.7-1-msys-1.0.11-bin.tar.lzma/download guile-1.8.7-1-msys-1.0.11-bin.tar.lzma]
:[https://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.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20bzip2/bzip2-1.0.5-1/libbz2-1.0.5-1-msys-1.0.11-dll-1.tar.gz/download libbz2-1.0.5-1-msys-1.0.11-dll-1.tar.gz]
:[https://sourceforge.net/projects/mingw/files/MSYS%20crypt/crypt-1.1_1-2/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma/download libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20gdbm/gdbm-1.8.3-2/libgdbm-1.8.3-2-msys-1.0.11-dll-3.tar.lzma/download libgdbm-1.8.3-2-msys-1.0.11-dll-3.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20guile/guile-1.8.7-1/libguile-1.8.7-1-msys-1.0.11-dll-17.tar.lzma/download libguile-1.8.7-1-msys-1.0.11-dll-17.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-msys-1.0.11-bin.tar.lzma/download libiconv-1.13.1-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libltdl-2.2.7a-1-msys-1.0.11-dll-7.tar.lzma/download libltdl-2.2.7a-1-msys-1.0.11-dll-7.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20minires/minires-1.02_1-1/libminires-1.02_1-1-msys-1.0.11-dll.tar.lzma/download libminires-1.02_1-1-msys-1.0.11-dll.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20openssl/openssl-0.9.8k-1/libopenssl-0.9.8k-1-msys-1.0.11-dll-098.tar.lzma/download libopenssl-0.9.8k-1-msys-1.0.11-dll-098.tar.lzma ]
:[https://sourceforge.net/projects/mingw/files/MSYS%20regex/regex-1.20090805-1/libregex-1.20090805-1-msys-1.0.11-dll-1.tar.lzma/download libregex-1.20090805-1-msys-1.0.11-dll-1.tar.lzma]
:[https://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]
:[https://sourceforge.net/projects/mingw/files/MSYS%20lndir/lndir-1.0.1-1/lndir-1.0.1-1-msys-1.0.11-bin.tar.gz/download lndir-1.0.1-1-msys-1.0.11-bin.tar.gz]
:[https://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]
:[https://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]
:[https://sourceforge.net/projects/mingw/files/MSYS%20minires/minires-1.02_1-1/minires-1.02_1-1-msys-1.0.11-bin.tar.lzma/download minires-1.02_1-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20openssl/openssl-0.9.8k-1/openssl-0.9.8k-1-msys-1.0.11-bin.tar.lzma/download openssl-0.9.8k-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20patch/patch-2.5.9-1/patch-2.5.9-1-msys-1.0.11-bin.tar.lzma/download patch-2.5.9-1-msys-1.0.11-bin.tar.lzma]
:[https://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]
:[https://sourceforge.net/projects/mingw/files/MSYS%20sed/sed-4.2.1-1/sed-4.2.1-1-msys-1.0.11-bin.tar.lzma/download sed-4.2.1-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20tar/tar-1.22-1/tar-1.22-1-msys-1.0.11-bin.tar.lzma/download tar-1.22-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20vim/vim-7.2-1/vim-7.2-1-msys-1.0.11-bin.tar.lzma/download vim-7.2-1-msys-1.0.11-bin.tar.lzma]
:[https://sourceforge.net/projects/mingw/files/MSYS%20zlib/zlib-1.2.3-1/zlib-1.2.3-1-msys-1.0.11-dll.tar.gz/download zlib-1.2.3-1-msys-1.0.11-dll.tar.gz]


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>!'':


;''GNOME Packages'' install into MSYS local directory "<tt>/local</tt>" (<tt>C:\Programs\msys\1.0\local\</tt> or <tt>C:\MinGW\local\</tt>)
;''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 82: 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 98: 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]


;''External Packages'' install into MSYS local directory "<tt>/local</tt>" (<tt>C:\Programs\msys\1.0\local\</tt> or <tt>C:\MinGW\local\</tt>)
=== The Perl Issue ===
:[http://subversion.tigris.org/files/documents/15/46518/svn-win32-1.6.5.zip svn-win32-1.6.5.zip]
 
 
;''Custom Packages'' install into MSYS local directory "<tt>/local</tt>" (<tt>C:\Programs\msys\1.0\local\</tt> or <tt>C:\MinGW\local\</tt>)
:[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 [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:
Line 126: Line 104:
== 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.


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


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.
<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:


for i in $(find ./ -name Makefile | grep -v plugin); do
<pre>./configure CONFIG_SITE=msys.site ...configure options see above...</pre>
    echo Checking: $i
</ref>
    cat $i | sed s/'${prefix}\/'// | sed s/'${exec_prefix}\/'// > ${i}.tst
    rm $i
    mv ${i}.tst $i
done</pre>


;[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"
to the includes at '''common/file_util.cpp'''.
./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

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

  • 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, 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

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

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

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

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

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 /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

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

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

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

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

References: <references/>

See also

Existing win32 builds