mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 04:24:47 +02:00
Add option to build an Interface to go to specified address by default.
This commit is contained in:
parent
a032ac66b1
commit
a2bd06993f
6 changed files with 35 additions and 12 deletions
|
@ -23,6 +23,7 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV")
|
set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV")
|
||||||
set_from_env(RELEASE_NUMBER RELEASE_NUMBER "")
|
set_from_env(RELEASE_NUMBER RELEASE_NUMBER "")
|
||||||
set_from_env(STABLE_BUILD STABLE_BUILD 0)
|
set_from_env(STABLE_BUILD STABLE_BUILD 0)
|
||||||
|
set_from_env(INITIAL_STARTUP_LOCATION INITIAL_STARTUP_LOCATION "")
|
||||||
|
|
||||||
message(STATUS "The RELEASE_TYPE variable is: ${RELEASE_TYPE}")
|
message(STATUS "The RELEASE_TYPE variable is: ${RELEASE_TYPE}")
|
||||||
|
|
||||||
|
|
|
@ -22,11 +22,12 @@ namespace BuildInfo {
|
||||||
const QString DOMAIN_SERVER_NAME = "domain-server";
|
const QString DOMAIN_SERVER_NAME = "domain-server";
|
||||||
const QString AC_CLIENT_SERVER_NAME = "ac-client";
|
const QString AC_CLIENT_SERVER_NAME = "ac-client";
|
||||||
const QString MODIFIED_ORGANIZATION = "@BUILD_ORGANIZATION@";
|
const QString MODIFIED_ORGANIZATION = "@BUILD_ORGANIZATION@";
|
||||||
const QString ORGANIZATION_DOMAIN = "highfidelity.io";
|
const QString ORGANIZATION_DOMAIN = "vircadia.com";
|
||||||
const QString VERSION = "@BUILD_VERSION@";
|
const QString VERSION = "@BUILD_VERSION@";
|
||||||
const QString BUILD_NUMBER = "@BUILD_NUMBER@";
|
const QString BUILD_NUMBER = "@BUILD_NUMBER@";
|
||||||
const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@";
|
const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@";
|
||||||
const QString BUILD_TIME = "@BUILD_TIME@";
|
const QString BUILD_TIME = "@BUILD_TIME@";
|
||||||
|
const QString INITIAL_STARTUP_LOCATION = "@INITIAL_STARTUP_LOCATION@";
|
||||||
|
|
||||||
enum BuildType {
|
enum BuildType {
|
||||||
Dev,
|
Dev,
|
||||||
|
|
|
@ -3974,6 +3974,11 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
|
||||||
|
|
||||||
// If this is a first run we short-circuit the address passed in
|
// If this is a first run we short-circuit the address passed in
|
||||||
if (_firstRun.get()) {
|
if (_firstRun.get()) {
|
||||||
|
if (!BuildInfo::INITIAL_STARTUP_LOCATION.isEmpty()) {
|
||||||
|
DependencyManager::get<LocationBookmarks>()->setHomeLocationToAddress(NetworkingConstants::DEFAULT_VIRCADIA_ADDRESS);
|
||||||
|
Menu::getInstance()->triggerOption(MenuOption::HomeLocation);
|
||||||
|
}
|
||||||
|
|
||||||
if (!_overrideEntry) {
|
if (!_overrideEntry) {
|
||||||
DependencyManager::get<AddressManager>()->goToEntry();
|
DependencyManager::get<AddressManager>()->goToEntry();
|
||||||
sentTo = SENT_TO_ENTRY;
|
sentTo = SENT_TO_ENTRY;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include <AddressManager.h>
|
#include <AddressManager.h>
|
||||||
#include <AudioClient.h>
|
#include <AudioClient.h>
|
||||||
|
#include <BuildInfo.h>
|
||||||
#include <CrashHelpers.h>
|
#include <CrashHelpers.h>
|
||||||
#include <DependencyManager.h>
|
#include <DependencyManager.h>
|
||||||
#include <ui/TabletScriptingInterface.h>
|
#include <ui/TabletScriptingInterface.h>
|
||||||
|
@ -232,12 +233,19 @@ Menu::Menu() {
|
||||||
|
|
||||||
// Navigate > Start-up Location
|
// Navigate > Start-up Location
|
||||||
MenuWrapper* startupLocationMenu = navigateMenu->addMenu(MenuOption::StartUpLocation);
|
MenuWrapper* startupLocationMenu = navigateMenu->addMenu(MenuOption::StartUpLocation);
|
||||||
QActionGroup* startupLocatiopnGroup = new QActionGroup(startupLocationMenu);
|
QActionGroup* startupLocationGroup = new QActionGroup(startupLocationMenu);
|
||||||
startupLocatiopnGroup->setExclusive(true);
|
startupLocationGroup->setExclusive(true);
|
||||||
startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0,
|
if (!BuildInfo::INITIAL_STARTUP_LOCATION.isEmpty()) {
|
||||||
false));
|
startupLocationGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0,
|
||||||
startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0,
|
true));
|
||||||
true));
|
startupLocationGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0,
|
||||||
|
false));
|
||||||
|
} else {
|
||||||
|
startupLocationGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0,
|
||||||
|
false));
|
||||||
|
startupLocationGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0,
|
||||||
|
true));
|
||||||
|
}
|
||||||
|
|
||||||
// Settings menu ----------------------------------
|
// Settings menu ----------------------------------
|
||||||
MenuWrapper* settingsMenu = addMenu("Settings");
|
MenuWrapper* settingsMenu = addMenu("Settings");
|
||||||
|
|
|
@ -31,12 +31,17 @@
|
||||||
#include "UserActivityLogger.h"
|
#include "UserActivityLogger.h"
|
||||||
#include "udt/PacketHeaders.h"
|
#include "udt/PacketHeaders.h"
|
||||||
|
|
||||||
const QString DEFAULT_VIRCADIA_ADDRESS = NetworkingConstants::DEFAULT_VIRCADIA_ADDRESS;
|
|
||||||
const QString DEFAULT_HOME_ADDRESS = NetworkingConstants::DEFAULT_HOME_ADDRESS;
|
|
||||||
const QString REDIRECT_HIFI_ADDRESS = NetworkingConstants::REDIRECT_HIFI_ADDRESS;
|
const QString REDIRECT_HIFI_ADDRESS = NetworkingConstants::REDIRECT_HIFI_ADDRESS;
|
||||||
const QString ADDRESS_MANAGER_SETTINGS_GROUP = "AddressManager";
|
const QString ADDRESS_MANAGER_SETTINGS_GROUP = "AddressManager";
|
||||||
const QString SETTINGS_CURRENT_ADDRESS_KEY = "address";
|
const QString SETTINGS_CURRENT_ADDRESS_KEY = "address";
|
||||||
|
|
||||||
|
const QString DEFAULT_VIRCADIA_ADDRESS = (!BuildInfo::INITIAL_STARTUP_LOCATION.isEmpty())
|
||||||
|
? BuildInfo::INITIAL_STARTUP_LOCATION
|
||||||
|
: NetworkingConstants::DEFAULT_VIRCADIA_ADDRESS;
|
||||||
|
const QString DEFAULT_HOME_ADDRESS = (!BuildInfo::INITIAL_STARTUP_LOCATION.isEmpty())
|
||||||
|
? BuildInfo::INITIAL_STARTUP_LOCATION
|
||||||
|
: NetworkingConstants::DEFAULT_VIRCADIA_ADDRESS;
|
||||||
|
|
||||||
Setting::Handle<QUrl> currentAddressHandle(QStringList() << ADDRESS_MANAGER_SETTINGS_GROUP << "address", DEFAULT_VIRCADIA_ADDRESS);
|
Setting::Handle<QUrl> currentAddressHandle(QStringList() << ADDRESS_MANAGER_SETTINGS_GROUP << "address", DEFAULT_VIRCADIA_ADDRESS);
|
||||||
|
|
||||||
bool AddressManager::isConnected() {
|
bool AddressManager::isConnected() {
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
#include "AccountManager.h"
|
#include "AccountManager.h"
|
||||||
|
|
||||||
extern const QString DEFAULT_VIRCADIA_ADDRESS;
|
|
||||||
extern const QString REDIRECT_HIFI_ADDRESS;
|
extern const QString REDIRECT_HIFI_ADDRESS;
|
||||||
|
extern const QString DEFAULT_VIRCADIA_ADDRESS;
|
||||||
extern const QString DEFAULT_HOME_ADDRESS;
|
extern const QString DEFAULT_HOME_ADDRESS;
|
||||||
|
|
||||||
const QString SANDBOX_HIFI_ADDRESS = "hifi://localhost";
|
const QString SANDBOX_HIFI_ADDRESS = "hifi://localhost";
|
||||||
|
@ -292,7 +292,8 @@ public slots:
|
||||||
* location history is correctly maintained.
|
* location history is correctly maintained.
|
||||||
*/
|
*/
|
||||||
void goToLocalSandbox(QString path = "", LookupTrigger trigger = LookupTrigger::StartupFromSettings) {
|
void goToLocalSandbox(QString path = "", LookupTrigger trigger = LookupTrigger::StartupFromSettings) {
|
||||||
handleUrl(SANDBOX_HIFI_ADDRESS + path, trigger); }
|
handleUrl(SANDBOX_HIFI_ADDRESS + path, trigger);
|
||||||
|
}
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Takes you to the default "welcome" metaverse address.
|
* Takes you to the default "welcome" metaverse address.
|
||||||
|
@ -300,7 +301,9 @@ public slots:
|
||||||
* @param {location.LookupTrigger} trigger=StartupFromSettings - The reason for the function call. Helps ensure that user's
|
* @param {location.LookupTrigger} trigger=StartupFromSettings - The reason for the function call. Helps ensure that user's
|
||||||
* location history is correctly maintained.
|
* location history is correctly maintained.
|
||||||
*/
|
*/
|
||||||
void goToEntry(LookupTrigger trigger = LookupTrigger::StartupFromSettings) { handleUrl(DEFAULT_VIRCADIA_ADDRESS, trigger); }
|
void goToEntry(LookupTrigger trigger = LookupTrigger::StartupFromSettings) {
|
||||||
|
handleUrl(DEFAULT_VIRCADIA_ADDRESS, trigger);
|
||||||
|
}
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Takes you to the specified user's location.
|
* Takes you to the specified user's location.
|
||||||
|
|
Loading…
Reference in a new issue