Skip to content

Commit

Permalink
Auto-generate addon.xml files
Browse files Browse the repository at this point in the history
Maintaining three individual xml files to update version and changelog
information was rather silly
  • Loading branch information
djp952 committed Mar 6, 2017
1 parent 9bec22f commit 5be789a
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 68 deletions.
2 changes: 1 addition & 1 deletion manifest/android-arm.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<zip>
<file path="pvr.hdhomerundvr\.nomedia" source="pvr.hdhomerundvr\.nomedia" normalize="unix"/>
<file path="pvr.hdhomerundvr\addon.xml" source="pvr.hdhomerundvr\addon-android.xml" normalize="unix"/>
<file path="pvr.hdhomerundvr\addon.xml" source="tmp\addon-android.xml" normalize="unix"/>
<file path="pvr.hdhomerundvr\changelog.txt" source="pvr.hdhomerundvr\changelog.txt" normalize="unix"/>
<file path="pvr.hdhomerundvr\icon.png" source="pvr.hdhomerundvr\icon.png"/>
<file path="pvr.hdhomerundvr\LICENSE.txt" source="LICENSE" normalize="unix"/>
Expand Down
2 changes: 1 addition & 1 deletion manifest/android-x86.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<zip>
<file path="pvr.hdhomerundvr\.nomedia" source="pvr.hdhomerundvr\.nomedia" normalize="unix"/>
<file path="pvr.hdhomerundvr\addon.xml" source="pvr.hdhomerundvr\addon-android.xml" normalize="unix"/>
<file path="pvr.hdhomerundvr\addon.xml" source="tmp\addon-android.xml" normalize="unix"/>
<file path="pvr.hdhomerundvr\changelog.txt" source="pvr.hdhomerundvr\changelog.txt" normalize="unix"/>
<file path="pvr.hdhomerundvr\icon.png" source="pvr.hdhomerundvr\icon.png"/>
<file path="pvr.hdhomerundvr\LICENSE.txt" source="LICENSE" normalize="unix"/>
Expand Down
2 changes: 1 addition & 1 deletion manifest/linux-i686.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<zip>
<file path="pvr.hdhomerundvr\addon.xml" source="pvr.hdhomerundvr\addon-linux.xml" normalize="unix"/>
<file path="pvr.hdhomerundvr\addon.xml" source="tmp\addon-linux.xml" normalize="unix"/>
<file path="pvr.hdhomerundvr\changelog.txt" source="pvr.hdhomerundvr\changelog.txt" normalize="unix"/>
<file path="pvr.hdhomerundvr\icon.png" source="pvr.hdhomerundvr\icon.png"/>
<file path="pvr.hdhomerundvr\LICENSE.txt" source="LICENSE" normalize="unix"/>
Expand Down
2 changes: 1 addition & 1 deletion manifest/linux-x86_64.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<zip>
<file path="pvr.hdhomerundvr\addon.xml" source="pvr.hdhomerundvr\addon-linux.xml" normalize="unix"/>
<file path="pvr.hdhomerundvr\addon.xml" source="tmp\addon-linux.xml" normalize="unix"/>
<file path="pvr.hdhomerundvr\changelog.txt" source="pvr.hdhomerundvr\changelog.txt" normalize="unix"/>
<file path="pvr.hdhomerundvr\icon.png" source="pvr.hdhomerundvr\icon.png"/>
<file path="pvr.hdhomerundvr\LICENSE.txt" source="LICENSE" normalize="unix"/>
Expand Down
2 changes: 1 addition & 1 deletion manifest/win32.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<zip>
<file path="pvr.hdhomerundvr\addon.xml" source="pvr.hdhomerundvr\addon-windows.xml" normalize="windows"/>
<file path="pvr.hdhomerundvr\addon.xml" source="tmp\addon-windows.xml" normalize="windows"/>
<file path="pvr.hdhomerundvr\changelog.txt" source="pvr.hdhomerundvr\changelog.txt" normalize="windows"/>
<file path="pvr.hdhomerundvr\icon.png" source="pvr.hdhomerundvr\icon.png"/>
<file path="pvr.hdhomerundvr\LICENSE.txt" source="LICENSE" normalize="windows"/>
Expand Down
3 changes: 0 additions & 3 deletions pvr.hdhomerundvr.sln
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pvr.hdhomerundvr", "pvr.hdhomerundvr", "{ADB6AA8A-8216-4963-8E01-B8439B5C3FAF}"
ProjectSection(SolutionItems) = preProject
pvr.hdhomerundvr\.nomedia = pvr.hdhomerundvr\.nomedia
pvr.hdhomerundvr\addon-android.xml = pvr.hdhomerundvr\addon-android.xml
pvr.hdhomerundvr\addon-linux.xml = pvr.hdhomerundvr\addon-linux.xml
pvr.hdhomerundvr\addon-windows.xml = pvr.hdhomerundvr\addon-windows.xml
pvr.hdhomerundvr\changelog.txt = pvr.hdhomerundvr\changelog.txt
pvr.hdhomerundvr\icon.png = pvr.hdhomerundvr\icon.png
EndProjectSection
Expand Down
15 changes: 0 additions & 15 deletions pvr.hdhomerundvr/addon-android.xml

This file was deleted.

15 changes: 0 additions & 15 deletions pvr.hdhomerundvr/addon-linux.xml

This file was deleted.

15 changes: 0 additions & 15 deletions pvr.hdhomerundvr/addon-windows.xml

This file was deleted.

30 changes: 15 additions & 15 deletions pvr.hdhomerundvr/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
v1.0.3
- Add "SD Channels" channel group
- Use IPv4 specific backend discovery URLs (ipv4.my.hdhomerun.com)
- Resolve issue with SQLite database being locked during initialization of a new connection
v1.0.3 (2017.03.05)
- Add "SD Channels" channel group
- Use IPv4 specific backend discovery URLs (ipv4.my.hdhomerun.com)
- Resolve issue with SQLite database being locked during initialization of a new connection

v1.0.2 (2017.02.06)
- Add option to enable discovery of extended (8 hour) Electronic Program Guide data
- Update SQLite database engine to v3.17.0
- (Linux) Switch to statically linked OpenSSL (1.0.2k) and zlib (1.2.8) libraries for better system compatibility
- (Android) Initial release for Android ARM and x86 devices. Experimental with known issues -- see documentation (https://github.com/djp952/pvr.hdhomerundvr/wiki)

v1.0.2
- Add option to enable discovery of extended (8 hour) Electronic Program Guide data
- Update SQLite database engine to v3.17.0
- (Linux) Switch to statically linked OpenSSL (1.0.2k) and zlib (1.2.8) libraries for better system compatibility
- (Android) Initial release for Android ARM and x86 devices. Experimental with known issues -- see documentation (https://github.com/djp952/pvr.hdhomerundvr/wiki)
v1.0.1 (2017.02.15)
- Fix minor problem with one database table not being truncated at startup
- (Linux) Use older GNU C++ Compiler (g++ 4.9) for better system compatibility

v1.0.1
- Fix minor problem with one database table not being truncated at startup
- (Linux) Use older GNU C++ Compiler (g++ 4.9) for better system compatibility

v1.0.0
- Initial release
v1.0.0 (2017.02.10)
- Initial release
18 changes: 18 additions & 0 deletions src/addon.xml.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.IO" #>
<?xml version="1.0" encoding="utf-8"?>
<addon id="pvr.hdhomerundvr" version="<#= new Version(File.ReadAllText(this.Host.ResolvePath(this.Host.ResolveParameterValue("", "", "versiontxt")))).ToString(3) #>" name="HDHomeRun DVR PVR Client" provider-name="Michael Brehm (djp952)">
<requires>
<import addon="xbmc.pvr" version="4.1.0"/>
</requires>
<extension point="xbmc.pvrclient" needs_configuration="false" library_<#= this.Host.ResolveParameterValue("", "", "platform") #>="<#= this.Host.ResolveParameterValue("", "", "dllname") #>"/>
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">HDHomeRun DVR PVR Client</summary>
<description lang="en_GB">HDHomeRun DVR frontend. Supports streaming Live TV, Recordings, Electronic Program Guide (EPG) and Timers. Requires a SiliconDust HDHomeRun DVR Service subscription (https://www.silicondust.com/dvr-service) and an active HDHomeRun RECORD device on the local network.</description>
<license>MIT License (https://opensource.org/licenses/MIT)</license>
<website>https://github.com/djp952/pvr.hdhomerundvr/wiki</website>
<source>https://github.com/djp952/pvr.hdhomerundvr</source>
<platform><#= this.Host.ResolveParameterValue("", "", "platform") #></platform>
</extension>
</addon>
20 changes: 20 additions & 0 deletions src/hdhomerundvr.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,31 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="addon.xml.tt">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(CommonProgramFiles)\Microsoft Shared\TextTemplating\14.0\TextTransform.exe" -a !!platform!windx -a !!dllname!zuki.pvr.hdhomerundvr.dll -a "!!versiontxt!$(SolutionDir)tmp\version\version.txt" -out "$(SolutionDir)tmp\addon-windows.xml" "%(FullPath)"
"$(CommonProgramFiles)\Microsoft Shared\TextTemplating\14.0\TextTransform.exe" -a !!platform!linux -a !!dllname!zuki.pvr.hdhomerundvr.so -a "!!versiontxt!$(SolutionDir)tmp\version\version.txt" -out "$(SolutionDir)tmp\addon-linux.xml" "%(FullPath)"
"$(CommonProgramFiles)\Microsoft Shared\TextTemplating\14.0\TextTransform.exe" -a !!platform!android -a !!dllname!libhdhomerundvr.so -a "!!versiontxt!$(SolutionDir)tmp\version\version.txt" -out "$(SolutionDir)tmp\addon-android.xml" "%(FullPath)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\addon-windows.xml;$(SolutionDir)tmp\addon-linux.xml;$(SolutionDir)tmp\addon-android.xml;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(CommonProgramFiles)\Microsoft Shared\TextTemplating\14.0\TextTransform.exe" -a !!platform!windx -a !!dllname!zuki.pvr.hdhomerundvr.dll -a "!!versiontxt!$(SolutionDir)tmp\version\version.txt" -out "$(SolutionDir)tmp\addon-windows.xml" "%(FullPath)"
"$(CommonProgramFiles)\Microsoft Shared\TextTemplating\14.0\TextTransform.exe" -a !!platform!linux -a !!dllname!zuki.pvr.hdhomerundvr.so -a "!!versiontxt!$(SolutionDir)tmp\version\version.txt" -out "$(SolutionDir)tmp\addon-linux.xml" "%(FullPath)"
"$(CommonProgramFiles)\Microsoft Shared\TextTemplating\14.0\TextTransform.exe" -a !!platform!android -a !!dllname!libhdhomerundvr.so -a "!!versiontxt!$(SolutionDir)tmp\version\version.txt" -out "$(SolutionDir)tmp\addon-android.xml" "%(FullPath)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\addon-windows.xml;$(SolutionDir)tmp\addon-linux.xml;$(SolutionDir)tmp\addon-android.xml;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating addon.xml files</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating addon.xml files</Message>
</CustomBuild>
<None Include="hdhomerundvr.def" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\tmp\version\version.rc" />
</ItemGroup>
<ItemGroup>
<Xml Include="..\tmp\addon-android.xml" />
<Xml Include="..\tmp\addon-linux.xml" />
<Xml Include="..\tmp\addon-windows.xml" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
20 changes: 20 additions & 0 deletions src/hdhomerundvr.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
<Filter Include="Header Files\compat\openssl">
<UniqueIdentifier>{0ce47b53-5ed3-4c52-b3ee-4af174fa40eb}</UniqueIdentifier>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{81164fcc-a1a1-481b-a904-95f9e7758c47}</UniqueIdentifier>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
Expand Down Expand Up @@ -151,4 +155,20 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="addon.xml.tt">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<Xml Include="..\tmp\addon-android.xml">
<Filter>Generated Files</Filter>
</Xml>
<Xml Include="..\tmp\addon-linux.xml">
<Filter>Generated Files</Filter>
</Xml>
<Xml Include="..\tmp\addon-windows.xml">
<Filter>Generated Files</Filter>
</Xml>
</ItemGroup>
</Project>

0 comments on commit 5be789a

Please sign in to comment.