Newly Updated Windows Build Instructions HOWTO

You're new to the LinuxSampler world? You don't know where to start and nothing works? Here's the place to ask for help.
Post Reply
JickDuck
Newbie
Posts: 17
Joined: Tue Apr 20, 2010 10:17 pm

Newly Updated Windows Build Instructions HOWTO

Post by JickDuck » Sun Nov 07, 2010 9:29 pm

Windows Build Instructions HOWTO
by Andreas Persson
January 31th, 2010
Updated for Dummies by Jick Duck
November 7th, 2010


1. Introduction
These are instructions for building libgig, linuxsampler and gigedit on Windows (32 bit) with help of MinGW and MSYS. After the MinGW and MSYS environment and the other prerequisites are installed, the build procedure will be the same as in Linux, that is, basically: ./configure ; make ; make install.
The versions of the files to download are just the ones I used before updating this text. You can probably use later ones if available.
Some of the instructions below are marked with ** and ***:
** = only needed if you are going to build from CVS, not if you are using the tar file releases
*** = only needed if you are going to build gigedit

2. MinGW
Download the MinGW installer, mingw-get-inst-20101030.exe, from http://www.mingw.org/ You will find it on the left side of the page under "Navigation", click on "Downloads" then on "Automated MinGW Installer", then on "mingw-get-inst" then "mingw-get-inst-20100909". Here is the direct link:
http://sourceforge.net/projects/mingw/f ... e/download
Run the installer. Install to the default directory which should be "C:\MinGW", Choose "C compiler, C++compiler, and MinGW Developer Toolkit". The installer will automatically download and install further packages. After install, add C:\mingw\bin; to your PATH environment like this: Click on "start", then on "controll panel", then on "system", then on "advanced", then on "environment variables". Under "system variables" scroll down untill you see the "path" variable. Double click on path. In the window that pops up, under "variable value", add "C:\MinGW\bin;" at the begining of the line and click "ok", "ok", "ok".

3. pkg-config and gtkmm
The pkg-config tool is needed by the configure script in all the LinuxSampler packages. pkg-config is included in gtkmm, which is needed by gigedit. (If you are not going to build gigedit, you can download just GLib and pkg-config from http://www.gtk.org/ and extract it to C:\MinGW\msys\1.0\home\WhateverYourUserNameIs)
Download the gtkmm windows installer, gtkmm-win32-devel-2.22.0-1.exe, from http://www.gtkmm.org/. Click on "download" then scroll down and click on the word "installer" in the sentence "Windows: Here is an installer." Then again on "installer" (On the next page), than on "2.22", than on " gtkmm-win32-devel-2.22.0-1.exe " Here is the direct link:
http://ftp.gnome.org/pub/GNOME/binaries ... 22.0-1.exe
Run the installer and let it adjust the PATH variable as it wants. It should install to C:\gtkmm. Choose "full" install.

4. Omitted - no longer needed

5. ASIO SDK
In order for for you to see the correct directory structure using "My Computer", Start the MinGW shell (Msys) for the first time by clicking "start", then "all programs" then "MinGW" then MinGW Shell" You can close the shell after a few seconds. We will open it again later.
Download asiosdk2.2.zip from Steinberg. You will have to create an (free) account with Steinberg. Extract it to C:\MinGW\msys\1.0\home\WhateverYourUserNameIs

6. VST SDK
If you want to build the LinuxSampler VST plugin, download vst_sdk2_4_rev2.zip from Steinberg (note that you should not choose version 3). Extract it to
C:\MinGW\msys\1.0\home\WhateverYourUserNameIs

7. intltool ***
Download intltool_0.40.4-1_win32.zip from http://ftp.gnome.org/pub/GNOME/binaries/win32/intltool The direct link is
http://ftp.acc.umu.se/pub/GNOME/binarie ... _win32.zip
Unzip this into the gtkmm directory (C:\gtkmm)

8. Perl ***
The perl in MSYS is lacking an XML parser which is needed by intltool. Download ActivePerl from http://www.activestate.com/ Move the mouse over "resources", then over "Download Center" then click "active perl downloads", then on the blue box named "Download ActivePerl 5.12.2 for Windows (x86)"
Here is the direct link: http://downloads.activestate.com/Active ... 293621.msi
Run the installer. Use default options and and let it install to the default path which should be C:\Perl.

9. xsltproc ***
The gigedit Makefile wants to build the gigedit quick start documentation, so it needs the xsltproc command. Download from http://www.zlatkovic.com/pub/libxml libxslt-1.1.26.win32.zip The direct link is
ftp://ftp.zlatkovic.com/libxml/libxslt-1.1.26.win32.zip
Copy the contents of the bin directory from the zip file to a directory of your choice. Add this directory last in your msys PATH, for example: Create a directory called xsltproc in C:\MinGW\msys\1.0\home\WhateverYourUserNameIs. Copy the contents of the bin directory from the zip file to C:\MinGW\msys\1.0\home\WhateverYourUserNameIs Open the MinGW (Msys) shell as in step 5 and type:
export PATH=$PATH:$HOME/xsltproc

10. MSYS setup
Add the gtkmm aclocal directory to the list of extra directories used by autoconf. In the MinGW shell type:
echo "/c/gtkmm/share/aclocal" >> /mingw/share/aclocal/dirlist
Make sure pkg-config will find the libraries you build:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

*** The intltool scripts expect perl to be in /opt/perl/bin, so make a link to the ActivePerl installation. Also add ActivePerl to PATH:
mkdir -p /opt/perl/bin
ln -s /c/Perl/bin/perl.exe /opt/perl/bin
export PATH=/c/Perl/bin:$PATH
*** MinGW gettext and gtkmm both include libintl. We want the gtkmm version. Remove the MinGW files so the gettext configure tools don't choose the wrong version:
rm /mingw/include/libintl.h /mingw/lib/libintl*
*** The gettext configure tools also need:
export CPPFLAGS="-I/c/gtkmm/include"
export LDFLAGS="-L/c/gtkmm/lib"

In short, the first time you do steps 9 and 10 you should run the following commands in the MinGW shell: (you can copy and paste the following text. You paste in the mingw shell by right clicking the blue bar on top of the window - edit - paste).

export PATH=$PATH:$HOME/xsltproc
echo "/c/gtkmm/share/aclocal" >> /mingw/share/aclocal/dirlist
export PATH=/c/gtkmm/bin:$PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
mkdir -p /opt/perl/bin
ln -s /c/Perl/bin/perl.exe /opt/perl/bin
export PATH=/c/Perl/bin:$PATH
rm /mingw/include/libintl.h /mingw/lib/libintl*
export CPPFLAGS="-I/c/gtkmm/include"
export LDFLAGS="-L/c/gtkmm/lib"

Every time you close the shell and reopen it, you have to run the following commands:

export PATH=$PATH:$HOME/xsltproc
echo "/c/gtkmm/share/aclocal" >> /mingw/share/aclocal/dirlist
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PATH=/c/Perl/bin:$PATH
export CPPFLAGS="-I/c/gtkmm/include"
export LDFLAGS="-L/c/gtkmm/lib"

11. Building SQLite
The windows precompiled version of SQLite doesn't include the neccessary development files, so it's best to build SQLite yourself. Download sqlite-amalgamation-3.7.3.tar.gz from http://www.sqlite.org/ Click on "download", then "on sqlite-amalgamation-3.7.3.tar.gz". Direct link is
http://www.sqlite.org/sqlite-amalgamation-3.7.3.tar.gz
Copy the file to C:\MinGW\msys\1.0\home\WhateverYourUserNameIs. Then extract it in the mingw shell by typing
cd
tar xzf sqlite-amalgamation-3.7.3.tar.gz
Build and install:
cd sqlite-3.7.3
CFLAGS=-O2 ./configure
make
make install
(Without CFLAGS=-O2, the build will fail. The MinGW compiler has some problems with creating the debug info for some reason.)

12. Building libsndfile
The windows precompiled version of libsndfile doesn't include the neccessary pkg-config file, so it's best to build libsndfile yourself. Download libsndfile-1.0.21.tar.gz from http://www.mega-nerd.com/libsndfile/files/ The direct link is
http://www.mega-nerd.com/libsndfile/fil ... .21.tar.gz
NOTE: Do not download the latest libsndfile version (libsndfile-1.0.23.tar.gz). It will not compile. If anyone got it to compile in our mingw shell environment I'd be happy to know how. Copy the file to C:\MinGW\msys\1.0\home\WhateverYourUserNameIs. Extract it in mingw shell:
cd
tar xzf libsndfile-1.0.21.tar.gz
Build and install:
cd libsndfile-1.0.21
./configure
make
make install

13a. Building libgig
If your not building from CVS
Download libgig-3.3.0.tar.tar from here http://download.linuxsampler.org/packag ... .0.tar.bz2
Copy the file to C:\MinGW\msys\1.0\home\WhateverYourUserNameIs
Unpack the file:
cd
tar xaf libgig-3.3.0.tar.tar
Just use the same commands as you would in linux:
cd libgig-3.3.0
./configure (add any configuration parameters as you wish)
make
make install

- If you build from CVS -
Download cvs-1-11-22.zip from http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/ The direct link is here
http://ftp.gnu.org/non-gnu/cvs/binary/s ... -11-22.zip
Copy the file named cvs.exe (contained in the zip file) to C:\MinGW\msys\1.0\home\WhateverYourUserNameIs In the MinGW shell type
cd
cvs -z3 -d:pserver:anonymous@cvs.linuxsampler.org:/var/cvs/linuxsampler co libgig
(ignore the warnings)
Open the file C:\MinGW\msys\1.0\home\4150\libgig\configure.in in wordpad. At the end of the file you will see the following:
AC_OUTPUT( \
Doxyfile \
gig.pc \
libgig.spec \
Makefile \
src/Makefile \
src/testcases/Makefile \
doc/Makefile \
man/Makefile \
man/dlsdump.1 \
man/gigdump.1 \
man/gigextract.1 \
man/rifftree.1 \
debian/Makefile \
osx/Makefile \
osx/libgig.xcodeproj/Makefile \
win32/Makefile \
win32/libgig.dev \
)

Change it so that its without backslashes and all on one line:
AC_OUTPUT(Doxyfile gig.pc libgig.spec Makefile src/Makefile src/testcases/Makefile doc/Makefile man/Makefile man/dlsdump.1 man/gigdump.1 man/gigextract.1 man/rifftree.1 debian/Makefile osx/Makefile osx/libgig.xcodeproj/Makefile win32/Makefile win32/libgig.dev)

cd libgig
make -f Makefile.cvs
./configure (add any configuration parameters as you wish)
make
make install

13b. Installing libsf2 (CVS). - Only required if you are building linuxsampler from CVS and you want sf2 support. In the MinGW shell type
cd
cvs -z3 -d:pserver:anonymous@cvs.linuxsampler.org:/var/cvs/linuxsampler co libsf2
(ignore the warnings)
Open the file C:\MinGW\msys\1.0\home\4150\libsf2\configure.in in wordpad. At the end of the file you will see the following:
AC_OUTPUT( \
sf2.pc \
libsf2.spec \
Makefile \
src/Makefile \
)

Change it so that its without backslashes and all on one line:
AC_OUTPUT(sf2.pc libsf2.spec Makefile src/Makefile)

cd libsf2
make -f Makefile.cvs
./configure (add any configuration parameters as you wish)
make
make install

14. Building linuxsampler
If your not building from CVS
Download linuxsampler-1.0.0.tar.tar from here
http://download.linuxsampler.org/packag ... .0.tar.bz2
Copy the file to C:\MinGW\msys\1.0\home\WhateverYourUserNameIs
Unpack the file:
cd
tar xaf linuxsampler-1.0.0.tar.tar
cd linuxsampler-1.0.0

./configure --enable-asiosdk-dir=$HOME
You can also configure to compile with VST support by typing
./configure --enable-asiosdk-dir=$HOME --enable-vstsdk-dir=$HOME/vstsdk2.4
but I have not been able to get the non CVS version to compile with vst support. See post here http://bb.linuxsampler.org/viewtopic.php?f=6&t=533

make
make install

- If you build from CVS-
Building linuxsampler from cvs requires that you also build the latest libgig from cvs. In the MinGW shell type
cd
cvs -z3 -d:pserver:anonymous@cvs.linuxsampler.org:/var/cvs/linuxsampler co linuxsampler
(ignore the warnings)
Open the file C:\MinGW\msys\1.0\home\4150\linuxsampler\configure.in in wordpad. Towards the end of the file you will see the following:
AC_OUTPUT( \
Makefile \
man/Makefile \
man/linuxsampler.1 \
src/Makefile \
src/db/Makefile \
src/network/Makefile \
src/engines/Makefile \
src/engines/gig/Makefile \
src/engines/sf2/Makefile \
src/engines/sfz/Makefile \
src/engines/common/Makefile \
src/effects/Makefile \
src/common/Makefile \
src/testcases/Makefile \
src/drivers/Makefile \
src/drivers/audio/Makefile \
src/drivers/midi/Makefile \
src/plugins/Makefile \
src/hostplugins/Makefile \
src/hostplugins/dssi/Makefile \
src/hostplugins/lv2/Makefile \
src/hostplugins/vst/Makefile \
src/hostplugins/au/Makefile \
linuxsampler.spec \
debian/Makefile \
Artwork/Makefile \
scripts/Makefile \
osx/Makefile \
osx/linuxsampler.xcodeproj/Makefile \
Documentation/Makefile \
Documentation/Engines/Makefile \
Documentation/Engines/gig/Makefile \
linuxsampler.pc \
Doxyfile \
)

Change it so that its without backslashes and all on one line:
AC_OUTPUT(Makefile man/Makefile man/linuxsampler.1 src/Makefile src/db/Makefile src/network/Makefile src/engines/Makefile src/engines/gig/Makefile src/engines/sf2/Makefile src/engines/sfz/Makefile src/engines/common/Makefile src/effects/Makefile src/common/Makefile src/testcases/Makefile src/drivers/Makefile src/drivers/audio/Makefile src/drivers/midi/Makefile src/plugins/Makefile src/hostplugins/Makefile src/hostplugins/dssi/Makefile src/hostplugins/lv2/Makefile src/hostplugins/vst/Makefile src/hostplugins/au/Makefile linuxsampler.spec debian/Makefile Artwork/Makefile scripts/Makefile osx/Makefile osx/linuxsampler.xcodeproj/Makefile Documentation/Makefile Documentation/Engines/Makefile Documentation/Engines/gig/Makefile linuxsampler.pc Doxyfile)

cd linuxsampler
make -f Makefile.cvs
./configure --enable-asiosdk-dir=$HOME
You can also configure to compile with VST support by typing
./configure --enable-asiosdk-dir=$HOME --enable-vstsdk-dir=$HOME/vstsdk2.4
make
make install

15. Building gigedit
If your not building from CVS
Download gigedit-0.2.0.tar.gz from here http://download.linuxsampler.org/packag ... 2.0.tar.gz
Copy the file to C:\MinGW\msys\1.0\home\WhateverYourUserNameIs
Unpack the file:
In MinGW shell type
cd
tar xaf gigedit-0.2.0.tar.gz
cd gigedit-0.2.0
./configure
make
make install

- If you build from CVS - Building gigedit from cvs requires that you also build the latest libgig from cvs.
cd
cvs -z3 -d:pserver:anonymous@cvs.linuxsampler.org:/var/cvs/linuxsampler co gigedit
(ignore the warnings)
In the directory C:\gtkmm\bin you will see a file called libxml2-2.dll. Make a copy of that file and rename the copy to libxml2.dll and keep it in C:\gtkmm\bin
cd gigedit
make -f Makefile.cvs
./configure
make
make install

16. Last but not least.
Celebrate. You have benefited from my errors, experience, time, patience, and impatience to compile your linuxsampler!

-COMPILING QSAMPLER-
Compiling qsampler requires Qt. I have not had succes in building or installing qt in the mingw-msys environment. If anyone has step by step instructions, I would greatly appreciate it.

For any questions or comments please email me at jickduck@juno.com
Last edited by JickDuck on Mon Nov 08, 2010 3:51 am, edited 3 times in total.

JickDuck
Newbie
Posts: 17
Joined: Tue Apr 20, 2010 10:17 pm

Re: Windows Build Instructions HOWTO

Post by JickDuck » Sun Nov 07, 2010 9:36 pm

The guide above looks funny because I'm having trouble editing the text once it's pasted into the post window. When I scroll down, it jumps back to the top. How are you supossed to post?

Post Reply