Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ This documentation provides instructions for developing Timeshift.
- help2man
- gettext
- valac
- libvte-2.91-dev
- libgee-0.8-dev
- libjson-glib-dev

Optional (for GTK frontend):

- libgtk-3-dev
- libvte-2.91-dev
- libxapp-dev

If you are using a Debian-based distribution, you can install these
Expand All @@ -21,9 +25,12 @@ sudo apt install meson \
help2man \
gettext \
valac \
libvte-2.91-dev \
libgee-0.8-dev \
libjson-glib-dev \
libjson-glib-dev

# Optional GUI dependencies
sudo apt install libgtk-3-dev \
libvte-2.91-dev \
libxapp-dev
```

Expand All @@ -48,6 +55,15 @@ meson setup build
meson compile -C build
```

### Building command-line-only

To build only the `timeshift` command-line tool (without GTK/VTE dependencies):

```bash
meson setup build-cli -Dgtk=false
meson compile -C build-cli
```

### Step 4. Install Timeshift

```bash
Expand Down
8 changes: 6 additions & 2 deletions docs/man/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ help2man = find_program('help2man')

mans = [
['timeshift', [help2man, '-N', '--output=@OUTPUT@', timeshift]],
['timeshift-gtk', [help2man, '-N', '--output=@OUTPUT@', timeshift_gtk]],
]

if enable_gtk
mans += [
['timeshift-gtk', [help2man, '-N', '--output=@OUTPUT@', timeshift_gtk]],
]
endif

foreach man: mans
custom_target(
man[0],
Expand All @@ -14,4 +19,3 @@ foreach man: mans
install_dir: join_paths(get_option('mandir'), 'man1'),
)
endforeach

33 changes: 23 additions & 10 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,37 @@ project(
default_options : ['c_std=c99', 'build.c_std=c99']
)

dependencies = [
dependencies_common = [
dependency('glib-2.0'),
dependency('gobject-2.0'),
dependency('gtk+-3.0'),
dependency('gio-2.0'),
dependency('gio-unix-2.0'),
dependency('json-glib-1.0'),
dependency('vte-2.91'),
dependency('gee-0.8'),
meson.get_compiler('vala').find_library('posix'),
meson.get_compiler('c').find_library('m'),
]

enable_gtk = get_option('gtk')
dependencies_gui = []
if enable_gtk
dependencies_gui = [
dependency('gtk+-3.0'),
dependency('vte-2.91'),
]
endif

enable_xapp = get_option('xapp')
if enable_xapp
xapp_dep = dependency('xapp')
xapp_dep = []
if enable_xapp and enable_gtk
xapp_dep = [dependency('xapp')]
add_project_arguments('-D', 'XAPP', language: 'vala')
dependencies += xapp_dep
elif enable_xapp and not enable_gtk
warning('xapp support requested, but GTK is disabled. xapp support will be disabled.')
endif

dependencies = dependencies_common + dependencies_gui + xapp_dep

# Include the translations module
i18n = import('i18n')

Expand All @@ -47,7 +58,9 @@ if enable_man
subdir('docs/man')
endif

install_data(
sources: 'debian/com.linuxmint.timeshift.metainfo.xml',
install_dir: join_paths(get_option('datadir'), 'metainfo')
)
if enable_gtk
install_data(
sources: 'debian/com.linuxmint.timeshift.metainfo.xml',
install_dir: join_paths(get_option('datadir'), 'metainfo')
)
endif
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
option('man', type: 'boolean', value: true, description: 'build man pages using help2man')
option('xapp', type: 'boolean', value: true, description: 'enable support for xapp library')
option('gtk', type: 'boolean', value: true, description: 'build GTK frontend and GUI assets')
Loading