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 ==
[http://cygwin.com 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 [http://cygwin.com/setup.exe 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 [http://www.mingw.org/download.shtml !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 [http://mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite HOWTO on their site] that can be helpful with some other details.
== MSYS ==
*Download this: [https://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/msys-1.0.11/MSYS-1.0.11.exe/download]
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.
*Download and install this: [http://prdownloads.sourceforge.net/mingw/msysDTK-1.0.1.exe msysDTK-1.0.1.exe]
== Configuring MSYS ==
For how to setup the environment variables for MSYS, check out Max Berger's [http://max.berger.name/howto/cdt/ar01s03.jsp 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:
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!):
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'':
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 [http://www.7-zip.org/ 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:
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 [http://www.gtk.org/download-windows.html 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:
chmod -R a+rx /cygdrive/c/MinGW
== ASIO SDK ==
First, download the [http://www.steinberg.net/en/company/3rd_party_developer.html 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 ==
[http://www.jrsoftware.org/isinfo.php Inno Setup] is free installer generator for Windows. [http://www.istool.org/ !ISTool] is a nicer IDE for Inno scripts. This is used to assemble the Pd-extended installer.
[http://files.jrsoftware.org/ispack/ispack-5.2.3.exe ispack-5.2.3.exe] downloads and installs everything for you.
= 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:
svn co https://pure-data.svn.sourceforge.net/svnroot/pure-data/sources
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/
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:
*[http://www.pygame.org/wiki/MinGWBuildingDependenciesByHand?parent=MingW zlib, libpng, libjpeg, libtiff, and more]
== 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 [http://www.tdragon.net/recentgcc/ 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:
tar xzf gcc-4.3.0-20080502-mingw32-alpha-bin.tar.gz