You are here

Building Coccinella Executables

Coccinella, like most other Tcl/Tk based applications, is deployed using tclkits and starpacks. There is a very good tutorial describing all this. In short, a starpack is a Tcl/Tk application wrapped up together with a complete Tcl/Tk runtime into a single executable file. At the core there is only one command:

sdx wrap coccinella.exe -runtime tclkit-win32.upx.exe

This line is at the core of the build script, see below. Execute this only if you are not using the build script. See the tutorial for how sdx works.

You can build for any platform on any platform. That is, for instance, I build both linux-x86 and Windows versions on my Mac. You just need to have the proper tclkits to wrap up with. I recommend you use either a unix/linux or a mac system for building. Although it is possible to build on Windows, I have no experience with that.

Important:
Tclkit 8.5.x or later is required.

That said there are essentially two ways to build:

Using ActiveState

This method I've never tried myself, but Marion Bates has written
a detailed page of how to do it. I think there is a time limited trial download.

Using Build Script

I use a simple script on my Mac that builds the Windows and Linux versions. You can use this script for the Mac version as well, but I prefer to use Apples native way of doing this using application bundles, see below.

There are three things you need to download to start with:

This assumes that you have an ActiveState Tcl/Tk installation or something compatible. This distro may include a sdx program, I don't know.

Next you need to get Coccinella's source code from either one of two places:

And then there is, of course, my build script. You need to edit it at the indicated places to suit your directory setup. Note that Coccinella has a separate Subversion directory for tools which also contain build tools.

Then do:

  1. Put the tclkits in a directory, perhaps with sub directories indicating version numbers since the kit names lack version information. As an example:
    tclkits/8.4.1/tclkit-coci.upx.exe
    TclKits/8.4.11/tclkit-linux-x86.upx.bin
  2. From your console, change directory so that you are in the same directory as Coccinella's source code coccinella/
  3. Put the build script BuildCoccinella.tcl there also. May need to chmod u+x BuildCoccinella.tcl
  4. Edit the build script where indicated ( @@@ Edit ) so the paths point at your downloaded tclkits for each platform.
  5. Run script as tclsh BuildCoccinella.tcl
  6. It takes a minute or so and status info is printed to the console.
    After that you get a build/ directory with source distros and binary distros for Windows and Linux. You need to cleanup manually.

Mac OS X

On Mac I use Apples native packaging as an application bundle. Either take the latest released Coccinella, open the application bundle by control clicking, replace the coccinella folder with your own.

Application Bundle

You can also get any other later TkAqua. Pick the self contained one (TclTkAquaStandalone). You need to copy the Info.plist file, the icon and the PkgInfo file from the original released Coccinella. Replace also the Contents/lib folder with the one in the Coccinella bundle since you do not need all of them. You can also get more detailed info from

(broken URL).

Other Platforms

The Subversion and the source distros are complete for Linux-x86, Windows, and Mac OS X, in the sense that no extra packages need to be obtained.
If you build for any other platform you need to obtain and build the
following packages:

Some more fixes are probably needed. Just contact me so we can sort out this.

Custom Builds

The simplest way to make custom builds is just to replace parts of the
sources with your own. Typically icons in the images/ directory. My build script has some support for custom builds. You need to edit the script to suit your needs. I have a test example. Just place it in the same directory as coccinella and edit the build script.

The custom build procedure is a bit out of date and will probably be revised, so beware!