• build.xml


    <?xml version="1.0" encoding="utf-8"?>
    <project name="Main" basedir="." default="compile">
        <property name="main.title" value="Main" />
        <property name="window.title" value="Main" />
        <property environment="env"/>       
        <property name="svnUser" value="${env.SVNUSER}" />
        <property name="svnPasswd" value="${env.SVNPASSWORD}" />
        <property name="dir.src" value="../src" />
        <property name="swfPath" value="../../swf" />
        <property name="fileName" value="Main" />
        <property name="assetsPackageFileName" value="AssetsPackage" />
        <property name="fileExt" value="as" />
        <property name="swcPath" value="../swc" />
        <target name="fgf.bootstrap" depends="">
            <path id="fgf.basedir.path">
                <pathelement path="${basedir}/../"/>
            </path>
            <pathconvert dirsep="/" property="fgf.basedir" refid="fgf.basedir.path"/>
            <path id="svnant.classpath">
                <fileset dir="../../build/lib" >
                    <include name="*.jar" />
                </fileset>
            </path>

            <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />
            <property name="FLEX_HOME" value="../../sdk/flex/3.4.0/" />     
            <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
            <property name="dir.src.skin" value="${fgf.basedir}/src_skin" />
            <property name="dir.src.loader" value="${fgf.basedir}/src_loader" />
        </target>

        <!--target name="buildAeonSkin" depends="fgf.bootstrap">
              <mxmlc file="${dir.src.skin}/com/youguo/skin/AeonSkin.as" output="${swfPath}/AeonSkin.swf" default-frame-rate = "24" actionscript-file-encoding="UTF-8" keep-generated-actionscript="false" incremental="false" debug="false" >
                <compiler.source-path path-element="${dir.src.skin}"/>             
                <compiler.library-path dir="../swc0" append="true">
                    <include name="*.swc"/>
                </compiler.library-path>
            </mxmlc>

            <fileset dir="${dir.src.skin}" id="src.files">   
                    <include name="**/**"/>   
            </fileset>  
            <pathconvert property="evaFramework_classes" pathsep=" " dirsep="." refid="src.files">  
                <map from="\" to="/"/>   
                <map from="${dir.src.skin}/" to=""/>   
            <mapper>   
                <chainedmapper>   
                    <globmapper from="*.as" to="*"/>   
                </chainedmapper>   
            </mapper>   
            </pathconvert>                 

            <compc output="../swc/external/AeonSkin.swc" locale="en_US" include-classes="${evaFramework_classes}"
                optimize="true" benchmark="true" strict = "true" actionscript-file-encoding = "utf-8"
                allow-source-path-overlap = "true"
                use-resource-bundle-metadata = "true">                           
                <source-path path-element="${dir.src.skin}" />
                <compiler.library-path dir="../swc0" append="true">
                    <include name="*.swc"/>
                </compiler.library-path>
            </compc>
        </target -->
        <target name="buildPackages" depends="fgf.bootstrap">
            <mxmlc file="${dir.src}/${assetsPackageFileName}.as" output="${swfPath}/${assetsPackageFileName}.swf" default-frame-rate = "24" actionscript-file-encoding="UTF-8" keep-generated-actionscript="false" incremental="false" >
                <compiler.include-libraries dir="${swcPath}/external" append="true">
                    <include name="**/*.swc" />
                    <exclude name="AeonSkin.swc" />
                    <exclude name="game.swc" />
                    <exclude name="login/*.swc" />
                    <exclude name="avatar/*.swc" />
                    <exclude name="tipbox/*.swc" />
                </compiler.include-libraries>       
                <default-size width="960" height="560"/>
            </mxmlc>

        </target>
        <target name="buildLogin" depends="fgf.bootstrap">

            <!--mxmlc file="${dir.src}/${assetsPackageFileName}.as" output="${swfPath}/plogin.swf" default-frame-rate = "24" actionscript-file-encoding="UTF-8" keep-generated-actionscript="false" incremental="false" >
                <compiler.include-libraries dir="${swcPath}/external" append="true">
                    <include name="login/*.swc" />
                    <exclude name="login/IndexPic.swc" />
                    <include name="avatar/*.swc" />
                    <include name="tipbox/*.swc" />
                </compiler.include-libraries>       
                <default-size width="960" height="560"/>
            </mxmlc-->       

            <mxmlc file="${dir.src}/${assetsPackageFileName}.as" output="${swfPath}/plogin.swf" default-frame-rate = "24" actionscript-file-encoding="UTF-8" keep-generated-actionscript="false" incremental="false" >
                <compiler.include-libraries dir="${swcPath}/external" append="true">
                    <include name="login/LoginBgMc.swc" />
                </compiler.include-libraries>
                <default-size width="960" height="560"/>
            </mxmlc>       

        </target>

        <target name="buildGameSWC" depends="fgf.bootstrap">
            <compc output="../swc/external/game.swc" locale="en_US" include-classes="com.youguo.game.Game"
                optimize="true" benchmark="true" strict = "true" actionscript-file-encoding = "utf-8"
                allow-source-path-overlap = "true"
                use-resource-bundle-metadata = "true">                           
                <source-path path-element="${dir.src}" />
                 <compiler.include-libraries dir="${swcPath}/internal" append="true">
                    <include name="*.swc" />
                </compiler.include-libraries>
                 <!--compiler.include-libraries dir="${swcPath}/internal" append="true">
                    <include name="**/*.swc" />
                    <exclude name="Main.swc" />
                </compiler.include-libraries -->

                 <compiler.external-library-path dir="${swcPath}/external" append="true">
                    <include name="**/*.swc" />
                    <exclude name="game.swc" />
                </compiler.external-library-path>
            </compc>
        </target>

        <target name="freshXmlConfig" depends="fgf.bootstrap">
            <exec executable="/bin/sh">
            <arg line = "-c 'php ${fgf.basedir}/../../utils/xmlCreater/xml.php'" />
            </exec>
        </target>

        <target name="freshFileVersion" depends="fgf.bootstrap">
            <exec executable="/bin/sh">
            <arg line = "-c '${fgf.basedir}/../../utils/home/cdc-ops/bin/bldswfver ${fgf.basedir}/../../'" />
            </exec>
        </target>

        <target name="buildFileVersion" depends="fgf.bootstrap">
            <mxmlc file="${dir.src}/VersionFile.as" output="${swfPath}/version.swf" default-frame-rate = "24" actionscript-file-encoding="UTF-8" keep-generated-actionscript="false" incremental="false" >
            </mxmlc>
        </target>

        <target name="buildMain" depends="fgf.bootstrap">
            <mxmlc file="${dir.src}/${fileName}.as" output="${swfPath}/${fileName}.swf" default-frame-rate = "24" actionscript-file-encoding="UTF-8" keep-generated-actionscript="false" incremental="false" >
                <compiler.library-path dir="${swcPath}/internal" append="true">
                    <include name="LoadingMc.swc"/>
                </compiler.library-path>

                 <!--compiler.include-libraries dir="${swcPath}/internal" append="true">
                    <include name="*.swc" />
                </compiler.include-libraries-->

                 <!--compiler.include-libraries dir="${swcPath}/external" append="true">
                    <include name="**/*.swc" />
                    <exclude name="Main.swc" />
                </compiler.include-libraries -->
                <default-size width="960" height="560"/>
            </mxmlc>   
        </target>
        <target name="buildVer" depends="fgf.bootstrap">
            <mxmlc file="${dir.src}/com/youguo/fileversion/SwfVersion.as" output="${swfPath}/ver.swf" default-frame-rate = "24" actionscript-file-encoding="UTF-8" keep-generated-actionscript="false" incremental="false" >

                 <!--compiler.include-libraries dir="${swcPath}/external" append="true">
                    <include name="**/*.swc" />
                    <exclude name="Main.swc" />
                </compiler.include-libraries -->
                <default-size width="960" height="560"/>
            </mxmlc>   
        </target>

        <target name="buildGame" depends="fgf.bootstrap">
            <mxmlc file="${fgf.basedir}/src/GameLauncher.as" output="${swfPath}/Game.swf" default-frame-rate = "24" actionscript-file-encoding="UTF-8" keep-generated-actionscript="false" incremental="false" >
                <compiler.library-path dir="${swcPath}/internal" append="true">
                    <include name="*.swc"/>
                    <exclude name="LoadingMc.swc"/>
                </compiler.library-path>
                <compiler.external-library-path dir="${swcPath}/external" append="true">
                    <include name="**/*.swc" />
                     <exclude name="game.swc" />
                </compiler.external-library-path>

                 <compiler.external-library-path dir="${swcPath}/internal" append="true">
                    <include name="LoadingMc.swc" />
                </compiler.external-library-path >
                <default-size width="960" height="560"/>
            </mxmlc>           
        </target>
        <target name="svnUpdate" depends="fgf.bootstrap">
            <svn javahl="true" username="${svnUser}" password="${svnPasswd}">
                <cleanup dir="${swfPath}/"/>
                   <update dir="${swfPath}/"/>
               </svn>
        </target>

        <target name="compile" depends="buildVer,buildPackages, buildGame, buildMain" >
        </target>

        <target name="svnCommit" depends="fgf.bootstrap">
            <svn javahl="true" username="${svnUser}" password="${svnPasswd}">
                   <commit message="ant build compile" dir="${swfPath}/"/>
               </svn>        
        </target>

        <target name="compileAndCommit" depends="svnUpdate, buildPackages, buildLogin, buildGame, svnCommit, freshFileVersion, buildFileVersion, buildMain">
            <antcall target="svnCommit">
            </antcall>
        </target>
    </project>

  • 相关阅读:
    ant构建Jmeter脚本的build文件配置(build.xml)
    Jmeter加密函数__digest总结
    Python接口自动化测试脚本-实现禅道登录
    转载:windows下安装mac虚拟机(Vmvare+mac)
    jstat监控JVM内存使用、GC回收情况
    Pycharm添加Python文件模板
    总结:Jmeter常用参数化方式
    Mysql添加索引及索引的优缺点
    Mysql常用语法
    性能测试中TPS上不去的原因
  • 原文地址:https://www.cnblogs.com/holycy/p/2152549.html
Copyright © 2020-2023  润新知