mirror of
https://github.com/LinoSchmidt/StickExporterTX.git
synced 2026-03-21 01:51:15 +01:00
Fixed icon paths after build
This commit is contained in:
@@ -34,7 +34,9 @@
|
||||
],
|
||||
"extraResources": [
|
||||
"dependencies/template.blend",
|
||||
"dependencies/blenderScript.py"
|
||||
"dependencies/blenderScript.py",
|
||||
"assets/icon.png",
|
||||
"assets/render_finished_icon.png"
|
||||
],
|
||||
"win": {
|
||||
"icon": "assets/icon.png",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { blenderPath, blenderScriptPath, dataPath, templatePath } from "./paths";
|
||||
import { blenderPath, blenderScriptPath, dataPath, templatePath, finsishedIconPath } from "./paths";
|
||||
import {spawn} from "child_process";
|
||||
import logger from "./logger";
|
||||
import { setBlenderLoading, setBlenderStatus } from "./ui/menu";
|
||||
@@ -120,7 +120,7 @@ function startBlender() {
|
||||
// TODO: only show notification if not in do not disturb mode, currently not working. Details: https://github.com/felixrieseberg/macos-notification-state/issues/30
|
||||
new Notification("Render Finished", {
|
||||
body: "Rendering finished successfully!",
|
||||
icon: "../assets/render_finished_icon.png"
|
||||
icon: finsishedIconPath
|
||||
}).onclick = function() {
|
||||
ipcRenderer.send("openApp");
|
||||
}
|
||||
|
||||
@@ -19,3 +19,5 @@ export function platformCharacter() {
|
||||
export const blenderPath = path.join(appPath, "dependencies", platformFolder, "blender", "blender");
|
||||
export const templatePath = path.join(appPath, "dependencies", "template.blend");
|
||||
export const blenderScriptPath = path.join(appPath, "dependencies", "blenderScript.py");
|
||||
|
||||
export const finsishedIconPath = path.join(appPath, "assets", "render_finished_icon.png");
|
||||
@@ -9,6 +9,9 @@ logger.transports.console.format = "{h}:{i}:{s} {text}";
|
||||
logger.transports.file.getFile();
|
||||
logger.transports.file.resolvePath = () => path.join(app.getPath('userData'), "logs", "start.log");
|
||||
|
||||
const appIconPath = path.join(app.getAppPath().replace("app.asar", ""), "assets", "icon.png");
|
||||
const finsishedIconPath = path.join(app.getAppPath().replace("app.asar", ""), "assets", "render_finished_icon.png");
|
||||
|
||||
autoUpdater.autoDownload = false;
|
||||
|
||||
autoUpdater.checkForUpdatesAndNotify();
|
||||
@@ -116,7 +119,7 @@ const createWindow = () => {
|
||||
const progress = parseFloat(arg);
|
||||
mainWindow.setProgressBar(progress);
|
||||
if(progress === 1 && !mainWindow.isFocused()) {
|
||||
mainWindow.setOverlayIcon(path.join(__dirname, '../assets/render_finished_icon.png') as unknown as NativeImage, 'Rendering Complete');
|
||||
mainWindow.setOverlayIcon(finsishedIconPath as unknown as NativeImage, 'Rendering Complete');
|
||||
mainWindow.flashFrame(true);
|
||||
}
|
||||
});
|
||||
@@ -134,7 +137,7 @@ const createWindow = () => {
|
||||
mainWindow.show();
|
||||
});
|
||||
|
||||
mainWindow.setIcon(path.join(__dirname, '../assets/icon.png'));
|
||||
mainWindow.setIcon(appIconPath);
|
||||
};
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
|
||||
Reference in New Issue
Block a user