From bec3cdfd277558d6a35d8b49063fc287aaeacd87 Mon Sep 17 00:00:00 2001 From: Ivy233 Date: Mon, 13 Jul 2026 17:37:58 +0800 Subject: [PATCH] feat: move dde-session-shell.conf to /var/lib/dde-session-shell for V25 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 dde-session-shell.conf 从 /usr/share/dde-session-shell 迁移到 /var/lib/dde-session-shell。 仅对 ENABLE_DSS_SNIPE (V25) 生效,V20 保持原有 /usr/share/dde-session-shell 路径不变。 通过条件编译区分:CMakeLists.txt 使用 if(DDE_SESSION_SHELL_SNIPE), constants.h 使用 #ifdef ENABLE_DSS_SNIPE。 Log: 将 dde-session-shell.conf 迁移到 /var/lib/dde-session-shell (仅 V25) PMS: BUG-356947 --- CMakeLists.txt | 6 +++++- src/global_util/constants.h | 6 +++++- src/lightdm-deepin-greeter/logintipswindow.cpp | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a47611df..c35a899b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -455,7 +455,11 @@ else () endif () # install conf files -install(FILES files/dde-session-shell.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/dde-session-shell/) +if (DDE_SESSION_SHELL_SNIPE) + install(FILES files/dde-session-shell.conf DESTINATION /var/lib/dde-session-shell/) +else() + install(FILES files/dde-session-shell.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/dde-session-shell/) +endif() install(FILES files/lightdm-deepin-greeter.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/deepin-authentication/privileges/) # services diff --git a/src/global_util/constants.h b/src/global_util/constants.h index a261a920..8f0d233d 100644 --- a/src/global_util/constants.h +++ b/src/global_util/constants.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2015 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -38,7 +38,11 @@ static const int MIN_AUTH_WIDGET_HEIGHT = 276; // 密码验证时整个登录控 const QStringList session_ui_configs { "/etc/lightdm/lightdm-deepin-greeter.conf", "/etc/deepin/dde-session-ui.conf", +#ifdef ENABLE_DSS_SNIPE + "/var/lib/dde-session-shell/dde-session-shell.conf", +#else "/usr/share/dde-session-shell/dde-session-shell.conf", +#endif "/usr/share/dde-session-ui/dde-session-ui.conf" }; diff --git a/src/lightdm-deepin-greeter/logintipswindow.cpp b/src/lightdm-deepin-greeter/logintipswindow.cpp index 22dd44f3..1d117654 100644 --- a/src/lightdm-deepin-greeter/logintipswindow.cpp +++ b/src/lightdm-deepin-greeter/logintipswindow.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2011 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -39,7 +39,7 @@ void LoginTipsWindow::initUI() m_content->setAlignment(Qt::AlignCenter); m_content->setTextFormat(Qt::TextFormat::PlainText); - // 获取/usr/share/dde-session-shell/dde-session-shell.conf 配置信息 + // 获取 session_ui_configs 中的 dde-session-shell.conf 配置信息 m_contentString = findValueByQSettings(DDESESSIONCC::session_ui_configs, "Greeter", "tipsContent", ""); m_content->setText(m_contentString); @@ -58,7 +58,7 @@ void LoginTipsWindow::initUI() m_tipLabel->setAlignment(Qt::AlignCenter); m_tipLabel->setTextFormat(Qt::TextFormat::PlainText); - // 获取/usr/share/dde-session-shell/dde-session-shell.conf 配置信息 + // 获取 session_ui_configs 中的 dde-session-shell.conf 配置信息 m_tipString = findValueByQSettings(DDESESSIONCC::session_ui_configs, "Greeter", "tipsTitle", ""); m_tipLabel->setText(m_tipString);