Soluling home   Document home

Platform and Configuration Files

Many modern compilers can compile the same source to two or more platforms or use two or more configurations. The most obvious sample is a Windows application that contains both 32-bit and 64-bit versions. When you develop such a multi-platform application, you write and maintain only one set of source codes and let the compiler to compile several output files. These output files are called platform files. Each platform file has identical or almost identical logic, UI, and resources. Only the compiled code differs according to the CPU or OS type. Another situation where you get multiple output files is if you use configurations. Each configuration might have different compile options, such as debug information and conditional compiling. If you have several platforms and several configurations, you might have more than a dozen output files for one single application.

One choice would be to add each file into the Soluling project when working with multiple output files. However, this approach is not good because it causes every single string and resource items to appear multiple times in the project. A better choice is to add only one file (e.g., 32-bit release) in the project and then add the other files as platform files of that file. This approach will bring each string and resource item only once into the project and automatically apply the same settings for each output file. This means that all output files are localized in the same way as the main file without any additional work.

The following table shows what platform files each development tools supported by Soluling can handle:

Development tool Framework Platforms Notes
Visual Studio C++ Windows (32/64-bit) applications and libraries.  
Visual Studio .NET 32-bit, 64-bit and platform independent .NET assemblies.  
Delphi VCL Windows (32/64-bit) application and libraries. 64-bit is supported by Delphi XE2 or later
Delphi FireMonkey Windows (32/64-bit), macOS (32/64 bit), iOS (32/64 bit), Android (32/64 bit), and Linux (64-bit) applications and libraries. iOS is supported by Delphi XE4 or later. Android is supported by Delphi XE5 or later.

The easiest way to learn how platform files work is to go by a sample. Let's have a Delphi application. We have compiled both 32-bit and 64-bit Windows application files: Win32\Project1.exe and Win64\Project1.exe, and macOS application file: OSX\Project1. We could add any of the above files to the Soluling project. Let's choose the 32-bit Windows version. Our project contains one source: D:\Sample\Win32\Project1.exe.

Let's add the platform files. Select Platform files sheet and click Add button. Browse Win64\Project1.exe and click OK. Repeat this for OSX\Project file. Now the platform sheet should contain two platform files: 64-bit Windows and 32-bit macOS.

There is no limit to the number of platform files. You can add as many files as you want. However, keep in mind that all platform files should be the same application's compilation output with the same resources.