!10 新增修改磁盘分区、中英文翻译、修复root bash等问题的patch

From: @lzx20000118 
Reviewed-by: @lipingEmmaSiguyi 
Signed-off-by: @lipingEmmaSiguyi
This commit is contained in:
xinxin 2024-12-27 15:49:12 +00:00 committed by openeuler-ci-bot
parent fcbae85988
commit 5c98d0e18f
10 changed files with 11447 additions and 727 deletions

View File

@ -122,7 +122,7 @@ index f4c50e629..f91d520cd 100644
- width: 200; height: 200
+ id: background1
+ source: "Slide1.png"
+ width: 980; height: 980
+ width: 800; height: 800
fillMode: Image.PreserveAspectFit
- anchors.centerIn: parent
- }
@ -148,7 +148,7 @@ index f4c50e629..f91d520cd 100644
+ Image {
+ id: background2
+ source: "Slide2.png"
+ width: 980; height: 980
+ width: 800; height: 800
+ fillMode: Image.PreserveAspectFit
+ anchors.horizontalCenter:parent.horizontalCenter
+ y:parent.height / 2 - height / 2 -25
@ -161,7 +161,7 @@ index f4c50e629..f91d520cd 100644
+ Image {
+ id: background3
+ source: "Slide3.png"
+ width: 980; height: 980
+ width: 800; height: 800
+ fillMode: Image.PreserveAspectFit
+ anchors.horizontalCenter:parent.horizontalCenter
+ y:parent.height / 2 - height / 2 -25

View File

@ -36,7 +36,6 @@ Subject: [PATCH 4/4] modules Commit without .png, .svg, and .svgz files
src/modules/unpackfs/main.py | 82 +-
src/modules/unpackfs/unpackfs.conf | 12 +-
src/modules/users/UsersPage.cpp | 2 +-
src/modules/users/page_usersetup.bak.ui | 710 ++++++++++++++++++
src/modules/users/page_usersetup.ui | 158 ++--
src/modules/users/users.conf | 2 +-
src/modules/welcome/Config.cpp | 3 +-
@ -50,7 +49,6 @@ Subject: [PATCH 4/4] modules Commit without .png, .svg, and .svgz files
mode change 100755 => 100644 src/modules/fstab/main.py
mode change 100755 => 100644 src/modules/initramfscfg/encrypt_hook
mode change 100755 => 100644 src/modules/initramfscfg/encrypt_hook_nokey
create mode 100644 src/modules/users/page_usersetup.bak.ui
diff --git a/src/modules/bootloader/bootloader.conf b/src/modules/bootloader/bootloader.conf
@ -1324,722 +1322,6 @@ index 1ecc0eb..72fb3e0 100644
// Connect signals and slots
ui->textBoxUserPassword->setText( config->userPassword() );
connect( ui->textBoxUserPassword, &QLineEdit::textChanged, config, &Config::setUserPassword );
diff --git a/src/modules/users/page_usersetup.bak.ui b/src/modules/users/page_usersetup.bak.ui
new file mode 100644
index 0000000..f808c89
--- /dev/null
+++ b/src/modules/users/page_usersetup.bak.ui
@@ -0,0 +1,710 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <author>
+SPDX-FileCopyrightText: 2014 Teo Mrnjavac &lt;teo@kde.org&gt;
+SPDX-License-Identifier: GPL-3.0-or-later
+ </author>
+ <class>Page_UserSetup</class>
+ <widget class="QWidget" name="Page_UserSetup">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>862</width>
+ <height>683</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string notr="true">Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_12">
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Orientation::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Policy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>6</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelWhatIsYourName">
+ <property name="text">
+ <string>What is your name?</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="fullNameLayout">
+ <item>
+ <widget class="QLineEdit" name="textBoxFullName">
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="placeholderText">
+ <string>Your Full Name</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelFullName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="text">
+ <string notr="true"/>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelFullNameError">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Orientation::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Policy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="username_label_2">
+ <property name="text">
+ <string>What name do you want to use to log in?</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="usernameLayout">
+ <item>
+ <widget class="QLineEdit" name="textBoxLoginName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="placeholderText">
+ <string>login</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelUsername">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelUsernameError">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignmentFlag::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Orientation::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Policy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="hostnameLabel">
+ <property name="text">
+ <string>What is the name of this computer?</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="hostnameLayout">
+ <item>
+ <widget class="QLineEdit" name="textBoxHostname">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>&lt;small&gt;This name will be used if you make the computer visible to others on a network.&lt;/small&gt;</string>
+ </property>
+ <property name="placeholderText">
+ <string>Computer Name</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelHostname">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelHostnameError">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignmentFlag::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="hostnameVSpace">
+ <property name="orientation">
+ <enum>Qt::Orientation::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Policy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="password_label_2">
+ <property name="text">
+ <string>Choose a password to keep your account safe.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="userPasswordLayout">
+ <item>
+ <widget class="QLineEdit" name="textBoxUserPassword">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>&lt;small&gt;Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals.&lt;/small&gt;</string>
+ </property>
+ <property name="echoMode">
+ <enum>QLineEdit::EchoMode::Password</enum>
+ </property>
+ <property name="placeholderText">
+ <string>Password</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="textBoxUserVerifiedPassword">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>&lt;small&gt;Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals.&lt;/small&gt;</string>
+ </property>
+ <property name="echoMode">
+ <enum>QLineEdit::EchoMode::Password</enum>
+ </property>
+ <property name="placeholderText">
+ <string>Repeat Password</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelUserPassword">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelUserPasswordError">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignmentFlag::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_5">
+ <property name="orientation">
+ <enum>Qt::Orientation::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Policy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxRequireStrongPassword">
+ <property name="toolTip">
+ <string>When this box is checked, password-strength checking is done and you will not be able to use a weak password.</string>
+ </property>
+ <property name="text">
+ <string>Require strong passwords.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxDoAutoLogin">
+ <property name="text">
+ <string>Log in automatically without asking for the password.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxReusePassword">
+ <property name="text">
+ <string>Use the same password for the administrator account.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_6">
+ <property name="orientation">
+ <enum>Qt::Orientation::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Policy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelChooseRootPassword">
+ <property name="text">
+ <string>Choose a password for the administrator account.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="rootPasswordLayout">
+ <item>
+ <widget class="QLineEdit" name="textBoxRootPassword">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>&lt;small&gt;Enter the same password twice, so that it can be checked for typing errors.&lt;/small&gt;</string>
+ </property>
+ <property name="echoMode">
+ <enum>QLineEdit::EchoMode::Password</enum>
+ </property>
+ <property name="placeholderText">
+ <string>Password</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="textBoxVerifiedRootPassword">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>&lt;small&gt;Enter the same password twice, so that it can be checked for typing errors.&lt;/small&gt;</string>
+ </property>
+ <property name="echoMode">
+ <enum>QLineEdit::EchoMode::Password</enum>
+ </property>
+ <property name="placeholderText">
+ <string>Repeat Password</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelRootPassword">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelRootPasswordError">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignmentFlag::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Orientation::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Policy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>6</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QCheckBox" name="useADCheckbox">
+ <property name="text">
+ <string>Use Active Directory</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="domainLabel">
+ <property name="text">
+ <string>Domain:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="domainField"/>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="domainAdminLabel">
+ <property name="text">
+ <string>Domain Administrator:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="domainAdminField"/>
+ </item>
+ <item>
+ <widget class="QLabel" name="domainPasswordLabel">
+ <property name="text">
+ <string>Password:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="domainPasswordField">
+ <property name="echoMode">
+ <enum>QLineEdit::EchoMode::Password</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="ipAddressLabel">
+ <property name="text">
+ <string>IP Address (optional):</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="ipAddressField"/>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_7">
+ <property name="orientation">
+ <enum>Qt::Orientation::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>1</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/modules/users/page_usersetup.ui b/src/modules/users/page_usersetup.ui
index 6e6e542..2a5ccd2 100644
--- a/src/modules/users/page_usersetup.ui

400
0010-cDebugDelect.patch Normal file
View File

@ -0,0 +1,400 @@
From 662c8f4cdf8838d44f4a5b8be5455f840c0e314c Mon Sep 17 00:00:00 2001
From: cui-gaoleng <562344211@qq.com>
Date: Tue, 19 Nov 2024 13:43:48 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF=E5=92=8C?=
=?UTF-8?q?=E5=B7=B2=E6=B3=A8=E9=87=8A=E4=BB=A3=E7=A0=81=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/calamares/CalamaresWindow.cpp | 3 -
.../progresstree/ProgressTreeDelegate.cpp | 9 -
.../progresstree/ProgressTreeView.cpp | 2 -
src/libcalamares/CalamaresAbout.cpp | 1 -
.../modulesystem/CppJobModule.cpp | 4 -
src/modules/keyboard/KeyboardPage.cpp | 19 -
src/modules/keyboard/KeyboardPage.ui | 3 -
src/modules/locale/LocalePage.cpp | 20 +-
.../packagechooser/packagechooser.conf | 16 +-
src/modules/welcome/WelcomePage.cpp | 74 +-
11 files changed, 7 insertions(+), 862 deletions(-)
diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp
index 4721cb9..4917f75 100644
--- a/src/calamares/CalamaresWindow.cpp
+++ b/src/calamares/CalamaresWindow.cpp
@@ -440,7 +440,6 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
int h = qBound( minimumSize.height(), windowDimensionToPixels( brandingSizes.second ), availableSize.height() );
cDebug() << Logger::SubEntry << "Proposed window size:" << w << h;
- //resize( availableSize.width(), availableSize.height() );//通用桌面大小作为窗口大小
resize( w, h );//通用桌面大小作为窗口大小
QWidget* baseWidget = this;
if ( !( branding->imagePath( ImageEntry::ProductWallpaper ).isEmpty() ) )
@@ -519,8 +518,6 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
Calamares::unmarginLayout( contentsLayout );
baseWidget->setLayout( mainLayout );
setStyleSheet( Calamares::Branding::instance()->stylesheet() );
- cDebug()<<"<---------------------------WindowWindowSize-------------------------------------->"<<this->size();
- cDebug()<< "<--------------------sideBox->size()-------------------->"<< sideBox->size();
this->setFixedSize(this->size());
}
diff --git a/src/calamares/progresstree/ProgressTreeDelegate.cpp b/src/calamares/progresstree/ProgressTreeDelegate.cpp
index 6d5f865..7541356 100644
--- a/src/calamares/progresstree/ProgressTreeDelegate.cpp
+++ b/src/calamares/progresstree/ProgressTreeDelegate.cpp
@@ -53,9 +53,6 @@ static QString getTypeOfStep(const QString& stepString){
// 将地区枚举值转换为字符串
QString countryString = QLocale::countryToString(country);
- // 输出当前语言
- cDebug() << "-------------------------------------------当前系统语言:" << languageString;
- cDebug() << "-------------------------------------------当前系统地区:" << countryString;
if(contains(baseSetting1,stepString)){
return "BaseSetting";
}
@@ -145,7 +142,6 @@ paintViewStep( QPainter* painter, const QStyleOptionViewItem& option, const QMod
shrinkSteps++;
QRectF boundingBox;
- cDebug() << "index.data().toString()" << index.data().toString();
QString text;
if(index.data().toString()=="欢迎" || index.data().toString()=="Welcome"||!isVisable(index.data().toString())){
text = "";
@@ -179,7 +175,6 @@ ProgressTreeDelegate::sizeHint( const QStyleOptionViewItem& option, const QModel
}
QFont font = qApp->font();
- cDebug() << "ProgressTreeDelegate::sizeHint";
font.setPointSize( item_fontsize() );
QFontMetrics fm( font );
@@ -190,14 +185,12 @@ ProgressTreeDelegate::sizeHint( const QStyleOptionViewItem& option, const QModel
}else{
return QSize( (Calamares::windowMinimumWidth*0.9)/3, height*2 );
}
-// return QSize( option.rect.width(), height );
}
void
ProgressTreeDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
- cDebug() << "ProgressTreeDelegate::paint----------";
QStyleOptionViewItem opt = option;
painter->save();
@@ -209,11 +202,9 @@ ProgressTreeDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti
QColor( Calamares::Branding::instance()->styleString( Calamares::Branding::SidebarBackground ) ) );
painter->setPen( QColor( Calamares::Branding::instance()->styleString( Calamares::Branding::SidebarText ) ) );
if(index.data().toString()=="欢迎" || index.data().toString()=="Welcome"){
- cDebug() << "ProgressTreeDelegate::欢迎Welcome--------Nopaint----------";
}else{
paintViewStep( painter, opt, index );
}
- //paintViewStep( painter, opt, index );
painter->restore();
}
diff --git a/src/calamares/progresstree/ProgressTreeView.cpp b/src/calamares/progresstree/ProgressTreeView.cpp
index 29ee7ee..a9a15b8 100644
--- a/src/calamares/progresstree/ProgressTreeView.cpp
+++ b/src/calamares/progresstree/ProgressTreeView.cpp
@@ -68,14 +68,12 @@ ProgressTreeView::setModel( QAbstractItemModel* model )
void
ProgressTreeView::update()
{
- cDebug() << "update ---------------------";
viewport()->update();
}
void
ProgressTreeView::updateVisibility(int currentStep)
{
- cDebug() << "int currentStep ------------------ " << currentStep;
// 在第一个步骤隐藏,其他步骤显示
this->setVisible(currentStep > 0);
}
diff --git a/src/libcalamares/CalamaresAbout.cpp b/src/libcalamares/CalamaresAbout.cpp
index 65a1b9d..595efc7 100644
--- a/src/libcalamares/CalamaresAbout.cpp
+++ b/src/libcalamares/CalamaresAbout.cpp
@@ -65,7 +65,6 @@ Calamares::aboutString()
{
return substituteVersions( QCoreApplication::translate( "AboutData", s_header ) ) + aboutMaintainers()
+ QCoreApplication::translate( "AboutData", s_footer );
- // return aboutMaintainers()+ QCoreApplication::translate( "AboutData", s_footer );
}
const QString
diff --git a/src/libcalamaresui/modulesystem/CppJobModule.cpp b/src/libcalamaresui/modulesystem/CppJobModule.cpp
index c211006..b35a457 100644
--- a/src/libcalamaresui/modulesystem/CppJobModule.cpp
+++ b/src/libcalamaresui/modulesystem/CppJobModule.cpp
@@ -53,10 +53,6 @@ CppJobModule::loadSelf()
cDebug() << "Could not load module:" << m_loader->errorString();
return;
}
- // cDebug() << "CppJobModule loading self for instance" << instanceKey()
- // << "\nCppJobModule at address" << this
- // << "\nCalamares::PluginFactory at address" << pf
- // << "\nCppJob at address" << cppJob;
cppJob->setModuleInstanceKey( instanceKey() );
cppJob->setConfigurationMap( m_configurationMap );
diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp
index 3f06158..be60521 100644
--- a/src/modules/keyboard/KeyboardPage.cpp
+++ b/src/modules/keyboard/KeyboardPage.cpp
@@ -48,9 +48,6 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent )
{
ui->setupUi( this );
this->setContentsMargins(50,0,50,0);
- // Keyboard Preview
- // ui->KBPreviewLayout->addWidget( m_keyboardPreview );
-
{
auto* model = config->keyboardModels();
@@ -93,27 +90,11 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent )
&QItemSelectionModel::currentChanged,
[ this ]( const QModelIndex& current )
{ m_config->keyboardLayouts()->setCurrentIndex( current.row() ); } );
- // connect( config->keyboardLayouts(),
- // &KeyboardLayoutModel::currentIndexChanged,
- // [ this ]( int index )
- // {
- // ui->layoutSelector->setCurrentIndex( m_config->keyboardLayouts()->index( index ) );
- // m_keyboardPreview->setLayout( m_config->keyboardLayouts()->key( index ) );
- // m_keyboardPreview->setVariant(
- // m_config->keyboardVariants()->key( m_config->keyboardVariants()->currentIndex() ) );
- // } );
connect( ui->variantSelector->selectionModel(),
&QItemSelectionModel::currentChanged,
[ this ]( const QModelIndex& current )
{ m_config->keyboardVariants()->setCurrentIndex( current.row() ); } );
- // connect( config->keyboardVariants(),
- // &KeyboardVariantsModel::currentIndexChanged,
- // [ this ]( int index )
- // {
- // ui->variantSelector->setCurrentIndex( m_config->keyboardVariants()->index( index ) );
- // m_keyboardPreview->setVariant( m_config->keyboardVariants()->key( index ) );
- // } );
connect( ui->groupSelector,
QOverload< int >::of( &QComboBox::currentIndexChanged ),
diff --git a/src/modules/keyboard/KeyboardPage.ui b/src/modules/keyboard/KeyboardPage.ui
index 1d6afbf..70cfca3 100644
--- a/src/modules/keyboard/KeyboardPage.ui
+++ b/src/modules/keyboard/KeyboardPage.ui
@@ -45,9 +45,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</spacer>
</item>
- <!-- <item>
- <layout class="QVBoxLayout" name="KBPreviewLayout"/>
- </item> -->
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp
index 0568067..ed50574 100644
--- a/src/modules/locale/LocalePage.cpp
+++ b/src/modules/locale/LocalePage.cpp
@@ -32,13 +32,6 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
{
QBoxLayout* mainLayout = new QVBoxLayout;
mainLayout->setContentsMargins(50,0,50,0);
- //QBoxLayout* tzwLayout = new QHBoxLayout;
- //m_tzWidget = new TimeZoneWidget( m_config->zonesModel(), this );
- //tzwLayout->addStretch();
- //tzwLayout->addWidget( m_tzWidget );
- //tzwLayout->addStretch();
- // Adjust for margins and spacing in this page
- //m_tzWidget->setMinimumHeight( m_tzWidget->minimumHeight() + 12 ); // 2 * spacing
QBoxLayout* zoneAndRegionLayout = new QVBoxLayout;
m_regionLabel = new QLabel( this );
@@ -90,7 +83,7 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
m_formatsChangeButton->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
formatsLayout->addWidget( m_formatsChangeButton );
formatsLayout->addSpacing(20);
- //mainLayout->addLayout( tzwLayout );
+
mainLayout->addStretch();
mainLayout->addLayout( zoneAndRegionLayout );
mainLayout->addStretch();
@@ -100,7 +93,7 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
mainLayout->addSpacing(20);
mainLayout->addLayout( timezoneLayout );
mainLayout->addStretch();
- //setMinimumWidth( m_tzWidget->width() );
+
setLayout( mainLayout );
m_localeChangeButton->hide();
@@ -114,20 +107,15 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
zones->setRegion( location->region() );
m_regionCombo->setModel( regions );
m_zoneCombo->setModel( zones );
- //m_tzWidget->setCurrentLocation( location );
+
locationChanged( location ); // doesn't inform TZ widget
}
connect( config, &Config::currentLCStatusChanged, m_formatsLabel, &QLabel::setText );
connect( config, &Config::currentLanguageStatusChanged, m_localeLabel, &QLabel::setText );
connect( config, &Config::currentZoneChanged, m_timezoneLabel , &QLabel::setText);
- //connect( config, &Config::currentLocationChanged, m_tzWidget, &TimeZoneWidget::setCurrentLocation );
+
connect( config, &Config::currentLocationChanged, this, &LocalePage::locationChanged );
- // connect( m_tzWidget,
- // &TimeZoneWidget::locationChanged,
- // config,
- // QOverload< const Calamares::Locale::TimeZoneData* >::of( &Config::setCurrentLocation ) );
-
connect( m_regionCombo, QOverload< int >::of( &QComboBox::currentIndexChanged ), this, &LocalePage::regionChanged );
connect( m_zoneCombo, QOverload< int >::of( &QComboBox::currentIndexChanged ), this, &LocalePage::zoneChanged );
diff --git a/src/modules/packagechooser/packagechooser.conf b/src/modules/packagechooser/packagechooser.conf
index e7b9b00..aa048e2 100644
--- a/src/modules/packagechooser/packagechooser.conf
+++ b/src/modules/packagechooser/packagechooser.conf
@@ -157,11 +157,7 @@ items:
description[nl]: "Kies eventueel een desktop-omgeving uit deze lijst. Als u geen desktop-omgeving wenst te gebruiken, kies er dan geen. In dat geval start het systeem straks op in tekst-modus en kunt u later alsnog een desktop-omgeving installeren."
description[zh]: "请选择一个桌面环境。如果您不想安装桌面环境也没关系,您可以稍后再为系统安装桌面环境。"
screenshot: ":/images/Minimal-Install.png"
- # - id: kde
- # packages: [ kde-frameworks, kde-plasma, kde-gear ]
- # name: Plasma Desktop
- # description: "KDE Plasma Desktop, simple by default, a clean work area for real-world usage which intends to stay out of your way. Plasma is powerful when needed, enabling the user to create the workflow that makes them more effective to complete their tasks."
- # screenshot: ":/images/Plasma.png"
+
- id: gnome
packages: [ checkpolicy, code, xorg-*, dejavu-fonts, liberation-fonts, gnu-*-fonts, google-*-fonts, adwaita-icon-theme, atk, atkmm, at-spi2-atk, at-spi2-core, baobab, abattis-cantarell-fonts, cheese, clutter, clutter-gst3, clutter-gtk, cogl, dconf, dconf-editor, devhelp, eog, epiphany, evince, evolution-data-server, file-roller, folks, gcab, gcr, gdk-pixbuf2, gdm, gedit, geocode-glib, gfbgraph, gjs, glib2, glibmm24, glib-networking, gmime30, gnome-autoar, gnome-backgrounds, gnome-bluetooth, gnome-builder, gnome-calculator, gnome-calendar, gnome-characters, gnome-clocks, gnome-color-manager, gnome-contacts, gnome-control-center, gnome-desktop3, gnome-disk-utility, gnome-font-viewer, gnome-getting-started-docs, gnome-initial-setup, gnome-keyring, gnome-logs, gnome-menus, gnome-music, gnome-online-accounts, gnome-online-miners, gnome-photos, gnome-remote-desktop, gnome-screenshot, gnome-session, gnome-settings-daemon, gnome-shell, gnome-shell-extensions, gnome-software, gnome-system-monitor, gnome-terminal, gnome-tour, gnome-user-docs, gnome-user-share, gnome-video-effects, gnome-weather, gobject-introspection, gom, grilo, grilo-plugins, gsettings-desktop-schemas, gsound, gspell, gssdp, gtk3, gtk4, gtk-doc, gtkmm30, gtksourceview4, gtk-vnc2, gupnp, gupnp-av, gupnp-dlna, gvfs, json-glib, libchamplain, libdazzle, libgdata, libgee, libgnomekbd, libgsf, libgtop2, libgweather, libgxps, libhandy, libmediaart, libnma, libnotify, libpeas, librsvg2, libsecret, libsigc++20, libsoup, mm-common, mutter, nautilus, orca, pango, pangomm, libphodav, python3-pyatspi, python3-gobject, rest, rygel, simple-scan, sushi, sysprof, tepl, totem, totem-pl-parser, tracker3, tracker3-miners, vala, vte291, yelp, yelp-tools, yelp-xsl, zenity, devstation-config, ibus-libpinyin ]
name: DevStation
@@ -169,13 +165,3 @@ items:
description: GNU Networked Object Modeling Environment Desktop
description[zh]: Devstation系统桌面
screenshot: ":/images/gnome.png"
- #- id: ukui
- # packages: [ ukui ]
- # name: UKUI
- # description: Linux Desktop
- # screenshot: ":/images/UKUI.png"
- # - id: calamares
- # appdata: ../io.calamares.calamares.appdata.xml
- # screenshot: ":/images/calamares.png"
- # - id: kate
- # appstream: org.kde.kwrite.desktop
diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp
index 88f38c2..471187b 100644
--- a/src/modules/welcome/WelcomePage.cpp
+++ b/src/modules/welcome/WelcomePage.cpp
@@ -91,21 +91,7 @@ WelcomePage::WelcomePage( Config* config, QWidget* parent )
}
void
-WelcomePage::init()
-{
- //setup the url buttons
- // setupButton( WelcomePage::Button::Support, m_conf->supportUrl() );
- // setupButton( WelcomePage::Button::KnownIssues, m_conf->knownIssuesUrl() );
- // setupButton( WelcomePage::Button::ReleaseNotes, m_conf->releaseNotesUrl() );
- // setupButton( WelcomePage::Button::Donate, m_conf->donateUrl() );
-
- //language icon
- // auto icon = Calamares::Branding::instance()->image( m_conf->languageIcon(), QSize( 48, 48 ) );
- // if ( !icon.isNull() )
- // {
- // setLanguageIcon( icon );
- // }
-}
+WelcomePage::init(){}
void
WelcomePage::initLanguages()
@@ -125,57 +111,6 @@ WelcomePage::initLanguages()
&Config::setLocaleIndex );
}
-// void
-// WelcomePage::setupButton( Button role, const QString& url )
-// {
-// QPushButton* button = nullptr;
-// Calamares::ImageType icon = Calamares::Information;
-
-// switch ( role )
-// {
-// case Button::Donate:
-// button = ui->donateButton;
-// icon = Calamares::Donate;
-// break;
-// case Button::KnownIssues:
-// button = ui->knownIssuesButton;
-// icon = Calamares::Bugs;
-// break;
-// case Button::ReleaseNotes:
-// button = ui->releaseNotesButton;
-// icon = Calamares::Release;
-// break;
-// case Button::Support:
-// button = ui->supportButton;
-// icon = Calamares::Help;
-// break;
-// }
-// if ( !button )
-// {
-// cWarning() << "Unknown button role" << smash( role );
-// return;
-// }
-
-// if ( url.isEmpty() )
-// {
-// button->hide();
-// return;
-// }
-
-// QUrl u( url );
-// if ( u.isValid() )
-// {
-// auto size = 2 * QSize( Calamares::defaultFontHeight(), Calamares::defaultFontHeight() );
-// button->setIcon( Calamares::defaultPixmap( icon, Calamares::Original, size ) );
-// connect( button, &QPushButton::clicked, [ u ]() { QDesktopServices::openUrl( u ); } );
-// }
-// else
-// {
-// cWarning() << "Welcome button" << smash( role ) << "URL" << url << "is invalid.";
-// button->hide();
-// }
-// }
-
void
WelcomePage::focusInEvent( QFocusEvent* e )
{
@@ -201,11 +136,6 @@ WelcomePage::externallySelectedLanguage( int row )
}
}
-// void
-// WelcomePage::setLanguageIcon( QPixmap i )
-// {
-// ui->languageIcon->setPixmap( i );
-// }
void
WelcomePage::retranslate()
@@ -214,8 +144,6 @@ WelcomePage::retranslate()
ui->mainText->setText( message.arg( Calamares::Branding::instance()->versionedName() ) );
ui->retranslateUi( this );
- // ui->supportButton->setText(
- // tr( "%1 Support", "@action" ).arg( Calamares::Branding::instance()->shortProductName() ) );
}
void

View File

@ -0,0 +1,230 @@
From 057721ec933fc439d9e9b9887dc69704cd49472e Mon Sep 17 00:00:00 2001
From: cui-gaoleng <562344211@qq.com>
Date: Fri, 22 Nov 2024 12:14:08 +0800
Subject: [PATCH] =?UTF-8?q?fix=20progress=20bar=20has=20been=20at=20the=20?=
=?UTF-8?q?87%=20position=20for=20a=20long=20time+=E4=B8=A4=E5=A4=84?=
=?UTF-8?q?=E7=B9=81=E4=BD=93=E7=BF=BB=E8=AF=91=E8=A1=A5=E9=BD=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
calamares.desktop | 2 +-
lang/calamares_zh_TW.ts | 6 +--
src/modules/packages/main.py | 70 +++++++++++++++++++-------------
src/modules/packages/module.desc | 1 +
src/modules/unpackfs/main.py | 24 ++++++++---
5 files changed, 65 insertions(+), 38 deletions(-)
diff --git a/calamares.desktop b/calamares.desktop
index 9a1416e..9d33495 100644
--- a/calamares.desktop
+++ b/calamares.desktop
@@ -5,7 +5,7 @@ Name=Install System
GenericName=System Installer
Keywords=calamares;system;installer;
TryExec=calamares
-Exec=sh -c "pkexec calamares"
+Exec=sh -c "pkexec calamares -style Adwaita"
Comment=Calamares — System Installer
Icon=calamares
Terminal=false
diff --git a/lang/calamares_zh_TW.ts b/lang/calamares_zh_TW.ts
index 8689629..3cc473c 100644
--- a/lang/calamares_zh_TW.ts
+++ b/lang/calamares_zh_TW.ts
@@ -613,9 +613,9 @@ The system will reboot or you can enter the debug mode for further investigation
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="547"/>
- <source>&amp;Debug</source>
+ <source>&amp;Try Now</source>
<comment>@button</comment>
- <translation>調試(&amp;D)</translation>
+ <translation>立即試用(&amp;D)</translation>
</message>
<message>
<source>Do you really want to cancel the current install process?
@@ -4526,7 +4526,7 @@ Output:
<message>
<location filename="../src/modules/welcome/WelcomePage.ui" line="89"/>
<source>language</source>
- <translation type="unfinished"></translation>
+ <translation>語言</translation>
</message>
<message>
<source>Open donations website</source>
diff --git a/src/modules/packages/main.py b/src/modules/packages/main.py
index 8c165e8..1fbe276 100644
--- a/src/modules/packages/main.py
+++ b/src/modules/packages/main.py
@@ -138,10 +138,11 @@ class PackageManager(metaclass=abc.ABCMeta):
self.install([packagedata], from_local=from_local, options=options)
else:
self.run(packagedata["pre-script"])
- if isinstance(packagedata["package"], list):
- self.install(packagedata["package"], from_local=from_local, options=options)
- else:
- self.install([packagedata["package"]], from_local=from_local, options=options)
+ if "package" in packagedata:
+ if isinstance(packagedata["package"], list):
+ self.install(packagedata["package"], from_local=from_local, options=options)
+ else:
+ self.install([packagedata["package"]], from_local=from_local, options=options)
if isinstance(packagedata["post-script"], list):
for script in packagedata["post-script"]:
self.run(script)
@@ -787,41 +788,54 @@ def run_operations(pkgman, entry, options):
names (strings) or package information dictionaries with pre-
and post-scripts.
"""
- global group_packages, completed_packages, mode_packages
-
- if "source" in entry and entry["source"] == "packagechooser@packagechooser":
- handle_packagechooser(entry)
+ global group_packages, completed_packages, mode_packages, custom_status_message
for key in entry.keys():
package_list = subst_locale(entry[key])
+ libcalamares.utils.warning(str(package_list))
group_packages = len(package_list)
- if key == "install":
- _change_mode(INSTALL)
- pkgman.operation_install(package_list, options=options)
- elif key == "try_install":
+ if key in ["install", "try_install", "localInstall"]:
_change_mode(INSTALL)
- pkgman.operation_try_install(package_list, options=options)
- elif key == "remove":
- _change_mode(REMOVE)
- pkgman.operation_remove(package_list, options=options)
- elif key == "try_remove":
+ for package in package_list:
+ custom_status_message = f"Installing package: {package}"
+ try:
+ if key == "localInstall":
+ pkgman.operation_install([package], from_local=True, options=options)
+ elif key == "try_install":
+ pkgman.operation_try_install([package], options=options)
+ else:
+ pkgman.operation_install([package], options=options)
+ except Exception as e:
+ libcalamares.utils.warning("Failed to install package {}: {}".format(package, str(e)))
+
+ completed_packages += 1
+ progress = completed_packages / total_packages
+ libcalamares.job.setprogress(progress)
+ libcalamares.utils.debug("Progress: {:.2f}, Package: {}".format(progress, package))
+ elif key in ["remove", "try_remove"]:
_change_mode(REMOVE)
- pkgman.operation_try_remove(package_list, options=options)
- elif key == "localInstall":
- _change_mode(INSTALL)
- pkgman.operation_install(package_list, from_local=True, options=options)
- elif key == "source":
- libcalamares.utils.debug("Package-list from {!s}".format(entry[key]))
+ for package in package_list:
+ try:
+ if key == "remove":
+ pkgman.operation_remove([package], options=options)
+ elif key == "try_remove":
+ pkgman.operation_try_remove([package], options=options)
+ except Exception as e:
+ libcalamares.utils.warning("Failed to remove package {}: {}".format(package, str(e)))
+
+ completed_packages += 1
+ progress = completed_packages / total_packages
+ libcalamares.job.setprogress(progress)
+ libcalamares.utils.debug("Progress: {:.2f}, Package: {}".format(progress, package))
else:
libcalamares.utils.warning("Unknown package-operation key {!s}".format(key))
- completed_packages += len(package_list)
- libcalamares.job.setprogress(completed_packages * 1.0 / total_packages)
- libcalamares.utils.debug("Pretty name: {!s}, setting progress..".format(pretty_name()))
+ if "source" in entry and entry["source"] == "packagechooser@packagechooser":
+ packagemeta = handle_packagechooser()
+ pkgman.operation_install([packagemeta], from_local=True, options=options)
group_packages = 0
- _change_mode(None)
-
+ _change_mode(None)
def run():
"""
diff --git a/src/modules/packages/module.desc b/src/modules/packages/module.desc
index 3e3053b..9529af6 100644
--- a/src/modules/packages/module.desc
+++ b/src/modules/packages/module.desc
@@ -5,3 +5,4 @@ type: "job"
name: "packages"
interface: "python"
script: "main.py"
+weight: 50
diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py
index 4148720..4c5518e 100644
--- a/src/modules/unpackfs/main.py
+++ b/src/modules/unpackfs/main.py
@@ -26,6 +26,8 @@ import libcalamares
import platform
import gettext
+
+import libcalamares.utils
_ = gettext.translation("calamares-python",
localedir=libcalamares.utils.gettext_path(),
languages=libcalamares.utils.gettext_languages(),
@@ -263,6 +265,7 @@ def file_copy(source, entry, progress_cb):
progress_cb(num_files_copied, num_files_total_local)
try:
returncode = 0
+
arch = platform.machine()
libcalamares.utils.host_env_process_output(["mkdir", "-p", entry.destination + "/etc/yum.repos.d/"], output_cb)
@@ -272,6 +275,7 @@ def file_copy(source, entry, progress_cb):
libcalamares.utils.host_env_process_output(["cp", "-af", "/etc/add_selinux_policy.sh", entry.destination + "/etc/add_selinux_policy.sh"], output_cb)
libcalamares.utils.host_env_process_output(["chmod", "+x", entry.destination + "/etc/add_selinux_policy.sh"], output_cb)
+ completed_packages = 0
if os.path.exists("/etc/yum.repos.d/local.repo"):
libcalamares.utils.host_env_process_output(
["cp", "-af", "/etc/yum.repos.d/local.repo", entry.destination + "/etc/yum.repos.d/"], output_cb)
@@ -281,9 +285,13 @@ def file_copy(source, entry, progress_cb):
else:
packages = ["yum", "grub2", "grub2-efi-x64", "grub2-pc", "passwd", "sudo"]
- libcalamares.utils.host_env_process_output(
- ["yum", "--installroot=" + entry.destination, "--disablerepo=*", "--enablerepo=local-repo",
- "--releasever=/", "--nogpgcheck", "--setopt=sslverify=0", "install", "-y"] + packages, output_cb)
+ for package in packages:
+ libcalamares.job.setprogress(completed_packages / len(packages))
+ libcalamares.utils.host_env_process_output(
+ ["yum", "--installroot=" + entry.destination, "--disablerepo=*", "--enablerepo=local-repo",
+ "--releasever=/", "--nogpgcheck", "--setopt=sslverify=0", "install", "-y", package], output_cb)
+ completed_packages += 1
+ libcalamares.job.setprogress(completed_packages / len(packages))
else:
libcalamares.utils.host_env_process_output(
["cp", "-af", "/etc/yum.repos.d/openEuler.repo", entry.destination + "/etc/yum.repos.d/"], output_cb)
@@ -292,9 +300,13 @@ def file_copy(source, entry, progress_cb):
else:
packages = ["yum", "grub2", "grub2-efi-x64", "grub2-pc", "passwd", "sudo"]
- libcalamares.utils.host_env_process_output(
- ["yum", "--installroot=" + entry.destination, "--releasever=/", "--nogpgcheck", "--setopt=sslverify=0",
- "install", "-y"] + packages, output_cb)
+ for package in packages:
+ libcalamares.job.setprogress(completed_packages / len(packages))
+ libcalamares.utils.host_env_process_output(
+ ["yum", "--installroot=" + entry.destination, "--releasever=/", "--nogpgcheck", "--setopt=sslverify=0",
+ "install", "-y", package], output_cb)
+ completed_packages += 1
+ libcalamares.job.setprogress(completed_packages / len(packages))
libcalamares.utils.host_env_process_output(["rm", "-f", entry.destination + "/etc/shadow"], output_cb)
libcalamares.utils.host_env_process_output(["cp", "-af", "/etc/shadow", entry.destination + "/etc/shadow"], output_cb)
--
2.43.0

29
0012-replace-icon.patch Normal file
View File

@ -0,0 +1,29 @@
From ec4ad9b45ba894afb73ae30ae6e8631fb701f1dd Mon Sep 17 00:00:00 2001
From: cui-gaoleng <562344211@qq.com>
Date: Fri, 22 Nov 2024 12:44:38 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E6=A0=87=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
calamares.desktop | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/calamares.desktop b/calamares.desktop
index 9d33495..00c2368 100644
--- a/calamares.desktop
+++ b/calamares.desktop
@@ -7,7 +7,7 @@ Keywords=calamares;system;installer;
TryExec=calamares
Exec=sh -c "pkexec calamares -style Adwaita"
Comment=Calamares — System Installer
-Icon=calamares
+Icon=/usr/share/calamares/branding/default/openEuler-icon.png
Terminal=false
StartupNotify=true
Categories=Qt;System;
--
2.43.0

10764
0013-1230.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
Name: calamares
Version: 3.3.7
Release: 1
Release: 2
Summary: Installer from a live CD/DVD/USB to disk
License: GPL-3.0-or-later
@ -38,7 +38,9 @@ Source16: information.svgz
Source17: openEuler.png
Source18: openEulerWord-blus.png
Source19: openEulerWord.png
Source20: openEuler-icon.png
Source21: password-hide.png
Source22: password-show.png
# patch
Patch0: 0001-branding-patch.patch
Patch1: 0002-lang.patch
@ -49,6 +51,11 @@ Patch5: 0006-modules-file.patch
Patch6: 0007-root.patch
Patch7: 0008-progromTree.patch
Patch8: 0009-qss.patch
Patch9: 0010-cDebugDelect.patch
Patch10: 0011-fix-87-position-and-translate.patch
Patch11: 0012-replace-icon.patch
Patch12: 0013-1230.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
ExclusiveArch: %{ix86} x86_64 aarch64 riscv64
@ -213,6 +220,7 @@ mkdir -p %{_builddir}/calamares-3.3.7/data/images
install -Dm 0644 %{SOURCE8} %{_builddir}/calamares-3.3.7/data/images/Biglogo.svgz
install -Dm 0644 %{SOURCE9} %{_builddir}/calamares-3.3.7/data/images/Biglogo.svg
install -Dm 0644 %{SOURCE16} %{_builddir}/calamares-3.3.7/data/images/information.svgz
mkdir -p %{_builddir}/calamares-3.3.7/src/modules/packagechooser/images
install -Dm 0644 %{SOURCE10} %{_builddir}/calamares-3.3.7/src/branding/default/Biglogo.png
install -Dm 0644 %{SOURCE11} %{_builddir}/calamares-3.3.7/src/modules/packagechooser/images/Minimal-Install.png
@ -226,11 +234,14 @@ install -Dm 0644 %{SOURCE15} %{_builddir}/calamares-3.3.7/src/branding/default/S
install -Dm 0644 %{SOURCE17} %{_builddir}/calamares-3.3.7/src/branding/default/openEuler.png
install -Dm 0644 %{SOURCE18} %{_builddir}/calamares-3.3.7/src/branding/default/openEulerWord-blus.png
install -Dm 0644 %{SOURCE19} %{_builddir}/calamares-3.3.7/src/branding/default/openEulerWord.png
install -Dm 0644 %{SOURCE20} %{_builddir}/calamares-3.3.7/src/branding/default/openEuler-icon.png
install -Dm 0644 %{SOURCE21} %{_builddir}/calamares-3.3.7/src/branding/default/password-hide.png
install -Dm 0644 %{SOURCE22} %{_builddir}/calamares-3.3.7/src/branding/default/password-show.png
%build
mkdir build
cd build
cmake .. -DINSTALL_CONFIG=ON
make -j 2
make -j
%install
cd build
@ -261,7 +272,6 @@ mkdir -p %{buildroot}/data/images
install -Dm 0644 %{SOURCE8} %{buildroot}/data/images/Biglogo.svgz
install -Dm 0644 %{SOURCE9} %{buildroot}/data/images/Biglogo.svg
install -Dm 0644 %{SOURCE16} %{buildroot}/data/images/information.svgz
# calamares模块图片目录
mkdir -p %{buildroot}%{_datadir}/calamares/modules/packagechooser/images
install -Dm 0644 %{SOURCE10} %{buildroot}%{_datadir}/calamares/branding/default/Biglogo.png
@ -276,7 +286,9 @@ install -Dm 0644 %{SOURCE15} %{buildroot}%{_datadir}/calamares/branding/default/
install -Dm 0644 %{SOURCE17} %{buildroot}%{_datadir}/calamares/branding/default/openEuler.png
install -Dm 0644 %{SOURCE18} %{buildroot}%{_datadir}/calamares/branding/default/openEulerWord-blus.png
install -Dm 0644 %{SOURCE19} %{buildroot}%{_datadir}/calamares/branding/default/openEulerWord.png
install -Dm 0644 %{SOURCE20} %{buildroot}%{_datadir}/calamares/branding/default/openEuler-icon.png
install -Dm 0644 %{SOURCE21} %{_builddir}/calamares-3.3.7/src/branding/default/password-hide.png
install -Dm 0644 %{SOURCE22} %{_builddir}/calamares-3.3.7/src/branding/default/password-show.png
%files
%doc AUTHORS
%license LICENSES/*
@ -313,7 +325,7 @@ install -Dm 0644 %{SOURCE19} %{buildroot}%{_datadir}/calamares/branding/default/
%{_datadir}/calamares/branding/default/openEulerWord-blus.png
%{_datadir}/calamares/branding/default/openEulerWord.png
%{_datadir}/calamares/branding/default/openEuler.png
%{_datadir}/calamares/branding/default/openEuler-icon.png
%files libs
%{_libdir}/libcalamares.so.*
%{_libdir}/libcalamaresui.so.*
@ -335,5 +347,8 @@ cd %{_builddir} || exit 0
rm -rf %{buildroot}
%changelog
* Fri Dec 27 2024 Li Zixin <lizixin@h-partners.com> - 3.3.7-2
- 新增修改磁盘分区、中英文翻译、修复root bash等问题的patch
* Wed Oct 9 2024 Li Ping <liping136@huawei.com> - 3.3.7-1
- Initial package

BIN
openEuler-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
password-hide.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

BIN
password-show.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B