Skip to content

Instantly share code, notes, and snippets.

@axyiee
Last active February 5, 2024 15:38
Show Gist options
  • Save axyiee/4d29c982ac85d5d26f98a51040b5de37 to your computer and use it in GitHub Desktop.
Save axyiee/4d29c982ac85d5d26f98a51040b5de37 to your computer and use it in GitHub Desktop.
Third-party Discord Client - ArmCord - on FreeBSD

discord-freebsd

A straightforward guide to how to get Discord running on FreeBSD. It is not the official client, but a third-party client that is not affiliated with Discord which supports even ARM.

Prerequisites

Installation

git clone https://github.com/ArmCord/ArmCord.git && cd ArmCord
echo $'#!/bin/sh\nsed -E "$1" "$2" > .tmp; rm -f "$2" && mv .tmp "$2" && rm -f .tmp' > trf && chmod +x trf 
./trf 's|"electron(-builder)?": "\^(.*)",||g;' package.json && pnpm i
./trf 's|"start": "(.*)"|"start": "electron21 ."|' package.json
./trf 's|"startNoSandbox": "(.*)"|"startNoSandbox": "electron21 --no-sandbox ."|' package.json
pnpm i -D @types/electron && pnpm build
doas bash # [enter as root]
ln -sf $PWD /usr/local/armcord
echo $'#!/bin/sh\n(cd /usr/local/armcord && pnpm start)' > /usr/local/bin/armcord
chmod +x /usr/local/bin/armcord

Troubleshooting

libicu and libflac dynamic library errors:

doas su # enter root mode
ln -s /usr/local/lib/libicui18n.so.72.1 /usr/local/lib/libicui18n.so.71
ln -s /usr/local/lib/libicuuc.so.72.1 /usr/local/lib/libicuuc.so.71
ln -s /usr/local/lib/libicudata.so.72.1 /usr/local/lib/libicudata.so.71
ln -s /usr/local/lib/libFLAC.so.12 /usr/local/lib/libFLAC.so.8

Local client mod development - Vencord

  1. Install system dependencies with doas pkg install jq
  2. Set up configuration properties with jq -c '.noBundleUpdates |= true' ~/.config/ArmCord/storage/settings.json > xd.tmp; mv -f xd.tmp ~/.config/ArmCord/storage/settings.json
  3. Set up Vencord bundle with ln -sf /path/to/vencord-src/dist/browser.js ~/.config/ArmCord/plugins/loader/dist/bundle.js && ln -sf /path/to/vencord-src/dist/browser.css ~/.config/ArmCord/plugins/loader/dist/bundle.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment