12 Athens - Release 2
Go Up to Main Page
Go Up to What Was New in Past Releases
Updated RAD Studio 12.2 Athens release available (September 12th, 2024).
- See what is included in version 12 Athens
- See what is included in version 12 Athens - Release 1
- See what is included in version 12 Athens - Release 3
RAD Studio 12 Athens - Release 2 (12.2) is available for installation. RAD Studio 12.2 focuses on completing the features in RAD Studio 12 and 12.1, enhancing existing features throughout the product and adding new capabilities.
RAD Studio 12.2 strongly focuses on quality improvements, but it includes some significant enhancements in the C++ toolchain and the IDE. Key features and quality focus areas include:
- C++ Clang Toolchain
- Delphi 64-bit Binary Compilers
- IDE
- Visual Assist
- Smart CodeInsight
- ToolsAPI
- Debugger
- RAD Studio WebStencils
- Libraries
Contents
Key Enhancements by Product Area in 12.2
The following sections show key 12.2 improvements by area.
C++ Clang Toolchain
RAD Studio version 12.2 strongly focuses on improving the new Win64 Clang toolchain. Including the new creation of C++ Packages and major updates to the linker settings.
Dynamic Packages
Starting RAD Studio version 12.2, C++ Windows 64-bit Modern applications can link to dynamic packages. Packages consumed by C++ can be created by both Delphi and C++.
Users can create a new C++ Package project (or open an existing one), add the Windows 64-bit Modern platform to it, and enable the Link with runtime packages option.
See the technical notes and more information on our following documentation pages:
- Packages for C++ Toolchain
- Working with Packages and Components.
- Unit Initialization and Finalization
Static vs. Dynamic RTL Linking
By default, the new toolchain uses dynamic linking, while Borland, CodeGear, and Embarcadero defaulted to static linking. When building any normal C++Builder project, you will see the expected defaults for static vs. dynamic linking. Version 12.2 also ensures that RAD Studio maintains compatibility with the MinGW defaults.
See Using LLD on the Command Line to understand the default behavior.
CPU-saturating multicore builds
Starting version 12.2, CPU-saturating multicore builds with --jobs
support for Windows 64-bit Modern. This enables incredibly fast compilation. It is approximately 40% faster than the old version based on parallel processes.
In C++Builder 12.2, we have the following new behaviors:
- The batch compilation is
on
by default. - Support
--jobs
from within the IDE and MSBuild.
This means that by default, users get parallel compilation when compiling a Windows 64-bit Modern app either from the IDE or via a CI system using MSBuild for the project. The default setting is to use all your cores.
Linker Settings
RAD Studio 12.2 updates the available settings for BCC64X. It is still possible to pass other settings via the command-line settings option, but the new settings are included in the in-UI in the IDE.
As part of the new linker settings update, the following ilink settings are now hidden for the new Win64 platform: Incremental linking, displaying link time, fast TLS, clearing the state before linking, and case-sensitive linking.
The linker supports multiple flags for optimizing file size via linking in or out sections, file and object alignment, DEP and ASLR, stack and heap size, and verbose linking.
The flag Delay Load DLLS allows a list of DLLs to delay-load and it maps to --delayload=..
.
Read our documentation on Linker Settings to learn more.
Notable Improvements
- Windows 64-bit Modern is now the default platform for new VCL, FMX, DLL, package, static library, and console projects.
- The Compile to assembly and Preprocess options work from the IDE for this toolchain.
- Packages have been changed to Win32 as the default platform, not Win64X, because their most common use case is for components and in-IDE installation.
- Win64X supports the Terminal Server flag, and the Win64X debugger now shows packages in the Modules list when they are loaded.
- BCC64x configuration files can use rooted paths prefixed with
@
. - DLLs can use the traditional DLL entry point (DLLMain) and link directly against a DLL. There is no need to create an import library. For more, see Creating DLL Import Libraries
- Library path searching works. Now, users can use:
bcc64x -LC:\MyLibs File1.lib File2.lib
.
Delphi 64-bit Compilers
RAD Studio version 12.2 Enterprise and Architect versions include 64-bit versions of the Delphi compilers. The new feature is referred to as 64-bit tools architecture. Using 64-bit tools allows users to have a larger memory space available to the compiler and, therefore, the ability to compile larger applications without running into memory issues.
The following are the new 64-bit tools:
- Delphi Windows 32-bit target compiler
- Delphi Windows 64-bit target compiler
Using the external MSBuild to compile, in the Delphi compiler configuration in the RAD Studio IDE Project Options dialog box, specify the version of the tools (including the command line compilers) to use in the “Preferred tool architecture” field.
Find the Delphi Windows command line compilers, dcc32.exe
and dcc64.exe
, in the RAD Studio installation bin64 folder (C:\Program Files (x86)\Embarcadero\Studio\23.0\bin64
by default), the. Similar executables still exist in the product bin folder, the command line compiler 32-bit versions.
DelphiLSP 64-bit
RAD Studio version 12.2 Enterprise and Architect versions include a 64-bit version of the DelphiLSP engine. To enable the 64-bit version of the server, go to Tools > Options > Editor > Language and click on the Code Insight tab. Choose Delphi from the dropdown list and select the checkbox “Use the 64-bit version of the server.”
IDE Improvements
The following are the IDE improvements separated by sections.
Focus Mode
RAD Studio 12.2 introduces Focus Mode for distraction-free coding. When first displayed, it hides all IDE UI except a single, centered code editor (though you can add multiple side by side) and you can even turn off extra UI inside the editor. The editor shows the filename at the top, has buttons to close, and split left and right. It also allows having many tabs and multiple editors visible.
Learn the ways to invoke Focus Mode and more on our documentation page.
Editor Scrollbar Annotations
The code editor scrollbar now displays the following information:
- Error Insight and compile errors
- Search results
- Bookmarks
- Changed lines
This allows you to quickly spot where in your document various elements may need attention or that you may be looking for.
The example above displays annotations as horizontal lines on the scrollbar, avoiding any overlaps. See more in Tools > Options > Scroll Bar.
Editor UI
The editor line numbers can now be drawn to the left side of the editor Gutter. This means the possibly more important UI, like breakpoint dots, can be drawn closer to the code.
Editor scrollbars can also be drawn using editor colors. That is, their color can be changed to match the editor's color scheme, not the IDE color scheme. Find the new setting at Options > Editor > Scroll Bar > Apply editor theme colors to the scroll bar.
Highlighting Changes in Call Stack and Other Windows
The following areas that display code also use syntax highlighting:
- Call Stack
- Local Variables
- Structure
- Anywhere a method declaration is seen outside the editor, such as the code completion window or dropdowns at the top of the editor.
HighDPI Quality: Toolbars and Designer
RAD Studio 12.2 release includes significant improvements on key issues in the HighDPI IDE.
- Designing frames and scaling: VCL frames, placed in other frames (nested), scale correctly in the HighDPI designer.
- Toolbars and main menu: The IDE toolbars and menu, which had odd behaviour in previous versions changing DPI scale, should function much better this release, both in terms of adjusting size and in drawing behaviour
Delphi LSP Improvements
The DelphiLSP engine has been significantly improved, particularly regarding hints and navigation, mainly on the interface portion of a unit. Some of these new improvements include:
- Symbol Hints: Hints work on most symbols in the class interface, including fields.
- Local Constants and Variables: Hovering over local constants and variables can now resolve their definitions.
- Forwarded Type Declarations: The engine now resolves forwarded type declarations in some cases.
This release also resolved issues in units with multiline strings where the internal code manager (PASMGR) was not supported by this feature.
Additional IDE Improvements
The following are IDE quality improvements for RAD Studio release 12.2:
- The installer’s Fonts package now adds Intel One Mono. This font is intended for accessibility and is intended to be clearer for those with visual impairments.
- For Split Editor, now the docked tool panels to the side remain the same size when resizing horizontally. Also, there are new shortcuts to split editors.
- Error Insight in the Structure pane now shows international characters correctly.
- The crash collector dialog now links to the new Quality Portal.
Visual Assist
RAD Studio 12.2 release introduces three new features for VA, improving the C++ toolchain. The new version includes Parser and Find References performance improvements.
This release updated the Visual Assist DLL to match the version used in Assist version 2024.6. This includes all performance improvements made to date in 2024, both for the initial parse time and for features like Find References, Rename Refactoring, and more. This is often an 8-10x speed improvement for the initial parse and up to 4x speed improvement for other features.
Release 12.2 includes the following features:
- Extract Method: Moves a segment of code into a separate method and replaces the segment with a call to the extracted method. It is possible to extract multiple lines or a segment of one.
- Introduce Variable: Defines a temporary variable in the innermost scope of the selection, initializes it with the replaced code, if any, and replaces one or multiple occurrences of the expression with the temporary variable.
- Create From Usage: Allows the developer to type the name of an undefined symbol and introduce it without leaving the current position. This top-down development style works for many targets, including enums, variables, functions, methods, header files, and more.
RAD Studio Smart CodeInsight
RAD Studio 12.2 introduces the new IDE integration for LLMs called Smart CodeInsight. This is RAD Studio’s first entry into the space, providing initial support, which RAD Studio plans to expand in the future.
AI support is off by default and needs to be manually enabled, plus configured, to be used.
Smart CodeInsight is RAD Studio’s AI support open architecture with a new ToolsAPI allowing you to write plugins for specific AI vendors, and to use AI from within the IDE. In this release, RAD Studio includes:
- Core AI engine and ToolsAPI
- IDE integration with:
- An AI chat window
- Editor menu commands to invoke AI operations
- Configuration options for the engines
- Ready to use support for the following LLMs
- OpenAI (online)
- Gemini by Google (online)
- Claude by Anthropic (online)
- Ollama by Meta (offline)
- Personal AI Plugins
RAD Studio offers customizable UI integration besides allowing you to add additional AI engines.
Privacy Control
RAD Studio gives you extended configuration and full privacy control in multiple ways:
- If you trust LLMs, you can turn on the entire AI feature with a single global setting. The feature is off by default.
- Each engine can be enabled or disabled.
- Pick which engine is used by default by the different UI elements (chat and editor menu).
- API keys are stored in an encrypted format.
- Includes the option to use a local, offline engine.
Smart CodeInsight Configuration
The Smart CodeInsight feature can be configured in the Tools Options dialog under the Editor> AIEngine entry. To dive into this topic, please refer to the Smart CodeInsight Options page.
Smart CodeInsight UI Elements
The IDE surfaces the AI tools in two different ways:
- General-purpose chat window: in which you type a custom prompt.
- Editor menus: allow you to invoke specific operations on the currently selected source code.
For more information, please refer to the Smart CodeInsight UI Elements page.
ToolsAPI
AI and Smart CodeInsight
The Smart CodeInsight (AI) support in the IDE in 12.2 provides a set of in-IDE services, such as a chat window or translating languages. Its main two functions are the following:
- Allowing any AI to be a backend. RAD Studio provides four implementations (OpenAI, Claude, Gemini, and Ollama), but users can add their own.
- Writing plugins that use the user’s configured AI solution. Users can set up their preferred AI vendor, and any future plugin installed can use that AI.
Using the AI Services
Learn how to Create and implement your AI plugin or to Implement an AI backend or get started with one of our demos:
- AI Engine Demo
C:\Users\Public\Documents\Embarcadero\Studio\23.0\Samples\Object Pascal\ToolsAPI\AIEngine Demos\CohereAI_Plugin
- UI Demo
C:\Users\Public\Documents\Embarcadero\Studio\23.0\Samples\Object Pascal\ToolsAPI\AIEngine Demos\AI_Consumer_CodeSample
ToolsAPI: Focus Mode
Focus Mode is implemented to only show the code editor. To make other views available, you can implement GetDisplayInFocusMode.
Editor Scrollbar Annotations
Now, you can add your own scrollbar annotations. These usually draw like ours (horizontal line markers), but you can also draw anything you want, including custom symbols. Your registered scrollbar annotations will be visible in the Scrollbar page of the Options dialog, just like ours.
Learn how to implement them in our ToolsAPI.Editor documentation.
Editor ToolsAPI Improvements
The following API issues inside ToolsAPI.Editor were fixed:
- The line highlight editor state is now accurate when highlighting the current line is on vs. off.
- The cell state now correctly reflects whether the cell has errors, warnings, or hints and if it is disabled (ifdef-ed out).
- The paint context parameter now includes the cell size, which was added to the new INTACodeEditorPaintContext290.CellSize property.
- The line state now correctly reflects whether a line was elided or not.
Debugger
This release focused on solving some key debugger issues.
Delphi Inline Variables
RAD Studio version 12.2 upgrades the debugger to correctly handle repeated inline variables with the same name.
See more information in our Inline Variables page.
Error Handling
This release updates the debugger error handling to show when LLDB crashes. This shows a new ‘Debugger fatal error: debug kernel crashed’
error. In this situation, the debugged process will be terminated.
Previously, a ‘Debug kernel not responding’
message was shown. This can still be shown, but RAD Studio has better handling to differentiate the debugger not responding (possibly taking a long time to process) and a crash.
Windows 64-bit Modern Debugger
The Win64 C++ Modern toolchain has formatters for the following types:
Delphi | C++ |
---|---|
|
The Win64X debugger now shows packages in the Modules list when they are loaded.
Other Debugger Improvements
The following are improvements and fixes done in RAD Studio release 12.2:
- Updated PAServer to a new version.
- When building C++ (all platforms), you can now define
NO_ALWAYS_INLINE
when building. Turning this on or off helps avoid stepping into system code, such as the C++ string implementation. - Debug on 64-bit RAD Server packages is now available.
- Symbols are now correctly loaded when using Attach to Process on a Win64 (Delphi) application using packages.
- The
‘Debug kernel not responding’
dialog has extended its timeout to 30 seconds. - Debugging the IDE on a VM, such as Parallels ARM, correctly debugs the IDE and packages.
- The order of ThreadCreated and ThreadExited notifications are now fully consistent and delivered in the order they occurred.
- Backslashes in the Run > Parameters dialog are working correctly.
- Painting issues in Local Variables and other windows have been resolved.
WebStencils
RAD Studio 12.2 introduces WebStencils, a server-side script-based integration and processing of HTML files to the WebBroker and RAD Server technologies. Allowing the development of modern, professional-looking websites based on any JavaScript library, powered by the data extracted and processed by a RAD Studio server-side application. This feature is also called a template engine, and the specific implementation resembles ASP.NET Razor processing.
WebStencils aims to help adopt Web technologies (WebBroker, DataSnap, RAD Server) by providing server-side scripting. This means the ability to create HTML pages with standard tools and adopt any CSS and JavaScript libraries while retaining the ability to add data from the generated pages coming from the application, like the result of a database query.
Aiming to help with navigational websites, such as: blogs, online catalogs, online ordering systems, a reference like a dictionary, and a wiki. WebStencils can be a good foundation for HTMX as a solution for web development. The two technologies pair nicely together. HTMX pages can benefit from server-side code generation and hook into REST servers regarding content updates. Delphi web technologies can offer page generation and REST APIs at a very high quality level.
Historically, the WebBroker and DataSnap libraries used the PageProducer component and derived ones to customize the HTML returned by a web server application. This is very limited and needs to be a clean way to have a shared template for the website pages.
Also, the tag-based notation (<#custom attrib="value">
) is not very easy to use.
The previous tag will become @custom.value
. The scripting engine's goals are to have a minimum of data access, loops, conditional statements, and a way to merge a template with a given page.
While WebStencils's overall architecture is focused on web development and generating HTML, the template engine can be used in a variety of other scenarios, for example, when exporting data files in formats like XML, JSON, YAML, and others, when producing text and documents merging a base skeleton with data; and when processing data in general.
For a full guide on using this feature, see our WebStencils documentation page.
Libraries Improvements
The following section details improvements made to the different RAD Studio libraries.
RAD Server Improvements
The EMS.Services unit now includes an IEMSApiDocumentService interface, which allows metadata customization in the generated swagger doc files. This metadata includes Title, Version, and Description, and it can be used as follows:
initialization
var LDocSvc: IEMSApiDocumentService;
if TEMSServices.TryGetService<IEMSApiDocumentService>(LDocSvc) then
LDocSvc.SetMetadata('My API', 'ver 1.2.3', 'My public API description');
The EMS.Services unit also includes filtering the API being documented via Swagger, with the interfaces IEMSApiDocumentFilter and IEMSApiDocumentService. For example:
{ TMyDocFilter }
type
TMyDocFilter = class(TInterfacedObject, IEMSApiDocumentFilter)
protected
function Apply(const AContext: TEndpointContext; const AResource: TEMSResource;
const AAPIDocPath: TAPIDocPath): Boolean;
end;
function TMyDocFilter.Apply(const AContext: TEndpointContext;
const AResource: TEMSResource; const AAPIDocPath: TAPIDocPath): Boolean;
begin
Result := AAPIDocPath.Path.StartsWith('/public');
end;
var
LInd: Integer;
initialization
var LDocSvc: IEMSApiDocumentService;
if TEMSServices.TryGetService<IEMSApiDocumentService>(LDocSvc) then
LDocSvc.AddFilter(TMyDocFilter.Create as IEMSApiDocumentFilter);
finalization
var LDocSvc: IEMSApiDocumentService;
if TEMSServices.TryGetService<IEMSApiDocumentService>(LDocSvc) then
LDocSvc.RemoveFilter(LInd);
The following are the quality improvements in RAD Studio 12.2 release:
- Added two extra events to the TEMSDatasetResource component, BeforeRequest and AfterRequest. Now, you can access the request before it is processed automatically by the component itself and access the response right before sending it to the client.
- Reworked RAD Server Push Notifications (including Firebase APNS) by adding the required support for HTTP/2.
- Extended RAD Server Swagger support to the YAML format.
- Updated APIDocAttributes demo to show the use of multiline string literals.
- RAD Server can auto-generate Swagger YAML or JSON documentation for the available APIs.
- Enabled Swagger documentation for RAD Server with Multi-tenancy.
- X-Embarcadero-Session-Token property is now available in SwaggerDocs.
RTL Improvements
The following are the quality improvements in RAD Studio 12.2 release:
- A new TParallelArray class was added to the System.Threading unit, with methods
&For
andSort
, to enable running some operations in parallel on Array items and speed them up considerably on multicore computers. - Added a new TOrderedDictionary class, derived from TDictionary<K,V>, in the System.Generics.Collections unit. An Ordered Dictionary preserves the order of the items added to the dictionary.
- Improved RFC822 dates support in the System.DateUtils.
- SQLTimeStampOffsetToDateTime now uses TZ info and returns local time.
- The TDirectory.CreateDirectory method from the System.IOUtils unit now raises an exception if the folder cannot be created.
- Extended the TRegistry class with improved rdMultiString support and the new methods ReadNone and WriteNone. These methods are temporarily defined in a helper class; see below:
TRegistryHelper = class helper for TRegistry
public
function ReadNone(const Name: string): Boolean;
procedure WriteNone(const Name: string);
end;
VCL Improvements
The following are the quality improvements in RAD Studio 12.2 release:
- RAD Studio 12.2 reworked the UI used by the FormsTabBar control to represent tabs associated with a hidden child window. Now, if the form is hidden, the normal state uses a standard look (regular tab UI), while the Hot state uses a tab shape drawn with alpha transparency, while the text, icon, and close button inside have a look as in the normal state.
- Resolved issues related to frame scaling on HighDPI monitors at runtime and design time.
FMX Improvements
The following are the quality improvements in RAD Studio 12.2 release:
- Updated the integrated version of Skia for Delphi to version 6.2.0.
- Improved Resource Brush support: This kind of brush is added for all canvas implementation on all platforms.
- The standard Windows Clipboard Formats were added by default with the same name as Windows consts, like
CF_BITMAP
orCF_DIBj
. - FireMonkey now offers light/dark theme detection as a Platform Service for Windows (using IFMXSystemAppearanceService).
- New option to automatically resize the TGridPanelLayout columns and rows using a percentage.
- The targetSdkVersion of the Android manifest file can now be configured in the Project Options dialog, Version Info section.
iOS and macOS Linker Updates
RAD Studio version 12.2 updated the linker for the Apple platforms. This allows, in particular, the ability to link against iOS and macOS libraries built with XCode 14. An example is the Firebase iOS SDK (11.0).
Android Tooling Improvements
To give users more control over the packaging of 'Dex'
and 'native library'
files and avoid discrepancies regarding the application behavior during the development and distribution cycles, RAD Studio 12.2 added the Compress Dex files and Compress native library files options to the Project > Options> Application > Packaging page.
Enabling the Compress Dex files and Compress native library files options means that every generated '.apk'
file contains non-zip aligned and compressed 'Dex'
and 'native library'
files.
Leaving the Compress Dex files and Compress native library files options disabled has a more complex meaning, as the platform support for uncompressed 'Dex'
and 'native library'
files is tied to API levels.
The following are the quality improvements in RAD Studio 12.2 release:
- Updated the build system to perform Android resource operations incrementally. RAD Studio’s build system relies on the
rclasser
command-line application to generate anR.jar
file containing allR
Java classes needed for imported Android libraries to access Android resources the identifier. - Added support for importing Android libraries (
.aar
files). - The targetSdkVersion of the Android manifest file can now be configured in the Project Options dialog, Version Info section:
The following are the quality improvements in RAD Studio 12.2 release:
- HTTP Headers size can now exceed the 4K size for ISAPI modules.
- Addressed a significant issue with the ThingPoint technology and Edge Modules in RAD Server.
- The TOAuth2Authenticator component now has a new OnNeedClientCertificate event handler, like the TRestConnection. This allows the user to use a client certificate and authenticate via OAuth2.
- FireDAC adds support for the Firebird 4 database
'OFFSET'
keyword.