vietc/Makefile
Khoa Vo 88d39b4475
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions
release: v0.1.6 — uinput-first injection, window-switch fix, Telex disabled
- uinput injection is now primary on X11 (XTest fallback)
- X11 XTest keycode offset +8 fixed for all send_keycode paths
- Window switch detection on every keystroke (no more gap > 100ms guard)
- Telex greyed out in tray with '(next version)' label
- Flatpak and AppImage removed; only .deb packaging
- All Cargo.toml versions bumped to 0.1.6
2026-06-29 16:07:15 +07:00

101 lines
2.4 KiB
Makefile

.PHONY: build build-x11 build-wayland build-all build-ui test test-cli run run-x11 run-wayland clean install install-x11 install-wayland install-ui install-config deb fmt lint tree
# Build core crates
build:
cargo build --release
# Build with X11 support
build-x11:
cargo build --release --features x11
# Build with Wayland IM protocol
build-wayland:
cargo build --release --features wayland
# Build with all backends
build-all:
cargo build --release --features "x11,wayland"
# Build tray icon UI (requires libdbus-1-dev)
build-ui:
cd ui && cargo build --release
# Build debug
build-dev:
cargo build
# Run all tests
test:
cargo test
# Run the interactive CLI test harness
test-cli:
cargo run --bin vietc-cli
# Run the daemon (needs root for evdev/uinput)
run: build-dev
sudo cargo run --bin vietc
# Run daemon with X11 support
run-x11: build-dev
cargo build --features x11
sudo cargo run --bin vietc --features x11
# Run daemon with Wayland IM protocol
run-wayland: build-dev
cargo build --features wayland
sudo cargo run --bin vietc --features wayland
# Run daemon in release mode
run-release: build
sudo target/release/vietc
# Install to /usr/local/bin
install: build
sudo cp target/release/vietc /usr/local/bin/vietc
@echo "Installed vietc to /usr/local/bin/"
# Install with X11 support
install-x11: build-x11
sudo cp target/release/vietc /usr/local/bin/vietc
@echo "Installed vietc (with X11) to /usr/local/bin/"
# Install with Wayland IM protocol
install-wayland: build-wayland
sudo cp target/release/vietc /usr/local/bin/vietc
@echo "Installed vietc (with Wayland IM) to /usr/local/bin/"
# Install tray icon UI
install-ui: build-ui
sudo cp ui/target/release/vietc-tray /usr/local/bin/vietc-tray
@echo "Installed vietc-tray to /usr/local/bin/"
# Install config to user dir
install-config:
mkdir -p ~/.config/vietc
cp vietc.toml ~/.config/vietc/config.toml
@echo "Config installed to ~/.config/vietc/config.toml"
# Build .deb package
deb:
VERSION=$$(grep '^version' engine/Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/') && \
bash packaging/deb/build-deb.sh "$$VERSION"
# Clean build artifacts
clean:
cargo clean
cd ui && cargo clean
# Format code
fmt:
cargo fmt
cd ui && cargo fmt
# Lint
lint:
cargo clippy -- -D warnings
cd ui && cargo clippy -- -D warnings
# Show project structure
tree:
@find . -type f \( -name "*.rs" -o -name "*.toml" \) | grep -v target | sort