Last Updated on June 16, 2021
Follow the build guide 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 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
To produce an installer, run the package
target. However you will want to follow the steps specific to your platform below.
To produce an executable installer on Windows, the following are required:
-
Nullsoft Scriptable Install System - 3.04
Install using defaults (will install toC:\Program Files (x86)\NSIS
) -
UAC Plug-in for Nullsoft - 0.2.4c
- Extract Zip
- Copy
UAC.nsh
toC:\Program Files (x86)\NSIS\Include\
- Copy
Plugins\x86-ansi\UAC.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-ansi\
- Copy
Plugins\x86-unicode\UAC.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-unicode\
-
nsProcess Plug-in for Nullsoft - 1.6 (use the link marked nsProcess_1_6.7z)
- Extract Zip
- Copy
Include\nsProcess.nsh
toC:\Program Files (x86)\NSIS\Include\
- Copy
Plugins\nsProcess.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-ansi\
- Copy
Plugins\nsProcessW.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-unicode\
and rename the filename tonsProcess.dll
(remove the 'W' character)
-
InetC Plug-in for Nullsoft - 1.0
- Extract Zip
- Copy
Plugin\x86-ansi\InetC.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-ansi\
- Copy
Plugin\x86-unicode\InetC.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-unicode\
-
NSISpcre Plug-in for Nullsoft - 1.0
- Extract Zip
- Copy
include\NSISpre.nsh
toC:\Program Files (x86)\NSIS\Include\
- Copy
bin\x86-ansi\NSISpre.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-ansi\
- Copy
bin\x86-unicode\NSISpre.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-unicode\
-
nsisSlideshow Plug-in for Nullsoft - 1.7
- Extract Zip
- Copy
bin\nsisSlideshow.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-ansi\
- Copy
bin\nsisSlideshowW.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-unicode\
and rename the filename tonsisSlideshow.dll
(remove the 'W' character)
-
- Download both Zips and unzip
- Copy
nsisunz\Release\nsisunz.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-ansi\
- Copy
NSISunzU\Plugin unicode\nsisunz.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-unicode\
-
ApplicationID plug-in for Nullsoft - 1.0
- Download
Pre-built DLLs
- Extract Zip
- Copy
Release\ApplicationID.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-ansi\
- Copy
ReleaseUnicode\ApplicationID.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-unicode\
- Download
-
- Install version 10.15.0 LTS (or greater)
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.
- Perform a clean cmake from a new terminal.
- Open the
vircadia.sln
solution with elevated (administrator) permissions on Visual Studio and select the Release configuration. - Build the solution.
- Build
packaged-server-console-npm-install
(found under hidden/Server Console) - Build
packaged-server-console
(found under Server Console)
This will add 2 folders tobuild\server-console\
-
server-console-win32-x64
andx64
- Build CMakeTargets->PACKAGE
The installer is now available inbuild\_CPack_Packages\win64\NSIS
- Get the 'MSIX Packaging Tool' from the Windows Store.
- Run the process to create a new MSIX package from an existing .exe or .msi installer. This process will allow you to install Vircadia with the usual installer, however it will monitor changes to the computer to replicate the functionality in the MSIX Package. Therefore, you will want to avoid doing anything else on your computer during this process.
- Be sure to select no shortcuts and install only the Vircadia Interface.
- When asked for "Entry" points, select only the Interface entry and not the uninstaller. This is because the MSIX package is uninstalled by Windows itself. If for some reason the uninstaller shows up anyway, you can edit the manifest to manually remove it from view even if the uninstaller is present in the package. This is necessary to uplaod to the Windows Store.
- Once completed, you can sign the package with this application or with other tools such as 'MSIX Hero'. It must be signed with a local certificate to test, and with a proper certificate to distribute.
- If uploading to the Windows Store, you will have to ensure all your manifest info including publisher information matches what is registered with your Microsoft Developer account for Windows. You will see these errors and the expected values when validating it.
- 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
- Cause: The complete path (current directory + relative path) has to be < 260 characters to any of the relevant files.
- Solution: Move your build and packaging folder as high up in the drive as possible to prevent an overage.
- Ensure you have all the prerequisites fulfilled from the MacOS Build Guide.
- Perform a clean CMake in your build folder. e.g.
BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 RELEASE_BUILD=PRODUCTION BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" RELEASE_NAME="Insert Release Name Here" STABLE_BUILD=1 PRODUCTION_BUILD=1 RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" RELEASE_TYPE=PRODUCTION cmake -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DCLIENT_ONLY=1 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 ..
- Pick a method to build and package your release.
- Perform a Release build of ALL_BUILD
- Perform a Release build of
packaged-server-console
This will add a folder tobuild\server-console\
-
Sandbox-darwin-x64 - Perform a Release build of
package
Installer is now available inbuild/_CPack_Packages/Darwin/DragNDrop
- Navigate to your build folder with your terminal.
make -j4
, you can change the number to match the number of threads you would like to use.make package
to create the package.
- Ensure you are using an Ubuntu 18.04 system. There is no required minimum to the amount of CPU cores needed, however it's recommended that you use as many as you have available in order to have an efficient experience.
Recommended CPU Cores: 16 Minimum Disk Space: 40GB
- Get and bootstrap Vircadia Builder.
git clone https://github.com/vircadia/vircadia-builder.git cd vircadia-builder
- Run Vircadia Builder.
./vircadia-builder --build server
- If Vircadia Builder needed to install dependencies and asks you to run it again then do so. Otherwise, skip to the next step.
./vircadia-builder --build server
- Vircadia Builder will ask you to configure it to build the server. The values will be prefilled with defaults, the following steps will explain what they are and what you might want to put. Advanced users: See here for possible environment variables and settings.
- This value is the Git repository of Vircadia. You can set this URL to your fork of the Vircadia repository if you need to.
Git repository: https://github.com/vircadia/vircadia/ # OR, for example Git repository: https://github.com/digisomni/vircadia/
- This value is the tag on the repository. If you would like to use a specific version of Vircadia, typically tags will be named like this: "v2021.1.0-rc"
Git tag: master # OR, for example Git tag: v2021.1.0-rc
- This value is the release type. For example, the options are
production
,pr
, ordev
. If you are making a build for yourself and others to use then useproduction
.Release type: DEV # OR, for example we recommend you use Release type: PRODUCTION
- This value is the release version. Release numbers should be in a format of
YEAR-MAJORVERSION-MINORVERSION
which might look like this:2021.1.0
.Release number: 2021.1.0
- This value is the build number. We typically use the hash of the most recent commit on that Git tag which might look like this:
fd6973b
.Build number: fd6973b
- This value is the directory that Vircadia will get installed to. You should leave this as the default value unless you are an advanced user.
Installation dir: /home/ubuntu/Vircadia
- This value is the number of CPU cores that the Vircadia Builder will use to compile the Vircadia server. By default it will use all cores available on your build server. You should leave this as the default value it gives you for your build server.
CPU cores to use for Vircadia: 16
- This value is the number of CPU cores that the Vircadia Builder will use to compile Qt5 (a required component for Vircadia). By default it will use all cores available on your build server. You should leave this as the default value it gives you for your build server.
CPU cores to use for Qt5: 16
- It will ask you if you would like to proceed with the specified values. If you're happy with the configuration, type
yes
, otherwise enterno
and press enter to start over. You can pressCtrl
+C
simultaneously on your keyboard to exit. - Vircadia Builder will now run, it may take a while. See this table for estimated times.
- Navigate to the
pkg-scripts
directory.cd ../Vircadia/source/pkg-scripts/
- Generate the .deb package. Set
DEBVERSION
to the same version you entered for theRelease number
on Vircadia Builder. SetDEBEMAIL
andDEBFULLNAME
to your own information to be packaged with the release. The version cannot begin with a letter and cannot include underscores or dashes in it.DEBVERSION="2021.1.0" DEBEMAIL="[email protected]" DEBFULLNAME="Your Full Name" ./make-deb-server
- If successful, the generated .deb package will be in the
pkg-scripts
folder.
- Ensure you are using an Amazon Linux 2 system. You will need many CPU cores to complete this process within a reasonable time. As an alternative to AWS EC2, you may use a virtual machine. Here are the recommended specs:
AWS EC2 Instance Type: C5a.4xlarge Recommended CPU Cores: 16 Minimum Disk Space: 40GB
- Update the system and install dependencies.
sudo yum update -y sudo yum install git -y sudo yum install rpm-build
- Get and bootstrap Vircadia Builder.
git clone https://github.com/vircadia/vircadia-builder.git cd vircadia-builder sudo ./install_amazon_linux_deps.sh
- Run Vircadia Builder.
./vircadia-builder --build server
- If Vircadia Builder needed to install dependencies and asks you to run it again then do so. Otherwise, skip to the next step.
./vircadia-builder --build server
- Vircadia Builder will ask you to configure it to build the server. The values will be prefilled with defaults, the following steps will explain what they are and what you might want to put. Advanced users: See here for possible environment variables and settings.
- This value is the Git repository of Vircadia. You can set this URL to your fork of the Vircadia repository if you need to.
Git repository: https://github.com/vircadia/vircadia/ # OR, for example Git repository: https://github.com/digisomni/vircadia/
- This value is the tag on the repository. If you would like to use a specific version of Vircadia, typically tags will be named like this: "v2021.1.0-rc".
Git tag: master # OR, for example Git tag: v2021.1.0-rc
- This value is the release type. For example, the options are
production
,pr
, ordev
. If you are making a build for yourself and others to use then useproduction
.Release type: DEV # OR, for example we recommend you use Release type: PRODUCTION
- This value is the release version. Release numbers typically should be in a format of
YEAR-MAJORVERSION-MINORVERSION
which might look like this:2021.1.0
.Release number: 2021.1.0
- This value is the build number. We typically use the hash of the most recent commit on that Git tag which might look like this:
fd6973b
.Build number: fd6973b
- This value is the directory that Vircadia will get installed to. You should leave this as the default value unless you are an advanced user.
Installation dir: /root/Vircadia
- This value is the number of CPU cores that the Vircadia Builder will use to compile the Vircadia server. By default it will use all cores available on your build server given you have enough memory. You should leave this as the default value it gives you for your build server.
CPU cores to use for Vircadia: 16
- This value is the number of CPU cores that the Vircadia Builder will use to compile Qt5 (a required component for Vircadia). By default it will use all cores available on your build server given you have enough memory. You should leave this as the default value it gives you for your build server.
CPU cores to use for Qt5: 16
- It will ask you if you would like to proceed with the specified values. If you're happy with the configuration, type
yes
, otherwise enterno
and press enter to start over. You can pressCtrl
+C
simultaneously on your keyboard to exit. - Vircadia Builder will now run, it may take a while. See this table for estimated times.
- Navigate to the
pkg-scripts
directory.cd ../Vircadia/source/pkg-scripts/
- Generate the .rpm package. Set
RPMVERSION
to the same version you entered for theRelease number
on Vircadia Builder. The version cannot begin with a letter and cannot include underscores or dashes in it.RPMVERSION="2021.1.0" ./make-rpm-server
- If successful, the generated .rpm package will be in the
pkg-scripts
folder of the Vircadia source files.