mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 01:09:56 -05:00
Fix: MacOS Workflow Flatten Directory
This commit is contained in:
+1
-1
@@ -181,7 +181,7 @@ modules:
|
|||||||
path: .
|
path: .
|
||||||
- type: file
|
- type: file
|
||||||
path: packaging/frontend-dist.tar.gz
|
path: packaging/frontend-dist.tar.gz
|
||||||
sha256: b98f32eab8efa0701977f7e68bf2bb52da7be1dbf9c80887a737800fc05e1637
|
sha256: 739d3d907892d7903dc52bc6a1ecc2af350f21a47f5b199bf47d0c70a9f9ff27
|
||||||
- packaging/cargo-sources.json
|
- packaging/cargo-sources.json
|
||||||
- type: inline
|
- type: inline
|
||||||
dest: src-tauri/.cargo
|
dest: src-tauri/.cargo
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Executable → Regular
+2
-1
@@ -14,7 +14,8 @@ find_bundle() {
|
|||||||
for candidate in \
|
for candidate in \
|
||||||
"${base}/suwayomi-bundle" \
|
"${base}/suwayomi-bundle" \
|
||||||
"${base}/../Resources/suwayomi-bundle" \
|
"${base}/../Resources/suwayomi-bundle" \
|
||||||
"${base}/../Resources/binaries/suwayomi-bundle"
|
"${base}/../Resources/binaries/suwayomi-bundle" \
|
||||||
|
"${base}/../Resources"
|
||||||
do
|
do
|
||||||
if [ -f "${candidate}/Suwayomi-Server.jar" ]; then
|
if [ -f "${candidate}/Suwayomi-Server.jar" ]; then
|
||||||
echo "$candidate"
|
echo "$candidate"
|
||||||
|
|||||||
+30
-10
@@ -274,7 +274,8 @@ fn resolve_server_binary(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(not(target_os = "macos"))]
|
// Windows: use bundled JRE + JAR
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
{
|
{
|
||||||
let bundle_dir = resource_dir.join("binaries").join("suwayomi-bundle");
|
let bundle_dir = resource_dir.join("binaries").join("suwayomi-bundle");
|
||||||
let jar = bundle_dir.join("bin").join("Suwayomi-Server.jar");
|
let jar = bundle_dir.join("bin").join("Suwayomi-Server.jar");
|
||||||
@@ -307,27 +308,46 @@ fn resolve_server_binary(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// macOS: use the arch-specific sidecar shell script registered via externalBin.
|
||||||
|
// Tauri's shell plugin resolves externalBin names relative to Contents/MacOS/,
|
||||||
|
// so we look there directly rather than in resource_dir.
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
|
// Contents/MacOS/ is the parent of resource_dir's parent on macOS:
|
||||||
|
// resource_dir = Moku.app/Contents/Resources
|
||||||
|
// macos_dir = Moku.app/Contents/MacOS
|
||||||
|
let macos_dir = resource_dir
|
||||||
|
.parent() // Contents/
|
||||||
|
.map(|p| p.join("MacOS"))
|
||||||
|
.unwrap_or_else(|| resource_dir.clone());
|
||||||
|
|
||||||
let candidates = [
|
let candidates = [
|
||||||
"suwayomi-server-aarch64-apple-darwin",
|
"suwayomi-server-aarch64-apple-darwin",
|
||||||
"suwayomi-server-x86_64-apple-darwin",
|
"suwayomi-server-x86_64-apple-darwin",
|
||||||
"suwayomi-server",
|
"suwayomi-server",
|
||||||
];
|
];
|
||||||
|
|
||||||
for name in &candidates {
|
for name in &candidates {
|
||||||
let p = resource_dir.join(name);
|
// Check Contents/MacOS/ first (where externalBin sidecars live)
|
||||||
do_log(log, &format!("[resolve] macOS candidate: {:?} exists={}", p, p.exists()));
|
let in_macos = macos_dir.join(name);
|
||||||
if p.exists() {
|
// Also check resource_dir root as a fallback
|
||||||
do_log(log, &format!("[resolve] using macOS candidate: {:?}", p));
|
let in_resources = resource_dir.join(name);
|
||||||
return Ok(ServerInvocation {
|
|
||||||
bin: p.to_string_lossy().into_owned(),
|
for p in &[in_macos, in_resources] {
|
||||||
args: vec![],
|
do_log(log, &format!("[resolve] macOS candidate: {:?} exists={}", p, p.exists()));
|
||||||
working_dir: None,
|
if p.exists() {
|
||||||
});
|
do_log(log, &format!("[resolve] using macOS candidate: {:?}", p));
|
||||||
|
return Ok(ServerInvocation {
|
||||||
|
bin: p.to_string_lossy().into_owned(),
|
||||||
|
args: vec![],
|
||||||
|
working_dir: None,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Linux / PATH fallback for all platforms
|
||||||
do_log(log, "[resolve] trying PATH fallback");
|
do_log(log, "[resolve] trying PATH fallback");
|
||||||
for name in &["suwayomi-server", "tachidesk-server"] {
|
for name in &["suwayomi-server", "tachidesk-server"] {
|
||||||
let found = std::process::Command::new("which")
|
let found = std::process::Command::new("which")
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
"externalBin": [
|
"externalBin": [
|
||||||
"binaries/suwayomi-server"
|
"binaries/suwayomi-server"
|
||||||
],
|
],
|
||||||
"resources": [
|
"resources": {
|
||||||
"binaries/suwayomi-bundle/**/*"
|
"binaries/suwayomi-bundle": "suwayomi-bundle"
|
||||||
],
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"minimumSystemVersion": "11.0",
|
"minimumSystemVersion": "11.0",
|
||||||
"exceptionDomain": "localhost",
|
"exceptionDomain": "localhost",
|
||||||
|
|||||||
Reference in New Issue
Block a user