mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 03:53:52 +02:00
allow passing of custom URL on env
This commit is contained in:
parent
139976d8bb
commit
7a81c3e8e7
1 changed files with 5 additions and 2 deletions
|
@ -28,9 +28,12 @@ namespace NetworkingConstants {
|
|||
const QUrl METAVERSE_SERVER_URL_STABLE("https://metaverse.highfidelity.com");
|
||||
const QUrl METAVERSE_SERVER_URL_STAGING("https://staging.highfidelity.com");
|
||||
|
||||
// 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
|
||||
static const QUrl METAVERSE_SERVER_URL() {
|
||||
static const QUrl serverURL = QProcessEnvironment::systemEnvironment().contains("HIFI_STAGING_METAVERSE")
|
||||
? METAVERSE_SERVER_URL_STAGING
|
||||
static const QString HIFI_METAVERSE_URL_ENV = "HIFI_METAVERSE_URL";
|
||||
static const QUrl serverURL = QProcessEnvironment::systemEnvironment().contains(HIFI_METAVERSE_URL_ENV)
|
||||
? QUrl(QProcessEnvironment::systemEnvironment().value(HIFI_METAVERSE_URL_ENV))
|
||||
: METAVERSE_SERVER_URL_STABLE;
|
||||
return serverURL;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue