PDA

View Full Version : How to make a "dynamic" Perforce Client Spec


Conrad Weyns
06-30-2005, 07:18 AM
I am new to VBP. After 30 minutes use, I passed the point of no return :-)
The first step in my .bld is the "Perforce" tool for retrieving the latet version of a large devstudio solution.
There was no problem getting this to work.
Now I'd like to try something more advanced and share this .bld file through the Perforce depot.
This means I need to figure out a way to make a cleaver Perforce step where the local path og the .bld file somehow gets mapped to "a" or "the" correct Perforce Client Spec.
Of the 4 parameters in the Global Options, only the Port is static. The Client, Host and User need to be dynamic.
Has anyone attempted this or something similar? Any recommendations?
Conrad Weyns

kinook
06-30-2005, 11:59 AM
Where do these dynamic values originate? The path+filename of the .bld file? You should be able to write some script expressions [1] to parse out the values, calling from each dynamic field as needed.

[1] http://www.visualbuild.com/Manual/?scriptexpressions.htm

Conrad Weyns
06-30-2005, 03:29 PM
Many thanks for your quick reply.
I have been studying all the samples and realize I need to do my homework first :-) I found one example where a Perforce client spec was created on the fly. This got me started. I use lots of client specs myself but never thought of creating one on the fly! This was much easier than what I was trying to do.

With a few Macros and a minimum of prerequisites:
1. Machine has the Perforce client installed.
2. Machine has Visual studio installed.
3. Logged in user name = a Perforce user with necessary rights.

I was able to move a .bld file around, create a client spec and get the latests source relative to the build file and start building.

Eventually, I'd like to show how one can from a singular maintained .bld file, copied to any directory on any machine with the above prerequites, build a complete release target without ever having to set up anything in particular.

So I guess I am now merely causing noise here and should stop!
Thanks again.
Conrad