From 377467876db47fc3304575215c858026978534ec Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Sun, 15 Oct 2023 16:49:03 +0300 Subject: [PATCH] gnome-classic: Drop xorg sessions Remove the xorg .desktop file sessions, and also the separate -wayland desktop file since we will only have a single Session now that will be a Wayland session. Mirror of the changes in gnome-session [1] [1]: https://gitlab.gnome.org/GNOME/gnome-session/-/merge_requests/98 Part-of: --- build-aux/session-post-install.py | 24 --------------- data/gnome-classic-wayland.desktop.in | 9 ------ data/gnome-classic-xorg.desktop.in | 8 ----- data/meson.build | 44 ++++++--------------------- meson.build | 9 ------ meson.options | 6 ---- 6 files changed, 9 insertions(+), 91 deletions(-) delete mode 100755 build-aux/session-post-install.py delete mode 100644 data/gnome-classic-wayland.desktop.in delete mode 100644 data/gnome-classic-xorg.desktop.in diff --git a/build-aux/session-post-install.py b/build-aux/session-post-install.py deleted file mode 100755 index cfc55c2a..00000000 --- a/build-aux/session-post-install.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python3 - -# SPDX-FileCopyrightText: 2021 Neal Gompa -# -# SPDX-License-Identifier: GPL-2.0-or-later - -import os -import shutil -import sys - -if os.environ.get('DESTDIR'): - install_root = os.environ.get('DESTDIR') + os.path.abspath(sys.argv[1]) -else: - install_root = sys.argv[1] - -# FIXME: Meson is unable to copy a generated target file: -# https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0 -dst_dir = os.path.join(install_root, 'xsessions') -if not os.path.exists(dst_dir): - os.makedirs(dst_dir) - -src = os.path.join(install_root, 'wayland-sessions', 'gnome-classic.desktop') -dst = os.path.join(dst_dir, 'gnome-classic.desktop') -shutil.copyfile(src, dst) diff --git a/data/gnome-classic-wayland.desktop.in b/data/gnome-classic-wayland.desktop.in deleted file mode 100644 index 77227d18..00000000 --- a/data/gnome-classic-wayland.desktop.in +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=GNOME Classic on Wayland -Comment=This session logs you into GNOME Classic -Exec=env GNOME_SHELL_SESSION_MODE=classic gnome-session -TryExec=gnome-session -Type=Application -DesktopNames=GNOME-Classic;GNOME; -X-GDM-SessionRegisters=true -X-GDM-CanRunHeadless=true diff --git a/data/gnome-classic-xorg.desktop.in b/data/gnome-classic-xorg.desktop.in deleted file mode 100644 index 5fb338a1..00000000 --- a/data/gnome-classic-xorg.desktop.in +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=GNOME Classic on Xorg -Comment=This session logs you into GNOME Classic -Exec=env GNOME_SHELL_SESSION_MODE=classic gnome-session -TryExec=gnome-session -Type=Application -DesktopNames=GNOME-Classic;GNOME; -X-GDM-SessionRegisters=true diff --git a/data/meson.build b/data/meson.build index ea846e94..51a2bac7 100644 --- a/data/meson.build +++ b/data/meson.build @@ -2,42 +2,16 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -have_x11 = get_option('x11') +session_desktop = 'gnome-classic.desktop' -session_desktop_base = 'gnome-classic' - -session_desktops = [ - session_desktop_base, - session_desktop_base + '-wayland', -] - -if have_x11 - session_desktops += [session_desktop_base + '-xorg'] -endif - -foreach name : session_desktops - session_desktop = name + '.desktop' - if name.endswith('-xorg') - session_instdir = xsessiondir - elif name.endswith('-wayland') - session_instdir = wlsessiondir - else -# FIXME: The same target can not be copied into two directories. - # There is a workaround in build-aux/session-post-install.py until proper - # solution arises: - # https://github.com/mesonbuild/meson/issues/2416 - session_instdir = wlsessiondir - #session_instdir = [ xesssiondir, wlsessiondir ] - endif - i18n.merge_file( - input: session_desktop + '.in', - output: session_desktop, - po_dir: '../po', - install: true, - install_dir: session_instdir, - type: 'desktop', - ) -endforeach +i18n.merge_file( + input: session_desktop + '.in', + output: session_desktop, + po_dir: '../po', + install: true, + install_dir: wlsessiondir, + type: 'desktop', +) classic_uuids = [] foreach e : classic_extensions diff --git a/meson.build b/meson.build index fa7b722f..7b866b8b 100644 --- a/meson.build +++ b/meson.build @@ -23,7 +23,6 @@ modedir = join_paths(shelldir, 'modes') schemadir = join_paths(datadir, 'glib-2.0', 'schemas') sessiondir = join_paths(datadir, 'gnome-session', 'sessions') -xsessiondir = join_paths(datadir, 'xsessions') wlsessiondir = join_paths(datadir, 'wayland-sessions') ver_arr = meson.project_version().split('.') @@ -31,8 +30,6 @@ shell_version = ver_arr[0] uuid_suffix = '@gnome-shell-extensions.gcampax.github.com' -have_x11 = get_option('x11') - classic_extensions = [ 'apps-menu', 'places-menu', @@ -88,12 +85,6 @@ endforeach if classic_mode_enabled subdir('data') - if have_x11 - meson.add_install_script( - 'build-aux/session-post-install.py', - join_paths(get_option('prefix'), datadir), - ) - endif endif subdir('extensions') diff --git a/meson.options b/meson.options index 61eb21c6..ddf62fa1 100644 --- a/meson.options +++ b/meson.options @@ -20,9 +20,3 @@ option('classic_mode', value: false, description: 'Enable installing data files for classic mode.' ) - -option('x11', - type: 'boolean', - value: false, - description: 'Enable X11 session support.' -)