Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yofukashino committed Oct 20, 2024
1 parent 22b35d6 commit 5cb5e48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { getSetting } from "./ipc/settings";

const electronPath = require.resolve("electron");
const discordPath = join(dirname(require.main!.filename), "..", "app.orig.asar");
// require.main!.filename = discordMain;
const discordPackage = require(join(discordPath, "package.json"));
require.main!.filename = join(discordPath, discordPackage.main);

Object.defineProperty(global, "appSettings", {
set: (v /* : typeof global.appSettings*/) => {
Expand Down Expand Up @@ -185,4 +186,4 @@ electron.app.once("ready", () => {
// This module is required this way at runtime.
require("./ipc");

require("module")._load(discordPath);
require(discordPath);

0 comments on commit 5cb5e48

Please sign in to comment.