1
This document explains how to compile and install smplayer.
3
Compiling smplayer should be easy. It only depends on Qt. It can be compiled
4
with both Qt 3 and Qt 4.
6
First I'll explain how to do it in Linux. After that there's how to do it
10
2) Compiling with Qt 4
11
3) Differences between Qt 3 and Qt 4
12
4) Compiling with Qt 3 + KDE 3 support
13
5) Changing installation path
14
6) How to make a rpm package
15
7) How to make a deb package
16
8) How to compile in Windows
19
1) Compiling with Qt 3
20
----------------------
21
Be sure you have installed the Qt 3 development package. Its name maybe
22
qt3-devel, libqt3-dev or something similar.
24
Uncompress the source code, open a console (konsole or similar) and cd
25
to the smplayer-0.5.x directory. Type "make". That's it.
26
If compilation fails, be sure QTDIR points to the right path.
28
To install it, type: "make install". That will install smplayer in
31
You may run it without install it if you want to. It won't find the
32
translation files and other required files, but you'll be able to take a
33
look at it before installing.
35
To uninstall it, just type "make uninstall".
38
2) Compiling with Qt 4
39
----------------------
40
smplayer is being developed with Qt 3, but it's possible to compile it with
43
Be sure you have installed the Qt 4 development package. Its name maybe
44
qt4-devel, libqt4-dev or similar. Some distros have a separate
45
qt3support package, install it too.
47
Uncompress the source code, open a console (konsole or similar) and enter
48
in the smplayer-0.5.x directory.
51
This is an important step. Don't forget it. That command makes some changes
52
in the sources so they can be compiled with Qt 4.
54
Now type "make". With a little bit of lucky, that's all.
56
But it may fail. Don't worry.
58
If it fails it is probably because the Qt 3 qmake has been used instead of
59
the Qt 4 one. It seems that some distros (ubuntu for example) have renamed that
60
tool to qmake-qt4. Others may have installed in another directory.
61
Look at the contents of the qt4-devel package (or whatever its name is) and
64
Now type something like this (just examples):
67
make QMAKE=/usr/share/qt4/bin/qmake
69
Once it is compiled you can install it with "make install". That will install
70
smplayer in /usr/local.
73
3) Differences between Qt 3 and Qt 4
74
------------------------------------
75
You may be wondering if smplayer will have any difference if it is compiled
76
with Qt 3 or Qt 4. smplayer is basically a Qt 3 application, so differences
77
are very small but there are a few.
79
smplayer compiled with Qt 4 has an option to dock the application in the
80
system tray (requires Qt 4.2). Anyway it's possible to have this feature
81
too with Qt 3, if compiled with KDE support.
83
The way of changing key shortcuts is different (it's easier with Qt 3).
84
Please read Configurable_shortcuts.txt.
87
4) Compiling with Qt 3 + KDE 3 support
88
--------------------------------------
89
smplayer only needs Qt 3 to work, but additionally you can compile it with
90
KDE support. There will be two differences: the KDE open dialogs will be used
91
instead of the Qt ones, and there will be an option to allow you to dock
92
the application in the system tray.
94
Of course you will need the KDE development package installed.
96
Instead of just typing "make" you'll have to type "make KDE_SUPPORT=1". The
97
Makefile will try to find the KDE include and lib directories. If it fails
98
you can pass them in the command line. Example:
100
make KDE_SUPPORT=1 KDE_INCLUDE_PATH=/opt/kde3/include KDE_LIB_PATH=/opt/kde3/lib
103
5) Changing installation path
104
-----------------------------
105
By default smplayer will be installed in /usr/local. You can change it by
106
using PREFIX and DESTDIR.
110
make PREFIX=/usr install
112
That would install smplayer under /usr.
114
DESTDIR will be useful for package maintainers.
117
make PREFIX=/usr DESTDIR=/tmp/ install
119
That would compile smplayer for /usr but in fact it will be installed in
123
6) How to make a rpm package
124
----------------------------
125
Maybe there is an easier way, but this is how I do it (SuSE 9.2):
126
Copy the file smplayer-0.5.x.tar.gz to /usr/src/packages/SOURCES/ (or just
128
Copy the file smplayer.spec from the sources to /usr/src/packages/SPECS/
129
Go to /usr/src/packages/SPECS/ and type "rpmbuild -bb smplayer.spec"
130
After the compilation, the *.rpm will be in /usr/src/packages/RPMS/i586/
133
7) How to make a deb package
134
----------------------------
135
First of all be sure you have the package fakeroot installed.
136
Enter in smplayer-0.5.x. If the directory debian/ doesn't exists, rename
137
debian-rvm to debian.
138
Now type "dpkg-buildpackage -rfakeroot".
139
The deb package will be created in the parent directory.
142
8) How to compile in Windows
143
----------------------------
144
You need Qt for windows. Go to
145
http://www.trolltech.com/developer/downloads/qt/windows and download
146
qt-win-opensource-4.2.3-mingw.exe (about 50 MB). Install it.
148
During installation it will ask you for mingw, check the option to download
150
Now uncompress the package smplayer-0.5.x.tar.gz wherever you want (*.tar.gz
151
files can be opened with Winrar, Winzip or 7z, for example).
153
Now go to Start -> Programs -> Qt by Trolltech v4.2.3 (Opensource) and select
154
Qt 4.2.3 Command Prompt.
156
Now type there "cd c:\smplayer-0.5.x\src\" (or wherever you uncompressed it)
158
Now type "conv2qt4.bat". That command will do some changes in the source code,
159
so it can be compiled with Qt 4.
160
When it finishes type "make". That will start the compilation, it should take
161
a few minutes. After that you'll have a smplayer.exe under the release/