MythTV PVR/BuildFromSource: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Line 25: Line 25:
* Install '''Xcode''' for your Mac. Go to http://connect.apple.com/
* Install '''Xcode''' for your Mac. Go to http://connect.apple.com/
* Install '''Command line tools''': Go to http://connect.apple.com/ or type "xcode-select --install" in terminal
* Install '''Command line tools''': Go to http://connect.apple.com/ or type "xcode-select --install" in terminal
:Snow leopard: Xcode 3.2.6
* Install '''cmake'''.
: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'''
Build instructions are included in file README.md from source.
<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 '''pvr.mythtv''' sources from git repository
<pre>
cd $HOME/src
git clone git://github.com/janbar/pvr.mythtv.git
</pre>
 
* Choose the branch you want to build.
''gotham branch''
<pre>cd pvr.mythtv ; git checkout gotham ; cd ..</pre>
''helix branch''
<pre>cd pvr.mythtv ; git checkout helix ; cd ..</pre>
''development branch''
<pre>cd pvr.mythtv ; git checkout doityourself ; cd ..</pre>
 
* Build it in a new cleaned folder <code>build</code>
<pre>
mkdir -p build
rm -rf build/*
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCORE_SYSTEM_NAME=darwin ../pvr.mythtv/
make
</pre>
 
* Create the package ZIP
<pre>
cp -r ../pvr.mythtv/pvr.mythtv ./
cp pvr.mythtv.dylib pvr.mythtv/
zip -r pvr.mythtv-osx.zip ./pvr.mythtv
</pre>
 
* Put the addon in a handy location
<pre>
mv pvr.mythtv-osx.zip $HOME
</pre>
 
* You may need to delete the previous addon zip file out of $HOME/Library/Application\ Support/KODI/addons/packages/ to allow installation of newer revision with the same addon version number
<pre>
rm $HOME/Library/Application\ Support/KODI/addons/packages/pvr.mythtv-osx.zip
</pre>
 
* Start KODI, add the addon using the zip file, then finally enable Live TV using the MythTV addon above.


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

Revision as of 13:39, 6 August 2016

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 alpha/beta development builds
  • Branch gotham: Compatible with XBMC Gotham (v13)
  • Branch helix: Compatible with KODI Helix (v14)
  • etc ...

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

Build MythTV addon on Ubuntu

  • Install build utilities/libraries
sudo apt-get install git
sudo apt-get install build-essential automake autoconf checkinstall
sudo apt-get install bison flex libtool intltool zip cmake

Build instructions are included in file README.md from source.

Build MythTV addon on OSX

Build instructions are included in file README.md from source.

Build MythTV addon on Windows

  • Install Visual C++ 2013 windows desktop
  • Download pvr.mythtv sources from git repository
cd src
git clone -b helix git://github.com/janbar/pvr.mythtv.git
  • Run cmake GUI and create the VC project in a dedicated folder
  • Open pvr.mythtv.sln in Visual C++ 2013
  • Build it
  • To install the addon, copy the generated DLL pvr.mythtv.dll into sub folder pvr.mythtv from the sources. ZIP the sub folder with its content as pvr.mythtv-win32.zip.
  • Start KODI, add the addon using the zip file, then finally enable Live TV using the MythTV addon above.

Build MythTV git into OpenELEC

cd OpenELEC.tv
PROJECT=RPi ARCH=arm make release
  • From OpenELEC sources folder clone sources of compatible branch: gotham, helix or doityourself (last development)
git clone -b helix https://github.com/janbar/pvr.mythtv.git
  • Create a cleaned build folder and go
mkdir -p build
rm -rf build/*
cd build
  • Select PROJECT and ARCH to build
PROJECT=RPi
ARCH=arm
  • Configure the build by running script below
for FILE in \
  ../build.OpenELEC-${PROJECT}.${ARCH}-*/toolchain/etc/cmake-*-openelec-*.conf ; do
  if [ -f "$FILE" ]; then
	cmake -DCMAKE_TOOLCHAIN_FILE=$FILE \
          -DCMAKE_BUILD_TYPE=Release \
          ../pvr.mythtv/
    break
  fi
done
  • Build the addon
make
  • Create the package ZIP
cp -r ../pvr.mythtv/pvr.mythtv ./
cp pvr.mythtv.so pvr.mythtv/
zip -r pvr.mythtv-${PROJECT}-${ARCH}.zip ./pvr.mythtv