diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dedf1e48..10dc32c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Vencord is a community project and welcomes any kind of contribution from anyone! -We have development documentation for new contributors, which can be found at . +We have development documentation for new contributors, which can be found at . All contributions should be made in accordance with our [Code of Conduct](./CODE_OF_CONDUCT.md). @@ -17,9 +17,10 @@ Pull requests can be made either to the `main` or the `dev` branch. However, unl Writing a plugin is the primary way to contribute. Before starting your plugin: +- Be in our discord - Check existing pull requests to see if someone is already working on a similar plugin -- Check our [plugin requests tracker](https://github.com/Vencord/plugin-requests/issues) to see if there is an existing request, or if the same idea has been rejected -- If there isn't an existing request, [open one](https://github.com/Vencord/plugin-requests/issues/new?assignees=&labels=&projects=&template=request.yml) yourself +- Check our [plugin requests tracker](https://discord.com/channels/1173279886065029291/1173334591302553631) to see if there is an existing request, or if the same idea has been rejected +- If there isn't an existing request, [open one](https://discord.com/channels/1173279886065029291/1173334591302553631) yourself. and include that you'd like to work on this yourself. Then wait for feedback to see if the idea even has any chance of being accepted. Or maybe others have some ideas to improve it! - Familarise yourself with our plugin rules below to ensure your plugin is not banned diff --git a/src/main/patcher.ts b/src/main/patcher.ts index e585d622..6178478f 100644 --- a/src/main/patcher.ts +++ b/src/main/patcher.ts @@ -26,13 +26,6 @@ import { IS_VANILLA } from "./utils/constants"; console.log("[Equicord] Starting up..."); -// FIXME: remove at some point -const isLegacyNonAsarVencord = IS_STANDALONE && !__dirname.endsWith(".asar"); -if (isLegacyNonAsarVencord) { - console.warn("This is a legacy non asar install! Migrating to asar and restarting..."); - require("./updater/http").migrateLegacyToAsar(); -} - // Our injector file at app/index.js const injectorPath = require.main!.filename; @@ -46,7 +39,7 @@ if (IS_VESKTOP || IS_EQUIBOP) require.main!.filename = join(dirname(injectorPath // @ts-ignore Untyped method? Dies from cringe app.setAppPath(asarPath); -if (!IS_VANILLA && !isLegacyNonAsarVencord) { +if (!IS_VANILLA) { const settings = RendererSettings.store; // Repatch after host updates on Windows if (process.platform === "win32") { @@ -162,7 +155,5 @@ if (!IS_VANILLA && !isLegacyNonAsarVencord) { console.log("[Equicord] Running in vanilla mode. Not loading Equicord"); } -if (!isLegacyNonAsarVencord) { - console.log("[Equicord] Loading original Discord app.asar"); - require(require.main!.filename); -} +console.log("[Equicord] Loading original Discord app.asar"); +require(require.main!.filename); diff --git a/src/main/updater/http.ts b/src/main/updater/http.ts index 5e282007..c0affa69 100644 --- a/src/main/updater/http.ts +++ b/src/main/updater/http.ts @@ -19,9 +19,8 @@ import { get } from "@main/utils/simpleGet"; import { IpcEvents } from "@shared/IpcEvents"; import { VENCORD_USER_AGENT } from "@shared/vencordUserAgent"; -import { app, dialog, ipcMain } from "electron"; +import { ipcMain } from "electron"; import { writeFileSync as originalWriteFileSync } from "original-fs"; -import { join } from "path"; import gitHash from "~git-hash"; import gitRemote from "~git-remote"; @@ -87,28 +86,3 @@ ipcMain.handle(IpcEvents.GET_REPO, serializeErrors(() => `https://github.com/${g ipcMain.handle(IpcEvents.GET_UPDATES, serializeErrors(calculateGitChanges)); ipcMain.handle(IpcEvents.UPDATE, serializeErrors(fetchUpdates)); ipcMain.handle(IpcEvents.BUILD, serializeErrors(applyUpdates)); - -export async function migrateLegacyToAsar() { - try { - const isFlatpak = process.platform === "linux" && !!process.env.FLATPAK_ID; - if (isFlatpak) throw "Flatpak Discord can't automatically be migrated."; - - const data = await get(`https://github.com/${gitRemote}/releases/latest/download/desktop.asar`); - - originalWriteFileSync(join(__dirname, "../equicord.asar"), data); - originalWriteFileSync(__filename, '// Legacy shim for new asar\n\nrequire("../equicord.asar");'); - - app.relaunch(); - app.exit(); - } catch (e) { - console.error("Failed to migrate to asar", e); - - app.whenReady().then(() => { - dialog.showErrorBox( - "Legacy Install", - "The way Equicord loaded was changed and the updater failed to migrate. Please reinstall using the Equicord Installer!" - ); - app.exit(1); - }); - } -}