Align cut options with PT-P700 capabilities
This commit is contained in:
@@ -23,7 +23,7 @@ import os
|
||||
|
||||
command = os.environ.get("PRINT_COMMAND", "ptouch-print --image {image}")
|
||||
try:
|
||||
command.format(image="/tmp/test.png", copies=1)
|
||||
command.format(image="/tmp/test.png", copies=1, cut_args="")
|
||||
except Exception as exc:
|
||||
raise SystemExit(f"ERROR: invalid PRINT_COMMAND: {exc}")
|
||||
PY
|
||||
@@ -56,12 +56,9 @@ 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 || ! ptouch-print --help 2>&1 | grep -q -- "--no-halfcut"; then
|
||||
if ! command -v ptouch-print >/dev/null 2>&1; 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
|
||||
|
||||
Reference in New Issue
Block a user