mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
imageinfo: get package version from package manager instead source
Works only if ENABLE_PKG_MANAGEMENT is enabled
This commit is contained in:
@@ -365,14 +365,7 @@ void CImageInfo::InitInfoData()
|
|||||||
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_CREATOR), creator});
|
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_CREATOR), creator});
|
||||||
|
|
||||||
//gui
|
//gui
|
||||||
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_GUI), config.getString("gui", PACKAGE_NAME)});
|
initGuiInfo();
|
||||||
|
|
||||||
#ifdef VCS
|
|
||||||
//gui vcs
|
|
||||||
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_VCS), VCS});
|
|
||||||
#else
|
|
||||||
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_VCS), PACKAGE_VERSION_GIT});
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//stb info
|
//stb info
|
||||||
initHalInfo();
|
initHalInfo();
|
||||||
@@ -397,6 +390,29 @@ void CImageInfo::initBuildDateInfo()
|
|||||||
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_DATE), builddate});
|
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_DATE), builddate});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CImageInfo::initGuiInfo()
|
||||||
|
{
|
||||||
|
string gui_info = PACKAGE_NAME;
|
||||||
|
#if ENABLE_PKG_MANAGEMENT
|
||||||
|
string pkg_name = "neutrino-mp";
|
||||||
|
gui_info += " (";
|
||||||
|
gui_info += pkg_name;
|
||||||
|
gui_info += " ";
|
||||||
|
gui_info += man.getPkgInfo(pkg_name, "Version", true);
|
||||||
|
gui_info += ")";
|
||||||
|
#endif
|
||||||
|
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_GUI), config.getString("gui", gui_info)});
|
||||||
|
|
||||||
|
#ifndef ENABLE_PKG_MANAGEMENT
|
||||||
|
# ifdef VCS
|
||||||
|
//gui vcs
|
||||||
|
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_VCS), VCS});
|
||||||
|
# else
|
||||||
|
v_info.push_back({g_Locale->getText(LOCALE_IMAGEINFO_VCS), PACKAGE_VERSION_GIT});
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void CImageInfo::initHalInfo()
|
void CImageInfo::initHalInfo()
|
||||||
{
|
{
|
||||||
#if USE_STB_HAL
|
#if USE_STB_HAL
|
||||||
|
@@ -35,6 +35,10 @@
|
|||||||
#include <gui/components/cc.h>
|
#include <gui/components/cc.h>
|
||||||
#include <configfile.h>
|
#include <configfile.h>
|
||||||
|
|
||||||
|
#if ENABLE_PKG_MANAGEMENT
|
||||||
|
#include "opkg_manager.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct image_info_t
|
typedef struct image_info_t
|
||||||
{
|
{
|
||||||
std::string caption;
|
std::string caption;
|
||||||
@@ -52,6 +56,9 @@ class CImageInfo : public CMenuTarget
|
|||||||
int y_tmp;
|
int y_tmp;
|
||||||
std::vector<image_info_t> v_info;
|
std::vector<image_info_t> v_info;
|
||||||
|
|
||||||
|
#if ENABLE_PKG_MANAGEMENT
|
||||||
|
COPKGManager man;
|
||||||
|
#endif
|
||||||
void Clean();
|
void Clean();
|
||||||
void Init();
|
void Init();
|
||||||
void InitInfoData();
|
void InitInfoData();
|
||||||
@@ -60,6 +67,7 @@ class CImageInfo : public CMenuTarget
|
|||||||
void InitBuildInfos();
|
void InitBuildInfos();
|
||||||
void initBuildDateInfo();
|
void initBuildDateInfo();
|
||||||
void initKernelInfo();
|
void initKernelInfo();
|
||||||
|
void initGuiInfo();
|
||||||
void initHalInfo();
|
void initHalInfo();
|
||||||
void InitInfoText(const std::string& text);
|
void InitInfoText(const std::string& text);
|
||||||
void initSupportInfo();
|
void initSupportInfo();
|
||||||
|
Reference in New Issue
Block a user