Fixed relative path for trimspNL binary.
This commit is contained in:
@@ -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
@@ -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 + "%";
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user