HACKING 2.79 KB
Newer Older
1 2 3 4
Coding Style Guidelines
=======================

Read CodingStyle.txt
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Commit Message Guidelines
=========================

Follow GNOME's commit message guidelines:
 https://wiki.gnome.org/Git/CommitMessages

To these rules we add some others.

General rules:
- in the description, try to fill as much as possible your lines (don't
  go to the line if the next word can fit),
- don't go to the line after a sentence except of course if you cant add
  words after,
- split paragraphs with two newlines (one empty line),
- if the context isn't sufficient, be explicit with the types and the
  namespaces of the codepoints you cite,
- suffix methods and functions with parentheses (without the space) so
  when reading we know the name refers to an operation,
- write property names between single quotes and in kebab-case.

26 27 28 29 30 31 32
The tag can be:
- the name of the sub-directory of data, plugins or src in which the
  change was made,
- 'build' if it affects the build system,
- anything else that seems more appropriate for the change,
- nothing if multiple parts were affected.

33 34 35 36 37 38 39 40 41 42 43 44 45
The actual changes:
- the first paragraph explains what the commit does from an objective
  point of view: the code change,
- if the shortlog is explicit enough, this first paragraph can be
  omitted,
- try to start sentences by the action performed, try to use the
  infinitive.

The reasoning behind the changes:
- the second paragraph explains what the commit does from a subjective
  point of view: the behavior change,
- don't write about what was before this commit, write about what this
  commit does.
46 47 48 49 50 51 52 53 54 55 56 57 58

UI Guidelines
=============

The UI is splitted into pages, each page consists of two widgets:
- the header bar named FooHeaderBar,
- the body of the window named FooBox.
Any possible state of the page foo must be represented by FooHeaderBar
and FooBox and they can't be contained by any other widget than the
window.

This allows consistency and helps to quickly know which widget
represents what.
59 60 61 62 63 64 65 66 67 68 69

Compilation and installation Procedure
======================================

You can install this project either manually (by command line) or
with [Builder](https://wiki.gnome.org/Apps/Builder "GNOME-Builder Wiki").

## Manual installation

### Get the official git repository
```shell
70
git clone https://gitlab.gnome.org/GNOME/gnome-games.git
71 72 73
```

### Required dependencies
74 75 76
Games always requires the matching version of [retro-gtk](https://gitlab.gnome.org/GNOME/retro-gtk),
[libmanette](https://gitlab.gnome.org/aplazas/libmanette) and [libhandy](https://source.puri.sm/Librem5/libhandy)
so if you use the master version of Games, you need to use the master version of retro-gtk, libmanette and libhandy.
77 78 79

### Prepare compilation
```shell
80
meson _build
81 82 83 84
```

### Compilation
```shell
85
ninja -C _build
86 87 88 89
```

### Install the application
```shell
90
sudo ninja -C _build install
91 92
```