MythTV PVR/BuildFromSource: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Update page and fix "dead end" status)
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
* The addon is part of KODI's official addon repository: https://github.com/kodi-pvr/pvr.mythtv
{{Mininav|[[MythTV PVR]]}}
* The addon's development repository is https://github.com/janbar/pvr.mythtv. You will also find the addon's issue tracker here.


== Branches ==
{{Big|The 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 how to compile it from source code and the 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 alpha/beta development builds
* Branch ''gotham'': Compatible with XBMC Gotham (v13)
* Branch ''helix'': Compatible with KODI Helix (v14)
* etc ...
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 ==
== Build instructions ==
* Install build utilities/libraries
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.
<pre>
sudo apt-get install git
sudo apt-get install build-essential automake autoconf checkinstall
sudo apt-get install bison flex libtool intltool zip cmake
</pre>


Build instructions are included in file README.md from source.
=== Linux environments ===
<syntaxhighlight lang="shell">
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:STRING="pvr.mythtv" -DADDON_SRC_PREFIX:PATH="../.." -DCMAKE_BUILD_TYPE:STRING="Debug" \
-DCMAKE_INSTALL_PREFIX:PATH="../../xbmc/addons" -DPACKAGE_ZIP:BOOL="ON" "-GUnix Makefiles" ../../xbmc/cmake/addons
make -j$(nproc)
</syntaxhighlight>


== Build MythTV addon on OSX ==
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.
* 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
* Install '''cmake'''.


Build instructions are included in file README.md from source.
== External links ==
* [https://github.com/janbar/pvr.mythtv/issues Issue tracker]


== Build MythTV addon on Windows ==
* Install '''Visual C++ 2013 windows desktop'''
* Download '''pvr.mythtv''' sources from git repository
<pre>cd src
git clone -b helix git://github.com/janbar/pvr.mythtv.git</pre>
* 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 ==
{{Updated|19}}
* Follow normal OpenELEC build instructions (http://wiki.openelec.tv/index.php?title=Compile_from_source) for desired ''PROJECT+ARCH''. This stage has to be done for all needed PROJECT+ARCH. It will install required ''toolchain'' to build addon.
[[Category:PVR]]
<pre>
cd OpenELEC.tv
PROJECT=RPi ARCH=arm make release
</pre>
* From OpenELEC sources folder clone sources of compatible branch: gotham, helix or doityourself (last development)
<pre>
git clone -b helix https://github.com/janbar/pvr.mythtv.git
</pre>
* Create a cleaned <code>build</code> folder and go
<pre>
mkdir -p build
rm -rf build/*
cd build
</pre>
* Select PROJECT and ARCH to build
<pre>
PROJECT=RPi
ARCH=arm
</pre>
* Configure the build by running script below
<pre>
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
</pre>
* Build the addon
<pre>
make
</pre>
 
* Create the package ZIP
<pre>
cp -r ../pvr.mythtv/pvr.mythtv ./
cp pvr.mythtv.so pvr.mythtv/
zip -r pvr.mythtv-${PROJECT}-${ARCH}.zip ./pvr.mythtv
</pre>

Revision as of 13:04, 15 October 2021

Home icon grey.png   ▶ MythTV PVR ▶ BuildFromSource

The add-on's development repository is Git-based and hosted on GitHub. There you will find instructions how to compile it from source code and the 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:STRING="pvr.mythtv" -DADDON_SRC_PREFIX:PATH="../.." -DCMAKE_BUILD_TYPE:STRING="Debug" \
-DCMAKE_INSTALL_PREFIX:PATH="../../xbmc/addons" -DPACKAGE_ZIP:BOOL="ON" "-GUnix Makefiles" ../../xbmc/cmake/addons
make -j$(nproc)

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