Jump to content


Photo

Reduce 13K


  • Please log in to reply
No replies to this topic

#1 Laksekjønn

Laksekjønn
  • Members
  • 440 posts

Posted 27 May 2016 - 02:16 AM

I've discovered something I think it's due for an overhaul.

Just edit the SmartCL.Components unit and set this custom directive.

{.$DEFINE USE_SMS_LITE}

  TW3CustomControl = partial class(TW3MovableControl)
  private
  { private declarations }
  protected
 { protected declarations }

  public
{ public declarations }

{$IFDEF USE_SMS_LITE}
  public
{$ELSE}
  published
{$ENDIF}

published
{ published declarations }
    property Angle: Float read FAngle write SetAngle;
    property Zoom: Float read GetZoom write SetZoom;
    property BorderRadius: Integer read GetBorderRadius write SetBorderRadius;

  end;

before compile/build the project, enable this directive I have to define the Conditional Defines slot under Project | Options | Compiler | Custom conditional defines | USE_SMS_LITE

 

at design time, you have to omit this directive in the project options else the event handler won't work.

 

Using this directive, we can reduce the final code size in (272,291 - 258,778 = 13,513 bytes).

 

We can create a custom build using smsc command line compiler and set custom directives, BTW, compiler defines switch flag is not working for me.

smsc projBlank.sproj -defines=USE_SMS_LITE


  • Nico Wouterse likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users