开发者

Ant produces jsfl with backslashes instead of slashes

开发者 https://www.devze.com 2022-12-12 06:57 出处:网络
I\'m using Ant with FDT 3 and I have A开发者_如何学运维nt creating a jsfl to compile fla\'s. When I use the built in \'${basedir}\' property in Ant it gives me the path with backslashes(\\) in it beca

I'm using Ant with FDT 3 and I have A开发者_如何学运维nt creating a jsfl to compile fla's. When I use the built in '${basedir}' property in Ant it gives me the path with backslashes(\) in it because I'm on Windows. The problem is that when its run through jsfl the slashes are taken as escapes. I need to know how to modify the basedir property so the slashes are converted to forward slashes. I've tried splitting the basedir on backslashes in jsfl and joining it with forward slashes as a delimiter, but the backslashes still cause problems.

So what I need to know is how to change the basedir in Ant to have forward slashes?


You should be able to do it using the Ant pathconvert task.

Here's a rough example:

<path id="basedir.path">
    <pathelement path="${basedir}" />
</path>
<pathconvert targetos="unix" property="basedir.unix" refid="basedir.path"/>
<echo message="${basedir.unix}" />

Then you can use ${basedir.unix} in place of ${basedir}.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号