Skip to content

Commit

Permalink
Merge pull request #5 from AlwinEsch/Leia-change
Browse files Browse the repository at this point in the history
[Leia] A bit rework to have work again
  • Loading branch information
AlwinEsch authored Sep 27, 2019
2 parents 38b341f + c3054aa commit 15ace49
Show file tree
Hide file tree
Showing 34 changed files with 1,174 additions and 668 deletions.
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# build artifacts
build/
visualization.*/addon.xml

# Debian build files
debian/changelog
debian/files
debian/*.log
debian/*.substvars
debian/.debhelper/
debian/tmp/
debian/kodi-visualization-*/
obj-x86_64-linux-gnu/

# commonly used editors
# vim
*.swp

# Eclipse
*.project
*.cproject
.classpath
*.sublime-*
.settings/

# KDevelop 4
*.kdev4

# gedit
*~

# CLion
/.idea

# clion
.idea/

# to prevent add after a "git format-patch VALUE" and "git add ." call
/*.patch

# to prevent add if project code opened by Visual Studio over CMake file
.vs/
45 changes: 45 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
language: cpp

#
# Define the build matrix
#
# Travis defaults to building on Ubuntu Trusty when building on
# Linux. We need Xenial in order to get up to date versions of
# cmake and g++.
#
env:
global:
- app_id=visualization.starburst

matrix:
include:
- os: linux
dist: xenial
sudo: required
compiler: gcc
- os: linux
dist: xenial
sudo: required
compiler: clang
- os: osx
osx_image: xcode9
- os: osx
osx_image: xcode9.4

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev; fi

#
# 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
- cd ${app_id} && mkdir build && cd build
- mkdir -p definition/${app_id}
- echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt
- cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=$TRAVIS_BUILD_DIR/.. -DADDONS_DEFINITION_DIR=$TRAVIS_BUILD_DIR/build/definition -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../xbmc/addons -DPACKAGE_ZIP=1 $TRAVIS_BUILD_DIR/../xbmc/cmake/addons

script: make
30 changes: 19 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
cmake_minimum_required(VERSION 3.5)
project(visualization.starburst)

cmake_minimum_required(VERSION 2.6)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})

find_package(Kodi REQUIRED)
find_package(OpenGL REQUIRED)

add_definitions(-DHAS_SDL_OPENGL)
include_directories(${OpenGL_INCLUDE_DIR}
${KODI_INCLUDE_DIR})
find_package(glm REQUIRED)

if(APP_RENDER_SYSTEM STREQUAL "gl" OR NOT APP_RENDER_SYSTEM)
find_package(OpenGl REQUIRED)
set(DEPLIBS ${OPENGL_LIBRARIES})
set(includes ${OPENGL_INCLUDE_DIR})
add_definitions(${OPENGL_DEFINITIONS})
else()
find_package(OpenGLES REQUIRED)
set(DEPLIBS ${OPENGLES_LIBRARIES})
set(includes ${OPENGLES_INCLUDE_DIR})
add_definitions(${OPENGLES_DEFINITIONS})
endif()

include_directories(${GLM_INCLUDE_DIR}
${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways
${PROJECT_SOURCE_DIR}/lib)

set(STARBURST_SOURCES src/StarBurst.cpp)

set(STARBURST_HEADERS src/timer.h
src/types.h)

SET(DEPLIBS ${OPENGL_LIBRARIES})
set(STARBURST_HEADERS src/StarBurst.h)

build_addon(visualization.starburst STARBURST DEPLIBS)

Expand Down
54 changes: 54 additions & 0 deletions FindOpenGLES.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#.rst:
# FindOpenGLES
# ------------
# Finds the OpenGLES2 library
#
# This will define the following variables::
#
# OPENGLES_FOUND - system has OpenGLES
# OPENGLES_INCLUDE_DIRS - the OpenGLES include directory
# OPENGLES_LIBRARIES - the OpenGLES libraries
# OPENGLES_DEFINITIONS - the OpenGLES definitions

if(CORE_PLATFORM_NAME_LC STREQUAL rbpi)
set(_brcmprefix brcm)
endif()

if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_OPENGLES ${_brcmprefix}glesv2 QUIET)
endif()

if(NOT CORE_SYSTEM_NAME STREQUAL darwin_embedded AND NOT CORE_SYSTEM_NAME STREQUAL ios)
find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h
PATHS ${PC_OPENGLES_INCLUDEDIR})
find_library(OPENGLES_gl_LIBRARY NAMES ${_brcmprefix}GLESv2
PATHS ${PC_OPENGLES_LIBDIR})
else()
find_library(OPENGLES_gl_LIBRARY NAMES OpenGLES
PATHS ${CMAKE_OSX_SYSROOT}/System/Library
PATH_SUFFIXES Frameworks
NO_DEFAULT_PATH)
set(OPENGLES_INCLUDE_DIR ${OPENGLES_gl_LIBRARY}/Headers)
endif()

find_path(OPENGLES3_INCLUDE_DIR GLES3/gl3.h)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OpenGLES
REQUIRED_VARS OPENGLES_gl_LIBRARY OPENGLES_INCLUDE_DIR)

find_path(OPENGLES3_INCLUDE_DIR GLES3/gl3.h
PATHS ${PC_OPENGLES_INCLUDEDIR})

if(OPENGLES_FOUND)
set(OPENGLES_LIBRARIES ${OPENGLES_gl_LIBRARY})
if(OPENGLES3_INCLUDE_DIR)
set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR} ${OPENGLES3_INCLUDE_DIR})
set(OPENGLES_DEFINITIONS -DHAS_GLES=3)
mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES3_INCLUDE_DIR OPENGLES_gl_LIBRARY)
else()
set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR})
set(OPENGLES_DEFINITIONS -DHAS_GLES=2)
mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES_gl_LIBRARY)
endif()
endif()
41 changes: 41 additions & 0 deletions FindOpenGl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#.rst:
# FindOpenGl
# ----------
# Finds the FindOpenGl library
#
# This will define the following variables::
#
# OPENGL_FOUND - system has OpenGl
# OPENGL_INCLUDE_DIRS - the OpenGl include directory
# OPENGL_LIBRARIES - the OpenGl libraries
# OPENGL_DEFINITIONS - the OpenGl definitions

if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_OPENGL gl QUIET)
endif()

if(NOT CORE_SYSTEM_NAME STREQUAL osx)
find_path(OPENGL_INCLUDE_DIR GL/gl.h
PATHS ${PC_OPENGL_gl_INCLUDEDIR})
find_library(OPENGL_gl_LIBRARY NAMES GL
PATHS ${PC_OPENGL_gl_LIBDIR})
else()
find_library(OPENGL_gl_LIBRARY NAMES OpenGL
PATHS ${CMAKE_OSX_SYSROOT}/System/Library
PATH_SUFFIXES Frameworks
NO_DEFAULT_PATH)
set(OPENGL_INCLUDE_DIR ${OPENGL_gl_LIBRARY}/Headers)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OpenGl
REQUIRED_VARS OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)

if(OPENGL_FOUND)
set(OPENGL_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR})
set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY})
set(OPENGL_DEFINITIONS -DHAS_GL=1)
endif()

mark_as_advanced(OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY)

1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
buildPlugin(version: "Leia", platforms: ['android-armv7', 'android-aarch64', 'ios-armv7', 'ios-aarch64', 'osx-x86_64', 'ubuntu-ppa'])
6 changes: 6 additions & 0 deletions debian/changelog.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kodi-visualization-starburst (#PACKAGEVERSION#-#TAGREV#~#DIST#) #DIST#; urgency=low

[ kodi ]
* autogenerated dummy changelog

-- Nobody <nobody@kodi.tv> Sat, 01 Jun 2013 00:59:22 +0200
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
22 changes: 22 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Source: kodi-visualization-starburst
Priority: extra
Maintainer: Nobody <nobody@kodi.tv>
Build-Depends: debhelper (>= 9.0.0), cmake, kodi-addon-dev,
libgles2-mesa-dev [arm64 armhf], libgl1-mesa-dev [i386 amd64]
Standards-Version: 4.1.2
Section: libs
Homepage: http://kodi.tv

Package: kodi-visualization-starburst
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Starburst visualization for Kodi
starburst visualization for Kodi

Package: kodi-visualization-starburst-dbg
Section: debug
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Debug symbols for starburst visualization for Kodi
debug symbols for starburst visualization for Kodi
21 changes: 21 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: visualization.starburst

Files: *
Copyright: 2005-2019 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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
2 changes: 2 additions & 0 deletions debian/kodi-visualization-starburst.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/lib/*
usr/share/*
23 changes: 23 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
dh $@

override_dh_auto_configure:
dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DUSE_LTO=1

override_dh_strip:
dh_strip --dbg-package=kodi-visualization-starburst-dbg

override_dh_installdocs:
dh_installdocs --link-doc=kodi-visualization-starburst

1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
1 change: 1 addition & 0 deletions depends/common/glm/flags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-DGLM_TEST_ENABLE_CXX_11=1 -DGLM_TEST_ENABLE=0 -DGLM_TEST_ENABLE_SIMD_SSE2=0 -DCMAKE_INSTALL_LIBDIR=lib
1 change: 1 addition & 0 deletions depends/common/glm/glm.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7f093f11c49877716bab96813c2e834db6839095281c8c0c65c60c8bdb9504a3
1 change: 1 addition & 0 deletions depends/common/glm/glm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
glm https://github.com/g-truc/glm/archive/47031aa4b7b079716e4cac496819e7f464b6a713.tar.gz
1 change: 1 addition & 0 deletions depends/osx/glm/flags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-DGLM_TEST_ENABLE_CXX_11=1 -DGLM_TEST_ENABLE=0 -DGLM_TEST_ENABLE_SIMD_SSE2=1 -DCMAKE_INSTALL_LIBDIR=lib
1 change: 1 addition & 0 deletions depends/osx/glm/glm.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7f093f11c49877716bab96813c2e834db6839095281c8c0c65c60c8bdb9504a3
1 change: 1 addition & 0 deletions depends/osx/glm/glm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
glm https://github.com/g-truc/glm/archive/47031aa4b7b079716e4cac496819e7f464b6a713.tar.gz
Loading

0 comments on commit 15ace49

Please sign in to comment.