Updated README.
This commit is contained in:
95
README.md
95
README.md
@@ -115,6 +115,101 @@ So, you want to write a script for Cthulhu? The best thing to do is
|
||||
start by looking at other scripts under the src/cthulhu/scripts/ hierarchy
|
||||
of the source tree. Cthulhu also has an excellent plugin system, more documentation and examples coming soon.
|
||||
|
||||
## Building and Installation
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Ensure you have the development dependencies installed:
|
||||
|
||||
**Arch Linux:**
|
||||
```bash
|
||||
sudo pacman -S python python-gobject gtk3 at-spi2-core at-spi2-atk \
|
||||
python-speechd gstreamer python-pluggy python-dasbus \
|
||||
meson ninja pkgconf intltool gettext
|
||||
```
|
||||
|
||||
**Debian/Ubuntu:**
|
||||
```bash
|
||||
sudo apt install python3 python3-gi python3-gi-cairo gir1.2-gtk-3.0 \
|
||||
at-spi2-core libatk-adaptor python3-speechd \
|
||||
gstreamer1.0-plugins-base python3-pluggy python3-dasbus \
|
||||
meson ninja-build pkg-config intltool gettext
|
||||
```
|
||||
|
||||
### Local Development Build (Recommended)
|
||||
|
||||
For active development, build and install to your user directory:
|
||||
|
||||
```bash
|
||||
# Build and install to ~/.local
|
||||
./build-local.sh
|
||||
|
||||
# Test the local installation
|
||||
./test-local.sh
|
||||
|
||||
# Run your local version
|
||||
~/.local/bin/cthulhu
|
||||
|
||||
# Clean build artifacts and local installation
|
||||
./clean-local.sh
|
||||
```
|
||||
|
||||
This approach:
|
||||
- Installs to `~/.local/bin/cthulhu` (won't conflict with system installation)
|
||||
- Loads modules from `~/.local/lib/python*/site-packages/cthulhu/`
|
||||
- Preserves any system-wide Cthulhu installation at `/usr/bin/cthulhu`
|
||||
|
||||
### System Installation
|
||||
|
||||
For system-wide installation:
|
||||
|
||||
```bash
|
||||
# Configure the build
|
||||
meson setup _build --prefix=/usr
|
||||
|
||||
# Compile
|
||||
meson compile -C _build
|
||||
|
||||
# Install (requires sudo)
|
||||
sudo meson install -C _build
|
||||
```
|
||||
|
||||
### Manual Meson Build
|
||||
|
||||
If you prefer to use Meson commands directly instead of the convenience scripts:
|
||||
|
||||
```bash
|
||||
# Configure for local installation
|
||||
meson setup _build --prefix=$HOME/.local
|
||||
|
||||
# Or configure for system installation
|
||||
meson setup _build --prefix=/usr
|
||||
|
||||
# Compile
|
||||
meson compile -C _build
|
||||
|
||||
# Install
|
||||
meson install -C _build
|
||||
|
||||
# Clean
|
||||
rm -rf _build
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
Run the regression test suite:
|
||||
|
||||
```bash
|
||||
# All tests
|
||||
test/harness/runall.sh
|
||||
|
||||
# Single test
|
||||
test/harness/runone.sh <test.py> <app-name>
|
||||
|
||||
# App-specific tests
|
||||
test/harness/runall.sh -a /path/to/app/tests
|
||||
```
|
||||
|
||||
## Self-voicing
|
||||
|
||||
Cthulhu offers a mechanism through which messages may be spoken directly by the screen reader. Usage is as follows:
|
||||
|
Reference in New Issue
Block a user