Re: How to push new conf file (Was: Non-default Preferences)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: How to push new conf file (Was: Non-default Preferences)

Peter Hansson-2
Thanks, appreciated.

Understood, if I embed the new conf file in an NBM then I can attempt to copy it into location in said module's Installer class.  Is that what you meant?

Your idea is actually quite workable, because I just learned that the location of the /etc directory can be overlayed. (see http://wiki.netbeans.org/FaqNetbeansConf). So all I really need is a way to get my new conf file into ${userdir}/etc as a one-time action.

So, I appoint one of my existing modules to be the host of the most current conf file. In that module's Installer class I then check if the latest conf file is already present in ${userdir}/etc, and if not, I copy it into place. In the latter case I then ask the user to restart the application. Unfortunately the check needs to be carried out EVERY TIME the application starts which is of course unnecessary. Perhaps this can be done cleverly so that the impact on startup performance is negligible.

/Peter





On Fri, Jan 13, 2017 at 2:28 PM, ortega <[hidden email]> wrote:
Hi Peter.

You try make you personal .conf file and put in nbproject folder.
The you .conf file must have the same name of your project.

It may be possible to replace the original file programmatically in old installations with AutoUpdate.

I hope it helps.