-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Readme.md with instructions from http://forum.kodi.tv/showthre…
- Loading branch information
Showing
1 changed file
with
54 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,67 @@ | ||
# Building add-on | ||
|
||
To build peripheral add-ons with Kodi: | ||
## Linux | ||
|
||
This assumes you start in the working directory where you've cloned the repos | ||
|
||
```shell | ||
git clone https://github.com/garbear/xbmc.git | ||
git clone https://github.com/kodi-game/peripheral.joystick.git | ||
``` | ||
|
||
Create a build directory | ||
|
||
```shell | ||
KODI_PREFIX=$HOME/kodi | ||
|
||
git clone -b retroplayer-15alpha1 https://github.com/garbear/xbmc.git xbmc | ||
cd xbmc | ||
./bootstrap | ||
./configure | ||
make -j8 | ||
make install DESTDIR=$KODI_PREFIX | ||
make -C tools/depends/target/xbmc-peripheral-addons/ PREFIX=$KODI_PREFIX | ||
cd .. | ||
cd peripheral.joystick | ||
mkdir build | ||
cd build | ||
``` | ||
|
||
To build just joystick add-on, after doing the above: | ||
Generate a build environment with config for debugging | ||
|
||
```shell | ||
KODI_PREFIX=$HOME/kodi | ||
SOURCE_DIR=`pwd`/source/peripheral.joystick | ||
BUILD_DIR=`pwd`/build/peripheral.joystick | ||
XBMC_SRC=`pwd`/../../xbmc | ||
|
||
cmake -DADDONS_TO_BUILD=peripheral.joystick \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_INSTALL_PREFIX=$XBMC_SRC/addons \ | ||
-DPACKAGE_ZIP=1 \ | ||
$XBMC_SRC/project/cmake/addons | ||
|
||
### OR, for Eclipse 4.4 project files | ||
|
||
cmake -G"Eclipse CDT4 - Unix Makefiles" \ | ||
-D_ECLIPSE_VERSION=4.4 \ | ||
-DADDONS_TO_BUILD=peripheral.joystick \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_INSTALL_PREFIX=$XBMC_SRC/addons \ | ||
-DPACKAGE_ZIP=1 \ | ||
$XBMC_SRC/project/cmake/addons | ||
|
||
``` | ||
|
||
## Windows | ||
|
||
mkdir -p $SOURCE_DIR $BUILD_DIR | ||
git clone https://github.com/garbear/peripheral.joystick.git $SOURCE_DIR | ||
cd $BUILD_DIR | ||
cmake $SOURCE_DIR -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$KODI_PREFIX -DCMAKE_INSTALL_PREFIX=$KODI_PREFIX | ||
To build on windows, change to the addons folder: | ||
|
||
```batch | ||
cd D:\Projects\xbmx\xbmc\project\cmake\addons | ||
``` | ||
|
||
# or, for Eclipse 4.4 project files: | ||
Generate Visual Studio 2013 solution | ||
|
||
cmake $SOURCE_DIR -G"Eclipse CDT4 - Unix Makefiles" -D_ECLIPSE_VERSION=4.4 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$KODI_PREFIX -DCMAKE_INSTALL_PREFIX=$KODI_PREFIX | ||
```batch | ||
cmake -DADDONS_TO_BUILD=peripheral.joystick -DADDON_SRC_PREFIX="D:\Projects\demo" -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 12" -DCMAKE_USER_MAKE_RULES_OVERRIDE="D:\Projects\xbmx\xbmc\project\cmake\scripts\windows\c-flag-overrides.cmake" -DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX="D:\Projects\xbmx\xbmc\project\cmake\scripts\windows\cxx-flag-overrides.cmake" -DCMAKE_INSTALL_PREFIX="D:\Projects\xbmx\xbmc\adons" -DPACKAGE_ZIP=1 | ||
``` | ||
|
||
# and then | ||
Open Visual Studio, load and build this solution: | ||
|
||
make | ||
``` | ||
D:\Projects\xbmx\xbmc\project\cmake\addons\kodi-addons.sln | ||
``` | ||
|
||
Altarnatively, copy [prepare-addons-dev.bat](https://gist.github.com/Montellese/149ecbd5ca20941d2be4) into tools/buildsteps/win32 and execute it from there. If you want to execute it from somewhere else you need to adjust the default value of WORKDIR in the batch file. | ||
|
||
Available options are: | ||
* **clean** to simply clean the whole generated buildsystem | ||
* **<addon-id>** to only generate the buildsystem for that addon |