[106] | 1 | This document explains how to compile and install smplayer.
|
---|
| 2 |
|
---|
| 3 | Compiling smplayer should be easy. It only depends on Qt. Since version 0.6.4
|
---|
| 4 | it can only be compiled with Qt 4.3 or greater.
|
---|
| 5 |
|
---|
| 6 |
|
---|
| 7 | 1) How to make a deb package
|
---|
| 8 | 2) How to make a rpm package
|
---|
| 9 | 3) Generic compilation
|
---|
| 10 | 4) Changing installation path
|
---|
| 11 | 5) How to compile in Windows
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | 1) How to make a deb package
|
---|
| 15 | ----------------------------
|
---|
| 16 | Be sure you have installed the following packages: libqt4-dev, zlib1g-dev,
|
---|
| 17 | fakeroot, build-essential, devscripts, debhelper and g++.
|
---|
[139] | 18 |
|
---|
| 19 | sudo apt-get install libqt4-dev zlib1g-dev fakeroot build-essential devscripts debhelper g++
|
---|
| 20 |
|
---|
[106] | 21 | Now run ./create_deb.sh
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 | 2) How to make a rpm package
|
---|
| 25 | ----------------------------
|
---|
| 26 | Run rpmbuild -tb smplayer-0.6.x.tar.bz2
|
---|
| 27 | You'll find the rpm pachage under /usr/src/packages/RPMS/i586/
|
---|
| 28 |
|
---|
| 29 | Take a look at this document to know how to create a rpm from the SVN sources:
|
---|
| 30 | http://smplayer.berlios.de/forums/viewtopic.php?id=188
|
---|
| 31 |
|
---|
| 32 |
|
---|
| 33 | 3) Generic compilation
|
---|
| 34 | ----------------------
|
---|
| 35 | You need at least Qt 4.3 to compile smplayer. It won't work with an older
|
---|
| 36 | version.
|
---|
| 37 |
|
---|
| 38 | Be sure you have installed the Qt 4 development package. Its name maybe
|
---|
| 39 | qt4-devel, libqt4-dev or similar.
|
---|
| 40 |
|
---|
| 41 | Uncompress the source code, open a console and enter in the
|
---|
| 42 | smplayer-0.6.x directory.
|
---|
| 43 |
|
---|
| 44 | Type "make".
|
---|
| 45 |
|
---|
| 46 | If everything is ok now you can install it with "make install".
|
---|
| 47 | That will install smplayer in /usr/local.
|
---|
| 48 |
|
---|
| 49 | If "make" fails, it's probably because the Qt 3 qmake has been used instead of
|
---|
| 50 | the Qt 4 one. It seems that some distros have renamed that tool to qmake-qt4.
|
---|
| 51 | Others may have installed in another directory.
|
---|
| 52 | Look at the contents of the qt4-devel package (or whatever its name is) and
|
---|
| 53 | find out where it is.
|
---|
| 54 |
|
---|
| 55 | Now type something like this (just examples):
|
---|
| 56 | make QMAKE=qmake-qt4
|
---|
| 57 | or
|
---|
| 58 | make QMAKE=/usr/share/qt4/bin/qmake
|
---|
| 59 |
|
---|
| 60 |
|
---|
| 61 | 4) Changing installation path
|
---|
| 62 | -----------------------------
|
---|
| 63 | By default smplayer will be installed in /usr/local. You can change it by
|
---|
| 64 | using PREFIX and DESTDIR.
|
---|
| 65 |
|
---|
| 66 | Examples:
|
---|
| 67 | make PREFIX=/usr
|
---|
| 68 | make PREFIX=/usr install
|
---|
| 69 |
|
---|
| 70 | That would install smplayer under /usr.
|
---|
| 71 |
|
---|
| 72 | DESTDIR will be useful for package maintainers.
|
---|
| 73 |
|
---|
| 74 | make PREFIX=/usr
|
---|
| 75 | make PREFIX=/usr DESTDIR=/tmp/ install
|
---|
| 76 |
|
---|
| 77 | That would compile smplayer for /usr but in fact it will be installed in
|
---|
| 78 | /tmp/usr/
|
---|
| 79 |
|
---|
| 80 |
|
---|
| 81 | 5) How to compile in Windows
|
---|
| 82 | ----------------------------
|
---|
| 83 | First you need to download and install Qt (OpenSource edition) in your
|
---|
| 84 | computer. You can get a package with installer from
|
---|
| 85 | http://trolltech.com/developer/downloads/qt/windows
|
---|
| 86 |
|
---|
| 87 | During the installation it will ask you for a compiler. Simply let the
|
---|
| 88 | Qt installer to download and install MinGW.
|
---|
| 89 |
|
---|
| 90 | Now we're ready to compile smplayer (or any other Qt application).
|
---|
| 91 | Download the sources (either the *.tar.gz or from the svn) and
|
---|
| 92 | uncompress them for example in C:\smplayer.
|
---|
| 93 |
|
---|
| 94 | The next step is to open the Qt console: select the option "Qt 4.3.x
|
---|
| 95 | Command Prompt" that you'll find under the Qt menu.
|
---|
| 96 |
|
---|
| 97 | That'll open a DOS-like window. Type the following commands:
|
---|
| 98 |
|
---|
| 99 | cd c:\smplayer
|
---|
| 100 | compile_windows.bat
|
---|
| 101 |
|
---|
| 102 | Compiling will start. That'll take a few minutes.
|
---|
| 103 |
|
---|
| 104 | After that you'll get the new compiled smplayer.exe under
|
---|
| 105 | c:\smplayer\src\release subdirectory.
|
---|
| 106 |
|
---|
| 107 | You'll see that if you try to open it by double clicking on it, it won't
|
---|
| 108 | work because it can find the Qt dlls. I assume you already have smplayer
|
---|
| 109 | properly installed in some place, just copy the new smplayer.exe to that
|
---|
| 110 | directory, replacing the old one. Now it will work
|
---|
| 111 |
|
---|
| 112 | You may also need to copy the updated translation files (*.qm) from the
|
---|
| 113 | translations subdirectory.
|
---|
| 114 |
|
---|
| 115 | Note: please see this document to know how to compile with Qxt support:
|
---|
| 116 | http://smplayer.berlios.de/forums/viewtopic.php?pid=1737#p1737
|
---|