4D v13.4

Application builder

Home

 
4D v13.4
Application builder

Application builder  


 

 

Application building is carried out using the Build Application window. To display this window, select the Build Application... command in the Design menu of 4D.

Building can only be carried out once the database is compiled. If you select this command without having previously compiled the database, or if the compiled code does not correspond to the interpreted code, a warning dialog box appears indicating that the database must be (re)compiled.

The application building window includes several pages that can be accessed using tabs: 

You can simultaneously set different “target” parameters (single-user and client-server) for the application; each must be explicitly selected using a check box. 

The Build button builds the applications corresponding to all selected targets. When you click this button, 4D displays a progress bar indicating the different phases being executed. The new parameters, if valid, will be saved in the application project (see ). 

The Save settings button lets you record the parameters set without launching the application build.

If you click on Cancel or if an error occurs, the files being generated are deleted and a warning dialog box informs you of the cause of the interruption.

The upper part of the application building window allows you to set the name and location of the files to be generated. 

The Application Name area contains, by default, the name of the database structure file. This name will be used for the generated files (compiled database, component, double-clickable application and client-server application). 4D will automatically add the necessary suffixes (.4dc, .exe, server...) according to the type of application built.
When you keep the default name, the name of the application reflects any modification made to the database structure file name. If you modify the name of the application, the new name is used by default for each new build of the current database. The entered name must therefore NOT have an extension. In addition, it must not contain any characters forbidden by the operating system (such as “.?!” under Windows, “:” under Mac OS, etc.).

The Destination Folder area is used to indicate the location where the generated items will be placed. By default, 4D uses a folder named “StructureName_Build” placed next to the folder (or package under Mac OS) of the database selected.
To modify the destination folder, click on the selection button [...] located to the right of the display area. A folder selection dialog box appears enabling you to indicate the new destination folder. Once this dialog box is validated, the complete pathname of the folder is displayed. The new location will be used by default for each subsequent build of the current database.

At the time of building, 4D will automatically create one or more intermediary folders (entitled “Compiled Database,” “Components,” “Final Application,” “Client Application” or “Server Application” according to the type of build requested) in the specified location. This avoids the risk of accidentally deleting files with the same name and enables several types of builds to be performed simultaneously.

Each parameter of this window is stored as an XML key in the application project file named “BuildApp.XML” that is placed in the BuildApp subfolder of the database Preferences folder. 

Default parameters are used the first time the dialog box is used. The contents of the project file are updated, if necessary, when you click Build or Save settings

You can define several other XML projects for the same database and employ them using the BUILD APPLICATION command.

Note that XML keys provide additional options besides those displayed in the Build Application dialog box, more particularly:

  • Setting an IP address or the port number of the server,
  • Setting an range of compatible version numbers between the client application and the server application (for example, client applications 1.1 to 1.3 can connect to server application 1.3),
  • Setting a pathname for the data file, which can be used for building applications that are immediately operational, without it being necessary to designate a data file on the user machine.

The description of these keys are detailed in a separate documentation called 4D XML Keys BuildApplication.

The first time an application is built, 4D generates a log file in two formats: XML and HTML. These files are named “ProjectName.log.xml” and “ProjectName.log.html” (ProjectName is the name of the application project, i.e. BuildApp by default) and are placed next to the application project file, in the BuildApp subfolder of the database Preferences folder. A pair of log files is generated for each application project.

The contents of both these files are identical, only their format differs. Each time an application is built, both files are updated with the same information. With the HTML file, errors and warnings are displayed graphically.

The log file stores the following information for each build:

  • The start and end of building of targets,
  • The name and full access path of the files generated,
  • The date and time of the build,
  • Any errors that occurred.

 
PROPERTIES 

Product: 4D
Theme: Finalizing and deploying final applications