hyprpm: check for abi strings in headersValid (#12504)
--------- Co-authored-by: Virt <41426325+VirtCode@users.noreply.github.com>
This commit is contained in:
parent
d9657a95cb
commit
9cd070fd31
8 changed files with 51 additions and 43 deletions
|
|
@ -1063,6 +1063,9 @@ std::string versionRequest(eHyprCtlOutputFormat format, std::string request) {
|
|||
result += "\n";
|
||||
result += getBuiltSystemLibraryNames();
|
||||
result += "\n";
|
||||
result += "Version ABI string: ";
|
||||
result += __hyprland_api_get_hash();
|
||||
result += "\n";
|
||||
|
||||
#if (!ISDEBUG && !defined(NO_XWAYLAND))
|
||||
result += "no flags were set\n";
|
||||
|
|
@ -1097,10 +1100,12 @@ std::string versionRequest(eHyprCtlOutputFormat format, std::string request) {
|
|||
"systemHyprutils": "{}",
|
||||
"systemHyprcursor": "{}",
|
||||
"systemHyprgraphics": "{}",
|
||||
"abiHash": "{}",
|
||||
"flags": [)#",
|
||||
GIT_BRANCH, GIT_COMMIT_HASH, HYPRLAND_VERSION, (strcmp(GIT_DIRTY, "dirty") == 0 ? "true" : "false"), escapeJSONStrings(commitMsg), GIT_COMMIT_DATE, GIT_TAG,
|
||||
GIT_COMMITS, AQUAMARINE_VERSION, HYPRLANG_VERSION, HYPRUTILS_VERSION, HYPRCURSOR_VERSION, HYPRGRAPHICS_VERSION, getSystemLibraryVersion("aquamarine"),
|
||||
getSystemLibraryVersion("hyprlang"), getSystemLibraryVersion("hyprutils"), getSystemLibraryVersion("hyprcursor"), getSystemLibraryVersion("hyprgraphics"));
|
||||
getSystemLibraryVersion("hyprlang"), getSystemLibraryVersion("hyprutils"), getSystemLibraryVersion("hyprcursor"), getSystemLibraryVersion("hyprgraphics"),
|
||||
__hyprland_api_get_hash());
|
||||
|
||||
#if ISDEBUG
|
||||
result += "\"debug\",";
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ using namespace Hyprutils::Memory;
|
|||
|
||||
static void help() {
|
||||
std::println("usage: Hyprland [arg [...]].\n");
|
||||
std::println(R"(Arguments:
|
||||
std::println(R"#(Arguments:
|
||||
--help -h - Show this message again
|
||||
--config FILE -c FILE - Specify config file to use
|
||||
--socket NAME - Sets the Wayland socket name (for Wayland socket handover)
|
||||
|
|
@ -33,7 +33,8 @@ static void help() {
|
|||
--systeminfo - Prints system infos
|
||||
--i-am-really-stupid - Omits root user privileges check (why would you do that?)
|
||||
--verify-config - Do not run Hyprland, only print if the config has any errors
|
||||
--version -v - Print this binary's version)");
|
||||
--version -v - Print this binary's version
|
||||
--version-json - Print this binary's version as json)#");
|
||||
}
|
||||
|
||||
static void reapZombieChildrenAutomatically() {
|
||||
|
|
@ -142,6 +143,9 @@ int main(int argc, char** argv) {
|
|||
} else if (value == "-v" || value == "--version") {
|
||||
std::println("{}", versionRequest(eHyprCtlOutputFormat::FORMAT_NORMAL, ""));
|
||||
return 0;
|
||||
} else if (value == "--version-json") {
|
||||
std::println("{}", versionRequest(eHyprCtlOutputFormat::FORMAT_JSON, ""));
|
||||
return 0;
|
||||
} else if (value == "--systeminfo") {
|
||||
std::println("{}", systemInfoRequest(eHyprCtlOutputFormat::FORMAT_NORMAL, ""));
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue