Building Open RV on Windows
Summary
Warning
You should be cloning the repository later in the steps, but if you must clone it beforehand, clone it into the root
of a drive (e.g. c:
). See Get Open RV source code.
1. Microsoft Visual Studio
Warning
Open RV will not compile with Microsoft Visual Studio 2022 version 17.11.X with the default compiler because of issues
between PySide2 and that version of the compiler.
You can still install 17.11.X, but you will need to install MSVC v143 version 14.40 to compile Open RV itself and
MSVC v143 14.39.X to compile Boost.
Any variant of Microsoft Visual Studio 2022 will work with Open RV (e.g. Enterprise, Professional or Community). You can select the version on the Visual Studio website.
Installation
Note
Quick guide:
You must select Desktop Development with C++
In the individual components section, you must install MSVC v143 14.40.X for Open RV and MSVC v143 14.39.X to compile Boost.
2. Setup default MSVC compiler
If Microsoft Visual Studio 2022 was installed for the first time (using the steps above), MSVC v143 v14.40 should be
the default compiler, although varying setup may affect this.
To ensure compatibility with Open RV, we need to make sure that MSVC v143 v14.40 is the default compiler.
Here are the possible methods to set the default compiler:
Method 1: Check default props file
The first solution is to modify the Microsoft.VCToolsVersion.v143.default.props
under C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build
.
The path will vary depending on whether the variant is Enterprise, Profressional or Community.
Make sure that the VCToolsVersion is set to 14.40.33807
. The file should look similar to this:
<?xml version = "1.0" encoding="utf-8"?>
<Project ToolsVersion = "4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)Microsoft.VCRedistVersion.v143.default.props))"/>
<PropertyGroup>
<VCToolsVersion Condition = "'$(VCToolsVersion)' == ''" >14.40.33807</VCToolsVersion>
</PropertyGroup>
</Project>
If the version is different, change it to 14.40.33807
in the file.
3. Install Python 3
3.1 VFX Reference Platform 2023
You must install Python 3.10 using the official Python installer. The latest version with an installer is 3.10.11. On the Python 3.10 page, scroll down and download the correct version for your Windows. Typically, the correct version will be Windows installer (64-bit).
3.2 VFX Reference Platform 2023
Same as VFX 2023 but download and install the latest Python 3.11 with binaries.
3.3 Installation
The carousel below shows how to install Python. The images refer to Python 3.11.X, but the only difference is the path. (C:\Python310
instead of C:\Python311
)
Note
Take note of the installation path for Python 3, as it will be required in a subsequent step.
The recommended path is C:\Python310
for VFX 2023 and C:\Python311
for VFX 2024.
3.1 Copy python.exe and rename it to python3.exe
Copy the Python executable as python3.exe to ensure compatibility with Open RV, which requires the python3
command.
This also aligns with Linux and macOS conventions, where both python and python3 are valid commands.
4. Install CMake
Warning
Minimum recommended version for CMake is 3.27.X.
Download the lastest version of CMake from the official CMake website. Typically, the correct version will be Windows x64 Installer. Follow the installation wizard prompts to complete the setup. There are no special considerations or unique configuration options required.
Note
Take note of the installation path for CMake, as it will be required in a subsequent step.
The default path is C:\Program Files\CMake
.
5. Install Qt
Warning
When obtaining Qt from a third-party source, ensure it includes OpenSSL support and check for the following essential modules that may not be included by default: QtWebEngine, QtWebSockets, QtMultimedia, and QtDeclarative.
For example, Qt from MSYS2 is missing QtWebEngine.
Download the latest version of Qt 5.15.x from the official Qt website using the online installer. It is recommended to install Qt in a location with a short path length. (e.g. C:\Qt
)
Additionally, ensure you have jom, which is included with Qt Creator, available through the Qt online installer. If you prefer not to install Qt Creator, you can download jom separately from the official Qt repository and copy the executable and supporting files to the Tools/QtCreator/bin/jom directory within your Qt installation.
Note
Take note of the installation path for Qt 5.15.2, as it will be required in a subsequent step.
Based on the recommendation above, the path would be C:\Qt
.
6. Install Strawberry Perl
Download and install the 64-bit version of Strawberry Perl
Note
Take note of the installation path for Strawberry Perl, as it will be required in a subsequent step.
The default path is C:\Strawberry
.
7. Install MSYS2
Warning
The Windows’ WSL2 feature conflict with MSYS2. For simplicity, it is highly recommended to disable Windows’ WSL or WSL2 feature entirely.
Additional information can be found on the MSYS2 github.
Download and install the latest MSYS2. Open RV is NOT a mingw64 build. It is a Microscoft Visual Studio 2022 build. Open RV is built with Microsoft Visual Studio 2022 via the CMake “Visual Studio 17 2022” generator.
MSYS2 is only used for convenience as it comes with a package manager with utility packages required for the Open RV build such as cmake, git, flex, bison, nasm, unzip, zip, etc.
7.1 Install required MSYS2 pacman packages
Note
The MSYS2 MingGW64 terminal MUST be used.
From a MSYS2-MinGW64 shell, install the following packages which are required to build Open RV:
pacman -Sy --needed \
mingw-w64-x86_64-autotools \
mingw-w64-x86_64-glew \
mingw-w64-x86_64-libarchive \
mingw-w64-x86_64-make \
mingw-w64-x86_64-meson \
mingw-w64-x86_64-toolchain \
autoconf \
automake \
bison \
flex \
git \
libtool \
nasm \
p7zip \
patch \
unzip \
zip
While installing the MSYS packages, review the list for any missing package. Some packages might not be installed after the first command.
Note: To confirm which version/location of any tool used inside the MSYS shell, where
can be used e.g. where python
. If there’s more than one path return, the top one will be used.
8. Setup environment variables
Note
This is the step where the path of Strawberry Perl, Python, CMake and Qt will be needed.
Some environment variables need to be set within MSYS2 for the Open RV build system. The PATH environment variable must be modified, new environment variables called ACLOCAL_PATH and QT_HOME must be created.
These modifications will be added to the .bash_profile
file located in the User’s home directory within the MSYS2 environment. By modifiying .bash_profile
, these environment variable will be modified everytime a new MSYS2 MINGW64 terminal is opened.
PATH environment variable
Note
Update the CMake, Strawberry Perl and Python location to reflect your installation path, using forward slashes (/) for a Unix-style path to prevent issues later on. (e.g., C:\Python310 becomes /c/Python310).
The following paths must be added to the PATH environment variable within MSYS2:
CMake binary directory
Python binary directory
MSYS2’s
mingw64/bin
Strawberry perl directory
The order is important. Do not put Strawberry perl location before MSYS2’s mingw64/bin
directory.
echo 'export PATH="/c/Program Files/CMake/bin:/c/Python310:/c/msys64/mingw64/bin:$PATH:/c/Strawberry/perl/bin"' >> ~/.bash_profile
ACLOCAL_PATH
echo "export ACLOCAL_PATH=/c/msys64/usr/share/aclocal" >> ~/.bash_profile
QT_HOME
Note
Update the Qt location to reflect your installation path, using forward slashes (/) for a Unix-style path (e.g., C:\Qt\5.15.2\mingw_64 becomes /c/Qt/5.15.2/mingw_64).
echo "export QT_HOME=/c/Qt/5.15.2/msvc2019_64" >> ~/.bash_profile
Apply changes to MSYS2 MINGW64
All the environment variables changes above must be applied. You can do that by closing and re-opening the MSYS2 MINGW64 terminal or by running the following command:
source ~/.bash_profile
9. Build Open RV
Warning
Even as of Windows 11, for legacy reasons, a default system path length is still limited to 254 bytes long.
For that reason, it is recommended to clone Open RV into the drive’s root directory (e.g.: C:\
).
Before executing any commands
To maximize your chances of successfully building Open RV, you must:
Fully update your code base to the latest version (or the version you want to use) with a command like
git pull
.Fix all conflicts due to updating the code.
Revisit all modified files to ensure they aren’t using old code that changed during the update such as when the Visual Studio version changes.
Get Open RV source code
Warning
Open RV repository should be cloned into the root of a drive (e.g. c:
).
Otherwise, the PySide2 compilation could be failing due to the path being too long. If you can’t do that, please take a look
at Maximum Path Length Limitation on Microsoft website.
Clone the Open RV repository and change directory into the newly created folder. Typically, the command would be:
Using a password-protected SSH key:
git clone --recursive git@github.com:AcademySoftwareFoundation/OpenRV.git
cd OpenRV
Using the web URL:
git clone --recursive https://github.com/AcademySoftwareFoundation/OpenRV.git
cd OpenRV
Load aliases for Open RV
From the Open RV directory:
source rvcmds.sh
Install Python dependencies
Note
This section need to be done only one time when a fresh Open RV repository is cloned.
The first time the rvsetup
is executed, it will create a Python virtual environment in the current directory under .venv
.
From the Open RV directory, the following command will download and install the Python dependencies.
rvsetup
Configure the project
Note
After executing the rvcfg
command, make sure that you see those lines at the begining for the logs:
-- The CXX compiler identification is MSVC 19.40.33815.0
-- The C compiler identification is MSVC 19.40.33815.0
It must use MSVC 19.40.X (not 19.41.X).
From the Open RV directory, the following command will configure CMake for the build:
rvcfg
rvcfgd
Build the dependencies
From the Open RV directory, the following command will build the dependencies:
rvbuildt dependencies
rvbuildtd dependencies
Build the main executable
From the Open RV directory, the following command will build the main executable:
rvbuildt main_executable
rvbuildtd main_executable
Opening Open RV executable
Once the build is completed, the Open RV application can be found in the Open RV directory under _build/stage/bin/rv.exe
.
Once the build is completed, the Open RV application can be found in the Open RV directory under _build_debug/stage/bin/rv.exe
.