Changeset 748 for trunk/build.xml


Ignore:
Timestamp:
01/24/14 11:32:31 (10 years ago)
Author:
ngw8
Message:

Changed JFX files to no longer use reflection (as some new features were impossible via reflection) and just import javafx instead. This will probably cause Eclipse to complain if you're using a Java version <= 7, but building/running Expeditee will still work (using Eclipse or Ant).
Have also added an Ant target that builds without ant JFX stuff. See the comments near the top of JfxBrowser.java or WebParser.java for details

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r651 r748  
    4949                </fileset>
    5050        </path>
    51 
     51       
     52        <path id="classpath.jfx">
     53                <!-- Check this points to an existing file, if you can't find the jar just compile with build-nojfx -->
     54                <pathelement location="${java.home}/lib/jfxrt.jar"/>
     55        </path>
    5256
    5357        <target name="clean">
     
    6468                        <fileset dir="src">
    6569                                <exclude name="**/*.java"/>
    66                                 <exclude name="org/expeditee/items/widgets/WebBrowser.java"/>
    6770                        </fileset>
    6871                </copy>
     
    7376                </copy>
    7477        </target>
    75 
     78       
    7679        <target depends="init" name="build">
    7780                <javac source="${javac.source}" target="${javac.target}" debug="false"
    7881                       destdir="${build.dir.exp}" includeantruntime="false">                       
     82                       
    7983                        <src path="src"/>
    8084                        <src path="tests"/>
     85                       
    8186                        <exclude name="org/expeditee/items/widgets/WebBrowser.java"/>
     87               
     88                        <classpath>
     89                                <path refid="classpath.exp"/>
     90                               
     91                                <!-- jfxrt.jar path -->
     92                                <path refid="classpath.jfx"/>
     93                        </classpath>
     94                </javac>
     95        </target>
     96
     97        <target depends="init" name="build-nojfx">
     98                <javac source="${javac.source}" target="${javac.target}" debug="false"
     99                       destdir="${build.dir.exp}" includeantruntime="false">                       
     100                       
     101                        <src path="tests"/>
     102                        <src path="src"/>
     103                        <exclude name="org/expeditee/items/widgets/WebBrowser.java"/>
     104                       
     105                        <!-- Files that rely on JavaFX. Use build to build with them included -->
     106                        <exclude name="org/expeditee/items/widgets/JfxBrowser.java"/>
     107                        <exclude name="org/expeditee/io/WebParser.java"/>
     108                        <exclude name="org/expeditee/actions/JfxBrowserActions.java"/> 
     109                       
    82110                        <classpath refid="classpath.exp"/>
    83111                </javac>
    84112        </target>
     113       
     114
     115       
    85116        <target depends="build" name="jar">
    86117                <jar destfile="${dist.dir.exp}/${dist.filename.exp}" manifest="${manifest.path.exp}">
     
    117148        <target name="run">
    118149                <java classname="org.expeditee.gui.Browser" failonerror="true" fork="yes">
    119                         <classpath refid="classpath.exp"/>
    120150                        <classpath>
     151                                <path refid="classpath.exp"/>
     152                               
     153                                <!-- jfxrt.jar path -->
     154                                <path refid="classpath.jfx"/>
     155
    121156                                <pathelement location="${build.dir.exp}"/>
    122157                        </classpath>
Note: See TracChangeset for help on using the changeset viewer.