forked from Jiiks/BetterDiscordApp
-
Notifications
You must be signed in to change notification settings - Fork 113
Building
Samuel Elliott edited this page Mar 17, 2018
·
34 revisions
In order to use BDv2 yourself, you will for the time being have to build it yourself locally. In order to do so, you have to:
- Clone the repo (or your fork if you're planning on contributing).
- Run
npm install
andnpm run build
in the root of the repo. - Build the node-sass binding or copy the prebuilt binding from
other/node-sass bindings
. To build the binding for Electron 1.6 on your OS and move them to the correct location runnpm run build_node-sass
. Or run the command for your OS to copy the prebuilt bindings to the correct location:# macOS cp -R other/node-sass\ bindings/darwin-x64-53 node_modules/node-sass/vendor/darwin-x64-53 # Linux cp -R other/node-sass\ bindings/linux-x64-53 node_modules/node-sass/vendor/linux-x64-53
:: Windows copy "other\node-sass bindings\win32-ia32-53" "node_modules\node-sass\vendor\win32-ia32-53"
- Download the emote data from https://github.com/JsSucks/BetterDiscordApp/releases/tag/emotedb and move it to
tests/data
.# macOS and Linux wget https://github.com/JsSucks/BetterDiscordApp/releases/download/emotedb/emotes.zip unzip emotes.zip mv emotes.json tests/data/emotes.json rm emotes.zip
- Edit
discord_desktop_core/index.js
to contain the following:This file is located atnew (require('path-to-bd-fork/core/dist/main.js').BetterDiscord)(); module.exports = require('./core.asar');
%APPDATA%\Roaming\discord\0.0.300\modules\discord_desktop_core\index.js
on Windows,~/Library/Application Support/discord/0.0.250/modules/discord_desktop_core/index.js
on macOS and~/.config/discord/0.0.4/modules/discord_desktop_core/index.js
on Linux.
To rebuild the core and the client and CSS editor bundles, run npm run build
in the root of the repo.
To watch the core, run npm run watch_core
in the root of the repo.
To watch the client, run npm run watch_client
in the root of the repo.
To watch the CSS editor, run npm run watch_csseditor
in the root of the repo.
Core rebuild requires full Discord restart. Client and CSS editor bundles can be reloaded with Ctrl + R
(Windows and Linux) or Cmd + R
(macOS).