Devkit Plugin & Exe Development
There are now three sets of preferences that determine how Cutter interacts with MS Visual Studio
(Windows) and the GNU compiler (gcc and g++ on Linux and MacOSX). The first group of prefs are set
using the,
Edit->Preferences Tool->Rman->Devkit tab.
The "Plugin & Exe Build Paths" panel, figure 1, can be used to set where the binary output,
a plugin .dll a .so or a .exe file will be created. For example, I keep most of my source code (.cpp)
files in this location,
/Users/malcolm/Documents/maya/projects/RfM_ris/src
With the exception of RifPlugins the corresponding .so files are created in this location,
/Users/malcolm/Documents/maya/projects/RfM_ris
Also, to prevent an annoying accumulation of makefiles in the src directory the "Cleanup Makefiles"
is acive.
The second and third groups of prefs, figure 2, are set using the,
Tools->Show RenderMan Tool->Options->Devkit tab.
Under some circumstances it can be handy to have a duplicate of a newly "minted" .so or .dll or .oso file
moved to another directory. The "Duplication Directories" panel can be used to set those paths and
to conveniently activate or deactivate the duplication.
The final group of prefs enables a script to be executed by Cutter after a
.dll or .so or .exe has been built. When Cutter executes a "Post Build Script" is passes the path
of the source code file and the path of the built object file to the script. The script can be located
in either a plugins .cpp directory or in the "build" directory
A trivial example of a
script named post.py is shown below.
#!/usr/bin/env python
import sys, os
def main(argv):
srcpath = argv[1]
dsopath = argv[2]
f = open('build_log.txt', 'w')
f.write(srcpath + '\n')
f.write(dsopath)
f.close()
if __name__ == "__main__":
main(sys.argv)
|