Compare commits

..

No commits in common. "9f3c4d4fa45b0cae58623265b33719a5bc869c55" and "d907553f3e2f189fa9b4da8ee6f6d2811010bdc8" have entirely different histories.

45
main.js
View File

@ -477,31 +477,30 @@ function registerIPCPipes() {
} }
await new Promise((res) => setTimeout(res, 1000)); await new Promise((res) => setTimeout(res, 1000));
} }
if (updateFiles.length > 0) {
mainWindow.webContents.send("ezpplauncher:launchstatus", {
status: "Launching osu! updater to verify updates...",
});
await new Promise((res) => setTimeout(res, 1000));
await new Promise((res) => { mainWindow.webContents.send("ezpplauncher:launchstatus", {
runOsuUpdater(osuPath, async () => { status: "Launching osu! updater to verify...",
await new Promise((res) => setTimeout(res, 500)); });
const terminationThread = setInterval(async () => { await new Promise((res) => setTimeout(res, 1000));
const osuWindowTitle = windowName.getWindowText("osu!.exe");
if (osuWindowTitle.length < 0) { await new Promise((res) => {
return; runOsuUpdater(osuPath, async () => {
} await new Promise((res) => setTimeout(res, 500));
const firstInstance = osuWindowTitle[0]; const terminationThread = setInterval(async () => {
if (firstInstance) { const osuWindowTitle = windowName.getWindowText("osu!.exe");
const processId = firstInstance.processId; if (osuWindowTitle.length < 0) {
await fkill(processId, { force: true, silent: true }); return;
clearInterval(terminationThread); }
res(); const firstInstance = osuWindowTitle[0];
} if (firstInstance) {
}, 500); const processId = firstInstance.processId;
}); await fkill(processId, { force: true, silent: true });
clearInterval(terminationThread);
res();
}
}, 500);
}); });
} });
await new Promise((res) => setTimeout(res, 1000)); await new Promise((res) => setTimeout(res, 1000));