plugins: incorporate hyprdep ABI into plugin info (#12001)
This commit is contained in:
parent
d560c26419
commit
892f642f58
3 changed files with 46 additions and 3 deletions
|
|
@ -17,7 +17,18 @@
|
|||
#include <sstream>
|
||||
|
||||
APICALL const char* __hyprland_api_get_hash() {
|
||||
return GIT_COMMIT_HASH;
|
||||
static auto stripPatch = [](const char* ver) -> std::string {
|
||||
std::string_view v = ver;
|
||||
if (!v.contains('.'))
|
||||
return std::string{v};
|
||||
|
||||
return std::string{v.substr(0, v.find_last_of('.'))};
|
||||
};
|
||||
|
||||
static const std::string ver = (std::string{GIT_COMMIT_HASH} + "_aq_" + stripPatch(AQUAMARINE_VERSION) + "_hu_" + stripPatch(HYPRUTILS_VERSION) + "_hg_" +
|
||||
stripPatch(HYPRGRAPHICS_VERSION) + "_hc_" + stripPatch(HYPRCURSOR_VERSION) + "_hlg_" + stripPatch(HYPRLANG_VERSION));
|
||||
|
||||
return ver.c_str();
|
||||
}
|
||||
|
||||
APICALL SP<HOOK_CALLBACK_FN> HyprlandAPI::registerCallbackDynamic(HANDLE handle, const std::string& event, HOOK_CALLBACK_FN fn) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue