Re: Building MacOS installers in Ubuntu with NBPackage

Toni Helenius <[email protected]> Mon, 25 Aug 2025 19:42:07 +0300
Newsgroups gmane.comp.java.ide.netbeans.user
Organization ToniArts
Message-ID <[email protected]>
On 25.8.2025 12:11, Neil C Smith wrote:

> On Sun, 24 Aug 2025 at 20:14, Toni Helenius<[email protected]> wrote:
>> We are trying to migrate from NBI to using NBPackage to distribute our Netbeans Platform project. Our project ishttps://github.com/jMonkeyEngine/sdk/.
>>
>> We are building these installers via Github actions, leveraging Ubuntu platform. I managed to build Linux DEB and Windows Inno Setup installer with a great effort (though not thoroughly tested yet). But I'm having much difficulties building MacOS PKG in Ubuntu.
>>
>> If solution-wise there is something, the actual implementation can be seen here:https://github.com/jMonkeyEngine/sdk/pull/660.
>>
>> Is it even possible to build these on Ubuntu?
> No, it is not.  NBPackage is designed to build with platform native
> installer tools.  You will also need Apple developer certificates and
> to run the installer via Apple's notarization process if you want to
> distribute it.
>
> Unlike JPackage, there is some support for running packagers on
> alternative OS.  As you've found, it is possible to run InnoSetup via
> Wine on Ubuntu.  Although if you're using GitHub actions anyway, just
> use a Windows runner with InnoSetup already installed (not the most
> recent).
>
> I did a post on the dev list a little while ago sharing the GitHub
> actions workflow I'm using for a platform based IDE (PraxisLIVE).
> https://lists.apache.org/thread/bhmchk2bz08kpp8dj50por7fk9g58794
>
> The actual workflow repository is at
> https://github.com/codelerity/praxislive-installers  It uses a single
> source Java file (simpler than scripting each OS separately) and a
> properties file to configure.  It downloads the application, NBPackage
> and the JDK then executes the installer builds across all OS.
>
> It is derived from the one used for the community installers for
> NetBeans athttps://github.com/Friends-of-Apache-NetBeans/netbeans-installers
> but using some additional features of NBPackage aimed at platform
> applications.
>
> Those workflows use secrets to hold the macOS certificates for
> signing.  Notarization is not done via the workflow at the moment -
> this turns a 3min run to well over 30min!  Windows signing is also
> handled locally for now, but will be moved into those workflows in the
> near future.
>
> If you're not on the dev@ list, I'd recommend signing up / asking
> questions around platform development there.
>
> Best wishes,
>
> Neil
Thanks, your Praxislive example looks good. I was kinda hoping to keep 
everything on Ubuntu as to be able to locally test and even execute the 
whole thing without any complicated setup. So we are probably going to 
keep the Wine trick and rethink about our stance on MacOS. Thank you!