diff --git a/package.json b/package.json index d6ba00a8..f986dfa8 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "Doki Doki Mod Manager!", "description": "Mod Manager for Doki Doki Literature Club!", "author": "Doki Doki Mod Manager! Development Team", - "version": "2.0.1", + "version": "2.0.2", "homepage": "https://doki.space", "main": "src/common/main.js", "scripts": { diff --git a/src/common/download/DownloadManager.js b/src/common/download/DownloadManager.js index d2134212..5b6e6db6 100644 --- a/src/common/download/DownloadManager.js +++ b/src/common/download/DownloadManager.js @@ -38,7 +38,7 @@ class DownloadManager extends events_1.EventEmitter { method: "GET", url: firstItem.url, }).on("response", (response) => { - firstItem.total_size = parseInt(response.headers["content-length"], 10); + firstItem.total_size = parseInt(response.headers["content-length"], 10) || 0; }).on("data", (chunk) => { firstItem.bytes_downloaded += chunk.length; if (firstItem.total_size === 0) { @@ -47,12 +47,11 @@ class DownloadManager extends events_1.EventEmitter { else { this.emit("progress", firstItem.bytes_downloaded / firstItem.total_size); } - if (firstItem.bytes_downloaded >= firstItem.total_size) { - firstItem.status = DownloadStatus.DONE; - this.emit("download finished"); - this.emit("progress", 0); // no progress bar - this.bumpQueue(); - } + }).on("complete", () => { + firstItem.status = DownloadStatus.DONE; + this.emit("download finished"); + this.emit("progress", 0); // no progress bar + this.bumpQueue(); }).pipe(fs_1.createWriteStream(firstItem.saveTo)); } bumpQueue() { diff --git a/src/common/download/DownloadManager.js.map b/src/common/download/DownloadManager.js.map index 3843f271..0b48e599 100644 --- a/src/common/download/DownloadManager.js.map +++ b/src/common/download/DownloadManager.js.map @@ -1 +1 @@ -{"version":3,"file":"DownloadManager.js","sourceRoot":"","sources":["DownloadManager.ts"],"names":[],"mappings":";;AAAA,mCAAoC;AACpC,2BAAqC;AACrC,mCAAmC;AACnC,gDAAyC;AAEzC,qBAA6B,SAAQ,qBAAY;IAAjD;;QAEY,UAAK,GAAgB,EAAE,CAAC;IAyEpC,CAAC;IAvEU,aAAa,CAAC,GAAW,EAAE,MAAc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CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,KAAK,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAE7F,IAAI,CAAC,SAAS,EAAE;YACZ,OAAO;SACV;QAED,IAAI,SAAS,CAAC,MAAM,KAAK,cAAc,CAAC,OAAO,EAAE,EAAE,oCAAoC;YACnF,gBAAM,CAAC,IAAI,CAAC,qCAAqC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;YACnE,SAAS,CAAC,MAAM,GAAG,cAAc,CAAC,WAAW,CAAC;YAC9C,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,qBAAqB;SAClD;aAAM,IAAI,SAAS,CAAC,MAAM,KAAK,cAAc,CAAC,IAAI,EAAE;YACjD,gBAAM,CAAC,IAAI,CAAC,0BAA0B,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;YACxD,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,WAAW;SAChC;IACL,CAAC;CACJ;AAzED,0CAyEC;AAcD,IAAY,cAKX;AALD,WAAY,cAAc;IACtB,6CAA2B,CAAA;IAC3B,qCAAmB,CAAA;IACnB,+BAAa,CAAA;IACb,iCAAe,CAAA;AACnB,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB"} \ No newline at end of file diff --git a/src/common/download/DownloadManager.ts b/src/common/download/DownloadManager.ts index 92c3a823..a8bbe597 100644 --- a/src/common/download/DownloadManager.ts +++ b/src/common/download/DownloadManager.ts @@ -41,7 +41,7 @@ export class DownloadManager extends EventEmitter { method: "GET", url: firstItem.url, }).on("response", (response) => { - firstItem.total_size = parseInt(response.headers["content-length"], 10); + firstItem.total_size = parseInt(response.headers["content-length"], 10) || 0; }).on("data", (chunk) => { firstItem.bytes_downloaded += chunk.length; @@ -50,15 +50,13 @@ export class DownloadManager extends EventEmitter { } else { this.emit("progress", firstItem.bytes_downloaded / firstItem.total_size); } + }).on("complete", () => { + firstItem.status = DownloadStatus.DONE; - if (firstItem.bytes_downloaded >= firstItem.total_size) { - firstItem.status = DownloadStatus.DONE; + this.emit("download finished"); + this.emit("progress", 0); // no progress bar - this.emit("download finished"); - this.emit("progress", 0); // no progress bar - - this.bumpQueue(); - } + this.bumpQueue(); }).pipe(createWriteStream(firstItem.saveTo)); } diff --git a/src/common/installs/InstallList.js b/src/common/installs/InstallList.js index e5da8807..8b39c534 100644 --- a/src/common/installs/InstallList.js +++ b/src/common/installs/InstallList.js @@ -8,7 +8,13 @@ class InstallList { const installs = fs_1.readdirSync(path_1.join(Config_1.default.readConfigValue("installFolder"), "installs")); return installs.map((install) => { const path = path_1.join(Config_1.default.readConfigValue("installFolder"), "installs", install); - const installData = JSON.parse(fs_1.readFileSync(path_1.join(path, "install.json")).toString("utf8")); + let installData = { "name": "" }; + try { + installData = JSON.parse(fs_1.readFileSync(path_1.join(path, "install.json")).toString("utf8")); + } + catch (e) { + installData = install; + } return { folderName: install, fullFolderName: path, diff --git a/src/common/installs/InstallList.js.map b/src/common/installs/InstallList.js.map index d2898957..fcf9c2cc 100644 --- a/src/common/installs/InstallList.js.map +++ b/src/common/installs/InstallList.js.map @@ -1 +1 @@ -{"version":3,"file":"InstallList.js","sourceRoot":"","sources":["InstallList.ts"],"names":[],"mappings":";;AAAA,2BAA6C;AAC7C,+BAAsC;AACtC,4CAAqC;AAErC;IAEW,MAAM,CAAC,cAAc;QACxB,MAAM,QAAQ,GAAa,gBAAW,CAAC,WAAQ,CAAC,gBAAM,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;QAEtG,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YAC5B,MAAM,IAAI,GAAW,WAAQ,CAAC,gBAAM,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;YAE5F,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAY,CAAC,WAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YAE9F,OAAO;gBACH,UAAU,EAAE,OAAO;gBACnB,cAAc,EAAE,IAAI;gBACpB,WAAW,EAAE,WAAW,CAAC,IAAI;aAChC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAjBD,8BAiBC"} \ No newline at end of file +{"version":3,"file":"InstallList.js","sourceRoot":"","sources":["InstallList.ts"],"names":[],"mappings":";;AAAA,2BAA6C;AAC7C,+BAAsC;AACtC,4CAAqC;AAErC;IAEW,MAAM,CAAC,cAAc;QACxB,MAAM,QAAQ,GAAa,gBAAW,CAAC,WAAQ,CAAC,gBAAM,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;QAEtG,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YAC5B,MAAM,IAAI,GAAW,WAAQ,CAAC,gBAAM,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;YAE5F,IAAI,WAAW,GAAG,EAAC,MAAM,EAAE,EAAE,EAAC,CAAC;YAE/B,IAAI;gBACA,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAY,CAAC,WAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;aAC3F;YAAC,OAAO,CAAC,EAAE;gBACR,WAAW,GAAG,OAAO,CAAC;aACzB;YAED,OAAO;gBACH,UAAU,EAAE,OAAO;gBACnB,cAAc,EAAE,IAAI;gBACpB,WAAW,EAAE,WAAW,CAAC,IAAI;aAChC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAvBD,8BAuBC"} \ No newline at end of file diff --git a/src/common/installs/InstallList.ts b/src/common/installs/InstallList.ts index 0981875a..8bda7c60 100644 --- a/src/common/installs/InstallList.ts +++ b/src/common/installs/InstallList.ts @@ -10,7 +10,13 @@ export default class InstallList { return installs.map((install) => { const path: string = joinPath(Config.readConfigValue("installFolder"), "installs", install); - const installData = JSON.parse(readFileSync(joinPath(path, "install.json")).toString("utf8")); + let installData = {"name": ""}; + + try { + installData = JSON.parse(readFileSync(joinPath(path, "install.json")).toString("utf8")); + } catch (e) { + installData = install; + } return { folderName: install, diff --git a/src/common/main.js b/src/common/main.js index 3dbd6806..6586fbc8 100644 --- a/src/common/main.js +++ b/src/common/main.js @@ -35,8 +35,11 @@ let moniIndex = 0; downloadManager = new DownloadManager_1.DownloadManager(); richPresence = new RichPresence_1.default(DISCORD_APPID); richPresence.setIdlePresence(); -electron_updater_1.autoUpdater.autoDownload = false; +electron_updater_1.autoUpdater.autoDownload = true; electron_updater_1.autoUpdater.logger = Logger_1.default; +electron_updater_1.autoUpdater.on("update-downloaded", () => { + appWin.webContents.send("update downloaded"); +}); function downloadBaseGame() { DownloadLinkRetriever_1.default.getDownloadLink().then((link) => { downloadManager.queueDownload(link, path_1.join(Config_1.default.readConfigValue("installFolder"), "ddlc.zip"), "Doki Doki Literature Club - Game Files"); @@ -145,10 +148,6 @@ electron_1.app.on("ready", () => { appWin.loadURL("file:///" + path_1.join(__dirname, "../gui/html/app/index.html")); // ...and show it when ready appWin.on("ready-to-show", () => { - // onboarding screen etc - if (!fs_1.existsSync(path_1.join(Config_1.default.readConfigValue("installFolder"), "ddlc.zip"))) { - appWin.webContents.send("show onboarding", true); - } appWin.show(); Logger_1.default.info("App window visible."); }); @@ -181,6 +180,10 @@ electron_1.app.on("ready", () => { // page event handlers appWin.webContents.on("did-finish-load", () => { appWin.webContents.send("install list", InstallList_1.default.getInstallList()); + // onboarding screen etc + if (fs_1.existsSync(path_1.join(Config_1.default.readConfigValue("installFolder"), "ddlc.zip"))) { + appWin.webContents.send("show onboarding", false); + } checkUpdates(); readMods(); if (debug) { diff --git a/src/common/main.js.map b/src/common/main.js.map index 3e94cb99..0869e1ab 100644 --- a/src/common/main.js.map +++ b/src/common/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":";;AAAA,iDAAoC;AACpC,uCAA6E;AAC7E,yCAAyC;AACzC,uDAA6C;AAC7C,2BAAoH;AACpH,uCAAgC;AAChC,+BAAsD;AACtD,mCAAmC;AACnC,mDAAmD;AACnD,6BAAwC;AACxC,yDAAkD;AAClD,4EAAqE;AACrE,gEAA2E;AAC3E,2CAAoC;AACpC,+DAAwD;AACxD,8DAAuD;AACvD,wDAAiD;AACjD,+CAAwC;AAExC,qCAA0D;AAC1D,0DAAmD;AAEnD,MAAM,aAAa,GAAW,oBAAoB,CAAC;AACnD,MAAM,mBAAmB,GAAa;IAClC,OAAO,EAAE,OAAO;CACnB,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,kEAAkE,CAAC,CAAC;AAEzF,IAAI,MAAqB,CAAC;AAE1B,IAAI,YAA0B,CAAC;AAC/B,IAAI,eAAgC,CAAC;AAErC,IAAI,KAAK,GAAY,KAAK,CAAC;AAE3B,IAAI,OAAO,GAAY,KAAK,CAAC;AAE7B,IAAI,YAAY,GAAY,KAAK,CAAC;AAElC,IAAI,SAAS,GAAW,CAAC,CAAC;AAE1B,eAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;AAExC,YAAY,GAAG,IAAI,sBAAY,CAAC,aAAa,CAAC,CAAC;AAC/C,YAAY,CAAC,eAAe,EAAE,CAAC;AAE/B,8BAAW,CAAC,YAAY,GAAG,KAAK,CAAC;AACjC,8BAAW,CAAC,MAAM,GAAG,gBAAM,CAAC;AAE5B;IACI,+BAAqB,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE;QAC1D,eAAe,CAAC,aAAa,CAAC,IAAI,EAC9B,WAAQ,CAAC,gBAAM,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,EAAE,wCA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Ae,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;oBACtF,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;iBACrD;qBAAM;oBACH,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAChC,mFAAmF,CAAC,CAAC;iBAC5F;aACJ;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,kBAAO,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;QAC1B,iBAAM,CAAC,cAAc,CAAC,MAAM,EAAE;YAC1B,WAAW,EAAE,QAAQ;YACrB,OAAO,EAAE;gBACL;oBACI,UAAU,EAAE,CAAC,KAAK,CAAC;oBACnB,IAAI,EAAE,UAAU;iBACnB;aACJ;YACD,KAAK,EAAE,mCAAmC;SAC7C,EAAE,CAAC,KAAK,EAAE,EAAE;YACT,IAAI,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;gBACnB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAO,CAAC,CAAC,GAAG,EAAE,CAAC;gBAE/C,iBAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,WAAQ,CAAC,gBAAM,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;gBAC5F,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,QAAQ,GAAG,wBAAwB,CAAC,CAAC;gBACzF,QAAQ,EAAE,CAAC;aACd;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/src/common/main.ts b/src/common/main.ts index bd565251..75e35df1 100644 --- a/src/common/main.ts +++ b/src/common/main.ts @@ -45,9 +45,13 @@ downloadManager = new DownloadManager(); richPresence = new RichPresence(DISCORD_APPID); richPresence.setIdlePresence(); -autoUpdater.autoDownload = false; +autoUpdater.autoDownload = true; autoUpdater.logger = Logger; +autoUpdater.on("update-downloaded", () => { + appWin.webContents.send("update downloaded"); +}); + function downloadBaseGame() { DownloadLinkRetriever.getDownloadLink().then((link: string) => { downloadManager.queueDownload(link, @@ -168,11 +172,6 @@ app.on("ready", () => { // ...and show it when ready appWin.on("ready-to-show", () => { - // onboarding screen etc - if (!fileExists(joinPath(Config.readConfigValue("installFolder"), "ddlc.zip"))) { - appWin.webContents.send("show onboarding", true); - } - appWin.show(); Logger.info("App window visible."); }); @@ -209,6 +208,10 @@ app.on("ready", () => { // page event handlers appWin.webContents.on("did-finish-load", () => { appWin.webContents.send("install list", InstallList.getInstallList()); + // onboarding screen etc + if (fileExists(joinPath(Config.readConfigValue("installFolder"), "ddlc.zip"))) { + appWin.webContents.send("show onboarding", false); + } checkUpdates(); readMods(); if (debug) { diff --git a/src/gui/html/app/index.html b/src/gui/html/app/index.html index e456fb83..df55c24f 100644 --- a/src/gui/html/app/index.html +++ b/src/gui/html/app/index.html @@ -258,7 +258,8 @@
Downloading - {{roundedPercentage(download.bytes_downloaded, download.total_size)}}% complete
-Downloading - {{download.bytes_downloaded}} bytes +
Downloading - + {{formatBytes(download.bytes_downloaded)}} downloaded
Waiting for downloads to complete.
@@ -363,7 +364,8 @@Version {{ui.update.info.update.updateInfo.version}} is available to install!
- + +Downloading update - check back in a minute or so.
You are installing an unmodded copy of Doki Doki Literature Club.