From fa34a3ae14fea8902465bef451f3c6db3d5e6a58 Mon Sep 17 00:00:00 2001 From: Michael Brehm Date: Sat, 1 Apr 2017 10:25:25 -0400 Subject: [PATCH 1/2] Add submodule dependencies for kodi-apks and apktool --- .gitignore | 4 ++++ .gitmodules | 6 ++++++ depends/apktool | 1 + depends/kodi-apks | 1 + 4 files changed, 12 insertions(+) create mode 160000 depends/apktool create mode 160000 depends/kodi-apks diff --git a/.gitignore b/.gitignore index 420edac5..d7a7b12d 100644 --- a/.gitignore +++ b/.gitignore @@ -254,3 +254,7 @@ paket-files/ # Temporary Directories tmp/ out/ + +# Java Keystores +*.jks +*.keystore diff --git a/.gitmodules b/.gitmodules index 1da68ffa..c5353aa3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,9 @@ [submodule "libcurl-nossl"] path = depends/libcurl-nossl url = https://github.com/djp952/prebuilt-libcurl-nossl.git +[submodule "kodi-apks"] + path = depends/kodi-apks + url = https://github.com/djp952/prebuilt-kodi-apks.git +[submodule "apktool"] + path = depends/apktool + url = https://github.com/djp952/prebuilt-apktool.git diff --git a/depends/apktool b/depends/apktool new file mode 160000 index 00000000..00287e27 --- /dev/null +++ b/depends/apktool @@ -0,0 +1 @@ +Subproject commit 00287e27c775e8c6567c77536f60ddbc5176a843 diff --git a/depends/kodi-apks b/depends/kodi-apks new file mode 160000 index 00000000..1bffb666 --- /dev/null +++ b/depends/kodi-apks @@ -0,0 +1 @@ +Subproject commit 1bffb66653484a4b37e4db9e464fc466d8c9eb4e From 074a2c81e4910cd21ec3947f080cf3bce96e85b4 Mon Sep 17 00:00:00 2001 From: Michael Brehm Date: Sat, 1 Apr 2017 14:12:10 -0400 Subject: [PATCH 2/2] Add PackageApk target to msbuild project --- README.md | 55 +++++++++++++++++++++++++++++------ msbuild.proj | 76 +++++++++++++++++++++++++++++++++++++++++++++++++ src/version.ini | 2 +- 3 files changed, 123 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3595ef3b..76580d07 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # __pvr.hdhomerundvr__ Unofficial Kodi HDHomeRun DVR PVR Client -## [__DOCUMENTATION AND DOWNLOADS__](https://github.com/djp952/pvr.hdhomerundvr/wiki) +## [__USER DOCUMENTATION AND DOWNLOADS__](https://github.com/djp952/pvr.hdhomerundvr/wiki) Copyright (C)2017 Michael G. Brehm [MIT LICENSE](https://opensource.org/licenses/MIT) @@ -14,7 +14,9 @@ Copyright (C)2017 Michael G. Brehm * Windows 10 x64 15063 * Visual Studio 2015 (with Git for Windows) * Bash on Ubuntu on Windows 16.04.1 LTS -* Android NDK r12b for Windows 64-bit +* Android NDK r12b for Windows 64-bit +* Optional: Android SDK tools r25.2.3 for Windows +* Optional: Oracle Java SE Runtime Environment 8 **CONFIGURE BASH ON UBUNTU ON WINDOWS** Open "Bash on Ubuntu on Windows" @@ -30,16 +32,36 @@ Download the Android NDK r12b for Windows 64-bit: [https://dl.google.com/android/repository/android-ndk-r12b-windows-x86_64.zip](https://dl.google.com/android/repository/android-ndk-r12b-windows-x86_64.zip) * Extract the contents of the .zip file somewhere -* Set a System Environment Variable named ANDROID_NDK_ROOT that points to the extraction location (android-ndk-r12b) -* Optionally, ANDROID_NDK_ROOT can also be set on the command line prior to executing msbuild: +* Set a System Environment Variable named ANDROID_NDK_ROOT that points to the extracted android-ndk-r12b folder + +**CONFIGURE ANDROID SDK TOOLS (OPTIONAL)** +_Android SDK tools are only required for Android APK generation; see "BUILD AND GENERATE MODIFIED KODI ANDROID APKS" below_ + +Download the Android SDK tools r25.2.3 for Windows: +[https://dl.google.com/android/repository/tools_r25.2.3-windows.zip](https://dl.google.com/android/repository/tools_r25.2.3-windows.zip) + +* Extract the contents of the .zip file somewhere +* Set a System Environment Variable named ANDROID_SDK_ROOT that points to the location the .zip was extracted +* Install the build-tools-25.0.2 package: ``` -... -set ANDROID_NDK_ROOT=D:\android-ndk-r12b -msbuild msbuild.proj -... +cd /d %ANDROID_SDK_ROOT%\tools +android update sdk --all -u -t build-tools-25.0.2 +``` + +**CONFIGURE ORACLE JAVA SE RUNTIME ENVIRONMENT (OPTIONAL)** +_Oracle Java SE Runtime Environment is only required for Android APK generation; see "BUILD AND GENERATE MODIFIED KODI ANDROID APKS" below_ + +Download the latest jre-8xxx-windows-x64.tar.gz from Oracle: +[Java SE Runtime Environment 8 - Downloads](http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html) + +* Extract the contents of the jre-8xxx-windows-x64.tar.gz file somewhere +* Set a System Environment Variable named JAVA_HOME that points to the location the tar.gz was extracted +* Test Java: +``` +%JAVA_HOME%\bin\java -version ``` -**BUILD** +**BUILD AND GENERATE KODI ADDON PACKAGES** Open "Developer Command Prompt for VS2015" ``` git clone https://github.com/djp952/pvr.hdhomerundvr -b Krypton @@ -59,6 +81,21 @@ msbuild msbuild.proj > out\zuki.pvr.hdhomerundvr-android-x86-krypton-x.x.x.x.zip (android-x86) ``` +**BUILD AND GENERATE MODIFIED KODI ANDROID APKS** +Building the modified Kodi Android APKs requires a Java keystore to be specified on the build command line in order to sign the resultant APK files. For more information about APK signing and how to generate the keystore, please see [Sign Your App](https://developer.android.com/studio/publish/app-signing.html). + +Open "Developer Command Prompt for VS2015" +``` +git clone https://github.com/djp952/pvr.hdhomerundvr -b Krypton +cd pvr.hdhomerundvr +git submodule update --init +msbuild msbuild.proj /t:PackageApk /p:Keystore={path_to_keystore};KeystorePassword={keystore_password} + +> out\kodi-x.x-zuki.pvr.hdhomerundvr-arm-x.x.x.x.apk (android-arm) +> out\kodi-x.x-zuki.pvr.hdhomerundvr-aarch64-x.x.x.x.apk (android-aarch64) +> out\kodi-x.x-zuki.pvr.hdhomerundvr-x86-x.x.x.x.apk (android-x86) +``` + **LIBHDHOMERUN LICENSE INFORMATION** [https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic](https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic) This library statically links with code licensed under the GNU Lesser Public License, v2.1 [(LGPL 2.1)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html). As per the terms of that license, the maintainer (djp952) must provide the library in an object (or source) format and allow the user to modify and relink against a different version(s) of the LGPL 2.1 libraries. To use a different or custom version of libhdhomerun the user may alter the contents of the depends/libhdhomerun source directory prior to building this library. diff --git a/msbuild.proj b/msbuild.proj index ac02bf9b..8c756b22 100644 --- a/msbuild.proj +++ b/msbuild.proj @@ -25,8 +25,25 @@ Release krypton + + + + + + + + + + + + + + + + + @@ -226,4 +243,63 @@ + + + + + + + + + + apktool_2.2.2.jar + $(ANDROID_SDK_ROOT)\build-tools\25.0.2\zipalign + $(ANDROID_SDK_ROOT)\build-tools\25.0.2\apksigner + $([System.IO.File]::ReadAllText(tmp\version\version.txt)) + $([System.Version]::Parse($(PackageVersion)).Revision) + 1710$(BuildNumber) + 17.1-zuki.pvr.hdhomerundvr-$(PackageVersion) + out\zuki.pvr.hdhomerundvr-android-arm-$(KodiBaseline)-$(PackageVersion).zip + out\zuki.pvr.hdhomerundvr-android-aarch64-$(KodiBaseline)-$(PackageVersion).zip + out\zuki.pvr.hdhomerundvr-android-x86-$(KodiBaseline)-$(PackageVersion).zip + kodi-17.1-Krypton-armeabi-v7a + kodi-17.1-Krypton-arm64-v8a + kodi-17.1-Krypton-x86 + kodi-17.1-zuki.pvr.hdhomerundvr-arm-$(PackageVersion) + kodi-17.1-zuki.pvr.hdhomerundvr-aarch64-$(PackageVersion) + kodi-17.1-zuki.pvr.hdhomerundvr-x86-$(PackageVersion) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/version.ini b/src/version.ini index d8b79401..50ccf67b 100644 --- a/src/version.ini +++ b/src/version.ini @@ -8,4 +8,4 @@ Company=Michael G. Brehm Copyright= Product=zuki.pvr.hdhomerundvr -Version=1.0.5 +Version=1.0.6