#[cfg(target_os = "macos")]
pub fn set() {
use objc2::{AllocAnyThread, MainThreadMarker};
use objc2_app_kit::{NSApplication, NSImage};
use objc2_foundation::NSData;
let Some(mtm) = MainThreadMarker::new() else {
return;
};
let data = NSData::with_bytes(include_bytes!("../icon.png"));
if let Some(image) = NSImage::initWithData(NSImage::alloc(), &data) {
unsafe { NSApplication::sharedApplication(mtm).setApplicationIconImage(Some(&image)) };
}
}
#[cfg(not(target_os = "macos"))]
pub fn set() {}