Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automating Builds w/ Project Hooks
Message
From
01/02/2011 09:27:54
Joe Kaufman
Bell Laboratories Inc.
Wisconsin, United States
 
 
To
31/01/2011 16:33:23
Joe Kaufman
Bell Laboratories Inc.
Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
01498052
Message ID:
01498137
Views:
119
Just in case anyone looks at this (I guess there is no way around the VSS dialog boxeswhen using Project Hooks? Pretty lame, VFP, pretty lame), I found an alternative in simple VSS COM automation. Something like:
lcUsername = ALLTRIM(SUBSTR(SYS(0), AT("#", SYS(0)) + 1))
lcVSSFile = "P:\PROJECTS\VSS\SRCSAFE.INI"
loVSS = CREATEOBJECT("SourceSafe")
loVSS.Open(lcVSSFile, lcUsername)
* See if we can find the PJM file, then sync to local spec.
loVSSPJMFile = loVSS.VSSItem("$/" + lcProjectName + "/" + lcProjectName + ".PJM")
loVSSPJMFile.Get(loVSSPJMFile.LocalSpec)
RELEASE loVSSPJMFile, loVSS
seems to do the trick. The above example gets the latest PJM file for a project that I then use to compare to the local PJX to make sure a project is in sync before building. After it is, I can grab all the latest files (using similar code to the above) and build the executable, all in one callable module..

I wasn't able to find any formal command to close or quit the VSS instance, so I just release the variables. If anyone has more experience with this and has a better method to make sure things are cleaned up, I'd appreciate any information in that regard!

Thanks,
JoeK
Previous
Reply
Map
View

Click here to load this message in the networking platform