蚂蚁产生JSFL用反斜杠代替斜杠

蚂蚁产生JSFL用反斜杠代替斜杠

本文介绍了蚂蚁产生JSFL用反斜杠代替斜杠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Ant与FDT 3,我有蚂蚁创建一个JSFL编译FLA的。当我使用内置的$ {BASEDIR}属性的蚂蚁它给了我反斜线(\\ )的路径,因为我是在Windows上。的问题是,当其通过JSFL斜线运行被作为逃逸。我需要知道如何修改BASEDIR属性,以便斜线转换为正斜杠。我试过在分裂的反斜杠在BASEDIR JSFL和前锋加盟这斜杠作为分隔符,但仍然反斜杠导致问题。

I'm using Ant with FDT 3 and I have Ant 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.

因此​​,我需要知道的是如何改变BASEDIR在Ant中有斜杠?

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

推荐答案

您应该能够做到这一点使用Ant的任务。

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}" />

然后你可以使用 $ {basedir.unix} 代替 $ {BASEDIR}

这篇关于蚂蚁产生JSFL用反斜杠代替斜杠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 01:10