4D Blog

Home Product Easily Manage your Application’s Information

Easily Manage your Application’s Information

April 27, 2021

Product

To build your application, you use the BUILD APPLICATION command with a set of XML keys that allow you to configure the built application. For most of you, this option is enough for application building. However, we want to make sure we meet your specific needs too, so we’ll simplify the BUILD APPLICATION command by splitting it. This will allow for more flexibility while creating applications.

After the build process, it’s possible to add information such as company, copyright, or version for the application. In future releases, we will continue to enhance that to give you full control over compile, build (which is in fact just copying files together) and signing the result. Setting copyright info is just the first step.

Starting with 4D v19, you can read, add or modify them on Windows or macOS platform. Here’s how to do it:

Windows application

The application’s information is contained in the executable file. You can define the following:

  • InternalName
  • ProductName
  • ProductVersion
  • LegalCopyright
  • CompanyName
  • FileDescription
  • FileVersion
  • OriginalFilename

 

That information is then displayed in the 4D Properties window:

We have added two new functions to the File class to allow reading and writing application information.

  • To add the information, pass an object with the attributes you want to set to the setAppInfo function:

var $exeFile : 4D.File
var $info : Object
$exeFile:= File("...executable path...")
$info:=New object
$info.LegalCopyright:="Copyright My App 2021"
$info.ProductVersion:="1.0.0"
$info.InternalName:="My App"
$exeFile.setAppInfo($info)

  • To read the information, simply use getAppInfo, and you get all the attributes in one object:

var $exeFile : 4D.File
var $info : Object
$exeFile:= File("...executable path...")  
$info:=$exeFile.getAppInfo()

Since the functions that allow manipulating information about an executable file use the Windows API, you can only use them on Windows.

macOS application

On macOS, the application’s information is contained in a specific file named info.plist:

  • CFBundleName and CFBundleDisplayName
  • CFBundleShortVersionString and CFBundleVersion
  • CFBundleIconFile
  • etc.

For more details on the possible keys, we recommend reading Apple’s documentation.

 

This example adds some keys to an existing file:

var $plistFile : 4D.File
var $info : Object
$pListFile:= File("...info.plist path...")
$info:=New object
$info.CFBundleDisplayName:="My Application"
$info.CFBundleName:="myApp"
$info.CFBundleIconFile:="myapp.icns"
$pListFile.setAppInfo($info)

Of course, we have also added a “getAppInfo” method, similar to the one in the Windows example.

var $exeFile : 4D.File
var $info : Object
$exeFile:= File("...info.plist path...")  
$info:=$exeFile.getAppInfo()

More features are coming to ease your developers’ life. Stick around for more updates.

Discuss

Tags Build application, CI/CD, v19

Latest related posts

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

  • April 29, 2025

    Discover your AI-powered writing assistant in 4D Write Pro

Vanessa Talbot
Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy