aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Hochecker <fernetmenta@online.de>2015-02-28 21:21:44 +0100
committerRainer Hochecker <fernetmenta@online.de>2015-03-04 21:08:12 +0100
commit127663da0ed4cff015d9d0070ccacf543282dd82 (patch)
treea528f4463625c35bd6b1c0a93343e9c72b6891b7
parent2ad47418b72499db48830121294a2b9ca0950861 (diff)
split addon gui for skin and binary addons
-rw-r--r--.gitignore5
-rw-r--r--Makefile.in4
-rw-r--r--Makefile.include.in2
-rw-r--r--addons/kodi.guilib/addon.xml.in7
-rw-r--r--addons/library.kodi.guilib/libKODI_guilib.h (renamed from addons/library.xbmc.gui/libXBMC_gui.h)128
-rw-r--r--configure.in2
-rw-r--r--lib/addons/library.kodi.guilib/Makefile.in34
-rw-r--r--lib/addons/library.kodi.guilib/libKODI_guilib.cpp (renamed from lib/addons/library.xbmc.gui/libXBMC_gui.cpp)3
-rw-r--r--lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj (renamed from lib/addons/library.xbmc.gui/project/VS2010Express/libXBMC_gui.vcxproj)12
-rw-r--r--lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj.filters (renamed from lib/addons/library.xbmc.gui/project/VS2010Express/libXBMC_gui.vcxproj.filters)2
-rw-r--r--lib/addons/library.kodi.guilib/project/VS2010Express/post-build.ps121
-rw-r--r--lib/addons/library.xbmc.gui/Makefile.in27
-rw-r--r--project/VS2010Express/XBMC for Windows.sln2
-rw-r--r--xbmc/addons/AddonCallbacks.h3
-rw-r--r--xbmc/addons/addon-bindings.mk2
-rw-r--r--xbmc/addons/include/xbmc_pvr_dll.h6
-rw-r--r--xbmc/pvr/addons/PVRClient.cpp6
17 files changed, 155 insertions, 111 deletions
diff --git a/.gitignore b/.gitignore
index d850d25b2f..9d66cc268d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -125,6 +125,7 @@ config.log
/addons/pvr.*
/addons/xbmc.addon/addon.xml
/addons/xbmc.json/addon.xml
+/addons/kodi.guilib/addon.xml
# /lib/
/lib/Makefile
@@ -982,8 +983,8 @@ lib/cpluff/stamp-h1
/addons/library.xbmc.addon/libXBMC_addon.lib
/addons/library.xbmc.codec/libXBMC_codec.dll
/addons/library.xbmc.codec/libXBMC_codec.lib
-/addons/library.xbmc.gui/libXBMC_gui.dll
-/addons/library.xbmc.gui/libXBMC_gui.lib
+/addons/library.kodi.guilib/libKODI_guilib.dll
+/addons/library.kodi.guilib/libKODI_guilib.lib
/addons/library.xbmc.pvr/libXBMC_pvr.dll
/addons/library.xbmc.pvr/libXBMC_pvr.lib
diff --git a/Makefile.in b/Makefile.in
index 9ad46e5d96..a64b192bb4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -253,7 +253,7 @@ LIBADDON_DIRS=\
lib/addons/library.xbmc.addon \
lib/addons/library.xbmc.codec \
lib/addons/library.xbmc.pvr \
- lib/addons/library.xbmc.gui \
+ lib/addons/library.kodi.guilib \
CONFLUENCE_MEDIA=addons/skin.confluence/media
SKIN_DIRS=$(CONFLUENCE_MEDIA)
@@ -402,7 +402,7 @@ screensavers: $(SS_DIRS)
libaddon: exports
$(MAKE) -C lib/addons/library.xbmc.addon
$(MAKE) -C lib/addons/library.xbmc.codec
- $(MAKE) -C lib/addons/library.xbmc.gui
+ $(MAKE) -C lib/addons/library.kodi.guilib
$(MAKE) -C lib/addons/library.xbmc.pvr
dvdpcodecs: dllloader
$(MAKE) -C lib/libdvd
diff --git a/Makefile.include.in b/Makefile.include.in
index a53b83b8c5..782dc07b31 100644
--- a/Makefile.include.in
+++ b/Makefile.include.in
@@ -39,7 +39,7 @@ LDFLAGS+=@LDFLAGS@
LDFLAGS_FOR_BUILD+=@LDFLAGS_FOR_BUILD@
INCLUDES+=-I@abs_top_srcdir@/lib
INCLUDES+=-I@abs_top_srcdir@/xbmc
-INCLUDES+=-I@abs_top_srcdir@/addons/library.xbmc.gui
+INCLUDES+=-I@abs_top_srcdir@/addons/library.kodi.guilib
INCLUDES+=-I@abs_top_srcdir@/addons/library.xbmc.addon
INCLUDES+=-I@abs_top_srcdir@/addons/library.xbmc.pvr
INCLUDES+=-I@abs_top_srcdir@/addons/library.xbmc.codec
diff --git a/addons/kodi.guilib/addon.xml.in b/addons/kodi.guilib/addon.xml.in
new file mode 100644
index 0000000000..936a9e3222
--- /dev/null
+++ b/addons/kodi.guilib/addon.xml.in
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<addon id="kodi.guilib" version="@guilib_version@" provider-name="Team-Kodi">
+ <backwards-compatibility abi="@guilib_version_min@"/>
+ <requires>
+ <import addon="xbmc.core" version="0.1.0"/>
+ </requires>
+</addon>
diff --git a/addons/library.xbmc.gui/libXBMC_gui.h b/addons/library.kodi.guilib/libKODI_guilib.h
index 8dbc38b8f6..26be664c07 100644
--- a/addons/library.xbmc.gui/libXBMC_gui.h
+++ b/addons/library.kodi.guilib/libKODI_guilib.h
@@ -29,17 +29,17 @@
typedef void* GUIHANDLE;
#ifdef _WIN32
-#define GUI_HELPER_DLL "\\library.xbmc.gui\\libXBMC_gui" ADDON_HELPER_EXT
+#define GUI_HELPER_DLL "\\library.kodi.guilib\\libKODI_guilib" ADDON_HELPER_EXT
#else
-#define GUI_HELPER_DLL_NAME "libXBMC_gui-" ADDON_HELPER_ARCH ADDON_HELPER_EXT
-#define GUI_HELPER_DLL "/library.xbmc.gui/" GUI_HELPER_DLL_NAME
+#define GUI_HELPER_DLL_NAME "libKODI_guilib-" ADDON_HELPER_ARCH ADDON_HELPER_EXT
+#define GUI_HELPER_DLL "/library.kodi.guilib/" GUI_HELPER_DLL_NAME
#endif
/* current ADDONGUI API version */
-#define XBMC_GUI_API_VERSION "5.8.0"
+#define KODI_GUILIB_API_VERSION "5.8.0"
/* min. ADDONGUI API version */
-#define XBMC_GUI_MIN_API_VERSION "5.8.0"
+#define KODI_GUILIB_MIN_API_VERSION "5.8.0"
#define ADDON_ACTION_PREVIOUS_MENU 10
#define ADDON_ACTION_CLOSE_DIALOG 51
@@ -54,21 +54,21 @@ class CAddonGUIRenderingControl;
class CAddonGUISliderControl;
class CAddonGUISettingsSliderControl;
-class CHelper_libXBMC_gui
+class CHelper_libKODI_guilib
{
public:
- CHelper_libXBMC_gui()
+ CHelper_libKODI_guilib()
{
- m_libXBMC_gui = NULL;
- m_Handle = NULL;
+ m_libKODI_guilib = NULL;
+ m_Handle = NULL;
}
- ~CHelper_libXBMC_gui()
+ ~CHelper_libKODI_guilib()
{
- if (m_libXBMC_gui)
+ if (m_libKODI_guilib)
{
GUI_unregister_me(m_Handle, m_Callbacks);
- dlclose(m_libXBMC_gui);
+ dlclose(m_libKODI_guilib);
}
}
@@ -89,207 +89,207 @@ public:
}
#endif
- m_libXBMC_gui = dlopen(libBasePath.c_str(), RTLD_LAZY);
- if (m_libXBMC_gui == NULL)
+ m_libKODI_guilib = dlopen(libBasePath.c_str(), RTLD_LAZY);
+ if (m_libKODI_guilib == NULL)
{
fprintf(stderr, "Unable to load %s\n", dlerror());
return false;
}
GUI_register_me = (void* (*)(void *HANDLE))
- dlsym(m_libXBMC_gui, "GUI_register_me");
+ dlsym(m_libKODI_guilib, "GUI_register_me");
if (GUI_register_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_unregister_me = (void (*)(void *HANDLE, void *CB))
- dlsym(m_libXBMC_gui, "GUI_unregister_me");
+ dlsym(m_libKODI_guilib, "GUI_unregister_me");
if (GUI_unregister_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_lock = (void (*)(void *HANDLE, void *CB))
- dlsym(m_libXBMC_gui, "GUI_lock");
+ dlsym(m_libKODI_guilib, "GUI_lock");
if (GUI_lock == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_unlock = (void (*)(void *HANDLE, void *CB))
- dlsym(m_libXBMC_gui, "GUI_unlock");
+ dlsym(m_libKODI_guilib, "GUI_unlock");
if (GUI_unlock == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_get_screen_height = (int (*)(void *HANDLE, void *CB))
- dlsym(m_libXBMC_gui, "GUI_get_screen_height");
+ dlsym(m_libKODI_guilib, "GUI_get_screen_height");
if (GUI_get_screen_height == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_get_screen_width = (int (*)(void *HANDLE, void *CB))
- dlsym(m_libXBMC_gui, "GUI_get_screen_width");
+ dlsym(m_libKODI_guilib, "GUI_get_screen_width");
if (GUI_get_screen_width == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_get_video_resolution = (int (*)(void *HANDLE, void *CB))
- dlsym(m_libXBMC_gui, "GUI_get_video_resolution");
+ dlsym(m_libKODI_guilib, "GUI_get_video_resolution");
if (GUI_get_video_resolution == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_Window_create = (CAddonGUIWindow* (*)(void *HANDLE, void *CB, const char *xmlFilename, const char *defaultSkin, bool forceFallback, bool asDialog))
- dlsym(m_libXBMC_gui, "GUI_Window_create");
+ dlsym(m_libKODI_guilib, "GUI_Window_create");
if (GUI_Window_create == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_Window_destroy = (void (*)(CAddonGUIWindow* p))
- dlsym(m_libXBMC_gui, "GUI_Window_destroy");
+ dlsym(m_libKODI_guilib, "GUI_Window_destroy");
if (GUI_Window_destroy == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_get_spin = (CAddonGUISpinControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId))
- dlsym(m_libXBMC_gui, "GUI_control_get_spin");
+ dlsym(m_libKODI_guilib, "GUI_control_get_spin");
if (GUI_control_get_spin == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_release_spin = (void (*)(CAddonGUISpinControl* p))
- dlsym(m_libXBMC_gui, "GUI_control_release_spin");
+ dlsym(m_libKODI_guilib, "GUI_control_release_spin");
if (GUI_control_release_spin == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_get_radiobutton = (CAddonGUIRadioButton* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId))
- dlsym(m_libXBMC_gui, "GUI_control_get_radiobutton");
+ dlsym(m_libKODI_guilib, "GUI_control_get_radiobutton");
if (GUI_control_get_radiobutton == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_release_radiobutton = (void (*)(CAddonGUIRadioButton* p))
- dlsym(m_libXBMC_gui, "GUI_control_release_radiobutton");
+ dlsym(m_libKODI_guilib, "GUI_control_release_radiobutton");
if (GUI_control_release_radiobutton == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_get_progress = (CAddonGUIProgressControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId))
- dlsym(m_libXBMC_gui, "GUI_control_get_progress");
+ dlsym(m_libKODI_guilib, "GUI_control_get_progress");
if (GUI_control_get_progress == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_release_progress = (void (*)(CAddonGUIProgressControl* p))
- dlsym(m_libXBMC_gui, "GUI_control_release_progress");
+ dlsym(m_libKODI_guilib, "GUI_control_release_progress");
if (GUI_control_release_progress == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_ListItem_create = (CAddonListItem* (*)(void *HANDLE, void *CB, const char *label, const char *label2, const char *iconImage, const char *thumbnailImage, const char *path))
- dlsym(m_libXBMC_gui, "GUI_ListItem_create");
+ dlsym(m_libKODI_guilib, "GUI_ListItem_create");
if (GUI_ListItem_create == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_ListItem_destroy = (void (*)(CAddonListItem* p))
- dlsym(m_libXBMC_gui, "GUI_ListItem_destroy");
+ dlsym(m_libKODI_guilib, "GUI_ListItem_destroy");
if (GUI_ListItem_destroy == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_get_rendering = (CAddonGUIRenderingControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId))
- dlsym(m_libXBMC_gui, "GUI_control_get_rendering");
+ dlsym(m_libKODI_guilib, "GUI_control_get_rendering");
if (GUI_control_get_rendering == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_release_rendering = (void (*)(CAddonGUIRenderingControl* p))
- dlsym(m_libXBMC_gui, "GUI_control_release_rendering");
+ dlsym(m_libKODI_guilib, "GUI_control_release_rendering");
if (GUI_control_release_rendering == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_get_slider = (CAddonGUISliderControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId))
- dlsym(m_libXBMC_gui, "GUI_control_get_slider");
+ dlsym(m_libKODI_guilib, "GUI_control_get_slider");
if (GUI_control_get_slider == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_release_slider = (void (*)(CAddonGUISliderControl* p))
- dlsym(m_libXBMC_gui, "GUI_control_release_slider");
+ dlsym(m_libKODI_guilib, "GUI_control_release_slider");
if (GUI_control_release_slider == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_get_settings_slider = (CAddonGUISettingsSliderControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId))
- dlsym(m_libXBMC_gui, "GUI_control_get_settings_slider");
+ dlsym(m_libKODI_guilib, "GUI_control_get_settings_slider");
if (GUI_control_get_settings_slider == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_control_release_settings_slider = (void (*)(CAddonGUISettingsSliderControl* p))
- dlsym(m_libXBMC_gui, "GUI_control_release_settings_slider");
+ dlsym(m_libKODI_guilib, "GUI_control_release_settings_slider");
if (GUI_control_release_settings_slider == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_show_and_get_input_with_head = (bool (*)(void *HANDLE, void *CB, char &aTextString, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, bool hiddenInput, unsigned int autoCloseMs))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_show_and_get_input_with_head");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_input_with_head");
if (GUI_dialog_keyboard_show_and_get_input_with_head == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_show_and_get_input = (bool (*)(void *HANDLE, void *CB, char &aTextString, unsigned int iMaxStringSize, bool allowEmptyResult, unsigned int autoCloseMs))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_show_and_get_input");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_input");
if (GUI_dialog_keyboard_show_and_get_input == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_show_and_get_new_password_with_head = (bool (*)(void *HANDLE, void *CB, char &newPassword, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, unsigned int autoCloseMs))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_show_and_get_new_password_with_head");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_new_password_with_head");
if (GUI_dialog_keyboard_show_and_get_new_password_with_head == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_show_and_get_new_password = (bool (*)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_show_and_get_new_password");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_new_password");
if (GUI_dialog_keyboard_show_and_get_new_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_show_and_verify_new_password_with_head = (bool (*)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, unsigned int autoCloseMs))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_show_and_verify_new_password_with_head");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_verify_new_password_with_head");
if (GUI_dialog_keyboard_show_and_verify_new_password_with_head == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_show_and_verify_new_password = (bool (*)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_show_and_verify_new_password");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_verify_new_password");
if (GUI_dialog_keyboard_show_and_verify_new_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_show_and_verify_password = (int (*)(void *HANDLE, void *CB, char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries, unsigned int autoCloseMs))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_show_and_verify_password");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_verify_password");
if (GUI_dialog_keyboard_show_and_verify_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_show_and_get_filter = (bool (*)(void *HANDLE, void *CB, char &aTextString, unsigned int iMaxStringSize, bool searching, unsigned int autoCloseMs))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_show_and_get_filter");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_filter");
if (GUI_dialog_keyboard_show_and_get_filter == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_send_text_to_active_keyboard = (bool (*)(void *HANDLE, void *CB, const char *aTextString, bool closeKeyboard))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_send_text_to_active_keyboard");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_send_text_to_active_keyboard");
if (GUI_dialog_keyboard_send_text_to_active_keyboard == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_keyboard_is_activated = (bool (*)(void *HANDLE, void *CB))
- dlsym(m_libXBMC_gui, "GUI_dialog_keyboard_is_activated");
+ dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_is_activated");
if (GUI_dialog_keyboard_is_activated == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_numeric_show_and_verify_new_password = (bool (*)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize))
- dlsym(m_libXBMC_gui, "GUI_dialog_numeric_show_and_verify_new_password");
+ dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_verify_new_password");
if (GUI_dialog_numeric_show_and_verify_new_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_numeric_show_and_verify_password = (int (*)(void *HANDLE, void *CB, char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries))
- dlsym(m_libXBMC_gui, "GUI_dialog_numeric_show_and_verify_password");
+ dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_verify_password");
if (GUI_dialog_numeric_show_and_verify_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_numeric_show_and_verify_input = (bool (*)(void *HANDLE, void *CB, char &strPassword, unsigned int iMaxStringSize, const char *strHeading, bool bGetUserInput))
- dlsym(m_libXBMC_gui, "GUI_dialog_numeric_show_and_verify_input");
+ dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_verify_input");
if (GUI_dialog_numeric_show_and_verify_input == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_numeric_show_and_get_time = (bool (*)(void *HANDLE, void *CB, tm &time, const char *strHeading))
- dlsym(m_libXBMC_gui, "GUI_dialog_numeric_show_and_get_time");
+ dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_time");
if (GUI_dialog_numeric_show_and_get_time == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_numeric_show_and_get_date = (bool (*)(void *HANDLE, void *CB, tm &date, const char *strHeading))
- dlsym(m_libXBMC_gui, "GUI_dialog_numeric_show_and_get_date");
+ dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_date");
if (GUI_dialog_numeric_show_and_get_date == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_numeric_show_and_get_ipaddress = (bool (*)(void *HANDLE, void *CB, char &IPAddress, unsigned int iMaxStringSize, const char *strHeading))
- dlsym(m_libXBMC_gui, "GUI_dialog_numeric_show_and_get_ipaddress");
+ dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_ipaddress");
if (GUI_dialog_numeric_show_and_get_ipaddress == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_numeric_show_and_get_number = (bool (*)(void *HANDLE, void *CB, char &strInput, unsigned int iMaxStringSize, const char *strHeading, unsigned int iAutoCloseTimeoutMs))
- dlsym(m_libXBMC_gui, "GUI_dialog_numeric_show_and_get_number");
+ dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_number");
if (GUI_dialog_numeric_show_and_get_number == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_numeric_show_and_get_seconds = (bool (*)(void *HANDLE, void *CB, char &strTime, unsigned int iMaxStringSize, const char *strHeading))
- dlsym(m_libXBMC_gui, "GUI_dialog_numeric_show_and_get_seconds");
+ dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_seconds");
if (GUI_dialog_numeric_show_and_get_seconds == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_filebrowser_show_and_get_file = (bool (*)(void *HANDLE, void *CB, const char *directory, const char *mask, const char *heading, char &path, unsigned int iMaxStringSize, bool useThumbs, bool useFileDirectories, bool singleList))
- dlsym(m_libXBMC_gui, "GUI_dialog_filebrowser_show_and_get_file");
+ dlsym(m_libKODI_guilib, "GUI_dialog_filebrowser_show_and_get_file");
if (GUI_dialog_filebrowser_show_and_get_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_ok_show_and_get_input_single_text = (void (*)(void *HANDLE, void *CB, const char *heading, const char *text))
- dlsym(m_libXBMC_gui, "GUI_dialog_ok_show_and_get_input_single_text");
+ dlsym(m_libKODI_guilib, "GUI_dialog_ok_show_and_get_input_single_text");
if (GUI_dialog_ok_show_and_get_input_single_text == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_ok_show_and_get_input_line_text = (void (*)(void *HANDLE, void *CB, const char *heading, const char *line0, const char *line1, const char *line2))
- dlsym(m_libXBMC_gui, "GUI_dialog_ok_show_and_get_input_line_text");
+ dlsym(m_libKODI_guilib, "GUI_dialog_ok_show_and_get_input_line_text");
if (GUI_dialog_ok_show_and_get_input_line_text == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_yesno_show_and_get_input_singletext = (bool (*)(void *HANDLE, void *CB, const char *heading, const char *text, bool& bCanceled, const char *noLabel, const char *yesLabel))
- dlsym(m_libXBMC_gui, "GUI_dialog_yesno_show_and_get_input_singletext");
+ dlsym(m_libKODI_guilib, "GUI_dialog_yesno_show_and_get_input_singletext");
if (GUI_dialog_yesno_show_and_get_input_singletext == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_yesno_show_and_get_input_linetext = (bool (*)(void *HANDLE, void *CB, const char *heading, const char *line0, const char *line1, const char *line2, const char *noLabel, const char *yesLabel))
- dlsym(m_libXBMC_gui, "GUI_dialog_yesno_show_and_get_input_linetext");
+ dlsym(m_libKODI_guilib, "GUI_dialog_yesno_show_and_get_input_linetext");
if (GUI_dialog_yesno_show_and_get_input_linetext == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_yesno_show_and_get_input_linebuttontext = (bool (*)(void *HANDLE, void *CB, const char *heading, const char *line0, const char *line1, const char *line2, bool &bCanceled, const char *noLabel, const char *yesLabel))
- dlsym(m_libXBMC_gui, "GUI_dialog_yesno_show_and_get_input_linebuttontext");
+ dlsym(m_libKODI_guilib, "GUI_dialog_yesno_show_and_get_input_linebuttontext");
if (GUI_dialog_yesno_show_and_get_input_linebuttontext == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_text_viewer = (void (*)(void *hdl, void *cb, const char *heading, const char *text))
- dlsym(m_libXBMC_gui, "GUI_dialog_text_viewer");
+ dlsym(m_libKODI_guilib, "GUI_dialog_text_viewer");
if (GUI_dialog_text_viewer == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
GUI_dialog_select = (int (*)(void *hdl, void *cb, const char *heading, const char *entries[], unsigned int size, int selected))
- dlsym(m_libXBMC_gui, "GUI_dialog_select");
+ dlsym(m_libKODI_guilib, "GUI_dialog_select");
if (GUI_dialog_select == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; }
m_Callbacks = GUI_register_me(m_Handle);
@@ -604,7 +604,7 @@ protected:
int (*GUI_dialog_select)(void *hdl, void *cb, const char *heading, const char *entries[], unsigned int size, int selected);
private:
- void *m_libXBMC_gui;
+ void *m_libKODI_guilib;
void *m_Handle;
void *m_Callbacks;
struct cb_array
diff --git a/configure.in b/configure.in
index 977107230d..4963583394 100644
--- a/configure.in
+++ b/configure.in
@@ -2545,7 +2545,7 @@ OUTPUT_FILES="Makefile \
xbmc/windowing/egl/Makefile \
lib/addons/library.xbmc.addon/Makefile \
lib/addons/library.xbmc.codec/Makefile \
- lib/addons/library.xbmc.gui/Makefile \
+ lib/addons/library.kodi.guilib/Makefile \
lib/addons/library.xbmc.pvr/Makefile \
xbmc/visualizations/EGLHelpers/Makefile \
tools/Linux/${APP_NAME_LC}.sh \
diff --git a/lib/addons/library.kodi.guilib/Makefile.in b/lib/addons/library.kodi.guilib/Makefile.in
new file mode 100644
index 0000000000..347f540320
--- /dev/null
+++ b/lib/addons/library.kodi.guilib/Makefile.in
@@ -0,0 +1,34 @@
+ARCH=@ARCH@
+INCLUDES=-I. -I../../../xbmc/addons/include -I../../../xbmc -I../../../xbmc/cores/dvdplayer/DVDDemuxers
+DEFINES+=
+CXXFLAGS=-fPIC
+LIBNAME=libKODI_guilib
+OBJS=$(LIBNAME).o
+
+LIB_INTERFACE=../../../addons/library.kodi.guilib/libKODI_guilib.h
+LIB_SHARED=../../../addons/library.kodi.guilib/$(LIBNAME)-$(ARCH).so
+GENERATED_ADDON_GUILIB = ../../../addons/kodi.guilib/addon.xml
+LIB_VERSION := $(shell sed -n 's/.*KODI_GUILIB_API_VERSION\s*"\(.*\)"/\1/p' $(LIB_INTERFACE))
+LIB_VERSION_MIN := $(shell sed -n 's/.*KODI_GUILIB_MIN_API_VERSION\s*"\(.*\)"/\1/p' $(LIB_INTERFACE))
+
+all: $(LIB_SHARED) $(GENERATED_ADDON_GUILIB)
+
+$(LIB_SHARED): $(OBJS) $(LIB_INTERFACE)
+ifeq ($(findstring osx,$(ARCH)), osx)
+ $(CXX) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
+ -bundle -undefined dynamic_lookup -o $@ \
+ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS)
+else
+ $(CXX) $(CFLAGS) $(LDFLAGS) -shared -g -o $(LIB_SHARED) $(OBJS)
+endif
+
+$(GENERATED_ADDON_GUILIB) : $(LIB_INTERFACE)
+ sed -e s/@guilib_version@/$(LIB_VERSION)/g -e s/@guilib_version_min@/$(LIB_VERSION_MIN)/g $@.in > $@
+
+CLEAN_FILES = \
+ $(LIB_SHARED) \
+
+DISTCLEAN_FILES= \
+ Makefile \
+
+include ../../../Makefile.include
diff --git a/lib/addons/library.xbmc.gui/libXBMC_gui.cpp b/lib/addons/library.kodi.guilib/libKODI_guilib.cpp
index b7fb237069..42ede0a99e 100644
--- a/lib/addons/library.xbmc.gui/libXBMC_gui.cpp
+++ b/lib/addons/library.kodi.guilib/libKODI_guilib.cpp
@@ -18,10 +18,11 @@
*
*/
+#include "../../../addons/library.kodi.guilib/libKODI_guilib.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string>
-#include "../../../addons/library.xbmc.gui/libXBMC_gui.h"
#include "addons/AddonCallbacks.h"
#ifdef _WIN32
diff --git a/lib/addons/library.xbmc.gui/project/VS2010Express/libXBMC_gui.vcxproj b/lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj
index 7c5197f3d4..b991f16040 100644
--- a/lib/addons/library.xbmc.gui/project/VS2010Express/libXBMC_gui.vcxproj
+++ b/lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj
@@ -10,6 +10,9 @@
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\libKODI_guilib.cpp" />
+ </ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectGuid>
<RootNamespace>XBMC_VDR</RootNamespace>
@@ -59,6 +62,9 @@
<Link>
<OutputFile>..\..\..\..\..\addons\library.xbmc.gui\$(ProjectName).dll</OutputFile>
</Link>
+ <PostBuildEvent>
+ <Command>powershell -ExecutionPolicy ByPass -File $(ProjectDir)\post-build.ps1 $(ProjectDir)</Command>
+ </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -71,10 +77,10 @@
<Link>
<OutputFile>../../../../../addons/library.xbmc.gui/$(ProjectName).dll</OutputFile>
</Link>
+ <PostBuildEvent>
+ <Command>powershell -ExecutionPolicy ByPass -File $(ProjectDir)\post-build.ps1 $(ProjectDir)</Command>
+ </PostBuildEvent>
</ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\libXBMC_gui.cpp" />
- </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/lib/addons/library.xbmc.gui/project/VS2010Express/libXBMC_gui.vcxproj.filters b/lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj.filters
index 166719621f..e823d63633 100644
--- a/lib/addons/library.xbmc.gui/project/VS2010Express/libXBMC_gui.vcxproj.filters
+++ b/lib/addons/library.kodi.guilib/project/VS2010Express/libKODI_guilib.vcxproj.filters
@@ -11,7 +11,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\..\libXBMC_gui.cpp">
+ <ClCompile Include="..\..\libKODI_guilib.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/lib/addons/library.kodi.guilib/project/VS2010Express/post-build.ps1 b/lib/addons/library.kodi.guilib/project/VS2010Express/post-build.ps1
new file mode 100644
index 0000000000..c82f4f3e10
--- /dev/null
+++ b/lib/addons/library.kodi.guilib/project/VS2010Express/post-build.ps1
@@ -0,0 +1,21 @@
+param (
+[string]$ProjectDir
+)
+
+$LIB_INTERFACE = "$ProjectDir\..\..\..\..\..\addons\library.kodi.guilib\libKODI_guilib.h"
+$GENERATED_ADDON_GUILIB = "$ProjectDir\..\..\..\..\..\addons\kodi.guilib\addon.xml"
+
+$LIB_VERSION = ""
+$LIB_VERSION_MIN = ""
+cat $LIB_INTERFACE | %{
+if ($_ -match 'KODI_GUILIB_API_VERSION\s*"(.*)"'){
+ $LIB_VERSION = $matches[1]
+ }
+if ($_ -match 'KODI_GUILIB_MIN_API_VERSION\s*"(.*)"'){
+ $LIB_VERSION_MIN = $matches[1]
+ }
+}
+
+$ADDON_GUILIB = $GENERATED_ADDON_GUILIB + ".in"
+cat $ADDON_GUILIB | % { $_ -replace "@guilib_version@", $LIB_VERSION `
+ -replace "@guilib_version_min@", $LIB_VERSION_MIN} > $GENERATED_ADDON_GUILIB \ No newline at end of file
diff --git a/lib/addons/library.xbmc.gui/Makefile.in b/lib/addons/library.xbmc.gui/Makefile.in
deleted file mode 100644
index 8a75239d46..0000000000
--- a/lib/addons/library.xbmc.gui/Makefile.in
+++ /dev/null
@@ -1,27 +0,0 @@
-ARCH=@ARCH@
-INCLUDES=-I. -I../../../xbmc/addons/include -I../../../xbmc -I../../../xbmc/cores/dvdplayer/DVDDemuxers
-DEFINES+=
-CXXFLAGS=-fPIC
-LIBNAME=libXBMC_gui
-OBJS=$(LIBNAME).o
-
-LIB_SHARED=../../../addons/library.xbmc.gui/$(LIBNAME)-$(ARCH).so
-
-all: $(LIB_SHARED)
-
-$(LIB_SHARED): $(OBJS)
-ifeq ($(findstring osx,$(ARCH)), osx)
- $(CXX) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
- -bundle -undefined dynamic_lookup -o $@ \
- @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS)
-else
- $(CXX) $(CFLAGS) $(LDFLAGS) -shared -g -o $(LIB_SHARED) $(OBJS)
-endif
-
-CLEAN_FILES = \
- $(LIB_SHARED) \
-
-DISTCLEAN_FILES= \
- Makefile \
-
-include ../../../Makefile.include
diff --git a/project/VS2010Express/XBMC for Windows.sln b/project/VS2010Express/XBMC for Windows.sln
index 4d0a740f57..2c1d2bbf17 100644
--- a/project/VS2010Express/XBMC for Windows.sln
+++ b/project/VS2010Express/XBMC for Windows.sln
@@ -65,7 +65,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libhdhomerun_dll", "..\..\l
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libXBMC_addon", "..\..\lib\addons\library.xbmc.addon\project\VS2010Express\libXBMC_addon.vcxproj", "{2DCEA60B-4EBC-4DB7-9FBD-297C1EFD95D7}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libXBMC_gui", "..\..\lib\addons\library.xbmc.gui\project\VS2010Express\libXBMC_gui.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libKODI_guilib", "..\..\lib\addons\library.kodi.guilib\project\VS2010Express\libKODI_guilib.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libXBMC_pvr", "..\..\lib\addons\library.xbmc.pvr\project\VS2010Express\libXBMC_pvr.vcxproj", "{6D8C91F8-992F-4C83-9DE3-485D64EF8420}"
EndProject
diff --git a/xbmc/addons/AddonCallbacks.h b/xbmc/addons/AddonCallbacks.h
index f0902e4e20..2632c97c10 100644
--- a/xbmc/addons/AddonCallbacks.h
+++ b/xbmc/addons/AddonCallbacks.h
@@ -20,10 +20,11 @@
*/
#include <stdint.h>
+
+#include "../../addons/library.kodi.guilib/libKODI_guilib.h"
#include "cores/dvdplayer/DVDDemuxers/DVDDemuxUtils.h"
#include "addons/include/xbmc_pvr_types.h"
#include "addons/include/xbmc_codec_types.h"
-#include "../../addons/library.xbmc.gui/libXBMC_gui.h"
#ifdef TARGET_WINDOWS
#ifndef _SSIZE_T_DEFINED
diff --git a/xbmc/addons/addon-bindings.mk b/xbmc/addons/addon-bindings.mk
index 4a33cfd88e..e7185a70c7 100644
--- a/xbmc/addons/addon-bindings.mk
+++ b/xbmc/addons/addon-bindings.mk
@@ -15,7 +15,7 @@ BINDINGS+=xbmc/addons/include/xbmc_vis_dll.h
BINDINGS+=xbmc/addons/include/xbmc_vis_types.h
BINDINGS+=xbmc/addons/include/xbmc_stream_utils.hpp
BINDINGS+=addons/library.xbmc.addon/libXBMC_addon.h
-BINDINGS+=addons/library.xbmc.gui/libXBMC_gui.h
+BINDINGS+=addons/library.kodi.guilib/libKODI_guilib.h
BINDINGS+=addons/library.xbmc.pvr/libXBMC_pvr.h
BINDINGS+=addons/library.xbmc.codec/libXBMC_codec.h
BINDINGS+=xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPacket.h
diff --git a/xbmc/addons/include/xbmc_pvr_dll.h b/xbmc/addons/include/xbmc_pvr_dll.h
index 3ad46fc64e..5280399fea 100644
--- a/xbmc/addons/include/xbmc_pvr_dll.h
+++ b/xbmc/addons/include/xbmc_pvr_dll.h
@@ -176,7 +176,7 @@ extern "C"
* Show the channel scan dialog if this backend supports it.
* @return PVR_ERROR_NO_ERROR if the dialog was displayed successfully.
* @remarks Required if bSupportsChannelScan is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
- * @note see libXBMC_gui.h about related parts
+ * @note see libKODI_guilib.h about related parts
*/
PVR_ERROR OpenDialogChannelScan(void);
@@ -227,7 +227,7 @@ extern "C"
* @param channel The channel to show the dialog for.
* @return PVR_ERROR_NO_ERROR if the dialog has been displayed successfully.
* @remarks Required if bSupportsChannelSettings is set to true.
- * @note see libXBMC_gui.h about related parts
+ * @note see libKODI_guilib.h about related parts
*/
PVR_ERROR OpenDialogChannelSettings(const PVR_CHANNEL& channel);
@@ -236,7 +236,7 @@ extern "C"
* @param channel The channel to add.
* @return PVR_ERROR_NO_ERROR if the channel has been added successfully.
* @remarks Required if bSupportsChannelSettings is set to true.
- * @note see libXBMC_gui.h about related parts
+ * @note see libKODI_guilib.h about related parts
*/
PVR_ERROR OpenDialogChannelAdd(const PVR_CHANNEL& channel);
//@}
diff --git a/xbmc/pvr/addons/PVRClient.cpp b/xbmc/pvr/addons/PVRClient.cpp
index c1cea9c0f0..1d95cf753e 100644
--- a/xbmc/pvr/addons/PVRClient.cpp
+++ b/xbmc/pvr/addons/PVRClient.cpp
@@ -325,8 +325,8 @@ bool CPVRClient::IsCompatibleAPIVersion(const ADDON::AddonVersion &minVersion, c
bool CPVRClient::IsCompatibleGUIAPIVersion(const ADDON::AddonVersion &minVersion, const ADDON::AddonVersion &version)
{
- AddonVersion myMinVersion = AddonVersion(XBMC_GUI_MIN_API_VERSION);
- AddonVersion myVersion = AddonVersion(XBMC_GUI_API_VERSION);
+ AddonVersion myMinVersion = AddonVersion(KODI_GUILIB_MIN_API_VERSION);
+ AddonVersion myVersion = AddonVersion(KODI_GUILIB_API_VERSION);
return (version >= myMinVersion && minVersion <= myVersion);
}
@@ -345,7 +345,7 @@ bool CPVRClient::CheckAPIVersion(void)
/* check the GUI API version */
AddonVersion guiVersion = AddonVersion("0.0.0");
- minVersion = AddonVersion(XBMC_GUI_MIN_API_VERSION);
+ minVersion = AddonVersion(KODI_GUILIB_MIN_API_VERSION);
try { guiVersion = AddonVersion(m_pStruct->GetGUIAPIVersion()); }
catch (std::exception &e) { LogException(e, "GetGUIAPIVersion()"); return false; }