From 987c87a7cf5d434f22dd89c91f3fcd449171f9df Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 29 Jun 2011 19:09:29 -0700 Subject: [PATCH] Fix curl build. --- extensions/curl/AMBuilder | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/extensions/curl/AMBuilder b/extensions/curl/AMBuilder index 05423ed46..9264ea027 100644 --- a/extensions/curl/AMBuilder +++ b/extensions/curl/AMBuilder @@ -19,10 +19,21 @@ def BuildCURL(): curl.AddCommand(command.DirectCommand(args)) curl.AddCommand(command.ShellCommand('cd lib && make')) else: - args = ['vcbuild', - os.path.join(AMBuild.sourceFolder, 'extensions', 'curl', 'curl-src', 'lib', - 'build_libcurl.vcproj'), - 'LIB Release'] + args = '' + projpath = os.path.join(AMBuild.sourceFolder, 'extensions', 'curl', 'curl-src', 'lib', + 'build_libcurl.vcproj') + try: + subprocess.Popen('vcbuild') + except: + xprojpath = os.path.join(AMBuild.sourceFolder, 'extensions', 'curl', 'curl-src', 'lib', + 'build_libcurl.vcxproj') + if not os.path.isfile(xprojpath): + curl.AddCommand(command.DirectCommand(['vcupgrade', projpath])) + args = ['msbuild', xprojpath, '/p:Configuration=LIB Release'] + + if not args: + args = ['vcbuild', projpath, 'LIB Release'] + curl.AddCommand(command.DirectCommand(args)) #die "Unable to find libcurl.lib!\n" unless (-f "LIB-Release\\libcurl.lib");