LM (macOS): adds support

This commit is contained in:
Carter Li authored and 李通洲 committed 2026-08-26 17:43:25 +08:00
1 parent 203cd7cbcf
commit c5598d2361
2 files changed
+19 -1

No files matched your search

+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;
}