Skip to content

Commit ff9cd6d

Browse files
committed
Add README and a helper script for running tests
1 parent 0191580 commit ff9cd6d

4 files changed

Lines changed: 49 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2026 Aleksandr Mezin <mezin.alexander@gmail.com>
3+
4+
SPDX-License-Identifier: MIT
5+
-->
6+
7+
# gjs-typelib-installer
8+
9+
[ddterm] depends on multiple GObject libraries (`gi://` imports),
10+
some of them are often not installed by default.
11+
12+
Instead of silently failing, a notification is shown:
13+
14+
![Notification](pictures/notification.png)
15+
16+
On supported distributions, it has an "Install" button, which installs
17+
the requested packages.
18+
19+
gjs-typelib-installer is the backend for it. It implements:
20+
21+
1. [`require()`] function that tries to import libraries, and throws
22+
[`MissingDependencies`] exception if import fails. The exception contains
23+
a list of packages that need to be installed to fix the issue.
24+
25+
2. [`findTerminalInstallCommand()`] function that finds a working package
26+
installation method for the current OS.
27+
28+
[ddterm]: https://github.com/ddterm/gnome-shell-extension-ddterm
29+
[`require()`]: https://ddterm.github.io/gjs-typelib-installer/functions/require.html
30+
[`MissingDependencies`]: https://ddterm.github.io/gjs-typelib-installer/classes/MissingDependencies.html
31+
[`findTerminalInstallCommand()`]: https://ddterm.github.io/gjs-typelib-installer/functions/findTerminalInstallCommand.html

‎pictures/notification.png‎

41 KB
Loading

‎pictures/notification.png.license‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: NONE
2+
3+
SPDX-License-Identifier: CC0-1.0

‎run-e2e-tests.sh‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
# SPDX-FileCopyrightText: 2026 Aleksandr Mezin <mezin.alexander@gmail.com>
4+
#
5+
# SPDX-License-Identifier: MIT
6+
7+
set -e
8+
9+
service="$1"
10+
shift
11+
12+
trap 'podman compose down -v "$service"' EXIT
13+
14+
podman compose up --build --wait --force-recreate "$service"
15+
podman compose exec -u testuser "$service" tests/e2e-tests.sh "$@"

0 commit comments

Comments
 (0)