yapb-noob-edition/inc/product.h

47 lines
1.3 KiB
C
Raw Normal View History

2020-06-12 18:52:38 +03:00
//
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
2022-01-04 00:23:19 +03:00
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
2020-06-12 18:52:38 +03:00
//
// SPDX-License-Identifier: MIT
2020-06-12 18:52:38 +03:00
//
#pragma once
#ifdef VERSION_GENERATED
# define VERSION_HEADER <version.build.h>
#else
# define VERSION_HEADER <version.h>
#endif
#include VERSION_HEADER
// simple class for bot internal information
class Product final : public Singleton <Product> {
public:
struct Build {
StringRef hash { MODULE_BUILD_HASH };
StringRef author { MODULE_BUILD_AUTHOR };
StringRef count { MODULE_BUILD_COUNT };
StringRef machine { MODULE_BUILD_MACHINE };
StringRef compiler { MODULE_BUILD_COMPILER };
StringRef id { MODULE_BOT_BUILD_ID };
2020-06-12 18:52:38 +03:00
} build { };
public:
StringRef name { "YaPB" };
StringRef year { &__DATE__[7] };
StringRef author { "YaPB Project" };
StringRef email { "yapb@jeefo.net" };
StringRef url { "https://yapb.jeefo.net/" };
StringRef download { "yapb.jeefo.net" };
StringRef folder { "yapb" };
StringRef logtag { "YB" };
StringRef dtime { __DATE__ " " __TIME__ };
StringRef date { __DATE__ };
StringRef version { MODULE_BOT_VERSION "." MODULE_BUILD_COUNT };
StringRef cmdPri { "yb" };
StringRef cmdSec { "yapb" };
2020-06-12 18:52:38 +03:00
};
// expose product info
CR_EXPOSE_GLOBAL_SINGLETON (Product, product);