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 it's settings.

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

The "true" return will mean the successfull configure, and Editor will continue it's loading. Otherwise, Editor will cancel the loading of this config pack, and will return back to the config pack selecting dialog.

Editor will call it at start-up in a condition when main.ini file will don't contain the "application-path-configured" field set with "true" at the "[main]" section. So, to mark the configuration package as configured and stop Editor to call this function, you need to set the field at main.ini:

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: