mirror of https://github.com/procxx/kepka.git
Allow to forward custom API tokens for Kepka.
You can obtain your tokens from https://core.telegram.org/api/obtaining_api_id. Export API_ID and API_TOKEN environment options with your tokens before running Cmake to use them. Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
parent
d0de5d31e6
commit
e49340e867
|
@ -7,6 +7,18 @@ if (LINUX)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
##================================================
|
||||||
|
## API tokens
|
||||||
|
##================================================
|
||||||
|
if (DEFINED ENV{API_ID} AND DEFINED ENV{API_HASH})
|
||||||
|
set(API_ID ENV{API_ID})
|
||||||
|
set(API_HASH ENV{API_HASH})
|
||||||
|
else()
|
||||||
|
message(WARNING "No custom API tokens detected. You must grab your own tokens from https://core.telegram.org/api/obtaining_api_id and export them using environment options. Will use default for testing purposes.")
|
||||||
|
set(API_ID 17349)
|
||||||
|
set(API_HASH "344583e45741c457fe1862106095a5eb")
|
||||||
|
endif()
|
||||||
|
|
||||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -H")
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -H")
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
##================================================
|
##================================================
|
||||||
|
|
|
@ -206,12 +206,8 @@ w/CVnbwQOw0g5GBwwFV3r0uTTvy44xx8XXxk+Qknu4eBCsmrAFNnAgMBAAE=\n\
|
||||||
-----END RSA PUBLIC KEY-----\
|
-----END RSA PUBLIC KEY-----\
|
||||||
";
|
";
|
||||||
|
|
||||||
#ifdef CUSTOM_API_ID
|
constexpr auto ApiId = @API_ID@;
|
||||||
#include "../../../TelegramPrivate/custom_api_id.h" // Custom API id and API hash
|
constexpr auto ApiHash = "@API_HASH@";
|
||||||
#else
|
|
||||||
static const qint32 ApiId = 17349;
|
|
||||||
static const char *ApiHash = "344583e45741c457fe1862106095a5eb";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
#warning "Big endian support in Kepka is experimental. Proceed with caution!"
|
#warning "Big endian support in Kepka is experimental. Proceed with caution!"
|
||||||
|
|
Loading…
Reference in New Issue