first part of iaxchan windows build

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@89 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2005-12-06 21:25:10 +00:00
parent b15265cbdb
commit 935c23ca8b
4 changed files with 270 additions and 1 deletions

View File

@ -30,9 +30,17 @@
*
*/
#include <switch.h>
#ifdef WIN32
#include <iax2.h>
#include <iax-client.h>
#include <iax2-parser.h>
#include <sys/timeb.h>
#else
#include <iax/iax2.h>
#include <iax/iax-client.h>
#include <iax/iax2-parser.h>
#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) {

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,211 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="mod_IaxChan"
ProjectGUID="{3A5B9131-F20C-4A85-9447-6C1610941CEE}"
RootNamespace="mod_IaxChan"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="cscript /nologo $(InputDir)getlibs.vbs Mod_IaxChan Debug"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(InputDir)..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\libs\apr\include&quot;;&quot;$(InputDir)..\..\..\libs\iax\src&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libapr-1.lib libiax2.lib Ws2_32.lib Iphlpapi.lib"
OutputFile="$(OutDir)/mod/mod_IaxChan.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="$(InputDir)..\..\libs\apr\Debug;$(InputDir)..\..\libs\iax\Debug"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/mod_IaxChan.pdb"
SubSystem="2"
ImportLibrary="$(OutDir)/mod_IaxChan.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="cscript /nologo $(InputDir)getlibs.vbs Mod_IaxChan Release"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(InputDir)..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\libs\apr\include&quot;;&quot;$(InputDir)..\..\..\libs\iax\src&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libapr-1.lib libiax2.lib"
OutputFile="$(OutDir)/mod/mod_IaxChan.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(InputDir)..\..\libs\apr\Release&quot;;&quot;$(InputDir)..\..\libs\iax\Release&quot;"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/mod_IaxChan.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\src\mod\mod_iaxchan\mod_iaxchan.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>