patch from zhangdongwei
This commit is contained in:
parent
2786cd4361
commit
76ee71ae4e
|
@ -1,10 +1,10 @@
|
|||
[Unit]
|
||||
Description=系统升级后台检测程序
|
||||
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
TimeoutStartSec=infinity
|
||||
ExecStartPre=apt update
|
||||
ExecStart=/usr/share/kylin-update-notify/checkUpdate.py
|
||||
|
||||
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
Description=系统升级定时检测
|
||||
|
||||
[Timer]
|
||||
OnStartupSec=5min 10s
|
||||
OnUnitInactiveSec=5min 10s
|
||||
AccuracySec=5s
|
||||
Unit=kylin-background-upgrade-manul.service
|
||||
OnCalendar=*-*-* 14:00
|
||||
RandomizedDelaySec=2h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
WantedBy=timers.target
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Name=kylin-background-upgrade
|
||||
Name[zh_CN]=更新管理器托盘程序
|
||||
Exec=/usr/bin/kylin-background-upgrade %u
|
||||
Icon=kylin-update-manager
|
||||
Type=Application
|
||||
X-UKUI-AutoRestart=true
|
||||
OnlyShowIn=UKUI
|
||||
X-UKUI-Autostart-Phase=Application
|
||||
NoDisplay=true
|
|
@ -1,3 +1,9 @@
|
|||
kylin-update-notify (1.3.2.1-ok3) yangtze; urgency=medium
|
||||
|
||||
* patch from zhangdongwei
|
||||
|
||||
-- Xie Wei <xiewei@kylinos.cn> Thu, 21 Jul 2022 19:41:21 +0800
|
||||
|
||||
kylin-update-notify (1.3.2.1-ok2) yangtze; urgency=medium
|
||||
|
||||
* add BR: python2.7-dev
|
||||
|
|
|
@ -3,29 +3,28 @@ Maintainer: kylin <kylin@kylinos.cn>
|
|||
Section: universe/admin
|
||||
Priority: optional
|
||||
Build-Depends: debhelper-compat(=12),
|
||||
qtbase5-dev,
|
||||
libxml2-dev,
|
||||
libxml2,
|
||||
libqt5svg5-dev,
|
||||
libglib2.0-dev,
|
||||
qttools5-dev-tools,
|
||||
qtchooser,
|
||||
libgsettings-qt-dev,
|
||||
libqt5dbus5,
|
||||
nvme-cli,
|
||||
libqapt-dev,
|
||||
libkf5windowsystem-data,
|
||||
libkf5windowsystem-dev,
|
||||
libkf5windowsystem-doc,
|
||||
libkf5windowsystem5,
|
||||
libqapt-dev,
|
||||
libqt5dbus5,
|
||||
libqt5svg5-dev,
|
||||
libukui-log4qt-dev,
|
||||
libxml2,
|
||||
libxml2-dev,
|
||||
nvme-cli,
|
||||
qtbase5-dev,
|
||||
qtchooser,
|
||||
qttools5-dev-tools,
|
||||
python2.7-dev
|
||||
libkf5windowsystem-doc,
|
||||
libukui-log4qt-dev,
|
||||
Standards-Version: 4.1.3
|
||||
|
||||
Package: kylin-update-notify
|
||||
Architecture: any
|
||||
Section: universe/admin
|
||||
Priority: optional
|
||||
Depends: ${shlibs:Depends}
|
||||
Depends: ${shlibs:Depends},
|
||||
Breaks:
|
||||
Description: kylin background upgrade
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: kylin-update-notify
|
||||
Source: <url://example.com>
|
||||
#
|
||||
# Please double check copyright with the licensecheck(1) command.
|
||||
|
||||
Files: README.md
|
||||
checkUpdate.py
|
||||
checkUpdate.pyc
|
||||
data/kylin-background-upgrade-manul.service
|
||||
data/kylin-background-upgrade-manul.timer
|
||||
data/kylin-background-upgrade-template.conf
|
||||
data/kylin-background-upgrade.desktop
|
||||
data/kylin-update.timer.conf
|
||||
data/update.png
|
||||
debian/control
|
||||
debian/install
|
||||
debian/postinst
|
||||
debian/postrm
|
||||
debian/rules
|
||||
debian/source/format
|
||||
kylin-background-upgrade.pro
|
||||
kylin-update-notify.desktop
|
||||
src/core.cpp
|
||||
src/core.h
|
||||
src/main.cpp
|
||||
src/traydbus.cpp
|
||||
src/traydbus.h
|
||||
src/trayicon.cpp
|
||||
src/trayicon.h
|
||||
src/updatehandle.cpp
|
||||
src/updatehandle.h
|
||||
src/updatewidget.cpp
|
||||
src/updatewidget.h
|
||||
translations/UapLBi.json
|
||||
Copyright: __NO_COPYRIGHT_NOR_LICENSE__
|
||||
License: __NO_COPYRIGHT_NOR_LICENSE__
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# xml and html files (skipped):
|
||||
# kylin-background-upgrade.pro.user
|
||||
# data/org.ukui.log4qt.kylin-background-upgrade.gschema.xml
|
||||
# data/Resources.qrc
|
||||
# src/updatewidget.ui
|
||||
# translations/kylin-background-upgrade_bo_CN.ts
|
||||
# translations/kylin-background-upgrade_zh_CN.ts
|
||||
# translations/kylin-background-upgrade_bo_CN.qm
|
||||
# translations/kylin-background-upgrade_zh_CN.qm
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
|
||||
# license/copyright files.
|
|
@ -1,2 +1,2 @@
|
|||
checkUpdate.py /usr/share/kylin-update-notify
|
||||
kylin-update-notify.desktop /etc/xdg/autostart/
|
||||
checkUpdate.py /usr/share/kylin-update-notify
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
systemctl --user daemon-reload
|
||||
systemctl --global enable kylin-background-upgrade-silent.timer
|
||||
systemctl --global enable kylin-background-upgrade-manul.timer
|
||||
systemctl daemon-reload
|
||||
systemctl enable kylin-background-upgrade-manul.timer
|
||||
|
|
|
@ -4,10 +4,10 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|||
CONFIG += c++11 link_pkgconfig
|
||||
|
||||
# 项目名
|
||||
TARGET = kylin-background-upgrade
|
||||
TARGET = kylin-update-notify
|
||||
TEMPLATE = app
|
||||
|
||||
LIBS +=-lukui-log4qt -lpython2.7
|
||||
LIBS +=-lukui-log4qt
|
||||
|
||||
# 执行文件装载
|
||||
target.path = /usr/bin
|
||||
|
@ -30,17 +30,13 @@ HEADERS += \
|
|||
|
||||
# service文件装载 manul
|
||||
service_manul.files = ./data/kylin-background-upgrade-manul.service
|
||||
service_manul.path = /usr/lib/systemd/user/
|
||||
service_manul.path = /usr/lib/systemd/system/
|
||||
|
||||
# timer文件装载
|
||||
timer_manul.files = ./data/kylin-background-upgrade-manul.timer
|
||||
timer_manul.path = /usr/lib/systemd/user/
|
||||
timer_manul.path = /usr/lib/systemd/system/
|
||||
|
||||
|
||||
# desktop文件装载
|
||||
desktop.files = ./data/kylin-background-upgrade.desktop
|
||||
desktop.path = /usr/share/applications/
|
||||
|
||||
conf.files = ./data/kylin-background-upgrade-template.conf
|
||||
conf.path = /var/lib/kylin-background-upgrade/
|
||||
|
||||
|
@ -56,7 +52,7 @@ TRANSLATIONS += translations/kylin-background-upgrade_zh_CN.ts
|
|||
translation.files += translations/kylin-background-upgrade_bo_CN.qm
|
||||
|
||||
|
||||
INSTALLS += target desktop conf translation schemes service_manul timer_manul
|
||||
INSTALLS += target conf translation schemes service_manul timer_manul
|
||||
|
||||
PKGCONFIG += gsettings-qt
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.11.0, 2022-07-21T18:04:32. -->
|
||||
<!-- Written by QtCreator 4.11.0, 2022-07-21T18:26:42. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
@ -295,7 +295,7 @@
|
|||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/lxy/kylin-background-upgrade/sp3/build-kylin-background-upgrade-unknown-Debug</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Name=update-notify-force
|
||||
Exec=/usr/bin/kylin-background-upgrade --check-upgrade
|
||||
Exec=/usr/bin/kylin-update-notify --check-upgrade
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
Comment=update-notify-force
|
||||
|
|
|
@ -352,15 +352,15 @@ void updatehandle::UpdateDectSlot()
|
|||
void updatehandle::UpdateDectCheck()
|
||||
{
|
||||
//判断是否有系统更新
|
||||
if(!checktime()){
|
||||
// if(!checktime()){
|
||||
qDebug()<<"Detection update has been opened ...";
|
||||
// connect(m_updateMutual,&update_dbus::UpdateDectFinished,this,&updatehandle::UpdateDectSlot);
|
||||
QDBusConnection::systemBus().connect(QString(),QString("/"),"com.kylin.update.notification","DownloadFinish",this,SLOT(UpdateDectSlot()));
|
||||
// bool ret= m_updateMutual->checkForUpdateDect();
|
||||
} else {
|
||||
qDebug()<<"The scheduled time is not reached, exit.";
|
||||
exit(0);
|
||||
}
|
||||
// } else {
|
||||
// qDebug()<<"The scheduled time is not reached, exit.";
|
||||
// exit(0);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -381,10 +381,11 @@ void updatewidget::agreeBtnClicked()
|
|||
emit agreeBtnSignals();
|
||||
qDebug()<<"WifiButtonClickSlot is running";
|
||||
QProcess p(0);
|
||||
p.startDetached("ukui-control-center -m upgrade");
|
||||
p.startDetached("update-manager");
|
||||
p.waitForStarted();
|
||||
qDebug()<<"Open the control panel and start updating immediately, exit tray program!";
|
||||
exit(0);
|
||||
// exit(0);
|
||||
this->hide();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue