I may be more than slightly biased but I really like the fact that this could install multiple instances of Node-RED on a system. Given that all of my installs use local, not global installs.
In my opinion, local installs are always better and fit better with standard Node.js approaches as well. Their potential downside is that they might appear slightly more complex to a beginner. But here, that is completely nulled by having a good installer.
That's the way it started - from even before my time with Node-RED (is it really over 10 years now! OMG!!!). It was something I raised early on but the general opinion was that it was easier to install as a global for people with no experience. I disagree, but that's just my own opinion. You trade off having to create a location to install node-red vs not needing to do that but not knowing where the heck it did go if you ever need to know. To be fair, you don't often really need to know. But if you do, then a global install is more complex. Then there is the sudo vs non-sudo (or Windows equivalent) which often causes confusion and then problems if you get it wrong. When installing locally, this is rarely an issue that even occurs to people.
However, either way works - so not really worth worrying over.
Yes history. Two original reasons. First if you installed nodejs locally then it didnāt auto create the correct start command in the path so you couldnāt just type node-red and have it run. And second when packaging up as a deb file for installing on Pi, they should install to /usr space (which is global) and not /home. Messing with /home is a no no.
Status update:
Collect NR version data
Detect 'global' NR installation
Verify 'known' custom path installations (bookkeeping in Registry)
Add new installation configuration to installation setup
Add existing NR installation (currently unknown) to installation setup
Remove installation from setup
Give a name to an installation
Configure installation (port, autostart, ...)
This gives the impression that 1.x still is in maintenance - and in fact it is installed numerous times per week!
While I fully agree to remove it from the installer: Wouldn't it as well make sense to remove any tags from v1.x ... or change it's tag to sth like v1-OBSOLETE ?
There are users who are 'stuck' on 1.x, despite it not being maintained. I doubt there are users who look at that list and, given a free choice, go for 1.x.
But the main point here is any new installer we provide should really only list the active release - 3.x.
If we get any requests for supporting older versions, we can revisit.
It's becoming a quite complex beast...
The goal here needs to be simplicity for the user. The more options you provide, the harder it is to use. I appreciate your comment may be more about what is going on under the covers than what it shows the user... but less is definitely more.
As a separate comment, we can get this into the node-red org on github this week and figure out what else is needed for an initial release. Would be great to 'launch' this with Node-RED 3.1 in the next couple of weeks.
There's one issue that will immediately jump up your screen: Windows is complaining that this software is not signed. This calls for a code signing certificate - if we really intend to put it into the Node-RED ecosystem.
Some technical details - for information as well as for discussion.
The installer needs to run - always - with admin privileges.
Python & VS BuildTools are only touched (updated) on request & if necessary (!).
The basic assumption is that there's only one (1) set of Node-RED installations managed on a system. This set may have one (1) global installation and a (pre-configured into the installer) number of non-global installations.
userDir for the global installation is (default). userDir for the non-global installations is their installation directory.
If requested, a desktop icon and an entry into the autostart group can be created. Both icons are created 'for all users'.
Port allocation currently 'by user'. Depending on the further timeline, it should be possible to add 'on system proposal' functionality as well.
Bookkeeping is done in the registry, thus the installer is able to verify the setup when re-running.
The repo is configured with an action that builds a new installer upon release & is capable to code-sign it as well.
Next steps:
Code cleansing
Documentation of the installer
Adaptation of the Node-RED documentation - if we confirm the intension to move this under the umbrella of the Node-RED org.
@TotallyInformation Which (additional) 'approaches' concerning the autostart topic did you have in mind?
Well, on Linux, only systemd is considered which is reasonable since that covers probably 90% or more of installations.
Windows is a bit more complex because you have two basic methods. Either turning your app into a service or creating an entry in the Task Scheduler. Both have consequences and options.
At the least, users will need to know what startup approach has been used.