mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 17:41:41 +01:00
MSYS2: remove support
MSYS2 version was built for smooth transition from POSIX api to Win32 api. It has almost identical output as Windows native version, except requiring msys runtime dll and being a bit slower.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#ifndef FF_INCLUDED_detection_cpu_cpuUsage
|
||||
#define FF_INCLUDED_detection_cpu_cpuUsage
|
||||
|
||||
#if defined(_WIN32) || defined(__MSYS__)
|
||||
#ifdef _WIN32
|
||||
// Disabled by default because the result does need some time to generate
|
||||
#define FF_DETECTION_CPUUSAGE_NOWAIT 0
|
||||
#endif
|
||||
|
||||
@@ -59,11 +59,7 @@ void ffDetectOSImpl(FFOSResult* os, const FFinstance* instance)
|
||||
ffStrbufClear(&os->variant);
|
||||
}
|
||||
|
||||
#ifdef __MSYS__
|
||||
ffStrbufAppendS(&os->id, "MSYS2");
|
||||
#else
|
||||
ffStrbufAppendF(&os->id, "Windows %*s", os->version.length, os->version.chars);
|
||||
#endif
|
||||
ffStrbufAppendF(&os->id, "Windows %*s", os->version.length, os->version.chars);
|
||||
|
||||
ffGetWmiObjString(pclsObj, L"BuildNumber", &os->buildID);
|
||||
ffGetWmiObjString(pclsObj, L"OSArchitecture", &os->architecture);
|
||||
|
||||
@@ -64,7 +64,7 @@ static void detectTTY(FFTerminalFontResult* terminalFont)
|
||||
ffStrbufDestroy(&fontName);
|
||||
}
|
||||
|
||||
#if defined(_WIN32) || defined(__MSYS__) || defined(__linux__)
|
||||
#if defined(_WIN32) || defined(__linux__)
|
||||
#ifdef FF_HAVE_LIBCJSON
|
||||
|
||||
#include "common/library.h"
|
||||
@@ -241,7 +241,7 @@ static void detectFromWindowsTeriminal(const FFinstance* instance, FFTerminalFon
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif //defined(_WIN32) || defined(__MSYS__) || defined(__linux__)
|
||||
#endif //defined(_WIN32) || defined(__linux__)
|
||||
|
||||
void ffDetectTerminalFontPlatform(const FFinstance* instance, const FFTerminalShellResult* terminalShell, FFTerminalFontResult* terminalFont);
|
||||
|
||||
@@ -259,7 +259,7 @@ const FFTerminalFontResult* ffDetectTerminalFont(const FFinstance* instance)
|
||||
else if(ffStrbufStartsWithIgnCaseS(&terminalShell->terminalExe, "/dev/tty"))
|
||||
detectTTY(&result);
|
||||
|
||||
#if defined(_WIN32) || defined(__MSYS__) || defined(__linux__)
|
||||
#if defined(_WIN32) || defined(__linux__)
|
||||
//Used by both Linux (WSL) and Windows
|
||||
else if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "Windows Terminal") == 0 ||
|
||||
ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "WindowsTerminal.exe") == 0)
|
||||
|
||||
@@ -28,7 +28,7 @@ static void getProcessInformation(pid_t pid, FFstrbuf* processName, FFstrbuf* ex
|
||||
assert(processName->length > 0);
|
||||
ffStrbufClear(exe);
|
||||
|
||||
#if defined(__linux__) || defined(__MSYS__)
|
||||
#ifdef __linux__
|
||||
|
||||
char cmdlineFilePath[64];
|
||||
snprintf(cmdlineFilePath, sizeof(cmdlineFilePath), "/proc/%d/cmdline", (int)pid);
|
||||
@@ -61,7 +61,7 @@ static const char* getProcessNameAndPpid(pid_t pid, char* name, pid_t* ppid)
|
||||
{
|
||||
const char* error = NULL;
|
||||
|
||||
#if defined(__linux__) || defined(__MSYS__)
|
||||
#ifdef __linux__
|
||||
|
||||
char statFilePath[64];
|
||||
snprintf(statFilePath, sizeof(statFilePath), "/proc/%d/stat", (int)pid);
|
||||
|
||||
Reference in New Issue
Block a user