From 8032f90f88077ec5ca47531ce5346e9250eb6bbe Mon Sep 17 00:00:00 2001 From: myml Date: Tue, 16 Jan 2024 13:40:03 +0800 Subject: [PATCH 1/3] fix: missing app list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 由于launcher的接口更改,无法获取已安装应用列表 Log: Issues: https://github.com/linuxdeepin/developer-center/issues/6902 --- src/base/utils.cpp | 69 +++++++-------------------------------- src/view/manual_proxy.cpp | 22 ++++++------- 2 files changed, 22 insertions(+), 69 deletions(-) diff --git a/src/base/utils.cpp b/src/base/utils.cpp index 6100a5082..dd6f33392 100755 --- a/src/base/utils.cpp +++ b/src/base/utils.cpp @@ -238,17 +238,12 @@ bool Utils::judgeWayLand() QStringList Utils::getMdsourcePath() { QStringList sourcePath; -#ifdef LINGLONG_BUILD QStringList pathlist = getEnvsourcePath(); for (int i = 0; i < pathlist.size(); ++i) { - if (pathlist[i].contains("persistent") || pathlist[i].contains("usr/share")) { - sourcePath.push_back(pathlist[i] + "/deepin-manual/manual-assets"); - qDebug() << " all MD source path : " << sourcePath.last(); - } + sourcePath.push_back(pathlist[i] + "/deepin-manual/manual-assets"); } -#else sourcePath.push_back(DMAN_MANUAL_DIR); -#endif + qDebug() << " all MD source path : " << sourcePath.last(); return sourcePath; } @@ -282,35 +277,12 @@ QString Utils::getDesktopFilePath(const QString &desktopname) */ QStringList Utils::getSystemManualList() { - const QHash kAppNameMap = { - {"org.deepin.flatdeb.deepin-calendar", "dde-calendar"}, - {"org.deepin.flatdeb.deepin-music", "deepin-music"}, - {"org.deepin.flatdeb.deepin-screenshot", "deepin-screenshot"}, - {"org.deepin.flatdeb.deepin-voice-recorder", "deepin-voice-recorder"}, - {"org.deepin.flatdeb.deepin-image-viewer", "deepin-image-viewer"}, - {"deepin-cloud-scan-configurator", "deepin-cloud-scan"}, - {"org.deepin.flatdeb.deepin-movie", "deepin-movie"}, - {"org.deepin.flatdeb.deepin-screen-recorder", "deepin-screen-recorder"}, - {"org.deepin.flatdeb.deepin-calculator", "deepin-calculator"}, - {"com.deepin.editor", "deepin-editor"}, - }; - QStringList app_list_; QStringList strMANUAL_DIR_list = Utils::getMdsourcePath(); - //调用dbus服务获取系统安装应用 - const AppInfoList list = launcherInterface(); - QMultiMap appMap; - for (int var = 0; var < list.size(); ++var) { - appMap.insert(list.at(var).installed_time, list.at(var)); - } - //安装时间相同时,按名称排序 - QList listApp = sortAppList(appMap); foreach (auto strMANUAL_DIR, strMANUAL_DIR_list) { - const QStringList applicationList = QDir(QString("%1/application/").arg(strMANUAL_DIR)).entryList(); - const QStringList systemList = QDir(QString("%1/system/").arg(strMANUAL_DIR)).entryList(); + const QStringList applicationList = QDir(QString("%1/application/").arg(strMANUAL_DIR)).entryList(QDir::Dirs|QDir::NoDotAndDotDot); + const QStringList systemList = QDir(QString("%1/system/").arg(strMANUAL_DIR)).entryList(QDir::Dirs|QDir::NoDotAndDotDot); QString oldMdPath = strMANUAL_DIR; - -#if (DTK_VERSION > DTK_VERSION_CHECK(5, 4, 12, 0)) if (Dtk::Core::DSysInfo::UosServer == Dtk::Core::DSysInfo::uosType()) { oldMdPath += "/server"; } else if (Dtk::Core::DSysInfo::UosHome == Dtk::Core::DSysInfo::uosEditionType()) { @@ -322,36 +294,19 @@ QStringList Utils::getSystemManualList() } else { oldMdPath += "/professional"; } -#else - Dtk::Core::DSysInfo::DeepinType nType = Dtk::Core::DSysInfo::deepinType(); - if (Dtk::Core::DSysInfo::DeepinServer == nType) { - oldMdPath += "/server"; - } else if (Dtk::Core::DSysInfo::DeepinPersonal == nType) { - oldMdPath += "/personal"; - } else { - if (Dtk::Core::DSysInfo::isCommunityEdition()) { - oldMdPath += "/community"; - } else { - oldMdPath += "/professional"; - } - } - -#endif - const QStringList oldAppList = QDir(oldMdPath).entryList(); - - //比对存在帮助md文件的应用 - for (int i = 0; i < listApp.size(); ++i) { - const QString app_name = kAppNameMap.value(listApp.at(i).key, listApp.at(i).key); - if ((applicationList.contains(app_name) || oldAppList.contains(app_name)) && app_list_.indexOf(app_name) == -1) { - app_list_.append(app_name); + const QStringList oldAppList = QDir(oldMdPath).entryList(QDir::Dirs|QDir::NoDotAndDotDot); + for(auto app:applicationList){ + if (app_list_.indexOf(app) == -1) { + app_list_.append(app); } } if (systemList.contains("dde") || oldAppList.contains("dde")) { - app_list_.append("dde"); + if (app_list_.indexOf("dde") == -1) { + app_list_.append("dde"); + } } - qDebug() << "exist app list: " << app_list_ << ", count:" << app_list_.size(); } - app_list_.append("DeepinAIAssistant"); //语音助手无法通过launcherInterface获取目前只能手动添加 + qDebug() << "exist app list: " << app_list_ << ", count:" << app_list_.size(); return app_list_; } diff --git a/src/view/manual_proxy.cpp b/src/view/manual_proxy.cpp index 2aff17f0c..cfbe27ea2 100644 --- a/src/view/manual_proxy.cpp +++ b/src/view/manual_proxy.cpp @@ -216,19 +216,17 @@ QString ManualProxy::appToPath(const QString &appName) oldMdPath = getAppLocalDir(oldMdPath); mdList.append(oldMdPath.append("/index.md")); } - qInfo() << mdList; - //初始化赋值,如果为空字符,web层路径请求依旧能onload成功... - QString ret = "error"; - if (QFile(mdList[0]).exists()) { - ret = mdList[0]; - } else if (mdList.length() > 1 && QFile(mdList[1]).exists()) { - ret = mdList[1]; - } else if (mdList.length() > 2 && QFile(mdList[2]).exists()) { - ret = mdList[2]; - } else if (mdList.length() > 3 && QFile(mdList[3]).exists()) { - ret = mdList[3]; - } else { + qInfo() << "appToPath" << "find markdown file list" << mdList; + QString ret; + for (auto md : mdList) { + if (QFile(md).exists()) { + ret = md; + } + } + if (ret.isEmpty()) { qWarning() << Q_FUNC_INFO << " no exist file:" << appName; + // TODO(wurongjie) 在之前的代码中返回了error,暂不知作用 + return "error"; } qInfo() << "========>" << ret; return ret; From 95161a6e5d22ae7bf4751b37eed56b6bafa86bf6 Mon Sep 17 00:00:00 2001 From: myml Date: Tue, 16 Jan 2024 13:54:38 +0800 Subject: [PATCH 2/3] feat: add metainfo of dde MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加metainfo信息,用于dde识别组件 Log: --- src/resources/CMakeLists.txt | 2 ++ src/resources/org.deepin.manual.metainfo.xml | 29 ++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 src/resources/org.deepin.manual.metainfo.xml diff --git a/src/resources/CMakeLists.txt b/src/resources/CMakeLists.txt index 69bcb0032..4e891741f 100755 --- a/src/resources/CMakeLists.txt +++ b/src/resources/CMakeLists.txt @@ -9,3 +9,5 @@ install(FILES deepin-manual.desktop install(FILES themes/common/images/deepin-manual.svg DESTINATION share/icons/hicolor/scalable/apps/) + +install(FILES org.deepin.manual.metainfo.xml DESTINATION share/metainfo) \ No newline at end of file diff --git a/src/resources/org.deepin.manual.metainfo.xml b/src/resources/org.deepin.manual.metainfo.xml new file mode 100644 index 000000000..d3fe4e19b --- /dev/null +++ b/src/resources/org.deepin.manual.metainfo.xml @@ -0,0 +1,29 @@ + + + org.deepin.manual + deepin-manual.desktop + DDE + DDE + CC0-1.0 + GPL-3.0+ + + + DDE + Qt + + Deepin Manual + 深度帮助手册 + Manual provides user guides of the system and applications. + 手册旨在帮助用户了解操作系统及其应用程序,提供具体的使用说明和功能说明。 + deepin-manual + +

Manual is designed to help users learn the operating system and its applications, providing specific instructions and function descriptions.

+

深度帮助手册覆盖深度操作系统与深度原生应用,主要以系统/应用操作介绍、技巧为主,旨在将帮助大家进一步了解系统和应用。

+
+ https://github.com/linuxdeepin/developer-center/issues/ + https://github.com/linuxdeepin/developer-center/issues/ + https://bbs.deepin.org/ + + + +
\ No newline at end of file From 66112d6e9be283deb76c17ca31267bd544eeb48d Mon Sep 17 00:00:00 2001 From: myml Date: Tue, 16 Jan 2024 13:56:32 +0800 Subject: [PATCH 3/3] chore: Release 6.0.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发布6.0.7版本 Log: --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index 48909e7d3..637d9bb71 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +deepin-manual (6.0.7) stable; urgency=medium + + * chore: Sync by https://github.com/linuxdeepin/.github/commit/2e5e092ba3f86b16d1aabbabcf0bfd2ae65b19c8(Influence: none) + * chore: Sync by https://github.com/linuxdeepin/.github/commit/559e91167d4919644f37bbcf123eb0651c1528ea(Influence: none) + * fix: 修复系统启动后dmanHelper成为常驻进程的问题 + * feat: support dtk 5.6.17 + Thanks to Hillwood Yang + * fix: missing app list(Issue: https://github.com/linuxdeepin/developer-center/issues/6902) + * feat: add metainfo of dde + + -- myml Tue, 16 Jan 2024 13:55:52 +0800 + deepin-manual (6.0.6) stable; urgency=medium * Update version to 6.0.6. community