It's not unusual that Linux users had to compile a program by themselves sometimes, but that's uncommon for Windows users.
Why compiling it?
There are several reasons:
- be able to use the latest version without having to wait for the binary update.
- modify the source code. You might need to make some small modification in the application.
- get a statically linked binary, without dependencies on the Qt dlls
Compiling a program on Windows originally created under Linux can be difficult. For example, compiling mplayer is a hard task, a lot of packages have to be installed and compiled.
Fortunately compiling a Qt program is quite easy.
First you need to download and install Qt (OpenSource edition) in your computer. You can get a package with installer from http://trolltech.com/developer/downloads/qt/windows
During the installation it will ask you for a compiler. Simply let the Qt installer to download and install MinGW.
Once the installation has finished it will probably will show you some Qt examples, so you can see how cute they are
Now we're ready to compile smplayer (or any other Qt application). Download the sources (either the *.tar.gz or from the svn) and uncompress them for example in C:\smplayer.
The next step is to open the Qt console: select the option "Qt 4.2.3 Command Prompt" that you'll find under the Qt menu.
That'll open a DOS-like window. Type the following commands:
- Code: Select all
Compiling will start. That'll take a few minutes (in my computer less than 2 minutes).
After that you'll get the new compiled smplayer.exe under c:\smplayer\src\release subdirectory.
You'll see that if you try to open it by double clicking on it, it won't work because it can find the Qt dlls. I assume you already have smplayer properly installed in some place, just copy the new smplayer.exe to that directory, replacing the old one. Now it will work
You may also need to copy the updated translation files (*.qm) from the translations subdirectory.
In a second part of this document I'll explain how to get a statically linked binary.