From ae14e67f11ae85320295d5249890da7b9b57342d Mon Sep 17 00:00:00 2001 From: tretrauit Date: Wed, 1 Jun 2022 23:48:17 +0700 Subject: [PATCH] feat: add discord_rpc.sh chore: update garena readme --- apps/Lutris/README.md | 20 ++++++++++++++++++-- apps/Lutris/discord_rpc.sh | 6 ++++++ games/LoL/linux/README.md | 7 ++++++- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100755 apps/Lutris/discord_rpc.sh diff --git a/apps/Lutris/README.md b/apps/Lutris/README.md index 0356b34..d1e6e27 100644 --- a/apps/Lutris/README.md +++ b/apps/Lutris/README.md @@ -1,7 +1,8 @@ # Lutris scripts ## `preloader.sh` Execute multiple scripts in a folder (default is `./preloader`), usually useful for Lutris Pre-launch/Post-exit script -+ This script will execute scripts in **current directory** *(where `preloader.sh` is executed)*, so for example if a script need a file called `nightmare`, and preloader.sh is in `~`, **put it in `~`** instead of `~/preloader/nightmare` ++ Logging is enabled by default, but can be disabled by changing DEBUG to 0 in script source (`DEBUG=0`) +> This script will execute scripts in **current directory** *(where `preloader.sh` is executed)*, so for example if a script need a file called `nightmare`, and preloader.sh is in `~`, **put it in `~`** *instead of `~/preloader/nightmare`* ### Installation + To download `preloader.sh` itself: ```sh @@ -11,6 +12,21 @@ chmod +x preloader.sh + After that, copy/move this script to the game prefix you want to use, then in Lutris: - Set pre-launch script in Lutris to where `preloader.sh` is located. - Disable **Wait for pre-launch script completion** - - *(Optional)* Enable **Disable Lutris Runtime** + ++ **IMPORTANT**: Now, to add pre-launch script, instead of setting them in Lutris, add them to `./preloader` (or the folder you specified). ++ Enjoy :L + +## `discord_rpc.sh` +Launch winediscordrpcbridge.exe, to be able to get Discord Rich Presence on Wine applications on the specified prefix. + +### Installation ++ To download `discord_rpc.sh` itself: +```sh +curl -OL https://gitlab.com/tretrauit/scripts/-/raw/main/apps/Lutris/discord_rpc.sh +chmod +x discord_rpc.sh +``` ++ After that, copy/move this script to the game prefix you want to use, then in Lutris: + - Set pre-launch script in Lutris to where `discord_rpc.sh` is located. + - Disable **Wait for pre-launch script completion** + Enjoy :L diff --git a/apps/Lutris/discord_rpc.sh b/apps/Lutris/discord_rpc.sh new file mode 100755 index 0000000..6968228 --- /dev/null +++ b/apps/Lutris/discord_rpc.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Launch winediscordipcbridge.exe automatically. + +echo "wine: $WINE" +echo "prefix: $WINEPREFIX" +$WINE ./winediscordipcbridge.exe diff --git a/games/LoL/linux/README.md b/games/LoL/linux/README.md index a12e617..740dce0 100644 --- a/games/LoL/linux/README.md +++ b/games/LoL/linux/README.md @@ -23,7 +23,8 @@ chmod +x sulaunchhelper2.sh ## `garena_wrapper.sh` This script automates the launching of [lol.py](https://github.com/nhubaotruong/league-of-legends-linux-garena-script) (LoL in Garena client) so you don't have to manually do it ;) ### Installation -> This script no longer wrap `syscall_check.sh`, if you need to execute that script alongside this one, I recommend you to take a look at [preloader.sh](../../../apps/Lutris#preloadersh) +> This script no longer wrap `syscall_check.sh`, if you need to execute that script alongside this one, I recommend you to take a look at [`preloader.sh`](../../../apps/Lutris#preloadersh) +If you do plan to use `preloader.sh` then I **highly recommend you** to **disable logging**, because **lol.py and `preloader.sh` will log your token to ./preloader/preloader_garena_wrapper.sh.log if you keep it enabled**, hence your account may get compromised. You need to follow steps in `lol.py` repository to properly config your LoL prefix. + To install you must have `lol.py` present, if not you can execute these to quickly download them (to current directory): @@ -42,3 +43,7 @@ chmod +x garena_wrapper.sh - Enable **Disable Lutris Runtime** > Failure to do above steps will result in Zenity can't show necessary messages dialog so LoL UI may not launch properly (it'll still launch if you use `sulaunchhelper2.sh` and have installed it correctly). + Enjoy your Garena LoL experience :P + +## [`discord_rpc.sh`](../../../apps/Lutris#discord_rpcsh) ++ This script will bridge Discord RPC from LoL prefix to your linux Discord. ++ Click on the script name to get more info & installation.