Skip to content

Build and test the backend and cr on Windows - #96

Merged
brahm merged 2 commits into
mainfrom
claude/project-thread-rfhp4h
Oct 25, 2026
Merged

brahm merged 2 commits into
mainfrom
claude/project-thread-rfhp4h

Conversation

@brahm

@brahm brahm commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Requested by Brahm · project thread

Phase 1 of the Windows 11 version (roadmap step 2): the backend crates and cr build, lint and test on Windows, before any Windows interface exists.

Changes

  • CI: a windows job on windows-2025 runs clippy and the tests of cr-formats, cr-store, cr-i18n and cr-cli, then builds cr.exe and uploads it as the cr-windows-x64 artifact. The GTK crates stay Linux only.
  • Tests: the integration tests and one unit test linked the original's data with std::os::unix::fs::symlink, so they did not compile on Windows. They now go through a small helper (crates/cr-store/tests/common/mod.rs) that uses symlink_dir or symlink_file on Windows.
  • Line endings: .gitattributes checks text files out with LF on Windows too, so texts compared byte for byte stay the same. The two add-on CSVs keep their CRLF.
  • Data folder (decision P19): on Windows, data_package_dir() is Core Rules\data in the Documents folder Windows reports (SHGetKnownFolderPath through windows-sys, so a Documents folder moved into OneDrive is found too). Installation::discover() does not look for a Wine prefix there.
  • cr: the usage text and the package README name the platform's data folder. A path written with backslashes counts as a path, so a folder that does not exist is still reported. When nothing is found on Windows, the error names the data folder, not the Wine path.
  • Docs: the roadmap's step 2 now covers the Windows 11 plan (one repository, WinUI 3 in Rust with windows-reactor, the Microsoft Store, six phases). The decision log adds S13 and P17 to P20, and the README and website say Windows 11 comes next.

On Linux nothing changes: cr --help prints the same text as before.

Checks

  • cargo clippy --target x86_64-pc-windows-gnu -p cr-formats -p cr-store -p cr-i18n -p cr-cli --all-targets -- -D warnings passes locally. Before this change the tests did not compile for Windows.
  • cargo fmt --check, clippy and cargo test for the same crates pass on Linux. The tests that use the helper also pass with CORERULES_DIR set to an Expansion data package.

Generated by Claude Code

Phase 1 of the Windows 11 version: a Windows job in CI lints and tests
cr-formats, cr-store, cr-i18n and cr, and builds cr.exe as an artifact.

- The tests link the original's data through a helper that works on both
  systems, in place of std::os::unix::fs::symlink.
- .gitattributes checks text files out with LF on Windows too.
- On Windows the data package lives in Core Rules\data in the Documents
  folder Windows reports (windows-sys), and no Wine prefix is looked for.
- cr's usage text names the platform's data folder, and a path with
  backslashes counts as a path.
- The roadmap's step 2 and the decision log record the Windows plan
  (S13, P17 to P20); README and the website say Windows 11 comes next.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CsxNQ7uDfBWWHEuyTvXtG9
@brahm brahm self-assigned this Oct 25, 2026
On Windows every spelling of a name exists, so find_entry's shortcut gave
back the spelling asked for (chars\index.chr) instead of the one on disk
(Chars\INDEX.CHR) that the original and Linux see. There the folder is
always read. The extraction test compares paths with / on both systems,
and the Windows CI job reports every failing test, not just the first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CsxNQ7uDfBWWHEuyTvXtG9
@brahm
brahm merged commit 4799283 into main Oct 25, 2026
4 checks passed
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