[fpc-pascal] Archive libraries
Darius Blaszyk
dhkblaszyk at gmail.com
Sat Aug 22 09:45:20 CEST 2020
Thank you Michael!
On Sat, Aug 22, 2020 at 9:31 AM Michael Van Canneyt <michael at freepascal.org>
wrote:
>
>
> On Sat, 22 Aug 2020, Darius Blaszyk via fpc-pascal wrote:
>
> > On Thu, Aug 20, 2020 at 11:43 PM Darius Blaszyk <dhkblaszyk at gmail.com>
> > wrote:
> >
> >>
> >> I have done so for the xz format already. The code checks first if the
> >> utility is available and then invokes it. Potentially any other utility
> >> might be included that way. However, I was hoping to include mainly
> native
> >> libraries where possible to reduce dependencies.
> >>
> >
> > By calling the archive utility from the command line I am able to add
> more
> > formats easily. One thing though is that to be more robust I would like
> to
> > check the availability of the utility from the command line. One way of
> > doing this is using "whereis", but I was wondering if something like this
> > exists already in FPC?
>
> Yes:
>
> https://www.freepascal.org/docs-html/current/rtl/sysutils/exesearch.html
>
> Combine with GetEnvironmentVariable():
>
> Exists:=ExeSearch('myexe',GetEnvironmentVariable('PATH'));
>
> Michael.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20200822/9f82c66f/attachment-0001.htm>
More information about the fpc-pascal
mailing list