From 0b118a8e980e75e876d807bb14e3f425496b09fd Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 14 Jan 2016 10:13:43 -0800 Subject: [PATCH] replace ApplicationVersion with BuildInfo --- assignment-client/src/AssignmentClientApp.cpp | 6 +++--- cmake/macros/SetPackagingParameters.cmake | 11 ++++------- .../BuildInfo.h.in} | 9 ++++++--- domain-server/src/DomainServer.cpp | 6 +++--- interface/src/Application.cpp | 4 ++-- libraries/networking/src/Assignment.cpp | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) rename cmake/{macros/ApplicationVersion.h.in => templates/BuildInfo.h.in} (52%) diff --git a/assignment-client/src/AssignmentClientApp.cpp b/assignment-client/src/AssignmentClientApp.cpp index 19a3350d0d..8b9b5360c9 100644 --- a/assignment-client/src/AssignmentClientApp.cpp +++ b/assignment-client/src/AssignmentClientApp.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include @@ -44,10 +44,10 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : ShutdownEventListener::getInstance(); # endif - setOrganizationName("High Fidelity"); + setOrganizationName(BuildInfo::MODIFIED_ORGANIZATION); setOrganizationDomain("highfidelity.io"); setApplicationName("assignment-client"); - setApplicationName(BUILD_VERSION); + setApplicationName(BuildInfo::VERSION); // use the verbose message handler in Logging qInstallMessageHandler(LogHandler::verboseMessageHandler); diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 21075fa0b8..772dc2fc7c 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -20,8 +20,7 @@ macro(SET_PACKAGING_PARAMETERS) set(DEPLOY_PACKAGE TRUE) set(BUILD_SEQ $ENV{JOB_ID}) set(PRODUCTION_BUILD 1) - set(INSTALLER_COMPANY "High Fidelity") - set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}") + set(BUILD_ORGANIZATION "High Fidelity") set(INSTALLER_NAME "interface-win64-${BUILD_SEQ}.exe") set(HIGH_FIDELITY_PROTOCOL "hifi") set(INTERFACE_BUNDLE_NAME "High Fidelity") @@ -31,8 +30,7 @@ macro(SET_PACKAGING_PARAMETERS) set(DEPLOY_PACKAGE TRUE) set(PR_BUILD 1) set(BUILD_SEQ "PR-$ENV{ghprbPullId}") - set(INSTALLER_COMPANY "High Fidelity - PR") - set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}\\${BUILD_SEQ}") + set(BUILD_ORGANIZATION "High Fidelity - PR#$ENV{ghprbPullId}") set(INSTALLER_NAME "pr-interface-win64-${BUILD_SEQ}.exe") set(INTERFACE_BUNDLE_NAME "High Fidelity ${BUILD_SEQ}") set(INTERFACE_ICON_PREFIX "interface-beta") @@ -40,8 +38,7 @@ macro(SET_PACKAGING_PARAMETERS) else () set(BUILD_SEQ "dev") set(DEV_BUILD 1) - set(INSTALLER_COMPANY "High Fidelity - Dev") - set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}") + set(BUILD_ORGANIZATION "High Fidelity - Dev") set(INSTALLER_NAME "dev-interface-win64.exe") set(INTERFACE_BUNDLE_NAME "Interface") set(INTERFACE_ICON_PREFIX "interface-beta") @@ -95,6 +92,6 @@ macro(SET_PACKAGING_PARAMETERS) # create a header file our targets can use to find out the application version file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/includes") - configure_file("${MACRO_DIR}/ApplicationVersion.h.in" "${CMAKE_BINARY_DIR}/includes/ApplicationVersion.h") + configure_file("${HF_CMAKE_DIR}/templates/BuildInfo.h.in" "${CMAKE_BINARY_DIR}/includes/BuildInfo.h") endmacro(SET_PACKAGING_PARAMETERS) diff --git a/cmake/macros/ApplicationVersion.h.in b/cmake/templates/BuildInfo.h.in similarity index 52% rename from cmake/macros/ApplicationVersion.h.in rename to cmake/templates/BuildInfo.h.in index 736d00726c..a531317354 100644 --- a/cmake/macros/ApplicationVersion.h.in +++ b/cmake/templates/BuildInfo.h.in @@ -1,12 +1,15 @@ // -// ApplicationVersion.h.in +// BuildInfo.h.in // cmake/macros // -// Created by Leonardo Murillo on 8/13/15. +// Created by Stephen Birarda on 1/14/16. // Copyright 2015 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -const QString BUILD_VERSION = "@BUILD_SEQ@"; +namespace BuildInfo { + const QString MODIFIED_ORGANIZATION = "@BUILD_ORGANIZATION@"; + const QString VERSION = "@BUILD_SEQ@"; +} diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index 28e9fd696d..70dd55f9c9 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -72,10 +72,10 @@ DomainServer::DomainServer(int argc, char* argv[]) : connect(this, &QCoreApplication::aboutToQuit, this, &DomainServer::aboutToQuit); - setOrganizationName("High Fidelity"); + setOrganizationName(BuildInfo::MODIFIED_ORGANIZATION); setOrganizationDomain("highfidelity.io"); setApplicationName("domain-server"); - setApplicationVersion(BUILD_VERSION); + setApplicationVersion(BuildInfo::VERSION); QSettings::setDefaultFormat(QSettings::IniFormat); // make sure we have a fresh AccountManager instance diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 46b4d4172d..d65c72c9f4 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -60,7 +60,7 @@ #include #include #include -#include +#include #include #include #include @@ -306,7 +306,7 @@ bool setupEssentials(int& argc, char** argv) { listenPort = atoi(portStr); } // Set build version - QCoreApplication::setApplicationVersion(BUILD_VERSION); + QCoreApplication::setApplicationVersion(BuildInfo::VERSION); Setting::preInit(); diff --git a/libraries/networking/src/Assignment.cpp b/libraries/networking/src/Assignment.cpp index cf40400aa8..0114bcb708 100644 --- a/libraries/networking/src/Assignment.cpp +++ b/libraries/networking/src/Assignment.cpp @@ -16,7 +16,7 @@ #include -#include +#include #include "Assignment.h" #include @@ -66,7 +66,7 @@ Assignment::Assignment(Assignment::Command command, Assignment::Type type, const // this is a newly created assignment, generate a random UUID _uuid = QUuid::createUuid(); } else if (_command == Assignment::RequestCommand) { - _nodeVersion = BUILD_VERSION; + _nodeVersion = BuildInfo::VERSION; } }