Installation

Srain is available on GNU/Linux, Windows and macOS.

Dependencies

Name Notes Version
coreutils Only for building  
make Only for building  
gcc Only for building  
pkg-config Only for building  
gettext    
glib2    
glib-networking Optional, For TLS connection support  
gtk+3   >= 3.18
libsoup    
libconfig   >= 1.5

Building

You should install the aboved Dependencies on your platform before the following steps.

Firstly, download source code of srain, you can get source code of latest release:

Note

The development of 1.0 release is working in progress.

Or get git version:

$ git clone https://github.com/SilverRainZ/srain.git
$ cd srain

Setup build options and start building:

$ ./configure                     \
      --prefix=/usr/local         \
      --datadir=/usr/local/share  \
      --sysconfdir=/etc
$ make

Note

The configure script DOES NOT check any dependience. You should make sure that you have all dependencies installed.

Install(root privileges required):

# make install

Build and install documentation:

$ make doc
# make install-doc

Distribution Packages

GNU/Linux

Arch Linux

Packages srain and srain-git (git version) are available on AUR, it is quite easy to install using AUR helper(yay as an example):

$ yay -S srain
$ yay -S srain-git # git version

If you are the user of Arch Linux CN Repository, try:

# pacman -S archlinuxcn/srain
# pacman -S archlinuxcn/srain-git # git version

Debian

Warning

This package is broken now.

dfceaef has written Debian package script for Srain, but it is already out of date, I will be glad if anyone can fix it.

Flatpak

cpba is maintaining Flatpak manifest for Srain and The built package is available on Flathub, just execute the following commands to install if you already have flatpak installed:

$ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
$ flatpak install flathub im.srain.Srain

Gentoo

rtlanceroad is maintaining Gentoo ebuilds for Srain, please refer to it for more details.

openSUSE

alois is maintaining openSUSE package for Srain, following this link to install it.

Windows

Warning

Windows support of Srain is still experimental.

Srain requires Windows 7 or later.

The easiest way to build/run Srain on Windows is using the toolchains provided by MSYS2 project.

Firstly install MSYS2, then open a MSYS2 shell, install the basic build tools:

$ pacman -S base-devel
$ pacman -S mingw-w64-i686-toolchain     # For 32-bit Windows
$ pacman -S mingw-w64-x86_64-toolchain   # For 64-bit Windows

Then download the package script from MinGW PKGBUILD for Srain, run the following commands at the directory of PKGBUILD:

$ MINGW_INSTALLS=mingw32 makepkg-mingw -fsi # For 32-bit Windows
$ MINGW_INSTALLS=mingw64 makepkg-mingw -fsi # For 64-bit Windows

If everything goes well, Srain is installed under your MinGW prefix.

Note

If you suffer the “error while loading shared libraries: xxxx.dll: cannot open shared object file: No such file or directory” problem when running, please run it in cmd but not msys2 shell, and it will show you real missing library. [1]

[1]https://github.com/Alexpux/MINGW-packages/issues/3939#issuecomment-397988379

macOS

Warning

macOS support of Srain is still experimental.

There is not a distribution package or package script for Srain on macOS, you should build Srain by yourself.

Firstly install Homebrew, run the following commands to install dependencies:

$ brew install coreutils gcc pkg-config # building
$ brew install gettext glib-networking gtk+3 libsoup libconfig

Then follow the steps in Building.