Skip to content

Commit 5ad8c8a

Browse files
gareth-morgan-autodeskandy-shiue-autodeskpixnblox2021tzhanliwAndy Shiue
authored andcommitted
Release v23.03 (#74)
* Added libXt as a pre-required library on Linux MaterialX (MaterialXRenderHw) requires libXt to build. Ubuntu 20.04 may have it installed with system installation. To be safe, I added it in the doc so users can build MaterialX without the missing libXt error. * OGSMOD-2637: Fixed deployHdAurora of building and running usdview * OGSMOD-2642: Improved error message on missing Windows SDK * Fix typo in README.md * Fix CMake error message * Disable failed cases that cause CI/CD errors (#53) * Disable failed cases * Minor fixes in documentation * Fix typos * OGSMOD-2658: Refactored the externals to install to individual prefix location Each and every external library will be installed to its own installation path. This allows an easy override with <pkg>_ROOT for users to use their own external libraries. NOTE: this commit breaks the Aurora build * OGSMOD-2679: Upgraded Aurora build scripts to support multi-config build in Visual Studio - Updated cmake files to work with the new externals layout - An externals config file is auto-generated by installExternals.py for easy configuration with 'cmake -S . -B Build'. - Created patches for OpenImageIO and USD to support multi-config build. - Created customized find modules of USD, TBB and OpenSubdiv to support multi-config build. * OGSMOD-2679: Updated findNRD/NRI to support multi-config build * OGSMOD-2679: Improved of the build scripts and the end message of the external script * OGSMOD-2680: Fixed the Linux build with changes of the multi-config support - Fixed the cmake files to build on Linux - Preset the patch file to always have LF line-ending to fix the patching errors. - Updated the default externals config * OGSMOD-2681: Updated README.md to sync with the changes of the Aurora build scripts * Windows pipeline for Aurora Build/Test in CI/CD (#55) * Windows pipeline for Aurora Build/Test in CI/CD * Move build instructions to a separate file * Removed RelWithDebInfo from the build variants of installExternals.py * Added error checking on missing the externals config file Existing users who ran installExternals.py do not have the externals config file. The old externals installation is not compatible to the current build scripts. This error reminds users to re-run the install script. * OGSMOD-2803: Fixed the build error with ENABLE_HGI_BACKEND=ON on Windows * OGSMOD-2704: Built usdview by installExternals.py - Updated externals script to build USD with python - Built usdview as well - Updated cmake scripts to build Aurora with the updated USD build - Deployed usdview (and other USD executables) with HdAurora after HdAurora is built. Batch codes to build Aurora/externals and run usdview: set BUILD_TYPE=Release set BUILD_DIR=Build.release set EXTERNALS_DIR=%HOME%\AuroraExternals.release python Scripts\installExternals.py --build-variant %BUILD_TYPE% "%EXTERNALS_DIR%" cmake -S . -B %BUILD_DIR% cmake --build %BUILD_DIR% --config %BUILD_TYPE% set PYTHONPATH=%cd%\%BUILD_DIR%\bin\%BUILD_TYPE%\python set PATH=%PATH%;%cd%\%BUILD_DIR%\bin\%BUILD_TYPE% usdview model.usd Note usdview only works with the release build of USD. Aurora builds the debug build USD with the 'd' suffixed to the dlls. Since usdview hardcodes the loaded dlls without suffix 'd', it cannot load the needed dlls. * OGSMOD-2859: Support building on Ubuntu 22.04 With gcc 11.3.0 clang 14.0.0 We need boost 1.78 to build on newer compiler. The script to build Aurora: ``` BUILD_TYPE=Release BUILD_DIR=Build.$BUILD_TYPE EXTERNALS_DIR=AuroraExternals.$BUILD_TYPE CC=gcc CXX=g++ compiler=gcc python Scripts/installExternals.py -v --build-variant $BUILD_TYPE "$EXTERNALS_DIR" CC=clang CXX=clang++ compiler=clang cmake -S . -B $BUILD_DIR -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D ENABLE_HGI_BACKEND=ON CC=clang CXX=clang++ compiler=clang cmake --build $BUILD_DIR ``` * OGSMOD-2875: Fixed the HdAurora build on system with multiple installed Pythons * OGSMOD-2858: updated the doc on how to run usdview within the Aurora build tree * Fix CI/CD build errors (#64) We get type conversion warnings treated as errors. Its because we get the master version of STB in installExternals: and there was a change in STB that introduced the warning, hence the problem So we disable the warning 4244 to fix the error Co-authored-by: svc_ogs_td <[email protected]> * OGSMOD-2616 : Windows pipeline for Aurora simple deploy in CI/CD (#63) * Windows pipeline for Aurora simple deploy in CI/CD * OGSMOD-3009: upgrade zlib to 1.2.13 (security patch) * OGSMOD-2990: Clone STB using an explicit SHA This commit fixed the issue of "changing" master HEAD of STB. * OGSMOD-3083: Picking the correct python version from the USD/boost This commit solve the potential version mismatching issue of python between Aurora and USD/boost. * Merge from main->dev to remove conflicts (#73) Correct dev history by merging main. * Add prerequisites to build documentation (#68) * Add prerequisites to build documentation * Fix typo * Add Linux * Add dependency checking to installExternals.py (#75) * Fix typo * Add versioning * Remove spew * Add comments * Use hash not URL Co-authored-by: Andy Shiue <[email protected]> Co-authored-by: Mauricio Vives <[email protected]> Co-authored-by: Liwei Zhan <[email protected]> Co-authored-by: Andy Shiue <[email protected]> Co-authored-by: svc_ogs_td <[email protected]>
1 parent acf5513 commit 5ad8c8a

File tree

11 files changed

+433
-80
lines changed

11 files changed

+433
-80
lines changed

CMakeLists.txt

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,25 @@ project(Aurora VERSION 0.0.0.1)
1212

1313
set(AURORA_ROOT_DIR ${PROJECT_SOURCE_DIR})
1414

15+
# install path if the user did not explicitly specify one.
16+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
17+
set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/Installed" CACHE PATH "..." FORCE)
18+
endif()
19+
20+
# Set the default install directories
21+
set(INSTALL_BIN "$<CONFIG>/bin")
22+
set(INSTALL_LIB "$<CONFIG>/lib")
23+
set(INSTALL_INC "$<CONFIG>/include")
24+
1525
# Set the default output directories
1626
set(RUNTIME_OUTPUT_DIR "${PROJECT_BINARY_DIR}/bin/$<CONFIG>")
1727
set(LIBRARY_OUTPUT_DIR "${PROJECT_BINARY_DIR}/lib/$<CONFIG>")
1828

29+
add_custom_target(MakeRuntimeDir ALL
30+
COMMAND ${CMAKE_COMMAND} -E make_directory ${RUNTIME_OUTPUT_DIR}
31+
)
32+
set_property(TARGET MakeRuntimeDir PROPERTY FOLDER "Deployment")
33+
1934
# Set scripts folder.
2035
set(SCRIPTS_DIR ${AURORA_ROOT_DIR}/Scripts)
2136

@@ -25,6 +40,10 @@ list(APPEND CMAKE_MODULE_PATH
2540
"${SCRIPTS_DIR}/cmake/modules"
2641
)
2742

43+
option(ENABLE_TESTS "Build unit tests" ON)
44+
option(ENABLE_APPLICATIONS "Build Applications" ON)
45+
option(ENABLE_USDVIEW "Build usdview with python" ON)
46+
2847
# Import the cmake utility functions
2948
include(toolbox)
3049

@@ -51,6 +70,8 @@ if(MSVC)
5170
add_compile_options(/W4 /WX -wd4068) # -wd4068 disables unknown-pragmas warnings
5271
# Enable multiple-processor compilation
5372
add_compile_options(/MP)
73+
# Add INSTALL project to solution by default.
74+
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
5475
else()
5576
# Enables strict standard conformance and warning as errors
5677
add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wno-unknown-pragmas -Wno-gnu-zero-variadic-macro-arguments)
@@ -78,5 +99,12 @@ else()
7899
endif()
79100

80101
add_subdirectory(Libraries)
81-
add_subdirectory(Tests)
82-
add_subdirectory(Applications)
102+
103+
# Unit tests
104+
if (ENABLE_TESTS)
105+
add_subdirectory(Tests)
106+
endif()
107+
108+
if (ENABLE_APPLICATIONS)
109+
add_subdirectory(Applications)
110+
endif()

Doc/Build.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
11
# Building
2+
3+
## Prerequisites
4+
5+
Several prerequisites must be installed before building Aurora.
6+
7+
### Windows
8+
On windows the following packages should be installed and added to the system PATH environment variable:
9+
* Microsoft Visual Studio 2019 (https://my.visualstudio.com/Downloads?q=visual%20studio%202019)
10+
* CMake 3.26.11 (https://github.com/Kitware/CMake/releases/download/v3.26.1/cmake-3.26.1-windows-x86_64.msi)
11+
* Python 3.9.13 (https://www.python.org/downloads/release/python-3913/)
12+
* PySide6 python package (install with `pip3 install pyside6`)
13+
* PyOpenGL python package (install with `pip3 install PyOpenGL`)
14+
* NASM 2.16 (https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-installer-x64.exe)
15+
* Vulkan SDK (https://vulkan.lunarg.com/sdk/home#windows). Should be accessible via the VULKAN_SDK environment variable.
16+
17+
### Linux
18+
The following dependencies are required on Linux. The versions listed are the recommended version for Ubuntu 20.04:
19+
* zlib1g-dev: 1.2.11
20+
* libjpeg-turbo8-dev: 2.0.3
21+
* libtiff-dev: 4.1.0
22+
* libpng-dev: 1.6.37
23+
* libglm-dev: 0.9.9.7
24+
* libglew-dev: 2.1.0
25+
* libglfw3-dev: 3.3.2
26+
* libgtest-dev: 1.10.0
27+
* libgmock-dev: 1.10.0
28+
29+
On Ubuntu 20.04, these can be installed with the following Advanced Package Tool command:
30+
```
31+
sudo apt-get -y install zlib1g-dev libjpeg-turbo8-dev libtiff-dev libpng-dev libglm-dev libglew-dev libglfw3-dev libgtest-dev libgmock-dev
32+
```
33+
34+
## Building Aurora
35+
236
Aurora includes a script that retrieves and builds dependencies ("externals") from source. This script is based on the [USD build script](https://github.com/PixarAnimationStudios/USD/tree/release/build_scripts). CMake is used to build Aurora directly, or to create an IDE project which can then be used to build and debug Aurora.
337

438
1. **Download or clone** the contents of this repository to a location of your choice. Cloning with Git is not strictly necessary as Aurora does not currently use submodules. We refer to this location as *AURORA_DIR*.

Doc/HdAurora.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,39 @@ Once **HdAurora** has been deployed to your USD folder you can select HdAurora i
1616
<img src="RendererMenu.jpg" width="50%;" />
1717

1818
## Deploying HdAurora
19+
In this section, we explain how to run usdview using HdAurora with the default Aurora build, and how to deploy HdAurora to a custom USD installation if it is preferred. The commands in this section require "x64 Native Tools Command Prompt for VS 2019".
1920

20-
The provided Python script [deployHdAurora.py](../Scripts/deployHdAurora.py) can be used to deploy **HdAurora** to a USD installation. This can also create a new USD installation if one does not exist, using the `--build` option.
21+
### Running usdview with Default Aurora Build
22+
If Aurora is built with the default build steps, **usdview** and required USD binaries are automatically deployed with HdAurora binaries. Assuming the root of Aurora source tree is *AURORA_ROOT*, the following build steps deploy **usdview** automatically:
23+
```
24+
cd %AURORA_ROOT%
25+
python Scripts\installExternals.py --build-variant Release ..\AuroraExternals
26+
cmake -S . -B Build
27+
cmake --build Build --config Release
28+
```
29+
Before running **usdview** with **HdAurora**, you need to configure the run environment with:
30+
```
31+
set PYTHONPATH=%AURORA_ROOT%\Build\bin\Release\python
32+
set PATH=%PATH%;%AURORA_ROOT%\Build\bin\Release
33+
```
34+
To render the [Autodesk Telescope USD model](https://drive.google.com/file/d/1RM09qDOGcRinLJTbXCsiRfQrHmKA-1aN/view?usp=share_link) with **HdAurora**, simply extract the ZIP file into *ASSET_DIR*, and run the following command.
35+
```
36+
usdview %ASSET_DIR%\AutodeskTelescope.usda --renderer=Aurora
37+
```
2138

22-
Run the following command to create a new USD installation located at *..\USD* relative to the Aurora repository root and deploy **HdAurora** to it. Creating a new USD installation requires a command prompt with compiler tools, such as "x64 Native Tools Command Prompt for VS 2019", and should be run from the root of the Aurora repository. This will take about 30 minutes to complete and will require 10 GB of disk space.
39+
### Deploying HdAurora to Custom USD Installation
40+
For users who want to use their own USD build, Aurora provides [deployHdAurora.py](../Scripts/deployHdAurora.py) to deploy **HdAurora** to the custom USD installation. [deployHdAurora.py](../Scripts/deployHdAurora.py) can also create a new USD installation if one does not exist, using the `--build` option.
2341

42+
Run the following command to build a new USD installation located at *..\USD* relative to the the root of Aurora source tree ( *AURORA_ROOT*). This will take about 30 minutes to complete and will require 10 GB of disk space.
2443
```
44+
cd %AURORA_ROOT%
2545
python Scripts\deployHdAurora.py ..\USD --externals_folder=..\AuroraExternals --config=Release --build
2646
```
2747

28-
You can then run **usdview** from the *bin* subdirectory within that installed USD directory. The example command below loads the [Autodesk Telescope USD model](https://drive.google.com/file/d/1RM09qDOGcRinLJTbXCsiRfQrHmKA-1aN/view?usp=share_link); simply extract the ZIP file into a directory, referred to as *ASSET_DIR* below.
48+
You can then run **usdview** from the *bin* subdirectory within that installed USD directory. To render the [Autodesk Telescope USD model](https://drive.google.com/file/d/1RM09qDOGcRinLJTbXCsiRfQrHmKA-1aN/view?usp=share_link) with **HdAurora**, simply extract the ZIP file into *ASSET_DIR* and run the following commands.
2949

3050
```
3151
cd ..\USD\bin
32-
python usdview {ASSET_DIR}\AutodeskTelescope.usda --renderer=Aurora
52+
usdview %ASSET_DIR%\AutodeskTelescope.usda --renderer=Aurora
3353
```
3454

Jenkinsfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ def windowsBuild() {
5050
if not exist ${EXTERNALS_DIR}\\nasm-2.15.05 call 7z x -y -aoa ${EXTERNALS_DIR}\\nasm-2.15.05-win64.zip -o${EXTERNALS_DIR}
5151
call set PATH=${EXTERNALS_DIR}\\nasm-2.15.05;%PATH%
5252
53+
:: Set up Pyside6/PyOpenGL
54+
call python -m pip install --upgrade pip
55+
call python -m pip install PySide6
56+
call python -m pip install PyOpenGL
57+
5358
:: Set up Vulkan SDK
5459
:: We need to install Vulkan SDK silently. For more details please refer to https://vulkan.lunarg.com/doc/view/latest/windows/getting_started.html
5560
if not exist ${EXTERNALS_DIR}\\VulkanSDK-1.3.231.1-Installer.exe call curl -o ${EXTERNALS_DIR}\\VulkanSDK-1.3.231.1-Installer.exe https://sdk.lunarg.com/sdk/download/1.3.231.1/windows/VulkanSDK-1.3.231.1-Installer.exe

Libraries/Aurora/CMakeLists.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,6 @@ source_group("DirectX/Shaders" FILES ${DIRECTX_PRECOMPILED_SHADERS})
254254
source_group("HGI/Shaders" FILES ${HGI_SHADERS})
255255

256256
if(WIN32)
257-
add_custom_target(MakeRuntimeDir ALL
258-
COMMAND ${CMAKE_COMMAND} -E make_directory ${RUNTIME_OUTPUT_DIR}
259-
)
260-
set_property(TARGET MakeRuntimeDir PROPERTY FOLDER "Deployment")
261-
262257
if(ENABLE_DIRECTX_BACKEND)
263258
# Create custom targets that will copy DLLs of the DirectX shader compiler to the runtime folder.
264259
add_custom_target(CopyDXCompilerDLLs ALL
@@ -328,8 +323,8 @@ if(WIN32)
328323
# Copy additional HGI files of the Pixar USD to our runtime directory
329324
add_custom_target(CopyUSDDLLs ALL
330325
COMMAND ${CMAKE_COMMAND} -E make_directory ${RUNTIME_OUTPUT_DIR}/usd/hgiVulkan/resources
331-
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${pxr_DIR}/lib/usd/plugInfo.json ${RUNTIME_OUTPUT_DIR}/usd
332-
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${pxr_DIR}/lib/usd/hgiVulkan/resources/plugInfo.json ${RUNTIME_OUTPUT_DIR}/usd/hgiVulkan/resources
326+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PXR_LIBRARY_DIR}/usd/plugInfo.json ${RUNTIME_OUTPUT_DIR}/usd
327+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PXR_LIBRARY_DIR}/usd/hgiVulkan/resources/plugInfo.json ${RUNTIME_OUTPUT_DIR}/usd/hgiVulkan/resources
333328
)
334329
set_property(TARGET CopyUSDDLLs PROPERTY FOLDER "Deployment")
335330
add_dependencies(CopyUSDDLLs MakeRuntimeDir)
@@ -425,3 +420,10 @@ if(ENABLE_DIRECTX_BACKEND)
425420

426421
# TODO: do we have Vulkan computer shaders amd need to do similiar things for them?
427422
endif()
423+
424+
install(TARGETS ${PROJECT_NAME}
425+
RUNTIME DESTINATION "${INSTALL_BIN}"
426+
ARCHIVE DESTINATION "${INSTALL_LIB}"
427+
LIBRARY DESTINATION "${INSTALL_LIB}"
428+
COMPONENT ${PROJECT_NAME}
429+
)

Libraries/Aurora/Source/AssetManager.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@
1717

1818
// Include STB for image loading.
1919
// TODO: Image loading will eventually be handled by clients.
20+
#pragma warning(push)
21+
// Disabe type conversion warnings intruduced from stb master.
22+
// refer to the commit in stb https://github.com/nothings/stb/commit/b15b04321dfd8a2307c49ad9c5bf3c0c6bcc04cc
23+
#pragma warning(disable : 4244)
2024
#define STB_IMAGE_IMPLEMENTATION
2125
#include <stb_image.h>
26+
#pragma warning(pop)
2227

2328
BEGIN_AURORA
2429

Libraries/HdAurora/CMakeLists.txt

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,42 @@ PRIVATE
5959
)
6060

6161
# Add default compile definitions (set in root CMakefile)
62-
target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFAULT_COMPILE_DEFINITIONS})
62+
target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFAULT_COMPILE_DEFINITIONS})
63+
64+
if(WIN32)
65+
# Create a custom target that will copy USD executables to the runtime folder.
66+
file(GLOB USD_EXECUTABLES ${pxr_ROOT}/bin/*)
67+
set(USD_PYTHON_LIB_DIR "${pxr_ROOT}/lib/python")
68+
set(USD_LIB_PLUGIN_DIR "${pxr_ROOT}/lib/usd")
69+
set(USD_PLUGIN_DIR "${pxr_ROOT}/plugin/usd")
70+
add_custom_target(CopyUSDExecutables ALL
71+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${USD_EXECUTABLES} ${RUNTIME_OUTPUT_DIR}
72+
COMMAND ${CMAKE_COMMAND} -E copy_directory ${USD_LIB_PLUGIN_DIR} ${RUNTIME_OUTPUT_DIR}/usd
73+
COMMAND ${CMAKE_COMMAND} -E copy_directory ${USD_PLUGIN_DIR} ${RUNTIME_OUTPUT_DIR}/usd
74+
)
75+
set_property(TARGET CopyUSDExecutables PROPERTY FOLDER "Deployment")
76+
add_dependencies(CopyUSDExecutables MakeRuntimeDir)
77+
add_dependencies(${PROJECT_NAME} CopyUSDExecutables)
78+
79+
if(ENABLE_USDVIEW)
80+
add_custom_target(CopyUSDPythonExecutables ALL
81+
COMMAND ${CMAKE_COMMAND} -E copy_directory ${USD_PYTHON_LIB_DIR} ${RUNTIME_OUTPUT_DIR}/python
82+
)
83+
set_property(TARGET CopyUSDPythonExecutables PROPERTY FOLDER "Deployment")
84+
add_dependencies(CopyUSDPythonExecutables MakeRuntimeDir)
85+
add_dependencies(${PROJECT_NAME} CopyUSDPythonExecutables)
86+
endif()
87+
88+
set(HDAURORA_PLUGIN_RESOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/resources)
89+
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
90+
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${PROJECT_NAME}> $<$<CONFIG:Debug>:$<TARGET_PDB_FILE:${PROJECT_NAME}>> ${RUNTIME_OUTPUT_DIR}/usd
91+
COMMAND ${CMAKE_COMMAND} -E copy_directory ${HDAURORA_PLUGIN_RESOURCES_DIR} ${RUNTIME_OUTPUT_DIR}/usd/hdAurora/resources
92+
)
93+
94+
else() # Linux
95+
#TODO anything we need to set to support the Aurora execution?
96+
endif()
97+
98+
# Install the binaries.
99+
install(TARGETS ${PROJECT_NAME} DESTINATION ${INSTALL_BIN}/usd)
100+
install(FILES "resources/plugInfo.json" DESTINATION ${INSTALL_BIN}/usd/hdAurora/resources)

0 commit comments

Comments
 (0)