Skip to content

add cross-platform build and installer support - #201

Draft
asimfarooq5 wants to merge 7 commits into
mainfrom
add-cross-platform-support
Draft

add cross-platform build and installer support#201
asimfarooq5 wants to merge 7 commits into
mainfrom
add-cross-platform-support

Conversation

@asimfarooq5

Copy link
Copy Markdown
Member

No description provided.

@asimfarooq5
asimfarooq5 force-pushed the add-cross-platform-support branch 2 times, most recently from 77f4ef6 to ba4085f Compare August 10, 2026 15:12
@asimfarooq5
asimfarooq5 marked this pull request as draft August 11, 2026 09:45
Add PHONY markers, go-build/go-run macros, and a build/run target for
each binary, plus an install target that dispatches to install.ps1 on
Windows and install.sh everywhere else.
Extend the goreleaser build matrix to darwin/windows and package
windows archives as zip. install.sh gains OS detection and a launchd
agent installer for macOS alongside the existing systemd path;
install.ps1 is a new installer for Windows that installs to
%LOCALAPPDATA%\deskconn and registers deskconnd as a service via NSSM.
Add MachineID() with linux/darwin/windows implementations (machine-id
file, IOPlatformUUID via ioreg, and the MachineGuid registry key
respectively) and switch attach.go, mdns.go, and deskconnd's main to
use it instead of reading /etc/machine-id directly, which doesn't
exist outside Linux.
creack/pty has no real Windows implementation (StartWithSize just
returns ErrUnsupported there), so interactive shell/exec sessions
failed outright on Windows. go-pty provides a unified pty.Pty
interface backed by ConPTY on Windows and a real UnixPty escape
hatch (Master().SyscallConn()) for the ioctl-based busy detection
shell.go still needs on Unix. Move the foreground-pgid check and the
default shell (bash vs powershell.exe) into shell_unix.go/
shell_windows.go, matching the existing per-OS split.
Move the existing GNOME/dconf/GSettings/MATE/Cinnamon/KDE lookup logic
into wallpaper_linux.go, guarding readSetting against a nil session
bus so it fails cleanly instead of panicking where D-Bus isn't
available. Add real wallpaper-path lookups for Windows (WallPaper
registry value) and macOS (osascript System Events query). wallpaper.go
keeps only the OS-agnostic struct, loading, and HTTP handlers.
Move the existing D-Bus lock-provider based Lock/IsLocked into
screen_linux.go. Add real implementations for Windows (LockWorkStation
via user32) and macOS (CGSession -suspend); neither platform exposes a
lock-state query, so IsLocked returns an explicit unsupported error
there. Also guard NewScreen's lock-provider probe and SetBrightness
against a nil session/system bus.

Fix screen_test.go along the way: TestLock was actually locking the
running machine's screen as a side effect on non-Linux platforms
during `go test`, and TestIsLocked asserted a Linux-only error message
regardless of GOOS.
deskconnd's system/session bus connect calls are now non-fatal on
Windows/macOS (previous commits), which left every *dbus.Conn user
open to a nil-pointer panic at runtime. Guard mpris.go's object
lookups and CaptureScreenshot against a nil conn, returning a
descriptive error instead.
@asimfarooq5
asimfarooq5 force-pushed the add-cross-platform-support branch from ba4085f to 82d4e0d Compare August 11, 2026 13:34
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