对于Inkscape,在Ant脚本中展开相对路径

时间:2009-05-21 19:33:55

标签: ant build-automation filenames inkscape

我想编写一个Ant脚本来调用需要完整路径的外部实用程序(实际上是Inkscape)。现在我有

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

在Windows上,Inkscape requires absolute paths。那么我怎么能哄Ant让build_exe/filename成为我的绝对路径呢?或者,或者,是否有针对Inkscape的解决方法(可能设置工作目录)?

2 个答案:

答案 0 :(得分:5)

使用它:

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

${X}值将是文件相对于${basedir}值的绝对路径。

答案 1 :(得分:0)

我会宣布

<property file="my_config.properties"/>

我会在my_config.properties文件中写这个路径。您的用户只需修改此配置文件即可。

相关问题