Skip to content

Add native Linux build support via Nix dev shell#20

Open
deveyus wants to merge 1 commit into
ccpgames:masterfrom
deveyus:pr-linux
Open

Add native Linux build support via Nix dev shell#20
deveyus wants to merge 1 commit into
ccpgames:masterfrom
deveyus:pr-linux

Conversation

@deveyus

@deveyus deveyus commented Jul 4, 2026

Copy link
Copy Markdown

This change adds the minimal infrastructure needed to build LogLite natively on Linux, without requiring vcpkg or Windows-specific tooling.

The existing codebase is already cross-platform Qt6 — only two #ifdef guards were platform-specific (Windows Registry dark-theme detection and a drive-letter path regex), and the #else branches already handle Linux correctly. No C++ changes were needed.

Changes:

  • Guard the Windows .rc resource file behind if(WIN32) so it doesn't get compiled on Linux (it includes <windows.h>)
  • Add x64-linux-debug and x64-linux-release CMake presets that build against system/Nix-provided Qt6 without vcpkg
  • Add shell.nix providing an isolated Nix dev shell with CMake, Qt 6.11.0, GCC 15, pkg-config, git, and all Qt build tools (moc/uic/rcc)

Building on any Linux machine with Nix installed:
nix-shell shell.nix
cmake --preset x64-linux-release
cmake --build .cmake-build-x64-linux-release -j$(nproc)

On non-Nix Linux, install qt6-base-dev and build directly with CMake.

- Guard Windows .rc file behind if(WIN32) so Linux builds aren't broken
- Add x64-linux-debug and x64-linux-release CMake presets (no vcpkg dep)
- Add shell.nix providing CMake, Qt 6.11.0, GCC 15, pkg-config, git
- Update README to describe fork changes
@sverrirsccp

Copy link
Copy Markdown

Hey deveyus - thanks a lot for your contribution!

I work at Fenris Creations and wanted to let you know that we've acknowledged your PR. We'll take a proper look at it as soon as we can and really appreciate you taking the time to contribute.

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.

2 participants