Revert "bundle Google Closure Library"
We will no longer bundle and go back to requiring downloading but now from GH
This reverts commit 4f3efbcc5592ef9eb208efcea39f337727561f8e.


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

Branch: refs/heads/develop
Commit: efe2de0a6d8d25233212afb524b8b1e34f701ff2
Parents: 00d960d
Author: Alex Harui <aha...@apache.org>
Authored: Thu Jun 26 00:18:16 2014 -0700
Committer: Alex Harui <aha...@apache.org>
Committed: Thu Jun 26 00:18:16 2014 -0700

----------------------------------------------------------------------
 build.xml     | 15 ++------------
 installer.xml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 57 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/efe2de0a/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index e300e2a..740a9ee 100644
--- a/build.xml
+++ b/build.xml
@@ -754,15 +754,6 @@
     <target name="stage-nightly" if="nightly" description="add 
nightly.properties if nightly build">
         <copy todir="${basedir}/temp" file="${basedir}/nightly.properties" />
     </target>
-    
-    <target name="stage-goog" description="add google closure library to 
binary package">
-        <mkdir dir="${basedir}/temp/js/lib/google/closure-library" />
-        <copy todir="${basedir}/temp/js/lib/google/closure-library" >
-            <fileset dir="${GOOG_HOME}" >
-                <include name="**/*"/>
-            </fileset>
-        </copy>
-    </target>
 
     <target name="binary-package"
         description="Package binary files in zip and tar-gzip file.">
@@ -832,10 +823,8 @@
             </fileset>
         </copy>
          -->
-        
-        <antcall target="stage-goog" />
-        
-        <antcall target="binary-package-zip"/>
+                 
+        <antcall target="binary-package-zip"/>        
         <antcall target="binary-package-tgz"/>
         <copy todir="${basedir}/out" 
file="${basedir}/apache-flex-flexjs-installer-config.xml" />
     </target>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/efe2de0a/installer.xml
----------------------------------------------------------------------
diff --git a/installer.xml b/installer.xml
index 1bd20b7..e6b1ea1 100644
--- a/installer.xml
+++ b/installer.xml
@@ -61,6 +61,11 @@
     <property name="flexjs.version" value="0.0.2"/>
     <property name="falcon.version" value="0.0.2"/>
     
+    <property name="goog.lib.url.server" value="https://github.com"; />
+    <property name="goog.lib.url.folder" 
value="google/closure-library/archive" />
+    <property name="goog.lib.url.file" value="master.zip" />
+    <property name="goog.lib.md5" value="9711bb32b35550f8cc49d7aac6b2c41c" />
+
     <property name="swfobject.url.server" value="https://github.com"; />
     <property name="swfobject.url.folder" value="swfobject/swfobject/archive" 
/>
     <property name="swfobject.url.file" value="2.2.zip" />
@@ -89,6 +94,9 @@
     </condition>
     <property name="AIRDownloadEcho" 
value="${INFO_DOWNLOADING_AIR_RUNTIME_KIT_MAC}" />
 
+    <condition property="goog.donot.ask" value="true">
+        <isset property="installer" />
+    </condition>
     <condition property="air.donot.ask" value="true">
         <isset property="installer" />
     </condition>
@@ -280,9 +288,24 @@
         </fail>
     </target>
     
-    <target name="ask-licenses" depends="ask-air,ask-flash,ask-swfobject" 
description="Ask about the various licenses">
+    <target name="ask-licenses" 
depends="ask-goog,ask-air,ask-flash,ask-swfobject" description="Ask about the 
various licenses">
        </target>
     
+    <target name="ask-goog" unless="goog.donot.ask"
+        description="Prompt the user before downloading Google Closure 
Library">
+        
+        <input
+        message="${goog.prompt.text}"
+        validargs="${yes.no.prompts}"
+        defaultvalue="${no}"
+        addproperty="input.goog.download"/>
+        <condition property="do.goog.install">
+            <equals arg1="${yes}" arg2="${input.goog.download}"/>
+        </condition>
+        <!-- Only ask once per ant run.  -->
+        <property name="goog.donot.ask" value="set"/>
+    </target>
+    
     <target name="ask-air" unless="air.donot.ask"
         description="Prompt the user before downloading AIR">
         
@@ -463,7 +486,36 @@
         </antcall>
     </target>
 
-    <target name="get-third-party-files" 
depends="air-download,flash-download,swfobject-download" />
+    <target name="get-third-party-files" 
depends="goog-download,air-download,flash-download,swfobject-download" />
+    
+    <!-- Because this requires a network connection it downloads artifacts 
only if it doesn't already exist. -->
+    <target name="goog-check" description="Checks if Google Closure Library 
has been downloaded.">
+        <available 
file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" 
property="goog.lib.present"/>
+    </target>
+    
+    <target name="goog-download" depends="goog-check" unless="goog.lib.present"
+        description="Downloads Google Closure Library and copies to correct 
locations">
+        
+        <mkdir dir="${download.dir}"/>
+        <antcall target="goog-get" />
+        <unzip src="${download.dir}/${goog.lib.url.file}" 
dest="${FLEXJS_HOME}/js/lib/google/closure-library" />
+    </target>
+    
+    <target name="goog-get-check" >
+        <available file="${download.dir}/${goog.lib.url.file}" 
property="goog.downloaded" />
+    </target>
+            
+    <target name="goog-get" depends="goog-get-check" unless="goog.downloaded" >
+        <echo>${INFO_INSTALLING_GOOG} 
${goog.lib.url.server}/${goog.lib.url.folder}/${goog.lib.url.file}</echo>
+        <antcall target="download_using_get" >
+            <param name="srcDomain" value="${goog.lib.url.server}" />
+            <param name="srcFolder" value="${goog.lib.url.folder}" />
+            <param name="srcFile" value="${goog.lib.url.file}" />
+            <param name="dest" value="${download.dir}/${goog.lib.url.file}" />
+                       <param name="failmessage" value="Google Closure Library 
download failed" />
+                       <param name="md5" value="${goog.lib.md5}" />
+        </antcall>
+    </target>
     
     <target name="air-check" description="Checks if AIR SDK has been 
downloaded.">
         <available file="${FLEXJS_HOME}/lib/adt.jar" 
property="air.jar.present"/>
@@ -716,7 +768,7 @@
     </target>
     
     <target name="swfobject-download" depends="swfobject-check" 
unless="swfobject.js.present"
-        description="Copies SWFObject from github.com">
+        description="Copies SWFObject from code.google.com">
         
         <echo 
file="${basedir}/swfobject.properties">swfobject.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
         <replace file="${basedir}/swfobject.properties" token="{0}" 
value="${swfobject.url.file}" />

Reply via email to