MythTV PVR/BuildFromSource: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Line 61: Line 61:
:Maverick: Xcode 5.0.1 or newer
:Maverick: Xcode 5.0.1 or newer


* Now open a '''terminal''' console and clone the tool chain repository to build addon. Below the tool chain is installed in the folder '''$HOME/src'''
* Now open a '''terminal''' console and download cmake tool to build addon. Below the cmake sources are installed in the folder '''$HOME/src'''
<pre>mkdir src ; cd src
<pre>
git clone git://github.com/janbar/xbmc-pvr-toolchain-osx.git</pre>
mkdir src ; cd src
git clone -b release http://cmake.org/cmake.git
cd cmake
./bootstrap ; make
</pre>
Then install cmake tool. At prompt enter your password.
<pre>
sudo make install
</pre>


* Clone the '''xbmc-pvr-addons''' sources from git repository inside the tool chain
* Clone the '''pvr.mythtv''' sources from git repository
<pre>cd xbmc-pvr-toolchain-osx
<pre>
git clone -b helix git://github.com/janbar/xbmc-pvr-addons.git</pre>
cd $HOME/src
git clone -b doityourself git://github.com/janbar/pvr.mythtv.git
</pre>


* Optionally you can choose the branch you want to build. By default master branch is checked out.
* Optionally you can choose the branch you want to build. Above doityourself branch (development) is checked out.
''gotham branch''
''gotham branch''
<pre>cd xbmc-pvr-addons ; git checkout gotham ; cd ..</pre>
<pre>cd pvr.mythtv ; git checkout gotham ; cd ..</pre>
''helix branch''
''helix branch''
<pre>cd xbmc-pvr-addons ; git checkout helix ; cd ..</pre>
<pre>cd pvr.mythtv ; git checkout helix ; cd ..</pre>


* Build it. You have to be in the root folder of the tool chain
* Build it in a new cleaned folder <code>build</code>
<pre>make</pre>
<pre>
mkdir -p build
rm -rf build/*
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCORE_SYSTEM_NAME=darwin -DUSE_LTO=1 ../pvr.mythtv/
make
</pre>


* Install addon '''pvr.mythtv''' with '''KODI'''
* Create the package ZIP
The builder create a new folder '''pvr.mythtv''' containing the addon in the root path of the tool chain. You have to copy it into '''$HOME/Library/Application\ Support/KODI/addons/'''. Also you can zip it to be uploaded  with '''KODI''' as zip file.
<pre>
cp -r ../pvr.mythtv/pvr.mythtv ./
cp pvr.mythtv.dylib pvr.mythtv/
</pre>


* You can rebuild the addon at anytime using command ''make''. To completely clean up the tool chain, type ''make distclean''.
* Install addon '''pvr.mythtv''' with '''KODI/XBMC'''
You can copy the folder '''$HOME/src/build/pvr.mythtv''' into '''$HOME/Library/Application\ Support/KODI/addons/'''. Or load the ZIP file with '''KODI/XBMC'''.


== Build MythTV addon on Windows ==
== Build MythTV addon on Windows ==

Revision as of 21:38, 5 March 2015

Branches

KODI PVR addons like the MythTV addon are not compatible with all versions of KODI (due to the PVR API version dependency). The addon repositories have different branches for the different KODI versions.

  • Branch master: Compatible with KODI Helix development builds
  • Branch gotham: Compatible with XBMC Gotham (v13)

Use git checkout <BRANCH> after cloning the repository to switch to the according branch before starting the build.

Build MythTV addon on Ubuntu

  • Add repository for XBMC nightly builds
sudo add-apt-repository ppa:team-xbmc/unstable
sudo apt-get update
sudo apt-get upgrade
  • Install XBMC from nightly builds
sudo apt-get install xbmc
  • Install build utilities/libraries
sudo apt-get install ubuntu-restricted-extras git
sudo apt-get install build-essential automake autoconf checkinstall
sudo apt-get install bison flex libtool intltool zip
  • Create zip file for KODI MythTV addon
mkdir source
cd source
git clone -b helix git://github.com/janbar/xbmc-pvr-addons.git
cd xbmc-pvr-addons
./bootstrap
./configure
make clean
make -C lib/cppmyth
make -C addons/pvr.mythtv zip
  • Put the addon in a handy location
cp addons/pvr.mythtv-linux-x86_64.zip $HOME
  • You may need to delete the previous addon zip file out of ~/.kodi/addons/packages/ to allow installation of newer revision with the same addon version number
rm ~/.kodi/addons/packages/pvr.mythtv-linux-x86_64.zip
  • Start KODI, add the addon using the zip file, then finally enable Live TV using the MythTV addon above.

Build MythTV addon on OSX

Snow leopard: Xcode 3.2.6
Lion: Xcode 4.3+
Mountain Lion: Xcode 4.4+
Maverick: Xcode 5.0.1 or newer
  • Now open a terminal console and download cmake tool to build addon. Below the cmake sources are installed in the folder $HOME/src
mkdir src ; cd src
git clone -b release http://cmake.org/cmake.git
cd cmake
./bootstrap ; make

Then install cmake tool. At prompt enter your password.

sudo make install
  • Clone the pvr.mythtv sources from git repository
cd $HOME/src
git clone -b doityourself git://github.com/janbar/pvr.mythtv.git
  • Optionally you can choose the branch you want to build. Above doityourself branch (development) is checked out.

gotham branch

cd pvr.mythtv ; git checkout gotham ; cd ..

helix branch

cd pvr.mythtv ; git checkout helix ; cd ..
  • Build it in a new cleaned folder build
mkdir -p build
rm -rf build/*
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCORE_SYSTEM_NAME=darwin -DUSE_LTO=1 ../pvr.mythtv/
make
  • Create the package ZIP
cp -r ../pvr.mythtv/pvr.mythtv ./
cp pvr.mythtv.dylib pvr.mythtv/
  • Install addon pvr.mythtv with KODI/XBMC

You can copy the folder $HOME/src/build/pvr.mythtv into $HOME/Library/Application\ Support/KODI/addons/. Or load the ZIP file with KODI/XBMC.

Build MythTV addon on Windows

  • Install Visual C++ 2013 windows desktop
  • Download xbmc-pvr-addons sources from git repository
cd src
git clone -b helix git://github.com/janbar/xbmc-pvr-addons.git
  • Execute DownloadBuildDeps.bat in xbmc-pvr-addons\project\BuildDependencies
  • Open xbmc-pvr-addons.sln from xbmc-pvr-addons\project\VS2010Express in Visual C++ 2013
  • Build it
  • To install the addon, copy the folder xbmc-pvr-addons\addons\pvr.mythtv\addon to your KODI addons directory

Build MythTV git into OpenELEC

cd OpenELEC.tv
  • Run the below script to replace normally included pvr-addons with latest development git version
#!/bin/bash

source ./config/version
source ./distributions/OpenELEC/options
# may want to change this to different build if you are not building Generic
source ./projects/Generic/options 
source ./packages/mediacenter/kodi-pvr-addons/package.mk

if [ ! -d ./sources/$PKG_NAME/ ]; then
    mkdir -p ./sources/$PKG_NAME/
fi

BRANCH=helix
wget --no-check-certificate https://github.com/janbar/xbmc-pvr-addons/archive/${BRANCH}.zip

unzip ${BRANCH}.zip
mv xbmc-pvr-addons-${BRANCH} $PKG_NAME-$PKG_VERSION
tar -cJf $PKG_NAME-$PKG_VERSION.tar.xz $PKG_NAME-$PKG_VERSION
rm -r $PKG_NAME-$PKG_VERSION ${BRANCH}.zip

mv $PKG_NAME-$PKG_VERSION.tar.xz ./sources/$PKG_NAME/
md5sum sources/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.xz > \
 sources/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.xz.md5
echo  $PKG_URL > ./sources/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.xz.url

rm -rf ./build.OpenELEC*/.stamps/$PKG_NAME ./build.OpenELEC*/$PKG_NAME-* \
 ./build.OpenELEC*/image/.stamps/$PKG_NAME
  • Continue with regular build instructions (PROJECT=Generic ARCH=x86_64 make release)