To install Avisynth 3.0 with MinGW, we will need to install MinGW and the following libraries:
- STLport (another port of the STL (Standard Template Library))
- Boost (set of libraries, written in C++, used for the parser, the threads, the pointers, etc...)
- Freetype (a high quality font engine)
- Fontconfig (library for font customization and configuration)
- Nasm (the Netwide Assembler)
This section explains how to install MinGW (with MSYS) and these libraries, taking into account the system. We will download all the libraries in the same directory, say avs_main_dir, in the home directory. In a terminal, type
- Note:
- Shell commands are given throughout this section. Commands in each subsection are independant and can (have to...) be used as is to install the libraries.
First, download the following libraries in a folder, say C:/tmp.
From its home page, MinGW is a collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do not rely on any 3rd-party C runtime DLLs." In particular, the GNU gcc compiler is available for windows natively.
Again from the MinGW home page, "MSYS is A Minimal SYStem to provide POSIX/Bourne configure scripts the ability to execute and create a Makefile used by make." In particular, it allows to use tools like autoconf, automake, libtool, make, exactly like on a Unix system. This simplify the work when trying to make Avisynth compiling natively on windows and linux without too much extra work.
The plan of this section is the following:
MSYS is installed from an executable file which has been downloaded in the previous section. When you are asked to install it in a subdirectory, choose for example 'C:/Msys/1.0'. Warning: do not install it in any forlder that contains an empty space, like 'C:/Program Files'. Otherwise, the g++ compiler will not be able to compile any program.
MinGW is installed from an installer that download the needed programs from SourceForge. The installer has been downloaded previously. Execute the file and choose the "current" version of the files to install. Click on OK. Then, select only g++ in the packages to install. Click on OK. When you are asked to choose the folder where to install it, choose 'C:/Msys/1.0/mingw'.
All the programs that don't rely explicitely on mingw will be installed in /usr/local/bin (that is in C:/Msys/1.0/local/bin). So you have to add to the PATH variable the folders C:/Msys/1.0/local/bin and C:/Msys/1.0/mingw/bin. To do this, for W2K for example : go to the desktop, right click on 'My Computer' -> Properties -> Advanced tab -> Environment Variables -> select the Variable 'path' -> edit -> add the two folders above:
***;C:/Msys/1.0/bin;C:/Msys/1.0/mingw/bin
All the libraries that don't rely explicitely on mingw will be installed in /usr/local/lib (that is in C:/Msys/1.0/local/lib). So, to tell MinGW that libraries are in the this directory, you need to edit the file C:/Msys/1.0/etc/profile. Add this line:
export LD_LIBRARY_PATH="/usr/local/lib"
just before the last line (which should be cd "$HOME").
Finally, to check whether Msys and MinGW are installed correctly:
W2K: go to the desktop, double click on 'MSYS'. The MINGW32 terminal (or shell) will pop up, and you will see something like this
Try the following (the commands are linux commands):
if you installed everything correctly, you should get
$ g++
g++.exe: no input files
Install STLport in the /usr/local directory. OPen a MSYS terminal:
cd /c/tmp
tar jxvf STLport-5.0.2.tar.bz2
cd STLport/build/lib
make -f gcc.mak depend
make -f gcc.mak
make -f gcc.mak all-static
make -f gcc.mak install
make -f gcc.mak install-static
The libraries are located in STLport/lib and the headers in STLport/stlport.
- If one wants to install STLPort in /usr/local, go the the STLport directory and copy the files manually (while being root, of course):
cd ../..
cp lib/libstlport* /usr/local/lib/
cp -R stlport /usr/local/include/
- Note:
- STLport will be automatically found if installed in /usr/local.
Install Boost in the /usr/local directory:
cd ..
tar jxvf boost_1_33_1.tar.bz2
unzip boost-jam-3.1.12-1-ntx86.zip
cd boost_1_33_1
../boost-jam-3.1.12-1-ntx86/bjam "-sTOOLS=mingw" --prefix=/usr/local --with-thread install
Avisynth 3.0 displays text with a very efficient font engine, named Freetype. Install it in the /usr/local directory:
cd ..
tar jxvf freetype-2.2.1.tar.bz2
cd freetype-2.2.1
./configure --prefix=/usr/local --enable-shared
make
make install
Install Fontconfig in the /usr/local directory:
cd ..
tar jxvf fontconfig-2.3.2.tar.bz2
cd fontconfig-2.3.2
./configure --prefix=/usr/local
make
make install
Install nasm.exe in the /usr/local/bin directory:
cd ..
unzip nasm-0.98.39-win32.zip
cd nasm-0.98.39
cp nasmw.exe /usr/local/bin/nasm.exe
Now, we may build Avisynth 3.0 ! Just after having installed 3 more libraries.
Ok, ok, I'm kidding...
First we have to download the source code which is in cvs:
cd ..
cvs -z3 -d:pserver:anonymous@avisynth2.cvs.sourceforge.net:/cvsroot/avisynth2 login
cvs -z3 -d:pserver:anonymous@avisynth2.cvs.sourceforge.net:/cvsroot/avisynth2 co -r avisynth_3_0 avisynth
Avisynth 3.0 needs an extension to boost, not yet included in the current version of boost. This extension is provided in the build directory of avisynth. It suffices to unzip it and copy the files to the boost include directory:
cd avisynth/build
tar jxvf circular_buffer_v3.7.tar.bz2
cd circular_buffer
cp -R circular_buffer* boost /usr/local/include/boost-1_33_1/
And now, we can configure Avisynth 3.0:
cd ../linux
./booststrap.sh
./configure
- Note:
- If you want to make a debug build of Avisynth 3.0, just pass to the configure script the options --enable-core-debug (for Avisynth itself).
If you want to build this documentation, just pass to the configure script the options --enable-doc
To build Avisynth, we use the usual commands:
Generated on Sun Jul 30 18:46:52 2006 for Avisynth by
1.4.7