From d692b8dc991348c926163095c50206172b800e62 Mon Sep 17 00:00:00 2001 From: MeexReay Date: Tue, 17 Jun 2025 08:14:25 +0300 Subject: [PATCH] compiling docs --- README.md | 5 +++++ docs/compiling.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 docs/compiling.md diff --git a/README.md b/README.md index 95d8d7b..573804f 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ better RAC client NO SOLUTION +Read [compiling docs](docs/compiling.md) to build it manually. + ### download binary go to [releases](https://github.com/MeexReay/bRAC/releases/latest) and download file you need. its simple. @@ -59,6 +61,8 @@ cargo build -r # build release (target/release/bRAC) cargo run -r # build and run ``` +Read more about that on the [compiling docs](docs/compiling.md). + ### nix package If you have Nix package manager installed, you can use: @@ -82,6 +86,7 @@ messages starting with a slash are sent to chat only if the `--disable-commands` ## docs +- [Compiling](docs/compiling.md) - [Message formats](docs/message_formats.md) - [Authenticated mode](docs/auth_mode.md) - [WRAC protocol (v2.0)](docs/wrac.md) diff --git a/docs/compiling.md b/docs/compiling.md new file mode 100644 index 0000000..9a09573 --- /dev/null +++ b/docs/compiling.md @@ -0,0 +1,52 @@ +# How to compile it + +## Windows + +1. Install [rustup](https://rustup.rs/) +2. Install [MSVC](https://visualstudio.microsoft.com/visual-cpp-build-tools/) and run `rustup default stable-msvc` +3. Extract [GTK4 from gvsbuild](https://github.com/wingtk/gvsbuild/releases/tag/latest) to `C:\gtk` +4. Update environment variables: + - Go to Start + - Search for 'Advanced system settings' + - Click 'Environment Variables...' + - Add `C:\gtk\lib\pkgconfig` to the PKG_CONFIG_PATH variable + - Add `C:\gtk\bin` to the PATH variable + - Add `C:\gtk\lib` to the Lib variable + - Save and exit +5. Open the repository directory in console (download it from github or with `git clone https://github.com/MeexReay/bRAC.git`) +6. Run `cargo build -r -F libnotify winapi` +7. Done! Your finished binary is in the `target/release` folder. + +## Linux / MacOS + +1. Install `rust`, `openssl-dev`, `gtk4-dev` with your package manager +2. Open the repository directory in console (download it from github or with `git clone https://github.com/MeexReay/bRAC.git`) +3. Run `cargo build -r` +4. Done! Your finished binary is in the `target/release` folder. + +# Troubleshooting + +## Windows / MacOS + +### Doesnt compile / doesnt work + +Write a new issue here and dont google anything!!1 + +## Linux + +### Notifications dont work + +There are Two solutions: + +- Switch to `libnotify`: + +Just add the new feature to cargo: `cargo build -r -F libnotify` \ +Libnotify sucks in many situations, but its cross-compiling and always work + +- Make a desktop file: + +Enter the repository folder and run: `./misc/create-desktop.sh` \ +You'll get a desktop file contents, just edit paths here and write it to a new file in the `~/.local/share/applications` or `/usr/share/applications`\ +All of these, with adding icons and other, makes this command: `make install` (using `gnumake` package) \ +But make sure, that you have `.local/bin` in the `PATH` variable, otherwise it won't work. \ +Now, if you'll run with the desktop file, GNotifications will work perfectly. \ No newline at end of file