Skip to content

Commit 21c5ba3

Browse files
committed
fix: try load from frameworks folder in mac
1 parent 7c77bc6 commit 21c5ba3

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

standalone/src-tauri/src/db.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,24 @@ fn resolve_extension_path(app_handle: &AppHandle) -> Option<PathBuf> {
158158
"SQLite extension not found in resources at {}",
159159
resource_path.display()
160160
);
161+
162+
#[cfg(target_os = "macos")]
163+
{
164+
let frameworks_path = resource_dir
165+
.parent()
166+
.map(|contents_dir| contents_dir.join("Frameworks").join(&lib_name));
167+
if let Some(path) = frameworks_path {
168+
log::debug!("Checking Frameworks SQLite extension at {}", path.display());
169+
if path.exists() {
170+
log::info!("Using Frameworks SQLite extension at {}", path.display());
171+
return Some(path);
172+
}
173+
log::warn!(
174+
"SQLite extension not found in Frameworks at {}",
175+
path.display()
176+
);
177+
}
178+
}
161179
}
162180
Err(err) => log::warn!("Failed to resolve resource directory: {}", err),
163181
}

standalone/src-tauri/tauri.conf.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@
3434
"icons/logo-1024x1024.png",
3535
"icons/icon.icns",
3636
"icons/icon.ico"
37-
]
37+
],
38+
"macOS": {
39+
"frameworks": [
40+
"./resources/libabsurd.dylib"
41+
]
42+
}
3843
},
3944
"plugins": {
4045
"cli": {

0 commit comments

Comments
 (0)