mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-20 23:14:28 +08:00
[🔄 Chore] Prepare for Aikari (2/2)
This commit is contained in:
@@ -218,12 +218,17 @@ const applyAikariIpcHandler = (ipcMain) => {
|
||||
|
||||
const AIKARI_DEFAULT_INSTALL_DIR = path.join(
|
||||
"C:\\Program Files",
|
||||
"HugoAura Aikari"
|
||||
"HugoAura",
|
||||
"Aikari"
|
||||
);
|
||||
const AIKARI_LAUNCHER_PATH = path.join(
|
||||
AIKARI_DEFAULT_INSTALL_DIR,
|
||||
"Aikari-Launcher.exe"
|
||||
);
|
||||
const AIKARI_UNINSTALLER_PATH = path.join(
|
||||
AIKARI_DEFAULT_INSTALL_DIR,
|
||||
"unins000.exe"
|
||||
);
|
||||
const AIKARI_SVC_NAME = "HugoAuraAikari";
|
||||
|
||||
const isAikariDetached = process.argv.includes("--aikari-detach");
|
||||
@@ -502,27 +507,27 @@ const applyAikariIpcHandler = (ipcMain) => {
|
||||
return await functions.execCommand(
|
||||
logHeader,
|
||||
AIKARI_LAUNCHER_PATH,
|
||||
"--startup auto install"
|
||||
"--service install"
|
||||
);
|
||||
case "uninstSvc": {
|
||||
const result = await functions.execCommand(
|
||||
logHeader,
|
||||
AIKARI_LAUNCHER_PATH,
|
||||
"remove"
|
||||
"--service uninstall"
|
||||
);
|
||||
return result;
|
||||
}
|
||||
case "startSvc":
|
||||
return await functions.execCommand(
|
||||
logHeader,
|
||||
AIKARI_LAUNCHER_PATH,
|
||||
"start"
|
||||
"sc.exe",
|
||||
`start ${AIKARI_SVC_NAME}`
|
||||
);
|
||||
case "stopSvc": {
|
||||
const result = await functions.execCommand(
|
||||
logHeader,
|
||||
AIKARI_LAUNCHER_PATH,
|
||||
"stop"
|
||||
"sc.exe",
|
||||
`stop ${AIKARI_SVC_NAME}`
|
||||
);
|
||||
if (result.success && global.__HUGO_AURA__.aikariStats) {
|
||||
global.__HUGO_AURA__.aikariStats.connected = false;
|
||||
@@ -547,7 +552,11 @@ const applyAikariIpcHandler = (ipcMain) => {
|
||||
case "inst":
|
||||
// TODO: Impl Aikari INST
|
||||
case "uninst":
|
||||
// same
|
||||
return await functions.execCommand(
|
||||
logHeader,
|
||||
AIKARI_UNINSTALLER_PATH,
|
||||
""
|
||||
);
|
||||
default:
|
||||
return { success: false, errorObj: new Error("Method not found") };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user