From 5c7e6446d036797e95e0c31071c7c4c28d2dc879 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Mon, 4 May 2020 21:03:13 +1200 Subject: [PATCH 1/6] Update to build using latest OpenVR SDK package --- cmake/ports/openvr/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/ports/openvr/portfile.cmake b/cmake/ports/openvr/portfile.cmake index 5e4211907d..b91bdd1d54 100644 --- a/cmake/ports/openvr/portfile.cmake +++ b/cmake/ports/openvr/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ValveSoftware/openvr - REF v1.0.16 - SHA512 967356563ba4232da5361510c7519d3058e09eced4571aadc00d8a75ab1f299a0aebda2b0b10b0ffb6c6a443fd718634d0c0103964e289961449c93e8d7b9d02 + REF v1.11.11 + SHA512 25bddb0e82eea091fe5101d0d3de1de7bb81b4504adc0c8d8e687d2502c0167bc5a11e68bc343d7563fb4db7c917e9d0e2ea99bc1d8016d479874b0c6bd7f121 HEAD_REF master ) From da2aefb6b21533ac9f726508611a1dd46a7febf6 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Mon, 4 May 2020 21:04:17 +1200 Subject: [PATCH 2/6] There are no longer so-called "high quality" overlays --- plugins/openvr/src/OpenVrHelpers.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/openvr/src/OpenVrHelpers.cpp b/plugins/openvr/src/OpenVrHelpers.cpp index ce60719d67..c9511e22ae 100644 --- a/plugins/openvr/src/OpenVrHelpers.cpp +++ b/plugins/openvr/src/OpenVrHelpers.cpp @@ -413,7 +413,6 @@ void showMinSpecWarning() { vrSystem->ResetSeatedZeroPose(); QString imagePath = PathUtils::resourcesPath() + "/images/steam-min-spec-failed.png"; vrOverlay->SetOverlayFromFile(minSpecFailedOverlay, imagePath.toLocal8Bit().toStdString().c_str()); - vrOverlay->SetHighQualityOverlay(minSpecFailedOverlay); vrOverlay->SetOverlayWidthInMeters(minSpecFailedOverlay, 1.4f); vrOverlay->SetOverlayInputMethod(minSpecFailedOverlay, vr::VROverlayInputMethod_Mouse); vrOverlay->ShowOverlay(minSpecFailedOverlay); From f83ea58a10cc683f4e92c38618c2876413fdfe84 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 7 May 2020 15:42:30 +1200 Subject: [PATCH 3/6] Fix erroneous hard-coded audio setting string --- plugins/openvr/src/OpenVrHelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/openvr/src/OpenVrHelpers.cpp b/plugins/openvr/src/OpenVrHelpers.cpp index c9511e22ae..e55e7feaf4 100644 --- a/plugins/openvr/src/OpenVrHelpers.cpp +++ b/plugins/openvr/src/OpenVrHelpers.cpp @@ -100,7 +100,7 @@ QString getVrSettingString(const char* section, const char* setting) { vr::IVRSettings * vrSettings = vr::VRSettings(); if (vrSettings) { vr::EVRSettingsError error = vr::VRSettingsError_None; - vrSettings->GetString(vr::k_pch_audio_Section, vr::k_pch_audio_OnPlaybackDevice_String, BUFFER, BUFFER_SIZE, &error); + vrSettings->GetString(vr::k_pch_audio_Section, setting, BUFFER, BUFFER_SIZE, &error); if (error == vr::VRSettingsError_None) { result = BUFFER; } From be8d97cbf70ba3b2177fac8478e23c266810e20a Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 7 May 2020 16:05:49 +1200 Subject: [PATCH 4/6] Use new audio setting API values --- plugins/openvr/src/OpenVrDisplayPlugin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/openvr/src/OpenVrDisplayPlugin.cpp b/plugins/openvr/src/OpenVrDisplayPlugin.cpp index 78b462369b..7691d2ab70 100644 --- a/plugins/openvr/src/OpenVrDisplayPlugin.cpp +++ b/plugins/openvr/src/OpenVrDisplayPlugin.cpp @@ -738,26 +738,28 @@ int OpenVrDisplayPlugin::getRequiredThreadCount() const { } QString OpenVrDisplayPlugin::getPreferredAudioInDevice() const { - QString device = getVrSettingString(vr::k_pch_audio_Section, vr::k_pch_audio_OnPlaybackDevice_String); + QString device = getVrSettingString(vr::k_pch_audio_Section, vr::k_pch_audio_RecordingDeviceOverride_String); if (!device.isEmpty()) { static const WCHAR INIT = 0; size_t size = device.size() + 1; std::vector deviceW; deviceW.assign(size, INIT); device.toWCharArray(deviceW.data()); + // FIXME: This may not be necessary if vr::k_pch_audio_RecordingDeviceOverride_StringName is used above. device = AudioClient::getWinDeviceName(deviceW.data()); } return device; } QString OpenVrDisplayPlugin::getPreferredAudioOutDevice() const { - QString device = getVrSettingString(vr::k_pch_audio_Section, vr::k_pch_audio_OnRecordDevice_String); + QString device = getVrSettingString(vr::k_pch_audio_Section, vr::k_pch_audio_PlaybackDeviceOverride_String); if (!device.isEmpty()) { static const WCHAR INIT = 0; size_t size = device.size() + 1; std::vector deviceW; deviceW.assign(size, INIT); device.toWCharArray(deviceW.data()); + // FIXME: This may not be necessary if vr::k_pch_audio_PlaybackDeviceOverride_StringName is used above. device = AudioClient::getWinDeviceName(deviceW.data()); } return device; From 407b2a4f2283d73590e113ca906ea0e5baa6b69a Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Wed, 13 May 2020 21:05:22 +0200 Subject: [PATCH 5/6] Remove all uses of QString::null It's deprecated and produces a warning on Qt 5.14 --- launchers/qt/src/BuildsRequest.h | 4 ++-- launchers/qt/src/LauncherState.cpp | 2 +- launchers/qt/src/LauncherState.h | 2 +- launchers/qt/src/UserSettingsRequest.h | 2 +- libraries/shared/src/PathUtils.h | 2 +- tools/oven/src/BakerCLI.h | 2 +- tools/oven/src/OvenCLIApplication.cpp | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/launchers/qt/src/BuildsRequest.h b/launchers/qt/src/BuildsRequest.h index 865d375d2a..cb33182cdb 100644 --- a/launchers/qt/src/BuildsRequest.h +++ b/launchers/qt/src/BuildsRequest.h @@ -4,10 +4,10 @@ #include struct Build { - QString tag{ QString::null }; + QString tag; int latestVersion{ 0 }; int buildNumber{ 0 }; - QString installerZipURL{ QString::null }; + QString installerZipURL; }; struct Builds { diff --git a/launchers/qt/src/LauncherState.cpp b/launchers/qt/src/LauncherState.cpp index 300bd37ef8..03e91ae58f 100644 --- a/launchers/qt/src/LauncherState.cpp +++ b/launchers/qt/src/LauncherState.cpp @@ -244,7 +244,7 @@ void LauncherState::getCurrentClientVersion() { if (match.hasMatch()) { _currentClientVersion = match.captured("version"); } else { - _currentClientVersion = QString::null; + _currentClientVersion.clear(); } qDebug() << "Current client version is: " << _currentClientVersion; diff --git a/launchers/qt/src/LauncherState.h b/launchers/qt/src/LauncherState.h index 39c4141b81..c0eb44cb08 100644 --- a/launchers/qt/src/LauncherState.h +++ b/launchers/qt/src/LauncherState.h @@ -176,7 +176,7 @@ private: QString _displayName; QString _applicationErrorMessage; QString _currentClientVersion; - QString _buildTag { QString::null }; + QString _buildTag; QString _contentCacheURL; QString _loginTokenResponse; QFile _clientZipFile; diff --git a/launchers/qt/src/UserSettingsRequest.h b/launchers/qt/src/UserSettingsRequest.h index 5827364377..a42a70df37 100644 --- a/launchers/qt/src/UserSettingsRequest.h +++ b/launchers/qt/src/UserSettingsRequest.h @@ -6,7 +6,7 @@ #include "LoginRequest.h" struct UserSettings { - QString homeLocation{ QString::null }; + QString homeLocation; }; class UserSettingsRequest : public QObject { diff --git a/libraries/shared/src/PathUtils.h b/libraries/shared/src/PathUtils.h index 4ab6a79e22..142cd7bfbc 100644 --- a/libraries/shared/src/PathUtils.h +++ b/libraries/shared/src/PathUtils.h @@ -58,7 +58,7 @@ public: static QString generateTemporaryDir(); static bool deleteMyTemporaryDir(QString dirName); - static int removeTemporaryApplicationDirs(QString appName = QString::null); + static int removeTemporaryApplicationDirs(QString appName = QString()); static Qt::CaseSensitivity getFSCaseSensitivity(); static QString stripFilename(const QUrl& url); diff --git a/tools/oven/src/BakerCLI.h b/tools/oven/src/BakerCLI.h index bf33b625dd..d9b29cf6bd 100644 --- a/tools/oven/src/BakerCLI.h +++ b/tools/oven/src/BakerCLI.h @@ -34,7 +34,7 @@ public: BakerCLI(OvenCLIApplication* parent); public slots: - void bakeFile(QUrl inputUrl, const QString& outputPath, const QString& type = QString::null); + void bakeFile(QUrl inputUrl, const QString& outputPath, const QString& type = QString()); private slots: void handleFinishedBaker(); diff --git a/tools/oven/src/OvenCLIApplication.cpp b/tools/oven/src/OvenCLIApplication.cpp index 5b0de4d6fa..6d3a8912ab 100644 --- a/tools/oven/src/OvenCLIApplication.cpp +++ b/tools/oven/src/OvenCLIApplication.cpp @@ -85,7 +85,7 @@ void OvenCLIApplication::parseCommandLine(int argc, char* argv[]) { _inputUrlParameter = QDir::fromNativeSeparators(parser.value(CLI_INPUT_PARAMETER)); _outputUrlParameter = QDir::fromNativeSeparators(parser.value(CLI_OUTPUT_PARAMETER)); - _typeParameter = parser.isSet(CLI_TYPE_PARAMETER) ? parser.value(CLI_TYPE_PARAMETER) : QString::null; + _typeParameter = parser.isSet(CLI_TYPE_PARAMETER) ? parser.value(CLI_TYPE_PARAMETER) : QString(); if (parser.isSet(CLI_DISABLE_TEXTURE_COMPRESSION_PARAMETER)) { qDebug() << "Disabling texture compression"; From 942fee25efa2ea462502859838400b2a5b233ac6 Mon Sep 17 00:00:00 2001 From: kasenvr <52365539+kasenvr@users.noreply.github.com> Date: Sun, 24 May 2020 01:10:12 -0400 Subject: [PATCH 6/6] Update INSTALL.md Adds missing steps, fixes old ones, offers insight into a potential problem. --- INSTALL.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 10858200e7..bbaaafd6ef 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,10 +1,10 @@ # Creating an Installer -Follow the [build guide](BUILD.md) to figure out how to build Project Athena for your platform. +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. -The `install` target will copy the Project Athena targets and their dependencies to your `CMAKE_INSTALL_PREFIX`. +The `install` target will copy the Vircadia targets and their dependencies to your `CMAKE_INSTALL_PREFIX`. This variable is set by the `project(hifi)` command in `CMakeLists.txt` to `C:/Program Files/hifi` and stored in `build/CMakeCache.txt` ### Packaging @@ -15,7 +15,7 @@ To produce an installer, run the `package` target. To produce an executable installer on Windows, the following are required: -1. [7-zip]() +1. [7-zip]() 1. [Nullsoft Scriptable Install System](http://nsis.sourceforge.net/Download) - 3.04 Install using defaults (will install to `C:\Program Files (x86)\NSIS`) @@ -56,22 +56,23 @@ To produce an executable installer on Windows, the following are required: 1. Copy `Release\ApplicationID.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-ansi\` 1. Copy `ReleaseUnicode\ApplicationID.dll` to `C:\Program Files (x86)\NSIS\Plugins\x86-unicode\` -1. [npm]() +1. [Node.JS and NPM]() 1. Install version 10.15.0 LTS 1. Perform a clean cmake from a new terminal. -1. Open the `athena.sln` solution and select the Release configuration. +1. Open the `vircadia.sln` solution with elevated (administrator) permissions on Visual Studio and select the **Release** configuration. 1. Build the solution. +1. Build CMakeTargets->INSTALL 1. Build `packaged-server-console-npm-install` (found under **hidden/Server Console**) 1. Build `packaged-server-console` (found under **Server Console**) This will add 2 folders to `build\server-console\` - `server-console-win32-x64` and `x64` -1. Build CMakeTargets->PACKAGE - Installer is now available in `build\_CPack_Packages\win64\NSIS` +1. Build CMakeTargets->PACKAGE + The installer is now available in `build\_CPack_Packages\win64\NSIS` #### OS X 1. [npm]() - Install version 10.15.0 LTS + Install version 12.16.3 LTS 1. Perform a clean CMake. 1. Perform a Release build of ALL_BUILD @@ -80,3 +81,9 @@ To produce an executable installer on Windows, the following are required: Sandbox-darwin-x64 1. Perform a Release build of `package` Installer is now available in `build/_CPack_Packages/Darwin/DragNDrop + +### FAQ + +1. **Problem:** Failure to open a file. ```File: failed opening file "\FOLDERSHARE\XYZSRelease\...\Credits.rtf" Error in script "C:\TFS\XYZProject\Releases\NullsoftInstaller\XYZWin7Installer.nsi" on line 77 -- aborting creation process``` + 1. **Cause:** The complete path (current directory + relative path) has to be < 260 characters to any of the relevant files. + 1. **Solution:** Move your build and packaging folder as high up in the drive as possible to prevent an overage.