Я разработал приложение JavaFx, и оно работает без проблем.Теперь я хочу собрать из него установщик MSI и изменил build.fxbuild и build.xml.Я также установил инструменты WIX.Когда я запускаю build.xml как сборку муравья, он говорит, что сборка выполнена успешно, но возникает какая-то ошибка, и MSI не генерируется.
Ошибка
Buildfile: D:\SmallExperiment\java fx\build\build.xml
setup-staging-area:
[delete] Deleting directory D:\SmallExperiment\java fx\build\externalLibs
[delete] Deleting directory D:\SmallExperiment\java fx\build\project
[delete] Deleting directory D:\SmallExperiment\java fx\build\projectRefs
[mkdir] Created dir: D:\SmallExperiment\java fx\build\externalLibs
[copy] Copying 1 file to D:\SmallExperiment\java fx\build\externalLibs
[copy] Copying 1 file to D:\SmallExperiment\java fx\build\externalLibs
[copy] Copying 1 file to D:\SmallExperiment\java fx\build\externalLibs
[copy] Copying 1 file to D:\SmallExperiment\java fx\build\externalLibs
[mkdir] Created dir: D:\SmallExperiment\java fx\build\project
[copy] Copying 17 files to D:\SmallExperiment\java fx\build\project
[mkdir] Created dir: D:\SmallExperiment\java fx\build\projectRefs
do-compile:
[delete] Deleting directory D:\SmallExperiment\java fx\build\build
[mkdir] Created dir: D:\SmallExperiment\java fx\build\build\src
[mkdir] Created dir: D:\SmallExperiment\java fx\build\build\libs
[mkdir] Created dir: D:\SmallExperiment\java fx\build\build\classes
[copy] Copying 4 files to D:\SmallExperiment\java fx\build\build\libs
[copy] Copying 17 files to D:\SmallExperiment\java fx\build\build\src
[javac] Compiling 10 source files to D:\SmallExperiment\java fx\build\build\classes
[copy] Copying 7 files to D:\SmallExperiment\java fx\build\build\classes
init-fx-tasks:
do-deploy:
[copy] Copying 4 files to D:\SmallExperiment\java fx\build\dist\libs
[mkdir] Created dir: D:\SmallExperiment\java fx\build\build\classes\META-INF
Using base JDK at: C:\Program Files\Java\jdk1.8.0_201\jre
Using base JDK at: C:\Program Files\Java\jdk1.8.0_201\jre
Bundler MSI Installer skipped because of a configuration problem: Can not find WiX tools (light.exe, candle.exe).
Advice to fix: Download WiX 3.0 or later from http://wix.sf.net and add it to the PATH.
BUILD SUCCESSFUL
Total time: 5 seconds
Вышла ошибка выше, хотя я включил WIXв путь к среде.
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="java fx" default="do-deploy" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<target name="init-fx-tasks">
<path id="fxant">
<filelist>
<file name="${java.home}\..\lib\ant-javafx.jar"/>
<file name="${java.home}\lib\jfxrt.jar"/>
</filelist>
</path>
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpathref="fxant"/>
</target>
<target name="setup-staging-area">
<delete dir="externalLibs" />
<delete dir="project" />
<delete dir="projectRefs" />
<mkdir dir="externalLibs" />
<copy todir="externalLibs">
<fileset dir="D:\SmallExperiment\java fx\lib">
<filename name="jfxrt.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="D:\SmallExperiment\java fx\lib">
<filename name="postgresql-42.2.5.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="D:\SmallExperiment\java fx\lib">
<filename name="mssql-jdbc-7.2.1.jre8.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="D:\SmallExperiment\java fx\lib">
<filename name="rt.jar"/>
</fileset>
</copy>
<mkdir dir="project" />
<copy todir="project">
<fileset dir="D:\SmallExperiment\java fx">
<include name="src/**" />
</fileset>
</copy>
<mkdir dir="projectRefs" />
</target>
<target name='do-compile'>
<delete dir="build" />
<mkdir dir="build/src" />
<mkdir dir="build/libs" />
<mkdir dir="build/classes" />
<!-- Copy project-libs references -->
<copy todir="build/libs">
<fileset dir="externalLibs">
<include name="jfxrt.jar"/>
<include name="postgresql-42.2.5.jar"/>
<include name="mssql-jdbc-7.2.1.jre8.jar"/>
<include name="rt.jar"/>
</fileset>
</copy>
<!-- Copy project references -->
<!-- Copy project sources itself -->
<copy todir="build/src">
<fileset dir="project/src">
<include name="**/*"/>
</fileset>
</copy>
<javac includeantruntime="true" source="1.8" target="1.8" srcdir="build/src" destdir="build/classes" encoding="Cp1252">
<classpath>
<fileset dir="build/libs">
<include name="*"/>
</fileset>
</classpath>
</javac>
<!-- Copy over none Java-Files -->
<copy todir="build/classes">
<fileset dir="project/src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="do-deploy" depends="setup-staging-area, do-compile, init-fx-tasks">
<delete file="dist"/>
<delete file="deploy" />
<mkdir dir="dist" />
<mkdir dir="dist/libs" />
<copy todir="dist/libs">
<fileset dir="externalLibs">
<include name="*" />
</fileset>
</copy>
<fx:resources id="appRes">
<fx:fileset dir="dist" includes="java fx.jar"/>
<fx:fileset dir="dist" includes="libs/*"/>
</fx:resources>
<fx:application id="fxApplication"
name="ConfOfApp"
mainClass="application.Main"
/>
<mkdir dir="build/classes/META-INF" />
<fx:jar destfile="dist/java fx.jar">
<fx:application refid="fxApplication"/>
<fileset dir="build/classes">
</fileset>
<fx:resources refid="appRes"/>
<manifest>
<attribute name="Implementation-Vendor" value="com.ankur"/>
<attribute name="Implementation-Title" value="ConfOfApp"/>
<attribute name="Implementation-Version" value="1.0.2"/>
<attribute name="JavaFX-Feature-Proxy" value="None"/>
</manifest>
</fx:jar>
<mkdir dir="deploy" />
<!-- Need to use ${basedir} because somehow the ant task is calculating the directory differently -->
<fx:deploy
embedJNLP="false"
extension="false"
includeDT="false"
offlineAllowed="true"
outdir="${basedir}/deploy"
outfile="java fx" nativeBundles="msi"
updatemode="background" >
<fx:platform basedir="${java.home}"/>
<fx:info title="java fx" vendor="com.ankur"/>
<fx:application refId="fxApplication"/>
<fx:resources refid="appRes"/>
</fx:deploy>
</target>
</project>