直接用compc来打包flex源文件是很复杂且繁琐的事。但用了Ant,在Eclipse里一切都变为按一个键。
compc.xml:
<!--/////////////////////////////////////////////////////////////////////////////
//Copyright 2007 Advanced Flex Project http://code.google.com/p/advancedflex/.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
///////////////////////////////////////////////////////////////////////////// -->
<project name="Compc build" default="main">
<!-- defines all values for the Compc compiler -->
<property file="compc.properties" />
<!-- main target: cleans and compiles ASDocs -->
<target name="main" depends="clean, log, compc" />
<!-- deletes and recreates the compc directory -->
<target name="clean">
<delete dir="${output.dir}" failonerror="true"/>
<mkdir dir="${output.dir}"/>
</target>
<!-- runs the compc.exe compiler on the source -->
<target name="compc">
<exec executable="${compc.exe}" failonerror="true">
<arg line="-include-sources '${src}'" />
<arg line="-output '${output.dir}/${output.file}'" />
</exec>
</target>
<!-- writes compc output to log file: compc-log.log -->
<target name="log">
<record name="${output.dir}/compc-log.log" action="start" append="true" />
</target>
</project>compc.properties:
################################################################################
##Copyright 2007 Advanced Flex Project http://code.google.com/p/advancedflex/.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
###############################################################################
#compc.exe的位置
compc.exe =C:/Program Files/Adobe/Flex Builder 2 Plug-in/Flex SDK 2/bin/compc.exe
#源文件的位置
src =
#输出的位置
output.dir =
#输出的文件名
output.file =
![[Google]](http://www.google.com/logos/Logo_25wht.gif)
![[Synchronous Space]](http://weihe924stephen.googlepages.com/syncspace-banner.jpg)
![[Creative Commons License]](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png)
![[Add to Google]](http://buttons.googlesyndication.com/fusion/add.gif)
![[Aggregated by MXNA]](http://weblogs.macromedia.com/mxna/images/mxna88x31.gif)
![[Flex.org]](http://www.flex.org/images/flexorg.gif)
![Validate my Atom 1.0 feed [Valid Atom 1.0]](http://validator.w3.org/feed/images/valid-atom.png)
![Validate my RSS feed [Valid RSS]](http://resource.googlecode.com/files/valid-rss.png)
![[I heart FeedBurner]](http://www.feedburner.com/fb/images/pub/i_heart_fb.gif)
1 条评论:
Good blog, like kirai's one!
发表评论