Skip to content

Port OnlineCTR to CrossPlatform (Native Linux Support)#249

Open
Diassisfilho wants to merge 1 commit into
CTR-tools:mainfrom
Diassisfilho:feature/onlinectr-linux-port
Open

Port OnlineCTR to CrossPlatform (Native Linux Support)#249
Diassisfilho wants to merge 1 commit into
CTR-tools:mainfrom
Diassisfilho:feature/onlinectr-linux-port

Conversation

@Diassisfilho

Copy link
Copy Markdown

This PR restructures the OnlineCTR module and introduces native Linux support for both the Client and Server.

Key Changes

  1. Moved mods/Windows to mods/CrossPlatform: Since the code now compiles natively on both Windows and Linux, the folder has been renamed to reflect its platform-agnostic nature.
  2. Process Detection: The Client now falls back to scanning /proc (including comm and cmdline) to accurately detect DuckStation and AppImage instances on Linux.
  3. Shared Memory: On Linux, the Client utilizes shm_open and mmap instead of Win32 MapViewOfFile to read DuckStation's exported memory.
  4. Cross-Platform Compatibility: Replaced non-standard functions (like strcpy_s) with safe macros (STRCPY_SAFE), abstracted Sleep/usleep, and fixed _Static_assert compilation under C++ (g++).
  5. CMake Build System: Added a CMakeLists.txt to the Client and updated the Server's CMakeLists.txt to build ENet directly from its source submodule.
  6. Documentation: Added README-Linux.md outlining the build and run instructions for Linux users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant