Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automating Builds w/ Project Hooks
Message
De
01/02/2011 09:27:54
Joe Kaufman
Bell Laboratories Inc.
Wisconsin, États-Unis
 
 
À
31/01/2011 16:33:23
Joe Kaufman
Bell Laboratories Inc.
Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de projet
Divers
Thread ID:
01498052
Message ID:
01498137
Vues:
120
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform