From 2076043d899a575c524a9c7132226d4461836aaf Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Sat, 18 Jul 2015 15:17:07 +0200 Subject: win32 porting (VC2010) https://github.com/alfredh/baresip/pull/52 original patch by Victor Sergienko - the copy of windows .h header files was not included --- mk/modules.mk | 9 +++ mk/win32/baresip.sln | 39 +++++++++++ mk/win32/baresip.vcproj | 2 +- mk/win32/baresip.vcxproj | 178 +++++++++++++++++++++++++++++++++++++++++++++++ mk/win32/static.c | 28 +++++++- 5 files changed, 254 insertions(+), 2 deletions(-) create mode 100644 mk/win32/baresip.sln create mode 100644 mk/win32/baresip.vcxproj (limited to 'mk') diff --git a/mk/modules.mk b/mk/modules.mk index 0bf72a9..2481f0e 100644 --- a/mk/modules.mk +++ b/mk/modules.mk @@ -175,6 +175,11 @@ USE_VPX := $(shell [ -f $(SYSROOT)/include/vpx/vp8.h ] \ USE_GTK := $(shell [ -f $(SYSROOT)/include/gtk-2.0/gtk/gtk.h ] || \ [ -f $(SYSROOT)/local/include/gtk-2.0/gtk/gtk.h ] || \ [ -f $(SYSROOT_ALT)/include/gtk-2.0/gtk/gtk.h ] && echo "yes") +else +# Windows. +# Accounts for mingw with Windows SDK (formerly known as Platform SDK) +# mounted at /winsdk +USE_DSHOW := $(shell [ -f /winsdk/Include/um/dshow.h ] && echo "yes") endif # Platform specific modules @@ -364,3 +369,7 @@ endif ifneq ($(USE_GTK),) MODULES += gtk endif + +ifneq ($(USE_DSHOW),) +MODULES += dshow +endif diff --git a/mk/win32/baresip.sln b/mk/win32/baresip.sln new file mode 100644 index 0000000..7c791e8 --- /dev/null +++ b/mk/win32/baresip.sln @@ -0,0 +1,39 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baresip-win32", "baresip.vcxproj", "{4B89C2D8-FB32-4D7C-9019-752A5664781C}" + ProjectSection(ProjectDependencies) = postProject + {3E767371-A72B-4F5C-A695-8F844B0889C5} = {3E767371-A72B-4F5C-A695-8F844B0889C5} + {40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D} = {40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re-win32", "..\..\..\re\mk\win32\re.vcxproj", "{40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rem-win32", "..\..\..\rem\mk\win32\rem.vcxproj", "{3E767371-A72B-4F5C-A695-8F844B0889C5}" + ProjectSection(ProjectDependencies) = postProject + {40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D} = {40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4B89C2D8-FB32-4D7C-9019-752A5664781C}.Debug|Win32.ActiveCfg = Debug|Win32 + {4B89C2D8-FB32-4D7C-9019-752A5664781C}.Debug|Win32.Build.0 = Debug|Win32 + {4B89C2D8-FB32-4D7C-9019-752A5664781C}.Release|Win32.ActiveCfg = Release|Win32 + {4B89C2D8-FB32-4D7C-9019-752A5664781C}.Release|Win32.Build.0 = Release|Win32 + {40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D}.Debug|Win32.ActiveCfg = Debug|Win32 + {40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D}.Debug|Win32.Build.0 = Debug|Win32 + {40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D}.Release|Win32.ActiveCfg = Release|Win32 + {40B28DF6-4B4A-411A-9EB7-8D80C2A29B9D}.Release|Win32.Build.0 = Release|Win32 + {3E767371-A72B-4F5C-A695-8F844B0889C5}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E767371-A72B-4F5C-A695-8F844B0889C5}.Debug|Win32.Build.0 = Debug|Win32 + {3E767371-A72B-4F5C-A695-8F844B0889C5}.Release|Win32.ActiveCfg = Release|Win32 + {3E767371-A72B-4F5C-A695-8F844B0889C5}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/mk/win32/baresip.vcproj b/mk/win32/baresip.vcproj index 70095bc..6a4197c 100644 --- a/mk/win32/baresip.vcproj +++ b/mk/win32/baresip.vcproj @@ -34,7 +34,7 @@ Name="VCCustomBuildTool"/> + + + + Debug + Win32 + + + Release + Win32 + + + + baresip-win32 + {4B89C2D8-FB32-4D7C-9019-752A5664781C} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\Win32\Debug\ + c:\tmp\baresip-win32\Debug\ + false + ..\..\Win32\Release\ + c:\tmp\baresip-win32\release\ + false + + + + Disabled + include;..\..\include;..\..\..\re\include;..\..\..\rem\include;..\..\..\ffmpeg-win32-dev\include;..\..\..\;%(AdditionalIncludeDirectories) + WIN32;STATIC;HAVE_IO_H;HAVE_SELECT;USE_VIDEO;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + CompileAsC + 4142;%(DisableSpecificWarnings) + $(IntDir)/%(RelativeDir)/ + + + winmm.lib wsock32.lib ..\..\..\re\Win32\Debug\re-win32.lib ..\..\..\rem\Win32\Debug\rem-win32.lib %(AdditionalOptions) + $(OutDir)baresip-win32.exe + ..\..\..\ffmpeg-win32-dev\lib;%(AdditionalLibraryDirectories) + true + $(OutDir)baresip-win32.pdb + Console + MachineX86 + avcodec.lib;avutil.lib;%(AdditionalDependencies) + + + + + include;..\..\include;..\..\..\re\include;..\..\..\rem\include;..\..\..\ffmpeg-win32-dev\include;..\..\..\;%(AdditionalIncludeDirectories) + WIN32;STATIC;HAVE_IO_H;HAVE_SELECT;USE_VIDEO;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + 4142;%(DisableSpecificWarnings) + $(IntDir)/%(RelativeDir)/ + + + winmm.lib wsock32.lib ..\..\..\re\Win32\Release\re.lib ..\..\..\rem\Win32\Release\rem.lib %(AdditionalOptions) + $(OutDir)baresip-win32.exe + ..\..\..\ffmpeg-win32-dev\lib;%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + avcodec.lib;avutil.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {3e767371-a72b-4f5c-a695-8f844b0889c5} + + + {40b28df6-4b4a-411a-9eb7-8d80c2a29b9d} + + + + + + \ No newline at end of file diff --git a/mk/win32/static.c b/mk/win32/static.c index 9fd143e..9b6d428 100644 --- a/mk/win32/static.c +++ b/mk/win32/static.c @@ -3,12 +3,38 @@ #include extern const struct mod_export exports_cons; +extern const struct mod_export exports_wincons; extern const struct mod_export exports_g711; extern const struct mod_export exports_winwave; +extern const struct mod_export exports_dshow; +extern const struct mod_export exports_avcodec; +extern const struct mod_export exports_account; +extern const struct mod_export exports_contact; +extern const struct mod_export exports_menu; +extern const struct mod_export exports_auloop; +extern const struct mod_export exports_vidloop; +extern const struct mod_export exports_uuid; +extern const struct mod_export exports_stun; +extern const struct mod_export exports_turn; +extern const struct mod_export exports_ice; +extern const struct mod_export exports_vumeter; + const struct mod_export *mod_table[] = { - &exports_cons, + &exports_wincons, + &exports_avcodec, &exports_g711, &exports_winwave, + &exports_dshow, + &exports_account, + &exports_contact, + &exports_menu, + &exports_auloop, + &exports_vidloop, + &exports_uuid, + &exports_stun, + &exports_turn, + &exports_ice, + &exports_vumeter, NULL }; -- cgit v1.2.3