You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2013/01/28 11:03:41 UTC
svn commit: r1439326 - in /flex/asjs/branches/develop/publisher: README
build.properties build.xml
Author: erikdebruin
Date: Mon Jan 28 10:03:41 2013
New Revision: 1439326
URL: http://svn.apache.org/viewvc?rev=1439326&view=rev
Log:
- updated ASJS Publisher to work on Windows
- updated the README with new instructions and notes about the Python 2.7 requirement
Modified:
flex/asjs/branches/develop/publisher/README
flex/asjs/branches/develop/publisher/build.properties
flex/asjs/branches/develop/publisher/build.xml
Modified: flex/asjs/branches/develop/publisher/README
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/publisher/README?rev=1439326&r1=1439325&r2=1439326&view=diff
==============================================================================
--- flex/asjs/branches/develop/publisher/README (original)
+++ flex/asjs/branches/develop/publisher/README Mon Jan 28 10:03:41 2013
@@ -34,8 +34,16 @@ Prerequisites
http://closure-compiler.googlecode.com/files/compiler-latest.zip
3) Get the Falcon compilers
-
- svn checkout https://svn.apache.org/repos/asf/flex/falcon/trunk falcon
+
+ svn checkout https://svn.apache.org/repos/asf/flex/falcon/trunk falcon
+
+ 4) The Closure Tools use Python scripts. These scripts are designed to work
+ with Python 2.7. Make sure your system can properly execute Python
+ scripts... For info on checking your system's capabilities and, when
+ needed, for instructions on how to install the proper version of Python
+ on your system, please visit:
+
+ http://www.python.org/
Preparing for publishing
------------------------
Modified: flex/asjs/branches/develop/publisher/build.properties
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/publisher/build.properties?rev=1439326&r1=1439325&r2=1439326&view=diff
==============================================================================
--- flex/asjs/branches/develop/publisher/build.properties (original)
+++ flex/asjs/branches/develop/publisher/build.properties Mon Jan 28 10:03:41 2013
@@ -17,6 +17,8 @@
##
################################################################################
+# NOTE: on Windows, use FORWARD slashes instead of the regular backslashes.
+
# Location of the Google Closure Compiler
DIR_CLOSURE_COMPILER=/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/compiler
@@ -26,5 +28,5 @@ DIR_CLOSURE_LIBRARY=/Users/erik/Document
# Location of the Vanilla SDK framework
DIR_FRAMEWORK=/Users/erik/Documents/ApacheFlex/repo/asjs/frameworks/js/VanillaSDK
-# Location of the FalconJx mxmlc script
-FILE_FALCONJS_COMPILE_SCRIPT=/Users/erik/Documents/ApacheFlex/repo/falcon/compiler.jx/bin/mxmlc
+# Location of the FalconJx mxmlc script (on Windows, don't include the .bat extension)
+FILE_FALCONJX_COMPILE_SCRIPT=/Users/erik/Documents/ApacheFlex/repo/falcon/compiler.jx/bin/mxmlc
Modified: flex/asjs/branches/develop/publisher/build.xml
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/publisher/build.xml?rev=1439326&r1=1439325&r2=1439326&view=diff
==============================================================================
--- flex/asjs/branches/develop/publisher/build.xml (original)
+++ flex/asjs/branches/develop/publisher/build.xml Mon Jan 28 10:03:41 2013
@@ -18,22 +18,36 @@
-->
<project name="asjsPublisher" default="main" basedir=".">
- <property file="${basedir}/build.properties" description="Properties for the ASJS Publisher" />
+ <property file="${basedir}/build.properties"
+ description="Properties for the ASJS Publisher" />
- <basename property="PROJECT_NAME" file="${project.main.file}" suffix=".as" />
+ <condition property="isWindows">
+ <os family="windows" />
+ </condition>
- <dirname property="DIR_PROJECT" file="${project.main.file}/.." />
-
- <property name="DIR_CLOSURE_THIRD_PARTY" location="${DIR_CLOSURE_LIBRARY}/third_party/closure/goog" />
- <property name="DIR_CLOSURE_SCRIPTS" location="${DIR_CLOSURE_LIBRARY}/closure/bin/build" />
+ <basename property="PROJECT_NAME"
+ file="${project.main.file}" suffix=".as" />
- <property name="DIR_INTERMEDIATE_APPLICATION" location="${DIR_PROJECT}/js-intermediate" />
- <property name="DIR_RELEASE_APPLICATION" location="${DIR_PROJECT}/js-release" />
+ <dirname property="DIR_PROJECT"
+ file="${project.main.file}/.." />
- <property name="FILE_DEPS" location="${DIR_INTERMEDIATE_APPLICATION}/deps.js" />
- <property name="FILE_HTML_TEMPLATE" location="index.html.template" />
- <property name="FILE_OUTPUT_MAIN" location="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.js" />
+ <property name="DIR_CLOSURE_THIRD_PARTY"
+ location="${DIR_CLOSURE_LIBRARY}/third_party/closure/goog" />
+ <property name="DIR_CLOSURE_SCRIPTS"
+ location="${DIR_CLOSURE_LIBRARY}/closure/bin/build" />
+ <property name="DIR_INTERMEDIATE_APPLICATION"
+ location="${DIR_PROJECT}/js-intermediate" />
+ <property name="DIR_RELEASE_APPLICATION"
+ location="${DIR_PROJECT}/js-release" />
+
+ <property name="FILE_DEPS"
+ location="${DIR_INTERMEDIATE_APPLICATION}/deps.js" />
+ <property name="FILE_HTML_TEMPLATE"
+ location="index.html.template" />
+ <property name="FILE_OUTPUT_MAIN"
+ location="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.js" />
+
<macrodef name="depsWriter">
<sequential>
<exec executable="python" failonerror="true" logError="true">
@@ -64,10 +78,9 @@
</sequential>
</macrodef>
- <!-- target name="main" description="Compiles framework files"
- depends="clean,createDirs,prepareOutput,falconJx,calculateDependencies,closureBuilding,createIntermediateOutput,createReleaseOutput" / -->
<target name="main" description="Compiles framework files"
- depends="clean,createDirs,prepareOutput,falconJx,calculateDependencies,closureBuilding,createIntermediateOutput,createReleaseOutput" />
+ depends="clean,createDirs,prepareOutput,falconJx,calculateDependencies,
+ closureBuilding,createIntermediateOutput,createReleaseOutput" />
<target name="createDirs">
<echo>Create 'intermediate' and 'release' directory structure</echo>
@@ -76,7 +89,9 @@
</target>
<target name="prepareOutput">
- <echo>Creating 'intermediate' and 'release' target directory requirements</echo>
+ <echo>
+ Creating 'intermediate' and 'release' target directory requirements
+ </echo>
<copy todir="${DIR_INTERMEDIATE_APPLICATION}/goog">
<fileset dir="${DIR_CLOSURE_LIBRARY}/closure/goog" />
</copy>
@@ -88,9 +103,17 @@
</copy>
</target>
- <target name="falconJx">
+ <target name="ifWindows" if="isWindows">
+ <property name="FILE_SUFFIX" value=".bat" />
+ </target>
+
+ <target name="ifOtherOS" unless="isWindows">
+ <property name="FILE_SUFFIX" value="" />
+ </target>
+
+ <target name="falconJx" depends="ifWindows,ifOtherOS">
<echo>Compiling the AS project into intermediate JS</echo>
- <exec executable="${FILE_FALCONJS_COMPILE_SCRIPT}">
+ <exec executable="${FILE_FALCONJX_COMPILE_SCRIPT}${FILE_SUFFIX}">
<arg value="${DIR_PROJECT}/src/${PROJECT_NAME}.as"/>
<arg value="-output=${FILE_OUTPUT_MAIN}"/>
</exec>
@@ -119,23 +142,53 @@ goog.exportSymbol('${PROJECT_NAME}', ${P
<target name="createIntermediateOutput">
<echo>Creating 'intermediate' playback project</echo>
- <copy file="${FILE_HTML_TEMPLATE}" tofile="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.html" overwrite="true" />
- <move file="${DIR_INTERMEDIATE_APPLICATION}/goog/base.js" todir="${DIR_INTERMEDIATE_APPLICATION}" />
- <replace file="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.html" token="@INTERMEDIATE_OPEN@" value="" />
- <replace file="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.html" token="@INTERMEDIATE_CLOSE@" value="" />
- <replace file="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.html" token="@RELEASE_OPEN@" value="!-- " />
- <replace file="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.html" token="@RELEASE_CLOSE@" value=" --" />
- <replace file="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.html" token="@APPLICATION_NAME@" value="${PROJECT_NAME}" />
+ <copy file="${FILE_HTML_TEMPLATE}"
+ tofile="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.html"
+ overwrite="true" />
+ <move file="${DIR_INTERMEDIATE_APPLICATION}/goog/base.js"
+ todir="${DIR_INTERMEDIATE_APPLICATION}" />
+ <echo file="${DIR_INTERMEDIATE_APPLICATION}/${PROJECT_NAME}.html"><![CDATA[
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+ <script type="text/javascript" src="./base.js"></script>
+ <script type="text/javascript">
+ goog.require("${PROJECT_NAME}");
+ </script>
+</head>
+<body>
+ <script type="text/javascript">
+ new ${PROJECT_NAME}();
+ </script>
+</body>
+</html>
+ ]]></echo>
</target>
<target name="createReleaseOutput">
<echo>Creating 'release' playback project</echo>
- <copy file="${FILE_HTML_TEMPLATE}" tofile="${DIR_RELEASE_APPLICATION}/${PROJECT_NAME}.html" overwrite="true" />
- <replace file="${DIR_RELEASE_APPLICATION}/${PROJECT_NAME}.html" token="@INTERMEDIATE_OPEN@" value="!-- " />
- <replace file="${DIR_RELEASE_APPLICATION}/${PROJECT_NAME}.html" token="@INTERMEDIATE_CLOSE@" value=" --" />
- <replace file="${DIR_RELEASE_APPLICATION}/${PROJECT_NAME}.html" token="@RELEASE_OPEN@" value="" />
- <replace file="${DIR_RELEASE_APPLICATION}/${PROJECT_NAME}.html" token="@RELEASE_CLOSE@" value="" />
- <replace file="${DIR_RELEASE_APPLICATION}/${PROJECT_NAME}.html" token="@APPLICATION_NAME@" value="${PROJECT_NAME}" />
+ <copy file="${FILE_HTML_TEMPLATE}"
+ tofile="${DIR_RELEASE_APPLICATION}/${PROJECT_NAME}.html"
+ overwrite="true" />
+ <echo file="${DIR_RELEASE_APPLICATION}/${PROJECT_NAME}.html"><![CDATA[
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+ <script type="text/javascript" src="./${PROJECT_NAME}.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+ new ${PROJECT_NAME}();
+ </script>
+</body>
+</html>
+ ]]></echo>
</target>
<!--
@@ -144,7 +197,8 @@ goog.exportSymbol('${PROJECT_NAME}', ${P
-->
- <target name="clean" description="Clean up previous runs" depends="cleanIntermediate,cleanRelease">
+ <target name="clean" description="Clean up previous runs"
+ depends="cleanIntermediate,cleanRelease">
<echo>Delete 'intermediate' and 'release' directories</echo>
</target>