NetBeans Forums

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

${APPVERSION} in conf file

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
mathzey



Joined: 29 Mar 2009
Posts: 27

PostPosted: Sun Jul 08, 2012 8:48 pm    Post subject: ${APPVERSION} in conf file Reply with quote

Hi,

The default userdir folder is "default_userdir="${HOME}/.${APPNAME}/dev"

Does something like ${APPVERSION} exists so I can set the default user dir with the current application version?

default_userdir="${HOME}/.${APPNAME}/${APPVERSION}"

Thanks
Back to top
bruehlicke



Joined: 18 Sep 2009
Posts: 154

PostPosted: Mon Jul 09, 2012 3:17 am    Post subject: [platform-dev] Re: ${APPVERSION} in conf file Reply with quote

If you look at the Bourne Shell script in the bin folder of your app
you see that APPNAME is defined as an environmental variable alla
APPNAME=`basename "$0"`

You can also see that the very first script which is being sourced is
$APPNAME.conf

Now, you can have your build system hold a verison number - often this
is in the currentVersion (see
http://wiki.netbeans.org/DevFaqVersionNumber) and you can just have
the Ant build modify your xyz.conf file for each build to hardcode the
current version number into the xyz.conf file. Than this will be
picked up by the app when launched.

Or, the more ugly solution (very ugly) you can start your app via a
pre script which defines some env vars which are needed in this early
stage, but I think the solution to have the Ant build modify the
xyz.conf is way cleaner.

Bernd



On Sun, Jul 8, 2012 at 3:48 PM, mathzey <address-removed> wrote:
Quote:
Hi,

The default userdir folder is "default_userdir="${HOME}/.${APPNAME}/dev"

Does something like ${APPVERSION} exists so I can set the default user dir with the current application version?

default_userdir="${HOME}/.${APPNAME}/${APPVERSION}"

Thanks



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 can 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