Skip to content

Commit

Permalink
Merge pull request #29 from AlwinEsch/Matrix-change
Browse files Browse the repository at this point in the history
[Matrix] Update to use Matrix branch
  • Loading branch information
AlwinEsch committed Feb 6, 2020
2 parents 0469c01 + 7a80045 commit 621a40c
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 35 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Expand Up @@ -18,17 +18,15 @@ matrix:
sudo: required
compiler: clang
- os: osx
osx_image: xcode9
- os: osx
osx_image: xcode9.4
osx_image: xcode10.2

#
# The addon source is automatically checked out in $TRAVIS_BUILD_DIR,
# we'll put the Kodi source on the same level
#
before_script:
- cd $TRAVIS_BUILD_DIR/..
- git clone --branch Leia --depth=1 https://github.com/xbmc/xbmc.git
- git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
- cd ${APPID}
- mkdir build
- cd build
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
@@ -1 +1 @@
buildPlugin(version: "Leia")
buildPlugin(version: "Matrix")
20 changes: 11 additions & 9 deletions README.md
@@ -1,21 +1,23 @@
# Vorbis Audio Encoder add-on for Kodi
# VORBIS Audio Encoder add-on for Kodi

This is a [Kodi] (http://kodi.tv) Vorbis audio encoder add-on.
This is a [Kodi] (https://kodi.tv) VORBIS audio encoder add-on.

#### CI Testing
[![Build Status](https://travis-ci.org/xbmc/audioencoder.vorbis.svg?branch=master)](https://travis-ci.org/xbmc/audioencoder.vorbis)
[![Build Status](https://travis-ci.org/xbmc/audioencoder.vorbis.svg?branch=Matrix)](https://travis-ci.org/xbmc/audioencoder.vorbis/branches)
[![Build Status](https://dev.azure.com/teamkodi/binary-addons/_apis/build/status/xbmc.audioencoder.vorbis?branchName=Matrix)](https://dev.azure.com/teamkodi/binary-addons/_build/latest?definitionId=23&branchName=Matrix)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/5120/badge.svg)](https://scan.coverity.com/projects/5120)
<!--- [![Build Status](https://ci.appveyor.com/api/projects/status/github/xbmc/audioencoder.vorbis?branch=Matrix&svg=true)](https://ci.appveyor.com/project/xbmc/audioencoder-vorbis?branch=Matrix) -->

## Build instructions

When building the add-on you have to use the correct branch depending on which version of Kodi you're building against.
For example, if you're building the `Jarvis` branch of Kodi you should checkout the `Jarvis` branch of this repository.
Add-on releases are also tagged regularly.
When building the addon you have to use the correct branch depending on which version of Kodi you're building against.
If you want to build the addon to be compatible with the latest kodi `master` commit, you need to checkout the branch with the current kodi codename.
Also make sure you follow this README from the branch in question.

### Linux

1. `git clone --branch Leia https://github.com/xbmc/xbmc.git`
2. `git clone https://github.com/audioencoder.vorbis/audioencoder.vorbis.git`
1. `git clone --branch master https://github.com/xbmc/xbmc.git`
2. `git clone --branch Matrix https://github.com/audioencoder.vorbis/audioencoder.vorbis.git`
3. `cd audioencoder.vorbis && mkdir build && cd build`
4. `cmake -DADDONS_TO_BUILD=audioencoder.vorbis -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/project/cmake/addons`
5. `make`
Expand All @@ -25,4 +27,4 @@ the add-on will be available as a system add-on.

##### Useful links

* [Kodi's add-ons development support] (http://forum.kodi.tv/forumdisplay.php?fid=26)
* [Kodi's add-ons development support] (https://forum.kodi.tv/forumdisplay.php?fid=26)
32 changes: 18 additions & 14 deletions appveyor.yml
@@ -1,6 +1,6 @@
version: BuildNr.{build}

image: Visual Studio 2015
image: Visual Studio 2017

shallow_clone: true

Expand All @@ -10,24 +10,28 @@ environment:
app_id: audioencoder.vorbis

matrix:
- GENERATOR: "Visual Studio 14"
CONFIG: Release
- GENERATOR: "Visual Studio 14 Win64"
CONFIG: Release
- GENERATOR: "Visual Studio 14 Win64"
CONFIG: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.14393.0"
- GENERATOR: "Visual Studio 14 ARM"
CONFIG: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.14393.0"
- GENERATOR: "Visual Studio 15 2017"
ARCHITECTURE: Win32
CONFIGURATION: Release
- GENERATOR: "Visual Studio 15 2017"
ARCHITECTURE: x64
CONFIGURATION: Release
- GENERATOR: "Visual Studio 15 2017"
ARCHITECTURE: x64
CONFIGURATION: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
- GENERATOR: "Visual Studio 15 2017"
ARCHITECTURE: ARM64
CONFIGURATION: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"

build_script:
- cd ..
- git clone --branch Leia --depth=1 https://github.com/xbmc/xbmc.git
- git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
- cd %app_id%
- mkdir build
- cd build
- mkdir -p definition\%app_id%
- echo %app_id% %APPVEYOR_BUILD_FOLDER% %APPVEYOR_REPO_COMMIT% > definition\%app_id%\%app_id%.txt
- cmake -T host=x64 -G "%GENERATOR%" %WINSTORE% -DADDONS_TO_BUILD=%app_id% -DCMAKE_BUILD_TYPE=%CONFIG% -DADDONS_DEFINITION_DIR=%APPVEYOR_BUILD_FOLDER%/build/definition -DADDON_SRC_PREFIX=../.. -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
- cmake --build . --config %CONFIG% --target %app_id%
- cmake -T host=x64 -G "%GENERATOR%" -A %ARCHITECTURE% %WINSTORE% -DADDONS_TO_BUILD=%app_id% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DADDONS_DEFINITION_DIR=%APPVEYOR_BUILD_FOLDER%/build/definition -DADDON_SRC_PREFIX=../.. -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
- cmake --build . --config %CONFIGURATION% --target %app_id%
7 changes: 6 additions & 1 deletion audioencoder.vorbis/addon.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="audioencoder.vorbis"
version="2.0.3"
version="2.1.0"
name="Vorbis Audio Encoder"
provider-name="spiff">
<requires>@ADDON_DEPENDS@</requires>
Expand All @@ -13,5 +13,10 @@
<summary lang="en">Vorbis audio compression</summary>
<description lang="en">Vorbis is a general purpose perceptual audio CODEC intended to allow maximum encoder flexibility, thus allowing it to scale competitively over an exceptionally wide range of bitrates.</description>
<platform>@PLATFORM@</platform>
<license>GPL-2.0</license>
<source>https://github.com/xbmc/audioencoder.vorbis</source>
<assets>
<icon>icon.png</icon>
</assets>
</extension>
</addon>
2 changes: 1 addition & 1 deletion debian/compat
@@ -1 +1 @@
8
9
6 changes: 3 additions & 3 deletions debian/control
@@ -1,8 +1,8 @@
Source: kodi-audioencoder-vorbis
Priority: extra
Maintainer: Arne Morten Kvarving <spiff@xbmc.org>
Build-Depends: debhelper (>= 8.0.0), cmake, kodi-addon-dev, make, libtool, libvorbis-dev
Standards-Version: 3.9.6
Maintainer: Nobody <nobody@kodi.tv>
Build-Depends: debhelper (>= 9.0.0), cmake, kodi-addon-dev, make, libtool, libvorbis-dev
Standards-Version: 4.1.2
Section: libs
Homepage: http://kodi.org

Expand Down
2 changes: 2 additions & 0 deletions debian/copyright
Expand Up @@ -3,6 +3,7 @@ Upstream-Name: audioencoder.vorbis

Files: *
Copyright: Arne Morten Kvarving <arne.morten.kvarving@sintef.no>
2013-2020 Team Kodi
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -24,6 +25,7 @@ License: GPL-2+
Files: debian/*
Copyright: 2013 Arne Morten Kvarving <arne.morten.kvarving@sintef.no>
2013 wsnipex <wsnipex@a1.net>
2013-2020 Team Kodi
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion debian/source/format
@@ -1 +1 @@
3.0 (native)
3.0 (quilt)
32 changes: 32 additions & 0 deletions depends/common/vorbis/0001-fix-windows-arm-build.patch
@@ -0,0 +1,32 @@
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -65,6 +65,18 @@ if(MSVC)
list(APPEND VORBIS_SOURCES ../win32/vorbis.def)
list(APPEND VORBISENC_SOURCES ../win32/vorbisenc.def)
list(APPEND VORBISFILE_SOURCES ../win32/vorbisfile.def)
+
+ include(CheckSymbolExists)
+ check_symbol_exists(_X86_ "Windows.h" _X86_)
+ check_symbol_exists(_AMD64_ "Windows.h" _X64_)
+ check_symbol_exists(_ARM_ "Windows.h" _ARM_)
+ check_symbol_exists(_ARM64_ "Windows.h" _ARM64_)
+
+ if(_ARM64_)
+ add_definitions(-D_M_ARM -D_M_ARM64)
+ elseif(_ARM_)
+ add_definitions(-D_M_ARM)
+ endif()
endif()

include_directories(../include)
--- a/lib/os.h
+++ b/lib/os.h
@@ -147,7 +147,7 @@ static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){

/* Optimized code path for x86_64 builds. Uses SSE2 intrinsics. This can be
done safely because all x86_64 CPUs supports SSE2. */
-#if (defined(_MSC_VER) && defined(_WIN64)) || (defined(__GNUC__) && defined (__x86_64__))
+#if (defined(_MSC_VER) && defined(_WIN64) && !defined(_M_ARM)) || (defined(__GNUC__) && defined (__x86_64__))
# define VORBIS_FPU_CONTROL

typedef ogg_int16_t vorbis_fpu_control;
2 changes: 1 addition & 1 deletion src/EncoderVorbis.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2019 Team Kodi
* Copyright (C) 2005-2020 Team Kodi
* http://kodi.tv
*
* This Program is free software; you can redistribute it and/or modify
Expand Down

0 comments on commit 621a40c

Please sign in to comment.