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.