Creating an Installer
Last Updated on June 16, 2021
Follow the build guide to figure out how to build Overte for your platform.
During generation, CMake should produce an install
target and a package
target.
The install
target will copy the Overte 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
To produce an installer, run the package
target. However you will want to follow the steps specific to your platform below.
Windows
Vorbereitungen
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\
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
NSISpre.nsh
toC:\Program Files (x86)\NSIS\Include\
Copy
NSISpre.dll
toC:\Program Files (x86)\NSIS\Plugins\x86-ansi\
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\
-
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\
-
Install version 10.15.0 LTS (or greater)
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
Perform a clean cmake from a new terminal.
Open the
overte.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
Create an MSIX Package
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 Overte 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 Overte 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.
Häufig gestellte Fragen
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.
MacOS
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" 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.
Option A: Use Xcode GUI
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-x64Perform a Release build of
package
Installer is now available inbuild/_CPack_Packages/Darwin/DragNDrop
Option B: Use Terminal
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.
Linux
Server
Debian package
Building Overte server Debian packages using Docker
Build Docker image as instructed in the relevant Dockerfile in tools/ci-scripts/deb_package/
Create/Start container Example:
docker run -v $(pwd)/../../..:/overte -it overte/overte-server-build:0.1.2-debian-11-amd64
Prepare build environment
cd overte
mkdir build
cd build
rm -rf *
Add PRODUCTION_BUILD=1
to below command for release and release candidate builds.
OVERTE_USE_SYSTEM_QT=true cmake .. -DOVERTE_CPU_ARCHITECTURE=-msse3 -DVCPKG_BUILD_TYPE=release -DSERVER_ONLY=true -DBUILD_TOOLS=true
Build
make domain-server assignment-client oven -j$(nproc)
Create Debian package
cd ../pkg-scripts
For Debian 11 and Ubuntu 22.04:
OVERTE_USE_SYSTEM_QT="true" DEBVERSION="1-experimental-debian-11" DEBEMAIL="julian.gro@overte.org" DEBFULLNAME="Julian Groß" ./make-deb-server
For Ubuntu 18.04 and 20.04:
DEBVERSION="1-experimental-ubuntu-18.04" DEBEMAIL="julian.gro@overte.org" DEBFULLNAME="Julian Groß" ./make-deb-server
RPM package
Building Overte server RPM packages using Docker
Build Docker image as instructed in the relevant Dockerfile in tools/ci-scripts/rpm_package/
Create/Start container Example:
docker run -v $(pwd)/../../..:/overte -it overte/overte-server-build:0.1.2-fedora-36-amd64
Prepare build environment
cd overte
mkdir build
cd build
rm -rf *
Add PRODUCTION_BUILD=1
to below command for release and release candidate builds.
OVERTE_USE_SYSTEM_QT=true cmake .. -DOVERTE_CPU_ARCHITECTURE=-msse3 -DVCPKG_BUILD_TYPE=release -DSERVER_ONLY=true -DBUILD_TOOLS=true
Build
make domain-server assignment-client oven -j$(nproc)
Create RPM package
cd ../pkg-scripts
OVERTE_USE_SYSTEM_QT="true" RPMVERSION="1.experimental" ./make-rpm-server