diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/CODE_GUIDELINES.md | 166 | ||||
-rw-r--r-- | docs/CONTRIBUTING.md | 3 | ||||
-rw-r--r-- | docs/HOWTO.CleanUpLogic.md | 2 | ||||
-rw-r--r-- | docs/MANIFESTO.md | 36 | ||||
-rw-r--r-- | docs/README.Android.md | 58 | ||||
-rw-r--r-- | docs/README.Fedora.md | 6 | ||||
-rw-r--r-- | docs/README.FreeBSD.md | 10 | ||||
-rw-r--r-- | docs/README.Linux.md | 76 | ||||
-rw-r--r-- | docs/README.RaspberryPi.md | 8 | ||||
-rw-r--r-- | docs/README.Ubuntu.md | 33 | ||||
-rw-r--r-- | docs/README.Windows.md | 17 | ||||
-rw-r--r-- | docs/README.iOS.md | 142 | ||||
-rw-r--r-- | docs/README.macOS.md | 55 | ||||
-rw-r--r-- | docs/README.md | 21 | ||||
-rw-r--r-- | docs/README.openSUSE.md | 4 | ||||
-rw-r--r-- | docs/README.tvOS.md | 248 | ||||
-rw-r--r-- | docs/codeofconduct/CodeOfConduct.md | 196 | ||||
-rw-r--r-- | docs/codeofconduct/ForumUserBanning.md | 15 | ||||
-rw-r--r-- | docs/codeofconduct/ModerationRules.md | 30 | ||||
-rw-r--r-- | docs/codeofconduct/ModeratorGuidelines.md | 54 | ||||
-rw-r--r-- | docs/doxygen/Doxyfile.doxy | 7 | ||||
-rw-r--r-- | docs/resources/tvos.svg | 1 |
22 files changed, 863 insertions, 325 deletions
diff --git a/docs/CODE_GUIDELINES.md b/docs/CODE_GUIDELINES.md index 81c235f48e..6ea0b0cb2a 100644 --- a/docs/CODE_GUIDELINES.md +++ b/docs/CODE_GUIDELINES.md @@ -37,18 +37,25 @@ * [9. Comments](#9-comments) * [9.1. General](#91-general) * [9.2. Doxygen](#92-doxygen) -* [10. Other conventions](#10-other-conventions) - * [10.1. Destructors in interfaces](#101-destructors-in-interfaces) - * [10.2. Output parameters](#102-output-parameters) - * [10.3. Casts](#103-casts) - * [10.4. `NULL` vs `nullptr`](#104-null-vs-nullptr) - * [10.5. auto](#105-auto) - * [10.6. `for` loops](#106-for-loops) - * [10.7. Default member initialization](#107-default-member-initialization) - * [10.8. Include guards](#108-include-guards) - * [10.9. Type aliases](#109-type-aliases) - * [10.10. `goto`](#1010goto) - * [10.11. Macros](#1011-macros) +* [10. Logging](#10-logging) +* [11. Classes](#11-classes) + * [11.1. Member visibility](#111-member-visibility) + * [11.2. Const correctness](#112-const-correctness) + * [11.3. Overriding virtual functions](#113-overriding-virtual-functions) + * [11.4. Default member initialization](#114-default-member-initialization) + * [11.5. Destructors in interfaces](#115-destructors-in-interfaces) + * [11.6. Constructor Initialization Lists](#116-constructor-initialization-lists) +* [12. Other conventions](#12-other-conventions) + * [12.1. Output parameters](#121-output-parameters) + * [12.2. Casts](#122-casts) + * [12.3. `NULL` vs `nullptr`](#123-null-vs-nullptr) + * [12.4. auto](#124-auto) + * [12.5. `for` loops](#125-for-loops) + * [12.6. Include guards](#126-include-guards) + * [12.7. Type aliases](#127-type-aliases) + * [12.8. `goto`](#128goto) + * [12.9. Macros](#129-macros) + * [12.10. constexpr](#1210-constexpr) ## 1. Motivation When working in a large group, the two most important values are readability and maintainability. We code for other people, not computers. To accomplish these goals, we have created a unified set of code conventions. @@ -61,12 +68,15 @@ In the repository root directory, there is a `.clang-format` file that implement ## 2. Language standard -We currently target the C++11 language standard. Do use C++11 features when possible. Do not use C++14 or C++17 features. +We currently target the C++14 language standard. Do use C++14 features when possible. Do not use C++17 features. **[back to top](#table-of-contents)** ## 3. Formatting +### Line length +The `ColumnLimit` in `.clang-format` is set to `100` which defines line length (in general where lines should be broken) that allows two editors side by side on a 1080p screen for diffs. + ### 3.1. Braces Curly braces always go on a new line. @@ -110,8 +120,6 @@ public: } ``` -**Exception:** Do not increase indentation after a `switch` statements. - ### 3.3. Control statements Insert a new line before every: * else in an if statement @@ -128,31 +136,30 @@ if (true) if (true) { [...] -} +} else if (false) { return; -} +} else return; ``` #### 3.3.2. switch case -Do not indent `case` and `default`. ```cpp switch (cmd) { -case x: -{ - doSomething(); - break; -} -case x: -case z: - return true; -default: - doSomething(); + case x: + { + doSomething(); + break; + } + case x: + case z: + return true; + default: + doSomething(); } ``` @@ -237,6 +244,26 @@ void Test(); void Test(void); ``` +### 3.7. Exceptions to the Formatting Rules For Better Readability +There are some special situations where vertical alignment and longer lines does greatly aid readability, for example the initialization of some table-like multiple row structures. In these **rare** cases exceptions can be made to the formatting rules on vertical alignment, and the defined line length can be exceeded. + +The layout can be protected from being reformatted when `clang-format` is applied by adding `// clang-format off` and `// clang-format on` statements either side of the lines of code. +For example +``` +// clang-format off +static const CGUIDialogMediaFilter::Filter filterList[] = { + { "movies", FieldTitle, 556, SettingType::String, "edit", "string", CDatabaseQueryRule::OPERATOR_CONTAINS }, + { "movies", FieldRating, 563, SettingType::Number, "range", "number", CDatabaseQueryRule::OPERATOR_BETWEEN }, + { "movies", FieldUserRating, 38018, SettingType::Integer, "range", "integer", CDatabaseQueryRule::OPERATOR_BETWEEN }, + ... + { "songs", FieldSource, 39030, SettingType::List, "list", "string", CDatabaseQueryRule::OPERATOR_EQUALS }, +}; +// clang-format on + ``` +The other code guidelines will still need to be applied within the delimited lines of code, but with `clang-format` off care will be needed to check these manually. Using vertical alignment means that sometimes the entire block of code may need to be realigned, good judgement should be used in each case with the objective of preserving readability yet minimising impact. + +This is to be used with discretion, marking large amounts of code to be left unformatted by `clang-format` without reasonable justification will be rejected. + **[back to top](#table-of-contents)** ## 4. Statements @@ -366,35 +393,37 @@ static void test(); **[back to top](#table-of-contents)** ## 7. Headers -Included header files have to be sorted alphabetically to prevent duplicates and allow better overview, with an empty line clearly separating sections. +Included header files have to be sorted (case sensitive) alphabetically to prevent duplicates and allow better overview, with an empty line clearly separating sections. Header order has to be: * Own header file -* Other Kodi includes +* Other Kodi includes (platform independent) +* Other Kodi includes (platform specific) * C and C++ system files * Other libraries' header files +* special Kodi headers (PlatformDefs.h, system.h and system_gl.h) ```cpp #include "PVRManager.h" +#include "Application.h" +#include "ServiceBroker.h" #include "addons/AddonInstaller.h" #include "dialogs/GUIDialogExtendedProgressBar.h" -#include "messaging/helpers/DialogHelper.h" #include "messaging/ApplicationMessenger.h" #include "messaging/ThreadMessage.h" -#include "music/tags/MusicInfoTag.h" +#include "messaging/helpers/DialogHelper.h" #include "music/MusicDatabase.h" +#include "music/tags/MusicInfoTag.h" #include "network/Network.h" #include "pvr/addons/PVRClients.h" #include "pvr/channels/PVRChannel.h" #include "settings/Settings.h" #include "threads/SingleLock.h" #include "utils/JobManager.h" -#include "utils/log.h" #include "utils/Variant.h" +#include "utils/log.h" #include "video/VideoDatabase.h" -#include "Application.h" -#include "ServiceBroker.h" #include <cassert> #include <utility> @@ -402,7 +431,7 @@ Header order has to be: #include <libavutil/pixfmt.h> ``` -Place directories before files. If the headers aren't sorted, either do your best to match the existing order, or precede your commit with an alphabetization commit. +If the headers aren't sorted, either do your best to match the existing order, or precede your commit with an alphabetization commit. If possible, avoid including headers in another header. Instead, you can forward-declare the class and use a `std::unique_ptr` (or similar): @@ -475,7 +504,7 @@ void MyDummyClass::DoSomething(); Use CamelCase. Type prefixing (Systems Hungarian notation) is discouraged. #### Member variables -Prefix nonstatic member variables with `m_`. Prefix static member variables with `ms_`. +Prefix non-static member variables with `m_`. Prefix static member variables with `ms_`. ```cpp int m_variableA; static int ms_variableB; @@ -520,7 +549,7 @@ Use `// ` for inline single-line and multi-line comments. Use `/* */` for the co ### 9.2. Doxygen -New classes and functions are expected to have Doxygen comments describing their purpose, parameters, and behavior in the header file. However, do not describe trivialities - it only adds visual noise. Use the Qt style with exclamation mark (`/*! */`) and backslash for doxygen commands (e.g. `\brief`). +New classes and functions are expected to have Doxygen comments describing their purpose, parameters, and behavior in the header file. However, do not describe trivialities - it only adds visual noise. Use the Qt style with exclamation mark (`/*! */`) and backslash for doxygen commands (e.g. `\brief`). ✅ Good: ```cpp @@ -579,17 +608,17 @@ std::cout << "Window size: " << width << "x" << height << std::endl; The predefined logging levels are `DEBUG`, `INFO`, `NOTICE`, `WARNING`, `ERROR`, `SEVERE`, and `FATAL`. Use anything `INFO` and above sparingly since it will be written to the log by default. Too many messages will clutter the log and reduce visibility of important information. `DEBUG` messages are only written when debug logging is enabled. -## 10. Classes +## 11. Classes -### 10.1. Member visibility +### 11.1. Member visibility Make class data members `private`. Think twice before using `protected` for data members and functions, as its level of encapsulation is effectively equivalent to `public`. -### 10.13. Const correctness +### 11.2. Const correctness Try to mark member functions of classes as `const` whenever reasonable. -### 10.10. Overriding virtual functions +### 11.3. Overriding virtual functions When overriding virtual functions of a base class, add the `override` keyword. Do not add the `virtual` keyword. @@ -611,7 +640,7 @@ public: } ``` -### 10.7. Default member initialization +### 11.4. Default member initialization Use default member initialization instead of initializer lists or constructor assignments whenever it makes sense. ```cpp class Foo @@ -620,22 +649,47 @@ class Foo }; ``` -### 10.1. Destructors in interfaces +### 11.5. Destructors in interfaces + +A class with any virtual functions should have a destructor that is either public and virtual or else protected and non-virtual (cf. [ISO C++ guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-dtor-virtual)). + +### 11.6. Constructor Initialization Lists + +For lines up to [line length](#line-length) everything stays on one line, excluding the braces which must be on the following lines. + +```cpp +MyClass::CMyClass(bool bBoolArg, int iIntegerArg) : m_bArg(bBoolArg), m_iArg(iIntegerArg) +{ +} +``` + +For longer lines, break before colon and after comma. -A class with any virtual functions should have a destructor that is either public and virtual or else protected and nonvirtual (cf. [ISO C++ guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-dtor-virtual)). +```cpp +MyClass::CMyClass(bool bBoolArg, + int iIntegerArg, + const std::string& strSomeText, + const std::shared_ptr<CMyOtherClass>& myOtherClass) + : m_bBoolArg(bBoolArg), + m_iIntegerArg(iIntegerArg), + m_strSomeText(strSomeText), + m_myOtherClass(myOtherClass) +{ +} +``` -## 10. Other conventions +## 12. Other conventions -### 10.2. Output parameters +### 12.1. Output parameters For functions that have multiple output values, prefer using a `struct` or `tuple` return value over output parameters that use pointers or references (cf. [ISO C++ guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-out-multi)). In general, try to avoid output parameters completely (cf. [ISO C++ guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-out), [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html#Output_Parameters)). At the function call site, it is completely invisible that actually a reference is being passed and the value might be modified. Return semantics make it clear what is happening. -### 10.3. Casts +### 12.2. Casts New code has to use C++ style casts and not older C style casts. When modifying existing code the developer can choose to update it to C++ style casts or leave as is. Whenever a `dynamic_cast` is used to cast to a pointer type, the result can be `nullptr` and needs to be checked accordingly. -### 10.4. `NULL` vs `nullptr` +### 12.3. `NULL` vs `nullptr` Prefer the use of `nullptr` instead of `NULL`. `nullptr` is a typesafe version and as such can't be implicitly converted to `int` or anything else. -### 10.5. `auto` +### 12.4. `auto` Feel free to use `auto` wherever it improves readability, which is not always the case. Good places are iterators or when dealing with containers. Bad places are code that expects a certain type that is not immediately clear from the context. @@ -655,7 +709,7 @@ for (const auto j : list) std::map<std::string, std::vector<int>>::iterator i = var.begin(); ``` -### 10.6. `for` loops +### 12.5. `for` loops Use range-based for loops wherever it makes sense. If iterators are used, see above about using `auto`. ```cpp for (const auto& : var) @@ -665,7 +719,7 @@ for (const auto& : var) ``` Remove `const` if the value has to be modified. Do not use references to fundamental types that are not modified. -### 10.8. Include guards +### 12.6. Include guards Use `#pragma once`. @@ -682,7 +736,7 @@ Use `#pragma once`. #endif ``` -### 10.9. Type aliases +### 12.7. Type aliases Use the C++ `using` syntax when aliasing types (encouraged when it improves readability). @@ -696,15 +750,15 @@ using SizeType = int; typedef int SizeType; ``` -### 10.11. `goto` +### 12.8. `goto` Usage of `goto` is discouraged. -### 10.12. Macros +### 12.9. Macros Try to avoid using C macros. In many cases, they can be easily substituted with other non-macro constructs. -### 10.14. `constexpr` +### 12.10. `constexpr` Prefer `constexpr` over `const` for constants when possible. Try to mark functions `constexpr` when reasonable. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index b0f41c94b5..ba2ef112a7 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -11,6 +11,9 @@ Also, always keep in mind that for many of us English is not our native language Before you start coding we advise you to build Kodi's master branch. This will save you and us precious time by making sure a proper build environment is set up and all dependencies are met. For your convenience, **[build guides](README.md)** are available for most common platforms. A **[git guide](GIT-FU.md)** is also available, streamlined to Kodi's development workflow. Unless you're a *git ninja*, please read it carefully. If you are a *git ninja*, we feel happy and sad for you at the same time. Your soul might be lost to the dark side already but worry not, we have cookies! +## Reviews +Reviews are a great way to get familiar with the codebase. If you would like to start with reviewing just use **[this handy github filter](https://github.com/xbmc/xbmc/pulls?q=is%3Apr+is%3Aopen+review%3Anone)** to see PRs that are in need of one (we have plenty!). + ## Pull request guidelines * **Create topic branches**. Never ever open a pull request from your master branch. **Ever!** * **Code against master branch**. Unless release specific, all Kodi development occurs in the `master` branch. If it needs backporting it can be done after it hits master. diff --git a/docs/HOWTO.CleanUpLogic.md b/docs/HOWTO.CleanUpLogic.md index ed64e4dd57..ff9279fcbc 100644 --- a/docs/HOWTO.CleanUpLogic.md +++ b/docs/HOWTO.CleanUpLogic.md @@ -35,7 +35,7 @@ Ternary logic can also be unwieldy. For example, the previous logic in the secon X = (A && !B) ? Y : Z; ``` -This statement isn't as offensive, but wouldn't it be more readable and maintanable by using a few more lines? +This statement isn't as offensive, but wouldn't it be more readable and maintainable by using a few more lines? **[back to top](#table-of-contents)** diff --git a/docs/MANIFESTO.md b/docs/MANIFESTO.md new file mode 100644 index 0000000000..1b7dae9ba3 --- /dev/null +++ b/docs/MANIFESTO.md @@ -0,0 +1,36 @@ +Team Kodi Manifesto +=================== + +The Kodi manifesto is Team-Kodi's public declaration of the Kodi project members principles, philosophy and intentions. This manifesto tries to outline the goals we aim and hope to achieve with Kodi and sum up the Kodi project's strategic direction vision for the present and the future. + +In one sentence, the vision of Team-Kodi is to create the best cross-platform media center software there is. + +User-friendliness is next to godlyness +-------------------------------------- + +One major ongoing goal of Team-Kodi has always been to make Kodi and its user interface feel even more intuitive and user-friendly for its end-users, based on the **KISS** (**K**eep **I**t **S**imple, **S**tupid) principle of simplicity. It is our belief that usability is the most important aspect of a media center like Kodi. Many other media center projects make user interface decisions by developers, who often have little experience in user interface design. In contrast, Team-Kodi does its best to listen to Kodi's end-users to learn how Kodi is actually being used and how we can improve the user experience. We also aim to do regular overhauls, improving existing features/functions, and scrapping outdated code and features/functions (as "too much stuff" adds unnecessary complexity and can thus also be a bad thing). Everything should be made as simple as possible, but no simpler. + +Kodi as a whole must... + +* First and foremost be aimed at a large-screen (28" or more) [10-foot user interface](https://kodi.wiki/view/10-foot_user_interface) for the living-room experience. + * Large menus, text/fonts and buttons that is designed to be navigated by a hand-held remote-control. +* Be focused around the main features of playing music, watching movies, recorded television broadcasts, and viewing pictures. + * Kodi may be capable of converging other things but those things should never take over the main focus in the interface. +* Be easy to install, set up and maintain (so that our valuable end-users do not get fed up with it and quit). +* Have an user interface that is simple and intuitive enough so that less tech-savvy people are not intimidated by it. + * Make common usage easy, simple 'Human–Computer Interaction (HCI)', from the viewpoint of an ordinary user. +* Be able to play audio and video files that have been encoded using DivX, XviD, etc. directly out-of-the-box. +* Be able to organize audio and video files in an easy and user-friendly way. +* Use standards and be consistent, (the Music section can for example not use completely different controls from the Video section). +* Perform actions in the GUI with as few 'clicks' as possible. +* Be aimed at an international audience, internationalization and localization by supporting different languages, timezones and other regional differences +* Require little to no non-GUI configuration (and all such non-GUI configuration should be done in just one file: [advancedsettings.xml](https://kodi.wiki/view/Advancedsettings.xml)). +* Be beautiful to look at, after all we hope you will be using it a lot! + +1.2 Team-Kodi members should always strive to + +* **Promote open source** - Kodi is based on the ideas of FOSS (free open source software), licensed under the GPL and builds partly on other open source projects which we do our best to support. The GPL should be respected at all times. All code should be committed to the Kodi project’s [git repo](https://github.com/xbmc/xbmc) before any public binaries are released. +* **Promote the sharing of knowledge and collaboration** - Through the use of information sharing tools and practices Kodi is a collaborative environment. +* **Understand that development is a team effort** - Treating our users as co-developers has proven to be the most effective option for rapid development. Always strive to work as a team at all times. Actively promote discussion on new features and bug fixes, and respect others comments and criticisms with replies in a timely fashion. +* **Apply the Law of Diminishing Return** - The majority of the effort should be invested in implementing features which have the most benefit and widest general usage by the community. +* **Try to make all code, feature, and functions to be platform agnostic** - Kodi is a multi-platform software, thus any single platform specific features should be discussed with other team members before implemented. Major features should be developed in a separate branch or committed in small increments so that other members have the opportunity to review the code and comment on it during development. diff --git a/docs/README.Android.md b/docs/README.Android.md index a2d4d14ea7..5d918d6887 100644 --- a/docs/README.Android.md +++ b/docs/README.Android.md @@ -65,7 +65,7 @@ sudo apt install autoconf build-essential curl default-jdk gawk git gperf lib32s **[back to top](#table-of-contents)** ## 3. Prerequisites -Building Kodi for Android requires Android NDK revision 18. For the SDK just use the latest available. +Building Kodi for Android requires Android NDK revision 20. For the SDK just use the latest available. * **[Android SDK](https://developer.android.com/studio/index.html)** (Look for `Get just the command line tools`) * **[Android NDK](https://developer.android.com/ndk/downloads/index.html)** @@ -85,7 +85,7 @@ unzip $HOME/Downloads/sdk-tools-linux-4333796.zip -d $HOME/android-tools/android Extract Android NDK: ``` -unzip $HOME/Downloads/android-ndk-r18-linux-x86_64.zip -d $HOME/android-tools +unzip $HOME/Downloads/android-ndk-r20-linux-x86_64.zip -d $HOME/android-tools ``` ### 3.2. Configure Android SDK @@ -94,50 +94,25 @@ Before Android SDK can be used, you need to accept the licenses and configure it cd $HOME/android-tools/android-sdk-linux/tools/bin ./sdkmanager --licenses ./sdkmanager platform-tools -./sdkmanager "platforms;android-26" -./sdkmanager "build-tools;25.0.3" +./sdkmanager "platforms;android-28" +./sdkmanager "build-tools;28.0.3" ``` -### 3.3. Set up the Android toolchain -To be able to build Kodi and the libraries it depends on for the Android platform you first need to set up an Android toolchain using the Android NDK. - -Change to Android NDK tools directory: -``` -cd $HOME/android-tools/android-ndk-r18/build/tools -``` - -Set up the aarch64 toolchain: -``` -./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/aarch64-linux-android-vanilla/android-21 --platform=android-21 --toolchain=aarch64-linux-android -``` - -Set up the arm toolchain: -``` -./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/arm-linux-androideabi-vanilla/android-21 --platform=android-21 --toolchain=arm-linux-androideabi -``` - -Set up the x86 toolchain: -``` -./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/x86-linux-android-vanilla/android-21 --platform=android-21 --toolchain=x86-linux-android -``` - -**NOTE:** You only need the toolchain for your target architecture but toolchains are installed in different directories and will not interfere with each other. - -### 3.4. Create a key to sign debug APKs +### 3.3. Create a 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. ``` 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 ``` -### 3.5. macOS specific prerequisites +### 3.4. macOS specific prerequisites * **[Java Development Kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)** installed. * Normal macOS installations filesystem is case insensitive but compiling for Android requires a case sensitive filesystem. Generate a writeable hdd image and format it with hfs+ (case sensitive) issuing * `hdiutil create -type UDIF -fs 'Case-sensitive Journaled HFS+' -size 20g -volname android-dev $HOME/android-dev.dmg` * Whenever you want to compile/develop you need to mount the image * `open ~/android-dev.dmg` * Once you have your hdd image with case sensitive hfs+ file system execute all the steps inside of this filesystem. You need to adapt all paths in this guide so that they match your local environment. As an example here is a configure line that demonstrates possible paths: - * `./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-r18 --with-toolchain=/Volumes/android-dev/android/android-toolchain-arm/android-21 --prefix=/Volumes/android-dev/android/xbmc-depends` + * `./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-r20 --prefix=/Volumes/android-dev/android/xbmc-depends` **[back to top](#table-of-contents)** | **[back to section top](#3-prerequisites)** @@ -163,19 +138,26 @@ cd $HOME/kodi/tools/depends Configure build for aarch64: ``` -./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/aarch64-linux-android-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends +./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends ``` Or configure build for arm: ``` -./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/arm-linux-androideabi-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends +./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends ``` Or configure build for x86: ``` -./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/x86-linux-android-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends +./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends +``` + +Or configure build for x86_64: +``` +./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=x86_64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends ``` +> **Note:** Android x86 and x86_64 are not maintained and are not 100% sure that everything works correctly! + Build tools and dependencies: ``` make -j$(getconf _NPROCESSORS_ONLN) @@ -220,6 +202,12 @@ cd $HOME/kodi make -C tools/depends/target/cmakebuildsys ``` +**TIP:** BUILD_DIR can be provided as an argument to cmakebuildsys. This allows you to provide an alternate build location. Change all paths onwards as required if BUILD_DIR option used. +``` +mkdir $HOME/kodi-build +make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build +``` + Build Kodi: ``` cd $HOME/kodi/build diff --git a/docs/README.Fedora.md b/docs/README.Fedora.md index c1db11ac7f..b38c49babd 100644 --- a/docs/README.Fedora.md +++ b/docs/README.Fedora.md @@ -61,13 +61,17 @@ git clone https://github.com/xbmc/xbmc kodi ## 3. Install the required packages If you get a `package not found` type of message with the below command, remove the offending package(s) from the install list and reissue the command. Take a note of the missing dependencies and, after a successful step completion, **[build the missing dependencies manually](README.Linux.md#31-build-missing-dependencies)**. +**NOTE:** Kodi requires a compiler with C++14 support, i.e. gcc >= 4.9 or clang >= 3.4 + Install build dependencies: ``` -sudo dnf install alsa-lib-devel autoconf automake avahi-compat-libdns_sd-devel avahi-devel bluez-libs-devel bzip2-devel cmake curl dbus-devel flatbuffers flatbuffers-devel fmt-devel fontconfig-devel freetype-devel fribidi-devel fstrcmp-devel gawk gcc gcc-c++ gettext gettext-devel giflib-devel gperf java-9-openjdk-headless jre lcms2-devel libao-devel libass-devel libbluray-devel libcap-devel libcdio-devel libcec-devel libcurl-devel libidn2-devel libjpeg-turbo-devel libmicrohttpd-devel libmpc-devel libnfs-devel libplist-devel libpng12-devel libsmbclient-devel libtool libtool-ltdl-devel libudev-devel libusb-devel libuuid-devel libva-devel libvdpau-devel libxml2-devel libXmu-devel libXrandr-devel libxslt-devel libXt-devel lirc-devel lzo-devel mariadb-devel mesa-libEGL-devel mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel mesa-libOSMesa-devel nasm openssl-devel openssl-libs patch pcre-devel pulseaudio-libs-devel python-devel python-pillow rapidjson-devel shairplay-devel sqlite-devel swig taglib-devel tinyxml-devel trousers-devel uuid-devel yasm zlib-devel +sudo dnf install alsa-lib-devel autoconf automake avahi-compat-libdns_sd-devel avahi-devel bluez-libs-devel bzip2-devel cmake curl dbus-devel flatbuffers flatbuffers-devel fmt-devel fontconfig-devel freetype-devel fribidi-devel fstrcmp-devel gawk gcc gcc-c++ gettext gettext-devel giflib-devel gperf gtest java-11-openjdk-headless jre lcms2-devel libao-devel libass-devel libbluray-devel libcap-devel libcdio-devel libcec-devel libcurl-devel libidn2-devel libjpeg-turbo-devel libmicrohttpd-devel libmpc-devel libnfs-devel libplist-devel libpng12-devel libsmbclient-devel libtool libtool-ltdl-devel libudev-devel libunistring libunistring-devel libusb-devel libuuid-devel libva-devel libvdpau-devel libxml2-devel libXmu-devel libXrandr-devel libxslt-devel libXt-devel lirc-devel lzo-devel make mariadb-devel mesa-libEGL-devel mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel mesa-libOSMesa-devel nasm openssl-devel openssl-libs patch pcre-devel pulseaudio-libs-devel python3-devel python3-pillow rapidjson-devel shairplay-devel sqlite-devel swig taglib-devel tinyxml-devel trousers-devel uuid-devel yasm zlib-devel ``` **WARNING:** Make sure you copy paste the entire line or you might receive an error or miss a few dependencies. +**NOTE:** Fedora 28 and older don't provide `java-11-openjdk-headless`. Install `java-9-openjdk-headless` instead. + Building for Wayland requires some extra packages: ``` sudo dnf install mesa-libGLES-devel wayland-devel waylandpp-devel wayland-protocols-devel diff --git a/docs/README.FreeBSD.md b/docs/README.FreeBSD.md index 2a35a4db30..75e5985171 100644 --- a/docs/README.FreeBSD.md +++ b/docs/README.FreeBSD.md @@ -1,7 +1,7 @@  # FreeBSD build guide -This guide has been tested with FreeBSD 11.1 x86_64. Please read it in full before you proceed to familiarize yourself with the build procedure. +This guide has been tested with FreeBSD 12.1 x86_64. Please read it in full before you proceed to familiarize yourself with the build procedure. Several other distributions have **[specific build guides](README.md)** and a general **[Linux build guide](README.Linux.md)** is also available. @@ -72,9 +72,11 @@ git clone https://github.com/xbmc/xbmc kodi ## 3. Install the required packages If you get a `package not found` type of message with the below command, remove the offending package(s) from the install list and reissue the command. Take a note of the missing dependencies and, after a successful step completion, **[build the missing dependencies manually](#31-build-missing-dependencies)**. +**NOTE:** Kodi requires a compiler with C++14 support, i.e. gcc >= 4.9 or clang >= 3.4 + Install build dependencies: ``` -sudo pkg install autoconf automake avahi-app binutils cmake curl dbus doxygen e2fsprogs-libuuid enca encodings flac flatbuffers font-util fontconfig freetype2 fribidi gawk gettext-tools giflib git glew gmake gmp gnutls gperf gstreamer1-vaapi hal jpeg-turbo libaacs libass libbdplus libbluray libcapn libcdio libcec libedit libfmt libgcrypt libgpg-error libidn libinotify libmicrohttpd libnfs libogg libplist librtmp libtool libudev-devd libva libvdpau libvorbis libxslt lirc lzo2 m4 mesa-libs mysql57-client nasm openjdk8 p8-platform pkgconf python2 rapidjson samba46 shairplay sndio sqlite3 swig30 taglib tiff tinyxml xf86-input-keyboard xf86-input-mouse xorg-proto xorg-server xrandr zip +sudo pkg install autoconf automake avahi-app binutils cmake curl dbus doxygen e2fsprogs-libuuid enca encodings flac flatbuffers font-util fontconfig freetype2 fribidi fstrcmp gawk gettext-tools giflib git glew gmake gmp gnutls googletest gperf gstreamer1-vaapi hal jpeg-turbo libaacs libass libbdplus libbluray libcapn libcdio libcec libedit libfmt libgcrypt libgpg-error libidn libinotify libmicrohttpd libnfs libogg libplist librtmp libtool libudev-devd libva libvdpau libvorbis libxslt lirc lzo2 m4 mesa-libs mysql57-client nasm openjdk8 p8-platform pkgconf python3 rapidjson shairplay sndio sqlite3 swig30 taglib tiff tinyxml xf86-input-keyboard xf86-input-mouse xorg-server xrandr zip ``` **WARNING:** Make sure you copy paste the entire line or you might receive an error or miss a few dependencies. @@ -114,11 +116,9 @@ cd $HOME/kodi-build Configure build: ``` -cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_INTERNAL_FSTRCMP=1 +cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local ``` -Internal libfstrcmp is used since it is not available through pkg. - ### 4.2. Build ``` cmake --build . -- VERBOSE=1 -j$(sysctl hw.ncpu | awk '{print $2}') diff --git a/docs/README.Linux.md b/docs/README.Linux.md index d1eec2d493..e78f7b941e 100644 --- a/docs/README.Linux.md +++ b/docs/README.Linux.md @@ -14,7 +14,9 @@ Several distribution **[specific build guides](README.md)** are available. 4. **[Build Kodi](#4-build-kodi)** 4.1. **[Configure build](#41-configure-build)** 4.2. **[Build](#42-build)** -5. **[Build binary add-ons](#5-build-binary-add-ons)** +5. **[Build binary add-ons](#5-build-binary-add-ons)** + 5.1. **[In-tree building of binary add-ons](#51-in-tree-building-of-binary-add-ons)** + 5.2. **[Out-of-tree building of binary add-ons](#52-out-of-tree-building-of-binary-add-ons)** 6. **[Run Kodi](#6-run-kodi)** 7. **[Uninstall Kodi](#7-uninstall-kodi)** 8. **[Test suite](#8-test-suite)** @@ -70,10 +72,12 @@ git clone https://github.com/xbmc/xbmc kodi ## 3. Install the required packages The following is the list of packages that are used to build Kodi on Debian/Ubuntu (with all supported external libraries enabled). -* autoconf, automake, autopoint, gettext, autotools-dev, cmake, curl, default-jre | openjdk-6-jre | openjdk-7-jre, gawk, gcc (>= 4.9) | gcc-4.9, g++ (>= 4.9) | g++-4.9, cpp (>= 4.9) | cpp-4.9, flatbuffers, gdc, gperf, libasound2-dev | libasound-dev, libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev, libbluray-dev, libbz2-dev, libcdio-dev, libcec4-dev | libcec-dev, libp8-platform-dev, libcrossguid-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev, libcwiid-dev, libdbus-1-dev, libegl1-mesa-dev, libenca-dev, libflac-dev, libfontconfig-dev, libfmt3-dev | libfmt-dev, libfreetype6-dev, libfribidi-dev, libfstrcmp-dev, libgcrypt-dev, libgif-dev (>= 5.0.5), libgles2-mesa-dev [armel] | libgl1-mesa-dev | libgl-dev, libglew-dev, libglu1-mesa-dev | libglu-dev, libgnutls-dev | libgnutls28-dev, libgpg-error-dev, libiso9660-dev, libjpeg-dev, liblcms2-dev, liblirc-dev, libltdl-dev, liblzo2-dev, libmicrohttpd-dev, libmysqlclient-dev, libnfs-dev, libogg-dev, libomxil-bellagio-dev [armel], libpcre3-dev, libplist-dev, libpng12-dev | libpng-dev, libpulse-dev, libshairplay-dev, libsmbclient-dev, libsqlite3-dev, libssl-dev, libtag1-dev (>= 1.8) | libtag1x8, libtiff5-dev | libtiff-dev | libtiff4-dev, libtinyxml-dev, libtool, libudev-dev, libva-dev, libvdpau-dev, libvorbis-dev, libxkbcommon-dev, libxmu-dev, libxrandr-dev, libxslt1-dev | libxslt-dev, libxt-dev, waylandpp-dev | netcat, wayland-protocols | wipe, lsb-release, nasm [!amd64], python-dev, python-pil | python-imaging, python-support | python-minimal, rapidjson-dev, swig, unzip, uuid-dev, yasm, zip, zlib1g-dev +**NOTE:** Kodi requires a compiler with C++14 support, i.e. gcc >= 4.9 or clang >= 3.4 + +* autoconf, automake, autopoint, gettext, autotools-dev, cmake, curl, default-jre | openjdk-6-jre | openjdk-7-jre, gawk, gcc (>= 4.9) | gcc-4.9, g++ (>= 4.9) | g++-4.9, cpp (>= 4.9) | cpp-4.9, flatbuffers, gdc, gperf, libasound2-dev | libasound-dev, libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev, libbluray-dev, libbz2-dev, libcdio-dev, libcec4-dev | libcec-dev, libp8-platform-dev, libcrossguid-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev, libcwiid-dev, libdbus-1-dev, libegl1-mesa-dev, libenca-dev, libflac-dev, libfontconfig-dev, libfmt3-dev | libfmt-dev, libfreetype6-dev, libfribidi-dev, libfstrcmp-dev, libgcrypt-dev, libgif-dev (>= 5.0.5), libgles2-mesa-dev [armel] | libgl1-mesa-dev | libgl-dev, libglew-dev, libglu1-mesa-dev | libglu-dev, libgnutls-dev | libgnutls28-dev, libgpg-error-dev, libgtest-dev, libiso9660-dev, libjpeg-dev, liblcms2-dev, liblirc-dev, libltdl-dev, liblzo2-dev, libmicrohttpd-dev, libmysqlclient-dev, libnfs-dev, libogg-dev, libomxil-bellagio-dev [armel], libpcre3-dev, libplist-dev, libpng12-dev | libpng-dev, libpulse-dev, libshairplay-dev, libsmbclient-dev, libspdlog-dev, libsqlite3-dev, libssl-dev, libtag1-dev (>= 1.8) | libtag1x8, libtiff5-dev | libtiff-dev | libtiff4-dev, libtinyxml-dev, libtool, libudev-dev, libva-dev, libvdpau-dev, libvorbis-dev, libxkbcommon-dev, libxmu-dev, libxrandr-dev, libxslt1-dev | libxslt-dev, libxt-dev, waylandpp-dev | netcat, wayland-protocols | wipe, lsb-release, meson (>= 0.47.0), nasm (>= 2.14), ninja-build, python3-dev, python3-pil | python-imaging, python-support | python3-minimal, rapidjson-dev, swig, unzip, uuid-dev, yasm, zip, zlib1g-dev ### 3.1. Build missing dependencies -Some packages may be missing or outdated in older distributions. Notably `crossguid, libfmt, waylandpp, wayland-protocols, etc.` are known to be outdated or missing. Fortunately there is an easy way to build individual dependencies with **[Kodi's unified depends build system](../tools/depends/README.md)**. +Some packages may be missing or outdated in older distributions. Notably `crossguid`, `libfmt`, `libspdlog`, `waylandpp`, `wayland-protocols`, etc. are known to be outdated or missing. Fortunately there is an easy way to build individual dependencies with **[Kodi's unified depends build system](../tools/depends/README.md)**. Change to Kodi's source code directory: ``` @@ -95,6 +99,11 @@ Build and install libfmt: sudo make -C tools/depends/target/libfmt PREFIX=/usr/local ``` +Build and install libspdlog: +``` +sudo make -C tools/depends/target/libspdlog PREFIX=/usr/local +``` + Build and install wayland-protocols: ``` sudo make -C tools/depends/target/wayland-protocols PREFIX=/usr/local @@ -110,7 +119,7 @@ sudo make -C tools/depends/target/waylandpp PREFIX=/usr/local **TIP:** Complete list of dependencies is available **[here](https://github.com/xbmc/xbmc/tree/master/tools/depends/target)**. ### 3.2. Enable internal dependencies -Some dependencies can be configured to build before Kodi. That's the case with `flatbuffers`, `crossguid, libfmt and rapidjson`. To enable the internal build of a dependency, append `-DENABLE_INTERNAL_<DEPENDENCY_NAME>=ON` to the configure command below. For example, configuring an X11 build with internal `fmt` would become `cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_INTERNAL_FMT=ON` instead of `cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local`. +Some dependencies can be configured to build before Kodi. That's the case with `flatbuffers`, `crossguid`, `libfmt`, `libspdlog`, `rapidjson` and `dav1d`. To enable the internal build of a dependency, append `-DENABLE_INTERNAL_<DEPENDENCY_NAME>=ON` to the configure command below. For example, configuring an X11 build with internal `fmt` would become `cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_INTERNAL_FMT=ON` instead of `cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local`. **[back to top](#table-of-contents)** | **[back to section top](#3-installing-the-required-packages)** @@ -132,9 +141,11 @@ cd $HOME/kodi-build Configure build for X11: ``` -cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local +cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DX11_RENDER_SYSTEM=gl ``` +**NOTE:** You can use `gles` instead of `gl` if you want to build with `GLES`. + Or configure build for Wayland: ``` cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=wayland -DWAYLAND_RENDER_SYSTEM=gl @@ -199,6 +210,13 @@ sudo make install DESTDIR=$HOME/kodi ## 5. Build binary add-ons You can find a complete list of available binary add-ons **[here](https://github.com/xbmc/repo-binary-addons)**. +In the following, two approaches to building binary add-ons are described. +While the workflow of in-tree building is more automated, +it is only supported as long as `-DCMAKE_INSTALL_PREFIX=/usr/local` is not changed from it's default of `/usr/local`. +Thus when changing `DCMAKE_INSTALL_PREFIX`, you must follow the out-of-tree building instructions. + +### 5.1. In-tree building of binary add-ons + Change to Kodi's source code directory: ``` cd $HOME/kodi @@ -223,6 +241,54 @@ sudo make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons P **[back to top](#table-of-contents)** + +### 5.2. Out-of-tree building of binary add-ons + +You can find a complete list of available binary add-ons **[here](https://github.com/xbmc/repo-binary-addons)**. +Exemplary, to install `pvr.demo`, follow below steps. +For other addons, simply adapt the repository based on the information found in the `.txt` associated with the respective addon **[here](https://github.com/xbmc/repo-binary-addons)** + +Some addons have dependencies. +You must install all required dependencies of an addon before installing the addon. +Required dependencies can be found by checking the `depends` folder and +it's subdirectories in the repository of the respective addons. + +A number of addons require the the `p8-platform` and `kodi-platform` add-ons. +Note that dependencies on `p8-platform` and `kodi-platform` are typically not declared in the `depends` folder. +They are only declared in the `CMakeLists.txt` file of the respective addon (e.g. via `find_package(p8-platform REQUIRED)`). +Below we demonstrate how to build these two. +First, the platform addon: + +``` +cd ~/src/ +git clone https://github.com/xbmc/platform.git +cd ~/src/platform/ +cmake -DCMAKE_INSTALL_PREFIX=/usr/local +make && make install +``` + +Then the kodi-platform add-on: + +``` +cd ~/src/ +git clone https://github.com/xbmc/kodi-platform.git +cd ~/src/kodi-platform/ +cmake -DCMAKE_INSTALL_PREFIX=/usr/local +make && make install +``` + +Finally, to install pvr.demo + +``` +cd ~/src +git clone https://github.com/kodi-pvr/pvr.demo.git +cd ~/src/pvr.demo/ +cmake -DCMAKE_INSTALL_PREFIX=/usr/local +make && make install +``` + +**NOTE:** `-DCMAKE_INSTALL_PREFIX=` should match Kodi's `-DCMAKE_INSTALL_PREFIX=` prefix used in **[section 4.1](#41-configure-build)**. + ## 6. Run Kodi If you chose to install Kodi using `/usr` or `/usr/local` as the `-DCMAKE_INSTALL_PREFIX=`, you can just issue *kodi* in a terminal session. diff --git a/docs/README.RaspberryPi.md b/docs/README.RaspberryPi.md index de294d0868..4d8ce4f0e6 100644 --- a/docs/README.RaspberryPi.md +++ b/docs/README.RaspberryPi.md @@ -51,6 +51,8 @@ Several different strategies are used to draw your attention to certain pieces o **[back to top](#table-of-contents)** | **[back to section top](#1-document-conventions)** ## 2. Install the required packages +**NOTE:** Kodi requires a compiler with C++14 support, i.e. gcc >= 4.9 or clang >= 3.4 + Install build dependencies needed to cross-compile Kodi for the Raspberry Pi: ``` sudo apt install autoconf bison build-essential curl default-jdk gawk git gperf libcurl4-openssl-dev zlib1g-dev @@ -122,6 +124,12 @@ cd $HOME/kodi make -C tools/depends/target/cmakebuildsys ``` +**TIP:** BUILD_DIR can be provided as an argument to cmakebuildsys. This allows you to provide an alternate build location. Change all paths onwards as required if BUILD_DIR option used. +``` +mkdir $HOME/kodi-build +make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build +``` + Build Kodi: ``` cd $HOME/kodi/build diff --git a/docs/README.Ubuntu.md b/docs/README.Ubuntu.md index 391118db83..bd41189b69 100644 --- a/docs/README.Ubuntu.md +++ b/docs/README.Ubuntu.md @@ -1,7 +1,7 @@  # Debian/Ubuntu build guide -This guide has been tested with Ubuntu 16.04.4 (Xenial) x86_64 and 18.04 (Bionic). Please read it in full before you proceed to familiarize yourself with the build procedure. +This guide has been tested with Ubuntu 16.04.4 (Xenial) x86_64, 18.04 (Bionic) and 20.04 (Focal). Please read it in full before you proceed to familiarize yourself with the build procedure. Several other distributions have **[specific build guides](README.md)** and a general **[Linux build guide](README.Linux.md)** is also available. @@ -10,7 +10,8 @@ Several other distributions have **[specific build guides](README.md)** and a ge 2. **[Get the source code](#2-get-the-source-code)** 3. **[Install the required packages](#3-install-the-required-packages)** 3.1. **[Get build dependencies automagically](#31-get-build-dependencies-automagically)** - 3.2. **[Get build dependencies manually](#32-get-build-dependencies-manually)** + 3.2. **[Get build dependencies manually](#32-get-build-dependencies-manually)** + 3.3. **[Ubuntu <= 18.04](#33-ubuntu--1804)** 4. **[Build Kodi](#4-build-kodi)** ## 1. Document conventions @@ -111,9 +112,11 @@ sudo apt install distcc ### 3.2. Get build dependencies manually If you get a `package not found` type of message with the below command, remove the offending package(s) from the install list and reissue the command. Take a note of the missing dependencies and, after a successful step completion, **[build the missing dependencies manually](README.Linux.md#31-build-missing-dependencies)**. +**NOTE:** Kodi requires a compiler with C++14 support, i.e. gcc >= 4.9 or clang >= 3.4 + Install build dependencies manually: ``` -sudo apt install debhelper autoconf automake autopoint gettext autotools-dev cmake curl default-jre doxygen gawk gcc gdc gperf libasound2-dev libass-dev libavahi-client-dev libavahi-common-dev libbluetooth-dev libbluray-dev libbz2-dev libcdio-dev libp8-platform-dev libcrossguid-dev libcurl4-openssl-dev libcwiid-dev libdbus-1-dev libegl1-mesa-dev libenca-dev libflac-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libfstrcmp-dev libgcrypt-dev libgif-dev libgles2-mesa-dev libgl1-mesa-dev libglu1-mesa-dev libgnutls28-dev libgpg-error-dev libiso9660-dev libjpeg-dev liblcms2-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libmysqlclient-dev libnfs-dev libogg-dev libpcre3-dev libplist-dev libpng-dev libpulse-dev libshairplay-dev libsmbclient-dev libsqlite3-dev libssl-dev libtag1-dev libtiff5-dev libtinyxml-dev libtool libudev-dev libva-dev libvdpau-dev libvorbis-dev libxmu-dev libxrandr-dev libxslt1-dev libxt-dev lsb-release python-dev python-pil rapidjson-dev swig unzip uuid-dev yasm zip zlib1g-dev +sudo apt install debhelper autoconf automake autopoint gettext autotools-dev cmake curl default-jre doxygen gawk gcc gdc gperf libasound2-dev libass-dev libavahi-client-dev libavahi-common-dev libbluetooth-dev libbluray-dev libbz2-dev libcdio-dev libp8-platform-dev libcrossguid-dev libcurl4-openssl-dev libcwiid-dev libdbus-1-dev libegl1-mesa-dev libenca-dev libflac-dev flatbuffers-dev libfmt-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libfstrcmp-dev libgcrypt-dev libgif-dev libgles2-mesa-dev libgl1-mesa-dev libglu1-mesa-dev libgnutls28-dev libgpg-error-dev libgtest-dev libiso9660-dev libjpeg-dev liblcms2-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libmysqlclient-dev libnfs-dev libogg-dev libpcre3-dev libplist-dev libpng-dev libpulse-dev libshairplay-dev libsmbclient-dev libspdlog-dev libsqlite3-dev libssl-dev libtag1-dev libtiff5-dev libtinyxml-dev libtool libudev-dev libva-dev libvdpau-dev libvorbis-dev libxmu-dev libxrandr-dev libxslt1-dev libxt-dev lsb-release meson nasm ninja-build python3-dev python3-pil python3-pip rapidjson-dev swig unzip uuid-dev yasm zip zlib1g-dev ``` **WARNING:** Make sure you copy paste the entire line or you might receive an error or miss a few dependencies. @@ -123,7 +126,7 @@ If you're using Ubuntu 16.04, you also need to install: sudo apt install libcec4-dev libfmt3-dev liblircclient-dev ``` -If you're using Ubuntu 18.04, you also need to install: +If you're using Ubuntu 18.04 and later, you also need to install: ``` sudo apt install libcec-dev libfmt-dev liblirc-dev ``` @@ -145,6 +148,28 @@ sudo apt install doxygen libcap-dev libsndio-dev libmariadbd-dev **[back to top](#table-of-contents)** +### 3.3 Ubuntu <= 18.04 +Ubuntu 18.04 and lower ship an outdated [Meson](https://mesonbuild.com/) and [nasm](https://nasm.us/) package. +In order to compile Kodi with AV1 support, you have to manually update both Meson and nasm. + +> This is a requirement by the [dav1d](https://code.videolan.org/videolan/dav1d) AV1 decoder used in ffmpeg. + +#### Meson +``` +pip3 install --user meson +``` + +Make sure `~/.local/bin` is in your PATH. + +Verify your Meson version by running `meson -v`. The version displayed should be >= 0.47.0. + +#### nasm (x86_64 / amd64) +``` +wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/n/nasm/nasm_2.14-1_amd64.deb && sudo apt install ./nasm_2.14-1_amd64.deb +``` + +Verify your nasm version by running `nasm -v`. The version displayed should be >= 2.14. + ## 4. Build Kodi See the general **[Linux build guide](README.Linux.md)** for reference. diff --git a/docs/README.Windows.md b/docs/README.Windows.md index 88bc763f57..19e0688f4b 100644 --- a/docs/README.Windows.md +++ b/docs/README.Windows.md @@ -50,7 +50,7 @@ To build Kodi: * **[Git for Windows](https://gitforwindows.org/)** * **[Java Runtime Environment (JRE)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)** * **[Nullsoft scriptable install system (NSIS)](http://nsis.sourceforge.net/Download)** (Only needed if you want to generate an installer file) -* **[Visual Studio 2017](https://www.visualstudio.com/downloads/)** (Community Edition is fine) +* **[Visual Studio 2017](https://visualstudio.microsoft.com/vs/older-downloads/)** (Community Edition is fine) To run Kodi you need a relatively recent CPU with integrated GPU or discrete GPU with up-to-date graphics device-drivers installed from the manufacturer's website. * **[AMD](https://support.amd.com/en-us/download)** @@ -68,7 +68,7 @@ All install screens should remain at their default values with the exception of ### JRE install notes Default options are fine. -After install finishes, add java's executable file path to your `PATH` **[environment variable](http://www.java.com/en/download/help/path.xml)**. Should be similar to `C:\Program Files\Java\jre-10\bin`. +After install finishes, add java's executable file path to your `PATH` **[environment variable](http://www.java.com/en/download/help/path.xml)**. Should be similar to `C:\Program Files (x86)\Java\jre1.8.0_251\bin`. ### NSIS install notes Default options are fine. @@ -77,17 +77,17 @@ Default options are fine. Start the VS2017 installer and click `Individual components`. * Under **Compilers, build tools and runtimes** select * `Msbuild` - * `VC++ 2017 v141 toolset (x86,x64)` + * `VC++ 2017 version 15.x v14.x latest v141 tools` * `Visual C++ 2017 Redistributable Update` - * `Visual C++ compilers and libraries for ARM` - * `Visual C++ compilers and libraries for ARM64` - * `Visual C++ runtime for UWP` + * `Visual C++ compilers and libraries for ARM` (if compiling for ARM or UWP) + * `Visual C++ compilers and libraries for ARM64` (if compiling for ARM64 or UWP) + * `Visual C++ runtime for UWP` (if compiling for UWP) * `Windows Universal CRT SDK` * Under **Development activities** select * `Visual Studio C++ core features` * Under **SDKs, libraries, and frameworks** select - * `Windows 10 SDK (10.0.16299.0) for Desktop C++ [x86 and x64]` - * `Windows 10 SDK (10.0.17763.0) for UWP: C++` + * `Windows 10 SDK (10.0.x.0) for Desktop C++ [x86 and x64]` + * `Windows 10 SDK (10.0.x.0) for UWP: C++` Hit `Install`. Yes, it will download and install almost 7GB of stuff. @@ -239,4 +239,3 @@ UWP builds generate `appx`, `appxsym` and `cer` files, located inside directorie **[back to top](#table-of-contents)** | **[back to section top](#6-build-kodi-manually)** - diff --git a/docs/README.iOS.md b/docs/README.iOS.md index 84d584e40f..da03618f55 100644 --- a/docs/README.iOS.md +++ b/docs/README.iOS.md @@ -1,18 +1,19 @@  # iOS build guide -This guide has been tested with macOS 10.13.4()17E199 High Sierra and Xcode 9.3(9E145). It is meant to cross-compile Kodi for iOS using **[Kodi's unified depends build system](../tools/depends/README.md)**. Please read it in full before you proceed to familiarize yourself with the build procedure. +This guide has been tested with macOS 10.13.4(17E199) High Sierra and 10.14.4(18E226) Mojave on Xcode 9.4.1(9F2000) and Xcode 10.2(10E125). It is meant to cross-compile Kodi for iOS using **[Kodi's unified depends build system](../tools/depends/README.md)**. Please read it in full before you proceed to familiarize yourself with the build procedure. ## Table of Contents 1. **[Document conventions](#1-document-conventions)** 2. **[Prerequisites](#2-prerequisites)** 3. **[Get the source code](#3-get-the-source-code)** 4. **[Configure and build tools and dependencies](#4-configure-and-build-tools-and-dependencies)** -5. **[Build binary add-ons](#5-build-binary-add-ons)** +5. **[Build binary add-ons](#5-build-binary-add-ons)** + 5.1. **[Independent Add-on building](#51-Independent-Add-on-building)** + 5.2. **[Xcode project building](#52-Xcode-project-building)** 6. **[Build Kodi](#6-build-kodi)** - 6.1. **[Build with Xcode](#61-build-with-xcode)** - 6.2. **[Build with xcodebuild](#62-build-with-xcodebuild)** - 6.3. **[Build with make](#63-build-with-make)** + 6.1. **[Generate Project Files](#61-Generate-Project-Files)** + 6.2. **[Build with Xcode](#62-build)** 7. **[Package](#7-package)** 8. **[Install](#8-install)** 9. **[Gesture Handling](#9-gesture-handling)** @@ -53,13 +54,11 @@ Several different strategies are used to draw your attention to certain pieces o ## 2. Prerequisites * **[Java Development Kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)** * **[Xcode](https://developer.apple.com/xcode/)**. Install it from the AppStore or from the **[Apple Developer Homepage](https://developer.apple.com/)**. -* Device with **iOS 9.0 or newer** to install Kodi after build. +* Device with **iOS 11.0 or newer** to install Kodi after build. Building for iOS should work with the following constellations of Xcode and macOS versions: - * Xcode 8.x against iOS SDK 10.x on 10.11.x (El Capitan)(recommended) - * Xcode 8.x against iOS SDK 10.x on 10.12.x (Sierra)(recommended) - * Xcode 9.x against iOS SDK 11.x on 10.12.x (Sierra) * Xcode 9.x against iOS SDK 11.x on 10.13.x (High Sierra)(recommended) + * Xcode 9.x against iOS SDK 11.x on 10.14.x (Mojave)(recommended) **WARNING:** Start Xcode after installation finishes. You need to accept the licenses and install missing components. @@ -79,25 +78,17 @@ git clone https://github.com/xbmc/xbmc kodi **[back to top](#table-of-contents)** ## 4. Configure and build tools and dependencies -Kodi can be built as either a 32bit or 64bit program. The dependencies are built in `$HOME/kodi/tools/depends` and installed into `/Users/Shared/xbmc-depends`. +Kodi can be built as a 64bit program for iOS. The dependencies are built in `$HOME/kodi/tools/depends` and installed into `/Users/Shared/xbmc-depends`. **TIP:** Look for comments starting with `Or ...` and only execute the command(s) you need. -Configure build for 64bit (**recommended**): +Configure build: ``` cd $HOME/kodi/tools/depends ./bootstrap -./configure --host=arm-apple-darwin --with-cpu=arm64 +./configure --host=aarch64-apple-darwin ``` -Or configure build for 32bit: -``` -cd $HOME/kodi/tools/depends -./bootstrap -./configure --host=arm-apple-darwin --with-sdk=9.3 -``` -**WARNING:** iOS SDK 11 no longer supports 32bit. - Build tools and dependencies: ``` make -j$(getconf _NPROCESSORS_ONLN) @@ -107,16 +98,19 @@ make -j$(getconf _NPROCESSORS_ONLN) **WARNING:** Look for the `Dependencies built successfully.` success message. If in doubt run a single threaded `make` command until the message appears. If the single make fails, clean the specific library by issuing `make -C target/<name_of_failed_lib> distclean` and run `make`again. -**NOTE:** **Advanced developers** may want to specify an iOS SDK version (if multiple versions are installed) in the configure line(s) shown above. The example below would use the iOS SDK 9.0: +**NOTE:** **Advanced developers** may want to specify an iOS SDK version (if multiple versions are installed) in the configure line(s) shown above. The example below would use the iOS SDK 11.0: ``` -./configure --host=arm-apple-darwin --with-cpu=arm64 --with-sdk=9.0 +./configure --host=aarch64-apple-darwin --with-sdk=11.0 ``` **[back to top](#table-of-contents)** | **[back to section top](#4-configure-and-build-tools-and-dependencies)** ## 5. Build binary add-ons + You can find a complete list of available binary add-ons **[here](https://github.com/xbmc/repo-binary-addons)**. +## 5.1. Independent Add-on building + Change to Kodi's source code directory: ``` cd $HOME/kodi @@ -137,75 +131,92 @@ Build a specific group of add-ons: make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons ADDONS="pvr.*" ``` +## 5.2. Xcode project building + +Binary addons will be built as a dependency in the Xcode project. You can choose the addons +you wish to build during the Xcode project generation step + +Generate Xcode project to build specific add-ons: +```sh +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DENABLE_XCODE_ADDONBUILD=ON -DADDONS_TO_BUILD='audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu'" +``` + +Generate Xcode project to build a specific group of add-ons: +```sh +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DENABLE_XCODE_ADDONBUILD=ON -DADDONS_TO_BUILD='pvr.*'" +``` + +**TIP:** When using addontype.* for -DADDONS_TO_BUILD argument, you cannot have multiple +addon types. ie -DADDONS_TO_BUILD='game.libretro.* peripheral.*' is not valid. You will +need to individually list the addons as per the first example for specific addon building. + +Generate Xcode project to build all add-ons automatically: +```sh +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DENABLE_XCODE_ADDONBUILD=ON" +``` + +**TIP:** If you wish to not automatically build addons added to your xcode project, omit +`-DENABLE_XCODE_ADDONBUILD=ON`. The target will be added to the project, but the dependency + will not be set to automatically build +**TIP:** Binary add-ons added to the generated Xcode project can be built independently of +the Kodi app by selecting the scheme/target `binary-addons` in the Xcode project. +You can also build the binary-addons target via xcodebuild. This will not build the Kodi +App, but will build any/all binary addons added for the project Generation. +```sh +xcodebuild -config "Debug" -target binary-addons +``` + **[back to top](#table-of-contents)** ## 6. Build Kodi + +## 6.1. Generate Project Files + Before you can use Xcode to build Kodi, the Xcode project has to be generated with CMake. CMake is built as part of the dependencies and doesn't have to be installed separately. A toolchain file is also generated and is used to configure CMake. -### 6.1. Build with Xcode Create an out-of-source build directory: ``` mkdir $HOME/kodi-build ``` - -Change to build directory: +Generate Xcode project as per configure command in **[Configure and build tools and dependencies](#4-configure-and-build-tools-and-dependencies)**: ``` -cd $HOME/kodi-build +make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build ``` -Generate Xcode project for ARM 64bit (**recommended**): -``` -/Users/Shared/xbmc-depends/x86_64-darwin17.5.0-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/iphoneos11.3_arm64-target-debug/share/Toolchain.cmake ../kodi -``` +**TIP:** BUILD_DIR can be omitted, and project will be created in $HOME/kodi/build +Change all relevant paths onwards if omitted. + +Additional cmake arguments can be supplied via the CMAKE_EXTRA_ARGUMENTS command line variable -Or generate Xcode project for ARM 32bit: +Alternatively: +` +Generate Xcode project for ARM 64bit (**recommended**): ``` -/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 ../kodi +cd $HOME/kodi-build +/Users/Shared/xbmc-depends/x86_64-darwin17.5.0-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/iphoneos11.3_arm64-target-debug/share/Toolchain.cmake $HOME/kodi ``` -**WARNING:** The toolchain file location differs depending on your iOS and SDK version. You have to replace `x86_64-darwin15.6.0-native` and `iphoneos11.3_arm64-target-debug` or `iphoneos9.3_armv7-target` in the paths above with the correct ones on your system. +**WARNING:** The toolchain file location differs depending on your iOS and SDK version. You have to replace `x86_64-darwin15.6.0-native` and `iphoneos11.3_arm64-target-debug` in the paths above with the correct ones on your system. You can check `Users/Shared/xbmc-depends` directory content with: ``` ls -l /Users/Shared/xbmc-depends ``` +## 6.2 Build **Start Xcode, open the Kodi project file** (`kodi.xcodeproj`) located in `$HOME/kodi-build` and hit `Build`. **WARNING:** If you have selected a specific iOS SDK Version in step 4 then you might need to adapt the active target to use the same iOS SDK version, otherwise build will fail. Be sure to select a device configuration. Building for simulator is not supported. -### 6.2. Build with xcodebuild -Alternatively, you can also build via Xcode from the command-line with `xcodebuild`, triggered by CMake: - -Change to build directory: -``` -cd $HOME/kodi-build -``` +**Alternatively**, you can also build via Xcode from the command-line with `xcodebuild`: Build Kodi: ``` -/Users/Shared/xbmc-depends/x86_64-darwin17.5.0-native/bin/cmake --build . --config "Debug" -- -verbose -jobs $(getconf _NPROCESSORS_ONLN) -``` - -**TIP:** You can specify `Release` instead of `Debug` as `--config` parameter. - -### 6.3. Build with make -CMake is also able to generate makefiles that can be used to build with make. - -Change to Kodi's source code directory: -``` -cd $HOME/kodi -``` - -Generate makefiles: -``` -make -C tools/depends/target/cmakebuildsys +cd $HOME/kodi-build +xcodebuild -config "Debug" -jobs $(getconf _NPROCESSORS_ONLN) ``` -Build Kodi: -``` -make -j$(getconf _NPROCESSORS_ONLN) -C build -``` +**TIP:** You can specify Release instead of Debug as -config parameter. **[back to top](#table-of-contents)** | **[back to section top](#6-build-kodi)** @@ -213,14 +224,15 @@ make -j$(getconf _NPROCESSORS_ONLN) -C build CMake generates a target called `deb` which will package Kodi ready for distribution. After Kodi has been built, the target can be triggered by selecting it in Xcode active scheme or manually running ``` -cd $HOME/kodi-build/build -/Users/Shared/xbmc-depends/x86_64-darwin17.5.0-native/bin/cmake --build . --target "deb" --config "Debug" +cd $HOME/kodi-build +xcodebuild -target deb ``` -Alternatively, if you built using makefiles issue: +**Alternatively** + ``` -cd $HOME/kodi/build -make deb +cd $HOME/kodi-build +/Users/Shared/xbmc-depends/x86_64-darwin17.5.0-native/bin/cmake --build . --target "deb" --config "Debug" ``` **[back to top](#table-of-contents)** diff --git a/docs/README.macOS.md b/docs/README.macOS.md index 34bad23a38..1138651018 100644 --- a/docs/README.macOS.md +++ b/docs/README.macOS.md @@ -55,11 +55,9 @@ Several different strategies are used to draw your attention to certain pieces o ## 2. Prerequisites * **[Java Development Kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)** * **[Xcode](https://developer.apple.com/xcode/)**. Install it from the AppStore or from the **[Apple Developer Homepage](https://developer.apple.com/)**. -* Device with **OSX 10.9 or newer** to run Kodi after build. +* Device with **OSX 10.13 or newer** to run Kodi after build. Building for OSX/macOS should work with the following constellations of Xcode and OSX/macOS versions: - * Xcode 8.x on OSX 10.11.x (El Capitan) - * Xcode 9.x on OSX 10.12.x (Sierra) * Xcode 9.x on macOS 10.13.x (High Sierra) **WARNING:** Start Xcode after installation finishes. You need to accept the licenses and install missing components. @@ -84,20 +82,13 @@ Kodi can be built as either a 32bit or 64bit program. The dependencies are built **TIP:** Look for comments starting with `Or ...` and only execute the command(s) you need. -Configure build for 64bit (**recommended**): +Configure build: ``` cd $HOME/kodi/tools/depends ./bootstrap ./configure --host=x86_64-apple-darwin ``` -Or configure build for 32bit: -``` -cd $HOME/kodi/tools/depends -./bootstrap -./configure --host=i386-apple-darwin -``` - Build tools and dependencies: ``` make -j$(getconf _NPROCESSORS_ONLN) @@ -107,9 +98,9 @@ make -j$(getconf _NPROCESSORS_ONLN) **WARNING:** Look for the `Dependencies built successfully.` success message. If in doubt run a single threaded `make` command until the message appears. If the single make fails, clean the specific library by issuing `make -C target/<name_of_failed_lib> distclean` and run `make`again. -**NOTE:** **Advanced developers** may want to specify an SDK version (if multiple versions are installed) in the configure line(s) shown above. The example below would use SDK 10.9: +**NOTE:** **Advanced developers** may want to specify an SDK version (if multiple versions are installed) in the configure line(s) shown above. The example below would use SDK 10.13: ``` -./configure --host=x86_64-apple-darwin --with-sdk=10.9 +./configure --host=x86_64-apple-darwin --with-sdk=10.13 ``` **[back to top](#table-of-contents)** | **[back to section top](#4-configure-and-build-tools-and-dependencies)** @@ -151,23 +142,29 @@ Create an out-of-source build directory: ``` mkdir $HOME/kodi-build ``` +Generate Xcode project as per configure command in **[Configure and build tools and dependencies](#4-configure-and-build-tools-and-dependencies)**: +``` +make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build GEN=Xcode +``` + +**TIP:** BUILD_DIR can be omitted, and project will be created in $HOME/kodi/build +Change all relevant paths onwards if omitted. + +Additional cmake arguments can be supplied via the CMAKE_EXTRA_ARGUMENTS command line variable + +**Alternatively** Change to build directory: ``` cd $HOME/kodi-build ``` -Generate Xcode project for 64bit (**recommended**): +Generate Xcode project: ``` /Users/Shared/xbmc-depends/x86_64-darwin17.5.0-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/macosx10.13_x86_64-target-debug/share/Toolchain.cmake ../kodi ``` -Or generate Xcode project for 32bit: -``` -/Users/Shared/xbmc-depends/x86_64-darwin17.5.0-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/macosx10.13_i386-target-debug/share/Toolchain.cmake ../kodi -``` - -**WARNING:** The toolchain file location differs depending on SDK version. You have to replace `x86_64-darwin17.5.0-native` and `macosx10.13_x86_64-target-debug` or `macosx10.13_i386-target-debug` in the paths above with the correct ones on your system. +**WARNING:** The toolchain file location differs depending on SDK version. You have to replace `x86_64-darwin17.5.0-native` and `macosx10.13_x86_64-target-debug` in the paths above with the correct ones on your system. You can check `Users/Shared/xbmc-depends` directory content with: ``` @@ -181,11 +178,16 @@ ls -l /Users/Shared/xbmc-depends ### 6.2. Build with xcodebuild Alternatively, you can also build via Xcode from the command-line with `xcodebuild`, triggered by CMake: -Change to build directory: +Build Kodi: ``` cd $HOME/kodi-build +xcodebuild -config "Debug" -jobs $(getconf _NPROCESSORS_ONLN) ``` +**TIP:** You can specify Release instead of Debug as -config parameter. + +**Alternatively** + Build Kodi: ``` /Users/Shared/xbmc-depends/x86_64-darwin17.5.0-native/bin/cmake --build . --config "Debug" -- -verbose -jobs $(getconf _NPROCESSORS_ONLN) @@ -206,6 +208,12 @@ Generate makefiles: make -C tools/depends/target/cmakebuildsys ``` +**TIP:** BUILD_DIR can be provided as an argument to cmakebuildsys. This allows you to provide an alternate build location. Change all paths onwards as required if BUILD_DIR option used. +``` +mkdir $HOME/kodi-build +make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build +``` + Build Kodi: ``` make -j$(getconf _NPROCESSORS_ONLN) -C build @@ -239,6 +247,11 @@ $HOME/kodi/build/kodi.bin CMake generates a target called `dmg` which will package Kodi ready for distribution. After Kodi has been built, the target can be triggered by selecting it in Xcode active scheme or manually running ``` +cd $HOME/kodi-build +xcodebuild -target dmg +```` +**OR** +``` cd $HOME/kodi-build/build /Users/Shared/xbmc-depends/x86_64-darwin17.5.0-native/bin/cmake --build . --target "dmg" --config "Debug" ``` diff --git a/docs/README.md b/docs/README.md index 7a3be8f866..3c033f8435 100644 --- a/docs/README.md +++ b/docs/README.md @@ -9,15 +9,16 @@ If you haven't done so, we encourage you to read our **[contributing guide](CONT Kodi uses CMake as its building system but instructions are highly dependent on your operating system and target platform. Choose your platform below and read the guide carefully before proceeding. <p align="center"> - <a href="README.Android.md" title="Android"><img src="resources/android.svg" height="84"></a> - <a href="README.Fedora.md" title="Fedora"><img src="resources/fedora.svg" height="84"></a> - <a href="README.FreeBSD.md" title="FreeBSD"><img src="resources/freebsd.svg" height="84"></a> - <a href="README.iOS.md" title="iOS"><img src="resources/ios.svg" height="84"></a> - <a href="README.Linux.md" title="Linux"><img src="resources/linux.svg" height="84"></a> - <a href="README.macOS.md" title="macOS"><img src="resources/macos.svg" height="84"></a> - <a href="README.openSUSE.md" title="openSUSE"><img src="resources/opensuse.svg" height="84"></a> - <a href="README.RaspberryPi.md" title="Raspberry Pi"><img src="resources/raspberrypi.svg" height="84"></a> - <a href="README.Ubuntu.md" title="Ubuntu"><img src="resources/ubuntu.svg" height="84"></a> - <a href="README.Windows.md" title="Windows"><img src="resources/windows.svg" height="84"></a> + <a href="README.Android.md" title="Android"><img src="resources/android.svg" height="78"></a> + <a href="README.Fedora.md" title="Fedora"><img src="resources/fedora.svg" height="78"></a> + <a href="README.FreeBSD.md" title="FreeBSD"><img src="resources/freebsd.svg" height="78"></a> + <a href="README.iOS.md" title="iOS"><img src="resources/ios.svg" height="78"></a> + <a href="README.Linux.md" title="Linux"><img src="resources/linux.svg" height="78"></a> + <a href="README.macOS.md" title="macOS"><img src="resources/macos.svg" height="78"></a> + <a href="README.openSUSE.md" title="openSUSE"><img src="resources/opensuse.svg" height="78"></a> + <a href="README.RaspberryPi.md" title="Raspberry Pi"><img src="resources/raspberrypi.svg" height="78"></a> + <a href="README.tvOS.md" title="tvOS"><img src="resources/tvos.svg" height="78"></a> + <a href="README.Ubuntu.md" title="Ubuntu"><img src="resources/ubuntu.svg" height="78"></a> + <a href="README.Windows.md" title="Windows"><img src="resources/windows.svg" height="78"></a> </p> diff --git a/docs/README.openSUSE.md b/docs/README.openSUSE.md index 5e8e8d71db..f33975918b 100644 --- a/docs/README.openSUSE.md +++ b/docs/README.openSUSE.md @@ -72,9 +72,11 @@ sudo zypper ref If you get a `package not found` type of message with the below command, remove the offending package(s) from the install list and reissue the command. Take a note of the missing dependencies and, after a successful step completion, **[build the missing dependencies manually](#31-build-missing-dependencies)**. +**NOTE:** Kodi requires a compiler with C++14 support, i.e. gcc >= 4.9 or clang >= 3.4 + Install build dependencies: ``` -sudo zypper install alsa-devel autoconf automake bluez-devel boost-devel capi4linux-devel ccache cmake doxygen flac-devel fribidi-devel fstrcmp-devel gcc gcc-c++ gettext-devel giflib-devel glew-devel gperf java-openjdk libass-devel libavahi-devel libbluray-devel libbz2-devel libcap-devel libcap-ng-devel libcdio-devel libcec-devel libcurl-devel libdvdread-devel libgudev-1_0-devel libidn2-devel libjasper-devel libjpeg-devel liblcms2-devel libmad-devel libmicrohttpd-devel libmodplug-devel libmpeg2-devel libmysqlclient-devel libnfs-devel libogg-devel libpcap-devel libplist-devel libpng12-devel libpulse-devel libsamplerate-devel libsmbclient-devel libtag-devel libtiff-devel libtool libudev-devel libuuid-devel libva-devel libvdpau-devel libvorbis-devel libXrandr-devel libXrender-devel libxslt-devel lirc-devel lzo-devel make Mesa-libEGL-devel Mesa-libGLESv2-devel Mesa-libGLESv3-devel nasm patch pcre-devel python-devel randrproto-devel renderproto-devel shairplay-devel sqlite3-devel swig tinyxml-devel +sudo zypper install alsa-devel autoconf automake bluez-devel boost-devel capi4linux-devel ccache cmake doxygen flac-devel fribidi-devel fstrcmp-devel gcc gcc-c++ gettext-devel giflib-devel glew-devel googletest gperf java-openjdk libass-devel libavahi-devel libbluray-devel libbz2-devel libcap-devel libcap-ng-devel libcdio-devel libcec-devel libcurl-devel libdvdread-devel libgudev-1_0-devel libidn2-devel libjasper-devel libjpeg-devel liblcms2-devel libmad-devel libmicrohttpd-devel libmodplug-devel libmpeg2-devel libmysqlclient-devel libnfs-devel libogg-devel libpcap-devel libplist-devel libpng12-devel libpulse-devel libsamplerate-devel libsmbclient-devel libtag-devel libtiff-devel libtool libudev-devel libuuid-devel libva-devel libvdpau-devel libvorbis-devel libXrandr-devel libXrender-devel libxslt-devel lirc-devel lzo-devel make Mesa-libEGL-devel Mesa-libGLESv2-devel Mesa-libGLESv3-devel nasm patch pcre-devel python3-devel python3-Pillow randrproto-devel renderproto-devel shairplay-devel sqlite3-devel swig tinyxml-devel ``` **WARNING:** Make sure you copy paste the entire line or you might receive an error or miss a few dependencies. diff --git a/docs/README.tvOS.md b/docs/README.tvOS.md index 0b053cf42e..2e938cf40d 100644 --- a/docs/README.tvOS.md +++ b/docs/README.tvOS.md @@ -8,14 +8,21 @@ This guide has been tested with macOS 10.13.4(17E199) High Sierra and 10.14.4(18 2. **[Prerequisites](#2-prerequisites)** 3. **[Get the source code](#3-get-the-source-code)** 4. **[Configure and build tools and dependencies](#4-configure-and-build-tools-and-dependencies)** -5. **[Build binary add-ons](#5-build-binary-add-ons)** -6. **[Build Kodi](#6-build-kodi)** - 6.1. **[Build with Xcode](#61-build-with-xcode)** - 6.2. **[Build with xcodebuild](#62-build-with-xcodebuild)** - 6.3. **[Build with make](#63-build-with-make)** -7. **[Package](#7-package)** -8. **[Install](#8-install)** -9. **[Gesture Handling](#9-gesture-handling)** +5. **[Generate Kodi Build files](#5-Generate-Kodi-Build-files)** + 5.1. **[Generate XCode Project Files](#51-Generate-Xcode-Project-Files)** + 5.2. **[Build with Xcode](#62-build)** +6. **[Build Kodi](#6-build-kodi)** + 6.1. **[Build with Xcode](#61-Build-with-Xcode)** + 6.2. **[Build with xcodebuild](#62-Build-with-xcodebuild)** +7. **[Packaging to distribute as deb](#7-Packaging-to-distribute-as-deb)** + 7.1. **[Package via Xcode](#71-Package-via-Xcode)** + 7.2. **[Package via Xcodebuild](#72-Package-via-Xcodebuild)** +8. **[Signing](#8-Signing)** + 8.1. **[Signing using a developer account](#81-Signing-using-a-developer-account)** + 8.2. **[Using iOS App Signer to install](#82-Using-iOS-App-Signer-to-install)** +9. **[Install](#9-Install)** + 9.1. **[Jailbroken devices](#91-Jailbroken-devices)** + 9.2. **[Using Xcode to install](#92-Using-Xcode-to-install)** ## 1. Document conventions This guide assumes you are using `terminal`, also known as `console`, `command-line` or simply `cli`. Commands need to be run at the terminal, one at a time and in the provided order. @@ -55,8 +62,7 @@ Several different strategies are used to draw your attention to certain pieces o * **[Xcode](https://developer.apple.com/xcode/)**. Install it from the AppStore or from the **[Apple Developer Homepage](https://developer.apple.com/)**. * Device with **tvOS 11.0 or newer** to install Kodi after build. -Building for tvOS should work with the following constellations of Xcode and macOS versions: - * Xcode 9.x against tvOS SDK 11.x on 10.12.x (Sierra) +Building for tvOS should work with the following combinations of Xcode and macOS versions: * Xcode 9.x against tvOS SDK 11.x on 10.13.x (High Sierra)(recommended) * Xcode 9.x against tvOS SDK 11.x on 10.14.x (Mojave)(recommended) * Xcode 10.x against tvOS SDK 12.x on 10.14.x (Mojave)(recommended) @@ -81,13 +87,11 @@ git clone https://github.com/xbmc/xbmc kodi ## 4. Configure and build tools and dependencies Kodi can be built as a 64bit program only for tvOS. The dependencies are built in `$HOME/kodi/tools/depends` and installed into `/Users/Shared/xbmc-depends`. -**TIP:** Look for comments starting with `Or ...` and only execute the command(s) you need. - -Configure build for 64bit: +Configure build: ``` cd $HOME/kodi/tools/depends ./bootstrap -./configure --host=arm-apple-darwin --with-platform=tvos +./configure --host=aarch64-apple-darwin --with-platform=tvos ``` Build tools and dependencies: @@ -101,65 +105,92 @@ make -j$(getconf _NPROCESSORS_ONLN) **NOTE:** **Advanced developers** may want to specify an tvOS SDK version (if multiple versions are installed) in the configure line(s) shown above. The example below would use the tvOS SDK 11.0: ``` -./configure --host=arm-apple-darwin --with-platform=tvos --with-sdk=11.0 +./configure --host=aarch64-apple-darwin --with-platform=tvos --with-sdk=11.0 ``` -**[back to top](#table-of-contents)** | **[back to section top](#4-configure-and-build-tools-and-dependencies)** +**[back to top](#table-of-contents)** -## 5. Build binary add-ons -You can find a complete list of available binary add-ons **[here](https://github.com/xbmc/repo-binary-addons)**. +## 5. Generate Kodi Build files +Before you can use Xcode to build Kodi, the Xcode project has to be generated with CMake. CMake is built as part of the dependencies and doesn't have to be installed separately. A toolchain file is also generated and is used to configure CMake. +Default behaviour will not build binary addons. To add addons to your build go to **[Add Binary Addons to Project](#52-Add-Binary-Addons-to-Project)** -Change to Kodi's source code directory: -``` -cd $HOME/kodi -``` +## 5.1. Generate XCode Project Files -Build all add-ons: -``` -make -C tools/depends/target/binary-addons -``` +Before you can use Xcode to build Kodi, the Xcode project has to be generated with CMake. CMake is built as part of the dependencies and doesn't have to be installed separately. A toolchain file is also generated and is used to configure CMake. -Build specific add-ons: +Create an out-of-source build directory: ``` -make -C tools/depends/target/binary-addons ADDONS="audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu" +mkdir $HOME/kodi-build ``` -Build a specific group of add-ons: +Generate Xcode project for TVOS: ``` -make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons ADDONS="pvr.*" +make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build ``` -**[back to top](#table-of-contents)** +**TIP:** BUILD_DIR can be omitted, and project will be created in $HOME/kodi/build +Change all relevant paths onwards if omitted. -## 6. Build Kodi -Before you can use Xcode to build Kodi, the Xcode project has to be generated with CMake. CMake is built as part of the dependencies and doesn't have to be installed separately. A toolchain file is also generated and is used to configure CMake. +Additional cmake arguments can be supplied via the CMAKE_EXTRA_ARGUMENTS command line variable -### 6.1. Build with Xcode -Create an out-of-source build directory: +An example to set signing settings in xcode project: +```` +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DPLATFORM_BUNDLE_IDENTIFIER='tv.kodi.kodi' -DCODE_SIGN_IDENTITY='iPhone Developer: *** (**********)' -DPROVISIONING_PROFILE_APP='tv.kodi.kodi' -DPROVISIONING_PROFILE_TOPSHELF='tv.kodi.kodi.Topshelf'" +```` +Available Signing arguments + +PLATFORM_BUNDLE_IDENTIFIER - bundle ID (used for the app, top shelf and entitlements) +DEVELOPMENT_TEAM - dev team ID **OR** CODE_SIGN_IDENTITY - certificate name +PROVISIONING_PROFILE_APP - provprofile name for the app +PROVISIONING_PROFILE_TOPSHELF - provprofile name for the top shelf + +## 5.2. Add Binary Addons to Project + +**TIP:** If you wish to add signing settings automatically, look at **[Generate XCode Project Files](#51-Generate-XCode-Project-Files)** for the additional `CMAKE_EXTRA_ARGUMENTS` + +You can find a complete list of available binary add-ons **[here](https://github.com/xbmc/repo-binary-addons)**. + +Binary addons will be built as a dependency in the Xcode project. You can choose the addons you wish to build during the Xcode project generation step + +Generate Xcode project to build specific add-ons: ``` -mkdir $HOME/kodi-build +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DENABLE_XCODE_ADDONBUILD=ON -DADDONS_TO_BUILD='audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu'" ``` -Change to build directory: +Generate Xcode project to build a specific group of add-ons: ``` -cd $HOME/kodi-build +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DENABLE_XCODE_ADDONBUILD=ON -DADDONS_TO_BUILD='pvr.*'" ``` -Generate Xcode project for ARM 64bit (**recommended**): +Generate Xcode project to build all add-ons automatically: ``` -/Users/Shared/xbmc-depends/x86_64-darwin18.5.0-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/appletvos12.2_arm64-target-debug/share/Toolchain.cmake ../kodi +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DENABLE_XCODE_ADDONBUILD=ON" ``` -**WARNING:** The toolchain file location differs depending on your tvOS and SDK version. You have to replace `x86_64-darwin18.5.0-native` and `appletvos12.2_arm64-target-debug` in the paths above with the correct ones on your system. - -You can check `Users/Shared/xbmc-depends` directory content with: +**TIP:** If you wish to not automatically build addons added to your xcode project, omit `-DENABLE_XCODE_ADDONBUILD=ON`. The target will be added to the project, but the dependency will not be set to automatically build +**TIP:** Binary add-ons added to the generated Xcode project can be built independently of the Kodi app by selecting the scheme/target `binary-addons` in the Xcode project. +You can also build the binary-addons target via xcodebuild. This will not build the Kodi App, but will build any/all binary addons added for the project Generation. ``` -ls -l /Users/Shared/xbmc-depends +xcodebuild -config "Debug" -target binary-addons ``` +**[back to top](#table-of-contents)** | **[back to section top](#5-Generate-Kodi-Build-files)** + +## 6. Build + +### 6.1. Build with Xcode + +Start Xcode, open the Kodi project file created in **[Generate Kodi Build files](#5-Generate-Kodi-Build-files)** + +**TIP:** (`kodi.xcodeproj`) is located in `$HOME/kodi-build` -**Start Xcode, open the Kodi project file** (`kodi.xcodeproj`) located in `$HOME/kodi-build`, select `Generic TvOs Device` (or your actual connected device if you have it connected) and hit `Build`. +Once the project has loaded, select `Generic TvOs Device` (or your actual connected device if you have it connected) and hit `Build`. -**WARNING:** If you have selected a specific tvOS SDK Version in step 4 then you might need to adapt the active target to use the same tvOS SDK version, otherwise build will fail. Be sure to select a device configuration. Building for simulator is not supported. +This will create a `Kodi.app` file located in `$HOME/kodi-build/build/Debug-appletvos`. This App can be deployed via Xcode to an AppleTV via `Window -> Devices and Simulators -> Select device and click +` + +**TIP:** If you build as a release target, the location of the `Kodi.app` will be `$HOME/kodi-build/build/Release-appletvos` + +**WARNING:** If you have selected a specific tvOS SDK Version in step 4 then you might need to adapt the active target to use the same tvOS SDK version, otherwise build will fail. Be sure to select a device configuration. +**WARNING:** Building for simulator is NOT supported. ### 6.2. Build with xcodebuild Alternatively, you can also build via Xcode from the command-line with `xcodebuild`, triggered by CMake: @@ -167,68 +198,93 @@ Alternatively, you can also build via Xcode from the command-line with `xcodebui Change to build directory: ``` cd $HOME/kodi-build +xcodebuild -config "Debug" -jobs $(getconf _NPROCESSORS_ONLN) ``` -Build Kodi: -``` -/Users/Shared/xbmc-depends/x86_64-darwin18.5.0-native/bin/cmake --build . --config "Debug" -- -verbose -jobs $(getconf _NPROCESSORS_ONLN) -``` +This will create a `Kodi.app` file located in `$HOME/kodi-build/build/Debug-appletvos`. This App can be deployed via Xcode to an AppleTV via `Window -> Devices and Simulators -> Select device and click +` -**TIP:** You can specify `Release` instead of `Debug` as `--config` parameter. +**TIP:** You can specify Release instead of Debug as -config parameter. +**TIP:** If you build as a release target, the location of the `Kodi.app` will be `$HOME/kodi-build/build/Release-appletvos` -### 6.3. Build with make -CMake is also able to generate makefiles that can be used to build with make. +**[back to top](#table-of-contents)** | **[back to section top](#6-Build)** -Change to Kodi's source code directory: -``` -cd $HOME/kodi -``` +## 7. Packaging to distribute as deb +CMake generates a target called `deb` which will package Kodi ready for distribution. After Kodi has been built, the target can be triggered by selecting it in Xcode active scheme or manually running -Generate makefiles: -``` -make -C tools/depends/target/cmakebuildsys -``` +## 7.1. Package via Xcode -Build Kodi: -``` -make -j$(getconf _NPROCESSORS_ONLN) -C build -``` +Start Xcode, open the Kodi project file created in **[Generate XCode Project Files](#51-Generate-Project-Files)** -**[back to top](#table-of-contents)** | **[back to section top](#6-build-kodi)** +**TIP:** (`kodi.xcodeproj`) is located in `$HOME/kodi-build` -## 7. Package -CMake generates a target called `deb` which will package Kodi ready for distribution. After Kodi has been built, the target can be triggered by selecting it in Xcode active scheme or manually running +Click on `Product` in the top menu bar, and then go to `Scheme`, then select `deb` + +Hit `Build` +**TIP:** The generated package will be located at $HOME/kodi-build/tools/darwin/packaging/tvos. + +## 7.2. Package via Xcodebuild + +Change to build directory: ``` cd $HOME/kodi-build -/Users/Shared/xbmc-depends/x86_64-darwin18.5.0-native/bin/cmake --build . --target "deb" --config "Debug" +xcodebuild -target deb ``` -The generated package will be located at $HOME/kodi-build/tools/darwin/packaging/tvos. +**TIP:** The generated package will be located at $HOME/kodi-build/tools/darwin/packaging/tvos. -Alternatively, if you built using makefiles issue: -``` -cd $HOME/kodi/build -make deb -``` +**[back to top](#table-of-contents)** + +## 8. Signing + +**TIP:** If your device is jailbroken, you can go direct to **[Installing on Jailbroken Device](#91-Jailbroken-devices)** + +## 8.1. Signing using a developer account + +For this to work you need to alter the Xcode project by setting your codesign identity or supplying credentials during +xcode generation. +Note that using a free developer account the signing will need to be reapplied every 7 days. + + 1. Open the Xcode project in Xcode as above (requires Xcode 7 or later) + 2. Select Xcode->Preferences and select Accounts + * Hit the + sign to add an Apple ID account and Login. + 2. Next select the kodi build target + 3. Under the `General` tab, enter a unique bundle identifier and check the box to `Automatically Manage Signing`. + 4. Select your team under `Automatically Manage Signing`. + +## An important note on Code Signing +It's also important that you select the signing on all 4 spots in the project settings. After the last buildstep, our support script will do a full sign of all binaries and bundle them with the given identity, including all the `*.viz`, `*.pvr`, `*.so`, etc. files Xcode doesn't know anything about. This should allow you to deploy Kodi to all non-jailbroken devices the same way you 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. + +## 8.2. Using iOS App Signer to install + + 1. Build the deb target via xcodebuild or Xcode as per **[Build Kodi](#6-build-kodi)** + 2. Open iOS Appsigner + 3. Browse to $HOME/kodi/build/tools/darwin/packaging/tvos for your input file + 4. Select your signing certificate + 5. Select your provisioning profile + 6. Click start and select save location for the ipa file + 7. Run Xcode -> Window -> Devices and Simulators + 8. Select your Apple TV you setup in earlier for Wireless connecting press the + + 9. Find your ipa file and click open. **[back to top](#table-of-contents)** -## 8. Install +## 9. Install -There are a few different methods that can be used to install kodi on an AppleTV 4/4K. +There are a number of different methods that can be used to install kodi on an AppleTV 4/4K. -### Jailbroken devices -On jailbroken devices the resulting deb file can be copied to the tvOS device via *ssh/scp* and installed manually. You need to SSH into the tvOS device and issue: +## 9.1. Jailbroken devices +On jailbroken devices the resulting deb file created from **[Packaging to distribute as deb](#7-Packaging-to-distribute-as-deb)** can be copied to the tvOS device via *ssh/scp* and installed manually. You need to SSH into the tvOS device and issue: ``` dpkg -i <name of the deb file> ``` -### Using Code Signing instead +## 9.2. Using Xcode to install Whether you have paid or free developer account you can deploy Kodi via Xcode to work on a non-jailbroken devices. -#### Wirelessly connecting to AppleTV 4/4K +## Wirelessly connecting to AppleTV 4/4K The Apple TV 4K cannot be connected to mac via a cable so the connection must be wireless to XCode to add the application. 1. Make sure your Mac and your Apple TV are on the same network. @@ -239,38 +295,10 @@ The Apple TV 4K cannot be connected to mac via a cable so the connection must be 6. Enter the verification code displayed on your AppleTV into the Device window pane for the device and click Connect. Xcode sets up the Apple TV for wireless debugging and pairs with the device. - -#### Signing using a paid developer accounts -For this to work you need to alter the Xcode project by setting your codesign identity. - -#### Signing using a free developer account - -Note that using a free developer account the signing will need to be reapplied every 7 days. - - 1. Open the Xcode project in Xcode as above (requires Xcode 7 or later) - 2. Select Xcode->Preferences and select Accounts - * Hit the + sign to add an Apple ID accoumt and Login. - 2. Next select the kodi build target - 3. Under the `General` tab, enter a unique bundle identifer and check the box to `Automatically Manage Signing`. - 4. Select your team under `Automatically Manage Signing`. - -#### An important note on Code Signing -It's also important that you select the signing on all 4 spots in the project settings. After the last buildstep, our support script will do a full sign of all binaries and bundle them with the given identity, including all the `*.viz`, `*.pvr`, `*.so`, etc. files Xcode doesn't know anything about. This should allow you to deploy Kodi to all non-jailbroken devices the same way you 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. - -### Installing on AppleTV -There are two options for deplying to your AppleTV 4/4K. The first is just by using Run in XCode for a debugging sessions. - -Note that if you get a App Verification Failed error message when trying to to use `Run` you can delete two files in the created Kodi.app. - - * `rm -rf $HOME/kodi-build/build/Debug-appletvos/Kodi.app/_CodeSignature` - * `rm -f $HOME/kodi-build/build/Debug-appletvos/Kodi.app/embedded.*provision` - -The alternative is to deploy the output of the `deb` target. To do this: +Once your Apple TV has been connected in Xcode, you can deploy either the **[Deb](#7-Packaging-to-distribute-as-deb)** or **[App](#6-Build file)** file. 1. Choose Window > Devices and Simulators, then in the window that appears, click Devices. 2. On your Mac, select the Apple TV in the Devices pane. 3. Click the + symbol under `installed apps` and navigate to and select: `$HOME/kodi-build/build/Debug-appletvos/Kodi.app` and then `Open`. **[back to top](#table-of-contents)** - diff --git a/docs/codeofconduct/CodeOfConduct.md b/docs/codeofconduct/CodeOfConduct.md new file mode 100644 index 0000000000..856ed56132 --- /dev/null +++ b/docs/codeofconduct/CodeOfConduct.md @@ -0,0 +1,196 @@ +# **Code of Kodi** + +## **Introduction:** + +- This document should hopefully be entirely common sense and how most + people would normally act anyway. +- In an ideal world it would be entirely unnecessary, but with the impersonal + nature of internet communications and with differing viewpoints on certain + sensitive topics, some guidelines have proven to be necessary at times. + +## **Our Aims:** + +- Our primary aim is to make Kodi the best open source media player + product that it can be. + +- To achieve this, we aim to create a supportive, welcoming and + open team environment where anyone can participate and submit code or + time/knowledge to help improve things. + +- Our team environment should be welcoming and safe, free of + harassment, discrimination and undesirable behaviour to individual + or groups of members. + +- Whilst we do not expect everyone to get along and agree all of the + time, we do expect people to be civil and professional to one + another. + +## **Our Expectations:** + +1. Contributions from anyone are welcome, and should be encouraged. + Where criticism or correction is needed, try to make it respectful, + constructive, supportive and positive. + +1. Contributors should act in the best interest of the community and of + the Kodi project. + +1. We're all volunteers -- people will give whatever time and effort + they wish to. No-one should be made to do anything they don't want + to. + +1. Discrimination, harassment, threatening/bullying behaviour, trolling + or insulting/derogatory language will not be tolerated in any form + via any Kodi channel or site. + +1. Respect the contribution and efforts of others -- treat them as + you'd like them to treat you. + +1. Publication and sharing of confidential information, both relating + to Kodi and to individual's personal data, is only by explicit permission + of the relevant information owner and person(s) concerned, as applicable. + +1. Work on Kodi is a team effort. + Individual contributions are highly appreciated and to be respected, + but they do not empower those contributors to make decisions + affecting the overall management of the project. + +1. If you are a team member, you may have the title of "Team Kodi Member" + (or variants thereof) in environments like the Kodi forum. You are of + course free to state your own opinions on topics, but for more + controversial ones, please ensure to explicitly state that what you + post is your own opinion and not that of the team or the project. + +1. Discussions, debate and disagreement are a natural part of a working + team. Account should be taken though for the impersonal nature of + internet discussions, and for things like language and cultural + norms. Don't be too quick to assume ill intent or to take offense, + and respect people's boundaries and feelings. + +1. Where you can, be helpful to fellow contributors and share your + knowledge and skills. We all have to start somewhere, and they may + be able to return the favour later or contribute more fully as a + result. + +1. No-one is perfect -- tolerate honest mistakes that may be made, + learn from them and help to repair them when you can. And if they're + yours, be honest about them and apologise. + +1. Submitted code and other important documentation will be peer + reviewed. Comments, suggestions and constructive criticism should be + taken with good grace and not as a slight or insult to the work and + effort put in. + +1. There is an over-riding principle that accepted work, postings or commits + should not be reverted, edited or otherwise rejected without discussion + with the original author. + + Recognising that changes do sometimes need to be made (for example, code + commits which break master compilation or simple typos that shouldn't be + left and forgotten), a reasonable attempt - reflecting the spirit of the + change/reversion - should be made to liaise with the original author prior + to making any modifications. If this isn't practical, it is considered good + practice to appropriately peer review any potential changes prior to + application to minimise risks of further breakage. + +1. In case of dispute the working group or the board should be asked + to mediate. + +## **Scope:** + +- This code covers all services supplied by and used by Team Kodi, + such as: + + - The official GitHub repos. + + - The Kodi forum. + + - The Kodi wiki. + + - The Kodi Slack and IRC channels. + + - Official Kodi social media channels. + + - Devcon. + +- Anyone who contributes to the Kodi project on any of these channels + is expected to abide by this code. + +## **Enforcement:** + +- Violations of this code which cannot be dealt with by simple + discussion should be reported to the working group via conduct@kodi.tv . + The group will then review the issue and mediate between the parties involved. + +- The identity of the reporter and where appropriate the nature of the issue + should remain confidential and be handled with care and sensitivity. + +- The procedure upon receiving a report should be: + + 1. The group should review the report, and any member directly + involved or having a vested interest in the outcome should + recuse themselves. + + 1. Any public disputes or discussions should be brought to a close + with a clear statement that the issue is under review, and that + any further 3rd party comment should be directed to the group + via the group email address. + + 1. All individuals concerned with the issue will be contacted + privately and an attempt made to clarify their individual + viewpoints and concerns. Particular emphasis on identifying and + resolving any misunderstandings, mistranslations or + misinterpretations will be made. + + 1. In case of such identifications, the group will attempt to + mediate between the parties involved to resolve the problem if + possible. + + 1. The behaviour of all parties involved will be reviewed, and in + cases where the code has been broken (e.g. harassment, + discrimination or aggression) further action will be discussed + against the individual(s) concerned. + + 1. This action will depend on the severity of the transgression and + on the history of the individual. Some guidelines for + appropriate measures for team members are: + + - First offence -- a warning. + + - Second offence -- loss of privileges for a week. + + - Third offence -- loss of privileges for a month. + + - Fourth offence -- permanent revoking of privileges. + + - Final offence -- banning from all Kodi services. + + - Privileges will depend on the nature of the issue, but may + include team membership, GitHub repo push access, forum + moderator powers, wiki account access and social media + account access. + + For individuals that are not members of Team Kodi, there are no + privileges that could be revoked. Appropriate measures therefore + include warnings and revoking access to services such as the + forum or the `xbmc` organization on GitHub temporarily or + permanently. + +## **Stakeholders:** + +- *Kodi Foundation Board* -- the elected five directors and management + of the XBMC Foundation. + +- *Working Group* -- the team assigned by the board to create this + document and to oversee its administration. + +- *Contributors* -- volunteers who give input into the upkeep and + improvement of Kodi and its community, be they Team Members or + interested third parties. This includes both code and posts made to + the forum, the wiki or on official social media channels. + +## **Related Documents:** + +- [Forum rules](https://kodi.wiki/view/Official:Forum_rules) +- [Moderation rules (the basics)](https://github.com/xbmc/xbmc/blob/master/docs/codeofconduct/ModerationRules.md) +- [Moderator guidelines](https://github.com/xbmc/xbmc/blob/master/docs/codeofconduct/ModeratorGuidelines.md) +- [Forum banning code of conduct](https://github.com/xbmc/xbmc/blob/master/docs/codeofconduct/ForumUserBanning.md)
\ No newline at end of file diff --git a/docs/codeofconduct/ForumUserBanning.md b/docs/codeofconduct/ForumUserBanning.md new file mode 100644 index 0000000000..8921beedf0 --- /dev/null +++ b/docs/codeofconduct/ForumUserBanning.md @@ -0,0 +1,15 @@ +Originally posted by DarrenHill on the forum + +From discussions earlier on the slack team channel and following on from recent events, I was asked to propose a code of conduct for bans and user banning on the forum, to be followed by all with moderator powers. + +1. When required and when the case is clear, spambots and spam accounts should be dealt with using the "Goodbye Spammer" moderator tool. However if the user/post is not 100% certainly spam, then a second opinion must be sought on the slack #moderator channel as once GBS is used, it cannot be undone. + +2. For users repeatedly asking for support for banned add-ons or those ignoring warnings or legitimate moderator requests then the normal "three strikes" rule should be applied, with an official warning after the second strike and a short ban (up to one week) applied after the third strike. + +3. Where users are being abusive, aggressive or otherwise in violation of the forum rules, warnings should be given when possible, but if a ban is necessary then a second opinion must be obtained, unless the ban is very temporary, 3 days or less, with the explicitly stated reason of cooling heads. This second opinion may be obtained either on the slack channel or by using the forum report post feature with the request that another moderator review the situation and take action if they agree it necessary. Lengthy bans (anything over 3 months) should be done as a team decision. Each ban from this section, whether long or short, shall include a note explaining the reason for the ban so that there is no confusion later. + +4. If you are personally involved with the issue under discussion, or if there are any other conflicts of interest which may prejudice fair and judicial usage of moderator powers, then you have to avoid any direct involvement beyond highlighting the problem to the moderator team. + +5. Normally if a ban is to be lifted or modified it should be done by the original moderator who imposed the ban. But if the situation requires it, the ban may be reviewed by the moderator team as a whole, and if the majority decides that a change or revoke is required then the change may be made (and no further changes made without a second discussion). + +This code applies to all users with moderator powers on the board, and must be followed by them. At the moderator team's discretion, failure to do so may result in suspension or removal of such powers for a period of initially a week, with longer periods considered for more serious issues.
\ No newline at end of file diff --git a/docs/codeofconduct/ModerationRules.md b/docs/codeofconduct/ModerationRules.md new file mode 100644 index 0000000000..2ad7b77788 --- /dev/null +++ b/docs/codeofconduct/ModerationRules.md @@ -0,0 +1,30 @@ +Moderation Rules - Originally posted by Kib on the forum. + +With great power comes great responsibility, and it is important to not misuse the power we have received. +Below are a set of basic rules for the forum moderation that we have come up with. +In case a rule is missing that you think should be added, feel free to discuss. + +**Writing posts or replies** +- Be civil, no matter how infuriating other persons are. +- Unsure what to do? Ask a fellow moderator or the team in this forum! + +**Editing posts** +- Never edit posts without explaining that you did so in your edit. +- Editing to remove harmful content is OK. +- Editing broken links or confusing misspelling to fix them is OK +- Editing posts because you do not agree with what was said, is NOT ok. + +**Deleting posts or whole threads** +- Don't. It's much more preferred to move them to the garbage or edit the offending bits out (See above) +- For spam: use the stopforumspam link in the top right of the post, or ask an admin when that is not possible. + +**Moving threads** +- When moving threads, when possible leave a non-permanent redirect for a number of days. 7 is a good number, but 3 works as well. Use your own intuition. Wink +- Reply to the thread stating that you moved it, ergo "Moved to support section because this does not belong in Android development" + +**Sticking / Unsticking threads** +- When in doubt, don't stick or unstick +- Only sticky threads that will be valid for a long time. +- Do not sticky many threads, it gets in the way of browsing the forum +- If many threads are stickied, it is usually better to consolidate the information by making a reference sticky that points to all the threads +- Contact the author before unstickying threads
\ No newline at end of file diff --git a/docs/codeofconduct/ModeratorGuidelines.md b/docs/codeofconduct/ModeratorGuidelines.md new file mode 100644 index 0000000000..3a0b7c94c6 --- /dev/null +++ b/docs/codeofconduct/ModeratorGuidelines.md @@ -0,0 +1,54 @@ +Moderator Guidelines - originally posted on the forum by DarrenHill + +As suggested by keith on the slack channel, I thought it might be useful to have a few notes and suggestions for how to moderate around here, especially as we have several new members of the team recently. So below are my thoughts on it - please feel free to add to the thread any additional ones that you may have (or that you may disagree with in mine). + +**General stuff:** +- Above all else, try to stay calm and not get emotionally involved. Moderating whilst angry, upset or similar (or drunk etc) can often lead to making situations worse rather than better. +- If you're ever in doubt, take a few moments to check stuff out, or ask for support on the slack channel or this section. We're a moderator team, not a bunch of individuals. +- Don't be too quick to attribute stuff to malice or deviousness that can be accounted for by simple stupidity or ignorance. +- If you do something to a thread or post, make it clear what you have done by adding a note or a new post to it. This includes moving threads and splitting/merging them or chopping posts out for binning. +- All actions performed are recorded in the moderator logs. +- Support one another, and those users who are kind enough to flag up posts and thread (either by the report system or via posts in threads) that may need action. +- Super Moderators (and many Team Kodi members) have mod powers everywhere, whilst normal Moderators have the same powers but in more restricted areas of the forum. + +- We do not support any installation containing banned add-ons, with the exception of assisting users in removal of them. If the thread is asking about them directly, then bin it. But if it's more tangential (e.g. evidence in a debug log) then inform the user of their presence and that this precludes any support, but leave the thread open to allow them to react and hopefully be educated about it (binning via the delayed moderation tools can be useful here as well). You can also redirect them to JJD-UK's new sticky threads about such add-ons. +- If you do something right, most people won't notice. But if you do something wrong, don't be surprised if certain of our membership take it upon themselves to give you grief. Don't take it personally, it's a thankless task sometimes (and flameproof Kodi-branded underwear is optional). +- Make use of the wiki, and pages like the forum rules, the banned add-ons list, the Official:Trademark Policy and the notes for the first time user. Also Nate's blog post and Martijn's blog post are both useful educational readings for our more naïve users. +- If an action has been performed by another moderator or team member that you do not agree with, please consult with them on slack or here about it for clarification and discussion. Do not arbitrarily undo actions by other mods without doing so. Whilst everyone makes mistakes sometimes, there may be more to it than initially appears. + +**Moderator tools** +- All of the mod tools except goodbye spammer are accessible via the drop-down menu at the bottom-right of your web browser (can't comment about tapatalk as I don't use it, but I think it's more limited). +- If you're on Tapatalk and need something done that you can't do directly, just use the report function, make a thread/post here or ask on slack. +- If you're not sure what a tool does or how it works, ask either on slack or here. And if necessary, make a new thread or two in the garbage section and practice with them on how to split/merge threads etc and how to bin stuff. +- With the exception of "goodbye spammer" and thread/post deletion actions, there's no moderator tool action that cannot be undone again. +- Except for spam posts, always use the garbage section (via the tools to "move to garbage" or "move to spam & rule violation") rather than permanently deleting. +- The "move to garbage" and "move to spam & rule violation" are your most commonly used tools. Both move the thread to the bin and automatically close (lock) it. The only differences are the automatic post that is added to the thread, and that "move to garbage" leaves a redirect whereas "spam & violation" doesn't. +- If you do bin a thread, try to add a post to it first explaining why you're doing so. + +- Obvious spam post accounts should be dealt with via the "goodbye spammer" tool (the yellow warning triangle on the right hand side of the post). Note that this (after a confirmation screen) deletes the account, IP blocks its source and removes permanently all posts/threads made by that account. It is permanent and cannot be (easily) undone. +- Goodbye spammer can only be used on users with less than 30 posts. If a spambot has been particularly verbose and exceeded that, you may need to delete a number of their threads manually to bring the count below this so that it can be used. Note this is one of the few cases where thread permanent deletion should be used, as just binning the threads won't bring the count down to re-enable goodbye spammer. +- If you're not sure if a post/account is spam or not, consult with the team and also try a Google (or other engine) search. Spambot posts get spider-scraped and will show up in searches, making multi-site spambots obvious. +- Delayed moderation actions (the first option in the drop-down menu) can be useful for times when you may want to perform an action later (e.g. close a thread temporarily now and then use a delayed moderation action to reopen it at a later time without having to remember then to go and do so. + +**Housekeeping** +- Moving threads between sections is one of the most common jobs. Not glamorous, but it is needed. +- If you move a thread (via the move/copy thread tool), generally it's best to leave a redirect (the default option when you select the tool) so the users can still find it. Personally I use 7 days duration for all except the discussions section where I use 3, but it's a matter of personal taste. If you don't set anything, the redirect shortcut will stay forever. +- Also if you move a thread, leave a note in it to say that you've done so. +- Discussions isn't for support requests - that's what the main support sections are for. +- Threads moved to off-topic can still be posted to by anyone, but normal users cannot start threads in that section. +- If you bin a thread that contains dodgy links, please remember to edit it and remove them. The bin is publically visible, so can be harvested for such things by enterprising idiots. + +**Warnings and banning** +- Banning someone is an extreme measure, and should only be done "off the cuff" for short-term duration (certainly no more than a 2 week ban, ideally less) as a direct result of threatening or insulting behaviour (for the latter, something that goes materially beyond a simple breach of 2.1 of the Forum Rules). +- Any longer ban should only be made after discussion (on Slack) with at least one other moderator. +- Consider also the seniority/contribution of the person in question, and thus the proportionality of the penalty. +- While this is not a democracy, we do value our users and owe them some degree of transparency as to our actions. As such, warnings should be used where possible before bans are actioned (although of course that is not always feasible if a user needs removing quickly). +- Where possible, warnings should be used before bans are actioned (the "3 strikes" rule, although of course that is not always feasible if a user needs removing quickly). +- Both can be done either via the buttons below posts or via the profile page of the user. +- Warnings can be set to anything from 10% to 100% (click the "custom reason" button in the warning page to access that, the "points" setting is per 10% so 4 points is 40%). In that page you also put information that will be seen by the user as to what the reason for the warning is, and how long it will last. +- Note that all a warning does practically is increase the figure visible below the user avatar beside posts. A 100% warning does not trigger any other action automatically, it's basically cosmetic. +- Bannings work in a similar fashion, but of course actually deny the user account access to being able to log into the forum. They can be set for anything from 1 hour to a permanent ban. +- Note that banning does not block IP addresses (although admins here can do that if necessary), but the creation of a second account to get around a ban is itself a forum rules violation and can be cause for such an IP block. +- It is possible to reverse both warnings and bans, but do not do so without consulting and discussing with the moderator or team member who initially applied them. + +I would hope most of the above is obvious, plus I'm sure there are bits that should be there but I've forgotten. But please feel free to add to the suggestions and guidelines so we can do things consistently and well across the whole team and forum.
\ No newline at end of file diff --git a/docs/doxygen/Doxyfile.doxy b/docs/doxygen/Doxyfile.doxy index 02a8e3a278..077ee274db 100644 --- a/docs/doxygen/Doxyfile.doxy +++ b/docs/doxygen/Doxyfile.doxy @@ -244,12 +244,14 @@ ALIASES = "table_start=<table width=\"100%\" style=\"border\" bgc "table_row2_l{2}=<tr bgcolor=white><td width= 40% align=left>\1</td><td width= 60% align=left>\2</td></tr>" \ "table_h3{3}=<tr bgcolor=576f9f><th width=30% align=left valign=middle><b>\1</b></th><th width=10% align=left valign=middle><b>\2</b></th><th width=60% align=left valign=middle><span><b>\3</b></span></th></tr>" \ "table_row3{3}=\htmlonly<tr bgcolor=white><td width= 30% align=left>\endhtmlonly\1\htmlonly</td><td width= 10% align=left>\endhtmlonly\2\htmlonly</td><td width= 60% align=left>\endhtmlonly\3\htmlonly</td></tr>\endhtmlonly" \ - "python_func{1}=\htmlonly <h4><code><span style=\"font-style: italic;\">Function: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code></h4> \endhtmlonly" \ + "python_func{1}=\htmlonly <h4><code><span style=\"font-style: italic;\">Function: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code></h4><hr> \endhtmlonly" \ "python_func_with_rev{2}=\htmlonly <h4><code><span style=\"font-style: italic;\">Function: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code><span style="float:right;"><small>\2</small></span></h4> \endhtmlonly" \ "python_class{1}=\htmlonly <h4><code><span style=\"font-style: italic;\">Class: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code></h4> \endhtmlonly" \ "python_class_with_rev{2}=\htmlonly <h4><code><span style=\"font-style: italic;\">Class: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code><span style="float:right;"><small>\2</small></span></h4> \endhtmlonly" \ "doc_header{1}=\htmlonly <h3><span style=\"text-decoration: underline;\"><span style=\"font-style: italic;\"><span style=\"color: rgb(102, 102, 102);\">\1</span></span></span></h3> \endhtmlonly" \ "python_removed_function{3}=\htmlonly <dl class=\"reflist\"><dt>Member <a class=\"el\" href=\"\2\">\1</a> (...)</dt><dd>\3</dd></dl>\endhtmlonly" \ + "cpp_class{1}=\htmlonly <h4><code><span style=\"font-style: italic;\">Class: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code></h4> \endhtmlonly" \ + "cpp_namespace{1}=\htmlonly <h4><code><span style=\"font-style: italic;\">Namespace: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code></h4> \endhtmlonly" \ "python_v12=\xrefitem python_v12 \"v12 Python API changes\" \"\"" \ "python_v13=\xrefitem python_v13 \"v13 Python API changes\" \"\"" \ "python_v14=\xrefitem python_v14 \"v14 Python API changes\" \"\"" \ @@ -2108,7 +2110,8 @@ INCLUDE_FILE_PATTERNS = # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \ - DOXYGEN_SHOULD_USE_THIS + DOXYGEN_SHOULD_USE_THIS \ + __cplusplus # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/docs/resources/tvos.svg b/docs/resources/tvos.svg new file mode 100644 index 0000000000..5650740856 --- /dev/null +++ b/docs/resources/tvos.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 26.458 26.458"><path d="M0 0h26.458v26.458H0z" fill="#2b2e34"/><g fill="#fff"><path d="M7.562 11.208v.962H8.7v.433H7.562v1.84q0 .415.112.533.115.118.463.118h.572v.466h-.572q-.645 0-.9-.24-.245-.242-.245-.878v-1.84h-.4v-.433h.4v-.962zm1.483.962h.6l1.06 2.845 1.06-2.845h.6l-1.27 3.4h-.757z"/><path d="M14.7 10.83c-.303 0-.582.06-.837.18s-.474.286-.657.5-.327.47-.43.77-.155.63-.155.988c0 .344.05.66.148.947a2.26 2.26 0 0 0 .417.744c.18.21.392.372.64.49s.52.176.82.176a1.98 1.98 0 0 0 .85-.179c.255-.12.473-.287.654-.503s.32-.473.42-.77a3.13 3.13 0 0 0 .148-.992 3 3 0 0 0-.145-.95c-.096-.29-.232-.537-.406-.744a1.81 1.81 0 0 0-.637-.482c-.25-.115-.527-.172-.83-.172zm3.986.007c-.207 0-.398.03-.575.09a1.37 1.37 0 0 0-.458.255 1.16 1.16 0 0 0-.3.393c-.072.15-.106.317-.106.496 0 .574.397 1 1.19 1.308.312.12.536.25.67.396s.203.334.203.568c0 .253-.087.455-.26.606s-.42.227-.737.227c-.377 0-.72-.096-1.026-.29l-.144.434c.28.197.658.296 1.136.296a2.11 2.11 0 0 0 .648-.092 1.42 1.42 0 0 0 .492-.266c.135-.115.24-.254.314-.417s.1-.343.1-.54h.001c0-.156-.02-.3-.062-.43s-.11-.25-.203-.362a1.63 1.63 0 0 0-.362-.306c-.147-.094-.324-.182-.53-.265-.18-.073-.327-.143-.444-.2s-.2-.137-.28-.2a.68.68 0 0 1-.148-.234c-.03-.083-.045-.177-.045-.282 0-.22.083-.397.248-.53s.38-.2.647-.2c.335 0 .615.07.84.213l.158-.427c-.253-.147-.58-.22-.978-.22zm-4.014.42a1.24 1.24 0 0 1 .603.148c.18.1.337.237.468.413s.232.383.306.62.1.492.1.768a2.78 2.78 0 0 1-.106.788c-.07.24-.172.45-.303.63s-.29.32-.475.42a1.27 1.27 0 0 1-.617.151c-.22 0-.422-.05-.606-.15a1.47 1.47 0 0 1-.472-.413 2 2 0 0 1-.306-.617 2.56 2.56 0 0 1-.11-.761 2.77 2.77 0 0 1 .11-.802 2.03 2.03 0 0 1 .306-.634 1.41 1.41 0 0 1 .475-.413c.186-.098.392-.148.617-.148z"/></g></svg>
\ No newline at end of file |