#1
|
|||
|
|||
Configuration File
Is there a way to put all of the settings for a build into a file, then have the build refer to that file when executing?
And if so, what is the prefered method? Take the following information for instance: BuildNumber = 1234 Label = true I have seen examples on how to prompt the user for this type of information, or for the user to enter it manually, but haven't seen an example on how to retrieve it from a file. Having it retrieved from a file allows us to schedule a silent build. Thanks. |
#2
|
|||
|
|||
There are several ways to accomplish that (the preferred method would probably depend on your needs). Some are described here:
http://www.visualbuild.com/Manual/hints.htm One way would be to pass them on the command-line to VBP: http://www.visualbuild.com/Manual/consoleapp.htm http://www.visualbuild.com/Manual/command_linegui.htm in a batch file, then call the batch file in the scheduled task Another way would be to create them as temporary macros http://www.visualbuild.com/Manual/macrostab.htm and save those to a file via a Run Script (VBScript) step like: Code:
Application.Macros(vbldMacroTemporary).Save "%PROJDIR%\name.macros" Code:
Application.Macros(vbldMacroTemporary).Load "%PROJDIR%\name.macros" http://www.visualbuild.com/Manual/objectmodel.htm Either way, those macros could then be referenced in your project (i.e., %MACROA%) as needed. You can also use the technique shown in the VisBuildPro.bld sample to define defaults as project macros, and override those via temporary macros as needed. http://www.visualbuild.com/Manual/visbuildprosample.htm |
#3
|
|||
|
|||
Thanks! This is the answer I was looking for.
|
|
|