5

Are there any gradle plugins for WiX which are available to the public?

By searching the web, I only found some references to the artifactory server of echocat.org where some maven wix plugin is referenced. But the files stored there seem to be non-public since a username/password is required for viewing and downloading. So I could not check if these maven plugin might also be used within a gradle build process.

mschenk74
  • 3,561
  • 1
  • 21
  • 34
  • It's not gradle—but in case you are overlooking it—WiX provides targets and tasks for MSBuild with template projects for Visual Studio. (You don't need Visual Studio to build projects, only to use the templates if you don't want to write project files yourself.) Also, you might find a gradle plugin for MSBuild. It'd be a hybrid solution but might better than creating the command-lines for the WiX tools by hand. – Tom Blodget Jul 10 '13 at 16:32
  • @TomBlodget Since the application for which the installer should be built is a Java application, the complete build process is already based on gradle. So using MSBuild is not an option in our case. – mschenk74 Jul 10 '13 at 18:29

5 Answers5

2

You can try the SetupBuilder Gradle plugin. We are working on a Gradle plugin that will create setups for Windows, OSX and Linux. It use the WiX Toolset on Windows to build a *.msi setup file from the settings in the Gradle script. And other tools on the other platforms.

Edit: In the meantime the plugin has a stable version 1.5 and can be used in production.

Horcrux7
  • 23,758
  • 21
  • 98
  • 156
1

There is a new tool being developed: jpackage - and it uses WiX for building MSI packages for Windows

If your project is build using Gradle then you can easily use the Badass jlink plugin: https://github.com/beryx/badass-jlink-plugin to build an installer / package using jpackage with a bundled JVM

Here's an article how to build an app image using OpenJDK 11 and using OpenJDK 14 with jpackage only for building the installer / package: https://walczak.it/blog/distributing-javafx-desktop-applications-without-requiring-jvm-using-jlink-and-jpackage

Adam from WALCZAK.IT
  • 1,339
  • 12
  • 11
0

I have not been able to find any either; it doesn't appear they exist. I need to use WiX as part of our build process as well.

My plan is to download the WiX distribution as a dependency, extract it and then create Exec tasks to run candle.exe and light.exe directly.

From the research a co-worker has done, these tools are stand-alone so we should be able to run them right from where ever we extract them in the build directory. I'll let you know how it goes and post updates here with examples as I get something working.

If we start using more functionality in WiX, I will probably move my work into an open-source gradle-wix-plugin.

Douglas Borg
  • 61
  • 1
  • 4
  • Sounds interesting. At the moment I'm working on an earlier part of the build process: the generation of the .wxs files, especially on the part were Directory and Component elements are defined. But there are also some problems with Wix (see http://stackoverflow.com/questions/17680481/generating-beans-for-wix-xsd-with-jaxb-fails-since-schema-seems-to-be-invalid) – mschenk74 Jul 19 '13 at 05:34
0

Try the javafx plugin for JDK 8 to JDK 10. https://github.com/FibreFoX/javafx-gradle-plugin

Otherwise, I make an Exec task to run the packager tool included in the JDK. It will use WiX to produce a .msi file.

For Java 8,9,10 use javapackager For Java 11 your out of luck - have Java 10 installed just for the javapackager command For Java 12 will have a jpackage replacement

swpalmer
  • 3,890
  • 2
  • 23
  • 31
0

Check out the org.beryx.jlink plugin.

It relies on jpackager, which uses WiX for Windows builds.

Mark Woon
  • 2,046
  • 1
  • 20
  • 26