Latest Version: 2021-09-23 Version 1.3.0
Total Page:16
File Type:pdf, Size:1020Kb
Srain Documentation Release 1.3.0 Shengyu Zhang Sep 21, 2021 Contents 1 All pages 3 1.1 Srain...................................................3 1.2 Quick Start................................................4 1.3 Installation................................................9 1.4 Commands Manual............................................ 14 1.5 Configuration Manual.......................................... 22 1.6 Development Specification........................................ 29 1.7 Miscellaneous.............................................. 30 1.8 Frequently Asked Questions....................................... 30 1.9 Change Log............................................... 34 1.10 Support Tables.............................................. 44 2 Indices and Tables 47 i ii Srain Documentation, Release 1.3.0 Welcome to Srain documentation! Latest version: 2021-09-23 Version 1.3.0. The source code of this documentation is hosted on GitHub. If you found any mistake, feel free to file issue or pull request. Contents 1 Srain Documentation, Release 1.3.0 2 Contents CHAPTER 1 All pages 1.1 Srain Modern IRC client written in GTK. Home| Documentation| Source code 3 Srain Documentation, Release 1.3.0 1.1.1 Packaging Status 1.1.2 Features • Fully open source • RFC {1459,2812} compatible • Partial IRCv3 support • Multi-platform support (Linux, Windows, macOS and BSD) • Act like modern IM client – Graphical user interface – Convenient connection panel – Interactive channel search – Forward message in one click – URL preview – Desktop notificaion – Special optimization for bridge/relay bot • Act like geek IRC client – Anything can be done via commands – Fine-grained configuration with hot update support – Regex based message render and filter mechanisms – IPC based plugin system (TODO) 1.1.3 Need Help? Frequently Asked Questions may be helpful. Feel free to contact us if you have any question about Srain. • IRC Channel: #srain @ Libera Chat • Github: file an issue Here 1.1.4 License GNU General Public License Version 3 1.2 Quick Start 4 Chapter 1. All pages Srain Documentation, Release 1.3.0 • Start Srain • Connect to IRC server – Predefined Server – Custom Server – Using Command • Join Channel – Directly Join – Search Channel – Using Command Note: For your information, the following screenshots are taken under GNOME 3.34.4 with Wayland backed with Arc GTK theme and Breeze icon theme. 1.2.1 Start Srain After the Installation of Srain, you will find Srain in your applications list, if not, just type srain in your shell to run it. Then you will see Srain’s initial interface. 1.2. Quick Start 5 Srain Documentation, Release 1.3.0 1.2.2 Connect to IRC server freenode is a famous IRC network, the official channel of Srain #srain is also hosted on it. Let’s start by connecting to freenode. Predefined Server Srain has a predefined list of commonly used IRC servers, freenode is one of it. If you want to add server into this list, refer to Configuration Manual. Click the connection button on the Srain header bar, select the page “Quick Mode”, select the item “freenode” from candidate box with label “Server”, enter your nickname, then click the “Connect” button: If everything goes well, Srain should connected to freenode, then your would see some message from freenode’s server: Custom Server While the server your want to connect to is not listed in the predefined list, switch to the page “Advanced Mode”, enter the hostname, port, and etc. Note: • If the port is a TLS port, make sure that the option “Use secure connection” is checked. • If the server’s certificate is untrusted and you insist on continuing, check the option “Do not verify certificate”. 6 Chapter 1. All pages Srain Documentation, Release 1.3.0 Then click the “Connect” button: Using Command Refer to /server and /connect. If you want to automatically execute commands at each time Srain starts, please refer to Playground. 1.2.3 Join Channel After connecting to freenode, now let’s try to join #srain, the official channel of Srain. Directly Join While your has a clear channel to join, such as #srain, just click the join button, select the page “Join Channel”, enter the channel name in the input entry with label “Channel”, then click the “Join” button: Now you should joined the channel: Search Channel While you don’t know the exact name of the channel, click the join button, switch to page “Search Channel”, click the button with “refresh” icon, Srain should start receiving channel list from server. 1.2. Quick Start 7 Srain Documentation, Release 1.3.0 8 Chapter 1. All pages Srain Documentation, Release 1.3.0 Then you can enter the keyword or specify the filter conditions to search channel. For example we enter “#s”, select the channel you want to join from channe list, then click “Join” button to join it. Note: If the channel requires a join password, try double click the row of channel. Using Command Refer to /join. 1.3 Installation Srain is available on GNU/Linux, Windows, macOS and BSD. • Dependencies • Building – Play with Meson – Makefile Helper • Distribution Packages 1.3. Installation 9 Srain Documentation, Release 1.3.0 – GNU/Linux * Arch Linux * Debian · Pre-built package · Build byself * Fedora * Flatpak * Gentoo * openSUSE – Windows * Pre-built package * Build byself – macOS – BSD * OpenBSD 10 Chapter 1. All pages Srain Documentation, Release 1.3.0 1.3.1 Dependencies Name Notes Version meson Only for Building > 0.45.0 make Optional, only for development appstream Only for building, on Debian-based distributions coreutils Only for building gcc Only for building pkg-config Only for building gettext Only for building glib2 glib-networking Optional, for TLS connection support gtk+3 >= 3.18 libsoup libconfig >= 1.5 libsecret openssl python-sphinx Optional, for building documentation 1.3.2 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: $ wget https://github.com/SrainApp/srain/archive/1.3.0.tar.gz $ tar -xvzf 1.3.0.tar.gz $ cd srain-1.3.0 Or get git version: $ git clone https://github.com/SrainApp/srain.git $ cd srain Play with Meson Srain use Meson with ninja backend as its build system. You can build it via the following commands: $ meson setup builddir $ cd builddir $ ninja Install(root privileges required): $ cd builddir # ninja install HTML documentation and manpage are built and installed by default, if you don’t need them, just set meson option doc_builders to an empty array when setup: $ meson setup -Ddoc_builders=[] builddir 1.3. Installation 11 Srain Documentation, Release 1.3.0 Makefile Helper We also provide a simple Makefile helper to simplify meson commands. It is convenient for development. $ make # Build srain $ make build # Same as above $ make install # Install srain to prefix under project root $ make run # Run srain with isolated $HOME and XDG Directory $ make debug # Same as `make run`, but with GDB attached $ make inspect # Same as `make run`, but with GtkInspector $ make clean # Remove all compilation and installation result $ make doc # View installed HTML documentation 1.3.3 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 There is no srain package in the official repository yet. Pre-built package We provide pre-built deb package that you can get it from Github release page. Build byself Copy the debian folder on srain-contrib to srain folder. Then type following command on your terminal: $ dpkg-buildpackage -b -us -uc Note that the dependencies mentioned above also should be installed. The details could be found on debian/crontrol file. Then install the package (replace package name with the name of your package): $ sudo apt-get install -f ../srain_1.3.0-1_amd64.deb 12 Chapter 1. All pages Srain Documentation, Release 1.3.0 Fedora Srain now in offical repository of fedora, use dnf to install it. # dnf install srain 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 Please refers to gentoo portage overlays. openSUSE alois is maintaining openSUSE package for Srain, following this link to install it. Windows Srain requires Windows 7 or later. Pre-built package After 2020-08-10 Version 1.1.2, we provide Windows portable binary that you can get it from Github release page. Build byself If you want to build Srain on Windows youself, you should use 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 1.3. Installation 13 Srain Documentation, Release 1.3.0 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 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.