Files
komorebi/justfile
T
LGUG2Z 8a203f0da7 feat(icon): a watermelon for every window
The recorder window and the viewer carry an icon of their own: a slice of
watermelon, drawn as komorebi-recorder/assets/watermelon.svg. `just icon`
(assets/generate.py, with resvg from the devShell) renders the PNG the windows
set and the ICO that Windows embeds. Until now eframe's default egui icon
showed.

macOS: eframe sets the PNG as the Dock icon while a window is open. The program
is a bare executable and not an app bundle, so Finder is unchanged.

Windows: eframe sets the same PNG as the window and taskbar icon. build.rs
compiles the ICO into both executables with embed-resource (rc.exe on Windows,
llvm-rc when cross-building from a Mac), and the installer shows it in Apps &
features through ARPPRODUCTICON. The taskbar, Explorer and the installer have
not been looked at on Windows: W4 and W5 in docs/dev/windows-checkpoints.md now
say what to check.

embed-resource adds seven crates to the lockfile and moves toml_datetime and
toml_parser up by a patch release.
2026-10-27 22:22:56 -07:00

70 lines
2.3 KiB
Makefile

export RUST_BACKTRACE := "full"
# everything CI checks, in order; run it inside `nix develop` (direnv does)
check: fmt-check clippy check-windows test doc deny
# nightly rustfmt, which the devShell provides, and the macros this project does not allow
fmt-check:
test -z "$(rg 'eyre!' --type rust)" || (echo "eyre! macro not allowed"; false)
test -z "$(rg 'dbg!' --type rust)" || (echo "dbg! macro not allowed"; false)
cargo fmt --check
# format everything: Rust, TOML, Nix and this file
fmt:
cargo clippy --workspace --all-targets --locked
nix fmt
fix:
cargo clippy --workspace --all-targets --fix --allow-dirty
clippy:
cargo clippy --workspace --all-targets --locked -- -D warnings
# type-check every `cfg(windows)` line, tests included, from a Mac (the Windows devShell targets x86_64-pc-windows-msvc)
check-windows:
nix develop .#windows --command cargo clippy --workspace --all-targets --locked -- -D warnings
# lib, integration and doc tests; the ones that read komorebi's source need KOMOREBI_MAC_SRC, which `nix develop` sets
test:
cargo test --workspace --locked
# rustdoc with its warnings as errors, for both hosts: links in `cfg(windows)` docs are only checked on Windows
doc:
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked
nix develop .#windows --command env RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked
deny:
cargo deny check
clean:
cargo clean
install:
cargo install --path komorebi-recorder --locked
build:
cargo build --package komorebi-recorder --locked --release
run target:
cargo run --bin {{ target }} --locked
# record a bug repro: screen + komorebi log/events + OS trace, then query it with `komorebi-recorder at`
record *args:
cargo run --bin komorebi-recorder --locked -- {{ args }}
# cross-compile komorebi-recorder.exe and komorebi-recorder-gui.exe into ./result-windows
build-windows:
nix build .#komorebi-recorder-windows --out-link result-windows
# render the icon: komorebi-recorder/assets/watermelon.svg into the PNG the windows set and the ICO Windows embeds
icon:
python3 komorebi-recorder/assets/generate.py
deps:
cargo update
just depgen
depgen:
cargo deny check
cargo deny list --format json | jq 'del(.unlicensed)' > dependencies.json