Page 1 of 1

Build guide for Fluffy Chat

Posted: Tue Nov 14, 2023 4:35 am
by pan
If for whatever reason, you want to build the Fluffy Chat matrix client on linux, here's an in-depth guide on how to do so. Many of these steps should be relatively similar on macos as well, though I intend to make a follow-up post noting differences building on other distros/systems. For this specific guide I will be focusing on debian based systems, however the build process should work very similarly on any linux distro.

First thing you should know if you're going to build fluffychat is that it has a LOT of build dependencies, here's a list :

Code: Select all

curl
clang
cmake
ninja-build
pkg-config
git
unzip
which
xz-utils
zip
libgtk-3-dev
libjsoncpp-dev
libsecret-1-dev 
libsecret-1-0 
librhash0 
libwebkit2gtk-4.0-dev 
libolm3
libolm-dev
Now before you can actually start building fluffychat, you need to install flutter. For this guide, I'm going to be installing flutter without android support, but in general it is beneficial to install flutter alongside android-studio and android sdk.

The first thing you're going to want to do is to find a good staging path for flutter. In my case, I'm going to use .local, but you can use whatever you want.

Code: Select all

cd ~/.local/
Next : find, download and extract the latest flutter release. Channels can be found here : https://docs.flutter.dev/release/archive?tab=linux

Code: Select all

wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.13.9-stable.tar.xz
tar xf flutter_linux_3.13.9-stable.tar.xz 
There should now be a new directory named 'flutter' in your staging path. You can now safely delete the tar.xz file if you wish.
Next, add the '{your_staging_dir}/flutter/bin' directory to your PATH variable so it can be executed and referenced by your system

Code: Select all

export PATH="$PATH:~/.local/flutter/bin" 
Next, pre-download the flutter development binaries

Code: Select all

flutter precache 
And finally, add the flutter bin permanently to your path

Code: Select all

export PATH=/home/{your_staging_path}/flutter/bin:$PATH
echo "export PATH=/home/{your_staging_path}/flutter/bin:$PATH" > ~/.bashrc 
Now that you have flutter installed, you can safely begin the process of downloading and building fluffy chat. If you're worried that a step during the flutter installation has gone wrong, you can run "flutter doctor" to check for potential issues.

The first thing you're going to want to do before installing fluffy chat is to go back to your staging directory and clone the flutter repo.

Code: Select all

cd ~/.local
git clone https://github.com/krille-chan/fluffychat.git
cd fluffychat/
Now that we're in the cloned fluffychat source directory, we can build the linux binary.

Code: Select all

flutter build linux --release
This will build a flutter binary at /{your_staging_path}/fluffychat/build/linux/x64/release/bundle
Feel free to link this binary in your system however you wish, however I advise against moving this binary as it is built with relative path library links (for whatever reason)

If you run into any issues during the build process, feel free to leave a response in this thread. If you reasonably don't want to deal with this build process; linux, web, and android build can be found here : https://github.com/krille-chan/fluffychat/releases

I hope at least somebody can find this helpful, I plan on making a follow-up guide on building for mac-os in the near future :))