4D v16.3

Application page

Home

 
4D v16.3
Application page

Application page  


 

 

4D enables you to build a double-clickable application directly from your database. You just need to have 4D Volume Desktop, the 4D database engine, and an appropriate license. You prepare this operation on the Application page of the application builder.

Double-clickable (.exe) versions of your 4D compiled databases can be created directly in 4D using the “Build Stand-alone Application” function.
Under Mac OS, this function handles the creation of software packages.

The principle consists of merging a compiled structure file with 4D Volume Desktop. The functionality provided by the 4D Volume Desktop file is linked with the product offer to which you have subscribed. For more information about this point, refer to the sales documentation and to the 4D Internet site (http://www.4d.com/).

You can define a default data file or allow users to create and use their own data file (see the Data file management in final applications section).

It is possible to automate the update of merged single-user applications by means of a sequence of language commands (see Automatic updating of server or single-user applications).

To be able to build a double-clickable application, you must first designate the location of the 4D Volume Desktop folder. The button for building double-clickable applications is grayed out if no folder has been indicated in the corresponding area, or if the folder indicated does not contain a valid 4D Volume Desktop file. 

You must select the folder containing the 4D Volume Desktop file:

  • Under Windows, the folder contains the 4D Volume Desktop.4DE, 4D Volume Desktop.RSR, as well as various files and folders required for its operation. These items must be placed at the same level as the selected folder.
  • Under Mac OS, 4D Volume Desktop is provided in the form of a structured software package containing various generic files and folders.

To select the 4D Volume Desktop folder, click on the [...] button. A dialog box appears allowing you to designate the 4D Volume Desktop folder (Windows) or package (Mac OS.
Once the folder is selected, its complete pathname is displayed and, if it actually contains 4D Volume Desktop, the option for building an executable application is activated:

Note: Starting with 4D v15, the 4D Volume Desktop version number must match the 4D Developer Edition version number. For example, if you use 4D Developer v15.4, you have to select a 4D Volume Desktop v15.4.

This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available. Both have advantages and disadvantages so you should select the mode that best fits your needs.

Note: This option is only available when the Use new architecture for application deployments compatibility option is checked (see the Compatibility page section).

  • By application name (default)
    In this mode, the 4D application automatically opens the most recently opened data file that corresponds to the structure file. This flexible and intuitive mode allows you to move the application package freely on the disk. It should usually be used for merged applications, unless you specifically need to duplicate your application. 
  • By application path
    In this mode, the merged 4D application will parse the application's lastDataPath.xml file and try to open the data file with an "executablePath" attribute that matches the application's full path. If such an entry is found, its corresponding data file (defined through its "dataFilePath" attribute) is opened. Otherwise, the last opened data file is opened (default mode).
    This mode allows you to duplicate your merged applications without breaking the link to the data file. However, with this option, if the application package is moved on the disk, the user will be prompted for a data file, since the application path will no longer match the "executablePath" attribute (after a user has selected a data file, the lastDataPath.xml file is updated accordingly).

For more information about the data linking mode, refer to the Configuring the data linking mode section.

To build an executable application, click on Build

4D automatically creates a Final Application folder in the “Destination Folder” specified and puts a subfolder having the name of the specified application in it. 

If you have specified “MyAppli” in the “Application Name” area, you will find the following files in this folder:

  • Under Windows
    • MyAppli.exe which is your executable and MyAppli.RSR which contains the application resources.
    • The 4D Extensions and Resources folders, as well as various libraries (DLL) and files necessary for the operation of the application.
    • A Database folder containing more particularly the DatabaseName.4DC and DatabaseName.RSR files making up the compiled structure of the database as well as the database Resources folder.
      Note: This folder also contains the Default Data folder, if it has been defined (see Data file management in final applications).
    • (Optional) A Components and a PlugIns folder containing, respectively, any components and/or plug-in files included in the database. For more information about this, refer to the Plugins and components page.
    • A Licenses folder containing the list, in the form of an XML file, of license numbers which have been integrated into the application. For more information about this, refer to the Licenses & Certificate page.
    • Any additional items added in the 4D Volume Desktop folder (see Customizing the 4D Volume Desktop folder).
    All these items must be kept in the same folder in order for the executable to operate.
  • Under Mac OS
    • A software package named MyAppli.app containing your application and all the items necessary for its operation, including the plug-ins, components and licenses. For more information about integrating plug-ins and components, refer to the Plugins and components page. For more information about integrating licenses, refer to the Licenses & Certificate page.
    Note: Under Mac OS, the Application file command of the 4D language returns the pathname of the ApplicationName file (located in the Contents:Mac OS folder of the software package) and not that of the .comp file (Contents:Resources folder of the software package). 

The typical architecture of a double-clickable application is as follows (example under Windows):

When building a double-clickable application, 4D copies the contents of the 4D Volume Desktop folder into the Final Application subfolder of the destination folder. You are then able to customize the contents of the original 4D Volume Desktop folder according to your needs. You can, for instance:

  • Install a 4D Volume Desktop version corresponding to a specific language;
  • Add a custom PlugIns folder;
  • Customize the contents of the Resources folder.

Note: Under Mac OS, 4D Volume Desktop is provided in the form of a software package. In order to modify it, you must first display its contents (Control+click on the icon).

If your double-clickable application is used as a Web server, the files and folders required by the server must be installed in specific locations. These items are the following:

  • cert.pem and key.pem files (optional): These files are used for SSL connections and by data encryption commands,
  • default Web root folder,
  • logweb.txt file (Web requests log).

Under Windows: These items must be installed in the Final Application\MyAppli\Database subfolder.
Under Mac OS: These items must be installed next to the MyAppli.app software package.

 
PROPERTIES 

Product: 4D
Theme: Finalizing and deploying final applications

 
HISTORY 

Modified: 4D v15 R4

 
ARTICLE USAGE

4D Design Reference ( 4D v16)
4D Design Reference ( 4D v16.1)
4D Design Reference ( 4D v16.3)