From eb7cad0023209adadb7b6ec12e5599f8ebc73393 Mon Sep 17 00:00:00 2001 From: Kalila L Date: Mon, 29 Mar 2021 02:13:12 -0400 Subject: [PATCH 1/6] 'HIFI_' -> 'VIRCADIA_' for env variables. --- assignment-client/src/AssignmentClient.cpp | 4 ++-- interface/src/Application.cpp | 8 ++++---- interface/src/Menu.cpp | 6 +++--- interface/src/main.cpp | 2 +- .../hmd/DebugHmdDisplayPlugin.cpp | 2 +- libraries/gl/src/gl/GLHelpers.cpp | 4 ++-- .../gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp | 2 +- libraries/networking/src/DomainHandler.h | 16 ++++++++-------- libraries/networking/src/MetaverseAPI.cpp | 7 +++---- libraries/shared/src/PathUtils.cpp | 2 +- libraries/shared/src/RenderForward.h | 2 +- plugins/oculus/src/OculusDebugDisplayPlugin.cpp | 4 ++-- plugins/oculus/src/OculusHelpers.cpp | 2 +- plugins/openvr/src/OpenVrHelpers.cpp | 6 +++--- server-console/src/modules/hf-notifications.js | 2 +- tests-manual/gpu-textures/src/main.cpp | 2 +- tests-manual/render-perf/src/main.cpp | 2 +- tests/gpu/src/TextureTest.cpp | 2 +- 18 files changed, 37 insertions(+), 38 deletions(-) diff --git a/assignment-client/src/AssignmentClient.cpp b/assignment-client/src/AssignmentClient.cpp index adc7f5e3c5a..c29c5bbcaef 100644 --- a/assignment-client/src/AssignmentClient.cpp +++ b/assignment-client/src/AssignmentClient.cpp @@ -282,8 +282,8 @@ void AssignmentClient::handleStopNodePacket(QSharedPointer mess } void AssignmentClient::handleAuthenticationRequest() { - const QString DATA_SERVER_USERNAME_ENV = "HIFI_AC_USERNAME"; - const QString DATA_SERVER_PASSWORD_ENV = "HIFI_AC_PASSWORD"; + const QString DATA_SERVER_USERNAME_ENV = "VIRCADIA_AC_USERNAME"; + const QString DATA_SERVER_PASSWORD_ENV = "VIRCADIA_AC_PASSWORD"; // this node will be using an authentication server, let's make sure we have a username/password QProcessEnvironment sysEnvironment = QProcessEnvironment::systemEnvironment(); diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index d8338162b61..d2f7786b15e 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -291,7 +291,7 @@ static QTimer pingTimer; #if defined(Q_OS_ANDROID) static bool DISABLE_WATCHDOG = true; #else -static const QString DISABLE_WATCHDOG_FLAG{ "HIFI_DISABLE_WATCHDOG" }; +static const QString DISABLE_WATCHDOG_FLAG{ "VIRCADIA_DISABLE_WATCHDOG" }; static bool DISABLE_WATCHDOG = nsightActive() || QProcessEnvironment::systemEnvironment().contains(DISABLE_WATCHDOG_FLAG); #endif @@ -4528,9 +4528,9 @@ void Application::keyPressEvent(QKeyEvent* event) { case Qt::Key_G: if (isShifted && isControlOrCommand && isOption && isMetaOrMacControl) { - static const QString HIFI_FRAMES_FOLDER_VAR = "HIFI_FRAMES_FOLDER"; - static const QString GPU_FRAME_FOLDER = QProcessEnvironment::systemEnvironment().contains(HIFI_FRAMES_FOLDER_VAR) - ? QProcessEnvironment::systemEnvironment().value(HIFI_FRAMES_FOLDER_VAR) + static const QString VIRCADIA_FRAMES_FOLDER_VAR = "VIRCADIA_FRAMES_FOLDER"; + static const QString GPU_FRAME_FOLDER = QProcessEnvironment::systemEnvironment().contains(VIRCADIA_FRAMES_FOLDER_VAR) + ? QProcessEnvironment::systemEnvironment().value(VIRCADIA_FRAMES_FOLDER_VAR) : "hifiFrames"; static QString GPU_FRAME_TEMPLATE = GPU_FRAME_FOLDER + "/{DATE}_{TIME}"; QString fullPath = FileUtils::computeDocumentPath(FileUtils::replaceDateTimeTokens(GPU_FRAME_TEMPLATE)); diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 3a320cc6287..247cadb2ecf 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -10,7 +10,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // // For happ(ier) development of QML, use these two things: -// This forces QML files to be pulled from the source as you edit it: set environment variable HIFI_USE_SOURCE_TREE_RESOURCES=1 +// This forces QML files to be pulled from the source as you edit it: set environment variable VIRCADIA_USE_SOURCE_TREE_RESOURCES=1 // Use this to live reload: DependencyManager::get()->clearCache(); #include "Menu.h" @@ -723,8 +723,8 @@ Menu::Menu() { // Developer > Crash >>> bool result = false; - const QString HIFI_SHOW_DEVELOPER_CRASH_MENU("HIFI_SHOW_DEVELOPER_CRASH_MENU"); - result = true;//QProcessEnvironment::systemEnvironment().contains(HIFI_SHOW_DEVELOPER_CRASH_MENU); + const QString VIRCADIA_SHOW_DEVELOPER_CRASH_MENU("VIRCADIA_SHOW_DEVELOPER_CRASH_MENU"); + result = true;//QProcessEnvironment::systemEnvironment().contains(VIRCADIA_SHOW_DEVELOPER_CRASH_MENU); if (result) { MenuWrapper* crashMenu = developerMenu->addMenu("Crash"); diff --git a/interface/src/main.cpp b/interface/src/main.cpp index d190e3f3daa..6365cd9912f 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -239,7 +239,7 @@ int main(int argc, const char* argv[]) { // allow multiple interfaces to run if this environment variable is set. bool allowMultipleInstances = parser.isSet(allowMultipleInstancesOption) || - QProcessEnvironment::systemEnvironment().contains("HIFI_ALLOW_MULTIPLE_INSTANCES"); + QProcessEnvironment::systemEnvironment().contains("VIRCADIA_ALLOW_MULTIPLE_INSTANCES"); if (allowMultipleInstances) { instanceMightBeRunning = false; } diff --git a/libraries/display-plugins/src/display-plugins/hmd/DebugHmdDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/hmd/DebugHmdDisplayPlugin.cpp index b4527ff90c4..9918c5bdc4f 100644 --- a/libraries/display-plugins/src/display-plugins/hmd/DebugHmdDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/hmd/DebugHmdDisplayPlugin.cpp @@ -16,7 +16,7 @@ const QString DebugHmdDisplayPlugin::NAME("HMD Simulator"); -static const QString DEBUG_FLAG("HIFI_DEBUG_HMD"); +static const QString DEBUG_FLAG("VIRCADIA_DEBUG_HMD"); static bool enableDebugHmd = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); diff --git a/libraries/gl/src/gl/GLHelpers.cpp b/libraries/gl/src/gl/GLHelpers.cpp index b2c98e91d3e..0fb0228cdd1 100644 --- a/libraries/gl/src/gl/GLHelpers.cpp +++ b/libraries/gl/src/gl/GLHelpers.cpp @@ -36,7 +36,7 @@ bool gl::disableGl45() { #if defined(USE_GLES) return false; #else - static const QString DEBUG_FLAG("HIFI_DISABLE_OPENGL_45"); + static const QString DEBUG_FLAG("VIRCADIA_DISABLE_OPENGL_45"); static bool disableOpenGL45 = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); return FORCE_DISABLE_OPENGL_45 || disableOpenGL45; #endif @@ -399,7 +399,7 @@ namespace gl { //static bool enableDebugLogger = true; static bool enableDebugLogger = false; #else - static const QString DEBUG_FLAG("HIFI_DEBUG_OPENGL"); + static const QString DEBUG_FLAG("VIRCADIA_DEBUG_OPENGL"); static bool enableDebugLogger = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); #endif return enableDebugLogger; diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp index bb31903d8ec..6bd9dbcb6e1 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp @@ -24,7 +24,7 @@ #include #include -static const QString FORCE_MOBILE_TEXTURES_STRING{ "HIFI_FORCE_MOBILE_TEXTURES" }; +static const QString FORCE_MOBILE_TEXTURES_STRING{ "VIRCADIA_FORCE_MOBILE_TEXTURES" }; static bool FORCE_MOBILE_TEXTURES = QProcessEnvironment::systemEnvironment().contains(FORCE_MOBILE_TEXTURES_STRING); diff --git a/libraries/networking/src/DomainHandler.h b/libraries/networking/src/DomainHandler.h index 56d32d8609d..6d19aad606a 100644 --- a/libraries/networking/src/DomainHandler.h +++ b/libraries/networking/src/DomainHandler.h @@ -36,33 +36,33 @@ const unsigned short DEFAULT_DOMAIN_SERVER_PORT = QProcessEnvironment::systemEnvironment() - .contains("HIFI_DOMAIN_SERVER_PORT") + .contains("VIRCADIA_DOMAIN_SERVER_PORT") ? QProcessEnvironment::systemEnvironment() - .value("HIFI_DOMAIN_SERVER_PORT") + .value("VIRCADIA_DOMAIN_SERVER_PORT") .toUShort() : 40102; const unsigned short DEFAULT_DOMAIN_SERVER_DTLS_PORT = QProcessEnvironment::systemEnvironment() - .contains("HIFI_DOMAIN_SERVER_DTLS_PORT") + .contains("VIRCADIA_DOMAIN_SERVER_DTLS_PORT") ? QProcessEnvironment::systemEnvironment() - .value("HIFI_DOMAIN_SERVER_DTLS_PORT") + .value("VIRCADIA_DOMAIN_SERVER_DTLS_PORT") .toUShort() : 40103; const quint16 DOMAIN_SERVER_HTTP_PORT = QProcessEnvironment::systemEnvironment() - .contains("HIFI_DOMAIN_SERVER_HTTP_PORT") + .contains("VIRCADIA_DOMAIN_SERVER_HTTP_PORT") ? QProcessEnvironment::systemEnvironment() - .value("HIFI_DOMAIN_SERVER_HTTP_PORT") + .value("VIRCADIA_DOMAIN_SERVER_HTTP_PORT") .toUInt() : 40100; const quint16 DOMAIN_SERVER_HTTPS_PORT = QProcessEnvironment::systemEnvironment() - .contains("HIFI_DOMAIN_SERVER_HTTPS_PORT") + .contains("VIRCADIA_DOMAIN_SERVER_HTTPS_PORT") ? QProcessEnvironment::systemEnvironment() - .value("HIFI_DOMAIN_SERVER_HTTPS_PORT") + .value("VIRCADIA_DOMAIN_SERVER_HTTPS_PORT") .toUInt() : 40101; diff --git a/libraries/networking/src/MetaverseAPI.cpp b/libraries/networking/src/MetaverseAPI.cpp index 290267d96d6..7d1828f2938 100644 --- a/libraries/networking/src/MetaverseAPI.cpp +++ b/libraries/networking/src/MetaverseAPI.cpp @@ -16,7 +16,6 @@ #include "NetworkingConstants.h" #include - namespace MetaverseAPI { // You can change the return of this function if you want to use a custom metaverse URL at compile time // or you can pass a custom URL via the env variable @@ -27,10 +26,10 @@ namespace MetaverseAPI { selectedMetaverseURL = selectedMetaverseURLSetting.get(); - const QString HIFI_METAVERSE_URL_ENV = "HIFI_METAVERSE_URL"; + const QString VIRCADIA_METAVERSE_URL_ENV = "VIRCADIA_METAVERSE_URL"; - if (QProcessEnvironment::systemEnvironment().contains(HIFI_METAVERSE_URL_ENV)) { - return QUrl(QProcessEnvironment::systemEnvironment().value(HIFI_METAVERSE_URL_ENV)); + if (QProcessEnvironment::systemEnvironment().contains(VIRCADIA_METAVERSE_URL_ENV)) { + return QUrl(QProcessEnvironment::systemEnvironment().value(VIRCADIA_METAVERSE_URL_ENV)); } return selectedMetaverseURL; diff --git a/libraries/shared/src/PathUtils.cpp b/libraries/shared/src/PathUtils.cpp index be605334068..15028090a06 100644 --- a/libraries/shared/src/PathUtils.cpp +++ b/libraries/shared/src/PathUtils.cpp @@ -42,7 +42,7 @@ static bool USE_SOURCE_TREE_RESOURCES() { static bool result = false; static std::once_flag once; std::call_once(once, [&] { - const QString USE_SOURCE_TREE_RESOURCES_FLAG("HIFI_USE_SOURCE_TREE_RESOURCES"); + const QString USE_SOURCE_TREE_RESOURCES_FLAG("VIRCADIA_USE_SOURCE_TREE_RESOURCES"); result = QProcessEnvironment::systemEnvironment().contains(USE_SOURCE_TREE_RESOURCES_FLAG); }); return result; diff --git a/libraries/shared/src/RenderForward.h b/libraries/shared/src/RenderForward.h index e6fdef255b7..0da31bac078 100644 --- a/libraries/shared/src/RenderForward.h +++ b/libraries/shared/src/RenderForward.h @@ -16,7 +16,7 @@ // This isn't necessary since android forces the forward renderer, but just in case static bool RENDER_FORWARD = true; #else -static const QString RENDER_FORWARD_STRING { "HIFI_RENDER_FORWARD" }; +static const QString RENDER_FORWARD_STRING { "VIRCADIA_RENDER_FORWARD" }; static bool RENDER_FORWARD = QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD_STRING); #endif diff --git a/plugins/oculus/src/OculusDebugDisplayPlugin.cpp b/plugins/oculus/src/OculusDebugDisplayPlugin.cpp index 429d3ecd16a..acdcd448c66 100644 --- a/plugins/oculus/src/OculusDebugDisplayPlugin.cpp +++ b/plugins/oculus/src/OculusDebugDisplayPlugin.cpp @@ -10,8 +10,8 @@ const char* OculusDebugDisplayPlugin::NAME { "Oculus Rift (Simulator)" }; -static const QString DEBUG_FLAG("HIFI_DEBUG_OCULUS"); -static bool enableDebugOculus = true || QProcessEnvironment::systemEnvironment().contains("HIFI_DEBUG_OCULUS"); +static const QString DEBUG_FLAG("VIRCADIA_DEBUG_OCULUS"); +static bool enableDebugOculus = true || QProcessEnvironment::systemEnvironment().contains("VIRCADIA_DEBUG_OCULUS"); bool OculusDebugDisplayPlugin::isSupported() const { if (!enableDebugOculus) { diff --git a/plugins/oculus/src/OculusHelpers.cpp b/plugins/oculus/src/OculusHelpers.cpp index 2693b9ee7ee..34823071161 100644 --- a/plugins/oculus/src/OculusHelpers.cpp +++ b/plugins/oculus/src/OculusHelpers.cpp @@ -35,7 +35,7 @@ bool ovr::available() { static std::once_flag once; static bool result{ false }; std::call_once(once, [&] { - static const QString DEBUG_FLAG("HIFI_DEBUG_OPENVR"); + static const QString DEBUG_FLAG("VIRCADIA_DEBUG_OPENVR"); static bool enableDebugOpenVR = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); if (enableDebugOpenVR) { return; diff --git a/plugins/openvr/src/OpenVrHelpers.cpp b/plugins/openvr/src/OpenVrHelpers.cpp index eed22426024..951767328d8 100644 --- a/plugins/openvr/src/OpenVrHelpers.cpp +++ b/plugins/openvr/src/OpenVrHelpers.cpp @@ -65,7 +65,7 @@ bool isOculusPresent() { } bool oculusViaOpenVR() { - static const QString DEBUG_FLAG("HIFI_DEBUG_OPENVR"); + static const QString DEBUG_FLAG("VIRCADIA_DEBUG_OPENVR"); static bool enableDebugOpenVR = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); return enableDebugOpenVR && isOculusPresent() && vr::VR_IsHmdPresent(); } @@ -87,7 +87,7 @@ std::string getOpenVrDeviceName() { } bool openVrSupported() { - static const QString DEBUG_FLAG("HIFI_DEBUG_OPENVR"); + static const QString DEBUG_FLAG("VIRCADIA_DEBUG_OPENVR"); static bool enableDebugOpenVR = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); return (enableDebugOpenVR || !isOculusPresent()) && vr::VR_IsHmdPresent(); } @@ -214,7 +214,7 @@ void finishOpenVrKeyboardInput() { } } -static const QString DEBUG_FLAG("HIFI_DISABLE_STEAM_VR_KEYBOARD"); +static const QString DEBUG_FLAG("VIRCADIA_DISABLE_STEAM_VR_KEYBOARD"); bool disableSteamVrKeyboard = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); void enableOpenVrKeyboard(PluginContainer* container) { diff --git a/server-console/src/modules/hf-notifications.js b/server-console/src/modules/hf-notifications.js index 1ddbd1d3079..51ebc0a9988 100644 --- a/server-console/src/modules/hf-notifications.js +++ b/server-console/src/modules/hf-notifications.js @@ -19,7 +19,7 @@ const MARKETPLACE_NOTIFICATION_POLL_TIME_MS = 600 * 1000; const OSX_CLICK_DELAY_TIMEOUT = 500; -const METAVERSE_SERVER_URL= process.env.HIFI_METAVERSE_URL ? process.env.HIFI_METAVERSE_URL : 'https://metaverse.highfidelity.com' +const METAVERSE_SERVER_URL= process.env.VIRCADIA_METAVERSE_URL ? process.env.VIRCADIA_METAVERSE_URL : 'https://metaverse.vircadia.com/live' const STORIES_URL= '/api/v1/user_stories'; const USERS_URL= '/api/v1/users'; const ECONOMIC_ACTIVITY_URL= '/api/v1/commerce/history'; diff --git a/tests-manual/gpu-textures/src/main.cpp b/tests-manual/gpu-textures/src/main.cpp index d8454c6c22e..9a7ebd1ff16 100644 --- a/tests-manual/gpu-textures/src/main.cpp +++ b/tests-manual/gpu-textures/src/main.cpp @@ -159,7 +159,7 @@ class MyTestWindow : public TestWindow { int main(int argc, char** argv) { setupHifiApplication("GPU Test"); - qputenv("HIFI_DEBUG_OPENGL", QByteArray("1")); + qputenv("VIRCADIA_DEBUG_OPENGL", QByteArray("1")); QApplication app(argc, argv); MyTestWindow window; app.exec(); diff --git a/tests-manual/render-perf/src/main.cpp b/tests-manual/render-perf/src/main.cpp index 10d0d753db5..971d43c2107 100644 --- a/tests-manual/render-perf/src/main.cpp +++ b/tests-manual/render-perf/src/main.cpp @@ -481,7 +481,7 @@ class QTestWindow : public QWindow, public AbstractViewStateInterface { _initContext.makeCurrent(); DependencyManager::get()->initializeShapePipelines(); // Render engine init - static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD"; + static const QString RENDER_FORWARD = "VIRCADIA_RENDER_FORWARD"; bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD); _renderEngine->addJob("UpdateScene"); _renderEngine->addJob("RenderMainView", _cullFunctor, isDeferred); diff --git a/tests/gpu/src/TextureTest.cpp b/tests/gpu/src/TextureTest.cpp index 70a30631edc..364b40665b9 100644 --- a/tests/gpu/src/TextureTest.cpp +++ b/tests/gpu/src/TextureTest.cpp @@ -32,7 +32,7 @@ QTEST_MAIN(TextureTest) static const QString TEST_DATA(ExternalResource::getInstance()->getUrl(ExternalResource::Bucket::HF_Public, "/austin/test_data/test_ktx.zip")); static const QString TEST_DIR_NAME("{630b8f02-52af-4cdf-a896-24e472b94b28}"); -static const QString KTX_TEST_DIR_ENV("HIFI_KTX_TEST_DIR"); +static const QString KTX_TEST_DIR_ENV("VIRCADIA_KTX_TEST_DIR"); std::string vertexShaderSource = R"SHADER( layout(location = 0) out vec2 outTexCoord0; From 21367b21742d875a953c9a389d95dbe80e9a7b31 Mon Sep 17 00:00:00 2001 From: Kalila L Date: Fri, 16 Apr 2021 02:45:39 -0400 Subject: [PATCH 2/6] Update "HF_PFX" -> "VIRCADIA_PFX" --- .github/workflows/master_build.yml | 4 ++-- BUILD.md | 4 ++-- INSTALLER.md | 2 +- cmake/macros/OptionalWinExecutableSigning.cmake | 10 +++++----- cmake/templates/NSIS.template.in | 2 +- tools/ci-scripts/postbuild.py | 16 ++++++++-------- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index ee6ef88d0e0..83264b4a98a 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -75,8 +75,8 @@ jobs: echo "CMAKE_EXTRA=-A x64" >> $GITHUB_ENV echo "SYMBOL_REGEX=\(exe\|dll\|pdb\)" >> $GITHUB_ENV echo "symbols_archive=${BUILD_NUMBER}-${{ matrix.build_type }}-win-symbols.zip" >> $GITHUB_ENV - # echo "HF_PFX_PASSPHRASE=${{secrets.pfx_key}}" >> $GITHUB_ENV - # echo "HF_PFX_FILE=${{runner.workspace}}\build\codesign.pfx" >> $GITHUB_ENV + # echo "VIRCADIA_PFX_PASSPHRASE=${{secrets.pfx_key}}" >> $GITHUB_ENV + # echo "VIRCADIA_PFX_FILE=${{runner.workspace}}\build\codesign.pfx" >> $GITHUB_ENV fi # Configuration is broken into two steps because you can't set an env var and also reference it in the same step - name: Configure build environment 2 diff --git a/BUILD.md b/BUILD.md index c3bebb749b1..1842cd1f130 100644 --- a/BUILD.md +++ b/BUILD.md @@ -96,8 +96,8 @@ PRELOADED_STARTUP_LOCATION=Location/IP/URL PRELOADED_SCRIPT_WHITELIST=ListOfEntries // Code-signing environment variables must be set during runtime of CMake AND globally when the signing takes place. -HF_PFX_FILE=Path to certificate -HF_PFX_PASSPHRASE=Passphrase for certificate +VIRCADIA_PFX_FILE=Path to certificate +VIRCADIA_PFX_PASSPHRASE=Passphrase for certificate // Determine the build type PRODUCTION_BUILD=0|1 diff --git a/INSTALLER.md b/INSTALLER.md index 4132ef72982..b7cf79bbd15 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -65,7 +65,7 @@ To produce an executable installer on Windows, the following are required: #### Code Signing (optional) -For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PASSPHRASE` environment variables to be present during CMake runtime and globally as we proceed to package the installer. +For code signing to work, you will need to set the `VIRCADIA_PFX_FILE` and `VIRCADIA_PFX_PASSPHRASE` environment variables to be present during CMake runtime and globally as we proceed to package the installer. #### Creating the Installer diff --git a/cmake/macros/OptionalWinExecutableSigning.cmake b/cmake/macros/OptionalWinExecutableSigning.cmake index 8f9fde672c6..6181d684e65 100644 --- a/cmake/macros/OptionalWinExecutableSigning.cmake +++ b/cmake/macros/OptionalWinExecutableSigning.cmake @@ -11,8 +11,8 @@ macro(optional_win_executable_signing) if (WIN32 AND PRODUCTION_BUILD AND NOT BYPASS_SIGNING) - if (DEFINED ENV{HF_PFX_FILE}) - if (DEFINED ENV{HF_PFX_PASSPHRASE}) + if (DEFINED ENV{VIRCADIA_PFX_FILE}) + if (DEFINED ENV{VIRCADIA_PFX_PASSPHRASE}) message(STATUS "Executable for ${TARGET_NAME} will be signed with SignTool.") if (NOT EXECUTABLE_PATH) @@ -22,13 +22,13 @@ macro(optional_win_executable_signing) # setup a post build command to sign the executable add_custom_command( TARGET ${TARGET_NAME} POST_BUILD - COMMAND ${SIGNTOOL_EXECUTABLE} sign /fd sha256 /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr ${TIMESERVER_URL} /td SHA256 ${EXECUTABLE_PATH} + COMMAND ${SIGNTOOL_EXECUTABLE} sign /fd sha256 /f %VIRCADIA_PFX_FILE% /p %VIRCADIA_PFX_PASSPHRASE% /tr ${TIMESERVER_URL} /td SHA256 ${EXECUTABLE_PATH} ) else () - message(FATAL_ERROR "HF_PFX_PASSPHRASE must be set for executables to be signed.") + message(FATAL_ERROR "VIRCADIA_PFX_PASSPHRASE must be set for executables to be signed.") endif () else () - message(WARNING "Creating a production build but not code signing since HF_PFX_FILE is not set.") + message(WARNING "Creating a production build but not code signing since VIRCADIA_PFX_FILE is not set.") endif () endif () endmacro() diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 33587f3e5af..494483e94a1 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -205,7 +205,7 @@ !if @BYPASS_SIGNING@ == TRUE !warning "BYPASS_SIGNING set - installer will not be signed" !else - !system '"@SIGNTOOL_EXECUTABLE@" sign /fd sha256 /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr http://timestamp.comodoca.com?td=sha256 /td SHA256 $%TEMP%\@UNINSTALLER_NAME@' = 0 + !system '"@SIGNTOOL_EXECUTABLE@" sign /fd sha256 /f %VIRCADIA_PFX_FILE% /p %VIRCADIA_PFX_PASSPHRASE% /tr http://timestamp.comodoca.com?td=sha256 /td SHA256 $%TEMP%\@UNINSTALLER_NAME@' = 0 !endif !endif diff --git a/tools/ci-scripts/postbuild.py b/tools/ci-scripts/postbuild.py index 99493d9856f..7fc9586829b 100644 --- a/tools/ci-scripts/postbuild.py +++ b/tools/ci-scripts/postbuild.py @@ -117,14 +117,14 @@ def signBuild(executablePath): print('Skipping signing because RELEASE_TYPE "{}" != "PRODUCTION"'.format(RELEASE_TYPE)) return - HF_PFX_FILE = os.getenv("HF_PFX_FILE", "") - if HF_PFX_FILE == "": - print('Skipping signing because HF_PFX_FILE is empty') + VIRCADIA_PFX_FILE = os.getenv("VIRCADIA_PFX_FILE", "") + if VIRCADIA_PFX_FILE == "": + print('Skipping signing because VIRCADIA_PFX_FILE is empty') return - HF_PFX_PASSPHRASE = os.getenv("HF_PFX_PASSPHRASE", "") - if HF_PFX_PASSPHRASE == "": - print('Skipping signing because HF_PFX_PASSPHRASE is empty') + VIRCADIA_PFX_PASSPHRASE = os.getenv("VIRCADIA_PFX_PASSPHRASE", "") + if VIRCADIA_PFX_PASSPHRASE == "": + print('Skipping signing because VIRCADIA_PFX_PASSPHRASE is empty') return # FIXME use logic similar to the SetPackagingParameteres.cmake to locate the executable @@ -135,8 +135,8 @@ def signBuild(executablePath): SIGN_TOOL, 'sign', '/fd', 'sha256', - '/f', HF_PFX_FILE, - '/p', HF_PFX_PASSPHRASE, + '/f', VIRCADIA_PFX_FILE, + '/p', VIRCADIA_PFX_PASSPHRASE, '/tr', 'http://sha256timestamp.ws.symantec.com/sha256/timestamp', '/td', 'SHA256', executablePath From 8564a9a8ba4ee4c90e1155e25420e49d2cf50642 Mon Sep 17 00:00:00 2001 From: Kalila L Date: Wed, 2 Jun 2021 15:23:14 -0400 Subject: [PATCH 3/6] More variables caught. --- .github/workflows/master_build.yml | 4 ++-- .github/workflows/pr_build.yml | 4 ++-- BUILD_WIN.md | 4 ++-- hifi_vcpkg.py | 22 +++++++++---------- pkg-scripts/new-server | 8 +++---- .../vircadia-assignment-client@.service | 2 +- pkg-scripts/vircadia-ice-server.service | 2 +- pkg-scripts/vircadia-ice-server@.service | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index 83264b4a98a..dddbbbe6113 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -11,8 +11,8 @@ env: BUILD_NUMBER: ${{ github.run_number }} CI_BUILD: Github GIT_COMMIT: ${{ github.sha }} - # VCPKG did not build well on OSX disabling HIFI_VCPKG_BOOTSTRAP, which invokes a download to a working version of vcpkg - # HIFI_VCPKG_BOOTSTRAP: true + # VCPKG did not build well on OSX disabling VIRCADIA_VCPKG_BOOTSTRAP, which invokes a download to a working version of vcpkg + # VIRCADIA_VCPKG_BOOTSTRAP: true RELEASE_TYPE: PRODUCTION RELEASE_NUMBER: ${{ github.run_number }} STABLE_BUILD: 0 diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 9d6984b5b2b..4e2c9adf40c 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -9,8 +9,8 @@ env: BUILD_TYPE: Release CI_BUILD: Github GIT_COMMIT: ${{ github.sha }} - # VCPKG did not build well on OSX disabling HIFI_VCPKG_BOOTSTRAP, which invokes a download to a working version of vcpkg - # HIFI_VCPKG_BOOTSTRAP: true + # VCPKG did not build well on OSX disabling VIRCADIA_VCPKG_BOOTSTRAP, which invokes a download to a working version of vcpkg + # VIRCADIA_VCPKG_BOOTSTRAP: true RELEASE_TYPE: PR RELEASE_NUMBER: ${{ github.event.number }} VERSION_CODE: ${{ github.event.number }} diff --git a/BUILD_WIN.md b/BUILD_WIN.md index 96f570981a1..eaa18255a76 100644 --- a/BUILD_WIN.md +++ b/BUILD_WIN.md @@ -63,13 +63,13 @@ To create this variable: * Set "Variable name" to `HIFI_VCPKG_BASE` * Set "Variable value" to any directory that you have control over. -Additionally, if you have Visual Studio 2019 installed and _only_ Visual Studio 2019 (i.e. you do not have Visual Studio 2017 installed) you must add an additional environment variable `HIFI_VCPKG_BOOTSTRAP` that will fix a bug in our `vcpkg` pre-build step. +Additionally, if you have Visual Studio 2019 installed and _only_ Visual Studio 2019 (i.e. you do not have Visual Studio 2017 installed) you must add an additional environment variable `VIRCADIA_VCPKG_BOOTSTRAP` that will fix a bug in our `vcpkg` pre-build step. To create this variable: * Naviagte to 'Edit the System Environment Variables' Through the start menu. * Click on 'Environment Variables' * Select 'New' -* Set "Variable name" to `HIFI_VCPKG_BOOTSTRAP` +* Set "Variable name" to `VIRCADIA_VCPKG_BOOTSTRAP` * Set "Variable value" to `1` ### Step 6. Running CMake to Generate Build Files diff --git a/hifi_vcpkg.py b/hifi_vcpkg.py index ebdfb6c972f..1593311fd6c 100644 --- a/hifi_vcpkg.py +++ b/hifi_vcpkg.py @@ -13,7 +13,7 @@ print = functools.partial(print, flush=True) -# Encapsulates the vcpkg system +# Encapsulates the vcpkg system class VcpkgRepo: CMAKE_TEMPLATE = """ # this file auto-generated by hifi_vcpkg.py @@ -44,8 +44,8 @@ def __init__(self, args): self.assets_url = self.readVar('EXTERNAL_BUILD_ASSETS') # The noClean flag indicates we're doing weird dependency maintenance stuff - # i.e. we've got an explicit checkout of vcpkg and we don't want the script to - # do stuff it might otherwise do. It typically indicates that we're using our + # i.e. we've got an explicit checkout of vcpkg and we don't want the script to + # do stuff it might otherwise do. It typically indicates that we're using our # own git checkout of vcpkg and manually managing it self.noClean = False @@ -76,7 +76,7 @@ def __init__(self, args): self.lockFile = os.path.join(lockDir, lockName) self.tagFile = os.path.join(self.path, '.id') self.prebuildTagFile = os.path.join(self.path, '.prebuild') - # A format version attached to the tag file... increment when you want to force the build systems to rebuild + # A format version attached to the tag file... increment when you want to force the build systems to rebuild # without the contents of the ports changing self.version = 1 self.tagContents = "{}_{}".format(self.id, self.version) @@ -182,7 +182,7 @@ def bootstrap(self): if not downloadVcpkg and not os.path.isfile(self.exe): print("Missing executable, boot-strapping") downloadVcpkg = True - + # Make sure we have a vcpkg executable testFile = os.path.join(self.path, '.vcpkg-root') if not downloadVcpkg and not os.path.isfile(testFile): @@ -190,7 +190,7 @@ def bootstrap(self): downloadVcpkg = True if downloadVcpkg: - if "HIFI_VCPKG_BOOTSTRAP" in os.environ: + if "VIRCADIA_VCPKG_BOOTSTRAP" in os.environ: print("Cloning vcpkg from github to {}".format(self.path)) hifi_utils.executeSubprocess(['git', 'clone', 'https://github.com/microsoft/vcpkg', self.path]) print("Bootstrapping vcpkg") @@ -235,7 +235,7 @@ def setupDependencies(self, qt=None): hifi_utils.downloadAndExtract(self.prebuiltArchive, self.path) self.writePrebuildTag() return - + if qt is not None: self.buildEnv['QT_CMAKE_PREFIX_PATH'] = qt @@ -321,12 +321,12 @@ def fixupCmakeScript(self): write_obj.write(line) else: isFileChanged = True - + if isFileChanged: shutil.move(newCmakeScript, cmakeScript) else: os.remove(newCmakeScript) - + def writeConfig(self): print("Writing cmake config to {}".format(self.configFilePath)) @@ -346,7 +346,7 @@ def writeConfig(self): f.write(cmakeConfig) def cleanOldBuilds(self): - # FIXME because we have the base directory, and because a build will - # update the tag file on every run, we can scan the base dir for sub directories containing + # FIXME because we have the base directory, and because a build will + # update the tag file on every run, we can scan the base dir for sub directories containing # a tag file that is older than N days, and if found, delete the directory, recovering space print("Not implemented") diff --git a/pkg-scripts/new-server b/pkg-scripts/new-server index a2ce9b330d6..28ff63e76c5 100755 --- a/pkg-scripts/new-server +++ b/pkg-scripts/new-server @@ -34,10 +34,10 @@ mkdir -p /var/lib/vircadia/$1/domain-server echo "{\"metaverse\": {\"local_port\": $(($2 + 2))},\"version\": 2.4}" > /var/lib/vircadia/$1/domain-server/config.json chown -R vircadia.vircadia /var/lib/vircadia/$1 -echo HIFI_DOMAIN_SERVER_HTTP_PORT=$2 > /etc/opt/vircadia/$1.conf -echo HIFI_DOMAIN_SERVER_HTTPS_PORT=$(($2 + 1)) >> /etc/opt/vircadia/$1.conf -echo HIFI_DOMAIN_SERVER_PORT=$(($2 + 2)) >> /etc/opt/vircadia/$1.conf -echo HIFI_DOMAIN_SERVER_DTLS_PORT=$(($2 + 3)) >> /etc/opt/vircadia/$1.conf +echo VIRCADIA_DOMAIN_SERVER_HTTP_PORT=$2 > /etc/opt/vircadia/$1.conf +echo VIRCADIA_DOMAIN_SERVER_HTTPS_PORT=$(($2 + 1)) >> /etc/opt/vircadia/$1.conf +echo VIRCADIA_DOMAIN_SERVER_PORT=$(($2 + 2)) >> /etc/opt/vircadia/$1.conf +echo VIRCADIA_DOMAIN_SERVER_DTLS_PORT=$(($2 + 3)) >> /etc/opt/vircadia/$1.conf echo "A new vircadia server has been created with the name of '$1'" echo diff --git a/pkg-scripts/vircadia-assignment-client@.service b/pkg-scripts/vircadia-assignment-client@.service index 4684947426a..dad62215235 100644 --- a/pkg-scripts/vircadia-assignment-client@.service +++ b/pkg-scripts/vircadia-assignment-client@.service @@ -14,7 +14,7 @@ User=vircadia Group=vircadia #LimitCORE=infinity #ExecStart=/opt/vircadia/assignment-client -n 6 -ExecStart=/opt/vircadia/assignment-client --min 6 --max 20 --server-port $HIFI_DOMAIN_SERVER_PORT +ExecStart=/opt/vircadia/assignment-client --min 6 --max 20 --server-port $VIRCADIA_DOMAIN_SERVER_PORT [Install] WantedBy=multi-user.target diff --git a/pkg-scripts/vircadia-ice-server.service b/pkg-scripts/vircadia-ice-server.service index d966ffe0c04..6f3324a567f 100644 --- a/pkg-scripts/vircadia-ice-server.service +++ b/pkg-scripts/vircadia-ice-server.service @@ -6,7 +6,7 @@ PartOf=vircadia-server.target [Service] Restart=on-failure -Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/vircadia/lib" +Environment="VIRCADIA_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/vircadia/lib" WorkingDirectory=/opt/vircadia User=vircadia Group=vircadia diff --git a/pkg-scripts/vircadia-ice-server@.service b/pkg-scripts/vircadia-ice-server@.service index fc5ab4615da..2626d5c827b 100644 --- a/pkg-scripts/vircadia-ice-server@.service +++ b/pkg-scripts/vircadia-ice-server@.service @@ -7,7 +7,7 @@ PartOf=vircadia-server@%i.target Restart=on-failure EnvironmentFile=/etc/opt/vircadia/%i.conf -Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/vircadia/lib" "HOME=/var/lib/vircadia/%i" +Environment="VIRCADIA_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/vircadia/lib" "HOME=/var/lib/vircadia/%i" PrivateTmp=true WorkingDirectory=/opt/vircadia User=vircadia From 21f4c618bdc07ac8c1c79669fc293e5b7a1917e1 Mon Sep 17 00:00:00 2001 From: Kalila L Date: Wed, 2 Jun 2021 15:38:41 -0400 Subject: [PATCH 4/6] Rename protocol and app protocol. --- cmake/macros/SetPackagingParameters.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index d7f1aa27868..6b5082f2530 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -28,7 +28,7 @@ macro(SET_PACKAGING_PARAMETERS) set_from_env(PRELOADED_STARTUP_LOCATION PRELOADED_STARTUP_LOCATION "") set_from_env(PRELOADED_SCRIPT_WHITELIST PRELOADED_SCRIPT_WHITELIST "") - + set_from_env(BYPASS_SIGNING BYPASS_SIGNING 0) message(STATUS "The RELEASE_TYPE variable is: ${RELEASE_TYPE}") @@ -43,8 +43,8 @@ macro(SET_PACKAGING_PARAMETERS) set(PRODUCTION_BUILD 1) set(BUILD_VERSION ${RELEASE_NUMBER}) set(BUILD_ORGANIZATION "Vircadia") - set(HIGH_FIDELITY_PROTOCOL "hifi") - set(HIGH_FIDELITY_APP_PROTOCOL "hifiapp") + set(HIGH_FIDELITY_PROTOCOL "vw") + set(HIGH_FIDELITY_APP_PROTOCOL "vwapp") set(INTERFACE_BUNDLE_NAME "interface") set(INTERFACE_ICON_PREFIX "interface") @@ -61,7 +61,7 @@ macro(SET_PACKAGING_PARAMETERS) if (NOT BYPASS_SIGNING) set(BYPASS_SIGNING 0) - endif () + endif () elseif (RELEASE_TYPE STREQUAL "PR") set(DEPLOY_PACKAGE TRUE) @@ -144,7 +144,7 @@ macro(SET_PACKAGING_PARAMETERS) set(COMPONENT_APP_PATH "${CONSOLE_APP_CONTENTS}/MacOS/Components.app") set(COMPONENT_INSTALL_DIR "${COMPONENT_APP_PATH}/Contents/MacOS") set(CONSOLE_PLUGIN_INSTALL_DIR "${COMPONENT_APP_PATH}/Contents/PlugIns") - + set(SCREENSHARE_APP_CONTENTS "${SCREENSHARE_INSTALL_APP_PATH}/Contents") set(INTERFACE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${INTERFACE_BUNDLE_NAME}.app") @@ -191,7 +191,7 @@ macro(SET_PACKAGING_PARAMETERS) set(INTERFACE_HF_SHORTCUT_NAME "${INTERFACE_SHORTCUT_NAME}") set(CONSOLE_HF_SHORTCUT_NAME "Vircadia ${CONSOLE_SHORTCUT_NAME}") set(SANDBOX_HF_SHORTCUT_NAME "Vircadia ${SANDBOX_SHORTCUT_NAME}") - + set(PRE_SANDBOX_INTERFACE_SHORTCUT_NAME "Vircadia") set(PRE_SANDBOX_CONSOLE_SHORTCUT_NAME "Server Console") From 5db189bb996b7c40452becbc344c58f88e07df22 Mon Sep 17 00:00:00 2001 From: Kalila L Date: Mon, 21 Jun 2021 04:59:17 -0400 Subject: [PATCH 5/6] Alter scheme in NetworkingConstants "hifi" -> "vw" --- libraries/networking/src/NetworkingConstants.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/NetworkingConstants.h b/libraries/networking/src/NetworkingConstants.h index d5ad90a6f43..e5d3ae87923 100644 --- a/libraries/networking/src/NetworkingConstants.h +++ b/libraries/networking/src/NetworkingConstants.h @@ -83,8 +83,8 @@ namespace NetworkingConstants { } const QString HIFI_URL_SCHEME_ABOUT = "about"; -const QString URL_SCHEME_HIFI = "hifi"; -const QString URL_SCHEME_HIFIAPP = "hifiapp"; +const QString URL_SCHEME_HIFI = "vw"; +const QString URL_SCHEME_HIFIAPP = "vwapp"; const QString URL_SCHEME_DATA = "data"; const QString URL_SCHEME_QRC = "qrc"; const QString HIFI_URL_SCHEME_FILE = "file"; From f8be8fecfc7a6a30fe33a1b60e2bd018830da3d3 Mon Sep 17 00:00:00 2001 From: Kalila <69767640+digisomni@users.noreply.github.com> Date: Fri, 21 Oct 2022 19:08:12 +0800 Subject: [PATCH 6/6] Update SetPackagingParameters.cmake --- cmake/macros/SetPackagingParameters.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 99ccf4e705d..88d7904e5a6 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -5,6 +5,7 @@ # Created by Leonardo Murillo on 07/14/2015. # Copyright 2015 High Fidelity, Inc. # Copyright 2020 Vircadia contributors. +# Copyright 2020 DigiSomni LLC # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -49,8 +50,8 @@ macro(SET_PACKAGING_PARAMETERS) set(PRODUCTION_BUILD 1) set(BUILD_VERSION ${RELEASE_NUMBER}) set(BUILD_ORGANIZATION "Vircadia") - set(HIGH_FIDELITY_PROTOCOL "vw") - set(HIGH_FIDELITY_APP_PROTOCOL "vwapp") + set(HIGH_FIDELITY_PROTOCOL "xr") + set(HIGH_FIDELITY_APP_PROTOCOL "xrapp") set(INTERFACE_ICON_PREFIX "interface") # add definition for this release type