NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

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

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
Peter Hansson
Posted via mailing list.





PostPosted: Sat Jan 14, 2017 1:14 pm    Post subject: How to push new conf file (Was: Non-default Preferences) Reply with quote

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 <address-removed ([email]address-removed[/email])> wrote:
Quote:
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.




Back to top
ortega



Joined: 06 Jul 2015
Posts: 35

PostPosted: Mon Jan 16, 2017 1:55 pm    Post subject: Reply with quote

Hi Peter.

Yes, and to new installs the yourconffile.conf will used.

To old installs, you replace the original netbeans.conf. I don't know if is the best way to fix this, but works.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo