aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/index.js b/src/index.js
index 259f7cc..3e7e08f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -19,6 +19,7 @@ const version = require("./modules/version");
const gamepath = require("./modules/gamepath");
const settings = require("./modules/settings");
const requests = require("./modules/requests");
+const packages = require("./modules/packages");
const is_running = require("./modules/is_running");
console = require("./modules/console");
@@ -112,7 +113,9 @@ function start() {
// install calls
ipcMain.on("install-from-path", (event, path) => {mods.install(path)});
- ipcMain.on("install-from-url", (event, url, author) => {mods.installFromURL(url, author)});
+ ipcMain.on("install-from-url", (event, url, author, package_name, version) => {
+ packages.install(url, author, package_name, version);
+ });
win.webContents.on("dom-ready", () => {
send("mods", mods.list());
@@ -238,13 +241,13 @@ ipcMain.on("getmods", () => {
log(`${lang("general.mods.installed")} ${mods.all.length}`);
log(`${lang("general.mods.enabled")} ${mods.enabled.length}`);
for (let i = 0; i < mods.enabled.length; i++) {
- log(` ${mods.enabled[i].Name} ${mods.enabled[i].Version}`);
+ log(` ${mods.enabled[i].name} ${mods.enabled[i].version}`);
}
if (mods.disabled.length > 0) {
log(`${lang("general.mods.disabled")} ${mods.disabled.length}`);
for (let i = 0; i < mods.disabled.length; i++) {
- log(` ${mods.disabled[i].Name} ${mods.disabled[i].Version}`);
+ log(` ${mods.disabled[i].name} ${mods.disabled[i].version}`);
}
}
cli.exit(0);