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

Fix macos build and image issue

This commit is contained in:
Nayam Amarshe 2023-10-15 15:07:04 +05:30
parent 788d7c7bd7
commit 80cb58b06c
4 changed files with 12 additions and 7 deletions

View File

@ -103,7 +103,7 @@ const imageUpscayl = async (event, payload) => {
getSingleImageArguments(
inputDir,
fullfileName,
outFile,
outFile.slice(0, -3) + "png",
isDefaultModel ? modelsPath : customModelsFolderPath ?? modelsPath,
model,
initialScale,
@ -164,16 +164,19 @@ const imageUpscayl = async (event, payload) => {
try {
await convertAndScale(
inputDir + slash + fullfileName,
outFile,
outFile.slice(0, -3) + "png",
outFile,
desiredScale,
saveImageAs,
onError
);
// Remove the png file (default) if the saveImageAs is not png
if (saveImageAs !== "png") {
fs.access(outFile.slice(0, -3) + "png", fs.constants.F_OK, (err) => {
if (!err && saveImageAs !== "png") {
logit("🗑 Removing png file");
fs.unlinkSync(outFile.slice(0, -3) + "png");
}
});
mainWindow.setProgressBar(-1);
mainWindow.webContents.send(
COMMAND.UPSCAYL_DONE,

View File

@ -49,6 +49,9 @@ app.on("window-all-closed", () => {
app.quit();
});
// ! ENABLE THIS FOR MACOS APP STORE BUILD
app.commandLine.appendSwitch("in-process-gpu");
ipcMain.on(COMMAND.STOP, stop);
ipcMain.on(COMMAND.OPEN_FOLDER, openFolder);

View File

@ -101,7 +101,6 @@
"type": "distribution",
"category": "public.app-category.photography",
"entitlements": "resources/entitlements.mas.plist",
"entitlementsInherit": "resources/entitlements.mas.inherit.plist",
"provisioningProfile": "embedded.provisionprofile",
"mergeASARs": false,
"icon": "build/icon.icns",

View File

@ -190,7 +190,7 @@ function SettingsTab({
target="_blank">
Read Wiki Guide
</a>
{FLAGS.APP_STORE_BUILD && <DonateButton />}
{!FLAGS.APP_STORE_BUILD && <DonateButton />}
</div>
<LogArea