From a84692281474a72ab92894fc4f90200c6091f624 Mon Sep 17 00:00:00 2001 From: Preston Bezos Date: Mon, 3 Jun 2019 15:16:27 -0700 Subject: [PATCH 1/3] Updated build guide to include a VCPKG environment variable step and fixed step numbering issues --- BUILD_WIN.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/BUILD_WIN.md b/BUILD_WIN.md index 8f8a64a428..eaeb5aba49 100644 --- a/BUILD_WIN.md +++ b/BUILD_WIN.md @@ -34,7 +34,16 @@ If you do not wish to use the Python installation bundled with Visual Studio, yo Download and install the latest version of CMake 3.9. Download the file named win64-x64 Installer from the [CMake Website](https://cmake.org/download/). You can access the installer on this [3.9 Version page](https://cmake.org/files/v3.9/). During installation, make sure to check "Add CMake to system PATH for all users" when prompted. -### Step 5. Running CMake to Generate Build Files + +### Step 3. Create VCPKG environment variable + +* Naviagte to 'Edit the System Environment Variables' Through the start menu. +* Click on 'Environment Variables' +* Select 'New' +* Set "Variable name" to HIFI_VCPKG_BASE +* Set "Variable value" to the same directory you created your build directory in. + +### Step 4. Running CMake to Generate Build Files Run Command Prompt from Start and run the following commands: `cd "%HIFI_DIR%"` @@ -49,21 +58,21 @@ Run `cmake .. -G "Visual Studio 16 2019" -A x64`. Where `%HIFI_DIR%` is the directory for the highfidelity repository. -### Step 6. Making a Build +### Step 5. Making a Build Open `%HIFI_DIR%\build\hifi.sln` using Visual Studio. Change the Solution Configuration (menu ribbon under the menu bar, next to the green play button) from "Debug" to "Release" for best performance. -Create another environment variable (see Step #4) +Create another environment variable (see Step #3) * Set "Variable name": `PreferredToolArchitecture` * Set "Variable value": `x64` Run from the menu bar `Build > Build Solution`. -### Step 7. Testing Interface +### Step 6. Testing Interface -Create another environment variable (see Step #4) +Create another environment variable (see Step #3) * Set "Variable name": `_NO_DEBUG_HEAP` * Set "Variable value": `1` @@ -75,11 +84,11 @@ Note: You can also run Interface by launching it from command line or File Explo ## Troubleshooting -For any problems after Step #7, first try this: +For any problems after Step #6, first try this: * Delete your locally cloned copy of the highfidelity repository * Restart your computer * Redownload the [repository](https://github.com/highfidelity/hifi) -* Restart directions from Step #7 +* Restart directions from Step #6 #### CMake gives you the same error message repeatedly after the build fails From c09ffd23b40841209a21ef0c0f098d60001c2a12 Mon Sep 17 00:00:00 2001 From: Preston Bezos Date: Tue, 4 Jun 2019 09:19:47 -0700 Subject: [PATCH 2/3] made more edits to the build guide to better explain the reasons for certain steps and corrected a couple of errors in previous edits --- BUILD_WIN.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BUILD_WIN.md b/BUILD_WIN.md index eaeb5aba49..04ae6346f7 100644 --- a/BUILD_WIN.md +++ b/BUILD_WIN.md @@ -36,12 +36,14 @@ Download and install the latest version of CMake 3.9. Download the file named win64-x64 Installer from the [CMake Website](https://cmake.org/download/). You can access the installer on this [3.9 Version page](https://cmake.org/files/v3.9/). During installation, make sure to check "Add CMake to system PATH for all users" when prompted. ### Step 3. Create VCPKG environment variable +In the next step you will be using CMake to build hifi, but first it is recommended that you create an environment variable linked to a directory somewhere on your machine you have control over. The directory will hold all temporary files and, in the event of a failed build, will ensure that any dependencies that generated prior to the failure will not need to be generated again. +To create this variable: * Naviagte to 'Edit the System Environment Variables' Through the start menu. * Click on 'Environment Variables' * Select 'New' * Set "Variable name" to HIFI_VCPKG_BASE -* Set "Variable value" to the same directory you created your build directory in. +* Set "Variable value" to any directory that you have control over. ### Step 4. Running CMake to Generate Build Files @@ -68,6 +70,8 @@ Create another environment variable (see Step #3) * Set "Variable name": `PreferredToolArchitecture` * Set "Variable value": `x64` +Restart Visual Studio for the new variable to take affect. + Run from the menu bar `Build > Build Solution`. ### Step 6. Testing Interface @@ -76,6 +80,8 @@ Create another environment variable (see Step #3) * Set "Variable name": `_NO_DEBUG_HEAP` * Set "Variable value": `1` +Restart Visual Studio again. + In Visual Studio, right+click "interface" under the Apps folder in Solution Explorer and select "Set as Startup Project". Run from the menu bar `Debug > Start Debugging`. Now, you should have a full build of High Fidelity and be able to run the Interface using Visual Studio. Please check our [Docs](https://wiki.highfidelity.com/wiki/Main_Page) for more information regarding the programming workflow. From 1c5740e5e83d81e15ef64c8861c56d2d51e70e7e Mon Sep 17 00:00:00 2001 From: Preston Bezos Date: Tue, 4 Jun 2019 11:02:09 -0700 Subject: [PATCH 3/3] increased clarity of description for step 3 and fixed typo --- BUILD_WIN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD_WIN.md b/BUILD_WIN.md index 04ae6346f7..965cb70ec6 100644 --- a/BUILD_WIN.md +++ b/BUILD_WIN.md @@ -36,7 +36,7 @@ Download and install the latest version of CMake 3.9. Download the file named win64-x64 Installer from the [CMake Website](https://cmake.org/download/). You can access the installer on this [3.9 Version page](https://cmake.org/files/v3.9/). During installation, make sure to check "Add CMake to system PATH for all users" when prompted. ### Step 3. Create VCPKG environment variable -In the next step you will be using CMake to build hifi, but first it is recommended that you create an environment variable linked to a directory somewhere on your machine you have control over. The directory will hold all temporary files and, in the event of a failed build, will ensure that any dependencies that generated prior to the failure will not need to be generated again. +In the next step, you will use CMake to build High Fidelity. By default, the CMake process builds dependency files in Windows' `%TEMP%` directory, which is periodically cleared by the operating system. To prevent you from having to re-build the dependencies in the event that Windows clears that directory, we recommend that you create a `HIFI_VCPKG_BASE` environment variable linked to a directory somewhere on your machine. That directory will contain all dependency files until you manually remove them. To create this variable: * Naviagte to 'Edit the System Environment Variables' Through the start menu. @@ -70,7 +70,7 @@ Create another environment variable (see Step #3) * Set "Variable name": `PreferredToolArchitecture` * Set "Variable value": `x64` -Restart Visual Studio for the new variable to take affect. +Restart Visual Studio for the new variable to take effect. Run from the menu bar `Build > Build Solution`.