Log In    |    Knowledge Base    |    4D Home
Tech Tip: Programmatically build an application
Published On: April 7, 2005

Compatible with 4D 2004.x

4D 2004 introduces programmatic support when building a compiled and/or merged application. The application generation preferences are now stored as XML. The XML file contains all the parameters used to generate an application. Most parameters can be seen in the Build Application dialog box. For more information about the XML options, please refer to the 4th Dimension XML Keys BuildApplication available here:

By default, the BuildApp.xml file is stored in the preferences folder adjacent to the structure file (Preferences -> BuildApp).

Using the new command, BUILD APPLICATION, 4D will automatically parse the XML file and run the application building process accordingly. If you do not pass the optional projectName parameter, the command displays a standard open file dialog box, so that you can designate a project file. When the dialog box has been validated, the system variable Document contains the full pathname of the open project file. Otherwise, 4D will use the preferences stored at the designated path of projectName.

If the database has not yet been compiled or if the compiled code is outdated, the command will first launch the compiler process. In this case, the compiler window does not appear (unless an error occurs); only a progress bar is displayed.

For more information about the command, please refer to the documentation: