diff -Nru deepin-deb-installer-5.0.0/assets/com.deepin.pkexec.aptInstallDepend.policy deepin-deb-installer-5.7.0.17/assets/com.deepin.pkexec.aptInstallDepend.policy
--- deepin-deb-installer-5.0.0/assets/com.deepin.pkexec.aptInstallDepend.policy 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/com.deepin.pkexec.aptInstallDepend.policy 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,23 @@
+
+
+
+ LinuxDeepin
+ https://www.deepin.com/
+
+ authentication
+ 认证
+ Authentication is required to continue the configuration
+ 继续配置,需要授权
+
+
+ no
+ no
+ auth_admin
+
+ /usr/bin/deepin-deb-installer-dependsInstall
+ true
+
+
+
diff -Nru deepin-deb-installer-5.0.0/assets/com.deepin.pkexec.aptInstallDepend.policy.tmp deepin-deb-installer-5.7.0.17/assets/com.deepin.pkexec.aptInstallDepend.policy.tmp
--- deepin-deb-installer-5.0.0/assets/com.deepin.pkexec.aptInstallDepend.policy.tmp 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/com.deepin.pkexec.aptInstallDepend.policy.tmp 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,23 @@
+
+
+
+ LinuxDeepin
+ https://www.deepin.com/
+
+ authentication
+ 认证
+ Authentication is required to continue the configuration
+ 继续配置,需要授权
+
+
+ no
+ no
+ auth_admin
+
+ /usr/bin/deepin-deb-installer-dependsInstall
+ true
+
+
+
diff -Nru deepin-deb-installer-5.0.0/assets/deepin-deb-installer.desktop deepin-deb-installer-5.7.0.17/assets/deepin-deb-installer.desktop
--- deepin-deb-installer-5.0.0/assets/deepin-deb-installer.desktop 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/deepin-deb-installer.desktop 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,131 @@
+[Desktop Entry]
+Categories=System;
+Comment=Package Installer helps users install and remove local packages, and supports bulk installation.
+Exec=deepin-deb-installer %F
+GenericName=Package Installer
+Icon=deepin-deb-installer
+MimeType=application/vnd.debian.binary-package;application/x-deb;
+Name=Package Installer
+StartupNotify=false
+Terminal=false
+Type=Application
+X-Deepin-Vendor=deepin
+
+# Translations:
+# Do not manually modify!
+Comment[ar]=مثبت الحزم: يساعد المستخدمين على تثبيت وإزالة الحزم المحلية، ويدعم أيضاً الثبيت الجماعي للحزم.
+Comment[bg]=Deepin Мениджър на пакети се използва, за да помогне на потребителите да инсталират и премахват локален пакет, поддръжка на групово инсталиране.
+Comment[br]=Ar stalier pakadoù a sikour an implijaderien da staliañ ha da zilemel ar pakadoù lec'hel, hag e kemer e kont ar staliadur a-vloc'had.
+Comment[ca]=L'Instal·lador de paquets ajuda els usuaris a instal·lar i eliminar paquets locals i admet la instal·lació massiva.
+Comment[cs]=Instalátor balíčků slouží uživateli jako pomůcka pro instalaci a odebírání místních balíčků (tj. nepocházejících z repozitářů). Podporuje také hromadnou instalaci.
+Comment[da]=Pakkeinstallationsprogram hjælpe brugere med at installere og fjerne lokale pakker, med understøttelse af masseinstallation.
+Comment[de]=Das Paket-Installationsprogramm hilft Benutzern bei der Installation und Entfernung lokaler Pakete und unterstützt die Masseninstallation.
+Comment[en_AU]=The Deepin Package Installer helps users install and remove local packages. It supports bulk package installation.
+Comment[es]=Instalador de paquetes de Deepin ayuda a instalar y eliminar paquetes locales, y admite instalación en masa.
+Comment[es_419]=El Gestor de Paquetes Deepin se usa para ayudar a los usuarios a instalar y eliminar paquetes locales, admite la instalación masiva.
+Comment[et]=Deepin pakihaldur on rakendus, millega kasutajad saavad arvutisse tarkvara paigaldada ja seda sealt eemaldada. Toetab ka hulgipaigaldamist.
+Comment[fi]=Ohjelmiston asentaja auttaa käyttäjiä asentamaan ja poistamaan ohjelmia.
+Comment[fr]=Le programme d'installation de paquets aide les utilisateurs à installer, supprimer des paquets locaux et à prend en charge l'installation en bloc.
+Comment[gl_ES]=O instalador do paquete axuda aos usuarios a instalar e eliminar paquetes locais e admite a instalación masiva.
+Comment[hi_IN]=पैकेज इंस्टॉलर द्वारा उपयोक्ता लोकल पैकेज इंस्टॉल व हटा सकते हैं, यह सामूहिक इंस्टॉल की सुविधा भी प्रदान करता है।
+Comment[hu]=A Csomagtelepítő segít a felhasználóknak különféle csomagok telepítésében és eltávolításában, valamint támogatja a kötegelt telepítést.
+Comment[id]=Manajer Paket Deepin digunakan untuk menolong para pengguna install dan menghapus paket lokal, mendukung install massal
+Comment[it]=Il Gestore pacchetti è utile per installare e rimuovere software in locale, supporta inoltre l'installazione massiva. Localizzazione italiana a cura di Massimo A. Carofano.
+Comment[ko]=패키지 설치 관리자는 사용자가 로컬 패키지를 설치하고, 제거할 수 있도록 지원하고 일괄 설치를 지원합니다.
+Comment[lt]=Paketų diegimo programa padeda naudotojams įdiegti ir šalinti vietinius paketus bei palaiko masinį įdiegimą.
+Comment[mn]=Деепин Багц Зохицуулагч нь хэрэглэгчдэд програм суулгах устгахад туслахаас гадна бүлэг суулгалтыг дэмждэг.
+Comment[ms]=Pemasang pakej dapat membantu pengguna dan membuang pakej-pakej setempat, dan juga menyokong pemasangan pukal.
+Comment[ne]=प्याकेज स्थापनाकर्ताले प्रयोगकर्ताहरूलाई स्थानीय प्याकेजहरू स्थापना र हटाउन मद्दत गर्दछ, र बल्क स्थापनालाई समर्थन गर्दछ।
+Comment[nl]=Pakketinstallatie is een programma dat gebruikers helpt bij het installeren van lokale software.
+Comment[pl]=Instalator pakietów pomaga użytkownikom instalować i usuwać pakiety lokalne oraz obsługuje instalację zbiorczą.
+Comment[pt]=O Instalador de Pacotes ajuda os utilizadores a instalar e remover pacotes locais e suporta a instalação em massa.
+Comment[pt_BR]=O Instalador de Pacotes ajuda os usuários a instalar e remover pacotes locais e suporta a instalação em massa.
+Comment[ru]=Установщик Пакетов используется для помощи пользователям в установке и удалении программного обеспечения и поддерживает массовую установку.
+Comment[sk]=Aplikácia Deepin Správca balíčkov slúži na pomoc používateľom pri inštalácii a odstraňovaní lokálnych balíčkov, podporuje hromadnú inštaláciu.
+Comment[sq]=Instaluesi i Paketave i ndihmon përdoruesit të instalojnë dhe heqin paketa vendore, dhe mbulon instalime në masë.
+Comment[sr]=Инсалатер пакета помаже корисницима да инсталирају и уклањају локалне пакете. Подржава групну инсталацију.
+Comment[tr]=Paket Kurucu, kullanıcıların yerel paketleri kurmasına ve kaldırmasına yardımcı olur ve toplu kurulumu destekler.
+Comment[ug]=ئورالما ئورناتقۇچ ئىشلەتكۈچىلەرنىڭ يەرلىك ئورالمىلارنى ئورنىتىشى ۋە ئۆچۈرۈشىگە ياردەم بېرىدۇ ھەمدە توپ قاچىلاشنى قوللايدۇ.
+Comment[uk]=За допомогою засобу встановлення пакунків користувачі можуть встановлювати і вилучати локальні пакунки. Передбачено пакетне встановлення.
+Comment[zh_CN]=软件包安装器用于帮助用户安装和卸载本地软件,支持批量安装。
+Comment[zh_HK]=軟件包安裝器用於幫助用戶安裝和卸載本地軟件,支持批量安裝。
+Comment[zh_TW]=軟體包安裝器用來幫助使用者安裝和移除本機軟體包。支援批次安裝。
+GenericName[ar]=مثبّت الحزم
+GenericName[ast]=Xestor de paquetes
+GenericName[bg]=Мениджър на пакети
+GenericName[br]=Stalier pakadoù
+GenericName[ca]=Instal·lador de paquets
+GenericName[cs]=Instalátor balíčků
+GenericName[da]=Pakkeinstallationsprogram
+GenericName[de]=Paket-Installationsprogramm
+GenericName[en_AU]=Package Installer
+GenericName[es]=Instalador de paquetes
+GenericName[es_419]=Gestor de Paquetes
+GenericName[et]=Pakihaldur
+GenericName[fi]=Ohjelmiston asentaja
+GenericName[fr]=Installateur de paquets
+GenericName[gl_ES]=Instalador do paquete
+GenericName[hi_IN]=पैकेज इंस्टॉलर
+GenericName[hu]=Csomagtelepítő
+GenericName[id]=Manajer Paket
+GenericName[it]=Gestore pacchetti
+GenericName[ko]=패키지 관리자
+GenericName[lt]=Paketų diegimo programa
+GenericName[mn]=Багц Зохицуулагч
+GenericName[ms]=Pemasang Pakej
+GenericName[ne]=प्याकेज स्थापनाकर्ता
+GenericName[nl]=Pakketinstallatie
+GenericName[pa]=ਪੈਕੇਜ ਮੈਨੇਜਰ
+GenericName[pl]=Instalator pakietów
+GenericName[pt]=Instalador de Pacotes
+GenericName[pt_BR]=Instalador de Pacotes
+GenericName[ru]=Установщик Пакетов
+GenericName[sk]=Správca balíčkov
+GenericName[sq]=Instalues Paketash
+GenericName[sr]=Инсталатер Пакета
+GenericName[tr]=Paket Kurucu
+GenericName[ug]=بوغچا قاچىلىغۇچ
+GenericName[uk]=Встановлювач пакунків
+GenericName[zh_CN]=软件包安装器
+GenericName[zh_HK]=軟件包安裝器
+GenericName[zh_TW]=軟體包安裝器
+Name[ar]=مثبّت الحزم
+Name[ast]=Xestor de paquetes
+Name[bg]=Мениджър на пакети
+Name[br]=Stalier pakadoù Deepin
+Name[ca]=Instal·lador de paquets del Deepin
+Name[cs]=Deepin instalátor balíčků
+Name[da]=Pakkeinstallationsprogram
+Name[de]=Paket-Installationsprogramm
+Name[en_AU]=Package Installer
+Name[es]=Instalador de paquetes
+Name[es_419]=Gestor de Paquetes
+Name[et]=Pakihaldur
+Name[fi]=Deepin pakettien asentaja
+Name[fr]=Programme d'installation de paquets Deepin
+Name[gl_ES]=Instalador do paquete de Deepin
+Name[hi_IN]=दीपिन पैकेज इंस्टॉलर
+Name[hu]=Deepin Csomagtelepítő
+Name[id]=Manajer Paket
+Name[it]=Gestore pacchetti di Deepin
+Name[ko]=Deepin 패키지 설치도구
+Name[lt]=Paketų diegimo programa
+Name[mn]=Багц Зохицуулагч
+Name[ms]=Pemasang Pakej
+Name[ne]=प्याकेज स्थापनाकर्ता
+Name[nl]=Deepin Pakketinstallatie
+Name[pa]=ਪੈਕੇਜ ਮੈਨੇਜਰ
+Name[pl]=Instalator pakietu Deepin
+Name[pt]=Instalador de Pacotes Deepin
+Name[pt_BR]=Deepin Instalador de Pacotes
+Name[ru]=Установщик Пакетов
+Name[sk]=Správca balíčkov
+Name[sq]=Instalues Paketash Deepin
+Name[sr]=Дипин Инсталатер Пакета
+Name[tr]=Deepin Paket Kurucu
+Name[ug]=بوغچا قاچىلىغۇچ
+Name[uk]=Засіб встановлення пакунків Deepin
+Name[zh_CN]=深度软件包安装器
+Name[zh_HK]=Deepin 軟件包安裝器
+Name[zh_TW]=Deepin 軟體包安裝器
+
diff -Nru deepin-deb-installer-5.0.0/assets/environments.h.in deepin-deb-installer-5.7.0.17/assets/environments.h.in
--- deepin-deb-installer-5.0.0/assets/environments.h.in 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/environments.h.in 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,6 @@
+#ifndef __ENVIRONMENTS_H_
+#define __ENVIRONMENTS_H_
+
+#define VERSION "@VERSION@"
+
+#endif // __ENVIRONMENTS_H_
Binary files /tmp/tmpLFGoEq/vC2SzNlhah/deepin-deb-installer-5.0.0/assets/font/SourceHanSansCN-Medium.ttf and /tmp/tmpLFGoEq/rNgOpA4Dhf/deepin-deb-installer-5.7.0.17/assets/font/SourceHanSansCN-Medium.ttf differ
Binary files /tmp/tmpLFGoEq/vC2SzNlhah/deepin-deb-installer-5.0.0/assets/font/SourceHanSansCN-Normal.ttf and /tmp/tmpLFGoEq/rNgOpA4Dhf/deepin-deb-installer-5.7.0.17/assets/font/SourceHanSansCN-Normal.ttf differ
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/deepin-deb-installer.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/deepin-deb-installer.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/deepin-deb-installer.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/deepin-deb-installer.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,94 @@
+
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_hover_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_hover_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_hover_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_hover_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,25 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_normal_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_normal_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_normal_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_normal_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,27 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_press_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_press_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_press_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_active_tab_close_press_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,25 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_arrow_down_25px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_arrow_down_25px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_arrow_down_25px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_arrow_down_25px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,17 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_arrow_up_25px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_arrow_up_25px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_arrow_up_25px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_arrow_up_25px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,26 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_icon_160px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_icon_160px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_icon_160px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_icon_160px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,91 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_icon_install_160px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_icon_install_160px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_icon_install_160px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_icon_install_160px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,22 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_ok_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_ok_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_ok_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_ok_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,33 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_popwarning_32px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_popwarning_32px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_popwarning_32px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_popwarning_32px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,32 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_split_line_214px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_split_line_214px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_split_line_214px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_split_line_214px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,3 @@
+
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_warning_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_warning_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/dark/icons/di_warning_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/dark/icons/di_warning_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,33 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/deepin-deb-installer.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/deepin-deb-installer.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/deepin-deb-installer.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/deepin-deb-installer.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,94 @@
+
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_active_tab_close_hover_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_active_tab_close_hover_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_active_tab_close_hover_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_active_tab_close_hover_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,25 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_active_tab_close_normal_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_active_tab_close_normal_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_active_tab_close_normal_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_active_tab_close_normal_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,27 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_active_tab_close_press_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_active_tab_close_press_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_active_tab_close_press_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_active_tab_close_press_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,25 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_arrow_down_25px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_arrow_down_25px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_arrow_down_25px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_arrow_down_25px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,24 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_arrow_up_25px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_arrow_up_25px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_arrow_up_25px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_arrow_up_25px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,26 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_icon_160px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_icon_160px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_icon_160px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_icon_160px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,91 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_icon_install_160px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_icon_install_160px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_icon_install_160px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_icon_install_160px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,22 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_ok_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_ok_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_ok_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_ok_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,33 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_popwarning_32px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_popwarning_32px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_popwarning_32px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_popwarning_32px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,32 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_split_line_220px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_split_line_220px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_split_line_220px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_split_line_220px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_warning_16px.svg deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_warning_16px.svg
--- deepin-deb-installer-5.0.0/assets/icons/deepin/builtin/light/icons/di_warning_16px.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/icons/deepin/builtin/light/icons/di_warning_16px.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,33 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/active_tab_close_hover.svg deepin-deb-installer-5.7.0.17/assets/images/active_tab_close_hover.svg
--- deepin-deb-installer-5.0.0/assets/images/active_tab_close_hover.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/active_tab_close_hover.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,25 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/active_tab_close_normal.svg deepin-deb-installer-5.7.0.17/assets/images/active_tab_close_normal.svg
--- deepin-deb-installer-5.0.0/assets/images/active_tab_close_normal.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/active_tab_close_normal.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,27 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/active_tab_close_press.svg deepin-deb-installer-5.7.0.17/assets/images/active_tab_close_press.svg
--- deepin-deb-installer-5.0.0/assets/images/active_tab_close_press.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/active_tab_close_press.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,25 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/arrow_down_dark.svg deepin-deb-installer-5.7.0.17/assets/images/arrow_down_dark.svg
--- deepin-deb-installer-5.0.0/assets/images/arrow_down_dark.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/arrow_down_dark.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,17 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/arrow_down.svg deepin-deb-installer-5.7.0.17/assets/images/arrow_down.svg
--- deepin-deb-installer-5.0.0/assets/images/arrow_down.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/arrow_down.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,24 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/arrow_up_dark.svg deepin-deb-installer-5.7.0.17/assets/images/arrow_up_dark.svg
--- deepin-deb-installer-5.0.0/assets/images/arrow_up_dark.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/arrow_up_dark.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,26 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/arrow_up.svg deepin-deb-installer-5.7.0.17/assets/images/arrow_up.svg
--- deepin-deb-installer-5.0.0/assets/images/arrow_up.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/arrow_up.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,26 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/deepin-deb-installer.svg deepin-deb-installer-5.7.0.17/assets/images/deepin-deb-installer.svg
--- deepin-deb-installer-5.0.0/assets/images/deepin-deb-installer.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/deepin-deb-installer.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,94 @@
+
diff -Nru deepin-deb-installer-5.0.0/assets/images/icon_install_dark.svg deepin-deb-installer-5.7.0.17/assets/images/icon_install_dark.svg
--- deepin-deb-installer-5.0.0/assets/images/icon_install_dark.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/icon_install_dark.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,22 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/icon_install_light.svg deepin-deb-installer-5.7.0.17/assets/images/icon_install_light.svg
--- deepin-deb-installer-5.0.0/assets/images/icon_install_light.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/icon_install_light.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,22 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/icon.svg deepin-deb-installer-5.7.0.17/assets/images/icon.svg
--- deepin-deb-installer-5.0.0/assets/images/icon.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/icon.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,91 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/split_line_dark.svg deepin-deb-installer-5.7.0.17/assets/images/split_line_dark.svg
--- deepin-deb-installer-5.0.0/assets/images/split_line_dark.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/split_line_dark.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,3 @@
+
diff -Nru deepin-deb-installer-5.0.0/assets/images/split_line.svg deepin-deb-installer-5.7.0.17/assets/images/split_line.svg
--- deepin-deb-installer-5.0.0/assets/images/split_line.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/split_line.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/images/warning.svg deepin-deb-installer-5.7.0.17/assets/images/warning.svg
--- deepin-deb-installer-5.0.0/assets/images/warning.svg 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/images/warning.svg 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,32 @@
+
+
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/assets/resources.qrc deepin-deb-installer-5.7.0.17/assets/resources.qrc
--- deepin-deb-installer-5.0.0/assets/resources.qrc 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/resources.qrc 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,30 @@
+
+
+ font/SourceHanSansCN-Medium.ttf
+ font/SourceHanSansCN-Normal.ttf
+ icons/deepin/builtin/dark/icons/deepin-deb-installer.svg
+ icons/deepin/builtin/dark/icons/di_active_tab_close_hover_16px.svg
+ icons/deepin/builtin/dark/icons/di_active_tab_close_normal_16px.svg
+ icons/deepin/builtin/dark/icons/di_active_tab_close_press_16px.svg
+ icons/deepin/builtin/dark/icons/di_arrow_down_25px.svg
+ icons/deepin/builtin/dark/icons/di_arrow_up_25px.svg
+ icons/deepin/builtin/dark/icons/di_icon_160px.svg
+ icons/deepin/builtin/dark/icons/di_icon_install_160px.svg
+ icons/deepin/builtin/dark/icons/di_ok_16px.svg
+ icons/deepin/builtin/dark/icons/di_popwarning_32px.svg
+ icons/deepin/builtin/dark/icons/di_split_line_214px.svg
+ icons/deepin/builtin/dark/icons/di_warning_16px.svg
+ icons/deepin/builtin/light/icons/deepin-deb-installer.svg
+ icons/deepin/builtin/light/icons/di_active_tab_close_hover_16px.svg
+ icons/deepin/builtin/light/icons/di_active_tab_close_normal_16px.svg
+ icons/deepin/builtin/light/icons/di_active_tab_close_press_16px.svg
+ icons/deepin/builtin/light/icons/di_arrow_down_25px.svg
+ icons/deepin/builtin/light/icons/di_arrow_up_25px.svg
+ icons/deepin/builtin/light/icons/di_icon_160px.svg
+ icons/deepin/builtin/light/icons/di_icon_install_160px.svg
+ icons/deepin/builtin/light/icons/di_ok_16px.svg
+ icons/deepin/builtin/light/icons/di_popwarning_32px.svg
+ icons/deepin/builtin/light/icons/di_split_line_220px.svg
+ icons/deepin/builtin/light/icons/di_warning_16px.svg
+
+
diff -Nru deepin-deb-installer-5.0.0/assets/translate_generation.sh deepin-deb-installer-5.7.0.17/assets/translate_generation.sh
--- deepin-deb-installer-5.0.0/assets/translate_generation.sh 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/translate_generation.sh 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,11 @@
+#!/bin/bash
+# this file is used to auto-generate .qm file from .ts file.
+# author: shibowen at linuxdeepin.com
+
+ts_list=(`ls translations/*.ts`)
+
+for ts in "${ts_list[@]}"
+do
+ printf "\nprocess ${ts}\n"
+ lrelease "${ts}"
+done
diff -Nru deepin-deb-installer-5.0.0/assets/translate_ts2desktop.sh deepin-deb-installer-5.7.0.17/assets/translate_ts2desktop.sh
--- deepin-deb-installer-5.0.0/assets/translate_ts2desktop.sh 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/assets/translate_ts2desktop.sh 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+DESKTOP_TEMP_FILE=deepin-deb-installer.desktop.tmp
+DESKTOP_SOURCE_FILE=deepin-deb-installer.desktop
+DESKTOP_DEST_FILE=deepin-deb-installer.desktop
+DESKTOP_TS_DIR=../translations/desktop/
+
+/usr/bin/deepin-desktop-ts-convert ts2desktop $DESKTOP_SOURCE_FILE $DESKTOP_TS_DIR $DESKTOP_TEMP_FILE
+mv $DESKTOP_TEMP_FILE $DESKTOP_DEST_FILE
diff -Nru deepin-deb-installer-5.0.0/CMakeLists.txt deepin-deb-installer-5.7.0.17/CMakeLists.txt
--- deepin-deb-installer-5.0.0/CMakeLists.txt 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/CMakeLists.txt 2020-12-03 11:59:49.000000000 +0000
@@ -1,70 +1,11 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.13)
if (NOT DEFINED VERSION)
- set(VERSION 1.2.2)
+ set(VERSION 5.3.9)
endif ()
-project(deepin-deb-installer)
-
-#set(CMAKE_VERBOSE_MAKEFILE ON)
-set(CMAKE_CXX_STANDARD 11)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
-
-if (NOT (${CMAKE_BUILD_TYPE} MATCHES "Debug"))
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
-
- # generate qm files
- execute_process(COMMAND bash "translate_generation.sh"
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-
- execute_process(COMMAND bash "translate_ts2desktop.sh"
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-else ()
- set(CMAKE_CXX_COMPILER "clang++")
-endif ()
-
-configure_file(environments.h.in environments.h @ONLY)
-
-# Sources files
-file(GLOB SRCS "*.h" "*.cpp" "widgets/*.h" "widgets/*.cpp")
-
-# Find the library
-find_package(PkgConfig REQUIRED)
-find_package(Qt5Widgets REQUIRED)
-find_package(Qt5Concurrent REQUIRED)
-find_package(QApt REQUIRED)
-find_package(DtkWidget REQUIRED)
-
-# Tell CMake to create the executable
-add_executable(deepin-deb-installer ${SRCS} resources/resources.qrc)
-target_include_directories(deepin-deb-installer PUBLIC ${DtkWidget_INCLUDE_DIRS} ${OBJECT_BINARY_DIR})
-target_link_libraries(deepin-deb-installer
- QApt
- ${DtkWidget_LIBRARIES}
- ${Qt5Widgets_LIBRARIES}
- ${Qt5Concurrent_LIBRARIES}
-)
-
-# Install settings
-if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- set(CMAKE_INSTALL_PREFIX /usr)
-endif ()
-
-# Install qm files
-file(GLOB QM_FILES "translations/*.qm")
-install(FILES ${QM_FILES}
- DESTINATION share/deepin-deb-installer/translations)
-
-# Install icons
-foreach (ICON_SIZE 16 24 32 48 64 96 128 256)
- install(FILES resources/images/deepin-deb-installer-${ICON_SIZE}px.svg
- RENAME deepin-deb-installer.svg
- DESTINATION share/icons/hicolor/${ICON_SIZE}x${ICON_SIZE}/apps)
-endforeach ()
-
-install(TARGETS deepin-deb-installer DESTINATION bin)
-install(FILES deepin-deb-installer.desktop DESTINATION share/applications)
-install(FILES deepin-deb-installer.applications DESTINATION share/application-registry)
+project(deepin_deb_installer)
+option(DMAN_RELEAE OFF "Install dman resources to system or not")
+add_subdirectory(src/AptInstallDepend)
+add_subdirectory(src/deb_installer)
+add_subdirectory(test)
diff -Nru deepin-deb-installer-5.0.0/debian/changelog deepin-deb-installer-5.7.0.17/debian/changelog
--- deepin-deb-installer-5.0.0/debian/changelog 2020-03-23 06:12:25.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debian/changelog 2021-01-08 19:50:01.000000000 +0000
@@ -1,61 +1,11 @@
-deepin-deb-installer (5.0.0-1build1) focal; urgency=medium
+deepin-deb-installer (5.7.0.17-1) groovy; urgency=medium
- * No-change rebuild for libgcc-s1 package name change.
+ *New upstream build 5.7.0.17
- -- Matthias Klose Mon, 23 Mar 2020 07:12:25 +0100
+ -- Ananta Mishra Sat, 09 Jan 2021 01:35:01 +0545
-deepin-deb-installer (5.0.0-1) unstable; urgency=medium
+deepin-deb-installer (5.3.9) unstable; urgency=medium
- * Team upload.
- * New upstream release 5.0.0.
- * debian/control: Bump Standards-Version to 4.4.0.
- * debian/control: Bump debhelper compat to v12.
+ * Initial Release.
- -- Boyuan Yang Tue, 24 Sep 2019 16:45:48 -0400
-
-deepin-deb-installer (1.3.0-1) unstable; urgency=medium
-
- * New upstream version 1.3.0
- * Standards-Version: Bump to 4.3.0 (no changes needed).
-
- -- Yanhao Mo Mon, 25 Feb 2019 17:41:31 +0800
-
-deepin-deb-installer (1.2.9-1) unstable; urgency=medium
-
- * Team upload.
- * New upstream version 1.2.9.
- * debian/control:
- + Bump Standards-Version to 4.2.1.
- + Build-depend on debhelper-compat (= 11) to replace old
- debian/compat file.
- + R³: Use Rules-Requires-Root: no.
- + Tighten up versioned build-dependency to libdtkwidget-dev to
- (>= 2.0.9.10~) to fix FTBFS.
-
- -- Boyuan Yang Mon, 10 Dec 2018 10:43:32 -0500
-
-deepin-deb-installer (1.2.5-1) unstable; urgency=medium
-
- * New upstream version 1.2.5
- * Bump Standards-Version to 4.1.5 (no changes needed).
- * d/control: Add new uploader Yanhao Mo .
- * d/rules: Drop debian/deepin-deb-installer/usr/share/dman/ relevant part
- because the upstream doesn't produce that any more.
-
- -- Yanhao Mo Sun, 22 Jul 2018 10:14:53 +0800
-
-deepin-deb-installer (1.2.4-2) unstable; urgency=medium
-
- * Team upload.
- * Use team+pkg-deepin@tracker.debian.org in maintainer field.
- * d/rules: Use "dh_missing --fail-missing".
- * Apply "wrap-and-sort -abst".
- * Bump Standards-Version to 4.1.4 (no changes needed).
-
- -- Boyuan Yang <073plan@gmail.com> Fri, 20 Apr 2018 18:30:59 +0800
-
-deepin-deb-installer (1.2.4-1) unstable; urgency=medium
-
- * Initial release (Closes: #871975)
-
- -- Yangfl Thu, 15 Mar 2018 16:16:47 +0800
+ -- Deepin Packages Builder Wed, 11 Oct 2017 17:38:35 +0800
diff -Nru deepin-deb-installer-5.0.0/debian/control deepin-deb-installer-5.7.0.17/debian/control
--- deepin-deb-installer-5.0.0/debian/control 2019-09-24 20:45:46.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debian/control 2021-01-08 19:49:38.000000000 +0000
@@ -1,36 +1,16 @@
Source: deepin-deb-installer
Section: utils
Priority: optional
-Maintainer: Debian Deepin Packaging Team
-Uploaders:
- Yangfl ,
- Yanhao Mo ,
-Build-Depends:
- cmake,
- debhelper-compat (= 12),
- libdtkwidget-dev (>= 2.0.9.10~),
- libqapt-dev,
- libqt5concurrent5,
- libqt5widgets5,
- pkg-config,
- qttools5-dev-tools,
-Rules-Requires-Root: no
-Standards-Version: 4.4.0
-Homepage: https://github.com/linuxdeepin/deepin-deb-installer
-Vcs-Git: https://salsa.debian.org/pkg-deepin-team/deepin-deb-installer.git
-Vcs-Browser: https://salsa.debian.org/pkg-deepin-team/deepin-deb-installer
+Maintainer: Deepin Packages Builder
+Build-Depends: debhelper-compat (=13), pkg-config, cmake, libqt5widgets5, libqt5concurrent5, libqapt-dev, libdtkwidget-dev, qtbase5-dev, qttools5-dev-tools, qttools5-dev,libgtest-dev, qtchooser
+Standards-Version: 4.5.0
+Homepage: https://www.deepin.com/
Package: deepin-deb-installer
Architecture: any
-Depends:
- ${misc:Depends},
- ${shlibs:Depends},
-Description: Deepin Package Manager
- Deepin Package Manager is a management tool for deb package, and is developed
- for users to easily install customized applications that are not categorized
- in Deepin Store. With an easy-to-use interface as well as functions like batch
- installation, version detection and auto-completion of dependencies, you can
- quickly get the software installed on deepin once you get the right deb
- package.
- .
- This package is part of DDE (Deepin Desktop Environment).
+Depends: ${shlibs:Depends}, ${misc:Depends}, libqapt3-runtime
+Description: Package Installer helps users install and remove local packages.
+ Package Installer is an easy-to-use .deb package management tool
+ with a simple interface for users to quickly install customized applications
+ not included in App Store supporting bulk installation, version identification
+ and auto completion.
diff -Nru deepin-deb-installer-5.0.0/debian/copyright deepin-deb-installer-5.7.0.17/debian/copyright
--- deepin-deb-installer-5.0.0/debian/copyright 2018-12-10 15:41:15.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debian/copyright 2020-12-03 11:59:49.000000000 +0000
@@ -1,20 +1,12 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: deepin-deb-installer
-Source: https://github.com/linuxdeepin/deepin-deb-installer
Files: *
-Copyright: 2017-2018 Deepin Technology Co., Ltd.
+Copyright: 2017 Deepin Technology Co., Ltd.
License: GPL-3+
-
-Files: debian/*
-Copyright: 2017 Deepin Packages Builder
- 2018 Yangfl
-License: GPL-3+
-
-License: GPL-3+
- This program is free software: you can redistribute it and/or modify
+ This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
@@ -23,7 +15,7 @@
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ along with this program. If not, see
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff -Nru deepin-deb-installer-5.0.0/debian/deepin-deb-installer.1 deepin-deb-installer-5.7.0.17/debian/deepin-deb-installer.1
--- deepin-deb-installer-5.0.0/debian/deepin-deb-installer.1 2018-12-10 15:41:15.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debian/deepin-deb-installer.1 1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-.TH DEEPIN-DEB-INSTALLER "1" "December 2017" "Deepin" "User Commands"
-
-.SH NAME
-deepin-deb-installer \- Deepin Package Manager
-
-.SH SYNOPSIS
-.B deepin-deb-installer
-[\fI\,options\/\fR] \fI\,file \/\fR[\fI\,file\/\fR..]
-
-.SH DESCRIPTION
-.B Deepin Package Manager
-is a management tool for deb package, and is developed
-for users to easily install customized applications that are not categorized
-in Deepin Store. With an easy-to-use interface as well as functions like batch
-installation, version detection and auto-completion of dependencies, you can
-quickly get the software installed on deepin once you get the right deb
-package.
-
-.SH OPTIONS
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Displays this help.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Displays version information.
-
-.SS "Arguments:"
-.TP
-file
-Deb package path.
-
-.SH "SEE ALSO"
-https://www.deepin.org/en/original/deepin-package-manager/
-
-.SH AUTHOR
-.PP
-.B Deepin Package Manager
-is written by Deepin Technology Co., Ltd.
-.PP
-This manual page was written by
-.MT mmyangfl@\:gmail.com
-Yangfl
-.ME
-for the Debian Project (but may be used by others).
diff -Nru deepin-deb-installer-5.0.0/debian/manpages deepin-deb-installer-5.7.0.17/debian/manpages
--- deepin-deb-installer-5.0.0/debian/manpages 2018-12-10 15:41:15.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debian/manpages 1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-debian/deepin-deb-installer.1
diff -Nru deepin-deb-installer-5.0.0/debian/postinst deepin-deb-installer-5.7.0.17/debian/postinst
--- deepin-deb-installer-5.0.0/debian/postinst 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debian/postinst 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+# set to default
+sed -i -E 's/(application\/x-deb=).*$/\1deepin-deb-installer.desktop/' /usr/share/applications/mimeapps.list || true
+
+#DEBHELPER#
+exit 0
diff -Nru deepin-deb-installer-5.0.0/debian/rules deepin-deb-installer-5.7.0.17/debian/rules
--- deepin-deb-installer-5.0.0/debian/rules 2019-09-24 20:45:48.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debian/rules 2020-12-03 11:59:49.000000000 +0000
@@ -1,22 +1,20 @@
#!/usr/bin/make -f
-#export DH_VERBOSE = 1
-
-
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-
-export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
-export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-
export QT_SELECT := 5
-
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
include /usr/share/dpkg/default.mk
-
+override_dh_auto_configure:
+ dh_auto_configure -- \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DAPP_VERSION=$(DEB_VERSION_UPSTREAM) -DVERSION=$(DEB_VERSION_UPSTREAM) LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)
%:
dh $@
-override_dh_auto_configure:
- dh_auto_configure -- -DVERSION=$(DEB_VERSION_UPSTREAM)
-
-override_dh_missing:
- dh_missing --fail-missing
+override_dh_shlibdeps:
+ dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
diff -Nru deepin-deb-installer-5.0.0/debian/source/format deepin-deb-installer-5.7.0.17/debian/source/format
--- deepin-deb-installer-5.0.0/debian/source/format 2018-12-10 15:41:15.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debian/source/format 2021-01-08 19:50:01.000000000 +0000
@@ -1 +1 @@
-3.0 (quilt)
+3.0 (quilt)
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/debian/watch deepin-deb-installer-5.7.0.17/debian/watch
--- deepin-deb-installer-5.0.0/debian/watch 2018-12-10 15:41:15.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debian/watch 1970-01-01 00:00:00.000000000 +0000
@@ -1,4 +0,0 @@
-version=4
-opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%deepin-deb-installer-$1.tar.gz%" \
- https://github.com/linuxdeepin/deepin-deb-installer/tags \
- (?:.*?/)?(\d[\d.]*)\.tar\.gz debian uupdate
diff -Nru deepin-deb-installer-5.0.0/debinstaller.cpp deepin-deb-installer-5.7.0.17/debinstaller.cpp
--- deepin-deb-installer-5.0.0/debinstaller.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debinstaller.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,320 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "debinstaller.h"
-#include "filechoosewidget.h"
-#include "singleinstallpage.h"
-#include "multipleinstallpage.h"
-#include "deblistmodel.h"
-#include "uninstallconfirmpage.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-#include
-#include
-#include
-
-using QApt::DebFile;
-
-DCORE_USE_NAMESPACE
-DWIDGET_USE_NAMESPACE
-
-#define THEME_DARK "dark"
-#define THEME_LIGHT "light"
-
-DebInstaller::DebInstaller(QWidget *parent)
- : DMainWindow(parent),
-
- m_fileListModel(new DebListModel(this)),
- m_fileChooseWidget(new FileChooseWidget),
- m_centralLayout(new QStackedLayout),
- m_qsettings(new QSettings(this)),
- m_tbMenu(new QMenu(this)),
- m_darkThemeAction(new QAction(tr("Dark theme"), this))
-{
- m_fileChooseWidget->setObjectName("FileChooseWidget");
-
- m_centralLayout->addWidget(m_fileChooseWidget);
- m_centralLayout->setContentsMargins(0, 0, 0, 0);
- m_centralLayout->setSpacing(0);
-
- QWidget *wrapWidget = new QWidget;
- wrapWidget->setLayout(m_centralLayout);
-
- DTitlebar *tb = titlebar();
- tb->setIcon(QIcon::fromTheme("deepin-deb-installer"));
- tb->setTitle(QString());
-#if DTK_VERSION >= 0x02000600
- tb->setBackgroundTransparent(true);
-#endif
- tb->setMenu(m_tbMenu);
- m_tbMenu->addAction(m_darkThemeAction);
- m_tbMenu->addSeparator();
-
- m_darkThemeAction->setCheckable(true);
-
- setCentralWidget(wrapWidget);
- setAcceptDrops(true);
- setFixedSize(480, 380);
- setWindowTitle(tr("Deepin Package Manager"));
- setWindowIcon(QIcon::fromTheme("deepin-deb-installer"));
- move(qApp->primaryScreen()->geometry().center() - geometry().center());
-
- connect(m_fileChooseWidget, &FileChooseWidget::packagesSelected, this, &DebInstaller::onPackagesSelected);
- connect(m_fileListModel, &DebListModel::lockForAuth, this, &DebInstaller::onAuthing);
- connect(m_fileListModel, &DebListModel::appendOutputInfo, this, [=](const QString &output) { qDebug() << output.trimmed(); });
- connect(m_darkThemeAction, &QAction::toggled, this, &DebInstaller::toggleDarkTheme);
-
- reloadTheme();
-}
-
-DebInstaller::~DebInstaller()
-{
-}
-
-void DebInstaller::toggleDarkTheme(bool checked)
-{
- m_qsettings->setValue("theme", checked ? THEME_DARK : THEME_LIGHT);
- reloadTheme();
-}
-
-void DebInstaller::reloadTheme()
-{
- QString theme = m_qsettings->value("theme").toString();
- if (theme.isEmpty()) {
- theme = THEME_LIGHT;
- m_qsettings->setValue("theme", THEME_LIGHT);
- }
-
- m_darkThemeAction->setChecked(theme == THEME_DARK);
-
- QFile themeFile(theme == THEME_DARK ? ":/theme/dark/dark.qss" : ":/theme/light/light.qss");
- if (!themeFile.open(QFile::ReadOnly)) {
- qDebug() << "theme file not find!" << themeFile.fileName();
- }
-
- setStyleSheet(themeFile.readAll());
-
- DThemeManager::instance()->setTheme(theme);
-}
-
-void DebInstaller::keyPressEvent(QKeyEvent *e)
-{
- switch (e->key())
- {
-#ifdef QT_DEBUG
- case Qt::Key_Escape: qApp->quit(); break;
-#endif
- default:;
- }
-}
-
-void DebInstaller::dragEnterEvent(QDragEnterEvent *e)
-{
- auto * const mime = e->mimeData();
- if (!mime->hasUrls())
- return e->ignore();
-
- for (const auto &item : mime->urls())
- {
- const QFileInfo info(item.path());
- if (info.isDir())
- return e->accept();
- if (info.isFile() && info.suffix() == "deb")
- return e->accept();
- }
-
- e->ignore();
-}
-
-void DebInstaller::dropEvent(QDropEvent *e)
-{
- auto * const mime = e->mimeData();
- if (!mime->hasUrls())
- return e->ignore();
-
- e->accept();
-
- // find .deb files
- QStringList file_list;
- for (const auto &url : mime->urls())
- {
- if (!url.isLocalFile())
- continue;
- const QString local_path = url.toLocalFile();
- const QFileInfo info(local_path);
-
- if (info.isFile() && info.suffix() == "deb")
- file_list << local_path;
- else if (info.isDir())
- {
- for (auto deb : QDir(local_path).entryInfoList(QStringList() << "*.deb", QDir::Files))
- file_list << deb.absoluteFilePath();
- }
- }
-
- onPackagesSelected(file_list);
-}
-
-void DebInstaller::dragMoveEvent(QDragMoveEvent *e)
-{
- e->accept();
-}
-
-void DebInstaller::onPackagesSelected(const QStringList &packages)
-{
- for (const auto &package : packages)
- {
- DebFile *p = new DebFile(package);
- if (!p->isValid())
- {
- qWarning() << "package invalid: " << package;
-
- delete p;
- continue;
- }
-
- DRecentData data;
- data.appName = "Deepin Deb Installer";
- data.appExec = "deepin-deb-installer";
- DRecentManager::addItem(package, data);
-
- m_fileListModel->appendPackage(p);
- }
-
- refreshInstallPage();
-}
-
-void DebInstaller::showUninstallConfirmPage()
-{
- Q_ASSERT(m_centralLayout->count() == 2);
-
- const QModelIndex index = m_fileListModel->first();
-
- UninstallConfirmPage *p = new UninstallConfirmPage;
- p->setPackage(index.data().toString());
- p->setRequiredList(index.data(DebListModel::PackageReverseDependsListRole).toStringList());
-
- m_centralLayout->addWidget(p);
- m_centralLayout->setCurrentIndex(2);
-
- connect(p, &UninstallConfirmPage::accepted, this, &DebInstaller::onUninstallAccepted);
- connect(p, &UninstallConfirmPage::canceled, this, &DebInstaller::onUninstallCalceled);
-}
-
-void DebInstaller::onUninstallAccepted()
-{
- SingleInstallPage *p = backToSinglePage();
-
- p->uninstallCurrentPackage();
-}
-
-void DebInstaller::onUninstallCalceled()
-{
- backToSinglePage();
-}
-
-void DebInstaller::onAuthing(const bool authing)
-{
- setEnabled(!authing);
-}
-
-void DebInstaller::reset()
-{
- Q_ASSERT(m_centralLayout->count() == 2);
- Q_ASSERT(!m_lastPage.isNull());
-
- titlebar()->setTitle(QString());
- m_fileListModel->reset();
- m_lastPage->deleteLater();
- m_centralLayout->setCurrentIndex(0);
-}
-
-void DebInstaller::removePackage(const int index)
-{
- m_fileListModel->removePackage(index);
- refreshInstallPage();
-}
-
-void DebInstaller::refreshInstallPage()
-{
- // clear widgets if needed
- if (!m_lastPage.isNull())
- m_lastPage->deleteLater();
-
- const int packageCount = m_fileListModel->preparedPackages().size();
- // no packages found
- if (packageCount == 0)
- return;
-
- if (packageCount == 1)
- {
- // single package install
- titlebar()->setTitle(QString());
-
- SingleInstallPage *singlePage = new SingleInstallPage(m_fileListModel);
- singlePage->setObjectName("SingleInstallPage");
- connect(singlePage, &SingleInstallPage::back, this, &DebInstaller::reset);
- connect(singlePage, &SingleInstallPage::requestUninstallConfirm, this, &DebInstaller::showUninstallConfirmPage);
-
- m_lastPage = singlePage;
- m_centralLayout->addWidget(singlePage);
- } else {
- // multiple packages install
- titlebar()->setTitle(tr("Bulk Install"));
-
- MultipleInstallPage *multiplePage = new MultipleInstallPage(m_fileListModel);
- multiplePage->setObjectName("MultipleInstallPage");
-
- connect(multiplePage, &MultipleInstallPage::back, this, &DebInstaller::reset);
- connect(multiplePage, &MultipleInstallPage::requestRemovePackage, this, &DebInstaller::removePackage);
-
- m_lastPage = multiplePage;
- m_centralLayout->addWidget(multiplePage);
- }
-
- // switch to new page.
- m_centralLayout->setCurrentIndex(1);
-}
-
-SingleInstallPage *DebInstaller::backToSinglePage()
-{
- Q_ASSERT(m_centralLayout->count() == 3);
- QWidget *confirmPage = m_centralLayout->widget(2);
- m_centralLayout->removeWidget(confirmPage);
- confirmPage->deleteLater();
-
- SingleInstallPage *p = qobject_cast(m_centralLayout->widget(1));
- Q_ASSERT(p);
-
- return p;
-}
diff -Nru deepin-deb-installer-5.0.0/debinstaller.h deepin-deb-installer-5.7.0.17/debinstaller.h
--- deepin-deb-installer-5.0.0/debinstaller.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/debinstaller.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef DEBINSTALLER_H
-#define DEBINSTALLER_H
-
-#include
-#include
-#include
-
-#include
-
-class FileChooseWidget;
-class DebListModel;
-class SingleInstallPage;
-class DebInstaller : public Dtk::Widget::DMainWindow
-{
- Q_OBJECT
-
-public:
- DebInstaller(QWidget *parent = nullptr);
- virtual ~DebInstaller();
-
-protected:
- void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
- void dragEnterEvent(QDragEnterEvent *e) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *e) Q_DECL_OVERRIDE;
- void dragMoveEvent(QDragMoveEvent *e) Q_DECL_OVERRIDE;
-
-private slots:
- void toggleDarkTheme(bool checked);
- void reloadTheme();
- void onPackagesSelected(const QStringList &packages);
- void showUninstallConfirmPage();
- void onUninstallAccepted();
- void onUninstallCalceled();
- void onAuthing(const bool authing);
-
- void reset();
- void removePackage(const int index);
-
-private:
- void refreshInstallPage();
- SingleInstallPage *backToSinglePage();
-
-private:
- DebListModel *m_fileListModel;
- FileChooseWidget *m_fileChooseWidget;
-
- QStackedLayout *m_centralLayout;
- QSettings *m_qsettings;
- QMenu *m_tbMenu;
- QAction *m_darkThemeAction;
-
- QPointer m_lastPage;
-};
-
-#endif // DEBINSTALLER_H
diff -Nru deepin-deb-installer-5.0.0/deblistmodel.cpp deepin-deb-installer-5.7.0.17/deblistmodel.cpp
--- deepin-deb-installer-5.0.0/deblistmodel.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/deblistmodel.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,475 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "deblistmodel.h"
-#include "packagesmanager.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-using namespace QApt;
-
-bool isDpkgRunning()
-{
- QProcess proc;
- proc.start("ps", QStringList() << "-e" << "-o" << "comm");
- proc.waitForFinished();
-
- const QString output = proc.readAllStandardOutput();
- for (const auto &item : output.split('\n'))
- if (item == "dpkg")
- return true;
-
- return false;
-}
-
-const QString workerErrorString(const int e)
-{
- switch (e)
- {
- case FetchError:
- case DownloadDisallowedError:
- return QApplication::translate("DebListModel", "Installation failed, please check your network connection");
- case NotFoundError:
- return QApplication::translate("DebListModel", "Installation failed, please check updates in Control Center");
- case DiskSpaceError:
- return QApplication::translate("DebListModel", "Installation failed, insufficient disk space");
- }
-
- return QApplication::translate("DebListModel", "Installation Failed");
-}
-
-DebListModel::DebListModel(QObject *parent)
- : QAbstractListModel(parent),
-
- m_workerStatus(WorkerPrepare),
-
- m_packagesManager(new PackagesManager(this))
-{
-}
-
-bool DebListModel::isReady() const
-{
- return m_packagesManager->isBackendReady();
-}
-
-const QList DebListModel::preparedPackages() const
-{
- return m_packagesManager->m_preparedPackages;
-}
-
-QModelIndex DebListModel::first() const
-{
- return index(0);
-}
-
-int DebListModel::rowCount(const QModelIndex &parent) const
-{
- Q_UNUSED(parent);
-
- return m_packagesManager->m_preparedPackages.size();
-}
-
-QVariant DebListModel::data(const QModelIndex &index, int role) const
-{
- const int r = index.row();
- const DebFile *deb = m_packagesManager->package(r);
-
- switch (role)
- {
- case WorkerIsPrepareRole:
- return isWorkerPrepare();
- case ItemIsCurrentRole:
- return m_currentIdx == index;
- case PackageNameRole:
- return deb->packageName();
- case PackagePathRole:
- return deb->filePath();
- case PackageVersionRole:
- return deb->version();
- case PackageVersionStatusRole:
- return m_packagesManager->packageInstallStatus(r);
- case PackageDependsStatusRole:
- return m_packagesManager->packageDependsStatus(r).status;
- case PackageInstalledVersionRole:
- return m_packagesManager->packageInstalledVersion(r);
- case PackageAvailableDependsListRole:
- return m_packagesManager->packageAvailableDepends(r);
- case PackageReverseDependsListRole:
- return m_packagesManager->packageReverseDependsList(deb->packageName(), deb->architecture());
- case PackageDescriptionRole:
- return deb->shortDescription();
- case PackageFailReasonRole:
- return packageFailedReason(r);
- case PackageOperateStatusRole:
- if (m_packageOperateStatus.contains(r))
- return m_packageOperateStatus[r];
- else
- return Prepare;
- case Qt::SizeHintRole:
- return QSize(0, 60);
- default:;
- }
-
- return QVariant();
-}
-
-void DebListModel::installAll()
-{
- Q_ASSERT_X(m_workerStatus == WorkerPrepare, Q_FUNC_INFO, "installer status error");
- if (m_workerStatus != WorkerPrepare)
- return;
-
- m_workerStatus = WorkerProcessing;
- m_operatingIndex = 0;
-
-// emit workerStarted();
-
- // start first
- installNextDeb();
-}
-
-void DebListModel::uninstallPackage(const int idx)
-{
- Q_ASSERT(idx == 0);
- Q_ASSERT_X(m_workerStatus == WorkerPrepare, Q_FUNC_INFO, "installer status error");
-
- m_workerStatus = WorkerProcessing;
- m_operatingIndex = idx;
-
- DebFile *deb = m_packagesManager->package(m_operatingIndex);
-
- const QStringList rdepends = m_packagesManager->packageReverseDependsList(deb->packageName(), deb->architecture());
- Backend *b = m_packagesManager->m_backendFuture.result();
- for (const auto &r : rdepends)
- b->markPackageForRemoval(r);
- b->markPackageForRemoval(deb->packageName() + ':' + deb->architecture());
-
- // uninstall
- qDebug() << Q_FUNC_INFO << "starting to remove package: " << deb->packageName() << rdepends;
-
- refreshOperatingPackageStatus(Operating);
- Transaction *trans = b->commitChanges();
-
- connect(trans, &Transaction::progressChanged, this, &DebListModel::transactionProgressChanged);
- connect(trans, &Transaction::statusDetailsChanged, this, &DebListModel::appendOutputInfo);
- connect(trans, &Transaction::statusChanged, this, &DebListModel::onTransactionStatusChanged);
- connect(trans, &Transaction::errorOccurred, this, &DebListModel::onTransactionErrorOccurred);
- connect(trans, &Transaction::finished, this, &DebListModel::uninstallFinished);
- connect(trans, &Transaction::finished, trans, &Transaction::deleteLater);
-
- m_currentTransaction = trans;
-
- trans->run();
-}
-
-void DebListModel::removePackage(const int idx)
-{
- Q_ASSERT_X(m_workerStatus == WorkerPrepare, Q_FUNC_INFO, "installer status error");
-
- m_packagesManager->removePackage(idx);
-}
-
-void DebListModel::appendPackage(DebFile *package)
-{
- Q_ASSERT_X(m_workerStatus == WorkerPrepare, Q_FUNC_INFO, "installer status error");
-
- m_packagesManager->appendPackage(package);
-}
-
-void DebListModel::onTransactionErrorOccurred()
-{
- Q_ASSERT_X(m_workerStatus == WorkerProcessing, Q_FUNC_INFO, "installer status error");
- Transaction *trans = static_cast(sender());
-
- const QApt::ErrorCode e = trans->error();
- Q_ASSERT(e);
-
- qWarning() << Q_FUNC_INFO << e << workerErrorString(e);
- qWarning() << trans->errorDetails() << trans->errorString();
-
- if (trans->isCancellable())
- trans->cancel();
-
- if (e == AuthError)
- {
- trans->deleteLater();
-
- qDebug() << "reset env to prepare";
-
- // reset env
- emit lockForAuth(false);
- m_workerStatus = WorkerPrepare;
- return;
- }
-
- // DO NOT install next, this action will finished and will be install next automatic.
- trans->setProperty("exitStatus", QApt::ExitFailed);
-}
-
-void DebListModel::onTransactionStatusChanged(TransactionStatus stat)
-{
- switch (stat)
- {
- case TransactionStatus::AuthenticationStatus:
- emit lockForAuth(true);
- break;
- case TransactionStatus::WaitingStatus:
- emit lockForAuth(false);
- break;
- default:;
- }
-}
-
-void DebListModel::reset()
-{
- Q_ASSERT_X(m_workerStatus == WorkerFinished, Q_FUNC_INFO, "worker status error");
-
- m_workerStatus = WorkerPrepare;
- m_operatingIndex = 0;
-
- m_packageOperateStatus.clear();
- m_packageFailReason.clear();
- m_packagesManager->reset();
-}
-
-void DebListModel::bumpInstallIndex()
-{
- Q_ASSERT_X(m_currentTransaction.isNull(), Q_FUNC_INFO, "previous transaction not finished");
-
- // install finished
- if (++m_operatingIndex == m_packagesManager->m_preparedPackages.size())
- {
- qDebug() << "congraulations, install finished !!!";
-
- m_workerStatus = WorkerFinished;
- emit workerFinished();
- emit workerProgressChanged(100);
- emit transactionProgressChanged(100);
- return;
- }
-
- // install next
- installNextDeb();
-}
-
-void DebListModel::refreshOperatingPackageStatus(const DebListModel::PackageOperationStatus stat)
-{
- m_packageOperateStatus[m_operatingIndex] = stat;
-
- const QModelIndex idx = index(m_operatingIndex);
-
- emit dataChanged(idx, idx);
-}
-
-QString DebListModel::packageFailedReason(const int idx) const
-{
- const auto stat = m_packagesManager->packageDependsStatus(idx);
- if (stat.isBreak())
- {
- if (!stat.package.isEmpty())
- return tr("Broken Dependencies: %1").arg(stat.package);
-
- if (m_packagesManager->isArchError(idx))
- return tr("Unmatched package architecture");
-
- const auto conflict = m_packagesManager->packageConflictStat(idx);
- if (!conflict.is_ok())
- return tr("Broken Dependencies: %1").arg(conflict.unwrap());
-// return tr("Conflicts: %1").arg(conflict.unwrap());
-
- Q_UNREACHABLE();
- }
-
- Q_ASSERT(m_packageOperateStatus.contains(idx));
- Q_ASSERT(m_packageOperateStatus[idx] == Failed);
- Q_ASSERT(m_packageFailReason.contains(idx));
-
- return workerErrorString(m_packageFailReason[idx]);
-}
-
-void DebListModel::onTransactionFinished()
-{
- Q_ASSERT_X(m_workerStatus == WorkerProcessing, Q_FUNC_INFO, "installer status error");
- Transaction *trans = static_cast(sender());
-
- // prevent next signal
- disconnect(trans, &Transaction::finished, this, &DebListModel::onTransactionFinished);
-
- // report new progress
- emit workerProgressChanged(100. * (m_operatingIndex + 1) / m_packagesManager->m_preparedPackages.size());
-
- DebFile *deb = m_packagesManager->package(m_operatingIndex);
- qDebug() << "install" << deb->packageName() << "finished with exit status:" << trans->exitStatus();
-
- if (trans->exitStatus())
- {
- qWarning() << trans->error() << trans->errorDetails() << trans->errorString();
- m_packageFailReason[m_operatingIndex] = trans->error();
- refreshOperatingPackageStatus(Failed);
- emit appendOutputInfo(trans->errorString());
- }
- else if (m_packageOperateStatus.contains(m_operatingIndex) && m_packageOperateStatus[m_operatingIndex] != Failed)
- {
- refreshOperatingPackageStatus(Success);
- }
-
-// delete trans;
- trans->deleteLater();
- m_currentTransaction = nullptr;
-
- bumpInstallIndex();
-}
-
-void DebListModel::onDependsInstallTransactionFinished()
-{
- Q_ASSERT_X(m_workerStatus == WorkerProcessing, Q_FUNC_INFO, "installer status error");
- Transaction *trans = static_cast(sender());
-
- const auto ret = trans->exitStatus();
-
- DebFile *deb = m_packagesManager->package(m_operatingIndex);
- qDebug() << "install" << deb->packageName() << "dependencies finished with exit status:" << ret;
-
- if (ret)
- qWarning() << trans->error() << trans->errorDetails() << trans->errorString();
-
- if (ret)
- {
- // record error
- m_packageFailReason[m_operatingIndex] = trans->error();
- refreshOperatingPackageStatus(Failed);
- emit appendOutputInfo(trans->errorString());
- }
-
-// delete trans;
- trans->deleteLater();
- m_currentTransaction = nullptr;
-
- // check current operate exit status to install or install next
- if (ret)
- bumpInstallIndex();
- else
- installNextDeb();
-}
-
-void DebListModel::installNextDeb()
-{
- Q_ASSERT_X(m_workerStatus == WorkerProcessing, Q_FUNC_INFO, "installer status error");
- Q_ASSERT_X(m_currentTransaction.isNull(), Q_FUNC_INFO, "previous transaction not finished");
-
- if (isDpkgRunning())
- {
- qDebug() << "dpkg running, waitting...";
- QTimer::singleShot(1000 * 5, this, &DebListModel::installNextDeb);
- return;
- }
-
- // fetch next deb
- DebFile *deb = m_packagesManager->package(m_operatingIndex);
-
- auto * const backend = m_packagesManager->m_backendFuture.result();
- Transaction *trans = nullptr;
-
- // reset package depends status
- m_packagesManager->resetPackageDependsStatus(m_operatingIndex);
-
- // check available dependencies
- const auto dependsStat = m_packagesManager->packageDependsStatus(m_operatingIndex);
- if (dependsStat.isBreak())
- {
- refreshOperatingPackageStatus(Failed);
- bumpInstallIndex();
- return;
- } else if (dependsStat.isAvailable()) {
- Q_ASSERT_X(m_packageOperateStatus[m_operatingIndex] == Prepare, Q_FUNC_INFO, "package operate status error when start install availble dependencies");
-
- const QStringList availableDepends = m_packagesManager->packageAvailableDepends(m_operatingIndex);
- for (auto const &p : availableDepends)
- backend->markPackageForInstall(p);
-
- qDebug() << Q_FUNC_INFO << "install" << deb->packageName() << "dependencies: " << availableDepends;
-
- trans = backend->commitChanges();
- connect(trans, &Transaction::finished, this, &DebListModel::onDependsInstallTransactionFinished);
- } else {
- qDebug() << Q_FUNC_INFO << "starting to install package: " << deb->packageName();
-
- trans = backend->installFile(*deb);
-
- connect(trans, &Transaction::progressChanged, this, &DebListModel::transactionProgressChanged);
- connect(trans, &Transaction::finished, this, &DebListModel::onTransactionFinished);
- }
-
- // NOTE: DO NOT remove this.
- // see: https://bugs.kde.org/show_bug.cgi?id=382272
- trans->setLocale(".UTF-8");
-
- connect(trans, &Transaction::statusDetailsChanged, this, &DebListModel::appendOutputInfo);
- connect(trans, &Transaction::statusDetailsChanged, this, &DebListModel::onTransactionOutput);
- connect(trans, &Transaction::statusChanged, this, &DebListModel::onTransactionStatusChanged);
- connect(trans, &Transaction::errorOccurred, this, &DebListModel::onTransactionErrorOccurred);
-
- m_currentTransaction = trans;
- m_currentTransaction->run();
-}
-
-void DebListModel::onTransactionOutput()
-{
- Q_ASSERT_X(m_workerStatus == WorkerProcessing, Q_FUNC_INFO, "installer status error");
- Transaction *trans = static_cast(sender());
- Q_ASSERT(trans == m_currentTransaction.data());
-
- refreshOperatingPackageStatus(Operating);
-
- disconnect(trans, &Transaction::statusDetailsChanged, this, &DebListModel::onTransactionOutput);
-}
-
-void DebListModel::uninstallFinished()
-{
- Q_ASSERT_X(m_workerStatus == WorkerProcessing, Q_FUNC_INFO, "installer status error");
-
- qDebug() << Q_FUNC_INFO;
-
- m_workerStatus = WorkerFinished;
- refreshOperatingPackageStatus(Success);
-
- emit workerFinished();
-}
-
-void DebListModel::setCurrentIndex(const QModelIndex &idx)
-{
- if (m_currentIdx == idx)
- return;
-
- const QModelIndex index = m_currentIdx;
- m_currentIdx = idx;
-
- emit dataChanged(index, index);
- emit dataChanged(m_currentIdx, m_currentIdx);
-}
diff -Nru deepin-deb-installer-5.0.0/deblistmodel.h deepin-deb-installer-5.7.0.17/deblistmodel.h
--- deepin-deb-installer-5.0.0/deblistmodel.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/deblistmodel.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef DEBLISTMODEL_H
-#define DEBLISTMODEL_H
-
-#include
-#include
-#include
-
-#include
-#include
-#include
-
-class PackagesManager;
-class DebListModel : public QAbstractListModel
-{
- Q_OBJECT
-
-public:
- explicit DebListModel(QObject *parent = 0);
-
- enum PackageRole
- {
- PackageNameRole = Qt::DisplayRole,
- UnusedRole = Qt::UserRole,
- WorkerIsPrepareRole,
- ItemIsCurrentRole,
- PackageVersionRole,
- PackagePathRole,
- PackageInstalledVersionRole,
- PackageDescriptionRole,
- PackageVersionStatusRole,
- PackageDependsStatusRole,
- PackageAvailableDependsListRole,
- PackageFailReasonRole,
- PackageOperateStatusRole,
- PackageReverseDependsListRole,
- };
-
- enum WorkerStatus
- {
- WorkerPrepare,
- WorkerProcessing,
- WorkerFinished,
- };
-
- enum PackageInstallStatus
- {
- NotInstalled,
- InstalledSameVersion,
- InstalledEarlierVersion,
- InstalledLaterVersion,
- };
-
- enum PackageDependsStatus
- {
- DependsOk,
- DependsAvailable,
- DependsBreak,
- };
-
- enum PackageOperationStatus
- {
- Prepare,
- Operating,
- Success,
- Failed,
- };
-
- void reset();
- bool isReady() const;
- bool isWorkerPrepare() const { return m_workerStatus == WorkerPrepare; }
- const QList preparedPackages() const;
- QModelIndex first() const;
-
- int rowCount(const QModelIndex &parent) const override;
- QVariant data(const QModelIndex &index, int role) const override;
-
-signals:
-// void workerStarted() const;
- void lockForAuth(const bool lock) const;
- void workerFinished() const;
- void workerProgressChanged(const int progress) const;
- void transactionProgressChanged(const int progress) const;
- void appendOutputInfo(const QString &info) const;
- void packageOperationChanged(const QModelIndex &index, int status) const;
- void packageDependsChanged(const QModelIndex &index, int status) const;
-
-public slots:
- void setCurrentIndex(const QModelIndex &idx);
- void installAll();
- void uninstallPackage(const int idx);
- void removePackage(const int idx);
- void appendPackage(QApt::DebFile *package);
- void onTransactionErrorOccurred();
- void onTransactionStatusChanged(QApt::TransactionStatus stat);
-
-private:
- void bumpInstallIndex();
- void onTransactionOutput();
- void onTransactionFinished();
- void onDependsInstallTransactionFinished();
- void installNextDeb();
- void uninstallFinished();
- void refreshOperatingPackageStatus(const PackageOperationStatus stat);
- QString packageFailedReason(const int idx) const;
-
-private:
- int m_workerStatus;
- int m_operatingIndex;
- QModelIndex m_currentIdx;
- PackagesManager *m_packagesManager;
-
- QPointer m_currentTransaction;
-
- QHash m_packageOperateStatus;
- QHash m_packageFailReason;
-};
-
-#endif // DEBLISTMODEL_H
diff -Nru deepin-deb-installer-5.0.0/deepin-deb-installer.applications deepin-deb-installer-5.7.0.17/deepin-deb-installer.applications
--- deepin-deb-installer-5.0.0/deepin-deb-installer.applications 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/deepin-deb-installer.applications 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-
-Deepin deb installer
- command=deepin-deb-installer
- name=Install Package (Deepin deb installer)
- can_open_multiple_files=true
- expects_uris=false
- requires_terminal=false
- mime_types=application/x-deb
-
diff -Nru deepin-deb-installer-5.0.0/deepin-deb-installer.desktop deepin-deb-installer-5.7.0.17/deepin-deb-installer.desktop
--- deepin-deb-installer-5.0.0/deepin-deb-installer.desktop 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/deepin-deb-installer.desktop 1970-01-01 00:00:00.000000000 +0000
@@ -1,112 +0,0 @@
-[Desktop Entry]
-Categories=System;
-Comment=Deepin Package Manager is used to help users install and remove local package, supports bulk install.
-Exec=deepin-deb-installer %F
-GenericName=Package Manager
-Icon=deepin-deb-installer
-MimeType=application/vnd.debian.binary-package;application/x-deb;
-Name=Deepin Package Manager
-StartupNotify=true
-Terminal=false
-Type=Application
-X-Deepin-Vendor=deepin
-
-# Translations:
-# Do not manually modify!
-Comment[bg]=Deepin Мениджър на пакети се използва, за да помогне на потребителите да инсталират и премахват локален пакет, поддръжка на групово инсталиране.
-Comment[ca]=El Gestor de paquets del Deepin s'usa per ajudar els usuaris a instal·lar i eliminar paquets locals. Admet la instal·lació massiva.
-Comment[cs]=Správce balíčků se používá k pomoci uživatelům instalovat a odebírat místní balíčky, podporuje hromadnou instalaci.
-Comment[da]=Deepin pakkehåndtering bruges til at hjælpe brugere med at installere og fjerne lokal pakke, med understøttelse af masseinstallation.
-Comment[de]=Die Deepin Paketverwaltung unterstützt Benutzer beim Installieren und Entfernen von Softwarepaketen und unterstützt zudem die Installation via Stapelverarbeitung.
-Comment[en_AU]=The Deepin Package Manager helps users install and remove local packages. It supports bulk package installation.
-Comment[es]=Deepin Package Manager es usada para ayudar a los usuarios a instalar y quitar paquete local, soporta instalación en lote.
-Comment[es_419]=El Gestor de Paquetes Deepin se usa para ayudar a los usuarios a instalar y eliminar paquetes locales, admite la instalación masiva.
-Comment[et]=Deepin pakihaldur on rakendus, millega kasutajad saavad arvutisse tarkvara paigaldada ja seda sealt eemaldada. Toetab ka hulgipaigaldamist.
-Comment[fi]=Deepin-paketinhallintaa käytetään auttamaan käyttäjiä asentamaan ja poistamaan paikallisia paketteja.
-Comment[fr]=Deepin Package Manager est une application pour aider les utilisateurs à gérer les paquets installés, il supporte également l'installation multiple.
-Comment[id]=Manajer Paket Deepin digunakan untuk menolong para pengguna install dan menghapus paket lokal, mendukung install massal
-Comment[it]=Deepin Package Manager è utile per installare e rimuovere software in locale, supporta inoltre l'installazione massiva. Localizzazione italiana a cura di Massimo A. Carofano.
-Comment[ko]=Deepin 패키지 관리자는 사용자가 로컬 패키지를 설치 및 제거하고 일괄 설치를 지원하는데 사용됩니다.
-Comment[lt]=Deepin paketų tvarkytuvė yra naudojama padėti naudotojams įdiegti ir šalinti vietinius paketus, ši programa palaiko masinį įdiegimą.
-Comment[mn]=Деепин Багц Зохицуулагч нь хэрэглэгчдэд програм суулгах устгахад туслахаас гадна бүлэг суулгалтыг дэмждэг.
-Comment[ms]=Pengurus Pakej Deepin digunakan digunakan untuk bantu pengguna memasang dan membuang perisian setempat, selain itu ia menyokong pemasangan secara pukal.
-Comment[ne]=डिपिन प्याकेज प्रबन्धक, प्याकेज फाइल स्थापना र स्थापना रद्द गर्न प्रयोग हुन्छ
-Comment[nl]=Deepin Pakketbeheer is een applicatie die gebruikers helpt bij het installeren en verwijderen van lokale software, zowel één voor één als meerdere tegelijk.
-Comment[pl]=Zarządzanie pakietami Deepin pomaga użytkownikom instalować i usuwać lokalne pakiety, obsługuje instalację zbiorczą.
-Comment[pt]=O Deepin Package Manager é uma aplicação utilizada para ajudar os utilizadores a instalar e remover pacotes locais, suporta instalações em massa.
-Comment[pt_BR]=O Gerenciador de Pacotes Deepin tem como finalidade ajudar os usuários a instalar e remover pacotes locais, suportando a instalação em massa.
-Comment[ru]=Пакетный Менеджер Deepin используется для помощи пользователям в установке и удалении программного обеспечения, с поддержкой массовой установки.
-Comment[sk]=Aplikácia Deepin Správca balíčkov slúži na pomoc používateľom pri inštalácii a odstraňovaní lokálnych balíčkov, podporuje hromadnú inštaláciu.
-Comment[sq]=Përgjegjësi Deepin i Paketave përdoret për t’i ndihmuar përdoruesit të instalojnë dhe heqin paketa vendore. Mbulon instalime në masë.
-Comment[sr]=Дипин Управник Пакета је програм који помаже корисницима при инсталирању и уклањању локалног софтвера. Подржава групну инсталацију.
-Comment[tr]=Deepin Paket Yöneticisi, kullanıcıların yerel uygulamaları kurup kaldırmasını sağlayan ve toplu kurulum özelliği olan bir uygulamadır.
-Comment[uk]=Засіб керування пакунками Deepin використовується для полегшення встановлення і вилучення локальних пакунків користувачем. Передбачено підтримку пакетного встановлення.
-Comment[zh_CN]=深度软件包管理器用于帮助用户安装和卸载本地软件,支持批量安装。
-Comment[zh_TW]=Deepin 軟體包管理器用來幫助使用者安裝和移除本機軟體包。支援批次安裝。
-GenericName[ast]=Xestor de paquetes
-GenericName[bg]=Мениджър на пакети
-GenericName[ca]=Gestor de paquets
-GenericName[cs]=Správce balíčků
-GenericName[da]=Pakkehåndtering
-GenericName[de]=Paketverwaltung
-GenericName[en_AU]=Package Manager
-GenericName[es]=Package Manager
-GenericName[es_419]=Gestor de Paquetes
-GenericName[et]=Pakihaldur
-GenericName[fi]=Paketinhallinta
-GenericName[fr]=Gestionnaire de paquets Deepin
-GenericName[hu]=Csomagkezelő
-GenericName[id]=Manajer Paket
-GenericName[it]=Package Manager
-GenericName[ko]=패키지 관리자
-GenericName[lt]=Paketų tvarkytuvė
-GenericName[mn]=Багц Зохицуулагч
-GenericName[ms]=Pengurus Pakej
-GenericName[ne]=प्याकेज प्रबन्धक
-GenericName[nl]=Pakketbeheer
-GenericName[pa]=ਪੈਕੇਜ ਮੈਨੇਜਰ
-GenericName[pl]=Zarządzanie pakietami
-GenericName[pt]=Gestor de Pacotes
-GenericName[pt_BR]=Gerenciador de Pacotes
-GenericName[ru]=Менеджер Пакетов
-GenericName[sk]=Správca balíčkov
-GenericName[sq]=Përgjegjës Paketash
-GenericName[sr]=Управник Пакета
-GenericName[tr]=Paket Yöneticisi
-GenericName[uk]=Керування пакунками
-GenericName[zh_CN]=软件包管理器
-GenericName[zh_TW]=軟體包管理器
-Name[ast]=Deepin Package Manager
-Name[bg]=Deepin Мениджър на пакети
-Name[ca]=Gestor de paquets del Deepin
-Name[cs]=Správce balíčků
-Name[da]=Deepin pakkehåndtering
-Name[de]=Deepin Paketverwaltung
-Name[en_AU]=Deepin Package Manager
-Name[es]=Deepin Package Manager
-Name[es_419]=Gestor de Paquetes Deepin
-Name[et]=Deepin pakihaldur
-Name[fi]=Deepin Paketinhallinta
-Name[fr]=Gestionnaire de paquets Deepin
-Name[hu]=Deepin csomagkezelő
-Name[id]=Manajer Paket Deepin
-Name[it]=Deepin Package Manager
-Name[ko]=Deepin 패키지 관리자
-Name[lt]=Deepin paketų tvarkytuvė
-Name[mn]=Деепин Багц Зохицуулагч
-Name[ms]=Pengurus Pakej Deepin
-Name[ne]=डिपिन प्याकेज प्रबन्धक
-Name[nl]=Deepin Pakketbeheer
-Name[pa]=ਡੀਪਿਨ ਪੈਕੇਜ ਮੈਨੇਜਰ
-Name[pl]=Zarządzanie pakietami Deepin
-Name[pt]=Deepin Package Manager
-Name[pt_BR]=Deepin Gerenciador de Pacotes
-Name[ru]=Менеджер Пакетов Deepin
-Name[sk]=Deepin Správca balíčkov
-Name[sq]=Përgjegjësi Deepin i Paketave
-Name[sr]=Дипин Управник Пакета
-Name[tr]=Deepin Paket Yöneticisi
-Name[uk]=Керування пакунками Deepin
-Name[zh_CN]=深度软件包管理器
-Name[zh_TW]=Deepin 軟體包管理器
-
diff -Nru deepin-deb-installer-5.0.0/environments.h.in deepin-deb-installer-5.7.0.17/environments.h.in
--- deepin-deb-installer-5.0.0/environments.h.in 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/environments.h.in 1970-01-01 00:00:00.000000000 +0000
@@ -1,6 +0,0 @@
-#ifndef __ENVIRONMENTS_H_
-#define __ENVIRONMENTS_H_
-
-#define VERSION "@VERSION@"
-
-#endif // __ENVIRONMENTS_H_
diff -Nru deepin-deb-installer-5.0.0/filechoosewidget.cpp deepin-deb-installer-5.7.0.17/filechoosewidget.cpp
--- deepin-deb-installer-5.0.0/filechoosewidget.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/filechoosewidget.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "filechoosewidget.h"
-#include "utils.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-DWIDGET_USE_NAMESPACE
-
-FileChooseWidget::FileChooseWidget(QWidget *parent)
- : QWidget(parent),
- m_settings("deepin", "deepin-deb-install")
-{
- const auto ratio = devicePixelRatioF();
- QPixmap iconPix = Utils::renderSVG(":/images/icon.svg", QSize(140, 140));
- iconPix.setDevicePixelRatio(ratio);
-
- QLabel *iconImage = new QLabel;
- iconImage->setFixedSize(140, 140);
- iconImage->setPixmap(iconPix);
-
- QLabel *dndTips = new QLabel;
- dndTips->setText(tr("Drag and drop file here"));
- dndTips->setAlignment(Qt::AlignCenter);
- dndTips->setObjectName("DNDTips");
-
- QVBoxLayout *centerWrapLayout = new QVBoxLayout;
- centerWrapLayout->addWidget(iconImage);
- centerWrapLayout->setAlignment(iconImage, Qt::AlignTop | Qt::AlignHCenter);
- centerWrapLayout->addSpacing(20);
- centerWrapLayout->addWidget(dndTips);
- centerWrapLayout->setSpacing(0);
- centerWrapLayout->setContentsMargins(0, 0, 0, 15);
-
- QWidget *centerWidget = new QFrame;
- centerWidget->setFixedWidth(240);
- centerWidget->setLayout(centerWrapLayout);
- centerWidget->setObjectName("CenterWidget");
-
- QLabel *split_line = new QLabel;
- split_line->setObjectName("SplitLine");
- //split_line->setPixmap(QPixmap(":/images/split_line.svg"));
- split_line->setAlignment(Qt::AlignCenter);
-
- m_fileChooseBtn = new DLinkButton;
- m_fileChooseBtn->setObjectName("FileChooseButton");
- m_fileChooseBtn->setText(tr("Select File"));
-
- QVBoxLayout *centralLayout = new QVBoxLayout;
- centralLayout->addStretch();
- centralLayout->addWidget(centerWidget);
- centralLayout->setAlignment(centerWidget, Qt::AlignTop | Qt::AlignCenter);
- centralLayout->addWidget(split_line);
- centralLayout->addSpacing(20);
- centralLayout->addWidget(m_fileChooseBtn);
- centralLayout->setAlignment(m_fileChooseBtn, Qt::AlignCenter);
- centralLayout->setSpacing(0);
- centralLayout->setContentsMargins(0, 0, 0, 60);
-
- setLayout(centralLayout);
-
- connect(m_fileChooseBtn, &QPushButton::clicked, this, &FileChooseWidget::chooseFiles);
-}
-
-void FileChooseWidget::chooseFiles()
-{
- QString historyDir = m_settings.value("history_dir").toString();
-
- if (historyDir.isEmpty()) {
- historyDir = QDir::homePath();
- }
-
- QFileDialog dialog;
- dialog.setFileMode(QFileDialog::ExistingFiles);
- dialog.setNameFilter("Debian Package Files (*.deb)");
- dialog.setDirectory(historyDir);
-
- const int mode = dialog.exec();
-
- // save the directory string to config file.
- m_settings.setValue("history_dir", dialog.directoryUrl().toLocalFile());
-
- if (mode != QDialog::Accepted)
- return;
-
- const QStringList selected_files = dialog.selectedFiles();
-
- emit packagesSelected(selected_files);
-}
diff -Nru deepin-deb-installer-5.0.0/filechoosewidget.h deepin-deb-installer-5.7.0.17/filechoosewidget.h
--- deepin-deb-installer-5.0.0/filechoosewidget.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/filechoosewidget.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef FILECHOOSEWIDGET_H
-#define FILECHOOSEWIDGET_H
-
-#include
-#include
-
-#include
-
-class FileChooseWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit FileChooseWidget(QWidget *parent = nullptr);
-
-signals:
- void packagesSelected(const QStringList files) const;
-
-private slots:
- void chooseFiles();
-
-private:
- Dtk::Widget::DLinkButton *m_fileChooseBtn;
- QSettings m_settings;
-};
-
-#endif // FILECHOOSEWIDGET_H
diff -Nru deepin-deb-installer-5.0.0/.gitignore deepin-deb-installer-5.7.0.17/.gitignore
--- deepin-deb-installer-5.0.0/.gitignore 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/.gitignore 2020-12-03 11:59:49.000000000 +0000
@@ -22,3 +22,12 @@
# vim tmp file
*.swp
+.deepin-deb-installer.desktop.swj
+.deepin-deb-installer.desktop.swm
+debian/.debhelper/
+debian/deepin-deb-installer.debhelper.log
+debian/deepin-deb-installer.substvars
+debian/deepin-deb-installer/
+debian/files
+obj-x86_64-linux-gnu/
+resources/images/icon22.svg
diff -Nru deepin-deb-installer-5.0.0/infocontrolbutton.cpp deepin-deb-installer-5.7.0.17/infocontrolbutton.cpp
--- deepin-deb-installer-5.0.0/infocontrolbutton.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/infocontrolbutton.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "infocontrolbutton.h"
-
-#include
-#include
-#include
-#include
-
-InfoControlButton::InfoControlButton(const QString &expandTips, const QString &shrinkTips, QWidget *parent)
- : QWidget(parent),
- m_expand(false),
- m_expandTips(expandTips),
- m_shrinkTips(shrinkTips),
-
- m_arrowIcon(new QLabel),
- m_tipsText(new QLabel)
-{
- m_arrowIcon->setAlignment(Qt::AlignCenter);
- m_arrowIcon->setPixmap(QIcon(":/images/arrow_up.svg").pixmap(21, 8));
- m_tipsText->setAlignment(Qt::AlignCenter);
- m_tipsText->setText(expandTips);
-
- m_tipsText->setObjectName("TipsText");
-
- QVBoxLayout *centralLayout = new QVBoxLayout;
- centralLayout->addSpacing(2);
- centralLayout->addWidget(m_arrowIcon);
- centralLayout->addStretch();
- centralLayout->addWidget(m_tipsText);
- centralLayout->setSpacing(0);
- centralLayout->setContentsMargins(0, 0, 0, 0);
-
- setLayout(centralLayout);
- setFixedSize(200, 33);
-}
-
-void InfoControlButton::mouseReleaseEvent(QMouseEvent *e)
-{
- QWidget::mouseReleaseEvent(e);
-
- onMouseRelease();
-}
-
-void InfoControlButton::onMouseRelease()
-{
- if (m_expand)
- emit shrink();
- else
- emit expand();
-
- m_expand = !m_expand;
-
- if (!m_expand)
- {
- m_arrowIcon->setPixmap(QIcon(":/images/arrow_up.svg").pixmap(21, 8));
- m_tipsText->setText(m_expandTips);
- setFixedSize(200, 33);
- } else {
- m_arrowIcon->setPixmap(QIcon(":/images/arrow_down.svg").pixmap(21, 8));
- m_tipsText->setText(m_shrinkTips);
- setFixedSize(200, 28);
- }
-}
diff -Nru deepin-deb-installer-5.0.0/infocontrolbutton.h deepin-deb-installer-5.7.0.17/infocontrolbutton.h
--- deepin-deb-installer-5.0.0/infocontrolbutton.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/infocontrolbutton.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef INFOCONTROLBUTTON_H
-#define INFOCONTROLBUTTON_H
-
-#include
-#include
-
-class InfoControlButton : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit InfoControlButton(const QString &expandTips, const QString &shrinkTips, QWidget *parent = 0);
-
-signals:
- void expand();
- void shrink();
-
-protected:
- void mouseReleaseEvent(QMouseEvent *);
-
-private slots:
- void onMouseRelease();
-
-private:
- bool m_expand;
- QString m_expandTips;
- QString m_shrinkTips;
-
- QLabel *m_arrowIcon;
- QLabel *m_tipsText;
-};
-
-#endif // INFOCONTROLBUTTON_H
diff -Nru deepin-deb-installer-5.0.0/LICENSE deepin-deb-installer-5.7.0.17/LICENSE
--- deepin-deb-installer-5.0.0/LICENSE 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/LICENSE 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff -Nru deepin-deb-installer-5.0.0/main.cpp deepin-deb-installer-5.7.0.17/main.cpp
--- deepin-deb-installer-5.0.0/main.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/main.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "debinstaller.h"
-#include "environments.h"
-
-#include
-#include
-#include
-#include
-#include
-
-DWIDGET_USE_NAMESPACE
-#ifdef DUTIL_USE_NAMESPACE
-DUTIL_USE_NAMESPACE
-#else
-DCORE_USE_NAMESPACE
-#endif
-
-int main(int argc, char *argv[])
-{
- DApplication::loadDXcbPlugin();
-
- DApplication app(argc, argv);
- app.setOrganizationName("deepin");
- app.setApplicationName("deepin-deb-installer");
- app.setApplicationVersion(VERSION);
- app.setApplicationAcknowledgementPage("https://www.deepin.org/acknowledgments/deepin-package-manager/");
- app.setProductIcon(QIcon(":/images/icon.svg"));
- app.setAttribute(Qt::AA_UseHighDpiPixmaps);
- app.setAttribute(Qt::AA_EnableHighDpiScaling);
-// app.loadTranslator(QList() << QLocale("zh_CN"));
- app.loadTranslator();
- app.setProductName(QApplication::translate("main", "Deepin Package Manager"));
- app.setApplicationDescription(QApplication::translate("main", "Deepin Package Manager is used to help users install and remove local packages, supporting bulk install."));
-
- DLogManager::registerConsoleAppender();
- DLogManager::registerFileAppender();
-
- qDebug() << qApp->applicationName() << "started, version = " << qApp->applicationVersion();
-
- // command line arguments
- QCommandLineParser parser;
- parser.setApplicationDescription("Deepin deb package manager.");
- parser.addHelpOption();
- parser.addVersionOption();
- parser.addPositionalArgument("filename", "Deb package path.", "file [file..]");
-
- parser.process(app);
-
- const QStringList file_list = parser.positionalArguments();
- qDebug() << file_list;
-
- DebInstaller w;
- w.show();
-
- // select files from args
- if (!file_list.isEmpty())
- QMetaObject::invokeMethod(&w, "onPackagesSelected", Qt::QueuedConnection, Q_ARG(QStringList, file_list));
-
- return app.exec();
-}
diff -Nru deepin-deb-installer-5.0.0/multipleinstallpage.cpp deepin-deb-installer-5.7.0.17/multipleinstallpage.cpp
--- deepin-deb-installer-5.0.0/multipleinstallpage.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/multipleinstallpage.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "multipleinstallpage.h"
-#include "packagelistview.h"
-#include "packageslistdelegate.h"
-#include "deblistmodel.h"
-#include "workerprogress.h"
-#include "widgets/bluebutton.h"
-#include "widgets/graybutton.h"
-
-#include
-#include
-#include
-#include
-#include
-
-MultipleInstallPage::MultipleInstallPage(DebListModel *model, QWidget *parent)
- : QWidget(parent),
- m_debListModel(model),
- m_appsView(new PackagesListView),
- m_infoArea(new QTextEdit),
- m_infoControlButton(new InfoControlButton(tr("Display details"), tr("Collapse"))),
- m_installProgress(new WorkerProgress),
- m_progressAnimation(new QPropertyAnimation(m_installProgress, "value", this)),
- m_installButton(new BlueButton),
- m_acceptButton(new GrayButton),
- m_backButton(new GrayButton)
-{
- PackagesListDelegate *delegate = new PackagesListDelegate;
-
- m_appsView->setObjectName("AppsView");
- m_infoArea->setObjectName("InfoArea");
- m_infoControlButton->setObjectName("InfoControlButton");
-
- m_appsView->setModel(model);
- m_appsView->setFixedHeight(213);
- m_appsView->setItemDelegate(delegate);
-
- m_installButton->setText(tr("Install"));
- m_acceptButton->setText(tr("Done"));
- m_acceptButton->setVisible(false);
- m_backButton->setText(tr("Back"));
- m_backButton->setVisible(false);
-
- m_infoArea->setReadOnly(true);
- m_infoArea->setVisible(false);
- m_infoArea->setAcceptDrops(false);
- m_infoArea->setFixedHeight(186);
- m_infoArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-
- m_infoControlButton->setVisible(false);
- m_installProgress->setVisible(false);
-
- QHBoxLayout *btnsLayout = new QHBoxLayout;
- btnsLayout->addStretch();
- btnsLayout->addWidget(m_installButton);
- btnsLayout->addWidget(m_backButton);
- btnsLayout->addWidget(m_acceptButton);
- btnsLayout->setSpacing(10);
- btnsLayout->addStretch();
- btnsLayout->setContentsMargins(0, 0, 0, 0);
-
- QVBoxLayout *centralLayout = new QVBoxLayout;
- centralLayout->addWidget(m_appsView);
- centralLayout->addWidget(m_infoControlButton);
- centralLayout->setAlignment(m_infoControlButton, Qt::AlignHCenter);
- centralLayout->addWidget(m_infoArea);
- centralLayout->addStretch();
- centralLayout->addWidget(m_installProgress);
- centralLayout->setAlignment(m_installProgress, Qt::AlignHCenter);
- centralLayout->addLayout(btnsLayout);
- centralLayout->setSpacing(0);
- centralLayout->setContentsMargins(20, 0, 20, 30);
-
- setLayout(centralLayout);
-
- connect(m_infoControlButton, &InfoControlButton::expand, this, &MultipleInstallPage::showInfo);
- connect(m_infoControlButton, &InfoControlButton::shrink, this, &MultipleInstallPage::hideInfo);
- connect(m_installButton, &QPushButton::clicked, m_debListModel, &DebListModel::installAll);
- connect(m_backButton, &QPushButton::clicked, this, &MultipleInstallPage::back);
- connect(m_acceptButton, &QPushButton::clicked, qApp, &QApplication::quit);
-
- connect(m_appsView, &PackagesListView::clicked, this, &MultipleInstallPage::onItemClicked);
- connect(m_appsView, &PackagesListView::entered, m_debListModel, &DebListModel::setCurrentIndex);
-
- connect(model, &DebListModel::workerProgressChanged, this, &MultipleInstallPage::onProgressChanged);
- connect(model, &DebListModel::appendOutputInfo, this, &MultipleInstallPage::onOutputAvailable);
-}
-
-void MultipleInstallPage::onWorkerFinshed()
-{
- m_acceptButton->setVisible(true);
- m_backButton->setVisible(true);
- m_installProgress->setVisible(false);
-}
-
-void MultipleInstallPage::onOutputAvailable(const QString &output)
-{
- m_infoArea->append(output.trimmed());
-
- // change to install
- if (m_installButton->isVisible())
- {
- m_installButton->setVisible(false);
-
- m_installProgress->setVisible(true);
- m_infoControlButton->setVisible(true);
- }
-}
-
-void MultipleInstallPage::onProgressChanged(const int progress)
-{
- m_progressAnimation->setStartValue(m_installProgress->value());
- m_progressAnimation->setEndValue(progress);
- m_progressAnimation->start();
-
- // finished
- if (progress == 100)
- {
- onOutputAvailable(QString());
- QTimer::singleShot(m_progressAnimation->duration(), this, &MultipleInstallPage::onWorkerFinshed);
- }
-}
-
-void MultipleInstallPage::onItemClicked(const QModelIndex &index)
-{
- if (!m_debListModel->isWorkerPrepare())
- return;
-
- const int r = index.row();
-
- emit requestRemovePackage(r);
-}
-
-void MultipleInstallPage::showInfo()
-{
- m_appsView->setVisible(false);
- m_infoArea->setVisible(true);
-}
-
-void MultipleInstallPage::hideInfo()
-{
- m_appsView->setVisible(true);
- m_infoArea->setVisible(false);
-}
diff -Nru deepin-deb-installer-5.0.0/multipleinstallpage.h deepin-deb-installer-5.7.0.17/multipleinstallpage.h
--- deepin-deb-installer-5.0.0/multipleinstallpage.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/multipleinstallpage.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef MULTIPLEINSTALLPAGE_H
-#define MULTIPLEINSTALLPAGE_H
-
-#include "infocontrolbutton.h"
-
-#include
-
-#include
-#include
-#include
-#include
-
-class PackagesListView;
-class DebListModel;
-class MultipleInstallPage : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit MultipleInstallPage(DebListModel *model, QWidget *parent = 0);
-
-signals:
- void back() const;
- void requestRemovePackage(const int index) const;
-
-private slots:
- void onWorkerFinshed();
- void onOutputAvailable(const QString &output);
- void onProgressChanged(const int progress);
- void onItemClicked(const QModelIndex &index);
-
- void showInfo();
- void hideInfo();
-
-private:
- DebListModel *m_debListModel;
- PackagesListView *m_appsView;
- QTextEdit *m_infoArea;
- InfoControlButton *m_infoControlButton;
- QProgressBar *m_installProgress;
- QPropertyAnimation *m_progressAnimation;
- QPushButton *m_installButton;
- QPushButton *m_acceptButton;
- QPushButton *m_backButton;
-};
-
-#endif // MULTIPLEINSTALLPAGE_H
diff -Nru deepin-deb-installer-5.0.0/packagelistview.cpp deepin-deb-installer-5.7.0.17/packagelistview.cpp
--- deepin-deb-installer-5.0.0/packagelistview.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/packagelistview.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "packagelistview.h"
-
-PackagesListView::PackagesListView(QWidget *parent)
- : QListView(parent)
-{
- setVerticalScrollMode(ScrollPerPixel);
- setSelectionMode(NoSelection);
- setAutoScroll(false);
- setMouseTracking(true);
-}
-
-void PackagesListView::leaveEvent(QEvent *e)
-{
- QListView::leaveEvent(e);
-
- emit entered(QModelIndex());
-}
diff -Nru deepin-deb-installer-5.0.0/packagelistview.h deepin-deb-installer-5.7.0.17/packagelistview.h
--- deepin-deb-installer-5.0.0/packagelistview.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/packagelistview.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef PACKAGESLISTVIEW_H
-#define PACKAGESLISTVIEW_H
-
-#include
-
-class PackagesListView : public QListView
-{
- Q_OBJECT
-
-public:
- explicit PackagesListView(QWidget *parent = 0);
-
-protected:
- void leaveEvent(QEvent *e);
-};
-
-#endif // PACKAGESLISTVIEW_H
diff -Nru deepin-deb-installer-5.0.0/packageslistdelegate.cpp deepin-deb-installer-5.7.0.17/packageslistdelegate.cpp
--- deepin-deb-installer-5.0.0/packageslistdelegate.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/packageslistdelegate.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "packageslistdelegate.h"
-#include "deblistmodel.h"
-#include "utils.h"
-
-#include
-#include
-#include
-
-#define THEME_DARK "dark"
-#define THEME_LIGHT "light"
-
-DWIDGET_USE_NAMESPACE
-
-PackagesListDelegate::PackagesListDelegate(QObject *parent)
- : QAbstractItemDelegate(parent)
-{
- const QIcon icon = QIcon::fromTheme("application-vnd.debian.binary-package", QIcon::fromTheme("debian-swirl"));
- const auto ratio = qApp->devicePixelRatio();
- m_packageIcon = icon.pixmap(32, 32);
- m_removeIcon = Utils::renderSVG(":/images/active_tab_close_normal.svg", QSize(16, 16));
- m_removeIcon.setDevicePixelRatio(ratio);
-}
-
-void PackagesListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
-{
-// painter->fillRect(option.rect, Qt::gray);
-
- const int content_x = 45;
-
- const QString &theme = m_qsettings.value("theme").toString();
-
- // draw top border
- if (index.row())
- {
- const QPoint start(content_x, option.rect.top());
- const QPoint end(option.rect.right() - 10, option.rect.top());
-
- painter->setPen(theme == THEME_LIGHT ? QColor(0, 0, 0, 255 * .05) : QColor(255, 255, 255, 255 * 0.05));
- painter->setRenderHint(QPainter::Antialiasing, false);
- painter->drawLine(start, end);
- }
-
- painter->setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform);
-
- // draw package icon
- const int x = 5;
- const int y = option.rect.top() + (option.rect.height() - m_packageIcon.height() / m_packageIcon.devicePixelRatio()) / 2;
- painter->drawPixmap(x, y, m_packageIcon);
-
- // draw package name
- QRect name_rect = option.rect;
- name_rect.setLeft(content_x);
- name_rect.setHeight(name_rect.height() / 2);
-
- const QString name = index.data(DebListModel::PackageNameRole).toString();
- const QFont old_font = painter->font();
- QFont f = old_font;
- if (theme == THEME_LIGHT) {
- f.setWeight(QFont::DemiBold);
- }
- painter->setFont(f);
- const QString name_str = painter->fontMetrics().elidedText(name, Qt::ElideRight, 306);
- const QRectF name_bounding_rect = painter->boundingRect(name_rect, name_str, Qt::AlignLeft | Qt::AlignBottom);
- painter->setPen(theme == THEME_LIGHT ? Qt::black : QColor("#efefef"));
- painter->drawText(name_rect, name_str, Qt::AlignLeft | Qt::AlignBottom);
- painter->setFont(old_font);
-
- // draw package version
- const int version_x = name_bounding_rect.right() + 8;
- QRect version_rect = name_rect;
- version_rect.setLeft(version_x);
- version_rect.setRight(option.rect.right() - 85);
- const QString version = index.data(DebListModel::PackageVersionRole).toString();
- const QString version_str = painter->fontMetrics().elidedText(version, Qt::ElideRight, version_rect.width());
- painter->setPen(theme == THEME_LIGHT ? Qt::black : QColor("#929292"));
- painter->drawText(version_rect, version_str, Qt::AlignLeft | Qt::AlignBottom);
-
- // install status
- const int operate_stat = index.data(DebListModel::PackageOperateStatusRole).toInt();
- if (operate_stat != DebListModel::Prepare)
- {
- QRect install_status_rect = option.rect;
- install_status_rect.setRight(option.rect.right() - 15);
- install_status_rect.setLeft(option.rect.right() - 80);
-
- switch (operate_stat)
- {
- case DebListModel::Operating:
- painter->setPen(QColor(124, 124, 124));
- painter->drawText(install_status_rect, tr("Installing"), Qt::AlignVCenter | Qt::AlignRight);
- break;
- case DebListModel::Success:
- painter->setPen(QColor(65, 117, 5));
- painter->drawText(install_status_rect, tr("Installed"), Qt::AlignVCenter | Qt::AlignRight);
- break;
- default:
- painter->setPen(QColor(255, 109, 109));
- painter->drawText(install_status_rect, tr("Failed"), Qt::AlignVCenter | Qt::AlignRight);
- break;
- }
- } else if (index.data(DebListModel::WorkerIsPrepareRole).toBool() &&
- index.data(DebListModel::ItemIsCurrentRole).toBool()) {
- // draw remove icon
- const int x = option.rect.right() - m_removeIcon.width() / m_removeIcon.devicePixelRatio() - 10;
- const int y = option.rect.top() + (option.rect.height() - m_removeIcon.height() / m_removeIcon.devicePixelRatio()) / 2;
- painter->drawPixmap(x, y, m_removeIcon);
- }
-
- // draw package info
- QString info_str;
- QRect info_rect = option.rect;
- info_rect.setLeft(content_x);
- info_rect.setTop(name_rect.bottom() + 1 + 3);
-
- const int install_stat = index.data(DebListModel::PackageVersionStatusRole).toInt();
- if (operate_stat == DebListModel::Failed)
- {
- info_str = index.data(DebListModel::PackageFailReasonRole).toString();
- painter->setPen(QColor(255, 109, 109));
- } else if (install_stat != DebListModel::NotInstalled) {
- if (install_stat == DebListModel::InstalledSameVersion)
- {
- info_str = tr("Same version installed");
- painter->setPen(QColor(65, 117, 5));
- } else {
- info_str = tr("Other version installed: %1").arg(index.data(DebListModel::PackageInstalledVersionRole).toString());
- painter->setPen(QColor(255, 109, 109));
- }
- } else {
- info_str = index.data(DebListModel::PackageDescriptionRole).toString();
- painter->setPen(QColor(90, 90, 90));
- }
-
- info_str = painter->fontMetrics().elidedText(info_str, Qt::ElideRight, 306);
- painter->drawText(info_rect, info_str, Qt::AlignLeft | Qt::AlignTop);
-}
-
-QSize PackagesListDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
-{
- Q_UNUSED(option);
-
- return index.data(Qt::SizeHintRole).toSize();
-}
diff -Nru deepin-deb-installer-5.0.0/packageslistdelegate.h deepin-deb-installer-5.7.0.17/packageslistdelegate.h
--- deepin-deb-installer-5.0.0/packageslistdelegate.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/packageslistdelegate.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef PACKAGESLISTDELEGATE_H
-#define PACKAGESLISTDELEGATE_H
-
-#include
-#include
-
-class PackagesListDelegate : public QAbstractItemDelegate
-{
- Q_OBJECT
-
-public:
- explicit PackagesListDelegate(QObject *parent = 0);
-
-private:
- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
-
-private:
- QPixmap m_packageIcon;
- QPixmap m_removeIcon;
- QSettings m_qsettings;
-};
-
-#endif // PACKAGESLISTDELEGATE_H
diff -Nru deepin-deb-installer-5.0.0/packagesmanager.cpp deepin-deb-installer-5.7.0.17/packagesmanager.cpp
--- deepin-deb-installer-5.0.0/packagesmanager.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/packagesmanager.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,812 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "packagesmanager.h"
-#include "deblistmodel.h"
-
-#include
-#include
-#include
-
-using namespace QApt;
-
-QString relationName(const RelationType type)
-{
- switch (type)
- {
- case LessOrEqual: return "<=";
- case GreaterOrEqual: return ">=";
- case LessThan: return "<";
- case GreaterThan: return ">";
- case Equals: return "=";
- case NotEqual: return "!=";
- default:;
- }
-
- return QString();
-}
-
-bool isArchMatches(QString sysArch, const QString &packageArch, const int multiArchType)
-{
- Q_UNUSED(multiArchType);
-
- if (sysArch.startsWith(':'))
- sysArch.remove(0, 1);
-
- if (sysArch == "all" || sysArch == "any")
- return true;
-
-// if (multiArchType == MultiArchForeign)
-// return true;
-
- return sysArch == packageArch;
-}
-
-QString resolvMultiArchAnnotation(const QString &annotation, const QString &debArch, const int multiArchType = InvalidMultiArchType)
-{
- if (annotation == "native" || annotation == "any")
- return QString();
-
- if (multiArchType == MultiArchForeign)
- return QString();
-
- QString arch;
- if (annotation.isEmpty())
- arch = debArch;
- else
- arch = annotation;
-
- if (!arch.startsWith(':') && !arch.isEmpty())
- return arch.prepend(':');
- else
- return arch;
-}
-
-bool dependencyVersionMatch(const int result, const RelationType relation)
-{
- switch (relation)
- {
- case LessOrEqual: return result <= 0;
- case GreaterOrEqual: return result >= 0;
- case LessThan: return result < 0;
- case GreaterThan: return result > 0;
- case Equals: return result == 0;
- case NotEqual: return result != 0;
- default:;
- }
-
- return true;
-}
-
-Backend *init_backend()
-{
- Backend *b = new Backend;
-
- if (b->init())
- return b;
-
- qFatal("%s", b->initErrorMessage().toStdString().c_str());
- return nullptr;
-}
-
-PackagesManager::PackagesManager(QObject *parent)
- : QObject(parent)
-{
- m_backendFuture = QtConcurrent::run(init_backend);
-}
-
-bool PackagesManager::isBackendReady()
-{
- return m_backendFuture.isFinished();
-}
-
-bool PackagesManager::isArchError(const int idx)
-{
- Backend *b = m_backendFuture.result();
- DebFile *deb = m_preparedPackages[idx];
-
- const QString arch = deb->architecture();
-
- if (arch == "all" || arch == "any")
- return false;
-
- return !b->architectures().contains(deb->architecture());
-}
-
-const ConflictResult PackagesManager::packageConflictStat(const int index)
-{
- auto *p = m_preparedPackages[index];
-
- return isConflictSatisfy(p->architecture(), p->conflicts());
-}
-
-const ConflictResult PackagesManager::isConflictSatisfy(const QString &arch, Package *package)
-{
- const QString &name = package->name();
- qDebug() << "check conflict for package" << name << arch;
-
- const auto ret_installed = isInstalledConflict(name, package->version(), package->architecture());
- if (!ret_installed.is_ok())
- return ret_installed;
-// if (!ret_installed.is_ok())
-// {
-// bool found_provider = false;
-// // check providers
-// Backend *b = m_backendFuture.result();
-// for (auto *ap : b->availablePackages())
-// {
-// if (ap->providesList().contains(name))
-// {
-// found_provider = true;
-// break;
-// }
-// }
-
-// // not found providers, return error
-// if (!found_provider)
-// return ret_installed;
-// }
-
- qDebug() << "check conflict for local installed package is ok.";
-
- const auto ret_package = isConflictSatisfy(arch, package->conflicts());
-
- qDebug() << "check finished, conflict is satisfy:" << package->name() << bool(ret_package.is_ok());
-
- return ret_package;
-}
-
-const ConflictResult PackagesManager::isInstalledConflict(const QString &packageName, const QString &packageVersion, const QString &packageArch)
-{
- static QList> sysConflicts;
-
- if (sysConflicts.isEmpty())
- {
- Backend *b = m_backendFuture.result();
- for (Package *p : b->availablePackages())
- {
- if (!p->isInstalled())
- continue;
- const auto &conflicts = p->conflicts();
- if (conflicts.isEmpty())
- continue;
-
- for (const auto &conflict_list : conflicts)
- for (const auto &conflict : conflict_list)
- sysConflicts << QPair(p->name(), conflict);
- }
- }
-
- for (const auto &info : sysConflicts)
- {
- const auto &conflict = info.second;
- const auto &pkgName = conflict.packageName();
- const auto &pkgVersion = conflict.packageVersion();
- const auto &pkgArch = conflict.multiArchAnnotation();
-
- if (pkgName != packageName)
- continue;
-
- qDebug() << pkgName << pkgVersion << pkgArch;
-
- // pass if arch not match
- if (!pkgArch.isEmpty() && pkgArch != packageArch && pkgArch != "any" && pkgArch != "native")
- continue;
-
- if (pkgVersion.isEmpty())
- return ConflictResult::err(info.first);
-
- const int relation = Package::compareVersion(packageVersion, conflict.packageVersion());
- // match, so is bad
- if (dependencyVersionMatch(relation, conflict.relationType()))
- return ConflictResult::err(info.first);
- }
-
- return ConflictResult::ok(QString());
-}
-
-const ConflictResult PackagesManager::isConflictSatisfy(const QString &arch, const QList &conflicts)
-{
- for (const auto &conflict_list : conflicts)
- {
- for (const auto &conflict : conflict_list)
- {
- const QString name = conflict.packageName();
- Package *p = packageWithArch(name, arch, conflict.multiArchAnnotation());
-
- if (!p || !p->isInstalled())
- continue;
-
- // arch error, conflicts
- if (!isArchMatches(arch, p->architecture(), p->multiArchType()))
- {
- qDebug() << "conflicts package installed: " << arch << p->name() << p->architecture() << p->multiArchTypeString();
- return ConflictResult::err(name);
- }
-
- const QString conflict_version = conflict.packageVersion();
- const QString installed_version = p->installedVersion();
- const auto type = conflict.relationType();
- const auto result = Package::compareVersion(installed_version, conflict_version);
-
- // not match, ok
- if (!dependencyVersionMatch(result, type))
- continue;
-
- // test package
- const QString mirror_version = p->availableVersion();
- if (mirror_version == installed_version)
- continue;
-
- // mirror version is also break
- const auto mirror_result = Package::compareVersion(mirror_version, conflict_version);
- if (dependencyVersionMatch(mirror_result, type))
- {
- qDebug() << "conflicts package installed: " << arch << p->name() << p->architecture() << p->multiArchTypeString() << mirror_version << conflict_version;
- return ConflictResult::err(name);
- }
- }
- }
-
- return ConflictResult::ok(QString());
-}
-
-int PackagesManager::packageInstallStatus(const int index)
-{
- if (m_packageInstallStatus.contains(index))
- return m_packageInstallStatus[index];
-
- const QString packageName = m_preparedPackages[index]->packageName();
- const QString packageArch = m_preparedPackages[index]->architecture();
- Backend *b = m_backendFuture.result();
- Package *p = b->package(packageName + ":" + packageArch);
-
- int ret = DebListModel::NotInstalled;
- do {
- if (!p)
- break;
-
- const QString installedVersion = p->installedVersion();
- if (installedVersion.isEmpty())
- break;
-
- const QString packageVersion = m_preparedPackages[index]->version();
- const int result = Package::compareVersion(packageVersion, installedVersion);
-
- if (result == 0)
- ret = DebListModel::InstalledSameVersion;
- else if (result < 0)
- ret = DebListModel::InstalledLaterVersion;
- else
- ret = DebListModel::InstalledEarlierVersion;
- } while (false);
-
- m_packageInstallStatus.insert(index, ret);
- return ret;
-}
-
-PackageDependsStatus PackagesManager::packageDependsStatus(const int index)
-{
- if (m_packageDependsStatus.contains(index))
- return m_packageDependsStatus[index];
-
- if (isArchError(index))
- return PackageDependsStatus::_break(QString());
-
- DebFile *deb = m_preparedPackages[index];
- const QString architecture = deb->architecture();
-
- PackageDependsStatus ret = PackageDependsStatus::ok();
-
- // conflicts
- const ConflictResult debConflitsResult = isConflictSatisfy(architecture, deb->conflicts());
-
- if (!debConflitsResult.is_ok())
- {
- qDebug() << "depends break because conflict" << deb->packageName();
- ret.package = debConflitsResult.unwrap();
- ret.status = DebListModel::DependsBreak;
- } else {
- const ConflictResult localConflictsResult = isInstalledConflict(deb->packageName(), deb->version(), architecture);
- if (!localConflictsResult.is_ok())
- {
- qDebug() << "depends break because conflict with local package" << deb->packageName();
- ret.package = localConflictsResult.unwrap();
- ret.status = DebListModel::DependsBreak;
- } else {
- qDebug() << "depends:";
- qDebug() << "Check for package" << deb->packageName();
- QSet choose_set;
- choose_set << deb->packageName();
- ret = checkDependsPackageStatus(choose_set, deb->architecture(), deb->depends());
- }
- }
-
- if (ret.isBreak())
- Q_ASSERT(!ret.package.isEmpty());
-
- m_packageDependsStatus[index] = ret;
-
- qDebug() << "Check finished for package" << deb->packageName() << ret.status;
- if (ret.status == DebListModel::DependsAvailable)
- {
- const auto list = packageAvailableDepends(index);
- qDebug() << "available depends:" << list.size() << list;
- }
-
- return ret;
-}
-
-const QString PackagesManager::packageInstalledVersion(const int index)
-{
- Q_ASSERT(m_packageInstallStatus.contains(index));
- Q_ASSERT(m_packageInstallStatus[index] == DebListModel::InstalledEarlierVersion ||
- m_packageInstallStatus[index] == DebListModel::InstalledLaterVersion);
-
- Backend *b = m_backendFuture.result();
- Package *p = b->package(m_preparedPackages[index]->packageName());
-
- return p->installedVersion();
-}
-
-const QStringList PackagesManager::packageAvailableDepends(const int index)
-{
- Q_ASSERT(m_packageDependsStatus.contains(index));
- Q_ASSERT(m_packageDependsStatus[index].isAvailable());
-
- DebFile *deb = m_preparedPackages[index];
- QSet choose_set;
- const QString debArch = deb->architecture();
- const auto &depends = deb->depends();
- packageCandidateChoose(choose_set, debArch, depends);
-
- // TODO: check upgrade from conflicts
-
- return choose_set.toList();
-}
-
-void PackagesManager::packageCandidateChoose(QSet &choosed_set, const QString &debArch, const QList &dependsList)
-{
- for (auto const &candidate_list : dependsList)
- packageCandidateChoose(choosed_set, debArch, candidate_list);
-}
-
-void PackagesManager::packageCandidateChoose(QSet &choosed_set, const QString &debArch, const DependencyItem &candidateList)
-{
- bool choosed = false;
-
- for (const auto &info : candidateList)
- {
- Package *dep = packageWithArch(info.packageName(), debArch, info.multiArchAnnotation());
- if (!dep)
- continue;
-
- const auto choosed_name = dep->name() + resolvMultiArchAnnotation(QString(), dep->architecture());
- if (choosed_set.contains(choosed_name))
- {
- choosed = true;
- break;
- }
-
- // TODO: upgrade?
- if (!dep->installedVersion().isEmpty())
- return;
-
- if (!isConflictSatisfy(debArch, dep->conflicts()).is_ok())
- {
- qDebug() << "conflict error in choose candidate" << dep->name();
- continue;
- }
-
- // pass if break
- QSet set = choosed_set;
- set << choosed_name;
- const auto stat = checkDependsPackageStatus(set, dep->architecture(), dep->depends());
- if (stat.isBreak())
- {
- qDebug() << "depends error in choose candidate" << dep->name();
- continue;
- }
-
- choosed = true;
- choosed_set << choosed_name;
- packageCandidateChoose(choosed_set, debArch, dep->depends());
- break;
- }
-
- Q_ASSERT(choosed);
-}
-
-const QStringList PackagesManager::packageReverseDependsList(const QString &packageName, const QString &sysArch)
-{
- Package *p = packageWithArch(packageName, sysArch);
- Q_ASSERT(p);
-
- QSet ret { packageName };
- QQueue testQueue;
-
- for (const auto &item : p->requiredByList().toSet())
- testQueue.append(item);
-
- while (!testQueue.isEmpty())
- {
- const auto item = testQueue.first();
- testQueue.pop_front();
-
- if (ret.contains(item))
- continue;
-
- Package *p = packageWithArch(item, sysArch);
- if (!p || !p->isInstalled())
- continue;
-
- if (p->recommendsList().contains(packageName))
- continue;
-
- ret << item;
-
- // append new reqiure list
- for (const auto &r : p->requiredByList())
- {
- if (ret.contains(r) || testQueue.contains(r))
- continue;
- testQueue.append(r);
- }
- }
-
- // remove self
- ret.remove(packageName);
-
- return ret.toList();
-}
-
-void PackagesManager::reset()
-{
- m_preparedPackages.clear();
- m_packageInstallStatus.clear();
- m_packageDependsStatus.clear();
- m_appendedPackagesMd5.clear();
- m_backendFuture.result()->reloadCache();
-}
-
-void PackagesManager::resetPackageDependsStatus(const int index)
-{
- if (!m_packageDependsStatus.contains(index))
- return;
-
- // reload backend cache
- m_backendFuture.result()->reloadCache();
-
- m_packageDependsStatus.remove(index);
-}
-
-void PackagesManager::removePackage(const int index)
-{
- DebFile *deb = m_preparedPackages[index];
- const auto md5 = deb->md5Sum();
-
- m_appendedPackagesMd5.remove(md5);
- m_preparedPackages.removeAt(index);
- m_packageInstallStatus.clear();
- m_packageDependsStatus.clear();
-}
-
-void PackagesManager::appendPackage(DebFile *debPackage)
-{
- const auto md5 = debPackage->md5Sum();
- if (m_appendedPackagesMd5.contains(md5))
- return;
-
- m_preparedPackages << debPackage;
- m_appendedPackagesMd5 << md5;
-}
-
-const PackageDependsStatus PackagesManager::checkDependsPackageStatus(QSet &choosed_set, const QString &architecture, const QList &depends)
-{
- PackageDependsStatus ret = PackageDependsStatus::ok();
-
- for (const auto &candicate_list : depends)
- {
- const auto r = checkDependsPackageStatus(choosed_set, architecture, candicate_list);
- ret.maxEq(r);
-
- if (ret.isBreak())
- break;
- }
-
- return ret;
-}
-
-const PackageDependsStatus PackagesManager::checkDependsPackageStatus(QSet &choosed_set, const QString &architecture, const DependencyItem &candicate)
-{
- PackageDependsStatus ret = PackageDependsStatus::_break(QString());
-
- for (const auto &info : candicate)
- {
- const auto r = checkDependsPackageStatus(choosed_set, architecture, info);
- ret.minEq(r);
-
- if (!ret.isBreak())
- break;
- }
-
- return ret;
-}
-
-const PackageDependsStatus PackagesManager::checkDependsPackageStatus(QSet &choosed_set, const QString &architecture, const DependencyInfo &dependencyInfo)
-{
- const QString package_name = dependencyInfo.packageName();
-
- Package *p = packageWithArch(package_name, architecture, dependencyInfo.multiArchAnnotation());
-
- if (!p)
- {
- qDebug() << "depends break because package" << package_name << "not available";
- return PackageDependsStatus::_break(package_name);
- }
-
- qDebug() << DependencyInfo::typeName(dependencyInfo.dependencyType())
- << package_name
- << p->architecture()
- << relationName(dependencyInfo.relationType())
- << dependencyInfo.packageVersion();
-
-// if (dependencyInfo.packageVersion().isEmpty())
-// return PackageDependsStatus::ok();
-
- const RelationType relation = dependencyInfo.relationType();
- const QString &installedVersion = p->installedVersion();
-
- if (!installedVersion.isEmpty())
- {
- const int result = Package::compareVersion(installedVersion, dependencyInfo.packageVersion());
- if (dependencyVersionMatch(result, relation))
- return PackageDependsStatus::ok();
- else
- {
- const QString &mirror_version = p->availableVersion();
- if (mirror_version != installedVersion)
- {
- const auto mirror_result = Package::compareVersion(mirror_version, dependencyInfo.packageVersion());
-
- if (dependencyVersionMatch(mirror_result, relation))
- {
- qDebug() << "availble by upgrade package" << p->name() << p->architecture() << "from" << installedVersion << "to" << mirror_version;
- return PackageDependsStatus::available();
- }
- }
-
- qDebug() << "depends break by" << p->name() << p->architecture() << dependencyInfo.packageVersion();
- qDebug() << "installed version not match" << installedVersion;
- return PackageDependsStatus::_break(p->name());
- }
- } else {
- const int result = Package::compareVersion(p->version(), dependencyInfo.packageVersion());
- if (!dependencyVersionMatch(result, relation))
- {
- qDebug() << "depends break by" << p->name() << p->architecture() << dependencyInfo.packageVersion();
- qDebug() << "available version not match" << p->version();
- return PackageDependsStatus::_break(p->name());
- }
-
- // is that already choosed?
- if (choosed_set.contains(p->name()))
- return PackageDependsStatus::ok();
-
- // check arch conflicts
- if (p->multiArchType() == MultiArchSame)
- {
- Backend *b = backend();
- for (const auto &arch : b->architectures())
- {
- if (arch == p->architecture())
- continue;
-
- Package *tp = b->package(p->name() + ":" + arch);
- if (tp && tp->isInstalled())
- {
- qDebug() << "multi arch installed: " << p->name() << p->version() << p->architecture() << "with" << tp->name() << tp->version() << tp->architecture();
- return PackageDependsStatus::_break(p->name() + ":" + p->architecture());
- }
- }
- }
-
- // let's check conflicts
- if (!isConflictSatisfy(architecture, p).is_ok())
- {
- qDebug() << "depends break because conflict, ready to find providers" << p->name();
-
- Backend *b = m_backendFuture.result();
- for (auto *ap : b->availablePackages())
- {
- if (!ap->providesList().contains(p->name()))
- continue;
-
- // is that already provide by another package?
- if (ap->isInstalled())
- {
- qDebug() << "find a exist provider: " << ap->name();
- return PackageDependsStatus::ok();
- }
-
- // provider is ok, switch to provider.
- if (isConflictSatisfy(architecture, ap).is_ok())
- {
- qDebug() << "switch to depends a new provider: " << ap->name();
- choosed_set << ap->name();
- return PackageDependsStatus::ok();
- }
- }
-
- qDebug() << "providers not found, still break: " << p->name();
- return PackageDependsStatus::_break(p->name());
- }
-
- // now, package dependencies status is available or break,
- // time to check depends' dependencies, but first, we need
- // to add this package to choose list
- choosed_set << p->name();
-
- qDebug() << "Check indirect dependencies for package" << p->name();
-
- const auto r = checkDependsPackageStatus(choosed_set, p->architecture(), p->depends());
- if (r.isBreak())
- {
- choosed_set.remove(p->name());
- qDebug() << "depends break by direct depends" << p->name() << p->architecture() << r.package;
- return PackageDependsStatus::_break(p->name());
- }
-
-// const auto &depends = p->depends();
-// for (auto const &item : depends)
-// {
-// PackageDependsStatus rs = PackageDependsStatus::_break(QString());
-// for (auto const &info : item)
-// {
-// const QString arch = resolvMultiArchAnnotation(info.multiArchAnnotation(), p->architecture(), p->multiArchType());
-
-// const auto r = checkDependsPackageStatus(choosed_set, arch, info);
-// rs.minEq(r);
-// }
-
-// if (rs.isBreak())
-// {
-// // we are break, remove self
-// choosed_set.remove(p->name());
-
-// qDebug() << "depends break by direct depends" << p->name() << p->architecture() << dependencyInfo.packageVersion();
-// return PackageDependsStatus::_break(p->name());
-// }
-// }
-
- qDebug() << "Check finshed for package" << p->name();
-
- return PackageDependsStatus::available();
- }
-}
-
-Package *PackagesManager::packageWithArch(const QString &packageName, const QString &sysArch, const QString &annotation)
-{
- qDebug() << "package with arch" << packageName << sysArch << annotation;
- Backend *b = m_backendFuture.result();
- Package *p = b->package(packageName + resolvMultiArchAnnotation(annotation, sysArch));
-
- do {
- if (!p)
- p = b->package(packageName);
- if (!p)
- break;
-
- const QString arch = resolvMultiArchAnnotation(annotation, sysArch, p->multiArchType());
-// if (!arch.isEmpty())
- // reset to check foreign arch
- p = b->package(packageName + arch);
- } while(false);
-
- if (p)
- return p;
-
- qDebug() << "check virtual package providers for package" << packageName << sysArch << annotation;
- // check virtual package providers
- for (auto *ap : b->availablePackages())
- if (ap->name() != packageName && ap->providesList().contains(packageName))
- return packageWithArch(ap->name(), sysArch, annotation);
-
- return nullptr;
-}
-
-PackageDependsStatus PackageDependsStatus::ok()
-{
- return { DebListModel::DependsOk, QString() };
-}
-
-PackageDependsStatus PackageDependsStatus::available()
-{
- return { DebListModel::DependsAvailable, QString() };
-}
-
-PackageDependsStatus PackageDependsStatus::_break(const QString &package)
-{
- return { DebListModel::DependsBreak, package };
-}
-
-PackageDependsStatus::PackageDependsStatus() :
- PackageDependsStatus(DebListModel::DependsOk, QString())
-{
-
-}
-
-PackageDependsStatus::PackageDependsStatus(const int status, const QString &package) :
- status(status),
- package(package)
-{
-
-}
-
-PackageDependsStatus PackageDependsStatus::operator =(const PackageDependsStatus &other)
-{
- status = other.status;
- package = other.package;
-
- return *this;
-}
-
-PackageDependsStatus PackageDependsStatus::max(const PackageDependsStatus &other)
-{
- if (other.status > status)
- *this = other;
-
- return *this;
-}
-
-PackageDependsStatus PackageDependsStatus::maxEq(const PackageDependsStatus &other)
-{
- if (other.status >= status)
- *this = other;
-
- return *this;
-}
-
-PackageDependsStatus PackageDependsStatus::min(const PackageDependsStatus &other)
-{
- if (other.status < status)
- *this = other;
-
- return *this;
-}
-
-PackageDependsStatus PackageDependsStatus::minEq(const PackageDependsStatus &other)
-{
- if (other.status <= status)
- *this = other;
-
- return *this;
-}
-
-bool PackageDependsStatus::isBreak() const
-{
- return status == DebListModel::DependsBreak;
-}
-
-bool PackageDependsStatus::isAvailable() const
-{
- return status == DebListModel::DependsAvailable;
-}
diff -Nru deepin-deb-installer-5.0.0/packagesmanager.h deepin-deb-installer-5.7.0.17/packagesmanager.h
--- deepin-deb-installer-5.0.0/packagesmanager.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/packagesmanager.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef PACKAGESMANAGER_H
-#define PACKAGESMANAGER_H
-
-#include "result.h"
-
-#include
-#include
-
-#include
-#include
-
-typedef Result ConflictResult;
-
-class PackageDependsStatus
-{
-public:
- static PackageDependsStatus ok();
- static PackageDependsStatus available();
- static PackageDependsStatus _break(const QString &package);
-
- PackageDependsStatus();
- PackageDependsStatus(const int status, const QString &package);
- PackageDependsStatus operator =(const PackageDependsStatus &other);
-
- PackageDependsStatus max(const PackageDependsStatus &other);
- PackageDependsStatus maxEq(const PackageDependsStatus &other);
- PackageDependsStatus min(const PackageDependsStatus &other);
- PackageDependsStatus minEq(const PackageDependsStatus &other);
-
- bool isBreak() const;
- bool isAvailable() const;
-
-public:
- int status;
- QString package;
-};
-
-class DebListModel;
-class PackagesManager : public QObject
-{
- Q_OBJECT
-
- friend class DebListModel;
-
-public:
- explicit PackagesManager(QObject *parent = 0);
-
- bool isBackendReady();
- bool isArchError(const int idx);
- const ConflictResult packageConflictStat(const int index);
- const ConflictResult isConflictSatisfy(const QString &arch, QApt::Package *package);
- const ConflictResult isInstalledConflict(const QString &packageName, const QString &packageVersion, const QString &packageArch);
- const ConflictResult isConflictSatisfy(const QString &arch, const QList &conflicts);
- int packageInstallStatus(const int index);
- PackageDependsStatus packageDependsStatus(const int index);
- const QString packageInstalledVersion(const int index);
- const QStringList packageAvailableDepends(const int index);
- void packageCandidateChoose(QSet &choosed_set, const QString &debArch, const QList &dependsList);
- void packageCandidateChoose(QSet &choosed_set, const QString &debArch, const QApt::DependencyItem &candidateItem);
- const QStringList packageReverseDependsList(const QString &packageName, const QString &sysArch);
-
- void reset();
- void resetPackageDependsStatus(const int index);
- void removePackage(const int index);
- void appendPackage(QApt::DebFile *debPackage);
-
- QApt::DebFile * const package(const int index) const { return m_preparedPackages[index]; }
- QApt::Backend * const backend() const { return m_backendFuture.result(); }
-
-private:
- const PackageDependsStatus checkDependsPackageStatus(QSet &choosed_set,const QString &architecture, const QList &depends);
- const PackageDependsStatus checkDependsPackageStatus(QSet &choosed_set,const QString &architecture, const QApt::DependencyItem &candicate);
- const PackageDependsStatus checkDependsPackageStatus(QSet &choosed_set,const QString &architecture, const QApt::DependencyInfo &dependencyInfo);
- QApt::Package * packageWithArch(const QString &packageName, const QString &sysArch, const QString &annotation = QString());
-
-private:
- QFuture m_backendFuture;
- QList m_preparedPackages;
- QHash m_packageInstallStatus;
- QHash m_packageDependsStatus;
- QSet m_appendedPackagesMd5;
-};
-
-#endif // PACKAGESMANAGER_H
diff -Nru deepin-deb-installer-5.0.0/.project.json deepin-deb-installer-5.7.0.17/.project.json
--- deepin-deb-installer-5.0.0/.project.json 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/.project.json 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,6 @@
+ {
+ "type": "homebrew",
+ "3rdparty": [],
+ "ignore": ["./translations","./debian","./.tx","./assets","*.gitignore","*.doc","*.svg","*.sh","*.zip", "*.qrc", "*.desktop", "*.policy", "COPYING", "LICENSE", ".gitignore"],
+ "license": ["GPLv3"]
+ }
diff -Nru deepin-deb-installer-5.0.0/resources/images/active_tab_close_hover.svg deepin-deb-installer-5.7.0.17/resources/images/active_tab_close_hover.svg
--- deepin-deb-installer-5.0.0/resources/images/active_tab_close_hover.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/active_tab_close_hover.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/active_tab_close_normal.svg deepin-deb-installer-5.7.0.17/resources/images/active_tab_close_normal.svg
--- deepin-deb-installer-5.0.0/resources/images/active_tab_close_normal.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/active_tab_close_normal.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,27 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/active_tab_close_press.svg deepin-deb-installer-5.7.0.17/resources/images/active_tab_close_press.svg
--- deepin-deb-installer-5.0.0/resources/images/active_tab_close_press.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/active_tab_close_press.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/arrow_down.svg deepin-deb-installer-5.7.0.17/resources/images/arrow_down.svg
--- deepin-deb-installer-5.0.0/resources/images/arrow_down.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/arrow_down.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/arrow_up.svg deepin-deb-installer-5.7.0.17/resources/images/arrow_up.svg
--- deepin-deb-installer-5.0.0/resources/images/arrow_up.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/arrow_up.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-128px.svg deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-128px.svg
--- deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-128px.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-128px.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,46 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-16px.svg deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-16px.svg
--- deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-16px.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-16px.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,29 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-24px.svg deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-24px.svg
--- deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-24px.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-24px.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,33 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-256px.svg deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-256px.svg
--- deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-256px.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-256px.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,63 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-32px.svg deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-32px.svg
--- deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-32px.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-32px.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,27 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-48px.svg deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-48px.svg
--- deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-48px.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-48px.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,32 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-64px.svg deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-64px.svg
--- deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-64px.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-64px.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,52 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-96px.svg deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-96px.svg
--- deepin-deb-installer-5.0.0/resources/images/deepin-deb-installer-96px.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/deepin-deb-installer-96px.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,51 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/icon.svg deepin-deb-installer-5.7.0.17/resources/images/icon.svg
--- deepin-deb-installer-5.0.0/resources/images/icon.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/icon.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,96 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/images/split_line_dark.svg deepin-deb-installer-5.7.0.17/resources/images/split_line_dark.svg
--- deepin-deb-installer-5.0.0/resources/images/split_line_dark.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/split_line_dark.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-
diff -Nru deepin-deb-installer-5.0.0/resources/images/split_line.svg deepin-deb-installer-5.7.0.17/resources/images/split_line.svg
--- deepin-deb-installer-5.0.0/resources/images/split_line.svg 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/images/split_line.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-
-
\ No newline at end of file
diff -Nru deepin-deb-installer-5.0.0/resources/resources.qrc deepin-deb-installer-5.7.0.17/resources/resources.qrc
--- deepin-deb-installer-5.0.0/resources/resources.qrc 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/resources.qrc 1970-01-01 00:00:00.000000000 +0000
@@ -1,14 +0,0 @@
-
-
- images/active_tab_close_hover.svg
- images/active_tab_close_normal.svg
- images/active_tab_close_press.svg
- images/arrow_down.svg
- images/arrow_up.svg
- images/icon.svg
- images/split_line.svg
- images/split_line_dark.svg
- theme/dark/dark.qss
- theme/light/light.qss
-
-
diff -Nru deepin-deb-installer-5.0.0/resources/theme/dark/dark.qss deepin-deb-installer-5.7.0.17/resources/theme/dark/dark.qss
--- deepin-deb-installer-5.0.0/resources/theme/dark/dark.qss 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/theme/dark/dark.qss 1970-01-01 00:00:00.000000000 +0000
@@ -1,76 +0,0 @@
-GrayButton {
- color: #dddddd;
- border: 0;
- border-radius: 4px;
- background-color: rgba(255, 255, 255, 0.15);
-}
-
-GrayButton:hover {
- color: white;
- background-color: #919191;
-}
-
-GrayButton:pressed {
- color: #0699ff;
- background-color: #4A4A4A;
-}
-
-#FileChooseWidget #DNDTips {
- color: #6a6a6a;
-}
-
-#FileChooseWidget #SplitLine {
- qproperty-pixmap: url(":/images/split_line_dark.svg");
-}
-
-
-#FileChooseWidget #FileChooseButton {
-}
-
-#SingleInstallPage #InfoControlButton #TipsText {
- color: #6a6a6a;
-}
-
-#SingleInstallPage #WorkerInformation {
- color: #609dc9;
- border: 1px solid rgba(255, 255, 255, 0.05);
- margin: 6px 0 0px 0;
- background-color: rgba(255, 255, 255, 0.02);;
-}
-
-#SingleInstallPage #PackageName {
- color: #929292;
-}
-
-#SingleInstallPage #PackageNameTitle {
- color: #797979;
-}
-
-#SingleInstallPage #PackageVersion {
- color: #929292;
-}
-
-#SingleInstallPage #PackageVersionTitle {
- color: #797979;
-}
-
-#SingleInstallPage #PackageDescription {
- color: #929292;
-}
-
-#MultipleInstallPage #AppsView {
- border: 1px solid rgba(255, 255, 255, 0.05);
- margin: 30px 0 2px 0;
- background-color: rgba(255, 255, 255, 0.02);;
-}
-
-#MultipleInstallPage #InfoArea {
- color: #609dc9;
- border: 1px solid rgba(255, 255, 255, 0.05);
- margin: 2px 0 0 0;
- background-color: rgba(255, 255, 255, 0.02);;
-}
-
-#MultipleInstallPage #InfoControlButton #TipsText {
- color: #6a6a6a;
-}
diff -Nru deepin-deb-installer-5.0.0/resources/theme/light/light.qss deepin-deb-installer-5.7.0.17/resources/theme/light/light.qss
--- deepin-deb-installer-5.0.0/resources/theme/light/light.qss 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/resources/theme/light/light.qss 1970-01-01 00:00:00.000000000 +0000
@@ -1,70 +0,0 @@
-GrayButton {
- color: #303030;
- border: 1px solid rgba(0, 0, 0, .1);
- border-radius: 4px;
-}
-
-GrayButton:hover {
- color: white;
- background-color: qlineargradient(x1:0 y1:0, x2:0 y2:1, stop:0 #8ccfff, stop:1 #4bb8ff);
-}
-
-GrayButton:pressed {
- background-color: qlineargradient(x1:0 y1:0, x2:0 y2:1, stop:0 #0b8cff, stop:1 #0aa1ff);
-}
-
-#FileChooseWidget #DNDTips {
- color: #6a6a6a;
-}
-
-#FileChooseWidget #SplitLine {
- qproperty-pixmap: url(":/images/split_line.svg");
-}
-
-#FileChooseWidget #FileChooseButton {
-}
-
-#SingleInstallPage #InfoControlButton #TipsText {
- color: #6a6a6a;
-}
-
-#SingleInstallPage #WorkerInformation {
- color: #609dc9;
- border: 1px solid #eee;
- margin: 6px 0 0px 0;
-}
-
-#SingleInstallPage #PackageName {
- color: black;
-}
-
-#SingleInstallPage #PackageNameTitle {
- color: #797979;
-}
-
-#SingleInstallPage #PackageVersion {
- color: black;
-}
-
-#SingleInstallPage #PackageVersionTitle {
- color: #797979;
-}
-
-#SingleInstallPage #PackageDescription {
- color: black;
-}
-
-#MultipleInstallPage #AppsView {
- border: 1px solid #eee;
- margin: 30px 0 2px 0;
-}
-
-#MultipleInstallPage #InfoArea {
- color: #609dc9;
- border: 1px solid #eee;
- margin: 2px 0 0 0;
-}
-
-#MultipleInstallPage #InfoControlButton #TipsText {
- color: #6a6a6a;
-}
diff -Nru deepin-deb-installer-5.0.0/result.h deepin-deb-installer-5.7.0.17/result.h
--- deepin-deb-installer-5.0.0/result.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/result.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef RESULT_H
-#define RESULT_H
-
-template
-class Result
-{
-public:
- static Result ok(const T &value);
- static Result err(const T &value);
-
- Result(const bool stat, const T &value);
-
- bool is_ok() const { return m_ok; }
- T unwrap() const { return m_value; }
-
-private:
- bool m_ok;
- T m_value;
-};
-
-template
-Result Result::ok(const T &value)
-{
- return { true, value };
-}
-
-template
-Result Result::err(const T &value)
-{
- return { false, value };
-}
-
-template
-Result::Result(const bool stat, const T &value)
- : m_ok(stat),
- m_value(value)
-{
-
-}
-
-#endif // RESULT_H
diff -Nru deepin-deb-installer-5.0.0/singleinstallpage.cpp deepin-deb-installer-5.7.0.17/singleinstallpage.cpp
--- deepin-deb-installer-5.0.0/singleinstallpage.cpp 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/singleinstallpage.cpp 1970-01-01 00:00:00.000000000 +0000
@@ -1,403 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "singleinstallpage.h"
-#include "deblistmodel.h"
-#include "workerprogress.h"
-#include "widgets/bluebutton.h"
-#include "widgets/graybutton.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-using QApt::DebFile;
-using QApt::Transaction;
-
-DWIDGET_USE_NAMESPACE
-
-const QString holdTextInRect(const QFont &font, QString text, const QSize &size)
-{
- QFontMetrics fm(font);
- QTextLayout layout(text);
-
- layout.setFont(font);
-
- QStringList lines;
- QTextOption &text_option = *const_cast(&layout.textOption());
-
- text_option.setWrapMode(QTextOption::WordWrap);
- text_option.setAlignment(Qt::AlignTop | Qt::AlignLeft);
-
- layout.beginLayout();
-
- QTextLine line = layout.createLine();
- int height = 0;
- int lineHeight = fm.height();
-
- while (line.isValid()) {
- height += lineHeight;
-
- if (height + lineHeight > size.height()) {
- const QString &end_str = fm.elidedText(text.mid(line.textStart()), Qt::ElideRight, size.width());
-
- layout.endLayout();
- layout.setText(end_str);
-
- text_option.setWrapMode(QTextOption::NoWrap);
- layout.beginLayout();
- line = layout.createLine();
- line.setLineWidth(size.width() - 1);
- text = end_str;
- } else {
- line.setLineWidth(size.width());
- }
-
- lines.append(text.mid(line.textStart(), line.textLength()));
-
- if (height + lineHeight > size.height())
- break;
-
- line = layout.createLine();
- }
-
- layout.endLayout();
-
- return lines.join("");
-}
-
-SingleInstallPage::SingleInstallPage(DebListModel *model, QWidget *parent)
- : QWidget(parent),
-
- m_operate(Install),
- m_workerStarted(false),
- m_packagesModel(model),
-
- m_itemInfoWidget(new QWidget),
- m_packageIcon(new QLabel),
- m_packageName(new QLabel),
- m_packageVersion(new QLabel),
- m_packageDescription(new QLabel),
- m_tipsLabel(new QLabel),
- m_progress(new WorkerProgress),
- m_workerInfomation(new QTextEdit),
- m_strengthWidget(new QWidget),
- m_infoControlButton(new InfoControlButton(tr("Display details"), tr("Collapse"))),
- m_installButton(new BlueButton),
- m_uninstallButton(new GrayButton),
- m_reinstallButton(new GrayButton),
- m_confirmButton(new GrayButton),
- m_backButton(new GrayButton),
- m_doneButton(new BlueButton)
-{
- m_packageName->setObjectName("PackageName");
- m_packageVersion->setObjectName("PackageVersion");
- m_infoControlButton->setObjectName("InfoControlButton");
- m_workerInfomation->setObjectName("WorkerInformation");
- m_packageDescription->setObjectName("PackageDescription");
-
- m_packageIcon->setText("icon");
- m_packageIcon->setFixedSize(64, 64);
- m_packageName->setAlignment(Qt::AlignBottom | Qt::AlignLeft);
- m_packageVersion->setAlignment(Qt::AlignTop | Qt::AlignLeft);
- m_tipsLabel->setAlignment(Qt::AlignCenter);
- m_tipsLabel->setStyleSheet("QLabel {"
- "color: #ff5a5a;"
- "}");
-
- m_progress->setVisible(false);
- m_infoControlButton->setVisible(false);
-
- m_workerInfomation->setReadOnly(true);
- m_workerInfomation->setVisible(false);
- m_workerInfomation->setAcceptDrops(false);
- m_workerInfomation->setFixedHeight(210);
- m_workerInfomation->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-
- m_installButton->setText(tr("Install"));
- m_installButton->setVisible(false);
- m_uninstallButton->setText(tr("Remove"));
- m_uninstallButton->setVisible(false);
- m_reinstallButton->setText(tr("Reinstall"));
- m_reinstallButton->setVisible(false);
- m_confirmButton->setText(tr("OK"));
- m_confirmButton->setVisible(false);
- m_backButton->setText(tr("Back"));
- m_backButton->setVisible(false);
- m_doneButton->setText(tr("Done"));
- m_doneButton->setVisible(false);
- m_packageDescription->setWordWrap(true);
- m_packageDescription->setFixedHeight(50);
- m_packageDescription->setFixedWidth(320);
- m_packageDescription->setAlignment(Qt::AlignLeft | Qt::AlignTop);
-
- QLabel *packageName = new QLabel;
- packageName->setText(tr("Name: "));
- packageName->setAlignment(Qt::AlignBottom | Qt::AlignLeft);
- packageName->setObjectName("PackageNameTitle");
-
- QLabel *packageVersion = new QLabel;
- packageVersion->setText(tr("Version: "));
- packageVersion->setAlignment(Qt::AlignTop | Qt::AlignLeft);
- packageVersion->setObjectName("PackageVersionTitle");
-
- QGridLayout *itemInfoLayout = new QGridLayout;
- itemInfoLayout->addWidget(packageName, 0, 0);
- itemInfoLayout->addWidget(m_packageName, 0, 1);
- itemInfoLayout->addWidget(packageVersion, 1, 0);
- itemInfoLayout->addWidget(m_packageVersion, 1, 1);
- itemInfoLayout->setSpacing(0);
- itemInfoLayout->setVerticalSpacing(10);
- itemInfoLayout->setMargin(0);
-
- QHBoxLayout *itemBlockLayout = new QHBoxLayout;
- itemBlockLayout->addStretch();
- itemBlockLayout->addWidget(m_packageIcon);
- itemBlockLayout->addLayout(itemInfoLayout);
- itemBlockLayout->addStretch();
- itemBlockLayout->setSpacing(10);
- itemBlockLayout->setContentsMargins(0, 0, 0, 0);
-
- QHBoxLayout *btnsLayout = new QHBoxLayout;
- btnsLayout->addStretch();
- btnsLayout->addWidget(m_installButton);
- btnsLayout->addWidget(m_uninstallButton);
- btnsLayout->addWidget(m_reinstallButton);
- btnsLayout->addWidget(m_backButton);
- btnsLayout->addWidget(m_confirmButton);
- btnsLayout->addWidget(m_doneButton);
- btnsLayout->addStretch();
- btnsLayout->setSpacing(30);
- btnsLayout->setContentsMargins(0, 0, 0, 0);
-
- QVBoxLayout *itemLayout = new QVBoxLayout;
- itemLayout->addSpacing(45);
- itemLayout->addLayout(itemBlockLayout);
- itemLayout->addSpacing(20);
- itemLayout->addWidget(m_packageDescription);
- itemLayout->addStretch();
- itemLayout->setMargin(0);
- itemLayout->setSpacing(0);
-
- m_itemInfoWidget->setLayout(itemLayout);
- m_itemInfoWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- m_itemInfoWidget->setVisible(false);
-
- m_strengthWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- m_strengthWidget->setVisible(false);
-
- QVBoxLayout *centralLayout = new QVBoxLayout;
- centralLayout->addWidget(m_itemInfoWidget);
- centralLayout->setAlignment(m_itemInfoWidget, Qt::AlignHCenter);
- centralLayout->addWidget(m_infoControlButton);
- centralLayout->setAlignment(m_infoControlButton, Qt::AlignHCenter);
- centralLayout->addWidget(m_workerInfomation);
- centralLayout->addWidget(m_strengthWidget);
- centralLayout->addWidget(m_tipsLabel);
- centralLayout->addWidget(m_progress);
- centralLayout->setAlignment(m_progress, Qt::AlignHCenter);
- centralLayout->addSpacing(8);
- centralLayout->addLayout(btnsLayout);
- centralLayout->setSpacing(0);
- centralLayout->setContentsMargins(20, 0, 20, 30);
-
- setLayout(centralLayout);
-
- connect(m_infoControlButton, &InfoControlButton::expand, this, &SingleInstallPage::showInfomation);
- connect(m_infoControlButton, &InfoControlButton::shrink, this, &SingleInstallPage::hideInfomation);
- connect(m_installButton, &QPushButton::clicked, this, &SingleInstallPage::install);
- connect(m_reinstallButton, &QPushButton::clicked, this, &SingleInstallPage::install);
- connect(m_uninstallButton, &QPushButton::clicked, this, &SingleInstallPage::requestUninstallConfirm);
- connect(m_backButton, &QPushButton::clicked, this, &SingleInstallPage::back);
- connect(m_confirmButton, &QPushButton::clicked, qApp, &QApplication::quit);
- connect(m_doneButton, &QPushButton::clicked, qApp, &QApplication::quit);
-
- connect(model, &DebListModel::appendOutputInfo, this, &SingleInstallPage::onOutputAvailable);
- connect(model, &DebListModel::transactionProgressChanged, this, &SingleInstallPage::onWorkerProgressChanged);
-
- if (m_packagesModel->isReady())
- setPackageInfo();
- else
- QTimer::singleShot(120, this, &SingleInstallPage::setPackageInfo);
-}
-
-void SingleInstallPage::install()
-{
- m_operate = Install;
- m_packagesModel->installAll();
-}
-
-void SingleInstallPage::uninstallCurrentPackage()
-{
- m_operate = Uninstall;
- m_packagesModel->uninstallPackage(0);
-}
-
-void SingleInstallPage::showInfomation()
-{
- m_workerInfomation->setVisible(true);
- m_strengthWidget->setVisible(true);
- m_itemInfoWidget->setVisible(false);
-}
-
-void SingleInstallPage::hideInfomation()
-{
- m_workerInfomation->setVisible(false);
- m_strengthWidget->setVisible(false);
- m_itemInfoWidget->setVisible(true);
-}
-
-void SingleInstallPage::showInfo()
-{
- m_infoControlButton->setVisible(true);
- m_progress->setVisible(true);
- m_progress->setValue(0);
- m_tipsLabel->clear();
-
- m_installButton->setVisible(false);
- m_reinstallButton->setVisible(false);
- m_uninstallButton->setVisible(false);
- m_confirmButton->setVisible(false);
- m_doneButton->setVisible(false);
- m_backButton->setVisible(false);
-}
-
-void SingleInstallPage::onOutputAvailable(const QString &output)
-{
- m_workerInfomation->append(output.trimmed());
-
- // pump progress
- if (m_progress->value() < 90)
- m_progress->setValue(m_progress->value() + 10);
-
- if (!m_workerStarted)
- {
- m_workerStarted = true;
- showInfo();
- }
-}
-
-void SingleInstallPage::onWorkerFinished()
-{
- m_progress->setVisible(false);
- m_uninstallButton->setVisible(false);
- m_reinstallButton->setVisible(false);
- m_backButton->setVisible(true);
-
- const QModelIndex index = m_packagesModel->first();
- const int stat = index.data(DebListModel::PackageOperateStatusRole).toInt();
-
- if (stat == DebListModel::Success)
- {
- m_doneButton->setVisible(true);
- m_doneButton->setFocus();
-
- if (m_operate == Install)
- m_tipsLabel->setText(tr("Installed successfully"));
- else
- m_tipsLabel->setText(tr("Uninstalled successfully"));
- m_tipsLabel->setStyleSheet("QLabel {"
- "color: #47790c;"
- "}");
- } else if (stat == DebListModel::Failed) {
- m_confirmButton->setVisible(true);
- m_confirmButton->setFocus();
-
- if (m_operate == Install)
- m_tipsLabel->setText(index.data(DebListModel::PackageFailReasonRole).toString());
- else
- m_tipsLabel->setText(tr("Uninstall Failed"));
- } else {
- Q_UNREACHABLE();
- }
-}
-
-void SingleInstallPage::onWorkerProgressChanged(const int progress)
-{
- if (progress < m_progress->value())
- return;
-
- m_progress->setValue(progress);
-
- if (progress == m_progress->maximum())
- QTimer::singleShot(100, this, &SingleInstallPage::onWorkerFinished);
-}
-
-void SingleInstallPage::setPackageInfo()
-{
- qApp->processEvents();
-
- DebFile *package = m_packagesModel->preparedPackages().first();
-
- const QIcon icon = QIcon::fromTheme("application-vnd.debian.binary-package", QIcon::fromTheme("debian-swirl"));
- const QPixmap iconPix = icon.pixmap(m_packageIcon->size());
-
- m_itemInfoWidget->setVisible(true);
- m_packageIcon->setPixmap(iconPix);
- m_packageName->setText(package->packageName());
- m_packageVersion->setText(package->version());
-
- // set package description
-// const QRegularExpression multiLine("\n+", QRegularExpression::MultilineOption);
-// const QString description = package->longDescription().replace(multiLine, "\n");
- const QString description = package->longDescription();
- const QSize boundingSize = QSize(m_packageDescription->width(), m_packageDescription->maximumHeight());
- m_packageDescription->setText(holdTextInRect(m_packageDescription->font(), description, boundingSize));
-
- // package install status
- const QModelIndex index = m_packagesModel->index(0);
- const int installStat = index.data(DebListModel::PackageVersionStatusRole).toInt();
-
- const bool installed = installStat != DebListModel::NotInstalled;
- const bool installedSameVersion = installStat == DebListModel::InstalledSameVersion;
- m_installButton->setVisible(!installed);
- m_uninstallButton->setVisible(installed);
- m_reinstallButton->setVisible(installed);
- m_confirmButton->setVisible(false);
- m_doneButton->setVisible(false);
- m_backButton->setVisible(false);
-
- if (installed)
- {
- if (installedSameVersion)
- m_tipsLabel->setText(tr("Same version installed"));
- else
- m_tipsLabel->setText(tr("Other version installed: %1").arg(index.data(DebListModel::PackageInstalledVersionRole).toString()));
- return;
- }
-
- // package depends status
- const int dependsStat = index.data(DebListModel::PackageDependsStatusRole).toInt();
- if (dependsStat == DebListModel::DependsBreak)
- {
- m_tipsLabel->setText(index.data(DebListModel::PackageFailReasonRole).toString());
- m_installButton->setVisible(false);
- m_reinstallButton->setVisible(false);
- m_confirmButton->setVisible(true);
- m_backButton->setVisible(true);
- }
-}
diff -Nru deepin-deb-installer-5.0.0/singleinstallpage.h deepin-deb-installer-5.7.0.17/singleinstallpage.h
--- deepin-deb-installer-5.0.0/singleinstallpage.h 2019-07-05 09:38:51.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/singleinstallpage.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
- *
- * Author: sbw
- *
- * Maintainer: sbw
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef SINGLEINSTALLPAGE_H
-#define SINGLEINSTALLPAGE_H
-
-#include "infocontrolbutton.h"
-
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-#include
-
-class DebListModel;
-class SingleInstallPage : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit SingleInstallPage(DebListModel *model, QWidget *parent = 0);
-
-signals:
- void back() const;
- void requestUninstallConfirm() const;
-
-public slots:
- void uninstallCurrentPackage();
-
-private:
- enum Operate
- {
- Install,
- Uninstall,
- };
-
-private:
- void setPackageInfo();
-
-private slots:
- void install();
-
- void showInfomation();
- void hideInfomation();
-
- void showInfo();
- void onOutputAvailable(const QString &output);
- void onWorkerFinished();
- void onWorkerProgressChanged(const int progress);
-
-private:
- int m_operate;
- bool m_workerStarted;
- DebListModel *m_packagesModel;
- QWidget *m_itemInfoWidget;
- QLabel *m_packageIcon;
- QLabel *m_packageName;
- QLabel *m_packageVersion;
- QLabel *m_packageDescription;
- QLabel *m_tipsLabel;
- QProgressBar *m_progress;
- QTextEdit *m_workerInfomation;
- QWidget *m_strengthWidget;
- InfoControlButton *m_infoControlButton;
- QPushButton *m_installButton;
- QPushButton *m_uninstallButton;
- QPushButton *m_reinstallButton;
- QPushButton *m_confirmButton;
- QPushButton *m_backButton;
- QPushButton *m_doneButton;
-};
-
-#endif // SINGLEINSTALLPAGE_H
diff -Nru deepin-deb-installer-5.0.0/src/AptInstallDepend/CMakeLists.txt deepin-deb-installer-5.7.0.17/src/AptInstallDepend/CMakeLists.txt
--- deepin-deb-installer-5.0.0/src/AptInstallDepend/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/src/AptInstallDepend/CMakeLists.txt 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.13)
+
+if (NOT DEFINED VERSION)
+ set(VERSION 5.3.9)
+endif ()
+
+project(AptInstallDepend)
+set (EXE_NAME deepin-deb-installer-dependsInstall)
+set(LINK_LIBS
+ Qt5::Core
+)
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+
+file(GLOB_RECURSE AUTH_CPP_FILES ${CMAKE_CURRENT_LIST_DIR}/*.cpp)
+add_executable (${EXE_NAME}
+ ${AUTH_CPP_FILES}
+)
+
+# Find the library
+find_package(Qt5Core REQUIRED)
+set(CMAKE_INSTALL_PREFIX /usr)
+# Install files
+install(TARGETS ${EXE_NAME} DESTINATION bin)
+target_link_libraries(${EXE_NAME} ${LINK_LIBS} )
diff -Nru deepin-deb-installer-5.0.0/src/AptInstallDepend/installDebThread.cpp deepin-deb-installer-5.7.0.17/src/AptInstallDepend/installDebThread.cpp
--- deepin-deb-installer-5.0.0/src/AptInstallDepend/installDebThread.cpp 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/src/AptInstallDepend/installDebThread.cpp 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,132 @@
+/*
+* Copyright (C) 2019 ~ 2020 Deepin Technology Co., Ltd.
+*
+* Author: liupeng
+* Maintainer: liupeng
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*/
+#include "installDebThread.h"
+#include
+
+InstallDebThread::InstallDebThread()
+{
+ m_proc = new QProcess;
+ connect(m_proc, SIGNAL(finished(int)), this, SLOT(onFinished(int)));
+ connect(m_proc, SIGNAL(readyReadStandardOutput()), this, SLOT(on_readoutput()));
+}
+
+InstallDebThread::~InstallDebThread()
+{
+ if (m_proc != nullptr) {
+ delete m_proc;
+ m_proc = nullptr;
+ }
+}
+
+void InstallDebThread::setParam(QStringList tParam)
+{
+ m_listParam = tParam;
+}
+
+void InstallDebThread::getDescription()
+{
+ QString str = "sudo dpkg -e " + m_listParam[1] + " " + TEMPLATE_DIR;
+ system(str.toUtf8());
+
+ QFile file;
+ file.setFileName(TEMPLATE_PATH);
+ if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QString tmpData;
+ while (!file.atEnd()) {
+ tmpData = file.readLine().data();
+ if (tmpData.size() > 13) {
+ if (tmpData.contains("Description: ")) {
+ QString str = tmpData.mid(13, tmpData.size() - 13);
+ str.remove(QChar('\n'), Qt::CaseInsensitive);
+ m_listDescribeData << str;
+ }
+ }
+ }
+
+ file.close();
+ }
+}
+
+void InstallDebThread::on_readoutput()
+{
+ QString tmp = m_proc->readAllStandardOutput().data();
+ qDebug() << tmp;
+
+ foreach (QString str, m_listDescribeData) {
+ if (tmp.contains(str)) {
+ char c_input[20];
+ while (fgets(c_input, 10, stdin)) {
+ QString str = c_input;
+ str.remove(QChar('\\'), Qt::CaseInsensitive);
+ str.remove(QChar('"'), Qt::CaseInsensitive);
+
+ m_proc->write(str.toLatin1().data());
+
+ m_proc->waitForFinished(1500);
+
+ break;
+ }
+ }
+ }
+}
+
+void InstallDebThread::onFinished(int num)
+{
+ m_resultFlag = num;
+}
+
+void InstallDebThread::run()
+{
+ if (m_listParam.size() > 0) {
+ if (m_listParam[0] == "InstallDeepinWine") {
+ qDebug() << "StartInstallDeepinwine";
+ QStringList depends;
+
+ for (int i = 1; i < m_listParam.size(); i++) {
+ depends << m_listParam[i];
+ }
+
+ system("echo 'libc6 libraries/restart-without-asking boolean true' | sudo debconf-set-selections\n");
+ m_proc->start("sudo", QStringList() << "apt-get"
+ << "install"
+ << depends
+ << "deepin-wine-helper"
+ << "--fix-missing"
+ << "-y");
+ m_proc->waitForFinished(-1);
+ m_proc->close();
+ } else if (m_listParam[0] == "InstallConfig") {
+ if (m_listParam.size() <= 1)
+ return;
+
+ qDebug() << "StartInstallAptConfig";
+
+ getDescription();
+
+ //m_proc->start("sudo", QStringList() << "-S" << "dpkg-preconfigure" << "-f" << "Teletype" << m_listParam[1]);
+ m_proc->start("sudo", QStringList() << "-S" << "dpkg" << "-i" << m_listParam[1]);
+ m_proc->waitForFinished(-1);
+
+ QDir filePath(TEMPLATE_DIR);
+ if (filePath.exists()) {
+ filePath.removeRecursively();
+ }
+
+ m_proc->close();
+ }
+ }
+}
diff -Nru deepin-deb-installer-5.0.0/src/AptInstallDepend/installDebThread.h deepin-deb-installer-5.7.0.17/src/AptInstallDepend/installDebThread.h
--- deepin-deb-installer-5.0.0/src/AptInstallDepend/installDebThread.h 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/src/AptInstallDepend/installDebThread.h 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,49 @@
+/*
+* Copyright (C) 2019 ~ 2020 Deepin Technology Co., Ltd.
+*
+* Author: liupeng
+* Maintainer: liupeng
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*/
+#ifndef INSTALLDEBTHREAD_H
+#define INSTALLDEBTHREAD_H
+
+//#include
+#include
+#include
+#include
+#include
+
+#define TEMPLATE_DIR "/tmp/DEBIAN_TMP"
+#define TEMPLATE_PATH "/tmp/DEBIAN_TMP/templates"
+
+class InstallDebThread : public QThread
+{
+ Q_OBJECT
+public:
+ InstallDebThread();
+ virtual ~InstallDebThread();
+ void setParam(QStringList tParam);
+ void getDescription();
+ void run();
+ int m_resultFlag = -1;
+
+public slots:
+ void onFinished(int);
+ void on_readoutput();
+
+private:
+ QProcess *m_proc;
+ QStringList m_listParam;
+ QList m_listDescribeData;
+};
+#endif // INSTALLDEBTHREAD_H
diff -Nru deepin-deb-installer-5.0.0/src/AptInstallDepend/main.cpp deepin-deb-installer-5.7.0.17/src/AptInstallDepend/main.cpp
--- deepin-deb-installer-5.0.0/src/AptInstallDepend/main.cpp 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/src/AptInstallDepend/main.cpp 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,25 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "installDebThread.h"
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+
+ QCommandLineParser parser;
+ parser.process(app);
+ const QStringList tParamList = parser.positionalArguments();
+
+ InstallDebThread *mThread = new InstallDebThread;
+ mThread->setParam(tParamList);
+ mThread->run();
+ mThread->wait();
+ return mThread->m_resultFlag;
+}
diff -Nru deepin-deb-installer-5.0.0/src/deb_installer/CMakeLists.txt deepin-deb-installer-5.7.0.17/src/deb_installer/CMakeLists.txt
--- deepin-deb-installer-5.0.0/src/deb_installer/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/src/deb_installer/CMakeLists.txt 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,152 @@
+# Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd.
+#
+# Author: cuizhen
+#
+# Maintainer: cuizhen
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+cmake_minimum_required(VERSION 3.7)
+if (NOT DEFINED VERSION)
+ message(WARNING "Not defined version ,about dialog version set 5.3.9")
+ set(VERSION 5.3.9)
+endif ()
+
+#common resource names
+set(APP_RES_DIR "${CMAKE_SOURCE_DIR}/assets")
+set(APP_BIN_NAME "deepin-deb-installer")
+set(APP_TRANS_SCRIPT "${APP_RES_DIR}/translate_generation.sh")
+set(APP_DESKTOP "${APP_RES_DIR}/deepin-deb-installer.desktop")
+set(APP_QRC "${APP_RES_DIR}/resources.qrc")
+
+project(${APP_BIN_NAME})
+
+set(CMAKE_VERBOSE_MAKEFILE ON)
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+set(CMAKE_CXX_FLAGS "-Wl,--as-need -fPIE")
+set(CMAKE_EXE_LINKER_FLAGS "-pie")
+
+if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "sw_64")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mieee")
+endif ()
+
+#compile flags
+if (CMAKE_BUILD_TYPE MATCHES Debug)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra")
+
+ # Enable Qt builtin debug mode
+ add_definitions("-DQT_MESSAGELOGCONTEXT")
+else()
+ # -Wl, -O2 Enable linker optimizations
+ # -Wl, --gc-sections Remove unused code resulting from -fdsta-sections and
+ # -ffunction-sections
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2 -Wl,-O1 -Wl,--gc-sections")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -Wl,-O1 -Wl,--gc-sections")
+endif()
+
+#Generate the qm file
+execute_process(COMMAND bash ${APP_TRANS_SCRIPT}
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/")
+
+configure_file(${APP_RES_DIR}/environments.h.in environments.h @ONLY)
+
+add_definitions(-DUSE_POLKIT -DENABLE_INACTIVE_DISPLAY)
+# Find the library
+
+find_package(PkgConfig REQUIRED)
+find_package(Qt5Widgets REQUIRED)
+find_package(Qt5Gui REQUIRED)
+find_package(Qt5Core REQUIRED)
+find_package(Qt5LinguistTools REQUIRED)
+find_package(Qt5Concurrent REQUIRED)
+find_package(DtkWidget REQUIRED)
+find_package(DtkGui REQUIRED)
+find_package(DtkCore REQUIRED)
+find_package(Qt5DBus REQUIRED)
+set(LINK_LIBS
+ Qt5::Core
+ Qt5::Widgets
+ Qt5::Gui
+ Qt5::DBus
+ QApt
+ Qt5::Concurrent
+ ${DtkWidget_LIBRARIES}
+ ${DtkCore_LIBRARIES}
+ ${DtkGUI_LIBRARIES}
+)
+
+macro(SUBDIRLIST result curdir)
+ file(GLOB children RELATIVE ${curdir} ${curdir}/*)
+ set(dirlist "")
+ foreach(child ${children})
+ if(IS_DIRECTORY ${curdir}/${child})
+ LIST(APPEND dirlist ${child})
+ endif()
+ endforeach()
+ set(${result} ${dirlist})
+endmacro()
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+SUBDIRLIST(all_src ${CMAKE_CURRENT_SOURCE_DIR})
+
+#Include all app own subdirectorys
+foreach(subdir ${all_src})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}${subdir})
+endforeach()
+
+file(GLOB_RECURSE APP_SRCS
+ ${CMAKE_CURRENT_LIST_DIR}/*.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/manager/*.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/model/*.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/utils/*.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/view/pages/*.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/view/widgets/*.cpp
+ )
+
+include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
+
+# Tell CMake to create the executable
+add_executable(${PROJECT_NAME} ${APP_SRCS} ${APP_QRC})
+
+target_include_directories(${APP_BIN_NAME}
+ PUBLIC ${DtkWidget_INCLUDE_DIRS} ${OBJECT_BINARY_DIR})
+
+target_link_libraries(${APP_BIN_NAME}
+ Qt5::Core
+ Qt5::Widgets
+ Qt5::Gui
+ Qt5::DBus
+ QApt
+ Qt5::Concurrent
+ ${DtkWidget_LIBRARIES}
+ ${DtkCore_LIBRARIES}
+ ${DtkGUI_LIBRARIES}
+)
+set(CMAKE_INSTALL_PREFIX /usr)
+
+# Install files
+install(TARGETS deepin-deb-installer DESTINATION bin)
+
+file(GLOB APP_QM_FILES "${CMAKE_SOURCE_DIR}/translations/*.qm")
+install(FILES ${APP_QM_FILES} DESTINATION share/deepin-deb-installer/translations)
+install(FILES ${APP_DESKTOP} DESTINATION share/applications)
+install(FILES ${APP_CONFIG} DESTINATION share/deepin-deb-installer)
+install(FILES ${CMAKE_SOURCE_DIR}/assets/com.deepin.pkexec.aptInstallDepend.policy
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions)
diff -Nru deepin-deb-installer-5.0.0/src/deb_installer/main.cpp deepin-deb-installer-5.7.0.17/src/deb_installer/main.cpp
--- deepin-deb-installer-5.0.0/src/deb_installer/main.cpp 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/src/deb_installer/main.cpp 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
+ *
+ * Author: sbw
+ *
+ * Maintainer: sbw
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include "model/deblistmodel.h"
+#include "utils/accessible.h"
+#include "utils/utils.h"
+#include "singleInstallerApplication.h"
+#include "environments.h"
+#include "utils/DebugTimeManager.h"
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+DWIDGET_USE_NAMESPACE
+#ifdef DUTIL_USE_NAMESPACE
+DUTIL_USE_NAMESPACE
+#else
+DCORE_USE_NAMESPACE
+#endif
+
+#define RECENT_PATH QDir::homePath() + "/.local/share/recently-used.xbel"
+
+#define DAPPLICATION_XSTRING(s) DAPPLICATION_STRING(s)
+#define DAPPLICATION_STRING(s) #s
+
+int main(int argc, char *argv[])
+{
+ PERF_PRINT_BEGIN("POINT-01", ""); //打开应用,添加记录点
+ SingleInstallerApplication app(argc, argv);
+
+ app.setOrganizationName("deepin");
+ app.setApplicationName("deepin-deb-installer");
+ app.setApplicationVersion(VERSION); //qmake 转cmake 解决版本不对的问题
+ app.setApplicationAcknowledgementPage("https://www.deepin.org/acknowledgments/deepin-package-manager/");
+ app.setProductIcon(QIcon::fromTheme("deepin-deb-installer"));
+ app.setAttribute(Qt::AA_UseHighDpiPixmaps);
+ app.loadTranslator();
+ app.setProductName(QApplication::translate("main", "Package Installer"));
+ app.setApplicationDisplayName(QApplication::translate("main", "Package Installer"));
+ app.setApplicationDescription(QApplication::translate(
+ "main",
+ "Package Installer helps users install and remove local packages, and supports bulk installation."));
+
+ qputenv("DTK_USE_SEMAPHORE_SINGLEINSTANCE", "1");
+
+ DApplicationSettings settings;
+
+ DLogManager::registerConsoleAppender();
+ DLogManager::registerFileAppender();
+
+ QAccessible::installFactory(accessibleFactory);//自动化测试
+
+ qDebug() << qApp->applicationName() << "started, version = " << qApp->applicationVersion();
+
+ QDBusConnection dbus = QDBusConnection::sessionBus();
+ if (dbus.registerService("com.deepin.DebInstaller")) {
+ dbus.registerObject("/com/deepin/DebInstaller", &app, QDBusConnection::ExportScriptableSlots);
+ app.parseCmdLine();
+ app.activateWindow();
+ PERF_PRINT_END("POINT-01"); //打开应用, 添加记录点
+ return app.exec();
+ } else {
+ QCommandLineParser parser;
+ parser.process(app);
+ QList debInstallPathList;
+ debInstallPathList << parser.positionalArguments();
+ QDBusInterface notification("com.deepin.DebInstaller", "/com/deepin/DebInstaller", "com.deepin.DebInstaller", QDBusConnection::sessionBus());
+ QDBusMessage msg = notification.callWithArgumentList(QDBus::AutoDetect, "InstallerDeb", debInstallPathList);
+ PERF_PRINT_END("POINT-01"); //打开应用, 添加记录点
+ return 0;
+ }
+}
diff -Nru deepin-deb-installer-5.0.0/src/deb_installer/manager/DealDependThread.cpp deepin-deb-installer-5.7.0.17/src/deb_installer/manager/DealDependThread.cpp
--- deepin-deb-installer-5.0.0/src/deb_installer/manager/DealDependThread.cpp 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/src/deb_installer/manager/DealDependThread.cpp 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,95 @@
+/*
+* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd
+*
+* Author: cuizhen
+* Maintainer: cuizhen
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*/
+#include "DealDependThread.h"
+#include "model/deblistmodel.h"
+
+DealDependThread::DealDependThread(QObject *parent)
+{
+ Q_UNUSED(parent);
+ proc = new QProcess(this);
+ connect(proc, static_cast(&QProcess::finished), this, &DealDependThread::onFinished);
+ connect(proc, &QProcess::readyReadStandardOutput, this, &DealDependThread::on_readoutput);
+}
+
+DealDependThread::~DealDependThread()
+{
+ delete proc;
+}
+
+void DealDependThread::setDependsList(QStringList dependList, int index)
+{
+ m_index = index;
+ m_dependsList = dependList;
+}
+
+void DealDependThread::setBrokenDepend(QString dependName)
+{
+ m_brokenDepend = dependName;
+}
+void DealDependThread::on_readoutput()
+{
+ QString tmp = proc->readAllStandardOutput().data();
+ qDebug() << "安装依赖输出数据:" << tmp;
+
+ if (tmp.contains("StartInstallDeepinwine")) {
+ emit DependResult(DebListModel::AuthConfirm, m_index, m_brokenDepend);
+ return;
+ }
+
+ if (tmp.contains("Not authorized")) {
+ bDependsStatusErr = true;
+ emit DependResult(DebListModel::CancelAuth, m_index, m_brokenDepend);
+ }
+}
+
+void DealDependThread::onFinished(int num = -1)
+{
+ if (bDependsStatusErr) {
+ bDependsStatusErr = false;
+ return;
+ }
+
+ if (num == 0) {
+ if (bDependsStatusErr) {
+ emit DependResult(DebListModel::AnalysisErr, m_index, m_brokenDepend);
+ bDependsStatusErr = false;
+ return;
+ }
+ qDebug() << m_dependsList << "安装成功";
+ emit DependResult(DebListModel::AuthDependsSuccess, m_index, m_brokenDepend);
+ } else {
+ if (bDependsStatusErr) {
+ emit DependResult(DebListModel::AnalysisErr, m_index, m_brokenDepend);
+ bDependsStatusErr = false;
+ return;
+ }
+ qDebug() << m_dependsList << "install error" << num;
+ emit DependResult(DebListModel::AuthDependsErr, m_index, m_brokenDepend);
+ }
+ emit enableCloseButton(true);
+}
+
+void DealDependThread::run()
+{
+ proc->setProcessChannelMode(QProcess::MergedChannels);
+ msleep(100);
+
+ emit DependResult(DebListModel::AuthBefore, m_index, m_brokenDepend);
+ qDebug() << "run m_dependList" << m_dependsList;
+ proc->start("pkexec", QStringList() << "deepin-deb-installer-dependsInstall" << "InstallDeepinWine" << m_dependsList);
+ emit enableCloseButton(false);
+}
diff -Nru deepin-deb-installer-5.0.0/src/deb_installer/manager/DealDependThread.h deepin-deb-installer-5.7.0.17/src/deb_installer/manager/DealDependThread.h
--- deepin-deb-installer-5.0.0/src/deb_installer/manager/DealDependThread.h 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/src/deb_installer/manager/DealDependThread.h 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,48 @@
+/*
+* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd
+*
+* Author: cuizhen
+* Maintainer: cuizhen
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* any later version.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*/
+#ifndef DEALDEPENDTHREAD_H
+#define DEALDEPENDTHREAD_H
+
+#include
+#include
+#include
+
+class DealDependThread : public QThread
+{
+ Q_OBJECT
+public:
+ DealDependThread(QObject *parent = nullptr);
+ virtual ~DealDependThread();
+ void setDependsList(QStringList dependList, int index);
+ void setBrokenDepend(QString dependName);
+ void run();
+signals:
+ void DependResult(int, int, QString);
+ void enableCloseButton(bool);
+
+public slots:
+ void onFinished(int);
+ void on_readoutput();
+private:
+ QProcess *proc;
+ int m_index = -1;
+ QStringList m_dependsList;
+ bool bDependsStatusErr = false;
+ QString m_brokenDepend;
+};
+
+#endif // DEALDEPENDTHREAD_H
diff -Nru deepin-deb-installer-5.0.0/src/deb_installer/manager/PackageDependsStatus.cpp deepin-deb-installer-5.7.0.17/src/deb_installer/manager/PackageDependsStatus.cpp
--- deepin-deb-installer-5.0.0/src/deb_installer/manager/PackageDependsStatus.cpp 1970-01-01 00:00:00.000000000 +0000
+++ deepin-deb-installer-5.7.0.17/src/deb_installer/manager/PackageDependsStatus.cpp 2020-12-03 11:59:49.000000000 +0000
@@ -0,0 +1,80 @@
+/*
+* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd
+*
+* Author: cuizhen