Quick Review: Delphi 10.2 Tokyo Preview


Delphi 10.2 Tokyo (Godzilla) is still months away (expected in 2017), however, I am lucky to get the preview build and have some fun with it.

Delphi Tokyo Target Platforms

Delphi Tokyo Supports 64-bit Native Linux Code. We are interested in 32-bit Windows, 64-bit Windows and 64-bit Linux. It is nice to use the same code base and compile directly into 3 types of binaries.

delphi-tokyo-target-platforms-includes-64-bit-linux Quick Review: Delphi 10.2 Tokyo Preview delphi linux review

delphi-tokyo-target-platforms-includes-64-bit-linux

Delphi Linux PAServer (Debugging and Deployment)

We need to set up a PAServer in order to debug and deploy the 64-bit Linux code. Basically the PAServer is an application that runs on the Linux (and other platforms as well, e.g. MacOsX)

delphi-linux-pa-server Quick Review: Delphi 10.2 Tokyo Preview delphi linux review

delphi-linux-pa-server

After the first time set up the PAServer, as long as you don’t debug or deploy target code in the remote server, you can just compile the source code on Windows into target 64-bit Linux binaries.

delphi-compiles-to-64-bit-linux-server-code-directly Quick Review: Delphi 10.2 Tokyo Preview delphi linux review

delphi-compiles-to-64-bit-linux-server-code-directly

Delphi for Linux Project Type

Currently, only Console Application and DLL are supported for 64-bit Linux Server:

console-application-and-dll Quick Review: Delphi 10.2 Tokyo Preview delphi linux review

console-application-and-dll

If you choose other types of Project, the 64-bit Linux won’t be available as a targeting platform. 64-bit Linux isn’t available if you pick C++ Builder (only available for Delphi language)
Please also note that, the COM DLL is an exception and you can’t build 64-bit Linux DLL based on a COM project i.e. Opening existing Windows COM Project and there is no option to add the 64-bit Linux as the target platform.

Delphi for Linux Doesn’t Support

  • It doesn’t support VCL (Visual Component Library) which is the best Win32 Library that wraps Win32 API and COM.
  • Windows Unit (which certainly makes sense).
  • Data Types of WideString, PAnsiChar, AnsiChar, ShortString are not supported.

Delphi Tokyo DataType Size (64-bit)

64-bit Windows and 64-bit Linux have identical data-type sizes. So the same codebase will be compiled into two different OS and behave exactly the same. Note that, the string is unicode and Char is 2-byte.

delphi-tokyo-data-type-sizes-64-bit Quick Review: Delphi 10.2 Tokyo Preview delphi linux review

delphi-tokyo-data-type-sizes-64-bit

Delphi Tokyo Linux System Units

You can use:

  • System.Types
  • System.SysConst
  • System.TimeSpan
  • System.Diagnostics
  • System.SyncObjs
  • System.VarUtils
  • System.Rtti
  • System.TypInfo
  • System.Math
  • System.Classes
  • System.Threading
  • System.RTLConsts
  • System.Character
  • System.Variants
  • System.SysUtils

Existing Library may not compile

OTL is a powerful Open Source Multithreading library for Delphi, which is better than the shipped/inbuilt version of Delphi. However, OTL (64bit Windows and Linux) is not compatible/compiled under Delphi 10.2 Tokyo.

Many other libraries (existing Delphi code) may have trouble compiling, if they use any windows code: Windows Unit (Win32 API), Win32/Win64 Assembly Code (e.g. FastMM4 Memory Manager).

Related Delphi for Linux 64-bit Posts

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
897 words
Last Post: Why and When should you do a Profiling on Your Application?
Next Post: Integer Performance Comparisons of Delphi Win32, Win64 and Linux64 for Single/Multithreading Counting Prime Number

The Permanent URL is: Quick Review: Delphi 10.2 Tokyo Preview

Leave a Reply