-
Notifications
You must be signed in to change notification settings - Fork 113
Building
In order to use BDv2 yourself, you will for the time being have to build it yourself locally.
Follow these instructions to set up a development environment for BDv2. If you just want to test it or write plugins/themes, follow the release section.
- Clone the repo/your fork.
- 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 mkdir -p tests/data 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).
Follow these instructions if you want to test BDv2 exactly how it will run when released. Use this if you're developing plugins and/or themes.
- Clone the repo.
- Run
npm install
andnpm run release
in the root of the repo. This will delete therelease
directory, including any user data, rebuild it and copy the node-sass bindings. - Download the emote data from https://github.com/JsSucks/BetterDiscordApp/releases/tag/emotedb and move it to
release/data
.# macOS and Linux wget https://github.com/JsSucks/BetterDiscordApp/releases/download/emotedb/emotes.zip unzip emotes.zip # Run this after building the release mkdir -p release/data cp emotes.json release/data/emotes.json
- Edit
discord_desktop_core/index.js
to contain the following:This file is located atnew (require('path-to-bd-fork/release').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 release, follow steps 2 and 3 again.