|
2 | 2 | Open RV is an image and sequence viewer for VFX and animation artists.
|
3 | 3 | Open RV is high-performant, hardware accelerated, and pipeline-friendly.
|
4 | 4 |
|
5 |
| -## Documentation |
6 |
| -[RV Documentation](doc/rv-manuals.md) |
| 5 | +[RV Documentation](docs/rv-manuals.md) |
7 | 6 |
|
8 |
| -## Build Instructions |
| 7 | +## Cloning the repository |
9 | 8 |
|
10 |
| -You can build Open RV for Linux, Windows, and macOS. You build it from scratch using the instructions specific to each OS: |
| 9 | +OpenRV uses submodules to pull some dependencies. When cloning the repository, make sure to do it recursively by using the following command: |
11 | 10 |
|
12 |
| -* [Linux](doc/build_system/config_linux_centos7.md) |
13 |
| -* [Windows](doc/build_system/config_windows.md) |
14 |
| -* [macOS](doc/build_system/config_macos.md) |
| 11 | +```bash |
| 12 | +git clone --recursive https://github.com/AcademySoftwareFoundation/OpenRV.git |
| 13 | +``` |
| 14 | + |
| 15 | +If you cloned the repo without setting the `--recursive` flag, you can initialize the submodule in another step with the following command: |
| 16 | + |
| 17 | +```bash |
| 18 | +git submodule update --init --recursive |
| 19 | +``` |
| 20 | + |
| 21 | +## Building the workstation |
| 22 | + |
| 23 | +Open RV is currently supported on the following operating systems: |
| 24 | + |
| 25 | +* [Windows 10 and 11](docs/build_system/config_windows.md) |
| 26 | +* [macOS Big Sur, Monterey and Ventura](docs/build_system/config_macos.md) |
| 27 | +* [Linux Centos 7](docs/build_system/config_linux_centos7.md) |
| 28 | + |
| 29 | +Support for other operating systems is on a best effort basis. |
15 | 30 |
|
16 |
| -### Building Tips |
17 | 31 |
|
18 |
| -#### Build Aliases |
| 32 | +## Building RV |
19 | 33 |
|
20 | 34 | You can use `source rvmds.sh` to add common build aliases into your shell. After the first download following the installation of the required dependencies, use `rvbootstrap` to set up, configure, and build Open RV with the default options.
|
21 | 35 |
|
22 |
| -After the setup, you can use `rvmk` to build. |
| 36 | +After the setup, you can use `rvmk` (the common build alias) to configure and build Open RV. You can also use `rvmkd` to configure and build in Debug. |
23 | 37 |
|
24 |
| -#### Compile in Parallel |
| 38 | +### Contributor setup |
25 | 39 |
|
26 |
| -Start the compilation in parallel by adding `--parallel[=threadCound]` to the build command. This is the same as using `-j`. |
| 40 | +This repository uses a pre-commit to execute formatting before a commit. To install the pre-commit hooks: |
27 | 41 |
|
28 |
| -#### 3rd Parties Outside Of Repository |
| 42 | +```shell |
| 43 | +pre-commit install |
| 44 | +``` |
29 | 45 |
|
30 |
| -If you desire to keep your third-party builds between build cleanups, set `-DRV_DEPS_BASE_DIR=/path/to/third/party`. |
31 | 46 |
|
32 |
| -#### Expert Mode |
33 | 47 |
|
34 |
| -You can always go to the build directory and call the generator directly. |
| 48 | +### Cleanup |
35 | 49 |
|
36 |
| -## Running Open RV |
| 50 | +To clean your build directory and restart from a clean slate, use the `rvclean` common build alias, or delete the `_build` folder. |
37 | 51 |
|
38 |
| -Once the build ends, you can execute (or debug!) Open RV from the cmake-build directory. |
39 | 52 |
|
40 |
| -The path to the build is `cmake-build/stage/app`. The Open RV cmake options set up the environment so you can start the build without RPATH issues. |
41 | 53 |
|
42 |
| -## Install |
| 54 | +### Bootstrap |
43 | 55 |
|
44 |
| -The recommended method to install Open RV is to invoke the install build step tool using cmake. |
| 56 | +Before first your first Open RV build, you must install some python dependencies. |
45 | 57 |
|
46 |
| -The build system allows you to prepackage Open RV using cmake's install command and a prefix. |
| 58 | +#### Common build alias |
47 | 59 |
|
48 |
| -Then, it's up to you to either sign or package the result, or to do both. It should contain the minimum required to have a full Open RV. |
| 60 | +Use the `rvsetup` common build alias to run the bootstrap step. |
49 | 61 |
|
50 |
| -```shell |
51 |
| -cmake --install cmake-build --prefix /Absolute/path/to/a/destination/folder |
| 62 | +#### Manually |
| 63 | + |
| 64 | +```bash |
| 65 | +python3 -m pip install --user --upgrade -r requirements.txt |
| 66 | +``` |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | +### Configure |
| 71 | + |
| 72 | +The project uses CMake and requires a `configure` step before building. It is during the configure step that you provide your Qt package. |
| 73 | + |
| 74 | +From the root of the repository, execute `cmake` and specify the path to an arbitrary build folder and the path to your QT5 package. |
| 75 | + |
| 76 | +#### Common build alias |
| 77 | + |
| 78 | +Use the `rvcfg` (the common build alias) to run the configuration step. You can also use `rvcfgd` to configure in Debug. |
| 79 | + |
| 80 | +#### Manually |
| 81 | + |
| 82 | +##### Windows |
| 83 | + |
| 84 | +On Windows, you must specify the path to Strawberry perl for the OpenSSL build. |
| 85 | + |
| 86 | +```bash |
| 87 | +cmake -B _build -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DRV_DEPS_WIN_PERL_ROOT=/c/Strawberry/perl/bin -DRV_DEPS_QT5_LOCATION=/c/path/to/your/Qt/Root |
52 | 88 | ```
|
53 | 89 |
|
54 |
| -## Run Tests |
| 90 | +##### Linux and MacOS |
| 91 | + |
| 92 | +```bash |
| 93 | +cmake -B _build -DCMAKE_BUILD_TYPE=Release -DRV_DEPS_QT5_LOCATION=/Path/To/Your/Qt5/Root |
| 94 | +``` |
| 95 | + |
| 96 | +#### Tips |
| 97 | + |
| 98 | +##### 3rd Parties Outside Of Repository |
| 99 | + |
| 100 | +To keep your third-party builds between build cleanups, set `-DRV_DEPS_BASE_DIR=/path/to/third/party`. |
55 | 101 |
|
56 |
| -You invoke Open RV tests with the following command: |
| 102 | + |
| 103 | +### Build |
| 104 | + |
| 105 | +Invoke the previously specified generator tool using cmake to run the `build` step (recommended). |
| 106 | + |
| 107 | +#### Common build alias |
| 108 | + |
| 109 | +Use the `rvbuild` (the common build alias) to run the build step. You can also use `rvbuildd` to build in Debug. |
| 110 | + |
| 111 | +#### Manually |
| 112 | + |
| 113 | +```bash |
| 114 | +cmake --build _build --config Release -v --parallel=8 --target main_executable |
| 115 | +``` |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | +### Test |
| 120 | + |
| 121 | +Invoke the tests using ctest. |
| 122 | + |
| 123 | +#### Common build alias |
| 124 | + |
| 125 | +Use the `rvtest` common build alias to start the tests. |
| 126 | + |
| 127 | +#### Manually |
57 | 128 |
|
58 | 129 | ```shell
|
59 |
| -ctest --test-dir cmake-build --extra-verbose |
| 130 | +ctest --test-dir _build |
60 | 131 | ```
|
61 | 132 |
|
62 |
| -### Tests Tips |
| 133 | +#### Tips |
63 | 134 |
|
64 |
| -#### Run The Tests In Parallel |
| 135 | +##### Run The Tests In Parallel |
65 | 136 |
|
66 |
| -You can run the tests in parallel by specifying `--parallel X`, where X is the number of tests to run in parallel. |
| 137 | +You can run the `test` in parallel by specifying `--parallel X`, where X is the number of tests to run in parallel. |
67 | 138 |
|
68 |
| -#### Run A Subset Of The Tests |
| 139 | +##### Run A Subset Of The Tests |
69 | 140 |
|
70 | 141 | You can apply a filter with the `-R` flag to specify a regex.
|
71 | 142 |
|
72 |
| -#### Run The Tests Verbose |
| 143 | +##### Run The Tests Verbose |
73 | 144 |
|
74 |
| -You can run the tests with extra verbosity with the flag `--extra-verbose`. |
| 145 | +You can run the tests with extra verbosity with the flag `--extra-verbose`. |
75 | 146 |
|
76 | 147 | > **Important:** You cannot use `--extra-verbose` with `--parallel`. It's one or the other, not both.
|
77 | 148 |
|
78 |
| -## Contributing to Open RV |
79 | 149 |
|
80 |
| -This repository uses pre-commit to have formatting executed before a commit. To install the hooks: |
81 | 150 |
|
82 |
| -```shell |
83 |
| -pre-commit install |
84 |
| -``` |
| 151 | +### Run |
| 152 | + |
| 153 | +Once the build ends, you can execute (or debug!) Open RV from the _build directory. |
| 154 | + |
| 155 | +The path to the build is `_build/stage/app`. It contains everything required to have the proper debug symbols. |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | +### Install |
85 | 160 |
|
86 |
| -> **Important:** When the hooks reformat a file, you need to re-add them to git to have your `git commit` command executed. |
87 |
| -> Also, you can skip the hook execution by using `git commit -n`. |
| 161 | +Invoke the `install` step using cmake. The install step prepares Open RV for packaging by building a copy of Open RV in the `_install` folder. |
| 162 | + |
| 163 | +The build system allows you to prepackage Open RV using cmake's `install` command. It will strip debug symbols if required. |
| 164 | + |
| 165 | +Then, it's up to you to either sign or package the result, or to do both. It should contain the minimum required to have a functional Open RV. |
| 166 | + |
| 167 | +#### Common build alias |
| 168 | + |
| 169 | +Use the `rvinst` common build alias to install OpenRV. |
| 170 | + |
| 171 | +#### Manually |
| 172 | + |
| 173 | +```shell |
| 174 | +cmake --install _build --prefix _install |
| 175 | +``` |
0 commit comments