HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Build Tools

Table of Contents

This page contains documentation on the tools available with the HDK:

hcustom

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:

export SESI_TAGINFO=" : (c) 2009 - Side Effects Software."
hcustom *.C

Then running sesitag custom.so would output:

custom.so
Version: 1.1a
Compiled on: Thu Nov 7 05:15:57 1996
by: fred
: (c) 2009 - Side Effects Software.

proto_install

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:

command filename target_path install_mode
command2 filename2 target_path2 install_mode2
...

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:

r README x 0666
c SOP_CustomSop.so dso/ 0555
c customsop help/nodes/sop/ 0444
c SOP_customsop.icon config/Icons/ 0444

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:

r README x 0666
c CMD_CustomCommand.so dso/ 0555
x installHelp.sh help/ 0777

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:

#!/bin/csh -f
set help = "command.help"
if ( -r $help ) then
# The file exists, so search for our command
set exist = `grep ^command_name $help`
else
set exist = ""
endif
if ( "$exist" == "" ) then
echo Installing help
echo command_name >> $help
echo " This command does something..." >> $help
endif

Creating and installing an archive

Assume that the MANIFEST file in Example 2 is in the current directory, then you can run:

proto_install -p CMD_CustomCommand

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:

proto_install -i $HOME/houdiniX.Y -p CMD_CustomCommand.inst

Specifically, in this case, proto_install extracts CMD_CustomCommand.so out of the .inst file and copies it to $HOME/houdiniX.Y/dso.