aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app/index.html2
-rw-r--r--src/app/main.js4
-rw-r--r--src/cli.js6
-rw-r--r--src/index.js8
-rw-r--r--src/utils.js10
5 files changed, 15 insertions, 15 deletions
diff --git a/src/app/index.html b/src/app/index.html
index 819caac..1b3944d 100644
--- a/src/app/index.html
+++ b/src/app/index.html
@@ -220,7 +220,7 @@
<button id="playNsBtn" class="playBtn" onclick="launch()">%%gui.launch%%</button>
<div class="inline">
<div id="nsversion"></div>
- <a id="update" href="#" onclick="update()">(%%gui.update.check%%)</a>
+ <a id="update" href="#" onclick="updateNorthstar()">(%%gui.update.check%%)</a>
<div id="serverstatus" class="checking"></div>
</div>
</div>
diff --git a/src/app/main.js b/src/app/main.js
index d6a57d6..bd25071 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -69,7 +69,7 @@ if (!navigator.onLine) {
}
function exit() {ipcRenderer.send("exit")}
-function update() {ipcRenderer.send("update")}
+function updateNorthstar() {ipcRenderer.send("update-northstar")}
// Reports to the main process about game path status.
// @param {boolean} value is game path loaded
@@ -80,7 +80,7 @@ function setpath(value = false) {
// Tells the main process to launch or install Northstar
function launch() {
if (shouldInstallNorthstar) {
- update();
+ updateNorthstar();
shouldInstallNorthstar = false;
} else {
ipcRenderer.send("launch-ns");
diff --git a/src/cli.js b/src/cli.js
index 0adcd1d..dcc609d 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -18,11 +18,11 @@ function hasArgs() {
cli.hasSwitch("launch") ||
cli.hasSwitch("setpath") ||
cli.hasSwitch("version") ||
- cli.hasSwitch("updatevp") ||
cli.hasSwitch("gamepath") ||
cli.hasSwitch("togglemod") ||
cli.hasSwitch("removemod") ||
- cli.hasSwitch("installmod")) {
+ cli.hasSwitch("installmod") ||
+ cli.hasSwitch("update-viper")) {
return true;
} else {return false}
}
@@ -64,7 +64,7 @@ async function init() {
--cli ${lang("cli.help.cli")}
--update ${lang("cli.help.update")}
- --updatevp ${lang("cli.help.updatevp")}
+ --update-viper ${lang("cli.help.updatevp")}
--setpath ${lang("cli.help.setpath")}
--no-vp-updates ${lang("cli.help.novpupdates")}
diff --git a/src/index.js b/src/index.js
index e01a635..30e36f5 100644
--- a/src/index.js
+++ b/src/index.js
@@ -105,7 +105,7 @@ function start() {
if (cli.hasParam("no-vp-updates")) {
utils.handleNorthstarUpdating();
} else {
- utils.updatevp(false)
+ utils.updateViper(false)
}
} else {
utils.handleNorthstarUpdating();
@@ -146,7 +146,7 @@ ipcMain.on("launch-vanilla", () => {utils.launch("vanilla")});
ipcMain.on("setlang", (event, lang) => {utils.setlang(lang)});
-ipcMain.on("update", () => {utils.update()})
+ipcMain.on("update-northstar", () => {utils.updateNorthstar()})
ipcMain.on("setpath-cli", () => {utils.setpath()});
ipcMain.on("setpath", (event, value) => {
if (! value) {
@@ -224,8 +224,8 @@ process.chdir(app.getPath("appData"));
// starts the GUI or CLI
if (cli.hasArgs()) {
- if (cli.hasParam("updatevp")) {
- utils.updatevp(true);
+ if (cli.hasParam("update-viper")) {
+ utils.updateViper(true);
} else {
cli.init();
}
diff --git a/src/utils.js b/src/utils.js
index 712d1b3..b69c957 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -168,7 +168,7 @@ function handleNorthstarUpdating() {
}).show();
} else {
console.log(lang("cli.autoupdates.updatingns"));
- update();
+ updateNorthstar();
}
} else {
console.log(lang("cli.autoupdates.noupdate"));
@@ -352,7 +352,7 @@ restoreExcludedFiles();
// As to handle not overwriting files we rename certain files to
// <file>.excluded, then rename them back after the extraction. The
// unzip module does not support excluding files directly.
-async function update() {
+async function updateNorthstar() {
if (! gamepathExists()) {return}
ipcMain.emit("ns-update-event", "cli.update.checking");
@@ -445,7 +445,7 @@ async function update() {
// This uses electron updater to easily update and publish releases, it
// simply fetches it from GitHub and updates if it's outdated, very
// useful. Not much we have to do on our side.
-function updatevp(autoinstall) {
+function updateViper(autoinstall) {
const { autoUpdater } = require("electron-updater");
if (! autoUpdater.isUpdaterActive()) {
@@ -938,10 +938,10 @@ module.exports = {
mods,
winLog,
- update,
- updatevp,
+ updateViper,
getNSVersion,
getTF2Version,
+ updateNorthstar,
handleNorthstarUpdating,
launch,