mxmlc 配置文件中可以使用哪些令牌(默认情况下)?
Flex 编译器 (mxmlc) 允许在编译器配置 xml 文件中使用标记替换,如文档中引用。
从链接的文档中可以清楚地看出,您可以指定自己的令牌以在命令行上进行替换,但 Adobe 还提供了一些可用的默认/魔术令牌...
例如,下面的代码片段是从 关于如何摆弄框架 RSL 采购的 Adobe 示例:
<runtime-shared-library-path> <path-element>libs/framework.swc</path-element> <rsl-url>${hosted.rsl.url}/flex/${build.number}/framework_${build.number}.swz</rsl-url> <policy-file-url>${hosted.rsl.url}/crossdomain.xml</policy-file-url> </runtime-shared-library-path>
我突出显示了其中使用的两个令牌,即 hosted.rsl.url
和 build .number
。这些可以“神奇地”工作,无需在命令行上指定它们。
这是另一个示例,它模糊地显示了 ${flexlib}
令牌。
不幸的是,除了这些有限的例子之外,我找不到关于可用令牌的文档...令牌列表是否记录在我找不到的地方?如果没有,有人知道吗?知道可用的令牌是什么,以便这个问题可以成为文档吗?
注意:由于我引用了 build.number
,我可能还注意到 build.number
似乎并不像 Adobe 认为的那样工作,因为对我来说它只是给我构建号,而不是整个字符串。即:对于 flex 4.5.0.20967,${build.number}
只给我 20967,这没有太大帮助)。我有一个网络链接,有人在其中抱怨这些令牌的实现变化,但我再也找不到它了。
The flex compiler (mxmlc) allows the use of token substitution in the compiler config xml file, as referenced in the documentation.
From the linked documentation it is clear that you can specify your own tokens for substitution on the commandline, but there are also some default/magic tokens available that Adobe has put in place...
For example, the snippet below is reduced from an Adobe example on how to fiddle with the framework RSL sourcing:
<runtime-shared-library-path> <path-element>libs/framework.swc</path-element> <rsl-url>${hosted.rsl.url}/flex/${build.number}/framework_${build.number}.swz</rsl-url> <policy-file-url>${hosted.rsl.url}/crossdomain.xml</policy-file-url> </runtime-shared-library-path>
I have highlighted two tokens in use there, namely hosted.rsl.url
and build.number
. These work "magically" without specifying them on the commandline.
Here is another example that vaguely shows the existence of a ${flexlib}
token.
Unfortunately, aside from those limited examples I can't find a whisper of documentation on what tokens are available... Is the list of tokens documented somewhere that I can't find? If not, does anyone know what the available tokens are so that this SO question can be the documentation?
Note: Since I referenced build.number
, I might as well also note that build.number
doesn't seem to work quite like Adobe seems to think it does since for me it simply gives me the build number, not the whole string. ie: For flex 4.5.0.20967, ${build.number}
just gives me 20967 which is not much help). I had a web link where someone was complaining about the changing implementation of these tokens, but I can't find it anymore.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您将在构建文件中找到它们 - 在您的 sdk 目录中搜索 build.xml(如果有的话)(并且由于它是开源的,您可以从 adobe http://opensource.adobe.com/wiki/display/flexsdk/Get+Source+Code )为了build.xml 文件。
在其中您将看到它们的实际定义位置。您需要经历框架不同部分的不同构建。例如,您可以在前几行中看到以下内容:(
请注意,指定的 build.number 就像您好奇的那样)
快乐狩猎! (记住你也可以添加你自己的!)
:)
You'll find them in the build files - do a search for build.xml in both your sdk directory and if you have it (and since it's open source you can get your free copy from adobe http://opensource.adobe.com/wiki/display/flexsdk/Get+Source+Code ) for build.xml files.
In them you'll see where they're actually defined. You'll need to go through the different builds for different parts of the framework. For example, you can see the following in the first few lines :
(notice the build.number is specified like you were curious about among others)
Happy hunting! (and remember you can add your own too!)
:)
这是一个相对较老的问题,但我最近才想知道。令牌累积在编译器的 中
ConfigurationBuffer
。Mxmlc< /code>
填充
flexlib
、framework
、configname
、build.number
和系统属性和flex。
而CommandLineConfigurator
解析用户令牌。但不确定hosted.rsl.url
。我怀疑ConfigurationBuffer
公开了其他变量,例如 DefaultsConfigurator 的默认值,但不够勤奋,无法启动它。我曾经使用过flexlib
,但发现where 默认为当前目录。This is a relatively old question but I've just been wondering recently. Tokens accumulate in the compiler's
ConfigurationBuffer
s.Mxmlc
populatesflexlib
,framework
,configname
,build.number
, and system properties starting withflex.
whileCommandLineConfigurator
parses user tokens. Not sure abouthosted.rsl.url
however. I suspectConfigurationBuffer
exposes additional variables like DefaultsConfigurator's defaults but wasn't industrious enough to fire it up. I've usedflexlib
historically but found where it defaults to the current directory.