aboutsummaryrefslogtreecommitdiff
path: root/src/modules/version.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/version.js')
-rw-r--r--src/modules/version.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/modules/version.js b/src/modules/version.js
index da0a730..e337fc4 100644
--- a/src/modules/version.js
+++ b/src/modules/version.js
@@ -1,11 +1,28 @@
const path = require("path");
const fs = require("fs-extra");
+const ipcMain = require("electron").ipcMain;
+
+const win = require("../win");
const json = require("./json");
const settings = require("./settings");
let version = {};
+// sends the version info back to the renderer
+ipcMain.on("get-version", () => {
+ version.send_info();
+})
+
+// retrieves various local version numbers and sends them to the renderer
+version.send_info = () => {
+ win().send("version", {
+ ns: version.northstar(),
+ tf2: version.titanfall(),
+ vp: "v" + version.viper()
+ })
+}
+
// returns the current Northstar version
// if not installed it'll return "unknown"
version.northstar = () => {