Setting up a Windows Build Environment: Difference between revisions

From Bluefish Wiki
Jump to navigation Jump to search
Note about aspell fix.
Update instructions to build the Windows build environment.
 
(8 intermediate revisions by 3 users not shown)
Line 6: Line 6:


* Socket code doesn't work so files can't be opened externally in a currently running copy of bluefish.
* 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 ===


== Setting up your Build Environment ==
If you are maintaining a build environment for Bluefish please check this subsection occasionally for important changes!


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.6/MinGW-5.1.6.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
;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.


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


when you are asked for the location (JFTR: this information will be put into <tt>/etc/fstab</tt> in the MSYS environment).
;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 know what you are doing, you might alternatively download and unpack (unzip/untar/...) the packages manually.
: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.




=== Recent Build Environment Changes ===
== Setting up your Build Environment ==


If you are maintaining a build environment for Bluefish please check this subsection occasionally for important changes!
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.


;2009-09-23:
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.
: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.


=== Updating the Build Environment ===


=== 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 <tt>mingw-get</tt> tool. To unzip things we need at least the <tt>unzip</tt> too:


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.
<pre>mingw-get update
mingw-get install msys-unzip msys-wget</pre>


;''MinGW Packages'' install into MingW root (<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/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] -->


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


;''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.24/atk_1.24.0-1_win32.zip atk_1.24.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/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/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]
Line 108: Line 86:
:[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.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.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/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-3.zip pkg-config-0.23-3.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:\Programs\msys\1.0\local\</tt> or <tt>C:\MinGW\local\</tt>)
;''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://subversion.tigris.org/files/documents/15/46518/svn-win32-1.6.5.zip svn-win32-1.6.5.zip]
:[http://sourceforge.net/projects/win32svn/files/1.6.15/svn-win32-1.6.15.zip/download svn-win32-1.6.15.zip]


=== The Perl Issue ===
=== The Perl Issue ===
Line 135: Line 114:
Further we need to adjust the macro search path for aclocal:
Further we need to adjust the macro search path for aclocal:


<pre>echo /local/share/aclocal > /share/aclocal/dirlist</pre>
<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:
Because of a linker bug in the <tt>gconftool-2</tt> binary add this symbolic link:
Line 150: Line 129:
Shawn Novak provides pre-compiled tarballs, which you just need to extract to <tt>/local</tt>:
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:\Programs\msys\1.0\local\</tt> or <tt>C:\MinGW\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/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/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]
:[http://www.muleslow.net/files/mingw/enchant-1.5.0-bin-MinGW-20090901.tbz2 enchant-1.5.0-bin-MinGW-20090901.tbz2]
Line 163: Line 142:


<pre>#!/bin/sh
<pre>#!/bin/sh
PATH="/opt/perl/bin:$PATH"
PATH="/opt/perl/bin:$PATH"
prefix=/local
prefix=/local
Line 176: Line 154:
The configure script is then called as follows together with the switches as shown above:
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>
<pre>./configure CONFIG_SITE=msys.site ...configure options see above...</pre>
</ref>
</ref>


Line 189: Line 167:
  ./configure --prefix=/local --disable-rpath --enable-win32-relocatable
  ./configure --prefix=/local --disable-rpath --enable-win32-relocatable


;[http://www.abisource.com/downloads/enchant/1.5.0/enchant-1.5.0.tar.gz Enchant 1.5.0]
;[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
  ./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''')
<!--;[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
  ./configure --prefix=/local --enable-utf8 --enable-unicode-properties
 
-->
;[http://ftp.gnome.org/pub/GNOME/sources/gucharmap/2.26/gucharmap-2.26.3.tar.bz2 gucharmap 2.26]
;[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.
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.
Line 212: Line 190:
== 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/trunk/bluefish</pre>
<pre>svn checkout https://bluefish.svn.sourceforge.net/svnroot/bluefish/trunk/bluefish</pre>
Line 226: Line 204:
== Debugging Bluefish ==
== Debugging Bluefish ==


For console debugging output, configure bluefish by passing '--enable-debugging-output' to <tt>./configure</tt>. Further CFLAGS should contain '-g' (default, also explicitely set by <tt>config.msys</tt>).
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>).


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)].
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)].
Line 232: Line 210:


== Create the Installer ==
== Create the Installer ==
To compile the Installer you'll need to have [http://nsis.sourceforge.net/Main_Page 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).
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).


To build the installer configure and build Bluefish with the following commands.
To build the installer configure and build Bluefish with the following commands.
Line 245: Line 223:
==Notes and references==
==Notes and references==
References: <references/>
References: <references/>
==See also==
[[Installing_Bluefish#Installing_Bluefish_on_Windows_XP.2FVista.2F7_.2832_bit.29|Existing win32 builds]]

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