Make ShareX cross-platform with a platform abstraction layer (Windows, macOS, Linux)
Author: McoreDCreated Sep 28, 2026Updated Sep 28, 2026
LabelsEnhancement
Summary
Implement a platform abstraction layer so ShareX runs natively on Windows, macOS and Linux, including major distributions (Ubuntu/Debian, Fedora/RHEL, Arch-based such as Omarchy, EndeavourOS, Manjaro, and openSUSE).
Development branch: cross-platform
Goals
- Platform-agnostic interfaces (e.g.
IPlatformServices) with implementations inShareX.Platform.Windows,ShareX.Platform.MacOS,ShareX.Platform.Linux. - Move Win32/P/Invoke usage behind these interfaces.
- Keep Windows behaviour unchanged.
Areas to abstract
- Screen capture: GDI/DWM, ScreenCaptureKit/CoreGraphics, X11 and Wayland (xdg-desktop-portal/PipeWire).
- Screen recording: FFmpeg per OS (gdigrab/ddagrab, avfoundation, x11grab/pipewire).
- Global hotkeys: RegisterHotKey, CGEventTap, XGrabKey, Wayland GlobalShortcuts portal.
- Clipboard: Win32, NSPasteboard, X11/Wayland (wl-clipboard fallback).
- Tray and notifications: NotifyIcon, NSStatusItem, StatusNotifierItem/AppIndicator, libnotify/D-Bus.
- Window enumeration for region/window capture.
- Startup: Registry Run key, LaunchAgents, XDG autostart.
- Shell integration: Explorer, Finder Services, Nautilus/Dolphin/Thunar.
- Paths:
%APPDATA%,~/Library/Application Support,$XDG_CONFIG_HOME. - Credentials: DPAPI, Keychain, Secret Service (libsecret/KWallet).
- UI: incremental migration from WinForms to a cross-platform toolkit (e.g. Avalonia).
Linux
- X11 and Wayland (GNOME, KDE Plasma, Hyprland/wlroots).
- Packaging: Flatpak, AppImage,
.deb,.rpm, AUR.
macOS
- Apple Silicon and Intel, notarised
.dmg, Screen Recording/Accessibility permission handling.
Acceptance criteria
- Interfaces defined, Windows migrated with no regressions
- macOS implementation (capture, hotkeys, clipboard, tray, uploads)
- Linux implementation (X11 and Wayland)
- CI builds and tests on all three OSes
- Packages for each platform
- Build and install documentation per platform
Source: ShareX/ShareX