TOC PREV NEXT INDEX

 


Specifying Code to Execute at Application Startup


The code option allows you to provide Tcl code that your application executes when it starts. The application executes the code early in the application initialization sequence, before Tcl_Init or any other package initialization procedures are invoked. You can specify multiple code options, in which case TclPro Wrapper arranges for the application to execute these scripts in the order that they appear on the prowrap command line.

One common use for the code option is to set the auto_path variable to handle Tcl script libraries wrapped with your applications. For example, the following prowrap command wraps an application with a library in the /usr/local/lib/common directory and sets the auto_path variable so that the library is loaded properly on execution:


% prowrap myscript.tcl -relativeto /usr/local \
/usr/local/lib/common/*.tcl /usr/local/lib/common/tclIndex \
-code "lappend auto_path lib/common" -out myscript



http://www.ajubasolutions.com
Voice: (650) 210-0100
Fax: (650) 210-0101
support@ajubasolutions.com
TOC PREV NEXT INDEX