4D Blog

Home Product Build your Compiled Structure or Component with Build4D

Build your Compiled Structure or Component with Build4D

December 13, 2022

Product business man try to build wood block on wooden table and blur background business organization startup concept

With the introduction of the project mode, it’s pretty easy to manipulate the components of your projects.

In the last few feature releases, we have added several functionalities that allow you to create your own build chain adapted to your team, your working methods, and your needs.

For example:

  • Launch a compilation by programming,
  • Zip/unzip files and folders with these commands,
  • Easily Manage your Application’s Information,
  • Headless 4D applications to integrate it into a build tool.

 

To help you create your own build chain or integrate 4D into a continuous integration tool, we have developed a component named Build4D, available on GitHub with the sources.

For this first step, Build4D allows you to create a compiled structure and a component. We will continue to enrich it to enable you to manage a single-user application, client application, or server application.

Build4D component

What’s Continuous Integration (CI)

Continuous integration is a practice that automates a development team’s integration of code changes. The code sources are on a source control server. Each time a developer pushes his code on the repository, a syntax check, a compilation, and unit tests are automatically launched.

New component: Build4D

You can get this new component from GitHub. It is composed of three classes:

  • CompiledProject
  • Component
  • _core

 

The _core class is the base class. It contains all the necessary elementary operations, like compiling, creating the project structure, and creating a 4dz, …

Then the two classes CompiledProject and Component, are based on the _core class. They allow respectively to create of a compiled project and a component.

Compiled structure class

Here is an example of creating a compiled structure with integrated resources and documentation folders:


var
$build : cs.Build4D.CompiledProject
var $settings : Object
var $success : Boolean

$settings:=New object()
$settings.destinationFolder:="Test/"
$settings.buildName:="myProject"

$settings.includePaths:=New collection
$settings.includePaths.push(New object("source"; "Resources/"))

$build:=cs.Build4D.CompiledProject.new($settings)
$success:=$build.build()

And the result:

Finder dialog to show the structure file

Component class

Here is an example of creating a component with the integration of the documentation and the suppression of a folder “Resources/Dev” only for the development:

var $build : cs.Build4D.Component
var $settings : Object
var $success : Boolean

$settings:=New object()
$settings.destinationFolder:="Test/"
$settings.buildName:="myComponent"

$settings.includePaths:=New collection
$settings.includePaths.push(New object("source"; "Documentation/"))

$settings.deletePaths:=New collection
$settings.deletePaths.push("Resources/Dev/")

$build:=cs.Build4D.Component.new($settings)
$success:=$build.build()

Voilà!

blank

Next…

On Github, don’t forget to bookmark this component by clicking on the “star” or to follow the evolutions of this component by clicking on “watch.” You can find in this blog an overview of the exciting features of Github to see and follow the repository of 4D.

Discuss

Tags Build application, Build4D, CI/CD, Component, GitHub, v20

Latest related posts

  • April 29, 2025

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

  • April 28, 2025

    Unlock the Power of AI with 4D AIKit: Automate, Create, and Innovate

  • April 25, 2025

    Formulas in Label Wizard

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