This document describes how to set up and use tntk to make packages for use with NSM.

Installation

You will have to compile tntk yourself. Get the source code and instructions from: http://github.com/ekoeppen/tntk/

Creating a new project

First, we need to create a project file. This is simply a text file listing all the parts in the package, its name, and the platform file used (which is not needed for NSM packages). Here is the simplest project file possible:

{
parts: [{main: "name of part source file here", files: [], type: 'auto}]
name: "unique package name here (not a filename)",
}

Replace the obvious placeholders with their correct values. The part source code file is the file we are going to create next. It, too, is a text file. For NSM, it must contain at least a devInstallScript, which is run when the package is installed (in NSM, this is each time it is loaded). As an example, we are going to use this:

{
devInstallScript:
func(partFrame, removeFrame)
begin
Write("Hello world!\n");
end,
}

You can also add a devRemoveScript, which only takes a removeFrame as a parameter and is called when the package is removed. See the NSM manual for more information on RemoveScripts.

Compiling

From the command line, execute tntk with the parameters -c project, where project is your project file.

Regardless of the operating system, you should see some status messages, and if you did everything correctly, a package will be created.

You can then use NSM to run the package. See the NSM manual for instructions.