~ubuntu-branches/ubuntu/intrepid/smplayer/intrepid

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
This document explains how to compile and install smplayer.

Compiling smplayer should be easy. It only depends on Qt. Since version
0.5.40 it can only be compiled with Qt 4.2 or greater.


1) How to make a deb package
2) How to make a rpm package
3) Generic compilation
4) Changing installation path
5) How to compile in Windows


1) How to make a deb package
----------------------------
Be sure you have installed the following packages: libqt4-dev, fakeroot,
build-essential, devscripts, debhelper and g++.
Now run ./create_deb.sh


2) How to make a rpm package
----------------------------
Run rpmbuid -tb smplayer-0.6.x.tar.bz2
You'll find the rpm pachage under /usr/src/packages/RPMS/i586/

Take a look at this document to know how to create a rpm from the SVN sources:
http://smplayer.berlios.de/forums/viewtopic.php?id=188


3) Generic compilation
----------------------
You need at least Qt 4.2 to compile smplayer. It won't work with an older
version.

Be sure you have installed the Qt 4 development package. Its name maybe
qt4-devel, libqt4-dev or similar. 

Uncompress the source code, open a console and enter in the 
smplayer-0.6.x directory.

Type "make". 

If everything is ok now you can install it with "make install".
That will install smplayer in /usr/local.

If "make" fails, it's probably because the Qt 3 qmake has been used instead of
the Qt 4 one. It seems that some distros have renamed that tool to qmake-qt4. 
Others may have installed in another directory.
Look at the contents of the qt4-devel package (or whatever its name is) and
find out where it is.

Now type something like this (just examples):
make QMAKE=qmake-qt4
or
make QMAKE=/usr/share/qt4/bin/qmake


4) Changing installation path
-----------------------------
By default smplayer will be installed in /usr/local. You can change it by
using PREFIX and DESTDIR.

Examples:
make PREFIX=/usr
make PREFIX=/usr install

That would install smplayer under /usr.

DESTDIR will be useful for package maintainers.

make PREFIX=/usr
make PREFIX=/usr DESTDIR=/tmp/ install

That would compile smplayer for /usr but in fact it will be installed in
/tmp/usr/


5) How to compile in Windows
----------------------------
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.

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.3.x
Command Prompt" that you'll find under the Qt menu.

That'll open a DOS-like window. Type the following commands:

cd c:\smplayer
compile_windows.bat

Compiling will start. That'll take a few 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.

Note: please see this document to know how to compile with Qxt support:
http://smplayer.berlios.de/forums/viewtopic.php?pid=1737#p1737