13 Star 0 Fork 17

src-openEuler/calamares

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0015-requireDiskScan.patch 2.18 KB
一键复制 编辑 原始数据 按行查看 历史
lw520203 提交于 2025-02-13 00:16 +08:00 . 磁盘信息检测&&首页版本号显示
From c8c11d780cccabc463d2005ea28453df115f37bf Mon Sep 17 00:00:00 2001
From: lw520203 <1823363429@qq.com>
Date: Thu, 13 Feb 2025 00:03:51 +0800
Subject: [PATCH] =?UTF-8?q?=E6=AC=A2=E8=BF=8E=E9=A1=B5=E7=B3=BB=E7=BB=9F?=
=?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=E4=BF=AE=E8=AE=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/partition/core/DeviceList.cpp | 2 +-
src/modules/welcome/WelcomePage.cpp | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp
index 188594963..666bb1833 100644
--- a/src/modules/partition/core/DeviceList.cpp
+++ b/src/modules/partition/core/DeviceList.cpp
@@ -49,7 +49,7 @@ hasRootPartition( Device* device )
static bool
isValidDevice(const QString& devicePath)
{
- auto result = Calamares::System::runCommand({ "blkid", devicePath }, std::chrono::seconds(30));
+ auto result = Calamares::System::runCommand({ "lsblk" }, std::chrono::seconds(30));
return result.getExitCode() == 0 && !result.getOutput().isEmpty();
}
diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp
index 88f38c256..bbbda8f68 100644
--- a/src/modules/welcome/WelcomePage.cpp
+++ b/src/modules/welcome/WelcomePage.cpp
@@ -27,6 +27,7 @@
#include "utils/Logger.h"
#include "utils/NamedEnum.h"
#include "utils/Retranslator.h"
+#include "utils/System.h"
#include <QApplication>
#include <QBoxLayout>
@@ -211,8 +212,10 @@ void
WelcomePage::retranslate()
{
const QString message = m_conf->genericWelcomeMessage();
+ auto rse = Calamares::System::runCommand({"cat", "/etc/os-release"}, std::chrono::seconds(30));
+ QString osVersion = rse.getOutput().split("PRETTY_NAME=\"")[1].split("\"\n")[0].replace(" ", "-");
- ui->mainText->setText( message.arg( Calamares::Branding::instance()->versionedName() ) );
+ ui->mainText->setText( message.arg(osVersion) );
ui->retranslateUi( this );
// ui->supportButton->setText(
// tr( "%1 Support", "@action" ).arg( Calamares::Branding::instance()->shortProductName() ) );
--
2.46.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/calamares.git
git@gitee.com:src-openeuler/calamares.git
src-openeuler
calamares
calamares
master

搜索帮助