Skip to content

02 How to install

PlayeRom edited this page Dec 7, 2025 · 2 revisions

First, you need to create a skeleton of your add-on, for example, based on Skeleton. Then, create a subdirectory, such as framework, in the root directory and copy the Framework's contents into it. The simplest file structure should be as follows:

your-addon/
|── framework/    (the entire framework project)
|   |── nasal/    (Nasal framework files that will be used)
|   |── addon-main.nas   (framework main file - not used in your add-on, but serves as a template)
|   |── addon-menubar-items.xml    (this file will not be used)
|   |── addon-metadata.xml         (this file will not be used)
|   └── etc...
|── nasal/    (your additional Nasal files)
|── addon-main.nas    (main file of your add-on - it's the one being used)
|── addon-menubar-items.xml
└── addon-metadata.xml

It's recommended using Git and its subtree for this purpose, which will allow you to automatically update the Framework. Assuming your add-on also uses Git, to do this, run:

git subtree add --prefix=framework git@github.com:PlayeRom/flightgear-addon-framework.git v1.2.1 --squash

Change v1.2.1 to the version you want to download.

This will automatically create a /framework subdirectory in your directory with all the files.

Then, to update the Framework, for example, for the version v2.0.0, simply run:

git subtree pull --prefix=framework git@github.com:PlayeRom/flightgear-addon-framework.git v2.0.0 --squash -m "Update framework to v2.0.0"

The directory does not have to be called framework, you can use any other name, but it cannot be nasal and you can't create more nested directories.

Alternatively, you can also download Canvas Skeleton, which already includes this Framework and sample canvas dialogs with an example Widget.

Clone this wiki locally