Fixed relative path for trimspNL binary.

This commit is contained in:
Zaher Salman
2021-06-06 22:33:06 +02:00
parent 7735c3d78d
commit 52bd6ec981
3 changed files with 13 additions and 3 deletions
+7
View File
@@ -54,3 +54,10 @@ function readAsciiFile(filename) {
return(content);
}
function appPath() {
// return the path where the app resides
// let path = require('app').getAppPath();
// console.log(path);
let path = "./";
return path;
}
+4 -2
View File
@@ -994,7 +994,8 @@ function startSequence(All) {
// Use Linux version
Progress=Progress+90/SValues.length;
// Update GUI progress bar
cmd = "cd "+All["workPath"]+";cp "+FILENAME+".inp eingabe1.inp; ./trimspNL"; // Or use $ENV{'TRIMBIN'};
let path = process.env.PWD;
cmd = "cd "+All["workPath"]+";cp "+FILENAME+".inp eingabe1.inp;"+path+"/trimspNL"; // Or use $ENV{'TRIMBIN'};
// document.getElementById("myBar").style.width = Progress + "%";
// document.getElementById("myBar").innerHTML = Progress + "%";
// Execute command
@@ -1044,7 +1045,8 @@ function startSequence(All) {
writeAsciiFile(FILENAME+".inp", eingabe1);
Progress=20;
// Update progress on GUI
cmd = "cd "+All["workPath"]+";cp "+FILENAME+".inp eingabe1.inp; ./trimspNL"; // Or use $ENV{'TRIMBIN'};
let path = process.env.PWD;
cmd = "cd "+All["workPath"]+";cp "+FILENAME+".inp eingabe1.inp;"+path+"/trimspNL"; // Or use $ENV{'TRIMBIN'};
execute(cmd);
// document.getElementById("myBar").style.width = Progress + "%";
// document.getElementById("myBar").innerHTML = Progress + "%";
+2 -1
View File
@@ -1,4 +1,4 @@
const { app, BrowserWindow, Menu, dialog, ipcMain, fs } = require('electron')
const { app, BrowserWindow, Menu, dialog, ipcMain, fs } = require('electron');
function createWindow () {
const win = new BrowserWindow({
@@ -205,6 +205,7 @@ function createWindow () {
}
app.whenReady().then(createWindow)
console.log(app.getAppPath());
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {