Fix: Attempt #1 Windows Workflow

This commit is contained in:
Youwes09
2026-03-20 21:07:19 -05:00
parent 7df7191799
commit 57bf9d5fb1
4 changed files with 40 additions and 55 deletions
+3 -1
View File
@@ -14,7 +14,9 @@
{ "name": "suwayomi-server" },
{ "name": "suwayomi-server-aarch64-apple-darwin" },
{ "name": "suwayomi-server-x86_64-apple-darwin" },
{ "name": "javaw" }
{ "name": "javaw", "args": true },
{ "name": "which" },
{ "name": "where" }
]
}
]
+14 -19
View File
@@ -247,25 +247,20 @@ fn resolve_server_binary(
}
// Fall back to PATH — covers Nix, distro packages, and any system install.
{
#[cfg(target_os = "windows")]
let which_cmd = "where";
#[cfg(not(target_os = "windows"))]
let which_cmd = "which";
for name in &["tachidesk-server", "suwayomi-server"] {
if std::process::Command::new(which_cmd)
.arg(name)
.output()
.map(|o| o.status.success())
.unwrap_or(false)
{
return Ok(ServerInvocation {
bin: std::ffi::OsString::from(name),
prefix_args: vec![],
working_dir: None,
});
}
// Windows always hits the early return above so this block is Linux/macOS only.
#[cfg(not(target_os = "windows"))]
for name in &["tachidesk-server", "suwayomi-server"] {
if std::process::Command::new("which")
.arg(name)
.output()
.map(|o| o.status.success())
.unwrap_or(false)
{
return Ok(ServerInvocation {
bin: std::ffi::OsString::from(name),
prefix_args: vec![],
working_dir: None,
});
}
}
+10 -3
View File
@@ -26,7 +26,11 @@
},
"bundle": {
"active": true,
"targets": ["appimage", "nsis", "deb"],
"targets": [
"appimage",
"nsis",
"deb"
],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
@@ -40,11 +44,14 @@
"installerIcon": "icons/icon.ico",
"installMode": "currentUser"
}
}
},
"resources": [
"binaries/suwayomi-bundle/**"
]
},
"plugins": {
"shell": {
"open": true
}
}
}
}