So, what I have is a Flex application that is comprised of about 20 modules that are loaded at runtime. Each module is it's own project in Flex Builder and what I'd like to do is have some way to create a release build of all of them without having to go to each project and selecting Project->Export Release Build...
所以,我所拥有的是一个Flex应用程序,它由大约20个在运行时加载的模块组成。每个模块都是Flex Builder中自己的项目,我想要做的就是创建所有项目的发布版本,而不必去每个项目并选择Project-> Export Release Build ...
How can I do such a thing?
我怎么能做这样的事情?
1 个解决方案
#1
If you have a complex project it might be worth creating an ant build task. This lets you have very specific control over the build process and parameters.
如果您有一个复杂的项目,则可能值得创建一个ant构建任务。这使您可以非常具体地控制构建过程和参数。
You can download ant from the website (manual here) . There is a version that's included with eclipse, but I prefer to run it through the command lines.
您可以从网站下载ant(手册在这里)。有一个版本包含在eclipse中,但我更喜欢通过命令行运行它。
Flex builder comes with an ant library that defines tasks to build actionscript and mxml files. There's some documentation here
Flex构建器附带一个ant库,用于定义构建actionscript和mxml文件的任务。这里有一些文档
For instance, this is a sample mxmlc task that you can do by running 'ant production-compile' :
例如,这是一个示例mxmlc任务,您可以通过运行'ant production-compile'来完成:
<target name="production-compile">
<mxmlc file="myApp.mxml"
show-actionscript-warnings="false"
output="myApp.swf"
debug="false"
optimize="true"
>
<default-size width="800" height="600"/>
<default-frame-rate>60</default-frame-rate>
</mxmlc>
</target>
You can add mxmlc tasks for each of your modules, and this will let you build the whole application with one command.
您可以为每个模块添加mxmlc任务,这样您就可以使用一个命令构建整个应用程序。
#1
If you have a complex project it might be worth creating an ant build task. This lets you have very specific control over the build process and parameters.
如果您有一个复杂的项目,则可能值得创建一个ant构建任务。这使您可以非常具体地控制构建过程和参数。
You can download ant from the website (manual here) . There is a version that's included with eclipse, but I prefer to run it through the command lines.
您可以从网站下载ant(手册在这里)。有一个版本包含在eclipse中,但我更喜欢通过命令行运行它。
Flex builder comes with an ant library that defines tasks to build actionscript and mxml files. There's some documentation here
Flex构建器附带一个ant库,用于定义构建actionscript和mxml文件的任务。这里有一些文档
For instance, this is a sample mxmlc task that you can do by running 'ant production-compile' :
例如,这是一个示例mxmlc任务,您可以通过运行'ant production-compile'来完成:
<target name="production-compile">
<mxmlc file="myApp.mxml"
show-actionscript-warnings="false"
output="myApp.swf"
debug="false"
optimize="true"
>
<default-size width="800" height="600"/>
<default-frame-rate>60</default-frame-rate>
</mxmlc>
</target>
You can add mxmlc tasks for each of your modules, and this will let you build the whole application with one command.
您可以为每个模块添加mxmlc任务,这样您就可以使用一个命令构建整个应用程序。