mirror of
https://github.com/EnderIce2/rpc-bridge.git
synced 2025-05-25 22:14:38 +00:00
Display installation guide prompt for missing temp directory
This commit is contained in:
parent
bf98b8784c
commit
8fbe00b555
10
bridge.c
10
bridge.c
@ -254,6 +254,7 @@ void ConnectToSocket(int fd)
|
||||
if (IsLinux)
|
||||
runtime = native_getenv("XDG_RUNTIME_DIR");
|
||||
else
|
||||
{
|
||||
runtime = native_getenv("TMPDIR");
|
||||
if (runtime == NULL)
|
||||
{
|
||||
@ -267,13 +268,16 @@ void ConnectToSocket(int fd)
|
||||
print("IPC directory does not exist: %s. If you're on MacOS, see the github guide on how to install the launchd service.\n", runtime);
|
||||
// Handle the case where the directory doesn't exist
|
||||
// For example, create the directory
|
||||
if (!RunningAsService)
|
||||
MessageBox(NULL, "IPC directory does not exist",
|
||||
|
||||
int result = MessageBox(NULL, "IPC directory does not exist\nDo you want to open the installation guide?",
|
||||
"Directory not found",
|
||||
MB_OK | MB_ICONSTOP);
|
||||
MB_YESNO | MB_ICONSTOP);
|
||||
if (result == IDYES)
|
||||
ShellExecute(NULL, "open", "https://enderice2.github.io/rpc-bridge/installation.html#macos", NULL, NULL, SW_SHOWNORMAL);
|
||||
ExitProcess(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print("IPC directory: %s\n", runtime);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user