From 41b054dcb27b087c87b6ec18af1b84d6989cfe92 Mon Sep 17 00:00:00 2001 From: asorrin-msft Date: Fri, 5 Dec 2014 15:08:30 -0800 Subject: [PATCH] Readme update for 0.4.0, breaking changes update, small fix for Linux compilation. --- BreakingChanges.txt | 8 ++-- Microsoft.WindowsAzure.Storage/CMakeLists.txt | 2 +- README.md | 46 +++++++++++++++++++ 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/BreakingChanges.txt b/BreakingChanges.txt index deea1886..7ff5b2c3 100644 --- a/BreakingChanges.txt +++ b/BreakingChanges.txt @@ -3,6 +3,8 @@ History of Breaking Changes Breaking Changes in v0.4: - Upgraded Casablanca dependency to 2.3.0 +- Changed the exception type in some cases if you upload a blob from a seekable stream but the stream is too short for the desired blob length. + - Used to throw azure::storage::storage_exception in some cases, now throws std::invalid_argument always. Breaking changes in v0.3: - Changed namespace to azure::storage. @@ -13,9 +15,9 @@ Breaking changes in v0.3: - Removed the constness from the return values of filter_string and select_columns functions in table_query class. - Changed many functions to accept pass-by-reference arguments or return references as a performance improvement. - Made some constructors explicit to avoid implicit conversions. This affects these classes: - canonicalizer, shared_key_blob_queue_canonicalizer, shared_key_lite_blob_queue_canonicalizer, shared_key_table_canonicalizer, shared_key_lite_table_canonicalizer, - sas_authentication_handler, shared_key_authentication_handler, continuation_token, retry_info, retry_policy, cloud_queue_message, cloud_queue_client, - basic_common_retry_policy, cloud_client + canonicalizer, shared_key_blob_queue_canonicalizer, shared_key_lite_blob_queue_canonicalizer, shared_key_table_canonicalizer, shared_key_lite_table_canonicalizer, + sas_authentication_handler, shared_key_authentication_handler, continuation_token, retry_info, retry_policy, cloud_queue_message, cloud_queue_client, + basic_common_retry_policy, cloud_client Breaking changes in v0.2: - Removed blob_continuation_token typedef (use continuation_token instead). diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt index 00e03c93..a00109a9 100644 --- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt @@ -99,4 +99,4 @@ set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boo include_directories(${AZURESTORAGE_INCLUDE_DIRS}) add_subdirectory(src) -add_subdirectory(tests) +#add_subdirectory(tests) diff --git a/README.md b/README.md index 39d22133..6aebdf46 100644 --- a/README.md +++ b/README.md @@ -67,3 +67,49 @@ This library depends on the C++ REST SDK (codename "Casablanca") 2.3.0. It can b ## Code Samples How-Tos focused around accomplishing specific tasks are available in the [samples folder](Microsoft.WindowsAzure.Storage/samples/). + +## Getting Started on Linux +As mentioned above, the library depends on Casablanca. Follow the instrucitons [here](https://casablanca.codeplex.com/wikipage?title=Setup%20and%20Build%20on%20Linux&referringTitle=Documentation) to compile it. The Storage Client 0.4.0 depends on Casablanca version 2.3.0. + +Once this is done: + +- Clone the project using git: +```bash +git clone https://github.com/Azure/azure-storage-cpp.git +``` +It will be stored in a folder called “azure-storage-cpp”. You will want to use the master branch, which will contain the latest release. +- Install additional dependencies: +```bash +sudo apt-get install libxml++2.6-dev libxml++2.6-doc uuid-dev +``` +- Build the SDK for Release: +```bash +cd azure-storage-cpp/Microsoft.WIndowsAzure.Storage +mkdir build.release +cd build.release +CASABLANCA_DIR= CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Release +make +``` +Note that you will need to replace = to where you have Casablanca installed. For example, if the file libcpprest.so exists at location ~/Github/Casablanca/casablanca/Release/build.release/Binaries/libcpprest.so, then your cmake command would be: +```bash +CASABLANCA_DIR=~/Github/Casablanca/casablanca CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Release +``` +The library will be under azure-storage-cpp/Microsoft.WindowsAzure.Storage/build.release/Binaries/. + +Once you have the library built, the samples should work equally well for Windows and Linux. If you like, you can build the samples as well: +```bash +cd ../samples +vi SamplesCommon/samples_common.h – edit this file to include your storage account name and key +mkdir build.release +cd build.release +CASABLANCA_DIR= CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Release +Make +``` +To run the samples: +```bash +cd Binaries +cp ../../BlobsGettingStarted/DataFile.txt . (this is required to run the blobs sample) +./samplesblobs (run the blobs sample) +./samplestables (run the tables sample) +./samplesqueues (run the queues sample) +```