Development
There are some dependencies that you might need.
$ sudo apt install npm meson gjs gettext libgtk-4-dev libadwaita-1-dev
Clone the repository with --recursive to also check out a submodule containing GNOME typescript definitions.
$ git clone --recursive https://git.subgraph.com/brl/citadel-realms.git
Run npm install to install the typescript compiler.
$ cd citadel-realms
$ npm install
Building
You don't need to run these commands individually since the Makefile described in the next section already does all of this.
Set up a meson build with a --prefix so that you can install to somewhere convenient.
$ meson setup --prefix=${PWD}/install build
After making any changes, you need to run the following commands to produce a build to test.
The typescript -> javascript step must be run manually rather than as part of the meson build because the javascript files are also committed to the repository.
This is to avoid doing this during the Citadel build which would require first building nodejs.
$ npm run build
$ meson compile -C build
$ meson install -C build
Makefile
A Makefile is included that is meant to be used only for development.
Besides running the meson build it will also:
- Configure Meson to install application to
$PWD/install - Compile all blueprint files (
.blp) to XML files - Compile all typescript files to javascript.
Testing changes
The Makefile will build the realms UI and install it in a subdirectory of this
repository ($PWD/install). To run the build installed in this directory you will
first need to create a symlink at /home/user pointing to the home directory of the
realm you are using for development:
$ sudo ln -s /realms/realm-main/home/ /home/user
$ ls -l /home/user
lrwxrwxrwx 1 root root 23 Aug 25 10:49 /home/user -> /realms/realm-main/home
Now you can run the application from either the symlink path or from the direct path to realm home directory.
$ /home/user/citadel-realms/install/bin/com.subgraph.citadel.Realms
This works too:
$ /realms/realm-main/home/citadel-realms/install/bin/com.subgraph.citadel.Realms