git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@855 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-03-13 06:39:37 +00:00
parent 692795797a
commit 125a2b2de5
1 changed files with 47 additions and 169 deletions

View File

@ -37,12 +37,12 @@ FreeswitchDir=Showpath(ScriptDir & "..\..")
UtilsDir=Showpath(ScriptDir & "Tools") UtilsDir=Showpath(ScriptDir & "Tools")
If objArgs.Count >=1 Then If objArgs.Count >=1 Then
If objArgs(0) <> "Version" Then If objArgs(0) <> "Version" Then
GetTarGZObjects UtilsDir GetCompressionTools UtilsDir
GetVCBuild GetVCBuild
Wscript.echo "Detected VCBuild: " & VCBuild Wscript.echo "Detected VCBuild: " & VCBuild
End If End If
Else Else
GetTarGZObjects UtilsDir GetCompressionTools UtilsDir
End If End If
' ************** ' **************
@ -219,10 +219,10 @@ WScript.Echo "Complete"
' ****************** ' ******************
Sub BuildLibs_aprutil(BuildDebug, BuildRelease) Sub BuildLibs_aprutil(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "apr-util") Then If Not FSO.FolderExists(LibDestDir & "apr-util") Then
WgetUnTarGz "ftp://ftp.wayne.edu/apache/apr/apr-util-1.2.2.tar.gz", LibDestDir WgetUnCompress "ftp://ftp.wayne.edu/apache/apr/apr-util-1.2.2.tar.gz", LibDestDir
If Not FSO.FolderExists(LibDestDir & "apr-util-1.2.2") Then If Not FSO.FolderExists(LibDestDir & "apr-util-1.2.2") Then
Wscript.echo "Unable to get apr-util from default download location, Trying backup location:" Wscript.echo "Unable to get apr-util from default download location, Trying backup location:"
WgetUnTarGz LibsBase & "apr-util-1.2.2.tar.gz", LibDestDir WgetUnCompress LibsBase & "apr-util-1.2.2.tar.gz", LibDestDir
End If End If
RenameFolder LibDestDir & "apr-util-1.2.2", "apr-util" RenameFolder LibDestDir & "apr-util-1.2.2", "apr-util"
FSO.CopyFile Utilsdir & "apr\xml.vcproj", LibDestDir & "apr-util\xml\expat\lib\", True FSO.CopyFile Utilsdir & "apr\xml.vcproj", LibDestDir & "apr-util\xml\expat\lib\", True
@ -259,10 +259,10 @@ End Sub
Sub BuildLibs_apriconv(BuildDebug, BuildRelease) Sub BuildLibs_apriconv(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "apr-iconv") Then If Not FSO.FolderExists(LibDestDir & "apr-iconv") Then
WgetUnTarGz "ftp://ftp.wayne.edu/apache/apr/apr-iconv-1.1.1.tar.gz", LibDestDir WgetUnCompress "ftp://ftp.wayne.edu/apache/apr/apr-iconv-1.1.1.tar.gz", LibDestDir
If Not FSO.FolderExists(LibDestDir & "apr-iconv-1.1.1") Then If Not FSO.FolderExists(LibDestDir & "apr-iconv-1.1.1") Then
Wscript.echo "Unable to get apr-iconv from default download location, Trying backup location:" Wscript.echo "Unable to get apr-iconv from default download location, Trying backup location:"
WgetUnTarGz LibsBase & "apr-iconv-1.1.1.tar.gz", LibDestDir WgetUnCompress LibsBase & "apr-iconv-1.1.1.tar.gz", LibDestDir
End If End If
RenameFolder LibDestDir & "apr-iconv-1.1.1", "apr-iconv" RenameFolder LibDestDir & "apr-iconv-1.1.1", "apr-iconv"
FSO.CopyFile Utilsdir & "apr\apriconv.vcproj", LibDestDir & "apr-iconv\", True FSO.CopyFile Utilsdir & "apr\apriconv.vcproj", LibDestDir & "apr-iconv\", True
@ -285,10 +285,10 @@ End Sub
Sub BuildLibs_apr(BuildDebug, BuildRelease) Sub BuildLibs_apr(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "apr") Then If Not FSO.FolderExists(LibDestDir & "apr") Then
WgetUnTarGz "ftp://ftp.wayne.edu/apache/apr/apr-1.2.2.tar.gz", LibDestDir WgetUnCompress "ftp://ftp.wayne.edu/apache/apr/apr-1.2.2.tar.gz", LibDestDir
If Not FSO.FolderExists(LibDestDir & "apr-1.2.2") Then If Not FSO.FolderExists(LibDestDir & "apr-1.2.2") Then
Wscript.echo "Unable to get apr from default download location, Trying backup location:" Wscript.echo "Unable to get apr from default download location, Trying backup location:"
WgetUnTarGz LibsBase & "apr-1.2.2.tar.gz", LibDestDir WgetUnCompress LibsBase & "apr-1.2.2.tar.gz", LibDestDir
End If End If
RenameFolder LibDestDir & "apr-1.2.2", "apr" RenameFolder LibDestDir & "apr-1.2.2", "apr"
FSO.CopyFile Utilsdir & "apr\apr.vcproj", LibDestDir & "apr\", True FSO.CopyFile Utilsdir & "apr\apr.vcproj", LibDestDir & "apr\", True
@ -312,10 +312,10 @@ End Sub
Sub BuildLibs_exosip(BuildDebug, BuildRelease) Sub BuildLibs_exosip(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "libeXosip2") Then If Not FSO.FolderExists(LibDestDir & "libeXosip2") Then
WgetUnTarGz "http://www.antisip.com/download/libeXosip2-2.2.2.tar.gz", LibDestDir WgetUnCompress "http://www.antisip.com/download/libeXosip2-2.2.2.tar.gz", LibDestDir
If Not FSO.FolderExists(LibDestDir & "libeXosip2-2.2.2") Then If Not FSO.FolderExists(LibDestDir & "libeXosip2-2.2.2") Then
Wscript.echo "Unable to get eXosip from default download location, Trying backup location:" Wscript.echo "Unable to get eXosip from default download location, Trying backup location:"
WgetUnTarGz LibsBase & "libeXosip2-2.2.2.tar.gz", LibDestDir WgetUnCompress LibsBase & "libeXosip2-2.2.2.tar.gz", LibDestDir
End If End If
RenameFolder LibDestDir & "libeXosip2-2.2.2", "libeXosip2" RenameFolder LibDestDir & "libeXosip2-2.2.2", "libeXosip2"
FindReplaceInFile LibDestDir & "libeXosip2\platform\vsnet\eXosip.vcproj", "WIN32;", "_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32;" FindReplaceInFile LibDestDir & "libeXosip2\platform\vsnet\eXosip.vcproj", "WIN32;", "_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32;"
@ -338,10 +338,10 @@ End Sub
Sub BuildLibs_libosip2(BuildDebug, BuildRelease) Sub BuildLibs_libosip2(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "osip") Then If Not FSO.FolderExists(LibDestDir & "osip") Then
WgetUnTarGz "http://www.antisip.com/download/libosip2-2.2.2.tar.gz", LibDestDir WgetUnCompress "http://www.antisip.com/download/libosip2-2.2.2.tar.gz", LibDestDir
If Not FSO.FolderExists(LibDestDir & "libosip2-2.2.2") Then If Not FSO.FolderExists(LibDestDir & "libosip2-2.2.2") Then
Wscript.echo "Unable to get osip from default download location, Trying backup location:" Wscript.echo "Unable to get osip from default download location, Trying backup location:"
WgetUnTarGz LibsBase & "libosip2-2.2.2.tar.gz", LibDestDir WgetUnCompress LibsBase & "libosip2-2.2.2.tar.gz", LibDestDir
End If End If
RenameFolder LibDestDir & "libosip2-2.2.2", "osip" RenameFolder LibDestDir & "libosip2-2.2.2", "osip"
FindReplaceInFile LibDestDir & "osip\platform\vsnet\osipparser2.vcproj", "WIN32;", "_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32;" FindReplaceInFile LibDestDir & "osip\platform\vsnet\osipparser2.vcproj", "WIN32;", "_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32;"
@ -385,10 +385,10 @@ End Sub
Sub BuildLibs_sqlite(BuildDebug, BuildRelease) Sub BuildLibs_sqlite(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "sqlite") Then If Not FSO.FolderExists(LibDestDir & "sqlite") Then
WgetUnZip "http://www.sqlite.org/sqlite-source-3_2_7.zip", LibDestDir WgetUnCompress "http://www.sqlite.org/sqlite-source-3_2_7.zip", LibDestDir
If Not FSO.FolderExists(LibDestDir & "sqlite-source-3_2_7") Then If Not FSO.FolderExists(LibDestDir & "sqlite-source-3_2_7") Then
Wscript.echo "Unable to get SQLite from default download location, Trying backup location:" Wscript.echo "Unable to get SQLite from default download location, Trying backup location:"
WgetUnTarGz LibsBase & "sqlite-source-3_2_7.zip", LibDestDir WgetUnCompress LibsBase & "sqlite-source-3_2_7.zip", LibDestDir
End If End If
RenameFolder LibDestDir & "sqlite-source-3_2_7", "sqlite" RenameFolder LibDestDir & "sqlite-source-3_2_7", "sqlite"
FSO.CopyFile Utilsdir & "sqlite.vcproj", LibDestDir & "sqlite\", True FSO.CopyFile Utilsdir & "sqlite.vcproj", LibDestDir & "sqlite\", True
@ -412,10 +412,10 @@ End Sub
Sub BuildLibs_iksemel(BuildDebug, BuildRelease) Sub BuildLibs_iksemel(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "iksemel") Then If Not FSO.FolderExists(LibDestDir & "iksemel") Then
WgetUnTarGz "http://jabberstudio.2nw.net/iksemel/iksemel-1.2.tar.gz", LibDestDir WgetUnCompress "http://jabberstudio.2nw.net/iksemel/iksemel-1.2.tar.gz", LibDestDir
If Not FSO.FolderExists(LibDestDir & "iksemel-1.2") Then If Not FSO.FolderExists(LibDestDir & "iksemel-1.2") Then
Wscript.echo "Unable to get iksemel from default download location, Trying backup location:" Wscript.echo "Unable to get iksemel from default download location, Trying backup location:"
WgetUnTarGz LibsBase & "iksemel-1.2.tar.gz", LibDestDir WgetUnCompress LibsBase & "iksemel-1.2.tar.gz", LibDestDir
End If End If
RenameFolder LibDestDir & "iksemel-1.2", "iksemel" RenameFolder LibDestDir & "iksemel-1.2", "iksemel"
FSO.CopyFile Utilsdir & "iksemel\iksemel.vcproj", LibDestDir & "iksemel\", True FSO.CopyFile Utilsdir & "iksemel\iksemel.vcproj", LibDestDir & "iksemel\", True
@ -456,7 +456,7 @@ End Sub
Sub BuildLibs_portaudio(BuildDebug, BuildRelease) Sub BuildLibs_portaudio(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "PortAudio") Then If Not FSO.FolderExists(LibDestDir & "PortAudio") Then
WgetUnZip LibsBase & "portaudio_v18_1.zip", LibDestDir WgetUnCompress LibsBase & "portaudio_v18_1.zip", LibDestDir
RenameFolder LibDestDir & "portaudio_v18_1", "PortAudio" RenameFolder LibDestDir & "portaudio_v18_1", "PortAudio"
End If End If
If FSO.FolderExists(LibDestDir & "PortAudio") Then If FSO.FolderExists(LibDestDir & "PortAudio") Then
@ -477,10 +477,10 @@ End Sub
Sub BuildLibs_libxml2(BuildDebug, BuildRelease) Sub BuildLibs_libxml2(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "libxml2") Then If Not FSO.FolderExists(LibDestDir & "libxml2") Then
WgetUnTarGz "http://xmlsoft.org/sources/libxml2-sources-2.6.23.tar.gz", LibDestDir WgetUnCompress "http://xmlsoft.org/sources/libxml2-sources-2.6.23.tar.gz", LibDestDir
If Not FSO.FolderExists(LibDestDir & "libxml2-2.6.23") Then If Not FSO.FolderExists(LibDestDir & "libxml2-2.6.23") Then
Wscript.echo "Unable to get libxml2 from default download location, Trying backup location:" Wscript.echo "Unable to get libxml2 from default download location, Trying backup location:"
WgetUnTarGz LibsBase & "libxml2-sources-2.6.23.tar.gz", LibDestDir WgetUnCompress LibsBase & "libxml2-sources-2.6.23.tar.gz", LibDestDir
End If End If
RenameFolder LibDestDir & "libxml2-2.6.23", "libxml2" RenameFolder LibDestDir & "libxml2-2.6.23", "libxml2"
End If End If
@ -536,10 +536,10 @@ End Sub
Sub BuildLibs_SpeexCodec(BuildDebug, BuildRelease) Sub BuildLibs_SpeexCodec(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "speex") Then If Not FSO.FolderExists(LibDestDir & "speex") Then
WgetUnTarGz "http://downloads.us.xiph.org/releases/speex/speex-1.1.11.1.tar.gz", LibDestDir WgetUnCompress "http://downloads.us.xiph.org/releases/speex/speex-1.1.11.1.tar.gz", LibDestDir
If Not FSO.FolderExists(LibDestDir & "speex-1.1.11.1") Then If Not FSO.FolderExists(LibDestDir & "speex-1.1.11.1") Then
Wscript.echo "Unable to get libspeex from default download location, Trying backup location:" Wscript.echo "Unable to get libspeex from default download location, Trying backup location:"
WgetUnTarGz LibsBase & "speex-1.1.11.1.tar.gz", LibDestDir WgetUnCompress LibsBase & "speex-1.1.11.1.tar.gz", LibDestDir
End If End If
RenameFolder LibDestDir & "speex-1.1.11.1", "speex" RenameFolder LibDestDir & "speex-1.1.11.1", "speex"
FSO.CopyFile Utilsdir & "libspeex.vcproj", LibDestDir & "speex\win32\libspeex\", True FSO.CopyFile Utilsdir & "libspeex.vcproj", LibDestDir & "speex\win32\libspeex\", True
@ -562,7 +562,7 @@ End Sub
Sub BuildLibs_libsndfile(BuildDebug, BuildRelease) Sub BuildLibs_libsndfile(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "libsndfile") Then If Not FSO.FolderExists(LibDestDir & "libsndfile") Then
WgetUnTarGz LibsBase & "libsndfile-1.0.12.tar.gz", LibDestDir WgetUnCompress LibsBase & "libsndfile-1.0.12.tar.gz", LibDestDir
RenameFolder LibDestDir & "libsndfile-1.0.12", "libsndfile" RenameFolder LibDestDir & "libsndfile-1.0.12", "libsndfile"
FSO.CopyFile Utilsdir & "libsndfile.vcproj", LibDestDir & "libsndfile\Win32\", True FSO.CopyFile Utilsdir & "libsndfile.vcproj", LibDestDir & "libsndfile\Win32\", True
End If End If
@ -584,7 +584,7 @@ End Sub
Sub BuildLibs_howl(BuildDebug, BuildRelease) Sub BuildLibs_howl(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "howl") Then If Not FSO.FolderExists(LibDestDir & "howl") Then
WgetUnTarGz LibsBase & "howl-1.0.0.tar.gz", LibDestDir WgetUnCompress LibsBase & "howl-1.0.0.tar.gz", LibDestDir
RenameFolder LibDestDir & "howl-1.0.0", "howl" RenameFolder LibDestDir & "howl-1.0.0", "howl"
FSO.CopyFile Utilsdir & "howl\libhowl.vcproj", LibDestDir & "howl\src\lib\howl\Win32\", True FSO.CopyFile Utilsdir & "howl\libhowl.vcproj", LibDestDir & "howl\src\lib\howl\Win32\", True
FSO.CopyFile Utilsdir & "howl\libmDNSResponder.vcproj", LibDestDir & "howl\src\lib\mDNSResponder\Win32\", True FSO.CopyFile Utilsdir & "howl\libmDNSResponder.vcproj", LibDestDir & "howl\src\lib\mDNSResponder\Win32\", True
@ -613,7 +613,7 @@ End Sub
Sub BuildLibs_libresample(BuildDebug, BuildRelease) Sub BuildLibs_libresample(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "libresample") Then If Not FSO.FolderExists(LibDestDir & "libresample") Then
WgetUnZip LibsBase & "libresample-0.1.3.zip", LibDestDir WgetUnCompress LibsBase & "libresample-0.1.3.zip", LibDestDir
RenameFolder LibDestDir & "libresample-0.1.3", "libresample" RenameFolder LibDestDir & "libresample-0.1.3", "libresample"
End If End If
If FSO.FolderExists(LibDestDir & "libresample") Then If FSO.FolderExists(LibDestDir & "libresample") Then
@ -634,7 +634,7 @@ End Sub
Sub BuildLibs_pcre(BuildDebug, BuildRelease) Sub BuildLibs_pcre(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "pcre") Then If Not FSO.FolderExists(LibDestDir & "pcre") Then
WgetUnTarGz LibsBase & "pcre-6.4.tar.gz", LibDestDir WgetUnCompress LibsBase & "pcre-6.4.tar.gz", LibDestDir
RenameFolder LibDestDir & "pcre-6.4", "pcre" RenameFolder LibDestDir & "pcre-6.4", "pcre"
If Not FSO.FolderExists(LibDestDir & "pcre\win32") Then If Not FSO.FolderExists(LibDestDir & "pcre\win32") Then
FSO.CreateFolder(LibDestDir & "pcre\win32") FSO.CreateFolder(LibDestDir & "pcre\win32")
@ -664,7 +664,7 @@ End Sub
Sub BuildLibs_curl(BuildDebug, BuildRelease) Sub BuildLibs_curl(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "curl") Then If Not FSO.FolderExists(LibDestDir & "curl") Then
WgetUnTarGz LibsBase & "curl-7.15.2.tar.gz", LibDestDir WgetUnCompress LibsBase & "curl-7.15.2.tar.gz", LibDestDir
RenameFolder LibDestDir & "curl-7.15.2", "curl" RenameFolder LibDestDir & "curl-7.15.2", "curl"
FSO.CopyFile Utilsdir & "curl\curllib.vcproj", LibDestDir & "curl\lib\", True FSO.CopyFile Utilsdir & "curl\curllib.vcproj", LibDestDir & "curl\lib\", True
End If End If
@ -686,7 +686,7 @@ End Sub
Sub BuildLibs_ldap(BuildDebug, BuildRelease) Sub BuildLibs_ldap(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "openldap") Then If Not FSO.FolderExists(LibDestDir & "openldap") Then
WgetUnTarGz LibsBase & "openldap-2.3.19.tar.gz", LibDestDir WgetUnCompress LibsBase & "openldap-2.3.19.tar.gz", LibDestDir
RenameFolder LibDestDir & "openldap-2.3.19", "openldap" RenameFolder LibDestDir & "openldap-2.3.19", "openldap"
FSO.CopyFile Utilsdir & "openldap\lber_types.h", LibDestDir & "openldap\include\", True FSO.CopyFile Utilsdir & "openldap\lber_types.h", LibDestDir & "openldap\include\", True
FSO.CopyFile Utilsdir & "openldap\ldap_config.h", LibDestDir & "openldap\include\", True FSO.CopyFile Utilsdir & "openldap\ldap_config.h", LibDestDir & "openldap\include\", True
@ -717,10 +717,10 @@ End Sub
Sub BuildLibs_SpiderMonkey(BuildDebug, BuildRelease) Sub BuildLibs_SpiderMonkey(BuildDebug, BuildRelease)
If Not FSO.FolderExists(LibDestDir & "js") Then If Not FSO.FolderExists(LibDestDir & "js") Then
WgetUnZip LibsBase & "js20051231.zip", LibDestDir WgetUnCompress LibsBase & "js20051231.zip", LibDestDir
RenameFolder LibDestDir & "js20051231", "js" RenameFolder LibDestDir & "js20051231", "js"
WgetUnZip LibsBase & "nspr-4.6.1.winnt5.debug.zip", LibDestDir & "js" WgetUnCompress LibsBase & "nspr-4.6.1.winnt5.debug.zip", LibDestDir & "js"
WgetUnZip LibsBase & "nspr-4.6.1.winnt5.release.zip", LibDestDir & "js" WgetUnCompress LibsBase & "nspr-4.6.1.winnt5.release.zip", LibDestDir & "js"
FSO.CreateFolder LibDestDir & "js\nspr\" FSO.CreateFolder LibDestDir & "js\nspr\"
FSO.CopyFolder LibDestDir & "js\nspr-4.6.1.winnt5.debug\nspr-4.6.1\*", LibDestDir & "js\nspr\",true FSO.CopyFolder LibDestDir & "js\nspr-4.6.1.winnt5.debug\nspr-4.6.1\*", LibDestDir & "js\nspr\",true
End If End If
@ -774,7 +774,7 @@ Sub CreateSwitchVersion()
VERSION=strFromProc VERSION=strFromProc
Loop While Not OExec.StdOut.atEndOfStream Loop While Not OExec.StdOut.atEndOfStream
If VERSION = "" Then If VERSION = "" Then
WgetUnZip ToolsBase & "svnversion.zip", UtilsDir WgetUnCompress ToolsBase & "svnversion.zip", UtilsDir
Set oExec = WshShell.Exec(UtilsDir & "svnversion\tmpVersion.Bat") Set oExec = WshShell.Exec(UtilsDir & "svnversion\tmpVersion.Bat")
Do Do
strFromProc = OExec.StdOut.ReadLine() strFromProc = OExec.StdOut.ReadLine()
@ -798,27 +798,6 @@ Sub CreateSwitchVersion()
End If End If
End Sub End Sub
Sub UpgradeViaDevEnv(ProjectFile)
Set oExec = WshShell.Exec(quote & DevEnv & quote & " " & quote & ProjectFile & quote & " /Upgrade ")
Do While oExec.Status <> 1
WScript.Sleep 100
Loop
End Sub
Sub BuildViaDevEnv(ProjectFile, BuildType)
Wscript.echo "Building : " & ProjectFile & " Config type: " & BuildType
BuildCmd=quote & DevEnv & quote & " " & quote & ProjectFile & quote & " /Build " & BuildType
Set MyFile = fso.CreateTextFile(UtilsDir & "tmpBuild.Bat", True)
MyFile.WriteLine("@" & BuildCmd)
MyFile.Close
Set oExec = WshShell.Exec(UtilsDir & "tmpBuild.Bat")
Do
strFromProc = OExec.StdOut.ReadLine()
WScript.Echo strFromProc
Loop While Not OExec.StdOut.atEndOfStream
End Sub
Sub BuildViaVCBuild(ProjectFile, BuildType) Sub BuildViaVCBuild(ProjectFile, BuildType)
Wscript.echo "Building : " & ProjectFile & " Config type: " & BuildType Wscript.echo "Building : " & ProjectFile & " Config type: " & BuildType
BuildCmd=quote & VCBuild & quote & " /nologo /nocolor " & quote & ProjectFile & quote & " " & quote & BuildType & quote BuildCmd=quote & VCBuild & quote & " /nologo /nocolor " & quote & ProjectFile & quote & " " & quote & BuildType & quote
@ -873,52 +852,11 @@ Sub GetVCBuild()
End If End If
End Sub End Sub
Sub GetDevEnv()
If WshSysEnv("VS80COMNTOOLS")<> "" Then
vcver = "8"
DevEnv=Showpath(WshSysEnv("VS80COMNTOOLS")&"..\IDE\") & "devenv"
Else If WshSysEnv("VS71COMNTOOLS")<> "" Then
vcver = "7"
DevEnv=Showpath(WshSysEnv("VS71COMNTOOLS")&"..\IDE\") & "devenv"
Else
Wscript.Echo("Did not find any Visual Studio .net 2003 or 2005 on your machine")
WScript.Quit(1)
End If
End If
End Sub
Sub RenameFolder(FolderName, NewFolderName) Sub RenameFolder(FolderName, NewFolderName)
Set Folder=FSO.GetFolder(FolderName) Set Folder=FSO.GetFolder(FolderName)
Folder.Name = NewFolderName Folder.Name = NewFolderName
End Sub End Sub
Sub Upgrade(OldFileName, NewFileName)
If WshSysEnv("VS80COMNTOOLS")<> "" Then
Wscript.echo "8.0"
Set vcProj = CreateObject("VisualStudio.VCProjectEngine.8.0")
Else If WshSysEnv("VS71COMNTOOLS")<> "" Then
Wscript.echo "7.1"
Set vcProj = CreateObject("VisualStudio.VCProjectEngine.7.1")
Else
Wscript.Echo("Did not find any Visual Studio .net 2003 or 2005 on your machine")
WScript.Quit(1)
End If
End If
Set vcProject = vcProj.LoadProject(OldFileName)
If Not FSO.FileExists(vcProject.ProjectFile) Then
' // specify name and location of new project file
vcProject.ProjectFile = NewFileName
' // call the project engine to save this off.
' // when no name is shown, it will create one with the .vcproj name
vcProject.Save()
End If
' WScript.Echo("New Project Name: "+vcProject.ProjectFile+"")
'On Error GoTo 0
End Sub
Sub Unix2dos(FileName) Sub Unix2dos(FileName)
Const OpenAsASCII = 0 ' Opens the file as ASCII (TristateFalse) Const OpenAsASCII = 0 ' Opens the file as ASCII (TristateFalse)
Const OpenAsUnicode = -1 ' Opens the file as Unicode (TristateTrue) Const OpenAsUnicode = -1 ' Opens the file as Unicode (TristateTrue)
@ -955,16 +893,7 @@ Sub FindReplaceInFile(FileName, sFind, sReplace)
fNewFile.Close fNewFile.Close
End Sub End Sub
Sub WgetUnTarGZ(URL, DestFolder) Sub WgetUnCompress(URL, DestFolder)
If Right(DestFolder, 1) <> "\" Then DestFolder = DestFolder & "\" End If
StartPos = InstrRev(URL, "/", -1, 1)
strlength = Len(URL)
filename=Right(URL,strlength-StartPos)
Wget URL, DestFolder
UnTarGZ Destfolder & filename, DestFolder
End Sub
Sub WgetUnZip(URL, DestFolder)
If Right(DestFolder, 1) <> "\" Then DestFolder = DestFolder & "\" End If If Right(DestFolder, 1) <> "\" Then DestFolder = DestFolder & "\" End If
StartPos = InstrRev(URL, "/", -1, 1) StartPos = InstrRev(URL, "/", -1, 1)
strlength = Len(URL) strlength = Len(URL)
@ -972,92 +901,47 @@ Sub WgetUnZip(URL, DestFolder)
NameEnd = InstrRev(filename, ".",-1, 1) NameEnd = InstrRev(filename, ".",-1, 1)
filestrlength = Len(filename) filestrlength = Len(filename)
filebase = Left(filename,NameEnd) filebase = Left(filename,NameEnd)
fileext = Right(filename, Len(filename) - NameEnd)
Wget URL, DestFolder Wget URL, DestFolder
UnZip Destfolder & filename, DestFolder & filebase If fileext = "zip" Then
UnCompress Destfolder & filename, DestFolder & filebase
Else
UnCompress Destfolder & filename, DestFolder
End If
End Sub End Sub
Sub GetTarGZObjects(DestFolder) Sub GetCompressionTools(DestFolder)
Dim oExec Dim oExec
If Right(DestFolder, 1) <> "\" Then DestFolder = DestFolder & "\" End If If Right(DestFolder, 1) <> "\" Then DestFolder = DestFolder & "\" End If
If Not FSO.FileExists(DestFolder & "7za.exe") Then If Not FSO.FileExists(DestFolder & "7za.exe") Then
Wget ToolsBase & "7za.exe", DestFolder Wget ToolsBase & "7za.exe", DestFolder
End If End If
' If Not FSO.FileExists(DestFolder & "XTar.dll") Then
' Wget ToolsBase & "XTar.dll", DestFolder
' End If
' If Not FSO.FileExists(DestFolder & "XGZip.dll") Then
' Wget ToolsBase & "XGZip.dll", DestFolder
' End If
' If Not FSO.FileExists(DestFolder & "XZip.dll") Then
' Wget ToolsBase & "XZip.dll", DestFolder
' End If
' WshShell.Run "regsvr32 /s " & DestFolder & "XTar.dll", 6, True
' WshShell.Run "regsvr32 /s " & DestFolder & "XGZip.dll", 6, True
'WshShell.Run "regsvr32 /s " & DestFolder & "XZip.dll", 6, True
End Sub End Sub
Sub UnTarGZ(TGZfile, DestFolder) Sub UnCompress(Archive, DestFolder)
wscript.echo("Extracting: " & TGZfile) wscript.echo("Extracting: " & Archive)
' Set objTAR = WScript.CreateObject("XStandard.TAR")
' Set objGZip = WScript.CreateObject("XStandard.GZip")
' objGZip.Decompress TGZfile, Destfolder
' objTAR.UnPack Left(TGZfile, Len(TGZfile)-3), Destfolder
' Set objTAR = Nothing
' Set objGZip = Nothing
' WScript.Sleep(500)
Set MyFile = fso.CreateTextFile(UtilsDir & "tmpcmd.Bat", True) Set MyFile = fso.CreateTextFile(UtilsDir & "tmpcmd.Bat", True)
MyFile.WriteLine("@" & UtilsDir & "7za.exe x " & TGZfile & " -y -o" & DestFolder) MyFile.WriteLine("@" & UtilsDir & "7za.exe x " & Archive & " -y -o" & DestFolder)
MyFile.Close MyFile.Close
Set oExec = WshShell.Exec(UtilsDir & "tmpcmd.Bat") Set oExec = WshShell.Exec(UtilsDir & "tmpcmd.Bat")
Do Do
WScript.Echo OExec.StdOut.ReadLine() WScript.Echo OExec.StdOut.ReadLine()
Loop While Not OExec.StdOut.atEndOfStream Loop While Not OExec.StdOut.atEndOfStream
If FSO.FileExists(Left(TGZfile, Len(TGZfile)-3)) Then If FSO.FileExists(Left(Archive, Len(Archive)-3)) Then
Set MyFile = fso.CreateTextFile(UtilsDir & "tmpcmd.Bat", True) Set MyFile = fso.CreateTextFile(UtilsDir & "tmpcmd.Bat", True)
MyFile.WriteLine("@" & UtilsDir & "7za.exe x " & Left(TGZfile, Len(TGZfile)-3) & " -y -o" & DestFolder) MyFile.WriteLine("@" & UtilsDir & "7za.exe x " & Left(Archive, Len(Archive)-3) & " -y -o" & DestFolder)
MyFile.Close MyFile.Close
Set oExec = WshShell.Exec(UtilsDir & "tmpcmd.Bat") Set oExec = WshShell.Exec(UtilsDir & "tmpcmd.Bat")
Do Do
WScript.Echo OExec.StdOut.ReadLine() WScript.Echo OExec.StdOut.ReadLine()
Loop While Not OExec.StdOut.atEndOfStream Loop While Not OExec.StdOut.atEndOfStream
WScript.Sleep(500) WScript.Sleep(500)
FSO.DeleteFile Left(TGZfile, Len(TGZfile)-3) ,true FSO.DeleteFile Left(Archive, Len(Archive)-3) ,true
End If End If
WScript.Sleep(500) WScript.Sleep(500)
End Sub End Sub
Sub UnZip(Zipfile, DestFolder)
' Dim objZip
' Set objZip = WScript.CreateObject("XStandard.Zip")
' wscript.echo("Extracting: " & Zipfile)
' objZip.UnPack Zipfile, DestFolder
' Set objZip = Nothing
' WScript.Sleep(500)
Set MyFile = fso.CreateTextFile(UtilsDir & "tmpcmd.Bat", True)
MyFile.WriteLine("@" & UtilsDir & "7za.exe x " & Zipfile & " -y -o" & DestFolder)
MyFile.Close
Set oExec = WshShell.Exec(UtilsDir & "tmpcmd.Bat")
Do
WScript.Echo OExec.StdOut.ReadLine()
Loop While Not OExec.StdOut.atEndOfStream
WScript.Sleep(500)
End Sub
Sub Wget(URL, DestFolder) Sub Wget(URL, DestFolder)
StartPos = InstrRev(URL, "/", -1, 1) StartPos = InstrRev(URL, "/", -1, 1)
strlength = Len(URL) strlength = Len(URL)
filename=Right(URL,strlength-StartPos) filename=Right(URL,strlength-StartPos)
@ -1074,15 +958,9 @@ Sub Wget(URL, DestFolder)
oStream.type = adTypeBinary oStream.type = adTypeBinary
oStream.open oStream.open
oStream.write xml.responseBody oStream.write xml.responseBody
' Do not overwrite an existing file
'oStream.savetofile DestFolder & filename, adSaveCreateNotExist
' Use this form to overwrite a file if it already exists
oStream.savetofile DestFolder & filename, adSaveCreateOverWrite oStream.savetofile DestFolder & filename, adSaveCreateOverWrite
oStream.close oStream.close
End Sub End Sub
Function Showpath(folderspec) Function Showpath(folderspec)