From: Florent R. <f.r...@fr...> - 2018-02-10 21:22:04
|
Hi, In order to make the add-on API nicer, I made changes (FlightGear commit da961b97f[1] and FGData commit c17d9377f[2]) that require add-on maintainers to perform the following renamings in their add-on directory: config.xml -> addon-config.xml main.nas -> addon-main.nas I believe this was the last chance to make the add-on API clean in this respect without annoying too many people. The idea is that all files comprising the interface between FG core and add-ons now start with 'addon-' (like the existing addon-metadata.xml) so that when you browse an add-on directory, you can easily tell which files belong to the “FG core <-> add-on” interface and which files belong to the add-on proper. This will also be beneficial when more files are added to the “FG core <-> add-on” interface, such as possibly addon-events.xml in the future. To summarize the incompatible changes to the add-on API between FlightGear 2017.4 and the upcoming 2018.2 release: - addon-metadata.xml in the add-on directory is now required; - config.xml must be renamed to addon-config.xml (and may be absent if you don't need its functionality); - main.nas must be renamed to addon-main.nas; - the main() function from addon-main.nas is now passed the add-on ghost (an addons.Addon instance) instead of a path to the add-on base directory (in order to get the same path, just use addon.basePath where 'addon' is the first parameter of your main() function, i.e., the add-on ghost). For more info on all these points, see $FG_ROOT/Docs/README.add-ons[3]. I've adapted all add-ons present in FGAddon, so only those maintained elsewhere need the two renamings. Regards [1] https://sourceforge.net/p/flightgear/flightgear/ci/da961b97f22925887742bffc19d7b03871e89b49/ [2] https://sourceforge.net/p/flightgear/fgdata/ci/c17d9377f8da51e9ad57dfecb5a3f25f29782d5c/ [3] https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Docs/README.add-ons -- Florent |