提交 5c37e18c authored 作者: Michael Jerris's avatar Michael Jerris

Scripts for MSVC\Windows to download and compile dependency libs. Still to do,…

Scripts for MSVC\Windows to download and compile dependency libs.  Still to do, consolidate scripts into 1 vbscript and probably a bat file stub to launch the vbscript.

git-svn-id: http://svn.freeswitch.org/svn/local/src/freeswitch@23 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 b91edd01
差异被折叠。
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objArgs = WScript.Arguments
'system, user, or process
wscript.echo Showpath(objargs(0))
Function Showpath(folderspec)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
showpath = f.path
End Function
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ccext2", "..\common\ccext2.vcproj", "{BDCDCE59-1DBA-48A9-A6F4-00C6E8528A29}"
ProjectSection(ProjectDependencies) = postProject
{38CADFB3-E363-4B5C-9BA3-F77321211B9D} = {38CADFB3-E363-4B5C-9BA3-F77321211B9D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ccgnu2", "..\common\ccgnu2.vcproj", "{38CADFB3-E363-4B5C-9BA3-F77321211B9D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ccrtp1", "ccrtp1.vcproj", "{3C266BF0-3EDE-4A83-8D10-E254456F7CDF}"
ProjectSection(ProjectDependencies) = postProject
{38CADFB3-E363-4B5C-9BA3-F77321211B9D} = {38CADFB3-E363-4B5C-9BA3-F77321211B9D}
{BDCDCE59-1DBA-48A9-A6F4-00C6E8528A29} = {BDCDCE59-1DBA-48A9-A6F4-00C6E8528A29}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BDCDCE59-1DBA-48A9-A6F4-00C6E8528A29}.Debug|Win32.ActiveCfg = Debug|Win32
{BDCDCE59-1DBA-48A9-A6F4-00C6E8528A29}.Debug|Win32.Build.0 = Debug|Win32
{BDCDCE59-1DBA-48A9-A6F4-00C6E8528A29}.Release|Win32.ActiveCfg = Release|Win32
{BDCDCE59-1DBA-48A9-A6F4-00C6E8528A29}.Release|Win32.Build.0 = Release|Win32
{38CADFB3-E363-4B5C-9BA3-F77321211B9D}.Debug|Win32.ActiveCfg = Debug|Win32
{38CADFB3-E363-4B5C-9BA3-F77321211B9D}.Debug|Win32.Build.0 = Debug|Win32
{38CADFB3-E363-4B5C-9BA3-F77321211B9D}.Release|Win32.ActiveCfg = Release|Win32
{38CADFB3-E363-4B5C-9BA3-F77321211B9D}.Release|Win32.Build.0 = Release|Win32
{3C266BF0-3EDE-4A83-8D10-E254456F7CDF}.Debug|Win32.ActiveCfg = Debug|Win32
{3C266BF0-3EDE-4A83-8D10-E254456F7CDF}.Debug|Win32.Build.0 = Debug|Win32
{3C266BF0-3EDE-4A83-8D10-E254456F7CDF}.Release|Win32.ActiveCfg = Release|Win32
{3C266BF0-3EDE-4A83-8D10-E254456F7CDF}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
--- thread.cpp.bak 2005-07-19 08:16:10.000000000 -0400
+++ thread.cpp 2005-11-14 13:04:59.200854500 -0500
@@ -1758,14 +1758,16 @@
int SysTime::getTimeOfDay(struct timeval *tp)
{
struct timeval temp;
- int ret(0);
+ time_t now;
+ int ret(0);
lock();
#ifdef WIN32
// We could use _ftime(), but it is not available on WinCE.
// (WinCE also lacks time.h)
// Note also that the average error of _ftime is around 20 ms :)
- time(&temp.tv_sec);
+ time(&now);
+ temp.tv_sec = (long) now;
temp.tv_usec = (GetTickCount() % 1000) * 1000;
memcpy(tp, &temp, sizeof(struct timeval));
#else
--- lockfile.cpp.bak 2005-04-23 19:08:21.000000000 -0400
+++ lockfile.cpp 2005-11-14 13:05:56.305244100 -0500
@@ -68,7 +68,7 @@
bool Lockfile::lock(const char *name)
{
char mname[65];
- char *ext = strrchr(name, '/');
+ char *ext = (char *) strrchr(name, '/');
if(ext)
name = ++ext;
--- socket.cpp.bak 2005-10-09 09:12:35.000000000 -0400
+++ socket.cpp 2005-11-14 13:05:32.710375300 -0500
@@ -1330,7 +1330,7 @@
return;
}
-#if defined(SO_REUSEADDR) && !defined(WIN32)
+#if defined(SO_REUSEADDR) //&& !defined(WIN32)
int opt = 1;
setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt,
(socklen_t)sizeof(opt));
Const OpenAsASCII = 0 ' Opens the file as ASCII (TristateFalse)
Const OpenAsUnicode = -1 ' Opens the file as Unicode (TristateTrue)
Const OpenAsDefault = -2 ' Opens the file using the system default
Const OverwriteIfExist = -1
Const FailIfNotExist = 0
Const ForReading = 1
Set objArgs = WScript.Arguments
' path to original log file
sFileName = objargs(0)
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set fOrgFile = oFSO.OpenTextFile(sFileName, ForReading, FailIfNotExist, OpenAsASCII)
sText = fOrgFile.ReadAll
fOrgFile.Close
sText = Replace(sText, vbLf, vbCrLf)
Set fNewFile = oFSO.CreateTextFile(sFileName, OverwriteIfExist, OpenAsASCII)
fNewFile.WriteLine sText
fNewFile.Close
Set vcProj = CreateObject("VisualStudio.VCProjectEngine.7.1")
Set objFile = Createobject("Scripting.FileSystemObject")
Set objArgs = WScript.Arguments
'// check the arguments to be sure it's right
if (objArgs.Count() < 2) Then
WScript.Echo("VC6 or 5 DSP Project File Conversion")
WScript.Echo("Opens specified .dsp and converts to VC7.1 Format.")
WScript.Echo("Will create project file with .vcproj extension")
WScript.Echo("usage: <full path\project.dsp> <full path\project.vcproj>")
WScript.Quit(1)
End If
WScript.Echo("Converting: "+ objArgs.Item(0))
'// If there is a file name of the .vcproj extension, do not convert
Set vcProject = vcProj.LoadProject(objArgs.Item(0))
If Not objFile.FileExists(vcProject.ProjectFile) Then
' // specify name and location of new project file
vcProject.ProjectFile = objArgs.Item(1)
' // call the project engine to save this off.
' // when no name is shown, it will create one with the .vcproj name
vcProject.Save()
WScript.Echo("New Project Name: "+vcProject.ProjectFile+"")
else
WScript.Echo("ERROR!: "+vcProject.ProjectFile+" already exists!")
End If
Set vcProj = CreateObject("VisualStudio.VCProjectEngine.8.0")
Set objFile = Createobject("Scripting.FileSystemObject")
Set objArgs = WScript.Arguments
'// check the arguments to be sure it's right
if (objArgs.Count() < 2) Then
WScript.Echo("VC6 or 5 DSP Project File Conversion")
WScript.Echo("Opens specified .dsp and converts to VC7.1 Format.")
WScript.Echo("Will create project file with .vcproj extension")
WScript.Echo("usage: <full path\project.dsp> <full path\project.vcproj>")
WScript.Quit(1)
End If
WScript.Echo("Converting: "+ objArgs.Item(0))
'// If there is a file name of the .vcproj extension, do not convert
Set vcProject = vcProj.LoadProject(objArgs.Item(0))
If Not objFile.FileExists(vcProject.ProjectFile) Then
' // specify name and location of new project file
vcProject.ProjectFile = objArgs.Item(1)
' // call the project engine to save this off.
' // when no name is shown, it will create one with the .vcproj name
vcProject.Save()
WScript.Echo("New Project Name: "+vcProject.ProjectFile+"")
else
WScript.Echo("ERROR!: "+vcProject.ProjectFile+" already exists!")
End If
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objArgs = WScript.Arguments
StartPos = InstrRev(objargs(0), "/", -1, 1)
strlength = Len(objargs(0))
If objArgs.Count > 1 Then
Path= Showpath(objargs(1))
Else
Path= Showpath(".")
End If
Wget objargs(0), Path & "\", Right(objargs(0),strlength-StartPos)
Sub Wget(URL, DestFolder, Imagefile)
Set xml = CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", URL, False
xml.Send
set oStream = createobject("Adodb.Stream")
Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
Const adSaveCreateNotExist = 1
oStream.type = adTypeBinary
oStream.open
oStream.write xml.responseBody
' Do not overwrite an existing file
oStream.savetofile DestFolder & ImageFile, adSaveCreateNotExist
' Use this form to overwrite a file if it already exists
' oStream.savetofile DestFolder & ImageFile, adSaveCreateOverWrite
oStream.close
set oStream = nothing
Set xml = Nothing
End Sub
Function Showpath(folderspec)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
showpath = f.path
End Function
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论