mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 19:47:43 +01:00
refactor: index iOS apps and macOS apps that store icon in Assets.car (#872)
Bumps the 'applications' crate to include this commit[1]. With this,
Coco now indexes iOS apps and macOS apps that store icon in Assets.car.
[1]: 814b16ea84
This commit is contained in:
@@ -36,6 +36,7 @@ Information about release notes of Coco App is provided here.
|
|||||||
- refactor: pinning window won't set CanJoinAllSpaces on macOS #854
|
- refactor: pinning window won't set CanJoinAllSpaces on macOS #854
|
||||||
- build: web component build error #858
|
- build: web component build error #858
|
||||||
- refactor: coordinate third-party extension operations using lock #867
|
- refactor: coordinate third-party extension operations using lock #867
|
||||||
|
- refactor: index iOS apps and macOS apps that store icon in Assets.car #872
|
||||||
|
|
||||||
## 0.7.1 (2025-07-27)
|
## 0.7.1 (2025-07-27)
|
||||||
|
|
||||||
|
|||||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -128,7 +128,7 @@ checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "applications"
|
name = "applications"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
source = "git+https://github.com/infinilabs/applications-rs?rev=31b0c030a0f3bc82275fe12debe526153978671d#31b0c030a0f3bc82275fe12debe526153978671d"
|
source = "git+https://github.com/infinilabs/applications-rs?rev=814b16ea84fc0c5aa432fc094dfd9aceb83f7e46#814b16ea84fc0c5aa432fc094dfd9aceb83f7e46"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"core-foundation 0.9.4",
|
"core-foundation 0.9.4",
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ tauri-plugin-drag = "2"
|
|||||||
tauri-plugin-macos-permissions = "2"
|
tauri-plugin-macos-permissions = "2"
|
||||||
tauri-plugin-fs-pro = "2"
|
tauri-plugin-fs-pro = "2"
|
||||||
tauri-plugin-screenshots = "2"
|
tauri-plugin-screenshots = "2"
|
||||||
applications = { git = "https://github.com/infinilabs/applications-rs", rev = "31b0c030a0f3bc82275fe12debe526153978671d" }
|
applications = { git = "https://github.com/infinilabs/applications-rs", rev = "814b16ea84fc0c5aa432fc094dfd9aceb83f7e46" }
|
||||||
tokio-native-tls = "0.3" # For wss connections
|
tokio-native-tls = "0.3" # For wss connections
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
tokio-tungstenite = { version = "0.20", features = ["native-tls"] }
|
tokio-tungstenite = { version = "0.20", features = ["native-tls"] }
|
||||||
|
|||||||
@@ -58,37 +58,18 @@ const INDEX_DIR: &str = "local_application_index";
|
|||||||
pub(crate) const QUERYSOURCE_ID_DATASOURCE_ID_DATASOURCE_NAME: &str = "Applications";
|
pub(crate) const QUERYSOURCE_ID_DATASOURCE_ID_DATASOURCE_NAME: &str = "Applications";
|
||||||
|
|
||||||
pub fn get_default_search_paths() -> Vec<String> {
|
pub fn get_default_search_paths() -> Vec<String> {
|
||||||
#[cfg(target_os = "macos")]
|
let paths = applications::get_default_search_paths();
|
||||||
{
|
let mut ret = Vec::with_capacity(paths.len());
|
||||||
let home_dir =
|
for search_path in paths {
|
||||||
PathBuf::from(std::env::var_os("HOME").expect("environment variable $HOME not found"));
|
let path_string = search_path
|
||||||
return vec![
|
.into_os_string()
|
||||||
"/Applications".into(),
|
.into_string()
|
||||||
"/System/Applications".into(),
|
.expect("path should be UTF-8 encoded");
|
||||||
"/System/Library/CoreServices".into(),
|
|
||||||
home_dir
|
ret.push(path_string);
|
||||||
.join("Applications")
|
|
||||||
.into_os_string()
|
|
||||||
.into_string()
|
|
||||||
.expect("this path should be UTF-8 encoded"),
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(target_os = "macos"))]
|
ret
|
||||||
{
|
|
||||||
let paths = applications::get_default_search_paths();
|
|
||||||
let mut ret = Vec::with_capacity(paths.len());
|
|
||||||
for search_path in paths {
|
|
||||||
let path_string = search_path
|
|
||||||
.into_os_string()
|
|
||||||
.into_string()
|
|
||||||
.expect("path should be UTF-8 encoded");
|
|
||||||
|
|
||||||
ret.push(path_string);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper function to return `app`'s path.
|
/// Helper function to return `app`'s path.
|
||||||
|
|||||||
Reference in New Issue
Block a user