-
Notifications
You must be signed in to change notification settings - Fork 45
Using Pixar's build script on Windows
There are several prerequisites for building USD with Pixar's script found at USD/build_scripts/build_usd.py
These steps are tested with VS2017 and VS2019.
It is necessary to have the cmd.exe shell environment configured for Visual Studio. You can either run the VS2017/VS2019 x64 Native Tools Command Prompt as appropriate or you can invoke the appropriate configuration script from you shell of choice. For VS2017, the script is:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
for VS2019, the script is:
c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
If you are new to this kind of build it is a good idea to verify the success of each installation from within the shell before proceeding to the next.
If you are not sure which Python (2 or 3) you want to use? If you are on the master branch, your only choice is Python 2.7 or 2.8. If you are on the dev branch, Python 3.7 and Python 2.7 or 2.8 are options. Python 3.8 has breaking changes that haven't been accommodated in USD yet (https://bugs.python.org/issue36085).
- Install CMake and make sure its on your %PATH%. For Visual Studio 2019, you'll need at least CMake 3.17, and for 2017, at least 3.14. Using an older CMake will result in problems during the build (boost building will fail).
- Install the 64 bit version of Python and Pip. When using the python.msi installer, select all of the advanced options, in order that you get development libraries, pip, and other crucial components. Allow the installer to put Python in your %PATH% variable.
- Quit the shell, and start a new one as Administrator
- pip install PySide2
- pip install pyopengl
- quit the shell, start again, not as Administrator.
- Run the vcvars batch file as appropriate.
Once the prerequisites above have been satisfied, follow the instructions in the USD readme.
https://github.com/PixarAnimationStudios/USD/#3-run-the-script
If there are issues, rerun the script with the -v flag in order to see what went wrong.
Work in progress - not fully functional yet. Create the virtual env. Copy your Python's include directory, and the libs directory into the virtual environment such that they are siblings to the Lib directory. Activate the virtual env, then follow the steps above.
If you are going to develop your own schemas, then you will also need flex and bison. They are not required to build and use USD using only the standard schemas.
- Download & unzip win-flex and bison from https://sourceforge.net/projects/winflexbison/, put them in the %PATH%.