On Thu, Jul 28, 2016 at 3:53 AM, Mattias Gaertner <[email protected]
> wrote:

>
> Do you mean, how can a package installed in the IDE find its lpk?
>
> Pretty much - yes,

Lets say I've a package

packagedir/
./package.lpk
./package.sh
./package.pas
.
Package is introducing a button into IDE, that does something.
On the press of the button I need to execute the script (package.sh).
However, I cannot do that, unless I know the path to it. I need to know
this path in run-time:

  pth := GetPackageDir('package'); // do the search by package name
  pth := IncludePathDelimiter(pth)+ 'package.sh';
  RunCommand('bash', pth);

thanks,
Dmitry
-- 
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to