From a7a2afda9a9a6036fefc915c4e4f6f3d8d9116d6 Mon Sep 17 00:00:00 2001 From: "h.udo" Date: Thu, 5 Apr 2018 22:04:31 +0100 Subject: [files] Rename to markdown format --- docs/CONTRIBUTING.md | 78 +++++++ docs/PULL_REQUEST_TEMPLATE.md | 32 +++ docs/README.Android.md | 389 +++++++++++++++++++++++++++++++++ docs/README.Fedora.md | 77 +++++++ docs/README.FreeBSD | 486 ------------------------------------------ docs/README.FreeBSD.md | 486 ++++++++++++++++++++++++++++++++++++++++++ docs/README.Linux.md | 279 ++++++++++++++++++++++++ docs/README.RaspberryPi.md | 75 +++++++ docs/README.Ubuntu.md | 129 +++++++++++ docs/README.android | 389 --------------------------------- docs/README.fedora | 77 ------- docs/README.iOS.md | 222 +++++++++++++++++++ docs/README.ios.md | 222 ------------------- docs/README.linux | 279 ------------------------ docs/README.macOS.md | 184 ++++++++++++++++ docs/README.openSUSE.md | 303 ++++++++++++++++++++++++++ docs/README.opensuse | 303 -------------------------- docs/README.osx.md | 184 ---------------- docs/README.raspberrypi | 75 ------- docs/README.ubuntu | 129 ----------- 20 files changed, 2254 insertions(+), 2144 deletions(-) create mode 100644 docs/CONTRIBUTING.md create mode 100644 docs/PULL_REQUEST_TEMPLATE.md create mode 100644 docs/README.Android.md create mode 100644 docs/README.Fedora.md delete mode 100644 docs/README.FreeBSD create mode 100644 docs/README.FreeBSD.md create mode 100644 docs/README.Linux.md create mode 100644 docs/README.RaspberryPi.md create mode 100644 docs/README.Ubuntu.md delete mode 100644 docs/README.android delete mode 100755 docs/README.fedora create mode 100644 docs/README.iOS.md delete mode 100644 docs/README.ios.md delete mode 100644 docs/README.linux create mode 100644 docs/README.macOS.md create mode 100644 docs/README.openSUSE.md delete mode 100644 docs/README.opensuse delete mode 100644 docs/README.osx.md delete mode 100644 docs/README.raspberrypi delete mode 100644 docs/README.ubuntu (limited to 'docs') diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000000..ae70b6394d --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,78 @@ +### Introduction + +**Kodi** uses Github for development only, i.e. for *pull requests* and the review of such code. +**Do not open** an issue on Github for your questions or bug reports. +**Do not comment** on a *pull request* unless you are involved in the testing of such or have something meaningful to contribute. +Not familiar with git? Start by looking at Github's [collaborating pages](https://help.github.com/categories/collaborating/). + +#### Questions about Kodi? + +To get your questions answered, please ask in the [Kodi community forum's](http://forum.kodi.tv/) or on **IRC:** [#kodi](http://webchat.freenode.net?nick=kodi-contrib&channels=%23kodi&prompt=1&uio=OT10cnVlde) on freenode.net + +#### Issue or bug reports and discussions + +Issue or bug reports are created and reviewed at [Kodi's bug tracker](http://trac.kodi.tv) using the Kodi forum's *username* and *password*. + +If you can, we encourage you to investigate the issue yourself and create a [pull request](https://help.github.com/articles/creating-a-pull-request/) for us to review. + +For bug reports and related discussions, feature requests and all other support, please go to [Kodi community forum's](http://forum.kodi.tv/). + +#### Pull Requests + +Before [creating a pull request](https://help.github.com/articles/creating-a-pull-request/), please read our general code guidelines that can be found at: + +- [Code guidelines](http://kodi.wiki/view/Official:Code_guidelines_and_formatting_conventions) +- [Submitting a patch](http://kodi.wiki/view/HOW-TO_submit_a_patch) +- [Kodi development](http://kodi.wiki/view/Development) + +###### General guidelines for creating pull requests: +- **Create topic branches**. Don't ask us to pull from your master branch. +- **One pull request per feature**. If you want to do more than one thing, send multiple *pull requests*. +- **Send coherent history**. Make sure each individual commit in your *pull + request* is meaningful. + If you had to make multiple intermediate commits while developing, please squash them before sending them to us. + In the end before merging you may be asked to squash your commit even some more. + +###### Please follow these guidelines; it's the best way to get your work included in the project! + +- [Click here](https://github.com/xbmc/xbmc/fork/) to **fork Kodi** project, + and [configure the remote](https://help.github.com/articles/configuring-a-remote-for-a-fork/): + + ```bash + # Clone your fork of kodi's repo into the current directory in terminal + git clone git@github.com:/xbmc.git kodi + # Navigate to the newly cloned directory + cd kodi + # Assign the original repo to a remote called "upstream" + git remote add upstream https://github.com/xbmc/xbmc.git + ``` + +- If you cloned a while ago, get the latest changes from upstream: + + ```bash + # Fetch upstream changes + git fetch upstream + # Make sure you are on your 'master' branch + git checkout master + # Merge upstream changes + git merge upstream/master + ``` + +- Create a new topic branch to contain your feature, change, or fix: + + ```bash + git checkout -b + ``` + +- Commit your changes in logical chunks, or your *pull request* is unlikely to be merged into the main project. + Use git's [interactive rebase](https://help.github.com/articles/interactive-rebase) + feature to tidy up your commits before making them public. + +- Push your topic branch up to your fork: + + ```bash + git push origin + ``` + +- Open a [pull request](https://help.github.com/articles/using-pull-requests) with a + clear title and description. diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..ed898ddfba --- /dev/null +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,32 @@ + + +## Description + + +## Motivation and Context + + + +## How Has This Been Tested? + + + + +## Screenshots (if appropriate): + +## Types of change + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] Improvement (non-breaking change which improves existing functionality) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) + +## Checklist: + + +- [ ] My code follows the [Code guidelines](https://codedocs.xyz/xbmc/xbmc/code_guidelines.html) of this project +- [ ] My change requires a change to the documentation, either Doxygen or wiki +- [ ] I have updated the documentation accordingly +- [ ] I have read the [CONTRIBUTING](https://github.com/xbmc/xbmc/blob/master/CONTRIBUTING.md) document +- [ ] I have added tests to cover my change +- [ ] All new and existing tests passed diff --git a/docs/README.Android.md b/docs/README.Android.md new file mode 100644 index 0000000000..c2d04d154c --- /dev/null +++ b/docs/README.Android.md @@ -0,0 +1,389 @@ +TOC +1. Introduction +2. Installing the required Ubuntu packages +3. Installing and setting up the Android environment +4. Getting the source code +5. How to compile +6. Installing Kodi in an Android system +7. Running and debugging Kodi in an Android system +8. Architecture +9. Useful Commands + +----------------------------------------------------------------------------- +1. Introduction +----------------------------------------------------------------------------- + +We currently recommend Ubuntu "Xenial Xerus" (16.04) 64Bit. This is what our continuous +integration system "jenkins" is using. +Additionally, building from OSX Snow Leopard or Mavericks (others on your own risk ;) ) is working (see 3.1). + +NOTE TO NEW USERS: All lines that are prefixed with the '$' +character are commands that need to be typed into a terminal window / +console (similar to the command prompt for Windows). Note that the '$' +character itself should NOT be typed as part of the command. + +----------------------------------------------------------------------------- +2. Installing the required Ubuntu packages +----------------------------------------------------------------------------- +These are the minimum packages necessary for building Kodi. +Non-Ubuntu users will need to get the equivalents. + + $ sudo apt-get install build-essential default-jdk git curl autoconf \ + unzip zlib1g-dev gawk gperf cmake libcurl4-openssl-dev + +If you run a 64bit operating system you will also need to get ia32-libs + +Ubuntu >= 14.04: + $ sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev + +Older versions: + $ sudo apt-get install ia32-libs + +The following versions are used on our continuous integration system "jenkins". Other (newer) +versions might work as well. + +JDK: openjdk-6-jdk (java version "1.6.0_27") +JRE: openjre-6-jre (java version "1.6.0_27") + + +----------------------------------------------------------------------------- +3. Installing and setting up the Android environment +----------------------------------------------------------------------------- + +To develop Kodi for Android the Android SDK and NDK are required. + +-------------------------------------------------------------------- +3.1. Prerequisites when compiling on Mac OSX +-------------------------------------------------------------------- + +a. When building on Mac OSX you need to download the java JDK (development kit) from http://www.oracle.com + Or ensure otherwise that you are using java 1.8 (java -version tells you the version). +b. The compilation for android needs a case sensitive filesystem. The + filesystem used on normal OSX installations is case insensitive. So you + need to generate a writeable hdd image and format it with hfs+ (case sensitive). + The size should be 20GB. +c. Generate a writable dmg with the following command: + $ hdiutil create -type UDIF -fs 'Case-sensitive Journaled HFS+' -size 20g -volname android-dev ~/android-dev.dmg + +d. Whenever you want to compile/develop you need to mount it: + $ open ~/android-dev.dmg + +e. Your workspace can be accessed in /Volumes/android-dev/ then +f. Once you have your hdd image with case sensitive hfs+ file system do all steps + below inside of this filesystem. In the end you need to adapt all paths in this + document so that they match your local environment. As an example here is a + configure line from step 5.1 which demonstrates possible paths. In this + example the hdd image is mounted on /Volumes/android-dev. + $ ./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=arm-linux-androideabi \ + --with-sdk-path=/Volumes/android-dev/android/android-sdk-macosx \ + --with-ndk-path=/Volumes/android-dev/android/android-ndk-r16 \ + --with-toolchain=/Volumes/android-dev/android/android-toolchain-arm/android-21 \ + --prefix=/Volumes/android-dev/android/xbmc-depends + +-------------------------------------------------------------------- +3.2. Getting the Android SDK and NDK +-------------------------------------------------------------------- + +To get the Android SDK, go to http://developer.android.com/sdk and +download the latest version for your operating system. The NDK +can be downloaded from http://developer.android.com/tools/sdk/ndk/ + +[NOTICE] Compiling Kodi for Android requires Android NDK + Revision 16. For the SDK just use the latest available. + It will work. + +After downloading the SDK and NDK extract the files contained in the +archives to your harddisk. For our example we are extracting in the following +directories (this matches the example from tools/depends/README as well): + +NDK (referenced as from now on): +/opt/android-ndk-r16 + +TOOLCHAIN (arm) (referenced as from now on): +/opt/arm-linux-androideabi-4.9-vanilla/android-21 + +TOOLCHAIN (aarch64) (referenced as from now on): +/opt/aarch64-linux-android-4.9-vanilla/android-21 + +TOOLCHAIN (x86) (referenced as from now on): +/opt/x86-linux-4.9-vanilla/android-21 + +SDK (referenced as from now on): +/opt/android-sdk-linux + +Make sure you have a recent JRE and JDK installed otherwise the +Android SDK will not work. (see point 2.) + +-------------------------------------------------------------------- +3.3. Installing Android SDK packages +-------------------------------------------------------------------- + +After having extracted the Android SDK to you need to +install some android packages using the Android SDK Manager: + + $ cd /tools + $ ./android update sdk -u -t platform,platform-tool + $ ./android update sdk --all -u -t build-tools-25.0.3 + +As of newest SDKs the android tool is deprecated. Use sdkmanager instead: + $ cd /tools/bin + $ ./sdkmanager platform-tools + $ ./sdkmanager "platforms;android-26" + $ ./sdkmanager "build-tools;25.0.3" + +-------------------------------------------------------------------- +3.4. Setup the Android toolchain +-------------------------------------------------------------------- + +To be able to compile Kodi and the libraries it depends on for the +Android platform you first need to setup an Android toolchain using +the Android NDK which you earlier extracted to . The +following commands will create a toolchain suitable for the most +common scenario. +The --install-dir option (and therefore the / value) +specifies where the resulting toolchain should be installed (your choice). + +[NOTICE] Kodi uses the android API Version 21 and clang version 5.0! + +Building for arm architecture: + + $ cd + $ ls platforms + $ cd build/tools + $ ./make-standalone-toolchain.sh \ + --install-dir= --platform=android-21 \ + --toolchain=arm-linux-androideabi-4.9 --stl=libc++ + +Building for aarch64 architecture: + + $ cd + $ ls platforms + $ cd build/tools + $ ./make-standalone-toolchain.sh \ + --install-dir= --platform=android-21 \ + --toolchain=aarch64-linux-android-4.9 --stl=libc++ + +Building for x86 architecture: + + $ cd + $ ls platforms + $ cd build/tools + $ ./make-standalone-toolchain.sh \ + --install-dir= --platform=android-21 \ + --toolchain=x86-4.9 --arch=x86 --stl=libc++ + +Make sure to pick a toolchain for your desired architecture. If an error about +the used system is shown - please add proper --system parameter as mentioned +in the error message. + +-------------------------------------------------------------------- +3.5. Create a (new) debug key to sign debug APKs +-------------------------------------------------------------------- + +All packages must be signed. The following command will generate a +self-signed debug key. If the result is a cryptic error, it +probably just means a debug key already existed, no cause for alarm. + + $ keytool -genkey -keystore ~/.android/debug.keystore -v -alias \ + androiddebugkey -dname "CN=Android Debug,O=Android,C=US" -keypass \ + android -storepass android -keyalg RSA -keysize 2048 -validity 10000 + +----------------------------------------------------------------------------- +4. Getting the source code +----------------------------------------------------------------------------- + + $ cd $HOME + $ git clone git://github.com/xbmc/xbmc.git kodi-android + $ cd kodi-android + +----------------------------------------------------------------------------- +5. How to compile +----------------------------------------------------------------------------- + +Compiling Kodi for Android consists of compiling the libraries Kodi depends +on with the Android toolchain and creating an Android Application Package +(APK) which can be installed in an Android system. + +-------------------------------------------------------------------- +5.1. Building dependencies +-------------------------------------------------------------------- + + $ cd $HOME/kodi-android/tools/depends + $ ./bootstrap + $ ./configure --help + +Run configure with the correct settings for you local configuration. +See tools/depends/README for examples. + +Anyone working on the dependencies themselves will want to set the +environment variables specified in ~/.bashrc or similar, to avoid +having to input these with each configure. + + $ make -j + $ make -j -C target/binary-addons + +NOTE: if you only want to build specific addons you can specify like this: + $ make -C target/binary-addons ADDONS="pvr.hts pvr.dvblink" + +This build was designed to be massively parallel. Don't be afraid to +give it a 'make -j20' or so. + +Verify that all dependencies are built correctly (it will tell you so) +before continuing to avoid errors. If in doubt run another 'make' (single threaded) +until the message "Dependencies built successfully." appears. If the single make +fails, keep cleaning the specific library by issuing: + $ make -C target/ distclean + +Then try make again. +Rinse and repeat until you are really done and all libs are built. + +-------------------------------------------------------------------- +5.2. Building Kodi +-------------------------------------------------------------------- + + $ cd $HOME/kodi-android + $ make -C tools/depends/target/cmakebuildsys + $ cd build + $ make + $ make apk + +After the first build (assuming bootstrap and configure are successful), +subsequent builds can be run with a simple 'make' and 'make apk'. + +The built APK will be present in $HOME/kodi-android + +----------------------------------------------------------------------------- +6. Installing Kodi in an Android system +----------------------------------------------------------------------------- + +To install Kodi through the previously built APK in an Android system you can +either install it on a real device (smartphone/tablet/...) running Android + >= 5.x + +-------------------------------------------------------------------- +6.1. Installing Kodi on the Android device +-------------------------------------------------------------------- + +Make sure your Android device is connected to your computer through +USB. Furthermore you have to enable the following option in your +device's Android settings: + + - Applications + [X] Unknown sources + + $ cd $HOME/kodi-android + $ adb devices + $ adb -s install -r xbmcapp-debug.apk + +The can be retrieved from the list returned by the +"adb devices" command and is the first value in the row representing +your device. + +----------------------------------------------------------------------------- +7. Running and debugging Kodi in an Android system +----------------------------------------------------------------------------- + +After installing Kodi's APK in an Android system you can start it using its +Launcher icon in Android's Application Launcher. + +-------------------------------------------------------------------- +7.1. Debugging Kodi +-------------------------------------------------------------------- + +To be able to see what is happening while running Kodi you first need +to enable USB debugging in your Android settings (this is already done +when using the emulator): + + - Applications + [X] Unknown sources + - Development + [X] USB debugging + +To access the log output of your Android system run (the -s parameter +and the may not be needed when using the Android emulator) + + $ adb -s logcat + + +-------------------------------------------------------------------- +7.2. GDB +-------------------------------------------------------------------- + +GDB can be used to debug, though the support is rather primitive. Rather than +using gdb directly, you will need to use ndk-gdb which wraps it. Do NOT trust +the -p/--project switches, as they do not work. Instead you will need +to cd to tools/android/packaging/xbmc and execute it from there. + + $ ndk-gdb --start --delay=0 + +This will open the installed version of Kodi and break. The warnings can be +ignored as we have setup the appropriate paths already. + +-------------------------------------------------------------------- +8. Architecture +-------------------------------------------------------------------- + +During the early days of the android port, Kodi was launched via a stub lib +that then dlopen'd libkodi. This was done to get around bionic's poor handling +of shared libs. We now compile everything into libkodi itself so that it has +no runtime dependencies beyond system libs. Done this way, we're able to launch +into libkodi directly. + +But we still hit Bionic's loader's deficiencies when we dlopen a lib. There are +two main issues to overcome for loading: + +1. Bionic imports all symbols for a lib as soon as it is loaded, and it will +refuse to open a lib if it has a single unresolved symbol + +2. It does not search recursively during the resolve. So if liba depends on +libb, dlopen'ing liba will _not_ pull in missing symbols from libb. This is +particularly nasty considering #1. + +To work-around these problems we use our own recursive loader in place of +dlopen. This loader mimics expected behavior. Using the example above, loading +libb before liba will mean that everything will resolve correctly. + +Additionally, Android does not use versioned solibs. libfoo.so.1 which is +typical on linux would not be found by the loader. This means that we must +strip the SONAME and NEEDED values out of the libs as well as changing the +filenames themselves. The cleaner solution would be to patch libtool/cmake/etc +to not add versioning in the first place. For now, we use the brute-force +approach of modifying the binary and blanking out the versions. + +See here for more info: +http://www.bernawebdesign.ch/byteblog/2011/11/23/creating-non-versioned-shared-libraries-for-android/ + +As a final gotcha, all libs must be in the form of ^lib.*so$ with no +exceptions (they won't even install otherwise), and the soname must match. +So we have to do some renaming to get some of our self-built libs loaded. + +Development: +Typical android native activities are built with ndk-build which is a wrapper +around Make. It would be a nightmare to port our entire buildsystem over, so +instead we build as usual then package ourselves. It may be beneficial to use +ndk-build to do the actual packaging, but for now its behavior is emulated. + +ABI: +Presently we are targeting armv7a+neon for arm, and i686 for x86. + +-------------------------------------------------------------------- +9. Useful Commands +-------------------------------------------------------------------- + +Below are a few helpful commands when building/debugging. These assume that pwd +is 'tools/android/packaging' and that the proper sdk/ndk paths are set. + +-Install a new build over the existing one + $ adb -e install -r images/xbmcapp-debug.apk + +-Launch Kodi on the emulator without the GUI + $ adb shell am start -a android.intent.action.MAIN -n org.xbmc.xbmc/android.app.NativeActivity + +-Kill a misbehaving Kodi + $ adb shell ps | grep org.xbmc | awk '{print $2}' | xargs adb shell kill + +-Filter logcat messages by a specific tag (e.g. "Kodi") + $ adb logcat -s Kodi:V + +-Enable CheckJNI (BEFORE starting the application) + $ adb shell setprop debug.checkjni 1 diff --git a/docs/README.Fedora.md b/docs/README.Fedora.md new file mode 100644 index 0000000000..3321e05ff6 --- /dev/null +++ b/docs/README.Fedora.md @@ -0,0 +1,77 @@ +TOC +1. Introduction +2. Getting the source code +3. Installing the required libraries and headers +4. How to compile +5. Uninstalling + +----------------------------------------------------------------------------- +1. Introduction +----------------------------------------------------------------------------- + +A graphics-adapter with OpenGL or OpenGLES acceleration is required. + +Note to new Linux users: +All lines that are prefixed with the '$' character are commands, +that need to be typed into a terminal window / console. The '$' equals the prompt. +Note: The '$' character itself should NOT be typed as part of the command. + +----------------------------------------------------------------------------- +2. Getting the source code +----------------------------------------------------------------------------- + +You will have to grab the source code of course, here we use git as example. +First install the git package using the command line + + $ sudo dnf install git + +.0 $ cd $HOME +.1 $ git clone git://github.com/xbmc/xbmc.git kodi + +Note: You can clone any specific branch. + +.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi + +----------------------------------------------------------------------------- +3. Installing the required libraries and headers +----------------------------------------------------------------------------- + +You will then need the required libraries. The following is the list of packages +that are used to build Kodi packages on FEDORA (with all supported +external libraries enabled). + +$ sudo dnf install autoconf automake gettext cmake curl \ +jre gawk gperf java-9-openjdk-headless libao-devel alsa-lib-devel \ +libass-devel libva-devel avahi-devel avahi-compat-libdns_sd-devel bluez-libs-devel \ +libbluray-devel bzip2-devel libcap-devel \ +libcdio-devel libcec-devel openssl-libs \ +dbus-devel mesa-libEGL-devel fmt-devel fontconfig-devel freetype-devel \ +fribidi-devel giflib-devel \ +libjpeg-turbo-devel libtool-ltdl-devel lzo-devel libmicrohttpd-devel \ +libmpc-devel mariadb-devel libnfs-devel \ +pcre-devel libplist-devel libpng12-devel \ +shairplay-devel libsmbclient-devel sqlite-devel openssl-devel ffmpeg-devel \ +taglib-devel tinyxml-devel libtool-ltdl-devel libudev-devel \ +libusb-devel libva-devel libvdpau-devel libxml2-devel \ +libXmu-devel libXrandr-devel libxslt-devel libXt-devel rapidjson-devel \ +nasm python-devel yasm swig uuid-devel zlib-devel python-pillow \ +trousers-devel libidn2-devel gcc-c++ mesa-libGLw-devel libuuid-devel \ +libcurl-devel gtkglext-devel libtool gettext-devel + + +----------------------------------------------------------------------------- +4. How to compile +----------------------------------------------------------------------------- +See README.linux + +----------------------------------------------------------------------------- +4.1. Test Suite +----------------------------------------------------------------------------- +See README.linux + +----------------------------------------------------------------------------- +5. Uninstalling +----------------------------------------------------------------------------- +See README.linux/Uninstalling for removing compiled versions of Kodi. + +EOF diff --git a/docs/README.FreeBSD b/docs/README.FreeBSD deleted file mode 100644 index 4d752c670a..0000000000 --- a/docs/README.FreeBSD +++ /dev/null @@ -1,486 +0,0 @@ -TOC -1. Introduction -2. Getting the source code -3. Installing the required libraries and headers -4. How to compile - 4.4 Binary addons - 4.5 Test suite -5. How to run -6. Uninstalling -7. Example basic setup of a KODI machine running on FreeBSD - 7.1 Setting up X Server - 7.2 Install SLiM login manager - 7.3 Solving the troubles with HDMI Audio ------------------------------------------------------------------------------ -1. Introduction ------------------------------------------------------------------------------ - -A graphics-adapter with OpenGL acceleration is highly recommended. -24/32 bitdepth is required along with OpenGL. - -Note to new FreeBSD users: -All lines that are prefixed with the '$' character are commands, -that need to be typed into a terminal window / console. The '$' equals the prompt. -Note: The '$' character itself should NOT be typed as part of the command. - ------------------------------------------------------------------------------ -2. Getting the source code ------------------------------------------------------------------------------ - -You will have to grab the source code of course, here we use git as example. -First install the git package provided by your distribution. -Then from a terminal, type: - -.0 $ cd $HOME -.1 $ git clone git://github.com/xbmc/xbmc.git kodi - -Note: You can clone any specific branch. - -.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi - ------------------------------------------------------------------------------ -3. Installing the required libraries and headers ------------------------------------------------------------------------------ - -You will then need the required libraries. The following is the list of packages -that are used to build Kodi packages on Debian/Ubuntu (with all supported -external libraries enabled). - -$ pkg install taglib gstreamer1-vaapi hal libcapn \ -enca gawk gperf cmake zip nasm swig30 openjdk8 libtool gettext-tools \ -gmake pkgconf rapidjson mesa-libs doxygen glproto dri2proto dri3proto libass \ -flac libcdio curl dbus fontconfig freetype2 fribidi \ -libgcrypt gmp libgpg-error gnutls libidn libinotify lzo2 \ -libogg sqlite3 tiff tinyxml e2fsprogs-libuuid git libvorbis libxslt libplist \ -shairplay avahi-app libcec libbluray samba46 libnfs librtmp libva libvdpau \ -jpeg-turbo glew xrandr libedit inputproto giflib m4 encodings \ -font-util mysql57-client xf86vidmodeproto python2 p8-platform libbdplus \ -libaacs libudev-devd sndio ccache xorg-server binutils libmicrohttpd \ -xorg-server xf86-input-mouse xf86-input-keyboard lirc libfmt autoconf automake - ------------------------------------------------------------------------------ -4. How to compile ------------------------------------------------------------------------------ -Cmake build instructions V18.0 Leia and higher - -Create and change to build directory - $ mkdir kodi-build && cd kodi-build - -Run CMake -- for X11 - $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local - -Compiling on FreeBSD -DENABLE_ALSA=OFF recommended. Or build would fail due to Linux -specific portion of code in xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp. After build -KODI would use SNDIO on FreeBSD. - -Build - $ cmake --build . -- VERBOSE=1 - -Tip: By adding -j to the make command, you describe how many - concurrent jobs will be used, it will speed up the build process. - So for quadcore the command is: - - $ cmake --build . -- VERBOSE=1 -j4 - -If the build process completes succesfully you would want to test if it is working. -Still in the build directory type the following: - - $ ./kodi.bin - -If everything was okay during your test you can now install the binaries to their place -in this example "/usr/local". - - $su - $gmake install - $exit - -NB! 'gmake' stands for 'GNU Make'. BSD's own make does not work here. - -This will install Kodi in the prefix provided in 4.1 as well as a launcher script. - -Tip: By adding -j to the make command, you describe how many - concurrent jobs will be used. So for dualcore the command is: - - $ su - $ gmake install -j2 - -Tip: To override the location that Kodi is installed, use PREFIX=. -For example. - - $ gmake install DESTDIR=$HOME/kodi - ------------------------------------------------------------------------------ -4.4. Binary addons - compile ------------------------------------------------------------------------------ - -From v14 with commit 4090a5f a new API for binary addons is available. -You can compile all addons or only specific addons by specifying e.g. ADDONS="audioencoder.foo pvr.bar audiodecoder.baz" - -.0 All addons - $ gmake -C tools/depends/target/binary-addons PREFIX=/ - -.1 Specific addons - $ gmake -C tools/depends/target/binary-addons PREFIX=/ ADDONS="audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu" - -Audio decoders: - audiodecoder.modplug, audiodecoder.nosefart, audiodecoder.sidplay, audiodecoder.snesapu, - audiodecoder.stsound, audiodecoder.timidity, audiodecoder.vgmstream - -Audio encoders: - audioencoder.flac, audioencoder.lame, audioencoder.vorbis, audioencoder.wav - -Inputstream addons: - inputstream.mpd - -Peripheral addons: - peripheral.joystick - -PVR addons: - pvr.argustv, pvr.demo, pvr.dvblink, pvr.dvbviewer, pvr.filmon, pvr.hdhomerun, pvr.hts, pvr.iptvsimple, - pvr.mediaportal.tvserver,pvr.mythtv, pvr.nextpvr, pvr.njoy, pvr.pctv, pvr.stalker, pvr.vbox, pvr.vdr.vnsi, - pvr.vuplus, pvr.wmc - -Screensavers: - screensaver.asteroids, screensaver.biogenesis, screensaver.greynetic, screensaver.matrixtrails, - screensaver.pingpong, screensaver.pyro, screensavers.rsxs, screensaver.stars - -Visualizations - visualization.fishbmc, visualization.goom, visualization.projectm, visualization.shadertoy - visualization.spectrum, visualization.vsxu, visualization.waveform - ------------------------------------------------------------------------------ -4.5. Test suite ------------------------------------------------------------------------------ - -Kodi has a test suite which uses the Google C++ Testing Framework. -This framework is provided directly in Kodi's source tree. -It has very little requirements, in order to build and run. -See the README file for the framework at 'lib/gtest/README' for specific requirements. - -To compile and run Kodi's test suite, type the following: - - $ gmake check - -To compile the test suite without running it, type the following. - - $ gmake kodi-test - -The test suite program can be run manually as well. -The name of the test suite program is 'kodi-test' and will build in the Kodi source tree. -To bring up the 'help' notes for the program, type the following: - - $ ./kodi-test --gtest_help - -The most useful options are, - - --gtest_list_tests - List the names of all tests instead of running them. - The name of TEST(Foo, Bar) is "Foo.Bar". - - --gtest_filter=POSITIVE_PATTERNS[-NEGATIVE_PATTERNS] - Run only the tests whose name matches one of the positive patterns but - none of the negative patterns. '?' matches any single character; '*' - matches any substring; ':' separates two patterns. - ------------------------------------------------------------------------------ -5. How to run ------------------------------------------------------------------------------ - -How to run Kodi depends on the type of installation you have done. -It is possible to run Kodi without the requirement to install Kodi anywhere else. -In this case, type the following from the top source directory. - - $ ./kodi.bin - -Or run in 'portable' mode - - $ ./kodi.bin -p - -If you chose to install Kodi using '/usr' or '/usr/local' as the PREFIX, -you can just issue 'kodi' in a terminal session. - -If you have overridden PREFIX to install Kodi into some non-standard location, -you will have to run Kodi by directly running 'kodi.bin'. - -For example: - - $ $HOME/kodi/usr/lib/kodi/kodi.bin - -You should still run the wrapper via - $ $PREFIX/bin/kodi - -If you wish to use VDPAU decoding you will now have to change the Render Method -in Settings->Videos->Player from "Auto Detect" to "VDPAU". - ------------------------------------------------------------------------------ -6. Uninstalling ------------------------------------------------------------------------------ - -Prepend "sudo" or "doas" to commands (if installed, if not use just 'su'), if your -user doesn't have write permission to the install directory. - -Note: If you have rerun configure with a different prefix, -you will either need to rerun configure with the correct prefix for this step to work correctly. - - $ gmake uninstall -.0 $ sudo make uninstall - -If you would like to also remove any settings and 3rd party addons (skins, scripts, etc) -you should also run: - -.1 $ rm -rf ~/.kodi - ------------------------------------------------------------------------------ -7. Example basic setup of a KODI machine running on FreeBSD ------------------------------------------------------------------------------ -If having installed FreeBSD 'RELEASE' and not 'STABLE' or 'CURRENT, do system -update first: (have to be 'root'). Also, if you have Radeon graphics card and -plan using HDMI Audio, better install FreeBSD source files during installation. - - $ freebsd-update fetch - $ freebsd-update install - -Update binary package repository: - - $pkg update - -Install convenient text editor ('nano' in this case). - - $pkg install nano - -Open /boot/loader.conf - - $ nano /boot/loader.conf - -Add into file following rows: - - kern.ipc.shmseg=1024 - kern.ipc.shmmni=1024 - kern.maxproc=10000 - hint.acpi_throttle.0.disabled=1 - machdep.disable_mtrrs=1 - kern.cam.scsi_delay=500 - -Open /etc/rc.conf - - $ nano /etc/rc.conf - -Add into the beginning of a /etc/rc.conf - - kld_list="radeonkms acpi_asus_wmi acpi_asus acpi_video amdtemp tmpfs libiconv msdosfs_iconv snd_driver" - -Brief explanation: - - radeonkms - Radeon KMS driver. - acpi_asus_wmi - both ASUS board specific drivers. - acpi_asus - amdtemp - temperature sensor module for AMD CPU. For Intel CPU that would be 'coretemp' - ------------------------------------------------------------------------------ -7.1 Setting up X server ------------------------------------------------------------------------------ - -You may had some X packages during install of KODI's dependency packages but -'xorg' is a metapackage, installing the missing bits as well. - - $ pkg install xorg hal - -Add keyboard and mouse support - - $ pkg install xf86-input-mouse xf86-input-keyboard - -According to your actual hardware, pick one: - - $ pkg install xf86-video-ati - $ pkg install xf86-video-nv - $ pkg install xf86-video intel - -NB! Nvidia's driver could also be downloaded from https://www.geforce.com/drivers. -Both FreeBSD 32-bit and 64-bit official driver exist there. - -Open /etc/rc.conf and add: - - dbus_enable="YES" - hald_enable="YES" - -Add user running KODI into group 'video'. Necessity for having an working OpenGL -acceleration in KODI. - - $ pw groupmod video -m kodiuser - ------------------------------------------------------------------------------ -7.2 Install SLiM login manager ------------------------------------------------------------------------------ - - $ pkg install slim - $ nano /etc/rc.conf - -Add: - - slim_enable="YES" - -NB! Has to be below 'dbus_enable="YES"' and 'hald_enable="YES"' entries in the file. - -Open SLiM configuration file. - - $ nano /usr/local/etc/slim.conf - -Edit until it looks like: - - default_path /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin - default_xserver /usr/local/bin/X - xserver_arguments -nolisten tcp vt09 - halt_cmd /sbin/shutdown -p now - reboot_cmd /sbin/shutdown -r now - console_cmd /usr/local/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/motd; exec /usr/bin/login" - suspend_cmd /usr/sbin/acpiconf -s 3 - xauth_path /usr/local/bin/xauth - authfile /var/run/slim.auth - login_cmd exec /bin/sh - ~/.xinitrc %session - sessiondir /usr/local/share/xsessions - screenshot_cmd import -window root /slim.png - default_user kodi #or whatever user was chosen - auto_login yes - current_theme default - lockfile /var/run/slim.pid - logfile /var/log/slim.log - - -Exit root user and log into user you plan to run KODI with: -create .xinitrc file into it's home directory - - $touch .xinitrc - -Add into it: - - exec /usr/local/bin/kodi - -Log out of normal user, back to 'root' and add package 'doas' (something like sudo) - - $ pkg install doas - -Edit it's config - - $ nano /usr/local/etc/doas.conf - -Add into file following rows: - - permit persist :wheel #assuming group 'wheel' has user - permit nopass kodi as root cmd reboot - permit nopass kodi as root cmd shutdown - -It will allow KODI user basic ability to shut down/reboot machine without needing -privilege escalation. To complete it. - - $ pkg install upower - - -Create file - - $ nano /usr/local/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla - - -Add into it: - - [Actions for KODI users] - Identity=kodi:kodi - Action=org.freedesktop.upower.* - ResultAny=yes - ResultInactive=yes - ResultActive=yes - -On restart (assuming you meanwhile also installed KODI itself), machine should: - --start SLiM --autologin with user kodi (or whatever was chosen) --autostart KODI - -For the rest: FreeBSD has excellent documentation: -https://www.freebsd.org/doc/handbook/ - -And active forum you can ask advice from: -https://forums.freebsd.org/ - ------------------------------------------------------------------------------ -7.3 Solving the troubles with HDMI Audio. ------------------------------------------------------------------------------ - -Nvidia graphics. - - $ pkg install nvidia-driver nvidia-xconfig - -Add into /boot/loader.conf rows: - snd_hda_load="YES" - nvidia_load="YES" - hw.snd.default_unit="0" #ID could be something else besides 0. If it is, - #correct it accordingly - -You can find it by: - - $ cat /dev/sndstat - -After saving the /boot/loader.conf you can force the change in live using - - $ sysctl hw.snd.default_unit=0 (or whatever number your particular machine's - 'cat's would make you choose). - $ kldload nvidia - $ kldload snd_hda - -or just reboot.. - - -Radeon graphics. -First check that HDMI sound output and active sound device in system would be -both the same. - - $ cat /dev/sndstat - $ sysctl -a | grep hw.snd.default_unit - -For example: -If former shows: - - pcm0: (play) - pcm1: (play/rec) default - pcm2: (play/rec) - No devices installed from userspace. - -and latter: - - hw.snd.default_unit: 1 - - -then you should give command: - - $ sysctl hw.snd.default_unit=0 - - -Assuming you did install system sources during installation (you better have!) -Open and find: - - int radeon_audio = 0; - -From: - - $ nano /usr/src/sys/dev/drm2/radeon/radeon_drv.c - -Change it to: - - int radeon_audio = 1; - -Save the file, close the editor. Then - - $ cd /usr/src - $ make buildkernel - -Wait until Clang/LLVM finish. - - $make installkernel - -Reboot and now your Radeon's HDMI Audio should function properly. - - -Intel iGPU. Problem may be in wrong output ID. Find it, correct -it in a similar manner like demonstrated in examples above. - -EOF diff --git a/docs/README.FreeBSD.md b/docs/README.FreeBSD.md new file mode 100644 index 0000000000..4d752c670a --- /dev/null +++ b/docs/README.FreeBSD.md @@ -0,0 +1,486 @@ +TOC +1. Introduction +2. Getting the source code +3. Installing the required libraries and headers +4. How to compile + 4.4 Binary addons + 4.5 Test suite +5. How to run +6. Uninstalling +7. Example basic setup of a KODI machine running on FreeBSD + 7.1 Setting up X Server + 7.2 Install SLiM login manager + 7.3 Solving the troubles with HDMI Audio +----------------------------------------------------------------------------- +1. Introduction +----------------------------------------------------------------------------- + +A graphics-adapter with OpenGL acceleration is highly recommended. +24/32 bitdepth is required along with OpenGL. + +Note to new FreeBSD users: +All lines that are prefixed with the '$' character are commands, +that need to be typed into a terminal window / console. The '$' equals the prompt. +Note: The '$' character itself should NOT be typed as part of the command. + +----------------------------------------------------------------------------- +2. Getting the source code +----------------------------------------------------------------------------- + +You will have to grab the source code of course, here we use git as example. +First install the git package provided by your distribution. +Then from a terminal, type: + +.0 $ cd $HOME +.1 $ git clone git://github.com/xbmc/xbmc.git kodi + +Note: You can clone any specific branch. + +.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi + +----------------------------------------------------------------------------- +3. Installing the required libraries and headers +----------------------------------------------------------------------------- + +You will then need the required libraries. The following is the list of packages +that are used to build Kodi packages on Debian/Ubuntu (with all supported +external libraries enabled). + +$ pkg install taglib gstreamer1-vaapi hal libcapn \ +enca gawk gperf cmake zip nasm swig30 openjdk8 libtool gettext-tools \ +gmake pkgconf rapidjson mesa-libs doxygen glproto dri2proto dri3proto libass \ +flac libcdio curl dbus fontconfig freetype2 fribidi \ +libgcrypt gmp libgpg-error gnutls libidn libinotify lzo2 \ +libogg sqlite3 tiff tinyxml e2fsprogs-libuuid git libvorbis libxslt libplist \ +shairplay avahi-app libcec libbluray samba46 libnfs librtmp libva libvdpau \ +jpeg-turbo glew xrandr libedit inputproto giflib m4 encodings \ +font-util mysql57-client xf86vidmodeproto python2 p8-platform libbdplus \ +libaacs libudev-devd sndio ccache xorg-server binutils libmicrohttpd \ +xorg-server xf86-input-mouse xf86-input-keyboard lirc libfmt autoconf automake + +----------------------------------------------------------------------------- +4. How to compile +----------------------------------------------------------------------------- +Cmake build instructions V18.0 Leia and higher + +Create and change to build directory + $ mkdir kodi-build && cd kodi-build + +Run CMake +- for X11 + $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local + +Compiling on FreeBSD -DENABLE_ALSA=OFF recommended. Or build would fail due to Linux +specific portion of code in xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp. After build +KODI would use SNDIO on FreeBSD. + +Build + $ cmake --build . -- VERBOSE=1 + +Tip: By adding -j to the make command, you describe how many + concurrent jobs will be used, it will speed up the build process. + So for quadcore the command is: + + $ cmake --build . -- VERBOSE=1 -j4 + +If the build process completes succesfully you would want to test if it is working. +Still in the build directory type the following: + + $ ./kodi.bin + +If everything was okay during your test you can now install the binaries to their place +in this example "/usr/local". + + $su + $gmake install + $exit + +NB! 'gmake' stands for 'GNU Make'. BSD's own make does not work here. + +This will install Kodi in the prefix provided in 4.1 as well as a launcher script. + +Tip: By adding -j to the make command, you describe how many + concurrent jobs will be used. So for dualcore the command is: + + $ su + $ gmake install -j2 + +Tip: To override the location that Kodi is installed, use PREFIX=. +For example. + + $ gmake install DESTDIR=$HOME/kodi + +----------------------------------------------------------------------------- +4.4. Binary addons - compile +----------------------------------------------------------------------------- + +From v14 with commit 4090a5f a new API for binary addons is available. +You can compile all addons or only specific addons by specifying e.g. ADDONS="audioencoder.foo pvr.bar audiodecoder.baz" + +.0 All addons + $ gmake -C tools/depends/target/binary-addons PREFIX=/ + +.1 Specific addons + $ gmake -C tools/depends/target/binary-addons PREFIX=/ ADDONS="audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu" + +Audio decoders: + audiodecoder.modplug, audiodecoder.nosefart, audiodecoder.sidplay, audiodecoder.snesapu, + audiodecoder.stsound, audiodecoder.timidity, audiodecoder.vgmstream + +Audio encoders: + audioencoder.flac, audioencoder.lame, audioencoder.vorbis, audioencoder.wav + +Inputstream addons: + inputstream.mpd + +Peripheral addons: + peripheral.joystick + +PVR addons: + pvr.argustv, pvr.demo, pvr.dvblink, pvr.dvbviewer, pvr.filmon, pvr.hdhomerun, pvr.hts, pvr.iptvsimple, + pvr.mediaportal.tvserver,pvr.mythtv, pvr.nextpvr, pvr.njoy, pvr.pctv, pvr.stalker, pvr.vbox, pvr.vdr.vnsi, + pvr.vuplus, pvr.wmc + +Screensavers: + screensaver.asteroids, screensaver.biogenesis, screensaver.greynetic, screensaver.matrixtrails, + screensaver.pingpong, screensaver.pyro, screensavers.rsxs, screensaver.stars + +Visualizations + visualization.fishbmc, visualization.goom, visualization.projectm, visualization.shadertoy + visualization.spectrum, visualization.vsxu, visualization.waveform + +----------------------------------------------------------------------------- +4.5. Test suite +----------------------------------------------------------------------------- + +Kodi has a test suite which uses the Google C++ Testing Framework. +This framework is provided directly in Kodi's source tree. +It has very little requirements, in order to build and run. +See the README file for the framework at 'lib/gtest/README' for specific requirements. + +To compile and run Kodi's test suite, type the following: + + $ gmake check + +To compile the test suite without running it, type the following. + + $ gmake kodi-test + +The test suite program can be run manually as well. +The name of the test suite program is 'kodi-test' and will build in the Kodi source tree. +To bring up the 'help' notes for the program, type the following: + + $ ./kodi-test --gtest_help + +The most useful options are, + + --gtest_list_tests + List the names of all tests instead of running them. + The name of TEST(Foo, Bar) is "Foo.Bar". + + --gtest_filter=POSITIVE_PATTERNS[-NEGATIVE_PATTERNS] + Run only the tests whose name matches one of the positive patterns but + none of the negative patterns. '?' matches any single character; '*' + matches any substring; ':' separates two patterns. + +----------------------------------------------------------------------------- +5. How to run +----------------------------------------------------------------------------- + +How to run Kodi depends on the type of installation you have done. +It is possible to run Kodi without the requirement to install Kodi anywhere else. +In this case, type the following from the top source directory. + + $ ./kodi.bin + +Or run in 'portable' mode + + $ ./kodi.bin -p + +If you chose to install Kodi using '/usr' or '/usr/local' as the PREFIX, +you can just issue 'kodi' in a terminal session. + +If you have overridden PREFIX to install Kodi into some non-standard location, +you will have to run Kodi by directly running 'kodi.bin'. + +For example: + + $ $HOME/kodi/usr/lib/kodi/kodi.bin + +You should still run the wrapper via + $ $PREFIX/bin/kodi + +If you wish to use VDPAU decoding you will now have to change the Render Method +in Settings->Videos->Player from "Auto Detect" to "VDPAU". + +----------------------------------------------------------------------------- +6. Uninstalling +----------------------------------------------------------------------------- + +Prepend "sudo" or "doas" to commands (if installed, if not use just 'su'), if your +user doesn't have write permission to the install directory. + +Note: If you have rerun configure with a different prefix, +you will either need to rerun configure with the correct prefix for this step to work correctly. + + $ gmake uninstall +.0 $ sudo make uninstall + +If you would like to also remove any settings and 3rd party addons (skins, scripts, etc) +you should also run: + +.1 $ rm -rf ~/.kodi + +----------------------------------------------------------------------------- +7. Example basic setup of a KODI machine running on FreeBSD +----------------------------------------------------------------------------- +If having installed FreeBSD 'RELEASE' and not 'STABLE' or 'CURRENT, do system +update first: (have to be 'root'). Also, if you have Radeon graphics card and +plan using HDMI Audio, better install FreeBSD source files during installation. + + $ freebsd-update fetch + $ freebsd-update install + +Update binary package repository: + + $pkg update + +Install convenient text editor ('nano' in this case). + + $pkg install nano + +Open /boot/loader.conf + + $ nano /boot/loader.conf + +Add into file following rows: + + kern.ipc.shmseg=1024 + kern.ipc.shmmni=1024 + kern.maxproc=10000 + hint.acpi_throttle.0.disabled=1 + machdep.disable_mtrrs=1 + kern.cam.scsi_delay=500 + +Open /etc/rc.conf + + $ nano /etc/rc.conf + +Add into the beginning of a /etc/rc.conf + + kld_list="radeonkms acpi_asus_wmi acpi_asus acpi_video amdtemp tmpfs libiconv msdosfs_iconv snd_driver" + +Brief explanation: + + radeonkms - Radeon KMS driver. + acpi_asus_wmi - both ASUS board specific drivers. + acpi_asus + amdtemp - temperature sensor module for AMD CPU. For Intel CPU that would be 'coretemp' + +----------------------------------------------------------------------------- +7.1 Setting up X server +----------------------------------------------------------------------------- + +You may had some X packages during install of KODI's dependency packages but +'xorg' is a metapackage, installing the missing bits as well. + + $ pkg install xorg hal + +Add keyboard and mouse support + + $ pkg install xf86-input-mouse xf86-input-keyboard + +According to your actual hardware, pick one: + + $ pkg install xf86-video-ati + $ pkg install xf86-video-nv + $ pkg install xf86-video intel + +NB! Nvidia's driver could also be downloaded from https://www.geforce.com/drivers. +Both FreeBSD 32-bit and 64-bit official driver exist there. + +Open /etc/rc.conf and add: + + dbus_enable="YES" + hald_enable="YES" + +Add user running KODI into group 'video'. Necessity for having an working OpenGL +acceleration in KODI. + + $ pw groupmod video -m kodiuser + +----------------------------------------------------------------------------- +7.2 Install SLiM login manager +----------------------------------------------------------------------------- + + $ pkg install slim + $ nano /etc/rc.conf + +Add: + + slim_enable="YES" + +NB! Has to be below 'dbus_enable="YES"' and 'hald_enable="YES"' entries in the file. + +Open SLiM configuration file. + + $ nano /usr/local/etc/slim.conf + +Edit until it looks like: + + default_path /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin + default_xserver /usr/local/bin/X + xserver_arguments -nolisten tcp vt09 + halt_cmd /sbin/shutdown -p now + reboot_cmd /sbin/shutdown -r now + console_cmd /usr/local/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/motd; exec /usr/bin/login" + suspend_cmd /usr/sbin/acpiconf -s 3 + xauth_path /usr/local/bin/xauth + authfile /var/run/slim.auth + login_cmd exec /bin/sh - ~/.xinitrc %session + sessiondir /usr/local/share/xsessions + screenshot_cmd import -window root /slim.png + default_user kodi #or whatever user was chosen + auto_login yes + current_theme default + lockfile /var/run/slim.pid + logfile /var/log/slim.log + + +Exit root user and log into user you plan to run KODI with: +create .xinitrc file into it's home directory + + $touch .xinitrc + +Add into it: + + exec /usr/local/bin/kodi + +Log out of normal user, back to 'root' and add package 'doas' (something like sudo) + + $ pkg install doas + +Edit it's config + + $ nano /usr/local/etc/doas.conf + +Add into file following rows: + + permit persist :wheel #assuming group 'wheel' has user + permit nopass kodi as root cmd reboot + permit nopass kodi as root cmd shutdown + +It will allow KODI user basic ability to shut down/reboot machine without needing +privilege escalation. To complete it. + + $ pkg install upower + + +Create file + + $ nano /usr/local/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla + + +Add into it: + + [Actions for KODI users] + Identity=kodi:kodi + Action=org.freedesktop.upower.* + ResultAny=yes + ResultInactive=yes + ResultActive=yes + +On restart (assuming you meanwhile also installed KODI itself), machine should: + +-start SLiM +-autologin with user kodi (or whatever was chosen) +-autostart KODI + +For the rest: FreeBSD has excellent documentation: +https://www.freebsd.org/doc/handbook/ + +And active forum you can ask advice from: +https://forums.freebsd.org/ + +----------------------------------------------------------------------------- +7.3 Solving the troubles with HDMI Audio. +----------------------------------------------------------------------------- + +Nvidia graphics. + + $ pkg install nvidia-driver nvidia-xconfig + +Add into /boot/loader.conf rows: + snd_hda_load="YES" + nvidia_load="YES" + hw.snd.default_unit="0" #ID could be something else besides 0. If it is, + #correct it accordingly + +You can find it by: + + $ cat /dev/sndstat + +After saving the /boot/loader.conf you can force the change in live using + + $ sysctl hw.snd.default_unit=0 (or whatever number your particular machine's + 'cat's would make you choose). + $ kldload nvidia + $ kldload snd_hda + +or just reboot.. + + +Radeon graphics. +First check that HDMI sound output and active sound device in system would be +both the same. + + $ cat /dev/sndstat + $ sysctl -a | grep hw.snd.default_unit + +For example: +If former shows: + + pcm0: (play) + pcm1: (play/rec) default + pcm2: (play/rec) + No devices installed from userspace. + +and latter: + + hw.snd.default_unit: 1 + + +then you should give command: + + $ sysctl hw.snd.default_unit=0 + + +Assuming you did install system sources during installation (you better have!) +Open and find: + + int radeon_audio = 0; + +From: + + $ nano /usr/src/sys/dev/drm2/radeon/radeon_drv.c + +Change it to: + + int radeon_audio = 1; + +Save the file, close the editor. Then + + $ cd /usr/src + $ make buildkernel + +Wait until Clang/LLVM finish. + + $make installkernel + +Reboot and now your Radeon's HDMI Audio should function properly. + + +Intel iGPU. Problem may be in wrong output ID. Find it, correct +it in a similar manner like demonstrated in examples above. + +EOF diff --git a/docs/README.Linux.md b/docs/README.Linux.md new file mode 100644 index 0000000000..cc517095f8 --- /dev/null +++ b/docs/README.Linux.md @@ -0,0 +1,279 @@ +TOC +1. Introduction +2. Getting the source code +3. Installing the required libraries and headers +4. How to compile + 4.4 Binary addons + 4.5 Test suite +5. How to run +6. Uninstalling + +----------------------------------------------------------------------------- +1. Introduction +----------------------------------------------------------------------------- + +A graphics-adapter with OpenGL acceleration is highly recommended. +24/32 bitdepth is required along with OpenGL. + +Note to new Linux users: +All lines that are prefixed with the '$' character are commands, +that need to be typed into a terminal window / console. The '$' equals the prompt. +Note: The '$' character itself should NOT be typed as part of the command. + +----------------------------------------------------------------------------- +2. Getting the source code +----------------------------------------------------------------------------- + +You will have to grab the source code of course, here we use git as example. +First install the git package provided by your distribution. +Then from a terminal, type: + +.0 $ cd $HOME +.1 $ git clone git://github.com/xbmc/xbmc.git kodi + +Note: You can clone any specific branch. + +.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi + +----------------------------------------------------------------------------- +3. Installing the required libraries and headers +----------------------------------------------------------------------------- + +You will then need the required libraries. The following is the list of packages +that are used to build Kodi packages on Debian/Ubuntu (with all supported +external libraries enabled). + +Build-Depends: autoconf, automake, autopoint, autotools-dev, cmake, curl, + default-jre, gawk, gperf, libao-dev, libasound2-dev, + libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev, + libbluray-dev (>= 0.9.3), libbz2-dev, libcap-dev, + libcdio-dev, libcec-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev, + libcwiid-dev, libdbus-1-dev, libegl1-mesa-dev, libfmt3-dev, libfontconfig-dev, libfreetype6-dev, + libfribidi-dev, libgif-dev (>= 4.1.6), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, + libiso9660-dev, libjpeg-dev, libltdl-dev, liblzo2-dev, libmicrohttpd-dev, + libmpcdec-dev, libmysqlclient-dev, libnfs-dev, + libpcre3-dev, libplist-dev, libpng12-dev | libpng-dev, libpulse-dev, + libshairplay-dev, libsmbclient-dev, libsqlite3-dev, libssl-dev, libswscale-dev, + libtag1-dev (>= 1.8), libtinyxml-dev (>= 2.6.2), libtool, libudev-dev, + libusb-dev, libva-dev, libvdpau-dev, libxml2-dev, + libxmu-dev, libxrandr-dev, libxslt1-dev, libxt-dev, lsb-release, rapidjson-dev, + nasm [!amd64], python-dev, python-imaging, python-support, swig, uuid-dev, yasm, zlib1g-dev, + liblirc-dev + +If you want to build with Wayland instead of X11, you will need: + wayland-protocols (>= 1.7), libwaylandpp-dev + +[NOTICE] crossguid / libcrossguid-dev all Linux distributions. +Kodi now requires crossguid which is not available in Ubuntu repositories at this time. +We supply a Makefile in tools/depends/target/crossguid +to make it easy to install into /usr/local. + $ make -C tools/depends/target/crossguid PREFIX=/usr/local + +[NOTICE] libfmt / libfmt3-dev all Linux distributions. +Kodi now requires libfmt which is not available in Ubuntu repositories at this time. +We supply a Makefile in tools/depends/target/libfmt +to make it easy to install into /usr/local. + $ make -C tools/depends/target/libfmt PREFIX=/usr/local + +[NOTICE] wayland-protocols all Linux distributions. +Building Kodi with Wayland requires a recent version of wayland-protocols (at least 1.7) +which is not available in the Ubuntu LTS repostiories at this time. +We supply a Makefile in tools/depends/target/wayland-protocols to make it easy to install +into /usr/local. + $ make -C tools/depends/target/wayland-protocols PREFIX=/usr/local + +[NOTICE] waylandpp all Linux distributions. +Building Kodi with Wayland requires waylandpp which is not available in repositories +of most major distributions at this time. +We supply a Makefile in tools/depends/target/waylandpp to make it easy to install +into /usr/local. +Note that building waylandpp has some dependencies of its own: scons, +libwayland-dev (>= 1.11.0), libwayland-egl1-mesa + $ make -C tools/depends/target/waylandpp PREFIX=/usr/local + +Note: For developers and anyone else who compiles frequently it is recommended to use ccache. + $ sudo apt-get install ccache + +----------------------------------------------------------------------------- +3.1. Using the Kodi PPA to get all build dependencies (Debian/Ubuntu only) +----------------------------------------------------------------------------- + +For this, you need to specify the PPA in your apt sources. +Please find them on the following wiki link: +Note: See README.Ubuntu.md as well + +http://kodi.wiki/index.php?title=Official_Ubuntu_PPA + +Update apt: + $ sudo apt-get update + +The command to get the build dependencies, used to compile the version on the PPA. + $ sudo apt-get build-dep kodi + +----------------------------------------------------------------------------- +4. How to compile +----------------------------------------------------------------------------- +Cmake build instructions V18.0 Leia and higher + +Create and change to build directory + $ mkdir kodi-build && cd kodi-build + +Run CMake +- for X11 + $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local +- for Wayland + $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=wayland -DWAYLAND_RENDER_SYSTEM=gl + (You can use "gles" instead of "gl" if you want to build with GLES) + +Build + $ cmake --build . -- VERBOSE=1 + +Tip: By adding -j to the make command, you describe how many + concurrent jobs will be used, it will speed up the build process. + So for quadcore the command is: + + $ cmake --build . -- VERBOSE=1 -j4 + +If the build process completes succesfully you would want to test if it is working. +Still in the build directory type the following: + + $ ./kodi.bin + +If everything was okay during your test you can now install the binaries to their place +in this example "/usr/local". + + $ sudo make install + +This will install Kodi in the prefix provided in 4.1 as well as a launcher script. + +Tip: By adding -j to the make command, you describe how many + concurrent jobs will be used. So for dualcore the command is: + + $ sudo make install -j2 + +Tip: To override the location that Kodi is installed, use PREFIX=. +For example. + + $ make install DESTDIR=$HOME/kodi + +----------------------------------------------------------------------------- +4.4. Binary addons - compile +----------------------------------------------------------------------------- + +From v14 with commit 4090a5f a new API for binary addons is available. +You can compile all addons or only specific addons by specifying e.g. ADDONS="audioencoder.foo pvr.bar audiodecoder.baz" + +.0 All addons + $ make -C tools/depends/target/binary-addons PREFIX=/ + +.1 Specific addons + $ make -C tools/depends/target/binary-addons PREFIX=/ ADDONS="audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu" + +Audio decoders: + audiodecoder.modplug, audiodecoder.nosefart, audiodecoder.sidplay, audiodecoder.snesapu, + audiodecoder.stsound, audiodecoder.timidity, audiodecoder.vgmstream + +Audio encoders: + audioencoder.flac, audioencoder.lame, audioencoder.vorbis, audioencoder.wav + +Inputstream addons: + inputstream.mpd + +Peripheral addons: + peripheral.joystick + +PVR addons: + pvr.argustv, pvr.demo, pvr.dvblink, pvr.dvbviewer, pvr.filmon, pvr.hdhomerun, pvr.hts, pvr.iptvsimple, + pvr.mediaportal.tvserver,pvr.mythtv, pvr.nextpvr, pvr.njoy, pvr.pctv, pvr.stalker, pvr.vbox, pvr.vdr.vnsi, + pvr.vuplus, pvr.wmc + +Screensavers: + screensaver.asteroids, screensaver.biogenesis, screensaver.greynetic, screensaver.matrixtrails, + screensaver.pingpong, screensaver.pyro, screensavers.rsxs, screensaver.stars + +Visualizations + visualization.fishbmc, visualization.goom, visualization.projectm, visualization.shadertoy + visualization.spectrum, visualization.vsxu, visualization.waveform + +----------------------------------------------------------------------------- +4.5. Test suite +----------------------------------------------------------------------------- + +Kodi has a test suite which uses the Google C++ Testing Framework. +This framework is provided directly in Kodi's source tree. +It has very little requirements, in order to build and run. +See the README file for the framework at 'lib/gtest/README' for specific requirements. + +To compile and run Kodi's test suite, type the following: + + $ make check + +To compile the test suite without running it, type the following. + + $ make kodi-test + +The test suite program can be run manually as well. +The name of the test suite program is 'kodi-test' and will build in the Kodi source tree. +To bring up the 'help' notes for the program, type the following: + + $ ./kodi-test --gtest_help + +The most useful options are, + + --gtest_list_tests + List the names of all tests instead of running them. + The name of TEST(Foo, Bar) is "Foo.Bar". + + --gtest_filter=POSITIVE_PATTERNS[-NEGATIVE_PATTERNS] + Run only the tests whose name matches one of the positive patterns but + none of the negative patterns. '?' matches any single character; '*' + matches any substring; ':' separates two patterns. + +----------------------------------------------------------------------------- +5. How to run +----------------------------------------------------------------------------- + +How to run Kodi depends on the type of installation you have done. +It is possible to run Kodi without the requirement to install Kodi anywhere else. +In this case, type the following from the top source directory. + + $ ./kodi.bin + +Or run in 'portable' mode + + $ ./kodi.bin -p + +If you chose to install Kodi using '/usr' or '/usr/local' as the PREFIX, +you can just issue 'kodi' in a terminal session. + +If you have overridden PREFIX to install Kodi into some non-standard location, +you will have to run Kodi by directly running 'kodi.bin'. + +For example: + + $ $HOME/kodi/usr/lib/kodi/kodi.bin + +You should still run the wrapper via + $ $PREFIX/bin/kodi + +If you wish to use VDPAU decoding you will now have to change the Render Method +in Settings->Videos->Player from "Auto Detect" to "VDPAU". + +----------------------------------------------------------------------------- +6. Uninstalling +----------------------------------------------------------------------------- + +Prepend "sudo" to commands, if your user doesn't have write permission to the install directory. + +Note: If you have rerun configure with a different prefix, +you will either need to rerun configure with the correct prefix for this step to work correctly. + + $ make uninstall +.0 $ sudo make uninstall + +If you would like to also remove any settings and 3rd party addons (skins, scripts, etc) +you should also run: + +.1 $ rm -rf ~/.kodi + +EOF diff --git a/docs/README.RaspberryPi.md b/docs/README.RaspberryPi.md new file mode 100644 index 0000000000..9ed09a8eb8 --- /dev/null +++ b/docs/README.RaspberryPi.md @@ -0,0 +1,75 @@ +TOC +1. Introduction +2. Building Kodi for the Raspberry Pi +3. Building Kodi using buildroot environment + +----------------------------------------------------------------------------- +1. Introduction +----------------------------------------------------------------------------- + +You can build Kodi for the Raspberry Pi in different ways. This document +shows two different methods. The first assumes that you want to run Kodi +on top of an image like Raspbian, the second shows how to create an entire +image which includes Linux. + +----------------------------------------------------------------------------- +2. Building Kodi for the Raspberry Pi +----------------------------------------------------------------------------- + +The following steps were tested with Ubuntu 16.04 x64. (Note that building on +a 32 bit machine requires slightly different setting). + +The following commands build for newer Raspberry Pi 2 generation. In order to +build for the first Raspberry Pi, the commands have to be adapted to use +`--with-platform=raspberry-pi` instead of `--with-platform=raspberry-pi2`. + + $ sudo apt-get install git autoconf curl g++ zlib1g-dev libcurl4-openssl-dev gawk gperf libtool autopoint swig default-jre bison make + + $ RPI_DEV=$PWD + $ git clone https://github.com/raspberrypi/tools + $ git clone https://github.com/raspberrypi/firmware + $ git clone https://github.com/xbmc/xbmc + + $ mkdir kodi-bcm + $ cd xbmc/tools/depends + $ ./bootstrap + $ ./configure --host=arm-linux-gnueabihf \ + --prefix=$RPI_DEV/kodi-bcm \ + --with-toolchain=$RPI_DEV/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf \ + --with-firmware=$RPI_DEV/firmware \ + --with-platform=raspberry-pi2 \ + --disable-debug + + $ make + $ cd ../.. + + $ make -C tools/depends/target/cmakebuildsys + $ cd build + $ make + $ make install + +----------------------------------------------------------------------------- +3. Building Kodi using buildroot environment +----------------------------------------------------------------------------- + +Installing and setting up the buildroot environment: + +Create a top level directory where you checkout Kodi and buildroot. + +For example : + + $ mkdir /opt/kodi-raspberrypi + $ cd /opt/kodi-raspberrypi + +Checkout kodi : + + $ git clone https://github.com/xbmc/xbmc.git kodi + +Checkout buildroot : + + $ git clone https://github.com/huceke/buildroot-rbp.git + + $ cd /opt/kodi-raspberrypi/buildroot-rbp + +Follow the instructions in README.rbp how to build the system and Kodi. + diff --git a/docs/README.Ubuntu.md b/docs/README.Ubuntu.md new file mode 100644 index 0000000000..75cba3846e --- /dev/null +++ b/docs/README.Ubuntu.md @@ -0,0 +1,129 @@ +TOC +1. Introduction +2. Getting the source code +3. Installing the required Ubuntu packages +4. How to compile +5. Uninstalling + +----------------------------------------------------------------------------- +1. Introduction +----------------------------------------------------------------------------- + +A graphics-adapter with OpenGL acceleration is highly recommended. +24/32 bitdepth is required along with OpenGL. + +Note to new Linux users. +All lines that are prefixed with the '$' character are commands, that need to be typed +into a terminal window / console (similar to the command prompt for Windows). +Note that the '$' character itself should NOT be typed as part of the command. + +----------------------------------------------------------------------------- +2. Getting the source code +----------------------------------------------------------------------------- + +.0 $ cd $HOME +.1 $ git clone git://github.com/xbmc/xbmc.git kodi + +Note: You can clone any specific branch. + +.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi + +----------------------------------------------------------------------------- +3. Installing the required Ubuntu packages +----------------------------------------------------------------------------- + +Two methods exist to install the required Ubuntu packages: + +[NOTICE] For supported older Ubuntu versions, some packages might be outdated. + For those, you can either compile them manually, or use our backports + available from our official stable PPA: + + http://launchpad.net/~team-xbmc/+archive/ppa + +----------------------------------------------------------------------------- +3a. Use a single command to get all build dependencies +----------------------------------------------------------------------------- +[NOTICE] Supported on Ubuntu >= 16.04 + +You can get all build dependencies used for building the packages on the PPA + +Add the unstable PPA: + +For >= 16.04 lts: + $ sudo apt-get install software-properties-common + $ sudo add-apt-repository -s ppa:team-xbmc/xbmc-nightly + +Add build-depends PPA: + $ sudo add-apt-repository ppa:team-xbmc/xbmc-ppa-build-depends + +Here is the magic command to get the build dependencies (used to compile the version on the PPA). + $ sudo apt-get update + $ sudo apt-get build-dep kodi + +Optional: If you do not want Kodi to be installed via PPA, you can removed the PPAs again: + $ sudo add-apt-repository -r ppa:team-xbmc/xbmc-nightly + $ sudo add-apt-repository -r ppa:team-xbmc/xbmc-ppa-build-depends + +Note: Do not use "aptitude" for the build-dep command. It doesn't resolve everything properly. + For developers and anyone else who compiles frequently it is recommended to use ccache + $ sudo apt-get install ccache + +Tip: For those with multiple computers at home is to try out distcc + (fully unsupported from Kodi of course) + $ sudo apt-get install distcc + +----------------------------------------------------------------------------- +3b. Alternative: Manual dependency installation +----------------------------------------------------------------------------- + +For Ubuntu (all versions >= 16.04): + $ sudo apt-get install automake bison build-essential cmake curl cvs \ + default-jre fp-compiler gawk gdc gettext git-core gperf libasound2-dev libass-dev \ + libbz2-dev libcap-dev libcdio-dev libcurl3 \ + libcurl4-openssl-dev libdbus-1-dev libfontconfig-dev libegl1-mesa-dev libfreetype6-dev \ + libfribidi-dev libgif-dev libiso9660-dev libjpeg-dev liblzo2-dev \ + libmicrohttpd-dev libmysqlclient-dev libnfs-dev \ + libpcre3-dev libplist-dev libpng-dev libpulse-dev libsmbclient-dev \ + libsqlite3-dev libssl-dev libtinyxml-dev libtool libudev-dev libusb-dev \ + libva-dev libvdpau-dev libxml2-dev libxmu-dev libxrandr-dev \ + libxrender-dev libxslt1-dev libxt-dev mesa-utils nasm pmount python-dev python-imaging \ + python-sqlite rapidjson-dev swig uuid-dev yasm zlib1g-dev liblirc-dev + +[NOTICE] crossguid / libcrossguid-dev all Linux distributions. +Kodi now requires crossguid which is not available in Ubuntu repositories at this time. +If build-deps PPA doesn't provide a pre-packaged version for your distribution, see (1.) below. + +Use prepackaged from the Kodi build-depends PPA. +0. $ sudo apt-get install libcrossguid-dev + +We also supply a Makefile in tools/depends/target/crossguid +to make it easy to install into /usr/local. +1. $ make -C tools/depends/target/crossguid PREFIX=/usr/local + +[NOTICE] libfmt / libfmt3-dev all Linux distributions. +Kodi now requires libfmt which is not available in Ubuntu repositories at this time. +If build-deps PPA doesn't provide a pre-packaged version for your distribution, we supply a +Makefile in tools/depends/target/libfmt to make it easy to install into /usr/local. +1. $ make -C tools/depends/target/libfmt PREFIX=/usr/local + +Unless you are proficient with how Linux libraries and versions work, do not +try to provide it yourself, as you will likely mess up for other programs. + +----------------------------------------------------------------------------- +4. How to compile +----------------------------------------------------------------------------- +See README.linux + +----------------------------------------------------------------------------- +4.1. Test Suite +----------------------------------------------------------------------------- +See README.linux + +----------------------------------------------------------------------------- +5. Uninstalling +----------------------------------------------------------------------------- +Remove any PPA installed Kodi. + $ sudo apt-get remove kodi* xbmc* + +See README.linux/Uninstalling for removing compiled versions of Kodi. +EOF diff --git a/docs/README.android b/docs/README.android deleted file mode 100644 index c2d04d154c..0000000000 --- a/docs/README.android +++ /dev/null @@ -1,389 +0,0 @@ -TOC -1. Introduction -2. Installing the required Ubuntu packages -3. Installing and setting up the Android environment -4. Getting the source code -5. How to compile -6. Installing Kodi in an Android system -7. Running and debugging Kodi in an Android system -8. Architecture -9. Useful Commands - ------------------------------------------------------------------------------ -1. Introduction ------------------------------------------------------------------------------ - -We currently recommend Ubuntu "Xenial Xerus" (16.04) 64Bit. This is what our continuous -integration system "jenkins" is using. -Additionally, building from OSX Snow Leopard or Mavericks (others on your own risk ;) ) is working (see 3.1). - -NOTE TO NEW USERS: All lines that are prefixed with the '$' -character are commands that need to be typed into a terminal window / -console (similar to the command prompt for Windows). Note that the '$' -character itself should NOT be typed as part of the command. - ------------------------------------------------------------------------------ -2. Installing the required Ubuntu packages ------------------------------------------------------------------------------ -These are the minimum packages necessary for building Kodi. -Non-Ubuntu users will need to get the equivalents. - - $ sudo apt-get install build-essential default-jdk git curl autoconf \ - unzip zlib1g-dev gawk gperf cmake libcurl4-openssl-dev - -If you run a 64bit operating system you will also need to get ia32-libs - -Ubuntu >= 14.04: - $ sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev - -Older versions: - $ sudo apt-get install ia32-libs - -The following versions are used on our continuous integration system "jenkins". Other (newer) -versions might work as well. - -JDK: openjdk-6-jdk (java version "1.6.0_27") -JRE: openjre-6-jre (java version "1.6.0_27") - - ------------------------------------------------------------------------------ -3. Installing and setting up the Android environment ------------------------------------------------------------------------------ - -To develop Kodi for Android the Android SDK and NDK are required. - --------------------------------------------------------------------- -3.1. Prerequisites when compiling on Mac OSX --------------------------------------------------------------------- - -a. When building on Mac OSX you need to download the java JDK (development kit) from http://www.oracle.com - Or ensure otherwise that you are using java 1.8 (java -version tells you the version). -b. The compilation for android needs a case sensitive filesystem. The - filesystem used on normal OSX installations is case insensitive. So you - need to generate a writeable hdd image and format it with hfs+ (case sensitive). - The size should be 20GB. -c. Generate a writable dmg with the following command: - $ hdiutil create -type UDIF -fs 'Case-sensitive Journaled HFS+' -size 20g -volname android-dev ~/android-dev.dmg - -d. Whenever you want to compile/develop you need to mount it: - $ open ~/android-dev.dmg - -e. Your workspace can be accessed in /Volumes/android-dev/ then -f. Once you have your hdd image with case sensitive hfs+ file system do all steps - below inside of this filesystem. In the end you need to adapt all paths in this - document so that they match your local environment. As an example here is a - configure line from step 5.1 which demonstrates possible paths. In this - example the hdd image is mounted on /Volumes/android-dev. - $ ./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=arm-linux-androideabi \ - --with-sdk-path=/Volumes/android-dev/android/android-sdk-macosx \ - --with-ndk-path=/Volumes/android-dev/android/android-ndk-r16 \ - --with-toolchain=/Volumes/android-dev/android/android-toolchain-arm/android-21 \ - --prefix=/Volumes/android-dev/android/xbmc-depends - --------------------------------------------------------------------- -3.2. Getting the Android SDK and NDK --------------------------------------------------------------------- - -To get the Android SDK, go to http://developer.android.com/sdk and -download the latest version for your operating system. The NDK -can be downloaded from http://developer.android.com/tools/sdk/ndk/ - -[NOTICE] Compiling Kodi for Android requires Android NDK - Revision 16. For the SDK just use the latest available. - It will work. - -After downloading the SDK and NDK extract the files contained in the -archives to your harddisk. For our example we are extracting in the following -directories (this matches the example from tools/depends/README as well): - -NDK (referenced as from now on): -/opt/android-ndk-r16 - -TOOLCHAIN (arm) (referenced as from now on): -/opt/arm-linux-androideabi-4.9-vanilla/android-21 - -TOOLCHAIN (aarch64) (referenced as from now on): -/opt/aarch64-linux-android-4.9-vanilla/android-21 - -TOOLCHAIN (x86) (referenced as from now on): -/opt/x86-linux-4.9-vanilla/android-21 - -SDK (referenced as from now on): -/opt/android-sdk-linux - -Make sure you have a recent JRE and JDK installed otherwise the -Android SDK will not work. (see point 2.) - --------------------------------------------------------------------- -3.3. Installing Android SDK packages --------------------------------------------------------------------- - -After having extracted the Android SDK to you need to -install some android packages using the Android SDK Manager: - - $ cd /tools - $ ./android update sdk -u -t platform,platform-tool - $ ./android update sdk --all -u -t build-tools-25.0.3 - -As of newest SDKs the android tool is deprecated. Use sdkmanager instead: - $ cd /tools/bin - $ ./sdkmanager platform-tools - $ ./sdkmanager "platforms;android-26" - $ ./sdkmanager "build-tools;25.0.3" - --------------------------------------------------------------------- -3.4. Setup the Android toolchain --------------------------------------------------------------------- - -To be able to compile Kodi and the libraries it depends on for the -Android platform you first need to setup an Android toolchain using -the Android NDK which you earlier extracted to . The -following commands will create a toolchain suitable for the most -common scenario. -The --install-dir option (and therefore the / value) -specifies where the resulting toolchain should be installed (your choice). - -[NOTICE] Kodi uses the android API Version 21 and clang version 5.0! - -Building for arm architecture: - - $ cd - $ ls platforms - $ cd build/tools - $ ./make-standalone-toolchain.sh \ - --install-dir= --platform=android-21 \ - --toolchain=arm-linux-androideabi-4.9 --stl=libc++ - -Building for aarch64 architecture: - - $ cd - $ ls platforms - $ cd build/tools - $ ./make-standalone-toolchain.sh \ - --install-dir= --platform=android-21 \ - --toolchain=aarch64-linux-android-4.9 --stl=libc++ - -Building for x86 architecture: - - $ cd - $ ls platforms - $ cd build/tools - $ ./make-standalone-toolchain.sh \ - --install-dir= --platform=android-21 \ - --toolchain=x86-4.9 --arch=x86 --stl=libc++ - -Make sure to pick a toolchain for your desired architecture. If an error about -the used system is shown - please add proper --system parameter as mentioned -in the error message. - --------------------------------------------------------------------- -3.5. Create a (new) debug key to sign debug APKs --------------------------------------------------------------------- - -All packages must be signed. The following command will generate a -self-signed debug key. If the result is a cryptic error, it -probably just means a debug key already existed, no cause for alarm. - - $ keytool -genkey -keystore ~/.android/debug.keystore -v -alias \ - androiddebugkey -dname "CN=Android Debug,O=Android,C=US" -keypass \ - android -storepass android -keyalg RSA -keysize 2048 -validity 10000 - ------------------------------------------------------------------------------ -4. Getting the source code ------------------------------------------------------------------------------ - - $ cd $HOME - $ git clone git://github.com/xbmc/xbmc.git kodi-android - $ cd kodi-android - ------------------------------------------------------------------------------ -5. How to compile ------------------------------------------------------------------------------ - -Compiling Kodi for Android consists of compiling the libraries Kodi depends -on with the Android toolchain and creating an Android Application Package -(APK) which can be installed in an Android system. - --------------------------------------------------------------------- -5.1. Building dependencies --------------------------------------------------------------------- - - $ cd $HOME/kodi-android/tools/depends - $ ./bootstrap - $ ./configure --help - -Run configure with the correct settings for you local configuration. -See tools/depends/README for examples. - -Anyone working on the dependencies themselves will want to set the -environment variables specified in ~/.bashrc or similar, to avoid -having to input these with each configure. - - $ make -j - $ make -j -C target/binary-addons - -NOTE: if you only want to build specific addons you can specify like this: - $ make -C target/binary-addons ADDONS="pvr.hts pvr.dvblink" - -This build was designed to be massively parallel. Don't be afraid to -give it a 'make -j20' or so. - -Verify that all dependencies are built correctly (it will tell you so) -before continuing to avoid errors. If in doubt run another 'make' (single threaded) -until the message "Dependencies built successfully." appears. If the single make -fails, keep cleaning the specific library by issuing: - $ make -C target/ distclean - -Then try make again. -Rinse and repeat until you are really done and all libs are built. - --------------------------------------------------------------------- -5.2. Building Kodi --------------------------------------------------------------------- - - $ cd $HOME/kodi-android - $ make -C tools/depends/target/cmakebuildsys - $ cd build - $ make - $ make apk - -After the first build (assuming bootstrap and configure are successful), -subsequent builds can be run with a simple 'make' and 'make apk'. - -The built APK will be present in $HOME/kodi-android - ------------------------------------------------------------------------------ -6. Installing Kodi in an Android system ------------------------------------------------------------------------------ - -To install Kodi through the previously built APK in an Android system you can -either install it on a real device (smartphone/tablet/...) running Android - >= 5.x - --------------------------------------------------------------------- -6.1. Installing Kodi on the Android device --------------------------------------------------------------------- - -Make sure your Android device is connected to your computer through -USB. Furthermore you have to enable the following option in your -device's Android settings: - - - Applications - [X] Unknown sources - - $ cd $HOME/kodi-android - $ adb devices - $ adb -s install -r xbmcapp-debug.apk - -The can be retrieved from the list returned by the -"adb devices" command and is the first value in the row representing -your device. - ------------------------------------------------------------------------------ -7. Running and debugging Kodi in an Android system ------------------------------------------------------------------------------ - -After installing Kodi's APK in an Android system you can start it using its -Launcher icon in Android's Application Launcher. - --------------------------------------------------------------------- -7.1. Debugging Kodi --------------------------------------------------------------------- - -To be able to see what is happening while running Kodi you first need -to enable USB debugging in your Android settings (this is already done -when using the emulator): - - - Applications - [X] Unknown sources - - Development - [X] USB debugging - -To access the log output of your Android system run (the -s parameter -and the may not be needed when using the Android emulator) - - $ adb -s logcat - - --------------------------------------------------------------------- -7.2. GDB --------------------------------------------------------------------- - -GDB can be used to debug, though the support is rather primitive. Rather than -using gdb directly, you will need to use ndk-gdb which wraps it. Do NOT trust -the -p/--project switches, as they do not work. Instead you will need -to cd to tools/android/packaging/xbmc and execute it from there. - - $ ndk-gdb --start --delay=0 - -This will open the installed version of Kodi and break. The warnings can be -ignored as we have setup the appropriate paths already. - --------------------------------------------------------------------- -8. Architecture --------------------------------------------------------------------- - -During the early days of the android port, Kodi was launched via a stub lib -that then dlopen'd libkodi. This was done to get around bionic's poor handling -of shared libs. We now compile everything into libkodi itself so that it has -no runtime dependencies beyond system libs. Done this way, we're able to launch -into libkodi directly. - -But we still hit Bionic's loader's deficiencies when we dlopen a lib. There are -two main issues to overcome for loading: - -1. Bionic imports all symbols for a lib as soon as it is loaded, and it will -refuse to open a lib if it has a single unresolved symbol - -2. It does not search recursively during the resolve. So if liba depends on -libb, dlopen'ing liba will _not_ pull in missing symbols from libb. This is -particularly nasty considering #1. - -To work-around these problems we use our own recursive loader in place of -dlopen. This loader mimics expected behavior. Using the example above, loading -libb before liba will mean that everything will resolve correctly. - -Additionally, Android does not use versioned solibs. libfoo.so.1 which is -typical on linux would not be found by the loader. This means that we must -strip the SONAME and NEEDED values out of the libs as well as changing the -filenames themselves. The cleaner solution would be to patch libtool/cmake/etc -to not add versioning in the first place. For now, we use the brute-force -approach of modifying the binary and blanking out the versions. - -See here for more info: -http://www.bernawebdesign.ch/byteblog/2011/11/23/creating-non-versioned-shared-libraries-for-android/ - -As a final gotcha, all libs must be in the form of ^lib.*so$ with no -exceptions (they won't even install otherwise), and the soname must match. -So we have to do some renaming to get some of our self-built libs loaded. - -Development: -Typical android native activities are built with ndk-build which is a wrapper -around Make. It would be a nightmare to port our entire buildsystem over, so -instead we build as usual then package ourselves. It may be beneficial to use -ndk-build to do the actual packaging, but for now its behavior is emulated. - -ABI: -Presently we are targeting armv7a+neon for arm, and i686 for x86. - --------------------------------------------------------------------- -9. Useful Commands --------------------------------------------------------------------- - -Below are a few helpful commands when building/debugging. These assume that pwd -is 'tools/android/packaging' and that the proper sdk/ndk paths are set. - --Install a new build over the existing one - $ adb -e install -r images/xbmcapp-debug.apk - --Launch Kodi on the emulator without the GUI - $ adb shell am start -a android.intent.action.MAIN -n org.xbmc.xbmc/android.app.NativeActivity - --Kill a misbehaving Kodi - $ adb shell ps | grep org.xbmc | awk '{print $2}' | xargs adb shell kill - --Filter logcat messages by a specific tag (e.g. "Kodi") - $ adb logcat -s Kodi:V - --Enable CheckJNI (BEFORE starting the application) - $ adb shell setprop debug.checkjni 1 diff --git a/docs/README.fedora b/docs/README.fedora deleted file mode 100755 index 3321e05ff6..0000000000 --- a/docs/README.fedora +++ /dev/null @@ -1,77 +0,0 @@ -TOC -1. Introduction -2. Getting the source code -3. Installing the required libraries and headers -4. How to compile -5. Uninstalling - ------------------------------------------------------------------------------ -1. Introduction ------------------------------------------------------------------------------ - -A graphics-adapter with OpenGL or OpenGLES acceleration is required. - -Note to new Linux users: -All lines that are prefixed with the '$' character are commands, -that need to be typed into a terminal window / console. The '$' equals the prompt. -Note: The '$' character itself should NOT be typed as part of the command. - ------------------------------------------------------------------------------ -2. Getting the source code ------------------------------------------------------------------------------ - -You will have to grab the source code of course, here we use git as example. -First install the git package using the command line - - $ sudo dnf install git - -.0 $ cd $HOME -.1 $ git clone git://github.com/xbmc/xbmc.git kodi - -Note: You can clone any specific branch. - -.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi - ------------------------------------------------------------------------------ -3. Installing the required libraries and headers ------------------------------------------------------------------------------ - -You will then need the required libraries. The following is the list of packages -that are used to build Kodi packages on FEDORA (with all supported -external libraries enabled). - -$ sudo dnf install autoconf automake gettext cmake curl \ -jre gawk gperf java-9-openjdk-headless libao-devel alsa-lib-devel \ -libass-devel libva-devel avahi-devel avahi-compat-libdns_sd-devel bluez-libs-devel \ -libbluray-devel bzip2-devel libcap-devel \ -libcdio-devel libcec-devel openssl-libs \ -dbus-devel mesa-libEGL-devel fmt-devel fontconfig-devel freetype-devel \ -fribidi-devel giflib-devel \ -libjpeg-turbo-devel libtool-ltdl-devel lzo-devel libmicrohttpd-devel \ -libmpc-devel mariadb-devel libnfs-devel \ -pcre-devel libplist-devel libpng12-devel \ -shairplay-devel libsmbclient-devel sqlite-devel openssl-devel ffmpeg-devel \ -taglib-devel tinyxml-devel libtool-ltdl-devel libudev-devel \ -libusb-devel libva-devel libvdpau-devel libxml2-devel \ -libXmu-devel libXrandr-devel libxslt-devel libXt-devel rapidjson-devel \ -nasm python-devel yasm swig uuid-devel zlib-devel python-pillow \ -trousers-devel libidn2-devel gcc-c++ mesa-libGLw-devel libuuid-devel \ -libcurl-devel gtkglext-devel libtool gettext-devel - - ------------------------------------------------------------------------------ -4. How to compile ------------------------------------------------------------------------------ -See README.linux - ------------------------------------------------------------------------------ -4.1. Test Suite ------------------------------------------------------------------------------ -See README.linux - ------------------------------------------------------------------------------ -5. Uninstalling ------------------------------------------------------------------------------ -See README.linux/Uninstalling for removing compiled versions of Kodi. - -EOF diff --git a/docs/README.iOS.md b/docs/README.iOS.md new file mode 100644 index 0000000000..28a6c9f616 --- /dev/null +++ b/docs/README.iOS.md @@ -0,0 +1,222 @@ +# Kodi for Apple iOS + +## TOC + +1. [Introduction](#1-introduction) +2. [Getting the source code](#2-getting-the-source-code) +3. [Install build dependencies](#3-install-build-dependencies) + 1. [Install Xcode](#31-install-xcode) + 2. [Install Kodi build depends](#32-install-kodi-build-depends) + 3. [Compile Kodi binary addons](#33-compile-kodi-binary-addons) +4. [How to compile Kodi](#4-how-to-compile-kodi) + 1. [Using Xcode (or xcodebuild)](#41-using-xcode-or-xcodebuild) + 2. [Compilation using command-line (make)](#42-compilation-using-command-line-make) +5. [Packaging](#5-packaging) +6. [Gesture Handling on iPad/iphone/iPod touch](#6-gesture-handling-on-ipadiphoneipod-touch) +7. [Usage on un-jailbroken devices](#7-usage-on-un-jailbroken-devices) +8. [References](#8-references) + +## 1 Introduction + +This is a platform port of Kodi for the Apple iOS operating system. +Starting with Kodi v18 the build system has been migrated from native Xcode to +CMake (and generated project files). + +There are 3 ways to build Kodi for iOS: + +- Xcode IDE (easiest as it presents the build system in a GUI environment) +- command-line with xcodebuild +- command-line with make + +Kodi for iOS is composed of a main binary with numerous dynamic libraries and +codecs that support a multitude of music and video formats. + +The minimum version of iOS you need to run(!) Kodi is 9.0 atm. + +- On El Capitan (OSX 10.11.x) we recommend using Xcode 8.x. +- On Sierra (macOS 10.12.x) we recommend using Xcode 8.x. +- On High Sierra (macOS 10.13.x) we recommend using Xcode 9.x. + +## 2 Getting the source code + + cd $HOME + git clone git://github.com/xbmc/xbmc.git Kodi + +## 3 Install build dependencies + +### 3.1 Install Xcode + +Install the Xcode version recommended for your macOS version. You can download +it either from the macOS AppStore (Xcode) or from the Apple Developer Homepage. + +As far as we know the compilation for iOS should work with the following +constellations of Xcode and macOS versions (to be updated once we know more): + +8. Xcode 8.x against iOS SDK 10.x on 10.11 (El Capitan) +9. Xcode 8.x against iOS SDK 10.x on 10.12 (Sierra) +10. Xcode 9.x against iOS SDK 11.x on 10.12 (Sierra) +11. Xcode 9.x against iOS SDK 11.x on 10.13 (High Sierra) + +The preferred iOS SDK Version is 8.1. + +### 3.2 Install Kodi build depends + +Kodi requires a set of build dependencies to be built and installed before you +will be able to build the Kodi main binary. These often just called *depends* +are installed using the commands described below (with the latest iOS SDK found +on your system). + +In order to speedup compilation it is recommended to use `make -j$(getconf +_NPROCESSORS_ONLN)` instead of `make` to compile on all available processor +cores. The build machine can also be configured to do this automatically by +adding `export MAKEFLAGS="-j(getconf _NPROCESSORS_ONLN)"` to your shell config +(e.g. `~/.bashrc`). + +#### 3.2.a Compiling as 32 bit armv7 libraries - note 32 bit compiling is not supported anymore as of iOS SDK 11 + + cd $HOME/Kodi + cd tools/depends + ./bootstrap + ./configure --host=arm-apple-darwin + make + +#### 3.2.b Compiling as 64 bit arm64 libraries (recommended for most users) + + cd $HOME/Kodi + cd tools/depends + ./bootstrap + ./configure --host=arm-apple-darwin --with-cpu=arm64 + make + +#### 3.3.c Advanced topics + +The dependencies are built into `tools/depends` and installed into +`/Users/Shared/xbmc-depends`. + +**ADVANCED developers only**: If you want to specify an iOS SDK version (if +multiple versions are installed) - then append it to the configure line +above. The example below would use the iOS SDK 9.0: + + ./configure --host=arm-apple-darwin --with-sdk=9.0 + +### 3.3 Compile Kodi binary addons + +Kodi maintains a set of binary addons (PVR clients, Visualizations +plugins and more). They can be built as shown below: + + cd $HOME/Kodi + cd tools/depends + make -C target/binary-addons + +**NOTE**: If you only want to build specific addons you can specify like this: + + cd $HOME/Kodi + cd tools/depends + make -C target/binary-addons ADDONS="pvr.hts pvr.dvblink" + +## 4 How to compile Kodi + +### 4.1 Using Xcode (or xcodebuild) + +#### 4.1.1 Generate CMake project files + +Before you can use Xcode to build Kodi, the Xcode project has to be generated +with CMake. Note that CMake is compiled as parts of the depends doesn't have +to be installed separately. Also a Toolchain-file has been generated with is +used to configure CMake. + + mkdir $HOME/Kodi/build + cd $HOME/Kodi/build + /Users/Shared/xbmc-depends/x86_64-darwin15.6.0-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/iphoneos9.3_armv7-target/share/Toolchain.cmake .. + +The toolchain file location differs depending on your iOS and SDK version and +you have to replace `x86_64-darwin15.6.0-native` and `iphoneos9.3_armv7` in the filename above with the correct +file on your system. Check the directory content to get the filename. + +#### 4.1.2 Compilation using Xcode + +Start Xcode and open the Kodi project (kodi.xcodeproj) located in +`$HOME/Kodi/build`. + +If you have selected a specific iOS SDK Version in step 3.2 then you might need +to adapt the active target to use the same iOS SDK version. Else build will fail. + +Be sure to select a device configuration. Building for simulator is not +supported. + +The build process will take a long time when building the first time. +You can see the progress in "Build Results". There are a large number of static +and dynamic libraries that will need to be built. Once these are built, +subsequent builds will be faster. + +After the build, you can run Kodi for iOS from Xcode. + +Alternatively, you can also build via Xcode from the command-line with +xcodebuild, triggered by CMake: + + cd $HOME/Kodi/build + cmake --build . --config "Debug" -- -verbose -jobs $(getconf _NPROCESSORS_ONLN) + +You can specify `Release` instead of `Debug` as a configuration. + +### 4.2 Compilation using command-line (make) + +CMake is also able to generate a Makefile based project that can be used to +compile with make: + + cd $HOME/Kodi + make -C tools/depends/target/cmakebuildsys + make -C build + +## 5 Packaging + +CMake generate a target called `deb` which will package Kodi.app for +distribution. + +After Kodi has been build, the target can be triggered with by selecting it in +Xcode, or if using makefiles by issuing: + + make deb + +On jailbroken devices the resulting deb file can be copied to the iOS device +via ssh/scp and then be installed manually. For this you need to SSH into the +iOS device and issue + + dpkg -i + +## 6 Gesture Handling on iPad/iPhone/iPod touch + +| Gesture | Action | +| ---------------------------------------- | -------------------------- | +| Double finger swipe left | Back | +| Double finger tap/single finger long tap | Right mouse | +| Single finger tap | Left mouse | +| Panning, and flicking | For navigating in lists | +| Dragging | For scrollbars and sliders | +| Zoom gesture | In the picture viewer | + +Gestures can be adapted in [system/keymaps/touchscreen.xml](https://github.com/xbmc/xbmc/blob/master/system/keymaps/touchscreen.xml). + +## 7 Usage on un-jailbroken devices + +If you are a developer with an official apple code signing identity you can +deploy Kodi via xcode to work on it on non-jailbroken devices. For this to +happen you just need to alter the Xcode project by setting your codesign +identity. Just select the "iPhone Developer" shortcut. It's also important +that you select the signing on all 4 spots in the project settings. After that +the last buildstep in our support script will do a full sign of all binaries +and the bundle with the given identity (all `*.viz`, `*.pvr`, `*.so` files +Xcode doesn't know anything about). This should allow you to deploy Kodi to all +non-jailbroken devices which you can deploy normal apps to. In that case (Kodi +will be sandboxed like any other app) - all Kodi files are then located in the +sandboxed *Documents* folder and can be easily accessed via iTunes file +sharing. + +From Xcode7 on this approach is also available for non paying app developers +(apple allows self signing from now on). + +## 6 References + +- [cmake/README.md](https://github.com/xbmc/xbmc/tree/master/cmake/README.md) +- [tools/depends/README](https://github.com/xbmc/xbmc/tree/master/tools/depends/README) +- [iOS section in forum.kodi.tv](http://forum.kodi.tv/forumdisplay.php?fid=137) diff --git a/docs/README.ios.md b/docs/README.ios.md deleted file mode 100644 index 28a6c9f616..0000000000 --- a/docs/README.ios.md +++ /dev/null @@ -1,222 +0,0 @@ -# Kodi for Apple iOS - -## TOC - -1. [Introduction](#1-introduction) -2. [Getting the source code](#2-getting-the-source-code) -3. [Install build dependencies](#3-install-build-dependencies) - 1. [Install Xcode](#31-install-xcode) - 2. [Install Kodi build depends](#32-install-kodi-build-depends) - 3. [Compile Kodi binary addons](#33-compile-kodi-binary-addons) -4. [How to compile Kodi](#4-how-to-compile-kodi) - 1. [Using Xcode (or xcodebuild)](#41-using-xcode-or-xcodebuild) - 2. [Compilation using command-line (make)](#42-compilation-using-command-line-make) -5. [Packaging](#5-packaging) -6. [Gesture Handling on iPad/iphone/iPod touch](#6-gesture-handling-on-ipadiphoneipod-touch) -7. [Usage on un-jailbroken devices](#7-usage-on-un-jailbroken-devices) -8. [References](#8-references) - -## 1 Introduction - -This is a platform port of Kodi for the Apple iOS operating system. -Starting with Kodi v18 the build system has been migrated from native Xcode to -CMake (and generated project files). - -There are 3 ways to build Kodi for iOS: - -- Xcode IDE (easiest as it presents the build system in a GUI environment) -- command-line with xcodebuild -- command-line with make - -Kodi for iOS is composed of a main binary with numerous dynamic libraries and -codecs that support a multitude of music and video formats. - -The minimum version of iOS you need to run(!) Kodi is 9.0 atm. - -- On El Capitan (OSX 10.11.x) we recommend using Xcode 8.x. -- On Sierra (macOS 10.12.x) we recommend using Xcode 8.x. -- On High Sierra (macOS 10.13.x) we recommend using Xcode 9.x. - -## 2 Getting the source code - - cd $HOME - git clone git://github.com/xbmc/xbmc.git Kodi - -## 3 Install build dependencies - -### 3.1 Install Xcode - -Install the Xcode version recommended for your macOS version. You can download -it either from the macOS AppStore (Xcode) or from the Apple Developer Homepage. - -As far as we know the compilation for iOS should work with the following -constellations of Xcode and macOS versions (to be updated once we know more): - -8. Xcode 8.x against iOS SDK 10.x on 10.11 (El Capitan) -9. Xcode 8.x against iOS SDK 10.x on 10.12 (Sierra) -10. Xcode 9.x against iOS SDK 11.x on 10.12 (Sierra) -11. Xcode 9.x against iOS SDK 11.x on 10.13 (High Sierra) - -The preferred iOS SDK Version is 8.1. - -### 3.2 Install Kodi build depends - -Kodi requires a set of build dependencies to be built and installed before you -will be able to build the Kodi main binary. These often just called *depends* -are installed using the commands described below (with the latest iOS SDK found -on your system). - -In order to speedup compilation it is recommended to use `make -j$(getconf -_NPROCESSORS_ONLN)` instead of `make` to compile on all available processor -cores. The build machine can also be configured to do this automatically by -adding `export MAKEFLAGS="-j(getconf _NPROCESSORS_ONLN)"` to your shell config -(e.g. `~/.bashrc`). - -#### 3.2.a Compiling as 32 bit armv7 libraries - note 32 bit compiling is not supported anymore as of iOS SDK 11 - - cd $HOME/Kodi - cd tools/depends - ./bootstrap - ./configure --host=arm-apple-darwin - make - -#### 3.2.b Compiling as 64 bit arm64 libraries (recommended for most users) - - cd $HOME/Kodi - cd tools/depends - ./bootstrap - ./configure --host=arm-apple-darwin --with-cpu=arm64 - make - -#### 3.3.c Advanced topics - -The dependencies are built into `tools/depends` and installed into -`/Users/Shared/xbmc-depends`. - -**ADVANCED developers only**: If you want to specify an iOS SDK version (if -multiple versions are installed) - then append it to the configure line -above. The example below would use the iOS SDK 9.0: - - ./configure --host=arm-apple-darwin --with-sdk=9.0 - -### 3.3 Compile Kodi binary addons - -Kodi maintains a set of binary addons (PVR clients, Visualizations -plugins and more). They can be built as shown below: - - cd $HOME/Kodi - cd tools/depends - make -C target/binary-addons - -**NOTE**: If you only want to build specific addons you can specify like this: - - cd $HOME/Kodi - cd tools/depends - make -C target/binary-addons ADDONS="pvr.hts pvr.dvblink" - -## 4 How to compile Kodi - -### 4.1 Using Xcode (or xcodebuild) - -#### 4.1.1 Generate CMake project files - -Before you can use Xcode to build Kodi, the Xcode project has to be generated -with CMake. Note that CMake is compiled as parts of the depends doesn't have -to be installed separately. Also a Toolchain-file has been generated with is -used to configure CMake. - - mkdir $HOME/Kodi/build - cd $HOME/Kodi/build - /Users/Shared/xbmc-depends/x86_64-darwin15.6.0-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/iphoneos9.3_armv7-target/share/Toolchain.cmake .. - -The toolchain file location differs depending on your iOS and SDK version and -you have to replace `x86_64-darwin15.6.0-native` and `iphoneos9.3_armv7` in the filename above with the correct -file on your system. Check the directory content to get the filename. - -#### 4.1.2 Compilation using Xcode - -Start Xcode and open the Kodi project (kodi.xcodeproj) located in -`$HOME/Kodi/build`. - -If you have selected a specific iOS SDK Version in step 3.2 then you might need -to adapt the active target to use the same iOS SDK version. Else build will fail. - -Be sure to select a device configuration. Building for simulator is not -supported. - -The build process will take a long time when building the first time. -You can see the progress in "Build Results". There are a large number of static -and dynamic libraries that will need to be built. Once these are built, -subsequent builds will be faster. - -After the build, you can run Kodi for iOS from Xcode. - -Alternatively, you can also build via Xcode from the command-line with -xcodebuild, triggered by CMake: - - cd $HOME/Kodi/build - cmake --build . --config "Debug" -- -verbose -jobs $(getconf _NPROCESSORS_ONLN) - -You can specify `Release` instead of `Debug` as a configuration. - -### 4.2 Compilation using command-line (make) - -CMake is also able to generate a Makefile based project that can be used to -compile with make: - - cd $HOME/Kodi - make -C tools/depends/target/cmakebuildsys - make -C build - -## 5 Packaging - -CMake generate a target called `deb` which will package Kodi.app for -distribution. - -After Kodi has been build, the target can be triggered with by selecting it in -Xcode, or if using makefiles by issuing: - - make deb - -On jailbroken devices the resulting deb file can be copied to the iOS device -via ssh/scp and then be installed manually. For this you need to SSH into the -iOS device and issue - - dpkg -i - -## 6 Gesture Handling on iPad/iPhone/iPod touch - -| Gesture | Action | -| ---------------------------------------- | -------------------------- | -| Double finger swipe left | Back | -| Double finger tap/single finger long tap | Right mouse | -| Single finger tap | Left mouse | -| Panning, and flicking | For navigating in lists | -| Dragging | For scrollbars and sliders | -| Zoom gesture | In the picture viewer | - -Gestures can be adapted in [system/keymaps/touchscreen.xml](https://github.com/xbmc/xbmc/blob/master/system/keymaps/touchscreen.xml). - -## 7 Usage on un-jailbroken devices - -If you are a developer with an official apple code signing identity you can -deploy Kodi via xcode to work on it on non-jailbroken devices. For this to -happen you just need to alter the Xcode project by setting your codesign -identity. Just select the "iPhone Developer" shortcut. It's also important -that you select the signing on all 4 spots in the project settings. After that -the last buildstep in our support script will do a full sign of all binaries -and the bundle with the given identity (all `*.viz`, `*.pvr`, `*.so` files -Xcode doesn't know anything about). This should allow you to deploy Kodi to all -non-jailbroken devices which you can deploy normal apps to. In that case (Kodi -will be sandboxed like any other app) - all Kodi files are then located in the -sandboxed *Documents* folder and can be easily accessed via iTunes file -sharing. - -From Xcode7 on this approach is also available for non paying app developers -(apple allows self signing from now on). - -## 6 References - -- [cmake/README.md](https://github.com/xbmc/xbmc/tree/master/cmake/README.md) -- [tools/depends/README](https://github.com/xbmc/xbmc/tree/master/tools/depends/README) -- [iOS section in forum.kodi.tv](http://forum.kodi.tv/forumdisplay.php?fid=137) diff --git a/docs/README.linux b/docs/README.linux deleted file mode 100644 index e7e722010c..0000000000 --- a/docs/README.linux +++ /dev/null @@ -1,279 +0,0 @@ -TOC -1. Introduction -2. Getting the source code -3. Installing the required libraries and headers -4. How to compile - 4.4 Binary addons - 4.5 Test suite -5. How to run -6. Uninstalling - ------------------------------------------------------------------------------ -1. Introduction ------------------------------------------------------------------------------ - -A graphics-adapter with OpenGL acceleration is highly recommended. -24/32 bitdepth is required along with OpenGL. - -Note to new Linux users: -All lines that are prefixed with the '$' character are commands, -that need to be typed into a terminal window / console. The '$' equals the prompt. -Note: The '$' character itself should NOT be typed as part of the command. - ------------------------------------------------------------------------------ -2. Getting the source code ------------------------------------------------------------------------------ - -You will have to grab the source code of course, here we use git as example. -First install the git package provided by your distribution. -Then from a terminal, type: - -.0 $ cd $HOME -.1 $ git clone git://github.com/xbmc/xbmc.git kodi - -Note: You can clone any specific branch. - -.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi - ------------------------------------------------------------------------------ -3. Installing the required libraries and headers ------------------------------------------------------------------------------ - -You will then need the required libraries. The following is the list of packages -that are used to build Kodi packages on Debian/Ubuntu (with all supported -external libraries enabled). - -Build-Depends: autoconf, automake, autopoint, autotools-dev, cmake, curl, - default-jre, gawk, gperf, libao-dev, libasound2-dev, - libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev, - libbluray-dev (>= 0.9.3), libbz2-dev, libcap-dev, - libcdio-dev, libcec-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev, - libcwiid-dev, libdbus-1-dev, libegl1-mesa-dev, libfmt3-dev, libfontconfig-dev, libfreetype6-dev, - libfribidi-dev, libgif-dev (>= 4.1.6), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, - libiso9660-dev, libjpeg-dev, libltdl-dev, liblzo2-dev, libmicrohttpd-dev, - libmpcdec-dev, libmysqlclient-dev, libnfs-dev, - libpcre3-dev, libplist-dev, libpng12-dev | libpng-dev, libpulse-dev, - libshairplay-dev, libsmbclient-dev, libsqlite3-dev, libssl-dev, libswscale-dev, - libtag1-dev (>= 1.8), libtinyxml-dev (>= 2.6.2), libtool, libudev-dev, - libusb-dev, libva-dev, libvdpau-dev, libxml2-dev, - libxmu-dev, libxrandr-dev, libxslt1-dev, libxt-dev, lsb-release, rapidjson-dev, - nasm [!amd64], python-dev, python-imaging, python-support, swig, uuid-dev, yasm, zlib1g-dev, - liblirc-dev - -If you want to build with Wayland instead of X11, you will need: - wayland-protocols (>= 1.7), libwaylandpp-dev - -[NOTICE] crossguid / libcrossguid-dev all Linux distributions. -Kodi now requires crossguid which is not available in Ubuntu repositories at this time. -We supply a Makefile in tools/depends/target/crossguid -to make it easy to install into /usr/local. - $ make -C tools/depends/target/crossguid PREFIX=/usr/local - -[NOTICE] libfmt / libfmt3-dev all Linux distributions. -Kodi now requires libfmt which is not available in Ubuntu repositories at this time. -We supply a Makefile in tools/depends/target/libfmt -to make it easy to install into /usr/local. - $ make -C tools/depends/target/libfmt PREFIX=/usr/local - -[NOTICE] wayland-protocols all Linux distributions. -Building Kodi with Wayland requires a recent version of wayland-protocols (at least 1.7) -which is not available in the Ubuntu LTS repostiories at this time. -We supply a Makefile in tools/depends/target/wayland-protocols to make it easy to install -into /usr/local. - $ make -C tools/depends/target/wayland-protocols PREFIX=/usr/local - -[NOTICE] waylandpp all Linux distributions. -Building Kodi with Wayland requires waylandpp which is not available in repositories -of most major distributions at this time. -We supply a Makefile in tools/depends/target/waylandpp to make it easy to install -into /usr/local. -Note that building waylandpp has some dependencies of its own: scons, -libwayland-dev (>= 1.11.0), libwayland-egl1-mesa - $ make -C tools/depends/target/waylandpp PREFIX=/usr/local - -Note: For developers and anyone else who compiles frequently it is recommended to use ccache. - $ sudo apt-get install ccache - ------------------------------------------------------------------------------ -3.1. Using the Kodi PPA to get all build dependencies (Debian/Ubuntu only) ------------------------------------------------------------------------------ - -For this, you need to specify the PPA in your apt sources. -Please find them on the following wiki link: -Note: See README.ubuntu as well - -http://kodi.wiki/index.php?title=Official_Ubuntu_PPA - -Update apt: - $ sudo apt-get update - -The command to get the build dependencies, used to compile the version on the PPA. - $ sudo apt-get build-dep kodi - ------------------------------------------------------------------------------ -4. How to compile ------------------------------------------------------------------------------ -Cmake build instructions V18.0 Leia and higher - -Create and change to build directory - $ mkdir kodi-build && cd kodi-build - -Run CMake -- for X11 - $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -- for Wayland - $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=wayland -DWAYLAND_RENDER_SYSTEM=gl - (You can use "gles" instead of "gl" if you want to build with GLES) - -Build - $ cmake --build . -- VERBOSE=1 - -Tip: By adding -j to the make command, you describe how many - concurrent jobs will be used, it will speed up the build process. - So for quadcore the command is: - - $ cmake --build . -- VERBOSE=1 -j4 - -If the build process completes succesfully you would want to test if it is working. -Still in the build directory type the following: - - $ ./kodi.bin - -If everything was okay during your test you can now install the binaries to their place -in this example "/usr/local". - - $ sudo make install - -This will install Kodi in the prefix provided in 4.1 as well as a launcher script. - -Tip: By adding -j to the make command, you describe how many - concurrent jobs will be used. So for dualcore the command is: - - $ sudo make install -j2 - -Tip: To override the location that Kodi is installed, use PREFIX=. -For example. - - $ make install DESTDIR=$HOME/kodi - ------------------------------------------------------------------------------ -4.4. Binary addons - compile ------------------------------------------------------------------------------ - -From v14 with commit 4090a5f a new API for binary addons is available. -You can compile all addons or only specific addons by specifying e.g. ADDONS="audioencoder.foo pvr.bar audiodecoder.baz" - -.0 All addons - $ make -C tools/depends/target/binary-addons PREFIX=/ - -.1 Specific addons - $ make -C tools/depends/target/binary-addons PREFIX=/ ADDONS="audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu" - -Audio decoders: - audiodecoder.modplug, audiodecoder.nosefart, audiodecoder.sidplay, audiodecoder.snesapu, - audiodecoder.stsound, audiodecoder.timidity, audiodecoder.vgmstream - -Audio encoders: - audioencoder.flac, audioencoder.lame, audioencoder.vorbis, audioencoder.wav - -Inputstream addons: - inputstream.mpd - -Peripheral addons: - peripheral.joystick - -PVR addons: - pvr.argustv, pvr.demo, pvr.dvblink, pvr.dvbviewer, pvr.filmon, pvr.hdhomerun, pvr.hts, pvr.iptvsimple, - pvr.mediaportal.tvserver,pvr.mythtv, pvr.nextpvr, pvr.njoy, pvr.pctv, pvr.stalker, pvr.vbox, pvr.vdr.vnsi, - pvr.vuplus, pvr.wmc - -Screensavers: - screensaver.asteroids, screensaver.biogenesis, screensaver.greynetic, screensaver.matrixtrails, - screensaver.pingpong, screensaver.pyro, screensavers.rsxs, screensaver.stars - -Visualizations - visualization.fishbmc, visualization.goom, visualization.projectm, visualization.shadertoy - visualization.spectrum, visualization.vsxu, visualization.waveform - ------------------------------------------------------------------------------ -4.5. Test suite ------------------------------------------------------------------------------ - -Kodi has a test suite which uses the Google C++ Testing Framework. -This framework is provided directly in Kodi's source tree. -It has very little requirements, in order to build and run. -See the README file for the framework at 'lib/gtest/README' for specific requirements. - -To compile and run Kodi's test suite, type the following: - - $ make check - -To compile the test suite without running it, type the following. - - $ make kodi-test - -The test suite program can be run manually as well. -The name of the test suite program is 'kodi-test' and will build in the Kodi source tree. -To bring up the 'help' notes for the program, type the following: - - $ ./kodi-test --gtest_help - -The most useful options are, - - --gtest_list_tests - List the names of all tests instead of running them. - The name of TEST(Foo, Bar) is "Foo.Bar". - - --gtest_filter=POSITIVE_PATTERNS[-NEGATIVE_PATTERNS] - Run only the tests whose name matches one of the positive patterns but - none of the negative patterns. '?' matches any single character; '*' - matches any substring; ':' separates two patterns. - ------------------------------------------------------------------------------ -5. How to run ------------------------------------------------------------------------------ - -How to run Kodi depends on the type of installation you have done. -It is possible to run Kodi without the requirement to install Kodi anywhere else. -In this case, type the following from the top source directory. - - $ ./kodi.bin - -Or run in 'portable' mode - - $ ./kodi.bin -p - -If you chose to install Kodi using '/usr' or '/usr/local' as the PREFIX, -you can just issue 'kodi' in a terminal session. - -If you have overridden PREFIX to install Kodi into some non-standard location, -you will have to run Kodi by directly running 'kodi.bin'. - -For example: - - $ $HOME/kodi/usr/lib/kodi/kodi.bin - -You should still run the wrapper via - $ $PREFIX/bin/kodi - -If you wish to use VDPAU decoding you will now have to change the Render Method -in Settings->Videos->Player from "Auto Detect" to "VDPAU". - ------------------------------------------------------------------------------ -6. Uninstalling ------------------------------------------------------------------------------ - -Prepend "sudo" to commands, if your user doesn't have write permission to the install directory. - -Note: If you have rerun configure with a different prefix, -you will either need to rerun configure with the correct prefix for this step to work correctly. - - $ make uninstall -.0 $ sudo make uninstall - -If you would like to also remove any settings and 3rd party addons (skins, scripts, etc) -you should also run: - -.1 $ rm -rf ~/.kodi - -EOF diff --git a/docs/README.macOS.md b/docs/README.macOS.md new file mode 100644 index 0000000000..ba66ed95cc --- /dev/null +++ b/docs/README.macOS.md @@ -0,0 +1,184 @@ +# Kodi for Apple macOS + +## TOC + +1. [Introduction](#1-introduction) +2. [Getting the source code](#2-getting-the-source-code) +3. [Install build dependencies](#3-install-build-dependencies) + 1. [Install Xcode](#31-install-xcode) + 2. [Install Kodi build depends](#32-install-kodi-build-depends) + 3. [Compile Kodi binary addons](#33-compile-kodi-binary-addons) +4. [How to compile Kodi](#4-how-to-compile-kodi) + 1. [Using Xcode (or xcodebuild)](#41-using-xcode-or-xcodebuild) + 2. [Compilation using command-line (make)](#42-compilation-using-command-line-make) +5. [Packaging](#5-packaging) +6. [References](#6-references) + +## 1 Introduction + +This is a platform port of Kodi for the Apple macOS operating system. +Starting with Kodi v18 the build system has been migrated from native Xcode to +CMake (and generated project files). + +There are 3 ways to build Kodi for Mac: + +- Xcode IDE (easiest as it presents the build system in a GUI environment) +- command-line with xcodebuild +- command-line with make + +Kodi for Mac is composed of a main binary with numerous dynamic libraries and +codecs that support a multitude of music and video formats. + +The minimum version of OSX you need to run(!) Kodi is 10.9 atm. + +- On El Capitan (OSX 10.11.x) we recommend using Xcode 8.x. +- On Sierra (macOS 10.12.x) we recommend using Xcode 8.x. +- On High Sierra (macOS 10.13.x) we recommend using Xcode 9.x. + +## 2 Getting the source code + + cd $HOME + git clone git://github.com/xbmc/xbmc.git Kodi + +## 3 Install build dependencies + +### 3.1 Install Xcode + +Install the Xcode version recommended for your macOS version. You can download +it either from the macOS AppStore (Xcode) or from the Apple Developer Homepage. + +As far as we know the compilation for macOS should work with the following +constellations of Xcode and macOS versions (to be updated once we know more): + +7 Xcode 8.0 against OSX SDK 10.12 (EC) +8 Xcode 8.0 against OSX SDK 10.12 (S) +9 Xcode 9.0 against OSX SDK 10.13 (HS) + +### 3.2 Install Kodi build depends + +Kodi requires a set of build dependencies to be built and installed before you +will be able to build the Kodi main binary. These often just called *depends* +are installed using the commands described below (with the latest macOS SDK +found on your system). + +In order to speedup compilation it is recommended to use `make -j$(getconf +_NPROCESSORS_ONLN)` instead of `make` to compile on all available processor +cores. The build machine can also be configured to do this automatically by +adding `export MAKEFLAGS="-j(getconf _NPROCESSORS_ONLN)"` to your shell config +(e.g. `~/.bashrc`). + +#### 3.2.a Compiling as 64 bit libraries (recommended for most users) + + cd $HOME/Kodi + cd tools/depends + ./bootstrap + ./configure --host=x86_64-apple-darwin + make + +#### 3.2.b Compiling as 32 bit libraries + + cd $HOME/Kodi + cd tools/depends + ./bootstrap + ./configure --host=i386-apple-darwin + make + +#### 3.3.c Advanced topics + +The dependencies are built into `tools/depends` and installed into +`/Users/Shared/xbmc-depends`. + +**ADVANCED developers only**: If you want to specify an macOS SDK version (if +multiple versions are installed) - then append it to the configure line +above. The example below would use the macOS SDK 10.9: + + ./configure --host=arm-apple-darwin --with-sdk=10.9 + +### 3.3 Compile Kodi binary addons + +Kodi maintains a set of binary addons (PVR clients, Visualizations +plugins and more). They can be built as shown below: + + cd $HOME/Kodi + cd tools/depends + make -C target/binary-addons + +**NOTE**: If you only want to build specific addons you can specify like this: + + cd $HOME/Kodi + cd tools/depends + make -C target/binary-addons ADDONS="pvr.hts pvr.dvblink" + +## 4 How to compile Kodi + +### 4.1 Using Xcode (or xcodebuild) + +#### 4.1.1 Generate CMake project files + +Before you can use Xcode to build Kodi, the Xcode project has to be generated +with CMake. Note that CMake is compiled as parts of the depends doesn't have +to be installed separately. Also a Toolchain-file has been generated with is +used to configure CMake. + + mkdir $HOME/Kodi/build + cd $HOME/Kodi/build + /Users/Shared/xbmc-depends/x86_64-darwin15.6.0-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/macosx10.12_x86_64-target/share/Toolchain.cmake .. + +The toolchain file location differs depending on your macOS and SDK version and +you have to replace `x86_64-darwin15.6.0-native` and `macosx10.12_x86_64` in the filename above with the correct +file on your system. Check the directory content to get the filename. + +#### 4.1.2 Compilation using Xcode + +Start Xcode and open the Kodi project (kodi.xcodeproj) located in +`$HOME/Kodi/build`. + +If you have selected a specific OSX SDK Version in step 3.2 then you might need +to adapt the active target to use the same OSX SDK version. Else build will fail. + +The build process will take a long time when building the first time. +You can see the progress in "Build Results". There are a large number of static +and dynamic libraries that will need to be built. Once these are built, +subsequent builds will be faster. + +After the build, you can ether run Kodi for Mac from Xcode or run it from +the command-line. If you run it from the command-line: + + $HOME/Kodi/build/Debug/kodi.bin + +Or the release version: + + $HOME/Kodi/build/Release/kodi.bin + +Alternatively, you can also build via Xcode from the command-line with +xcodebuild, triggered by CMake: + + cd $HOME/Kodi/build + cmake --build . --config "Debug" -- -verbose -jobs $(getconf _NPROCESSORS_ONLN) + +You can specify `Release` instead of `Debug` as a configuration. + +### 4.2 Compilation using command-line (make) + +CMake is also able to generate a Makefile based project that can be used to +compile with make: + + cd $HOME/Kodi + make -C tools/depends/target/cmakebuildsys + make -C build + +## 5 Packaging + +CMake generate a target called `dmg` which will package Kodi.app for +distribution. + +After Kodi has been build, the target ca be triggered with by selecting it in +Xcode, or if using makefiles by issuing: + + make dmg + +## 6 References + +- [cmake/README.md](https://github.com/xbmc/xbmc/tree/master/cmake/README.md) +- [tools/depends/README](https://github.com/xbmc/xbmc/tree/master/tools/depends/README) +- [MAC OS X section in forum.kodi.tv](http://forum.kodi.tv/forumdisplay.php?fid=56) diff --git a/docs/README.openSUSE.md b/docs/README.openSUSE.md new file mode 100644 index 0000000000..125db44f35 --- /dev/null +++ b/docs/README.openSUSE.md @@ -0,0 +1,303 @@ +TOC +1. Introduction +2. Getting the source code +3. Installing the required libraries and headers +4. How to compile + 4.4 Binary addons + 4.5 Test suite +5. How to run +6. Uninstalling + +----------------------------------------------------------------------------- +1. Introduction +----------------------------------------------------------------------------- + +A graphics-adapter with OpenGL acceleration is highly recommended. +24/32 bitdepth is required along with OpenGL. + +Note to new Linux users: +All lines that are prefixed with the '$' character are commands, +that need to be typed into a terminal window / console. The '$' equals the prompt. +Note: The '$' character itself should NOT be typed as part of the command. + +----------------------------------------------------------------------------- +2. Getting the source code +----------------------------------------------------------------------------- + +You will have to grab the source code of course, here we use git as example. +First install the git package provided by your distribution. +Then from a terminal, type: + +.0 $ cd $HOME +.1 $ git clone git://github.com/xbmc/xbmc.git kodi + +Note: You can clone any specific branch. + +.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi + +----------------------------------------------------------------------------- +3. Installing the required libraries and headers +----------------------------------------------------------------------------- + +You will then need the required libraries. The following is the list of packages +that are used to build Kodi packages on Debian/Ubuntu (with all supported +external libraries enabled). + +OpenSuse +Since commit b2fa60d7c6fba907ecadc0cf36a3531985c4c367 +On OpenSuse there is a need for an extra dependency: libunistring-devel + +Full build dependency list is: +make cmake autoconf automake gcc gcc-c++ libtool gettext-devel patch boost-devel glew-devel +libmysqlclient-devel libass-devel libmpeg2-devel libmad-devel libjpeg-devel libsamplerate-devel libogg-devel +libvorbis-devel libmodplug-devel libcurl-devel flac-devel libbz2-devel libtiff-devel lzo-devel libyajl-devel +fribidi-devel sqlite3-devel libpng12-devel pcre-devel libcdio-devel libjasper-devel +libmicrohttpd-devel libsmbclient-devel python-devel gperf nasm tinyxml-devel libtag-devel libbluray-devel +libnfs-devel shairplay-devel swig libvdpau-devel libavahi-devel libcec-devel libdvdread-devel libva-devel libplist-devel +libxst-devel alsa-devel libpulse-devel libXrandr-devel libXrender-devel randrproto-devel renderproto-devel +libudev-devel libpcap-devel libgudev-1_0-devel libcap-ng-devel libcap-devel ccache doxygen capi4linux-devel liblcms2-devel +libunistring-devel + + +Build-Depends: autoconf, automake, autopoint, autotools-dev, cmake, curl, + default-jre, gawk, gperf, libao-dev, libasound2-dev, + libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev, + libbluray-dev (>= 0.9.3), libbz2-dev, libcap-dev, + libcdio-dev, libcec-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev, + libcwiid-dev, libdbus-1-dev, libegl1-mesa-dev, libfontconfig-dev, libfreetype6-dev, + libfribidi-dev, libgif-dev (>= 4.1.6), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, + libiso9660-dev, libjpeg-dev, libltdl-dev, liblzo2-dev, libmicrohttpd-dev, + libmpcdec-dev, libmysqlclient-dev, libnfs-dev, + libpcre3-dev, libplist-dev, libpng12-dev | libpng-dev, libpulse-dev, + libshairplay-dev, libsmbclient-dev, libsqlite3-dev, libssl-dev, libswscale-dev, + libtag1-dev (>= 1.8), libtinyxml-dev (>= 2.6.2), libtool, libudev-dev, + libusb-dev, libva-dev, libvdpau-dev, libxml2-dev, + libxmu-dev, libxrandr-dev, libxslt1-dev, libxt-dev, libyajl-dev (>=2.0), lsb-release, + nasm [!amd64], python-dev, python-imaging, python-support, swig, uuid-dev, yasm, + zip, zlib1g-dev + +[NOTICE] crossguid / libcrossguid-dev all Linux distributions. +Kodi now requires crossguid which is not available in Ubuntu repositories at this time. +We supply a Makefile in tools/depends/target/crossguid +to make it easy to install into /usr/local. + $ make -C tools/depends/target/crossguid PREFIX=/usr/local + +[NOTICE] yail got changed for rapidjson which is not available in OpenSuse repositories. +To build rapidjson for OpenSuse you must get the source from github and configure, build and install them yourself. +Next lines explain how to do that. +First download the sources from github to your local disk. + + $ git clone https://github.com/miloyip/rapidjson + $ cd rapidjson + +To get the files of thirdparty submodules (google test). + + $ git submodule update --init + +Create directory called build in rapidjson source directory. + $ mkdir build + +Change to build directory + $ cd build + +Run the following command to configure your build. +It will default to /usr/local + $ cmake .. + +Run the following command to build the sources for installation. + $ cmake --build . + +Tip: By adding -j to the make command, you describe how many + concurrent jobs will be used, it will speed up the build process. + So for octacore the command is: + + $ cmake --build . -- -j8 + +Run the following command to install the builded sources. + $ sudo make install + +Tip: By adding -j to the make command, you describe how many + concurrent jobs will be used, it will speed up the build process. + So for octacore the command is: + + $ sudo make install -j8 + +If everything went well it is installed to "/usr/local". + +Tip: To override the location that the module is installed, use DESTDIR=. +For example. + + $ make install DESTDIR=/usr + + +Note: For developers and anyone else who compiles frequently it is recommended to use ccache. + $ sudo apt-get install ccache + + $ sudo apt-get build-dep kodi + + +----------------------------------------------------------------------------- +4. How to compile +----------------------------------------------------------------------------- +Cmake build instructions V18.0 and higher OpenSuse + +Create and change to build directory + $ mkdir kodi-build && cd kodi-build + $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local + $ cmake --build . -- VERBOSE=1 + +Tip: By adding -j to the make command, you describe how many + concurrent jobs will be used, it will speed up the build process. + So for quadcore the command is: + + $ cmake --build . -- VERBOSE=1 -j4 + +If the build process completes succesfully you would want to test if it is working. +Still in the build directory type the following: + + $ ./kodi.bin + +If everything was okay during your test you can now install the binaries to their place +in this example "/usr/local". + + $ sudo make install + +This will install Kodi in the prefix provided in 4.1 as well as a launcher script. + +Tip: By adding -j to the make command, you describe how many + concurrent jobs will be used. So for dualcore the command is: + + $ sudo make install -j2 + +Tip: To override the location that Kodi is installed, use PREFIX=. +For example. + + $ make install DESTDIR=$HOME/kodi + +----------------------------------------------------------------------------- +4.4. Binary addons - compile +----------------------------------------------------------------------------- + +From v14 with commit 4090a5f a new API for binary addons is available. +You can compile all addons or only specific addons by specifying e.g. ADDONS="audioencoder.foo pvr.bar audiodecoder.baz" + +.0 All addons + $ make -C tools/depends/target/binary-addons PREFIX=/ + +.1 Specific addons + $ make -C tools/depends/target/binary-addons PREFIX=/ ADDONS="audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu" + +Audio decoders: + audiodecoder.modplug, audiodecoder.nosefart, audiodecoder.sidplay, audiodecoder.snesapu, + audiodecoder.stsound, audiodecoder.timidity, audiodecoder.vgmstream + +Audio encoders: + audioencoder.flac, audioencoder.lame, audioencoder.vorbis, audioencoder.wav + +Inputstream addons: + inputstream.mpd + +Peripheral addons: + peripheral.joystick + +PVR addons: + pvr.argustv, pvr.demo, pvr.dvblink, pvr.dvbviewer, pvr.filmon, pvr.hdhomerun, pvr.hts, pvr.iptvsimple, + pvr.mediaportal.tvserver,pvr.mythtv, pvr.nextpvr, pvr.njoy, pvr.pctv, pvr.stalker, pvr.vbox, pvr.vdr.vnsi, + pvr.vuplus, pvr.wmc + +Screensavers: + screensaver.asteroids, screensaver.biogenesis, screensaver.greynetic, screensaver.matrixtrails, + screensaver.pingpong, screensaver.pyro, screensavers.rsxs, screensaver.stars + +Visualizations + visualization.fishbmc, visualization.goom, visualization.projectm, visualization.shadertoy + visualization.spectrum, visualization.vsxu, visualization.waveform + +----------------------------------------------------------------------------- +4.5. Test suite +----------------------------------------------------------------------------- + +Kodi has a test suite which uses the Google C++ Testing Framework. +This framework is provided directly in Kodi's source tree. +It has very little requirements, in order to build and run. +See the README file for the framework at 'lib/gtest/README' for specific requirements. + +To compile and run Kodi's test suite: +The configure option '--enable-gtest' is enabled by default during the configure stage. +Once configured, to build the testsuite, type the following: + + $ make check + +To compile the test suite without running it, type the following. + + $ make testsuite + +The test suite program can be run manually as well. +The name of the test suite program is 'kodi-test' and will build in the Kodi source tree. +To bring up the 'help' notes for the program, type the following: + + $ ./kodi-test --gtest_help + +The most useful options are, + + --gtest_list_tests + List the names of all tests instead of running them. + The name of TEST(Foo, Bar) is "Foo.Bar". + + --gtest_filter=POSTIVE_PATTERNS[-NEGATIVE_PATTERNS] + Run only the tests whose name matches one of the positive patterns but + none of the negative patterns. '?' matches any single character; '*' + matches any substring; ':' separates two patterns. + +Note: If the '--enable-gtest' option is not set during the configure stage, +the make targets 'check,' 'testsuite,' and 'testframework' will simply show a message saying +the framework has not been configured, and then silently succeed (i.e. it will not return an error). + +----------------------------------------------------------------------------- +5. How to run +----------------------------------------------------------------------------- + +How to run Kodi depends on the type of installation you have done. +It is possible to run Kodi without the requirement to install Kodi anywhere else. +In this case, type the following from the top source directory. + + $ ./kodi.bin + +Or run in 'portable' mode + + $ ./kodi.bin -p + +If you chose to install Kodi using '/usr' or '/usr/local' as the PREFIX, +you can just issue 'kodi' in a terminal session. + +If you have overridden PREFIX to install Kodi into some non-standard location, +you will have to run Kodi by directly running 'kodi.bin'. + +For example: + + $ $HOME/kodi/usr/lib/kodi/kodi.bin + +You should still run the wrapper via + $ $PREFIX/bin/kodi + +If you wish to use VDPAU decoding you will now have to change the Render Method +in Settings->Videos->Player from "Auto Detect" to "VDPAU". + +----------------------------------------------------------------------------- +6. Uninstalling +----------------------------------------------------------------------------- + +Prepend "sudo" to commands, if your user doesn't have write permission to the install directory. + +Note: If you have rerun configure with a different prefix, +you will either need to rerun configure with the correct prefix for this step to work correctly. + + $ make uninstall +.0 $ sudo make uninstall + +If you would like to also remove any settings and 3rd party addons (skins, scripts, etc) +you should also run: + +.1 $ rm -rf ~/.kodi + +EOF diff --git a/docs/README.opensuse b/docs/README.opensuse deleted file mode 100644 index 125db44f35..0000000000 --- a/docs/README.opensuse +++ /dev/null @@ -1,303 +0,0 @@ -TOC -1. Introduction -2. Getting the source code -3. Installing the required libraries and headers -4. How to compile - 4.4 Binary addons - 4.5 Test suite -5. How to run -6. Uninstalling - ------------------------------------------------------------------------------ -1. Introduction ------------------------------------------------------------------------------ - -A graphics-adapter with OpenGL acceleration is highly recommended. -24/32 bitdepth is required along with OpenGL. - -Note to new Linux users: -All lines that are prefixed with the '$' character are commands, -that need to be typed into a terminal window / console. The '$' equals the prompt. -Note: The '$' character itself should NOT be typed as part of the command. - ------------------------------------------------------------------------------ -2. Getting the source code ------------------------------------------------------------------------------ - -You will have to grab the source code of course, here we use git as example. -First install the git package provided by your distribution. -Then from a terminal, type: - -.0 $ cd $HOME -.1 $ git clone git://github.com/xbmc/xbmc.git kodi - -Note: You can clone any specific branch. - -.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi - ------------------------------------------------------------------------------ -3. Installing the required libraries and headers ------------------------------------------------------------------------------ - -You will then need the required libraries. The following is the list of packages -that are used to build Kodi packages on Debian/Ubuntu (with all supported -external libraries enabled). - -OpenSuse -Since commit b2fa60d7c6fba907ecadc0cf36a3531985c4c367 -On OpenSuse there is a need for an extra dependency: libunistring-devel - -Full build dependency list is: -make cmake autoconf automake gcc gcc-c++ libtool gettext-devel patch boost-devel glew-devel -libmysqlclient-devel libass-devel libmpeg2-devel libmad-devel libjpeg-devel libsamplerate-devel libogg-devel -libvorbis-devel libmodplug-devel libcurl-devel flac-devel libbz2-devel libtiff-devel lzo-devel libyajl-devel -fribidi-devel sqlite3-devel libpng12-devel pcre-devel libcdio-devel libjasper-devel -libmicrohttpd-devel libsmbclient-devel python-devel gperf nasm tinyxml-devel libtag-devel libbluray-devel -libnfs-devel shairplay-devel swig libvdpau-devel libavahi-devel libcec-devel libdvdread-devel libva-devel libplist-devel -libxst-devel alsa-devel libpulse-devel libXrandr-devel libXrender-devel randrproto-devel renderproto-devel -libudev-devel libpcap-devel libgudev-1_0-devel libcap-ng-devel libcap-devel ccache doxygen capi4linux-devel liblcms2-devel -libunistring-devel - - -Build-Depends: autoconf, automake, autopoint, autotools-dev, cmake, curl, - default-jre, gawk, gperf, libao-dev, libasound2-dev, - libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev, - libbluray-dev (>= 0.9.3), libbz2-dev, libcap-dev, - libcdio-dev, libcec-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev, - libcwiid-dev, libdbus-1-dev, libegl1-mesa-dev, libfontconfig-dev, libfreetype6-dev, - libfribidi-dev, libgif-dev (>= 4.1.6), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, - libiso9660-dev, libjpeg-dev, libltdl-dev, liblzo2-dev, libmicrohttpd-dev, - libmpcdec-dev, libmysqlclient-dev, libnfs-dev, - libpcre3-dev, libplist-dev, libpng12-dev | libpng-dev, libpulse-dev, - libshairplay-dev, libsmbclient-dev, libsqlite3-dev, libssl-dev, libswscale-dev, - libtag1-dev (>= 1.8), libtinyxml-dev (>= 2.6.2), libtool, libudev-dev, - libusb-dev, libva-dev, libvdpau-dev, libxml2-dev, - libxmu-dev, libxrandr-dev, libxslt1-dev, libxt-dev, libyajl-dev (>=2.0), lsb-release, - nasm [!amd64], python-dev, python-imaging, python-support, swig, uuid-dev, yasm, - zip, zlib1g-dev - -[NOTICE] crossguid / libcrossguid-dev all Linux distributions. -Kodi now requires crossguid which is not available in Ubuntu repositories at this time. -We supply a Makefile in tools/depends/target/crossguid -to make it easy to install into /usr/local. - $ make -C tools/depends/target/crossguid PREFIX=/usr/local - -[NOTICE] yail got changed for rapidjson which is not available in OpenSuse repositories. -To build rapidjson for OpenSuse you must get the source from github and configure, build and install them yourself. -Next lines explain how to do that. -First download the sources from github to your local disk. - - $ git clone https://github.com/miloyip/rapidjson - $ cd rapidjson - -To get the files of thirdparty submodules (google test). - - $ git submodule update --init - -Create directory called build in rapidjson source directory. - $ mkdir build - -Change to build directory - $ cd build - -Run the following command to configure your build. -It will default to /usr/local - $ cmake .. - -Run the following command to build the sources for installation. - $ cmake --build . - -Tip: By adding -j to the make command, you describe how many - concurrent jobs will be used, it will speed up the build process. - So for octacore the command is: - - $ cmake --build . -- -j8 - -Run the following command to install the builded sources. - $ sudo make install - -Tip: By adding -j to the make command, you describe how many - concurrent jobs will be used, it will speed up the build process. - So for octacore the command is: - - $ sudo make install -j8 - -If everything went well it is installed to "/usr/local". - -Tip: To override the location that the module is installed, use DESTDIR=. -For example. - - $ make install DESTDIR=/usr - - -Note: For developers and anyone else who compiles frequently it is recommended to use ccache. - $ sudo apt-get install ccache - - $ sudo apt-get build-dep kodi - - ------------------------------------------------------------------------------ -4. How to compile ------------------------------------------------------------------------------ -Cmake build instructions V18.0 and higher OpenSuse - -Create and change to build directory - $ mkdir kodi-build && cd kodi-build - $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local - $ cmake --build . -- VERBOSE=1 - -Tip: By adding -j to the make command, you describe how many - concurrent jobs will be used, it will speed up the build process. - So for quadcore the command is: - - $ cmake --build . -- VERBOSE=1 -j4 - -If the build process completes succesfully you would want to test if it is working. -Still in the build directory type the following: - - $ ./kodi.bin - -If everything was okay during your test you can now install the binaries to their place -in this example "/usr/local". - - $ sudo make install - -This will install Kodi in the prefix provided in 4.1 as well as a launcher script. - -Tip: By adding -j to the make command, you describe how many - concurrent jobs will be used. So for dualcore the command is: - - $ sudo make install -j2 - -Tip: To override the location that Kodi is installed, use PREFIX=. -For example. - - $ make install DESTDIR=$HOME/kodi - ------------------------------------------------------------------------------ -4.4. Binary addons - compile ------------------------------------------------------------------------------ - -From v14 with commit 4090a5f a new API for binary addons is available. -You can compile all addons or only specific addons by specifying e.g. ADDONS="audioencoder.foo pvr.bar audiodecoder.baz" - -.0 All addons - $ make -C tools/depends/target/binary-addons PREFIX=/ - -.1 Specific addons - $ make -C tools/depends/target/binary-addons PREFIX=/ ADDONS="audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu" - -Audio decoders: - audiodecoder.modplug, audiodecoder.nosefart, audiodecoder.sidplay, audiodecoder.snesapu, - audiodecoder.stsound, audiodecoder.timidity, audiodecoder.vgmstream - -Audio encoders: - audioencoder.flac, audioencoder.lame, audioencoder.vorbis, audioencoder.wav - -Inputstream addons: - inputstream.mpd - -Peripheral addons: - peripheral.joystick - -PVR addons: - pvr.argustv, pvr.demo, pvr.dvblink, pvr.dvbviewer, pvr.filmon, pvr.hdhomerun, pvr.hts, pvr.iptvsimple, - pvr.mediaportal.tvserver,pvr.mythtv, pvr.nextpvr, pvr.njoy, pvr.pctv, pvr.stalker, pvr.vbox, pvr.vdr.vnsi, - pvr.vuplus, pvr.wmc - -Screensavers: - screensaver.asteroids, screensaver.biogenesis, screensaver.greynetic, screensaver.matrixtrails, - screensaver.pingpong, screensaver.pyro, screensavers.rsxs, screensaver.stars - -Visualizations - visualization.fishbmc, visualization.goom, visualization.projectm, visualization.shadertoy - visualization.spectrum, visualization.vsxu, visualization.waveform - ------------------------------------------------------------------------------ -4.5. Test suite ------------------------------------------------------------------------------ - -Kodi has a test suite which uses the Google C++ Testing Framework. -This framework is provided directly in Kodi's source tree. -It has very little requirements, in order to build and run. -See the README file for the framework at 'lib/gtest/README' for specific requirements. - -To compile and run Kodi's test suite: -The configure option '--enable-gtest' is enabled by default during the configure stage. -Once configured, to build the testsuite, type the following: - - $ make check - -To compile the test suite without running it, type the following. - - $ make testsuite - -The test suite program can be run manually as well. -The name of the test suite program is 'kodi-test' and will build in the Kodi source tree. -To bring up the 'help' notes for the program, type the following: - - $ ./kodi-test --gtest_help - -The most useful options are, - - --gtest_list_tests - List the names of all tests instead of running them. - The name of TEST(Foo, Bar) is "Foo.Bar". - - --gtest_filter=POSTIVE_PATTERNS[-NEGATIVE_PATTERNS] - Run only the tests whose name matches one of the positive patterns but - none of the negative patterns. '?' matches any single character; '*' - matches any substring; ':' separates two patterns. - -Note: If the '--enable-gtest' option is not set during the configure stage, -the make targets 'check,' 'testsuite,' and 'testframework' will simply show a message saying -the framework has not been configured, and then silently succeed (i.e. it will not return an error). - ------------------------------------------------------------------------------ -5. How to run ------------------------------------------------------------------------------ - -How to run Kodi depends on the type of installation you have done. -It is possible to run Kodi without the requirement to install Kodi anywhere else. -In this case, type the following from the top source directory. - - $ ./kodi.bin - -Or run in 'portable' mode - - $ ./kodi.bin -p - -If you chose to install Kodi using '/usr' or '/usr/local' as the PREFIX, -you can just issue 'kodi' in a terminal session. - -If you have overridden PREFIX to install Kodi into some non-standard location, -you will have to run Kodi by directly running 'kodi.bin'. - -For example: - - $ $HOME/kodi/usr/lib/kodi/kodi.bin - -You should still run the wrapper via - $ $PREFIX/bin/kodi - -If you wish to use VDPAU decoding you will now have to change the Render Method -in Settings->Videos->Player from "Auto Detect" to "VDPAU". - ------------------------------------------------------------------------------ -6. Uninstalling ------------------------------------------------------------------------------ - -Prepend "sudo" to commands, if your user doesn't have write permission to the install directory. - -Note: If you have rerun configure with a different prefix, -you will either need to rerun configure with the correct prefix for this step to work correctly. - - $ make uninstall -.0 $ sudo make uninstall - -If you would like to also remove any settings and 3rd party addons (skins, scripts, etc) -you should also run: - -.1 $ rm -rf ~/.kodi - -EOF diff --git a/docs/README.osx.md b/docs/README.osx.md deleted file mode 100644 index ba66ed95cc..0000000000 --- a/docs/README.osx.md +++ /dev/null @@ -1,184 +0,0 @@ -# Kodi for Apple macOS - -## TOC - -1. [Introduction](#1-introduction) -2. [Getting the source code](#2-getting-the-source-code) -3. [Install build dependencies](#3-install-build-dependencies) - 1. [Install Xcode](#31-install-xcode) - 2. [Install Kodi build depends](#32-install-kodi-build-depends) - 3. [Compile Kodi binary addons](#33-compile-kodi-binary-addons) -4. [How to compile Kodi](#4-how-to-compile-kodi) - 1. [Using Xcode (or xcodebuild)](#41-using-xcode-or-xcodebuild) - 2. [Compilation using command-line (make)](#42-compilation-using-command-line-make) -5. [Packaging](#5-packaging) -6. [References](#6-references) - -## 1 Introduction - -This is a platform port of Kodi for the Apple macOS operating system. -Starting with Kodi v18 the build system has been migrated from native Xcode to -CMake (and generated project files). - -There are 3 ways to build Kodi for Mac: - -- Xcode IDE (easiest as it presents the build system in a GUI environment) -- command-line with xcodebuild -- command-line with make - -Kodi for Mac is composed of a main binary with numerous dynamic libraries and -codecs that support a multitude of music and video formats. - -The minimum version of OSX you need to run(!) Kodi is 10.9 atm. - -- On El Capitan (OSX 10.11.x) we recommend using Xcode 8.x. -- On Sierra (macOS 10.12.x) we recommend using Xcode 8.x. -- On High Sierra (macOS 10.13.x) we recommend using Xcode 9.x. - -## 2 Getting the source code - - cd $HOME - git clone git://github.com/xbmc/xbmc.git Kodi - -## 3 Install build dependencies - -### 3.1 Install Xcode - -Install the Xcode version recommended for your macOS version. You can download -it either from the macOS AppStore (Xcode) or from the Apple Developer Homepage. - -As far as we know the compilation for macOS should work with the following -constellations of Xcode and macOS versions (to be updated once we know more): - -7 Xcode 8.0 against OSX SDK 10.12 (EC) -8 Xcode 8.0 against OSX SDK 10.12 (S) -9 Xcode 9.0 against OSX SDK 10.13 (HS) - -### 3.2 Install Kodi build depends - -Kodi requires a set of build dependencies to be built and installed before you -will be able to build the Kodi main binary. These often just called *depends* -are installed using the commands described below (with the latest macOS SDK -found on your system). - -In order to speedup compilation it is recommended to use `make -j$(getconf -_NPROCESSORS_ONLN)` instead of `make` to compile on all available processor -cores. The build machine can also be configured to do this automatically by -adding `export MAKEFLAGS="-j(getconf _NPROCESSORS_ONLN)"` to your shell config -(e.g. `~/.bashrc`). - -#### 3.2.a Compiling as 64 bit libraries (recommended for most users) - - cd $HOME/Kodi - cd tools/depends - ./bootstrap - ./configure --host=x86_64-apple-darwin - make - -#### 3.2.b Compiling as 32 bit libraries - - cd $HOME/Kodi - cd tools/depends - ./bootstrap - ./configure --host=i386-apple-darwin - make - -#### 3.3.c Advanced topics - -The dependencies are built into `tools/depends` and installed into -`/Users/Shared/xbmc-depends`. - -**ADVANCED developers only**: If you want to specify an macOS SDK version (if -multiple versions are installed) - then append it to the configure line -above. The example below would use the macOS SDK 10.9: - - ./configure --host=arm-apple-darwin --with-sdk=10.9 - -### 3.3 Compile Kodi binary addons - -Kodi maintains a set of binary addons (PVR clients, Visualizations -plugins and more). They can be built as shown below: - - cd $HOME/Kodi - cd tools/depends - make -C target/binary-addons - -**NOTE**: If you only want to build specific addons you can specify like this: - - cd $HOME/Kodi - cd tools/depends - make -C target/binary-addons ADDONS="pvr.hts pvr.dvblink" - -## 4 How to compile Kodi - -### 4.1 Using Xcode (or xcodebuild) - -#### 4.1.1 Generate CMake project files - -Before you can use Xcode to build Kodi, the Xcode project has to be generated -with CMake. Note that CMake is compiled as parts of the depends doesn't have -to be installed separately. Also a Toolchain-file has been generated with is -used to configure CMake. - - mkdir $HOME/Kodi/build - cd $HOME/Kodi/build - /Users/Shared/xbmc-depends/x86_64-darwin15.6.0-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/macosx10.12_x86_64-target/share/Toolchain.cmake .. - -The toolchain file location differs depending on your macOS and SDK version and -you have to replace `x86_64-darwin15.6.0-native` and `macosx10.12_x86_64` in the filename above with the correct -file on your system. Check the directory content to get the filename. - -#### 4.1.2 Compilation using Xcode - -Start Xcode and open the Kodi project (kodi.xcodeproj) located in -`$HOME/Kodi/build`. - -If you have selected a specific OSX SDK Version in step 3.2 then you might need -to adapt the active target to use the same OSX SDK version. Else build will fail. - -The build process will take a long time when building the first time. -You can see the progress in "Build Results". There are a large number of static -and dynamic libraries that will need to be built. Once these are built, -subsequent builds will be faster. - -After the build, you can ether run Kodi for Mac from Xcode or run it from -the command-line. If you run it from the command-line: - - $HOME/Kodi/build/Debug/kodi.bin - -Or the release version: - - $HOME/Kodi/build/Release/kodi.bin - -Alternatively, you can also build via Xcode from the command-line with -xcodebuild, triggered by CMake: - - cd $HOME/Kodi/build - cmake --build . --config "Debug" -- -verbose -jobs $(getconf _NPROCESSORS_ONLN) - -You can specify `Release` instead of `Debug` as a configuration. - -### 4.2 Compilation using command-line (make) - -CMake is also able to generate a Makefile based project that can be used to -compile with make: - - cd $HOME/Kodi - make -C tools/depends/target/cmakebuildsys - make -C build - -## 5 Packaging - -CMake generate a target called `dmg` which will package Kodi.app for -distribution. - -After Kodi has been build, the target ca be triggered with by selecting it in -Xcode, or if using makefiles by issuing: - - make dmg - -## 6 References - -- [cmake/README.md](https://github.com/xbmc/xbmc/tree/master/cmake/README.md) -- [tools/depends/README](https://github.com/xbmc/xbmc/tree/master/tools/depends/README) -- [MAC OS X section in forum.kodi.tv](http://forum.kodi.tv/forumdisplay.php?fid=56) diff --git a/docs/README.raspberrypi b/docs/README.raspberrypi deleted file mode 100644 index 9ed09a8eb8..0000000000 --- a/docs/README.raspberrypi +++ /dev/null @@ -1,75 +0,0 @@ -TOC -1. Introduction -2. Building Kodi for the Raspberry Pi -3. Building Kodi using buildroot environment - ------------------------------------------------------------------------------ -1. Introduction ------------------------------------------------------------------------------ - -You can build Kodi for the Raspberry Pi in different ways. This document -shows two different methods. The first assumes that you want to run Kodi -on top of an image like Raspbian, the second shows how to create an entire -image which includes Linux. - ------------------------------------------------------------------------------ -2. Building Kodi for the Raspberry Pi ------------------------------------------------------------------------------ - -The following steps were tested with Ubuntu 16.04 x64. (Note that building on -a 32 bit machine requires slightly different setting). - -The following commands build for newer Raspberry Pi 2 generation. In order to -build for the first Raspberry Pi, the commands have to be adapted to use -`--with-platform=raspberry-pi` instead of `--with-platform=raspberry-pi2`. - - $ sudo apt-get install git autoconf curl g++ zlib1g-dev libcurl4-openssl-dev gawk gperf libtool autopoint swig default-jre bison make - - $ RPI_DEV=$PWD - $ git clone https://github.com/raspberrypi/tools - $ git clone https://github.com/raspberrypi/firmware - $ git clone https://github.com/xbmc/xbmc - - $ mkdir kodi-bcm - $ cd xbmc/tools/depends - $ ./bootstrap - $ ./configure --host=arm-linux-gnueabihf \ - --prefix=$RPI_DEV/kodi-bcm \ - --with-toolchain=$RPI_DEV/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf \ - --with-firmware=$RPI_DEV/firmware \ - --with-platform=raspberry-pi2 \ - --disable-debug - - $ make - $ cd ../.. - - $ make -C tools/depends/target/cmakebuildsys - $ cd build - $ make - $ make install - ------------------------------------------------------------------------------ -3. Building Kodi using buildroot environment ------------------------------------------------------------------------------ - -Installing and setting up the buildroot environment: - -Create a top level directory where you checkout Kodi and buildroot. - -For example : - - $ mkdir /opt/kodi-raspberrypi - $ cd /opt/kodi-raspberrypi - -Checkout kodi : - - $ git clone https://github.com/xbmc/xbmc.git kodi - -Checkout buildroot : - - $ git clone https://github.com/huceke/buildroot-rbp.git - - $ cd /opt/kodi-raspberrypi/buildroot-rbp - -Follow the instructions in README.rbp how to build the system and Kodi. - diff --git a/docs/README.ubuntu b/docs/README.ubuntu deleted file mode 100644 index 75cba3846e..0000000000 --- a/docs/README.ubuntu +++ /dev/null @@ -1,129 +0,0 @@ -TOC -1. Introduction -2. Getting the source code -3. Installing the required Ubuntu packages -4. How to compile -5. Uninstalling - ------------------------------------------------------------------------------ -1. Introduction ------------------------------------------------------------------------------ - -A graphics-adapter with OpenGL acceleration is highly recommended. -24/32 bitdepth is required along with OpenGL. - -Note to new Linux users. -All lines that are prefixed with the '$' character are commands, that need to be typed -into a terminal window / console (similar to the command prompt for Windows). -Note that the '$' character itself should NOT be typed as part of the command. - ------------------------------------------------------------------------------ -2. Getting the source code ------------------------------------------------------------------------------ - -.0 $ cd $HOME -.1 $ git clone git://github.com/xbmc/xbmc.git kodi - -Note: You can clone any specific branch. - -.1 $ git clone -b git://github.com/xbmc/xbmc.git kodi - ------------------------------------------------------------------------------ -3. Installing the required Ubuntu packages ------------------------------------------------------------------------------ - -Two methods exist to install the required Ubuntu packages: - -[NOTICE] For supported older Ubuntu versions, some packages might be outdated. - For those, you can either compile them manually, or use our backports - available from our official stable PPA: - - http://launchpad.net/~team-xbmc/+archive/ppa - ------------------------------------------------------------------------------ -3a. Use a single command to get all build dependencies ------------------------------------------------------------------------------ -[NOTICE] Supported on Ubuntu >= 16.04 - -You can get all build dependencies used for building the packages on the PPA - -Add the unstable PPA: - -For >= 16.04 lts: - $ sudo apt-get install software-properties-common - $ sudo add-apt-repository -s ppa:team-xbmc/xbmc-nightly - -Add build-depends PPA: - $ sudo add-apt-repository ppa:team-xbmc/xbmc-ppa-build-depends - -Here is the magic command to get the build dependencies (used to compile the version on the PPA). - $ sudo apt-get update - $ sudo apt-get build-dep kodi - -Optional: If you do not want Kodi to be installed via PPA, you can removed the PPAs again: - $ sudo add-apt-repository -r ppa:team-xbmc/xbmc-nightly - $ sudo add-apt-repository -r ppa:team-xbmc/xbmc-ppa-build-depends - -Note: Do not use "aptitude" for the build-dep command. It doesn't resolve everything properly. - For developers and anyone else who compiles frequently it is recommended to use ccache - $ sudo apt-get install ccache - -Tip: For those with multiple computers at home is to try out distcc - (fully unsupported from Kodi of course) - $ sudo apt-get install distcc - ------------------------------------------------------------------------------ -3b. Alternative: Manual dependency installation ------------------------------------------------------------------------------ - -For Ubuntu (all versions >= 16.04): - $ sudo apt-get install automake bison build-essential cmake curl cvs \ - default-jre fp-compiler gawk gdc gettext git-core gperf libasound2-dev libass-dev \ - libbz2-dev libcap-dev libcdio-dev libcurl3 \ - libcurl4-openssl-dev libdbus-1-dev libfontconfig-dev libegl1-mesa-dev libfreetype6-dev \ - libfribidi-dev libgif-dev libiso9660-dev libjpeg-dev liblzo2-dev \ - libmicrohttpd-dev libmysqlclient-dev libnfs-dev \ - libpcre3-dev libplist-dev libpng-dev libpulse-dev libsmbclient-dev \ - libsqlite3-dev libssl-dev libtinyxml-dev libtool libudev-dev libusb-dev \ - libva-dev libvdpau-dev libxml2-dev libxmu-dev libxrandr-dev \ - libxrender-dev libxslt1-dev libxt-dev mesa-utils nasm pmount python-dev python-imaging \ - python-sqlite rapidjson-dev swig uuid-dev yasm zlib1g-dev liblirc-dev - -[NOTICE] crossguid / libcrossguid-dev all Linux distributions. -Kodi now requires crossguid which is not available in Ubuntu repositories at this time. -If build-deps PPA doesn't provide a pre-packaged version for your distribution, see (1.) below. - -Use prepackaged from the Kodi build-depends PPA. -0. $ sudo apt-get install libcrossguid-dev - -We also supply a Makefile in tools/depends/target/crossguid -to make it easy to install into /usr/local. -1. $ make -C tools/depends/target/crossguid PREFIX=/usr/local - -[NOTICE] libfmt / libfmt3-dev all Linux distributions. -Kodi now requires libfmt which is not available in Ubuntu repositories at this time. -If build-deps PPA doesn't provide a pre-packaged version for your distribution, we supply a -Makefile in tools/depends/target/libfmt to make it easy to install into /usr/local. -1. $ make -C tools/depends/target/libfmt PREFIX=/usr/local - -Unless you are proficient with how Linux libraries and versions work, do not -try to provide it yourself, as you will likely mess up for other programs. - ------------------------------------------------------------------------------ -4. How to compile ------------------------------------------------------------------------------ -See README.linux - ------------------------------------------------------------------------------ -4.1. Test Suite ------------------------------------------------------------------------------ -See README.linux - ------------------------------------------------------------------------------ -5. Uninstalling ------------------------------------------------------------------------------ -Remove any PPA installed Kodi. - $ sudo apt-get remove kodi* xbmc* - -See README.linux/Uninstalling for removing compiled versions of Kodi. -EOF -- cgit v1.2.3