-
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, pick 2. If you are on the dev branch and have no compelling reason to use Python 2, pick Python 3.
- Install CMake and make sure its on your %PATH%
- 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 in order that Python is activated. Run run the vcvars batch file as appropriate.
- pip install PySide2
- 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.
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%.