Personal tools
You are here: Home documentation developer WindowsMinGW514
Views
WindowsMinGW514 copied


Pd is easily built with free tools on Microsoft Windows. While you could probably use the most current versions of all of the packages below, the links provided are versions that are known to work. If you are upgrading from a previous installation of this setup, then you only really need to upgrade the files in C:\MinGW. The easiest way to do that is to delete the whole C:\MinGW folder, then run through the MinGW, MinGW Extras, and everything after that.

Cygwin

Cygwin is relatively easy to install and provides a much better working environment for things like subversion. MinGW lacks full support for some of the GNU utils, so install Cygwin's version also.

  • Download setup.exe and run it to install Cygwin. Install it in the default location.

Once you get to the Select Packages screen, click the button on the upper right corner labeled View and change it to Full. Now find make, openssh, patch, sed, svn, zip, and unzip and make sure they are set to install. This is represented by a version number to be installed instead of Skip.

MinGW

Download the MinGW package installer and run it:

Choose the Current distribution. In the pulldown menu labeled Select the type of install:, choose Full. The MinGW site has a HOWTO on their site that can be helpful with some other details.

MSYS

MSYS is a development environment built around MinGW. It provides many of the developer tools that Free Software developers are used to, like autoconf, make, etc. When the MSYS installer is done, it will pop up a cmd.exe window that is running a script. That script will ask you 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 (careful! it is a forward slash, and it is case sensitive!). 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. Now for msysDTK, you should just click through the installer, accepting all defaults.

Configuring MSYS

For how to setup the environment variables for MSYS, check out Max Berger's Setting up the compiler. Plus there are screenshots of the above process for installing MSYS. For the next steps, you will be using the MSYS shell that was installed from the MSYS installer. You can launch it from the Desktop shortcut or Start --> Programs --> MinGW --> MSYS --> msys. Once you are in the MSYS shell, you need to make /usr/local by running:

mkdir /usr/local

Now edit C:\msys\1.0\etc\fstab using a good text editor (Wordpad will work but not Notepad), or from within the MSYS shell, /etc/fstab. In that file, make sure you have these two lines (case is important!):

c:/MinGW /mingw
c:/MinGW /usr/local

Then quit all MSYS shells, and restart an MSYS shell, and check with the mount command that both of the above directories are mounted. To do that, run mount. You should see these lines within the rest:

...
c:\MinGW on /mingw type user (binmode)
c:\MinGW on /usr/local type user (binmode)
...

MSYS coreutils

There are a number of handy tools included in the package. In particular, the ffmpeg build system needs pr.exe from the MSYS coreutils package. First download the tarball to C:\msys\1.0:

Now extract the tarball into the MSYS folders using the MSYS shell( Start --> Programs --> MinGW --> MSYS --> msys). But since the tarball normally creates a 'coreutils-5.97' folder, we need to add the --strip-components 1:

cd /
tar --strip-components 1 -xjf coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2

7-Zip

7-Zip is a free Windows application for uncompressing all sorts of archives. It is the recommended way to uncompress the MinGW binaries. To install, download 7-Zip, then run thru the click-thru installer. Then you'll find 7-Zip on the Start Menu under Programs.

In 7-Zip, select all of the files you want to extract, click Extract, keep the Current pathnames setting, then choose C:\MinGW, then click OK. So it should end up looking something like this:

MinGW extras

Next download these and save them to C:\MinGW:

You can either use 7-Zip and extract to C:\MinGW, or do it in an MSYS shell. For MSYS, launch an MSYS shell from the Desktop shortcut or Start --> Programs --> MinGW --> MSYS --> msys. Once you are in the MSYS shell, install the tarballs by running:

cd /mingw
tar xzf mingw-utils-0.3.tar.gz
tar xjf autoconf2.5-2.61-1-bin.tar.bz2
tar xjf autoconf-4-1-bin.tar.bz2  
tar xjf automake1.10-1.10-1-bin.tar.bz2
tar xjf automake1.9-1.9.6-2-bin.tar.bz2
tar xjf automake-3-1-bin.tar.bz2
tar xzf libiconv-1.13-mingw32-bin.tar.gz
tar xzf libiconv-1.13-mingw32-dev.tar.gz
tar xzf libiconv-1.13-mingw32-dll-2.tar.gz
tar xjf gettext-0.16.1-1-bin.tar.bz2
tar xjf gettext-0.16.1-1-dll.tar.bz2
tar xzf mingw-libgnurx-2.5.1-dev.tar.gz
tar xzf mingw-libgnurx-2.5.1-bin.tar.gz

(Note: you might want to put the autoconf and automake tarballs above into C:\msys\1.0 since they really seem to be more MSYS tools than MinGW tools)

Binaries from GTK+

The GTK+ project provides a number of binaries for Windows. We use a few of them here. Next download these and save them to C:\MinGW:

Next you need to unzip all of these to C:\MinGW, the easiest way to do this is with 7-Zip like above.

OPTIONAL: You can also do this from a Cygwin shell, but you might have permissions problems. If you get errors like bad file number, that means the permissions aren't right. Give yourself Full Control on every file in C:\MinGW in order to fix this. To install via the command shell, launch an Cygwin shell from the Desktop shortcut or Start --> Programs --> Cygwin --> Cygwin Bash Shell. Once you are in the Cygwin shell, install the tarballs by running:

cd /cygdrive/c/MinGW
unzip pkg-config-0.23-2.zip
unzip glib_2.20.3-1_win32.zip
unzip freetype-2.3.6.zip
unzip freetype-dev-2.3.6.zip
chmod -R a+rx /cygdrive/c/MinGW

ASIO SDK

First, download the ASIO SDK. You have to agree to Steinberg's license, then submit an email address, then they'll send you the download URL in an email. Uncompress asiosdk2.2.zip into path/to/pd/asio so that the files are in path/to/pd/asio/ASIOSDK2.

Install Inno Setup package building

Inno Setup/ISTool

Inno Setup is free installer generator for Windows. ISTool is a nicer IDE for Inno scripts. This is used to assemble the Pd-extended installer.

Building from SVN '/sources'

For the rest of the libraries, you can get the sources from SVN and run this script to build it all:

cd pure-data
svn co https://pure-data.svn.sourceforge.net/svnroot/pure-data/sources
cd sources
./build-libs-on-mingw.sh

This will run for a while, and if it completes successfully, it will have installed all of the libraries needed for Pd-extended. It should be safe to run ./build-libs-on-mingw.sh again if something failed.

Building Pd-extended with MinGW

./configure doesn't yet work with MinGW, so you have to use this

svn co https://pure-data.svn.sourceforge.net/svnroot/pure-data/branches/pd-extended/0.41/
cd 0.41/pd/src
make -f makefile.mingw

Updating this Process

There are definitely some improvements that can be made to this up build process. MinGW is widely used, but its not widely standardized. So many people have many different ways of building common libs for MinGW. This process is an effort to unify them.

Libraries

Here are some documents that look to have some very useful info, but has not yet been incorporated into this process:

gcc 4.3

MinGW still uses gcc 3.4.5 and this is what Pd-extended uses to build everything. If you want, you can try newer versions of gcc. There are some test releases of current versions of gcc out there, for example ! The TDM builds or this 4.3.0 alpha build:

When you install it, it will replace the MinGW gcc 3.4.5. In the MSYS shell, run this to install:

cd /mingw
tar xzf gcc-4.3.0-20080502-mingw32-alpha-bin.tar.gz



Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser