Compare commits

..

2 Commits

Author SHA1 Message Date
Youwes09 4b6d0780c9 Fix: Installation Server Kill [V2] 2026-03-27 20:59:22 -05:00
Youwes09 6ef0facb89 Fix: Installation Server Kill -> Overwrite Error 2026-03-27 20:19:36 -05:00
9 changed files with 454 additions and 222 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
pkgname=moku pkgname=moku
pkgver=0.4.0 pkgver=0.5.0
pkgrel=1 pkgrel=1
pkgdesc="Native Linux manga reader frontend for Suwayomi-Server" pkgdesc="Native Linux manga reader frontend for Suwayomi-Server"
arch=('x86_64') arch=('x86_64')
+1 -1
View File
@@ -181,7 +181,7 @@ modules:
path: . path: .
- type: file - type: file
path: packaging/frontend-dist.tar.gz path: packaging/frontend-dist.tar.gz
sha256: cb2f65bad39db8d7411b15383965812fdd02c02697431e4eb3f3f05281eac49d sha256: 3ac5d822ac1840473333510b5e45220298702e6d1435e2cdd4b5c2f7195d764f
- packaging/cargo-sources.json - packaging/cargo-sources.json
- type: inline - type: inline
dest: src-tauri/.cargo dest: src-tauri/.cargo
+1 -1
View File
@@ -18,7 +18,7 @@
perSystem = { system, lib, ... }: perSystem = { system, lib, ... }:
let let
version = "0.4.1"; version = "0.5.0";
pkgs = import inputs.nixpkgs { pkgs = import inputs.nixpkgs {
inherit system; inherit system;
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "moku", "name": "moku",
"version": "0.1.0", "version": "0.5.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
+419 -213
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "moku" name = "moku"
version = "0.4.1" version = "0.5.0"
edition = "2021" edition = "2021"
[lib] [lib]
+24 -1
View File
@@ -121,16 +121,39 @@ fn kill_tachidesk(app: &tauri::AppHandle) {
} }
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
{
use std::os::windows::process::CommandExt;
const CREATE_NO_WINDOW: u32 = 0x08000000;
let _ = std::process::Command::new("taskkill") let _ = std::process::Command::new("taskkill")
.args(["/F", "/FI", "IMAGENAME eq java*"]) .args(["/F", "/FI", "IMAGENAME eq java.exe"])
.creation_flags(CREATE_NO_WINDOW)
.status(); .status();
// Poll until no java.exe remains (up to ~3 s) so the installer can
// overwrite the JRE DLLs without hitting a sharing-violation error.
for _ in 0..30 {
let still_running = std::process::Command::new("tasklist")
.args(["/FI", "IMAGENAME eq java.exe", "/NH"])
.creation_flags(CREATE_NO_WINDOW)
.output()
.map(|o| String::from_utf8_lossy(&o.stdout).contains("java.exe"))
.unwrap_or(false);
if !still_running {
break;
}
std::thread::sleep(std::time::Duration::from_millis(100));
}
}
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
let _ = std::process::Command::new("pkill") let _ = std::process::Command::new("pkill")
.args(["-f", "tachidesk"]) .args(["-f", "tachidesk"])
.status(); .status();
} }
const DEFAULT_SERVER_CONF: &str = r#"server.ip = "127.0.0.1" const DEFAULT_SERVER_CONF: &str = r#"server.ip = "127.0.0.1"
server.port = 4567 server.port = 4567
server.webUIEnabled = false server.webUIEnabled = false
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Moku", "productName": "Moku",
"version": "0.4.1", "version": "0.5.0",
"identifier": "dev.moku.app", "identifier": "dev.moku.app",
"build": { "build": {
"frontendDist": "../dist", "frontendDist": "../dist",
+3
View File
@@ -562,6 +562,9 @@
try { try {
if (IS_WINDOWS) { if (IS_WINDOWS) {
// Kill Suwayomi before installing — its JRE DLLs will be locked otherwise.
// kill_server blocks on the Rust side until java.exe is fully gone.
try { await invoke("kill_server"); } catch {}
// Windows: Tauri updater downloads + runs passive NSIS installer // Windows: Tauri updater downloads + runs passive NSIS installer
await invoke("download_and_install_update"); await invoke("download_and_install_update");
updatePhase = "ready"; updatePhase = "ready";