Skip to content

Commit 4c8f1fe

Browse files
committed
Porting Zheng's phone 8.1 addition to our NuGet package. Updated the NuGet package version number to 2.1.0.
1 parent 5fdff4c commit 4c8f1fe

File tree

4 files changed

+344
-6
lines changed

4 files changed

+344
-6
lines changed

Release/nuget/cpprestsdk.autopkg

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
nuget {
22
nuspec {
33
id = cpprestsdk;
4-
version : 2.0.1;
4+
version : 2.1.0;
55
title: C++ REST SDK;
66
authors: {casablancacore};
77
owners: {Microsoft, Visual C++};
@@ -11,23 +11,23 @@ nuget {
1111
requireLicenseAcceptance: true;
1212
summary: "The C++ REST SDK is a cross-platform, modern, and asynchronous library that enables developers to access and author connected applications";
1313
description: "This library is a Microsoft effort to support cloud-based client-server communication in native code using a modern asynchronous C++ API design. The C++ REST SDK (codename "Casablanca") is a project to start exploring how to best support C++ developers who want to take advantage of the radical shift in software architecture that cloud computing represents.";
14-
releaseNotes: "Release of C++ Rest SDK 2.0.1 libraries.";
14+
releaseNotes: "Release of C++ Rest SDK 2.1.0 libraries.";
1515
copyright: Copyright 2014;
1616
tags: {REST, native, C++, JSON, Casablanca, Http, Uri, WebSockets};
1717
};
1818

1919
files {
2020

2121
#defines {
22-
VER_WUNDERSCORE = 2_0;
22+
VER_WUNDERSCORE = 2_1;
2323

2424
// Signed dlls
2525
ARM_DLLS = Binaries\Arm\;
2626
X86_DLLS = Binaries\Win32\;
2727
X64_DLLS = Binaries\x64\;
2828

2929
// For libs and pdbs
30-
BIN_DIR = ..\..\..\Binaries\;
30+
BIN_DIR = ..\..\Binaries\;
3131
}
3232

3333
// grab all the files in the include folder
@@ -63,12 +63,39 @@ nuget {
6363
lib:${BIN_DIR}ARM\Release\cpprest110_wp8_${VER_WUNDERSCORE}.lib;
6464
}
6565

66-
[x86,v110_wp80 ,release,phone8] {
66+
[x86,v110_wp80,release,phone8] {
6767
bin:${X86_DLLS}cpprest110_wp8_${VER_WUNDERSCORE}.dll;
6868
symbols:${BIN_DIR}Win32\Release\cpprest110_wp8_${VER_WUNDERSCORE}.pdb;
6969
lib:${BIN_DIR}Win32\Release\cpprest110_wp8_${VER_WUNDERSCORE}.lib;
7070
}
7171

72+
// Windows Phone 8.1
73+
// Use "phone8" as the target application type, since the CoApp author defines
74+
// Phone8_condition = "('$(TargetPlatformIdentifier.ToLower())' == 'windows phone' And '$(TargetPlatformVersion)' >= '8.0')"
75+
[arm,v120_wp81,debug,phone8] {
76+
bin: ${ARM_DLLS}cpprest120d_wp81_${VER_WUNDERSCORE}.dll;
77+
symbols: ${BIN_DIR}ARM\Debug\cpprest120d_wp81_${VER_WUNDERSCORE}.pdb;
78+
lib:${BIN_DIR}ARM\Debug\cpprest120d_wp81_${VER_WUNDERSCORE}.lib;
79+
}
80+
81+
[x86,v120_wp81,debug,phone8] {
82+
bin:${X86_DLLS}cpprest120d_wp81_${VER_WUNDERSCORE}.dll;
83+
symbols:${BIN_DIR}Win32\Debug\cpprest120d_wp81_${VER_WUNDERSCORE}.pdb;
84+
lib:${BIN_DIR}Win32\Debug\cpprest120d_wp81_${VER_WUNDERSCORE}.lib;
85+
}
86+
87+
[arm,v120_wp81,release,phone8] {
88+
bin:${ARM_DLLS}cpprest120_wp81_${VER_WUNDERSCORE}.dll;
89+
symbols:${BIN_DIR}ARM\Release\cpprest120_wp81_${VER_WUNDERSCORE}.pdb;
90+
lib:${BIN_DIR}ARM\Release\cpprest120_wp81_${VER_WUNDERSCORE}.lib;
91+
}
92+
93+
[x86,v120_wp81,release,phone8] {
94+
bin:${X86_DLLS}cpprest120_wp81_${VER_WUNDERSCORE}.dll;
95+
symbols:${BIN_DIR}Win32\Release\cpprest120_wp81_${VER_WUNDERSCORE}.pdb;
96+
lib:${BIN_DIR}Win32\Release\cpprest120_wp81_${VER_WUNDERSCORE}.lib;
97+
}
98+
7299
// XP
73100
[x64,v110_xp,debug,desktop] {
74101
lib: ${BIN_DIR}x64\Debug\cpprest110d_xp_${VER_WUNDERSCORE}.lib;

Release/nuget/init.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Copy-Natvis($DestFolder)
55
if ((Test-Path $DestFolder) -eq $True)
66
{
77
# Update casablanca version for each release here.
8-
$DestFile = Join-Path -path $DestFolder -childpath "cpprest2_0.natvis";
8+
$DestFile = Join-Path -path $DestFolder -childpath "cpprest2_1.natvis";
99

1010
# Check to see if cpp rest natvis file for this version already exists
1111
# if not, then copy into user profile for Visual Studio to pick up

Release/nuget/pivots.properties

Lines changed: 309 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,309 @@
1+
// universal configuration pivots.
2+
3+
configurations {
4+
Toolsets {
5+
key : "PlatformToolset";
6+
choices: { v120, v110, v100, v90, v80, v71, v70, v60, gcc, v110_xp, v110_wp80, v120_xp, v120_wp80, v120_wp81 };
7+
8+
v110_wp80 {
9+
accept : { x86, arm, WindowsPhone8 };
10+
11+
isInstalled : {
12+
FileExists="c:\invalid_file.xyz";
13+
};
14+
};
15+
16+
v110_xp {
17+
accept : { Win32, x64, Desktop };
18+
19+
isInstalled : {
20+
FileExists="c:\invalid_file.xyz";
21+
};
22+
};
23+
24+
v120_wp80 {
25+
accept : { x86, arm, WindowsPhone8 };
26+
27+
isInstalled : {
28+
FileExists="c:\invalid_file.xyz";
29+
};
30+
};
31+
32+
33+
v120_wp81 {
34+
accept : { x86, arm, WindowsPhone8 };
35+
36+
isInstalled : {
37+
FileExists="c:\invalid_file.xyz";
38+
};
39+
};
40+
41+
v120_xp {
42+
accept : { Win32, x64, Desktop };
43+
44+
isInstalled : {
45+
FileExists="c:\invalid_file.xyz";
46+
};
47+
};
48+
49+
gcc {
50+
accept : { Win32, x64, Desktop };
51+
52+
isInstalled : {
53+
FileExists="c:\invalid_file.xyz";
54+
};
55+
};
56+
57+
v60 {
58+
accept : { Win32, Desktop };
59+
60+
isInstalled : {
61+
FileExists="c:\invalid_file.xyz";
62+
};
63+
};
64+
65+
v70 {
66+
accept : { Win32, Desktop };
67+
68+
isInstalled : {
69+
FileExists="c:\invalid_file.xyz";
70+
};
71+
};
72+
73+
v71 {
74+
accept : { Win32, x64, Desktop };
75+
76+
isInstalled : {
77+
FileExists="c:\invalid_file.xyz";
78+
};
79+
};
80+
81+
v80 {
82+
accept : { Win32, x64, Desktop };
83+
84+
isInstalled : {
85+
FileExists="c:\invalid_file.xyz";
86+
};
87+
};
88+
89+
v90 {
90+
accept : { Win32, x64, Desktop };
91+
92+
isInstalled : {
93+
FileExists="c:\invalid_file.xyz";
94+
};
95+
};
96+
97+
v100 {
98+
accept : { Win32, x64, Desktop };
99+
100+
isInstalled : {
101+
FileExists="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat";
102+
};
103+
104+
activate { // generates an 'activate_v100' Target when used from the invoke-build cmdlet.
105+
.GetEnvironmentFromBatchFile {
106+
BatchFile="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat";
107+
Parameters="${Platform}";
108+
};
109+
};
110+
};
111+
112+
v110 {
113+
// We're normalizing out the concept of the v110 platform -- Overloading the $(PlatformToolset) variable for additional pivots was a dumb idea.
114+
condition = "( '$(PlatformToolset.ToLower())' == 'v110' Or '$(PlatformToolset.ToLower())' == 'windowskernelmodedriver8.0' Or '$(PlatformToolset.ToLower())' == 'windowsapplicationfordrivers8.0' Or '$(PlatformToolset.ToLower())' == 'windowsusermodedriver8.0' )";
115+
deny : { AnyCPU };
116+
117+
isInstalled : {
118+
FileExists="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat";
119+
};
120+
121+
activate {
122+
.GetEnvironmentFromBatchFile {
123+
BatchFile="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat";
124+
Parameters=${Platform}; //.Replace(arm,x86_arm)
125+
};
126+
};
127+
};
128+
129+
v120 {
130+
// We're normalizing out the concept of the v120 platform -- Overloading the $(PlatformToolset) variable for additional pivots was a dumb idea.
131+
condition = "( '$(PlatformToolset.ToLower())' == 'v120' Or '$(PlatformToolset.ToLower())' == 'windowskernelmodedriver8.0' Or '$(PlatformToolset.ToLower())' == 'windowsapplicationfordrivers8.0' Or '$(PlatformToolset.ToLower())' == 'windowsusermodedriver8.0' )";
132+
deny : { AnyCPU };
133+
134+
isInstalled : {
135+
FileExists="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat";
136+
};
137+
138+
activate {
139+
.GetEnvironmentFromBatchFile {
140+
BatchFile="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat";
141+
Parameters=${Platform}; //.Replace(arm,x86_arm)
142+
};
143+
};
144+
};
145+
146+
147+
};
148+
149+
Platforms {
150+
key : "Platform";
151+
choices: { Win32, x64, ARM, AnyCPU };
152+
Win32 {
153+
aliases : { x86, win32, ia32, 386 };
154+
};
155+
156+
x64 {
157+
aliases : { x64, amd64, em64t, intel64, x86-64, x86_64 };
158+
accept: { cdecl, vectorcall };
159+
};
160+
161+
ARM {
162+
aliases : { arm, woa };
163+
accept : { cdecl };
164+
};
165+
166+
AnyCPU {
167+
aliases : { anycpu, any };
168+
};
169+
};
170+
171+
Configurations {
172+
key : "Configuration";
173+
choices: { Release, Debug };
174+
175+
Release {
176+
condition = "( $(Configuration.ToLower().IndexOf('debug')) == -1 )";
177+
};
178+
179+
Debug {
180+
condition = "( $(Configuration.ToLower().IndexOf('debug')) > -1 )";
181+
};
182+
};
183+
184+
Linkages {
185+
choices : { dynamic, static, ltcg, sxs };
186+
description = "Which version of the .lib file to link to this library";
187+
188+
ltcg {
189+
description = "Link Time Compiler Generation";
190+
};
191+
192+
dynamic {
193+
description = "Dynamic Library (DLL)";
194+
};
195+
196+
static {
197+
description = "Static";
198+
};
199+
200+
sxs {
201+
description = "Side-by-Side";
202+
};
203+
204+
};
205+
206+
// Only really applicable to x86
207+
CallingConventions {
208+
choices : { cdecl, stdcall, fastcall, thiscall, clrcall, vectorcall };
209+
description = "Calling convention model to use";
210+
211+
cdecl {
212+
description = "cdecl";
213+
};
214+
215+
stdcall {
216+
description = "stdcall (Uncommon)";
217+
accept: { Win32 };
218+
};
219+
220+
fastcall {
221+
description = "fastcall (Rare)";
222+
accept: { Win32 };
223+
};
224+
225+
thiscall {
226+
description = "thiscall (Rare)";
227+
accept: { Win32 };
228+
};
229+
230+
clrcall {
231+
description = "clrcall (Rare)";
232+
accept: { Win32 };
233+
};
234+
235+
vectorcall {
236+
accept: { v120, x64, x86 };
237+
}
238+
};
239+
240+
CharacterSets {
241+
key : "CharacterSet";
242+
choices: { MultiByte, Unicode };
243+
};
244+
245+
/*
246+
Since the MSBuild property for identifying if a project is compiling a Win8 Store App
247+
is a boolean, and we don't want to actually key off that, we're going to generate
248+
a property that gets a value based on that boolean, and key off of that.
249+
250+
We'll declare that property in the props file (so that it happens early in the MSBuild)
251+
(see the props section down near the bottom)
252+
*/
253+
254+
TargetApplicationTypes {
255+
key: "TargetApplicationType";
256+
257+
choices: { Desktop, WinRT, Phone8, KernelModeDriver, ApplicationForDriver, UserModeDriver }; // "WindowsKernelModeDriver8.0", "WindowsApplicationForDrivers8.0", "WindowsUserModeDriver8.0"
258+
259+
#defines {
260+
// we are going to define the conditions here
261+
// so that we can reuse them to detect 'desktop', since it's the absence
262+
// of all others, and I don't want to accidentally make a copy/paste error.
263+
264+
KernelModeDriver_condition = "('$(PlatformToolset.ToLower())' == 'windowskernelmodedriver8.0')";
265+
ApplicationForDriver_condition = "('$(PlatformToolset.ToLower())' == 'windowsapplicationfordrivers8.0')";
266+
UserModeDriver_condition = "('$(PlatformToolset.ToLower())' == 'windowsusermodedriver8.0')";
267+
268+
Phone8_condition = "('$(TargetPlatformIdentifier.ToLower())' == 'windows phone' And '$(TargetPlatformVersion)' >= '8.0')";
269+
WinRT_condition = "('$(AppContainerApplication.ToLower())' == 'true')";
270+
Desktop_condition = "( !${KernelModeDriver_condition} And !${ApplicationForDriver_condition} And !${UserModeDriver_condition} And !${Phone8_condition} And !${WinRT_condition} )";
271+
}
272+
273+
Desktop {
274+
aliases : { Desktop, NotWinRT };
275+
condition = ${Desktop_condition};
276+
};
277+
278+
WinRT {
279+
aliases : { WinRT, Metro, Modern };
280+
condition = ${WinRT_condition};
281+
accept : { v120, v110 };
282+
};
283+
284+
Phone8 {
285+
aliases : { Phone8, Phone, WindowsPhone };
286+
condition = ${Phone8_condition};
287+
accept : { v120, v110 };
288+
};
289+
290+
KernelModeDriver {
291+
aliases : { KernelModeDriver, Kernel, KernelDriver ,Driver };
292+
condition = ${KernelModeDriver_condition};
293+
accept : { v120, v110 };
294+
};
295+
296+
ApplicationForDriver {
297+
aliases : { ApplicationForDriver };
298+
condition = ${ApplicationForDriver_condition};
299+
accept : { v120, v110 };
300+
};
301+
302+
UserModeDriver {
303+
aliases : { UserModeDriver, UserMode, UserDriver };
304+
condition = ${UserModeDriver_condition};
305+
accept : { v120, v110 };
306+
};
307+
308+
}
309+
}

0 commit comments

Comments
 (0)