Quill Notes: Cross-Platform Builds

For Quill 0.2.0 I made Quill a standalone executable (i.e., a starpack) instead of a starkit, so that it would be independent of the Tcl shell being used by the developer. However, I want to deliver Quill for Windows, Linux, and OSX, and I only have an OSX machine, so I added to Quill the ability to do cross-platform builds.

And I bungled it.

The TclDevKit application “tclapp” has the ability to do cross-platform builds, i.e., to build a Windows starpack on OSX. Given a Windows basekit, it will even go out and pull in any required binary packages from teapot.activestate.com. Very nice.

Now, Quill supports building starkits and starpacks; in Quill 0.1.0, these were reflected in the project file like this:

    app mykit -apptype kit
    app mypack -apptype exe

In order to do cross-platform builds in 0.2.0, I just extended this. To build on Linux, Windows, and OSX, enter this!

    app mypack -apptype {linux windows osx}

Then, ‘kite build’ will always build the starpack for each of the listed platforms.

This is bad on several levels.

First, there’s no way to build just for the current platform. This is annoying at best; and if the current platform isn’t one of the three, it’s a real problem.

Second, there are multiple flavors of each of those operating systems, e.g, 32-bit vs. 64-bit Windows.

Here’s a better approach.

First, the “-apptype” option in the project file goes back to two values: “kit” and “exe”.

Second, the “kite build” command always builds “exe” apps for the current platform, whatever it is.

A new “kite build all” command will build everything for the current platform: run tests, format documentation, build library .zip files and executables, and build distribution .zip files.

For projects with an app with “-apptype exe”, a “dist” name can include “%platform” to include the current platform in the name of the distribution .zip file.

So, to build the distribution .zip for this platform (OSX):

   kite build all

Then to build the application and distribution .zip for a specific platform:

   kite build app -platform platform

And there we go.

WordPress Themes