PDA

View Full Version : Anyone using env vars with command-line builds?



thumperj
06-15-2004, 04:37 PM
Wow, this just doesn't seem to work very well at all. Hopefully I'm doing something completely wrong and someone will point me correctly.

For instance, I have a file in one of my components, say, TestImage.bmp. And I have a Path Variable in my .ISM defined as an env. var. called PATH_TO_WIN32_FILES and is set to C:\MyStuff\Win32 in my DOS env as so:
PATH_TO_WIN32_FILES=C:\MyStuff\Win32

The path to the TestImage.bmp component clearly shows:
<PATH_TO_WIN32_FILES>\TestImage.bmp
int the .ISM file in the File table AND shows up in the GUI as having PATH_TO_WIN32_FILES be the path to the file.

TestImage is for sure at:
C:\MyStuff\Win32\TestImage.bmp

But the command line reports:
ISDEV : warning -5000: Component 'DefaultComponent' contains a link to a non-existent file - '<path_to_win32_files>\Test
Image.bmp'


What is going on? Anyone? Bueller?

jsimpson
06-16-2004, 11:55 AM
You need to use

SET PATH_TO_WIN32_FILES=C:\MyStuff\Win32

instead of

PATH_TO_WIN32_FILES=C:\MyStuff\Win32

thumperj
06-16-2004, 01:19 PM
Sorry. I should have been slightly more clear. I was merely trying to reflect what the env. var PATH_TO_WIN32_FILES was set to.

Of course, the variable was set to that value by entering the following command at the command prompt:

set PATH_TO_WIN32_FILES=C:\MyStuff\Win32

just as you have suggested.

Thanks.

Tim Magee
06-17-2004, 10:48 AM
What you should have in the appropriate row of the "Media\Path Variables" pane is:

Name=PATH_TO_WIN32_FILES
Defined Value=PATH_TO_WIN32_FILES
Current Value=[value of the environment variable if set, else the string "<path_to_win32_files>"]
Test Value=[don't care]
Type=Environment

The first two and last columns mentioned are the important ones. First time I tried environment-based paths I made the mistake of not putting the variable name in the second column.

HTH, sorry if it doesn't apply.