#1 2014-02-11 15:37:09

pult
Member
From: Ukraine, Kyiv
Registered: 2013-11-06
Posts: 18

LVCL: SynCommons.pas SynCrtSock.pas

1) "SynCrtSock.pas, CPort.pas" requires inclusion "Synopse.inc" for processing "{$IFDEF LVCL}"
2) "SynCommons.pas" reqired change "function FileAgeToDateTime" for option "{$IFDEF LVCL}" or need overloded version FileAge in "LVCL\SysUtils.pas"
3) "SynCommons.pas" required declaration TBytes for "{$IFDEF LVCL}" (easier to add to LVCL\SysUtils.pas)
4) "SynCommons.pas" duplicate definitions PUREPASCAL:
  {$ifndef PUREPASCAL} { these functions are implemented in asm }
  {$ifndef LVCL} { don't define these functions twice }
  {$ifndef PUREPASCAL}
  procedure FillChar(var Dest; Count: Integer; Value: Byte);
5) "SynCommons.pas" required "function Trim(RawUTF8): RawUTF8"  for option "{$IFDEF LVCL}"

Offline

#2 2014-02-11 16:09:28

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,269
Website

Re: LVCL: SynCommons.pas SynCrtSock.pas

I guess you are using an unsupported version of the compiler for LVCL.

LVCL works without any problem with Delphi 7, in the current unstable 1.18 branch.
LVCL does NOT work with any other version (may be Delphi 2007, but not tested).

Offline

#3 2014-02-11 17:47:45

pult
Member
From: Ukraine, Kyiv
Registered: 2013-11-06
Posts: 18

Re: LVCL: SynCommons.pas SynCrtSock.pas

I tried to translate for D2007, XE3.
In the "D2007" examples work. And in "XE3" black background in forms (still need to fix).
LVCL my changes:
LVCL_CHANGES_D2007,XE3_[2014.02.11_1919].zip

Offline

#4 2014-02-11 17:58:45

pult
Member
From: Ukraine, Kyiv
Registered: 2013-11-06
Posts: 18

Re: LVCL: SynCommons.pas SynCrtSock.pas

To reduce the size of the examples (*.dpr):

{$IF CompilerVersion >= 22.00}
  {.$IFNDEF DEBUG}
    {$WEAKLINKRTTI ON}
    {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
  {.$ENDIF}
{$ENDIF}

Offline

#5 2014-02-11 21:09:11

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,269
Website

Re: LVCL: SynCommons.pas SynCrtSock.pas

Even with RTTI off, the executables should be much bigger than with Delphi 2007...

Delphi 2009+ is something completly diverse, at RTL level, e.g. for System.pas.

Offline

#6 2014-02-11 21:25:04

pult
Member
From: Ukraine, Kyiv
Registered: 2013-11-06
Posts: 18

Re: LVCL: SynCommons.pas SynCrtSock.pas

LVCL\Demo\Project3.dpr

D2007: 62'464 bytes
XE3:  81'408 bytes

Offline

#7 2014-02-11 21:48:36

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,269
Website

Re: LVCL: SynCommons.pas SynCrtSock.pas

I took a look at your code.
A lot of changes, very interesting to read.

Offline

#8 2014-02-12 21:40:01

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,269
Website

Re: LVCL: SynCommons.pas SynCrtSock.pas

I've committed most of your enhancements.
Tested with Delphi 7 only by now.

Thanks a lot for the feedback!

See http://synopse.info/fossil/info/66ec5745e5

Offline

#9 2014-02-13 00:00:25

pult
Member
From: Ukraine, Kyiv
Registered: 2013-11-06
Posts: 18

Re: LVCL: SynCommons.pas SynCrtSock.pas

thanks!!!
fixes for Abort/ReturnAddress

procedure Abort;
   {$IFDEF MSWINDOWS}{$IFNDEF UNICODE}
   function ReturnAddress: Pointer; // "ReturnAddress" built into the new language
   asm
     mov eax, [ebp+8]
   end;
   {$ENDIF}{$ENDIF}
 begin
   raise EAbort.Create('Operation Aborted') {$IFDEF FPC} {at todo: ?<i do not remember> }{$ELSE}at ReturnAddress{$ENDIF};
 end;

- I will wait for fixes for unicode smile

Last edited by pult (2014-02-13 00:02:16)

Offline

Board footer

Powered by FluxBB