From 2e6a6072e81a1845e7365e5f2dcd10cc9cb8ff56 Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Thu, 26 Jan 2017 14:31:14 +0300 Subject: Bot compilation instructions in README. Update docs --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index b99953a..a719049 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,20 @@ # tgbot-cpp [![Build Status](https://travis-ci.org/reo7sp/tgbot-cpp.svg?branch=master)](https://travis-ci.org/reo7sp/tgbot-cpp) +[![Docker pull](https://img.shields.io/docker/pulls/reo7sp/tgbot-cpp.svg)](https://hub.docker.com/r/reo7sp/tgbot-cpp/) +[![GitHub contributors](https://img.shields.io/github/contributors/reo7sp/tgbot-cpp.svg)]() + +[![Contact reo7sp](https://img.shields.io/badge/telegram-contact-green.svg)](https://t.me/reo7sp) [![Join the chat at https://gitter.im/reo7sp/tgbot-cpp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/reo7sp/tgbot-cpp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Donate using Yandex.Money](https://i.imgur.com/8Fi2DnS.png)](https://money.yandex.ru/to/410011554060830) + +[![Donate using PayPal](https://img.shields.io/badge/donate-PayPal-brightgreen.svg)](https://paypal.me/reo7sp) +[![Donate using Yandex.Money](https://img.shields.io/badge/donate-Yandex.Money-brightgreen.svg)](https://money.yandex.ru/to/410011554060830) C++ library for Telegram bot API. -Documentation is located [here](http://reo7sp.github.io/tgbot-cpp) +Documentation is located [here](http://reo7sp.github.io/tgbot-cpp). -## Compilation +## Library compilation Firstly you need to install some dependencies such as Boost and build tools such as CMake. On Debian-based distibutives you can do it with these commands: ```sh @@ -23,9 +29,17 @@ make -j4 sudo make install ``` -That's all. All you have to do now is just link compiled library to your project. +## Bot compilation + +### With CMake +[Example CMakeLists.txt](samples/echobot/CMakeLists.txt) + +### Without CMake +```sh +g++ telegram_bot.cpp -o telegram_bot --std=c++11 -I/usr/local/include -lTgBot -lboost_system -lboost_iostreams -lssl -lcrypto -lpthread +``` -If you want, you can also use Docker to build and run your bot. Just set the base image of your's Dockerfile to [reo7sp/tgbot-cpp](https://hub.docker.com/r/reo7sp/tgbot-cpp/). +You can use Docker to build and run your bot. Set the base image of your's Dockerfile to [reo7sp/tgbot-cpp](https://hub.docker.com/r/reo7sp/tgbot-cpp/). ## Samples -- cgit v1.2.3