Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expand a relative path in Ant script, for Inkscape

I'd like to write an Ant script that calls an external utility (Inkscape, in fact) that needs a full path. Right now I have

<exec executable="${inkscape.path}">
    <arg value="--file=build_exe/splash.svg" />
    <arg value="--export-png=build_exe/splash.png" />
    <arg value="-C" />
</exec>

On Windows, Inkscape requires absolute paths. So how can I coax Ant to make build_exe/filename into an absolute path for me? Or, alternately, is there a workaround for Inkscape (maybe setting the working directory)?

like image 805
Paul Fisher Avatar asked Dec 12 '25 04:12

Paul Fisher


1 Answers

use this:

<property name="x" location="folder/file.txt" />

the ${X} value will be the absolute path of the file relative to the ${basedir} value.

like image 174
Mihai Toader Avatar answered Dec 14 '25 18:12

Mihai Toader