Moritz Martinius cd15930e1d
All checks were successful
Build ptprnt / build (push) Successful in 1m49s
Fix Logger and other build issues (#7)
This branch fixes a couple of issues with the build
- stop linking everything in a library which is then linked against a single main. It doesn't work the way I wanted. If functionality needs to be exposed by a library, it can be done later or with a separate target
- This should also fix spdlog
- Source files are now in a separate meson file using mesons files() feautre
- Improve coverage generation by adding a script generating html coverage reports. This will hopefully keep the motivation higher to create more unit tests
- Increase the code coverage a bit to demonstrate that statement above is not a fluke 😄

Reviewed-on: #7
2023-11-16 20:26:22 +00:00
2023-10-22 19:42:59 +00:00
2023-10-22 19:42:59 +00:00
2023-09-24 18:41:33 +02:00
2023-09-23 16:10:12 +02:00

ptprnt

This is a rewrite of ptouch-print as a toy project for my personal amusement. The currently available solutions are good enough for generating labels, but i wanted to explore libusb and maybe improve the functionality of my label printer. All credits for reverse engineering the USB commands to Dominic Rademacher.

Dependencies

This project requires:

  • spdlog
  • libusb
  • pango
  • cairo
  • meson
  • gtest (optional, for testing, will be installed by meson)
  • gcov (optional, for coverage reports)

Install dependencies on Arch Linux

pacman -S libusb spdlog pango cairo meson gcovr

Install dependencies on Debian/Ubuntu

apt-get install libusb-1.0-0-dev libspdlog-dev libpango1.0-dev libcairo2-dev meson gcovr

Build

Clone the repository and simply let meson do the heavy lifting.

meson setup builddir 

If you want to generate coverage reports, enable them via the command line switch

meson setup builddir -Db_coverage=true

Rebuild by simply invoking ninja

ninja -C builddir

Run

Run the binary from your builddir

builddir/ptprnt

Test

Testing is done via gtest. To run your test simply invoke ninja with the "test" target.

ninja -C builddir test   

Coverage reports can be generated via gcov if you enabled them (see Build section) by building the coverage-text target.

License

GPLv3, see LICENSE

Author

Moritz Martinius moritz@admiralackbar.de

Description
No description provided
Readme 544 KiB
Languages
C++ 94.8%
Meson 4.3%
Shell 0.9%