在 Ant 脚本中展开相对路径,用于 Inkscape [英] Expand a relative path in Ant script, for Inkscape

查看:28
本文介绍了在 Ant 脚本中展开相对路径,用于 Inkscape的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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>

在 Windows 上,Inkscape 需要绝对路径.那么我怎样才能哄 Ant 让 build_exe/filename 成为我的绝对路径?或者,Inkscape 是否有解决方法(可能设置工作目录)?

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

推荐答案

使用这个:

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

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

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

这篇关于在 Ant 脚本中展开相对路径,用于 Inkscape的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆