|
From: <da...@ix...> - 2003-03-11 19:05:03
|
In article <3E6...@ta...>,
Leif Mortenson <wra...@li...> wrote:
>I am not sure I am grasping what it is you want to do. At what point do
>you want the
>replacements to happen? At run time? If so, what is the difference
>between what you
>are asking for and an environment variable?
At run time.
Ok, lets say I am distributing a product that has a file that has
something like this:
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=%MYAPP_LIB%/Utils.jar
wrapper.java.classpath.3=%MYAPP_LIB%/Engine.jar
...
wrapper.java.classpath.25=%MYAPP_LIB%/Help.jar
Now, let's say the user has 3 different installations in different
directories doing different things.
Well, I have to go into the conf files and search and replace MYAPP_LIB
with MYAPP_LIB_1, and MYAPP_LIB_2. I might as well not bother with
environment variables then.
But, instead, if I could do something like:
MYAPP_LIB=C:\installation1\....\lib
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=${MYAPP_LIB}/Utils.jar
wrapper.java.classpath.3=${MYAPP_LIB}/Engine.jar
...
wrapper.java.classpath.25=${MYAPP_LIB}/Help.jar
Then I only have to modify one line in each file. This is less prone to
error, could even be constrained to a #include <location.conf> type of
file, that would limit what a user has to modify down to one file that has
just a couple of lines.
In a unix implementation, I could just do something like have the init
script set up different environment variables for each installtion (well, I
think, I've not actually used wrapper there, yet). But I don't have that
option with NT services. I'd like to keep the .conf files that I
distribute as pristine as possible, only having to change a couple of lines
(or, as I pointed out, an include file would be better).
I'm certainly not set on the ant-like syntax, I just figured it was something
common enough to be a good example.
mrc
--
Mike Castle da...@ix... www.netcom.com/~dalgoda/
We are all of us living in the shadow of Manhattan. -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc
|