Diffuse depends on these projects:
- Python 3.8+
- PyPi
- Cairo and GObject Introspection development headers
- Meson
- Flatpak and Flatpak builder (Linux only)
It's a bit difficult to get the command lines for all the systems, but these examples should be enough to find the packages on most systems.
Debian/Ubuntu
sudo apt install python3-pip libcairo2-dev libgirepository-2.0-dev \
meson flatpak flatpak-builderNote: Tested on Debian 11 (Buster) and Ubuntu 20.04 (Focal)
Fedora
sudo dnf install python-pip cairo-devel cairo-gobject-devel \
meson flatpak flatpak-builderNote: Tested on Fedora 36
macOS
On Mac, all dependencies can be installed using Homebrew:
brew install meson python3 py3cairo pygobject3 gtk+3 librsvgNote: Tested on macOS 12.5 (Monterey)
To install the requirements just to execute the binary, run:
pip3 install -r requirements.txtFor developer tools, run this one instead (it includes requirements.txt):
pip3 install -r requirements.dev.txtThere is a pre-commit git hook that runs some linters on the source code before committing.
To install the git hooks (for the repository only), run this command:
git config --local core.hooksPath ./.githooksTo build, test and install Diffuse locally:
flatpak install runtime/org.gnome.Sdk/$(uname -m)/48
flatpak-builder --user --install build-flatpak io.github.mightycreak.Diffuse.ymlTo run Diffuse through Flatpak:
flatpak run --user io.github.mightycreak.DiffuseTo uninstall Diffuse:
flatpak remove --user io.github.mightycreak.DiffuseDiffuse is using Meson as its build system.
To build and test Diffuse:
meson setup build
meson compile -C build
meson test -C buildTo install Diffuse on your system (e.g. /usr/local/):
meson install -C build # requires admin privilegesTo run Diffuse:
diffuseMeson allows to change the default installation directories, see command-line documentation.
To install Diffuse in a custom directory (e.g. ~/bin/diffuse):
meson install -C build --destdir ~/bin/diffuseTo run Diffuse:
export PYTHONPATH=$HOME/bin/diffuse/usr/local/share/diffuse
cd ~/bin/diffuse/usr/local/bin
./diffuseTo uninstall Diffuse afterwards:
sudo ninja uninstall -C build
sudo rm -v /usr/local/share/locale/*/LC_MESSAGES/diffuse.moDiffuse is using Meson as its build system, this is the only supported system on macOS.
To build and test Diffuse:
meson setup build
meson compile -C build
meson test -C buildTo install Diffuse on your system (e.g. /Applications/ and /opt/homebrew/
or /usr/local/):
meson install -C build # requires admin privilegesTo run Diffuse:
diffuseNote: The diffuse command can be used to launch Diffuse as a native Mac app
that is installed into /Applications/Diffuse.app.
Note: The Windows port is not maintained and would need some love. Contributions are very welcome! 😉
The windows-installer directory contains scripts for building an installable
package for Windows that includes all dependencies.
Diffuse can be packaged as a portable application by copying the installation
directory to a pen drive and creating a front end that sets the
XDG_CONFIG_HOME and XDG_DATA_DIR environment variables prior to launching
Diffuse. The XDG_CONFIG_HOME and XDG_DATA_DIR environment variables
indicate where Diffuse should store persistent settings (eg. the path to a
writable directory on the pen drive).