anki/run
Damien Elmes db031424c2 Fix webengine remote debugging in Qt6
https://github.com/ankitects/anki/pull/2806

+ Enable remote debugging with run.bat, like in run. It doesn't allow
overriding - someone who better knows .bat scripts will need to handle
that if they need it.
2023-11-05 12:41:17 +10:00

20 lines
720 B
Bash
Executable File

#!/bin/bash
set -e
export PYTHONWARNINGS=default
export PYTHONPYCACHEPREFIX=out/pycache
# define these as blank before calling the script if you want to disable them
export ANKIDEV=${ANKIDEV-1}
export QTWEBENGINE_REMOTE_DEBUGGING=${QTWEBENGINE_REMOTE_DEBUGGING-8080}
export QTWEBENGINE_CHROMIUM_FLAGS=${QTWEBENGINE_CHROMIUM_FLAGS---remote-allow-origins=http://localhost:$QTWEBENGINE_REMOTE_DEBUGGING}
# The pages can be accessed by, e.g. surfing to
# http://localhost:40000/_anki/pages/deckconfig.html
# Useful in conjunction with tools/web-watch for auto-rebuilding.
export ANKI_API_PORT=${ANKI_API_PORT-40000}
export ANKI_API_HOST=${ANKI_API_HOST-127.0.0.1}
./ninja pylib qt
./out/pyenv/bin/python tools/run.py $*