incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Re: [jira] [Commented] (FLEX-15) Change build script to download specified version of playerglobal.swc
Date Wed, 15 Feb 2012 21:53:03 GMT
Hi,

Well I've worked out a what I think is a reasonable solution.

Move flex-config.xml to flex.config.template.xml and replace the flash and swf  version number
with tokens like so:
    <!-- Specifies the minimum player version that will run the compiled SWF. -->
   <target-player>@playerversion@</target-player>

    <!-- Specifies the version of the compiled SWF -->
    <swf-version>@swfversion@</swf-version>

Add this flexconfig target to the build file:

	<target name="flexconfig" 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}"/>
			</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>
	</target>

And finally add flexcong to depends (after prepare) in target main.

Thanks,
Justin

    

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message