Update package to include platform (#76)

This commit is contained in:
lilian-wang 2020-08-17 15:40:12 -07:00 коммит произвёл GitHub
Родитель da68006165
Коммит 61c35c0f4f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 123 добавлений и 8 удалений

Просмотреть файл

@ -15,18 +15,78 @@ echo Opening the developer command prompt...
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64
if errorlevel 1 goto :error
REM Setting up
REM Setting up for UWP x64
echo.
echo Excluding the unnecessary modules and prepares to build the drop for UWP...
call gn gen --ide=vs2019 out\msvc\uwp\Release\x64 --filters=//:webrtc "--args=is_debug=false use_lld=false is_clang=false rtc_include_tests=false rtc_build_tools=false rtc_win_video_capture_winrt=true target_os=\"winuwp\" rtc_build_examples=false rtc_win_use_mf_h264=true enable_libaom=false rtc_enable_protobuf=false"
echo Excluding the unnecessary modules and prepares to build the drop for UWP x64...
call gn gen --ide=vs2019 out\msvc\uwp\Release\x64 --filters=//:webrtc "--args=is_debug=false use_lld=false is_clang=false rtc_include_tests=false rtc_build_tools=false rtc_win_video_capture_winrt=true target_os=\"winuwp\" rtc_build_examples=false rtc_win_use_mf_h264=true enable_libaom=false rtc_enable_protobuf=false target_cpu=\"x64\" "
if errorlevel 1 goto :error
REM Building
REM Building for UWP x64
echo.
echo Building the patched WebRTC...
ninja -C out\msvc\uwp\Release\x64
if errorlevel 1 goto :error
REM Setting up for UWP arm64
echo.
echo Excluding the unnecessary modules and prepares to build the drop for UWP arm64...
call gn gen --ide=vs2019 out\msvc\uwp\Release\arm64 --filters=//:webrtc "--args=is_debug=false use_lld=false is_clang=false rtc_include_tests=false rtc_build_tools=false rtc_win_video_capture_winrt=true target_os=\"winuwp\" rtc_build_examples=false rtc_win_use_mf_h264=true enable_libaom=false rtc_enable_protobuf=false target_cpu=\"arm64\" "
if errorlevel 1 goto :error
REM Building for UWP arm64
echo.
echo Building the patched WebRTC...
ninja -C out\msvc\uwp\Release\arm64
if errorlevel 1 goto :error
REM Setting up for UWP x86
echo.
echo Excluding the unnecessary modules and prepares to build the drop for UWP x86...
call gn gen --ide=vs2019 out\msvc\uwp\Release\x86 --filters=//:webrtc "--args=is_debug=false use_lld=false is_clang=false rtc_include_tests=false rtc_build_tools=false rtc_win_video_capture_winrt=true target_os=\"winuwp\" rtc_build_examples=false rtc_win_use_mf_h264=true enable_libaom=false rtc_enable_protobuf=false target_cpu=\"x86\" " 
if errorlevel 1 goto :error
REM Building for UWP x86
echo.
echo Building the patched WebRTC...
ninja -C out\msvc\uwp\Release\x86
if errorlevel 1 goto :error
REM Setting up for Win32 x64
echo.
echo Excluding the unnecessary modules and prepares to build the drop for Win32 x64...
call gn gen --ide=vs2019 out\msvc\win32\Release\x64 --filters=//:webrtc "--args=is_debug=false use_lld=false is_clang=false rtc_include_tests=false rtc_build_tools=false rtc_win_video_capture_winrt=true rtc_build_examples=false rtc_win_use_mf_h264=true enable_libaom=false rtc_enable_protobuf=false target_cpu=\"x64\" "
if errorlevel 1 goto :error
REM Building for Win32 x64
echo.
echo Building the patched WebRTC...
ninja -C out\msvc\win32\Release\x64
if errorlevel 1 goto :error
REM Setting up for Win32 arm64
echo.
echo Excluding the unnecessary modules and prepares to build the drop for Win32 arm64...
call gn gen --ide=vs2019 out\msvc\win32\Release\arm64 --filters=//:webrtc "--args=is_debug=false use_lld=false is_clang=false rtc_include_tests=false rtc_build_tools=false rtc_win_video_capture_winrt=true rtc_build_examples=false rtc_win_use_mf_h264=true enable_libaom=false rtc_enable_protobuf=false target_cpu=\"arm64\" "
if errorlevel 1 goto :error
REM Building for Win32 arm64
echo.
echo Building the patched WebRTC...
ninja -C out\msvc\win32\Release\arm64
if errorlevel 1 goto :error
REM Setting up for Win32 x86
echo.
echo Excluding the unnecessary modules and prepares to build the drop for Win32 x86...
call gn gen --ide=vs2019 out\msvc\win32\Release\x86 --filters=//:webrtc "--args=is_debug=false use_lld=false is_clang=false rtc_include_tests=false rtc_build_tools=false rtc_win_video_capture_winrt=true rtc_build_examples=false rtc_win_use_mf_h264=true enable_libaom=false rtc_enable_protobuf=false target_cpu=\"x86\" " 
if errorlevel 1 goto :error
REM Building for Win32 x86
echo.
echo Building the patched WebRTC...
ninja -C out\msvc\win32\Release\x86
if errorlevel 1 goto :error
REM Copying the binaries
echo.
echo Copying contents...
@ -34,6 +94,11 @@ cd /D "%~dp0"
if errorlevel 1 goto :error
call :copyFiles c:\webrtc\src\out\msvc\uwp\Release\x64\obj\webrtc.lib ..\output\msvc\uwp\Release\x64\obj\
call :copyFiles c:\webrtc\src\out\msvc\uwp\Release\arm64\obj\webrtc.lib ..\output\msvc\uwp\Release\arm64\obj\
call :copyFiles c:\webrtc\src\out\msvc\uwp\Release\x86\obj\webrtc.lib ..\output\msvc\uwp\Release\x86\obj\
call :copyFiles c:\webrtc\src\out\msvc\win32\Release\x64\obj\webrtc.lib ..\output\msvc\win32\Release\x64\obj\
call :copyFiles c:\webrtc\src\out\msvc\win32\Release\arm64\obj\webrtc.lib ..\output\msvc\win32\Release\arm64\obj\
call :copyFiles c:\webrtc\src\out\msvc\win32\Release\x86\obj\webrtc.lib ..\output\msvc\win32\Release\x86\obj\
call :copyFiles c:\webrtc\src\api\*.h ..\include\api\
call :copyFiles c:\webrtc\src\audio\*.h ..\include\audio\
call :copyFiles c:\webrtc\src\base\*.h ..\include\base\

Просмотреть файл

@ -1,4 +1,5 @@
@echo off
cd /D "%~dp0..\NuSpecs"
nuget pack -Version %CDP_PACKAGE_VERSION_NUMERIC%-%CDP_BUILD_TAG%
nuget pack Microsoft.WinRTC.libwebrtc.uwp.nuspec -Version %CDP_PACKAGE_VERSION_NUMERIC%-%CDP_BUILD_TAG%
nuget pack Microsoft.WinRTC.libwebrtc.win32.nuspec -Version %CDP_PACKAGE_VERSION_NUMERIC%-%CDP_BUILD_TAG%

Просмотреть файл

@ -18,7 +18,7 @@ if errorlevel 1 goto :error
curl -o vs_enterprise.exe -L "https://aka.ms/vs/16/release/vs_enterprise.exe"
if errorlevel 1 goto :error
call C:\Downloads\vs_enterprise.exe modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" --add Microsoft.VisualStudio.Component.VC.ATLMFC;includeRecommended --quiet --wait
call C:\Downloads\vs_enterprise.exe modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" --add Microsoft.VisualStudio.Component.VC.ATLMFC;includeRecommended --add Microsoft.VisualStudio.Component.VC.MFC.ARM64;includeRecommended --add Microsoft.VisualStudio.Component.VC.Tools.ARM64;includeRecommended --quiet --wait
if errorlevel 1 goto :error
echo.

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Microsoft.WinRTC.libwebrtc</id>
<id>Microsoft.WinRTC.libwebrtc.uwp</id>
<version>84.0.3-alpha</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
@ -20,8 +20,10 @@
<files>
<file src="license.txt" />
<file src="..\output\msvc\uwp\Release\x64\obj\webrtc.lib" target="lib\native\Release\x64\v142" />
<file src="..\output\msvc\uwp\Release\arm64\obj\webrtc.lib" target="lib\native\Release\arm64\v142" />
<file src="..\output\msvc\uwp\Release\x86\obj\webrtc.lib" target="lib\native\Release\x86\v142" />
<file src="..\include\**\*.h" target="build\native\include" />
<file src="Microsoft.WinRTC.libwebrtc.props" target="build\native" />
<file src="Microsoft.WinRTC.libwebrtc.uwp.props" target="build\native" />
</files>
</package>

Просмотреть файл

@ -0,0 +1,29 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Microsoft.WinRTC.libwebrtc.win32</id>
<version>84.0.3-alpha</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<projectUrl>http://github.com/microsoft/winrtc</projectUrl>
<license type="file">license.txt</license>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<releaseNotes>Upgrading WinRTC with the WebRTC changes up to version m84. Bringing the Media Foundation based H264 encoder and decoder from the WebRTC-UWP project.</releaseNotes>
<description>This package contains a WebRTC static library and the header files to be used to build an UWP native app or component.</description>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<tags>webrtc uwp windows native rtc real time communication</tags>
<dependencies>
<group targetFramework="native" />
</dependencies>
</metadata>
<files>
<file src="license.txt" />
<file src="..\output\msvc\win32\Release\x64\obj\webrtc.lib" target="lib\native\Release\x64\v142" />
<file src="..\output\msvc\win32\Release\arm64\obj\webrtc.lib" target="lib\native\Release\arm64\v142" />
<file src="..\output\msvc\win32\Release\x86\obj\webrtc.lib" target="lib\native\Release\x86\v142" />
<file src="..\include\**\*.h" target="build\native\include" />
<file src="Microsoft.WinRTC.libwebrtc.win32.props" target="build\native" />
</files>
</package>

Просмотреть файл

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_AURA=1;_HAS_EXCEPTIONS=0;__STD_C;_CRT_RAND_S;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_ATL_NO_OPENGL;_WINDOWS;CERT_CHAIN_PARA_HAS_EXTRA_FIELDS;PSAPI_VERSION=2;WIN32;_SECURE_ATL;WINUWP;WRL_NO_DEFAULT_LIB;WINAPI_FAMILY=WINAPI_FAMILY_PC_APP;WIN10=_WIN32_WINNT_WIN10;WIN32_LEAN_AND_MEAN;NOMINMAX;_UNICODE;UNICODE;NTDDI_VERSION=NTDDI_WIN10_RS2;_WIN32_WINNT=0x0A00;WINVER=0x0A00;NDEBUG;NVALGRIND;DYNAMIC_ANNOTATIONS_ENABLED=0;WEBRTC_ENABLE_PROTOBUF=0;WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE;RTC_ENABLE_VP9;HAVE_SCTP;WEBRTC_LIBRARY_IMPL;WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0;WEBRTC_WIN;ABSL_ALLOCATOR_NOTHROW=1;HAVE_SCTP;WEBRTC_VIDEO_CAPTURE_WINRT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>webrtc.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(MSBuildThisFileDirectory)..\..\lib\native\$(Configuration)\$(Platform)\$(PlatformToolset);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries Condition="'$(Configuration)|$(Platform)'=='Release|x64'">libcmt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>