#ifndef WavTool_MacSupport_H #define WavTool_MacSupport_H #ifndef _MSC_VER #ifdef __OBJC__ #import @class AppUpdaterDelegate; #endif #include #include #include class MacSupport { public: MacSupport(std::function && clearTrustStore, std::function && editSearchPaths); void checkForUpdates(); std::string generateOrLoadBridgeKeySeed(std::function && generate); void showStatusItemDropdownMenu(void * item); bool showTrustQuery(); std::function clearTrustStore; std::function editSearchPaths; private: #ifdef __OBJC__ // Expose ObjC type only to updater_sparkle.mm. This allows ARC to properly track its lifetime. AppUpdaterDelegate *_updaterDelegate; #else void *_updaterDelegate; #endif }; // https://developer.apple.com/documentation/apple_silicon/about_the_rosetta_translation_environment inline int processIsTranslated() { int ret = 0; size_t size = sizeof(ret); if (sysctlbyname("sysctl.proctranslated", &ret, &size, NULL, 0) == -1) { if (errno == ENOENT) return 0; return -1; } return ret; } #endif /* _MSC_VER */ #endif /* WavTool_MacSupport_H */