10-31-2008 09:27 AM
I am using Lab Windows CVI 8.5.1
from the menu Build-> Distrubutions->Build <project>
I'm trying to set the Output Directory,
We use Clearcase, which is essentially a netword drive, but each user defined which drive that is mapped to, so I may have q:\program\project\build_dir and someone else may have z:\program\project\build_dir
I'd like to be able to set the drive or something so I can put in something that would allow for this variance.
Also, it would need to work with the "Your Readme File" and "Your License Agreement File" and the "Welcome Message File".
There are some variables, like %major for the major version number. I just wonder if there are more.
Something like %project_dir would be great and it would dynamically determine that to be q:\program\project\build for me.
10-31-2008 10:23 AM
Unfortunately, the documented variables are the only ones supported. Your suggestion is a very good one, though, and I'll put in an internal suggestion to put in better support for source-control-mapped filepaths.
I'm sorry that I can't even suggest a better workaround than manually fixing up those paths after each sync from the repository.
Mert A.
National Instruments
10-31-2008 12:25 PM
Sorry, Ken. I had a bit of a brain outage. I don't think something like %project_dir is necessary for your purposes. In general, you shouldn't experience any problems with paths from machine to machine, as long as your output location, readme, license agreement, etc paths are relative to the workspace file. Are you actually having problems, or are you just anticipating them? If you're actually having trouble with paths not being updated properly from machine to machine, please do post back your .cds file and some details about the drive mappings, and I'll see if I can figure out what's going wrong.
Mert A.
National Instruments
10-31-2008 12:53 PM
I guess I am anticipating problems, rather than waiting for them.
Right now I am the only one working on this, but there is another engineer who does, but is not on this right now.
There are 4 paths in my Edit Installer that have the paths hardcoded.
The readme, license, and welcome only allow browsing to these, so I can't even edit these to use a variable.
I suspect these are saved in the CDS file. I would like to insure that when someone else builds this project they use all the same files I am using, so I want them to use the same CDS file that I am using.
Are you saying they would create their own CDS file?
Or, when they open my CDS file, it would change to represent the drive they are working from?
I did have problems with this yesterday when I copied my project to my laptop to work offline. I could not build from the copy on my C: drive. I didn't look at it too much because I just thought I didn't copy the whole project and the problem was a missing file; but I didn't look at it too closely.
10-31-2008 01:41 PM
No, everyone can and should use the same .cds file, which I assume will also be under source control. All four of the paths you mentioned are written to the file in both absolute and relative-to-the-.cws format. As long as the paths remain relative, then when the distribution settings are loaded from the file, the paths will be fixed up properly.
The distribution build would fail if any of the files specified had not also been copied (and in the same relative location). If you look into this later and find you still have problems, I can help you out.
Mert A.
National Instruments