diff options
author | 0neGal <mail@0negal.com> | 2021-12-30 03:51:58 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2021-12-30 03:51:58 +0100 |
commit | 43f174fd3687367f6bfe0a62fbba5169891093d6 (patch) | |
tree | cb81debb23aa9e3b0812e14dfc67b917ef0b490e | |
parent | 40bba8b31cfbef319553920d9fa678ffc1a99597 (diff) | |
parent | 9996dab31959e8af01d18912c4ee3c3b71bb0077 (diff) | |
download | Viper-43f174fd3687367f6bfe0a62fbba5169891093d6.tar.gz Viper-43f174fd3687367f6bfe0a62fbba5169891093d6.zip |
Merge branch 'main' of 0neGal/viper into feat/version-indicator
-rw-r--r-- | src/cli.js | 10 | ||||
-rw-r--r-- | src/lang/en.json | 1 |
2 files changed, 9 insertions, 2 deletions
@@ -13,6 +13,7 @@ function hasArgs() { cli.hasSwitch("update") || cli.hasSwitch("launch") || cli.hasSwitch("setpath") || + cli.hasSwitch("version") || cli.hasSwitch("gamepath")) { return true; } else {return false} @@ -27,6 +28,7 @@ async function init() { console.log(`options: --help ${lang("cli.help.help")} --debug ${lang("cli.help.debug")} + --version ${lang("cli.help.version")} --cli ${lang("cli.help.cli")} --update ${lang("cli.help.update")} @@ -36,8 +38,12 @@ async function init() { exit(); } - if (cli.hasSwitch("update")) { - ipcMain.emit("update"); + if (cli.hasSwitch("update")) {ipcMain.emit("update")} + if (cli.hasSwitch("version")) { + console.log("Viper: v" + require("../package.json").version); + console.log("Node: " + process.version); + console.log("Electron: v" + process.versions.electron); + exit(); } if (cli.hasSwitch("setpath")) { diff --git a/src/lang/en.json b/src/lang/en.json index a89f848..3c5efa1 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -1,6 +1,7 @@ { "cli.help.help": "shows this help message", "cli.help.debug": "opens the dev/debug tools", + "cli.help.version": "outputs version info", "cli.help.cli": "forces the CLI to enable", "cli.help.update": "updates Northstar from your set game path", "cli.help.setpath": "sets your game path", |