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:
parent
788d7c7bd7
commit
80cb58b06c
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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",
|
||||
|
@ -190,7 +190,7 @@ function SettingsTab({
|
||||
target="_blank">
|
||||
Read Wiki Guide
|
||||
</a>
|
||||
{FLAGS.APP_STORE_BUILD && <DonateButton />}
|
||||
{!FLAGS.APP_STORE_BUILD && <DonateButton />}
|
||||
</div>
|
||||
|
||||
<LogArea
|
||||
|
Loading…
x
Reference in New Issue
Block a user