[Lazarus] Package physical location (directory)
Dmitry Boyarintsev
skalogryz.lists at gmail.com
Thu Jul 28 14:16:03 CEST 2016
On Thu, Jul 28, 2016 at 3:53 AM, Mattias Gaertner <nc-gaertnma at netcologne.de
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160728/a0244a3b/attachment.html>
More information about the Lazarus
mailing list