diff --git a/workflows/energy_plus/module/module.js b/workflows/energy_plus/module/module.js index 2cc4479..ec8ccf3 100644 --- a/workflows/energy_plus/module/module.js +++ b/workflows/energy_plus/module/module.js @@ -1,4 +1,4 @@ -const BrowserWindow = require('electron') +const { BrowserWindow, app } = require('electron') const fs = require('fs') const path = require('path') const { Blob } = require('buffer') @@ -8,8 +8,7 @@ const energy_plus = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/w exports.run = async (application, param, tmp_path) => { console.log(`Executing ${application}`) - env_path = path.resolve(`${__dirname}/../../../environments/workflow_launcher/.env`) - dotenv.config({ path: env_path }) + dotenv.config({ path: path.resolve(`${app.getAppPath()}/environments/workflow_launcher/.env`) }) const application_uuid = process.env.APPLICATION const username = process.env.APPLICATION_USERNAME const password = process.env.APPLICATION_PASSWORD diff --git a/workflows/idf/main.html b/workflows/idf/main.html index b1d53d2..261017c 100644 --- a/workflows/idf/main.html +++ b/workflows/idf/main.html @@ -19,7 +19,7 @@