mirror of
https://github.com/EnderIce2/rpc-bridge.git
synced 2025-05-30 00:08:04 +00:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
c1078b5b8b | |||
1de80cdbb9 | |||
975ace70f9 | |||
ad076dfac7 | |||
8c54d5bb2f | |||
a0615229ef | |||
18c422101b | |||
77a2a748ad | |||
0d4f46e536 | |||
d065019137 | |||
e03dce1a7c | |||
7c806779d2 | |||
885cf775f9 | |||
7c07952df1 | |||
ea566cfdeb | |||
d56de21e74 | |||
26a016cb26 | |||
edfcce2ae9 |
35
.github/workflows/build.yml
vendored
Normal file
35
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Build Project
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
paths-ignore:
|
||||||
|
- 'ISSUE_TEMPLATE/**'
|
||||||
|
- 'workflows/**'
|
||||||
|
- '.vsocde/**'
|
||||||
|
- 'docs/**'
|
||||||
|
pull_request:
|
||||||
|
branches: [ "master" ]
|
||||||
|
paths-ignore:
|
||||||
|
- 'ISSUE_TEMPLATE/**'
|
||||||
|
- 'workflows/**'
|
||||||
|
- '.vsocde/**'
|
||||||
|
- 'docs/**'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: dependencies
|
||||||
|
run: sudo apt update && sudo apt -y install gcc-mingw-w64 make
|
||||||
|
- name: make
|
||||||
|
run: make
|
||||||
|
- name: artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: bridge
|
||||||
|
path: build
|
@ -1,29 +1,21 @@
|
|||||||
name: Build and Deploy docs
|
name: Deploy Documentation
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- docs/**
|
||||||
|
- mkdocs.yml
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
|
paths:
|
||||||
|
- docs/**
|
||||||
|
- mkdocs.yml
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: dependencies
|
|
||||||
run: sudo apt update && sudo apt -y install gcc-mingw-w64 make
|
|
||||||
- name: make
|
|
||||||
run: make
|
|
||||||
- name: artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: bridge
|
|
||||||
path: build
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -43,4 +35,5 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
mkdocs-material-
|
mkdocs-material-
|
||||||
- run: pip install mkdocs-material
|
- run: pip install mkdocs-material
|
||||||
|
- run: pip install mkdocs-video
|
||||||
- run: mkdocs gh-deploy --force
|
- run: mkdocs gh-deploy --force
|
6
Makefile
6
Makefile
@ -4,7 +4,9 @@ C_OBJECTS = $(C_SOURCES:.c=.o)
|
|||||||
GIT_COMMIT = $(shell git rev-parse --short HEAD)
|
GIT_COMMIT = $(shell git rev-parse --short HEAD)
|
||||||
GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
|
GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
|
|
||||||
CFLAGS = -std=c17 -Wno-int-conversion -DGIT_COMMIT='"$(GIT_COMMIT)"' -DGIT_BRANCH='"$(GIT_BRANCH)"'
|
CWARNFLAGS = -Wno-int-conversion -Wno-incompatible-pointer-types
|
||||||
|
|
||||||
|
CFLAGS = -std=c17 -DGIT_COMMIT='"$(GIT_COMMIT)"' -DGIT_BRANCH='"$(GIT_BRANCH)"'
|
||||||
LFLAGS = -lgdi32 -lws2_32
|
LFLAGS = -lgdi32 -lws2_32
|
||||||
|
|
||||||
# DBGFLAGS = -Wl,--export-all-symbols -g -O0 -ggdb3 -Wall
|
# DBGFLAGS = -Wl,--export-all-symbols -g -O0 -ggdb3 -Wall
|
||||||
@ -18,7 +20,7 @@ build: $(C_OBJECTS)
|
|||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(info Compiling $<)
|
$(info Compiling $<)
|
||||||
x86_64-w64-mingw32-gcc $(CFLAGS) $(DBGFLAGS) -c $< -o $@
|
x86_64-w64-mingw32-gcc $(CFLAGS) $(CWARNFLAGS) $(DBGFLAGS) -c $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(C_OBJECTS) build/bridge.exe bridge.res
|
rm -f $(C_OBJECTS) build/bridge.exe bridge.res
|
||||||
|
@ -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)
|
- 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`
|
- 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`.
|
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.*
|
*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
|
## Compiling from source
|
||||||
|
|
||||||
- Install the `wine`, `gcc-mingw-w64` and `make` packages.
|
- Install the `wine`, `gcc-mingw-w64` and `make` packages.
|
||||||
|
49
bridge.c
49
bridge.c
@ -20,11 +20,13 @@
|
|||||||
#define __darwin_close 0x2000006
|
#define __darwin_close 0x2000006
|
||||||
#define __darwin_socket 0x2000061
|
#define __darwin_socket 0x2000061
|
||||||
#define __darwin_connect 0x2000062
|
#define __darwin_connect 0x2000062
|
||||||
|
#define __darwin_mmap 0x20000C5
|
||||||
#define __darwin_fcntl 0x200005C
|
#define __darwin_fcntl 0x200005C
|
||||||
#define __darwin_sysctl 0x20000CA
|
#define __darwin_sysctl 0x20000CA
|
||||||
|
|
||||||
#define O_RDONLY 00
|
#define O_RDONLY 00
|
||||||
|
|
||||||
|
/* macos & linux are the same for PROT_READ, PROT_WRITE, MAP_FIXED & MAP_PRIVATE */
|
||||||
#define PROT_READ 1
|
#define PROT_READ 1
|
||||||
#define PROT_WRITE 2
|
#define PROT_WRITE 2
|
||||||
#define MAP_PRIVATE 0x02
|
#define MAP_PRIVATE 0x02
|
||||||
@ -32,6 +34,8 @@
|
|||||||
#define MAP_ANON 0x20
|
#define MAP_ANON 0x20
|
||||||
#define MAP_FAILED ((void *)-1)
|
#define MAP_FAILED ((void *)-1)
|
||||||
|
|
||||||
|
#define __darwin_MAP_ANON 0x1000
|
||||||
|
|
||||||
#define SYS_SOCKET 1
|
#define SYS_SOCKET 1
|
||||||
#define SYS_CONNECT 3
|
#define SYS_CONNECT 3
|
||||||
|
|
||||||
@ -134,8 +138,17 @@ static inline int sys_close(int fd)
|
|||||||
|
|
||||||
static inline unsigned int *sys_mmap(unsigned int *addr, size_t length, int prot, int flags, int fd, off_t offset)
|
static inline unsigned int *sys_mmap(unsigned int *addr, size_t length, int prot, int flags, int fd, off_t offset)
|
||||||
{
|
{
|
||||||
assert(IsLinux);
|
if (IsLinux)
|
||||||
return linux_syscall(__linux_mmap2, addr, length, prot, flags, fd, offset);
|
return linux_syscall(__linux_mmap2, addr, length, prot, flags, fd, offset);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (flags & MAP_ANON)
|
||||||
|
{
|
||||||
|
flags &= ~MAP_ANON;
|
||||||
|
flags |= __darwin_MAP_ANON;
|
||||||
|
}
|
||||||
|
return darwin_syscall(__darwin_mmap, addr, length, prot, flags, fd, offset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int sys_munmap(unsigned int *addr, size_t length)
|
static inline int sys_munmap(unsigned int *addr, size_t length)
|
||||||
@ -285,9 +298,6 @@ void ConnectToSocket(int fd)
|
|||||||
"%s/snap.discord-canary/discord-ipc-%d",
|
"%s/snap.discord-canary/discord-ipc-%d",
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sockaddr_un *socketAddr = sys_mmap(0x23000, 0x1000, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
|
||||||
socketAddr->sun_family = AF_UNIX;
|
|
||||||
|
|
||||||
int sockRet = 0;
|
int sockRet = 0;
|
||||||
for (int i = 0; i < sizeof(discordUnixSockets) / sizeof(discordUnixSockets[0]); i++)
|
for (int i = 0; i < sizeof(discordUnixSockets) / sizeof(discordUnixSockets[0]); i++)
|
||||||
{
|
{
|
||||||
@ -296,12 +306,16 @@ void ConnectToSocket(int fd)
|
|||||||
|
|
||||||
for (int j = 0; j < 16; j++)
|
for (int j = 0; j < 16; j++)
|
||||||
{
|
{
|
||||||
|
if (IsLinux)
|
||||||
|
{
|
||||||
|
struct sockaddr_un *socketAddr = sys_mmap(0x23000, 0x1000, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
||||||
|
print("Socket address allocated at %#lx\n", socketAddr);
|
||||||
|
socketAddr->sun_family = AF_UNIX;
|
||||||
|
|
||||||
snprintf(pipePath, pipePathLen, discordUnixSockets[i], runtime, j);
|
snprintf(pipePath, pipePathLen, discordUnixSockets[i], runtime, j);
|
||||||
strcpy_s(socketAddr->sun_path, sizeof(socketAddr->sun_path), pipePath);
|
strcpy_s(socketAddr->sun_path, sizeof(socketAddr->sun_path), pipePath);
|
||||||
print("Probing %s\n", pipePath);
|
print("Probing %s\n", pipePath);
|
||||||
|
|
||||||
if (IsLinux)
|
|
||||||
{
|
|
||||||
// unsigned long socketArgs[] = {
|
// unsigned long socketArgs[] = {
|
||||||
// (unsigned long)fd,
|
// (unsigned long)fd,
|
||||||
// (unsigned long)(intptr_t)&socketAddr,
|
// (unsigned long)(intptr_t)&socketAddr,
|
||||||
@ -315,7 +329,16 @@ void ConnectToSocket(int fd)
|
|||||||
sockRet = sys_socketcall(SYS_CONNECT, socketArgs);
|
sockRet = sys_socketcall(SYS_CONNECT, socketArgs);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
struct sockaddr_un socketAddr;
|
||||||
|
socketAddr.sun_family = AF_UNIX;
|
||||||
|
|
||||||
|
snprintf(pipePath, pipePathLen, discordUnixSockets[i], runtime, j);
|
||||||
|
strcpy_s(socketAddr.sun_path, sizeof(socketAddr.sun_path), pipePath);
|
||||||
|
print("Probing %s\n", pipePath);
|
||||||
|
|
||||||
sockRet = sys_connect(fd, (caddr_t)&socketAddr, sizeof(socketAddr));
|
sockRet = sys_connect(fd, (caddr_t)&socketAddr, sizeof(socketAddr));
|
||||||
|
}
|
||||||
|
|
||||||
print(" error: %d\n", sockRet);
|
print(" error: %d\n", sockRet);
|
||||||
if (sockRet >= 0)
|
if (sockRet >= 0)
|
||||||
@ -347,7 +370,12 @@ void PipeBufferInThread(LPVOID lpParam)
|
|||||||
bridge_thread *bt = (bridge_thread *)lpParam;
|
bridge_thread *bt = (bridge_thread *)lpParam;
|
||||||
print("In thread started using fd %d and pipe %#x\n", bt->fd, bt->hPipe);
|
print("In thread started using fd %d and pipe %#x\n", bt->fd, bt->hPipe);
|
||||||
int EOFCount = 0;
|
int EOFCount = 0;
|
||||||
char *l_buffer = sys_mmap(0x25000, 0x1000, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
char *l_buffer;
|
||||||
|
if (IsLinux)
|
||||||
|
l_buffer = sys_mmap(0x25000, 0x1000, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
||||||
|
else
|
||||||
|
l_buffer = malloc(BUFFER_LENGTH);
|
||||||
|
print("Buffer in thread allocated at %#lx\n", l_buffer);
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
char buffer[BUFFER_LENGTH];
|
char buffer[BUFFER_LENGTH];
|
||||||
@ -439,7 +467,12 @@ void PipeBufferOutThread(LPVOID lpParam)
|
|||||||
{
|
{
|
||||||
bridge_thread *bt = (bridge_thread *)lpParam;
|
bridge_thread *bt = (bridge_thread *)lpParam;
|
||||||
print("Out thread started using fd %d and pipe %#x\n", bt->fd, bt->hPipe);
|
print("Out thread started using fd %d and pipe %#x\n", bt->fd, bt->hPipe);
|
||||||
char *l_buffer = sys_mmap(0x25000, 0x1000, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
char *l_buffer;
|
||||||
|
if (IsLinux)
|
||||||
|
l_buffer = sys_mmap(0x26000, 0x1000, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
||||||
|
else
|
||||||
|
l_buffer = malloc(BUFFER_LENGTH);
|
||||||
|
print("Buffer out thread allocated at %#lx\n", l_buffer);
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
char buffer[BUFFER_LENGTH];
|
char buffer[BUFFER_LENGTH];
|
||||||
|
@ -19,7 +19,7 @@ BEGIN
|
|||||||
VALUE "FileDescription", "Simple bridge that allows you to use Discord Rich Presence with Wine games/software."
|
VALUE "FileDescription", "Simple bridge that allows you to use Discord Rich Presence with Wine games/software."
|
||||||
VALUE "FileVersion", VER_VERSION_STR
|
VALUE "FileVersion", VER_VERSION_STR
|
||||||
VALUE "InternalName", "bridge"
|
VALUE "InternalName", "bridge"
|
||||||
VALUE "LegalCopyright", "Copyright (c) 2024 EnderIce2"
|
VALUE "LegalCopyright", "Copyright (c) 2025 EnderIce2"
|
||||||
VALUE "OriginalFilename", "bridge.exe"
|
VALUE "OriginalFilename", "bridge.exe"
|
||||||
VALUE "ProductName", "rpc-bridge"
|
VALUE "ProductName", "rpc-bridge"
|
||||||
VALUE "ProductVersion", VER_VERSION_STR
|
VALUE "ProductVersion", VER_VERSION_STR
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
@echo off
|
|
||||||
START /WAIT bridge.exe --install
|
|
||||||
|
|
@ -8,6 +8,16 @@ LOCATION=~/Library/Application\ Support/rpc-bridge
|
|||||||
SCRIPT=$LOCATION/rpc-bridge
|
SCRIPT=$LOCATION/rpc-bridge
|
||||||
AGENT=~/Library/LaunchAgents/com.enderice2.rpc-bridge.plist
|
AGENT=~/Library/LaunchAgents/com.enderice2.rpc-bridge.plist
|
||||||
|
|
||||||
|
function is_installed() {
|
||||||
|
if [ -f "$AGENT" ]; then
|
||||||
|
launchctl list | grep -q "com.enderice2.rpc-bridge"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
function install() {
|
function install() {
|
||||||
# Directories
|
# Directories
|
||||||
if [ ! -d "$SYMLINK" ]; then
|
if [ ! -d "$SYMLINK" ]; then
|
||||||
@ -71,9 +81,16 @@ fi
|
|||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
install)
|
install)
|
||||||
|
if is_installed; then
|
||||||
|
echo "LaunchAgent is already installed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
install
|
install
|
||||||
;;
|
;;
|
||||||
remove)
|
remove)
|
||||||
|
if ! is_installed; then
|
||||||
|
echo "LaunchAgent is not installed. Continuing anyway."
|
||||||
|
fi
|
||||||
remove
|
remove
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
@echo off
|
|
||||||
START /WAIT bridge.exe --uninstall
|
|
||||||
|
|
35
docs/README.md
Normal file
35
docs/README.md
Normal file
@ -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.
|
BIN
docs/assets/macos-crossover.webm
Normal file
BIN
docs/assets/macos-crossover.webm
Normal file
Binary file not shown.
@ -9,7 +9,7 @@ Simple bridge that allows you to use Discord Rich Presence with Wine games/softw
|
|||||||
|
|
||||||
[Download latest release](https://github.com/EnderIce2/rpc-bridge/releases/latest/download/bridge.zip "Recommended"){ .md-button .md-button--primary }
|
[Download latest release](https://github.com/EnderIce2/rpc-bridge/releases/latest/download/bridge.zip "Recommended"){ .md-button .md-button--primary }
|
||||||
[Download latest pre-release](https://github.com/EnderIce2/rpc-bridge/releases "Unstable builds with experimental features"){ .md-button }
|
[Download latest pre-release](https://github.com/EnderIce2/rpc-bridge/releases "Unstable builds with experimental features"){ .md-button }
|
||||||
<!-- [Download latest build](https://github.com/EnderIce2/rpc-bridge/actions "Builds from the latest commits, here be dragons!"){ .md-button } -->
|
[Download latest build](https://github.com/EnderIce2/rpc-bridge/actions/workflows/build.yml "Builds from the latest commits, here be dragons!"){ .md-button }
|
||||||
|
|
||||||
Works by running a small program in the background that creates a [named pipe](https://learn.microsoft.com/en-us/windows/win32/ipc/named-pipes) `\\.\pipe\discord-ipc-0` inside the prefix and forwards all data to the pipe `/run/user/1000/discord-ipc-0`.
|
Works by running a small program in the background that creates a [named pipe](https://learn.microsoft.com/en-us/windows/win32/ipc/named-pipes) `\\.\pipe\discord-ipc-0` inside the prefix and forwards all data to the pipe `/run/user/1000/discord-ipc-0`.
|
||||||
|
|
||||||
@ -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 .
|
||||||
|
|
||||||
|
### 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
|
## Examples
|
||||||
|
|
||||||
[**League Of Legends**](https://www.leagueoflegends.com/en-us/) running under Wine using Lutris
|
[**League Of Legends**](https://www.leagueoflegends.com/en-us/) running under Wine using Lutris
|
||||||
|
@ -62,19 +62,6 @@ This method is recommended because it's easier to manage.
|
|||||||
- Globally
|
- Globally
|
||||||
- `flatpak override --user --filesystem=xdg-run/discord-ipc-0`
|
- `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
|
## Run without installing the service
|
||||||
|
|
||||||
If you prefer not to use the service, you can manually run `bridge.exe` within the Wine prefix.
|
If you prefer not to use the service, you can manually run `bridge.exe` within the Wine prefix.
|
||||||
@ -84,28 +71,18 @@ In Lutris, you can achieve this by adding the path to `bridge.exe` in the `Execu
|
|||||||
|
|
||||||
=== "Without bridge"
|
=== "Without bridge"
|
||||||
|
|
||||||
```
|
- Executable
|
||||||
Executable
|
- `/mnt/games/lutris/league-of-legends/drive_c/Riot Games/League of Legends/LeagueClient.exe`
|
||||||
/mnt/games/lutris/league-of-legends/drive_c/Riot Games/League of Legends/LeagueClient.exe
|
- Arguments
|
||||||
Arguments
|
- `--locale=en_US --launch-product=league_of_legends --launch-patchline=live`
|
||||||
--locale=en_US --launch-product=league_of_legends --launch-patchline=live
|
|
||||||
```
|
|
||||||
|
|
||||||
=== "With bridge"
|
=== "With bridge"
|
||||||
|
|
||||||
```
|
- Executable
|
||||||
Executable
|
- `/mnt/games/lutris/league-of-legends/drive_c/bridge.exe`
|
||||||
/mnt/games/lutris/league-of-legends/drive_c/bridge.exe
|
- Arguments
|
||||||
Arguments
|
- `"C:\Riot Games\League of Legends\LeagueClient.exe" --locale=en_US --launch-product=league_of_legends --launch-patchline=live`
|
||||||
"C:\Riot Games\League of Legends\LeagueClient.exe" --locale=en_US --launch-product=league_of_legends --launch-patchline=live
|
|
||||||
```
|
|
||||||
|
|
||||||
In Wine, all you need to do is run `bridge.exe` and select `Start`.
|
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).
|
[^1]: As requested [here](https://github.com/EnderIce2/rpc-bridge/issues/2).
|
28
docs/macos.md
Normal file
28
docs/macos.md
Normal file
@ -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
|
||||||
|
|
||||||
|
{: style='width: 66%; height: 20vw;'}
|
||||||
|
|
||||||
|
## Wine (~/.wine)
|
||||||
|
|
||||||
|
- Double click `bridge.exe` and click `Install`.
|
||||||
|
- 
|
||||||
|
- 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.
|
@ -8,7 +8,7 @@
|
|||||||
- `Install` will install the service.
|
- `Install` will install the service.
|
||||||
- `Remove` will uninstall the service.
|
- `Remove` will uninstall the service.
|
||||||
|
|
||||||
## Commands
|
## CLI
|
||||||
|
|
||||||
- `--help` Show help message
|
- `--help` Show help message
|
||||||
- This will show the help message
|
- This will show the help message
|
||||||
|
16
mkdocs.yml
16
mkdocs.yml
@ -14,22 +14,22 @@ theme:
|
|||||||
palette:
|
palette:
|
||||||
- media: "(prefers-color-scheme)"
|
- media: "(prefers-color-scheme)"
|
||||||
toggle:
|
toggle:
|
||||||
icon: material/weather-sunny
|
icon: material/brightness-auto
|
||||||
name: Switch to light mode
|
name: Switch to dark mode
|
||||||
- media: "(prefers-color-scheme: dark)"
|
- media: "(prefers-color-scheme: dark)"
|
||||||
scheme: slate
|
scheme: slate
|
||||||
primary: black
|
primary: black
|
||||||
accent: indigo
|
accent: indigo
|
||||||
toggle:
|
toggle:
|
||||||
icon: material/brightness-4
|
icon: material/brightness-4
|
||||||
name: Switch to system preference
|
name: Switch to light mode
|
||||||
- media: "(prefers-color-scheme: light)"
|
- media: "(prefers-color-scheme: light)"
|
||||||
scheme: default
|
scheme: default
|
||||||
primary: indigo
|
primary: indigo
|
||||||
accent: indigo
|
accent: indigo
|
||||||
toggle:
|
toggle:
|
||||||
icon: material/brightness-7
|
icon: material/brightness-7
|
||||||
name: Switch to dark mode
|
name: Switch to system preference
|
||||||
font:
|
font:
|
||||||
text: Roboto
|
text: Roboto
|
||||||
code: Roboto Mono
|
code: Roboto Mono
|
||||||
@ -70,7 +70,13 @@ markdown_extensions:
|
|||||||
alternate_style: true
|
alternate_style: true
|
||||||
plugins:
|
plugins:
|
||||||
- offline
|
- offline
|
||||||
|
- mkdocs-video:
|
||||||
|
is_video: true
|
||||||
|
video_controls: true
|
||||||
|
video_loop: false
|
||||||
|
video_muted: false
|
||||||
nav:
|
nav:
|
||||||
- Home: index.md
|
- Home: index.md
|
||||||
- Installation: installation.md
|
- Linux: linux.md
|
||||||
|
- macOS: macos.md
|
||||||
- Usage: usage.md
|
- Usage: usage.md
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
#define IDM_HELP_ABOUT 40003
|
#define IDM_HELP_ABOUT 40003
|
||||||
#define IDM_VIEW_LOG 40004
|
#define IDM_VIEW_LOG 40004
|
||||||
|
|
||||||
#define VER_VERSION 1, 3, 0, 0
|
#define VER_VERSION 1, 4, 0, 0
|
||||||
#define VER_VERSION_STR "1.3\0"
|
#define VER_VERSION_STR "1.4.0.0\0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user