diff --git a/BUILD.md b/BUILD.md index eea91e118b..2d94d1b5b1 100644 --- a/BUILD.md +++ b/BUILD.md @@ -80,6 +80,13 @@ Where /path/to/directory is the path to a directory where you wish the build fil // The type of release. RELEASE_TYPE=PRODUCTION|PR|DEV + // The Interface will have a custom default home and startup location. + INITIAL_STARTUP_LOCATION=Location/IP/URL + + // 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 + // Determine the build type PRODUCTION_BUILD=0|1 PR_BUILD=0|1 diff --git a/INSTALL.md b/INSTALL.md index af398ee6b3..994725ac28 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,5 +1,7 @@ # Creating an Installer +*Last Updated on August 24, 2020* + Follow the [build guide](BUILD.md) to figure out how to build Vircadia for your platform. During generation, CMake should produce an `install` target and a `package` target. @@ -13,6 +15,8 @@ To produce an installer, run the `package` target. However you will want to foll #### Windows +##### Prerequisites + To produce an executable installer on Windows, the following are required: 1. [7-zip]() @@ -59,6 +63,12 @@ To produce an executable installer on Windows, the following are required: 1. [Node.JS and NPM]() 1. Install version 10.15.0 LTS +##### 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. + +##### Creating the Installer + 1. Perform a clean cmake from a new terminal. 1. Open the `vircadia.sln` solution with elevated (administrator) permissions on Visual Studio and select the **Release** configuration. 1. Build the solution. diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 1b7b3dbe8e..0f47a2fcb3 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -23,6 +23,7 @@ macro(SET_PACKAGING_PARAMETERS) set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV") set_from_env(RELEASE_NUMBER RELEASE_NUMBER "") 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}") diff --git a/cmake/templates/BuildInfo.h.in b/cmake/templates/BuildInfo.h.in index 9fc9d9be81..02f6a50919 100644 --- a/cmake/templates/BuildInfo.h.in +++ b/cmake/templates/BuildInfo.h.in @@ -22,11 +22,12 @@ namespace BuildInfo { const QString DOMAIN_SERVER_NAME = "domain-server"; const QString AC_CLIENT_SERVER_NAME = "ac-client"; 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 BUILD_NUMBER = "@BUILD_NUMBER@"; const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@"; const QString BUILD_TIME = "@BUILD_TIME@"; + const QString INITIAL_STARTUP_LOCATION = "@INITIAL_STARTUP_LOCATION@"; enum BuildType { Dev, diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index fe2077f752..d86745a8b9 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3976,6 +3976,11 @@ void Application::handleSandboxStatus(QNetworkReply* reply) { // If this is a first run we short-circuit the address passed in if (_firstRun.get()) { + if (!BuildInfo::INITIAL_STARTUP_LOCATION.isEmpty()) { + DependencyManager::get()->setHomeLocationToAddress(NetworkingConstants::DEFAULT_VIRCADIA_ADDRESS); + Menu::getInstance()->triggerOption(MenuOption::HomeLocation); + } + if (!_overrideEntry) { DependencyManager::get()->goToEntry(); sentTo = SENT_TO_ENTRY; diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index e460b4b56b..e175309f06 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -238,11 +238,11 @@ Menu::Menu() { // Navigate > Start-up Location MenuWrapper* startupLocationMenu = navigateMenu->addMenu(MenuOption::StartUpLocation); - QActionGroup* startupLocatiopnGroup = new QActionGroup(startupLocationMenu); - startupLocatiopnGroup->setExclusive(true); - startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0, + QActionGroup* startupLocationGroup = new QActionGroup(startupLocationMenu); + startupLocationGroup->setExclusive(true); + startupLocationGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0, false)); - startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0, + startupLocationGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0, true)); // Settings menu ---------------------------------- diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 5f08f19d2b..94bcb718d3 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -27,16 +27,22 @@ #include "NodeList.h" #include "NetworkLogging.h" +#include "NetworkingConstants.h" #include "UserActivityLogger.h" #include "udt/PacketHeaders.h" -const QString DEFAULT_HIFI_ADDRESS = "file:///~/serverless/tutorial.json"; -const QString DEFAULT_HOME_ADDRESS = "file:///~/serverless/tutorial.json"; -const QString REDIRECT_HIFI_ADDRESS = "file:///~/serverless/redirect.json"; +const QString REDIRECT_HIFI_ADDRESS = NetworkingConstants::REDIRECT_HIFI_ADDRESS; const QString ADDRESS_MANAGER_SETTINGS_GROUP = "AddressManager"; const QString SETTINGS_CURRENT_ADDRESS_KEY = "address"; -Setting::Handle currentAddressHandle(QStringList() << ADDRESS_MANAGER_SETTINGS_GROUP << "address", DEFAULT_HIFI_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 currentAddressHandle(QStringList() << ADDRESS_MANAGER_SETTINGS_GROUP << "address", DEFAULT_VIRCADIA_ADDRESS); bool AddressManager::isConnected() { return DependencyManager::get()->getDomainHandler().isConnected(); diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index 148c4f8580..daca6d3392 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -22,8 +22,8 @@ #include "AccountManager.h" -extern const QString DEFAULT_HIFI_ADDRESS; extern const QString REDIRECT_HIFI_ADDRESS; +extern const QString DEFAULT_VIRCADIA_ADDRESS; extern const QString DEFAULT_HOME_ADDRESS; const QString SANDBOX_HIFI_ADDRESS = "hifi://localhost"; @@ -292,7 +292,8 @@ public slots: * location history is correctly maintained. */ void goToLocalSandbox(QString path = "", LookupTrigger trigger = LookupTrigger::StartupFromSettings) { - handleUrl(SANDBOX_HIFI_ADDRESS + path, trigger); } + handleUrl(SANDBOX_HIFI_ADDRESS + path, trigger); + } /**jsdoc * 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 * location history is correctly maintained. */ - void goToEntry(LookupTrigger trigger = LookupTrigger::StartupFromSettings) { handleUrl(DEFAULT_HIFI_ADDRESS, trigger); } + void goToEntry(LookupTrigger trigger = LookupTrigger::StartupFromSettings) { + handleUrl(DEFAULT_VIRCADIA_ADDRESS, trigger); + } /**jsdoc * Takes you to the specified user's location. diff --git a/libraries/networking/src/NetworkingConstants.h b/libraries/networking/src/NetworkingConstants.h index edc1c1a1ef..c20753f8b7 100644 --- a/libraries/networking/src/NetworkingConstants.h +++ b/libraries/networking/src/NetworkingConstants.h @@ -56,7 +56,10 @@ namespace NetworkingConstants { const QUrl HELP_SCRIPTING_REFERENCE_URL{ "https://apidocs.vircadia.dev/" }; const QUrl HELP_RELEASE_NOTES_URL{ "https://docs.vircadia.dev/release-notes.html" }; const QUrl HELP_BUG_REPORT_URL{ "https://github.com/kasenvr/project-athena/issues" }; - + + const QString DEFAULT_VIRCADIA_ADDRESS = "file:///~/serverless/tutorial.json"; + const QString DEFAULT_HOME_ADDRESS = "file:///~/serverless/tutorial.json"; + const QString REDIRECT_HIFI_ADDRESS = "file:///~/serverless/redirect.json"; } const QString HIFI_URL_SCHEME_ABOUT = "about";