NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
mathzey
Joined: 29 Mar 2009 Posts: 27
|
Posted: Sun Jul 08, 2012 8:48 pm Post subject: ${APPVERSION} in conf file |
|
|
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
|
Posted: Mon Jul 09, 2012 3:17 am Post subject: [platform-dev] Re: ${APPVERSION} in conf file |
|
|
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 |
|
 |
|
|
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
|
|