Configure.js (Config pack)

configure.js - is a special JavaScript-coded module for an integrational configuration package which contains a script to initialize the configuration package and change its settings.

Specification
The configure script should contain the "onConfigure" call that returns a boolean value:

The "true" return will indicate successful configuration, causing the Editor to continue loading. Otherwise, config pack loading is stopped and will instead lead back to the config pack selecting dialog.

The Editor will call it at start-up in a condition when the main.ini file does not contain the "application-path-configured" field set with "true" at its "[main]" section. So if you wish to mark the configuration package as configured and tell the Editor to stop calling this function, you need to set the field at main.ini to something such as:

PGE
Common calls.

FileIO
File I/O API.

INI
INI file read and write API.

INIFile
INIFile is a class that holds the opened INI file and allows to change it.

Example script
A very simple example:

This is a big example of a configure script example that was taken from the SMBX Integration configuration package to illustrate the work of the script: