aboutsummaryrefslogtreecommitdiff
path: root/src/app/js/launch.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-06-09 18:09:26 +0200
committerGitHub <noreply@github.com>2024-06-09 18:09:26 +0200
commit04b0e9fcea6c60257d7bc68994103eacb340a82b (patch)
treecd46c3c09f11f839eebb0e4dc682ca6c85689bf6 /src/app/js/launch.js
parent3904a4492f72ef9a9fd531c0b81f3711541c97e0 (diff)
parentaa53f7a5fd5408596d6cc1ea579d68d1ae897698 (diff)
downloadViper-04b0e9fcea6c60257d7bc68994103eacb340a82b.tar.gz
Viper-04b0e9fcea6c60257d7bc68994103eacb340a82b.zip
Merge pull request #237 from 0neGal/modularized-frontend
chore: Modularize the frontend code Generally this should be fine, there might still be some uncaught bugs, but it hopefully isn't anything too major.
Diffstat (limited to 'src/app/js/launch.js')
-rw-r--r--src/app/js/launch.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/app/js/launch.js b/src/app/js/launch.js
new file mode 100644
index 0000000..d14d2ee
--- /dev/null
+++ b/src/app/js/launch.js
@@ -0,0 +1,15 @@
+const update = require("./update");
+
+// tells the main process to launch `game_version`
+module.exports = (game_version) => {
+ if (game_version == "vanilla") {
+ ipcRenderer.send("launch", game_version);
+ return;
+ }
+
+ if (update.ns.should_install) {
+ update.ns();
+ } else {
+ ipcRenderer.send("launch", game_version);
+ }
+}