TCL Dev Kit User Guide
TCL Dev Kit User Guide
Package Editor
The Package Editor is a graphical application used to define Tcl packages in TEApot format (.zip and .tm files) or TclApp Package format (.tap files). Both types of packages can be used by TclApp. Creating package definitions simplifies the creation of applications in TclApp as included files do not have to be specified individually. Packages can be modified and re-used by multiple applications built with TclApp. TEApot packages can also be hosted in a TEApot repository and made available to ActiveTcl TEAcup clients. Numerous predefined packages in .tap format are included with ActiveTcl 8.4 and earlier. Many more packages are available from ActiveState's TEApot repository. These packages can be installed using ActiveTcl's TEAcup client. The Package Editor can be used to modify existing packages, regardless of whether they are custom packages or predefined packages included with ActiveTcl. Multiple packages can be configured within the same Package Editor project. Each package will be displayed as an individual entity in the TclApp Package Picker dialog; however, by grouping multiple packages together into one project, you can easily maintain file sets in related packages.
teapot.txt files (TEApot package descriptors) .tap files (TclApp packages) starkits and starpacks zip archives tcl modules
Use 'Ctrl-plus' and 'Ctrl-minus' to increase or decrease the displayed font size. Alternatively, use 'Ctrl-mouse wheel'.
Teapot Packages
1
To create a project for packages in TEApot format, select New Project (Teapot) from the File menu. A new TEApot package project is created by default when the Package Editor is started.
Scanning Directories
Scan Directory opens a dialog box for choosing a source directory. Enter the directory to scan in the Destination field, or click the Browse button on the right. The Package Editor scans the source directory for a pkgIndex.tcl file. If present, it will use this as a starting point for a heuristic scan for packages and files to be included in the project. If it is not present, the path displayed in the Destination field will be highlighted, indicating that scanning is not possible. Click Run to initiate the scan. The output pane below displays information on the scanning progress. Warnings are highlighted in yellow, errors are highlighted in red. Packages discovered in the scan are added to the project and appear in the left pane where they can be reviewed. Note: TEApot projects generate a file called teapot.txt in the source directory when the project is saved, so the source directory must be writable.
Type: A drop-down list with options for specifying what kind of TEApot entity is being created: o Application: An Tcl based application with meta data. o Package (default): A Tcl package. o Profile: A named collection of references to other entities (i.e. meta data only). Name: The entity name. Version: A version number for the entity. Platform: The target platform for the package. By default, this field shows the platform the Package Editor is currently running on. Summary: A short summary of what the package is or does. Description: A longer description of the package.
The Requirements tab is for specifying the package requirements (Tcl version, module dependencies, etc.). To add a requirement, enter the package name or version in the entry field and click the Add button. Requirements must be entered in TEApot's entity reference syntax. If the syntax is incorrect, the text in the entry field is highlighted, and a tooltip provides information on the error.
Destination: The directory to save the archive to. Archive format: Choose from tm (Tcl module), zip, or auto (default). Compile to bytecode: Invokes the Tcl compiler on the files in the package. Timestamp the version: Adds a date/time-stamp to the version metadata.
TclApp Packages
4
To create a project for packages in TclApp (.tap) format, select New Project (Tap) from the File menu. The Scan Directory feature works essentially the same in a Tap project as in a TEApot project, but does not generate a teapot.txt file in the scanned directory. See Scanning Directories above for more information.
Name: The contents of this field will be displayed in TclApp's Package Picker dialog. It is also the value specified when using the -pkg switch with the command-line version of TclApp. Version: The contents of this field will be displayed in TclApp's Package Picker dialog. It can also be part of the value specified when using the -pkg switch with the command-line version of TclApp (specified in the form of PKGNAME-VERSION).
5
Platform: The contents of this field will be displayed in TclApp's Package Picker dialog. Hidden: If this box is checked, the package will not be visible in the TclApp Package Picker dialog. Same files as: This field is used to assign a file set definition from an existing package to the new package. See Copying File Lists from One Package to Another below. Description: The contents of this field will be displayed in TclApp's Package Picker dialog.
Copying File Lists from Another Package To copy a list of files from an existing package to a new package, first open the existing package using the File | Load Project menu option. Then click the New Package button. While the new package is selected in the package list (on the left side of the Package Editor), check the Same files as box, and select the desired package from the drop-down list. If you are creating multiple new packages at the same time, note that only the packages that were opened before the current package will be available in the Same files as drop-down list. For example, if you create a new package called "foo", and then create a new package called "bar", the "foo" files will be available to the "bar" package, but the "bar" files will not be available to the "foo" package.
Use the arrow buttons on the left side of the file display to move files and directories up and down the list. For example, files can be moved from one directory to another using these buttons.
Adding Base Directories and Files Before adding individual files, you must specify a base directory. The base directory can be any directory that is above the desired file(s). To add a base directory, enter the name of the directory in the field at the top of the form, or click the Folder button and browse to the desired directory. Files can be added by either manually entering the name in the field at the top of the form, or by browsing for the file using the Files button. When manually entering the file name, you may use wildcards to select groups of files with similar name characteristics. You will not be able to add a file unless a base directory (that exists above the location of the file in the filesystem hierarchy) is selected in the file list. Adding Multiple Files in a Directory Use the "Files in Directory" button to select both a base directory and all the files and directories beneath it. Setting an Alias Path or File Name The alias button is used to specify an alternate name and / or location for a file. This corresponds to TclApp's -alias command-line switch. It can be used in conjunction with the TclApp -relativeto and -anchor switches to configure the destination filesystem. Including or Excluding Files or Directories Use the Toggle Incl/Excl button to exclude files or directories from the TclApp application without removing from the package definition. Using Placeholders for Portability By default, only absolute paths can be specified as the base directory. This reduces the portability of package definition files, as absolute paths are dependent on the configuration of the system where the package definition file was created. By replacing absolute paths with "placeholders", package definition files can be used on systems that do not necessarily share the same configuration. For example, the image above shows the use of the @TCL_LIBDIR@ placeholder. When TclApp builds an application based on this package definition, it will substitute the lib directory beneath the installation directory of the Tcl Dev Kit on the system where TclApp is run. The following placeholders can be used in place of an absolute directory specification:
@TDK_INSTALLDIR@: The directory where the Tcl Dev Kit is installed on the system where TclApp is run. @TDK_LIBDIR@: The main TAP search path under which a .tap file was found. For example: If we have the TAP search paths FOO/lib and BAR/lib, then @TDK_LIBDIR@ is set to FOO/lib for a tap file named FOO/lib/sub/sub.tap, and set to BAR/lib for a file named BAR/lib/pkg/pkg.tap @TAP_DIR@: The directory where the package definition file is located on the system where TclApp is run.
7
To substitute a placeholder for an absolute path, click on the desired folder in the list, then click Edit and enter the desired placeholder.
Deploy
Deliver your Tcl programs as executables, starkits or starpacks. Tamper-proof your applications, and protect your code from prying eyes. Run and manage your Tcl code as Windows services. Create, manage, export and use TEApot package repositories.
Fix
Kill bugs fast with the cross-platform graphical debugger. Quickly find errors before running your scripts. Uncover tricky problems by inspecting Tcl programs while they run.
Improve
Improve code performance and reliability through coverage and hotspot analysis. Understand complex code at a glance with a visual guide to component relationships.
* TclApp cross-platform wrapping targeting Solaris, HP-UX and AIX may require an ActiveState Business Edition license.
Licensing
Licenses are user-based, so a single license covers you across all the languages, platforms, and systems you useat home, at work, or at the coffee shop. And licenses include all point release updates (such as from Tcl Dev Kit 5.0 to 5.1, 5.2 etc), so you're always up to date. Nice, huh? Read the license agreement for details.
Pricing
TDK starts at $295 US for all the languages, platforms, and systems you use. Licenses include all point release updates (such as from TDK 5.1 to TDK 5.2). TDK team pricing: Save 20% on licenses when you buy a 5-pack.
9
Upgrade to TDK 5
Upgrades from TDK 4.x start at $168 US Upgrade to ActiveTcl Pro Studio o ActiveTcl Pro Studio includes TDK, Komodo IDE, and Safari Books Online, plus all upgrades for one year, in a single value-priced bundle. With current TDK or Komodo IDE: starting at $268 US As a new purchase: $595 US
Please email [email protected] for a custom quote if you require 30 or more subscriptions.
Additional Resources
Download the Tcl Dev Kit Datasheet Read the Tcl Dev Kit Documentation "The quality of ActiveState's Tcl Dev Kit really shows. It has a really intuitive user interface." Joe Mistachkin, Principal Software Engineer, TclBridge. Read more testimonials.
10