message(FATAL_ERROR "TigerVNC cannot be built with Visual Studio. Please use MinGW")
endif()
-set(BUILD "")
-execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD)
+set(BUILD_TIMESTAMP "")
+execute_process(COMMAND "date" "+%Y-%m-%d %H:%M" OUTPUT_VARIABLE BUILD_TIMESTAMP)
-if(NOT BUILD)
- set(BUILD "")
+if(NOT BUILD_TIMESTAMP)
+ set(BUILD_TIMESTAMP "")
else()
- string(REGEX REPLACE "\n" "" BUILD ${BUILD})
+ string(REGEX REPLACE "\n" "" BUILD_TIMESTAMP ${BUILD_TIMESTAMP})
endif()
# Default to optimised builds instead of debug ones. Our code has no bugs ;)
message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
-if(CMAKE_BUILD_TYPE STREQUAL "Debug")
- set(BUILD "${BUILD}d")
-endif()
-
-message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
-add_definitions(-D__BUILD__="${BUILD}")
+message(STATUS "VERSION = ${VERSION}")
+add_definitions(-DBUILD_TIMESTAMP="${BUILD_TIMESTAMP}")
# We want to keep our asserts even in release builds so remove NDEBUG
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -UNDEBUG")
include_directories(${CMAKE_SOURCE_DIR}/common)
set(VNCVIEWER_SOURCES
- buildTime.cxx
menukey.cxx
CConn.cxx
DesktopWindow.cxx
+++ /dev/null
-/* 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__;
using namespace rfb;
using namespace std;
-static const char _aboutText[] = N_("TigerVNC Viewer %d-bit v%s (%s)\n"
- "%s\n"
+static const char _aboutText[] = N_("TigerVNC Viewer %d-bit v%s\n"
+ "Built on: %s\n"
"Copyright (C) 1999-%d TigerVNC Team and many others (see README.txt)\n"
"See http://www.tigervnc.org for information on TigerVNC.");
static char aboutText[1024];
-extern const char* buildTime;
-
char vncServerName[VNCSERVERNAMELEN] = { '\0' };
static bool exitMainloop = false;
// Generate the about string now that we get the proper translation
snprintf(aboutText, sizeof(aboutText), _aboutText,
- (int)sizeof(size_t)*8, PACKAGE_VERSION, __BUILD__,
- buildTime, 2014);
+ (int)sizeof(size_t)*8, PACKAGE_VERSION,
+ BUILD_TIMESTAMP, 2014);
rfb::SecurityClient::setDefaults();