From 935c23ca8b33ce9831c7d7a399dd26f6515ebdfb Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 6 Dec 2005 21:25:10 +0000 Subject: [PATCH] first part of iaxchan windows build git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@89 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/mod_iaxchan/mod_iaxchan.c | 20 ++- w32/vsnet/Freeswitch.sln | 9 ++ w32/vsnet/GetLibs.vbs | 31 +++++ w32/vsnet/mod_IaxChan.vcproj | 211 ++++++++++++++++++++++++++++++ 4 files changed, 270 insertions(+), 1 deletion(-) create mode 100644 w32/vsnet/mod_IaxChan.vcproj diff --git a/src/mod/mod_iaxchan/mod_iaxchan.c b/src/mod/mod_iaxchan/mod_iaxchan.c index 82eda133ae..3b84f8ae6a 100644 --- a/src/mod/mod_iaxchan/mod_iaxchan.c +++ b/src/mod/mod_iaxchan/mod_iaxchan.c @@ -30,9 +30,17 @@ * */ #include + +#ifdef WIN32 +#include +#include +#include +#include +#else #include #include #include +#endif static const char modname[] = "mod_iaxchan"; @@ -79,7 +87,17 @@ struct private_object { switch_thread_cond_t *cond; }; - +#ifdef WIN32 +void gettimeofday( struct timeval* tv, void* tz ) +{ + struct _timeb curSysTime; + _ftime(&curSysTime); + tv->tv_sec = curSysTime.time; + tv->tv_usec = curSysTime.millitm * 1000; + + return ; +} +#endif static void set_global_dialplan(char *dialplan) { if (globals.dialplan) { diff --git a/w32/vsnet/Freeswitch.sln b/w32/vsnet/Freeswitch.sln index 2e3bd8d2ce..7432578188 100644 --- a/w32/vsnet/Freeswitch.sln +++ b/w32/vsnet/Freeswitch.sln @@ -48,6 +48,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_woomerachan", "mod_woom {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_IaxChan", "mod_IaxChan.vcproj", "{3A5B9131-F20C-4A85-9447-6C1610941CEE}" + ProjectSection(ProjectDependencies) = postProject + {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -94,6 +99,10 @@ Global {FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug|Win32.Build.0 = Debug|Win32 {FE3540C5-3303-46E0-A69E-D92F775687F1}.Release|Win32.ActiveCfg = Release|Win32 {FE3540C5-3303-46E0-A69E-D92F775687F1}.Release|Win32.Build.0 = Release|Win32 + {3A5B9131-F20C-4A85-9447-6C1610941CEE}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A5B9131-F20C-4A85-9447-6C1610941CEE}.Debug|Win32.Build.0 = Debug|Win32 + {3A5B9131-F20C-4A85-9447-6C1610941CEE}.Release|Win32.ActiveCfg = Release|Win32 + {3A5B9131-F20C-4A85-9447-6C1610941CEE}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/w32/vsnet/GetLibs.vbs b/w32/vsnet/GetLibs.vbs index 65d1d9a5b1..64fa3ec196 100644 --- a/w32/vsnet/GetLibs.vbs +++ b/w32/vsnet/GetLibs.vbs @@ -10,6 +10,7 @@ BuildRelease=False BuildDebug=False BuildCore=False BuildModExosip=false +BuildModIaxChan=false quote=Chr(34) ScriptDir=Left(WScript.ScriptFullName,Len(WScript.ScriptFullName)-Len(WScript.ScriptName)) @@ -37,13 +38,17 @@ If objArgs.Count >=1 Then BuildCore=True Case "Mod_Exosip" BuildModExosip=True + Case "Mod_IaxChan" + BuildModIaxChan=True Case Else BuildCore=True BuildModExosip=True + BuildModIaxChan=True End Select Else BuildCore=True BuildModExosip=True + BuildModIaxChan=True End If @@ -55,6 +60,10 @@ If BuildModExosip Then BuildLibs_ModExosip BuildDebug, BuildRelease End If +If BuildModIaxChan Then + BuildLibs_ModIaxChan BuildDebug, BuildRelease +End If + WScript.Echo "Complete" Sub BuildLibs_Core(BuildDebug, BuildRelease) @@ -217,6 +226,28 @@ Sub BuildLibs_ModExosip(BuildDebug, BuildRelease) End Sub +Sub BuildLibs_ModIaxChan(BuildDebug, BuildRelease) + If Not FSO.FolderExists(LibDestDir & "iax") Then + WgetUnTarGz "http://www.sofaswitch.org/mikej/iax-0.2.3.tar.gz", LibDestDir + RenameFolder LibDestDir & "iax-0.2.3", "iax" + End If + If FSO.FolderExists(LibDestDir & "iax") Then + If BuildDebug Then + If Not FSO.FileExists(LibDestDir & "iax\Debug\libiax2.lib") Then + BuildViaVCBuild LibDestDir & "iax\libiax2.vcproj", "Debug" + End If + End If + If BuildRelease Then + If Not FSO.FileExists(LibDestDir & "iax\Release\libiax2.lib") Then + BuildViaVCBuild LibDestDir & "iax\libiax2.vcproj", "Release" + End If + End If + Else + Wscript.echo "Unable to download libIAX2" + End If + +End Sub + Sub UpgradeViaDevEnv(ProjectFile) Set oExec = WshShell.Exec(quote & DevEnv & quote & " " & quote & ProjectFile & quote & " /Upgrade ") Do While oExec.Status <> 1 diff --git a/w32/vsnet/mod_IaxChan.vcproj b/w32/vsnet/mod_IaxChan.vcproj new file mode 100644 index 0000000000..3d108d8876 --- /dev/null +++ b/w32/vsnet/mod_IaxChan.vcproj @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +