Skip to content

Commit

Permalink
Merge pull request #224 from phunkyfish/add-timezone-shift
Browse files Browse the repository at this point in the history
New settings format, PVR multi-instance and epg timeshift setting
  • Loading branch information
phunkyfish authored Jun 22, 2024
2 parents 49ac15a + cf2623c commit f98b760
Show file tree
Hide file tree
Showing 46 changed files with 1,172 additions and 382 deletions.
55 changes: 31 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,45 @@ set(DEPLIBS
${JSONCPP_LIBRARIES})

set(BASE_SOURCES
src/base/Cache.cpp)
src/stalker/base/Cache.cpp)

set(SOURCES
src/ChannelManager.cpp
src/CWatchdog.cpp
src/GuideManager.cpp
src/HTTPSocket.cpp
src/SAPI.cpp
src/SData.cpp
src/SessionManager.cpp
src/Utils.cpp
src/XMLTV.cpp)
src/addon.cpp
src/StalkerInstance.cpp
src/stalker/AddonSettings.cpp
src/stalker/ChannelManager.cpp
src/stalker/CWatchdog.cpp
src/stalker/GuideManager.cpp
src/stalker/HTTPSocket.cpp
src/stalker/InstanceSettings.cpp
src/stalker/SAPI.cpp
src/stalker/SessionManager.cpp
src/stalker/SettingsMigration.cpp
src/stalker/Utils.cpp
src/stalker/XMLTV.cpp)

set(STALKER_SOURCES
${BASE_SOURCES}
${SOURCES})

set(STALKER_HEADERS
src/ChannelManager.h
src/CWatchdog.h
src/Error.h
src/GuideManager.h
src/HTTPSocket.h
src/SAPI.h
src/SData.h
src/SessionManager.h
src/Settings.h
src/Utils.h
src/XMLTV.h
src/base/Cache.h
src/base/ChannelManager.h
src/base/GuideManager.h)
src/addon.h
src/StalkerInstance.h
src/stalker/AddonSettings.h
src/stalker/ChannelManager.h
src/stalker/CWatchdog.h
src/stalker/Error.h
src/stalker/GuideManager.h
src/stalker/HTTPSocket.h
src/stalker/InstanceSettings.h
src/stalker/SAPI.h
src/stalker/SessionManager.h
src/stalker/SettingsMigration.h
src/stalker/Utils.h
src/stalker/XMLTV.h
src/stalker/base/Cache.h
src/stalker/base/ChannelManager.h
src/stalker/base/GuideManager.h)

build_addon(pvr.stalker STALKER DEPLIBS)

Expand Down
59 changes: 59 additions & 0 deletions build-install-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash

set -e

if [ "$#" -ne 1 ] || ! [ -d "$1" ]; then
echo "Usage: $0 <XBMC-SRC-DIR>" >&2
exit 1
fi

if [[ "$OSTYPE" != "darwin"* ]]; then
echo "Error: Script only for use on MacOSX" >&2
exit 1
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
if [[ "$1" = /* ]]
then
#absolute path
SCRIPT_DIR=""
else
#relative
SCRIPT_DIR="$SCRIPT_DIR/"
fi

BINARY_ADDONS_TARGET_DIR="$1/tools/depends/target/binary-addons"
MACOSX_BINARY_ADDONS_TARGET_DIR=""
KODI_ADDONS_DIR="$HOME/Library/Application Support/Kodi/addons"
ADDON_NAME=`basename -s .git \`git config --get remote.origin.url\``

if [ ! -d "$BINARY_ADDONS_TARGET_DIR" ]; then
echo "Error: Could not find binary addons directory at: $BINARY_ADDONS_TARGET_DIR" >&2
exit 1
fi

for DIR in "$BINARY_ADDONS_TARGET_DIR/"macosx*; do
if [ -d "${DIR}" ]; then
MACOSX_BINARY_ADDONS_TARGET_DIR="${DIR}"
break
fi
done

if [ -z "$MACOSX_BINARY_ADDONS_TARGET_DIR" ]; then
echo "Error: Could not find binary addons build directory at: $BINARY_ADDONS_TARGET_DIR/macosx*" >&2
exit 1
fi

if [ ! -d "$KODI_ADDONS_DIR" ]; then
echo "Error: Kodi addons dir does not exist at: $KODI_ADDONS_DIR" >&2
exit 1
fi

cd "$MACOSX_BINARY_ADDONS_TARGET_DIR"
make

XBMC_BUILD_ADDON_INSTALL_DIR=$(cd "$SCRIPT_DIR$1/addons/$ADDON_NAME" 2> /dev/null && pwd -P)
rm -rf "$KODI_ADDONS_DIR/$ADDON_NAME"
echo "Removed previous addon build from: $KODI_ADDONS_DIR"
cp -rf "$XBMC_BUILD_ADDON_INSTALL_DIR" "$KODI_ADDONS_DIR"
echo "Copied new addon build to: $KODI_ADDONS_DIR"
2 changes: 1 addition & 1 deletion depends/common/libxml2/libxml2.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
libxml2-2.9.10 http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz
libxml2 http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz
24 changes: 13 additions & 11 deletions depends/common/zlib/01-build-static.patch
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,10 +183,11 @@
@@ -149,12 +149,12 @@
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)

-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})

-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
-set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
-set_target_properties(zlib PROPERTIES SOVERSION 1)
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+if(BUILD_SHARED_LIBS)
+ set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
+ set_target_properties(zlib PROPERTIES SOVERSION 1)
+endif()

if(NOT CYGWIN)
# This property causes shared libraries on Linux to have the full version
@@ -201,7 +202,7 @@
@@ -169,7 +169,7 @@

if(UNIX)
# On unix-like platforms the library is almost always called libz
- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
if(NOT APPLE)
if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX))
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
@@ -211,7 +212,7 @@
@@ -179,7 +179,7 @@
endif()

if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
- install(TARGETS zlib zlibstatic
+ install(TARGETS zlib
Expand Down
11 changes: 11 additions & 0 deletions depends/common/zlib/02-install-pkgconfig-in-lib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,7 @@
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages")
-set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
+set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")

include(CheckTypeSize)
include(CheckFunctionExists)
1 change: 1 addition & 0 deletions depends/common/zlib/flags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-DZLIB_BUILD_EXAMPLES=OFF
2 changes: 1 addition & 1 deletion depends/common/zlib/zlib.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32
2 changes: 1 addition & 1 deletion depends/common/zlib/zlib.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
zlib http://mirrors.kodi.tv/build-deps/sources/zlib-1.2.11.tar.gz
zlib https://www.zlib.net/zlib-1.3.1.tar.xz
2 changes: 1 addition & 1 deletion depends/windows/libxml2/libxml2.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
libxml2-2.9.10 http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz
libxml2 http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz
2 changes: 1 addition & 1 deletion pvr.stalker/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.stalker"
version="21.0.1"
version="21.1.0"
name="Stalker Client"
provider-name="Jamal Edey">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
5 changes: 5 additions & 0 deletions pvr.stalker/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v21.1.0
- Move to new settings format and support PVR multi-instance
- Note that only the first portal will be migrated in settings, the other portal will need to be set up manually
- Add setting for EPG timeShift

v21.0.1
- Translations updates from Weblate
- ar_sa, ast_es, be_by, bs_ba, cs_cz, cy_gb, de_de, en_au, eo, es_ar, es_es, et_ee, fa_af, fa_ir, fi_fi, fo_fo, fr_fr, hr_hr, hy_am, id_id, it_it, ja_jp, mi, mk_mk, mn_mn, my_mm, ru_ru, si_lk, sk_sk, sq_al, sv_se, ta_in, te_in, tg_tj, th_th, uk_ua, uz_uz
Expand Down
Loading

0 comments on commit f98b760

Please sign in to comment.