Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Configuration File (https://www.kinook.com/Forum/showthread.php?t=2262)

Lonnie 01-31-2007 03:53 PM

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.

kinook 02-01-2007 06: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:

Code:

Application.Macros(vbldMacroTemporary).Save "%PROJDIR%\name.macros"
Then, at the start of your project, load the temporary macros:

Code:

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 08:30 AM

Thanks! This is the answer I was looking for.


All times are GMT -5. The time now is 11:34 PM.


Copyright © 1999-2023 Kinook Software, Inc.