incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Change to build script to support other locales and flash player versions
Date Sun, 22 Jul 2012 17:11:17 GMT
Hi,

Here's a patch (not complete but enough to give you an idea of the changes) to compile the
SDK for different locales and different versions of the SDK.

Any comments or objections if I check this into trunk?

### Eclipse Workspace Patch 1.0
#P Apache Flex SDK
Index: build.xml
===================================================================
--- build.xml	(revision 1364221)
+++ build.xml	(working copy)
@@ -39,7 +39,6 @@
     <property name="debug" value="true"/>
     <property name="strict" value="true"/>
     <property name="javac.src" value="1.5"/>
-    <property name="target.player" value="11.1"/>
     
     <property name="kit.prefix" value="apache-flex-sdk-${release.version}-incubating"/>
     <property name="source.kit" value="${kit.prefix}-src"/>
@@ -231,7 +230,7 @@
 
 --&gt;
 &lt;flex-sdk-description&gt;
-&lt;name&gt;${release}&lt;/name&gt;
+&lt;name&gt;${release} FP${playerglobal.version} ${locale}&lt;/name&gt;
 &lt;version&gt;${release.version}&lt;/version&gt;
 &lt;build&gt;${build.number}&lt;/build&gt;
 &lt;/flex-sdk-description&gt;
@@ -351,13 +350,13 @@
 
     <target name="frameworks" description="Full build of all framework SWCs, including
resource bundles and themes">
         <ant dir="${basedir}/frameworks">
-            <property name="locale" value="en_US"/>
+            <property name="locale" value="${locale}"/>
         </ant>
     </target>
 
     <target name="framework-compile" description="Recompile framework.swc">
         <ant dir="${basedir}/frameworks/projects/framework" target="compile">
-            <property name="locale" value="en_US"/>
+            <property name="locale" value="${locale}"/>
         </ant>
     </target>
 
@@ -1049,8 +1048,8 @@
         <!--
             Remove these files from the binary kit.
             
-            copylocale looks for bundles and then uses en_US so if there is
-            not a en_US sub-directory don't include the bundles directory.
+            copylocale looks for bundles and then uses default locale so if there is
+            not a locale sub-directory don't include the bundles directory.
         -->
         <delete dir="${basedir}/temp/frameworks/projects" includeEmptyDirs="false">
             <include name="airspark/bundles/**"/>
@@ -1062,7 +1061,7 @@
             <include name="*/bundles/**/docs/**"/>
             <include name="*/bundles/*/*.xml"/>
             <include name="*/bundles/*/packages.dita"/>
-            <exclude name="*/bundles/en_US"/>
+            <exclude name="*/bundles/{$locale}"/>
         </delete>

### Eclipse Workspace Patch 1.0
#P Apache Flex SDK
Index: frameworks/build.xml
===================================================================
--- frameworks/build.xml	(revision 1364221)
+++ frameworks/build.xml	(working copy)
@@ -82,7 +82,7 @@
        Should consider updating the OSMF and TLF versions in use.
     -->
     
-    <target name="compile" description="Builds all SWCs but not their resource bundles">
+    <target name="compile" description="Builds all SWCs but not their resource bundles"
depends="flex-config">
         <antcall target="framework"/>
         <antcall target="mx"/>
         <antcall target="rpc"/>
@@ -104,6 +104,40 @@
         
         <antcall target="compile-automation"/>
     </target>
+	
+	<target name="flex-config" depends="playerglobal-setswfversion" description="Copy the
flex config template to flex-config.xml and inject version numbers">
+		<copy file="${basedir}/flex-config.template.xml" tofile="${basedir}/flex-config.xml"
overwrite="true">
+			<filterset>
+				<filter token="playerversion" value="${playerglobal.version}"/>
+				<filter token="swfversion" value="${playerglobal.swfversion}"/>
+				<filter token="locale" value="${locale}"/>
+			</filterset>
+		</copy>
+	</target>
+		
+	<target name="playerglobal-setswfversion" description="Set the swfversion to insert into
the flex config file">
+		<condition property="playerglobal.swfversion" value="11">
+			<equals arg1="${playerglobal.version}" arg2="10.2" />
+		</condition>
+		<condition property="playerglobal.swfversion" value="12">
+			<equals arg1="${playerglobal.version}" arg2="10.3" />
+		</condition>
+		<condition property="playerglobal.swfversion" value="13">
+			<equals arg1="${playerglobal.version}" arg2="11.0" />
+		</condition>
+		<condition property="playerglobal.swfversion" value="14">
+			<equals arg1="${playerglobal.version}" arg2="11.1" />
+		</condition>
+		<condition property="playerglobal.swfversion" value="15">
+			<equals arg1="${playerglobal.version}" arg2="11.2" />
+		</condition>
+		<condition property="playerglobal.swfversion" value="16">
+			<equals arg1="${playerglobal.version}" arg2="11.3" />
+		</condition>
+		<condition property="playerglobal.swfversion" value="17">
+			<equals arg1="${playerglobal.version}" arg2="11.4" />
+		</condition>
+	</target>	
 
     <!--
         automation: tool was formerly qtp and tool_air was formerly qtp_air


### Eclipse Workspace Patch 1.0
#P Apache Flex SDK
Index: frameworks/projects/advancedgrids/build.xml
===================================================================
--- frameworks/projects/advancedgrids/build.xml	(revision 1364221)
+++ frameworks/projects/advancedgrids/build.xml	(working copy)
@@ -37,7 +37,7 @@
 				<compc fork="true"
 					output="${FLEX_HOME}/frameworks/locale/@{locale}/advancedgrids_rb.swc"
 					locale="@{locale}">
-					<target-player>11.1</target-player>
+					<target-player>${playerglobal.version}</target-player>
 					<jvmarg line="${compc.jvm.args}"/>
 					<include-resource-bundles bundle="datamanagement"/>
 					<include-resource-bundles bundle="olap"/>

Thanks,
Justin
Mime
View raw message