~ubuntu-branches/debian/squeeze/smplayer/squeeze

« back to all changes in this revision

Viewing changes to Install.txt

  • Committer: Bazaar Package Importer
  • Author(s): Breuil Cyril
  • Date: 2007-06-24 16:35:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070624163529-hhckbmd24uicada7
Tags: 0.5.20-0ubuntu1
* New upstream release
* Change Maintainer Email

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This document explains how to compile and install smplayer.
 
2
 
 
3
Compiling smplayer should be easy. It only depends on Qt. It can be compiled
 
4
with both Qt 3 and Qt 4.
 
5
 
 
6
First I'll explain how to do it in Linux. After that there's how to do it
 
7
in Windows.
 
8
 
 
9
1) Compiling with Qt 3
 
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
 
17
 
 
18
 
 
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.
 
23
 
 
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.
 
27
 
 
28
To install it, type: "make install". That will install smplayer in
 
29
/usr/local.
 
30
 
 
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.
 
34
 
 
35
To uninstall it, just type "make uninstall".
 
36
 
 
37
 
 
38
2) Compiling with Qt 4
 
39
----------------------
 
40
smplayer is being developed with Qt 3, but it's possible to compile it with
 
41
Qt 4.
 
42
 
 
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.
 
46
 
 
47
Uncompress the source code, open a console (konsole or similar) and enter
 
48
in the smplayer-0.5.x directory.
 
49
 
 
50
Type: "make prep".
 
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.
 
53
 
 
54
Now type "make". With a little bit of lucky, that's all.
 
55
 
 
56
But it may fail. Don't worry.
 
57
 
 
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
 
62
find out where it is.
 
63
 
 
64
Now type something like this (just examples):
 
65
make QMAKE=qmake-qt4
 
66
or
 
67
make QMAKE=/usr/share/qt4/bin/qmake
 
68
 
 
69
Once it is compiled you can install it with "make install". That will install 
 
70
smplayer in /usr/local.
 
71
 
 
72
 
 
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. 
 
78
 
 
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.
 
82
 
 
83
The way of changing key shortcuts is different (it's easier with Qt 3). 
 
84
Please read Configurable_shortcuts.txt.
 
85
 
 
86
 
 
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.
 
93
 
 
94
Of course you will need the KDE development package installed.
 
95
 
 
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:
 
99
 
 
100
make KDE_SUPPORT=1 KDE_INCLUDE_PATH=/opt/kde3/include KDE_LIB_PATH=/opt/kde3/lib
 
101
 
 
102
 
 
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.
 
107
 
 
108
Examples:
 
109
make PREFIX=/usr
 
110
make PREFIX=/usr install
 
111
 
 
112
That would install smplayer under /usr.
 
113
 
 
114
DESTDIR will be useful for package maintainers.
 
115
 
 
116
make PREFIX=/usr
 
117
make PREFIX=/usr DESTDIR=/tmp/ install
 
118
 
 
119
That would compile smplayer for /usr but in fact it will be installed in
 
120
/tmp/usr/
 
121
 
 
122
 
 
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 
 
127
make a link)
 
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/
 
131
 
 
132
 
 
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.
 
140
 
 
141
 
 
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.
 
147
 
 
148
During installation it will ask you for mingw, check the option to download 
 
149
mingw.
 
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).
 
152
 
 
153
Now go to Start -> Programs -> Qt by Trolltech v4.2.3 (Opensource) and select
 
154
Qt 4.2.3 Command Prompt.
 
155
 
 
156
Now type there "cd c:\smplayer-0.5.x\src\" (or wherever you uncompressed it)
 
157
 
 
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/ 
 
162
subdirectory.
 
163