|
#1
|
|||
|
|||
Making a decision based on the existence of a file
I work on a product that has multiple servers and items can be installed on different servers as parts of different releases. My build stages msi files based on a list of items to be deployed. The actual build is done in Nant but wrapped in Visual Build Pro during the conversion process. The Nant build currently compiles the code and stages the files. I am looking for a way to determine if a particular file exists in the staging area and perform an action if the file exists. Is there a Visual Build Pro solution that can check for the existence of a file and either set a variable I can use later or call a subroutine to do the actions?
|
#2
|
|||
|
|||
Use a build rule with with a script expression like
[vbld_FSO.FileExists("c:\path\to\file.ext")] is true http://www.kinook.com/VisBuildPro/Ma...scriptfile.htm http://www.kinook.com/VisBuildPro/Ma...xpressions.htm http://www.kinook.com/VisBuildPro/Manual/buildrules.htm |
#3
|
|||
|
|||
where do I put the FileExists
I would like to 'fail' the build if a file exists. I thought I could place the vbld_FSO.FileExists as a step and it would return 0 as a failed condition, but that did not work. How do I (or where do I) put something like:
if vbld_FSO.FileExists(".\BuildStarted") then // continue build everything ok else // stop the build with a Failure condition...Previous build not completed since the // file exists. return 0 end if I'm sure this is an easy question, I just do not know enough about the Visual build product. Thanks. |
#4
|
|||
|
|||
I found the Single instance sample.
never mind hopefully the single instance sample will do everything I want...
|
#5
|
|||
|
|||
See the attached sample.
|
|
|