You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cf...@apache.org on 2012/05/11 23:36:15 UTC

svn commit: r1337386 - in /incubator/flex/trunk: build.xml ide/ ide/flashbuilder/ ide/flashbuilder/build.xml

Author: cframpton
Date: Fri May 11 21:36:15 2012
New Revision: 1337386

URL: http://svn.apache.org/viewvc?rev=1337386&view=rev
Log:
Build frameworks *-config.xml files for Adobe Flash Builder with the {airHome} and {playerglobalHome} tokens preexpanded to where FB expects them to be.  I expect there might be an ide/intellij directory as well.

Added:
    incubator/flex/trunk/ide/
    incubator/flex/trunk/ide/flashbuilder/   (with props)
    incubator/flex/trunk/ide/flashbuilder/build.xml   (with props)
Modified:
    incubator/flex/trunk/build.xml

Modified: incubator/flex/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/build.xml?rev=1337386&r1=1337385&r2=1337386&view=diff
==============================================================================
--- incubator/flex/trunk/build.xml (original)
+++ incubator/flex/trunk/build.xml Fri May 11 21:36:15 2012
@@ -157,6 +157,7 @@
         <delete dir="${basedir}/out" failonerror="false" includeEmptyDirs="true"/>
         <delete dir="${basedir}/tempDoc" failonerror="false" includeEmptyDirs="true"/>
         <ant dir="${basedir}/asdoc" target="clean" />
+        <ant dir="${basedir}/ide/flashbuilder" target="clean" />
     </target>
 
     <target name="modules-clean">
@@ -330,7 +331,11 @@
         <delete dir="${basedir}/javadoc" failonerror="false" includeEmptyDirs="true"/>
     </target>
 
-    <target name="post-build" depends="" description="Handle post-build activities" />
+	<target name="ide" description="Build any ide specific files">
+        <ant dir="${basedir}/ide/flashbuilder" />
+    </target>
+    
+    <target name="post-build" depends="ide" description="Handle post-build activities" />
 
     <!--
         Build the ASDoc html pages.
@@ -392,6 +397,13 @@
             <fileset dir="${basedir}/asdoc"/>
         </copy>  
 
+        <!-- ide -->
+        <copy todir="${basedir}/temp/ide">
+            <fileset dir="${basedir}/ide" >
+                <include name="flashbuilder/build.xml"/>
+            </fileset>
+        </copy>
+
         <!-- templates -->
         <copy todir="${basedir}/temp/templates">
             <fileset dir="${basedir}/templates" >
@@ -650,6 +662,13 @@
             </fileset>
         </copy>
 
+        <!-- ide -->
+        <copy todir="${basedir}/temp/ide">
+            <fileset dir="${basedir}/ide" >
+                <include name="flashbuilder/frameworks/*-config.xml"/>
+            </fileset>
+        </copy>
+
         <!-- swfobject templates -->
         <copy todir="${basedir}/temp/templates">
             <fileset dir="${basedir}/templates" >

Propchange: incubator/flex/trunk/ide/flashbuilder/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri May 11 21:36:15 2012
@@ -0,0 +1 @@
+frameworks

Added: incubator/flex/trunk/ide/flashbuilder/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/ide/flashbuilder/build.xml?rev=1337386&view=auto
==============================================================================
--- incubator/flex/trunk/ide/flashbuilder/build.xml (added)
+++ incubator/flex/trunk/ide/flashbuilder/build.xml Fri May 11 21:36:15 2012
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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="sdk" default="main" basedir=".">
+
+    <property name="FLEX_HOME" location="${basedir}/../.."/>
+
+    <property file="${FLEX_HOME}/env.properties"/>
+    <property environment="env"/>
+
+    <property file="${FLEX_HOME}/local.properties"/>
+    <property file="${FLEX_HOME}/build.pr/operties"/>
+
+    <!-- comes from build.propertes unless bin distro -->
+    <property name="playerglobal.version" value="11.1"/>
+
+    <property name="frameworks.dir" value="${FLEX_HOME}/frameworks"/>
+
+    <property name="air.dir" value="${env.AIR_HOME}"/>
+    <property name="debugger" value="${env.FLASHPLAYER_DEBUGGER}"/>
+    
+    <target name="main" depends="create-config-files,expand-config-tokens" 
+        description="Create framework config files in format expected by Adobe FlashBuilder"/>
+
+    <target name="clean">
+        <delete dir="${basedir}/config"/>
+    </target>
+    
+    <!-- For testing.  Run this to integrate this SDK (in-place) with playerglobal.swc and
+         AIR, and modify the framework config files to be the format FB expects.  Only
+         the AIR kit for the platform specified by AIR_HOME will be incorporated.
+         
+         There is no clean for this operation.
+    -->
+    <target name="make-sdk" depends="install-config,install-playerglobal,install-air"
+        description="Converts this SDK into the layout FlashBuilder expects."/>
+    
+    <target name="create-config-files" 
+        description="Framework config files for Adobe FlashBuilder">
+        <copy todir="${basedir}/config" overwrite="true">
+            <fileset dir="${FLEX_HOME}/frameworks">
+                <include name="air-config.xml"/>
+                <include name="airmobile-config.xml"/>
+                <include name="flex-config.xml"/>
+            </fileset>            
+        </copy>
+    </target>
+
+    <target name="expand-config-tokens" description="Expand {airHome} and {playerglobalHome} tokens">        
+        <echo message="expanding {airHome} and {playerglobalHome} tokens"/>
+        <fix-config-file-for-flashbuilder file="${basedir}/config/air-config.xml" />
+        <fix-config-file-for-flashbuilder file="${basedir}/config/airmobile-config.xml" />
+        <fix-config-file-for-flashbuilder file="${basedir}/config/flex-config.xml" />
+    </target>
+
+    <!--
+        {airHome}/frameworks/ is removed so path left as libs/air
+        {playerglobalHome} replaced with libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}
+            the compiler expands the version tokens with the configured target player
+            
+        Note that FlashBuilder does not appear to use the playerglobal path since it seems
+        to have hard-coded the path to libs/player/targetVersion/playglobal.swc where
+        target version is set thru its gui.
+        
+        After token replacement the library-path may end up with duplicate lines
+        but the compiler seems to detect that and removes one of them.
+        
+        In air-config.xml these two lines are identical after token replacement.
+             <path-element>libs/air</path-element>
+             <path-element>{airHome}/frameworks/libs/air</path-element>
+    -->
+    <macrodef name="fix-config-file-for-flashbuilder">
+        <attribute name="file"/>
+            <sequential>
+                <replace file="@{file}">
+                    <replacefilter
+                        token="{airHome}/frameworks/"
+                        value=""/>
+                    <replacefilter
+                        token="{playerglobalHome}"
+                        value="libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}"/>
+                </replace>
+        </sequential>
+    </macrodef>	
+    
+    <target name="install-config">
+        <copy todir="${frameworks.dir}" verbose="true">
+            <fileset dir="${basedir}/config"/> 
+        </copy>
+    </target>
+    
+    <target name="install-playerglobal">
+        <copy todir="${frameworks.dir}/libs/player/${playerglobal.version}" verbose="true">
+            <fileset file="${env.PLAYERGLOBAL_HOME}/playerglobal.swc"/> 
+        </copy>
+    </target>
+    
+    <!-- Warning: symlinks may not be maintained on unix platforms -->
+    <target name="install-air">
+        <copy todir="${FLEX_HOME}" preservelastmodified="true" verbose="true">
+            <fileset dir="${air.dir}"/>
+        </copy>
+        <chmod dir="${basedir}" perm="755" includes="bin/*, **/*.bat, **/*.sh" />
+    </target>
+
+</project>

Propchange: incubator/flex/trunk/ide/flashbuilder/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/ide/flashbuilder/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain