Compare commits
11 Commits
f918f55474
...
30326e2ce0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30326e2ce0 | ||
|
|
a24389e874 | ||
|
|
48f638cc69 | ||
|
|
7c28a9a713 | ||
|
|
da9de873fb | ||
|
|
7f690379cd | ||
|
|
f094dc27c0 | ||
|
|
824abd01d0 | ||
|
|
314f8b4f54 | ||
|
|
138eb46852 | ||
|
|
b3a6580d3d |
@ -16,7 +16,7 @@ index ca42c31..d9deeb2 100644
|
||||
// 程序在实例化的时候需要传递的信息字段,打开debug开关后这些字段会被自动填充
|
||||
QString appName = "tools/kylin-usb-creator"; //格式kylin-usb-creator
|
||||
- QString appVersion = "1.1.0";
|
||||
+ QString appVersion = "1.1.1";
|
||||
+ QString appVersion = "1.1.2";
|
||||
QString appDesc = "appDesc字段未填充!";
|
||||
QString iconPath = ":/data/kylin-usb-creator.svg";
|
||||
QString confPath = "org.kylin-usb-creator-data.settings";
|
||||
|
||||
101
0001-misc-fixes-deprecated-func-memory-leaks-code-error.patch
Normal file
101
0001-misc-fixes-deprecated-func-memory-leaks-code-error.patch
Normal file
@ -0,0 +1,101 @@
|
||||
From 35f849e92bc7e8fe10bd8836b8b3f84b3bf2321f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
|
||||
Date: Mon, 6 May 2024 15:45:43 +0800
|
||||
Subject: [PATCH] misc fixes: deprecated func, memory leaks, code error
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
|
||||
---
|
||||
UIControl/src/page1.cpp | 4 ++--
|
||||
UIControl/src/page2.cpp | 2 +-
|
||||
registeredQDbus/systemdbusregister.cpp | 8 ++++----
|
||||
registeredQDbus/systemdbusregister.h | 2 +-
|
||||
4 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/UIControl/src/page1.cpp b/UIControl/src/page1.cpp
|
||||
index 6b5d2ca..9736323 100644
|
||||
--- a/UIControl/src/page1.cpp
|
||||
+++ b/UIControl/src/page1.cpp
|
||||
@@ -157,11 +157,11 @@ void Page1::getUdiskPathAndCap()
|
||||
{
|
||||
diskInfos.clear();
|
||||
QProcess lsblk;
|
||||
- lsblk.start("lsblk -J");
|
||||
+ lsblk.start("lsblk", QStringList() << "-J");
|
||||
lsblk.waitForFinished();
|
||||
|
||||
QProcess lsblk2;
|
||||
- lsblk2.start("lsblk -JS");
|
||||
+ lsblk2.start("lsblk", QStringList() << "-JS");
|
||||
lsblk2.waitForFinished();
|
||||
QJsonArray arr1 = QStringToJsonArray(QString::fromLocal8Bit(lsblk.readAllStandardOutput())); //获取json类型的shell执行结果
|
||||
QJsonArray arr2 = QStringToJsonArray(QString::fromLocal8Bit(lsblk2.readAllStandardOutput()));
|
||||
diff --git a/UIControl/src/page2.cpp b/UIControl/src/page2.cpp
|
||||
index 8041012..78e2312 100644
|
||||
--- a/UIControl/src/page2.cpp
|
||||
+++ b/UIControl/src/page2.cpp
|
||||
@@ -161,7 +161,7 @@ void Page2::dealMakeFinish(QString status)
|
||||
bool Page2::mountDevice(QString target){
|
||||
|
||||
QProcess sync;
|
||||
- sync.start("sync");
|
||||
+ sync.start("sync", QStringList());
|
||||
sync.waitForStarted();
|
||||
sync.waitForFinished();
|
||||
|
||||
diff --git a/registeredQDbus/systemdbusregister.cpp b/registeredQDbus/systemdbusregister.cpp
|
||||
index 63ecf27..99db98c 100644
|
||||
--- a/registeredQDbus/systemdbusregister.cpp
|
||||
+++ b/registeredQDbus/systemdbusregister.cpp
|
||||
@@ -55,13 +55,13 @@ void SystemDbusRegister::MakeStart(QString sourcePath,QString targetPath){
|
||||
uDiskPath = targetPath;
|
||||
QFileInfo info(sourcePath);
|
||||
sourceFileSize = info.size()/1000000;
|
||||
- command_dd = new QProcess();
|
||||
+ command_dd = new QProcess(this);
|
||||
//指定输出语言
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("LANGUAGE","en_US:en");
|
||||
command_dd->setProcessEnvironment(env);
|
||||
connect(command_dd,&QProcess::readyReadStandardError,this,&SystemDbusRegister::readBashStandardErrorInfo);
|
||||
- command_dd->start("bash");
|
||||
+ command_dd->start("bash", QStringList());
|
||||
command_dd->waitForStarted();
|
||||
QString ddshell = "dd if='"+sourcePath.toLocal8Bit()+"' of="+targetPath.toLocal8Bit()+" status=progress";
|
||||
command_dd->write(ddshell.toLocal8Bit() + '\n');
|
||||
@@ -93,7 +93,7 @@ bool SystemDbusRegister::unmountDevice(QString target)
|
||||
void SystemDbusRegister::MakeExit(){
|
||||
qDebug()<<"exit dd process";
|
||||
if(!command_dd) return ;
|
||||
- if(command_dd->Running){
|
||||
+ if(QProcess::Running == command_dd->state()){
|
||||
command_dd->kill();
|
||||
}
|
||||
return ;
|
||||
@@ -144,7 +144,7 @@ void SystemDbusRegister::finishEvent(){
|
||||
bool SystemDbusRegister::isMakingSucess()
|
||||
{
|
||||
QProcess lsblk;
|
||||
- lsblk.start("lsblk -JS");
|
||||
+ lsblk.start("lsblk", QStringList() << "-JS");
|
||||
// lsblk.waitForStarted();
|
||||
lsblk.waitForFinished();
|
||||
// qDebug()<<"lsblk output"<<lsblk.readAllStandardError();
|
||||
diff --git a/registeredQDbus/systemdbusregister.h b/registeredQDbus/systemdbusregister.h
|
||||
index 136ed98..3b6bffe 100644
|
||||
--- a/registeredQDbus/systemdbusregister.h
|
||||
+++ b/registeredQDbus/systemdbusregister.h
|
||||
@@ -41,7 +41,7 @@ class SystemDbusRegister : public QObject, protected QDBusContext
|
||||
Q_CLASSINFO("D-Bus Interface", "com.kylinusbcreator.interface")
|
||||
public:
|
||||
SystemDbusRegister();
|
||||
-// ~SystemDbusRegister();
|
||||
+ //~SystemDbusRegister();
|
||||
|
||||
Q_SIGNALS:
|
||||
void workingProgress(int);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
42
0002-add-kylin-user-guide-of-kylin-usb-creator.patch
Normal file
42
0002-add-kylin-user-guide-of-kylin-usb-creator.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 6348fc1739588941cf8159560011792b0159c54d Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Wed, 22 Mar 2023 14:56:36 +0800
|
||||
Subject: [PATCH] add kylin-user-guide of kylin-usb-creator
|
||||
|
||||
---
|
||||
UIControl/UIControl.pro | 5 ++++-
|
||||
UIControl/src/include/menumodule.h | 2 +-
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/UIControl/UIControl.pro b/UIControl/UIControl.pro
|
||||
index 1f9cdde..dfe69b0 100644
|
||||
--- a/UIControl/UIControl.pro
|
||||
+++ b/UIControl/UIControl.pro
|
||||
@@ -62,7 +62,10 @@ schemes.path = /usr/share/glib-2.0/schemas/
|
||||
desktop.path = /usr/share/applications
|
||||
desktop.files = kylin-usb-creator.desktop
|
||||
|
||||
-INSTALLS += target desktop icons schemes
|
||||
+userM.path = /usr/share/kylin-user-guide/data/guide/kylin-usb-creator/
|
||||
+userM.files += ../userM/*
|
||||
+
|
||||
+INSTALLS += target desktop icons schemes userM
|
||||
CONFIG += link_pkgconfig
|
||||
|
||||
PKGCONFIG += gsettings-qt
|
||||
diff --git a/UIControl/src/include/menumodule.h b/UIControl/src/include/menumodule.h
|
||||
index d9deeb2..3eeefb6 100644
|
||||
--- a/UIControl/src/include/menumodule.h
|
||||
+++ b/UIControl/src/include/menumodule.h
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
public:
|
||||
// 程序在实例化的时候需要传递的信息字段,打开debug开关后这些字段会被自动填充
|
||||
- QString appName = "tools/kylin-usb-creator"; //格式kylin-usb-creator
|
||||
+ QString appName = "kylin-usb-creator"; //格式kylin-usb-creator
|
||||
QString appVersion = "1.1.2";
|
||||
QString appDesc = "appDesc字段未填充!";
|
||||
QString iconPath = ":/data/kylin-usb-creator.svg";
|
||||
--
|
||||
2.39.1
|
||||
|
||||
12
0003-fix-clang.patch
Normal file
12
0003-fix-clang.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -u -r kylin-usb-creator-1.1.2/UIControl/src/include/menumodule.cpp kylin-usb-creator-1.1.2/UIControl/src/include/menumodule.cpp
|
||||
--- kylin-usb-creator-1.1.2/UIControl/src/include/menumodule.cpp 2022-03-17 10:32:06.000000000 +0800
|
||||
+++ kylin-usb-creator-1.1.2/UIControl/src/include/menumodule.cpp 2023-08-31 11:02:28.000000000 +0800
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include "menumodule.h"
|
||||
#include "xatom-helper.h"
|
||||
-menuModule::menuModule(QWidget *parent = nullptr) : QWidget(parent)
|
||||
+menuModule::menuModule(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
init();
|
||||
}
|
||||
32
0005-support-mongolian-in-shortcut-icon.patch
Normal file
32
0005-support-mongolian-in-shortcut-icon.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 8d8a254b063603e89e89dc380c43d76596c54c84 Mon Sep 17 00:00:00 2001
|
||||
From: chenguanglee <lichenguang@kylinos.cn>
|
||||
Date: Thu, 9 May 2024 11:19:14 +0800
|
||||
Subject: [PATCH] support mongolian in shortcut icon
|
||||
|
||||
---
|
||||
UIControl/kylin-usb-creator.desktop | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/UIControl/kylin-usb-creator.desktop b/UIControl/kylin-usb-creator.desktop
|
||||
index cc299f4..5b96e0f 100644
|
||||
--- a/UIControl/kylin-usb-creator.desktop
|
||||
+++ b/UIControl/kylin-usb-creator.desktop
|
||||
@@ -2,12 +2,15 @@
|
||||
Name=USB Boot Maker
|
||||
Name[zh_CN]=U盘启动器
|
||||
Name[bo_CN]=ཆི་ལིན་Uསྡེར་སྒུལ ཆས་
|
||||
+Name[mn_MN]=U ᠳ᠋ᠠᠢᠢᠰᠺ ᠬᠥᠳᠡᠯᠭᠡᠭᠦᠷ
|
||||
Comment=A tool for making USB flash disk made by Kylin software
|
||||
Comment[zh_CN]=由麒麟软件开发的一款制作U盘启动盘的软件
|
||||
Comment[bo_CN]=ཆི་ལིན་མཉེན་ཆས་གསར་སྤེལ་གྱི་ནང་གསེས་དོན་ཚན་གཅིག་བཟོས་Uསྡེར་འགོ་བརྩམས་པའི་མཉེན་ཆས།
|
||||
+Comment[mn_MN]=ᠪᠢᠯᠢᠭᠲᠦ ᠭᠥᠷᠥᠭᠡᠰᠦ ᠶᠢᠨ ᠰᠣᠹᠲ ᠠᠴᠠ ᠨᠡᠭᠡᠭᠡᠭᠰᠡᠨ U ᠳ᠋ᠠᠢᠢᠰᠺ ᠤᠨ ᠬᠥᠳᠡᠯᠭᠡᠬᠦ ᠲᠠᠪᠠᠭ ᠢ ᠬᠢᠳᠡᠭ ᠰᠣᠹᠲ ᠤᠨ
|
||||
GenericName=Startup disk making tool
|
||||
GenericName[zh_CN]=启动盘制作工具
|
||||
GenericName[bo_CN]=འགོ་སློང་སྡེར་ལས་ལག་ཆ་
|
||||
+GenericName[mn_MN]=ᠬᠥᠳᠡᠯᠭᠡᠬᠦ ᠲᠠᠪᠠᠭ ᠦᠢᠯᠡᠳᠬᠦ ᠪᠠᠭᠠᠵᠢ
|
||||
Exec=/usr/bin/kylin-usb-creator %u
|
||||
Icon=kylin-usb-creator
|
||||
Type=Application
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Binary file not shown.
BIN
kylin-usb-creator-1.1.2.tar.gz
Normal file
BIN
kylin-usb-creator-1.1.2.tar.gz
Normal file
Binary file not shown.
@ -1,11 +1,15 @@
|
||||
Name: kylin-usb-creator
|
||||
Version: 1.1.1
|
||||
Release: 3
|
||||
Version: 1.1.2
|
||||
Release: 4
|
||||
Summary: kylin-usb-creator
|
||||
License: GPL-3+
|
||||
URL: http://www.ukui.org
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch01: 0001-fix-version-of-kylin-usb-creator.patch
|
||||
Patch02: 0002-add-kylin-user-guide-of-kylin-usb-creator.patch
|
||||
Patch03: 0003-fix-clang.patch
|
||||
Patch04: 0001-misc-fixes-deprecated-func-memory-leaks-code-error.patch
|
||||
Patch05: 0005-support-mongolian-in-shortcut-icon.patch
|
||||
|
||||
BuildRequires: qt5-qttools-devel
|
||||
BuildRequires: qt5-qtscript-devel
|
||||
@ -16,6 +20,7 @@ BuildRequires: gsettings-qt-devel
|
||||
BuildRequires: kf5-kwindowsystem-devel
|
||||
BuildRequires: qt5-qtx11extras-devel
|
||||
BuildRequires: polkit-qt5-1-devel
|
||||
BuildRequires: ukui-interface
|
||||
|
||||
|
||||
%description
|
||||
@ -23,7 +28,11 @@ BuildRequires: polkit-qt5-1-devel
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch01 -p1
|
||||
%patch 1 -p1
|
||||
%patch 2 -p1
|
||||
%patch 3 -p1
|
||||
%patch 4 -p1
|
||||
%patch 5 -p1
|
||||
|
||||
%build
|
||||
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default kylin-usb-creator.pro
|
||||
@ -53,11 +62,27 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/dbus-1/system-services/com.kylinusbcreator.systemdbus.service
|
||||
%{_datadir}/glib-2.0/schemas/org.kylin-usb-creator-data.gschema.xml
|
||||
%{_datadir}/polkit-1/actions/com.kylinusbcreator.systemdbus.policy
|
||||
%{_datadir}/kylin-user-guide/data/guide/kylin-usb-creator
|
||||
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu May 09 2024 chenguanglee <lichenguang@kylinos.cn> 1.1.2-4
|
||||
- support mongolian in shortcut icon
|
||||
|
||||
* Mon May 06 2024 houhongxun <houhongxun@kylinos.cn> - 1.1.2-3
|
||||
- misc fixes: memory leaks, deprecated funcs, code errors
|
||||
|
||||
* Thu Aug 31 2023 yoo <sunyuechi@iscas.ac.cn> - 1.1.2-2
|
||||
- fix clang build error
|
||||
|
||||
* Mon May 08 2023 peijiankang <peijiankang@kylinos.cn> - 1.1.2-1
|
||||
- update to upstream version 1.1.2
|
||||
|
||||
* Wed Mar 22 2023 peijiankang <peijiankang@kylinos.cn> - 1.1.1-4
|
||||
- add kylin-user-guide of kylin-usb-creator
|
||||
|
||||
* Wed Mar 22 2023 peijiankang <peijiankang@kylinos.cn> - 1.1.1-3
|
||||
- fix version of kylin-usb-creator
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user