LM (macOS): adds support

This commit is contained in:
Carter Li
2026-08-26 15:21:04 +08:00
committed by 李通洲
parent 203cd7cbcf
commit c5598d2361
2 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -1050,7 +1050,7 @@ elseif(APPLE)
src/detection/icons/icons_nosupport.c
src/detection/initsystem/initsystem_linux.c
src/detection/keyboard/keyboard_apple.c
src/detection/lm/lm_nosupport.c
src/detection/lm/lm_apple.m
src/detection/loadavg/loadavg_bsd.c
src/detection/libc/libc_apple.c
src/detection/locale/locale_linux.c
+18
View File
@@ -0,0 +1,18 @@
#include "lm.h"
#import <Foundation/Foundation.h>
const char* ffDetectLM(FFLMResult* result) {
ffStrbufSetStatic(&result->service, "loginwindow");
ffStrbufSetStatic(&result->prettyName, "Login Window");
NSError* error;
NSDictionary* dict = [NSDictionary dictionaryWithContentsOfURL:[NSURL fileURLWithPath:@"/System/Library/CoreServices/loginwindow.app/Contents/Info.plist" isDirectory:NO]
error:&error];
if (dict) {
ffStrbufSetS(&result->version, ((NSString*) dict[@"CFBundleShortVersionString"]).UTF8String);
}
return nullptr;
}