Skip to content

Commit 5b525c4

Browse files
committed
Adding Windows UAP project for the product portions for v140.
1 parent eae66c1 commit 5b525c4

File tree

12 files changed

+907
-927
lines changed

12 files changed

+907
-927
lines changed

Release/include/cpprest/http_client.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
#define _CASA_HTTP_CLIENT_H
2929

3030
#if defined (__cplusplus_winrt)
31+
#if !defined(__WRL_NO_DEFAULT_LIB__)
3132
#define __WRL_NO_DEFAULT_LIB__
33+
#endif
3234
#include <wrl.h>
3335
#include <msxml6.h>
3436
namespace web { namespace http{namespace client{

Release/include/cpprest/ws_client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#ifndef _CASA_WS_CLIENT_H
2626
#define _CASA_WS_CLIENT_H
2727

28-
// Include on everything except VS2015 and Windows Desktop ARM, unless explicitly excluded.
29-
#if !defined(_MSC_VER) || ((_MSC_VER < 1900) && (defined(__cplusplus_winrt) || !defined(__cplusplus_winrt) && !defined(_M_ARM))) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
28+
// Include on everything except VS2015 Windows Desktop and Windows Desktop ARM, unless explicitly excluded.
29+
#if !defined(_MSC_VER) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) || (_MSC_VER < 1900 && !defined(_M_ARM))) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
3030

3131
#include <memory>
3232
#include <limits>

Release/include/cpprest/ws_msg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
****/
2323
#pragma once
2424

25-
// Include on everything except VS2015 and Windows Desktop ARM, unless explicitly excluded.
26-
#if !defined(_MSC_VER) || ((_MSC_VER < 1900) && (defined(__cplusplus_winrt) || !defined(__cplusplus_winrt) && !defined(_M_ARM))) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
25+
// Include on everything except VS2015 Windows Desktop and Windows Desktop ARM, unless explicitly excluded.
26+
#if !defined(_MSC_VER) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) || (_MSC_VER < 1900 && !defined(_M_ARM))) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
2727

2828
#include <memory>
2929
#include <limits>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))\Build\version.props" />
4+
<ItemGroup Label="ProjectConfigurations">
5+
<ProjectConfiguration Include="Debug|ARM">
6+
<Configuration>Debug</Configuration>
7+
<Platform>ARM</Platform>
8+
</ProjectConfiguration>
9+
<ProjectConfiguration Include="Debug|Win32">
10+
<Configuration>Debug</Configuration>
11+
<Platform>Win32</Platform>
12+
</ProjectConfiguration>
13+
<ProjectConfiguration Include="Debug|x64">
14+
<Configuration>Debug</Configuration>
15+
<Platform>x64</Platform>
16+
</ProjectConfiguration>
17+
<ProjectConfiguration Include="Release|ARM">
18+
<Configuration>Release</Configuration>
19+
<Platform>ARM</Platform>
20+
</ProjectConfiguration>
21+
<ProjectConfiguration Include="Release|Win32">
22+
<Configuration>Release</Configuration>
23+
<Platform>Win32</Platform>
24+
</ProjectConfiguration>
25+
<ProjectConfiguration Include="Release|x64">
26+
<Configuration>Release</Configuration>
27+
<Platform>x64</Platform>
28+
</ProjectConfiguration>
29+
</ItemGroup>
30+
<PropertyGroup Label="Globals">
31+
<ProjectGuid>{36d79e79-7e9e-4b3a-88a3-9f9b295c80b9}</ProjectGuid>
32+
<Keyword>DynamicLibrary</Keyword>
33+
<DefaultLanguage>en-US</DefaultLanguage>
34+
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
35+
<AppContainerApplication>true</AppContainerApplication>
36+
<ApplicationType>Windows Store</ApplicationType>
37+
<ApplicationTypeRevision>8.2</ApplicationTypeRevision>
38+
<ProjectName>cpprestsdk140.uap</ProjectName>
39+
<PlatformToolset>v140</PlatformToolset>
40+
<ConfigurationType>DynamicLibrary</ConfigurationType>
41+
</PropertyGroup>
42+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
43+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
44+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))\Build\Config.Definitions.props" />
45+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))\Build\Release.Product.Settings" />
46+
<ImportGroup Label="ExtensionSettings">
47+
</ImportGroup>
48+
<ImportGroup Label="Shared">
49+
<Import Project="..\common.vcxitems" Label="Shared" />
50+
<Import Project="..\winrt.vcxitems" Label="Shared" />
51+
</ImportGroup>
52+
<ImportGroup Label="PropertySheets">
53+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
54+
</ImportGroup>
55+
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
56+
<DebugFileSuffix>d</DebugFileSuffix>
57+
</PropertyGroup>
58+
<PropertyGroup>
59+
<TargetName>$(CppRestBaseFileName)140$(DebugFileSuffix)_uap_$(CppRestSDKVersionFileSuffix)</TargetName>
60+
</PropertyGroup>
61+
<PropertyGroup Label="UserMacros" />
62+
<PropertyGroup />
63+
<PropertyGroup>
64+
<GenerateManifest>false</GenerateManifest>
65+
<IgnoreImportLibrary>false</IgnoreImportLibrary>
66+
</PropertyGroup>
67+
<ItemDefinitionGroup>
68+
<ClCompile>
69+
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_PARTITION_APP;_ASYNCRT_EXPORT;_PPLX_EXPORT;_USRDLL;%(PreprocessorDefinitions);</PreprocessorDefinitions>
70+
<PrecompiledHeader>Use</PrecompiledHeader>
71+
<CompileAsWinRT>true</CompileAsWinRT>
72+
<AdditionalIncludeDirectories>$(CasablancaIncludeDir);$(CasablancaSrcDir)\pch;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
73+
<PrecompiledHeader>Use</PrecompiledHeader>
74+
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
75+
<AdditionalOptions>-Zm250 /bigobj %(AdditionalOptions)</AdditionalOptions>
76+
<WholeProgramOptimization Condition="'$(Configuration)'=='Release'">true</WholeProgramOptimization>
77+
</ClCompile>
78+
<Link>
79+
<SubSystem>Console</SubSystem>
80+
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
81+
<LinkTimeCodeGeneration Condition="'$(Configuration)'=='Release'">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
82+
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
83+
</Link>
84+
</ItemDefinitionGroup>
85+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
86+
<ImportGroup Label="ExtensionTargets">
87+
</ImportGroup>
88+
</Project>

Release/src/build/vs14.winrt/casablanca140.winrt.vcxproj

Lines changed: 0 additions & 66 deletions
This file was deleted.

Release/src/build/vs14.wp81/casablanca140.wp81.vcxproj

Lines changed: 0 additions & 66 deletions
This file was deleted.

Release/src/http/client/http_client_winrt.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030

3131
#include <Strsafe.h>
3232
// Important for WP8
33+
#if !defined(__WRL_NO_DEFAULT_LIB__)
3334
#define __WRL_NO_DEFAULT_LIB__
35+
#endif
3436
#include <wrl.h>
3537
#include <msxml6.h>
3638
using namespace std;
@@ -474,7 +476,7 @@ class winrt_client : public _http_client_communicator
474476
// Specifies never to call OnDataAvailable improving performance and we
475477
// already don't use OnDataAvaliable anyway.
476478
#ifdef XHR_PROP_ONDATA_NEVER
477-
hr = winrt_context->m_hRequest->SetProperty(SetProperty(XHR_PROP_ONDATA_THRESHOLD, XHR_PROP_ONDATA_NEVER);
479+
hr = winrt_context->m_hRequest->SetProperty(XHR_PROP_ONDATA_THRESHOLD, XHR_PROP_ONDATA_NEVER);
478480
if (FAILED(hr))
479481
{
480482
request->report_error(hr, L"Failure to turn off on data threshold");

Release/src/websockets/client/ws_client.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
****/
2323
#include "stdafx.h"
2424

25-
// Include on everything except VS2015 and Windows Desktop ARM, unless explicitly excluded.
26-
#if !defined(_MSC_VER) || ((_MSC_VER < 1900) && (defined(__cplusplus_winrt) || !defined(__cplusplus_winrt) && !defined(_M_ARM))) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
25+
// Include on everything except VS2015 Windows Desktop and Windows Desktop ARM, unless explicitly excluded.
26+
#if !defined(_MSC_VER) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) || (_MSC_VER < 1900 && !defined(_M_ARM))) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
2727

2828
namespace web
2929
{

Release/src/websockets/client/ws_client_winrt.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
#include "stdafx.h"
2626
#include <concrt.h>
2727

28-
// ws_winrt only available for Windows Store apps and Windows Phone 8.1
29-
#if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP) || (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP) && _WIN32_WINNT == _WIN32_WINNT_WINBLUE)) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
28+
#if !defined(CPPREST_EXCLUDE_WEBSOCKETS)
3029

3130
using namespace ::Windows::Foundation;
3231
using namespace ::Windows::Storage;

0 commit comments

Comments
 (0)