Skip to content

Commit 0c553ff

Browse files
committed
Merge branch 'development' of https://git01.codeplex.com/casablanca into development
2 parents 6763079 + dcd7565 commit 0c553ff

File tree

21 files changed

+198
-87
lines changed

21 files changed

+198
-87
lines changed

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#Visual Studio files
2+
*.[Oo]bj
3+
*.user
4+
*.aps
5+
*.pch
6+
*.vspscc
7+
*.vssscc
8+
*_i.c
9+
*_p.c
10+
*.ncb
11+
*.suo
12+
*.tlb
13+
*.tlh
14+
*.bak
15+
*.[Cc]ache
16+
*.ilk
17+
*.log
18+
*.lib
19+
*.sbr
20+
*.sdf
21+
*.sdf
22+
*.opensdf
23+
*.pdb
24+
*.idb
25+
*.res
26+
*.unsuccessfulbuild
27+
*.lastbuildstate
28+
*.tlog
29+
*.intermediate
30+
*.dll
31+
*.exp
32+
*.exe
33+
ipch/
34+
obj/
35+
*.resfiles
36+
[Bb]in
37+
Binaries/
38+
VS11.winrt/
39+
!*.vcxproj.*

Build/Common.Build.settings

Lines changed: 39 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,58 @@
99
</MSBuildAllProjects>
1010
</PropertyGroup>
1111

12+
<!-- for root paths -->
1213
<PropertyGroup>
1314
<BuildRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))</BuildRoot>
1415
<TargetsPath>$(BuildRoot)\Build</TargetsPath>
1516
<OsVersion>$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@CurrentVersion)</OsVersion>
17+
<!--If Dev10 and Dev11 are both installed, the default is to build Dev11. This can be overridden by setting the DevToolsVersion variable in powershell-->
18+
<DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS110COMNTOOLS)' != ''">110</DevToolsVersion>
19+
<DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS100COMNTOOLS)' != ''">100</DevToolsVersion>
1620
</PropertyGroup>
1721

18-
<Target Name="CopyToOutputDirectoryAlwaysError"
19-
Condition="'@(Content)'!='' or '@(None)'!=''">
20-
<Error Condition="'%(Content.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" />
21-
<Error Condition="'%(None.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" />
22-
</Target>
2322

23+
<!-- paths can be overriden by configuration -->
24+
<PropertyGroup>
25+
<OutputPath>$(BuildRoot)\Binaries\$(Platform)\$(Configuration)\</OutputPath>
26+
<OutDir>$(OutputPath)</OutDir>
27+
<MSBuildCommunityTasksPath Condition="'$(MSBuildCommunityTasksPath)'==''">$(BuildRoot)\Build\MSBuild.Community.Tasks</MSBuildCommunityTasksPath>
28+
<WixToolPath Condition="'$(WixToolPath)'==''">$(BuildRoot)\Build\Wix\3.6\</WixToolPath>
29+
<WixExtDir Condition="'$(WixExtDir)'==''">$(WixToolPath)</WixExtDir>
30+
<TestRoot>$(BuildRoot)\Release\Tests</TestRoot>
31+
<CasablancaSrcDir>$(BuildRoot)\Release\src</CasablancaSrcDir>
32+
<CasablancaIncludeDir>$(BuildRoot)\Release\include</CasablancaIncludeDir>
33+
<CollateralsDir>$(BuildRoot)\Release\Collateral</CollateralsDir>
34+
</PropertyGroup>
35+
36+
<!-- try locating configuration file -->
2437
<Import Condition="Exists('$(BuildRoot)\..\Build\environment.casablanca.settings')" Project="$(BuildRoot)\..\Build\environment.casablanca.settings"/>
38+
39+
<!-- paths will not be overriden -->
40+
<PropertyGroup>
41+
<OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
42+
</PropertyGroup>
43+
44+
<PropertyGroup Condition="'$(DevToolsVersion)' == '100'"> <PlatformToolset>v100</PlatformToolset>
45+
<DevEnvDir>$(VS100COMNTOOLS)..\IDE</DevEnvDir>
46+
</PropertyGroup>
47+
48+
<PropertyGroup Condition="'$(DevToolsVersion)' == '110'">
49+
<DevEnvDir>$(VS110COMNTOOLS)..\IDE</DevEnvDir>
50+
</PropertyGroup>
51+
2552
<PropertyGroup>
2653
<BinaryDependencies>$(TargetsPath)\BinaryDependencies</BinaryDependencies>
2754
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
2855
<Platform Condition="'$(Platform)'==''">Win32</Platform>
2956
<ErrorReport>prompt</ErrorReport>
3057
<WarningLevel>4</WarningLevel>
3158

32-
<MSBuildCommunityTasksPath Condition="'$(MSBuildCommunityTasksPath)'==''">$(BuildRoot)\Build\MSBuild.Community.Tasks</MSBuildCommunityTasksPath>
33-
<WixToolPath Condition="'$(WixToolPath)'==''">$(BuildRoot)\Build\Wix\3.6\</WixToolPath>
34-
<WixExtDir Condition="'$(WixExtDir)'==''">$(WixToolPath)</WixExtDir>
3559
<WixTargetsPath>$(WixToolPath)Wix.targets</WixTargetsPath>
3660
<WixTasksPath >$(WixToolPath)WixTasks.dll</WixTasksPath>
3761
<LuxTargetsPath>$(WixToolPath)Lux.targets</LuxTargetsPath>
3862
<LuxTasksPath >$(WixToolPath)LuxTasks.dll</LuxTasksPath>
3963

40-
<!--If Dev10 and Dev11 are both installed, the default is to build Dev11. This can be overridden by setting the DevToolsVersion variable in powershell-->
41-
<DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS110COMNTOOLS)' != ''">110</DevToolsVersion>
42-
<DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS100COMNTOOLS)' != ''">100</DevToolsVersion>
43-
44-
<TestRoot>$(BuildRoot)\Release\Tests</TestRoot>
45-
<CasablancaSrcDir>$(BuildRoot)\Release\src</CasablancaSrcDir>
46-
<CasablancaIncludeDir>$(BuildRoot)\Release\include</CasablancaIncludeDir>
47-
<CollateralsDir>$(BuildRoot)\Release\Collateral</CollateralsDir>
4864

4965
<!--For C#:-->
5066
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
@@ -63,20 +79,7 @@
6379
<WholeProgramOptimization Condition="'$(WholeProgramOptimization)'=='' And '$(Configuration)'!='Debug'">true</WholeProgramOptimization>
6480
</PropertyGroup>
6581

66-
<PropertyGroup Condition="'$(DevToolsVersion)' == '100'"> <PlatformToolset>v100</PlatformToolset>
67-
<DevEnvDir>$(VS100COMNTOOLS)..\IDE</DevEnvDir>
68-
</PropertyGroup>
69-
70-
<PropertyGroup Condition="'$(DevToolsVersion)' == '110'">
71-
<DevEnvDir>$(VS110COMNTOOLS)..\IDE</DevEnvDir>
72-
</PropertyGroup>
7382

74-
<!--For Incubation only:-->
75-
<PropertyGroup>
76-
<ActorsIncludeDir>$(BuildRoot)\Incubation\Actors\include</ActorsIncludeDir>
77-
<ActorsInternalIncludeDir>$(BuildRoot)\Incubation\Actors\internalinc</ActorsInternalIncludeDir>
78-
</PropertyGroup>
79-
8083
<ItemDefinitionGroup>
8184
<ClCompile>
8285
<WarningLevel>Level4</WarningLevel>
@@ -146,7 +149,6 @@
146149
<DebugSymbols>true</DebugSymbols>
147150
<DebugType>full</DebugType>
148151
<Optimize>false</Optimize>
149-
<OutputPath>$(BuildRoot)\Binaries\Win32\Debug\</OutputPath>
150152
<DefineConstants>DEBUG;TRACE</DefineConstants>
151153
<InstallerPlatform>x86</InstallerPlatform>
152154
</PropertyGroup>
@@ -155,52 +157,43 @@
155157
<DebugSymbols>true</DebugSymbols>
156158
<DebugType>full</DebugType>
157159
<Optimize>false</Optimize>
158-
<OutputPath>$(BuildRoot)\Binaries\x64\Debug\</OutputPath>
159160
<DefineConstants>DEBUG;TRACE;X64</DefineConstants>
160161
</PropertyGroup>
161162

162163
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' ">
163164
<DebugType>pdbonly</DebugType>
164165
<Optimize>true</Optimize>
165-
<OutputPath>$(BuildRoot)\Binaries\Win32\Release\</OutputPath>
166166
<DefineConstants>TRACE</DefineConstants>
167167
<InstallerPlatform>x86</InstallerPlatform>
168168
</PropertyGroup>
169169

170170
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
171171
<DebugType>pdbonly</DebugType>
172172
<Optimize>true</Optimize>
173-
<OutputPath>$(BuildRoot)\Binaries\x64\Release\</OutputPath>
174173
<DefineConstants>TRACE;X64</DefineConstants>
175174
</PropertyGroup>
176175

177176
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
178177
<DebugSymbols>true</DebugSymbols>
179178
<DebugType>full</DebugType>
180179
<Optimize>false</Optimize>
181-
<OutputPath>$(BuildRoot)\Binaries\ARM\Debug\</OutputPath>
182180
<DefineConstants>DEBUG;TRACE;ARM</DefineConstants>
183181
</PropertyGroup>
184182

185183
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
186184
<DebugType>pdbonly</DebugType>
187185
<Optimize>true</Optimize>
188-
<OutputPath>$(BuildRoot)\Binaries\ARM\Release\</OutputPath>
189186
<DefineConstants>TRACE;ARM</DefineConstants>
190187
</PropertyGroup>
191188

192-
<PropertyGroup>
193-
<OutDir Condition="'$(OutDir)' == ''">$(OutputPath)</OutDir>
194-
</PropertyGroup>
195-
196-
<PropertyGroup>
197-
<OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
198-
</PropertyGroup>
199-
200-
<ItemGroup>
201-
<CodeAnalysisDictionary Include="$(BuildRoot)\Build\CustomDictionary.xml" />
202-
</ItemGroup>
203189

190+
191+
<!--end paths configuration -->
192+
<Target Name="CopyToOutputDirectoryAlwaysError"
193+
Condition="'@(Content)'!='' or '@(None)'!=''">
194+
<Error Condition="'%(Content.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" />
195+
<Error Condition="'%(None.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" />
196+
</Target>
204197
<!-- BEGIN: Workaround for MSBuild.exe bug that will be fixed in v4.5 -->
205198
<!-- Bug Symptom: -->
206199
<!-- Multi-proc build returns "CSC : fatal error CS0009: Metadata file '(FilePath)' could not be opened == 'File is corrupt.' -->

Release/build_all.ps1

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
param (
2+
[string]$target = "build"
3+
)
4+
5+
$script:startTime = get-date
6+
7+
function GetElapsedTime() {
8+
$runtime = $(get-date) - $script:StartTime
9+
$retStr = [string]::format("{0} hours, {1} minutes, {2}.{3} seconds", `
10+
($runtime.Days * 24 + $runtime.Hours), $runtime.Minutes, $runtime.Seconds, $runtime.Milliseconds)
11+
$retStr
12+
}
13+
14+
$config_params = @(("Win32", "Release"),
15+
("Win32", "Debug"),
16+
("x64", "Release"),
17+
("x64", "Debug"),
18+
("arm", "Release"),
19+
("arm", "Debug"))
20+
21+
if ((Test-Path "dirs.proj") -eq $false)
22+
{
23+
Write-Host ("Error: cannot find dirs.proj in the current directory") -foregroundcolor red
24+
}
25+
else {
26+
27+
foreach($param in $config_params)
28+
{
29+
$plat = $param[0]
30+
$config = $param[1]
31+
Write-Host ("msbuild dirs.proj /p:Platform=$plat /p:Configuration=$config /t:$target") -foregroundcolor Cyan
32+
msbuild dirs.proj /p:Platform=$plat /p:Configuration=$config /t:$target
33+
if($LastExitCode -ne 0)
34+
{
35+
Write-Host ("Error: failure building $plat $config") -foregroundcolor red
36+
break
37+
}
38+
}
39+
}
40+
Write-Host "Elapsed Time: $(GetElapsedTime)"

Release/collateral/Samples/BingRequest/VC10/BingRequest.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ EndProject
66
Global
77
GlobalSection(SolutionConfigurationPlatforms) = preSolution
88
Debug|x64 = Debug|x64
9+
Debug|Win32 = Debug|Win32
910
Release|x64 = Release|x64
11+
Release|Win32 = Release|Win32
1012
EndGlobalSection
1113
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1214
{BC7664BD-F33B-433C-AB8D-3530A914F5EC}.Debug|x64.ActiveCfg = Debug|x64
1315
{BC7664BD-F33B-433C-AB8D-3530A914F5EC}.Debug|x64.Build.0 = Debug|x64
1416
{BC7664BD-F33B-433C-AB8D-3530A914F5EC}.Release|x64.ActiveCfg = Release|x64
1517
{BC7664BD-F33B-433C-AB8D-3530A914F5EC}.Release|x64.Build.0 = Release|x64
18+
{BC7664BD-F33B-433C-AB8D-3530A914F5EC}.Debug|Win32.ActiveCfg = Debug|Win32
19+
{BC7664BD-F33B-433C-AB8D-3530A914F5EC}.Debug|Win32.Build.0 = Debug|Win32
20+
{BC7664BD-F33B-433C-AB8D-3530A914F5EC}.Release|Win32.ActiveCfg = Release|Win32
21+
{BC7664BD-F33B-433C-AB8D-3530A914F5EC}.Release|Win32.Build.0 = Release|Win32
1622
EndGlobalSection
1723
GlobalSection(SolutionProperties) = preSolution
1824
HideSolutionNode = FALSE

Release/collateral/Samples/BingRequest/VC11/BingRequest.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ EndProject
66
Global
77
GlobalSection(SolutionConfigurationPlatforms) = preSolution
88
Debug|x64 = Debug|x64
9+
Debug|Win32 = Debug|Win32
910
Release|x64 = Release|x64
11+
Release|Win32 = Release|Win32
1012
EndGlobalSection
1113
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1214
{31C2DFBB-159D-4EEE-A067-3ED0A287B7C2}.Debug|x64.ActiveCfg = Debug|x64
1315
{31C2DFBB-159D-4EEE-A067-3ED0A287B7C2}.Debug|x64.Build.0 = Debug|x64
1416
{31C2DFBB-159D-4EEE-A067-3ED0A287B7C2}.Release|x64.ActiveCfg = Release|x64
1517
{31C2DFBB-159D-4EEE-A067-3ED0A287B7C2}.Release|x64.Build.0 = Release|x64
18+
{31C2DFBB-159D-4EEE-A067-3ED0A287B7C2}.Debug|Win32.ActiveCfg = Debug|Win32
19+
{31C2DFBB-159D-4EEE-A067-3ED0A287B7C2}.Debug|Win32.Build.0 = Debug|Win32
20+
{31C2DFBB-159D-4EEE-A067-3ED0A287B7C2}.Release|Win32.ActiveCfg = Release|Win32
21+
{31C2DFBB-159D-4EEE-A067-3ED0A287B7C2}.Release|Win32.Build.0 = Release|Win32
1622
EndGlobalSection
1723
GlobalSection(SolutionProperties) = preSolution
1824
HideSolutionNode = FALSE

Release/collateral/Samples/SearchFile/VC11/SearchFile.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ EndProject
66
Global
77
GlobalSection(SolutionConfigurationPlatforms) = preSolution
88
Debug|x64 = Debug|x64
9+
Debug|Win32 = Debug|Win32
910
Release|x64 = Release|x64
11+
Release|Win32 = Release|Win32
1012
EndGlobalSection
1113
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1214
{99F16455-0590-430A-9CAD-DA29AB519348}.Debug|x64.ActiveCfg = Debug|x64
1315
{99F16455-0590-430A-9CAD-DA29AB519348}.Debug|x64.Build.0 = Debug|x64
1416
{99F16455-0590-430A-9CAD-DA29AB519348}.Release|x64.ActiveCfg = Release|x64
1517
{99F16455-0590-430A-9CAD-DA29AB519348}.Release|x64.Build.0 = Release|x64
18+
{99F16455-0590-430A-9CAD-DA29AB519348}.Debug|Win32.ActiveCfg = Debug|Win32
19+
{99F16455-0590-430A-9CAD-DA29AB519348}.Debug|Win32.Build.0 = Debug|Win32
20+
{99F16455-0590-430A-9CAD-DA29AB519348}.Release|Win32.ActiveCfg = Release|Win32
21+
{99F16455-0590-430A-9CAD-DA29AB519348}.Release|Win32.Build.0 = Release|Win32
1622
EndGlobalSection
1723
GlobalSection(SolutionProperties) = preSolution
1824
HideSolutionNode = FALSE

Release/collateral/Samples/SearchFile/VC11/SearchFile.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
</PropertyGroup>
8383
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
8484
<ClCompile>
85+
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
8586
<PrecompiledHeader>NotUsing</PrecompiledHeader>
8687
<Optimization>Disabled</Optimization>
8788
<PreprocessorDefinitions>WIN32;DEBUG;_CONSOLE</PreprocessorDefinitions>
@@ -100,6 +101,7 @@
100101
</ItemDefinitionGroup>
101102
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
102103
<ClCompile>
104+
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
103105
<PrecompiledHeader>NotUsing</PrecompiledHeader>
104106
<Optimization>Disabled</Optimization>
105107
<PreprocessorDefinitions>WIN32;DEBUG;_CONSOLE</PreprocessorDefinitions>
@@ -119,6 +121,7 @@
119121
</ItemDefinitionGroup>
120122
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
121123
<ClCompile>
124+
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
122125
<PrecompiledHeader>NotUsing</PrecompiledHeader>
123126
<Optimization>MaxSpeed</Optimization>
124127
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -141,6 +144,7 @@
141144
</ItemDefinitionGroup>
142145
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
143146
<ClCompile>
147+
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
144148
<PrecompiledHeader>NotUsing</PrecompiledHeader>
145149
<Optimization>MaxSpeed</Optimization>
146150
<FunctionLevelLinking>true</FunctionLevelLinking>

Release/collateral/Samples/SearchFile/searchfile.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,22 @@ static pplx::task<void> find_matches_in_file(const string_t &fileName, const std
108108
auto lineNumber = std::make_shared<int>(1);
109109
return ::do_while([=]()
110110
{
111-
container_buffer<std::string> line;
112-
return inFile.read_line(line).then([=](size_t bytesRead)
111+
container_buffer<std::string> inLine;
112+
return inFile.read_line(inLine).then([=](size_t bytesRead)
113113
{
114114
if(bytesRead == 0 && inFile.is_eof())
115115
{
116116
return pplx::task_from_result(false);
117117
}
118118

119-
else if(line.collection().find(searchString) != std::string::npos)
119+
else if(inLine.collection().find(searchString) != std::string::npos)
120120
{
121121
results.print("line ");
122122
results.print((*lineNumber)++);
123123
return results.print(":").then([=](size_t)
124124
{
125-
return results.write(line, line.collection().size());
125+
container_buffer<std::string> outLine(std::move(inLine.collection()));
126+
return results.write(outLine, outLine.collection().size());
126127
}).then([=](size_t)
127128
{
128129
return results.print("\r\n");

Release/dirs.proj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
<ItemGroup>
66
<ProjectFile Include="src\dirs.proj"/>
7-
<ProjectFile Include="samples\dirs.proj"/>
8-
<ProjectFile Include="tests\dirs.proj"/>
7+
<ProjectFile Include="samples\dirs.proj" Condition="'$(Platform)'!='ARM' or '$(WindowsSDKDesktopARMSupport)' == 'true'"/>
8+
<ProjectFile Include="tests\dirs.proj" Condition="'$(Platform)'!='ARM' or '$(WindowsSDKDesktopARMSupport)' == 'true'"/>
99
</ItemGroup>
1010

1111
<Import Project="$(TargetsPath)\Common.Build.Traversal.targets" />

Release/include/http_msg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ class _http_server_context
600600
class _http_response : public http::details::http_msg_base
601601
{
602602
public:
603-
_http_response() : m_status_code(std::numeric_limits<uint16_t>::max()) { }
603+
_http_response() : m_status_code((std::numeric_limits<uint16_t>::max)()) { }
604604

605605
_http_response(http::status_code code) : m_status_code(code) {}
606606

0 commit comments

Comments
 (0)