MythTV PVR/BuildFromSource: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
mNo edit summary
 
(43 intermediate revisions by 5 users not shown)
Line 1: Line 1:
* The addon is part of KODI's official addon repository: https://github.com/opdenkamp/xbmc-pvr-addons
{{Mininav|[[Add-on:MythTV PVR Client|MythTV PVR Client]]}}
* The addon's development repository is https://github.com/janbar/xbmc-pvr-addons. You will also find the addon's issue tracker here.


== Branches ==
{{Note|This add-on's development repository is [[Git usage|Git-based]] and hosted on [https://github.com/janbar/pvr.mythtv GitHub]. There you will find instructions for compiling it from source code along with its issue tracker.}}
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 <code>git checkout <BRANCH></code> 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
<pre>
sudo add-apt-repository ppa:team-xbmc/unstable
sudo apt-get update
sudo apt-get upgrade
</pre>


* Install XBMC from nightly builds
== Build instructions ==
<pre>sudo apt-get install xbmc</pre>
When building the addon, you have to use the correct branch ([https://github.com/janbar/pvr.mythtv/branches/all List of Git branches in pvr.mythtv]) for the version of Kodi you're building against. For example, if you're building the <code>master</code> branch of Kodi, you should checkout the <code>master</code> branch of this repository. Also, make sure you are following this [https://github.com/janbar/pvr.mythtv/blob/master/README.md README file] from the branch in question.


* Install build utilities/libraries
<pre>
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
</pre>


* Create zip file for KODI MythTV addon
=== Linux environments ===
<pre>
<syntaxhighlight lang="sh">
mkdir source
git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
cd source
git clone --branch Nexus https://github.com/janbar/pvr.mythtv.git
git clone git://github.com/janbar/xbmc-pvr-addons.git
cd pvr.mythtv && mkdir build && cd build
cd xbmc-pvr-addons
cmake -DADDONS_TO_BUILD=pvr.mythtv -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug \
./bootstrap
-DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=ON ../../xbmc/cmake/addons
./configure
make
make clean zip
</syntaxhighlight>
</pre>


* Put the addon in a handy location
The add-on files will be placed in <code>../../xbmc/kodi-build/addons</code>, so if you build Kodi from source and run it directly, the add-on will be available as a system add-on.
<pre>
cp addons/pvr.mythtv-linux-x86_64.zip $HOME
</pre>


* 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
<pre>
rm ~/.kodi/addons/packages/pvr.mythtv-linux-x86_64.zip
</pre>


* Start KODI, add the addon using the zip file, then finally enable Live TV using the MythTV addon above.
== External links ==
* [https://github.com/janbar/pvr.mythtv/issues Issue tracker]


== Build MythTV addon on OSX ==
* Install '''git'''. Go to http://code.google.com/p/git-osx-installer
* 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
:Snow leopard: Xcode 3.2.6
:Lion: Xcode 4.3+
:Mountain Lion: Xcode 4.4+
:Maverick: Xcode 5.0.1 (PVR sources don't run when compiled with Xcode 5.1)


* 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'''
{{Updated|20}}
<pre>mkdir src ; cd src
[[Category:PVR]]
git clone git://github.com/janbar/xbmc-pvr-toolchain-osx.git</pre>
 
* Clone the '''xbmc-pvr-addons''' sources from git repository inside the tool chain
<pre>cd xbmc-pvr-toolchain-osx
git clone git://github.com/janbar/xbmc-pvr-addons.git</pre>
 
* Optionally you can choose the branch you want to build. By default master branch is checked out.
''gotham branch''
<pre>cd xbmc-pvr-addons ; git checkout gotham ; cd ..</pre>
''master branch''
<pre>cd xbmc-pvr-addons ; git checkout master ; cd ..</pre>
 
* Build it. You have to be in the root folder of the tool chain
<pre>make</pre>
 
* Install addon '''pvr.mythtv''' with '''KODI'''
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.
 
* You can rebuild the addon at anytime using command ''make''. To completely clean up the tool chain, type ''make distclean''.
 
== Build MythTV addon on Windows ==
* Install '''Visual C++ 2013 windows desktop'''
* Download '''xbmc-pvr-addons''' sources from git repository
<pre>cd src
git clone git://github.com/janbar/xbmc-pvr-addons.git</pre>
* 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 ==
* Follow normal OpenELEC build instructions (http://wiki.openelec.tv/index.php?title=Compile_from_source) but adjust the "Start compiling" procedure as below
<pre>cd OpenELEC.tv</pre>
* Run the below script to replace normally included pvr-addons with latest development git version
<pre>#!/bin/bash
 
source ./config/version
# may want to change this to different build if you are not building Generic
source ./projects/Generic/options
source ./packages/mediacenter/xbmc-pvr-addons/package.mk
 
if [ ! -d ./sources/$PKG_NAME/ ]; then
    mkdir -p ./sources/$PKG_NAME/
fi
 
wget --no-check-certificate https://github.com/janbar/xbmc-pvr-addons/archive/master.zip
 
unzip master.zip
mv xbmc-pvr-addons-master $PKG_NAME-$PKG_VERSION
tar -cJf $PKG_NAME-$PKG_VERSION.tar.xz $PKG_NAME-$PKG_VERSION
rm -r $PKG_NAME-$PKG_VERSION master.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/xbmc-pvr-addons ./build.OpenELEC*/xbmc-pvr-addons-* \
./build.OpenELEC*/image/.stamps/xbmc-pvr-addons
</pre>
* Continue with regular build instructions (PROJECT=Generic ARCH=x86_64 make release)

Latest revision as of 09:04, 29 January 2023

Home icon grey.png   ▶ MythTV PVR Client ▶ BuildFromSource

Note: This add-on's development repository is Git-based and hosted on GitHub. There you will find instructions for compiling it from source code along with its issue tracker.


Build instructions

When building the addon, you have to use the correct branch (List of Git branches in pvr.mythtv) for the version of Kodi you're building against. For example, if you're building the master branch of Kodi, you should checkout the master branch of this repository. Also, make sure you are following this README file from the branch in question.


Linux environments

git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
git clone --branch Nexus https://github.com/janbar/pvr.mythtv.git
cd pvr.mythtv && mkdir build && cd build
cmake -DADDONS_TO_BUILD=pvr.mythtv -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=ON ../../xbmc/cmake/addons
make

The add-on files will be placed in ../../xbmc/kodi-build/addons, so if you build Kodi from source and run it directly, the add-on will be available as a system add-on.


External links