summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLawnCable <git@lawncable.net>2021-03-01 04:45:17 +0100
committerLawnCable <git@lawncable.net>2021-03-01 04:45:17 +0100
commit4b8f0fe3ea96060adf9cd74bd6b5bc067b14d82b (patch)
tree34d02d2377781d50fff1d1f0329e9e3bdf4fd418
parent99d05fa2005020836de7dd03fc5870534d34c3ec (diff)
downloadelectron-4b8f0fe3ea96060adf9cd74bd6b5bc067b14d82b.tar.gz
electron-4b8f0fe3ea96060adf9cd74bd6b5bc067b14d82b.tar.bz2
electron-4b8f0fe3ea96060adf9cd74bd6b5bc067b14d82b.tar.xz
electron-4b8f0fe3ea96060adf9cd74bd6b5bc067b14d82b.zip
use APPIMAGELAUNCHER_DISABLE
closes #23
-rw-r--r--src/main/manaplus/manaApp/shared.ts4
-rw-r--r--src/main/manaplus/manaplus.ts4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/main/manaplus/manaApp/shared.ts b/src/main/manaplus/manaApp/shared.ts
index 106902c..00e8fa7 100644
--- a/src/main/manaplus/manaApp/shared.ts
+++ b/src/main/manaplus/manaApp/shared.ts
@@ -1,3 +1,4 @@
+import { execFile } from "child_process";
import { getRequest } from "../../util/webrequest";
import { ManaPlusApp } from "./manaApp.interface";
@@ -32,9 +33,10 @@ export function getInstalledManaplusVersion(
): Promise<string> {
return new Promise((res, rej) => {
let output: string;
- const child = require("child_process").execFile(
+ const child = execFile(
startCommand,
["-v"],
+ { env: { APPIMAGELAUNCHER_DISABLE: "true" } },
function (err: Error, data: any) {
output = data.toString();
}
diff --git a/src/main/manaplus/manaplus.ts b/src/main/manaplus/manaplus.ts
index ebfb7b8..15a3282 100644
--- a/src/main/manaplus/manaplus.ts
+++ b/src/main/manaplus/manaplus.ts
@@ -7,6 +7,7 @@ import { ipcMain, shell, dialog } from "electron";
import { Status, EventEmitter } from "../status";
import { ManaPlusAppLinux } from "./manaApp/linux";
import { getUserDataPath } from "../util/app_constants";
+import { execFile } from "child_process";
let ManaPlusInstance: ManaPlusApp;
@@ -186,9 +187,10 @@ function runManaProgram(
Status.setActivity(`Starting ManaPlus`);
//console.log(gameExe, parameters);
- const child = require("child_process").execFile(
+ const child = execFile(
gameExe,
parameters,
+ { env: { ...process.env, APPIMAGELAUNCHER_DISABLE: "true" } },
function (err: Error, data: any) {
console.log(err);
console.log(data.toString());