resources added and win build impl

This commit is contained in:
Robert Nasarek 2022-08-31 11:36:38 +02:00
parent 1d68336a06
commit e4b721115f
8 changed files with 8 additions and 8 deletions

View file

@ -34,7 +34,7 @@
"start": "cross-env NODE_ENV=development webpack serve --hot --host 0.0.0.0 --config=./webpack.dev.config.js --mode development", "start": "cross-env NODE_ENV=development webpack serve --hot --host 0.0.0.0 --config=./webpack.dev.config.js --mode development",
"build": "cross-env NODE_ENV=production webpack --config webpack.build.config.js --mode production", "build": "cross-env NODE_ENV=production webpack --config webpack.build.config.js --mode production",
"package": "npm run build", "package": "npm run build",
"postpackage": "electron-packager ./ --out=./builds --overwrite" "postpackage": "electron-packager ./ --out=./builds --overwrite --platform win32,linux --icon marvin.ico --extra-resource 'resources/files'"
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.10.0", "@emotion/react": "^11.10.0",

View file

@ -1,3 +0,0 @@
{
"rootDir": "/home/rbrt/Schreibtisch/marvin"
}

View file

@ -0,0 +1,3 @@
{
"rootDir": "/home/rbrt/Schreibtisch/marvin/Gm312/leihgabenbegleitblaetter"
}

Binary file not shown.

View file

@ -21,7 +21,7 @@ export async function fillTemplate(log, objectData) {
let documentInfo; let documentInfo;
try { try {
// Load config file. // Load config file.
let ConfigFile = fs.readFileSync('resources/config/config.json') let ConfigFile = fs.readFileSync('resources/files/config/config.json')
configJson = JSON.parse(ConfigFile) configJson = JSON.parse(ConfigFile)
// Choose the template for selected document type. // Choose the template for selected document type.
@ -46,7 +46,7 @@ export async function fillTemplate(log, objectData) {
break; break;
} }
// Read template. // Read template.
const template = fs.readFileSync(path.join('resources/templates/', documentInfo.templateFile)); const template = fs.readFileSync(path.join('resources/files/templates/', documentInfo.templateFile));
// Create report. // Create report.
buffer = await createReport({ buffer = await createReport({

View file

@ -1,5 +1,5 @@
// Config // Config
import configImport from '/resources/config/config.json' import configImport from '/home/rbrt/WebstormProjects/marvin/resources/files/config/config.json'
// Components // Components
import {Log} from "../components/Log"; import {Log} from "../components/Log";
@ -49,7 +49,7 @@ export default function Settings() {
} }
if (rootDirFromWindow) { if (rootDirFromWindow) {
let message; let message;
await writeFile('resources/config/config.json', JSON.stringify(config2Safe, null, 2), (err) => { await writeFile('resources/files/config/config.json', JSON.stringify(config2Safe, null, 2), (err) => {
if (err) { if (err) {
message = err; message = err;
} else { } else {