Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-07

Check if a package is available through macros

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

luiz americo pereira camara

I'd like to check if a package is installed to add conditional defines.

Following the wiki instructions, i added this script in Compiler Options/ Other / Conditionals of a package

  PackageName := GetIDEValue('$PkgName(''LCL'')');
  if Defined(PackageName) then begin
    CustomOptions := '"' + PackageName + '"';
  end;

There's no dedicated macro to check if a package is installed so i tried to use $PkgName macro.

Unfortunately, the PackageName is always empty

Is this the correct way to call the $PkgName macro?

Any hints?

Refs:
http://wiki.lazarus.freepascal.org/Macros_and_Conditionals http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames

Luiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150705/ae636785/attachment.html>

Reply by email