FS-6450 [unimrcp] Update library

[apr] Backport APR_RING_FOREACH and APR_RING_FOREACH_SAFE macros to APR for unimrcp compatibility.

 [unimrcp] configure.gnu - need full path, not relative path for library paths

 [unimrcp] added uni_revision.h - couldn't get it to autogenerate from build

 [mod_unimrcp] add better logging and error checking on module load.  Currently dumps core on MRCPv1 TTS attempt

 [mod_unimrcp] don't configure MRCPv1 session with a connection agent- causes crash
This commit is contained in:
Chris Rienzo committed 2014-11-18 14:23:54 -05:00
1 parent f198d82bac
commit 8330336e9a
533 files changed
+16386 -18997

No files matched your search

@@ -1,68 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="prepare"
ProjectGUID="{01D63BF5-7798-4746-852A-4B45229BB735}"
RootNamespace="prepare"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
ExcludedFromBuild="false"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
</Files>
</VisualStudioProject>
+4 -4
View File
@@ -28,7 +28,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; (&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xsd&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\client-profiles\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\client-profiles\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\$(ConfigurationName)\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; (&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xsd&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\client-profiles\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\client-profiles\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\var&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\var\&quot;&#x0D;&#x0A;"
ExcludedFromBuild="false"
/>
<Tool
@@ -51,7 +51,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf&quot; (&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xsd&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\client-profiles\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
CommandLine="xcopy &quot;$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\$(PlatformName)\$(ConfigurationName)\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf&quot; (&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xsd&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\client-profiles\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\&quot;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\var&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\var\&quot;&#x0D;&#x0A;"
ExcludedFromBuild="false"
/>
<Tool
@@ -76,7 +76,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; (&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xsd&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\client-profiles\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\client-profiles\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\$(ConfigurationName)\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; (&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xsd&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\client-profiles\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\client-profiles\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\var&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\var\&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@@ -99,7 +99,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf&quot; (&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xsd&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\client-profiles\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
CommandLine="xcopy &quot;$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\$(PlatformName)\$(ConfigurationName)\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf&quot; (&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\*.xsd&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SolutionDir)conf\client-profiles\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\&quot;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\var&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\var\&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
+205
View File
@@ -0,0 +1,205 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{01D63BF5-7798-4746-852A-4B45229BB735}</ProjectGuid>
<RootNamespace>prepare</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(ProjectDir)..\..\build\props\apr.props" />
<Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(ProjectDir)..\..\build\props\apr.props" />
<Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(ProjectDir)..\..\build\props\apr.props" />
<Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(ProjectDir)..\..\build\props\apr.props" />
<Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>xcopy "$(AprDir)\$(Configuration)\libapr-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
xcopy "$(AprUtilDir)\$(Configuration)\libaprutil-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
if exist "$(AprIconvDir)\$(Configuration)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(Configuration)\libapriconv-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
if exist "$(AprIconvDir)\$(Configuration)\iconv" (
if not exist "$(SolutionDir)$(Configuration)\bin\iconv" mkdir "$(SolutionDir)$(Configuration)\bin\iconv"
xcopy "$(AprIconvDir)\$(Configuration)\iconv\*.so" "$(SolutionDir)$(Configuration)\bin\iconv\" /Y
)
)
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(Configuration)\libsofia_sip_ua.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(Configuration)\pthreadVC2.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
if not exist "$(SolutionDir)$(Configuration)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(Configuration)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(Configuration)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(Configuration)\conf\client-profiles\" /Y
)
if not exist "$(SolutionDir)$(Configuration)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(Configuration)\data\" /Y
if not exist "$(SolutionDir)$(Configuration)\log" mkdir "$(SolutionDir)$(Configuration)\log\"
if not exist "$(SolutionDir)$(Configuration)\var" mkdir "$(SolutionDir)$(Configuration)\var\"
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PreBuildEvent>
<Command>xcopy "$(AprDir)\$(Platform)\$(Configuration)\libapr-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
xcopy "$(AprUtilDir)\$(Platform)\$(Configuration)\libaprutil-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
if exist "$(AprIconvDir)\$(Platform)\$(Configuration)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(Platform)\$(Configuration)\libapriconv-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
if exist "$(AprIconvDir)\$(Platform)\$(Configuration)\iconv" (
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv"
xcopy "$(AprIconvDir)\$(Platform)\$(Configuration)\iconv\*.so" "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv\" /Y
)
)
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(Platform)\$(Configuration)\libsofia_sip_ua.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(Platform)\$(Configuration)\pthreadVC2.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(Platform)\$(Configuration)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(Platform)\$(Configuration)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(Platform)\$(Configuration)\conf\client-profiles\" /Y
)
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(Platform)\$(Configuration)\data\" /Y
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\log" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\log\"
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\var" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\var\"
</Command>
</PreBuildEvent>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command>xcopy "$(AprDir)\$(Configuration)\libapr-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
xcopy "$(AprUtilDir)\$(Configuration)\libaprutil-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
if exist "$(AprIconvDir)\$(Configuration)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(Configuration)\libapriconv-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
if exist "$(AprIconvDir)\$(Configuration)\iconv" (
if not exist "$(SolutionDir)$(Configuration)\bin\iconv" mkdir "$(SolutionDir)$(Configuration)\bin\iconv"
xcopy "$(AprIconvDir)\$(Configuration)\iconv\*.so" "$(SolutionDir)$(Configuration)\bin\iconv\" /Y
)
)
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(Configuration)\libsofia_sip_ua.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(Configuration)\pthreadVC2.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
if not exist "$(SolutionDir)$(Configuration)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(Configuration)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(Configuration)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(Configuration)\conf\client-profiles\" /Y
)
if not exist "$(SolutionDir)$(Configuration)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(Configuration)\data\" /Y
if not exist "$(SolutionDir)$(Configuration)\log" mkdir "$(SolutionDir)$(Configuration)\log\"
if not exist "$(SolutionDir)$(Configuration)\var" mkdir "$(SolutionDir)$(Configuration)\var\"
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>xcopy "$(AprDir)\$(Platform)\$(Configuration)\libapr-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
xcopy "$(AprUtilDir)\$(Platform)\$(Configuration)\libaprutil-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
if exist "$(AprIconvDir)\$(Platform)\$(Configuration)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(Platform)\$(Configuration)\libapriconv-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
if exist "$(AprIconvDir)\$(Platform)\$(Configuration)\iconv" (
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv"
xcopy "$(AprIconvDir)\$(Platform)\$(Configuration)\iconv\*.so" "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv\" /Y
)
)
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(Platform)\$(Configuration)\libsofia_sip_ua.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(Platform)\$(Configuration)\pthreadVC2.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(Platform)\$(Configuration)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(Platform)\$(Configuration)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(Platform)\$(Configuration)\conf\client-profiles\" /Y
)
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(Platform)\$(Configuration)\data\" /Y
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\log" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\log\"
if not exist "$(SolutionDir)$(Platform)\$(Configuration)\var" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\var\"
</Command>
</PreBuildEvent>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
</ItemDefinitionGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="preparesphinx"
ProjectGUID="{71D62A04-8EF6-4C6B-AC12-0C15A875E53A}"
RootNamespace="preparesphinx"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(PocketSphinxDir)\bin\$(ConfigurationName)\pocketsphinx.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SphinxBaseDir)\lib\$(ConfigurationName)\sphinxbase.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(PocketSphinxDir)\model\hmm\wsj1\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\wsj1\&quot; /Y&#x0D;&#x0A;copy &quot;$(PocketSphinxDir)\model\lm\cmudict.0.6d&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\default.dic&quot;&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf\pocketsphinx.xml&quot; xcopy &quot;$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;"
ExcludedFromBuild="false"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(PocketSphinxDir)\bin\$(ConfigurationName)\pocketsphinx.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SphinxBaseDir)\lib\$(ConfigurationName)\sphinxbase.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(PocketSphinxDir)\model\hmm\wsj1\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\wsj1\&quot; /Y&#x0D;&#x0A;copy &quot;$(PocketSphinxDir)\model\lm\cmudict.0.6d&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\default.dic&quot;&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf\pocketsphinx.xml&quot; xcopy &quot;$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(PocketSphinxDir)\bin\$(PlatformName)\$(ConfigurationName)\pocketsphinx.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SphinxBaseDir)\lib\$(PlatformName)\$(ConfigurationName)\sphinxbase.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(PocketSphinxDir)\model\hmm\wsj1\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\wsj1\&quot; /Y&#x0D;&#x0A;copy &quot;$(PocketSphinxDir)\model\lm\cmudict.0.6d&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\default.dic&quot;&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\pocketsphinx.xml&quot; xcopy &quot;$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;"
ExcludedFromBuild="false"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(PocketSphinxDir)\bin\$(PlatformName)\$(ConfigurationName)\pocketsphinx.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SphinxBaseDir)\lib\$(PlatformName)\$(ConfigurationName)\sphinxbase.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(PocketSphinxDir)\model\hmm\wsj1\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\wsj1\&quot; /Y&#x0D;&#x0A;copy &quot;$(PocketSphinxDir)\model\lm\cmudict.0.6d&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\default.dic&quot;&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\pocketsphinx.xml&quot; xcopy &quot;$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
+258 -49
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008-2010 Arsen Chaloyan
* Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,136 +13,241 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: unimrcp_service.c 1474 2010-02-07 20:51:47Z achaloyan $
* $Id: unimrcp_service.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <windows.h>
#include <apr_getopt.h>
#include <apr_file_info.h>
#include <apr_strings.h>
#include "apt.h"
#include "apt_pool.h"
#define WIN_SERVICE_NAME "unimrcp"
/** UniMRCP service register command enumeration */
typedef enum uni_service_register_e {
USR_NONE, USR_REGISTER, USR_UNREGISTER
} uni_service_register_e;
/** UniMRCP service control command enumeration */
typedef enum uni_service_control_e {
USC_NONE, USC_START, USC_STOP
} uni_service_control_e;
/** Display error message with Windows error code and description */
static void winerror(const char *msg)
{
char buf[128];
DWORD err = GetLastError();
int ret = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
buf, sizeof(buf), NULL);
printf("%s: %lu %.*s\n", msg, err, ret, buf);
}
/** Register/install service in SCM */
static apt_bool_t uni_service_register(const char *root_dir_path, apr_pool_t *pool)
static apt_bool_t uni_service_register(const char *root_dir_path, apr_pool_t *pool,
const char *name,
apt_bool_t autostart,
unsigned long recover,
int log_priority,
const char *disp_name,
const char *description)
{
char *bin_path;
apr_status_t status;
char buf[4096];
static const size_t len = sizeof(buf);
size_t pos = 0;
char *root_dir;
SERVICE_DESCRIPTION desc;
SC_HANDLE sch_service;
SC_HANDLE sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
if(!sch_manager) {
printf("Failed to Open SCManager %d\n", GetLastError());
SC_HANDLE sch_manager;
/* Normalize root directory path and make it absolute */
status = apr_filepath_merge(&root_dir, NULL, root_dir_path,
APR_FILEPATH_NOTRELATIVE | APR_FILEPATH_NATIVE | APR_FILEPATH_TRUENAME, pool);
if (status != APR_SUCCESS) {
printf("Error making root directory absolute: %d %.512s\n", status,
apr_strerror(status, buf, 512));
return FALSE;
}
buf[pos++] = '"';
pos = apr_cpystrn(buf + pos, root_dir, len - pos) - buf;
if ((buf[pos - 1] != '\\') && (pos < len))
/* Add trailing backslash */
buf[pos++] = '\\';
pos = apr_cpystrn(buf + pos, "bin\\unimrcpserver.exe\" --service -o 2", len - pos) - buf;
if (log_priority >= 0) {
pos = apr_cpystrn(buf + pos, " -l ", len - pos) - buf;
if (pos < len - 34)
pos += strlen(itoa(log_priority, buf + pos, 10));
}
if (name) {
pos = apr_cpystrn(buf + pos, " --name \"", len - pos) - buf;
pos = apr_cpystrn(buf + pos, name, len - pos) - buf;
if ((buf[pos - 1] == '\\') && (pos < len))
/* `\"' might be misinterpreted as escape, so replace `\' with `\\' */
buf[pos++] = '\\';
if (pos < len)
buf[pos++] = '"';
}
pos = apr_cpystrn(buf + pos, " --root-dir \"", len - pos) - buf;
pos = apr_cpystrn(buf + pos, root_dir, len - pos) - buf;
if ((buf[pos - 1] == '\\') && (pos < len))
/* `\"' might be misinterpreted as escape, so replace `\' with `\\' */
buf[pos++] = '\\';
if (pos < len)
buf[pos++] = '"';
if (pos < len)
buf[pos] = 0;
else {
puts("Service Command Too Long");
return FALSE;
}
if (!disp_name || !*disp_name) {
if (name)
disp_name = apr_pstrcat(pool, name, " ", "UniMRCP Server", NULL);
else
disp_name = "UniMRCP Server";
}
if (!description || !*description)
description = "Launches UniMRCP Server";
bin_path = apr_psprintf(pool,"%s\\bin\\unimrcpserver.exe --service --root-dir \"%s\" -o 2",
root_dir_path,
root_dir_path);
sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
if(!sch_manager) {
winerror("Failed to Open SCManager");
return FALSE;
}
sch_service = CreateService(
sch_manager,
WIN_SERVICE_NAME,
"UniMRCP Server",
name ? name : WIN_SERVICE_NAME,
disp_name,
GENERIC_EXECUTE | SERVICE_CHANGE_CONFIG,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START,
autostart ? SERVICE_AUTO_START : SERVICE_DEMAND_START,
SERVICE_ERROR_NORMAL,
bin_path,0,0,0,0,0);
buf,0,0,0,0,0);
if(!sch_service) {
printf("Failed to Create Service %d\n", GetLastError());
winerror("Failed to Create Service");
CloseServiceHandle(sch_manager);
return FALSE;
}
desc.lpDescription = "Launches UniMRCP Server";
desc.lpDescription = (char *) description;
if(!ChangeServiceConfig2(sch_service,SERVICE_CONFIG_DESCRIPTION,&desc)) {
printf("Failed to Set Service Description %d\n", GetLastError());
winerror("Failed to Set Service Description");
}
if (recover) {
SERVICE_FAILURE_ACTIONS sfa;
SC_ACTION action;
sfa.dwResetPeriod = 0;
sfa.lpCommand = "";
sfa.lpRebootMsg = "";
sfa.cActions = 1;
sfa.lpsaActions = &action;
action.Delay = recover * 1000;
action.Type = SC_ACTION_RESTART;
if (!ChangeServiceConfig2(sch_service,SERVICE_CONFIG_FAILURE_ACTIONS,&sfa)) {
winerror("Failed to Set Service Restart on Failure");
}
}
CloseServiceHandle(sch_service);
CloseServiceHandle(sch_manager);
printf("UniMRCP service %s registered\n", name ? name : WIN_SERVICE_NAME);
return TRUE;
}
/** Unregister/uninstall service from SCM */
static apt_bool_t uni_service_unregister()
static apt_bool_t uni_service_unregister(const char *name)
{
apt_bool_t status = TRUE;
SERVICE_STATUS ss_status;
SC_HANDLE sch_service;
SC_HANDLE sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
if (!name) name = WIN_SERVICE_NAME;
if(!sch_manager) {
printf("Failed to Open SCManager %d\n", GetLastError());
winerror("Failed to Open SCManager");
return FALSE;
}
sch_service = OpenService(sch_manager,WIN_SERVICE_NAME,DELETE|SERVICE_STOP);
sch_service = OpenService(sch_manager,name,DELETE|SERVICE_STOP);
if(!sch_service) {
printf("Failed to Open Service %d\n", GetLastError());
winerror("Failed to Open Service");
CloseServiceHandle(sch_manager);
return FALSE;
}
ControlService(sch_service,SERVICE_CONTROL_STOP,&ss_status);
if(!DeleteService(sch_service)) {
printf("Failed to Delete Service %d\n", GetLastError());
winerror("Failed to Delete Service");
status = FALSE;
}
} else
printf("UniMRCP service %s unregistered\n", name);
CloseServiceHandle(sch_service);
CloseServiceHandle(sch_manager);
return status;
}
/** Start service */
static apt_bool_t uni_service_start()
static apt_bool_t uni_service_start(const char *name)
{
apt_bool_t status = TRUE;
SC_HANDLE sch_service;
SC_HANDLE sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
if (!name) name = WIN_SERVICE_NAME;
if(!sch_manager) {
printf("Failed to Open SCManager %d\n", GetLastError());
winerror("Failed to Open SCManager");
return FALSE;
}
sch_service = OpenService(sch_manager,WIN_SERVICE_NAME,SERVICE_START);
sch_service = OpenService(sch_manager,name,SERVICE_START);
if(!sch_service) {
printf("Failed to Open Service %d\n", GetLastError());
winerror("Failed to Open Service");
CloseServiceHandle(sch_manager);
return FALSE;
}
if(!StartService(sch_service,0,NULL)) {
printf("Failed to Start Service %d\n", GetLastError());
winerror("Failed to Start Service");
status = FALSE;
}
} else
printf("UniMRCP service %s started\n", name);
CloseServiceHandle(sch_service);
CloseServiceHandle(sch_manager);
return status;
}
/** Stop service */
static apt_bool_t uni_service_stop()
static apt_bool_t uni_service_stop(const char *name)
{
apt_bool_t status = TRUE;
SERVICE_STATUS ss_status;
SC_HANDLE sch_service;
SC_HANDLE sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
if (!name) name = WIN_SERVICE_NAME;
if(!sch_manager) {
printf("Failed to Open SCManager %d\n", GetLastError());
winerror("Failed to Open SCManager");
return FALSE;
}
sch_service = OpenService(sch_manager,WIN_SERVICE_NAME,SERVICE_STOP);
sch_service = OpenService(sch_manager,name,SERVICE_STOP);
if(!sch_service) {
printf("Failed to Open Service %d\n", GetLastError());
winerror("Failed to Open Service");
CloseServiceHandle(sch_manager);
return FALSE;
}
if(!ControlService(sch_service,SERVICE_CONTROL_STOP,&ss_status)) {
printf("Failed to Stop Service %d\n", GetLastError());
winerror("Failed to Stop Service");
status = FALSE;
}
} else
printf("UniMRCP service %s stopped\n", name);
CloseServiceHandle(sch_service);
CloseServiceHandle(sch_manager);
@@ -152,6 +257,8 @@ static apt_bool_t uni_service_stop()
static void usage()
{
static apt_bool_t written = FALSE;
if (written) return;
printf(
"\n"
"Usage:\n"
@@ -168,8 +275,21 @@ static void usage()
"\n"
" -t [--stop] : Stop the Windows service.\n"
"\n"
" -n [--name] svcname : Service name (default: unimrcp)\n"
"\n"
" -a [--autostart] : Start service after boot-up\n"
"\n"
" -f [--fail-restart] n : If crashed, restart after n secs\n"
"\n"
" -l [--log-prio] priority: Set the log priority.\n"
" (0-emergency, ..., 7-debug)\n"
" -p [--disp-name] title : Set service display name\n"
" (default: [svcname] UniMRCP Server)\n"
" -c [--description] desc : Set service description\n"
" (default: Launches UniMRCP Server)\n"
" -h [--help] : Show the help.\n"
"\n");
written = TRUE;
}
int main(int argc, const char * const *argv)
@@ -177,28 +297,44 @@ int main(int argc, const char * const *argv)
apr_pool_t *pool;
apr_status_t rv;
apr_getopt_t *opt;
apt_bool_t ret = TRUE;
uni_service_register_e reg = USR_NONE;
uni_service_control_e control = USC_NONE;
const char *root_dir = "..";
const char *name = NULL;
apt_bool_t autostart = FALSE;
unsigned long recover = 0;
int log_priority = -1;
const char *disp_name = NULL;
const char *description = NULL;
static const apr_getopt_option_t opt_option[] = {
/* long-option, short-option, has-arg flag, description */
{ "register", 'r', TRUE, "register service" }, /* -r or --register arg */
{ "unregister", 'u', FALSE, "unregister service" },/* -u or --unregister */
{ "start", 's', FALSE, "start service" }, /* -s or --start */
{ "stop", 't', FALSE, "stop service" }, /* -t or --stop */
{ "help", 'h', FALSE, "show help" }, /* -h or --help */
{ NULL, 0, 0, NULL }, /* end */
{ "register", 'r', TRUE, "register service" }, /* -r or --register arg */
{ "unregister", 'u', FALSE, "unregister service" }, /* -u or --unregister */
{ "start", 's', FALSE, "start service" }, /* -s or --start */
{ "stop", 't', FALSE, "stop service" }, /* -t or --stop */
{ "name", 'n', TRUE, "service name" }, /* -n or --name arg */
{ "autostart", 'a', FALSE, "start automatically" },/* -a or --autostart */
{ "fail-restart",'f', TRUE, "restart if fails" }, /* -f or --fail-restart arg */
{ "log-prio", 'l', TRUE, "log priority" }, /* -l arg or --log-prio arg */
{ "disp-name", 'p', TRUE, "display name" }, /* -p arg or --disp-name arg */
{ "description", 'c', TRUE, "description" }, /* -c arg or --description arg */
{ "help", 'h', FALSE, "show help" }, /* -h or --help */
{ NULL, 0, 0, NULL }, /* end */
};
/* APR global initialization */
if(apr_initialize() != APR_SUCCESS) {
apr_terminate();
return 0;
return 1;
}
/* create APR pool */
pool = apt_pool_create();
if(!pool) {
apr_terminate();
return 0;
return 1;
}
rv = apr_getopt_init(&opt, pool , argc, argv);
@@ -208,30 +344,103 @@ int main(int argc, const char * const *argv)
while((rv = apr_getopt_long(opt, opt_option, &optch, &optarg)) == APR_SUCCESS) {
switch(optch) {
case 'r':
uni_service_register(optarg,pool);
if ((reg == USR_NONE) || (reg == USR_REGISTER)) {
reg = USR_REGISTER;
root_dir = optarg;
} else {
puts("Incosistent arguments");
ret = FALSE;
}
break;
case 'u':
uni_service_unregister();
if ((reg == USR_NONE) || (reg == USR_UNREGISTER))
reg = USR_UNREGISTER;
else {
puts("Incosistent arguments");
ret = FALSE;
}
break;
case 's':
uni_service_start();
if ((control == USC_NONE) || (control == USC_START))
control = USC_START;
else {
puts("Incosistent arguments");
ret = FALSE;
}
break;
case 't':
uni_service_stop();
if ((control == USC_NONE) || (control == USC_STOP))
control = USC_STOP;
else {
puts("Incosistent arguments");
ret = FALSE;
}
break;
case 'n':
name = optarg;
break;
case 'a':
autostart = TRUE;
break;
case 'f':
if (sscanf(optarg, "%lu", &recover) != 1) {
puts("Invalid value for param --fail-restart");
ret = FALSE;
}
break;
case 'l':
if ((sscanf(optarg, "%d", &log_priority) != 1) ||
(log_priority < 0) || (log_priority > 7))
{
puts("Invalid value for param --log-prio");
ret = FALSE;
}
break;
case 'p':
disp_name = optarg;
break;
case 'c':
description = optarg;
break;
case 'h':
usage();
break;
}
if (!ret) break;
}
if(rv != APR_EOF) {
if (ret &&
(((reg == USR_REGISTER) && (control == USC_STOP)) ||
((reg == USR_UNREGISTER) && (control == USC_START)))) {
ret = FALSE;
puts("Inconsistent arguments");
}
if((rv != APR_EOF) || !ret || (!reg && !control)) {
ret = FALSE;
usage();
}
}
while (ret) { /* No problem so far */
if (reg == USR_REGISTER)
ret = uni_service_register(root_dir, pool, name, autostart, recover, log_priority, disp_name, description);
if (!ret) break;
if (control == USC_START)
ret = uni_service_start(name);
if (!ret) break;
if (control == USC_STOP)
ret = uni_service_stop(name);
/* Do not break here, stop failure should not matter before unregistration */
if (reg == USR_UNREGISTER)
ret = uni_service_unregister(name);
break;
}
/* destroy APR pool */
apr_pool_destroy(pool);
/* APR global termination */
apr_terminate();
return 0;
return ret ? 0 : 1;
}
@@ -1,158 +0,0 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="unimrcpservice"
ProjectGUID="{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}"
RootNamespace="unimrcpservice"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="unimrcpservice.exe.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="unimrcpservice.exe.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="src"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\unimrcp_service.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
@@ -0,0 +1,39 @@
#include "uni_version.h"
1 VERSIONINFO
FILEVERSION UNI_VERSION_STRING_CSV,0
PRODUCTVERSION UNI_VERSION_STRING_CSV,0
FILEFLAGSMASK 0x3fL
#if defined(_DEBUG)
FILEFLAGS 0x01L
#else
FILEFLAGS 0x00L
#endif
#if defined(WINNT) || defined(WIN64)
FILEOS 0x40004L
#else
FILEOS 0x4L
#endif
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", UNI_LICENSE "\0"
VALUE "CompanyName", "UniMRCP\0"
VALUE "FileDescription", "UniMRCP Service Manager\0"
VALUE "FileVersion", UNI_VERSION_STRING "\0"
VALUE "InternalName", "unimrcpservice" "\0"
VALUE "LegalCopyright", UNI_COPYRIGHT "\0"
VALUE "OriginalFilename", "unimrcpservice.exe" "\0"
VALUE "ProductName", "UniMRCP Project\0"
VALUE "ProductVersion", UNI_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
@@ -284,6 +284,42 @@
>
</File>
</Filter>
<File
RelativePath=".\unimrcpservice.rc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\build"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\build"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\build"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\..\build"
/>
</FileConfiguration>
</File>
</Files>
<Globals>
</Globals>
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}</ProjectGuid>
<RootNamespace>unimrcpservice</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
<Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
<Import Project="$(ProjectDir)..\..\build\props\apt.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
<Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
<Import Project="$(ProjectDir)..\..\build\props\apt.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
<Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
<Import Project="$(ProjectDir)..\..\build\props\apt.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
<Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
<Import Project="$(ProjectDir)..\..\build\props\apt.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Link>
<AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
<AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<Link>
<AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="unimrcp_service.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\libs\apr-toolkit\aprtoolkit.vcxproj">
<Project>{13deeca0-bdd4-4744-a1a2-8eb0a44df3d2}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="unimrcpservice.rc">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="unimrcp_service.c">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="unimrcpservice.rc" />
</ItemGroup>
</Project>