summaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-07-28 22:13:40 +0000
committerDRC <dcommander@users.sourceforge.net>2011-07-28 22:13:40 +0000
commitd8e93dc9da2573e499ae1d086770183df028b490 (patch)
tree8ff81e2af89dedac9318ad8113e3e06dab21bb6d /vncviewer
parent883f2d69ef603fa3b33cd93dde29d5b4d6ca9231 (diff)
downloadtigervnc-d8e93dc9da2573e499ae1d086770183df028b490.tar.gz
tigervnc-d8e93dc9da2573e499ae1d086770183df028b490.zip
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
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/CMakeLists.txt1
-rw-r--r--vncviewer/buildTime.cxx18
-rw-r--r--vncviewer/vncviewer.cxx10
3 files changed, 26 insertions, 3 deletions
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");