Monday, August 10, 2009

How to build Qt

Steps on how to build Qt:

1. Download Qt version 4.5 from the web server (google it):

search for "qt-win-opensource-src-4.5.0-rc1.zip"

2. If you happened to find Qt4.5 on the website, make sure to download the “zip” version instead of the “exe” version. This will ensure “nmake” to compile under windows operating system.

3. Extract the zip file into a folder, for instance, C:\Qt\qt4.5\

4. Install DirectX 9.0 on your computer under, let’s say C:\DXSDK directory. The installation file for DirectX 9.0 can be found in the following server directory:

\\lab-542\GM\Software Releases\TOOLS\DirectX\dx90bsdk.exe

5. Install the most updated version of Microsoft DirectX SDK on your computer.

6. Bring up a Dos command prompt from Visual Studio 2005

7. Add the following to the environment variables: ( attention!! follow the order, the include and lib directory of Direct X 9 should be in front of any other include and lib directories )

DXSDK_DIR = C:\Program Files\Microsoft DirectX SDK (February 2007)\

(February 2007)

Path = C:\Qt\qt4.5\bin
Include = C:\DXSDK\Include; DXSDK_DIR\Include
LIB = C:\DXSDK|Lib; DXSDK_DIR\Lib

8. At the dos command prompt, goto C:\Qt\qt4.5\

9. type “configure –platform win32-msvc2005 -phonon” to include phonon module in the build process. choose “y”. This will create makefiles for each related module.

10. Type “nmake” under C:\Qt\qt4.5, this will build all the modules, such as “Demo Examples”, “Network”, “Sql”, “Phonon”, etc. one by one.

11. Make sure the phonon module is built successfully, and then go to
C:\Qt\qt4.5\src\plugins\phonon, and type “nmake”. This will build phonon backend plugins.

The following audio and video format will be supported under Qt4.5
For Audio:

AIFF
BASIC
MID
MIDI
MP3
MPEG
MPGURL
MPG
WAV
X-AIFF
X-MID
X-MIDI
X-MP3
X-MPEG
X-MPEGURL
X-MPG
X-MS-WAX
X-MS-VMA
X-WAV

For Video

AIV
MPEG
MPG
MSVIDEO
X-MPEG
X-MPEG2A
X-MS-ASF
X-MS-ASF-PLUGIN
X-MS-WM
X-MS-WMV
X-MS-WMX
X-MS-WVX
X-MSVIDEO