tclmerge will scan through your main file looking for statements like
source "filename".If the file filename exists, tclmerge will recursively insert the contents of the file into the main script, otherwise it will leave the statement unchanged. The result is one single script which you can distribute more easilly.
Moreover, tclmerge also:
tclmerge -i interp [-o targetfile] mainfilewhere:
- -i interp
- Specifies the interpreter to use. Typical values are "tclsh83" and "wish83" but you might just as well use other interpreters, for example if the script requires [incr tcl] or any other named compilation of the Tcl interpreters. This option can be omitted if tclmerge is run as a script in a unix environment. In that case, tclmerge will use the same interpreter as the one running tclmerge itself.
- -o targetfile
- Specifies the name of the output script. If this option is ommited, tclmege will generate a filename from the name of the main file by stripping off the extension.
- mainfile
- Specifies the name of main tcl file.
However, if you want "myfile.tcl" to be included at run
time, then you must do something like this in your script:
This is useful sometimes. For example, if yuo have a directory
containing add-on extensions, yuo can source them in at run time using
the following statements:
Or, if the user can personalize his application by sourcing an init
file, named ".myrc":