changeset 7:8ed228ac163e

http://javafx-jira.kenai.com/browse/JMY-115 and remove javadoc for now - need to be fixed properly build fix - something has changed in FX distro junit dependency
author shurailine
date Wed, 29 Feb 2012 22:55:35 +0400
parents b2c05e6500b6
children 17c26920f2ab
files tools/Jemmy/JemmyFX/build.properties tools/Jemmy/JemmyFX/build.xml tools/Jemmy/JemmyFX/nbproject/project.properties tools/Jemmy/JemmyFX/src/org/jemmy/fx/Root.java
diffstat 4 files changed, 27 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/tools/Jemmy/JemmyFX/build.properties	Wed Feb 15 12:40:32 2012 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-javafx.home=/opt/FX/2.1.b12
--- a/tools/Jemmy/JemmyFX/build.xml	Wed Feb 15 12:40:32 2012 +0400
+++ b/tools/Jemmy/JemmyFX/build.xml	Wed Feb 29 22:55:35 2012 +0400
@@ -37,18 +37,6 @@
             <zipgroupfileset file="${dist.jar}"/>
         </jar>
     </target>
-    <target name="jemmy-javadoc" depends="init">
-        <path id="javadoc.source.path.ref">
-            <pathelement path="${src.dir}"/>
-            <pathelement path="${project.JemmyCore}/src"/>
-            <pathelement path="${project.JemmyAWTInput}/src"/>
-        </path>
-        <property name="javadoc.src.path" refid="javadoc.source.path.ref"/>
-        <property name="javadoc.destdir" location="../www/javadoc"/>
-        <mkdir dir="${javadoc.destdir}"/>
-        <ant antfile="../../core/JemmyDoc/javadoc.xml" target="jemmy-javadoc"
-             inheritall="true"/>
-    </target>
     <target name="real-clean" depends="clean">
         <delete dir="${jemmy.lib.dir}" failonerror="false"/>
         <delete dir="${javafx.lib.dir}" failonerror="false"/>
@@ -56,7 +44,7 @@
     <target name="-post-clean">
         <delete dir="${basedir}/docks" failonerror="false"/>
     </target>
-    <target name="-pre-compile" depends="copy-javafx-libs,copy-jemmy-libs">
+    <target name="-pre-compile" depends="copy-javafx,copy-jemmy-libs">
         <delete file="${basedir}/build/classes/org/jemmy/fx/jemmy.properties" failonerror="false"/>
         <!--delete dir="${basedir}/docks" failonerror="false"/-->
         <mkdir dir="${basedir}/docks"/>
@@ -84,6 +72,7 @@
         <get src="${dist.url}/JemmyCore.jar" dest="${jemmy.lib.dir}"/>
         <get src="${dist.url}/JemmyAWTInput.jar" dest="${jemmy.lib.dir}"/>
         <get src="${dist.url}/JemmyBrowser.jar" dest="${jemmy.lib.dir}"/>
+        <get src="${dist.url}/junit.jar" dest="${jemmy.lib.dir}"/>
     </target>
     <target name="set-javafx-home" if="javafx.home">
         <echo file="build.properties" message="javafx.home=${javafx.home}"/>
@@ -91,15 +80,22 @@
     <target name="read-javafx-home" unless="javafx.home">
         <property file="build.properties"/>
     </target>
+    <target name="copy-javafx" depends="copy-javafx-libs, copy-javafx-bin">
+        <property file="fxclasspath.properties"/>
+    </target>
     <target name="copy-javafx-libs" depends="set-javafx-home,read-javafx-home">
         <fail unless="javafx.home" message="No javafx.home set and no build.properties file"/>
         <echo message="javafx.home=${javafx.home}"/>
         <copy todir="${javafx.lib.dir}/lib">
             <fileset dir="${javafx.home}/rt/lib"/>
         </copy>
+    </target>
+    <target name="check-javafx-bin">
+        <available file="${javafx.home}/rt/bin" type="dir" property="javafx.bin.exists"/>
+    </target>
+    <target name="copy-javafx-bin" if="javafx.bin.exists" depends="check-javafx-bin">
         <copy todir="${javafx.lib.dir}/bin">
             <fileset dir="${javafx.home}/rt/bin"/>
         </copy>
-        <property file="fxclasspath.properties"/>
     </target>
 </project>
--- a/tools/Jemmy/JemmyFX/nbproject/project.properties	Wed Feb 15 12:40:32 2012 +0400
+++ b/tools/Jemmy/JemmyFX/nbproject/project.properties	Wed Feb 29 22:55:35 2012 +0400
@@ -32,6 +32,7 @@
 file.reference.JemmyBrowser.jar=lib/jemmy/JemmyBrowser.jar
 file.reference.JemmyCore.jar=lib/jemmy/JemmyCore.jar
 file.reference.jfxrt.jar=lib/javafx/lib/jfxrt.jar
+file.reference.junit.jar=lib/jemmy/junit.jar
 includes=**
 jar.compress=false
 javac.classpath=\
@@ -40,7 +41,8 @@
     ${file.reference.JemmyAWT.jar}:\
     ${file.reference.JemmyAWTInput.jar}:\
     ${file.reference.JemmyBrowser.jar}:\
-    ${file.reference.JemmyCore.jar}
+    ${file.reference.JemmyCore.jar}:\
+    ${file.reference.junit.jar}
 # Space-separated list of extra javac options
 javac.compilerargs=-processor org.jemmy.dock.DockGenerator -s ${basedir}/docks
 javac.deprecation=false
@@ -50,8 +52,7 @@
 javac.target=1.5
 javac.test.classpath=\
     ${javac.classpath}:\
-    ${build.classes.dir}:\
-    ${libs.junit_4.classpath}
+    ${build.classes.dir}
 javadoc.additionalparam=
 javadoc.author=false
 javadoc.encoding=${source.encoding}
--- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/Root.java	Wed Feb 15 12:40:32 2012 +0400
+++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/Root.java	Wed Feb 29 22:55:35 2012 +0400
@@ -40,6 +40,19 @@
  */
 public class Root extends AbstractParent<Scene> {
 
+    static {
+        //Mac workaround - first things first
+        try {
+            if (System.getProperty("os.name").toLowerCase().contains("mac")) {
+                AWTRobotInputFactory.runInOtherJVM(true);
+            } else {
+                java.awt.GraphicsEnvironment.isHeadless();
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+    
     public static final Root ROOT = new Root();
     public static final String LOOKUP_STRING_COMPARISON = Root.class.getName() +
             ".lookup.string.compare";