Added multiplatform paths support

This commit is contained in:
2022-06-18 23:23:05 +02:00
parent 92df42bbee
commit 7fc8c2efa2
2 changed files with 11 additions and 10 deletions

View File

@@ -32,7 +32,7 @@
"src/index.build.js",
"src/index.html"
],
"extraFiles": [
"extraResources": [
"dependencies/template.blend",
"dependencies/blenderScript.py"
],
@@ -41,7 +41,7 @@
"target": [
"nsis"
],
"extraFiles": [
"extraResources": [
{
"from": "dependencies/windows/",
"to": "dependencies/windows/",
@@ -64,7 +64,7 @@
"deb",
"rpm"
],
"extraFiles": [
"extraResources": [
{
"from": "dependencies/linux/",
"to": "dependencies/linux/",
@@ -80,7 +80,7 @@
"target": [
"dmg"
],
"extraFiles": [
"extraResources": [
{
"from": "dependencies/darwin/",
"to": "dependencies/darwin/",

View File

@@ -2,6 +2,7 @@ import path from 'path';
import {app} from '@electron/remote';
export const dataPath = app.getPath('userData');
export const appPath = app.getAppPath().replace("app.asar", "");
export const SettingPath = path.join(dataPath, "settings.xml");
export const defaultOutputPath = path.join(app.getPath('videos'), "StickExporterTX");
@@ -15,6 +16,6 @@ if(process.platform === "win32"){
platformFolder = "linux";
}
export const blenderPath = path.join("dependencies", platformFolder, "blender", "blender");
export const templatePath = path.join("dependencies", "template.blend");
export const blenderScriptPath = path.join("dependencies", "blenderScript.py");
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");