1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-02-20 04:31:21 +01:00

Fix #305 Disable Auto-Updates

This commit is contained in:
Feenix 2023-06-04 13:22:18 +05:30
parent 64065e875f
commit 00b6402ab5
4 changed files with 39 additions and 27 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 KiB

BIN
electron/build/icon.icns Normal file → Executable file

Binary file not shown.

View File

@ -461,8 +461,6 @@ ipcMain.on(commands.DOUBLE_UPSCAYL, async (event, payload) => {
logit logit
); );
childProcesses.push(upscayl2); childProcesses.push(upscayl2);
upscayl2.process.stderr.on("data", onData2); upscayl2.process.stderr.on("data", onData2);
@ -524,16 +522,19 @@ ipcMain.on(commands.UPSCAYL, async (event, payload) => {
logit logit
); );
console.log("BRUH: " + getSingleImageArguments( console.log(
inputDir, "BRUH: " +
fullfileName, getSingleImageArguments(
outFile, inputDir,
isDefaultModel ? modelsPath : customModelsFolderPath ?? modelsPath, fullfileName,
model, outFile,
scale, isDefaultModel ? modelsPath : customModelsFolderPath ?? modelsPath,
gpuId, model,
saveImageAs scale,
)) gpuId,
saveImageAs
)
);
childProcesses.push(upscayl); childProcesses.push(upscayl);
stopped = false; stopped = false;
@ -651,24 +652,31 @@ ipcMain.on(commands.FOLDER_UPSCAYL, async (event, payload) => {
}); });
//------------------------Auto-Update Code-----------------------------// //------------------------Auto-Update Code-----------------------------//
autoUpdater.autoInstallOnAppQuit = false;
// ! AUTO UPDATE STUFF // ! AUTO UPDATE STUFF
autoUpdater.on("update-available", ({ releaseNotes, releaseName }) => { // autoUpdater.on("update-available", ({ version, releaseNotes, releaseName }) => {
const dialogOpts = { // autoUpdater.autoInstallOnAppQuit = false;
type: "info", // const dialogOpts = {
buttons: ["Ok cool"], // type: "info",
title: "New Upscayl Update", // buttons: ["Sweet!"],
message: releaseName as string, // title: "New Upscayl Update!",
detail: // message: releaseName as string,
"A new version is being downloaded. Please check GitHub for more details.", // detail: `Upscayl ${version} is available! It is being downloaded in the background. Please check GitHub for more details.`,
}; // };
logit("📲 Update Available", releaseName, releaseNotes); // logit("📲 Update Available", releaseName, releaseNotes);
dialog.showMessageBox(dialogOpts).then((returnValue) => {}); // dialog.showMessageBox(dialogOpts).then((returnValue) => {
}); // if (returnValue.response === 0) {
// logit("📲 Update Downloading");
// }
// });
// });
autoUpdater.on("update-downloaded", (event) => { autoUpdater.on("update-downloaded", (event) => {
autoUpdater.autoInstallOnAppQuit = false;
const dialogOpts: MessageBoxOptions = { const dialogOpts: MessageBoxOptions = {
type: "info", type: "info",
buttons: ["Restart", "Later"], buttons: ["Install update", "No Thanks"],
title: "New Upscayl Update", title: "New Upscayl Update",
message: event.releaseName as string, message: event.releaseName as string,
detail: detail:
@ -676,7 +684,11 @@ autoUpdater.on("update-downloaded", (event) => {
}; };
logit("✅ Update Downloaded"); logit("✅ Update Downloaded");
dialog.showMessageBox(dialogOpts).then((returnValue) => { dialog.showMessageBox(dialogOpts).then((returnValue) => {
if (returnValue.response === 0) autoUpdater.quitAndInstall(); if (returnValue.response === 0) {
autoUpdater.quitAndInstall();
} else {
logit("🚫 Update Installation Cancelled");
}
}); });
}); });

View File

@ -1,7 +1,7 @@
{ {
"name": "upscayl", "name": "upscayl",
"private": true, "private": true,
"version": "2.5.1", "version": "2.6.0",
"productName": "Upscayl", "productName": "Upscayl",
"homepage": "https://github.com/TGS963/upscayl", "homepage": "https://github.com/TGS963/upscayl",
"contributors": [ "contributors": [