Add mobile mode and print cut controls
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user