11 Alexandria - Release 1

From RAD Studio
Jump to: navigation, search

Go Up to Main Page

Go Up to What Was New in Past Releases

Updated RAD Studio 11.1 Alexandria release available (March 15th, 2022).

Note:

RAD Studio 11 Alexandria - Release 1 (also known as 11.1) is available for installation. RAD 11.1 builds on the feature set of 11, enhancing existing features throughout the product and adding new capabilities. Delphi 11, C++Builder 11, and RAD Studio 11 are available to download to any active Update Subscription customer.

RAD Studio 11.1 has a strong focus on quality improvements. Key quality focus areas include:

  • IDE
  • Remote Desktop
  • Delphi and C++ Compilers
  • C++ Toolchain
  • Delphi LSP
  • C++ LSP
  • Delphi RTL
  • VCL
  • FireMonkey
  • Data
  • Internet

Key Enhancements by product area in 11.1

IDE Enhancements

General IDE Improvements

  • The “Start working” operation after the installation is completed effectively restarts the IDE, so that the first execution will be done with user permissions, instead of elevated permissions.
  • ‘Enable runtime themes’ is now turned on in the Base configuration of a project.
  • The ProjectRoot in a dproj/cbproj file should always sort consistently.
  • The IDE Wait dialog’s ToolsAPI interface has had some parameters renamed to better reflect their functionality
  • The ‘New Edit Window’ menu item is now disabled when a view does not support cloning. This includes the Welcome Page, which can’t be duplicated or dragged out to another window.
  • The Options > Saving and Desktop page has been split into two new pages:
    • Saving and Recovering (contains auto-recover and auto-save options)
    • Desktop and Layout (contains the remainder of the options.)
  • You can now change the colors used for errors, warnings and hints in the Messages view in the Options dialog. You can set different colors for each IDE theme, i.e. set different colors for light and dark or other themes.

Build log.png

  • We added Styling support to some minor dialogs used by the IDE, such as asking the user to confirm or warn about overwriting files, checking for Unicode project names, and using an invalid codepage.
  • The issue where a project file might have an inconsistent sort order in the deployed files, meaning it will change without its meaningful content changing is fixed.
  • The default C++ console app has been improved, and creating a console app is now a fast shortcut on the File > New (and Create New) menus for both C++ and Delphi.
  • A small number of items from the IDE Fix Pack have been integrated.
    • The IDE toolbars such as editing toolbars.
    • Missing scrollbars in the Options dialog pages.
    • Object Inspector rendering glitches.
    • The IDE and code editor went blank when debugging.
    • Special keys (such as Windows key) in the FMX form designer text input.
    • The list mode in the Projects view.
    • A variety of exceptions and many more.
  • The New Items dialog shows platforms for all items.

Compile dialog.png

  • The New dialog where you can add items to your project hides items based on the project’s active platform.
  • The New dialog also supports multiple view styles, rather than just a vertical list (card, list, icons, and small icons.)
  • The New Items dialog now uses the TControlList VCL control, which improves scrolling.
  • The Compile dialog shows the platform and builds configuration and prioritizes Errors before Warnings and Hints.

New items.png

IDE High DPI quality

  • Data modules now save the PixelsPerInch property when its value is 96, the default. This is also the case for VCL forms.
  • Dynamically created frames are now scaling correctly when designed in high DPI.

Welcome Page

  • The Welcome Page now supports background images. Selecting an image will scale it to fit the Welcome Page area. The aspect ratio is preserved, meaning the left/right or top/bottom sides of the image may be offscreen so long as the other axis fits the Welcome Page size.
  • There is a new page in the IDE Options dialog for Welcome Page settings, including the background (which can be set per theme) and closing it when opening a project. You can also access this page from the Layout Editor.
  • Welcome Page frames are now transparent by default. The wallpaper you set will be partially transparent through them. The transparency amount is one of the Welcome Page metrics available in the ToolsAPI.
  • Spacing between frames and the upper and lower edges of the Welcome Page has been very slightly tweaked.

ToolsAPI support!

The Welcome Page now has full support for creating Welcome Page frames using the ToolsAPI! Our own frames use the same API, meaning that anything our frames can do, yours also can.

We provide two Welcome Page demos showing simple and advanced usage, which are available on our public Github.

In its simplest form, you can create a TFrame descendant and display it with a caption. That frame can contain anything you want. However, we have more complex functionality that you can also make use of:

  • Frame captions can contain custom UI chrome (implemented via a second frame), as you can see for some of ours, such as the Open Recent frame (buttons) and Create frame (toggling between Delphi and C++)
  • Our frames use a MVC pattern, and load data in a background thread. You can use our own implementation, including using the same frame and list views that ours are built with. This means you can get the same behavior and look and feel without mimicking our setup, including in future if changes are made to the default layout, sizes, etc.

GetIt Dialog Improvements

  • The GetIt dialog box has been redesigned, maintaining a similar UI, but adopting a ControlList component for the list of packages. This has a noticeable effect on performance
  • RAD Studio now caches the package icons in GetIt, reducing the time for re-opening the dialog
  • There is a new option to ignore patches in GetIt, so you can skip the installation of a patch but stop the notification of the pending patch.

Compilers and Toolchains Improvements

Both Delphi and C++

ASLR, DEP/NX, and TSAWARE

In both Delphi and C++, the Windows linkers now offer better support for platform security configurations: For Delphi:

  • These features were already available as compiler/linker flags:
    • {$DYNAMICBASE} for ASLR
    • {$SetPEOptFlags $40} for DEP/NX or the matching ‑‑peflags option

For C++:

  • Use the -GE: linker option to turn these flags on or off:
 **-GE:option|0xNNNN[=on|off] Set DLL characteristics flags
     ALLOWBIND | ALLOWISOLATION | DYNAMICBASE | HIGHENTROPYVA
     NXCOMPAT | TSAWARE
HIGHENTROPYVA is ASLR; NXCOMPAT is DEP/NX; and TSAWARE is for Terminal Server.

For both Delphi and C++:

  • Enabling these settings is now the default
  • We build redistributable binaries (like package BPL files) with the security configurations enabled

Delphi Debugger for macOS ARM and Android

We have a new debugger when running macOS applications on an Apple ARM device. This debugger is not used if you are using an Intel machine.

This new debugger is a recent build of LLDB, and its key technology is a Delphi parser that understands a subset of Delphi syntax. (For example, it understands Delphi expressions, though you cannot define a new class. It should understand enough Delphi for all debugger expressions you need to use.) This syntax should be truly Delphi-like: case-insensitive, and able to evaluate complex expressions in Delphi syntax.

We have also enabled this debugger for Android 64-bit. This debugger is much less likely to cause ‘disconnected’ errors or freezes.

C++ Compiler and toolchain

  • The default constructor for UnicodeString is now no longer inline, which should help if you do not want to step into the constructor when debugging and invoking a function that returns a string.
  • AnsiStringT has the System:: namespace prefix
  • Many intrinsics headers (xmmintrin.h, etc.) should now be available
  • The C++ RTL has a breaking change this release, meaning that C++ libraries must be rebuilt in 11.1 (i.e., don’t link against object files or .lib-s built with 11.) This change relates to handling handles correctly for Win64. Some internal RTL structures were not widened in the past, resulting in possible handle truncation; they are now wide enough.
  • More intrinsics (e.g. SSE-AVX) are now shipped with our RTL.
  • System::DynamicArray contains some STL members for iteration, such as begin().
  • Several String functions that were in helpers in Delphi are now available from C++.
  • The IDE had an issue where the linking paths meant that the linker would find the classic debug libraries (if provided) before the clang release binaries. This means that if you delivered debug builds of your component or library and supported both compilers, then your customers would end up linking against the version from the wrong compilers. It has now been resolved.
  • A wide variety of compiler bugs in the debugger (especially Win64) and debug info have been improved; using a TDS file in release mode; tweaks to locale, and many other RTL and STL areas; lots of improvements to import libraries; fixes to coff2omf for the generated OMF libraries, etc.

LSP Improvements (Delphi and C++)

Delphi LSP

  • DelphiLSP has a significant focus on quality and speed, and 11.1 brings some considerable performance improvements.
  • The key change is that the new higher performance work applies to all project types including packages.
  • Exception info is displayed again in Help Insight.
  • Line number information is now available in HelpInsight for arrays and sets
  • Pressing Ctrl-Shift-Down inside an inactive macro/ifdef jumped to the implementation of the next method declared
  • Ctrl-click navigation now works with aliased generic types. For example, if IntArray is a TArray<Integer>, control-clicking on IntArray will take you to the location with the TArray<Integer> type declaration, not to the location of TArray<> in System.pas.
  • An issue where ctrl-shift-up/down navigation did not work correctly when there were include directives in the unit has been fixed
  • Error Insight did not work when the project was using files that were located on a different drive to the project
  • Normal projects will now load much faster. The technique we use to load a project has been significantly changed with much less parsed, and DelphiLSP should finish loading a project and respond to requests much more quickly.
  • Error Insight results will now update much more quickly. You can expect a 5 to 30x speed increase here as well. The most dramatic improvement is seen for units with many dependencies (lots of other units used.)

Other improvements include:

  • Better handling of macros (defines) so that toggling between the implementation and declaration of a method works better when there are IFDEFs, as will code completion in class declarations.
  • Macros (defines) will also be found if they are declared in an included file, affecting the above.
  • When declaring a property, code completion will suggest getters and setters.
  • Code completion will show set types.
  • Type parameters will be shown in code completion in a class declaration, including generic types (e.g., T) in a generic declaration.
  • Parameter tooltips/help can be shown when instantiating generic types.
  • Code completion showed some TObject-specific completions, like AfterConstruction, when completing inside a record declaration; this has been resolved.

C++ and cquery

Cpp options.png

In the new LSP Behavior tab, we have two options that control how the cquery LSP server indexes files, which is how it stores the info it uses to fulfill code completion, navigation, etc. Restart server each time a project is activated and Index only files that are opened in the editor.

Note: Indexing can be very CPU intensive and you usually cannot use Code Insight until it’s complete. Note that restarting the server, such as when platforms are changed, also clears the index.

Other improvements include:

  • Code completion items are displayed in the order that cquery returns them, which is scope order, unless you turn on Alpha Sort (off by default.)
  • Indexing should be on by default in the Project Options for all C++ projects.
  • You can now code complete in header files that are not directly part of the project (e.g., not part of a cpp/header unit pair.)
  • Changing project options or the active platform will restart the server to match the new project settings.
  • The server now knows when a file has been saved and will update correctly. This is important for new files, because in this build Code Insight won’t function until the file exists on disk.

Other C++ features:

  • The IDE waits correctly until the server is ready.
  • You can code complete in a project’s main source file.

Performance Improvements

  • Code completion displays in two seconds or less, no matter the size of the project. Note that when invoking code completion in the global scope with a VCL project, there are over eighty thousand items returned.

Libraries Improvements

To help sharing code among projects build with FMX and VCL, we added framework specific predefined symbols:

  • FRAMEWORK_VCL - this predefined variable is set to true if the project uses the VCL framework
  • FRAMEWORK_FMX - this predefined variable is set to true if the project uses the FireMonkey (FMX) framework

Delphi RTL

Optimization Work

  • In terms of Delphi RTL we did some work in terms of performance optimization.
  • We also included improvements to _CopyArray, _IntToStr64, _IntToStr32, InitInstance, InvokeRecordInitializer, _FinalizeRecord, _UStrAsg (including purepascal version), _LStrAsg, _LStrLAsg, AnsiLowerCase / AnsiUpperCase, and TStringHelper.IndexOf.

New TURLStream class

  • There is a new stream class, TURLStream, and a general base class: TAsyncStream is a new base class for async streams, inherited from TMemoryStream; TURLStream is an async stream supporting URL paths, inherited from TAsyncStream.
  • TAsyncStream.Create starts APopulate in the background thread. Until it is finished, any TStream methods call on TAsyncStream will be blocked. An application can:
    • Use IAsyncResult to wait/check TAsyncStream population completion. TAsyncStream supports IAsyncResult.
    • Provide AProvide anonymous method, which is called when the population is finished.
  • TURLStream constructor extends the base class constructor, and it is declared as follows:

constructor TURLStream.Create(const AURL: string;

 const AProvide: TAsyncStream.TStreamer;
 ASynchronizeProvide, AFreeOnCompletion: Boolean);
  • TURLStream inherits the behavior of the TAsyncStream base class, but internally it uses THttpClient or TFileStream, depending on the URL schema.
  • TAsyncStream defines the following public methods: Destroy, AfterConstruction, Read, Write, Seek, SetSize(Int64), SetSize(Longint), SaveToStream.
  • TURLStream defines the following public methods: Destroy, RegisterSyncReqExexcutor, UnRegisterSyncReqExecutor.

Additional RTL Improvements

  • Support for Windows 11 and Server 2022 in the TOSVersion data structure
  • TURI.ToString takes the port into consideration
  • TMetaFile can now load from a large stream

TMemIniFile and duplicate sections

  • TIniFile was modified to offer better compatibility with the pre-10.3 behavior in case of duplicated sections.

VCL

We primarily addressed issues related to recent features, like enhanced TTreeView, TRichEdit, TEdgeBrowser, and TNumberBox.

FireMonkey

Improved Android SDK integration

  • We removed dependencies to the android.bat file tool in favor of advmanager and updated the IDe SDK Manager dialog for the Android platform.
  • The DEX compilation and DEX merging are now deferred after the C++/Delphi linking, making compilation without deployment faster.
  • For the Android platform core integration, we added support for Delphi classes that implement Java interfaces with method overloads. This helps address an issue with Android 12 and sensor access (fixing the SensorInfo demo).
  • Delphi classes that implement Java interfaces can now have functions that return Int8, Int16, Int64, Float32 and Float64 values.

TWebBrowser

  • Improvements to TWebBrowser on Windows (with WebView 2 support), including the ability to change the Windows Engine more than once. The default value of the WindowsEngine property has been changed.
  • The team also addressed resizing and transparency issues with the control. There is also improved WebBrowser ability to work with local files on mobile.

Additional FMX Quality

  • Addressed several Windows HighDPI-related issues.
  • Improved performance of TMessageManager.Unsubscribe.
  • Added Undo to TMemo context menu and addressed the issues with automatic content scrolling.
  • Emoji color improvements for both Android and iOS.
  • Improvements of the Metal GPU driver support on the macOS platform.

Data

General

  • We made the Field Link Designer pane and New Field Dialog larger and more usable.
  • In order to support Firebird 4.0 long field names (up to 63 characters), the 31-char limit in the field name in the database RTL has been removed.

FireDAC

  • Implemented Structure View support for FireDAC. Also, some of the FireDAC windows offer better High DPI support.
  • Added support for MariaDB 10.6 server with a 10.6 client
  • Added support for SQLite SEE, offering a command line Batch to build SQLite OBJs with C++Builder for FireDAC static binding. The readme file sqlite_see.txt explains the process (this feature was already available for RAD Studio 11 via a GetIt plugin).
  • FireDAC improves Firebird 4.0 driver by providing support for additional data types:
    • INT128
    • NUMERIC with precision 19..38
    • TIME WITH TIME ZONE, TIMESTAMP WITH TIME ZONE (limited)
    • DECFLOAT(16/34)
  • FireDAC adds support for FireBird 4.0 native statement timeout.
  • FireDAC adds support for FireBird 4.0 pagesize 32768.
Note: Firebird 4.0 client may need some ICU files if you want to work with datatypes like TIMESTAMP WITH TIME ZONE and TIME WITH TIME ZONE. For further information click here.
Warning: Firebird 4.0 requires installing Microsoft Runtime ++ 2017 with the same bitness as the FBCLIENT.DLL file.

Internet

WebBroker on Android

  • The WebBroker server applications can now be deployed on an Android device or a developer board (like a RaspBerry Pi running the Android OS). Both on Android 32-bit and 64-bit.

DataSnap

  • We extended the Web.Win.ISAPIThreadPool to allow more than 64 threads. The NumberOfThreads variable type has been changed to Cardinal. The ShutdownTimeout variable (a timeout in milliseconds, which thread pool will wait to finalize all worker threads) has a default value of 2 minutes.

RAD Server

  • Some database structure improvements and provided new matching REST SysAdmin endpoints:
    • GET /sysadmin/log - returns info about LOG table content.
    • POST /sysadmin/log?minTime=<ISO8601 date> - deletes all records from LOG table older than specified date/time.
    • DELETE /sysadmin/log - deletes all records from the LOG table.
    • GET /sysadmin/backup?backupFile=<file path> - creates a specified backup file of emsserver.ib database. The backup file will be on the InterBase server.
    • POST /sysadmin/backup?backupFile=<file path> - restores the emsserver.ib database from the specified backup file. The backup file will be on the InterBase server.
    • GET /sysadmin/validate - performs emsserver.ib database validation and returns the database status.
  • Allow RAD Server users to log in from more than one session simultaneously
  • New deployment feature for RSLite
    • Option in EMS.INI to pick a specific Interbase client library (for embedded or regular DB), with the ClientLib entry in the Data section.
    • There is now a ready-to-use deployment feature for RSLite

Others

  • Added an option to select a client-side certificate in the REST Debugger.
  • The REST Debugger is now DPI-aware.
  • The TCustomRESTRequest class has a new BodyCodePage property, which specifies the request body code page. Some special values are:
    • -1 (the default value) - use the platform default encoding
    • 0 - current active code page
    • 65001 - UTF8.
  • Support switching the region in AmazonAPI

See Also