Skip to content

Project settings for FB4D

Christoph Schneider edited this page Oct 23, 2024 · 13 revisions

Compiler Conditionals

There are two compiler conditionals that shall be added into the project settings in the section Building/Delphi Compiler in the row _Conditional defines":

  • $(FrameworkType): Because Delphi has no predefined compiler conditionals to distinguish between the Firemonkey and the VCL framework add the symbol $(FrameworkType) into the conditional defines list of the project settings. This enables the differentiation of the framework within the FB4D library.
  • TOKENJWT: When using the optional authentication token analysis for inspecting the token header and claims add the optional define TOKENJWT to the project settings. It requires while run time the OpenSSL library DLL beside of the executable and for compile-time the sources of the JOSE sublibrary. Currently, JOSE is not ready for mobile platforms. If this conditional is not set, the functions TokenJWT, ClaimFieldNames and ClaimField of the interface IFirebaseUser are not available!
  • MARKDOWN2HTML: When want to use the ResultAsHTML method from the IGeminiAIResponse interface, you must include the optional define MARKDOWN2HTML in the list of conditional defines of your project settings.

After you have changed these project settings, you will need to clean up and rebuild your project to ensure that the new compilation conditions are used correctly.

Search Paths for Submodules

In case the TOKENJWT compiler conditional is enabled integrate the JOSE-JWT library by adding the following two search paths to your project:

  • submodules\delphi-jose-jwt\Source\Common
  • submodules\delphi-jose-jwt\Source\JOSE

In case the MARKDOWN2HTML compiler conditional is enabled integrate the markdown3html library by adding the following search path to your project:

  • submodules\delphi-markdown\source

Prevent Compiler Warnings

Since the project offers some constructors in several variants, the following warning appears after starting with a new project:

E1029 Duplicate constructor XXX with identical parameters will be inaccessible from C++ disable

It is recommended to change Duplicate constructor/desctructor with identical parameters will be inacessible from C++ to false in the Building/Delphi Compiler/Hints and Warnings section of the project settings.

It is recommended to make all these changes once on the top level for target: All Configuration - All platforms .

Warning when adding the FB4D source files to your project

In a new project, you can either add the FB4D source directory to the project path or add all source files in this directory to the project.

With the second approach, you may see the following message, as Delphi does not currently take the set conditionals into account by importing existing units. Simply ignore the following message.

image

Clone this wiki locally