From 7518706f7925bc69d672c6e47af9caef062f0ab8 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sun, 14 Sep 2025 18:55:38 +0800 Subject: [PATCH 1/2] Always build wayland session --- meson.build | 4 +--- meson_options.txt | 3 --- session/meson.build | 30 ++++++++++++++---------------- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/meson.build b/meson.build index 2ce3d2a..c1c533c 100644 --- a/meson.build +++ b/meson.build @@ -40,6 +40,4 @@ if get_option('systemd') subdir('systemd') endif -if get_option('wayland') - subdir('wayland-sessions') -endif +subdir('wayland-sessions') diff --git a/meson_options.txt b/meson_options.txt index 9734566..2ae76a7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,6 +12,3 @@ option('systemd', type: 'boolean', value: true, option('systemduserunitdir', type: 'string', value: '', description : 'Custom directory for systemd user units') - -option('wayland', type: 'boolean', value: false, - description: 'Install Wayland session') diff --git a/session/meson.build b/session/meson.build index 501e836..b28948a 100644 --- a/session/meson.build +++ b/session/meson.build @@ -17,22 +17,20 @@ pantheon_session = configure_file( install_dir: join_paths(datadir, 'gnome-session', 'sessions') ) -if get_option('wayland') - wayland_session_components = [ - 'gala-wayland', - gsd_components - ] - - wayland_session_configuration = configuration_data() - wayland_session_configuration.set('SESSION_COMPONENTS', ';'.join(wayland_session_components)) - - configure_file( - input: 'pantheon-wayland.session.in', - output: '@BASENAME@', - configuration: wayland_session_configuration, - install_dir: datadir / 'gnome-session' / 'sessions' - ) -endif +wayland_session_components = [ + 'gala-wayland', + gsd_components +] + +wayland_session_configuration = configuration_data() +wayland_session_configuration.set('SESSION_COMPONENTS', ';'.join(wayland_session_components)) + +configure_file( + input: 'pantheon-wayland.session.in', + output: '@BASENAME@', + configuration: wayland_session_configuration, + install_dir: datadir / 'gnome-session' / 'sessions' +) autostartdir = join_paths(get_option('sysconfdir'), 'xdg', 'autostart') From df8b371c258a08cbef11d09140f9b10a9747ed95 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sun, 14 Sep 2025 19:06:13 +0800 Subject: [PATCH 2/2] Add meson option to disable x11 session --- meson.build | 5 ++++- meson_options.txt | 3 +++ session/meson.build | 30 ++++++++++++++++-------------- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index c1c533c..e286d29 100644 --- a/meson.build +++ b/meson.build @@ -34,7 +34,10 @@ if get_option('mimeapps-list') endif subdir('session') -subdir('xsessions') + +if get_option('x11') + subdir('xsessions') +endif if get_option('systemd') subdir('systemd') diff --git a/meson_options.txt b/meson_options.txt index 2ae76a7..b386907 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,3 +12,6 @@ option('systemd', type: 'boolean', value: true, option('systemduserunitdir', type: 'string', value: '', description : 'Custom directory for systemd user units') + +option('x11', type: 'boolean', value: true, + description: 'Install X11 session') diff --git a/session/meson.build b/session/meson.build index b28948a..3e23650 100644 --- a/session/meson.build +++ b/session/meson.build @@ -1,21 +1,23 @@ -fallback_session = get_option('fallback-session') +if get_option('x11') + fallback_session = get_option('fallback-session') -session_configuration = configuration_data() -session_configuration.set('FALLBACK_SESSION', fallback_session) + session_configuration = configuration_data() + session_configuration.set('FALLBACK_SESSION', fallback_session) -session_components = [ - 'gala', - gsd_components -] + session_components = [ + 'gala', + gsd_components + ] -session_configuration.set('SESSION_COMPONENTS', ';'.join(session_components)) + session_configuration.set('SESSION_COMPONENTS', ';'.join(session_components)) -pantheon_session = configure_file( - input: 'pantheon.session.in', - output: '@BASENAME@', - configuration: session_configuration, - install_dir: join_paths(datadir, 'gnome-session', 'sessions') -) + pantheon_session = configure_file( + input: 'pantheon.session.in', + output: '@BASENAME@', + configuration: session_configuration, + install_dir: join_paths(datadir, 'gnome-session', 'sessions') + ) +endif wayland_session_components = [ 'gala-wayland',