This tutorial will demonstrate how to use the program interface definition framework to create a XUL application frountend to a command line program.
We assume you understood the basis of the program interface definition framework and read one of the tutorial to build a command line program.
To run the generated XUL application, the target system needs a XUL interpreter.
In any case, the binary have to be located in one of the path specified by the PATH environment variable.
Firefox have to be installed in the /Applications folder.
Even if Firefox can be used as a XUL interpreter, the application will not run perfectly well:
The application behavior and the main window UI can be changed at runtime using Javascript.
At start, the application loads a specific Javascript file and look for a onInitialize() function. This entry point can be used to tweak the standard look & feel of the generated frontend by replacing, removing or adding elements.
${NSXML_PATH}/ns/sh/build-xulapp.sh shell -s ${xshFilePath} -o ${outputFolder}
${NSXML_PATH}/ns/sh/build-xulapp.sh python -p ${pythonScriptPath} -x ${xmlOptionDescriptions}
${NSXML_PATH}/ns/sh/build-xulapp.sh cmd -c ${commandName} -x ${xmlOptionDescriptions}
The build-xulapp documentation for more details and options.
Execute the script file located at the root of the application folder generated in step 3. It's name depends of the <name /> node value in the XML program description file.
Open the application bundle generated in step 3