diff --git a/README.md b/README.md index c7ef95eb125456c1f40d71295b688a6ac8f885cc..60facca84baf9bcd7440f18d7f1980081724aa5c 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,53 @@ -# 星火应用商店 +# Spark App Store [![star](https://gitee.com/deepin-community-store/spark-store/badge/star.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/stargazers) [![fork](https://gitee.com/deepin-community-store/spark-store/badge/fork.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/members) -众所周知,国内的Linux应用比较少,wine应用难以获取,优质工具分散在民间各大论坛,无法形成合力,难以改善生态 +Spark Store aims to collect Linux apps for the convieniece of Linux new comers -生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势 +The collecting process needs everyone's help -我们创建了这个应用商店,广泛收录大家需要的软件包,搜集优质小工具,主动适配wine应用,存放到储存库供大家获取 -我们支持:Deepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(将会逐渐停止支持) ; UOS Home 21 +We set up this APP Store and collect APPs/tools that everyone need widely. Also we pack Windows apps with wine. -## 关于协作:分支相关的文档见 [这里](https://deepin-community-store.gitee.io/spark-wiki/#/Dev/Spark-Store-Git-Repo) +All packages will be shared in our repository for users to get freely. -*关于OpenKylin和deepin 23* +Distrobution supported:Deepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(May stop support in the future) ; UniontechOS Home 21 -支持计划将会在对应系统发布正式版之后开始评估和执行 +*About OpenKylin and deepin 23* -希望看到这里的人也可以加入我们的队伍,开发或者投递应用都很欢迎,共同构建Linux应用生态 +The adaptation work is scheduled after their official release. -在这里追踪我们的Issue处理情况 https://gitee.com/deepin-community-store/spark-store/board +You can track our Issue resoving progress here https://gitee.com/deepin-community-store/spark-store/board -如果有想要提交的软件包,请 [在这里投稿](https://upload.deepinos.org/index) +We hope people who see here can also join our team,development help or submit applications are welcomed -## 🙌 简单的开始 +If you want to submit an APP to share with others,Please [Click here](https://upload.deepinos.org/index) -如果想安装 `星火应用商店` ,请打开右侧的 [Release] 页面,找到最新版本,并选择适用于当前系统的安装包下载。 -如果你在使用 `Debian 11/Ubuntu 20.04`,你需要额外下载[依赖补充包](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip) +## 🙌 A simple start + +If you simply want to install the Spark Store,just enter the [Release] page, find the version you want and install. + +If you are using Debian11/Ubuntu 20.04, you will need extra dependency package. Available [here](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip) --- -#### 编译安装 +#### Compile and developement -Deepin V20/UOS 21 系统下, 安装依赖 +For Deepin V20/UOS 21/ Debian 11 ```shell -sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev fakeroot qtwayland5 qtwayland5-dev-tools +sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev fakeroot qtwayland5 qtwayland5-dev-tools dde-qt5wayland-plugin ``` -Ubuntu 22.04 系统下, 安装依赖 +Ubuntu 22.04 ```shell -sudo apt install git qtbase5-dev debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev qtwayland5 qtwayland5-dev-tools +sudo apt install git qtbase5-dev debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev qtwayland5 qtwayland5-dev-tools ``` -然后 +Then + ```shell git clone https://gitee.com/deepin-community-store/spark-store.git cd spark-store @@ -53,16 +56,18 @@ dpkg-buildpackage -## 🚀 协作 +## 🚀 Coorperation + +We use Gitee as our code hosting platform. Please click here to contact us. -非常感谢有兴趣的开发者或爱好者参与 `星火应用商店` 项目,分享你的见解与思路。 +https://gitee.com/deepin-community-store/spark-store -### 交流平台 +### Rocket Chat https://chat.shenmo.tech/ -客户端PWA: +PWA Client: spk://store/chat/store.spark-app.feedback -(安装星火商店后在浏览器打开或复制到搜索栏打开) \ No newline at end of file +(Copy and paste to search bar or in browser address bar after installing Spark Store) \ No newline at end of file diff --git a/README.en.md b/README.zh.md similarity index 33% rename from README.en.md rename to README.zh.md index f08b8c1d718db40c06f30eae8754be69441456a8..b9022b3bca8bb8c02d34fcbe93e19c6eec5ad668 100644 --- a/README.en.md +++ b/README.zh.md @@ -1,53 +1,50 @@ -# Spark App Store +# 星火应用商店 [![star](https://gitee.com/deepin-community-store/spark-store/badge/star.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/stargazers) [![fork](https://gitee.com/deepin-community-store/spark-store/badge/fork.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/members) -Spark Store aims to collect Linux apps for the convieniece of Linux new comers +众所周知,国内的Linux应用比较少,wine应用难以获取,优质工具分散在民间各大论坛,无法形成合力,难以改善生态 -The collecting process needs everyone's help +生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势 -We set up this APP Store and collect APPs/tools that everyone need widely. Also we pack Windows apps with wine. +我们创建了这个应用商店,广泛收录大家需要的软件包,搜集优质小工具,主动适配wine应用,存放到储存库供大家获取 +我们支持:Deepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(将会逐渐停止支持) ; UOS Home 21 -All packages will be shared in our repository for users to get freely. +## 关于协作:分支相关的文档见 [这里](https://deepin-community-store.gitee.io/spark-wiki/#/Dev/Spark-Store-Git-Repo) -Distrobution supported:Deepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(May stop support in the future) ; UniontechOS Home 21 +*关于OpenKylin和deepin 23* -*About OpenKylin and deepin 23* +支持计划将会在对应系统发布正式版之后开始评估和执行 -The adaptation work is scheduled after their official release. +希望看到这里的人也可以加入我们的队伍,开发或者投递应用都很欢迎,共同构建Linux应用生态 -You can track our Issue resoving progress here https://gitee.com/deepin-community-store/spark-store/board +在这里追踪我们的Issue处理情况 https://gitee.com/deepin-community-store/spark-store/board +如果有想要提交的软件包,请 [在这里投稿](https://upload.deepinos.org/index) -We hope people who see here can also join our team,development help or submit applications are welcomed -If you want to submit an APP to share with others,Please [Click here](https://upload.deepinos.org/index) +## 🙌 简单的开始 +如果想安装 `星火应用商店` ,请打开右侧的 [Release] 页面,找到最新版本,并选择适用于当前系统的安装包下载。 -## 🙌 A simple start - -If you simply want to install the Spark Store,just enter the [Release] page, find the version you want and install. - -If you are using Debian11/Ubuntu 20.04, you will need extra dependency package. Available [here](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip) +如果你在使用 `Debian 11/Ubuntu 20.04`,你需要额外下载[依赖补充包](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip) --- -#### Compile and developement +#### 编译安装 -For Deepin V20/UOS 21/ Debian 11 +Deepin V20/UOS 21 系统下, 安装依赖 ```shell -sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev fakeroot qtwayland5 qtwayland5-dev-tools +sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev fakeroot qtwayland5 qtwayland5-dev-tools dde-qt5wayland-plugin ``` -Ubuntu 22.04 +Ubuntu 22.04 系统下, 安装依赖 ```shell -sudo apt install git qtbase5-dev debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev qtwayland5 qtwayland5-dev-tools +sudo apt install git qtbase5-dev debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev qtwayland5 qtwayland5-dev-tools ``` -Then - +然后 ```shell git clone https://gitee.com/deepin-community-store/spark-store.git cd spark-store @@ -56,18 +53,16 @@ dpkg-buildpackage -## 🚀 Coorperation - -We use Gitee as our code hosting platform. Please click here to contact us. +## 🚀 协作 -https://gitee.com/deepin-community-store/spark-store +非常感谢有兴趣的开发者或爱好者参与 `星火应用商店` 项目,分享你的见解与思路。 -### Rocket Chat +### 交流平台 https://chat.shenmo.tech/ -PWA Client: +客户端PWA: spk://store/chat/store.spark-app.feedback -(Copy and paste to search bar or in browser address bar after installing Spark Store) \ No newline at end of file +(安装星火商店后在浏览器打开或复制到搜索栏打开) \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 6a5a7054882dd09edd83a641aa33d92a2f98b02c..fe510625e31ccb250a17d728b55f291fbe082c3b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,67 +1,86 @@ +spark-store (4.1.2) stable; urgency=medium + + * feat: 初步的wayland支持 + * fix: 首页的捐赠页面在中文环境下显示中文 + * chore: 新增编译依赖,测试安装时不会出现报错 + * fix: 更新检测模块在aptss ssupdate操作失败后现在会正确地移除锁而不是错误的残留锁。 + +-- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + + spark-store (4.1.1) stable; urgency=medium * fix:更新失效 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.1.0) stable; urgency=medium * feat: 现在可以支持UOS签名包问题了 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.0.1) stable; urgency=medium * feat: 提升Ubuntu下的显示效果 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.0.0) stable; urgency=medium * feat: 修复了成吨的bug后开始正式版 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.0.0~test2) stable; urgency=medium * feat: 修复了成吨的bug后开始公测 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.0.0~test1) stable; urgency=medium * feat: 柚子过来补充一下啦 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.4~test1) stable; urgency=medium * feat: aptss不再尝试安装apt-fast,转而自带 * chore: 删除password-check模块 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3.3) stable; urgency=medium * feat: 首页链接调用浏览器打开 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 -0spark-store (3.3.3~test5) stable; urgency=medium + +spark-store (3.3.3~test5) stable; urgency=medium * 修复可能的内存泄漏问题 * 修复应用搜索为空但仍显示上一次搜索结果的问题 * 修复动画加载延后的问题 * 修复统计下载量卡主渲染线程的问题 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.3.3~test4) stable; urgency=medium * Enable i386 arch support by default --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3.3~test3) stable; urgency=medium @@ -74,7 +93,8 @@ spark-store (3.3.3~test2) stable; urgency=medium * bug fix: 更新和检查更新出错时不报错.此更新需要一个推送 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3.3~test1) stable; urgency=medium @@ -82,84 +102,89 @@ spark-store (3.3.3~test1) stable; urgency=medium * 图形环境中所有root权限的组件剥离到cli(可用于deepin 23 daily,只保证商店本体正常运作,不处理安装依赖不满足) * 文案更改:更新检查-->检查更新 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3.1~test1) stable; urgency=medium * 安装时不再需要联网 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3.0.4) stable; urgency=medium * 为减轻服务器压力,不再单独更新某一个应用,而是作为整体更新 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.3.0.3) stable; urgency=medium * 回滚 更新中行为到进度条而不是实时输出 * 更新应用时显示正在更新哪个应用 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.3.0.2) stable; urgency=medium * 修复 pkexec未执行 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.3.0.1) stable; urgency=medium * 修复 检查更新的更新进程未实际运行 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.3) stable; urgency=medium * 修复 检查更新 未刷新软件源 * 把检查更新单独拿出作为左列 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3~test3) stable; urgency=medium * 把检查更新加入免密码 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3~test2) stable; urgency=medium * 更新检测功能全部更改到zenity --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3~test1) stable; urgency=medium * zenity,选择可更新应用 * 自动更新检测现在会跳过hold --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.2.4) stable; urgency=medium * 修改tag相关的文案内容:wine相关环境已可自动配置了 * 准备发版 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.2.4~test4) stable; urgency=medium * 现在在商店启动后点击spk链接仍会正常启动 https://gitee.com/deepin-community-store/spark-store/commit/dd6780d636042bf12d77414e6f1552cc7d1ed24c - - + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.2.4~test3) stable; urgency=medium @@ -167,47 +192,47 @@ spark-store (3.2.4~test3) stable; urgency=medium * 翻译完毕 * 合入先前的各项改动,为:客户端集成投稿器入口和支持,修复:安装依赖时间较长时错误地返回“安装完毕”结果,现在客户端版本更新时不关闭免密码登录,UOS安装进程合并正常aptss中 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 - spark-store (3.2.4~test2) stable; urgency=medium * 客户端集成投稿器入口和支持 * 修复:安装依赖时间较长时错误地返回“安装完毕”结果 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 - spark-store (3.2.4~test1) stable; urgency=medium * 客户端更新时不关闭免密码登录 * UOS合并正常aptss中 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.2.3) stable; urgency=medium * 客户端异常退出时仍然占用资源问题修复 * 降低dtk依赖版本,Debian 11 stable可直接安装 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.2.2) stable; urgency=medium * aptss will now refresh the system source before doing install, policy....etc * 启动客户端GPU加速支持 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.2.1) stable; urgency=medium * 更改刷新系统源的功能 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.2) stable; urgency=medium @@ -220,20 +245,22 @@ spark-store (3.2) stable; urgency=medium * 修复 在更新检测设置中的是否开启自动更新检测设置项的显示不随开启或关闭状态改变 * 修复 在检测更新时临时降低优先级到100,防止系统中有且版本一致的包被反复来回更新 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.6) stable; urgency=medium * 修复部分情况下无法选中正确的镜像源的问题 * 合入3.1.5以来的各项修改 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.5-5) stable; urgency=medium * 从所有镜像源中选取最快镜像源高速下载 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.1.5-4) stable; urgency=medium @@ -243,53 +270,54 @@ spark-store (3.1.5-4) stable; urgency=medium * 更新检测服务优化:从分体改为一体 * aptss 支持自动补全 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.5-3) stable; urgency=medium * 包内自带密钥 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.1.5-2) stable; urgency=medium * 下载软件时跳过获取大小,修复部分软件无法下载的问题 * 修复 获取key时出错,指定使用http1.1 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.1.5-1) stable; urgency=medium * 改变更新策略,UOS也下载加速,但是安装不加速 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 - spark-store (3.1.5) stable; urgency=medium * 改变更新策略,现在支持应用在更新时引入新依赖 * ss-apt-fast现在默认允许降级,以与apt使用体验一致 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.1.4-2) stable; urgency=medium * 客户端下载使用metalink来支持bt下载加速 * 修复使用更新和安装设置更新商店本体时出错 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 spark-store (3.1.4-1) stable; urgency=medium * 安装脚本和检测更新脚本检查网络时间超时时间延长至5s * 修复:ssinstall在没有安装apt-fast的情况下首次安装需要依赖的软件时安装失败 --- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.4) stable; urgency=medium @@ -302,6 +330,7 @@ spark-store (3.1.4) stable; urgency=medium -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.3-2) stable; urgency=medium * 调整 现在与系统更新分开,不再导致更新失败 @@ -310,17 +339,17 @@ spark-store (3.1.3-2) stable; urgency=medium * 修改ss-apt-fast的策略,现在除了安装,下载和更新都改用apt * ssinstall 现在也会在不适用ss-apt-fast的时候模拟源了(针对UOS) - -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.3-1) stable; urgency=medium * 修复 下载提前退出 * 移除 下载量显示 - -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.3) stable; urgency=medium * Now uses aria2 to download softwares form all mirrors @@ -332,6 +361,7 @@ spark-store (3.1.3) stable; urgency=medium -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.2) stable; urgency=medium * Now let apt-fast method support all mirrors @@ -340,8 +370,6 @@ spark-store (3.1.2) stable; urgency=medium -- shenmo Mon, 17 Jan 2022 00:00:00 +0800 - - spark-store (3.1.1) stable; urgency=medium * Now will delete the link of policy file after uninstall or upgrade @@ -350,8 +378,6 @@ spark-store (3.1.1) stable; urgency=medium -- shenmo Mon, 17 Jan 2022 00:00:00 +0800 - - spark-store (3.1.0) stable; urgency=medium * Add pkexec policy: ssinstall. Only will be enabled after permitted. @@ -360,7 +386,6 @@ spark-store (3.1.0) stable; urgency=medium -- shenmo Mon, 17 Jan 2022 00:00:00 +0800 - spark-store (3.0.3-13) stable; urgency=medium * Update the ssinstall script. Now support apt-fast and will temporarily increase the spark store source priority to 500 to make depends install correctly @@ -370,7 +395,6 @@ spark-store (3.0.3-13) stable; urgency=medium -- shenmo Mon, 17 Jan 2022 00:00:00 +0800 - spark-store (3.0.3-12) stable; urgency=medium * Rollback to use DApplication::loadDXcbPlugin() to make titlebar behave normally in ubuntu @@ -380,8 +404,6 @@ spark-store (3.0.3-12) stable; urgency=medium -- shenmo Mon, 17 Jan 2022 00:00:00 +0800 - - spark-store (3.0.3-11) stable; urgency=medium * Now support autoupdate @@ -389,8 +411,6 @@ spark-store (3.0.3-11) stable; urgency=medium -- shenmo Mon, 17 Jan 2022 00:00:00 +0800 - - spark-store (3.0.3-10) stable; urgency=medium * Now also compile dstore patch @@ -403,3 +423,4 @@ spark-store (3.0.3-9) stable; urgency=medium * Support dpkg-buildpackage -- shenmo Mon, 17 Jan 2022 00:00:00 +0800 + diff --git a/debian/control b/debian/control index e85011b316d4a63b7da4a016818bfd7684c01354..64f2f1454b73361c5190528f38982796d11b8fd0 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,9 @@ Build-Depends: qttools5-private-dev, qtwebengine5-dev, qtwayland5, - qtwayland5-dev-tools + qtwayland5-dev-tools, + gcc, + g++ Standards-Version: 3.0 Homepage: https://www.spark-app.store/ @@ -30,12 +32,12 @@ Depends:${shlibs:Depends}, ${misc:Depends}, libqt5widgets5, libqt5network5, libqt5concurrent5, + qtwayland5, libdtkcore5, libdtkgui5, libdtkwidget5, curl, openssl, - libssl-dev, dde-qt5integration, bubblewrap, aria2, diff --git a/spark-store-project.pro b/spark-store-project.pro index 1975041dd2660991737814bd77b837e2b8c77a67..f0e92ddde66066c6cb91320892427e981d80abac 100644 --- a/spark-store-project.pro +++ b/spark-store-project.pro @@ -14,13 +14,11 @@ SUBDIRS += \ src/spark-dstore-patch \ src/spark-store.pro -#TRANSLATIONS += \ -# translations/spark-store_fr.ts \ -# translations/spark-store_en.ts \ -# translations/spark-store_zh_CN.ts - # Update translation files -CONFIG(release, debug|release): system(bash $${PWD}/translate_generation.sh) +CONFIG(release, debug|release) { + system(bash $${PWD}/translate_update.sh) + system(bash $${PWD}/translate_generation.sh) +} # Rules for deployment tool.files += tool/* @@ -64,4 +62,4 @@ INSTALLS += \ service \ bash_completion \ polkit-1 -# 暂时不添加 \ No newline at end of file +# 暂时不添加 diff --git a/src/application.cpp b/src/application.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73af9701a2e6800292f4f1e8541532a0c92547d4 --- /dev/null +++ b/src/application.cpp @@ -0,0 +1,101 @@ +#include "application.h" + +#include +#include +#include +#include + +#include +#include + +DCORE_USE_NAMESPACE + +Application::Application(int &argc, char **argv) + : DApplication(argc, argv) +{ + // Wayland 环境下使用,防止子控件 Native 化 + if (!DPlatformWindowHandle::pluginVersion().isEmpty()) { + setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true); + } + setAttribute(Qt::AA_UseHighDpiPixmaps); + + loadTranslator(); // 载入翻译 + + setOrganizationName("spark-union"); + setApplicationName("spark-store"); // 影响 ~/.local/share/spark-union 下文件夹名称 + setApplicationDisplayName(QObject::tr("Spark Store")); // 设置窗口显示标题 (Wayland 下会显示 Qt 原生标题栏) + setProductName(QObject::tr("Spark Store")); + setProductIcon(QIcon::fromTheme("spark-store")); + setApplicationHomePage("https://gitee.com/deepin-community-store"); + setApplicationDescription( + QObject::tr( + "An appstore powered by community
" + "https://www.spark-app.store
" + "Spark developers")); + setApplicationLicense(" GPLv3 "); + + // 检查 ~/.config/spark-union/spark-store 文件夹是否存在 + checkAppConfigLocation(); + + // 初始化日志模块 (默认日志位置 ~/.cache/spark-union/spark-store) + DLogManager::registerConsoleAppender(); + DLogManager::registerFileAppender(); +} + +void Application::handleAboutAction() +{ + if (aboutDialog()) { + DApplication::handleAboutAction(); + return; + } + + initAboutDialog(); + DApplication::handleAboutAction(); +} + +void Application::setVersionAndBuildDateTime(const QString &version, const QString &buildDateTime) +{ + m_version = version; + m_buildDateTime = buildDateTime; + + QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); + if (config.value("build/version").toString() != m_version) { + qDebug() << "Spark Store has been updated!"; + + config.setValue("build/version", m_version); + config.setValue("build/time", m_buildDateTime); + config.sync(); + } + + setApplicationVersion(DApplication::buildVersion(config.value("build/version").toString() + "-" + "Flamescion" + "-" + config.value("build/time").toString())); +} + +void Application::checkAppConfigLocation() +{ + QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!dir.exists()) { + qWarning() << "AppConfigLocation not existed, creating..."; + dir.mkpath(dir.absolutePath()); + } +} + +void Application::initAboutDialog() +{ + // Customized DAboutDialog + DAboutDialog *dialog = new DAboutDialog(activeWindow()); + dialog->setProductName(productName()); + dialog->setProductIcon(productIcon()); + dialog->setVersion(translate("DAboutDialog", "Version: %1").arg(applicationVersion())); + // dialog->setCompanyLogo(QPixmap(":/icon/Logo-Spark.png")); // 根据 shenmo 要求,不显示组织 Logo + dialog->setWebsiteName(QObject::tr("Spark Project")); + dialog->setWebsiteLink(applicationHomePage()); + dialog->setDescription(applicationDescription()); + dialog->setLicense(translate("DAboutDialog", "%1 is released under %2").arg(productName()).arg(applicationLicense())); + + setAboutDialog(dialog); + connect(aboutDialog(), &DAboutDialog::destroyed, this, [=] { + setAboutDialog(nullptr); + }); + + dialog->hide(); +} diff --git a/src/application.h b/src/application.h new file mode 100644 index 0000000000000000000000000000000000000000..993da3f7ec92491fbe9c8eae9124397c679f40f5 --- /dev/null +++ b/src/application.h @@ -0,0 +1,27 @@ +#ifndef APPLICATION_H +#define APPLICATION_H + +#include + +DWIDGET_USE_NAMESPACE + +class Application : public DApplication +{ + Q_OBJECT + +public: + Application(int &argc, char **argv); + void handleAboutAction() override; + + void setVersionAndBuildDateTime(const QString &version, const QString &buildDateTime); + +private: + void checkAppConfigLocation(); + void initAboutDialog(); + +private: + QString m_version; + QString m_buildDateTime; +}; + +#endif // APPLICATION_H diff --git a/src/assets/assets.qrc b/src/assets/assets.qrc index c8d1f97f945f1f55c5be28a8f9deae5e6edb4764..ef4b2485b8daaceb67c5e8866d67110d0bcb16e8 100644 --- a/src/assets/assets.qrc +++ b/src/assets/assets.qrc @@ -1,64 +1,65 @@ - - - icon/logo.svg - tags/a2d-small.png - tags/a2d.png - tags/community-small.png - tags/community.png - tags/community.svg - tags/deepin-small.png - tags/deepin.svg - tags/dtk-small.png - tags/dwine2-small.png - tags/dwine5-small.png - tags/dwine5.svg - tags/logo_icon.svg - tags/ubuntu-small.png - tags/ubuntu.png - tags/uos-authorize.svg - tags/uos-small.png - tags/uos.svg - icon/light/back.svg - icon/light/download.svg - icon/light/leftbutton_0.svg - icon/light/leftbutton_1.svg - icon/light/leftbutton_2.svg - icon/light/leftbutton_3.svg - icon/light/leftbutton_4.svg - icon/light/leftbutton_5.svg - icon/light/leftbutton_6.svg - icon/light/leftbutton_7.svg - icon/light/leftbutton_8.svg - icon/light/leftbutton_9.svg - icon/light/leftbutton_10.svg - icon/light/leftbutton_11.svg - icon/light/leftbutton_12.svg - icon/light/box.svg - icon/light/calendar.svg - icon/light/globe.svg - icon/light/folder.svg - icon/light/text.svg - icon/dark/back.svg - icon/dark/box.svg - icon/dark/calendar.svg - icon/dark/download.svg - icon/dark/folder.svg - icon/dark/globe.svg - icon/dark/leftbutton_0.svg - icon/dark/leftbutton_1.svg - icon/dark/leftbutton_2.svg - icon/dark/leftbutton_3.svg - icon/dark/leftbutton_4.svg - icon/dark/leftbutton_5.svg - icon/dark/leftbutton_6.svg - icon/dark/leftbutton_7.svg - icon/dark/leftbutton_8.svg - icon/dark/leftbutton_9.svg - icon/dark/leftbutton_10.svg - icon/dark/leftbutton_11.svg - icon/dark/leftbutton_12.svg - icon/dark/text.svg - icon/light/update.svg - icon/dark/update.svg - - + + + icon/Logo-Spark.png + icon/dark/back.svg + icon/dark/box.svg + icon/dark/calendar.svg + icon/dark/download.svg + icon/dark/folder.svg + icon/dark/globe.svg + icon/dark/leftbutton_0.svg + icon/dark/leftbutton_1.svg + icon/dark/leftbutton_2.svg + icon/dark/leftbutton_3.svg + icon/dark/leftbutton_4.svg + icon/dark/leftbutton_5.svg + icon/dark/leftbutton_6.svg + icon/dark/leftbutton_7.svg + icon/dark/leftbutton_8.svg + icon/dark/leftbutton_9.svg + icon/dark/leftbutton_10.svg + icon/dark/leftbutton_11.svg + icon/dark/leftbutton_12.svg + icon/dark/text.svg + icon/dark/update.svg + icon/light/back.svg + icon/light/download.svg + icon/light/leftbutton_0.svg + icon/light/leftbutton_1.svg + icon/light/leftbutton_2.svg + icon/light/leftbutton_3.svg + icon/light/leftbutton_4.svg + icon/light/leftbutton_5.svg + icon/light/leftbutton_6.svg + icon/light/leftbutton_7.svg + icon/light/leftbutton_8.svg + icon/light/leftbutton_9.svg + icon/light/leftbutton_10.svg + icon/light/leftbutton_11.svg + icon/light/leftbutton_12.svg + icon/light/box.svg + icon/light/calendar.svg + icon/light/globe.svg + icon/light/folder.svg + icon/light/text.svg + icon/light/update.svg + icon/logo.svg + tags/a2d-small.png + tags/a2d.png + tags/community-small.png + tags/community.png + tags/community.svg + tags/deepin-small.png + tags/deepin.svg + tags/dtk-small.png + tags/dwine2-small.png + tags/dwine5-small.png + tags/dwine5.svg + tags/logo_icon.svg + tags/ubuntu-small.png + tags/ubuntu.png + tags/uos-authorize.svg + tags/uos-small.png + tags/uos.svg + + diff --git a/src/assets/icon/Logo-Spark.png b/src/assets/icon/Logo-Spark.png index 941a4a652676252711fb54a357d72abc56dddfcb..905224c8fe7ee658a431e74f9d31c5f210915895 100644 Binary files a/src/assets/icon/Logo-Spark.png and b/src/assets/icon/Logo-Spark.png differ diff --git a/src/backend/downloadworker.cpp b/src/backend/downloadworker.cpp index 1d14f27f9bb78ea880738389d692dd1a9f2285bb..6e3b75b17039158c5e1252978235d548d4e0beca 100644 --- a/src/backend/downloadworker.cpp +++ b/src/backend/downloadworker.cpp @@ -1,9 +1,11 @@ #include "downloadworker.h" + #include #include #include #include #include +#include DownloadController::DownloadController(QObject *parent) { @@ -30,7 +32,6 @@ void DownloadController::setFilename(QString filename) this->filename = filename; } - bool checkMeatlink(QString metaUrl) { QFile metaStatus("/tmp/spark-store/metaStatus.txt"); @@ -49,7 +50,7 @@ bool checkMeatlink(QString metaUrl) void gennerateDomain(QVector &domains) { - QFile serverList(QDir::homePath().toUtf8() + "/.config/spark-store/server.list"); + QFile serverList(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/server.list"); if (serverList.open(QFile::ReadOnly)) { QStringList list = QString(serverList.readAll()).trimmed().split("\n"); @@ -88,14 +89,17 @@ void DownloadController::startDownload(const QString &url) } QtConcurrent::run([=]() - { + { QString metaUrl = url + ".metalink"; qDebug() << "metalink" << metaUrl; bool useMetalink = false; - if (checkMeatlink(metaUrl)){ + if (checkMeatlink(metaUrl)) + { useMetalink = true; qDebug() << "useMetalink:" << useMetalink; - }else{ + } + else + { gennerateDomain(domains); // qDebug() << domains << domains.size(); } @@ -112,10 +116,12 @@ void DownloadController::startDownload(const QString &url) QString aria2ConnectionMax = "--max-concurrent-downloads=16"; QString aria2DNSCommand = "--async-dns-server=119.29.29.29,223.5.5.5"; - if (useMetalink){ + if (useMetalink) + { command.append(metaUrl.toUtf8()); } - else{ + else + { for (int i = 0; i < domains.size(); i++) { command.append(replaceDomain(url, domains.at(i)).replace("+","%2B").toUtf8()); //对+进行转译,避免oss出错 @@ -134,7 +140,8 @@ void DownloadController::startDownload(const QString &url) command.append(aria2ConnectionPerServer.toUtf8()); command.append(aria2ConnectionMax.toUtf8()); command.append(aria2DNSCommand.toUtf8()); - if (useMetalink){ + if (useMetalink) + { command.append(aria2NoSeeds.toUtf8()); } qDebug() << command; @@ -145,8 +152,7 @@ void DownloadController::startDownload(const QString &url) cmd->start(); cmd->waitForStarted(); //等待启动完成 - QObject::connect(cmd, &QProcess::readyReadStandardOutput, - [&]() + QObject::connect(cmd, &QProcess::readyReadStandardOutput, [&]() { //通过读取输出计算下载速度 QString message = cmd->readAllStandardOutput().data(); @@ -189,8 +195,7 @@ void DownloadController::startDownload(const QString &url) emit downloadProcess(speedInfo, downloadSizeRecord, fileSize); } }); - QObject::connect(cmd, &QProcess::readyReadStandardError, - [&]() + QObject::connect(cmd, &QProcess::readyReadStandardError, [&]() { emit errorOccur(cmd->readAllStandardError().data()); return; @@ -223,10 +228,16 @@ void DownloadController::startDownload(const QString &url) */ void DownloadController::stopDownload() { + if (pidNumber < 0) + { + return; + } + // 实现下载进程退出 QString killCmd = QString("kill -9 %1").arg(pidNumber); system(killCmd.toUtf8()); qDebug() << "kill aria2!"; + pidNumber = -1; } qint64 DownloadController::getFileSize(const QString &url) diff --git a/src/backend/downloadworker.h b/src/backend/downloadworker.h index d04290bccd8838762884aee3f13aa80fd50e060a..5aeb353e39bb515eec8a712d228f20b366f25027 100644 --- a/src/backend/downloadworker.h +++ b/src/backend/downloadworker.h @@ -21,7 +21,7 @@ public: private: int threadNum; - int pidNumber; + int pidNumber = -1; QString filename; qint64 fileSize; QVector> ranges; diff --git a/src/backend/image_show.cpp b/src/backend/image_show.cpp index f67b3403f2e0e6e010f4d8b319aee2b2f02d9693..f817a49d09dfee518fd6c39c10f809a4c9ad9f64 100644 --- a/src/backend/image_show.cpp +++ b/src/backend/image_show.cpp @@ -1,13 +1,12 @@ #include "image_show.h" #include -#include // Qt5 不再建议使用 QDesktopWidget +#include // Qt5 不再建议使用 QDesktopWidget #include -image_show::image_show(QWidget *parent) : - QWidget(parent), - m_dialog(new big_image), - m_label(new QLabel) +image_show::image_show(QWidget *parent) : QWidget(parent), + m_dialog(new big_image), + m_label(new QLabel) { QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(m_label); @@ -27,7 +26,7 @@ void image_show::setImage(QPixmap image) desktop_w = QGuiApplication::primaryScreen()->geometry().width(); desktop_h = QGuiApplication::primaryScreen()->geometry().height(); - if(screen0.width() > (desktop_w - 20) || screen0.height() > (desktop_h - 20)) + if (screen0.width() > (desktop_w - 20) || screen0.height() > (desktop_h - 20)) { re_screen1 = screen0.scaled(QSize(desktop_w - 20, desktop_h - 20), Qt::KeepAspectRatio, Qt::SmoothTransformation); m_image = QPixmap::fromImage(re_screen1); @@ -48,7 +47,7 @@ void image_show::mousePressEvent(QMouseEvent *) // 识别主屏幕尺寸并设置 widget 大小 m_dialog->setFixedSize(desktop_w, desktop_h); - m_dialog->move(0,0); + m_dialog->move(0, 0); } image_show::~image_show() { diff --git a/src/backend/sparkapi.cpp b/src/backend/sparkapi.cpp index 70c1983c13872a971e4ff673a93b4af9caa97b9c..e2f841b67f9d9fa38b6c122af2ae7b37c9115a74 100644 --- a/src/backend/sparkapi.cpp +++ b/src/backend/sparkapi.cpp @@ -1,74 +1,87 @@ #include "sparkapi.h" +#include +#include #include QString SparkAPI::serverUrl = ""; SparkAPI::SparkAPI(QObject *parent) : QObject(parent) { - QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat); - if(!readConfig.value("server/choose").toString().isEmpty() && readConfig.value("server/updated").toString() == "TRUE") + QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); + if (!config.value("server/choose").toString().isEmpty() && config.value("server/updated").toBool()) { - SparkAPI::setServerUrl(readConfig.value("server/choose").toString()); + SparkAPI::setServerUrl(config.value("server/choose").toString()); } } + void SparkAPI::get(QUrl url) { QNetworkRequest request; - HttpRequest *httprequest=new HttpRequest; - request.setUrl(QUrl(url.toString().replace("+","%2B"))); - connect(httprequest,&HttpRequest::finished,[=](QString data){ + HttpRequest *httprequest = new HttpRequest; + request.setUrl(QUrl(url.toString().replace("+", "%2B"))); + connect(httprequest, &HttpRequest::finished, [=](QString data) + { QByteArray arr = data.toUtf8(); - //解析Json - QJsonParseError error; - if(QJsonDocument::fromJson(arr,&error).isArray()) - { - auto doc = QJsonDocument::fromJson(arr,&error).array(); - emit finished(doc); - }else { - auto doc = QJsonDocument::fromJson(arr,&error).object(); - emit finishedObject(doc); - } + // 解析 Json + QJsonParseError error; + if(QJsonDocument::fromJson(arr,&error).isArray()) + { + auto doc = QJsonDocument::fromJson(arr,&error).array(); + emit finished(doc); + } else { + auto doc = QJsonDocument::fromJson(arr,&error).object(); + emit finishedObject(doc); + } - httprequest->deleteLater(); + httprequest->deleteLater(); }); + httprequest->getRequest(request); } + void SparkAPI::getRAW(QUrl url) { QNetworkRequest request; - HttpRequest *httprequest=new HttpRequest; - request.setUrl(QUrl(url.toString().replace("+","%2B"))); - connect(httprequest,&HttpRequest::finished,[=](QString data){ + HttpRequest *httprequest = new HttpRequest; + request.setUrl(QUrl(url.toString().replace("+", "%2B"))); + connect(httprequest, &HttpRequest::finished, [=](QString data) + { emit finishedRAW(data); - httprequest->deleteLater(); - }); + httprequest->deleteLater(); }); httprequest->getRequest(request); } + void SparkAPI::getAppList(QString type) { - get(QUrl(getServerUrl()+"store/"+type+"/applist.json")); + get(QUrl(getServerUrl() + "store/" + type + "/applist.json")); } + void SparkAPI::getSearchList(QString keyword) { - get(QUrl("https://search.deepinos.org.cn/appinfo/search?keyword="+keyword)); + get(QUrl("https://search.deepinos.org.cn/appinfo/search?keyword=" + keyword)); } + void SparkAPI::getAppInfo(QUrl spk) { - get(QUrl(getServerUrl()+"store"+spk.path().replace("+","%2B") + "/app.json")); + get(QUrl(getServerUrl() + "store" + spk.path().replace("+", "%2B") + "/app.json")); } + void SparkAPI::getAppDownloadTimes(QUrl spk) { - getRAW(QUrl(getServerUrl()+"store"+spk.path().replace("+","%2B") + "/download-times.txt")); + getRAW(QUrl(getServerUrl() + "store" + spk.path().replace("+", "%2B") + "/download-times.txt")); } + QString SparkAPI::getServerUrl() { return SparkAPI::serverUrl; } + QString SparkAPI::getImgServerUrl() { return SparkAPI::serverUrl; } + void SparkAPI::setServerUrl(QString url) { SparkAPI::serverUrl = url; diff --git a/src/backend/sparkapi.h b/src/backend/sparkapi.h index 1780e7ca347e01a50517dc2c4eebe1bca976c3b6..56451b2d5a4a32c5d67270cc4bd9a4ee11ccbca3 100644 --- a/src/backend/sparkapi.h +++ b/src/backend/sparkapi.h @@ -1,16 +1,21 @@ #ifndef SPARKAPI_H #define SPARKAPI_H + +#include "utils/httprequest.h" + #include #include #include #include -#include "utils/httprequest.h" -#include #include + class SparkAPI : public QObject { Q_OBJECT + public: + explicit SparkAPI(QObject *parent = nullptr); + static QString getServerUrl(); static QString getImgServerUrl(); static void setServerUrl(QString url); @@ -20,17 +25,14 @@ public: void getRAW(QUrl url); void getAppList(QString type); void getAppInfo(QUrl spk); - explicit SparkAPI(QObject *parent = nullptr); - -private: - static QString serverUrl; signals: void finished(QJsonArray); void finishedRAW(QString); void finishedObject(QJsonObject); -public slots: +private: + static QString serverUrl; }; #endif // SPARKAPI_H diff --git a/src/dbus/dbussparkstoreservice.cpp b/src/dbus/dbussparkstoreservice.cpp index 9fcd673625f1c4029860700a025bb59f5b8c9aaa..aaa4bb39ccf8d73a28a3b8958da77ac91d3c6223 100644 --- a/src/dbus/dbussparkstoreservice.cpp +++ b/src/dbus/dbussparkstoreservice.cpp @@ -3,10 +3,9 @@ DBusSparkStoreService::DBusSparkStoreService(QObject *parent) : QDBusAbstractAdaptor(parent) { - } -void DBusSparkStoreService::activeWindow(const QString & arg) +void DBusSparkStoreService::activeWindow(const QString &arg) { emit sigOpenUrl(arg); } diff --git a/src/main.cpp b/src/main.cpp index 465d04476df47c3e13df5ae0abc975551f09db1e..7fe1b3971cc93f838fd5d157240e7f856615fe6b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,128 +1,115 @@ +#include "application.h" #include "mainwindow-dtk.h" -#include -#include -#include +#include #include -#include -#include #include + +#include + DCORE_USE_NAMESPACE DWIDGET_USE_NAMESPACE int main(int argc, char *argv[]) { // Get build time - static const QString version = "Version 4.1.1"; - static const QDate buildDate = QLocale( QLocale::English ).toDate( QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy"); + static const QString version = "Version 4.1.2"; + static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy"); static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss"); + static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss"); - //设置桌面环境环境变量 - if (!QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin")) { - setenv("XDG_CURRENT_DESKTOP", "Deepin", 1); + // 设置桌面环境环境变量 + bool isDeepinOS = true; + if (!QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin")) + { + qputenv("XDG_CURRENT_DESKTOP", "Deepin"); + isDeepinOS = false; } - DApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // 开启 Hidpi 支持 -#ifndef DSTORE_NO_DXCBs - DApplication::loadDXcbPlugin(); // 加载 DXCB 插件 -#endif - - // 浏览器开启 GPU 支持 - qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--ignore-gpu-blocklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-accelerated-video-decode"); - QVector fakeArgs(argc + 2); - fakeArgs[0] = argv[0]; - fakeArgs[1] = "-platformtheme"; - fakeArgs[2] = "deepin"; - for(int i = 1; i < argc; i++) fakeArgs[i + 2] = argv[i]; - int fakeArgc = argc + 2; // 为啥DApplication的argc要用引用啊? - DApplication a(fakeArgc, fakeArgs.data()); + bool isWayland = false; + auto e = QProcessEnvironment::systemEnvironment(); + QString XDG_SESSION_TYPE = e.value(QStringLiteral("XDG_SESSION_TYPE")); + QString WAYLAND_DISPLAY = e.value(QStringLiteral("WAYLAND_DISPLAY")); + if (XDG_SESSION_TYPE == QLatin1String("wayland") || WAYLAND_DISPLAY.contains(QLatin1String("wayland"), Qt::CaseInsensitive)) + { + isWayland = true; + } + QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); + config.setValue("build/isWayland", isWayland); + config.setValue("build/isDeepinOS", isDeepinOS); - //初始化日志模块 (默认日志位置 ~/.cache/deepin/spark-store) - DLogManager::registerConsoleAppender(); - DLogManager::registerFileAppender(); + // Check config file, if there is no wayland config, then set it to default, which means use wayland if possible. + if (!config.contains("build/useWayland")) + { + config.setValue("build/useWayland", true); + } + bool useWayland = config.value("build/useWayland").toBool(); + qDebug() << "System Wayland enabled:" << isWayland << ". Spark Wayland enabled:" << useWayland; - //Wayland 环境下使用,防止子控件 Native 化 - if (!DPlatformWindowHandle::pluginVersion().isEmpty()) { - a.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true); + // Set display backend + if (isWayland && useWayland && !(Dtk::Core::DSysInfo::isDDE() || isDeepinOS)) + { + qputenv("QT_QPA_PLATFORM", "wayland"); + } + else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDDE() && isDeepinOS)) + { + qputenv("QT_QPA_PLATFORM", "dwayland"); + } + else + { + qputenv("QT_QPA_PLATFORM", "dxcb"); } - a.setAttribute(Qt::AA_UseHighDpiPixmaps); - a.loadDXcbPlugin(); - a.loadTranslator(); // 载入翻译 + // 龙芯机器配置,使得 DApplication 能正确加载 QTWEBENGINE + qputenv("DTK_FORCE_RASTER_WIDGETS", "FALSE"); +// qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-features=UseModernMediaControls"); +// qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-web-security"); + // 浏览器开启 GPU 支持 +#ifdef __sw_64__ + qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--ignore-gpu-blocklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-accelerated-video-decode --no-sandbox"); +#else + qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--ignore-gpu-blocklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-accelerated-video-decode"); +#endif - QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat); + DApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // 开启 Hidpi 支持 - if (readConfig.value("build/version").toString() != version){ - qDebug() << "Spark Store has been updated!"; - QSettings *setConfig = new QSettings(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat); - setConfig->setValue("build/version", version); - setConfig->setValue("build/time", buildDate.toString("yyyy.MM.dd")+"-"+buildTime.toString()); - setConfig->deleteLater(); + // 强制使用 DTK 平台插件 + QVector fakeArgs(argc + 2); + fakeArgs[0] = argv[0]; + fakeArgs[1] = const_cast("-platformtheme"); + fakeArgs[2] = const_cast("deepin"); + for (int i = 1; i < argc; i++) + { + fakeArgs[i + 2] = argv[i]; } + int fakeArgc = argc + 2; // QCoreApplication 的 argc 要用引用,避免 c++ 编译器优化 + Application a(fakeArgc, fakeArgs.data()); + // 设置版本和构建时间 + a.setVersionAndBuildDateTime(version, buildDateTime); - //Customized DAboutDialog - - DAboutDialog dialog; - a.setAboutDialog(&dialog); - dialog.setLicense(QObject::tr("We publish this program under GPL V3")); - dialog.setVersion(DApplication::buildVersion(readConfig.value("build/version").toString()+"-"+"Flamescion"+"-"+readConfig.value("build/time").toString())); - dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo - dialog.setProductName(QLabel::tr("Spark Store")); - dialog.setDescription( - QObject::tr( - "An appstore powered by community
" - "https://www.spark-app.store
" - "Spark developers" - ) - ); - - dialog.setProductName(QLabel::tr("Spark Store")); - dialog.setCompanyLogo(QPixmap(":/spark-store.png")); - dialog.setWebsiteName(QObject::tr("The Spark Project")); - dialog.setWebsiteLink("https://gitee.com/deepin-community-store"); - - a.setOrganizationName("spark-union"); - a.setProductName(QObject::tr("Spark Store")); - a.setApplicationName("Spark Store"); // 不用翻译,影响 ~/.local/share/spark-union 下文件夹名称 - a.setApplicationDisplayName(QObject::tr("Spark Store")); // 设置窗口显示标题 (Wayland 下会显示 Qt 原生标题栏) - a.setWindowIcon(QIcon::fromTheme("spark-store")); - a.setApplicationDescription( - QObject::tr( - "An appstore powered by deepin community
" - "https://www.spark-app.store
" - "Spark developers

" - "Published under GPL V3" - ) - ); // 限制单实例运行 - if(!a.setSingleInstance("spark-store")) + if (!a.setSingleInstance("spark-store")) { - qDebug() << "The application is already running!"; - QDBusInterface iface("com.gitee.spark.store", - "/com/gitee/spark/store", - "com.gitee.spark.store", - QDBusConnection::sessionBus()); - - QString arg1 = argv[1]; - - iface.asyncCall("activeWindow",arg1); - - + qWarning() << "Another instance has already started, activating..."; return -1; } - DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); //固定主题为浅色主题 + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); // 固定主题为浅色主题 DApplicationSettings settings; // 定义 DApplicationSettings,自动保存主题设置 MainWindow w; // 让打开时界面显示在正中 Dtk::Widget::moveToCenter(&w); - QString arg1 = argv[1]; - if (arg1.startsWith("spk://")) { - w.openUrl(QUrl(argv[1])); + if (argc > 1) + { + QString arg1 = argv[1]; + if (arg1.trimmed().startsWith("spk://")) + { + w.openUrl(QUrl(argv[1])); + } } w.show(); diff --git a/src/mainwindow-dtk.cpp b/src/mainwindow-dtk.cpp index 3e51639501517740f4536eff2d9bc8d164e5b589..89feaa080beb9b6319553f013de94864d1fae582 100644 --- a/src/mainwindow-dtk.cpp +++ b/src/mainwindow-dtk.cpp @@ -3,30 +3,34 @@ #include #include +#include #include #define AppPageApplist 0 #define AppPageSearchlist 1 #define AppPageAppdetail 2 #define AppPageSettings 3 +#define WaylandSearchCenter 1 +#define OtherSearchCenter 2 +#define RightSearchSpace 1 MainWindow::MainWindow(QWidget *parent) - : BaseWidgetOpacity(parent) - , ui(new Ui::MainWindow) + : BaseWidgetOpacity(parent), ui(new Ui::MainWindow) { ui->setupUi(this); + setWindowTitle(QObject::tr("Spark Store")); initConfig(); - moveToCenter(this); //让窗口居中显示 - WidgetAnimation::widgetOpacity(this,true); + WidgetAnimation::widgetOpacity(this, true); + searchEdit = new DSearchEdit(ui->titlebar); downloadlistwidget = new DownloadListWidget; downloadButton = new ProgressButton(ui->titlebar); backButtom = new QPushButton(ui->titlebar); ui->appintopage->setDownloadWidget(downloadlistwidget); ui->stackedWidget->setCurrentIndex(0); ui->titlebar->setBackgroundTransparent(true); - //ui->titlebar->setSwitchThemeMenuVisible(false); // 去除 dtk 标题栏主题切换菜单 + // ui->titlebar->setSwitchThemeMenuVisible(false); // 去除 dtk 标题栏主题切换菜单 setMaskAlpha(250); updateUi(0); @@ -42,45 +46,42 @@ MainWindow::MainWindow(QWidget *parent) menu->addAction(actionSubmissionWithClient); ui->titlebar->setMenu(menu); - connect(actionSubmission, &QAction::triggered, this, [=]{QDesktopServices::openUrl(QUrl("https://upload.deepinos.org/"));}); - connect(setting, &QAction::triggered, this, [=]{ + connect(actionSubmission, &QAction::triggered, this, [=] + { QDesktopServices::openUrl(QUrl("https://upload.deepinos.org/")); }); + connect(setting, &QAction::triggered, this, [=] + { switchPage(AppPageSettings); - ui->settingspage->updateUI(); - }); - connect(upgrade, &QAction::triggered, this, [=]{QProcess::startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh");}); + ui->settingspage->updateUI(); }); + connect(upgrade, &QAction::triggered, this, [=] + { QProcess::startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh"); }); // 投稿器 connect(actionSubmissionWithClient, &QAction::triggered, this, [=] - { - QString submitterSpk = "spk://store/tools/spark-store-submitter"; - QFile actionSubmissionClientStatus("/opt/spark-store-submitter/bin/spark-store-submitter"); - if (actionSubmissionClientStatus.exists()) { - qDebug() << "投稿器存在"; - QProcess::startDetached("/opt/spark-store-submitter/bin/spark-store-submitter"); - } - else{ - qDebug() << "投稿器不存在,跳转页面"; - openUrl(submitterSpk); - } - - }); - + QString submitterSpk = "spk://store/tools/spark-store-submitter"; + QFile actionSubmissionClientStatus("/opt/spark-store-submitter/bin/spark-store-submitter"); + if (actionSubmissionClientStatus.exists()) + { + qDebug() << "投稿器存在"; + QProcess::startDetached("/opt/spark-store-submitter/bin/spark-store-submitter"); + } + else + { + qDebug() << "投稿器不存在,跳转页面"; + openUrl(submitterSpk); + } }); - //主题切换 - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [=](DGuiApplicationHelper::ColorType themeType) { + // 主题切换 + connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [=](DGuiApplicationHelper::ColorType themeType) + { if (themeType == DGuiApplicationHelper::DarkType) { //深色模式 setMaskColor(QColor("#2a2b2b")); - this->setStyleSheet("#mainpage{background-color: transparent;border-radius:14px;}\ - QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color:#FFFFFF}\ - "); backButtom->setIcon(QIcon(":/icon/dark/back.svg")); downloadButton->setIcon(":/icon/dark/download.svg"); downloadButton->setBackgroundColor(QColor("#444444")); downloadButton->setColor(QColor("#66CCFF")); ui->pushButton_14->setIcon(QIcon(":/icon/dark/update.svg")); - int i = 0; - while (i < ui->buttonGroup->buttons().size()) { + for (int i = 0; i < ui->buttonGroup->buttons().size(); i++) { ui->buttonGroup->buttons()[i]->setIcon(QIcon(":/icon/dark/leftbutton_" + QString::number(i) + ".svg")); if (QLocale::system().name() == "zh_CN") { ui->buttonGroup->buttons()[i]->setStyleSheet("QPushButton{background-color:transparent;}\ @@ -91,21 +92,16 @@ MainWindow::MainWindow(QWidget *parent) QPushButton:hover{background-color:#7a7a7a;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}\ QPushButton:checked{background-color:#6e6e6e;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}"); } - i++; } } else { //亮色模式 setMaskColor(QColor("#f3f7f8")); - this->setStyleSheet("#mainpage{background-color: transparent;border-radius:14px;}\ - QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color:#000000}\ - "); backButtom->setIcon(QIcon(":/icon/light/back.svg")); downloadButton->setBackgroundColor(QColor("#e3e4e4")); downloadButton->setColor(QColor("#66CCFF")); downloadButton->setIcon(":/icon/light/download.svg"); ui->pushButton_14->setIcon(QIcon(":/icon/light/update.svg")); - int i = 0; - while (i < ui->buttonGroup->buttons().size()) { + for (int i = 0; i < ui->buttonGroup->buttons().size(); i++) { ui->buttonGroup->buttons()[i]->setIcon(QIcon(":/icon/light/leftbutton_" + QString::number(i) + ".svg")); if (QLocale::system().name() == "zh_CN") { ui->buttonGroup->buttons()[i]->setStyleSheet("QPushButton{background-color:transparent;}\ @@ -116,69 +112,84 @@ MainWindow::MainWindow(QWidget *parent) QPushButton:hover{background-color:#eAeAeA;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}\ QPushButton:checked{background-color:#dddddd;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}"); } - i++; } } ui->pushButton_14->setStyleSheet(ui->pushButton_4->styleSheet()); ui->applistpage->setTheme(themeType == DGuiApplicationHelper::DarkType); ui->applistpage_1->setTheme(themeType == DGuiApplicationHelper::DarkType); ui->appintopage->setTheme(themeType == DGuiApplicationHelper::DarkType); - ui->settingspage->setTheme(themeType == DGuiApplicationHelper::DarkType); - }); + ui->settingspage->setTheme(themeType == DGuiApplicationHelper::DarkType); }); - //初始化标题栏控件 - connect(downloadButton, &ProgressButton::clicked, [=]() { + // 初始化标题栏控件 + connect(downloadButton, &ProgressButton::clicked, [=]() + { QPoint pos; pos.setX(downloadButton->mapToGlobal(QPoint(0, 0)).x() + downloadButton->width() / 2 - downloadlistwidget->width() / 2); pos.setY(downloadButton->mapToGlobal(QPoint(0, 0)).y() + downloadButton->height() + 5); downloadlistwidget->m_move(pos.x(), pos.y()); - downloadlistwidget->show(); - }); + downloadlistwidget->show(); }); - //appintopage按下下载按钮时标题栏下载列表按钮抖动 - connect(ui->appintopage, &AppIntoPage::clickedDownloadBtn, [=]() { - WidgetAnimation::widgetShake(downloadButton,6);//第一个参数是抖动的控件,第二个参数是抖动范围(像素) - }); + // appintopage按下下载按钮时标题栏下载列表按钮抖动 + connect(ui->appintopage, &AppIntoPage::clickedDownloadBtn, [=]() + { + WidgetAnimation::widgetShake(downloadButton, 6); // 第一个参数是抖动的控件,第二个参数是抖动范围(像素) + }); - connect(backButtom, &QPushButton::clicked, [=]() { + connect(backButtom, &QPushButton::clicked, [=]() + { ui->stackedWidget->setCurrentIndex(pageHistory.at(pageHistory.count() - 2)); pageHistory.removeLast(); if (pageHistory.count() > 1) { backButtom->show(); } else { backButtom->hide(); - } - }); + } }); downloadlistwidget->hide(); backButtom->hide(); ui->titlebar->setIcon(QIcon::fromTheme(":/icon/logo.svg")); + QWidget *w_titlebar = new QWidget(ui->titlebar); QHBoxLayout *ly_titlebar = new QHBoxLayout(w_titlebar); - QLabel *title = new QLabel(this); + QLabel *title = new QLabel(ui->titlebar); title->setText(tr("Spark Store")); searchEdit->setPlaceholderText(tr("Search or enter spk://")); ly_titlebar->addWidget(title); ly_titlebar->addWidget(backButtom); - ly_titlebar->addStretch(2.5); + + // Check wayland configs + QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); + if (!config.value("build/isDeepinOS").toBool() && config.value("build/useWayland").toBool()) + { + // Wayland 搜索栏居中 + ly_titlebar->addStretch(WaylandSearchCenter); + } + else + { + // dwayland dxcb 搜索栏顶部右侧居中 + ly_titlebar->addStretch(OtherSearchCenter); + } + ly_titlebar->addWidget(searchEdit); ly_titlebar->addWidget(downloadButton); - ly_titlebar->addStretch(1); + ly_titlebar->addStretch(RightSearchSpace); ui->titlebar->setCustomWidget(w_titlebar); - //侧边栏按钮 + // 侧边栏按钮 int i = 0; - while (i < ui->buttonGroup->buttons().size()) { + while (i < ui->buttonGroup->buttons().size()) + { ui->buttonGroup->buttons()[i]->setStyleSheet("QPushButton{qproperty-icon: url(data/images/userMangaer/teacher.png);}"); - connect(ui->buttonGroup->buttons()[i], &QPushButton::toggled, [=](bool checked) { + connect(ui->buttonGroup->buttons()[i], &QPushButton::toggled, [=](bool checked) + { if (checked == true) { searchEdit->clearEdit(); updateUi(i); - } - }); + } }); i++; } // 搜索事件 - connect(searchEdit, &DSearchEdit::returnPressed, this, [=]() { + connect(searchEdit, &DSearchEdit::returnPressed, this, [=]() + { QString searchtext = searchEdit->text(); if (!searchtext.isEmpty()) { if (searchtext.startsWith("spk://")) { @@ -189,32 +200,29 @@ MainWindow::MainWindow(QWidget *parent) switchPage(AppPageSearchlist); } } - this->setFocus(); - }); + this->setFocus(); }); - connect(downloadlistwidget, &DownloadListWidget::downloadProgress, this, [=](int i) { - downloadButton->setProgress(i); - }); + connect(downloadlistwidget, &DownloadListWidget::downloadProgress, this, [=](int i) + { downloadButton->setProgress(i); }); // 列表点击事件 - connect(ui->applistpage, &AppListPage::clicked, this, [=](QUrl spk) { - openUrl(spk); - }); - connect(ui->applistpage_1, &AppListPage::clicked, this, [=](QUrl spk) { - openUrl(spk); - }); - connect(ui->settingspage, &SettingsPage::openUrl, this, [=](QUrl spk) { - openUrl(spk); - }); + connect(ui->applistpage, &AppListPage::clicked, this, [=](QUrl spk) + { openUrl(spk); }); + connect(ui->applistpage_1, &AppListPage::clicked, this, [=](QUrl spk) + { openUrl(spk); }); + connect(ui->settingspage, &SettingsPage::openUrl, this, [=](QUrl spk) + { openUrl(spk); }); emit DGuiApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::instance()->themeType()); - initDbus(); + connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::newProcessInstance, this, &MainWindow::onNewProcessInstance); } MainWindow::~MainWindow() { - delete searchEdit; - delete downloadlistwidget; delete ui; + + if (downloadlistwidget) { + downloadlistwidget->deleteLater(); + } } void MainWindow::initDbus() @@ -223,25 +231,36 @@ void MainWindow::initDbus() QDBusConnection::sessionBus().registerService("com.gitee.spark.store"); QDBusConnection::sessionBus().registerObject("/com/gitee/spark/store", "com.gitee.spark.store", this); - connect(dbusInter,&DBusSparkStoreService::sigOpenUrl,this,&MainWindow::onGetUrl); + connect(dbusInter, &DBusSparkStoreService::sigOpenUrl, this, &MainWindow::onGetUrl); } void MainWindow::onGetUrl(const QString &url) { - if(url.left(6)=="spk://") - { + if (url.trimmed().startsWith("spk://")) { openUrl(QUrl(url)); } activateWindow(); } +void MainWindow::onNewProcessInstance(qint64 pid, const QStringList &arguments) +{ + Q_UNUSED(pid) + + if (arguments.size() > 1) { + onGetUrl(arguments.value(1)); + } +} + void MainWindow::openUrl(QUrl url) { - if (url.toString().startsWith("spk://")) { - ui->appintopage->openUrl(QUrl(url.toString().replace("+","%2B"))); + if (url.toString().startsWith("spk://")) + { + ui->appintopage->openUrl(QUrl(url.toString().replace("+", "%2B"))); switchPage(AppPageAppdetail); - } else { - QDesktopServices::openUrl(QUrl(url.toString().replace("+","%2B"))); + } + else + { + QDesktopServices::openUrl(QUrl(url.toString().replace("+", "%2B"))); } } @@ -252,50 +271,56 @@ void MainWindow::initConfig() dir.mkpath("/tmp/spark-store"); } -void MainWindow::switchPage(int now) //临时方案,回家后修改 +void MainWindow::switchPage(int now) // 临时方案,回家后修改 { qDebug() << pageHistory.count(); - if (pageHistory.count() >= 1) { + if (pageHistory.count() >= 1) + { backButtom->show(); - } else { + } + else + { backButtom->hide(); } ui->stackedWidget->setCurrentIndex(now); + ui->stackedWidget->currentWidget()->setFocus(); pageHistory << now; } -//刷新界面 +// 刷新界面 void MainWindow::updateUi(int now) { pageHistory.clear(); - QStringList itemlist; - itemlist << "" - << "network" - << "chat" - << "music" - << "video" - << "image_graphics" - << "games" - << "office" - << "reading" - << "development" - << "tools" - << "themes" - << "others"; - ui->applistpage->getAppList(itemlist[now]); - qDebug() << itemlist[now]; - switchPage(AppPageApplist); + QStringList itemlist; + itemlist << "" + << "network" + << "chat" + << "music" + << "video" + << "image_graphics" + << "games" + << "office" + << "reading" + << "development" + << "tools" + << "themes" + << "others"; + ui->applistpage->getAppList(itemlist[now]); + qDebug() << itemlist[now]; + switchPage(AppPageApplist); } void MainWindow::on_pushButton_14_clicked() { QFile upgradeStatus("/tmp/spark-store/upgradeStatus.txt"); - if (!upgradeStatus.exists()){ - QtConcurrent::run([=]{ + if (!upgradeStatus.exists()) + { + QtConcurrent::run([=] + { auto upgradeP = new QProcess(); upgradeP->startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh"); upgradeP->waitForStarted(); upgradeP->waitForFinished(-1); - }); + upgradeP->deleteLater(); }); } } diff --git a/src/mainwindow-dtk.h b/src/mainwindow-dtk.h index 1b2ea823fdaa94db497de14b9e3cee485c1707cb..3eab07940d949e9e251cfdb63f824c183b947edf 100644 --- a/src/mainwindow-dtk.h +++ b/src/mainwindow-dtk.h @@ -39,20 +39,20 @@ private: void switchPage(int now); void updateUi(int now); +private slots: + //接受来自dbus的url + void onGetUrl(const QString &url); + void onNewProcessInstance(qint64 pid, const QStringList &arguments); + void on_pushButton_14_clicked(); + private: QList pageHistory; + Ui::MainWindow *ui; DownloadListWidget *downloadlistwidget; ProgressButton *downloadButton; QPushButton *backButtom; - DSearchEdit *searchEdit = new DSearchEdit; - Ui::MainWindow *ui; - -private slots: - //接受来自dbus的url - void onGetUrl(const QString &url); - void on_pushButton_14_clicked(); - + DSearchEdit *searchEdit; }; #endif // MAINWINDOWDTK_H diff --git a/src/mainwindow-dtk.ui b/src/mainwindow-dtk.ui index 5399dbd0ddd894bf987e54926c84f36f3818866a..ccccf141139d82997ab30c4836e23ab7ad4b55b2 100644 --- a/src/mainwindow-dtk.ui +++ b/src/mainwindow-dtk.ui @@ -7,7 +7,7 @@ 0 0 1190 - 651 + 656 @@ -34,6 +34,12 @@ true + + .QWidget#mainpage { + background: transparent; + border-radius: 14px; +} + 0 diff --git a/src/pages/appintopage.cpp b/src/pages/appintopage.cpp index eebf9532904c24b1d51c245c5a5bfb048fd0a25a..86b2483a4fd584b16e0875fa79dfea883406a87e 100644 --- a/src/pages/appintopage.cpp +++ b/src/pages/appintopage.cpp @@ -1,20 +1,19 @@ #include "appintopage.h" #include "ui_appintopage.h" -AppIntoPage::AppIntoPage(QWidget *parent) : - QWidget(parent), - ui(new Ui::AppIntoPage) +AppIntoPage::AppIntoPage(QWidget *parent) : QWidget(parent), + ui(new Ui::AppIntoPage) { ui->setupUi(this); ui->listWidget->setViewMode(QListView::IconMode); ui->listWidget->setMovement(QListView::Static); ui->listWidget->setMaximumHeight(200); ui->listWidget->setFlow(QListView::TopToBottom); - api1=new SparkAPI(this); - connect(api1,&SparkAPI::finishedRAW,[=](QString download_times){ + api1 = new SparkAPI(this); + connect(api1, &SparkAPI::finishedRAW, [=](QString download_times) + { download_times.remove(QRegExp("\\n")); ui->download_times->setText(download_times); - qDebug()<<"Download Times:"+download_times; - }); + qDebug()<<"Download Times:"+download_times; }); clear(); } @@ -35,31 +34,31 @@ void AppIntoPage::clear() ui->downloadButton->hide(); ui->downloadButton->setEnabled(true); ui->pushButton_3->hide(); - int n=ui->listWidget->count(); - for(int i=0;ilistWidget->count(); + for (int i = 0; i < n; i++) { QListWidgetItem *item = ui->listWidget->takeItem(0); QWidget *card = ui->listWidget->itemWidget(item); delete card; - card = NULL; + card = NULL; delete item; - item = NULL; + item = NULL; } ui->listWidget->clear(); } void AppIntoPage::setDownloadWidget(DownloadListWidget *w) { - dw=w; - connect(w, &DownloadListWidget::downloadFinished, [=]() { - isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); - }); + dw = w; + connect(w, &DownloadListWidget::downloadFinished, [=]() + { isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); }); } void AppIntoPage::openUrl(QUrl url) { - spk=url; - SparkAPI *api=new SparkAPI(this); + spk = url; + SparkAPI *api = new SparkAPI(this); clear(); - connect(api,&SparkAPI::finishedObject,[=](QJsonObject appinfo){ + connect(api, &SparkAPI::finishedObject, [=](QJsonObject appinfo) + { info = appinfo; // qDebug()<sltAppinfoTags(&taglist); disconnect(api,&SparkAPI::finished,nullptr,nullptr); - api->deleteLater(); - }); + api->deleteLater(); }); api->getAppInfo(url); api1->getAppDownloadTimes(url); } void AppIntoPage::isDownloading(QUrl url) { - if (dw->getUrlList().lastIndexOf(url) == -1) { + if (dw->getUrlList().lastIndexOf(url) == -1) + { ui->downloadButton->setEnabled(true); return; - } else { + } + else + { ui->downloadButton->setEnabled(false); } ui->pushButton_3->hide(); - if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 2) { + if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 2) + { ui->downloadButton->setEnabled(true); ui->downloadButton->setText(tr("Download")); } - if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 1) { + if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 1) + { ui->downloadButton->setEnabled(true); ui->downloadButton->setText(tr("Install")); } - if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->isInstall) { + if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->isInstall) + { ui->downloadButton->setEnabled(false); ui->downloadButton->setText(tr("Installing")); return; } - if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 3) { + if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 3) + { ui->downloadButton->setEnabled(true); ui->downloadButton->setText(tr("Reinstall")); ui->downloadButton->show(); @@ -227,37 +232,37 @@ void AppIntoPage::isDownloading(QUrl url) void AppIntoPage::sltAppinfoTags(QStringList *tagList) { - foreach(const QString &tag, *tagList) + foreach (const QString &tag, *tagList) { - if(tag=="community") + if (tag == "community") { ui->tag_community->show(); } - else if(tag=="ubuntu") + else if (tag == "ubuntu") { ui->tag_ubuntu->show(); } - else if(tag=="deepin") + else if (tag == "deepin") { ui->tag_deepin->show(); } - else if(tag=="uos") + else if (tag == "uos") { ui->tag_uos->show(); } - else if(tag=="dtk5") + else if (tag == "dtk5") { ui->tag_dtk5->show(); } - else if(tag=="dwine2") + else if (tag == "dwine2") { ui->tag_dwine2->show(); } - else if(tag=="dwine5") + else if (tag == "dwine5") { ui->tag_dwine5->show(); } - else if(tag=="a2d") + else if (tag == "a2d") { ui->tag_a2d->show(); } @@ -265,9 +270,10 @@ void AppIntoPage::sltAppinfoTags(QStringList *tagList) } void AppIntoPage::setTheme(bool dark) { - if(dark) + if (dark) { - QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4{background-color: #252525;border-radius:14px;border:1px solid rgb(64, 64, 64);}"; + QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #252525; border-radius: 14px; border: 1px solid rgb(64, 64, 64);}\ + QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #FFFFFF}"; ui->frame->setStyleSheet(frameStyleSheet); ui->frame_2->setStyleSheet(frameStyleSheet); ui->frame_3->setStyleSheet(frameStyleSheet); @@ -281,7 +287,8 @@ void AppIntoPage::setTheme(bool dark) ui->icon_6->setPixmap(QPixmap(":/icon/dark/globe.svg")); }else { //亮色模式 - QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4{background-color: #fbfbfb;border-radius:14px;border:1px solid rgb(229,229,229);}"; + QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4 {background-color: #fbfbfb; border-radius: 14px; border: 1px solid rgb(229,229,229);}\ + QLabel#cardtitle,QLabel#title,QLabel#title_1,QLabel#title_2,QLabel#title_3 {color: #000000}"; ui->frame->setStyleSheet(frameStyleSheet); ui->frame_2->setStyleSheet(frameStyleSheet); ui->frame_3->setStyleSheet(frameStyleSheet); @@ -293,7 +300,6 @@ void AppIntoPage::setTheme(bool dark) ui->icon_4->setPixmap(QPixmap(":/icon/light/text.svg")); ui->icon_5->setPixmap(QPixmap(":/icon/light/folder.svg")); ui->icon_6->setPixmap(QPixmap(":/icon/light/globe.svg")); - } } AppIntoPage::~AppIntoPage() @@ -303,68 +309,67 @@ AppIntoPage::~AppIntoPage() void AppIntoPage::on_downloadButton_clicked() { - if(ui->downloadButton->text() == tr("Install")) + if (ui->downloadButton->text() == tr("Install")) { - dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())]->install(0); - isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); - QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,[=](){ + dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())]->install(0); + isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); + QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())], &DownloadItem::finished, [=]() + { isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); - disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); - }); + disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); }); return; } emit clickedDownloadBtn(); - dw->addItem(info["Name"].toString(),info["Filename"].toString(),info["Pkgname"].toString(),iconpixmap,SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); - if(ui->downloadButton->text() == tr("Reinstall")) + dw->addItem(info["Name"].toString(), info["Filename"].toString(), info["Pkgname"].toString(), iconpixmap, SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); + if (ui->downloadButton->text() == tr("Reinstall")) { dw->getDIList()[dw->allDownload - 1]->reinstall = true; } ui->downloadButton->setEnabled(false); - QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,[=](){ + QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())], &DownloadItem::finished, [=]() + { isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); - disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); - }); - isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); + disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); }); + isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); } void AppIntoPage::on_pushButton_3_clicked() { QtConcurrent::run([=]() { - ui->downloadButton->setEnabled(false); - ui->pushButton_3->setEnabled(false); + ui->downloadButton->setEnabled(false); + ui->pushButton_3->setEnabled(false); - QProcess uninstall; - uninstall.start("pkexec", QStringList() << "apt" << "purge" << "-y" << info["Pkgname"].toString().toLower()); - uninstall.waitForFinished(-1); + QProcess uninstall; + uninstall.start("pkexec", QStringList() << "apt" << "purge" << "-y" << info["Pkgname"].toString().toLower()); + uninstall.waitForFinished(-1); - QProcess check; - check.start("dpkg", QStringList() << "-s" << info["Pkgname"].toString().toLower()); - check.waitForFinished(10*1000); + QProcess check; + check.start("dpkg", QStringList() << "-s" << info["Pkgname"].toString().toLower()); + check.waitForFinished(10*1000); - if (check.readAllStandardOutput().isEmpty()) - { - ui->downloadButton->setText(tr("Install")); - ui->pushButton_3->hide(); + if (check.readAllStandardOutput().isEmpty()) + { + ui->downloadButton->setText(tr("Install")); + ui->pushButton_3->hide(); - updatesEnabled(); - Utils::sendNotification("spark-store",tr("Spark Store"),tr("Uninstall succeeded")); - } + updatesEnabled(); + Utils::sendNotification("spark-store",tr("Spark Store"),tr("Uninstall succeeded")); + } - ui->downloadButton->setEnabled(true); - ui->pushButton_3->setEnabled(true); + ui->downloadButton->setEnabled(true); + ui->pushButton_3->setEnabled(true); }); } void AppIntoPage::on_shareButton_clicked() { qDebug() << "Share" << spk; - Utils::sendNotification("spark-store",tr("Spark Store"),tr("The URL has been copied to the clipboard")); + Utils::sendNotification("spark-store", tr("Spark Store"), tr("The URL has been copied to the clipboard")); QClipboard *clipboard = QApplication::clipboard(); clipboard->setText(spk.toString()); } - void AppIntoPage::on_updateButton_clicked() { QString feedbackSpk = "spk://store/chat/store.spark-app.feedback"; @@ -374,9 +379,9 @@ void AppIntoPage::on_updateButton_clicked() qDebug() << "反馈器存在"; QProcess::startDetached("sh /opt/durapps/store.spark-app.feedback/launch.sh"); } - else{ + else + { qDebug() << "反馈器不存在,跳转页面"; openUrl(feedbackSpk); } } - diff --git a/src/pages/applistpage.cpp b/src/pages/applistpage.cpp index 7ea357b195d7faf276dbb599f8b7c292dff9bce3..913db5b470733f502349b602c21622f31aa9abd0 100644 --- a/src/pages/applistpage.cpp +++ b/src/pages/applistpage.cpp @@ -1,48 +1,55 @@ #include "applistpage.h" #include "ui_applistpage.h" -AppListPage::AppListPage(QWidget *parent) : - QWidget(parent), - ui(new Ui::AppListPage) +AppListPage::AppListPage(QWidget *parent) : QWidget(parent), + ui(new Ui::AppListPage) { ui->setupUi(this); ui->webEngineView->page()->setBackgroundColor(Qt::transparent); } void AppListPage::setTheme(bool dark) { - isDark=dark; - if(dark) + isDark = dark; + if (dark) { this->setStyleSheet("#frame{background-color: #252525;border-radius:14px;border:1px solid rgb(64, 64, 64);}"); - }else { - //亮色模式 + } + else + { + // 亮色模式 this->setStyleSheet("#frame{background-color: #ffffff;border-radius:14px;border:1px solid rgb(229,229,229);}"); } - if(isSearch) + if (isSearch) { getSearchList(nowType); - }else{ + } + else + { getAppList(nowType); } } void AppListPage::getAppList(QString type) { - isSearch=false; - nowType=type; - SparkAPI *api=new SparkAPI(this); + isSearch = false; + nowType = type; + SparkAPI *api = new SparkAPI(this); QString url; QString theme; - if(isDark) + if (isDark) { - theme="theme=dark"; - }else{ - theme="theme=light"; + theme = "theme=dark"; } - if(type=="") + else { - url=api->getServerUrl()+"store/#/flamescion/?"+theme; - }else{ - url=api->getServerUrl()+"store/#/flamescion/applist?type="+type+"&"+theme; + theme = "theme=light"; + } + if (type == "") + { + url = api->getServerUrl() + "store/#/flamescion/?" + theme; + } + else + { + url = api->getServerUrl() + "store/#/flamescion/applist?type=" + type + "&" + theme; } ui->webEngineView->setUrl(url); @@ -50,18 +57,20 @@ void AppListPage::getAppList(QString type) void AppListPage::getSearchList(QString keyword) { - isSearch=true; - nowType=keyword; - SparkAPI *api=new SparkAPI(this); + isSearch = true; + nowType = keyword; + SparkAPI *api = new SparkAPI(this); QString url; QString theme; - if(isDark) + if (isDark) + { + theme = "theme=dark"; + } + else { - theme="theme=dark"; - }else{ - theme="theme=light"; + theme = "theme=light"; } - url=api->getServerUrl()+"store/#/flamescion/search?keywords="+keyword+"&"+theme; + url = api->getServerUrl() + "store/#/flamescion/search?keywords=" + keyword + "&" + theme; ui->webEngineView->setUrl(url); } @@ -72,15 +81,14 @@ AppListPage::~AppListPage() void AppListPage::on_webEngineView_urlChanged(const QUrl &arg1) { - if(arg1.path().right(8) == "app.json") - { - QString url = arg1.toString(); - url = url.mid(url.indexOf("/store/")); - url = "spk:/"+url; - url = url.mid(0,url.indexOf("/app.json")); - qDebug() << "程序跳转链接地址:" << url; - ui->webEngineView->back(); - emit clicked(url); - } + if (arg1.path().right(8) == "app.json") + { + QString url = arg1.toString(); + url = url.mid(url.indexOf("/store/")); + url = "spk:/" + url; + url = url.mid(0, url.indexOf("/app.json")); + qDebug() << "程序跳转链接地址:" << url; + ui->webEngineView->back(); + emit clicked(url); + } } - diff --git a/src/pages/settingspage.cpp b/src/pages/settingspage.cpp index 6c0d431a673614da27394c80f69af70f94c4621b..859caf3f38ff1bc3a1e7fa9166844eab2f964fb7 100644 --- a/src/pages/settingspage.cpp +++ b/src/pages/settingspage.cpp @@ -1,22 +1,35 @@ #include "settingspage.h" #include "ui_settingspage.h" +#include "../backend/sparkapi.h" +#include "utils/utils.h" + +#include +#include +#include + +#define TMP_PATH "/tmp/spark-store" + bool SettingsPage::isdownload = false; -SettingsPage::SettingsPage(QWidget *parent) : - QWidget(parent), - ui(new Ui::SettingsPage) + +SettingsPage::SettingsPage(QWidget *parent) + : QWidget(parent) + , ui(new Ui::SettingsPage) { ui->setupUi(this); + configCanSave = false; initConfig(); } void SettingsPage::setTheme(bool dark) { - if(dark) + if (dark) { this->setStyleSheet("#frame{background-color: #252525;border-radius:14px;border:1px solid rgb(64, 64, 64);}"); - }else { - //亮色模式 + } + else + { + // 亮色模式 this->setStyleSheet("#frame{background-color: #ffffff;border-radius:14px;border:1px solid rgb(229,229,229);}"); } } @@ -24,38 +37,40 @@ void SettingsPage::setTheme(bool dark) void SettingsPage::readServerList() { // 读取服务器列表并初始化 - QFile file(QDir::homePath().toUtf8() + "/.config/spark-store/server.list"); + QFile file(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/server.list"); - //判断文件是否存在 + // 判断文件是否存在 if (!file.exists()) { ui->comboBox_server->addItem("https://d.store.deepinos.org.cn/"); + return; } if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - qDebug()<<"无法读取server.list"; + qWarning() << "无法读取 server.list"; + return; } - //创建QTextStream对象 + // 创建 QTextStream 对象 QTextStream textStream(&file); - QString lineData = textStream.readLine();//读取文件的第一行 + QString lineData = textStream.readLine(); // 读取文件的第一行 ui->comboBox_server->addItem(lineData); - while(!lineData.isNull()) + while (!lineData.isNull()) { lineData = textStream.readLine(); ui->comboBox_server->addItem(lineData); } - for(int i = 0; i < ui->comboBox_server->count(); i++) + for (int i = 0; i < ui->comboBox_server->count(); i++) { - if(ui->comboBox_server->itemText(i) == "开发者模式 Dev only") + if (ui->comboBox_server->itemText(i) == "开发者模式 Dev only") { ui->comboBox_server->model()->setData(ui->comboBox_server->model()->index(i, 0), QVariant(0), Qt::UserRole - 1); } - if(ui->comboBox_server->itemText(i) == "镜像源 Download only") + if (ui->comboBox_server->itemText(i) == "镜像源 Download only") { - for(int j = i; j < ui->comboBox_server->count(); j++) + for (int j = i; j < ui->comboBox_server->count(); j++) { ui->comboBox_server->model()->setData(ui->comboBox_server->model()->index(j, 0), QVariant(0), Qt::UserRole - 1); } @@ -70,14 +85,14 @@ void SettingsPage::initConfig() readServerList(); // 读取服务器URL并初始化菜单项的链接 - QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat); - if(!readConfig.value("server/choose").toString().isEmpty() && readConfig.value("server/updated").toString() == "TRUE") + QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); + if (!config.value("server/choose").toString().isEmpty() && config.value("server/updated").toBool()) { - qDebug()<comboBox_server->setCurrentText(readConfig.value("server/choose").toString()); - SparkAPI::setServerUrl(readConfig.value("server/choose").toString()); + qDebug() << config.value("server/choose").toString(); + ui->comboBox_server->setCurrentText(config.value("server/choose").toString()); + SparkAPI::setServerUrl(config.value("server/choose").toString()); } - configCanSave = true; // 防止触发保存配置信号 + configCanSave = true; //  防止触发保存配置信号 } SettingsPage::~SettingsPage() @@ -92,8 +107,8 @@ void SettingsPage::on_pushButton_updateServer_clicked() ui->pushButton_updateServer->setEnabled(false); ui->comboBox_server->clear(); - QFile::remove(QDir::homePath().toUtf8() + "/.config/spark-store/server.list"); - system("curl -o " + QDir::homePath().toUtf8() + "/.config/spark-store/server.list https://d.store.deepinos.org.cn/store/server-and-mirror.list"); + QFile::remove(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/server.list"); + system("curl -o " + QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation).toUtf8() + "/server.list https://d.store.deepinos.org.cn/store/server-and-mirror.list"); ui->pushButton_updateServer->setEnabled(true); readServerList(); @@ -101,19 +116,18 @@ void SettingsPage::on_pushButton_updateServer_clicked() }); } - void SettingsPage::on_comboBox_server_currentIndexChanged(const QString &arg1) { - SparkAPI::setServerUrl(arg1); // 服务器信息更新 -qDebug()<label_setting1->show(); - QSettings *setConfig = new QSettings(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat); - setConfig->setValue("server/choose", arg1); - setConfig->setValue("server/updated", updatedInfo); - setConfig->deleteLater(); + QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat); + config.setValue("server/choose", arg1); + config.setValue("server/updated", updatedInfo); + config.sync(); } } @@ -124,7 +138,7 @@ void SettingsPage::setIsDownload(bool isdownload) void SettingsPage::updateUI() { - if(isdownload) + if (isdownload) { ui->pushButton_clear->setEnabled(false); } @@ -135,15 +149,15 @@ void SettingsPage::updateUI() // 显示缓存占用空间 quint64 tmp_size = dirFileSize(QString::fromUtf8(TMP_PATH)); QString tmp_size_str; - if(tmp_size < 1024) + if (tmp_size < 1024) { tmp_size_str = QString::number(tmp_size) + "B"; } - else if(tmp_size < (1024 * 1024)) + else if (tmp_size < (1024 * 1024)) { tmp_size_str = QString::number(0.01 * int(100 * (tmp_size / 1024))) + "KB"; } - else if(tmp_size<(1024*1024*1024)) + else if (tmp_size < (1024 * 1024 * 1024)) { tmp_size_str = QString::number(0.01 * int(100 * (tmp_size / (1024 * 1024)))) + "MB"; } @@ -160,13 +174,13 @@ quint64 SettingsPage::dirFileSize(const QString &path) QDir dir(path); quint64 size = 0; // dir.entryInfoList(QDir::Files); // 返回文件信息 - foreach(QFileInfo fileInfo, dir.entryInfoList(QDir::Files)) + foreach (QFileInfo fileInfo, dir.entryInfoList(QDir::Files)) { // 计算文件大小 size += quint64(fileInfo.size()); } // dir.entryList(QDir::Dirs|QDir::NoDotAndDotDot); // 返回所有子目录,并进行过滤 - foreach(QString subDir, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) + foreach (QString subDir, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { // 若存在子目录,则递归调用 dirFileSize() 函数 size += dirFileSize(path + QDir::separator() + subDir); @@ -185,10 +199,9 @@ void SettingsPage::on_pushButton_updateApt_clicked() ui->label_aptserver->setText(tr("")); ui->pushButton_updateApt->setEnabled(true); - }); + }); } - void SettingsPage::on_pushButton_clear_clicked() { QtConcurrent::run([=]() @@ -208,19 +221,18 @@ void SettingsPage::on_pushButton_clear_clicked() }); } - void SettingsPage::on_pushButton_clearWebCache_clicked() { QtConcurrent::run([=]() { - QString dataLocal = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation); - qDebug() << dataLocal; - QDir dataDir(dataLocal); + QString localDataLocation = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/QtWebEngine"; + qDebug() << localDataLocation; + QDir dataDir(localDataLocation); dataDir.removeRecursively(); - dataLocal = QStandardPaths::writableLocation(QStandardPaths::TempLocation); - qDebug() << dataLocal; - QDir cacheDir(dataLocal); + + QString cacheLocation = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/QtWebEngine"; + qDebug() << cacheLocation; + QDir cacheDir(cacheLocation); cacheDir.removeRecursively(); }); } - diff --git a/src/pages/settingspage.h b/src/pages/settingspage.h index 6294283919255649e2bb3571bacf8febf9d6223f..f65347f4611f6ee0240176e328090f1066fb26fb 100644 --- a/src/pages/settingspage.h +++ b/src/pages/settingspage.h @@ -2,14 +2,7 @@ #define SETTINGSPAGE_H #include -#include -#include -#include -#include -#include -#include "../backend/sparkapi.h" -#include "utils/utils.h" -#define TMP_PATH "/tmp/spark-store" +#include namespace Ui { class SettingsPage; diff --git a/src/spark-store.pro b/src/spark-store.pro index d01287b7150338efe8552b1de950d7dcd165a0a3..1d10d002253cde474ed860f96ee6185bd139197c 100644 --- a/src/spark-store.pro +++ b/src/spark-store.pro @@ -4,7 +4,7 @@ # #------------------------------------------------- -QT += core gui network concurrent webenginewidgets dbus svg +QT += core gui concurrent dbus network svg webenginewidgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets @@ -22,78 +22,75 @@ DEFINES += QT_DEPRECATED_WARNINGS # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -DEFINES += QT_APP_DEBUG +# Disable qWarning / qDebug output in Release +# CONFIG(release, debug|release): DEFINES += QT_NO_WARNING_OUTPUT QT_NO_DEBUG_OUTPUT CONFIG += c++11 link_pkgconfig PKGCONFIG += dtkcore dtkgui dtkwidget -# Disable qWarning / qDebug output in Release -CONFIG(release, debug|release): DEFINES += QT_NO_WARNING_OUTPUT QT_NO_DEBUG_OUTPUT - -# Update translation files -CONFIG(release, debug|release): system(bash $${PWD}/translate_generation.sh) - -TRANSLATIONS += \ - ../translations/spark-store_en.ts \ - ../translations/spark-store_fr.ts \ - ../translations/spark-store_zh_CN.ts - SOURCES += \ - dbus/dbussparkstoreservice.cpp \ - main.cpp \ - mainwindow-dtk.cpp \ + backend/downloadworker.cpp \ + backend/image_show.cpp \ backend/sparkapi.cpp \ + dbus/dbussparkstoreservice.cpp \ + pages/appintopage.cpp \ + pages/applistpage.cpp \ pages/settingspage.cpp \ + utils/httprequest.cpp \ utils/utils.cpp \ utils/widgetanimation.cpp \ - widgets/common/progressbutton.cpp \ - widgets/common/webenginepage.cpp \ - widgets/common/webengineview.cpp \ - widgets/downloadlistwidget.cpp \ + widgets/base/basewidgetopacity.cpp \ widgets/common/downloaditem.cpp \ + widgets/common/progressbutton.cpp \ widgets/common/smoothlistwidget.cpp \ widgets/common/smoothscrollbar.cpp \ - utils/httprequest.cpp \ - pages/applistpage.cpp \ - backend/downloadworker.cpp \ - pages/appintopage.cpp \ + widgets/common/webenginepage.cpp \ + widgets/common/webengineview.cpp \ widgets/big_image.cpp \ - backend/image_show.cpp \ - widgets/base/basewidgetopacity.cpp + widgets/downloadlistwidget.cpp \ + application.cpp \ + main.cpp \ + mainwindow-dtk.cpp HEADERS += \ - dbus/dbussparkstoreservice.h \ - mainwindow-dtk.h \ + backend/downloadworker.h \ + backend/image_show.h \ backend/sparkapi.h \ + dbus/dbussparkstoreservice.h \ + pages/appintopage.h \ + pages/applistpage.h \ pages/settingspage.h \ + utils/httprequest.h \ utils/utils.h \ utils/widgetanimation.h \ - widgets/common/progressbutton.h \ - widgets/common/webenginepage.h \ - widgets/common/webengineview.h \ - widgets/downloadlistwidget.h \ + widgets/base/basewidgetopacity.h \ widgets/common/downloaditem.h \ + widgets/common/progressbutton.h \ widgets/common/smoothlistwidget.h \ widgets/common/smoothscrollbar.h \ - utils/httprequest.h \ - pages/applistpage.h \ - backend/downloadworker.h \ - pages/appintopage.h \ + widgets/common/webenginepage.h \ + widgets/common/webengineview.h \ widgets/big_image.h \ - backend/image_show.h \ - widgets/base/basewidgetopacity.h + widgets/downloadlistwidget.h \ + application.h \ + mainwindow-dtk.h FORMS += \ - mainwindow-dtk.ui \ + pages/appintopage.ui \ + pages/applistpage.ui \ pages/settingspage.ui \ - widgets/downloadlistwidget.ui \ widgets/common/downloaditem.ui \ - pages/applistpage.ui \ - pages/appintopage.ui + widgets/downloadlistwidget.ui \ + mainwindow-dtk.ui RESOURCES += \ assets/assets.qrc +TRANSLATIONS += \ + ../translations/spark-store_en.ts \ + ../translations/spark-store_fr.ts \ + ../translations/spark-store_zh_CN.ts + # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/durapps/$${TARGET}/bin diff --git a/src/utils/httprequest.cpp b/src/utils/httprequest.cpp index a9a73dd296f483af3a98ce30eb2e787e9c67e13e..c4cf95a1fa5a224b1e08fb36c7eb7b1b81290fcb 100644 --- a/src/utils/httprequest.cpp +++ b/src/utils/httprequest.cpp @@ -1,22 +1,19 @@ #include "httprequest.h" - - HttpRequest::HttpRequest() { - } void HttpRequest::getRequest(QNetworkRequest request) { - QNetworkAccessManager *naManager=new QNetworkAccessManager(this); + QNetworkAccessManager *naManager = new QNetworkAccessManager(this); request.setRawHeader("User-Agent", "Mozilla/5.0"); request.setRawHeader("Content-Type", "charset='utf-8'"); request.setRawHeader("Content-Type", "application/json"); naManager->get(request); - QObject::connect(naManager,&QNetworkAccessManager::finished,this,&HttpRequest::readdata_slot); + QObject::connect(naManager, &QNetworkAccessManager::finished, this, &HttpRequest::readdata_slot); } void HttpRequest::readdata_slot(QNetworkReply *reply) { @@ -24,19 +21,19 @@ void HttpRequest::readdata_slot(QNetworkReply *reply) } QString HttpRequest::postRequest(QString url, QString jsondata) { - QByteArray array= jsondata.toLatin1(); + QByteArray array = jsondata.toLatin1(); QNetworkRequest request; - QNetworkAccessManager *naManager=new QNetworkAccessManager(this); - QUrl strUrl = url.replace("+","%2B"); + QNetworkAccessManager *naManager = new QNetworkAccessManager(this); + QUrl strUrl = url.replace("+", "%2B"); request.setUrl(strUrl); request.setRawHeader("Content-Type", "charset='utf-8'"); request.setRawHeader("Content-Type", "application/json"); - QNetworkReply* reply = naManager->post(request, array); + QNetworkReply *reply = naManager->post(request, array); QEventLoop eventLoop; - connect(naManager, SIGNAL(finished(QNetworkReply*)), &eventLoop, SLOT(quit())); + connect(naManager, SIGNAL(finished(QNetworkReply *)), &eventLoop, SLOT(quit())); eventLoop.exec(); - QTextCodec* codec = QTextCodec::codecForName("utf8"); + QTextCodec *codec = QTextCodec::codecForName("utf8"); QString strReply = codec->toUnicode(reply->readAll()); reply->deleteLater(); return strReply; diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index f475c1f35a78c538b4beaeab4db54265ccc6f296..d57b4037423db1b33c4fdbfdeea683f9ebd6cd1c 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -2,18 +2,17 @@ Utils::Utils() { - } -//这个函数是chatGPT写的 -void Utils::sendNotification(QString icon,QString title,QString body) +// Author: chatGPT +void Utils::sendNotification(QString icon, QString title, QString body) { QDBusInterface iface("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications"); QVariantList args; - args << QCoreApplication::applicationName() // the name of the application + args << QCoreApplication::applicationName() // the name of the application << (uint)0 // replaces the previous notification with the same ID << icon // the application icon of the notification << title // the title of the notification diff --git a/src/utils/widgetanimation.cpp b/src/utils/widgetanimation.cpp index f74b1300186760ebe8d114c030269020c4aa0020..ee6fe64c5c1df7441d6957028dc38285083d036f 100644 --- a/src/utils/widgetanimation.cpp +++ b/src/utils/widgetanimation.cpp @@ -2,43 +2,45 @@ WidgetAnimation::WidgetAnimation() { - } void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange) { int nX = pWidget->x(); int nY = pWidget->y(); - QPropertyAnimation *pAnimation = new QPropertyAnimation(pWidget,"geometry"); + QPropertyAnimation *pAnimation = new QPropertyAnimation(pWidget, "geometry"); pAnimation->setEasingCurve(QEasingCurve::InOutSine); pAnimation->setDuration(400); - pAnimation->setStartValue(QRect(QPoint(nX,nY),pWidget->size())); + pAnimation->setStartValue(QRect(QPoint(nX, nY), pWidget->size())); int nShakeCount = 8; - double nStep = 1.0/nShakeCount; - for(int i = 1; i < nShakeCount; i++){ - nRange = i&1 ? -nRange : nRange; - pAnimation->setKeyValueAt(nStep*i,QRect(QPoint(nX + nRange,nY),pWidget->size())); + double nStep = 1.0 / nShakeCount; + for (int i = 1; i < nShakeCount; i++) + { + nRange = i & 1 ? -nRange : nRange; + pAnimation->setKeyValueAt(nStep * i, QRect(QPoint(nX + nRange, nY), pWidget->size())); } - pAnimation->setEndValue(QRect(QPoint(nX,nY),pWidget->size())); + pAnimation->setEndValue(QRect(QPoint(nX, nY), pWidget->size())); pAnimation->start(QAbstractAnimation::DeleteWhenStopped); } -QPropertyAnimation* WidgetAnimation::createWidgetOpacity(QWidget *pWidget, bool isAppear) +QPropertyAnimation *WidgetAnimation::createWidgetOpacity(QWidget *pWidget, bool isAppear) { QPropertyAnimation *animation = new QPropertyAnimation(pWidget, "windowOpacity", pWidget); - //设置动画效果 + // 设置动画效果 animation->setEasingCurve(QEasingCurve::Linear); - //设置动画时间(单位:毫秒) + // 设置动画时间(单位:毫秒) animation->setDuration(500); // 设置动画步长值,以及在该位置时显示的透明度 - if(isAppear) + if (isAppear) { animation->setKeyValueAt(0, 0); // m_animation->setKeyValueAt(0.5, 0); animation->setKeyValueAt(1, 1); - }else{ + } + else + { animation->setKeyValueAt(0, 1); animation->setKeyValueAt(1, 0); } @@ -46,7 +48,7 @@ QPropertyAnimation* WidgetAnimation::createWidgetOpacity(QWidget *pWidget, bool } void WidgetAnimation::widgetOpacity(QWidget *pWidget, bool isAppear) -{ +{ // 开始动画 createWidgetOpacity(pWidget, isAppear)->start(); } diff --git a/src/widgets/base/basewidgetopacity.cpp b/src/widgets/base/basewidgetopacity.cpp index 224e74a6760782bbb21c6cec926f3a5396b109f6..fcff23fb1384565b1953285835712b3c6873824d 100644 --- a/src/widgets/base/basewidgetopacity.cpp +++ b/src/widgets/base/basewidgetopacity.cpp @@ -5,14 +5,15 @@ BaseWidgetOpacity::BaseWidgetOpacity(QWidget *parent) : DBlurEffectWidget(parent) { -// WidgetAnimation::widgetOpacity(this,true); + // WidgetAnimation::widgetOpacity(this,true); } /// @brief 窗口关闭事件 /// @param event void BaseWidgetOpacity::closeEvent(QCloseEvent *event) { - if (!closeWindowAnimation) { + if (!closeWindowAnimation) + { closeWindowAnimation = true; QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity"); @@ -21,18 +22,20 @@ void BaseWidgetOpacity::closeEvent(QCloseEvent *event) animation->setStartValue(1.0); animation->setEndValue(0.0); - QObject::connect(animation, &QPropertyAnimation::valueChanged, this, [=](const QVariant &value){ - this->update(); - // setWindowTitle(QString("ヾ(⌒∇⌒*)See You♪ - %1%").arg(int(value.toFloat() * 100))); - }); + QObject::connect(animation, &QPropertyAnimation::valueChanged, this, [=](const QVariant &value) + { + this->update(); + // setWindowTitle(QString("ヾ(⌒∇⌒*)See You♪ - %1%").arg(int(value.toFloat() * 100))); + }); - QObject::connect(animation, &QPropertyAnimation::finished, this, [=](){ - this->close(); - }); + QObject::connect(animation, &QPropertyAnimation::finished, this, [=]() + { this->close(); }); animation->start(); event->ignore(); - } else { + } + else + { event->accept(); } } diff --git a/src/widgets/big_image.cpp b/src/widgets/big_image.cpp index b8d7afaa24c7ce374a128641f3244c6f208883ed..2549b599c89269d025489d4aa60ca7c6190d2b1a 100644 --- a/src/widgets/big_image.cpp +++ b/src/widgets/big_image.cpp @@ -3,11 +3,10 @@ #include #include -big_image::big_image(DBlurEffectWidget *parent) : - DBlurEffectWidget(parent), - m_image(new QLabel) +big_image::big_image(DBlurEffectWidget *parent) : DBlurEffectWidget(parent), + m_image(new QLabel) { -// setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint); // 设置图片对话框总在最前 + // setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint); // 设置图片对话框总在最前 setWindowModality(Qt::ApplicationModal); // 以上无效不如直接使用 模态化对话框 setRadius(0); setMaskAlpha(60); diff --git a/src/widgets/common/downloaditem.cpp b/src/widgets/common/downloaditem.cpp index bff0095185f798ee28d0c3239ff27b20d35e922c..2c8513b5359a664b12e35a818489bc27db452ed6 100644 --- a/src/widgets/common/downloaditem.cpp +++ b/src/widgets/common/downloaditem.cpp @@ -6,13 +6,12 @@ bool DownloadItem::isInstall = false; -DownloadItem::DownloadItem(QWidget *parent) : - QWidget(parent), - reinstall(false), - close(false), - ui(new Ui::DownloadItem), - output_w(new DDialog), - textbrowser(new QTextBrowser) +DownloadItem::DownloadItem(QWidget *parent) : QWidget(parent), + reinstall(false), + close(false), + ui(new Ui::DownloadItem), + output_w(new DDialog), + textbrowser(new QTextBrowser) { ui->setupUi(this); @@ -34,7 +33,7 @@ void DownloadItem::setValue(qint64 value) { ui->progressBar->setValue(qint32(value)); ui->label_2->setText(QString::number(double(value) / 100) + "% (" + speed + ")"); - if(ui->label_2->text().left(4) == "100%") + if (ui->label_2->text().left(4) == "100%") { download = 1; ui->label_2->setText(tr("Download Complete.")); @@ -58,7 +57,7 @@ QString DownloadItem::getName() void DownloadItem::readyInstall() { - if(!close) + if (!close) { ui->progressBar->hide(); ui->pushButton_install->setEnabled(true); @@ -90,7 +89,7 @@ void DownloadItem::setSpeed(QString s) void DownloadItem::install(int t) { - if(!isInstall) + if (!isInstall) { isInstall = true; ui->pushButton_install->hide(); @@ -164,10 +163,9 @@ void DownloadItem::install(int t) ui->widget_spinner->hide(); DownloadItem::isInstall = false; - emit finished(); - }); + emit finished(); }); // emit finished(); - qDebug()<label_filename->text().toUtf8(); + qDebug() << ui->label_filename->text().toUtf8(); } } diff --git a/src/widgets/common/progressbutton.cpp b/src/widgets/common/progressbutton.cpp index a58532b3419a44aed84ab8a7bc168c6f602c5ad5..59eaf532ae4be78166dc9bd2678ae99246b72c15 100644 --- a/src/widgets/common/progressbutton.cpp +++ b/src/widgets/common/progressbutton.cpp @@ -8,15 +8,15 @@ ProgressButton::ProgressButton(QWidget *parent) : QWidget{parent} { - //this->setWindowFlags(Qt::FramelessWindowHint); + // this->setWindowFlags(Qt::FramelessWindowHint); this->setAttribute(Qt::WA_TranslucentBackground, true); setMinimumWidth(36); setMinimumHeight(36); - svgPath=""; - backColor=Qt::transparent; + svgPath = ""; + backColor = Qt::transparent; setMouseTracking(true); - connect(this,&ProgressButton::startProcessing,this,&ProgressButton::operationProcessing,Qt::QueuedConnection); + connect(this, &ProgressButton::startProcessing, this, &ProgressButton::operationProcessing, Qt::QueuedConnection); } ProgressButton::~ProgressButton() @@ -26,63 +26,63 @@ ProgressButton::~ProgressButton() void ProgressButton::paintEvent(QPaintEvent *event) { QPainter painter(this); - painter.setRenderHint(QPainter::Antialiasing,true); + painter.setRenderHint(QPainter::Antialiasing, true); auto rect = event->rect(); - if(buttonState == state::normal || buttonState == state::hover) + if (buttonState == state::normal || buttonState == state::hover) { auto radiu = (rect.height() - 6) / 2; painter.translate(rect.center()); painter.setPen(Qt::transparent); painter.setBrush(QColor(buttonState == state::normal ? color : color.darker())); - //painter.drawEllipse(QPoint(0,0),radiu,radiu); + // painter.drawEllipse(QPoint(0,0),radiu,radiu); - //radiu -= 3; + // radiu -= 3; painter.setBrush(backColor); - painter.drawEllipse(QPoint(0,0),radiu,radiu); + painter.drawEllipse(QPoint(0, 0), radiu, radiu); QSvgRenderer m_svgRender; m_svgRender.load(svgPath); - m_svgRender.render(&painter ,QRectF(-radiu / 2,-radiu / 2,radiu,radiu)); + m_svgRender.render(&painter, QRectF(-radiu / 2, -radiu / 2, radiu, radiu)); } - else if(buttonState == state::openProgress) + else if (buttonState == state::openProgress) { painter.translate(rect.center()); - auto radiu = (rect.height() - 6) / 2 -3; + auto radiu = (rect.height() - 6) / 2 - 3; painter.setBrush(backColor); - painter.setPen(QPen(backColor,3)); - painter.drawEllipse(QPoint(0,0),radiu,radiu); + painter.setPen(QPen(backColor, 3)); + painter.drawEllipse(QPoint(0, 0), radiu, radiu); - painter.setPen(QPen(backColor,3)); + painter.setPen(QPen(backColor, 3)); QSvgRenderer m_svgRender; m_svgRender.load(svgPath); - m_svgRender.render(&painter ,QRectF(-radiu / 2,-radiu / 2,radiu,radiu)); + m_svgRender.render(&painter, QRectF(-radiu / 2, -radiu / 2, radiu, radiu)); QRect rect = QRect(-radiu, -radiu, - radiu*2, radiu*2); + radiu * 2, radiu * 2); - painter.setPen(QPen(color.darker(100),3)); + painter.setPen(QPen(color.darker(100), 3)); auto angle = progress * 360 / 100; - painter.drawArc(rect.adjusted(-3,-3,3,3),90 * 16,-static_cast(angle * 16)); + painter.drawArc(rect.adjusted(-3, -3, 3, 3), 90 * 16, -static_cast(angle * 16)); } - else if(buttonState == state::closeProgress) + else if (buttonState == state::closeProgress) { auto radiu = (rect.height() - 6) / 2; painter.translate(rect.center()); painter.setPen(Qt::transparent); painter.setBrush(QColor(0, 0, 0, 63)); - painter.drawEllipse(QPoint(0,0),radiu,radiu); + painter.drawEllipse(QPoint(0, 0), radiu, radiu); radiu -= 3; painter.setBrush(backColor); - painter.drawEllipse(QPoint(0,0),radiu,radiu); + painter.drawEllipse(QPoint(0, 0), radiu, radiu); - painter.setPen(QPen(color,3,Qt::SolidLine,Qt::RoundCap,Qt::RoundJoin)); - painter.drawLine(QPoint(-radiu / 3,0), - QPoint(-radiu / 5,radiu / 3)); - painter.drawLine(QPoint(-radiu / 5,radiu / 3), - QPoint(radiu / 4,-radiu / 4)); + painter.setPen(QPen(color, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + painter.drawLine(QPoint(-radiu / 3, 0), + QPoint(-radiu / 5, radiu / 3)); + painter.drawLine(QPoint(-radiu / 5, radiu / 3), + QPoint(radiu / 4, -radiu / 4)); } } @@ -90,12 +90,12 @@ void ProgressButton::setProgress(int progress) { buttonState = state::openProgress; ProgressButton::progress = progress; - if(progress == 0) + if (progress == 0) { buttonState = state::normal; update(); } - if(progress == 100) + if (progress == 100) { buttonState = state::closeProgress; update(); @@ -127,7 +127,7 @@ void ProgressButton::setColor(QColor color) void ProgressButton::leaveEvent(QEvent *event) { - if(buttonState == state::hover) + if (buttonState == state::hover) { buttonState = state::normal; update(); @@ -137,12 +137,12 @@ void ProgressButton::leaveEvent(QEvent *event) void ProgressButton::mousePressEvent(QMouseEvent *event) { - if(buttonState == state::hover || buttonState == state::normal) + if (buttonState == state::hover || buttonState == state::normal) { widthChangeValue = (this->width() - 6) / 2; update(); } - else if(buttonState == state::closeProgress) + else if (buttonState == state::closeProgress) { update(); } @@ -152,24 +152,21 @@ void ProgressButton::mousePressEvent(QMouseEvent *event) void ProgressButton::operationProcessing() { - } const int RADIUS = 60; WaterDrop::WaterDrop(QWidget *parent) - : QWidget(parent) - , m_waterDropAnimation(nullptr) - , m_animationRadius(0) + : QWidget(parent), m_waterDropAnimation(nullptr), m_animationRadius(0) { this->setFixedSize(QSize(RADIUS * 2, RADIUS * 2)); this->setWindowFlags(Qt::FramelessWindowHint | Qt::Tool); this->setAttribute(Qt::WA_TranslucentBackground); this->setAttribute(Qt::WA_DeleteOnClose); m_waterDropAnimation = new QVariantAnimation(this); -// m_waterDropAnimation->setEasingCurve(QEasingCurve(static_cast(QRandomGenerator::global()->bounded(40)))); + // m_waterDropAnimation->setEasingCurve(QEasingCurve(static_cast(QRandomGenerator::global()->bounded(40)))); } -//把鼠标点击的点转换为圆心点坐标 +// 把鼠标点击的点转换为圆心点坐标 void WaterDrop::move(const QPoint &point) { QPoint translatePoint = point - QPoint(RADIUS, RADIUS); @@ -196,7 +193,7 @@ void WaterDrop::paintEvent(QPaintEvent *event) pen.setColor(QColor(0xffffff80)); pen.setWidth(5); painter.setPen(pen); - painter.drawEllipse(event->rect().center(),m_animationRadius, m_animationRadius); + painter.drawEllipse(event->rect().center(), m_animationRadius, m_animationRadius); } void WaterDrop::onRaduisChanged(QVariant value) diff --git a/src/widgets/common/smoothlistwidget.cpp b/src/widgets/common/smoothlistwidget.cpp index aa84496fbf38186059efe9eafc0348d22380b057..3cba1b4847487fc7d2feea185ba5832fbc9ad7b7 100644 --- a/src/widgets/common/smoothlistwidget.cpp +++ b/src/widgets/common/smoothlistwidget.cpp @@ -5,13 +5,13 @@ #include SmoothListWidget::SmoothListWidget(QWidget *parent) : QListWidget(parent) { - vScrollBar->setOrientation(Qt::Orientation::Vertical); //将滚动条设置为纵向 - setVerticalScrollBar(vScrollBar); //设置纵向滚动条 + vScrollBar->setOrientation(Qt::Orientation::Vertical); // 将滚动条设置为纵向 + setVerticalScrollBar(vScrollBar); // 设置纵向滚动条 connect(vScrollBar, SIGNAL(valueChanged(int)), this, SLOT(onSliderChanged(int))); } void SmoothListWidget::wheelEvent(QWheelEvent *e) { - //当捕获到事件后,调用相对滚动的槽函数 + // 当捕获到事件后,调用相对滚动的槽函数 vScrollBar->scroll(e->angleDelta().y()); } void SmoothListWidget::onSliderChanged(int p) @@ -21,5 +21,5 @@ void SmoothListWidget::onSliderChanged(int p) { emit reachedBottom(); // 1 } - emit msliderChanged(p); // 2 + emit msliderChanged(p); // 2 } diff --git a/src/widgets/common/smoothscrollbar.cpp b/src/widgets/common/smoothscrollbar.cpp index 875912446576a4797e24aa7bfca0cc9d81ac5c1c..5fd190b551b0bd02c22c956c8f89b0cf4cb5a9fa 100644 --- a/src/widgets/common/smoothscrollbar.cpp +++ b/src/widgets/common/smoothscrollbar.cpp @@ -1,56 +1,56 @@ #include "smoothscrollbar.h" #include #include -SmoothScrollBar::SmoothScrollBar(QWidget* parent):QScrollBar(parent) +SmoothScrollBar::SmoothScrollBar(QWidget *parent) : QScrollBar(parent) { - m_scrollAni=new QPropertyAnimation(this); + m_scrollAni = new QPropertyAnimation(this); m_scrollAni->setTargetObject(this); m_scrollAni->setPropertyName("value"); - m_scrollAni->setEasingCurve(QEasingCurve::OutQuint); //设置动画曲线,在Qt文档中有详细的介绍 - m_scrollAni->setDuration(500); //设置动画时间,数值越小播放越快 - m_targetValue_v=value(); //将m_targetValue_v初始化 + m_scrollAni->setEasingCurve(QEasingCurve::OutQuint); // 设置动画曲线,在Qt文档中有详细的介绍 + m_scrollAni->setDuration(500); // 设置动画时间,数值越小播放越快 + m_targetValue_v = value(); // 将m_targetValue_v初始化 } void SmoothScrollBar::setValue(int value) { - m_scrollAni->stop();//停止现在的动画,防止出现冲突 - m_scrollAni->setStartValue(this->value()); //设置动画滚动的初始值为当前位置 - m_scrollAni->setEndValue(value); //设置动画的结束位置为目标值 - m_scrollAni->start(); //开始动画 + m_scrollAni->stop(); // 停止现在的动画,防止出现冲突 + m_scrollAni->setStartValue(this->value()); // 设置动画滚动的初始值为当前位置 + m_scrollAni->setEndValue(value); // 设置动画的结束位置为目标值 + m_scrollAni->start(); // 开始动画 } void SmoothScrollBar::scrollTop() { - setValue(-m_targetValue_v); //开始动画 - m_targetValue_v=0; + setValue(-m_targetValue_v); // 开始动画 + m_targetValue_v = 0; } void SmoothScrollBar::scroll(int value) { - //这里推荐评论区中大佬优化的写法 - if(m_targetValue_v-value>=0) + // 这里推荐评论区中大佬优化的写法 + if (m_targetValue_v - value >= 0) { - m_targetValue_v-=value; //将目标值和相对位置进行运算 - setValue(m_targetValue_v); //开始动画 + m_targetValue_v -= value; // 将目标值和相对位置进行运算 + setValue(m_targetValue_v); // 开始动画 } } void SmoothScrollBar::mousePressEvent(QMouseEvent *e) { - //当使用鼠标操作滚动条时,不会刷新m_targetValue_v的值,因而需要重写事件,对其进行刷新。 + // 当使用鼠标操作滚动条时,不会刷新m_targetValue_v的值,因而需要重写事件,对其进行刷新。 m_scrollAni->stop(); QScrollBar::mousePressEvent(e); - m_targetValue_v=value(); + m_targetValue_v = value(); } void SmoothScrollBar::mouseReleaseEvent(QMouseEvent *e) { m_scrollAni->stop(); QScrollBar::mouseReleaseEvent(e); - m_targetValue_v=value(); + m_targetValue_v = value(); } void SmoothScrollBar::mouseMoveEvent(QMouseEvent *e) { m_scrollAni->stop(); QScrollBar::mouseMoveEvent(e); - m_targetValue_v=value(); + m_targetValue_v = value(); } diff --git a/src/widgets/common/webenginepage.cpp b/src/widgets/common/webenginepage.cpp index 5f9d0259809c9f1ac93ad401617dd97946febe5d..f52b336d1622e9bd804f6f679b1ef67bed82f0ca 100644 --- a/src/widgets/common/webenginepage.cpp +++ b/src/widgets/common/webenginepage.cpp @@ -1,10 +1,26 @@ #include "webenginepage.h" #include +#include +#include WebEnginePage::WebEnginePage(QObject *parent) : QWebEnginePage(parent) { + QLocale ql; + switch (ql.language()) + { + case QLocale::Chinese: + { + // 系统语言是中文,获取网页为中文 @momen @uniartisan + QWebEngineProfile *profile = QWebEngineProfile::defaultProfile(); + qDebug() << profile->httpAcceptLanguage(); + profile->setHttpAcceptLanguage("zh-CN,zh;q=0.8,en;q=0.6"); + } + break; + default: + break; + } } WebEnginePage::~WebEnginePage() @@ -13,7 +29,8 @@ WebEnginePage::~WebEnginePage() void WebEnginePage::setUrl(const QUrl &url) { - if (m_currentUrl == url) { + if (m_currentUrl == url) + { return; } @@ -32,7 +49,8 @@ QWebEnginePage *WebEnginePage::createWindow(QWebEnginePage::WebWindowType type) void WebEnginePage::slotUrlChanged(const QUrl &url) { - if (m_currentUrl == url) { + if (m_currentUrl == url) + { sender()->deleteLater(); return; } diff --git a/src/widgets/downloadlistwidget.cpp b/src/widgets/downloadlistwidget.cpp index d99e2f7b4c8cb749949f1c7c2fd75199d22f0316..450cd5d584e76d96854b39a5f012507eef901db4 100644 --- a/src/widgets/downloadlistwidget.cpp +++ b/src/widgets/downloadlistwidget.cpp @@ -3,23 +3,23 @@ #include #include #include -DownloadListWidget::DownloadListWidget(QWidget *parent) : - DBlurEffectWidget(parent), - ui(new Ui::DownloadListWidget) +DownloadListWidget::DownloadListWidget(QWidget *parent) : DBlurEffectWidget(parent), + ui(new Ui::DownloadListWidget) { ui->setupUi(this); + setWindowTitle("Download list"); installEventFilter(this); - this->setAttribute(Qt::WA_Hover,true); + this->setAttribute(Qt::WA_Hover, true); setFocus(); - setFixedSize(500,400); + setFixedSize(500, 400); setMaskAlpha(250); ui->listWidget->hide(); ui->widget->show(); // 计算显示下载速度 download_speed.setInterval(1000); download_speed.start(); - connect(&download_speed,&QTimer::timeout,[=]() - { + connect(&download_speed, &QTimer::timeout, [=]() + { if(isdownload && theSpeed == "") { size1 = download_size; @@ -47,15 +47,14 @@ DownloadListWidget::DownloadListWidget(QWidget *parent) : downloaditemlist[nowDownload - 1]->setSpeed(theSpeed); }else{ emit downloadProgress(0); - } - }); + } }); } DownloadListWidget::~DownloadListWidget() { - if (downloadController) { + if (downloadController) + { downloadController->stopDownload(); - downloadController->deleteLater(); } delete ui; @@ -64,41 +63,41 @@ DownloadListWidget::~DownloadListWidget() void DownloadListWidget::clearItem() { ui->listWidget->vScrollBar->scrollTop(); - int n=ui->listWidget->count(); - for(int i=0;ilistWidget->count(); + for (int i = 0; i < n; i++) { QListWidgetItem *item = ui->listWidget->takeItem(0); QWidget *card = ui->listWidget->itemWidget(item); delete card; - card = NULL; + card = NULL; delete item; - item = NULL; + item = NULL; } ui->listWidget->clear(); } -void DownloadListWidget::addItem(QString name,QString fileName,QString pkgName,const QPixmap icon,QString downloadurl) +void DownloadListWidget::addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl) { - if(fileName.isEmpty()) + if (fileName.isEmpty()) { return; } urList.append(downloadurl); allDownload += 1; - DownloadItem *di=new DownloadItem(this); - dlist<setName(name); di->setFileName(fileName); - di->pkgName=pkgName; + di->pkgName = pkgName; di->seticon(icon); - QListWidgetItem* pItem = new QListWidgetItem(); + QListWidgetItem *pItem = new QListWidgetItem(); pItem->setSizeHint(QSize(240, 50)); ui->listWidget->addItem(pItem); ui->listWidget->setItemWidget(pItem, di); - if(!isBusy) + if (!isBusy) { nowDownload += 1; - startRequest(urList.at(nowDownload - 1), fileName); // 进行链接请求 + startRequest(urList.at(nowDownload - 1), fileName); // 进行链接请求 } } @@ -120,10 +119,10 @@ void DownloadListWidget::startRequest(QUrl url, QString fileName) isdownload = true; downloaditemlist[allDownload - 1]->free = false; - downloadController = new DownloadController(this); // 并发下载,在点击下载按钮的时候才会初始化 + downloadController = new DownloadController(this); // 并发下载,在点击下载按钮的时候才会初始化 connect(downloadController, &DownloadController::downloadProcess, this, &DownloadListWidget::updateDataReadProgress); connect(downloadController, &DownloadController::downloadFinished, this, &DownloadListWidget::httpFinished); - //connect(downloadController, &DownloadController::errorOccur, this, [=](QString msg){this->sendNotification(msg);}); + // connect(downloadController, &DownloadController::errorOccur, this, [=](QString msg){this->sendNotification(msg);}); downloadController->setFilename(fileName); downloadController->startDownload(url.toString()); } @@ -135,37 +134,37 @@ void DownloadListWidget::httpFinished() // 完成下载 downloaditemlist[nowDownload - 1]->readyInstall(); downloaditemlist[nowDownload - 1]->free = true; emit downloadFinished(); - if(nowDownload < allDownload) + if (nowDownload < allDownload) { // 如果有排队则下载下一个 qDebug() << "切换下一个下载..."; nowDownload += 1; - while(downloaditemlist[nowDownload - 1]->close) + while (downloaditemlist[nowDownload - 1]->close) { nowDownload += 1; - if(nowDownload >= allDownload) + if (nowDownload >= allDownload) { nowDownload = allDownload; return; } } QString fileName = downloaditemlist[nowDownload - 1]->getName(); - startRequest(urList.at(nowDownload-1), fileName); + startRequest(urList.at(nowDownload - 1), fileName); } } void DownloadListWidget::updateDataReadProgress(QString speedInfo, qint64 bytesRead, qint64 totalBytes) { - if(totalBytes <= 0) + if (totalBytes <= 0) { return; } theSpeed = speedInfo; - downloaditemlist[nowDownload - 1]->setMax(10000); // 最大值 - downloaditemlist[nowDownload - 1]->setValue(int(bytesRead * 100 / totalBytes) * 100); // 当前值 + downloaditemlist[nowDownload - 1]->setMax(10000); // 最大值 + downloaditemlist[nowDownload - 1]->setValue(int(bytesRead * 100 / totalBytes) * 100); // 当前值 emit downloadProgress(int(bytesRead * 100 / totalBytes)); download_size = bytesRead; - if(downloaditemlist[nowDownload - 1]->close) + if (downloaditemlist[nowDownload - 1]->close) { // 随时检测下载是否被取消 downloadController->disconnect(); @@ -175,21 +174,23 @@ void DownloadListWidget::updateDataReadProgress(QString speedInfo, qint64 bytesR } } - -void DownloadListWidget::m_move(int x,int y) +void DownloadListWidget::m_move(int x, int y) { m_rect.setX(x); m_rect.setY(y); - move(x,y); + move(x, y); return; } bool DownloadListWidget::eventFilter(QObject *watched, QEvent *event) { - if (Q_NULLPTR == watched) { + if (Q_NULLPTR == watched) + { return false; } - if (QEvent::ActivationChange == event->type()) { - if(QApplication::activeWindow() != this){ + if (QEvent::ActivationChange == event->type()) + { + if (QApplication::activeWindow() != this) + { this->close(); } } diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index 1aebc948f91262cab3284732d1d8c218c85e5491..5b5cf952fb9ef6e2f32a256452402f137ff450dc 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -12,6 +12,7 @@ else zenity --error --text "检查更新进程出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测模块" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg zenity --text-info --filename=/tmp/spark-store-app-ssupdate-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean-log + rm -f /tmp/spark-store/upgradeStatus.txt exit fi @@ -77,5 +78,5 @@ done` fi fi -rm -f touch /tmp/spark-store/upgradeStatus.txt +rm -f /tmp/spark-store/upgradeStatus.txt # 从最开头 diff --git a/translate_generation.sh b/translate_generation.sh index 9304a50ab3a2d5fde8ad1e0b8c5dee31401c3382..f64e4ca08db1eb7240009cf667cca36d4b840052 100755 --- a/translate_generation.sh +++ b/translate_generation.sh @@ -1,10 +1,6 @@ #!/bin/bash # this file is used to auto-generate .qm file from .ts file. -ts_list=(`ls ./translations/*.ts`) +cd $(dirname $0) -for ts in "${ts_list[@]}" -do - printf "\nprocess ${ts}\n" - lrelease "${ts}" -done +lrelease ./src/spark-store.pro diff --git a/translate_update.sh b/translate_update.sh new file mode 100755 index 0000000000000000000000000000000000000000..6c9b030f5ccb7624aa2b0cb719b6c9f03d570822 --- /dev/null +++ b/translate_update.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# this file is used to auto-update .ts file. + +cd $(dirname $0) + +lupdate ./src/spark-store.pro -no-obsolete diff --git a/translations/spark-store_en.ts b/translations/spark-store_en.ts index 25a689abd43776a2d2657619814abfb038e71357..29d43305ba8f4758e1d119242d09a9e2cb75052e 100644 --- a/translations/spark-store_en.ts +++ b/translations/spark-store_en.ts @@ -10,8 +10,8 @@ - - + + Download @@ -174,47 +174,47 @@ - + Click Open - - - + + + Reinstall - + Upgrade - - - + + + Install - + Installing - - + + Spark Store - + Uninstall succeeded - + The URL has been copied to the clipboard @@ -232,6 +232,19 @@ + + DAboutDialog + + + Version: %1 + + + + + %1 is released under %2 + + + DownloadItem @@ -275,59 +288,59 @@ - + Download Complete. - - - + + + Spark Store - + Installing - + Installation complete. - + Finish - + Retry - + Error happened in dpkg progress , you can try it again. - + Error happened in dpkg progress , you can try it again - + dpkg progress had been aborted,you can retry installation. - + dpkg progress had been aborted,you can retry installation - + Download canceled @@ -358,141 +371,123 @@ - + Home - + Network - + Chat - + Music - + Video - + Picture - + Game - + Office - + Reading - + Development - + Tool - + Theme - + Other - + APP Upgrade - + Submit App - + Submit App with client(Recommanded) - + Settings - + APP Upgrade and Install Settings - + Spark Store - + Search or enter spk:// - - QLabel - - - - Spark Store - - - QObject - - We publish this program under GPL V3 - - - - - <span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span> + + + + Spark Store - - The Spark Project + + <span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span> - - - Spark Store - - - - - <span style='font-size:10pt;font-weight:60;'>An appstore powered by deepin community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style='font-size:12pt;'>Spark developers</span><br/><br/>Published under GPL V3 + + Spark Project @@ -584,30 +579,19 @@ - + Updating, please wait... - + Spark Store - + Temporary cache was cleaned - - Widget - - Share - Spk share link - - - 0B - 0B - - diff --git a/translations/spark-store_fr.ts b/translations/spark-store_fr.ts index ea99fddb32c62332fee3407efa6f663de1b7b4c2..8bfdd7ec8bdd9f591e80a978343eea619e22c9ca 100644 --- a/translations/spark-store_fr.ts +++ b/translations/spark-store_fr.ts @@ -10,8 +10,8 @@ - - + + Download @@ -174,47 +174,47 @@ - + Click Open - - - + + + Reinstall - + Upgrade - - - + + + Install - + Installing - - + + Spark Store - + Uninstall succeeded - + The URL has been copied to the clipboard @@ -232,6 +232,19 @@ + + DAboutDialog + + + Version: %1 + + + + + %1 is released under %2 + + + DownloadItem @@ -275,59 +288,59 @@ - + Download Complete. - - - + + + Spark Store - + Installing - + Installation complete. - + Finish - + Retry - + Error happened in dpkg progress , you can try it again. - + Error happened in dpkg progress , you can try it again - + dpkg progress had been aborted,you can retry installation. - + dpkg progress had been aborted,you can retry installation - + Download canceled @@ -358,152 +371,123 @@ - + Home - + Network - + Chat - + Music - + Video - + Picture - + Game - + Office - + Reading - + Development - + Tool - + Theme - + Other - + APP Upgrade - + Submit App - + Submit App with client(Recommanded) - + Settings - + APP Upgrade and Install Settings - + Spark Store - + Search or enter spk:// - - QLabel - - Spark应用商店 - Spark Store - - - 社区驱动的一款为第三方应用商店,为改变而生 -本程序按GPL第三版开源 - Un app store tier alimenté par la communauté Deepin -Spark Store est publié sous licence GPL V3 -Nous sommes nés pour le changement. - - - - - Spark Store - - - QObject - - We publish this program under GPL V3 - - - - - <span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span> - - - - - The Spark Project + + + + Spark Store - - - Spark Store + + <span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span> - - <span style='font-size:10pt;font-weight:60;'>An appstore powered by deepin community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style='font-size:12pt;'>Spark developers</span><br/><br/>Published under GPL V3 + + Spark Project @@ -595,212 +579,19 @@ Nous sommes nés pour le changement. - + Updating, please wait... - + Spark Store - + Temporary cache was cleaned - - Widget - - 视频播放 - Lecteurs vidéo et créateurs vidéo - Vidéo - - - 下载列表 - Liste de téléchargement - - - 系统工具 - Outils - - - 主题美化 - Thème des icônes et autres - Thèmes - - - 音乐欣赏 - Musique - - - 编程开发 - Développement - - - 办公学习 - Bureau - - - 阅读翻译 - Traduire - - - 其他应用 - Autres - - - 商店首页 - Accueil - - - 图形图像 - Images - - - 游戏娱乐 - Jeux - - - 社交沟通 - Chat - - - 网络应用 - Réseau - - - 当前下载列表为空 - La liste de téléchargement est vide - - - 打开文件夹 - Ouvrir dans le gestionnaire de fichiers - - - 安装 - Installer - - - 卸载 - Supprimer - - - 官网 - Site - - - 软件名 - Nom - - - 图标 - Icon - - - 分享 - Partager - - - 详细介绍 - Détails - - - <html><head/><body><p>由社区爱好者开发的软件商店</p></body></html> - <html><head/><body><p>magasin de logiciels développé par des passionnés de la communauté</p></body></html> - - - 软件截图 - Captures d'écran - - - 线路设置 - Line Settings - - - 线路选择: - Choisissez: - - - 刷新 - Mise à jour - - - 重启商店后生效 - Redémarrez pour prendre effet - - - <html><head/><body><p>源服务器的作用是保证软件更新,并且支持使用apt工具获取软件。通常我们更建议你使用第一个线路作为更新源,一般是最稳定的。</p></body></html> - <html><head/><body><p>Le rôle du serveur source est de s'assurer que le logiciel est mis à jour et prend en charge l'utilisation de l'outil apt pour obtenir le logiciel. Nous préférons généralement que vous utilisiez la première ligne comme source de mise à jour, qui est généralement la plus stable. </p></body></html> - - - 更新源 - Mettre à jour la source APT - - - 更新源服务器: - Source APT: - - - 服务器 - serveur - - - 缓存目录 - Temp - - - 清空 - Nettoyer - - - 因为这个目录位于/tmp下,所以即使你不手动清空的话,其也将在系统重启时自动清空。 - Étant donné que ce répertoire se trouve sous /tmp, même si vous ne l'effacez pas manuellement, il sera effacé automatiquement au redémarrage du système. - - - 目录大小: - Taille: - - - 0B - 0B - - - 目录位置:/tmp/spark-store - Emplacement:/tmp/spark-store - - - 关于我们 - À propos de nous - - - <html><head/><body><p>我们并不是官方团队,和你一样,我们也只是众多Linux/deepin系统爱好者和用户之中的一员,我们开发并且运营这个“Spark应用商店”,是为了让社区的朋友们一起分享好用的软件,或者一起参与开发,让大家都用到最新的,最优秀的软件。</p><p>我们并没有因此盈利,所有开发和维护人员都不会获得报酬,我们的主要支出大部分依赖于社区对我们的捐助,很感谢大家,这部分捐助让我们并不需要耗费太多精力去担心资金问题。</p><p>我们的服务和开发的软件都是免费供给大家使用,交流,学习的,但是在您的使用过程中一定要遵守当地的法律法规,否则出现任何问题和我们无关。</p><p>如果商店中任何一部分有侵犯您权益的行为,请告知我们&lt;jifengshenmo@outlook.com&gt;,我们会第一时间删除侵权内容。</p><p>如果你也想参与我们,不管是参与开发,设计,投递还是投稿作品,我们都欢迎你的加入。</p><p>QQ群:872690351<br/></p></body></html> - <html><head/><body><p>Nous ne sommes pas l'équipe officielle, tout comme vous, nous ne sommes qu'un des nombreux passionnés et utilisateurs de systèmes Linux / deepin, nous développons et gérons le "Spark Store"! ", est de rassembler la communauté pour partager des logiciels utiles, ou pour participer au développement ensemble, afin que nous utilisions tous les derniers et meilleurs logiciels. </p><p> Nous n'en tirons aucun profit, tous les développeurs et mainteneurs ne sont pas payés, et nous comptons sur les dons de la communauté pour la plupart de nos dépenses, dont nous sommes reconnaissants et qui nous permettent de ne pas dépenser trop d'énergie se soucier du financement. </p><p>Notre service et nos logiciels sont gratuits pour tout le monde à utiliser, à communiquer et à apprendre, mais vous devez vous conformer aux lois et réglementations locales dans le processus de votre utilisation, sinon tout problème n'a rien à voir avec nous. </p><p>Si une partie du magasin enfreint vos droits, veuillez nous en informer &lt;jifengshenmo@outlook.com&gt; nous retirerons le contenu en infraction dès que possible. </p><p>Si vous souhaitez également vous impliquer avec nous, que vous soyez impliqué dans le développement, la conception, le pitching ou la soumission de travaux, nous vous invitons à nous rejoindre. </p><p>QQ group:872690351<br/></p></body></html> - - - - downloadlist - - 名称 - Nom - - - 等待开始下载 - Attendez pour téléchargerd - Attendez pour télécharger - - - 安装 - Installer - - - 取消 - Annuler - - - 详情 - Détail - - diff --git a/translations/spark-store_zh_CN.ts b/translations/spark-store_zh_CN.ts index 3e548d049888adfdd2cd7ba610ff0237003c7b07..b9c5590db83757a406ca44ec47592290b739ee47 100644 --- a/translations/spark-store_zh_CN.ts +++ b/translations/spark-store_zh_CN.ts @@ -10,8 +10,8 @@ - - + + Download 下载 @@ -63,10 +63,6 @@ <html><head/><body><p><img src=":/tags/uos-small.png"/></p></body></html> - - <html><head/><body><p>A deepin-wine2 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine2 by your self.</p></body></html> - <html><head/><body><p>这是一款 deepin-wine2 应用,如果你并没有在使用深度系列发行版(比如您在使用ubuntu),你需要自行配置 deepin-wine2 环境</p></body></html> - @@ -111,10 +107,6 @@ <html><head/><body><p><img src=":/tags/a2d-small.png"/></p></body></html> - - <html><head/><body><p>A deepin-wine5 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine5 by your self.</p></body></html> - <html><head/><body><p>这是一款deepin-wine5应用,如果你并没有在使用深度系列发行版(比如您在使用ubuntu),你需要自行配置deepin-wine5环境</p></body></html> - @@ -182,55 +174,47 @@ 软件官网 - + Click Open 点击跳转 - - - + + + Reinstall 重新安装 - + Upgrade 升级 - Downloading - 下载中 - - - Downloaded - 下载完成 - - - - - + + + Install 安装 - + Installing - 正在安装 + 正在安装 - - + + Spark Store 星火应用商店 - + Uninstall succeeded 卸载成功 - + The URL has been copied to the clipboard 链接已复制到剪贴板 @@ -248,6 +232,19 @@ + + DAboutDialog + + + Version: %1 + 版本:%1 + + + + %1 is released under %2 + %1遵循%2协议发布 + + DownloadItem @@ -291,83 +288,59 @@ 详情 - Spark Store App Installer - 星火内置安装器 - - - deepin deb installer - 深度软件包安装器 - - - gdebi - gdebi - - - Downloaded, waiting to install - 已完成,等待安装 - - - Download Failed,Check Your Connection - 下载失败,请检查网络连接 - - - Downloaded. Open APP Upgrade and Install Settings to enable password-free installation - 打开 APP 升级和安装设置以启用无密码安装 - - - + Download Complete. 下载完成. - - - + + + Spark Store 星火应用商店 - + Installing 正在安装 - + Installation complete. 安装完成. - + Finish 完成 - + Retry 重试 - + Error happened in dpkg progress , you can try it again. 安装被中止,可重新安装。 - + Error happened in dpkg progress , you can try it again dpkg出现错误,可重新安装 - + dpkg progress had been aborted,you can retry installation. dpkg进程被中断,您可重试安装。 - + dpkg progress had been aborted,you can retry installation 安装被中止,可重新安装 - + Download canceled 下载已取消 @@ -389,14 +362,6 @@ Open download directory 打开下载文件夹 - - Spark Store - 星火应用商店 - - - The download is complete. Please click the download button on the title Bar to open the download list for installation - 下载已完成,请点击标题栏上的下载按钮打开下载列表进行安装 - MainWindow @@ -406,155 +371,125 @@ - + Home 主页 - + Network 网络 - + Chat 社交 - + Music 音乐 - + Video 视频 - + Picture 图像 - + Game 游戏 - + Office 办公 - + Reading 阅读 - + Development 开发 - + Tool 工具 - + Theme 主题 - + Other 其他 - + APP Upgrade 更新 - + Submit App 投递应用 - + Submit App with client(Recommanded) 使用本地投稿器投递应用(推荐) - + Settings 设置 - + APP Upgrade and Install Settings 应用更新和安装设置 - + Spark Store 星火应用商店 - + Search or enter spk:// 搜索或打开链接 - - QLabel - - - - Spark Store - Spark 应用商店 - - QObject - - We publish this program under GPL V3 - 本程序按GPL V3开源 - - - - <span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span> - - - - Version 2.0+2 - 版本: 2.0+2 + + + + Spark Store + 星火应用商店 - <span style=' font-size:10pt;font-weight:60;'>An appstore powered by deepin community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span> - <span style=' font-size:10pt;font-weight:60;'>deepin 社区驱动的一款第三方应用商店</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span> + + <span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span> + <span style=' font-size:10pt;font-weight:60;'>一款由社区提供的应用商店</span><br/>""<a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/>""<span style=' font-size:12pt;'>星火开发者联盟</span> - - The Spark Project + + Spark Project 星火计划 - - <span style=' font-size:10pt;font-weight:60;'>An appstore powered by deepin community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style=' font-size:12pt;'>Spark developers</span><br/>We publish this program under GPL V3 - <span style=' font-size:10pt;font-weight:60;'>一款由 深度社区 出品的应用商店</span><br/>""<a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/>""<span style=' font-size:12pt;'>星火开发者联盟</span><br/>本程序遵循 GPL V3 协议发布 - - - - <span style='font-size:10pt;font-weight:60;'>An appstore powered by deepin community</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style='font-size:12pt;'>Spark developers</span><br/><br/>Published under GPL V3 - <span style='font-size:10pt;font-weight:60;'>由 Deepin 社区出品的应用商店</span><br/><a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/><span style='font-size:12pt;'>星火商店开发组</span><br/><br/>遵循 GPL V3 协议发布 - - - - - Spark Store - 星火应用商店 - SettingsPage @@ -644,539 +579,19 @@ <html><head/><body><p>我们并<span style=" font-weight:600;">不是</span>官方团队,和你一样,我们也只是众多Linux/deepin系统爱好者和用户之中的一员,我们开发并且运营这个“Spark应用商店”,是为了让社区的朋友们一起分享好用的软件,或者一起参与开发,让大家都用到最新的,最优秀的软件。</p><p>我们并没有因此盈利,所有开发和维护人员都不会获得报酬,我们的主要支出大部分依赖于社区对我们的捐助,很感谢大家,这部分捐助让我们并不需要耗费太多精力去担心资金问题。</p><p>我们的服务和开发的软件都是免费供给大家使用,交流,学习的,但是在您的使用过程中一定要遵守当地的法律法规,否则出现任何问题和我们无关。</p><p>如果商店中任何一部分有侵犯您权益的行为,请告知我们 &lt;jifengshenmo@outlook.com&gt; ,我们会第一时间删除侵权内容。</p><p>如果你也想参与我们,不管是参与开发,设计,投递还是投稿作品,我们都欢迎你的加入。</p><p>在 Spark IM 联系我们:<a href="https://chat.shenmo.tech"><span style=" text-decoration: underline; color:#0000ff;">https://chat.shenmo.tech<br/></span></a>QQ 群:872690351</p></body></html> - <html><head/><body><p>We are <span style=" font-weight:600;">NOT</span> the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the &quot;Spark Store&quot;! &quot;, is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. </p><p>We don't make a profit from this, all developers and maintainers don't get paid, and we rely on the community's donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. </p><p>Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. </p><p>If any part of the store infringes your rights, please tell us &lt;jifengshenmo@outlook.com&gt; we will remove the infringing content as soon as possible. </p><p>If you'd like to get involved with us too, whether you're involved in development, design, pitching or submitting work, we welcome you to join us. </p><p>Connect us on Spark IM: https://chat.shenmo.tech<br/></p></body></html> - &lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;我们并&lt;span style=&quot; font-weight:600;&quot;&gt;不是&lt;/span&gt;官方团队,和你一样,我们也只是众多Linux/deepin系统爱好者和用户之中的一员,我们开发并且运营这个“Spark应用商店”,是为了让社区的朋友们一起分享好用的软件,或者一起参与开发,让大家都用到最新的,最优秀的软件。&lt;/p&gt;&lt;p&gt;我们并没有因此盈利,所有开发和维护人员都不会获得报酬,我们的主要支出大部分依赖于社区对我们的捐助,很感谢大家,这部分捐助让我们并不需要耗费太多精力去担心资金问题。&lt;/p&gt;&lt;p&gt;我们的服务和开发的软件都是免费供给大家使用,交流,学习的,但是在您的使用过程中一定要遵守当地的法律法规,否则出现任何问题和我们无关。&lt;/p&gt;&lt;p&gt;如果商店中任何一部分有侵犯您权益的行为,请告知我们 &amp;lt;jifengshenmo@outlook.com&amp;gt;,我们会第一时间删除侵权内容。&lt;/p&gt;&lt;p&gt;如果你也想参与我们,不管是参与开发,设计,投递还是投稿作品,我们都欢迎你的加入。&lt;/p&gt;&lt;p&gt;在 Spark IM 联系我们: https://chat.shenmo.tech&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt; - - - + Updating, please wait... 正在更新,请稍候…… - + Spark Store 星火应用商店 - + Temporary cache was cleaned 缓存目录已清空 - - SpkAppInfoLoaderThread - - Failed to download app info. Please check internet connection. - 下载应用程序详细信息失败,请检查网络连接。 - - - PkgName: - 包名: - - - Version: - 版本: - - - Author: - 作者: - - - Official Site: - 官网: - - - Contributor: - 投稿者: - - - Update Time: - 更新时间: - - - Installed Size: - 大小: - - - Failed to load application icon. - 加载应用程序图标失败。 - - - - Widget - - Videos - 视频播放 - - - Download List - 下载列表 - - - Tools - 系统工具 - - - Beautify - 主题美化 - - - Music - 音乐欣赏 - - - Coding - 编程开发 - - - Office - 办公学习 - - - Translate - 阅读翻译 - - - Others - 其他应用 - - - FrontPage - 商店首页 - - - Images - 图形图像 - - - Games - 游戏娱乐 - - - Chatting - 社交沟通 - - - Network - 网络应用 - - - The list is currently empty. Go and download some softwares! - 当前下载列表为空。去下载些软件吧! - - - Open download directory - 打开下载文件夹 - - - Name - 软件名 - - - Install - 安装 - - - Video - 视频播放 - - - Download - 下载列表 - - - Reading - 阅读翻译 - - - Chat - 社交沟通 - - - Uninstall - 卸载 - - - Site - 官网 - - - <html><head/><body><p>This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology</p></body></html> - <html><head/><body><p>这款应用是社区开发者开发的,我们为社区开发者颁发这款勋章以表彰他们对Linux生态的贡献</p></body></html> - - - <html><head/><body><p>Capable to Ubuntu 20.04</p></body></html> - <html><head/><body><p>支持Ubuntu 20.04</p></body></html> - - - <html><head/><body><p>Capable to deepin 20</p></body></html> - <html><head/><body><p>支持deepin 20</p></body></html> - - - <html><head/><body><p>Capable to UOS home 20</p></body></html> - <html><head/><body><p>支持UOS家庭版 20</p></body></html> - - - <html><head/><body><p>This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment</p></body></html> - <html><head/><body><p>这是一款DTK5应用,请使用深度桌面环境来获得最完美的体验</p></body></html> - - - <html><head/><body><p>A deepin-wine5 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine5 by your self.</p></body></html> - <html><head/><body><p>这是一款deepin-wine5应用,如果你并没有在使用深度系列发行版(比如您在使用ubuntu),你需要自行配置deepin-wine5环境</p></body></html> - - - <html><head/><body><p>An Appimage to deb app.</p></body></html> - <html><head/><body><p>这是一款Appimage转制应用.</p></body></html> - - - Share - Spk分享链接 - - - Development - 编程开发 - - - Home - 商店首页 - - - Graphics - 图形图像 - - - Communication - 社交沟通 - - - <html><head/><body><p>A deepin-wine2 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine2 by your self.</p></body></html> - <html><head/><body><p>这是一款 deepin-wine2 应用,如果你并没有在使用深度系列发行版(比如您在使用ubuntu),你需要自行配置 deepin-wine2 环境</p></body></html> - - - Contribute translation - 贡献翻译/应用反馈 - - - Info - 详细 - - - <html><head/><body><p>An app store developed by community enthusiasts</p></body></html> - <html><head/><body><p>由社区爱好者开发的一款应用商店</p></body></html> - - - Screenshots - 屏幕截图 - - - Line Settings - 线路设置 - - - Choose Line: - 线路选择: - - - Refresh - 刷新 - - - Take effect when restart - 重启商店后生效 - - - <html><head/><body><p>The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. </p></body></html> - <html><head/><body><p>源服务器的作用是保证软件更新,并且支持使用apt工具获取软件。通常我们更建议你使用第一个线路作为更新源,一般是最稳定的。</p></body></html> - - - Update - 更新源 - - - Source Server - 更新源服务器 - - - Temp - 缓存目录 - - - Clean - 清空 - - - Since the dictionary is at /tmp,It would be cleaned automatically when system reboot. - 因为这个目录位于/tmp下,所以即使你不手动清空的话,其也将在系统重启时自动清空。 - - - Size: - 目录大小: - - - Location:/tmp/spark-store - 目录位置:/tmp/spark-store - - - About us - 关于我们 - - - <html><head/><body><p>We are <span style=" font-weight:600;">NOT</span> the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the &quot;Spark Store&quot;! &quot;, is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. </p><p>We don't make a profit from this, all developers and maintainers don't get paid, and we rely on the community's donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. </p><p>Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. </p><p>If any part of the store infringes your rights, please tell us &lt;jifengshenmo@outlook.com&gt; we will remove the infringing content as soon as possible. </p><p>If you'd like to get involved with us too, whether you're involved in development, design, pitching or submitting work, we welcome you to join us. </p><p>QQ group:872690351<br/></p></body></html> - <html><head/><body><p>我们并<span style=" font-weight:600;">不是</span>官方团队,和你一样,我们也只是众多Linux/deepin系统爱好者和用户之中的一员,我们开发并且运营这个“Spark应用商店”,是为了让社区的朋友们一起分享好用的软件,或者一起参与开发,让大家都用到最新的,最优秀的软件。</p><p>我们并没有因此盈利,所有开发和维护人员都不会获得报酬,我们的主要支出大部分依赖于社区对我们的捐助,很感谢大家,这部分捐助让我们并不需要耗费太多精力去担心资金问题。</p><p>我们的服务和开发的软件都是免费供给大家使用,交流,学习的,但是在您的使用过程中一定要遵守当地的法律法规,否则出现任何问题和我们无关。</p><p>如果商店中任何一部分有侵犯您权益的行为,请告知我们 &lt;jifengshenmo@outlook.com&gt;,我们会第一时间删除侵权内容。</p><p>如果你也想参与我们,不管是参与开发,设计,投递还是投稿作品,我们都欢迎你的加入。</p><p>QQ 群:872690351<br/></p></body></html> - - - Back to category - 返回分类 - - - Home - 商店首页 - - - Reload - 刷新 - - - Take effect when restart - 重启商店后生效 - - - Spark Store - Spark 应用商店 - - - Search or enter spk:// - 搜索或打开链接 - - - Submit App - 投递应用 - - - Settings - 设置 - - - Not Exist - 不存在 - - - Spark\ Store - 星火应用商店 - - - Failed to download app info. Please check internet connection. - 下载应用程序详细信息失败,请检查网络连接。 - - - PkgName: - 包名: - - - Version: - 版本: - - - Author: - 作者: - - - Official Site: - 官网: - - - Contributor: - 投稿者: - - - Update Time: - 更新时间: - - - Installed Size: - 大小: - - - Reinstall - 重新安装 - - - Failed to load application icon. - 加载应用程序图标失败。 - - - Failed to get the name to the file to be downloaded. - 获取安装包文件名失败。 - - - Relative apps Not Found! - 相关应用未找到! - - - Request Error: %1 - 请求错误:%1 - - - Spark store could only process spk:// links for now. The search feature is coming soon! - 目前仅支持商店专用链接的打开,搜索功能正在开发,请期待以后的版本! - - - Upgrade - 升级 - - - Updating, please wait... - 正在更新,请稍候…… - - - Apt has reported an error. Please use apt update in terminal to locate the problem. - 更新中发生错误,请在终端使用apt update来查看错误原因。 - - - Unknown error! - 未知错误! - - - Yes - - - - No - - - - Information for Contributors - 贡献者须知 - - - Currently the translation contribution is limited to English, -and you will be redirected to our Gitee repository at which you are -supposed to be creating pull requests to contribute app info -translations. -Tips:You can simply click the file to edit to create a flat pull request without create a full pull request -Tips:You can use github account to login to Gitee -Click yes to continue. - 目前商店仅支持应用程序英文详细信息的贡献。 -在你确认后你会被导向到我们的 Gitee 页面, -请在此创建 Pull Request 以进行翻译贡献。 -备注:你可以直接在页面编辑以快速创建轻量级pr -你也可以使用github账户直接登陆Gitee - -单击“是”以继续。 - - - Currently the translation contribution is limited to English, -and you will be redirected to our Gitee repository at which you are -supposed to be creating pull requests to contribute app info -translations. - -Click yes to continue. - 目前商店仅支持应用程序英文详细信息的贡献。 -在你确认后你会被导向到我们的 Gitee 页面, -请在此创建 Pull Request 以进行翻译贡献。 -备注:你可以直接在页面编辑以快速创建轻量级pr -你也可以使用github账户直接登陆Gitee - -单击“是”以继续。. - - - Unknown server error! - 服务器未知错误 - - - Uninstall succeeded - 卸载成功 - - - Temporary cache was cleaned - 缓存目录已清空 - - - The URL has been copied to the clipboard - 链接已复制到剪贴板 - - - - downloadlist - - Name - 软件名 - - - Waiting to download - 正在等待下载 - - - Install - 安装 - - - Cancel - 取消 - - - Info - 详情 - - - dpkg - dpkg - - - Spark Store App Installer - 星火内置安装器 - - - gdebi - gdebi - - - deepin deb installer - 深度软件包安装器 - - - Downloaded, waiting to install - 已完成,等待安装 - - - Failed to download %1 - 下载 %1 失败 - - - Download Failed,Check Your Connection - 下载失败,请检查网络连接 - - - Finished downloading %1, awaiting to install - %1 下载完成,等待安装 - - - Installing - 正在安装 - - - Installing... - 正在安装 - - - Finish - 完成 - - - Retry - 重试 - - - Error happened in dpkg progress , you can try it again - dpkg出现错误,可重新安装 - - - dpkg progress had been aborted,you can retry installation - 安装被中止,可重新安装 - - - Download canceled - 下载已取消 - -