diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8677a79..8db779b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,4 +35,5 @@ jobs: restore-keys: | mkdocs-material- - run: pip install mkdocs-material + - run: pip install mkdocs-video - run: mkdocs gh-deploy --force diff --git a/README.md b/README.md index 1e28b8d..c07e1f4 100644 --- a/README.md +++ b/README.md @@ -58,12 +58,14 @@ The steps for MacOS are almost the same, but due to the way `$TMPDIR` works, you - Download the latest build from the [releases](https://github.com/EnderIce2/rpc-bridge/releases) - Open the archive and make the `launchd.sh` script executable by doing: `chmod +x launchd.sh` -- To **install** the LaunchAgent, run `./launchd install` and to **remove** it simply run `./launchd remove`. +- To **install** the LaunchAgent, run `./launchd.sh install` and to **remove** it simply run `./launchd.sh remove`. The script will add a LaunchAgent to your user, that will symlink the `$TMPDIR` directory to `/tmp/rpc-bridge/tmpdir`. *Note: You will need to launch the `bridge.exe` file manually in Wine at least once for it to register and launch automatically the next time.* +More details on how to install the LaunchAgent can be found in the [documentation](https://enderice2.github.io/rpc-bridge/). + ## Compiling from source - Install the `wine`, `gcc-mingw-w64` and `make` packages. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..8e42e48 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,35 @@ +# Documentation + +> **Note:** This documentation is built and deployed using [MkDocs Material](https://squidfunk.github.io/mkdocs-material/) (with mkdocs-video) via GitHub Actions. For the best experience, view it on the [published site](https://enderice2.github.io/rpc-bridge/) or with MkDocs locally. Some features (such as tabs, videos, or special formatting) may not display correctly in plain Markdown viewers. + +This repository contains the documentation for the project. It is written in Markdown and rendered using MkDocs. + +## Getting Started + +To view the documentation locally, install the required Python packages: + +```bash +pip install mkdocs mkdocs-material mkdocs-video +``` + +Once installed, you can serve the documentation locally by running: + +```bash +mkdocs serve +``` + +This will start a local web server and you can view the documentation in your browser at `http://127.0.0.1:8000`. + +## Contributing + +If you want to contribute to the documentation, please follow these steps: + +1. Fork the repository. +2. Make your changes in a branch. +3. Submit a pull request. + +Please ensure that your changes are consistent with the existing style and structure of the documentation. + +## License + +This documentation is licensed under the MIT License. See the LICENSE file for more information. diff --git a/docs/assets/macos-crossover.mp4 b/docs/assets/macos-crossover.mp4 new file mode 100644 index 0000000..da4068b Binary files /dev/null and b/docs/assets/macos-crossover.mp4 differ diff --git a/docs/index.md b/docs/index.md index 155f3dc..5c2bb8a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -27,6 +27,35 @@ For v1.0, see [the original README](https://github.com/EnderIce2/rpc-bridge/blob --- +## My game is not showing up in Discord + +If your game is not showing up in Discord, please check the following: + +- The game you are playing has [Rich Presence](https://discord.com/developers/docs/rich-presence/overview) support! + - Some games may not have this feature. It's up to developers of the game to implement it. + This is not an issue related to the bridge. + +- You followed the installation steps correctly. + +- You are using the latest version of the bridge. Currently is ![GitHub Release](https://img.shields.io/github/v/release/EnderIce2/rpc-bridge?style=flat-square&label=%20). + +### I still want to see the game in Discord! + +This is outside the scope of this project, but here are some workarounds: + +- You can manually add the game to Discord by going to `User Settings >` under `Activity Settings` in `Registered Games` tab. [Official Article](https://support.discord.com/hc/en-us/articles/7931156448919-Activity-Status-Recent-Activity#h_01HTJA8QV5ABSA6FY6GEPMA946) + - Tip: You can rename the game to whatever you want. + +--- + +## Compiling from source + +- Install the `wine`, `gcc-mingw-w64` and `make` packages. +- Open a terminal in the directory that contains this file and run `make`. +- The compiled executable will be located in `build/bridge.exe`. + +--- + ## Examples [**League Of Legends**](https://www.leagueoflegends.com/en-us/) running under Wine using Lutris diff --git a/docs/installation.md b/docs/linux.md similarity index 77% rename from docs/installation.md rename to docs/linux.md index 4737c1e..49f2253 100644 --- a/docs/installation.md +++ b/docs/linux.md @@ -62,19 +62,6 @@ This method is recommended because it's easier to manage. - Globally - `flatpak override --user --filesystem=xdg-run/discord-ipc-0` -## macOS - -The steps for MacOS are almost the same, but due to the way `$TMPDIR` works, you will have to install a **LaunchAgent**. - -- Download the latest build from the [releases](https://github.com/EnderIce2/rpc-bridge/releases) -- Open the archive and make the `launchd.sh` script executable by doing: `chmod +x launchd.sh` -- To **install** the LaunchAgent, run `./launchd install` and to **remove** it simply run `./launchd remove`. - -The script will add a LaunchAgent to your user, that will symlink the `$TMPDIR` directory to `/tmp/rpc-bridge/tmpdir`. - -!!! info "Note" - You will need to launch the `bridge.exe` file manually in Wine at least once for it to register and launch automatically the next time. - ## Run without installing the service If you prefer not to use the service, you can manually run `bridge.exe` within the Wine prefix. @@ -98,10 +85,4 @@ In Lutris, you can achieve this by adding the path to `bridge.exe` in the `Execu In Wine, all you need to do is run `bridge.exe` and select `Start`. -## Compiling from source - -- Install the `wine`, `gcc-mingw-w64` and `make` packages. -- Open a terminal in the directory that contains this file and run `make`. -- The compiled executable will be located in `build/bridge.exe`. - [^1]: As requested [here](https://github.com/EnderIce2/rpc-bridge/issues/2). diff --git a/docs/macos.md b/docs/macos.md new file mode 100644 index 0000000..6e78226 --- /dev/null +++ b/docs/macos.md @@ -0,0 +1,28 @@ +# Installation + +Installation will copy itself to `C:\windows\bridge.exe` and create a Windows service. +Logs are stored in `C:\windows\logs\bridge.log`. + +## Preparing macOS for Installation + +Before proceeding with the installation, you need to set up a **LaunchAgent** due to the way `$TMPDIR` works on macOS. + +- Download the latest build from the [releases](https://github.com/EnderIce2/rpc-bridge/releases). +- Open the archive and make the `launchd.sh` script executable by doing: `chmod +x launchd.sh`. +- To **install** the LaunchAgent, run `./launchd.sh install` and to **remove** it simply run `./launchd.sh remove`. + +The script will add a LaunchAgent to your user, that will symlink the `$TMPDIR` directory to `/tmp/rpc-bridge/tmpdir`. + +## Video Tutorial on how to install the LaunchAgent + bridge inside CrossOver + +![type:video](assets/macos-crossover.mp4){: style='width: 66%; height: 20vw;'} + +## Wine (~/.wine) + +- Double click `bridge.exe` and click `Install`. + - ![gui](assets/gui.png "rpc-bridge GUI") +- To remove, the same process can be followed, but click `Remove` instead. + +## Run without installing the service + +If you prefer not to use the service, you can manually run `bridge.exe` within the prefix, and click on `Start` in the GUI. diff --git a/docs/usage.md b/docs/usage.md index fa31e95..f88e5c0 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -8,7 +8,7 @@ - `Install` will install the service. - `Remove` will uninstall the service. -## Commands +## CLI - `--help` Show help message - This will show the help message diff --git a/mkdocs.yml b/mkdocs.yml index ecd8d8e..f1ea8bd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -70,7 +70,9 @@ markdown_extensions: alternate_style: true plugins: - offline + - mkdocs-video nav: - Home: index.md - - Installation: installation.md + - Linux: linux.md + - macOS: macos.md - Usage: usage.md