[refactor] reorganize platform and wire sources

This commit is contained in:
dijunkun
2026-09-01 01:29:30 +08:00
parent fb0ab4f14e
commit 90184f5251
354 changed files with 2837 additions and 2456 deletions
@@ -0,0 +1,20 @@
#include "platform/daemon_backend.h"
#include <limits.h>
#include <mach-o/dyld.h>
#include <cstdlib>
namespace crossdesk::platform {
bool PrepareDaemon() { return true; }
std::string GetDaemonExecutablePath() {
char path[PATH_MAX] = {};
uint32_t size = sizeof(path);
if (_NSGetExecutablePath(path, &size) != 0) return {};
char resolved[PATH_MAX] = {};
return realpath(path, resolved) ? std::string(resolved) : std::string(path);
}
} // namespace crossdesk::platform