Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update env variables and protocol. #1130

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/master_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -77,8 +77,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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,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
Expand Down
4 changes: 2 additions & 2 deletions BUILD_WIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,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:
* Navigate 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 7. Running CMake to Generate Build Files
Expand Down
2 changes: 1 addition & 1 deletion INSTALLER.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions assignment-client/src/AssignmentClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ void AssignmentClient::handleStopNodePacket(QSharedPointer<ReceivedMessage> 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();
Expand Down
10 changes: 5 additions & 5 deletions cmake/macros/OptionalWinExecutableSigning.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
12 changes: 6 additions & 6 deletions cmake/macros/SetPackagingParameters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -49,8 +49,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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am heavily against calling it vw:// as it will make is impossible for a user to ever find information about it on any big search engine. Problem is that someone that doesn't know Vircadia won't be able to find out what a vw:// link is for. Considering how little people use links like this nowadays, people that use Vircadia will most likely also not know what that is for. I am pretty sure that even on a hifi:// link, most fairly new users will go "What is this?".

Personally I am for vircadia:// as that leaves no room for interpretation and will yield good results on all major search engines.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the 'w' stand for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vw = virtual world. I gotta reapproach this, been a while since I've thought about the possibilities and implications to each.

Copy link

@Penguin-Guru Penguin-Guru Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I thought, but aren't the "worlds" called domains?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but these are ultimately virtual worlds in a broader context. Domain is how we reference the servers or the worlds in a more Vircadia-focused context. However, to the outside world a virtual world would be the easiest way to explain what this all is, as they are in fact... virtual worlds. But vw:// is super compact and there is well, VW (the car company), so other options may be helpful to gain traction with in terms of SEO.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I would probably use "vircadia://" unless "vw://" is already used by other (ideally compatible) services. The same could be said for "hifi://". I don't think there's any harm in supporting an arbitrary number of protocol extension, but I would say "vircadia://" is a good place to start. My opinion.

set(HIGH_FIDELITY_APP_PROTOCOL "vwapp")
set(INTERFACE_ICON_PREFIX "interface")

# add definition for this release type
Expand All @@ -66,7 +66,7 @@ macro(SET_PACKAGING_PARAMETERS)

if (NOT BYPASS_SIGNING)
set(BYPASS_SIGNING 0)
endif ()
endif ()

elseif (RELEASE_TYPE STREQUAL "PR")
set(DEPLOY_PACKAGE TRUE)
Expand Down Expand Up @@ -151,7 +151,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 "${INTERFACE_INSTALL_DIR}/${INTERFACE_BUNDLE_NAME}.app")
Expand Down Expand Up @@ -198,7 +198,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")

Expand Down
2 changes: 1 addition & 1 deletion cmake/templates/NSIS.template.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 9 additions & 9 deletions hifi_vcpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -77,7 +77,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)
Expand Down Expand Up @@ -189,15 +189,15 @@ 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):
print("Missing {}, bootstrapping".format(testFile))
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")
Expand Down Expand Up @@ -242,7 +242,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

Expand Down Expand Up @@ -328,12 +328,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))
Expand All @@ -353,7 +353,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")
8 changes: 4 additions & 4 deletions interface/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -4531,9 +4531,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));
Expand Down
6 changes: 3 additions & 3 deletions interface/src/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<OffscreenUi>()->clearCache();

#include "Menu.h"
Expand Down Expand Up @@ -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");

Expand Down
2 changes: 1 addition & 1 deletion interface/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);


Expand Down
4 changes: 2 additions & 2 deletions libraries/gl/src/gl/GLHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <gpu/TextureTable.h>
#include <gpu/gl/GLTexelFormat.h>

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);


Expand Down
16 changes: 8 additions & 8 deletions libraries/networking/src/DomainHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
7 changes: 3 additions & 4 deletions libraries/networking/src/MetaverseAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "NetworkingConstants.h"
#include <SettingHandle.h>


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
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions libraries/networking/src/NetworkingConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading