From e12b6b60edcddec3669fc1dacf179e76254785cb Mon Sep 17 00:00:00 2001 From: lizixin <2271170409@qq.com> Date: Thu, 13 Mar 2025 15:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E4=B8=ADaboutPage=20=E4=B8=AD=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit d823f62b6a143ce7f231675d7c51f7d61a99e546) --- 0020-aboutPage-release-version-problem.patch | 142 +++++++++++++++++++ calamares.spec | 6 +- 2 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 0020-aboutPage-release-version-problem.patch diff --git a/0020-aboutPage-release-version-problem.patch b/0020-aboutPage-release-version-problem.patch new file mode 100644 index 0000000..384f45c --- /dev/null +++ b/0020-aboutPage-release-version-problem.patch @@ -0,0 +1,142 @@ +From 104600c18bcc37e509c9059925963b1ff2da83be Mon Sep 17 00:00:00 2001 +From: lizixin <2271170409@qq.com> +Date: Thu, 13 Mar 2025 15:02:00 +0800 +Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E6=B5=8B=E9=97=AE?= + =?UTF-8?q?=E9=A2=98?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + src/libcalamares/CalamaresAbout.cpp | 117 ++++++++++++---------------- + 1 file changed, 51 insertions(+), 66 deletions(-) + +diff --git a/src/libcalamares/CalamaresAbout.cpp b/src/libcalamares/CalamaresAbout.cpp +index 65a1b9d33..11a628463 100644 +--- a/src/libcalamares/CalamaresAbout.cpp ++++ b/src/libcalamares/CalamaresAbout.cpp +@@ -7,69 +7,54 @@ + * + */ + +-#include "CalamaresAbout.h" +- +-#include "CalamaresVersionX.h" +- +-#include +- +-static const char s_header[] +- = QT_TRANSLATE_NOOP( "AboutData", "

Release:%1


" ); +- +-static const char s_footer[] +- = QT_TRANSLATE_NOOP( "AboutData", +- "Thanks to the openEuler team."); +- +-struct Maintainer +-{ +- unsigned int start; +- unsigned int end; +- const char* name; +- const char* email; +- QString text() const +- { +- //: Copyright year-year Name +- return QCoreApplication::translate( "AboutData", "Copyright %1-%2 %3 <%4>
" ) +- .arg( start ) +- .arg( end ) +- .arg( name ) +- .arg( email ); +- } +-}; +- +-static constexpr const Maintainer maintainers[] = { +- // { 2014, 2017, "Teo Mrnjavac", "teo@kde.org" }, +- // { 2017, 2022, "Adriaan de Groot", "groot@kde.org" }, +- // { 2022, 2024, "Adriaan de Groot (community)", "groot@kde.org" }, +-}; +- +-static QString +-aboutMaintainers() +-{ +- QStringList s; +- for ( const auto& m : maintainers ) +- { +- s.append( m.text() ); +- } +- return s.join( QString() ); +-} +- +-static QString +-substituteVersions( const QString& s ) +-{ +- return s.arg( "openEuler-24.09" ).arg(""); +-} +- +-const QString +-Calamares::aboutString() +-{ +- return substituteVersions( QCoreApplication::translate( "AboutData", s_header ) ) + aboutMaintainers() +- + QCoreApplication::translate( "AboutData", s_footer ); +- // return aboutMaintainers()+ QCoreApplication::translate( "AboutData", s_footer ); +-} +- +-const QString +-Calamares::aboutStringUntranslated() +-{ +- return substituteVersions( QString( s_header ) ) + aboutMaintainers() + QString( s_footer ); +-} ++ #include "CalamaresAbout.h" ++ ++ #include "CalamaresVersionX.h" ++ ++ #include "utils/System.h" ++ ++ #include ++ ++ static const char s_header[] ++ = QT_TRANSLATE_NOOP( "AboutData", "

Release:%1


" ); ++ ++ static const char s_footer[] ++ = QT_TRANSLATE_NOOP( "AboutData", ++ "Thanks to the openEuler team."); ++ ++ struct Maintainer ++ { ++ unsigned int start; ++ unsigned int end; ++ const char* name; ++ const char* email; ++ QString text() const ++ { ++ return QCoreApplication::translate( "AboutData", "Copyright %1-%2 %3 <%4>
" ) ++ .arg( start ) ++ .arg( end ) ++ .arg( name ) ++ .arg( email ); ++ } ++ }; ++ ++ static QString ++ substituteVersions( const QString& s ) ++ { ++ 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(" ", "-"); ++ return s.arg( osVersion ).arg(""); ++ } ++ ++ const QString ++ Calamares::aboutString() ++ { ++ return substituteVersions( QCoreApplication::translate( "AboutData", s_header ) ) + QCoreApplication::translate( "AboutData", s_footer ); ++ } ++ ++ const QString ++ Calamares::aboutStringUntranslated() ++ { ++ return substituteVersions( QString( s_header ) ) + QString( s_footer ); ++ } ++ +\ No newline at end of file +-- +2.46.0 + diff --git a/calamares.spec b/calamares.spec index ca10d8c..3a06316 100644 --- a/calamares.spec +++ b/calamares.spec @@ -2,7 +2,7 @@ Name: calamares Version: 3.3.7 -Release: 9 +Release: 10 Summary: Installer from a live CD/DVD/USB to disk License: GPL-3.0-or-later @@ -61,6 +61,7 @@ Patch15: 0016-DevStation-25.03-add-dependency.patch Patch16: 0017-Devstation-25.03-fix-timezoneErrors.patch Patch17: 0018-fix-desktop-icon-show.patch Patch18: 0019-add-email-tool.patch +Patch19: 0020-aboutPage-release-version-problem.patch # Calamares is only supported where live images (and GRUB) are. (#1171380) # This list matches the arches where grub2-efi is used to boot the system @@ -353,6 +354,9 @@ cd %{_builddir} || exit 0 rm -rf %{buildroot} %changelog +* Thu Mar 13 2025 Li Zixin <2271170409@qq.com> - 3.3.7-10 +- fix aboutPage release version problem + * Thu Mar 13 2025 Liu Wang <1823363429@qq.com> - 3.3.7-9 - Add thunderbird emial tool -- Gitee