diff --git a/0001-branding-patch.patch b/0001-branding-patch.patch index 52f971918398b09213d77ef15a3668d76b8cf98c..f8d2e8cdd836a929e14889bad36a5acfee2a3cb0 100644 --- a/0001-branding-patch.patch +++ b/0001-branding-patch.patch @@ -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 diff --git a/0006-modules-file.patch b/0006-modules-file.patch index d7473eaa46201d24be087139a7cadaada19487f9..a03be44e3f826ac106432fbb2adf9ef4cabd505a 100644 --- a/0006-modules-file.patch +++ b/0006-modules-file.patch @@ -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 @@ -+ -+ -+ -+SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org> -+SPDX-License-Identifier: GPL-3.0-or-later -+ -+ Page_UserSetup -+ -+ -+ -+ 0 -+ 0 -+ 862 -+ 683 -+ -+ -+ -+ Form -+ -+ -+ -+ -+ -+ Qt::Orientation::Vertical -+ -+ -+ QSizePolicy::Policy::Fixed -+ -+ -+ -+ 20 -+ 6 -+ -+ -+ -+ -+ -+ -+ -+ What is your name? -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ 200 -+ 0 -+ -+ -+ -+ Your Full Name -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ 1 -+ 0 -+ -+ -+ -+ -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ -+ Qt::Orientation::Vertical -+ -+ -+ QSizePolicy::Policy::Fixed -+ -+ -+ -+ 20 -+ 20 -+ -+ -+ -+ -+ -+ -+ -+ What name do you want to use to log in? -+ -+ -+ false -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 200 -+ 0 -+ -+ -+ -+ login -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ 1 -+ 0 -+ -+ -+ -+ -+ 200 -+ 0 -+ -+ -+ -+ -+ -+ -+ Qt::AlignmentFlag::AlignVCenter -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ -+ Qt::Orientation::Vertical -+ -+ -+ QSizePolicy::Policy::Fixed -+ -+ -+ -+ 20 -+ 20 -+ -+ -+ -+ -+ -+ -+ -+ What is the name of this computer? -+ -+ -+ false -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 200 -+ 0 -+ -+ -+ -+ <small>This name will be used if you make the computer visible to others on a network.</small> -+ -+ -+ Computer Name -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ 1 -+ 0 -+ -+ -+ -+ -+ 200 -+ 0 -+ -+ -+ -+ -+ -+ -+ Qt::AlignmentFlag::AlignVCenter -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ -+ Qt::Orientation::Vertical -+ -+ -+ QSizePolicy::Policy::Fixed -+ -+ -+ -+ 20 -+ 20 -+ -+ -+ -+ -+ -+ -+ -+ Choose a password to keep your account safe. -+ -+ -+ false -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 200 -+ 0 -+ -+ -+ -+ <small>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.</small> -+ -+ -+ QLineEdit::EchoMode::Password -+ -+ -+ Password -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 200 -+ 0 -+ -+ -+ -+ <small>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.</small> -+ -+ -+ QLineEdit::EchoMode::Password -+ -+ -+ Repeat Password -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ 1 -+ 0 -+ -+ -+ -+ -+ 100 -+ 0 -+ -+ -+ -+ -+ -+ -+ Qt::AlignmentFlag::AlignVCenter -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ -+ Qt::Orientation::Vertical -+ -+ -+ QSizePolicy::Policy::Fixed -+ -+ -+ -+ 20 -+ 20 -+ -+ -+ -+ -+ -+ -+ -+ When this box is checked, password-strength checking is done and you will not be able to use a weak password. -+ -+ -+ Require strong passwords. -+ -+ -+ -+ -+ -+ -+ Log in automatically without asking for the password. -+ -+ -+ -+ -+ -+ -+ Use the same password for the administrator account. -+ -+ -+ -+ -+ -+ -+ Qt::Orientation::Vertical -+ -+ -+ QSizePolicy::Policy::Fixed -+ -+ -+ -+ 20 -+ 20 -+ -+ -+ -+ -+ -+ -+ -+ Choose a password for the administrator account. -+ -+ -+ false -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 200 -+ 0 -+ -+ -+ -+ <small>Enter the same password twice, so that it can be checked for typing errors.</small> -+ -+ -+ QLineEdit::EchoMode::Password -+ -+ -+ Password -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 200 -+ 0 -+ -+ -+ -+ <small>Enter the same password twice, so that it can be checked for typing errors.</small> -+ -+ -+ QLineEdit::EchoMode::Password -+ -+ -+ Repeat Password -+ -+ -+ -+ -+ -+ -+ -+ 0 -+ 0 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ -+ 24 -+ 24 -+ -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ 1 -+ 0 -+ -+ -+ -+ -+ 100 -+ 0 -+ -+ -+ -+ -+ -+ -+ Qt::AlignmentFlag::AlignVCenter -+ -+ -+ true -+ -+ -+ -+ -+ -+ -+ -+ -+ Qt::Orientation::Vertical -+ -+ -+ QSizePolicy::Policy::Fixed -+ -+ -+ -+ 20 -+ 6 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Use Active Directory -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Domain: -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Domain Administrator: -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Password: -+ -+ -+ -+ -+ -+ -+ QLineEdit::EchoMode::Password -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ IP Address (optional): -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Qt::Orientation::Vertical -+ -+ -+ -+ 20 -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ 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 diff --git a/0010-cDebugDelect.patch b/0010-cDebugDelect.patch new file mode 100644 index 0000000000000000000000000000000000000000..c5f63fef1df2e10c5603b4eaa39226486defbee3 --- /dev/null +++ b/0010-cDebugDelect.patch @@ -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-------------------------------------->"<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 + + + +- + + + +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 + diff --git a/0011-fix-87-position-and-translate.patch b/0011-fix-87-position-and-translate.patch new file mode 100644 index 0000000000000000000000000000000000000000..0419506a4fc05c50217b96fc995c04c238e989b5 --- /dev/null +++ b/0011-fix-87-position-and-translate.patch @@ -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 + + + +- &Debug ++ &Try Now + @button +- 調試(&D) ++ 立即試用(&D) + + + Do you really want to cancel the current install process? +@@ -4526,7 +4526,7 @@ Output: + + + language +- ++ 語言 + + + Open donations website +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 + diff --git a/0012-replace-icon.patch b/0012-replace-icon.patch new file mode 100644 index 0000000000000000000000000000000000000000..9a36c87799fdf9d9f22ebca94ba12c0e72f6cd1b --- /dev/null +++ b/0012-replace-icon.patch @@ -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 + diff --git a/calamares.spec b/calamares.spec index 6c3665908cacebcd7e3fb62acc7ea3beba080243..e4cea87bbfb995895195dfb21c7faefdbce60071 100644 --- a/calamares.spec +++ b/calamares.spec @@ -38,7 +38,7 @@ Source16: information.svgz Source17: openEuler.png Source18: openEulerWord-blus.png Source19: openEulerWord.png - +Source20: openEuler-icon.png # patch Patch0: 0001-branding-patch.patch Patch1: 0002-lang.patch @@ -49,6 +49,10 @@ 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 + # 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 +217,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,6 +231,7 @@ 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 %build mkdir build cd build @@ -261,7 +267,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 +281,7 @@ 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 %files %doc AUTHORS %license LICENSES/* @@ -313,7 +318,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.* diff --git a/openEuler-icon.png b/openEuler-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..db2afafdd36eabdd5c5fd083d9bc00aff9911e6c Binary files /dev/null and b/openEuler-icon.png differ