[ Home | Main Table Of Contents | Table Of Contents | Keyword Index ]

# cmdr-installation(n) 1.2 doc "Cmdr, a framework for command line parsing and dispatch"

## Name

cmdr-installation - Cmdr - The Installer's Guide

## Table Of Contents

## Description

Welcome to the Cmdr project, written by Andreas Kupries.

For availability please read Cmdr - How To Get The Sources.

The audience of this document are anyone wishing to build the Cmdr project, for either themselves, or others.

If you are a developer intending to extend or modify the project please see the list of Related Documents for references to more information on this topic.

Please read Cmdr - How To Get The Sources first, if that was not done already. Here we assume that the sources are already available in a directory of your choice.

## Requisites

### Tcl

This project requires a working installation of Tcl 8.5, or higher.

Use whatever you are comfortable with, as long as it provides Tcl 8.5, or higher.

An easy way to get a proper installation of a recent Tcl 8.5, (which I recommend) is to download and install ActiveState's ActiveTcl 8.5 for your platform. Just follow the link and instruction on that site.

After the installation of ActiveTcl 8.5 simply run the command

        teacup update

This will install a lot more packages than found in the distribution alone. (Disclosure: I, Andreas Kupries, work for ActiveState, maintaining ActiveTcl and TclDevKit).

Do you wish to build Tcl on your own ? The sources of all versions can be found at

Tcl

  http://core.tcl.tk/tcl/

### TclOO

The framework uses the TclOO package in its implementation. This package requires Tcl 8.5 or higher.

In Tcl 8.6 the package is part of the core itself, without requiring a separate installation.

For Tcl 8.5 it has to be installed separately.

Out of the many possibilites for getting TclOO (OS vendor, os-independent vendor, building from sources) use whatever you are comfortable with.

For myself, I am most comfortable with using ActiveState's ActiveTcl distribution and TEApot.

See the previous section (Tcl) for disclosure and information on how to get it.

Assuming that ActiveTcl got installed running the command

        teacup install TclOO

will install the package for your platform, if you have not done the more inclusive

        teacup update

to get everything and the kitchensink.

For those wishing to build and install TclOO on their own, the relevant sources can be found at http://core.tcl.tk/tcloo together with the necessary instructions on how to build it.

If there are problems with building, installing, or using TclOO and its packages please file a bug against TclOO, or the vendor of your distribution, and not cmdr.

### Tcllib

The framework requires ten packages found in Tcllib. These are

1. debug

2. debug::caller

3. json::write

4. lambda

5. oo::util

6. string::token::shell

7. struct::queue

8. term::ansi::code::ctrl

9. textutil::adjust

10. try

Out of the many possibilites for getting Tcllib (OS vendor, os-independent vendor, building from sources) use whatever you are comfortable with.

For myself, I am most comfortable with using ActiveState's ActiveTcl distribution and TEApot.

See the previous section (Tcl) for disclosure and information on how to get it.

Assuming that ActiveTcl got installed running the commands

        teacup install debug
        teacup install debug::caller
        teacup install json::write
        teacup install lambda
        teacup install oo::util
        teacup install string::token::shell
        teacup install struct::queue
        teacup install term::ansi::code::ctrl
        teacup install textutil::adjust
        teacup install try

will install them for your platform, if you have not done the more inclusive

        teacup update

to get everything and the kitchensink.

For those wishing to build and install Tcllib on their own, the relevant sources can be found at http://core.tcl.tk/tcllib together with the necessary instructions on how to build it.

If there are problems with building, installing, or using Tcllib and its packages please file a bug against Tcllib, or the vendor of your distribution, and not cmdr.

### Linenoise

The framework uses the linenoise package in its implementation. This package requires Tcl 8.5 or higher.

Out of the many possibilites for getting Linenoise (OS vendor, os-independent vendor, building from sources) use whatever you are comfortable with.

For myself, I am most comfortable with using ActiveState's ActiveTcl distribution and TEApot.

See the previous section (Tcl) for disclosure and information on how to get it.

Assuming that ActiveTcl got installed running the command

        teacup install linenoise

will install the package for your platform, if you have not done the more inclusive

        teacup update

to get everything and the kitchensink.

For those wishing to build and install Linenoise on their own, the relevant sources can be found at http://github.com/andreas-kupries/tcl-linenoise together with the necessary instructions on how to build it.

If there are problems with building, installing, or using linenoise please file a bug against Linenoise, or the vendor of your distribution, and not cmdr.

### Kettle

This project uses the Kettle application and package as its build system.

Please go to either the main repository at http://core.tcl.tk/akupries/kettle or the backup at http://chiselapp.com/andreas_kupries/repositories/Kettle and follow the instructions given at these sites to create a working installation. They are not repeated here. If there are problems with these instructions please file a bug against the Kettle project, and not Cmdr.

## Build & Installation

Cmdr uses the Kettle application and package to handle building and installation. It is assumed to be installed and working. Please see section Kettle in Requisites for more information.

Note that all access to Kettle is mediated by the "build.tcl" script, found in the top-level directory of the project.

For the most basic installation of Cmdr run

    % /path/to/cmdr/build.tcl install

This command uses the kettle application found in the , and the associated tclsh.

The command builds all packages and applications of Cmdr, and then installs them so that the associated tclsh has access to them. Any applications will become siblings of tclsh.

For more control about which version of kettle and/or tclsh gets used run either

    % /path/to/kettle /path/to/cmdr/build.tcl install

or even

    % /path/to/tclsh /path/to/kettle /path/to/cmdr/build.tcl install

to specify the exact files to use.

On Windows it is possible to invoke the the file "build.tcl" with a double-click. This will start a graphical interface to the system, with buttons for all the possible actions, which includes 'install'ation.

On unix the same GUI is acessible by invoking "build.tcl" with the arguments gui, i.e. as

    % /path/to/cmdr/build.tcl gui

To get help about the methods of "build.tcl", and their complete syntax, simply invoke "build.tcl" like

    % /path/to/cmdr/build.tcl gui

## Related Documents

1. Cmdr - Introduction to the project

2. Cmdr - License

3. Cmdr - Log of Changes

4. Cmdr - How To Get The Sources

5. Cmdr - The Installer's Guide

6. Cmdr - The Developer's Guide

## Bugs, Ideas, Feedback

Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at Cmdr Tickets.

Please also report any ideas you may have for enhancements of either package(s) and/or documentation.

## Keywords

arguments, command hierarchy, command line completion, command line handling, command tree, editing command line, help for command line, hierarchy of commands, interactive command shell, optional arguments, options, parameters, processing command line, tree of commands

## Copyright

Copyright © 2013-2016 Andreas Kupries
Copyright © 2013-2016 Documentation, Andreas Kupries