Skip to content

Using Pixar's build script on Windows

Nick Porcino edited this page Mar 27, 2020 · 9 revisions

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, pick 3.

  1. Install CMake and make sure its on your %PATH%
  2. 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.
  3. Quit the shell, and start a new one in order that Python is activated. Run run the vcvars batch file as appropriate.
  4. pip install PySide2
  5. pip install pyopengl

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.

Running Pixar's build script from within a Python virtualenv

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.

Developing your own schemas

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.

  1. Download & unzip win-flex and bison from https://sourceforge.net/projects/winflexbison/, put them in the %PATH%.
Clone this wiki locally