Enhance macOS build configurations and update version to 0.49.18

- Reinstated macOS ARM64 build configurations in the release workflow for improved compatibility.
- Updated the version of the "OpenHuman" package in Cargo.lock to 0.49.18, ensuring consistency across the project.
- Refactored search directory handling in core_process.rs for better clarity and maintainability, particularly for macOS platforms.
- Added conditional compilation for macOS in various files to streamline platform-specific functionality.
This commit is contained in:
Steven Enamakel
2026-03-29 23:59:21 -07:00
parent 4646f11ab1
commit 4dc4970f69
6 changed files with 33 additions and 17 deletions
+8 -8
View File
@@ -209,14 +209,14 @@ jobs:
fail-fast: false
matrix:
settings:
# - platform: macos-latest
# args: --target aarch64-apple-darwin
# target: aarch64-apple-darwin
# artifact_suffix: aarch64-apple-darwin
# - platform: macos-latest
# args: --target x86_64-apple-darwin
# target: x86_64-apple-darwin
# artifact_suffix: x86_64-apple-darwin
- platform: macos-latest
args: --target aarch64-apple-darwin
target: aarch64-apple-darwin
artifact_suffix: aarch64-apple-darwin
- platform: macos-latest
args: --target x86_64-apple-darwin
target: x86_64-apple-darwin
artifact_suffix: x86_64-apple-darwin
- platform: ubuntu-22.04
args: --target x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
+1 -1
View File
@@ -4,7 +4,7 @@ version = 4
[[package]]
name = "OpenHuman"
version = "0.49.17"
version = "0.49.18"
dependencies = [
"anyhow",
"chrono",
+9 -6
View File
@@ -280,13 +280,16 @@ pub fn default_core_bin() -> Option<PathBuf> {
// Sidecar layout: bundle.externalBin("binaries/openhuman") is emitted as
// openhuman-<target-triple>(.exe) under app resources.
let mut search_dirs = vec![exe_dir.to_path_buf()];
#[cfg(target_os = "macos")]
{
if let Some(resources_dir) = exe_dir.parent().map(|p| p.join("Resources")) {
search_dirs.push(resources_dir);
let search_dirs = {
let mut dirs = vec![exe_dir.to_path_buf()];
#[cfg(target_os = "macos")]
{
if let Some(resources_dir) = exe_dir.parent().map(|p| p.join("Resources")) {
dirs.push(resources_dir);
}
}
}
dirs
};
for dir in search_dirs {
let Ok(entries) = std::fs::read_dir(&dir) else {
+2
View File
@@ -4,6 +4,7 @@ use chrono::Utc;
use once_cell::sync::Lazy;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
#[cfg(target_os = "macos")]
use std::sync::Mutex as StdMutex;
#[cfg(target_os = "macos")]
use std::{
@@ -737,6 +738,7 @@ fn sanitize_suggestion(text: &str) -> String {
truncate_tail(&cleaned, MAX_SUGGESTION_CHARS)
}
#[cfg_attr(not(target_os = "macos"), allow(unused_variables))]
fn show_overflow_badge(
kind: &str,
suggestion: Option<&str>,
+9 -2
View File
@@ -1,8 +1,14 @@
use base64::{engine::general_purpose::STANDARD as BASE64_STANDARD, Engine as _};
use chrono::Utc;
#[cfg(target_os = "macos")]
use base64::{engine::general_purpose::STANDARD as BASE64_STANDARD, Engine as _};
#[cfg(target_os = "macos")]
use uuid::Uuid;
use super::context::{AppContext, WindowBounds};
use super::context::AppContext;
#[cfg(target_os = "macos")]
use super::context::WindowBounds;
#[cfg(target_os = "macos")]
use super::limits::MAX_SCREENSHOT_BYTES;
pub(crate) fn now_ms() -> i64 {
@@ -55,6 +61,7 @@ pub(crate) fn capture_screen_image_ref_for_context(
#[cfg(not(target_os = "macos"))]
{
let _ = context;
Err("screen capture is unsupported on this platform".to_string())
}
}
+4
View File
@@ -7,6 +7,10 @@ use std::path::{Path, PathBuf};
use crate::openhuman::config::Config;
#[cfg(any(
target_os = "macos",
not(any(target_os = "macos", target_os = "linux", windows))
))]
use super::common::SERVICE_LABEL;
use super::{ServiceState, ServiceStatus};