Updated Branches:
  refs/heads/develop 59659f7cc -> 17319eb2c

new installer scripts for main Flex SDK


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/17319eb2
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/17319eb2
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/17319eb2

Branch: refs/heads/develop
Commit: 17319eb2c32ddec4cee626fd1321738e1a4180d2
Parents: 59659f7
Author: Alex Harui <[email protected]>
Authored: Mon Jan 27 14:26:55 2014 -0800
Committer: Alex Harui <[email protected]>
Committed: Mon Jan 27 14:27:25 2014 -0800

----------------------------------------------------------------------
 apache-flex-sdk-installer-config.xml  | 152 +++++++++
 build.xml                             |   3 +
 installer.properties/en_US.properties | 115 +++++++
 installer.xml                         | 519 +++++++++++++++++++++++++++++
 4 files changed, 789 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/17319eb2/apache-flex-sdk-installer-config.xml
----------------------------------------------------------------------
diff --git a/apache-flex-sdk-installer-config.xml 
b/apache-flex-sdk-installer-config.xml
new file mode 100644
index 0000000..21a6996
--- /dev/null
+++ b/apache-flex-sdk-installer-config.xml
@@ -0,0 +1,152 @@
+<?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.
+
+-->
+
+<config>
+    <!--<progressLabels>
+        <en_US>
+            <Copy>Copying %1 of %2</Copy>
+            <Get>Downloading bytes %1 of %2</Get>
+            <Checksum>Computing checksum: bytes %1 of %2</Checksum>
+        </en_US>
+    </progressLabels>
+     -->
+    <properties>
+    </properties>
+    <strings description="override default installer strings here">
+    </strings>
+    <steps description="targets that should have a 'step' in the GUI progress 
indicator, in order of appearance.">
+        <step id="air-download" property="do.air.install">
+            <el_GR>Αποσυμπίεση του Adobe AIR Runtime Kit</el_GR>
+            <en_US>Adobe AIR SDK (Required)</en_US>
+        </step>
+        <step id="flash-download" property="do.flash.install">
+            <el_GR>Λήψη Flash Player swc</el_GR>
+            <en_US>Adobe Flash Player playerglobal.swc (Required)</en_US>
+        </step>
+        <step id="swfobject-download" property="do.swfobject.install">
+            <el_GR>SWFObject (Απαιτούμενο)</el_GR>
+            <en_US>SWFObject (Required)</en_US>
+        </step>
+        <step id="osmf-download" property="do.swfobject.install">
+            <el_GR>OSMF (Απαιτούμενο)</el_GR>
+            <en_US>OSMF (Required)</en_US>
+        </step>
+        <step id="fontswf-download" property="do.swfobject.install">
+            <el_GR>Adobe Embedded Font Libraries and Utilities (Π
ροαιρετικό)</el_GR>
+            <en_US>Adobe Embedded Font Libraries and Utilities 
(Required)</en_US>
+        </step>
+        <step id="blazeds-download" property="do.swfobject.install">
+            <el_GR>Remoting Support (Προαιρετικό)</el_GR>
+            <en_US>Remoting Support (Required)</en_US>
+        </step>
+        <step id="fixup-config-files">
+            <el_GR>Εγκατάσταση των αρχείων ρυ
θμίσεων του Framework</el_GR>
+            <en_US>Install Framework Configuration Files</en_US>
+        </step>
+    </steps>
+    <component id="STEP_REQUIRED_INSTALL_APACHE_FLEX_SDK" required="true" 
property="do.flex.install">
+        <el_GR>
+            <label>Apache Flex SDK (Απαιτούμενο)</label>
+            <message>Για το Apache Flex SDK ισχύει η συ
μφωνία χρήσης του Apache License V2. Θέλετε να 
εγκαταστήσετε το Apache Flex SDK;</message>
+        </el_GR>
+        <en_US>
+            <label>Apache Flex SDK (Required)</label>
+            <message>The Apache License V2 applies to the Apache Flex SDK.  Do 
you want to install the Apache Flex SDK?</message>
+            <license>Apache V2 License</license>
+            
<licenseURL>http://www.apache.org/licenses/LICENSE-2.0.html</licenseURL>
+        </en_US>
+    </component>
+    <component id="STEP_REQUIRED_INSTALL_ADOBE_AIR_SDK" required="true" 
property="do.air.install">
+        <el_GR>
+            <label>Adobe AIR SDK (Απαιτούμενο)</label>
+            <message>Για το Adobe AIR SDK ισχύει η συ
μφωνία χρήσης του Adobe SDK License. Θέλετε να 
εγκαταστήσετε το Adobe AIR SDK;</message>
+            <license>'Αδεια χρήσης Adobe AIR SDK</license>
+        </el_GR>
+        <en_US>
+            <label>Adobe AIR SDK (Required)</label>
+            <message>The Adobe SDK license agreement applies to the Adobe AIR 
SDK.  Do you want to install the Adobe AIR SDK?</message>
+            <license>Adobe AIR SDK License</license>
+            
<licenseURL>http://www.adobe.com/products/air/sdk-eula.html</licenseURL>
+        </en_US>
+    </component>
+    <component id="STEP_REQUIRED_INSTALL_FLASH_PLAYER_GLOBAL_SWC" 
required="true" property="do.flash.install">
+        <el_GR>
+            <label>Adobe Flash Player playerglobal.swc 
(Απαιτούμενο)</label>
+            <message>Για το Adobe Flash Player playerglobal.swc 
ισχύει η συμφωνία χρήσης του Adobe SDK License. 
Θέλετε να εγκαταστήσετε το Adobe Flash Player 
playerglobal.swc;</message>
+            <license>'Αδεια χρήσης Adobe Flex SDK</license>
+        </el_GR>
+        <en_US>
+            <label>Adobe Flash Player playerglobal.swc (Required)</label>
+            <message>The Adobe SDK license agreement applies to the Adobe 
Flash Player playerglobal.swc.  Do you want to install the Adobe Flash Player 
playerglobal.swc?</message>
+            <license>Adobe Flex SDK License</license>
+            
<licenseURL>http://www.adobe.com/products/eulas/pdfs/adobe_flex_software_development_kit-combined-20110916_0930.pdf</licenseURL>
+        </en_US>
+    </component>
+    <component id="SWFObject (Required)" required="true" 
property="do.swfobject.install">
+        <el_GR>
+            <label>SWFObject (Απαιτούμενο)</label>
+            <message>Για το SWFObject ισχύει η συμφωνία 
χρήσης του MIT License (MIT). Θέλετε να 
εγκαταστήσετε το SWFObject;</message>
+        </el_GR>
+        <en_US>
+            <label>SWFObject (Required)</label>
+            <message>The MIT License (MIT) applies to the SWFObject utility.  
Do you want to install the SWFObject utility?</message>
+            <license>MIT License</license>
+            
<licenseURL>http://opensource.org/licenses/mit-license.php</licenseURL>
+        </en_US>
+    </component>
+    <component id="OSMF (Required)" required="true" property="do.osmf.install">
+        <el_GR>
+            <label>OSMF (Απαιτούμενο)</label>
+            <message>Για το Open Source Media Framework (OSMF) που 
χρησιμοποιείται απο τα αντικείμενα video 
ισχύει η συμφωνία χρήσης του Mozilla Public License 
Version 1.1. Θέλετε να εγκαταστήσετε το  Για το 
Open Source Media Framework (OSMF);</message>
+            </el_GR>
+        <en_US>
+            <label>OSMF (Required)</label>
+            <message>The Open Source Media Framework (OSMF) used by the video 
components is licensed under the Mozilla Public License Version 1.1.  Do you 
want to install the Open Source Media Framework (OSMF)?</message>
+            <license>Mozilla Public License Version 1.1</license>
+            <licenseURL>http://www.mozilla.org/MPL/</licenseURL>
+        </en_US>
+    </component>
+    <component id="BlazeDS (Optional)" required="false" 
property="do.blazeds.install">
+        <el_GR>
+            <label>Remoting Support (Προαιρετικό)</label>
+            <message>Το Apache Flex μπορεί προαιρετικά να 
χρησιμοποιήσει το Adobe BlazeDS. Η λειτουργία αυ
τή απαιτεί το αρχείο flex-messaging-common.jar που 
βρίσκεται στο Adobe Flex SDK. Για το αρχείο αυτό 
ισχύει η συμφωνία χρήσης της άδειας Adobe SDK 
για το Adobe Flex 4.6. Η άδεια αυτή δεν είναι συ
μβατή με την άδεια χρήσης Apache V2. Θέλετε να 
εγκαταστήσετε το αρχείο αυτά απο το Adobe Flex 
SDK;</message>
+            <license>'Αδεια χρήσης Adobe Flex SDK</license>
+        </el_GR>
+        <en_US>
+            <label>Remoting Support (Optional)</label>
+            <message>Apache Flex can optionally integrate with remoting 
providers like BlazeDS, GraniteDS, WebORB, Red5, AMFPHP, RubyAMF, PyAMF and 
others. This feature requires flex-messaging-common.jar from the Adobe Flex 
SDK. The Adobe SDK license agreement for Adobe Flex 4.6 applies to this jar. 
This license is not compatible with the Apache V2 license. Do you want to 
install this jar from the Adobe Flex SDK?</message>
+            <license>Adobe Flex SDK License</license>
+            
<licenseURL>http://www.adobe.com/products/eulas/pdfs/adobe_flex_software_development_kit-combined-20110916_0930.pdf</licenseURL>
+        </en_US>
+    </component>
+    <component id="FontSWF (Optional)" required="false" 
property="do.fontswf.install">
+        <el_GR>
+            <label>Adobe Embedded Font Libraries and Utilities (Π
ροαιρετικό)</label>
+            <message>Το Apache Flex μπορεί προαιρετικά να 
χρησιμοποιήσει την υποστήριξη που παρέχει 
η Adobe για ενσωματωμένες γραματοσειρές. Η 
λειτουργία αυτή απαιτεί κάποια jar αρχεία 
που υπάρχουν στο Adobe Flex SDK. Για τα αρχεία αυ
τά ισχύει η συμφωνία χρήσης της άδειας Adobe 
SDK για το Adobe Flex 4.6. Η άδεια αυτή δεν είναι συ
μβατή με την άδεια χρήσης Apache V2. Θέλετε να 
εγκαταστήσετε τα αρχεία αυτά απο το Adobe Flex 
SDK;</message>
+            <license>'Αδεια χρήσης Adobe Flex SDK</license>
+        </el_GR>
+        <en_US>
+            <label>Adobe Embedded Font Libraries and Utilities 
(Optional)</label>
+            <message>Apache Flex can optionally integrate with Adobe's 
embedded font support. This feature requires a few font jars from the Adobe 
Flex SDK. The Adobe SDK license agreement for Adobe Flex 4.6 applies to these 
jars. This license is not compatible with the Apache V2 license. Do you want to 
install these jars from the Adobe Flex SDK?</message>
+            <license>Adobe Flex SDK License</license>
+            
<licenseURL>http://www.adobe.com/products/eulas/pdfs/adobe_flex_software_development_kit-combined-20110916_0930.pdf</licenseURL>
+        </en_US>
+    </component>
+</config>

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/17319eb2/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index c1d3aa4..3f0ff10 100644
--- a/build.xml
+++ b/build.xml
@@ -557,6 +557,8 @@
                 <include name="build.properties"/>
                                <include name="env-template.properties"/>
                 <include name="flex-sdk-description.xml"/>
+                <include name="installer.xml"/>
+                <include name="installer.properties/**"/>
                 <include name="CHANGES"/>
                 <include name="LICENSE"/>
                 <include name="NOTICE"/>
@@ -1003,6 +1005,7 @@ There are no known issues.
                 
         <antcall target="binary-package-zip"/>        
         <antcall target="binary-package-tgz"/>        
+        <copy todir="${basedir}/out" 
file="${basedir}/apache-flex-sdk-installer-config.xml" />
     </target>
         
     <target name="stage-lib">

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/17319eb2/installer.properties/en_US.properties
----------------------------------------------------------------------
diff --git a/installer.properties/en_US.properties 
b/installer.properties/en_US.properties
new file mode 100644
index 0000000..9dc1b90
--- /dev/null
+++ b/installer.properties/en_US.properties
@@ -0,0 +1,115 @@
+################################################################################
+##
+##  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.
+##
+################################################################################
+
+
+yes.no.prompts=y,n
+yes=y
+no=n
+
+flash.prompt.text=\
+Apache FlexJS uses the Adobe Flash Player's playerglobal.swc to build Adobe 
Flash applications.\n\
+\n\
+The playerglobal.swc file is subject to and governed by the\n\
+Adobe Flex SDK License Agreement specified here:\n\
+http://www.adobe.com/products/eulas/pdfs/adobe_flex_software_development_kit-combined-20110916_0930.pdf,\n\
+By downloading, modifying, distributing, using and/or accessing any files the 
playerglobal.swc file\n\
+you agree to the terms and conditions of the applicable end user license 
agreement.\n\
+\n\
+In addition to the Adobe license terms, you also agree to be bound by the 
third-party terms specified here:\n\
+http://www.adobe.com/products/eula/third_party/.\n\
+Adobe recommends that you review these third-party terms.\n\
+\n\
+This license is not compatible with the Apache v2 license.\n\
+Do you want to download and install the playerglobal.swc?
+
+air.prompt.text=\
+Apache FlexJS uses the Adobe AIR SDK to build Adobe AIR applications.\n\
+The Adobe AIR SDK is subject to and governed by the\n\
+Adobe AIR SDK License Agreement specified here:\n\
+http://www.adobe.com/products/air/sdk-eula.html.\n\
+This license is not compatible with the Apache v2 license.\n\
+Do you want to download and install the Adobe AIR SDK?
+
+osmf.prompt.text=\
+The Open Source Media Framework (OSMF) used by the video components\n\
+is licensed under the Mozilla Public License Version 1.1.\n\
+Mozilla Public License Version 1.1:\n\
+\n\
+The contents of the file(s) are subject to the Mozilla Public License Version 
1.1.\n\
+You may not use the file(s) except in compliance with the License. \n\
+You may obtain a copy of the License here:\n\
+http://www.mozilla.org/MPL/. \n\
+By downloading, modifying, distributing, using and/or accessing the file(s), 
\n\
+you agree to the terms and conditions of the applicable license agreement.\n\
+\n\
+I have read the MPL1.1 license information above?"
+
+swfobject.prompt.text=\
+Apache FlexJS uses the SWFObject when building Adobe Flash applications.\n\
+SWFObject is subject to and governed by the\n\
+MIT License Agreement specified here:\n\
+http://opensource.org/licenses/mit-license.php.\n\
+This license is compatible with the Apache v2 license.\n\
+Do you want to download and install the SWFObject?
+
+blazeds.prompt.text=\
+Apache Flex can optionally integrate with Adobe BlazeDS.\n\
+This feature requires flex-messaging-common.jar from the Adobe Flex SDK.\n\
+The Adobe SDK license agreement for Adobe Flex 4.6 applies to this jar.\n\
+This license is not compatible with the Apache v2 license.\n\
+\n\
+Adobe Flex SDK License Agreement:\n\
+\n\
+All files contained in this Adobe Flex SDK download are subject to and 
governed by the\n\
+Adobe Flex SDK License Agreement specified here: \n\
+    
http://www.adobe.com/products/eulas/pdfs/adobe_flex_software_development_kit-combined-20110916_0930.pdf,
 \n\
+By downloading, modifying, distributing, using and/or accessing any files in 
this Adobe Flex SDK, \n\
+you agree to the terms and conditions of the applicable end user license 
agreement.\n\
+\n\
+In addition to the Adobe license terms, you also agree to be bound by the 
third-party terms specified here: \n\
+    http://www.adobe.com/products/eula/third_party/. \n\
+Adobe recommends that you review these third-party terms.\n\
+\n\
+Do you want to install this jar from the Adobe Flex SDK?
+
+fontswf.prompt.text=\
+Apache Flex can optionally integrate with Adobe's embedded font support.\n\
+This feature requires a few font jars from the Adobe Flex SDK.\n\
+The Adobe SDK license agreement for Adobe Flex 4.6 applies to these jars.\n\
+This license is not compatible with the Apache v2 license.\n\
+\n\
+Adobe Flex SDK License Agreement:\n\
+\n\
+All files contained in this Adobe Flex SDK download are subject to and 
governed by the\n\
+Adobe Flex SDK License Agreement specified here: \n\
+    
http://www.adobe.com/products/eulas/pdfs/adobe_flex_software_development_kit-combined-20110916_0930.pdf,
 \n\
+By downloading, modifying, distributing, using and/or accessing any files in 
this Adobe Flex SDK, \n\
+you agree to the terms and conditions of the applicable end user license 
agreement.\n\
+\n\
+In addition to the Adobe license terms, you also agree to be bound by the 
third-party terms specified here: \n\
+    http://www.adobe.com/products/eula/third_party/. \n\
+Adobe recommends that you review these third-party terms.\n\
+\n\
+Do you want to install this jar from the Adobe Flex SDK?
+ 
+unable.to.find.java=Unable to find Java executable.  Please set JAVA_HOME 
environment variable
+
+install.complete.echo=${basedir} is now an IDE compatible folder
+find.java.echo.pattern=Java is $${java.executable}
+mac.copy.echo.pattern=Copying files from $${download.dir}/airsdk/$${srcdir} to 
$${destdir}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/17319eb2/installer.xml
----------------------------------------------------------------------
diff --git a/installer.xml b/installer.xml
new file mode 100644
index 0000000..c7b5170
--- /dev/null
+++ b/installer.xml
@@ -0,0 +1,519 @@
+<?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_ide_install" default="install" basedir=".">
+
+    <property name="FLEX_HOME" location="${basedir}"/>
+    
+    <!-- Required for OSX 10.6 / Snow Leopard Performance. -->
+    <!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
+    <!-- local.d32 is set/used in build.properties so this needs to be done 
first. -->
+    <condition property="local.d32" value="-d32">
+        <and>
+            <os family="windows"/>
+            <equals arg1="${sun.arch.data.model}" arg2="64"/>
+            <equals arg1="${os.arch}" arg2="x86_64"/>
+            <equals arg1="${ant.java.version}" arg2="1.6"/>
+        </and>
+    </condition>
+
+    <property file="${FLEX_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEX_HOME}/local.properties"/>
+    <property file="${FLEX_HOME}/build.properties"/>
+    <property name="bundle" value="en_US" />
+    <property file="${FLEX_HOME}/installer.properties/${bundle}.properties"/>
+    <property file="${FLEX_HOME}/installer.properties/en_US.properties"/>
+    <property name="download.dir" value="${FLEX_HOME}/in"/>
+    
+    <property name="air.sdk.version" value="3.9"/>
+    <property name="flash.sdk.version" value="11.9"/>
+    
+    <property name="xml.properties" 
value="http://flex.apache.org/installer/sdk-installer-config-4.0.xml"; />
+    
+    <condition property="platform" value="mac">
+        <os family="mac" />
+    </condition>
+    <condition property="platform" value="windows">
+        <os family="windows" />
+    </condition>
+    <condition property="platform" value="linux">
+        <os family="unix" />
+    </condition>
+    <condition property="isMac" value="mac">
+        <os family="mac" />
+    </condition>
+    <condition property="isWindows" value="windows">
+        <os family="windows" />
+    </condition>
+    <condition property="isLinux" value="linux">
+        <os family="unix" />
+    </condition>
+    
+    <condition property="air.donot.ask" value="true">
+        <isset property="installer" />
+    </condition>
+    <condition property="flash.donot.ask" value="true">
+        <isset property="installer" />
+    </condition>
+    <condition property="swfobject.donot.ask" value="true">
+        <isset property="installer" />
+    </condition>
+    <condition property="osmf.donot.ask" value="true">
+        <isset property="installer" />
+    </condition>
+    <condition property="fontswf.donot.ask" value="true">
+        <isset property="installer" />
+    </condition>
+    <condition property="blazeds.donot.ask" value="true">
+        <isset property="installer" />
+    </condition>
+    
+    <condition property="java.home" value="${env.JAVA_HOME}" >
+        <and>
+            <available file="${env.JAVA_HOME}" type="dir" />
+            <not>
+                <equals arg1="" arg2="${env.JAVA_HOME}" />
+            </not>
+        </and>
+    </condition>
+
+    <target name="get-data" >
+        <get src="${xml.properties}" 
dest="${basedir}/sdk-installer-config-4.0.xml" />
+        <xmlproperty file="${basedir}/sdk-installer-config-4.0.xml" 
semanticAttributes="true" collapseAttributes="true"/>
+        <property name="air.sdk.url.path.ref" 
value="air.sdk.path.${platform}.${air.sdk.version}" />
+        <property name="air.sdk.url.path" refid="${air.sdk.url.path.ref}" />
+        <property name="air.sdk.url.file.ref" 
value="air.sdk.file.${platform}.${air.sdk.version}" />
+        <property name="air.sdk.url.file" refid="${air.sdk.url.file.ref}" />
+        <property name="flash.sdk.url.path.ref" 
value="flash.sdk.path.${flash.sdk.version}" />
+        <property name="flash.sdk.url.path" refid="${flash.sdk.url.path.ref}" 
/>
+        <property name="flash.sdk.url.file.ref" 
value="flash.sdk.file.${flash.sdk.version}" />
+        <property name="flash.sdk.url.file" refid="${flash.sdk.url.file.ref}" 
/>
+        <property name="flash.sdk.swfversion.ref" 
value="flash.sdk.swfversion.${flash.sdk.version}" />
+        <property name="flash.sdk.swfversion" 
refid="${flash.sdk.swfversion.ref}" />
+    </target>
+    
+    <target name="install" 
depends="get-data,check-binary,ask-licenses,get-third-party-files,fixup-config-files"
 description="Converts binary package to IDE compatible folder">
+        <echo>${install.complete.echo}</echo>
+    </target>
+    
+    <target name="check-binary" description="Make sure this is a binary 
package">
+        <fail message="${basedir} is not an Flex binary package">
+            <condition>
+                <not>
+                    <available file="${basedir}/frameworks/libs/framework.swc" 
/>
+                </not>
+            </condition>
+        </fail>
+        <fail message="${basedir} is not an Flex binary package and is 
probably a git repo">
+            <condition>
+                <available file="$[basedir}/.gitignore" />
+            </condition>
+        </fail>
+    </target>
+    
+    <target name="ask-licenses" 
depends="ask-air,ask-flash,ask-swfobject,ask-adobe-osmf,ask-adobe-fontswf,ask-adobe-blazeds"
 description="Ask about the various licenses">
+       </target>
+    
+    <target name="ask-air" unless="air.donot.ask"
+        description="Prompt the user before downloading AIR">
+        
+        <input
+        message="${air.prompt.text}"
+        validargs="${yes.no.prompts}"
+        defaultvalue="${no}"
+        addproperty="input.air.download"/>
+        <condition property="do.air.install">
+            <equals arg1="${yes}" arg2="${input.air.download}"/>
+        </condition>
+        <!-- Only ask once per ant run.  -->
+        <property name="air.donot.ask" value="set"/>
+    </target>
+
+    <target name="ask-flash" unless="flash.donot.ask"
+        description="Prompt the user before downloading playerglobal.swc">
+        
+        <input
+        message="${flash.prompt.text}"
+        validargs="${yes.no.prompts}"
+        defaultvalue="${no}"
+        addproperty="input.flash.download"/>
+        <condition property="do.flash.install">
+            <equals arg1="${yes}" arg2="${input.flash.download}"/>
+        </condition>
+        <!-- Only ask once per ant run.  -->
+        <property name="flash.donot.ask" value="set"/>
+    </target>
+
+    <target name="ask-swfobject" unless="swfobject.donot.ask"
+        description="Prompt the user before downloading SWFObject">
+        
+        <input
+        message="${swfobject.prompt.text}"
+        validargs="${yes.no.prompts}"
+        defaultvalue="${no}"
+        addproperty="input.swfobject.download"/>
+        <condition property="do.swfobject.install">
+            <equals arg1="${yes}" arg2="${input.swfobject.download}"/>
+        </condition>
+        <!-- Only ask once per ant run.  -->
+        <property name="swfobject.donot.ask" value="set"/>
+    </target>
+
+    <target name="ask-adobe-osmf" unless="osmf.donot.ask"
+        description="Prompt the user before downloading OSMF">
+        
+        <input
+        message="${osmf.prompt.text}"
+        validargs="${yes.no.prompts}"
+        defaultvalue="${no}"
+        addproperty="input.osmf.download"/>
+        <condition property="do.osmf.install">
+            <equals arg1="${yes}" arg2="${input.osmf.download}"/>
+        </condition>
+        <!-- Only ask once per ant run.  -->
+        <property name="osmf.donot.ask" value="set"/>
+    </target>
+
+    <target name="ask-adobe-fontswf" unless="fontswf.donot.ask"
+        description="Prompt the user before downloading FontSWF">
+        
+        <input
+        message="${fontswf.prompt.text}"
+        validargs="${yes.no.prompts}"
+        defaultvalue="${no}"
+        addproperty="input.fontswf.download"/>
+        <condition property="do.fontswf.install">
+            <equals arg1="${yes}" arg2="${input.fontswf.download}"/>
+        </condition>
+        <!-- Only ask once per ant run.  -->
+        <property name="fontswf.donot.ask" value="set"/>
+    </target>
+
+    <target name="ask-adobe-blazeds" unless="blazeds.donot.ask"
+        description="Prompt the user before downloading BlazeDS">
+        
+        <input
+        message="${blazeds.prompt.text}"
+        validargs="${yes.no.prompts}"
+        defaultvalue="${no}"
+        addproperty="input.blazeds.download"/>
+        <condition property="do.blazeds.install">
+            <equals arg1="${yes}" arg2="${input.blazeds.download}"/>
+        </condition>
+        <!-- Only ask once per ant run.  -->
+        <property name="blazeds.donot.ask" value="set"/>
+    </target>
+
+    <target name="get-third-party-files" 
depends="air-download,flash-download,swfobject-download,osmf-download,fontswf-download,blazeds-download"
 />
+    
+    <target name="air-check" description="Checks if AIR SDK has been 
downloaded.">
+        <available file="${FLEX_HOME}/lib/adt.jar" property="air.jar.present"/>
+    </target>
+    
+    <target name="air-download" depends="air-check" unless="air.jar.present"
+        description="Downloads AIR SDK and copies to correct locations">
+        
+        <mkdir dir="${download.dir}"/>
+        <antcall target="air-get" />
+
+        <antcall target="air-setup-win" />
+        <antcall target="air-setup-mac" />
+        
+    </target>
+
+    <target name="air-get-check" >
+        <available file="${download.dir}/${air.sdk.url.file}" 
property="air.downloaded" />
+    </target>
+        
+    <target name="air-get" depends="air-get-check" unless="air.downloaded" >
+        <get src="${air.sdk.url.path}/${air.sdk.url.file}"
+            dest="${download.dir}/${air.sdk.url.file}"
+            verbose="false"/>
+    </target>
+    
+    <target name="air-setup-win" if="isWindows">
+        <unzip src="${download.dir}/${air.sdk.url.file}" 
dest="${download.dir}/airsdk" />
+        <copy todir="${FLEX_HOME}" overwrite="true">
+            <fileset dir="${download.dir}/airsdk">
+                <include name="AIR SDK license.pdf" />
+                <include name="AIR SDK Readme.txt" />
+                <include name="bin/adl.exe" />
+                <include name="bin/adl" />
+                <include name="bin/adl.bat" />
+                <include name="frameworks/libs/air/**" />
+                <include name="frameworks/projects/air/**" />
+                <include name="include/**" />
+                <include name="install/android/**" />
+                <include name="lib/adt.jar" />
+                <include name="lib/android/**" />
+                <include name="lib/aot/**" />
+                <include name="lib/nai/**" />
+                <include name="lib/win/**" />
+                <include name="runtimes/**" />
+                <include name="samples/badge/**" />
+                <include name="samples/descriptor-sample.xml" />
+                <include name="samples/icons/**" />
+                <include name="templates/air/**" />
+            </fileset>
+        </copy>
+    </target>
+    
+    <target name="air-setup-mac" unless="isWindows">
+        <!--The tbz2 contains symlinks which Ant does not preserve
+        <untar compression="bzip2" src="${download.dir}/${air.sdk.url.file}" 
dest="${download.dir}/airsdk" />-->
+        <mkdir dir="${download.dir}/airsdk" />
+        <move file="${download.dir}/${air.sdk.url.file}" 
todir="${download.dir}/airsdk" />
+        <exec executable="bunzip2" dir="${download.dir}/airsdk" >
+            <arg value="${air.sdk.url.file}" />
+        </exec>
+        <echo 
file="${basedir}/airtar.properties">air.tar.name=${air.sdk.url.file}</echo>
+        <replace file="${basedir}/airtar.properties" token="tbz2" value="tar" 
/>
+        <property file="${basedir}/airtar.properties" />
+        <exec executable="tar" dir="${download.dir}/airsdk" >
+            <arg value="-xvf" />
+            <arg value="${air.tar.name}" />
+        </exec>
+        <delete file="${basedir}/airtar.properties" />
+        <antcall target="mac-copy-file">
+            <param name="srcdir" value="." />
+            <param name="filename" value="AIR SDK license.pdf"/>
+            <param name="destdir" value="${FLEX_HOME}" />
+        </antcall>
+        <antcall target="mac-copy-file">
+            <param name="srcdir" value="." />
+            <param name="filename" value="AIR SDK Readme.txt"/>
+            <param name="destdir" value="${FLEX_HOME}" />
+        </antcall>
+        <antcall target="mac-copy-file">
+            <param name="srcdir" value="bin" />
+            <param name="filename" value="adl"/>
+            <param name="destdir" value="${FLEX_HOME}/bin" />
+        </antcall>
+        <antcall target="mac-copy-file">
+            <param name="srcdir" value="lib" />
+            <param name="filename" value="adt.jar"/>
+            <param name="destdir" value="${FLEX_HOME}/lib" />
+        </antcall>
+        <antcall target="mac-copy-file">
+            <param name="srcdir" value="samples" />
+            <param name="filename" value="descriptor-sample.xml"/>
+            <param name="destdir" value="${FLEX_HOME}/samples" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="frameworks/libs/air" />
+            <param name="destdir" value="${FLEX_HOME}/frameworks/libs" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="frameworks/projects/air" />
+            <param name="destdir" value="${FLEX_HOME}/frameworks/projects" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="include" />
+            <param name="destdir" value="${FLEX_HOME}" />
+        </antcall>
+        <antcall target="mac-copy-dir-if-exists">
+            <param name="srcdir" value="install/android" />
+            <param name="destdir" value="${FLEX_HOME}/install" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="lib/android" />
+            <param name="destdir" value="${FLEX_HOME}/lib" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="lib/aot" />
+            <param name="destdir" value="${FLEX_HOME}/lib" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="lib/nai" />
+            <param name="destdir" value="${FLEX_HOME}/lib" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="runtimes" />
+            <param name="destdir" value="${FLEX_HOME}" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="samples/badge" />
+            <param name="destdir" value="${FLEX_HOME}/samples" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="samples/icons" />
+            <param name="destdir" value="${FLEX_HOME}/samples" />
+        </antcall>
+        <antcall target="mac-copy-dir">
+            <param name="srcdir" value="templates/air" />
+            <param name="destdir" value="${FLEX_HOME}/templates" />
+        </antcall>
+    </target>
+    
+    <target name="mac-copy-file" description="copies a file">
+        <mkdir dir="${destdir}" />
+        <exec executable="cp" dir="${FLEX_HOME}">
+            <arg value="-p" />
+            <arg value="${download.dir}/airsdk/${srcdir}/${filename}"/>
+            <arg value="${destdir}" />
+        </exec>
+    </target>
+    
+    <target name="mac-copy-dir" description="copies a directory using exec and 
rsync so that symbolic links are preserved">
+        <echo 
file="${basedir}/maccopy.properties">mac.copy.echo=${mac.copy.echo.pattern}</echo>
+        <property file="${basedir}/maccopy.properties" />
+        <delete file="${basedir}/maccopy.properties" />
+        <echo>${mac.copy.echo}</echo>
+        <exec executable="rsync" dir="${FLEX_HOME}">
+            <arg value="--archive" />
+            <arg value="--ignore-existing" />
+            <arg value="--force" />
+            <arg value="${download.dir}/airsdk/${srcdir}"/>
+            <arg value="${destdir}" />
+        </exec>
+    </target>
+
+    <target name="mac-copy-dir-if-exists" depends="mac-check-exists" 
if="${srcdir}.exists" description="copies a directory using exec and rsync so 
that symbolic links are preserved">
+        <echo 
file="${basedir}/maccopy.properties">mac.copy.echo=${mac.copy.echo.pattern}</echo>
+        <property file="${basedir}/maccopy.properties" />
+        <echo>${mac.copy.echo}</echo>
+        <exec executable="rsync" dir="${FLEX_HOME}">
+            <arg value="--archive" />
+            <arg value="--ignore-existing" />
+            <arg value="--force" />
+            <arg value="${download.dir}/airsdk/${srcdir}"/>
+            <arg value="${destdir}" />
+        </exec>
+    </target>
+    
+    <target name="mac-check-exists">
+        <available file="${download.dir}/airsdk/${srcdir}" type="dir" 
property="${srcdir}.exists" />
+    </target>
+
+    <!-- Because this requires a network connection it downloads Flash SDK 
only if it doesn't already exist. -->
+    <target name="flash-check" description="Checks if Flash SDK has been 
downloaded.">
+        <available 
file="${FLEX_HOME}/frameworks/libs/player/${flash.sdk.version}/playerglobal.swc"
 property="flash.swc.present"/>
+    </target>
+    
+    <target name="flash-download" depends="flash-check" 
unless="flash.swc.present"
+        description="Downloads playerglobal.swc and copies to correct 
locations">
+        
+        <mkdir dir="${download.dir}"/>
+        <mkdir dir="${FLEX_HOME}/frameworks/libs/player/${flash.sdk.version}"/>
+        <get src="${flash.sdk.url.path}/${flash.sdk.url.file}"
+        
dest="${FLEX_HOME}/frameworks/libs/player/${flash.sdk.version}/playerglobal.swc"
+        verbose="false"/>
+    </target>
+    
+    <!-- swfobject.js (Version 2.2) -->
+    <!-- Because this requires a network connection it downloads SWFObject 
only if it doesn't already exist. -->
+    <target name="swfobject-check" description="Checks if SWFObject has been 
downloaded.">
+        <available file="${basedir}/../templates/swfobject/swfobject.js" 
property="swfobject.js.present"/>
+    </target>
+    
+    <target name="swfobject-download" depends="swfobject-check" 
unless="swfobject.js.present"
+        description="Copies SWFObject from code.google.com">
+        
+        <mkdir dir="${download.dir}"/>
+        <get src="http://swfobject.googlecode.com/files/swfobject_2_2.zip";
+            dest="${download.dir}/swfobject_2_2.zip"
+            verbose="false"/>
+        
+        <unzip src="${download.dir}/swfobject_2_2.zip" 
dest="${FLEX_HOME}/templates">
+            <patternset>
+                <include name="swfobject/expressInstall.swf"/>
+                <include name="swfobject/swfobject.js"/>
+            </patternset>
+        </unzip>
+    </target>
+    
+    <!-- osmf (Version 2.0) -->
+    <!-- Because this requires a network connection it downloads OSMF only if 
it doesn't already exist. -->
+    <target name="osmf-check" description="Checks if OSMF has been 
downloaded.">
+        <available file="${basedir}/frameworks/libs/osmf.swc" 
property="osmf.swc.present"/>
+    </target>
+    
+    <target name="osmf-download" depends="osmf-check" unless="osmf.swc.present"
+        description="Copies OSMF from Open@Adobe">
+        
+        <mkdir dir="${basedir}/frameworks/libs/"/>
+        <get 
src="http://downloads.sourceforge.net/project/osmf.adobe/OSMF%202.0%20Release%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20release%20notes%29/OSMF.swc";
+        dest="${basedir}/frameworks/libs/OSMF.swc"
+        verbose="false"/>
+        
+    </target>
+
+    <!-- fontswf -->
+    <!-- Because this requires a network connection it downloads only if it 
doesn't already exist. -->
+    <target name="fontswf-check" description="Checks if fontswf has been 
downloaded.">
+        <condition property="fontswf.jars.present">
+            <and>
+                <available file="${basedir}/lib/external/optional/afe.jar" />
+                <available file="${basedir}/lib/external/optional/aglj40.jar" 
/>
+                <available 
file="${basedir}/lib/external/optional/flex-fontkit.jar" />
+                <available file="${basedir}/lib/external/optional/rideau.jar" 
/>
+            </and>
+        </condition>
+    </target>
+
+    <target name="fontswf-download" depends="fontswf-check" 
unless="fontswf.jars.present"
+        description="Copies OSMF from Open@Adobe">
+        
+        <mkdir dir="${basedir}/lib/external/optional"/>
+        <get 
src="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/afe.jar";
+        dest="${basedir}/lib/external/optional/afe.jar"
+        verbose="false"/>
+        <get 
src="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/aglj40.jar";
+        dest="${basedir}/lib/external/optional/aglj40.jar"
+        verbose="false"/>
+        <get 
src="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/flex-fontkit.jar";
+        dest="${basedir}/lib/external/optional/flex-fontkit.jar"
+        verbose="false"/>
+        <get 
src="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/rideau.jar";
+        dest="${basedir}/lib/external/optional/rideau.jar"
+        verbose="false"/>
+    </target>
+
+    <!-- BlazeDS  -->
+    <!-- Because this requires a network connection it downloads BlazeDS only 
if it doesn't already exist. -->
+    <target name="blazeds-check" description="Checks if BlazeDS has been 
downloaded.">
+        <available 
file="${basedir}/external/optional/flex-messaging-common.jar" 
property="blazeds.jar.present"/>
+    </target>
+
+    <target name="blazeds-download" depends="blazeds-check" 
unless="blazeds.jar.present"
+        description="Copies BlazeDS from Open@Adobe">
+        
+        <mkdir dir="${basedir}/lib/external/optional"/>
+        <get 
src="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/flex-messaging-common.jar";
+        dest="${basedir}/lib/external/optional/flex-messaging-common.jar"
+        verbose="false"/>
+    </target>
+
+
+    <target name="fixup-config-files">
+        <replace file="${FLEX_HOME}/frameworks/flex-config.xml">
+            <replacefilter token="@playerversion@"
+                            value="${flash.sdk.version}"/>
+            <replacefilter token="@swfversion@"
+                            value="${flash.sdk.swfversion}"/>
+            <replacefilter token="@locale@"
+                            value="${bundle}"/>
+            <replacefilter token="{playerglobalHome}"
+                            value="libs/player"/>
+        </replace>
+    </target>
+    
+</project>

Reply via email to