Skip to content

Commit

Permalink
Porting Zheng's phone 8.1 addition to our NuGet package. Updated the …
Browse files Browse the repository at this point in the history
…NuGet package version number to 2.1.0.
  • Loading branch information
stgates committed Jun 11, 2014
1 parent 5fdff4c commit 4c8f1fe
Show file tree
Hide file tree
Showing 4 changed files with 344 additions and 6 deletions.
37 changes: 32 additions & 5 deletions Release/nuget/cpprestsdk.autopkg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
nuget {
nuspec {
id = cpprestsdk;
version : 2.0.1;
version : 2.1.0;
title: C++ REST SDK;
authors: {casablancacore};
owners: {Microsoft, Visual C++};
Expand All @@ -11,23 +11,23 @@ nuget {
requireLicenseAcceptance: true;
summary: "The C++ REST SDK is a cross-platform, modern, and asynchronous library that enables developers to access and author connected applications";
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.";
releaseNotes: "Release of C++ Rest SDK 2.0.1 libraries.";
releaseNotes: "Release of C++ Rest SDK 2.1.0 libraries.";
copyright: Copyright 2014;
tags: {REST, native, C++, JSON, Casablanca, Http, Uri, WebSockets};
};

files {

#defines {
VER_WUNDERSCORE = 2_0;
VER_WUNDERSCORE = 2_1;

// Signed dlls
ARM_DLLS = Binaries\Arm\;
X86_DLLS = Binaries\Win32\;
X64_DLLS = Binaries\x64\;

// For libs and pdbs
BIN_DIR = ..\..\..\Binaries\;
BIN_DIR = ..\..\Binaries\;
}

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

[x86,v110_wp80 ,release,phone8] {
[x86,v110_wp80,release,phone8] {
bin:${X86_DLLS}cpprest110_wp8_${VER_WUNDERSCORE}.dll;
symbols:${BIN_DIR}Win32\Release\cpprest110_wp8_${VER_WUNDERSCORE}.pdb;
lib:${BIN_DIR}Win32\Release\cpprest110_wp8_${VER_WUNDERSCORE}.lib;
}

// Windows Phone 8.1
// Use "phone8" as the target application type, since the CoApp author defines
// Phone8_condition = "('$(TargetPlatformIdentifier.ToLower())' == 'windows phone' And '$(TargetPlatformVersion)' >= '8.0')"
[arm,v120_wp81,debug,phone8] {
bin: ${ARM_DLLS}cpprest120d_wp81_${VER_WUNDERSCORE}.dll;
symbols: ${BIN_DIR}ARM\Debug\cpprest120d_wp81_${VER_WUNDERSCORE}.pdb;
lib:${BIN_DIR}ARM\Debug\cpprest120d_wp81_${VER_WUNDERSCORE}.lib;
}

[x86,v120_wp81,debug,phone8] {
bin:${X86_DLLS}cpprest120d_wp81_${VER_WUNDERSCORE}.dll;
symbols:${BIN_DIR}Win32\Debug\cpprest120d_wp81_${VER_WUNDERSCORE}.pdb;
lib:${BIN_DIR}Win32\Debug\cpprest120d_wp81_${VER_WUNDERSCORE}.lib;
}

[arm,v120_wp81,release,phone8] {
bin:${ARM_DLLS}cpprest120_wp81_${VER_WUNDERSCORE}.dll;
symbols:${BIN_DIR}ARM\Release\cpprest120_wp81_${VER_WUNDERSCORE}.pdb;
lib:${BIN_DIR}ARM\Release\cpprest120_wp81_${VER_WUNDERSCORE}.lib;
}

[x86,v120_wp81,release,phone8] {
bin:${X86_DLLS}cpprest120_wp81_${VER_WUNDERSCORE}.dll;
symbols:${BIN_DIR}Win32\Release\cpprest120_wp81_${VER_WUNDERSCORE}.pdb;
lib:${BIN_DIR}Win32\Release\cpprest120_wp81_${VER_WUNDERSCORE}.lib;
}

// XP
[x64,v110_xp,debug,desktop] {
lib: ${BIN_DIR}x64\Debug\cpprest110d_xp_${VER_WUNDERSCORE}.lib;
Expand Down
2 changes: 1 addition & 1 deletion Release/nuget/init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Copy-Natvis($DestFolder)
if ((Test-Path $DestFolder) -eq $True)
{
# Update casablanca version for each release here.
$DestFile = Join-Path -path $DestFolder -childpath "cpprest2_0.natvis";
$DestFile = Join-Path -path $DestFolder -childpath "cpprest2_1.natvis";

# Check to see if cpp rest natvis file for this version already exists
# if not, then copy into user profile for Visual Studio to pick up
Expand Down
309 changes: 309 additions & 0 deletions Release/nuget/pivots.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,309 @@
// universal configuration pivots.

configurations {
Toolsets {
key : "PlatformToolset";
choices: { v120, v110, v100, v90, v80, v71, v70, v60, gcc, v110_xp, v110_wp80, v120_xp, v120_wp80, v120_wp81 };

v110_wp80 {
accept : { x86, arm, WindowsPhone8 };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

v110_xp {
accept : { Win32, x64, Desktop };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

v120_wp80 {
accept : { x86, arm, WindowsPhone8 };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};


v120_wp81 {
accept : { x86, arm, WindowsPhone8 };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

v120_xp {
accept : { Win32, x64, Desktop };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

gcc {
accept : { Win32, x64, Desktop };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

v60 {
accept : { Win32, Desktop };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

v70 {
accept : { Win32, Desktop };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

v71 {
accept : { Win32, x64, Desktop };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

v80 {
accept : { Win32, x64, Desktop };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

v90 {
accept : { Win32, x64, Desktop };

isInstalled : {
FileExists="c:\invalid_file.xyz";
};
};

v100 {
accept : { Win32, x64, Desktop };

isInstalled : {
FileExists="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat";
};

activate { // generates an 'activate_v100' Target when used from the invoke-build cmdlet.
.GetEnvironmentFromBatchFile {
BatchFile="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat";
Parameters="${Platform}";
};
};
};

v110 {
// We're normalizing out the concept of the v110 platform -- Overloading the $(PlatformToolset) variable for additional pivots was a dumb idea.
condition = "( '$(PlatformToolset.ToLower())' == 'v110' Or '$(PlatformToolset.ToLower())' == 'windowskernelmodedriver8.0' Or '$(PlatformToolset.ToLower())' == 'windowsapplicationfordrivers8.0' Or '$(PlatformToolset.ToLower())' == 'windowsusermodedriver8.0' )";
deny : { AnyCPU };
isInstalled : {
FileExists="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat";
};
activate {
.GetEnvironmentFromBatchFile {
BatchFile="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat";
Parameters=${Platform}; //.Replace(arm,x86_arm)
};
};
};
v120 {
// We're normalizing out the concept of the v120 platform -- Overloading the $(PlatformToolset) variable for additional pivots was a dumb idea.
condition = "( '$(PlatformToolset.ToLower())' == 'v120' Or '$(PlatformToolset.ToLower())' == 'windowskernelmodedriver8.0' Or '$(PlatformToolset.ToLower())' == 'windowsapplicationfordrivers8.0' Or '$(PlatformToolset.ToLower())' == 'windowsusermodedriver8.0' )";
deny : { AnyCPU };

isInstalled : {
FileExists="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat";
};

activate {
.GetEnvironmentFromBatchFile {
BatchFile="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat";
Parameters=${Platform}; //.Replace(arm,x86_arm)
};
};
};


};

Platforms {
key : "Platform";
choices: { Win32, x64, ARM, AnyCPU };
Win32 {
aliases : { x86, win32, ia32, 386 };
};

x64 {
aliases : { x64, amd64, em64t, intel64, x86-64, x86_64 };
accept: { cdecl, vectorcall };
};

ARM {
aliases : { arm, woa };
accept : { cdecl };
};

AnyCPU {
aliases : { anycpu, any };
};
};

Configurations {
key : "Configuration";
choices: { Release, Debug };

Release {
condition = "( $(Configuration.ToLower().IndexOf('debug')) == -1 )";
};

Debug {
condition = "( $(Configuration.ToLower().IndexOf('debug')) > -1 )";
};
};

Linkages {
choices : { dynamic, static, ltcg, sxs };
description = "Which version of the .lib file to link to this library";

ltcg {
description = "Link Time Compiler Generation";
};

dynamic {
description = "Dynamic Library (DLL)";
};

static {
description = "Static";
};

sxs {
description = "Side-by-Side";
};

};

// Only really applicable to x86
CallingConventions {
choices : { cdecl, stdcall, fastcall, thiscall, clrcall, vectorcall };
description = "Calling convention model to use";

cdecl {
description = "cdecl";
};

stdcall {
description = "stdcall (Uncommon)";
accept: { Win32 };
};

fastcall {
description = "fastcall (Rare)";
accept: { Win32 };
};

thiscall {
description = "thiscall (Rare)";
accept: { Win32 };
};

clrcall {
description = "clrcall (Rare)";
accept: { Win32 };
};

vectorcall {
accept: { v120, x64, x86 };
}
};

CharacterSets {
key : "CharacterSet";
choices: { MultiByte, Unicode };
};

/*
Since the MSBuild property for identifying if a project is compiling a Win8 Store App
is a boolean, and we don't want to actually key off that, we're going to generate
a property that gets a value based on that boolean, and key off of that.

We'll declare that property in the props file (so that it happens early in the MSBuild)
(see the props section down near the bottom)
*/
TargetApplicationTypes {
key: "TargetApplicationType";
choices: { Desktop, WinRT, Phone8, KernelModeDriver, ApplicationForDriver, UserModeDriver }; // "WindowsKernelModeDriver8.0", "WindowsApplicationForDrivers8.0", "WindowsUserModeDriver8.0"
#defines {
// we are going to define the conditions here
// so that we can reuse them to detect 'desktop', since it's the absence
// of all others, and I don't want to accidentally make a copy/paste error.
KernelModeDriver_condition = "('$(PlatformToolset.ToLower())' == 'windowskernelmodedriver8.0')";
ApplicationForDriver_condition = "('$(PlatformToolset.ToLower())' == 'windowsapplicationfordrivers8.0')";
UserModeDriver_condition = "('$(PlatformToolset.ToLower())' == 'windowsusermodedriver8.0')";
Phone8_condition = "('$(TargetPlatformIdentifier.ToLower())' == 'windows phone' And '$(TargetPlatformVersion)' >= '8.0')";
WinRT_condition = "('$(AppContainerApplication.ToLower())' == 'true')";
Desktop_condition = "( !${KernelModeDriver_condition} And !${ApplicationForDriver_condition} And !${UserModeDriver_condition} And !${Phone8_condition} And !${WinRT_condition} )";
}
Desktop {
aliases : { Desktop, NotWinRT };
condition = ${Desktop_condition};
};
WinRT {
aliases : { WinRT, Metro, Modern };
condition = ${WinRT_condition};
accept : { v120, v110 };
};
Phone8 {
aliases : { Phone8, Phone, WindowsPhone };
condition = ${Phone8_condition};
accept : { v120, v110 };
};
KernelModeDriver {
aliases : { KernelModeDriver, Kernel, KernelDriver ,Driver };
condition = ${KernelModeDriver_condition};
accept : { v120, v110 };
};
ApplicationForDriver {
aliases : { ApplicationForDriver };
condition = ${ApplicationForDriver_condition};
accept : { v120, v110 };
};
UserModeDriver {
aliases : { UserModeDriver, UserMode, UserDriver };
condition = ${UserModeDriver_condition};
accept : { v120, v110 };
};
}
}
Loading

0 comments on commit 4c8f1fe

Please sign in to comment.