我想写调用外部工具(Inkscape中,实际上)需要一个完整路径的Ant脚本。现在我有

<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中需要绝对路径。所以,我怎么能哄Ant来使build_exe/filename到我的绝对路径?或者,交替地,是有Inkscape中(可能设置工作目录)?

一种解决方法
有帮助吗?

解决方案

使用这样的:

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

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

其他提示

我将宣布

<property file="my_config.properties"/>

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top