Skip to content

Conversation

ebarboni
Copy link
Contributor

It's a first step to nsis installer. I think need some more configuration for others to use. It's for x64 arch.

--type windows-nsis

It check for java oracle JDK in registry message if ok or not ok (debug mode) install file.

Uninstall remove installed file what was registred.

With that RM for 26 windows can be looked as another line of nbpackage. It's not as convenient as embedded jdk but at least it's releasable from a ubuntu agent (ci-build).

Default install path not set for now.
Need cleanup

Copy link
Member

@neilcsmith-net neilcsmith-net left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I'm not against adding an NSIS packager if you want to work on it, there is a lot of work still to do here to get this in, including removing any hardcoded references to InnoSetup or to NetBeans (for platform apps), and make sure it works correctly with and without a bundled JDK.

I also have serious questions on the reasoning for adding this now. It's just moving to another pretty much dead technology. WiX support would be a better addition to NBPackage as a tool. Running all 3 on Ubuntu is feasible (the current community installers are built on Ubuntu), but that should not be the priority here in my opinion. NBPackage is a tool for using native installer packaging.

The easiest approach, if you want to look at shipping an ASF NetBeans installer for 26, is using the existing and tested packager locally. That is what has to be done on macOS anyway. We could also look at building the packages via a GitHub workflow split over different OS, like the native binary workflows do.

-1 to adding anything involving registry lookup for the JDK into the default packagers. This is contrary to the entire thinking behind NBPackage - if a runtime is not specified, it should behave like the zip. Registry lookup needs fixing in the launcher code, not here.

If a temporary override for Java lookup is needed, then it can be done via a template override of the installer build file. The easiest quick fix with either NSIS or InnoSetup would be to override the shortcut configuration to use --jdkhome "%JAVA_HOME%\", possibly with an environment variable check in the installer.

@ebarboni
Copy link
Contributor Author

I understand I think,
Please note that innosetup is for me native on windows but via wine is a semi nightmare. Will be the same for wxr.
Wanna test the lightweight alternative.

Still not ready and a bit on hold but would be nice for me to have this PR as ref for the template.

@neilcsmith-net
Copy link
Member

innosetup works well with wine, although I can understand why it might be an issue to get working on Jenkins build. But, I don't understand the necessity to do that?! At some point you need it locally on Windows to sign and test it. Why not build it there, same as macOS?

In theory there's a tool to build from WiX without wine under msitools project. I started looking at it a year or two back, but didn't progress much with it so far.

We could put NSIS support into NBPackage, but let's make sure we do it because we think it's a good option for the future.

@neilcsmith-net neilcsmith-net marked this pull request as draft June 19, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants