Creating a Statically-Linked Wrapped Application with a Custom Interpreter and Custom Initialization Files
When creating a statically-linked wrapped application with a custom interpreter and custom Tcl initialization files, you are basically overriding all TclPro Wrapper defaults and wrapping your application "from scratch." In this case, your prowrap command line must include the following:
- The uses "" option to prevent TclPro Wrapper from using any built-in uses configuration
- A executable option specifying the custom interpreter
- All of your custom Tcl initialization files
- A tcllibrary option specifying the location of the initialization files in the wrapped application's file archive
- Any code options required to initialize other Tcl configuration variables such as tk_library
For example, the following wraps an application with a custom interpreter, myWish, that is based on the standard wish interpreter and a set of initialization files contained in the directory /usr/local/siteTcl/lib:
% prowrap -uses "" -executable /usr/local/bin/myWish \
-out myApp myApp.tcl img/*.gif \
/usr/local/siteTcl/lib/tcl8.3/*.tcl \
/usr/local/siteTcl/lib/tcl8.3/tclIndex \
/usr/local/siteTcl/lib/tcl8.3/encoding/*.enc \
/usr/local/siteTcl/lib/tk8.3/*.tcl \
/usr/local/siteTcl/lib/tk8.3/tclIndex \
-tcllibrary usr/local/siteTcl/lib/tcl8.3 \
-code "set tk_library usr/local/siteTcl/lib/tk8.3"
Note: Both the tcllibrary and code options omit the initial "/" when specifying the pathnames for the tcl_library and tk_library variables. This is because TclPro Wrapper strips the initial "/" from absolute pathnames when wrapping files, and therefore the wrapped initialization files have relative pathnames in the archive (for example, "usr/local/siteTcl/lib/tcl8.3/init.tcl"). See "How the Internal File Archive Works in a Wrapped Application" for more information.
http://www.ajubasolutions.com Voice: (650) 210-0100 Fax: (650) 210-0101 support@ajubasolutions.com |