Include slightly more future-proof target type in user agent string
This commit is contained in:
parent
1e440d078c
commit
bfe94618c6
@ -31,7 +31,7 @@ const char *const introTextData =
|
||||
"\brThis is a BETA, you cannot save things publicly. If you are planning on publishing any saves, use the release version\n"
|
||||
#endif
|
||||
"\n"
|
||||
"\bt" MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) "." MTOS(BUILD_NUM) " " IDENT_PLATFORM
|
||||
"\bt" MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) "." MTOS(BUILD_NUM) " " IDENT
|
||||
#ifdef SNAPSHOT
|
||||
" SNAPSHOT " MTOS(SNAPSHOT_ID)
|
||||
#elif MOD_ID > 0
|
||||
|
@ -301,6 +301,7 @@ conf_data.set('SNAPSHOT_ID', get_option('snapshot_id'))
|
||||
conf_data.set('SERVER', '"' + get_option('server') + '"')
|
||||
conf_data.set('STATICSERVER', '"' + get_option('static_server') + '"')
|
||||
conf_data.set('IDENT_PLATFORM', '"' + copt_identplatform + '"')
|
||||
conf_data.set('IDENT', '"@0@-@1@-@2@"'.format(copt_architecture, copt_platform, copt_compiler).to_upper())
|
||||
|
||||
if get_option('update_server') != ''
|
||||
conf_data.set('UPDATESERVER', '"' + get_option('update_server') + '"')
|
||||
|
@ -45,7 +45,7 @@ option(
|
||||
'snapshot_id',
|
||||
type: 'integer',
|
||||
min: 0,
|
||||
value: 199,
|
||||
value: 0,
|
||||
description: 'Snapshot ID, only relevant if \'snapshot\' is true'
|
||||
)
|
||||
option(
|
||||
|
@ -31,6 +31,7 @@
|
||||
#mesondefine STATICSERVER
|
||||
#mesondefine UPDATESERVER
|
||||
#mesondefine IDENT_PLATFORM
|
||||
#mesondefine IDENT
|
||||
|
||||
#ifdef WIN
|
||||
# define PATH_SEP "\\"
|
||||
|
@ -46,7 +46,7 @@ namespace http
|
||||
|
||||
proxy = Proxy;
|
||||
|
||||
user_agent = ByteString::Build("PowderToy/", SAVE_VERSION, ".", MINOR_VERSION, " (", IDENT_PLATFORM, "; ", IDENT_BUILD, "; M", MOD_ID, ") TPTPP/", SAVE_VERSION, ".", MINOR_VERSION, ".", BUILD_NUM, IDENT_RELTYPE, ".", SNAPSHOT_ID);
|
||||
user_agent = "PowderToy/" MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) " (" IDENT_PLATFORM "; " IDENT_BUILD "; M" MTOS(MOD_ID) "; " IDENT ") TPTPP/" MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) "." MTOS(BUILD_NUM) IDENT_RELTYPE "." MTOS(SNAPSHOT_ID);
|
||||
|
||||
worker_thread = std::thread([this]() { Worker(); });
|
||||
initialized = true;
|
||||
|
@ -3753,6 +3753,7 @@ void LuaScriptInterface::initPlatformAPI()
|
||||
//Methods
|
||||
struct luaL_Reg platformAPIMethods [] = {
|
||||
{"platform", platform_platform},
|
||||
{"ident", platform_ident},
|
||||
{"build", platform_build},
|
||||
{"releaseType", platform_releaseType},
|
||||
{"exeName", platform_exeName},
|
||||
@ -3775,6 +3776,12 @@ int LuaScriptInterface::platform_platform(lua_State * l)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int LuaScriptInterface::platform_ident(lua_State * l)
|
||||
{
|
||||
lua_pushstring(l, IDENT);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int LuaScriptInterface::platform_build(lua_State * l)
|
||||
{
|
||||
lua_pushstring(l, IDENT_BUILD);
|
||||
|
@ -175,6 +175,7 @@ class LuaScriptInterface: public CommandInterface
|
||||
|
||||
void initPlatformAPI();
|
||||
static int platform_platform(lua_State * l);
|
||||
static int platform_ident(lua_State * l);
|
||||
static int platform_build(lua_State * l);
|
||||
static int platform_releaseType(lua_State * l);
|
||||
static int platform_exeName(lua_State * l);
|
||||
|
Loading…
Reference in New Issue
Block a user