get debugger to build with new folder structure
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/8a546a9d Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/8a546a9d Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/8a546a9d Branch: refs/heads/feature/maven-migration-test Commit: 8a546a9d1f8639cdbf36b31420418c61ed49cc85 Parents: 07f5a7d Author: Alex Harui <aha...@apache.org> Authored: Fri Apr 22 12:29:06 2016 -0700 Committer: Alex Harui <aha...@apache.org> Committed: Fri Apr 22 12:29:06 2016 -0700 ---------------------------------------------------------------------- debugger/build.properties | 25 ++-- debugger/build.xml | 138 +++++++++++++------ debugger/jburg-gen.xml | 21 +-- .../debugger/expression/AS3DebuggerBURM.jbg | 2 +- 4 files changed, 119 insertions(+), 67 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8a546a9d/debugger/build.properties ---------------------------------------------------------------------- diff --git a/debugger/build.properties b/debugger/build.properties index 8f3a4ae..1082e8b 100644 --- a/debugger/build.properties +++ b/debugger/build.properties @@ -19,15 +19,14 @@ bin.includes = META-INF/,\ plugin.xml,\ fdb.jar -output.fdb.jar = bin/ -source.fdb.jar = src/,\ +output.fdb.jar = target/ +source.fdb.jar = src/main/java/,\ ../swfutils/,\ generated/src/ jars.compile.order = fdb.jar # description values -release=Flash Debugger -release.version=1.0.0 +release=Apache Flex SWF Debugger # JAR Manifest Entries @@ -38,19 +37,19 @@ manifest.Implementation-Vendor=Apache Software Foundation main.class=flex.tools.debugger.cli.DebugCLI # Directories -basedir.bin=${basedir}/bin -basedir.lib=${basedir}/lib -basedir.src=${basedir}/src -basedir.swfutils=${basedir}/../swfutils -basedir.generated.src=${basedir}/generated/src +basedir.bin=${basedir}/target +basedir.lib=${basedir}/../compiler/lib +basedir.src=${basedir}/src/main/java +basedir.swfutils=${basedir}/target/downloads/java +basedir.generated.src=${basedir}/target/generated-sources/jburg basedir.manifest=${basedir}/META-INF -compiler.generated.lib=${basedir}/../compiler/generated/dist/sdk/lib -generated=${basedir}/generated -dist=${basedir}/../compiler/generated/dist/sdk/lib +compiler.generated.lib=${basedir}/../compiler/lib +generated=${basedir}/target/generated-sources +dist=${basedir}/../compiler/lib #JAR names jar=fdb.jar -jar.dependencies=compiler.jar swfutils.jar +jar.dependencies=compiler.jar http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8a546a9d/debugger/build.xml ---------------------------------------------------------------------- diff --git a/debugger/build.xml b/debugger/build.xml index 2537d63..3dcf1e0 100644 --- a/debugger/build.xml +++ b/debugger/build.xml @@ -19,6 +19,7 @@ --> <project basedir="." default="jar" name="org.apache.flex.fdb" > <property file="build.properties" /> + <property file="../build.properties" /> <!-- label is set by CruiseControl script based on P4 label incrementer --> <condition property="build.number" value="${label}" else="0"> <isset property="label" /> @@ -27,50 +28,101 @@ <fileset dir="${compiler.generated.lib}" includes="${jar.dependencies}" /> </path> - <target name="jar" depends="compile"> - <mkdir dir="${dist}" /> - <mkdir dir="${basedir}/swfutils/classes/META-INF"/> - <copy file="${basedir}/../LICENSE.base" tofile="${basedir.bin}/META-INF/LICENSE"/> - <copy file="${basedir}/../NOTICE.fdb" tofile="${basedir.bin}/META-INF/NOTICE"/> - <jar destfile="${dist}/${jar}" basedir="${basedir.bin}" includes="**/*.class **/*.properties **/*.txt"> - <include name="META-INF/LICENSE"/> - <include name="META-INF/NOTICE"/> - <manifest> - <attribute name="Sealed" value="${manifest.sealed}" /> - <attribute name="Implementation-Title" value="${manifest.Implementation-Title}" /> - <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}" /> - <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}" /> - <attribute name="Main-Class" value="${main.class}" /> - <attribute name="Class-Path" value="${jar.dependencies}" /> - </manifest> - </jar> - </target> +<target name="download_check" description="determine if we have downloaded/bundled swfutils source"> + <available file="${basedir}/target/downloads/java/flash/swf/Action.java" + type="file" + property="swfutils.bundled" + value="true" /> +</target> - <target name="compile" depends="clean, generate-burm" description="compile"> - <mkdir dir="${basedir.bin}" /> - <javac includes="**/*.java" classpathref="classpath" destdir="${basedir.bin}"> - <src path="${basedir.generated.src}" /> - <src path="${basedir.src}" /> - </javac> - <echo file="${basedir.bin}/flex/tools/debugger/cli/version.properties" append="false">build=${build.number.date}</echo> - <copy todir="${basedir.bin}"> - <fileset dir="${basedir.src}" includes="**/*.txt, **/*.properties" /> - </copy> - </target> - - <target name="generate-burm"> - <ant antfile="jburg-gen.xml" target="main" /> - </target> + <target name="downloads" depends="download_check" unless="swfutils.bundled"> + <mkdir dir="${basedir}/target/downloads/java/flash" /> + <get src="https://git-wip-us.apache.org/repos/asf/flex-sdk/repo?p=flex-sdk.git;a=snapshot;h=2cfbdd592ef87b40704d3d7145f4da9a369429eb;sf=tgz" + dest="${basedir}/target/downloads/flex-sdk-modules-swfutils.tar.gz"/> + <untar src="${basedir}/target/downloads/flex-sdk-modules-swfutils.tar.gz" dest="${basedir}/target/downloads/java/flash" compression="gzip"> + <patternset> + <include name="**/localization/**"/> + <include name="**/swf/Movie.java"/> + <include name="**/swf/actions/**"/> + <include name="**/swf/Action.java"/> + <include name="**/swf/ActionConstants.java"/> + <include name="**/swf/ActionDecoder.java"/> + <include name="**/swf/ActionFactory.java"/> + <include name="**/swf/ActionHandler.java"/> + <include name="**/swf/CompressionLevel.java"/> + <include name="**/swf/debug/**"/> + <include name="**/swf/DebugDecoder.java"/> + <include name="**/swf/DebugHandler.java"/> + <include name="**/swf/DebugTags.java"/> + <include name="**/swf/Dictionary.java"/> + <include name="**/swf/Frame.java"/> + <include name="**/swf/Header.java"/> + <include name="**/swf/MovieMetaData.java"/> + <include name="**/swf/RandomAccessBuffer.java"/> + <include name="**/swf/SwfDecoder.java"/> + <include name="**/swf/SwfEncoder.java"/> + <include name="**/swf/SwfFormatException.java"/> + <include name="**/swf/Tag.java"/> + <include name="**/swf/TagDecoder.java"/> + <include name="**/swf/TagHandler.java"/> + <include name="**/swf/TagValues.java"/> + <include name="**/swf/tags/**"/> + <include name="**/swf/tools/Disassembler.java"/> + <include name="**/swf/types/**"/> + <include name="**/util/ExceptionUtil.java"/> + <include name="**/util/FieldFormat.java"/> + <include name="**/util/FileUtils.java"/> + <include name="**/util/IntMap.java"/> + <include name="**/util/Trace.java"/> + </patternset> + <cutdirsmapper dirs="1"/> + </untar> + </target> - <target name="clean" description="clean"> - <echo message="Cleaning out dist dir: ${dist}" /> - <ant antfile="jburg-gen.xml" target="clean" /> - <delete quiet="true" includeemptydirs="true"> - <fileset dir="${jar}" /> - </delete> - <delete quiet="true" includeemptydirs="true"> - <fileset dir="${basedir.bin}" /> - </delete> - </target> + <target name="jar" depends="compile"> + <mkdir dir="${dist}" /> + <copy file="${basedir}/../LICENSE.base" tofile="${basedir.bin}/META-INF/LICENSE"/> + <copy file="${basedir}/../NOTICE.fdb" tofile="${basedir.bin}/META-INF/NOTICE"/> + <jar destfile="${dist}/${jar}" basedir="${basedir.bin}" includes="**/*.class **/*.properties **/*.txt"> + <include name="META-INF/LICENSE"/> + <include name="META-INF/NOTICE"/> + <manifest> + <attribute name="Sealed" value="${manifest.sealed}" /> + <attribute name="Implementation-Title" value="${manifest.Implementation-Title}" /> + <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}" /> + <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}" /> + <attribute name="Main-Class" value="${main.class}" /> + <attribute name="Class-Path" value="${jar.dependencies}" /> + </manifest> + </jar> + </target> + + <target name="compile" depends="downloads, generate-burm" description="compile"> + <mkdir dir="${basedir.bin}" /> + <javac includes="**/*.java" classpathref="classpath" destdir="${basedir.bin}"> + <src path="${basedir.generated.src}" /> + <src path="${basedir.src}" /> + <src path="${basedir}/target/downloads/java" /> + </javac> + <echo file="${basedir.bin}/flex/tools/debugger/cli/version.properties" append="false">build=${build.number.date}</echo> + <copy todir="${basedir.bin}"> + <fileset dir="${basedir.src}/../resources" includes="**/*.txt, **/*.properties" /> + </copy> + </target> + + <target name="generate-burm"> + <ant antfile="jburg-gen.xml" target="main" /> + </target> + + <target name="clean" description="clean"> + <echo message="Cleaning out dist dir: ${dist}" /> + <ant antfile="jburg-gen.xml" target="clean" /> + <delete quiet="true" includeemptydirs="true"> + <fileset dir="${jar}" /> + </delete> + <delete quiet="true" includeemptydirs="true"> + <fileset dir="${basedir.bin}" /> + </delete> + </target> </project> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8a546a9d/debugger/jburg-gen.xml ---------------------------------------------------------------------- diff --git a/debugger/jburg-gen.xml b/debugger/jburg-gen.xml index ef559bb..9c1a2c7 100644 --- a/debugger/jburg-gen.xml +++ b/debugger/jburg-gen.xml @@ -21,7 +21,7 @@ limitations under the License. <target name="main" depends="check_burm,burm" /> <target name="check_burm" > - <available file="generated/src/flash/tools/debugger/expression/AS3DebuggerBURM.java" + <available file="target/generated-sources/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.java" property="burmed" value="true" /> </target> @@ -32,25 +32,26 @@ limitations under the License. </target> <target name="burm" depends="echo_burm" unless="burmed" > - <mkdir dir="generated/src/flash/tools/debugger/expression/" /> - <java classname="jburg.burg.JBurgMain" classpath="../compiler/generated/dist/sdk/lib/compiler.jar" failonerror="yes" fork="yes" dir=""> - <arg value="src/flash/tools/debugger/expression/AS3DebuggerBURM.jbg" /> + <mkdir dir="target/generated-sources/jburg/flash/tools/debugger/expression/" /> + <java classname="jburg.burg.JBurgMain" classpath="../compiler/lib/compiler.jar, ../compiler-jburg-types/target/classes" failonerror="yes" fork="yes" dir=""> + <arg value="src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg" /> <arg value="-outputdir" /> - <arg value="generated/src/flash/tools/debugger/expression" /> + <arg value="target/generated-sources/jburg/flash/tools/debugger/expression" /> <arg value="-outputfile" /> <arg value="AS3DebuggerBURM.java" /> <arg value="-g" /> <classpath> - <pathelement location="../compiler/lib/jburg.jar" /> - <pathelement location="../compiler/lib/antlr.jar" /> - <pathelement location="../compiler/generated/dist/sdk/lib/compiler.jar" /> + <pathelement location="../compiler/lib/external/jburg.jar" /> + <pathelement location="../compiler/lib/external/antlr.jar" /> + <pathelement location="../compiler/lib/compiler.jar" /> + <pathelement location="../compiler-jburg-types/target/classes" /> </classpath> </java> </target> <target name="clean" description="clean"> - <echo message="Cleaning out generated dir: generated/src/" /> + <echo message="Cleaning out generated dir: target/generated-sources/jburg/" /> <delete failonerror="false" quiet="true" includeemptydirs="true"> - <fileset dir="generated/src/"> + <fileset dir="target/generated-sources/jburg/"> <include name="**/*" /> <exclude name="intermediates/eclipse/**/*" /> </fileset> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8a546a9d/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg ---------------------------------------------------------------------- diff --git a/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg b/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg index d2918be..4cc7414 100644 --- a/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg +++ b/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg @@ -265,7 +265,7 @@ DefaultErrorHandler /* * Patterns and rules are stored in their own, shareable file. */ -JBurg.include "../compiler/src/org/apache/flex/compiler/internal/as/codegen/CmcPatterns.jbg" +JBurg.include "../compiler/src/main/jburg/org/apache/flex/compiler/internal/as/codegen/CmcPatterns.jbg" /*