Re: Windows Installer / MacOS dmg

2022-10-16 Thread Golan, Yaron
 https://maven.apache.org/plugins/maven-assembly-plugin/usage.html



From: Vivek Suraiya 
Date: Sunday, 16 October 2022 at 11:28
To: users@maven.apache.org 
Subject: Windows Installer / MacOS dmg
I have a Netbeans 15 JavaFX (18.0.2 / JDK 18.0.2) project with several 
dependencies from the Maven repository. I wish to create a Windows installer 
and a MacOS dmg including all dependencies and the JRE. Is this possible to do?


Re: Windows Installer / MacOS dmg

2022-10-16 Thread Adam Retter
Ah nice! Jpackage looks neat as long as you don't need a customisable
installer.


I accidentally read 18 as 1.8 which is where some of our applications are
stuck at the moment...

On Sun, 16 Oct 2022, 12:17 Thomas Broyer,  wrote:

> Doesn't JDK 18 come with jpackage for exactly that use case? Not sure
> how/if you can drive it from Maven but you should be able to prepare
> everything with dependency:copy-dependencies or the maven-assembly-plugin
> and then run jpackage manually to produce the installers.
>
> Le dim. 16 oct. 2022 à 10:27, Vivek Suraiya  .invalid>
> a écrit :
>
> > I have a Netbeans 15 JavaFX (18.0.2 / JDK 18.0.2) project with several
> > dependencies from the Maven repository. I wish to create a Windows
> > installer and a MacOS dmg including all dependencies and the JRE. Is this
> > possible to do?
>


Re: Windows Installer / MacOS dmg

2022-10-16 Thread Thomas Broyer
Doesn't JDK 18 come with jpackage for exactly that use case? Not sure
how/if you can drive it from Maven but you should be able to prepare
everything with dependency:copy-dependencies or the maven-assembly-plugin
and then run jpackage manually to produce the installers.

Le dim. 16 oct. 2022 à 10:27, Vivek Suraiya 
a écrit :

> I have a Netbeans 15 JavaFX (18.0.2 / JDK 18.0.2) project with several
> dependencies from the Maven repository. I wish to create a Windows
> installer and a MacOS dmg including all dependencies and the JRE. Is this
> possible to do?


Re: Windows Installer / MacOS dmg

2022-10-16 Thread Adam Retter
In our own projects we do this kind of thing...

For Windows, you could use either the:
1. IzPack and the izpack-maven-plugin which produces a Jar that can be
executed on Windows. IzPack understand Windows/Linux/macOS and can
produce a GUI and/or CLI installer that works on all of those
platforms: 
https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491628/IzPack+Maven+Plugin+Reference
2. NSIS and the nsis-maven-plugin which can produce a standalone .exe
installer for Windows -
https://github.com/DigitalMediaServer/nsis-maven-plugin

For a macOS DMG, you need to take a number of steps:
1. Use AppBundler to produce a macOS app from your Java project. We
maintain a maven plugin for that, the appbundler-maven-plugin here -
https://github.com/evolvedbinary/appbundler-maven-plugin
2. Produce a DMG from the macOS app using a number of macOS command
line tools, we use the Maven Exec plugin for that - you can see
examples in one of our projects here -
https://github.com/eXist-db/exist/blob/eXist-6.0.1/exist-distribution/pom.xml#L1178
3. You then also have to cope with signing the DMG with an Apple
Developer Certificate - we again use macOS command line tools via the
Maven Exec plugin -
https://github.com/eXist-db/exist/blob/eXist-6.0.1/exist-distribution/pom.xml#L1265
4. You then also have to cope with notarizing the DMG via Apple - we
again use macOS command line tools via the Maven Exec plugin -
https://github.com/eXist-db/exist/blob/eXist-6.0.1/exist-distribution/pom.xml#L1298

Step (1) can be run on non-macOS systems, and we have Linux
alternatives for step (2), but as far as we are aware step (3) and (4)
can only be done on a macOS system still.

If you wish to include a JRE in your package for macOS the AppBundler
has an option for this, see -
https://github.com/TheInfiniteKind/appbundler. For Windows, I think
you would need to incorporate jlink into your Maven Build process
before supplying the resources to IzPack or NSIS.

Kind regards. Adam.

On Sun, 16 Oct 2022 at 10:27, Vivek Suraiya
 wrote:
>
> I have a Netbeans 15 JavaFX (18.0.2 / JDK 18.0.2) project with several 
> dependencies from the Maven repository. I wish to create a Windows installer 
> and a MacOS dmg including all dependencies and the JRE. Is this possible to 
> do?



-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org