HDK
|
This page contains documentation on the tools available with the HDK:
hcustom is a builder tool convenient for building HDK samples and small custom HDK projects.
Usage:
hcustom [-g] [-s] [-e] [-L libdir] [-I incdir] [-l lname] [-i install_dir] source.C [source2.C]
Options:
-d | Display the CFLAGS environment variable passed to the compiler. Only on Windows. |
-e | Echo the compiler and linker commands run by this script. |
-g | Compile with debugging information. |
-I dir | Specify an additional include directory for the compiler. |
-i dir | Specify the install directory. If not specified, then the default install directory is $HOME/houdiniX.Y/dso on Linux and Windows and $HOME/Library/Preferences/houdini/houdini/X.Y/dso on Mac. |
-L dir | Specify an additional library directory for the linker. |
-l lname | Specify an additional library to link to. |
-s | Create a standalone application instead of a plugin. |
-t | Turn off creation of tagging information. |
hcustom builds the final binary from the C++ source file and installs it into the current directory. If building a plugin (i.e. -s is not set), then the plugin library is additionally installed into $HOME/houdiniX.Y/dso for Linux and Windows and $HOME/Library/Preferences/houdini/X.Y/dso on Mac, or the path specified by the -i option.
It is possible to specify multiple C++ source files on the same command line. Each C++ file will be made into a plugin library or a stand alone tool.
Plugin libraries are automatically "tagged" with information which can be viewed using the the sesitag program. To change the tag information, you can set the SESI_TAGINFO environment variable to contain a tag of information which you would like to see displayed. For example, if you run the following in a bash shell on Linux:
Then running sesitag
custom.so
would output:
Usage:
proto_install [-l | -x] archive
proto_install -p archive
proto_install [-i install_path]-p archive.inst
The first form lists or extracts the contents of the given archive.
The second form creates an archive (*.idx and *.inst files).
The third form installs an archive to the specified path.
Options:
-l | List the contents of the specified archive. |
-i | The path where the archive should be installed to. |
-p archive | Specify the archive name that you want to create. If -i is set, then -p specifies the archive that you want to install. In this case, the archive must live in a "dso_proto" sub-directory under the Houdini Search Path. |
-x | Extract the contents of the specified archive into the current directory. |
This program can be used to package a plugin library for export to foreign sites. The program reads a configuration file and creates an archive file (i.e. *.idx, *.inst) which can be extracted at the foreign site by using the proto_install
command.
The configuration file must be called MANIFEST and contains a list of files which should be installed. The structure of the file is:
where command
is a single character (r, c, or x) indicating that the specified file is a README (r), should be copied (c) or should be executed as a shell script (x).
filename
specifies a file found in the directory where the program is being run.
target_path
specifies the location within the standard Houdini Search Path where the file should be located. For example, to specify an icon file, target_path
should be set to "config/Icons/". The filename specification should not be included in the path specification. For README files, this field is ignored.
If command
specifies that the file should be executed, then the filename given will be extracted to $HOUDINI_TEMP_DIR and the program will be started by running csh
. Though the file is extracted into a temporary directory, the current directory will be set to target_path
.
install_mode
specifies the permissions for the file after extraction.
Example 1:
This MANIFEST file creates an archive with four files in its contents. If the user chooses the $HOME/houdiniX.Y directory for installation, then the customsop
help file would be installed as $HOME/houdiniX
.Y/help/nodes/sop/customsop.
Example 2:
This MANIFEST file creates an archive with three files. The only file installed would be the CMD_CustomCommand.so file which would be installed in the dso sub-directory. The installHelp.sh file would run, with the current directory set to the help sub-directory. The helpInstall.sh file might look something like:
Creating and installing an archive
Assume that the MANIFEST file in Example 2 is in the current directory, then you can run:
This creates new CMD_CustomCommand archive files. If you copy CMD_CustomCommand.idx and CMD_CustomCommand.inst to a dso_proto sub-directory under the Houdini Search Path, say $HSITE/dso_proto, then you can install the plugin into your Houdini environment by running:
Specifically, in this case, proto_install extracts CMD_CustomCommand.so out of the .inst file and copies it to $HOME/houdiniX.Y/dso.