Creating a Dynamically-Linked Wrapped Application with a Custom Interpreter
When creating a dynamically-linked wrapped application, your application depends on all shared libraries and library script files (for example, init.tcl) already being installed and configured on your target system. The built-in uses tclshdynamic and uses wishdynamic options automatically handle setting the appropriate values of the tcl_library and tk_library variables, as well as any similar library variables for the extensions bundled with TclPro. But when you want to use a custom dynamically-linked interpreter, you must set these values yourself when wrapping the application. 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
- A tcllibrary option specifying the location of the initialization files on your target system
- Any code options required to initialize other Tcl configuration variables such as tk_library
Furthermore, you must configure your target systems as discussed in "Creating and Distributing Dynamically-Linked Wrapped Applications" (including creating a distribution directory as described in that section, if necessary).
For example, the following wraps an application with a custom dynamically-linked interpreter, myWish, that is based on the standard wish interpreter. The example assumes that you create a distribution directory for your application as described in "Creating and Distributing Dynamically-Linked Wrapped Applications":
% prowrap -uses "" -executable /usr/local/bin/myWish \
-out myApp myApp.tcl img/*.gif -tcllibrary ../../lib/tcl8.3 \
-code "set tk_library [file join [file dir [info nameofexec]] .. .. lib tk8.3] "
http://www.ajubasolutions.com Voice: (650) 210-0100 Fax: (650) 210-0101 support@ajubasolutions.com |