Better default paths

This commit is contained in:
2022-06-13 19:30:49 +02:00
parent 4546532e68
commit 9628d2029c
4 changed files with 142 additions and 3 deletions

View File

@@ -1,9 +1,12 @@
import path from 'path';
import {app} from '@electron/remote';
import getPath from 'platform-folders';
export const dataPath = app.getPath('userData');
export const SettingPath = path.join(dataPath, "settings.xml");
export const defaultOutputPath = path.join(getPath('videos') || "", "StickExporterTX");
export const blenderPath = path.join("assets", "blender", "blender");
export const templatePath = path.join("assets", "template.blend");
export const blenderScriptPath = path.join("assets", "blenderScript.py");

View File

@@ -1,5 +1,5 @@
import formatXML from "xml-formatter";
import {SettingPath} from './paths';
import {SettingPath, defaultOutputPath} from './paths';
import fs from "fs";
import logger from "./logger";
@@ -12,8 +12,8 @@ const defaultSettings = {
width: 540,
stickDistance: 5,
stickMode2: true,
log: '"None"',
output: "None"
log: '',
output: defaultOutputPath
}
let loadedSuccessfully = true;