fix(backend): align colprof struct, args and process ID with frontend (v0.1.11) #64
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "iccery",
|
"name": "iccery",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.10",
|
"version": "0.1.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"tauri": "tauri"
|
"tauri": "tauri"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "iccery"
|
name = "iccery"
|
||||||
version = "0.1.10"
|
version = "0.1.11"
|
||||||
description = "A Tauri App"
|
description = "A Tauri App"
|
||||||
authors = ["you"]
|
authors = ["you"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|||||||
@@ -276,9 +276,8 @@ pub struct ColprofConfig {
|
|||||||
pub intent: Option<String>,
|
pub intent: Option<String>,
|
||||||
pub copyright: Option<String>,
|
pub copyright: Option<String>,
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
|
pub basename: String,
|
||||||
pub cwd: String,
|
pub cwd: String,
|
||||||
pub ti3_path: String,
|
|
||||||
pub icc_path: String,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build_colprof_args(config: &ColprofConfig) -> Vec<String> {
|
pub fn build_colprof_args(config: &ColprofConfig) -> Vec<String> {
|
||||||
@@ -311,8 +310,7 @@ pub fn build_colprof_args(config: &ColprofConfig) -> Vec<String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
args.push(config.ti3_path.clone());
|
args.push(config.basename.clone());
|
||||||
args.push(config.icc_path.clone());
|
|
||||||
args
|
args
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +322,7 @@ pub async fn run_colprof(
|
|||||||
) -> Result<(), String> {
|
) -> Result<(), String> {
|
||||||
let binary = resolve_binary(app.clone(), "colprof".to_string()).await?;
|
let binary = resolve_binary(app.clone(), "colprof".to_string()).await?;
|
||||||
let args = build_colprof_args(&config);
|
let args = build_colprof_args(&config);
|
||||||
let id = format!("colprof_{}", config.icc_path);
|
let id = format!("colprof_{}", config.basename);
|
||||||
|
|
||||||
let cwd = if config.cwd.trim().is_empty() {
|
let cwd = if config.cwd.trim().is_empty() {
|
||||||
None
|
None
|
||||||
@@ -631,14 +629,13 @@ mod tests {
|
|||||||
intent: None,
|
intent: None,
|
||||||
description: Some("My Profile".to_string()),
|
description: Some("My Profile".to_string()),
|
||||||
copyright: Some("2026 ACME".to_string()),
|
copyright: Some("2026 ACME".to_string()),
|
||||||
ti3_path: "my_profile.ti3".to_string(),
|
basename: "my_profile".to_string(),
|
||||||
icc_path: "my_profile.icc".to_string(),
|
|
||||||
cwd: "/home/user".to_string(),
|
cwd: "/home/user".to_string(),
|
||||||
};
|
};
|
||||||
let args = build_colprof_args(&config);
|
let args = build_colprof_args(&config);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
args,
|
args,
|
||||||
vec!["-v", "-a", "l", "-q", "h", "-C", "2026 ACME", "-D", "My Profile", "my_profile.ti3", "my_profile.icc"]
|
vec!["-v", "-a", "l", "-q", "h", "-C", "2026 ACME", "-D", "My Profile", "my_profile"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "ICCery",
|
"productName": "ICCery",
|
||||||
"version": "0.1.10",
|
"version": "0.1.11",
|
||||||
"identifier": "com.gronod.iccery",
|
"identifier": "com.gronod.iccery",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../src"
|
"frontendDist": "../src"
|
||||||
|
|||||||
Reference in New Issue
Block a user