26 Dec 2020
This is how I compile them on Windows 10. Information relevent for RenderMan 23.
yourplugin.bat
file, in my example the file is called WillActionCam.bat
.REM
is used as a comment in Windows batch files.ARGS
file stored in a args
subfolder relative to the .cpp
file.C:\\Program Files
, I’ve installed mine to D:\\Programs
REM where to install the plugins once compiled
set CUSTOM_PLUGIN_PATH="D:\scenes\rman\custom\plugins"
REM specify which version of RenderMan to use
set RMAN_VERSION="23.2"
set RMANTREE=C:\\Program Files\Pixar\RenderManProServer-%RMAN_VERSION%\
REM set path to version builds
set BUILD_PLUGIN_PATH="D:\tools\Earlyworm-Pxr\plugin\r%RMAN_VERSION%\windows\"
set PLUGIN_NAME="WillActionCam"
mkdir %BUILD_PLUGIN_PATH%\args
REM set this to the your MSVC install
call "D:\programs\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
REM WillActionCam
cl -MD /EHsc /D "WIN32" /D "_WINDLL" /I"%RMANTREE%\include" -c %PLUGIN_NAME%.cpp
link /DLL /out:%PLUGIN_NAME%.dll %PLUGIN_NAME%.obj "%RMANTREE%\lib\libprman.lib" "%RMANTREE%\lib\libpxrcore.lib"
REM cleanup and install
del %PLUGIN_NAME%.exp %PLUGIN_NAME%.lib %PLUGIN_NAME%.obj
copy %PLUGIN_NAME%.dll "%BUILD_PLUGIN_PATH%\%PLUGIN_NAME%.dll"
move %PLUGIN_NAME%.dll "%CUSTOM_PLUGIN_PATH%\%PLUGIN_NAME%.dll"
copy ".\args\%PLUGIN_NAME%.args" %CUSTOM_PLUGIN_PATH%\args\%PLUGIN_NAME%.args
copy ".\args\%PLUGIN_NAME%.args" %BUILD_PLUGIN_PATH%\args\%PLUGIN_NAME%.args