Dev:Mingw installation

From Synfig Studio :: Documentation
Revision as of 19:53, 9 January 2009 by Creek23 (Talk | contribs) ([ Gettext]: re-worded)

Jump to: navigation, search


First - download MinGW installer. You may get version 5.1.3 or higher (recommended).

Run MinGW-5.1.3.exe. Select "Download and install". Choose "Candidate" package, because "Current" is too old. When the installer asks which packages to install, select:

  • MinGW base tools
  • g++ Compiler
  • g77 Compiler
  • MinGW Make

Note: you really do need to install Fortran; even though Synfig does not require it, it is required by the autoconf configuration scripts. These are the minimal required package versions which are needed to successfully build win32 synfig:

  • mingw-runtime-3.12.tar.gz (429.7 Kb)
  • w32api-3.9.tar.gz (1.6 Mb)
  • binutils-2.17.50-20060824-1.tar.gz (8.9 Mb)
  • gcc-core-3.4.5-20060117-1.tar.gz (3.3 Mb)
  • gcc-g++-3.4.5-20060117-1.tar.gz (4.5 Mb)
  • gcc-g77-3.4.5-20060117-1.tar.gz (2.0 Mb)
  • mingw32-make-3.81-2.tar.gz (95 Kb)

Confirm default installation path C:\MinGW. If you install MinGW into another directory, synfig compilation may fail.


Now download and install MSYS - a shell and tools kit.

Run MSYS-1.0.10.exe, confirm default installation path C:\msys\1.0. Wait until installation completes. Then the installer opens a console and asks some questions.

This is a post install process that will try to normalize between
your MinGW install if any as well as your previous MSYS installs
if any. I don't have any traps as aborts will not hurt anything.
Do you wish to continue with the post install? [yn ]

Answer "y" here.

Do you have MinGW installed? [yn ]

Answer "y" here.

Please answer following the in the form of c:/foo/bar.
Where is your MinGW installation?

Answer "c:/mingw".

The installer script prints some text and finally writes:

Oh joy, you do not have c:/mingw/bin/make.exe. Keep it that way.

It's OK. The first phase of installation is completed. Press any key.

MSYS Developer Toolkit

Download MSYS Developer Toolkit, which contain such required tools as autoconf, automake, libtool, perl, pkg-tools, etc. Unfortunately, many tools included in MSYS DTK is too old and we need update it manually later.

Run msysDTK-1.0.1.exe. Confirm your MSYS installation path C:\msys\1.0. Nothing more. Installation will continue without any additional questions.


The current bash version is not enough for Synfig building and neither is the new 2.05b version. It contains an error and you need to:

  1. Download 3.1 snapshot: * (538.2 Kb)
  2. Make sure that all msys sessions are closed,
  3. then just decompress bash-3.1 directory from archive into C:\msys\1.0.

Also, you might want to edit C:\msys\1.0\msys.bat file. If so, do the following:

Look into the string which contain Find Replace
MINGW32BGCOLOR= {Any Color} Black
MINGW32FGCOLOR= {Any Color} White
start rxvt -backspacekey -fn Courier-12 -fn Courier-16


As written before, some tool are too old for Synfig build. For example, since revision 547 synfig required autoconf and automake, included in MSYS DTK are not acceptible. And we need replace them by new version.

  1. Download new autoconf from: (394.7 Kb)
  2. Decompress content of archive to C:\msys\1.0 directory.


  1. Download new automake from: (304 Kb)
  2. Decompress content of archive to C:\msys\1.0 directory.


In Synfig Core bootstrap file we can find that libtool prior to version 1.4.2 has an error in libltdl but msys has only 1.4e. I think - will be better to update it instead of patching.

  1. Download libtool 1.5 from: (411.3 Kb)
  2. Decompress content of archive to C:\msys\1.0 directory.


Starting from SVN 1143, Synfig offers support for internationalization (languages translations). For this, Gettext is needed.

  1. You'll need Cygwin project's gettext-devel package:
  2. Unpack the archive so that everything is under /usr/local instead of /usr.

Note: Any binaries that are not from the MinGW project (or not built specially for MSYS) cannot be placed in the /msys/1.0/bin (/bin and /usr/bin inside MSYS) directory. You then need to:

  1. hack the /usr/local/bin/autopoint script so that prefix is defined as /usr/local instead of /usr.
  2. Warning! Ugly hack follows
Autopoint expects to find an archive.tar.gz in usr/share, so copy gettext (found on usr/share/ on the archive) file structure to /usr/share also.

Update: If you insist a MSYS-compatible gettext-devel, try:

  • As of this post, gettext-devel-0.16.1-MSYS is being tested for problem-free Synfig compile.

Note: If you reload the GTK+ devel environment, make sure that you rename the autopoint script and gettext so that they don't conflict with the ones in msys. GTK\bin tends to show up first in the path, and those versions get picked by default.


Synfig requires mktemp for building, but for some unknown reason this tool is not installed by default in MinGW.

  1. Download the MinGW implementation of this tool from: (4 Kb)
  2. Decompress mktemp.exe from this archive to C:\msys\1.0\bin directory.


libtool requires the "file" tool to check filetypes of libraries.

  1. So we need to download it: (236.2 Kb)
  2. Decompress content of directory file-4.16 from the archive to C:\msys\1.0.

cygpath emulation

As far as I read, Cygwin only supports paths like /C/somedir/somefile. MinGW can use native windows paths also. Cygwin has a special tool for this (and some another features). MinGW has not. But several Synfig configure scripts require this tool so it will be better to make it. Just save the following text as C:\msys\1.0\bin\cygpath:

# A simple cygpath replacement

until [ -z "$1" ]
    if [ "${1:0:1}" != "-" ]; then
        echo $1 | sed -e 's/\\/\//g' -e 's/^\([a-zA-Z]\):/\/\1/g'


Early version of Synfig used pngtoico tool to produce icons from png files. Unfortunately this tool is broken now. You can see this for youeself by installing the official build of Synfig Studio 0.61.05. The latest versions of Synfig using another tool: png2ico. This tool is not perfect, but it works.

  1. Download it from: (89.9 Kb)
  2. And decompress png2ico.exe file to C:\msys\1.0\bin directory.

Non MinGW packages


Synfig source is stored in a subversion repository. You will need the svn client to get it. Also the svn client is required by the Synfig build scripts, to receive the revision number of the source. You can download the Windows subversion package from this page:

When I wrote this the latest version was 1.4.3:

But it is best to get the newest available version.


NSIS is the Nullsoft Scriptable Install System, a free and open source installer for WinAmp, a popular windows music player. When I wrote this the latest version was 2.27:

You can use this or any newer version.


When I wrote this the latest version was 6.3.4-10:

Note: The updated file has not been tested yet -- try here instead

ImageMagick is required to build Studio, also Core has an ImageMagick render target.



Go to this page and download the latest GTK+ devel package for windows:

^^ These links are broken :( Pixelgeek is researching alternate solutions

Though it's not yet tested, you can try either:

You need only install the following components:

  • Gtk+ Runtime (required)
  • Register Environment Variables
  • Devel header/libraries

Confirm registration for environment: MSYS (C:\msys\1.0).

Install GTK+ to C:\GTK.


Go to this page and download the latest GTKmm devel package for Windows:

If you opted for gtk-dev-2.12.9-win32-2.exe or gtk-dev-2.12.9-win32-1.exe pick this instead.

You need only install the following components:

  • libsigc++
  • cairomm
  • glibmm
  • gtkmm
  • libxml++

For each selected component you may keep only

  • Runtime
  • Development

subcategories. Install GTKmm to C:\GTK.

Collision Resolution

If you have several Gtk-applications (f.e. InkScape), you can receive a strange errors, like "the procedure entry point XML_SetDoctypeDeclHandler could not be located in the dynamic link library xmlparse.dll". Thats mean you have an old version of this library in windows system32 directory, installed by another program. Just search and rename/delete this old library and all will work perfectly again.