Add mobile mode and print cut controls

This commit is contained in:
Mikei386
2026-06-22 06:46:52 +02:00
parent 7029ee9519
commit a6025eef47
10 changed files with 303 additions and 48 deletions
+4 -1
View File
@@ -56,9 +56,12 @@ if ! python3 -c "import qrcode, barcode" >/dev/null 2>&1; then
python3 -m pip install --root-user-action=ignore --no-cache-dir qrcode python-barcode
fi
if ! command -v ptouch-print >/dev/null 2>&1; then
if ! command -v ptouch-print >/dev/null 2>&1 || ! ptouch-print --help 2>&1 | grep -q -- "--no-halfcut"; then
rm -rf "$PTOUCH_SRC_DIR"
git clone --depth 1 --branch farix-main https://github.com/farixembedded/ptouch-print.git "$PTOUCH_SRC_DIR"
if [ -f "$APP_DIR/patches/ptouch-print-cut-options.patch" ]; then
patch -d "$PTOUCH_SRC_DIR" -p1 < "$APP_DIR/patches/ptouch-print-cut-options.patch"
fi
cmake -S "$PTOUCH_SRC_DIR" -B "$PTOUCH_SRC_DIR/build" -DCMAKE_BUILD_TYPE=Release
cmake --build "$PTOUCH_SRC_DIR/build"
install -m 0755 "$PTOUCH_SRC_DIR/build/ptouch-print" /usr/local/bin/ptouch-print