summaryrefslogtreecommitdiff
path: root/src/main/manaplus/manaplus.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/manaplus/manaplus.ts')
-rw-r--r--src/main/manaplus/manaplus.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/manaplus/manaplus.ts b/src/main/manaplus/manaplus.ts
index 6088dba..5de7d01 100644
--- a/src/main/manaplus/manaplus.ts
+++ b/src/main/manaplus/manaplus.ts
@@ -5,6 +5,7 @@ import * as path from 'path';
import * as fs from 'fs-extra';
import { app, ipcMain, shell, dialog } from 'electron';
import { Status, EventEmitter } from '../status';
+import { ManaPlusAppLinux } from './manaApp/linux';
let ManaPlusInstance:ManaPlusApp;
@@ -21,6 +22,11 @@ export namespace ManaPlus{
ManaPlusInstance = new ManaPlusAppWindows();
console.log("GameDir:"+ManaPlusInstance.getGameDir());
}
+
+ if(os.platform() == "linux"){
+ ManaPlusInstance = new ManaPlusAppLinux();
+ console.log("startCommand:"+ManaPlusInstance.startCommand);
+ }
}
export async function update(){
@@ -66,7 +72,13 @@ please check you network connection first.", e.message, "Launch preparation fail
}
// Install/Update the gameclient if needed
if(willUpdate){
- await update();
+ try {
+ await update();
+ } catch (error) {
+ Status.setPlaying(false);
+ throw error;
+ }
+
}
//IDEA have client data updated here to, if needed