Build script change and example how to exclude sqlite from Win10 DLL build for Outlook / Windows Mail in UTC mode

This commit is contained in:
Max Golovanov 2019-04-04 15:30:42 -07:00
Родитель 74958c30e8
Коммит 27284c9179
5 изменённых файлов: 62 добавлений и 9 удалений

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

@ -48,6 +48,9 @@
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<PropertyGroup Label="ExcludeSqlite" Condition="'$(NOSQLITE)'=='TRUE'">
<NoSqlite>TRUE</NoSqlite>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
@ -419,6 +422,8 @@
<ProjectReference Include="..\..\zlib\contrib\vstudio\vc14\zlibvc.vcxproj">
<Project>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup Condition="'$(NoSqlite)'!='TRUE'">
<ProjectReference Include="..\..\sqliteUWP\sqlite-uwp.vcxproj">
<Project>{6883a688-89f5-424a-9bfa-50d42f691b29}</Project>
</ProjectReference>

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

@ -50,6 +50,9 @@
<PropertyGroup Label="OacrPath" Condition="'$(RunOACR)'=='Yes'">
<OacrPath>OACR</OacrPath>
</PropertyGroup>
<PropertyGroup Label="ExcludeSqlite" Condition="'$(NOSQLITE)'=='TRUE'">
<NoSqlite>TRUE</NoSqlite>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
@ -411,6 +414,8 @@
<ProjectReference Include="..\..\zlib\contrib\vstudio\vc14\zlibvc.vcxproj">
<Project>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup Condition="'$(NoSqlite)'!='TRUE'">
<ProjectReference Include="..\..\sqliteUWP\sqlite-uwp.vcxproj">
<Project>{6883a688-89f5-424a-9bfa-50d42f691b29}</Project>
</ProjectReference>

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

@ -32,14 +32,6 @@
<ItemGroup>
<ClInclude Include="..\net40\targetver.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\sqlite\sqlite.vcxproj">
<Project>{2ebc7b3c-2af1-442c-9285-cab39bbb8c00}</Project>
</ProjectReference>
<ProjectReference Include="..\..\zlib\contrib\vstudio\vc14\zlibvc.vcxproj">
<Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="$(ProjectDir)..\VersionInfo.rc" />
</ItemGroup>
@ -51,6 +43,9 @@
<ProjectName>win32-dll</ProjectName>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<PropertyGroup Label="ExcludeSqlite" Condition="'$(NOSQLITE)'=='TRUE'">
<NoSqlite>TRUE</NoSqlite>
</PropertyGroup>
<PropertyGroup Label="OacrPath" Condition="'$(RunOACR)'=='Yes'">
<OacrPath>OACR</OacrPath>
</PropertyGroup>
@ -327,6 +322,16 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="..\..\zlib\contrib\vstudio\vc14\zlibvc.vcxproj">
<Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup Condition="'$(NoSqlite)'!='TRUE'">
<ProjectReference Include="..\..\sqlite\sqlite.vcxproj">
<Project>{2ebc7b3c-2af1-442c-9285-cab39bbb8c00}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(SolutionDir)\build.props" Condition="Exists('$(SolutionDir)\build.props')" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

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

@ -11,7 +11,7 @@ set SOLUTION=Solutions\MSTelemetrySDK.sln
set CUSTOM_PROPS=
if ("%1"=="") goto skip
set CUSTOM_PROPS=/p:ForceImportBeforeCppTargets=%1
set CUSTOM_PROPS="/p:ForceImportBeforeCppTargets=%1"
echo Using custom properties file for the build:
echo %CUSTOM_PROPS%
:skip

38
build-win10-compact.bat Normal file
Просмотреть файл

@ -0,0 +1,38 @@
@echo off
REM
REM Build 'compact' Win 10 SDK for UTC mode :
REM * exclude built-in SQLite
REM * keep experimentation client
REM
call tools\gen-version.cmd
@setlocal ENABLEEXTENSIONS
echo "Building using Visual Studio 2017 tools"
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"
set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS%
set platform=
set SOLUTION=Solutions\MSTelemetrySDK.sln
REM Avoid linking sqlite library into .DLL
set NOSQLITE=TRUE
set CUSTOM_PROPS="/p:ForceImportBeforeCppTargets=%~dp0\Solutions\build.compact-exp.props"
echo Using custom properties file for the build:
echo %CUSTOM_PROPS%
REM DLL and static /MD build
msbuild %SOLUTION% /target:zlib,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=Win32 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:zlib,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=Win32 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:zlib,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=x64 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:zlib,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=x64 %CUSTOM_PROPS%
REM ARM DLL build
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\vsdevcmd\ext\vcvars.bat" arm
msbuild %SOLUTION% /target:zlib,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM %CUSTOM_PROPS%
msbuild %SOLUTION% /target:zlib,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM %CUSTOM_PROPS%
REM ARM64 DLL build
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\vsdevcmd\ext\vcvars.bat" arm64
msbuild %SOLUTION% /target:zlib,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM64 %CUSTOM_PROPS%
msbuild %SOLUTION% /target:zlib,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM64 %CUSTOM_PROPS%