View Full Version : Configuration File
Lonnie
01-31-2007, 04:53 PM
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.
kinook
02-01-2007, 07:16 AM
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:
Application.Macros(vbldMacroTemporary).Save "%PROJDIR%\name.macros"
Then, at the start of your project, load the temporary macros:
Application.Macros(vbldMacroTemporary).Load "%PROJDIR%\name.macros"
http://www.visualbuild.com/Manual/runscript.htm
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
Lonnie
02-07-2007, 09:30 AM
Thanks! This is the answer I was looking for.
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.