From f89ef907615a1afb536429c4b9ac52f4931de75a Mon Sep 17 00:00:00 2001 From: divy9881 Date: Wed, 12 Aug 2020 16:02:58 +0530 Subject: [PATCH 1/2] feat: add set-up guide. Signed-off-by: divy9881 --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cce27a1d..a158de99 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Casbin-CPP ==== [![Build Status](https://dev.azure.com/Casbin/casbin/_apis/build/status/casbin.casbin-cpp?branchName=master)](https://dev.azure.com/Casbin/casbin/_build?definitionId=2&branchName=master) +[![Build Status](https://travis-ci.org/casbin/casbin-cpp.svg?branch=master)](https://travis-ci.org/casbin/casbin-cpp) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/casbin/casbin-cpp)](https://github.com/casbin/casbin-cpp/releases/latest) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/casbin/lobby) @@ -12,7 +13,7 @@ Casbin-CPP Operating Systems | Availability status ----------------- | ------------------- Windows (VS C++) | :heavy_check_mark: Available -Linux and MacOS | :wrench: Under-Development +Linux and MacOS | :heavy_check_mark: Available ![casbin Logo](casbin-logo.png) @@ -107,6 +108,27 @@ You can also use the online editor (https://casbin.org/editor/) to write your Ca https://casbin.org/docs/en/tutorials +## Installation and Set-Up + +#### Windows (Microsoft Visual Studio 2019) +- `Clone` the repository in your target client project +- Open the project solution and `build` the solution +- To use the `casbin-cpp` project in your client project add the path to the static library `casbin.lib` file to your client project properties under `VC++ Directories` > `Library Directories` and also add the path of `casbin` directory to your client project properties under `VC++ Directories` > `Include Directories` +- Add the static library file name `casbin.lib` to the properties under `Linker` > `Input` > `Additional Dependencies` + +#### Unix +- `Clone` the repository in your target client project +- Change the current working directory to the `casbin-cpp` directory and build the library through following commands: + ```shell + $ make + $ make library + ``` +- To get rid of intermediate files generated during building of library: + ```shell + $ make clean + ``` +- Now, you can use the file present in `lib` directory, created through `archiver`, as a static library + ## Get started 1. New a Casbin enforcer with a model file and a policy file: From 3ff394bd791e248053a4a487eaa8c7caf8369b98 Mon Sep 17 00:00:00 2001 From: divy9881 Date: Wed, 12 Aug 2020 16:20:27 +0530 Subject: [PATCH 2/2] fix: remove unwanted config files. Signed-off-by: divy9881 --- lgtm.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 lgtm.yml diff --git a/lgtm.yml b/lgtm.yml deleted file mode 100644 index 5768892f..00000000 --- a/lgtm.yml +++ /dev/null @@ -1,10 +0,0 @@ -path_classifiers: - library: - - casbin - test: - - test - docs: - - README.md - - LICENSE.txt -extraction: - cpp: \ No newline at end of file