imageinfo_ni: align to new version handling; split image and neutrino

Origin commit data
------------------
Commit: 47949ba3a5
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-11-13 (Tue, 13 Nov 2018)

Origin message was:
------------------
- imageinfo_ni: align to new version handling; split image and neutrino
This commit is contained in:
vanhofen
2018-11-13 00:23:00 +01:00
parent d63cfd04a0
commit 2e5416e2f0
3 changed files with 34 additions and 21 deletions

View File

@@ -906,7 +906,7 @@ imageinfo.creator Ersteller:
imageinfo.date Datum: imageinfo.date Datum:
imageinfo.dokumentation Dokus: imageinfo.dokumentation Dokus:
imageinfo.forum Forum: imageinfo.forum Forum:
imageinfo.gui GUI: imageinfo.gui Neutrino:
imageinfo.head Image-Informationen imageinfo.head Image-Informationen
imageinfo.homepage Homepage: imageinfo.homepage Homepage:
imageinfo.image Image: imageinfo.image Image:

View File

@@ -906,7 +906,7 @@ imageinfo.creator Creator:
imageinfo.date Date: imageinfo.date Date:
imageinfo.dokumentation Docs: imageinfo.dokumentation Docs:
imageinfo.forum Forum: imageinfo.forum Forum:
imageinfo.gui GUI: imageinfo.gui Neutrino:
imageinfo.head Image informations imageinfo.head Image informations
imageinfo.homepage Home page: imageinfo.homepage Home page:
imageinfo.image Image: imageinfo.image Image:

View File

@@ -54,6 +54,9 @@
#include <system/debug.h> #include <system/debug.h>
#include <cs_api.h> #include <cs_api.h>
// version.h is located in $(top_builddir)
#include <src/gui/version.h>
#include <linux/version.h> #include <linux/version.h>
#include <gui/pictureviewer.h> #include <gui/pictureviewer.h>
@@ -79,8 +82,8 @@ static const neutrino_locale_t info_items[] =
{ {
LOCALE_IMAGEINFO_IMAGE, LOCALE_IMAGEINFO_IMAGE,
LOCALE_IMAGEINFO_VERSION, LOCALE_IMAGEINFO_VERSION,
/* Commit: */
LOCALE_IMAGEINFO_KERNEL, LOCALE_IMAGEINFO_KERNEL,
LOCALE_IMAGEINFO_GUI,
/* Lua-API: */ /* Lua-API: */
/* yWeb: */ /* yWeb: */
LOCALE_IMAGEINFO_DATE, LOCALE_IMAGEINFO_DATE,
@@ -281,13 +284,14 @@ void CImageInfoNI::paint()
CConfigFile config('\t'); CConfigFile config('\t');
config.loadConfig(TARGET_PREFIX "/.version"); config.loadConfig(TARGET_PREFIX "/.version");
std::string imagename = config.getString("imagename", "NI-Neutrino-HD"); std::string imagename = config.getString("imagename", "NI \\o/ Neutrino-Image");
std::string homepage = config.getString("homepage", "www.neutrino-images.de"); std::string version = config.getString("version", "n/a");
std::string creator = config.getString("creator", "NI-Team"); std::string describe = config.getString("describe", "n/a");
std::string version = config.getString("version", "n/a"); std::string builddate = config.getString("builddate", "n/a");
std::string commit = config.getString("commit", "n/a"); std::string creator = config.getString("creator", "NI-Team");
std::string builddate = config.getString("builddate", "n/a"); std::string homepage = config.getString("homepage", "www.neutrino-images.de");
#if 0
std::ostringstream imageversion; std::ostringstream imageversion;
imageversion.str("n/a"); imageversion.str("n/a");
@@ -298,12 +302,17 @@ void CImageInfoNI::paint()
imageversion.str(""); imageversion.str("");
imageversion << releaseCycle << " (" << versionInfo.getType(true) << ")"; imageversion << releaseCycle << " (" << versionInfo.getType(true) << ")";
} }
#ifdef PACKAGE_VERSION #endif
else
{ std::ostringstream guiversion;
imageversion.str(""); guiversion.str("");
imageversion << PACKAGE_VERSION;
} #ifdef VCS
guiversion << VCS;
#elif defined PACKAGE_VERSION
guiversion << PACKAGE_VERSION;
#else
guiversion.str("n/a");
#endif #endif
ypos += iheight; ypos += iheight;
@@ -312,11 +321,15 @@ void CImageInfoNI::paint()
ypos += iheight; ypos += iheight;
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_VERSION)); paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_VERSION));
#if 0
paintLine(xpos+offset, font_info, imageversion.str()); paintLine(xpos+offset, font_info, imageversion.str());
#else
paintLine(xpos+offset, font_info, describe);
#endif
ypos += iheight; ypos += iheight;
paintLine(xpos, font_info, "Commit:"); paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_DATE));
paintLine(xpos+offset, font_info, commit); paintLine(xpos+offset, font_info, builddate);
struct utsname uts_info; struct utsname uts_info;
@@ -324,6 +337,10 @@ void CImageInfoNI::paint()
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_KERNEL)); paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_KERNEL));
paintLine(xpos+offset, font_info, uname(&uts_info) < 0 ? "n/a" : uts_info.release); paintLine(xpos+offset, font_info, uname(&uts_info) < 0 ? "n/a" : uts_info.release);
ypos += iheight;
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_GUI));
paintLine(xpos+offset, font_info, guiversion.str());
#ifdef ENABLE_LUA #ifdef ENABLE_LUA
ypos += iheight; ypos += iheight;
paintLine(xpos, font_info, "Lua-API:"); paintLine(xpos, font_info, "Lua-API:");
@@ -334,10 +351,6 @@ void CImageInfoNI::paint()
paintLine(xpos, font_info, "yWeb:"); paintLine(xpos, font_info, "yWeb:");
paintLine(xpos+offset, font_info, getYWebVersion()); paintLine(xpos+offset, font_info, getYWebVersion());
ypos += iheight;
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_DATE));
paintLine(xpos+offset, font_info, builddate );
ypos += iheight; ypos += iheight;
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_CREATOR)); paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_CREATOR));
paintLine(xpos+offset, font_info, creator); paintLine(xpos+offset, font_info, creator);