Simplified cross-platform client/server application building on Windows

Automatically translated from English

The release of Silicon Macs had a great impact on the way 4D compiles applications. Before v19, 4D was compiling only for Intel architecture, using the same code on Mac and Windows. But Silicon Macs use a new architecture, and as such 4D needs to compile specifically for Silicon. It affects cross-platform client/server application building.

As long as you build your server on Mac, it’s not much of an issue, as you can compile for both Intel and Silicon platforms. But on Windows, it’s not possible to compile for Silicon Macs. Our current recommendation is to compile the project on Mac for both architectures, and then copy it on a Windows machine before building the server. Unfortunately, for big projects with a lot of data, the copy can take some time.

So we added a new functionality to reduce the number of files to transfer from your Mac to your Windows machine.

Starting with  4D v19 R3, when building an Intel/Silicon client on Mac, 4D will also generate a Compiled Database folder. This folder contains only the compiled structure of your project and is, as such, quite small.
You can just copy this folder on your Windows machine. And on Windows, when building your server, a new option will be available to select your compiled code. Check the “Allow connection of Silicon macOS clients” checkbox and give the location of the compiled structure you transferred from your Mac. And that’s it! Your server will be built using this compiled code.

If you prefer to build using the BUILD APPLICATION command, you can also include a database compiled for Intel and Silicon to your server. To do so, you need to put:
– the “/Preferences4D/BuildApp/CS/MacCompiledDatabaseToWinIncludeIt” key to true,
– the “/Preferences4D/BuildApp/CS/MacCompiledDatabaseToWin” key to the location of the compiled database folder.

We hope this will help you build faster. If you have any comments, don’t hesitate to tell us on the official 4D forum.

Nicolas Brachfogel

• Product Owner & Senior Developer •

Nicolas Brachfogel joined 4D in 2017 as a Senior Developer (4D Server and networking). As Product Owner to manage the release of Apple Silicon, he's in charge of writing user stories and translating them into functional specifications, as well as making sure that feature implementations meet customer needs.

A graduate of the Institut Supérieur d'Informatique Appliquée (INSIA), Nicolas began his career as a software developer in 2001. Following several years coding in Java and C++, he went on to specialize in client-server development for video game companies. As a server developer/architect, he successfully worked on the server architectures of many games (Dofus Arena, Drakerz, Trivial Pursuit Go!).