3

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)?

Paul Fisher
  • 9,618
  • 5
  • 37
  • 53

2 Answers2

5

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.

Mihai Toader
  • 12,041
  • 1
  • 29
  • 33
0

I would declare

<property file="my_config.properties"/>

and I would write this path in the file my_config.properties. Your users will just have to modify this config file.

Pierre
  • 34,472
  • 31
  • 113
  • 192