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)
-   -   Change configuration file path question (https://www.kinook.com/Forum/showthread.php?t=2750)

ambalboa 06-27-2007 03:31 PM

Change configuration file path question
 
I have successfully change the configuration file path for my build project. I added a register key named 'ConfigFilesPath' on the registry on the appropriate path. Now, if I place the .bld file on another computer with VBP, will I have a problem accessing the configuration files? Will the new configuration file path be saved on my .bld file?

Is this only going to work on my computer? Will I have to place the configuration files on the specified path before running the build project?

kinook 06-27-2007 03:47 PM

Re: Change configuration file path question
 
Quote:

Originally posted by ambalboa
I have successfully change the configuration file path for my build project. I added a register key named 'ConfigFilesPath' on the registry on the appropriate path. Now, if I place the .bld file on another computer with VBP, will I have a problem accessing the configuration files?
VBP does not set that registry value on its own and will not look in an alternate path unless you tell it to (by creating that registry key, etc.).

Quote:

Will the new configuration file path be saved on my .bld file?
Setting that registry value is not stored in the .bld file

Quote:

Is this only going to work on my computer? Will I have to place the configuration files on the specified path before running the build project?
For the build to operate identically on another computer, you would need to set that registry key and place your custom files in the specified path.

See http://www.visualbuild.com/Manual/co...ationfiles.htm for the various ways you can initialize where VBP reads its config files from.

ambalboa 06-29-2007 10:10 AM

Thank you.

I was thinking of creating a group of steps to change the configuration files path at the beginning of my project. Now let's assume that when this is run on another computer, the config files are located on the default path, initialized by VBP. That's because the registry key 'ConfigFilesPath' does not exist. I was able to write in this key to the registry, and also move the macros to the new location, deleting the ones on the source (default) folder with two action steps. However, it seems that this only takes effect when VBP is closed and reopened. How can I make this take effect without having to close my VBP, and thus interrupt the building process? Is there a way? Or should this be done without VBP? Meaming, doing it manually and then open VBP and run the project without that first group of steps.

kinook 06-29-2007 10:14 AM

Either a) pass the /configpath command-line flag, b) programatically load alternate config files via script code, or c) create a bootstrapping .bld project to set the registry value and then launch another .bld file (VisBuildPro Project action) to actually build.

ambalboa 06-29-2007 11:17 AM

Thank you.

A couple of questions:

How do I pass the /configpath command-line flag in option a?

I'm just beginning to learn vbscript, so I'll skip option b.

I tried option c, and it doesn't seem to work. I used a 'VisBuildPro Project' action step at the beginning, and it worked out file. There are three steps on the chained project and they are:

a) Delete config files on default file path
b) Move config files on source folder, which have added steps, macros, etc. These are not the files with default settings.
c) Write in registry key 'ConfigFilesPath'

Are these steps, and their order OK?

This is all done successfully, but when that finishes and the previous project returns and continues building, the global macros I was hoping to have access to, where not being reached.

Is there an option that I need to check on the VisBuildPro action step, specifically on the project tab? I'll keep trying and let you know what happens.

kinook 06-29-2007 11:29 AM

Quote:

Originally posted by ambalboa
Thank you.

A couple of questions:

How do I pass the /configpath command-line flag in option a?

http://www.visualbuild.com/Manual/command_linegui.htm

Quote:

I'm just beginning to learn vbscript, so I'll skip option b.
You don't need to learn much VBScript. The code is already provided; just replace "drive:path\to\filename.ext" with the actual filename(s).

Quote:

I tried option c, and it doesn't seem to work. I used a 'VisBuildPro Project' action step at the beginning, and it worked out file. There are three steps on the chained project and they are:

a) Delete config files on default file path
b) Move config files on source folder, which have added steps, macros, etc. These are not the files with default settings.
c) Write in registry key 'ConfigFilesPath'

Are these steps, and their order OK?

This is all done successfully, but when that finishes and the previous project returns and continues building, the global macros I was hoping to have access to, where not being reached.

Is there an option that I need to check on the VisBuildPro action step, specifically on the project tab? I'll keep trying and let you know what happens.

A is unnecessary. B and C (followed by the VisBuildPro Project step) should be performed in the bootstrap (calling) .bld project; the chained (called) .bld file should do the build steps that use the alternate config files.

ambalboa 06-29-2007 02:54 PM

Well, I was able to do option c successfully. I was having trouble running the process a second time successfully, but as I'm writing this e-mail, I think I know why it wasn't working. I was building the project instead of rebuilding it (steps are not repeated once done successfully).

What I did was I a) moved the modified config files to a destination folder, b) created a registry key with the destination folder path as a value in the registry, and c) used a 'VisBuildPro Project' step to call the main .bld file which then uses the desired config files. I'll let you know if I have other problems. All this work, and I'm just getting started. Thank you so much.


All times are GMT -5. The time now is 07:15 PM.


Copyright © 1999-2023 Kinook Software, Inc.