From d8e93dc9da2573e499ae1d086770183df028b490 Mon Sep 17 00:00:00 2001 From: DRC Date: Thu, 28 Jul 2011 22:13:40 +0000 Subject: [PATCH] Include build date/time and bitness in the About dialog git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4609 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- CMakeLists.txt | 1 + po/de.po | 10 +++++----- po/fr.po | 9 ++++----- po/pl.po | 10 +++++----- po/ru.po | 10 +++++----- po/sk.po | 10 +++++----- po/sv.po | 10 +++++----- po/tigervnc.pot | 3 ++- vncviewer/CMakeLists.txt | 1 + vncviewer/buildTime.cxx | 18 ++++++++++++++++++ vncviewer/vncviewer.cxx | 10 +++++++--- 11 files changed, 58 insertions(+), 34 deletions(-) create mode 100644 vncviewer/buildTime.cxx diff --git a/CMakeLists.txt b/CMakeLists.txt index e67feb4f..3a3b23af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") endif() message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}") +add_definitions(-D__BUILD__="${BUILD}") if(NOT DEFINED BUILD_WINVNC) if(MSVC) diff --git a/po/de.po b/po/de.po index 60fe860e..b1737408 100644 --- a/po/de.po +++ b/po/de.po @@ -217,13 +217,13 @@ msgstr "Über..." #, fuzzy, c-format msgid "" -"TigerVNC Viewer for X version %s - built %s\n" +"TigerVNC Viewer %d-bit v%s (%s)\n" +"%s\n" "Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "See http://www.tigervnc.org for information on TigerVNC." msgstr "" -"TigerVNC-Viewer für X version %s - gebaut %s\n" -"Copyright (C) 2002-2004 RealVNC Ltd.\n" -"Copyright (C) 2000-2004 Constantin Kaplinsky.\n" -"Copyright (C) 2004-2009 Peter Astrand for Cendio AB\n" +"TigerVNC-Viewer version %s (%s)\n" +"%s\n" +"Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "Copyright (C) 2005 Klaus Franken, StrukturPunkt\n" "Siehe http://www.tigervnc.org für Informationen über TigerVNC." diff --git a/po/fr.po b/po/fr.po index 88b0f324..12f292f9 100644 --- a/po/fr.po +++ b/po/fr.po @@ -217,13 +217,12 @@ msgstr "À propos..." #, fuzzy, c-format msgid "" -"TigerVNC Viewer for X version %s - built %s\n" +"TigerVNC Viewer %d-bit v%s (%s)\n" +"%s\n" "Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "See http://www.tigervnc.org for information on TigerVNC." msgstr "" -"Visionneur TigerVNC pour la version %s du serveur X - Paquetage construit le " +"Visionneur TigerVNC %d-bit v%s (%s)\n" "« %s »\n" -"Copyright (C) 2002-2005 RealVNC Ltd.\n" -"Copyright (C) 2000-2006 TightVNC Group\n" -"Copyright (C) 2004-2009 Peter Astrand pour Cendio AB\n" +"Copyright (C) 1999-2011 TigerVNC Team et beaucoup d'autres (voir README.txt)\n" "Voir http://www.tigervnc.org pour plus d'informations sur TigerVNC." diff --git a/po/pl.po b/po/pl.po index a4e941eb..92ec1ddb 100644 --- a/po/pl.po +++ b/po/pl.po @@ -213,14 +213,14 @@ msgstr "O programie..." #, fuzzy, c-format msgid "" -"TigerVNC Viewer for X version %s - built %s\n" +"TigerVNC Viewer %d-bit v%s (%s)\n" +"%s\n" "Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "See http://www.tigervnc.org for information on TigerVNC." msgstr "" -"Przeglądarka TigerVNC dla X Window, wersja %s - zbudowano %s\n" -"Copyright (C) 2002-2005 RealVNC Ltd.\n" -"Copyright (C) 2000-2006 Grupa TightVNC\n" -"Copyright (C) 2004-2009 Peter Astrand dla Cendio AB\n" +"Przeglądarka TigerVNC %d-bit wersja %s (%s)\n" +"%s\n" +"Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "Zobacz http://www.tigervnc.org, aby dowiedzieć się więcej o TigerVNC." #~ msgid "About VNCviewer..." diff --git a/po/ru.po b/po/ru.po index 999fb1ff..50d31c00 100644 --- a/po/ru.po +++ b/po/ru.po @@ -217,12 +217,12 @@ msgstr "О программе..." #, fuzzy, c-format msgid "" -"TigerVNC Viewer for X version %s - built %s\n" +"TigerVNC Viewer %d-bit v%s (%s)\n" +"%s\n" "Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "See http://www.tigervnc.org for information on TigerVNC." msgstr "" -"TigerVNC viewer для X, версия %s - время сборки %s\n" -"Copyright (C) 2002-2004 RealVNC Ltd.\n" -"Copyright (C) 2000-2004 Константин Каплинский\n" -"Copyright (C) 2004-2009 Peter Astrand for Cendio AB\n" +"TigerVNC Viewer %d-bit версия %s (%s)\n" +"%s\n" +"Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "Ищите информацию о TigerVNC на сайте http://www.tigervnc.org" diff --git a/po/sk.po b/po/sk.po index 4e7d7929..6f83b86d 100644 --- a/po/sk.po +++ b/po/sk.po @@ -215,14 +215,14 @@ msgstr "O programe..." #, fuzzy, c-format msgid "" -"TigerVNC Viewer for X version %s - built %s\n" +"TigerVNC Viewer %d-bit v%s (%s)\n" +"%s\n" "Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "See http://www.tigervnc.org for information on TigerVNC." msgstr "" -"TigerVNC viewer pre X verzie %s - zostavené %s\n" -"Copyright (C) 2002-2004 RealVNC Ltd.\n" -"Copyright (C) 2000-2004 Constantin Kaplinsky\n" -"Copyright (C) 2004-2009 Peter Astrand for Cendio AB\n" +"TigerVNC Viewer %d-bit verzie %s (%s)\n" +"%s\n" +"Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "Pre informácie o TigerVNC navštívte http://www.tigervnc.org." #~ msgid "About VNCviewer..." diff --git a/po/sv.po b/po/sv.po index ac6f5a78..fa90cf82 100644 --- a/po/sv.po +++ b/po/sv.po @@ -215,12 +215,12 @@ msgstr "Om..." #, fuzzy, c-format msgid "" -"TigerVNC Viewer for X version %s - built %s\n" +"TigerVNC Viewer %d-bit v%s (%s)\n" +"%s\n" "Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "See http://www.tigervnc.org for information on TigerVNC." msgstr "" -"TigerVNC-visare för X version %s - byggd %s\n" -"Copyright (C) 2002-2005 RealVNC Ltd.\n" -"Copyright (C) 2000-2006 TightVNC Group\n" -"Copyright (C) 2004-2009 Peter Astrand for Cendio AB\n" +"TigerVNC-visare %d-bit v%s (%s)\n" +"%s\n" +"Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "Se http://www.tigervnc.org för information om TigerVNC." diff --git a/po/tigervnc.pot b/po/tigervnc.pot index 9f9c3ba0..15b7cb3a 100644 --- a/po/tigervnc.pot +++ b/po/tigervnc.pot @@ -203,7 +203,8 @@ msgstr "" #, c-format msgid "" -"TigerVNC Viewer for X version %s - built %s\n" +"TigerVNC Viewer %d-bit v%s (%s)\n" +"%s\n" "Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "See http://www.tigervnc.org for information on TigerVNC." msgstr "" diff --git a/vncviewer/CMakeLists.txt b/vncviewer/CMakeLists.txt index b08e4217..5ea0ab4c 100644 --- a/vncviewer/CMakeLists.txt +++ b/vncviewer/CMakeLists.txt @@ -3,6 +3,7 @@ include_directories(${GETTEXT_INCLUDE_DIR}) include_directories(${CMAKE_SOURCE_DIR}/common) set(VNCVIEWER_SOURCES + buildTime.cxx CConn.cxx DesktopWindow.cxx UserDialog.cxx diff --git a/vncviewer/buildTime.cxx b/vncviewer/buildTime.cxx new file mode 100644 index 00000000..9f37b387 --- /dev/null +++ b/vncviewer/buildTime.cxx @@ -0,0 +1,18 @@ +/* Copyright (C) 2005 RealVNC Ltd. All Rights Reserved. + * + * This 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 software 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 software; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ +const char* buildTime = "Built on " __DATE__ " at " __TIME__; diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx index 7b9434ff..4c7e2122 100644 --- a/vncviewer/vncviewer.cxx +++ b/vncviewer/vncviewer.cxx @@ -64,6 +64,7 @@ using namespace rfb; using namespace std; static char aboutText[1024]; +extern const char* buildTime; static bool exitMainloop = false; static const char *exitError = NULL; @@ -185,7 +186,8 @@ int main(int argc, char** argv) const char* vncServerName = NULL; UserDialog dlg; - const char englishAbout[] = N_("TigerVNC Viewer version %s\n" + const char englishAbout[] = N_("TigerVNC Viewer %d-bit v%s (%s)\n" + "%s\n" "Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\n" "See http://www.tigervnc.org for information on TigerVNC."); @@ -197,7 +199,8 @@ int main(int argc, char** argv) // Write about text to console, still using normal locale codeset snprintf(aboutText, sizeof(aboutText), - gettext(englishAbout), PACKAGE_VERSION); + gettext(englishAbout), (int)sizeof(size_t)*8, PACKAGE_VERSION, + __BUILD__, buildTime); fprintf(stderr,"\n%s\n", aboutText); // Set gettext codeset to what our GUI toolkit uses. Since we are @@ -208,7 +211,8 @@ int main(int argc, char** argv) // Re-create the aboutText for the GUI, now using GUI codeset snprintf(aboutText, sizeof(aboutText), - gettext(englishAbout), PACKAGE_VERSION); + gettext(englishAbout), (int)sizeof(size_t)*8, PACKAGE_VERSION, + __BUILD__, buildTime); rfb::initStdIOLoggers(); rfb::LogWriter::setLogParams("*:stderr:30"); -- 2.39.5