switch to use system gammaray, and CPack DEB packaging
This commit is contained in:
40
README.md
40
README.md
@@ -16,26 +16,37 @@ The bridge is a GammaRay **client**: it connects to a probe injected into a targ
|
||||
|
||||
- Qt 6.8+ (system)
|
||||
- C++20 compiler (GCC 12+, Clang 16+)
|
||||
- GammaRay 3.4.0+ built from source (see [build instructions](#building-gammaray))
|
||||
- GammaRay 3.4.0+ (system package: `gammaray-dev` on Debian/Deepin)
|
||||
- [qtmcp](https://github.com/signal-slot/qtmcp) (consumed via FetchContent — no manual install)
|
||||
- Python 3.10+ with `pytest` (for running the test suite)
|
||||
|
||||
## Building
|
||||
|
||||
### 1. Build and install GammaRay
|
||||
### 1. Install system dependencies
|
||||
|
||||
```bash
|
||||
cmake -S /path/to/GammaRay -B /path/to/GammaRay/build \
|
||||
-DCMAKE_INSTALL_PREFIX=$(pwd)/install-prefix
|
||||
cmake --build /path/to/GammaRay/build
|
||||
cmake --install /path/to/GammaRay/build --prefix $(pwd)/install-prefix
|
||||
# Debian / Deepin
|
||||
sudo apt install gammaray-dev gammaray-plugin-quickinspector
|
||||
```
|
||||
|
||||
### 2. Build the bridge
|
||||
|
||||
```bash
|
||||
cd bridge
|
||||
cmake -S . -B build -G Ninja -DCMAKE_PREFIX_PATH=$(pwd)/../install-prefix
|
||||
cmake -S . -B build -G Ninja
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
#### Offline build (using a local qtmcp clone)
|
||||
|
||||
If you have a local clone of qtmcp (e.g. at `/home/user/Sources/qtmcp`),
|
||||
pass `FETCHCONTENT_SOURCE_DIR_QTMcp` to skip the network fetch:
|
||||
|
||||
```bash
|
||||
cd bridge
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DFETCHCONTENT_SOURCE_DIR_QTMcp=/home/user/Sources/qtmcp \
|
||||
-DFETCHCONTENT_FULLY_DISCONNECTED=ON
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
@@ -43,11 +54,11 @@ cmake --build build
|
||||
|
||||
```bash
|
||||
# Start a probe (inject into a QML app)
|
||||
install-prefix/bin/gammaray --inject-only --listen tcp://127.0.0.1:11732 \
|
||||
gammaray --inject-only --listen tcp://127.0.0.1:11732 \
|
||||
--injector preload /usr/lib/qt6/bin/qml /path/to/app.qml -platform offscreen
|
||||
|
||||
# Or inject into a widget app
|
||||
install-prefix/bin/gammaray --inject-only --listen tcp://127.0.0.1:11732 \
|
||||
gammaray --inject-only --listen tcp://127.0.0.1:11732 \
|
||||
--injector preload /path/to/widget-app
|
||||
|
||||
# Start the bridge (stdio MCP server)
|
||||
@@ -56,6 +67,17 @@ bridge/run.sh
|
||||
|
||||
The bridge starts in lazy-connect mode. Call `connectProbe("127.0.0.1", 11732)` from your MCP client once the probe is up.
|
||||
|
||||
### 4. Build a .deb package (optional)
|
||||
|
||||
```bash
|
||||
cd bridge/build
|
||||
cpack -G DEB
|
||||
```
|
||||
|
||||
The package installs the bridge binary (`/usr/bin/gammaray-mcp-bridge`),
|
||||
qtmcp shared libs and plugins, and the `run.sh` helper script.
|
||||
System dependencies (`gammaray >= 3.4.0`, Qt6 libs) are auto-detected.
|
||||
|
||||
## MCP Tools
|
||||
|
||||
### Connection management
|
||||
|
||||
Reference in New Issue
Block a user