]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add autobuild for libxml2.
authorMichael Jerris <mike@jerris.com>
Tue, 28 Feb 2006 19:25:23 +0000 (19:25 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 28 Feb 2006 19:25:23 +0000 (19:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@701 d0543943-73ff-0310-b7d9-9358b9ac24b2

w32/vsnet/GetLibs.vbs

index 2f457b0e9c69c567c5eb72eb72f7eaecd7957465..820cb9ef62577d7299ad4a0b91e599470deedb2e 100644 (file)
@@ -469,6 +469,33 @@ Sub BuildLibs_portaudio(BuildDebug, BuildRelease)
        End If\r
 End Sub\r
 \r
+Sub BuildLibs_libxml2(BuildDebug, BuildRelease)\r
+       If Not FSO.FolderExists(LibDestDir & "libxml2") Then \r
+               WgetUnTarGz "http://xmlsoft.org/sources/libxml2-sources-2.6.23.tar.gz", LibDestDir \r
+               If Not FSO.FolderExists(LibDestDir & "libxml2-2.6.23") Then\r
+                       Wscript.echo "Unable to get libxml2 from default download location, Trying backup location:"\r
+                       WgetUnTarGz LibsBase & "libxml2-sources-2.6.23.tar.gz", LibDestDir\r
+               End If\r
+               RenameFolder LibDestDir & "libxml2-2.6.23", "libxml2"\r
+       End If\r
+       If FSO.FolderExists(LibDestDir & "libxml2") Then \r
+               If BuildDebug Then\r
+                       If Not FSO.FileExists(LibDestDir & "libxml2\win32\bin.msvc\libxml2_a.lib") Then \r
+                               Exec "cscript configure.js compiler=msvc iconv=no debug=yes", Showpath(LibDestDir & "libxml2\win32\" & "\")\r
+                               Exec "nmake /f Makefile.msvc  all  CRUNTIME=" & quote & "/MD /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE" & quote, Showpath(LibDestDir & "libxml2\win32\" & "\")\r
+                       End If\r
+               End If\r
+               If BuildRelease Then\r
+                       If Not FSO.FileExists(LibDestDir & "libxml2\win32\bin.msvc\libxml2_a.lib") Then \r
+                               Exec "cscript configure.js compiler=msvc iconv=no debug=no", Showpath(LibDestDir & "libxml2\win32\" & "\")\r
+                               Exec "nmake /f Makefile.msvc  all  CRUNTIME=" & quote & "/MD /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE" & quote, Showpath(LibDestDir & "libxml2\win32\" & "\")\r
+                       End If\r
+               End If\r
+       Else\r
+               Wscript.echo "Unable to download libxml2"\r
+       End If\r
+End Sub\r
+\r
 Sub BuildLibs_libg729(BuildDebug, BuildRelease)\r
        If FSO.FolderExists(LibDestDir & "codec\libg729") Then \r
                If BuildDebug Then\r
@@ -770,6 +797,32 @@ Sub BuildViaVCBuild(ProjectFile, BuildType)
        Loop While Not OExec.StdOut.atEndOfStream\r
 End Sub\r
 \r
+Sub Exec(cmdline, strpath)\r
+       If WshSysEnv("VS80COMNTOOLS")<> "" Then \r
+               vcver = "8"\r
+               Vsvars="call " & quote & Showpath(WshSysEnv("VS80COMNTOOLS")&"\") & "vsvars32.bat" & quote\r
+       Else If WshSysEnv("VS71COMNTOOLS")<> "" Then\r
+               vcver = "7"\r
+               Vsvars="call " & quote & Showpath(WshSysEnv("VS71COMNTOOLS")&"\") & "vsvars32.bat" & quote\r
+       Else\r
+               Wscript.Echo("Did not find any Visual Studio .net 2003 or 2005 on your machine")\r
+               WScript.Quit(1)\r
+       End If\r
+       End If\r
+       Wscript.echo "Executing : " & cmdline\r
+       Set MyFile = fso.CreateTextFile(UtilsDir & "tmpcmd.Bat", True)\r
+       MyFile.WriteLine("@" & "cd " & strpath)\r
+       MyFile.WriteLine("@" & Vsvars)\r
+       MyFile.WriteLine("@" & cmdline)\r
+       MyFile.Close\r
+\r
+       Set oExec = WshShell.Exec(UtilsDir & "tmpcmd.Bat")\r
+       Do\r
+               strFromProc = OExec.StdOut.ReadLine()\r
+               WScript.Echo  strFromProc\r
+       Loop While Not OExec.StdOut.atEndOfStream\r
+End Sub\r
+\r
 Sub GetVCBuild()\r
        If WshSysEnv("VS80COMNTOOLS")<> "" Then \r
                vcver = "8"\r