This is an automated email from the ASF dual-hosted git repository. carlosrovira pushed a commit to branch feature/jewel-ui-set in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 4a48a11715acb8f9acd92ad10065eff53e9a304b Author: Alex Harui <[email protected]> AuthorDate: Wed Mar 14 09:34:23 2018 -0700 Ant build for Jewel project, theme and example --- examples/royale/JewelExample/build.xml | 4 - .../src/main/config/compile-app-config.xml | 1 + .../JewelTheme => js/projects/JewelJS}/build.xml | 105 ++++++++++----------- .../JewelJS/src/main/config/compile-js-config.xml} | 54 ++++++----- .../src/main/config/compile-js-config.xml} | 53 ++++++----- frameworks/themes/JewelTheme/build.xml | 4 +- .../src/main/config/compile-swf-config.xml | 5 - .../src/main/resources/royale-jewel-blue.css | 1 + 8 files changed, 115 insertions(+), 112 deletions(-) diff --git a/examples/royale/JewelExample/build.xml b/examples/royale/JewelExample/build.xml index b0cb3d3..5d5d8d3 100644 --- a/examples/royale/JewelExample/build.xml +++ b/examples/royale/JewelExample/build.xml @@ -43,10 +43,6 @@ <include name="**" /> </fileset> </copy> - <replace file="${basedir}/bin/js-debug/index.html" token="${primary}" value="indigo" /> - <replace file="${basedir}/bin/js-debug/index.html" token="${accent}" value="pink" /> - <replace file="${basedir}/bin/js-release/index.html" token="${primary}" value="indigo" /> - <replace file="${basedir}/bin/js-release/index.html" token="${accent}" value="pink" /> </target> <target name="clean"> diff --git a/examples/royale/JewelExample/src/main/config/compile-app-config.xml b/examples/royale/JewelExample/src/main/config/compile-app-config.xml index df6ea5b..d81fba3 100644 --- a/examples/royale/JewelExample/src/main/config/compile-app-config.xml +++ b/examples/royale/JewelExample/src/main/config/compile-app-config.xml @@ -23,6 +23,7 @@ <compiler> <theme> <filename>../../../../../../frameworks/libs/JewelTheme.swc</filename> + <filename>../../../../../../frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css</filename> </theme> </compiler> </royale-config> diff --git a/frameworks/themes/JewelTheme/build.xml b/frameworks/js/projects/JewelJS/build.xml similarity index 50% copy from frameworks/themes/JewelTheme/build.xml copy to frameworks/js/projects/JewelJS/build.xml index 6174e3e..151360c 100644 --- a/frameworks/themes/JewelTheme/build.xml +++ b/frameworks/js/projects/JewelJS/build.xml @@ -19,8 +19,8 @@ --> -<project name="JewelTheme" default="main" basedir="."> - <property name="ROYALE_HOME" location="../../.."/> +<project name="JewelJS" default="main" basedir="."> + <property name="ROYALE_HOME" location="../../../.."/> <property file="${ROYALE_HOME}/env.properties"/> <property environment="env"/> @@ -28,40 +28,17 @@ <property name="ROYALE_HOME" value="${ROYALE_HOME}"/> <property name="target.name" value="${ant.project.name}.swc" /> + <echo file="${basedir}/${target.name}.properties">target.name.nojs=${ant.project.name}</echo> + <replaceregexp file="${basedir}/${target.name}.properties" match="(.*)JS$" replace="\1" flags="m" /> + <property file="${basedir}/${target.name}.properties"/> + <delete file="${basedir}/${target.name}.properties"/> - <!-- doesn't contain compiled files so only need to compile JS version --> - <target name="main" depends="clean,check-compiler,compile,compile-js,copy-swc,test" description="Full build of ${ant.project.name}.swc"> - </target> - - <target name="compile-js"> - <!-- doesn't contain compiled files so only need to compile JS version - <ant dir="${ROYALE_HOME}/frameworks/js/projects/${ant.project.name}JS/" inheritAll="false" > - <property name="ROYALE_SWF_COMPILER_HOME" value="${ROYALE_SWF_COMPILER_HOME}"/> - <property name="ROYALE_COMPILER_HOME" value="${ROYALE_COMPILER_HOME}"/> - <property name="ROYALE_HOME" value="${ROYALE_HOME}"/> - </ant> - --> - </target> - - <target name="copy-swc" if="env.AIR_HOME"> - <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/libs/${target.name}" /> - </target> - - <target name="check-for-tests" > - <condition property="skip-tests" > - <not> - <available file="${basedir}/src/test/royale/build.xml" /> - </not> - </condition> - </target> - - <target name="test" depends="check-for-tests" unless="skip-tests"> - <ant dir="src/test/royale" /> + <target name="main" depends="clean,check-compiler,compile" description="Full build of ${ant.project.name}.swc"> </target> <target name="clean"> <delete failonerror="false"> - <fileset dir="${ROYALE_HOME}/frameworks/libs"> + <fileset dir="${ROYALE_HOME}/frameworks/js/libs"> <include name="${target.name}"/> </fileset> </delete> @@ -70,61 +47,75 @@ <include name="**/**"/> </fileset> </delete> - <antcall target="clean-tests" /> </target> - <target name="clean-tests" depends="check-for-tests" unless="skip-tests"> - <ant dir="src/test/royale" target="clean"/> - </target> - - <target name="compile" description="Compiles .as files into .swc" if="env.AIR_HOME"> - <echo message="Compiling libs/${ant.project.name}.swc"/> - <echo message="ROYALE_HOME: ${ROYALE_HOME}"/> - <echo message="ROYALE_SWF_COMPILER_HOME: ${ROYALE_SWF_COMPILER_HOME}"/> + <target name="compile" depends="check-compiler"> + <echo message="Cross-compiling ${target.name}"/> <echo message="ROYALE_COMPILER_HOME: ${ROYALE_COMPILER_HOME}"/> - + <mkdir dir="${basedir}/target/generated-sources/royale"/> <java jar="${ROYALE_COMPILER_HOME}/lib/compc.jar" fork="true" > <jvmarg value="-Xmx384m" /> <jvmarg value="-Dsun.io.useCanonCaches=false" /> <jvmarg value="-Droyalelib=${ROYALE_HOME}/frameworks" /> <arg value="+royalelib=${ROYALE_HOME}/frameworks" /> - <arg value="+playerglobal.version=${playerglobal.version}" /> - <arg value="+env.AIR_HOME=${env.AIR_HOME}" /> <arg value="-compiler.strict-xml=true" /> - <arg value="-compiler.targets=SWF" /> + <arg value="-compiler.targets=SWF,JSRoyale" /> <arg value="-output=${basedir}/target/${target.name}" /> - <arg value="-load-config=${basedir}/src/main/config/compile-swf-config.xml" /> - <arg value="-js-load-config=${ROYALE_HOME}/frameworks/js-config.xml" /> - <arg value="-js-load-config+=${basedir}/../../js/projects/${ant.project.name}JS/src/main/config/compile-js-config.xml" /> + <arg value="-load-config=${ROYALE_HOME}/frameworks/js-config.xml" /> + <arg value="-load-config+=${basedir}/src/main/config/compile-js-config.xml" /> </java> + <copy file="${basedir}/target/${target.name}" tofile="${ROYALE_HOME}/frameworks/js/libs/${target.name}" /> </target> - <target name="check-compiler" depends="check-compiler-home,check-transpiler-home"> + <target name="copy-js" > + <mkdir dir="${ROYALE_HOME}/frameworks/js/generated-sources"/> + <copy todir="${ROYALE_HOME}/frameworks/js/generated-sources"> + <fileset dir="${basedir}/target/generated-sources/royale"> + <include name="**/**" /> + </fileset> + </copy> + </target> + + <target name="check-compiler" depends="check-compiler-home, check-transpiler-home"> <path id="lib.path"> <fileset dir="${ROYALE_COMPILER_HOME}/lib" includes="compiler-royaleTasks.jar"/> </path> <taskdef resource="flexTasks.tasks" classpathref="lib.path"/> </target> - <target name="check-compiler-home" - description="Set ROYALE_SWF_COMPILER_HOME to point at the compiler."> + <target name="check-compiler-home" unless="ROYALE_SWF_COMPILER_HOME" + description="Check ROYALE_SWF_COMPILER_HOME is a directory."> - <available file="${ROYALE_HOME}/lib/compiler-mxmlc.jar" + <echo message="ROYALE_SWF_COMPILER_HOME is ${env.ROYALE_SWF_COMPILER_HOME}"/> + + <available file="${env.ROYALE_SWF_COMPILER_HOME}/lib/compiler-mxmlc.jar" type="file" property="ROYALE_SWF_COMPILER_HOME" - value="${ROYALE_HOME}"/> + value="${env.ROYALE_SWF_COMPILER_HOME}"/> - <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or the root of a Royale SDK" + <available file="${ROYALE_HOME}/../royale-compiler/compiler/lib/compiler-mxmlc.jar" + type="file" + property="ROYALE_SWF_COMPILER_HOME" + value="${ROYALE_HOME}/../royale-compiler/compiler"/> + + <fail message="ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder containing compiler-mxmlc.jar such as the compiler folder in royale-compiler repo or a Royale SDK folder" unless="ROYALE_SWF_COMPILER_HOME"/> </target> - <target name="check-transpiler-home" - description="Set ROYALE_COMPILER_HOME to point at the cross-compiler."> + <target name="check-transpiler-home" unless="ROYALE_COMPILER_HOME" + description="Check ROYALE_SWF_COMPILER_HOME is a directory."> + + <echo message="ROYALE_COMPILER_HOME is ${env.ROYALE_COMPILER_HOME}"/> + + <available file="${env.ROYALE_COMPILER_HOME}/lib/jsc.jar" + type="file" + property="ROYALE_COMPILER_HOME" + value="${env.ROYALE_COMPILER_HOME}"/> - <available file="${ROYALE_HOME}/js/lib/jsc.jar" + <available file="${ROYALE_HOME}/../royale-compiler/compiler-jx/lib/jsc.jar" type="file" property="ROYALE_COMPILER_HOME" - value="${ROYALE_HOME}/js"/> + value="${ROYALE_HOME}/../royale-compiler/compiler-jx"/> <fail message="ROYALE_COMPILER_HOME must be set to a folder with a lib sub-folder containing jsc.jar such as the compiler-jx folder in royale-compiler repo or the js folder of a Royale SDK" unless="ROYALE_COMPILER_HOME"/> diff --git a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml b/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml similarity index 57% copy from frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml copy to frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml index bb3e613..c49c05c 100644 --- a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml +++ b/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml @@ -23,21 +23,11 @@ <!-- build both SWF and JS. --> <targets> + <target>SWF</target> <target>JSRoyale</target> </targets> <strict-xml>true</strict-xml> - <external-library-path> - <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element> - <path-element>../../../../../libs/Binding.swc</path-element> - <path-element>../../../../../libs/Core.swc</path-element> - <path-element>../../../../../libs/Graphics.swc</path-element> - <path-element>../../../../../libs/Basic.swc</path-element> - <path-element>../../../../../libs/Collections.swc</path-element> - <path-element>../../../../../libs/HTML.swc</path-element> - </external-library-path> - - <allow-subclass-overrides>true</allow-subclass-overrides> <mxml> <children-as-data>true</children-as-data> </mxml> @@ -47,7 +37,7 @@ <define> <name>COMPILE::SWF</name> - <value>true</value> + <value>false</value> </define> <define> <name>COMPILE::JS</name> @@ -64,10 +54,29 @@ <locale/> - <library-path/> - + <!-- overwrite the default library-path setting --> + <library-path> + <path-element>../../../../../../../js/libs/GCL.swc</path-element> + <!-- asjscompc won't 'link' these classes in, but will list their requires + if these swcs are on the external-library-path then their requires + will not be listed --> + <path-element>../../../../../libs/BindingJS.swc</path-element> + <path-element>../../../../../libs/CoreJS.swc</path-element> + <path-element>../../../../../libs/GraphicsJS.swc</path-element> + <path-element>../../../../../libs/CollectionsJS.swc</path-element> + <path-element>../../../../../libs/BasicJS.swc</path-element> + <path-element>../../../../../libs/HTMLJS.swc</path-element> + </library-path> + + <namespaces> + <namespace> + <uri>library://ns.apache.org/royale/jewel</uri> + <manifest>../../../../../../projects/Jewel/src/main/resources/jewel-manifest.xml</manifest> + </namespace> + </namespaces> + <source-path> - <path-element>../royale</path-element> + <path-element>../../../../../../projects/Jewel/src/main/royale</path-element> </source-path> <warn-no-constructor>false</warn-no-constructor> @@ -75,16 +84,19 @@ <include-file> <name>defaults.css</name> - <path>../resources/defaults.css</path> + <path>../../../../../../projects/Jewel/src/main/resources/defaults.css</path> </include-file> - - <include-lookup-only>true</include-lookup-only> + + <include-sources> + </include-sources> <include-classes> - <class>JewelThemeClasses</class> + <class>JewelClasses</class> </include-classes> - <target-player>${playerglobal.version}</target-player> - + <include-namespaces> + <uri>library://ns.apache.org/royale/jewel</uri> + </include-namespaces> + </royale-config> diff --git a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml b/frameworks/js/themes/JewelThemeJS/src/main/config/compile-js-config.xml similarity index 59% copy from frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml copy to frameworks/js/themes/JewelThemeJS/src/main/config/compile-js-config.xml index bb3e613..f663b1c 100644 --- a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml +++ b/frameworks/js/themes/JewelThemeJS/src/main/config/compile-js-config.xml @@ -23,21 +23,11 @@ <!-- build both SWF and JS. --> <targets> + <target>SWF</target> <target>JSRoyale</target> </targets> <strict-xml>true</strict-xml> - <external-library-path> - <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element> - <path-element>../../../../../libs/Binding.swc</path-element> - <path-element>../../../../../libs/Core.swc</path-element> - <path-element>../../../../../libs/Graphics.swc</path-element> - <path-element>../../../../../libs/Basic.swc</path-element> - <path-element>../../../../../libs/Collections.swc</path-element> - <path-element>../../../../../libs/HTML.swc</path-element> - </external-library-path> - - <allow-subclass-overrides>true</allow-subclass-overrides> <mxml> <children-as-data>true</children-as-data> </mxml> @@ -47,7 +37,7 @@ <define> <name>COMPILE::SWF</name> - <value>true</value> + <value>false</value> </define> <define> <name>COMPILE::JS</name> @@ -64,27 +54,44 @@ <locale/> - <library-path/> - + <!-- overwrite the default library-path setting --> + <library-path> + <path-element>../../../../../../../js/libs/GCL.swc</path-element> + <!-- asjscompc won't 'link' these classes in, but will list their requires + if these swcs are on the external-library-path then their requires + will not be listed --> + <path-element>../../../../../libs/BindingJS.swc</path-element> + <path-element>../../../../../libs/CoreJS.swc</path-element> + <path-element>../../../../../libs/GraphicsJS.swc</path-element> + <path-element>../../../../../libs/CollectionsJS.swc</path-element> + <path-element>../../../../../libs/BasicJS.swc</path-element> + <path-element>../../../../../libs/HTMLJS.swc</path-element> + </library-path> + + <!--<namespaces> + <namespace> + <uri>library://ns.apache.org/royale/jewel</uri> + <manifest>../../../../../../themes/JewelTheme/src/main/resources/jewel-manifest.xml</manifest> + </namespace> + </namespaces>--> + <source-path> - <path-element>../royale</path-element> + <path-element>../../../../../../themes/JewelTheme/src/main/royale</path-element> </source-path> <warn-no-constructor>false</warn-no-constructor> </compiler> - <include-file> - <name>defaults.css</name> - <path>../resources/defaults.css</path> - </include-file> - - <include-lookup-only>true</include-lookup-only> + <include-sources> + </include-sources> <include-classes> <class>JewelThemeClasses</class> </include-classes> - <target-player>${playerglobal.version}</target-player> - + <!--<include-namespaces> + <uri>library://ns.apache.org/royale/jewel</uri> + </include-namespaces>--> + </royale-config> diff --git a/frameworks/themes/JewelTheme/build.xml b/frameworks/themes/JewelTheme/build.xml index 6174e3e..d2e5467 100644 --- a/frameworks/themes/JewelTheme/build.xml +++ b/frameworks/themes/JewelTheme/build.xml @@ -91,11 +91,11 @@ <arg value="+playerglobal.version=${playerglobal.version}" /> <arg value="+env.AIR_HOME=${env.AIR_HOME}" /> <arg value="-compiler.strict-xml=true" /> - <arg value="-compiler.targets=SWF" /> + <arg value="-compiler.targets=SWF,JSRoyale" /> <arg value="-output=${basedir}/target/${target.name}" /> <arg value="-load-config=${basedir}/src/main/config/compile-swf-config.xml" /> <arg value="-js-load-config=${ROYALE_HOME}/frameworks/js-config.xml" /> - <arg value="-js-load-config+=${basedir}/../../js/projects/${ant.project.name}JS/src/main/config/compile-js-config.xml" /> + <arg value="-js-load-config+=${basedir}/../../js/themes/${ant.project.name}JS/src/main/config/compile-js-config.xml" /> </java> </target> diff --git a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml b/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml index bb3e613..38cf08c 100644 --- a/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml +++ b/frameworks/themes/JewelTheme/src/main/config/compile-swf-config.xml @@ -73,11 +73,6 @@ <warn-no-constructor>false</warn-no-constructor> </compiler> - <include-file> - <name>defaults.css</name> - <path>../resources/defaults.css</path> - </include-file> - <include-lookup-only>true</include-lookup-only> <include-classes> diff --git a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css index 32894c4..91f4512 100644 --- a/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css +++ b/frameworks/themes/JewelTheme/src/main/resources/royale-jewel-blue.css @@ -20,6 +20,7 @@ -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; + fonts: ClassReference("org.apache.royale.jewel.JewelThemeFontInject") } .royale { -- To stop receiving notification emails like this one, please contact [email protected].
