Difference between revisions of "Dev:Mingw installation"

From Synfig Studio :: Documentation
Jump to: navigation, search
m ([http://sourceforge.net/projects/nsis/ NSIS])
(GTKmm)
 
(75 intermediate revisions by 10 users not shown)
Line 1: Line 1:
==MinGW==
+
<!--Categories-->
First - download [http://www.mingw.org/ MinGW] installer. You may get version 5.1.3 or higher (recommended).
+
{{Category|Building}}
 +
{{Category|Windows}}
  
* http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?big_mirror=1 (136K)
 
  
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:
+
==Updated Mingw==
 +
Welcome to the updated mingw page!
  
* MinGW base tools
+
Please you can also refer to this page: http://www.mingw.org/wiki/Getting_Started on how to install MingW
* 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:
+
Step 1 - Download [http://www.mingw.org/ MinGW] installer (mingw-get-setup.exe)
 +
Run mingw-get-setup.exe and follow the installation step (see Figure 1)
  
* mingw-runtime-3.11.tar.gz (416 Kb)
+
Figure 1: MinGW Setup. You can uncheck the checkbox highlighted in green if you prefer to use the command line option to install the required MinGW packages (see Note 2)
* w32api-3.8.tar.gz (1.54 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.gz (4.5 Mb)
+
* gcc-g77-3.4.5-20060117-1.tar.gz (2.0 Mb)
+
* mingw32-make-3.81-1.tar.gz (237.5 Kb)
+
* mingw32-make-3.80.0-3.tar.gz (928 Kb)
+
  
Confirm default installation path <code>C:\MinGW</code>. If you install MinGW into another directory, synfig compilation may fail.
+
[[File:Mingw-installation-step-1.png]]
  
===MSYS===
 
Now download and install MSYS - a shell and tools kit.
 
  
* http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?big_mirror=1 (2.8 Mb)
+
Step 2: Install the following packages using the MinGW Installer(see Figure 2)
 +
* MinGW Compiler Suit
 +
** C Compiler (selected always)
 +
** C++ Compiler (select it)
 +
** Fortran Compiler (select it)
 +
* MSYS Basic System (select it)
 +
* MinGW Developer Toolkit (select it)
  
Run MSYS-1.0.10.exe, confirm default installation path <code>C:\msys\1.0</code>. Wait until installation completes. Then the installer opens a console and asks some questions.
+
Note 1: 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 (version numbers from the 5.1.3 package):
  
''This is a post install process that will try to normalize between''<br />
+
* mingw-runtime-3.12.tar.gz (429.7 Kb)
''your MinGW install if any as well as your previous MSYS installs''<br />
+
* w32api-3.9.tar.gz (1.6 Mb)
''if any. I don't have any traps as aborts will not hurt anything.''<br />
+
* binutils-2.17.50-20060824-1.tar.gz (8.9 Mb)
''Do you wish to continue with the post install? [yn ]''
+
* 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)
  
Answer "y" here.
 
  
''Do you have MinGW installed? [yn ]''
+
Figure 2: Installing the required packages
  
Answer "y" here.
+
[[File:Mingw-installation.PNG]]
  
''Please answer following the in the form of c:/foo/bar.''<br />
 
''Where is your MinGW installation?''<br />
 
  
Answer "<code>c:/mingw</code>".
+
Note 2: Windows command line option for installing the required MinGW packages
 +
<pre> mingw-get.exe install gcc g++ fortran msys-base mingw-developer-toolkit </pre>
  
The installer script prints some text and finally writes:
+
Figure 3: package installation from the Windows command line
  
''Oh joy, you do not have c:/mingw/bin/make.exe. Keep it that way.''
+
[[File:Mingw-installation-cmd.PNG]]
  
It's OK. The first phase of installation is completed. Press any key.
+
Confirm default installation path <code>C:\MinGW</code>. If you install MinGW into another directory, synfig compilation may fail.
  
===MSYS Developer Toolkit===
+
===MSYS===
Download MSYS Developer Toolkit, which contain such required tools as [http://www.gnu.org/software/autoconf/ autoconf], [http://www.gnu.org/software/automake/ automake], [http://www.gnu.org/software/libtool/ libtool], [http://www.cpan.org/ perl], pkg-tools, etc.
+
This is installed when you install mingw if you selected, if you feel so necessary to install it open a mingw shell and run <code>mingw-get install msys-base</code> but this command might just be unnecessary
 
+
* http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?big_mirror=1 (10.29 Mb)
+
 
+
Run msysDTK-1.0.1.exe. Confirm your MSYS installation path <code>C:\msys\1.0</code>. Nothing more. Installation will continue without any additional questions.
+
 
+
===bash===
+
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 download 3.1 snapshot:
+
 
+
* http://downloads.sourceforge.net/mingw/bash-3.1-MSYS-1.0.11-snapshot.tar.bz2?big_mirror=1 (551K)
+
 
+
Make sure that all msys sessions are closed, then just decompress bash-3.1 directory from archive into <code>C:\msys\1.0</code>.
+
 
+
Also, you may want to edit <code>C:\msys\1.0\msys.bat</code> file. You may find string which contain <code>if "x%MINGW32BGCOLOR%" == "x" set MINGW32BGCOLOR=</code> and set <code>Black</code> as color. Into <code>if "x%MINGW32FGCOLOR%" == "x" set MINGW32FGCOLOR=</code> you may set color <code>White</code>. In string <code>start rxvt -backspacekey</code> you may replace <code>-fn Courier-12</code> to <code>-fn Courier-16</code>. In my opinion this makes msys sessions look better.
+
 
+
===[http://www.gnu.org/software/libtool/ libtool]===
+
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. Download libtool 1.5 from:
+
 
+
* http://downloads.sourceforge.net/mingw/msys-libtool-1.5.tar.bz2?big_mirror=1 (421 Kb)
+
 
+
Decompress content of archive to <code>C:\msys\1.0</code> directory.
+
 
+
===[http://www.mktemp.org/ mktemp]===
+
Synfig requires mktemp for building, but for some unknown reason this tool is not installed by default in MinGW. Download the MinGW implementation of this tool from:
+
 
+
* http://downloads.sourceforge.net/mingw/mktemp-1.5-MSYS.tar.bz2?big_mirror=1 (4 Kb)
+
 
+
Decompress mktemp.exe from this archive to <code>C:\msys\1.0\bin</code> directory.
+
 
+
===[http://darwinsys.com/file/ file]===
+
libtool requires the "file" tool to check filetypes of libraries. So we need to download it:
+
 
+
* http://downloads.sourceforge.net/mingw/file-4.16-MSYS-1.0.11-snapshot.tar.bz2?big_mirror=1 (241 Kb)
+
 
+
and decompress content of directory file-4.16 from the archive to <code>C:\msys\1.0</code>.
+
 
+
===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 <code>C:\msys\1.0\bin\cygpath</code>:
+
 
+
<pre>#!/bin/sh
+
# A simple cygpath replacement
+
 
+
until [ -z "$1" ]
+
do
+
    if [ "${1:0:1}" != "-" ]; then
+
        echo $1 | sed -e 's/\\/\//g' -e 's/^\([a-zA-Z]\):/\/\1/g'
+
    fi
+
    shift
+
done</pre>
+
  
 
===[http://www.winterdrache.de/freeware/png2ico/index.html png2ico]===
 
===[http://www.winterdrache.de/freeware/png2ico/index.html png2ico]===
Early version of Synfig used [http://www.kernel.org/pub/software/graphics/pngtoico/ pngtoico] tool to produce icons from png files. Unfortunately is tool is now broken. 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. Download it from:
+
Early version of Synfig used [http://www.kernel.org/pub/software/graphics/pngtoico/ 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.
 
+
* http://www.winterdrache.de/freeware/png2ico/data/png2ico-win-2002-12-08.zip (92 Kb)
+
  
And decompress png2ico.exe file to <code>C:\msys\1.0\bin</code> directory.
+
# Download it from: http://www.winterdrache.de/freeware/png2ico/data/png2ico-win-2002-12-08.zip (89.9 Kb)
 +
# And decompress png2ico.exe file to <code>'''C:\msys\1.0\bin'''</code> directory.
  
 
==Non MinGW packages==
 
==Non MinGW packages==
===[http://subversion.tigris.org Subversion]===
+
=== [http://git-scm.com/ Git] ===
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.
+
Synfig source is now stored in a git repository (https://github.com/synfig/synfig) - you can use [https://github.com/blackwarthog/synfig.git blackwarthog's] fork. You will need the git client to get it. Also, git is needed by the build scripts to receive the revision number of the source.
You can download the Windows subversion package from this page:
+
You can download the Windows git version from one of these page:
  
* http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
+
* http://git-scm.com/download
 +
* http://msysgit.github.io
  
When I wrote this the latest version was 1.4.3:
+
Get always the latest version available (version 1.9.5, link updated August 2015):
 +
* https://github.com/msysgit/msysgit/releases/download/Git-1.9.5-preview20150319/Git-1.9.5-preview20150319.exe
  
* http://subversion.tigris.org/files/documents/15/36797/svn-1.4.3-setup.exe (3.58 Mb)
+
After download and install (I recommend to install to custom folder C:\Git) you must add C:\Git\bin to the PATH. See here to know how to do that. http://www.mingw.org/wiki/Getting_Started (Environment Variables).
 
+
But it is best to get the newest available version.
+
  
 
===[http://sourceforge.net/projects/nsis/ NSIS]===
 
===[http://sourceforge.net/projects/nsis/ NSIS]===
NSIS is the Null Soft Installer System, a free and open source installer for WinAmp, a popular windows music player.
+
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:
+
  
* http://prdownloads.sourceforge.net/nsis/nsis-2.27-setup.exe?download (1.52 Mb)
+
The latest version as of August 2015 is 2.46:
 +
* http://downloads.sourceforge.net/nsis/nsis-2.46-setup.exe (1.6 Mb)
  
 
You can use this or any newer version.
 
You can use this or any newer version.
  
 
===[http://www.imagemagick.org ImageMagick]===
 
===[http://www.imagemagick.org ImageMagick]===
When I write this the latest version was 6.3.4-0:
+
When I wrote this the latest version was 6.3.4-10:
  
* http://www.imagemagick.org/download/binaries/ImageMagick-6.3.4-0-Q16-windows-dll.exe (7.23 Mb)
+
* http://www.imagemagick.org/download/binaries/ImageMagick-6.4.8-3-Q16-windows-dll.exe (11 MB)
  
ImageMagick is required for build Studio, also Core has ImageMagick render target.
+
'''Note:''' The ''updated'' file has not been tested yet -- try here instead http://www.imagemagick.org/download/www/binary-releases.html#windows
 +
 
 +
ImageMagick is required to build Studio, also Core has an ImageMagick render target.
  
 
==Gtk+/Gtkmm==
 
==Gtk+/Gtkmm==
 
===[http://www.gtk.org/ GTK+]===
 
===[http://www.gtk.org/ GTK+]===
Go at [http://gladewin32.sourceforge.net/modules/news/ this page] and download latest GTK+ devel package for windows:
+
Go to [http://gladewin32.sourceforge.net/modules/news/ this page] and download the latest GTK+ devel package for windows:
 +
 
 +
* http://gladewin32.sourceforge.net/modules/wfdownloads/visit.php?lid=110 (12 MB)
  
* http://downloads.sourceforge.net/gladewin32/gtk-dev-2.10.6-win32-1.exe?big_mirror=0 (11.41 Mb)
+
^^ These links are broken :( Pixelgeek is researching alternate solutions
  
You need only next components to be installed:
+
Though it's not yet tested, you can try either:
 +
* http://downloads.sourceforge.net/gladewin32/gtk-dev-2.12.9-win32-2.exe (16.7 MB)
 +
* http://downloads.sourceforge.net/gladewin32/gtk-dev-2.12.9-win32-1.exe (13,313 KB)
 +
 
 +
You need only install the following components:
  
 
* Gtk+ Runtime (required)
 
* Gtk+ Runtime (required)
Line 151: Line 107:
 
* Devel header/libraries
 
* Devel header/libraries
  
Confirm registration for environment: ''MSYS (C:\msys\1.0)''.
+
Confirm registration for environment: ''MSYS (C:\mingw\msys\1.0)''.
  
 
Install GTK+ to <code>C:\GTK</code>.
 
Install GTK+ to <code>C:\GTK</code>.
  
 
===[http://www.gtkmm.org/ GTKmm]===
 
===[http://www.gtkmm.org/ GTKmm]===
Go at [http://www.pcpm.ucl.ac.be/~gustin/win32_ports/gtkmm.html this page] and download latest GTK+ devel package for windows:
+
maybe this is useful to read too: http://live.gnome.org/gtkmm/MSWindows
 +
Go to [https://wiki.gnome.org/Projects/gtkmm/MSWindows this page] and download the latest GTKmm devel package for Windows:
  
* http://www.pcpm.ucl.ac.be/~gustin/win32_ports/binaries/gtkmm-devel-2.8.8-2.exe (16.65 Mb)
+
* http://ftp.gnome.org/pub/gnome/binaries/win32/gtkmm/2.10/gtkmm-win32-devel-2.10.8-1.exe (16.1 MB)
  
You need only next components to be installed:
+
If you opted for '''gtk-dev-2.12.9-win32-2.exe''' or '''gtk-dev-2.12.9-win32-1.exe''' pick this instead.
 +
* ftp://ftp.gnome.org/pub/GNOME/binaries/win32/gtkmm/2.10/gtkmm-win32-devel-2.10.11-1.exe (16.3 MB)
  
* libsigs++
+
You need only install the following components (footnote 1):
 +
 
 +
* libsigc++
 +
* cairomm
 
* glibmm
 
* glibmm
 
* gtkmm
 
* gtkmm
 
* libxml++
 
* libxml++
  
For each of selected component you may keep only
+
(1) if you're using gtkmm-win32-devel-2.16.0-4.exe, then pangomm is a required component. 
 +
 
 +
For each selected component you may keep only
  
 
* Runtime
 
* Runtime
 
* Development
 
* Development
  
subcategories. Install GTKmm to <code>C:\GTK</code>.
+
subcategories. Install GTKmm to <code>'''C:\GTK'''</code>.
 +
 
 +
===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.
 +
 
 +
===Troubleshooting===
 +
Test whether MSYS can find MinGW by running:
 +
 
 +
$ gcc --version
 +
 
 +
If it replies command not found, MSYS can't see MinGW. In that case, you will need to edit the text file C:\msys\1.0\etc\fstab so that it includes the line:
  
[[Category:Windows]]
+
c:/MinGW /mingw

Latest revision as of 13:05, 19 October 2015


Updated Mingw

Welcome to the updated mingw page!

Please you can also refer to this page: http://www.mingw.org/wiki/Getting_Started on how to install MingW

Step 1 - Download MinGW installer (mingw-get-setup.exe) Run mingw-get-setup.exe and follow the installation step (see Figure 1)

Figure 1: MinGW Setup. You can uncheck the checkbox highlighted in green if you prefer to use the command line option to install the required MinGW packages (see Note 2)

Mingw-installation-step-1.png


Step 2: Install the following packages using the MinGW Installer(see Figure 2)

  • MinGW Compiler Suit
    • C Compiler (selected always)
    • C++ Compiler (select it)
    • Fortran Compiler (select it)
  • MSYS Basic System (select it)
  • MinGW Developer Toolkit (select it)

Note 1: 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 (version numbers from the 5.1.3 package):

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


Figure 2: Installing the required packages

Mingw-installation.PNG


Note 2: Windows command line option for installing the required MinGW packages

 mingw-get.exe install gcc g++ fortran msys-base mingw-developer-toolkit 

Figure 3: package installation from the Windows command line

Mingw-installation-cmd.PNG

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

MSYS

This is installed when you install mingw if you selected, if you feel so necessary to install it open a mingw shell and run mingw-get install msys-base but this command might just be unnecessary

png2ico

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: http://www.winterdrache.de/freeware/png2ico/data/png2ico-win-2002-12-08.zip (89.9 Kb)
  2. And decompress png2ico.exe file to C:\msys\1.0\bin directory.

Non MinGW packages

Git

Synfig source is now stored in a git repository (https://github.com/synfig/synfig) - you can use blackwarthog's fork. You will need the git client to get it. Also, git is needed by the build scripts to receive the revision number of the source. You can download the Windows git version from one of these page:

Get always the latest version available (version 1.9.5, link updated August 2015):

After download and install (I recommend to install to custom folder C:\Git) you must add C:\Git\bin to the PATH. See here to know how to do that. http://www.mingw.org/wiki/Getting_Started (Environment Variables).

NSIS

NSIS is the Nullsoft Scriptable Install System, a free and open source installer for WinAmp, a popular windows music player.

The latest version as of August 2015 is 2.46:

You can use this or any newer version.

ImageMagick

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

Note: The updated file has not been tested yet -- try here instead http://www.imagemagick.org/download/www/binary-releases.html#windows

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

Gtk+/Gtkmm

GTK+

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:\mingw\msys\1.0).

Install GTK+ to C:\GTK.

GTKmm

maybe this is useful to read too: http://live.gnome.org/gtkmm/MSWindows

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 (footnote 1):

  • libsigc++
  • cairomm
  • glibmm
  • gtkmm
  • libxml++
(1) if you're using gtkmm-win32-devel-2.16.0-4.exe, then pangomm is a required component.  

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.

Troubleshooting

Test whether MSYS can find MinGW by running:

$ gcc --version

If it replies command not found, MSYS can't see MinGW. In that case, you will need to edit the text file C:\msys\1.0\etc\fstab so that it includes the line:

c:/MinGW /mingw