aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli.js21
-rw-r--r--src/index.js8
-rw-r--r--src/lang/en.json1
3 files changed, 18 insertions, 12 deletions
diff --git a/src/cli.js b/src/cli.js
index cef2295..dd043c5 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -43,18 +43,19 @@ async function init() {
// --help menu/argument
if (cli.hasSwitch("help")) {
console.log(`options:
- --help ${lang("cli.help.help")}
- --debug ${lang("cli.help.debug")}
- --version ${lang("cli.help.version")}
+ --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")}
- --updatevp ${lang("cli.help.updatevp")}
- --setpath ${lang("cli.help.setpath")}
+ --cli ${lang("cli.help.cli")}
+ --update ${lang("cli.help.update")}
+ --updatevp ${lang("cli.help.updatevp")}
+ --setpath ${lang("cli.help.setpath")}
+ --no-vp-updates ${lang("cli.help.novpupdates")}
- --installmod ${lang("cli.help.installmod")}
- --removemod ${lang("cli.help.removemod")}
- --togglemod ${lang("cli.help.togglemod")}`)
+ --installmod ${lang("cli.help.installmod")}
+ --removemod ${lang("cli.help.removemod")}
+ --togglemod ${lang("cli.help.togglemod")}`)
// In the future --setpath should be able to understand
// relative paths, instead of just absolute ones.
exit();
diff --git a/src/index.js b/src/index.js
index 265e13d..752410e 100644
--- a/src/index.js
+++ b/src/index.js
@@ -56,7 +56,7 @@ function start() {
ipcMain.on("savesettings", (event, obj) => {utils.saveSettings(obj)})
ipcMain.on("can-autoupdate", (event) => {
- if (! require("electron-updater").autoUpdater.isUpdaterActive()) {
+ if (! require("electron-updater").autoUpdater.isUpdaterActive() || cli.hasParam("no-vp-updates")) {
win.webContents.send("cant-autoupdate")
}
})
@@ -66,7 +66,11 @@ function start() {
});
if (utils.settings.autoupdate) {
- utils.updatevp(false)
+ if (cli.hasParam("no-vp-updates")) {
+ utils.handleNorthstarUpdating();
+ } else {
+ utils.updatevp(false)
+ }
} else {
utils.handleNorthstarUpdating();
}
diff --git a/src/lang/en.json b/src/lang/en.json
index 47e18c0..04ecfdd 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -6,6 +6,7 @@
"cli.help.update": "updates Northstar from your set game path",
"cli.help.setpath": "sets your game path",
"cli.help.updatevp": "updates Viper itself, if supported.",
+ "cli.help.novpupdates": "overwrites viper.json and disables Viper updates",
"cli.help.installmod": "installs a mod, folder or zip",
"cli.help.removemod": "removes a mod",
"cli.help.togglemod": "toggles a mod",