View Full Version : Configuration Files - Location
mvermeulen
09-12-2006, 10:34 AM
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.
kinook
09-12-2006, 02:52 PM
Correct, http://www.visualbuild.com/Manual/configurationfiles.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.
mvermeulen
09-14-2006, 07:34 AM
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....
kinook
09-14-2006, 08:45 AM
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/technetmag/issues/2006/05/FirstLook/default.aspx
mvermeulen
09-14-2006, 03:18 PM
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..
kinook
09-14-2006, 04:36 PM
See the bottom of http://www.visualbuild.com/Manual/configurationfiles.htm for sample code.
mvermeulen
09-25-2006, 12:23 PM
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.config"
app.Macros(vbldMacroGlobal).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.macros"
app.Scripts(vbldScriptGlobal).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.Global .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...
kinook
09-25-2006, 01:32 PM
Your code creates another app object and calls methods on it. You should use the predefined Application instance to operate on the current instance.
mvermeulen
09-25-2006, 01:48 PM
The EXACT answer I needed of course. Good thing I don't develop code for a living! :D
Thanks....
mvermeulen
09-26-2006, 08:27 AM
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.config"
Application.Macros(vbldMacroGlobal).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.macros"
Application.Scripts(vbldScriptGlobal).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.Global .scripts"
Application.Project.Steps(vbldStepGlobalSubroutine ).Load "%buildtoolspath%\VBPFiles\6.2.1\VisBuildPro.steps"
kinook
09-26-2006, 09:54 AM
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.macros", 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.
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.