From 9d7264be96b48ce1c96cb4a8da55f81c80959fdf Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Mon, 12 Dec 2022 18:53:21 -0500 Subject: [PATCH] Update version and changelog --- CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ injector/src/index.js | 25 ++++++++++++++++--------- package.json | 2 +- renderer/src/data/changelog.js | 16 +++++++++++----- scripts/inject.js | 3 ++- 5 files changed, 61 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a45f2e41..a73e4fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,37 @@ This changelog starts with the restructured 1.0.0 release that happened after context isolation changes. The changelogs here should more-or-less mirror the ones that get shown in the client but probably with less formatting and pizzazz. +## 1.8.3 + +### Added +- Checking for old installs and deleting them + +### Removed +- All references to Emotes, this will become a separate plugin + +### Changed +- Moved to the more permissive Apache 2.0 license +- Now check for discord.asar for electron17+ +- Handle setting module exports internally rather than maintaining getter references + +### Fixed +- Fixed `inject` for electron17+ +- Updater checking `>` which does not work for open versions +- Fixed a startup bug with the context menu api + +## 1.8.2 + +### Added + +### Removed + +### Changed + +### Fixed +- Fixed modals not working +- Fixed downloading binary files +- Fixed public server invites + ## 1.8.1 ### Added diff --git a/injector/src/index.js b/injector/src/index.js index 58d6ad3f..99531e6c 100644 --- a/injector/src/index.js +++ b/injector/src/index.js @@ -2,6 +2,15 @@ import {app} from "electron"; import path from "path"; import fs from "fs"; +// Detect old install and delete it +const appPath = app.getAppPath(); // Should point to app or app.asar +const oldInstall = path.resolve(appPath, "..", "app"); +if (fs.existsSync(oldInstall)) { + fs.rmdirSync(oldInstall, {recursive: true}); + app.quit(); + app.relaunch(); +} + import ipc from "./modules/ipc"; import BrowserWindow from "./modules/browserwindow"; import CSP from "./modules/csp"; @@ -18,7 +27,12 @@ if (!process.argv.includes("--vanilla")) { // Remove CSP immediately on linux since they install to discord_desktop_core still - CSP.remove(); + try { + CSP.remove(); + } + catch (_) { + // Remove when everyone is moved to core + } } // Enable DevTools on Stable. @@ -36,14 +50,7 @@ try { }); } catch (_) { - // Detect old install and delete it - const appPath = app.getAppPath(); // Should point to app or app.asar - const oldInstall = path.resolve(appPath, "..", "app"); - if (fs.existsSync(oldInstall)) { - fs.rmdirSync(oldInstall, {recursive: true}); - app.quit(); - app.relaunch(); - } + // Remove when everyone is moved to core } // Needs to run this after Discord but before ready() diff --git a/package.json b/package.json index d3ecb55e..d5faffbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "betterdiscord", - "version": "1.8.2", + "version": "1.8.3", "description": "Enhances Discord by adding functionality and themes.", "main": "src/index.js", "scripts": { diff --git a/renderer/src/data/changelog.js b/renderer/src/data/changelog.js index 67d6fccd..186a2210 100644 --- a/renderer/src/data/changelog.js +++ b/renderer/src/data/changelog.js @@ -2,15 +2,21 @@ export default { description: "Just some smaller fixes while we work on some big things in the background.", changes: [ + { + title: "What's New?", + type: "", + items: [ + "Twitch emotes are no longer a part of BetterDiscord, we are opting to move them to a plugin. Stay tuned for when that will be completed!", + "We changed the way patching is handled internally hoping it'll help with memory leaks.", + "Everything should be working again for Canary and PTB with the latest updates!", + ] + }, { title: "Bug Fixes", type: "fixed", items: [ - "Fixed _even more_ issues with the built-in updater.", - "Fixed not being able to click support server links in plugin/theme pages.", - "Fixed some issues with not being able to join public servers.", - "Fixed plugin settings not being able to be displayed.", - "Fixed changelog modal not being able to be displayed." + "Fixed the way the update compares version numbers.", + "Fixed the startup bug." ] } ] diff --git a/scripts/inject.js b/scripts/inject.js index 1fc9b94d..8502c817 100644 --- a/scripts/inject.js +++ b/scripts/inject.js @@ -20,7 +20,8 @@ const discordPath = (function() { resourcePath = path.join(basedir, version, "modules", coreWrap, "discord_desktop_core"); } else { - const userData = process.env.XDG_CONFIG_HOME ? process.env.XDG_CONFIG_HOME : path.join(process.env.HOME, ".config"); + let userData = process.env.XDG_CONFIG_HOME ? process.env.XDG_CONFIG_HOME : path.join(process.env.HOME, ".config"); + if (process.platform === "darwin") userData = path.join(process.env.HOME, "Library", "Application Support"); const basedir = path.join(userData, release.toLowerCase().replace(" ", "")); if (!fs.existsSync(basedir)) return ""; const version = fs.readdirSync(basedir).filter(f => fs.lstatSync(path.join(basedir, f)).isDirectory() && f.split(".").length > 1).sort().reverse()[0];