|
#1
|
|||
|
|||
Configuration Files - Location
I have been reviewing the possible locations of configuration files and how they are loaded. You state in the help that the VBP installation folder will be checked for these files and it will load and save to this location if present. Are you talking about the "C:\Program Files\VisBuildPro6" folder? Confused about this location as an option.
Would like to have a standard location that I can push all of the build related files and scripts to any clean server. Only thing assumed about this server is that VBP is already installed (default install). Other option is to have the first step in any build "template" perform a "re-load" of the configuration files. I would rather not have to pass on command line but have the information contained within the project file. |
#2
|
|||
|
|||
Correct, http://www.visualbuild.com/Manual/co...ationfiles.htm is referring to the base VBP install path (default is %ProgramFiles%\VisBuildPro6 for v6) when referring to "the Visual Build Pro installation directory."
Where and how you load the config files is probably a matter of preference. Some possibilities: 1) Store the initial config files in source control along with the .bld file and load them explicitly from a path relative to the .bld file (%PROJDIR%) at the beginning of the main project. 2) Create a setup/bootstrapping project that copies the initial config files to the standard location (%ALLUSERSPROFILE%\Kinook Software\Visual Build Professional 6). 3) Create a setup/bootstrapping project that updates the ConfigFilesPath registry value to the path containing the config files. |
#3
|
|||
|
|||
Something is wrong with what I am doing then. I have dropped all of the config files in the C:\Program Files\VisBuildPro6 folder, opened a VBP project and I am not seeing any global subroutine steps that should be populated.
If I look at what takes precedence, none of the first two exist. 1. No command-line switch to look at a specific location for files. 2. No registry value for ConfigFilesPath. What else should I be looking at? Also, can you explain a little better what you mean by setup/bootstrapping project? Thank you.... |
#4
|
|||
|
|||
My mistake -- that documentation is incorrect. The 3rd step of looking in the install path no longer applies (since v6.0). That was a compatibility holdover from VBP v4, but the v6 install will instead copy any such files to the %ALLUSERSPROFILE% location when upgrading from earlier versions.
This was actually by design, since non-admins don't have permissions to modify files under %ProgramFiles%, and Vista will make it very difficult for apps (even started by an administrator) to write to files there [1]. We'll update the docs to be accurate. By bootstrapping, I simply mean the first-time initialization process performed on a clean box (in your case, dropping the files in the install path). This process could be manual or automated. One option would be to drop the files to %ALLUSERSPROFILE%\Kinook Software\Visual Build Professional 6 rather than %ProgramFiles%\VisBuildPro6 [1] http://www.microsoft.com/technet/tec...k/default.aspx |
#5
|
|||
|
|||
Do you have any examples where you are reloading the config files as a part of the current project file?
My idea now would be to create a template that could be pushed (pulled) to each and every server with a build or deployment. To make the versions easier to manage, they would be consolidated in a common folder heirarchy with stylesheets, build files, log files and other related items. Thanks.. |
#6
|
|||
|
|||
See the bottom of http://www.visualbuild.com/Manual/co...ationfiles.htm for sample code.
|
#7
|
|||
|
|||
Trying to load the configuration files using the following scripting. The %buildtoolspath% is set to "C:\Buildtools".
Dim app Set app = CreateObject("VisBuildSvr6.Application") app.Options.Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.confi g" app.Macros(vbldMacroGlobal).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.macro s" app.Scripts(vbldScriptGlobal).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.Globa l.scripts" app.Project.Steps(vbldStepGlobalSubroutine).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.steps " I don't get an error but it doesn't load anything either. Little help please? Thanks... |
#8
|
|||
|
|||
Your code creates another app object and calls methods on it. You should use the predefined Application instance to operate on the current instance.
|
#9
|
|||
|
|||
The EXACT answer I needed of course. Good thing I don't develop code for a living!
Thanks.... |
#10
|
|||
|
|||
Sorry... one more follow up question. I have made the changes and all seem to be loading properly in all cases. If I look under the "Tools/Application Options/File Locations", the path for the Global Macros (and Configuration Files Path) remains unchanged. All the others point to the new folders. Should I have expected the Global Macros path to also change?
Application.Options.Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.confi g" Application.Macros(vbldMacroGlobal).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.macro s" Application.Scripts(vbldScriptGlobal).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.Globa l.scripts" Application.Project.Steps(vbldStepGlobalSubroutine ).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.steps " |
#11
|
|||
|
|||
The default behavior of Macros.Load is to merge with existing macros (and save changes back to the default location). Changing that call to
Application.Macros(vbldMacroGlobal).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.macro s", True will 1) not merge with existing global macros 2) cause Tools | Application Options | File Locations to reflect the loaded path 3) cause any changes to global macros to automatically be saved to the alternate location We'll update the docs to include this info. |
|
|