remove-dependencies (#20)
All checks were successful
Build ptprnt / build (push) Successful in 2m10s
All checks were successful
Build ptprnt / build (push) Successful in 2m10s
Reviewed-on: #20
This commit was merged in pull request #20.
This commit is contained in:
66
README.md
66
README.md
@@ -14,7 +14,21 @@ ptprnt --font "NotoMono Nerd Font" --fontsize 32 --text "🖶 ptprnt v0.2.0 🥰
|
||||
|
||||
## Quick Start
|
||||
|
||||
**Install dependencies:**
|
||||
## Quick Start
|
||||
|
||||
**Binary dependencies**
|
||||
|
||||
Arch Linux:
|
||||
```bash
|
||||
pacman -S pango cairo libusb
|
||||
```
|
||||
|
||||
Debian/Ubuntu:
|
||||
```bash
|
||||
apt install libpangocairo-1.0-0 libusb-1.0-0
|
||||
```
|
||||
|
||||
**Build dependencies:**
|
||||
|
||||
Arch Linux:
|
||||
```bash
|
||||
@@ -23,12 +37,19 @@ pacman -S libusb spdlog pango cairo meson
|
||||
|
||||
Debian/Ubuntu:
|
||||
```bash
|
||||
apt-get install libusb-1.0-0-dev libspdlog-dev libfmt-dev libpango1.0-dev libcairo2-dev meson
|
||||
apt install libusb-1.0-0-dev libspdlog-dev libfmt-dev libpango1.0-dev libcairo2-dev meson
|
||||
```
|
||||
|
||||
Note: spdlog is built as a subproject and statically linked, so it's not required as a system dependency.
|
||||
|
||||
**Build and run:**
|
||||
Clone this repository first and enter the directory. Then build:
|
||||
```bash
|
||||
# Using the build script (recommended)
|
||||
./scripts/build.sh release
|
||||
builddir/ptprnt --help
|
||||
|
||||
# Or manually with meson
|
||||
meson setup builddir
|
||||
ninja -C builddir
|
||||
builddir/ptprnt --help
|
||||
@@ -181,17 +202,50 @@ ptprnt \
|
||||
|
||||
This is a modern C++20 rewrite of [ptouch-print](https://git.familie-radermacher.ch/linux/ptouch-print.git). Credits to Dominic Rademacher for reverse engineering the USB protocol.
|
||||
|
||||
**Build script:**
|
||||
```bash
|
||||
# Release build (tests disabled for faster builds)
|
||||
./scripts/build.sh release
|
||||
|
||||
# Debug build (tests enabled)
|
||||
./scripts/build.sh debug
|
||||
|
||||
# Debug with tests
|
||||
./scripts/build.sh debug --test
|
||||
|
||||
# Debug with coverage
|
||||
./scripts/build.sh debug --coverage
|
||||
|
||||
# Clean all build directories
|
||||
./scripts/build.sh clean
|
||||
|
||||
# Show all options
|
||||
./scripts/build.sh --help
|
||||
```
|
||||
|
||||
**Note:** Tests are only built in debug mode to keep release builds fast and small. Release builds do not include test binaries or link against gtest/gmock.
|
||||
|
||||
**Running tests:**
|
||||
```bash
|
||||
# Using build script
|
||||
./scripts/build.sh --test
|
||||
|
||||
# Or manually
|
||||
ninja -C builddir test
|
||||
```
|
||||
|
||||
**Coverage reports:**
|
||||
```bash
|
||||
meson setup builddir -Db_coverage=true
|
||||
ninja -C builddir
|
||||
ninja -C builddir test
|
||||
ninja -C builddir coverage-text
|
||||
# 1. Build with coverage enabled and run tests
|
||||
./scripts/build.sh debug --coverage --test
|
||||
|
||||
# 2. Generate coverage reports
|
||||
./scripts/generate_coverage.sh # All formats (html, xml, text)
|
||||
./scripts/generate_coverage.sh --html # HTML only
|
||||
./scripts/generate_coverage.sh --text # Text only
|
||||
./scripts/generate_coverage.sh --xml # XML only (for CI/CD)
|
||||
./scripts/generate_coverage.sh --html --xml # HTML and XML
|
||||
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Reference in New Issue
Block a user