代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。