Delphi Linux support for DWS

Issue #219 new
Alex Bespalov created an issue

https://bitbucket.org/Vizit0r/dwscript-for-pulling-to-main-repo/commits/af4bf3ba3d44e5bebd3fcb1cb9f9444ec54909c6

Initial commit for Linux support for Delphi.Notes:

  1. dwsXPlatform.pas - look my comments on line 42
  2. found no any usage of FileMemoryMapReadOnly in sources. NOWHERE! But anyway, made if multiplatform, using MMF access code from my main application source. If its needed no longer - maybe better to remove it?
  3. dwsRTTIConnector.pas - "Windows" removed from uses, no usage.
  4. no any tests for FPC.

for other platforms, like MacOS - will check&update in few weeks later.

Comments (2)

  1. Eric Grange repo owner

    For Posix.Syslog it’s part of FreePascal. I do not have access to a Delphi compiler that targets Linux, so most of the work in progress towards Linux support was actually for FreePascal. This will change when/if embarcadero makes a version available in community edition.

    Memory mapped files are not used just yet in pushed code, they are used in experimental code for now. The GetFileSizeEx was meant to be a lightweight way to both check for existence and size, which FileExists + TFileStream isn't (a lot of the code in dwsXPlatform actually is there to avoid using TFileStream in the first place).

    To run the tests under Lazarus you can just convert/open the dpr. I have not run them in years TBH, so they will likely fail horribly. The FreePascal/Lazarus work stalled on a lack of support for UnicodeString Variants in FPC, and FPC using utf-8 in their RTL rather than utf-16, which leads to a lot of corner case issues.

    So right now Linux support is stuck between FPC incompatibility and Delphi compiler unavailability.

  2. Alex Bespalov reporter

    For Posix.Syslog it’s part of FreePascal

    its so strange - by compilation defines in dwsXPlatform.pas it will be linked ONLY in Delphi, not in FPC.

    This will change when/if embarcadero makes a version available in community edition.

    “if” is much more correct word. If i remember correctly, Emba many times tell about multiplatform available only in non-free editions.

    https://bitbucket.org/Vizit0r/dwscript-for-pulling-to-main-repo/commits/cfca9481a884b0916301d26ab8a278d02a515cd5

    commit with some changes according to this.

    So right now Linux support is stuck between FPC incompatibility and Delphi compiler unavailability.

    But i dont touch anything in FPC, only Delphi part.

  3. Log in to comment