Skip to content

Commit b4cffb7

Browse files
committed
Merge branch 'development' of https://git01.codeplex.com/casablanca into leakdetection
2 parents ddd3b0e + fec9703 commit b4cffb7

19 files changed

+411
-187
lines changed

Build_iOS/README.md

Lines changed: 2 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,3 @@
1-
Instructions to use Casablanca on iOS
2-
=====================================
1+
Please consult the codeplex documentation for iOS compilation:
32

4-
Casablanca depends on Boost and OpenSSL when used on iOS. It is a non-trivial
5-
task to cross-compile libraries for iOS, however there are scripts available
6-
online with nonrestrictive licenses to compile many popular libraries -- among
7-
these libraries are Boost and OpenSSL.
8-
9-
This document will walk through the steps to build casablanca and its
10-
dependencies into a form suitable for use with iOS applications.
11-
12-
For this walkthrough, we assume you are working within the 'Build_iOS'
13-
directory of the casablanca project.
14-
15-
$ git clone https://git01.codeplex.com/casablanca
16-
$ pushd casablanca/Build_iOS
17-
18-
19-
Building OpenSSL
20-
----------------
21-
22-
To build OpenSSL, use the script provided by the OpenSSL-for-iPhone project.
23-
24-
$ git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git
25-
$ pushd OpenSSL-for-iPhone
26-
$ ./build-libssl.sh
27-
$ popd
28-
29-
After building the library, move the include files and libraries to
30-
`Build iOS/openssl/include` and `Build iOS/openssl/lib` respectively.
31-
32-
$ mkdir openssl
33-
$ mv OpenSSL-for-iPhone/include openssl
34-
$ mv OpenSSL-for-iPhone/lib openssl
35-
36-
This completes building OpenSSL.
37-
38-
[project link](https://github.com/x2on/OpenSSL-for-iPhone)
39-
40-
41-
Building Boost
42-
--------------
43-
44-
To build Boost, use the script provided by the boostoniphone project. The main
45-
project author seems to have not continued maintaining the project, however
46-
there are a few actively maintained forks. We recommend using the fork by Joseph
47-
Galbraith.
48-
49-
$ git clone https://git.gitorious.org/boostoniphone/galbraithjosephs-boostoniphone.git boostoniphone
50-
$ pushd boostoniphone
51-
52-
The script `boost.sh` provided by the boostoniphone project has a variable at
53-
the top of the file to specify which parts of boost need be compiled. This
54-
variable must be changed to include the parts needed for Casablanca: thread,
55-
signals, filesystem, regex, program_options, system.
56-
57-
$ sed -e 's/\${BOOST_LIBS:=".*"}/\${BOOST_LIBS:="thread filesystem regex locale system"}/g' -i .bak boost.sh
58-
$ ./boost.sh
59-
60-
The headers need to be moved to allow inclusion via `"boost/foo.h"`.
61-
62-
$ pushd ios/framework/boost.framework/Versions/A
63-
$ mkdir Headers2
64-
$ mv Headers Headers2/boost
65-
$ mv Headers2 Headers
66-
$ popd
67-
68-
Finally, the product framework must be moved into place.
69-
70-
$ popd
71-
$ mv boostoniphone/ios/framework/boost.framework .
72-
73-
This completes building Boost.
74-
75-
[project link](https://gitorious.org/boostoniphone)
76-
[fork link](https://gitorious.org/boostoniphone/galbraithjosephs-boostoniphone)
77-
78-
79-
Preparing the Casablanca build
80-
------------------------------
81-
82-
Casablanca uses CMake for cross-platform compatibility. To build on iOS, we
83-
specifically use the toolchain file provided by the ios-cmake project.
84-
85-
$ hg clone https://code.google.com/p/ios-cmake/
86-
87-
This completes the preparation for building Casablanca.
88-
89-
[project link](http://code.google.com/p/ios-cmake/)
90-
[source link](http://ios-cmake.googlecode.com/files/ios-cmake.tar.gz)
91-
92-
93-
Building Casablanca
94-
-------------------
95-
96-
Now we are ready to build Casablanca for iOS. Invoke the ios-buildscripts
97-
subproject in the usual CMake fashion:
98-
99-
$ mkdir build.ios
100-
$ pushd build.ios
101-
$ cmake .. -DCMAKE_BUILD_TYPE=Release
102-
$ make
103-
$ popd
104-
105-
This will take a while and produce universal static libraries inside
106-
the 'build.ios' directory.
107-
108-
109-
Using Casablanca
110-
----------------
111-
You will need to link against the following from your project:
112-
113-
* build.ios/libcpprest.a
114-
* boost.framework
115-
* openssl/lib/libcrypto.a
116-
* openssl/lib/libssl.a
117-
* libiconv.dylib
118-
119-
You will also need to add the following paths as additional include directories:
120-
121-
* ../Release/include
122-
* boost.framework/Headers
123-
* openssl/include
124-
125-
This should allow you to reference and use casablanca from your C++ and
126-
Objective-C++ source files. Note: you should change all .m files in your project
127-
to .mm files, because even if the source file itself does not use Casablanca, it
128-
is possible that some c++ code will be pulled in via header includes. To avoid
129-
trivial errors later, it is easiest to simply rename all your project sources to
130-
use '.mm'.
3+
[](https://casablanca.codeplex.com/wikipage?title=Setup%20and%20Build%20on%20IOS)

Build_iOS/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mv OpenSSL-for-iPhone/include openssl
1010
mv OpenSSL-for-iPhone/lib openssl
1111
git clone https://git.gitorious.org/boostoniphone/galbraithjosephs-boostoniphone.git boostoniphone
1212
pushd boostoniphone
13-
sed -e 's/\${BOOST_LIBS:=".*"}/\${BOOST_LIBS:="thread filesystem regex locale system"}/g' -i .bak boost.sh
13+
sed -e 's/\${BOOST_LIBS:=".*"}/\${BOOST_LIBS:="random thread filesystem regex locale system"}/g' -i .bak boost.sh
1414
./boost.sh
1515
pushd ios/framework/boost.framework/Versions/A
1616
mkdir Headers2

Release/include/compat/apple_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ typedef struct _SYSTEMTIME {
8484

8585
#define YieldProcessor() __asm__ __volatile__ ("pause")
8686

87-
#define UNREFERENCED_PARAMETER(x) (void)x
87+
#define CASABLANCA_UNREFERENCED_PARAMETER(x) (void)x
8888
#define _ASSERTE(x) assert(x)
8989

9090
#ifdef CASABLANCA_DEPRECATION_NO_WARNINGS

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

0 commit comments

Comments
 (0)