From 9db5f4d14fa33227c08b44b8093626ece4b7e42f Mon Sep 17 00:00:00 2001 From: Romain Vigier Date: Tue, 30 Aug 2022 10:25:29 +0200 Subject: [PATCH] Contributing: Add instructions about testing the extension --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9ea8b91..901b3dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,14 +11,42 @@ You're welcome to contribute to the [code](#contributing-to-the-code) or to the ## Table of contents +- [Testing the extension](#testing-the-extension) + - [Transfering to a virtual machine](#transfering-to-a-virtual-machine) + - [Printing debug logs](#printing-debug-logs) - [Contributing to the code](#contributing-to-the-code) - [Coding style](#coding-style) - [Copyright notice](#copyright-notice) + - [Creating new files](#creating-new-files) - [Localized strings](#localized-strings) - [Contributing to the translations](#contributing-to-the-translations) --- +## Testing the extension + +### Transfering to a virtual machine + +The recommended way of testing the extension is to use a virtual machine, and to transfer the extension from your host system to the virtualized system. + +To pack the extension as a zip file instead of installing it on your system, you can use the `pack` option when configuring Meson: + +```bash +meson builddir -Dpack=true +``` + +When running `meson install -C builddir`, it will create an archive in the `dist` directory. You can then transfer the extension to the VM and install it there using `gnome-extensions install nightthemeswitcher@romainvigier.fr.zip`. + +### Printing debug logs + +To print debug logs, set the build type to `debug` when configuring Meson: + +```bash +meson builddir -Dbuildtype=debug +``` + +You can then read the logs with `journalctl -f /usr/bin/gnome-shell`. + ## Contributing to the code You'll need [NPM](https://www.npmjs.com/) to install the development dependencies: