This document describes how to set up and use the Windows version of NTK to make packages for use with NSM.


Follow the instructions on this page:

Starting NTK

When you start NTK, it will open the last project you worked on. If there was no project open when it was last closed, or you are opening it for the first time, it will ask you to open a project. If you are going to create a new project, just cancel the dialog box.

Creating a new project

First, choose "New Project..." from the Project menu. You will be asked to provide a filename for the project file. The name will also be used for the package file produced by the project. For example, a project file called something.ntk will produce a package called something.pkg. Once you have chosen a name, an empty project window will open.

Now, choose "Settings..." from the Project menu.

On the Package tab, give your package a unique name. NSM does not currently make use of it, but it might in the future.

On the Project tab:

On the Output tab, choose "Auto Part".

You can start writing the actual code now. Choose "New Text File" from the File menu. A text window, by default called Text1, will open for you to write code in. A NSM package must contain at least an InstallScript, 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:

InstallScript := func(partFrame, removeFrame)
Write("Hello world!\n");

To add the text file to the project, choose "Add Text1" from the Project menu. You will be asked to provide a name for it. It is best not to use the same name as for the project, because you will then be unable to export the whole project to text, if you ever wish to do that for whatever reason.


To compile, choose "Build Package" from the Project menu or press Ctrl+1. A package will be produced in the directory of the project file with the same name as the project file.

If nothing happens, you might have forgotten to add your source code file[s] to the project. Use the Project menu to do so.

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