> Well, the obvious place to store it would be the <userdir>/etc/netbeans.conf 
> although there's potentially a chicken and egg upgrade issue with doing that.

That sounds fine, too. Though netbeans.conf is traditionally modified the user, 
and never automatically. If the launcher is going to modify a setting, it might 
be best to have a separate file for that so that we don't have to worry about 
preserving comments etc. (And so the user doesn't have to wonder if a change 
was their own or made automatically.)

> But then we've also been making a move to get rid of native executables 
> rather than add more, as they're a pain for releasing.

In my platform app I just treat the native executable as a pre-compiled asset 
that doesn't actually need to be re-built for each release. I also 
intentionally do not sign it. (Rather, I sign the entire MSI installer on 
Windows and the entire application package on MacOS.)

> NBPackage already builds a small Swift launcher on macOS. That might be 
> extended to provide that functionality without impact on IDE builds on other 
> platforms.

Yeah, my inclination would be to implement the same "browse for JDK on first 
start" enhancement in both the MacOS Swift launcher and the netbeans64.exe 
launcher on Windows. It's twice the work, but once it's done, it's done, and 
the launcher can be left alone again essentially forever.

-- Eirik

From: Neil C Smith <neilcsm...@apache.org>
Reply-To: "dev@netbeans.apache.org" <dev@netbeans.apache.org>
Date: Tuesday, March 25, 2025 at 8:19 AM
To: "dev@netbeans.apache.org" <dev@netbeans.apache.org>
Subject: Re: Re : Re: heads up: windows installer/uninstaller issues

I realized I didn't respond to this ...

On Fri, 21 Mar 2025 at 18:06, Eirik Bakke 
<eba...@ultorg.com.inva<mailto:eba...@ultorg.com.inva>lid> wrote:
> I don't think having a system installed IDE relying on any of these transient 
> user space things makes sense

This is true--but perhaps it could be alleviated by having the installer 
install per-user rather than per-machine? This is what I did for my MSI 
installer, after a lot of research.
...
The great thing about this is that no administrator access is needed to install.

This is feasible, although at the moment would require using the
NBPackage facility to override default templates - in particular
https://github.com/apache/netbeans-nbpackage/blob/master/src/main/resources/org/apache/netbeans/nbpackage/innosetup/InnoSetup.iss.template

Adding settings for either
https://jrsoftware.org/ishelp/index.php?topic=setup_privilegesrequiredoverridesallowed
or https://jrsoftware.org/ishelp/index.php?topic=setup_privilegesrequired

It might be useful to add an option for that instead.  Would need
testing.  Some people do want admin installs though.

And if NetBeans is installed this way, then makes more sense to allow the user 
to browse to their own unzipped OpenJDK distro somewhere when they first run 
netbeans64.exe. If that folder later goes away, we can always prompt again.
..
I'd propose the same approach as for the Windows installer; have a small native 
executable that prompts for the location of the JDK. Then remember it for 
subsequent runs. The single piece of information about where the JDK is can be 
stored in the user's home directory, e.g. "~/.netbeans".

Well, the obvious place to store it would be the
<userdir>/etc/netbeans.conf although there's potentially a chicken and
egg upgrade issue with doing that.

Partly this comes down to enhancing all the launchers, which would
benefit the zip too.  But then we've also been making a move to get
rid of native executables rather than add more, as they're a pain for
releasing.  NBPackage already builds a small Swift launcher on macOS.
That might be extended to provide that functionality without impact on
IDE builds on other platforms.

That's mostly concentrating on the lesser point I was making, which
was more about the importance of the signed bundle being immutable,
self-contained, and with all the correct permissions.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: 
dev-unsubscr...@netbeans.apache.org<mailto:dev-unsubscr...@netbeans.apache.org>
For additional commands, e-mail: 
dev-h...@netbeans.apache.org<mailto:dev-h...@netbeans.apache.org>

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Reply via email to