[mmap] partial revert of 8cef8db4 to disable using mmap file reader
[videoplayer.git] / INSTALL.win32
blob10a64da64f9692632c847656cd50b57c4c7175d0
1 Real Time Video Player for raw YUV files
3 To build on Windows systems
4 ---------------------------
6 These instructions decribe how i built the videoplayer application on the
7 windows platform using either the Microsoft MSVC compiler, or the MinGw
8 gcc toolchain.
10 There are other methods, including cross-compiling for windows using the
11 mingw cross compiler on a linux box. Addittionaly, qmake can generate a
12 visual studio project file to compile the videplayer program within the
13 MSVC gui if required. 
15 You may change the path names described as you need to, but ensure that
16 the videoplayer.pro file and FTGL makefile are updated to suit.
18 Prerequisites: Qt 4.2.3 or later Commercial or Open Source Edition, www.trolltech.com
19                A c++ compiler, Microsoft Visual C++ (Express is ok) or the mingw/msys suite
20                The Boost libraries, www.boost.org
21                The GLEW library glew.sourceforge.net
22                
23 Optionally for on-screen-display rendering:
24                The FreeType library freetype.sourceforge.net
25                The FTGL library ftgl.wiki.sourceforge.net
26                
28 Building with the Microsoft Visual C++ tools
29 --------------------------------------------
31 Make a directory to build the dependancies in. I made c:\libs-msvc2008
33 a) Boost
35         Download the Boost source code. I got boost_1_35_0.zip
36         Unpack the archive into c:\libs-msvc2008
38         Download a boost-jam precompiled binary from sourceforge, following the
39         instructions in the 'getting started' section of the Boost documentation.
41         Unzip the boost-jam package to place the bjam.exe in 
42         c:\libs-msvc2008\boost_1_35_0
44         Open a "Visual Studio 2008 Command Prompt" window from the MSVC entry
45         of the Start menu.
47         c:
48         cd c:\libs-msvc2008\boost_1_35_0
49         bjam --toolset=msvc stage link=static runtime-link=static variant=debug,release --with-program_options --layout=system
51         The compiled boost program_options library is now in 
52         c:\libs-msvc2008\boost_1_35_0\stage\lib
54 b) GLEW
56         Download the GLEW source code. I got glew-1.5.0-src.zip
57         Unpack the archive into c:\libs-msvc2008
59         Open c:\libs-msvc2008\glew\build\vc6\glew.dsw with Visual Studio
60         Click 'Yes to All' when prompted to update the project file to the latest version
62         Build the debug and release version of glew_static using the MSVC gui
64         The compiled GLEW libraries will be in c:\libs-msvc2008\glew\lib
66 c) FreeType
68         Download the freetype library. I got ft235.zip
69         Unpack the archive into c:\libs-msvc2008
71         Open c:\libs-msvc2008\freetype\builds\win32\visualc\freetype.vcproj
73         Build the debug and release version of freetype using the MSVC gui
74         
76 d) FTGL
78         Download the FTGL library. I got ftgl-2.1.2.tgz
79         You can use winzip or another suitable tool to decompress the .tghz archive
80         Unpack the archive into c:\libs-msvc2008
82         Open c:\libs-msvc2008\FTGL\ftgl.dsw
84         
85         Right click 'ftgl_static_lib' in the Solution and select 'properties'
86         Select 'All Configurations' in the 'Configuration' drop down box
88         Select the C/C++ / General properties
89         Modify 'Additional include directories' to point to the previously compiled
90         freetype library, 'c:\libs-msvc2008\freetype-2.3.5\include' in my case.
91         Apply the configuration changes
93         Build the debug and release versions of FTGL using the MSVC gui
96         mkdir c:\libs-msvc2008\FTGL\FTGL
97         cp c:\libs-msvc2008\include\*.h c:\libs-mingw\FTGL
99 e) Build videoplayer
101         cd path\to\videoplayer\source
102         qmake -spec win32-msvc2005
103         
104 or build elsewhere, useful if you build for multiple platforms from the same source
106         cd \path\to\build\dir
107         qmake -spec win32-msvc2005 path\to\videoplayer\source\videoplayer.pro
109 then
111         nmake release
112         or
113         nmake debug
115 Building with the mingw/msys suite
116 ----------------------------------
118 Make a directory to build the dependancies in. I made c:\libs-mingw.
120 All of the commands were run in an MSYS window at the bash prompt, rather
121 than a windows cmd.exe prompt.
123 a) Boost
125         Download the Boost source code. I got boost_1_35_0.zip
126         Unpack the archive into c:\libs-mingw
128         Download a boost-jam precompiled binary from sourceforge, following the
129         instructions in the 'getting started' section of the Boost documentation.
131         Unzip the boost-jam package to place the bjam.exe in 
132         c:\libs-mingw\boost_1_35_0
134         Build boost program_options library only, rather than all of boost
136         ./bjam.exe --toolset=gcc stage link=static runtime-link=static --with-program_options
138 b) GLEW
140         Download the GLEW source code. I got glew-1.5.0-src.zip
141         Unpack the archive into /c/libs-mingw
143         Edit glew/config/Makefile.mingw
144         Replace GLEW_BUILD with GLEW_STATIC on the CFLAGS.SO line
146         make
148         The compiled glew library should now be in the /c/libs-mingw/glew/lib
149         directory
150         
151 Optionally:-
153 c) FreeType
155         Download the freetype library. I got ft235.zip
156         Unpack the archive into /c/libs-mingw
157         Configure, build and install the freetype library in the current directory
159         configure --prefix=`pwd`
160         make
161         make install
163         The compiled freetype library should now be in /c/libs-mingw/freetype-2.3.5/lib
165 d) FTGL
168         Download the FTGL library. I got ftgl-2.1.2.tgz
169         Unpack the archive into /c/libs-mingw
171         The FTGL unix build system does not work under mingw, so a simple makefile based
172         approach can be used to build a static library.
174         Copy Makefile.ftgl to /c/libs-mingw/FTGL/src
176         cd src
177         make
178         
179         To make #include <FTGL/...> work, the FTGL headers must live in /c/libs-mingw/FTGL/FTGL/
180         
181         mkdir /c/libs-mingw/FTGL/FTGL
182         cp /c/libs-mingw/include/*.h /c/libs-mingw/FTGL
184 e) Build videoplayer
186 either build in the source directory
188         cd /path/to/videoplayer/source
189         qmake -spec win32-g++
190         
191 or build elsewhere, useful if you build for multiple platforms from the same source
193         cd /path/to/build/dir
194         qmake -spec win32-g++ /path/to/videoplayer/source/videoplayer.pro
196 then
198         mingw32-make release
199         or
200         mingw32-make debug