Compare commits

..

895 Commits

Author SHA1 Message Date
2cca83a34b !226 4266
Merge pull request !226 from shenmo/dev
2023-08-02 03:41:43 +00:00
1f98c8df7c bump-4266 2023-08-02 11:40:56 +08:00
da9f84d78a 调整:文案修改:安装失败后引导查看详情而不是重新安装 2023-08-02 11:35:59 +08:00
88cc3eb921 如果dpkg阻塞会出现漏掉的安装失败,在安装后检测 2023-08-02 11:30:12 +08:00
f04130f902 修复:UOS专业版上安装成功仍然显示失败的问题:方式:忽略E:等消息,仅检查脚本报错
调整:卸载应用时采用autopurge以一并卸载依赖
2023-08-02 11:16:06 +08:00
ea7baa9ab0 !224 4265
Merge pull request !224 from shenmo/dev
2023-07-24 08:03:03 +00:00
e7e810ea2b update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-24 08:02:03 +00:00
1de46a8296 update tool/ssaudit.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-24 04:27:05 +00:00
c228706144 !222 4264 社群入口修复
Merge pull request !222 from shenmo/dev
2023-07-13 03:01:38 +00:00
5ece2b2034 调整:4264版本发布
修复:过于老旧的联系方式入口
2023-07-13 10:58:07 +08:00
460dcfebed 修复:依赖 desktop-file-utils 添加
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-08 07:28:56 +00:00
fb257212b6 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-05 04:10:10 +00:00
1436e35a49 update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-05 04:09:55 +00:00
c030bf9e6e !220 4263
Merge pull request !220 from shenmo/dev
2023-07-05 03:59:36 +00:00
a16248f8a4 修复:部分下载量线路失效 2023-07-05 11:58:38 +08:00
7b49732405 fix mail 8
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-05 03:57:14 +00:00
1b6e02c5bf mail 10 fix
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-05 03:53:41 +00:00
4d228fd331 mail 2 fix
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-05 03:51:16 +00:00
f6ac9752d1 重命名 LICENCE 为 LICENSE 2023-06-30 10:52:44 +00:00
716344cf68 重命名 LICENCE-Additional 为 LICENCE 2023-06-30 10:50:42 +00:00
79e0ef2b7b 重命名 LICENSE 为 LICENSE-GPL3 2023-06-30 10:50:34 +00:00
779b62a12f update LICENCE-Additional.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-06-30 10:47:47 +00:00
6427a32c31 add LICENCE-Additional.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-06-30 10:46:37 +00:00
1f8d237d40 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-06-14 06:39:55 +00:00
04732f61c0 update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-06-14 06:39:17 +00:00
63147b2ca3 update tool/update-upgrade/transhell/ss-do-upgrade.sh_en_US.transhell.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-06-14 06:37:27 +00:00
d1d1e54022 文案同步
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-06-14 06:34:51 +00:00
d175fc497e 文案同步
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-06-14 06:34:13 +00:00
e073764a80 !219 回退 'Pull Request !218 : 添加对LingmoOS的支持'
Merge pull request !219 from shenmo/revert-merge-218-dev
2023-06-08 12:01:00 +00:00
5cf8b587ee 回退 'Pull Request !218 : 添加对LingmoOS的支持' 2023-06-08 12:00:47 +00:00
b715f1c54b !218 添加对LingmoOS的支持
Merge pull request !218 from Floating dream/beta
2023-06-08 11:59:15 +00:00
Floating dream
7513667c6e 添加LingmoOS适配 2023-06-08 11:22:21 +08:00
Floating dream
0edf87c95c Add detection for LingmoOS 2023-06-08 01:30:17 +08:00
22a54cd0ed 幸亏一直没用到这个函数
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-05-24 05:09:00 +00:00
d4fbd1b386 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-05-07 02:15:15 +00:00
87a71fe3b3 update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-05-07 02:14:43 +00:00
c7e48ae01d 支持zunyun01
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-26 10:20:51 +00:00
9ac0c67a25 !216 4262
Merge pull request !216 from shenmo/dev
2023-04-25 14:07:41 +00:00
cb66f5e903 arm架构applist支持 2023-04-25 19:29:11 +08:00
842f0893b3 支持arm搜索 2023-04-25 18:41:38 +08:00
f5a35a332a update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-22 09:18:46 +00:00
0ba0587e17 fix I6XTK0
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-22 09:17:14 +00:00
fd4b52e384 !214 426
Merge pull request !214 from shenmo/dev
2023-04-22 05:58:34 +00:00
c65eea12a6 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-22 05:43:27 +00:00
d6e01a5803 fix: 快读切换应用页面可能出现ux重叠 2023-04-21 12:37:48 +08:00
04aeac62f8 fix: 截图加载失败 2023-04-21 12:37:26 +08:00
db79a59fb6 !212 4251
Merge pull request !212 from shenmo/dev
2023-04-20 12:46:27 +00:00
9b1b432e7c update tool/spark-dstore-patch.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-20 10:46:36 +00:00
cfafc04628 update tool/spark-dstore-patch.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-20 08:43:26 +00:00
8450e6afa6 update tool/spark-dstore-patch.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-20 08:35:36 +00:00
2a4d33e73f update tool/spark-dstore-patch.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-20 08:23:53 +00:00
8c2a10ebbc update tool/spark-dstore-patch.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-20 08:13:01 +00:00
2bec2de456 update tool/spark-dstore-patch.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-20 08:09:48 +00:00
90dea4ed2e update tool/spark-dstore-patch.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-20 08:06:48 +00:00
06ca1b7a97 update debian/control.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-14 09:21:30 +00:00
f9e2cea98e * 调整:重写了spark-dstore-patch,速度提升,尤其对机械硬盘下
* 调整:优化了aptss源文件同步策略
2023-04-14 16:34:26 +08:00
1bbf7027d3 用更优雅的方式同步source
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-14 07:51:44 +00:00
6891fc5b87 !211 4.2.5
Merge pull request !211 from shenmo/dev
2023-04-12 05:20:09 +00:00
90ec030f8b update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-12 05:17:32 +00:00
347c8ed093 update debian/spark-store.postinst.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-09 14:03:31 +00:00
d987c840c7 update debian/spark-store.postinst.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-09 14:03:19 +00:00
88a28c5658 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-09 02:31:28 +00:00
484a82b00b update tool/ssinstall.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-09 02:30:26 +00:00
1506b74b01 调整:删除libc6-dev依赖
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-09 02:06:05 +00:00
09b880fff8 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-31 09:04:39 +00:00
c6d3742daa update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-31 09:04:18 +00:00
917527cbe6 fix: 更改文案描述 2023-03-31 14:32:55 +08:00
faad17470a feat: 统一到同一个url配置 2023-03-27 15:20:26 +08:00
62f52451b7 !210 424
Merge pull request !210 from shenmo/dev
2023-03-23 06:25:48 +00:00
9f53c2eaa6 424 changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-23 06:20:49 +00:00
6d1d4e9f23 ts 2023-03-22 14:40:38 +08:00
753945228e fixup! feat: 进入应用前检测平台并提示 2023-03-14 14:33:35 +08:00
2f409c7082 * 修复:ssinstall校验失败的时候仍然提示安装成功
* 新增:ssinstall可以自动刷新ssupdate以防止仓库更新中导致的安装校验失败
2023-03-14 13:43:42 +08:00
728fc5866c failed 2023-03-13 09:36:54 +00:00
ace24914f4 update pipeline-dtk-build-aarch64.yml 2023-03-13 09:33:46 +00:00
8b9bf53e4e update pipeline-dtk-build-aarch64.yml 2023-03-13 09:29:42 +00:00
453d3963dd update pipeline-dtk-build-aarch64.yml 2023-03-13 09:24:04 +00:00
dff869cec8 update pipeline-dtk-build-aarch64.yml 2023-03-13 09:11:59 +00:00
17a6b22e55 update pipeline-dtk-build-aarch64.yml 2023-03-13 09:00:30 +00:00
cb66e8a0bd update pipeline-dtk-build-aarch64.yml 2023-03-13 08:56:17 +00:00
001ce7e4e8 update pipeline-dtk-build-aarch64.yml 2023-03-13 08:51:55 +00:00
351bbc0fc1 update pipeline-dtk-build-aarch64.yml 2023-03-13 08:50:33 +00:00
824ffbca2b update pipeline-dtk-build-aarch64.yml 2023-03-13 06:37:03 +00:00
d6082be71f update pipeline-dtk-build-aarch64.yml 2023-03-13 06:14:53 +00:00
6b807b24e2 create pipeline-dtk-build-aarch64.yml 2023-03-13 06:10:48 +00:00
3679e8d6eb Merge: merge reason to dev 2023-03-13 14:03:08 +08:00
335996b7d0 OMG-IT-GOES-WRONG 2023-03-13 11:32:10 +08:00
aa3b102fdd Merge branch 'dev' into Reason 2023-03-13 00:41:57 +08:00
5394e5cc57 fix: 跟进 dryrun 的错误信息 2023-03-13 00:41:33 +08:00
d2544795f5 Merge branch 'dev' into Reason 2023-03-13 00:39:22 +08:00
06c7664a37 --squash=2e807c36e76437798f48519cd5e7eb2cc2dbff86 2023-03-13 00:38:16 +08:00
2d09b549af Merge branch 'dev' into Reason 2023-03-13 00:35:43 +08:00
2e807c36e7 fix: 跟进 dryrun 的错误信息 2023-03-13 00:33:01 +08:00
0a1a6e73f0 Merge branch 'dev' into Reason 2023-03-13 00:17:59 +08:00
fea69319de --fixup=e8f13693be24559110b709a1778f58a71fabc37e 2023-03-13 00:14:46 +08:00
6519053648 update: update translate 2023-03-12 22:34:15 +08:00
ef41110632 fixup! I6JSL5 2023-03-12 22:26:22 +08:00
30cdeb89b1 https://gitee.com/deepin-community-store/spark-store/issues/I6JSL5 2023-03-12 22:25:38 +08:00
512df973f9 fixup! https://gitee.com/deepin-community-store/spark-store/issues/I6JSL5 2023-03-12 22:24:10 +08:00
d3b71fbacc Merge branch 'dev' into Reason 2023-03-12 22:05:44 +08:00
e8f13693be feat: 进入应用前检测平台并提示 2023-03-12 22:00:49 +08:00
6bd05655d6 feat: 检查 /tmp/spark-store 目录权限 2023-03-12 21:20:47 +08:00
ebe78f0937 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-12 02:02:04 +00:00
abae11a30e update debian/control.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-11 03:55:38 +00:00
f8ea89a069 Merge branch 'dev' into Reason 2023-03-11 00:41:31 +08:00
496d20d536 fix: Readme 文件描述中缺少依赖 2023-03-11 00:41:04 +08:00
369a7801ab fix: 使用cpu核心数目构建,防止小内存机器OOM 2023-03-11 00:38:55 +08:00
0478df3b49 安装失败时输出 2023-03-10 20:17:33 +08:00
d8909b1424 ssinstall解析绝对路径 2023-03-09 23:21:43 +08:00
ab707c8c2b 参数传错了 2023-03-09 22:58:05 +08:00
13d6965558 Merge remote-tracking branch 'refs/remotes/origin/Reason' into Reason 2023-03-09 17:54:41 +08:00
22cb1f6058 检验是否安装转到worker 2023-03-09 17:54:31 +08:00
8e560805b2 Merge branch 'dev' into Reason 2023-03-09 14:46:04 +08:00
8475623135 feat: 改进HIDPI支持 2023-03-09 14:45:24 +08:00
e865431411 9 2023-03-09 10:51:51 +08:00
ab8faa487e Merge remote-tracking branch 'refs/remotes/origin/Reason' into Reason 2023-03-09 10:32:06 +08:00
f0e3b6b687 放弃sender-d 2023-03-09 10:31:54 +08:00
5de20aa19d Merge branch 'dev' into Reason 2023-03-09 00:38:16 +08:00
b5ae73fbeb fix: 先使图像居中再显示图像界面 2023-03-09 00:37:07 +08:00
28326b37c7 !208 fix: 多显示器大图显示居中 2023-03-08 16:18:59 +00:00
12a114450c Merge branch 'dev' into Reason 2023-03-09 00:17:39 +08:00
768ed38ace fix: add vscode files to .gitignore 2023-03-09 00:17:23 +08:00
19f7e3fa0e Merge branch 'dev' into Reason 2023-03-09 00:15:56 +08:00
6d65b445dd fix: 多显示器大图显示居中 2023-03-09 00:15:28 +08:00
2867cf0500 绕过dh_strip 2023-03-08 18:55:02 +08:00
07eaebf483 sender-d用cpp 2023-03-08 18:43:31 +08:00
2d116ae6c1 sender-d用cpp 2023-03-08 18:42:39 +08:00
ceb43da10b regenerate sender-d_aarch64.sh.c,not sure it work everywhere 2023-03-08 14:00:19 +08:00
710cd9fa5c logo更新 2023-03-08 09:21:30 +08:00
c6688e47fb ssaudit也加上aptssupdate 2023-03-08 08:14:36 +08:00
e04b2545a9 修复一些去除bwrap带来的问题,真是的,跑的好好的就不要动啊kora 2023-03-08 01:04:43 +08:00
9b4c3aa2ce 不再使用cp-r同步系统lists,防止把未更新的也带过来 2023-03-08 00:44:21 +08:00
e6561e0a07 reason6 2023-03-08 00:35:57 +08:00
9616deb4b6 * ssinstall发现无法验证时尝试update而不是ssupdate
* 启动每日aptss update
2023-03-08 00:26:14 +08:00
96d2ea6669 红豆泥私密马赛,现在好了 2023-03-07 19:09:56 +08:00
d57c43a2b7 私密马赛,忘记空格了 2023-03-07 19:04:56 +08:00
40eadaca35 https://gitee.com/deepin-community-store/spark-store/issues/I6JSL5 2023-03-07 19:00:51 +08:00
21bcb67a73 update src/assets/json/features.json.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-07 09:21:53 +00:00
890718fdbb changelog 2023-03-07 17:14:53 +08:00
1613825b7c 自动读取分支名 2023-03-07 17:12:22 +08:00
bcb399dc30 aptss支持非root模式启动,添加transhell支持 2023-03-07 16:53:30 +08:00
cd581d4de9 若sources.list.d为空则终止清理 2023-03-06 23:19:58 +08:00
41ef63ec4a 修复:apt-fast仍然会在旧的archieve复制,指定到旧的archieve 2023-03-06 22:47:37 +08:00
02419bfdcb 修复:无法访问系统源 2023-03-06 22:29:51 +08:00
b67fd11fd5 修复:aptss无法找到新标准的list 2023-03-06 21:51:14 +08:00
9a7a80223a feat: 彻底抛弃bwrap,提升aptss响应速度。现已可将aptss当apt用 2023-03-06 21:45:12 +08:00
aa85ee53a8 好啊,来啊
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-05 15:49:40 +00:00
ac45f5eec9 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-05 15:42:52 +00:00
84cc4a9208 fix: 修复在x86下的编译问题 2023-03-05 23:42:07 +08:00
795a6ca709 fix: 新后端多架构 2023-03-05 23:29:07 +08:00
dab4606e9b Merge branch 'Reason' of gitee.com:deepin-community-store/spark-store into Reason 2023-03-05 23:22:47 +08:00
1954196ba1 feat: 多架构编译支持 2023-03-05 23:21:36 +08:00
fc0edab44c feat:aarch64-shc-sender 2023-03-05 23:10:12 +08:00
a04cf4e6d9 Merge branch 'Reason' of https://gitee.com/deepin-community-store/spark-store into Reason 2023-03-05 23:03:26 +08:00
e85576e5f0 fix:sender.sh 2023-03-05 23:03:16 +08:00
efba72002a Merge branch 'dev' of gitee.com:deepin-community-store/spark-store into Reason 2023-03-05 22:57:18 +08:00
4bdcb2cf3c Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev 2023-03-05 22:52:16 +08:00
8ff46e554f Merge branch 'Reason' of gitee.com:deepin-community-store/spark-store into Reason 2023-03-05 22:51:47 +08:00
57db01aeaf Merge remote-tracking branch 'refs/remotes/origin/Reason' into Reason 2023-03-05 22:46:25 +08:00
0ceb99e121 补充依赖pkexec 2023-03-05 22:46:12 +08:00
83b539e7da update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-05 11:56:52 +00:00
ce6c0a4613 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-03-05 11:53:45 +00:00
cf59aeb4eb 使用hardcode的方式修改了url
请在后续版本改善
仅用于测试!!!!
web请求方式被改回旧版了,请在柚子发布新web后改回
2023-03-05 19:11:21 +08:00
17ca13cf00 !207 fix: 修复安装不成功时,关闭主窗口会直接退出,且重启后没有记录的问题
Merge pull request !207 from zty199/auto-7392693-dev-034d32be
2023-03-05 02:26:20 +00:00
zty199
b99225bd3c fix: 修复安装不成功时,关闭主窗口会直接退出,且重启后没有记录的问题
由于安装操作在线程中异步执行,原始逻辑中仅判断下载完成后就检测是否还有后续任务,存在安装未结束就退出的情况

Log: 调整判断后续下载任务位置到槽函数中,每个任务安装完成结果信号触发后优先判断安装是否成功,再判断是否需要退出
2023-03-04 22:42:08 +08:00
8f39710cdb postinst增加判断arch 2023-03-04 21:09:05 +08:00
7ec6be1969 aa64+x86 2023-03-04 21:01:54 +08:00
d9ee17c9b1 Merge branch 'Reason' into dev 2023-03-04 18:21:01 +08:00
1543d75339 !206 去除无用的重复获取
Merge pull request !206 from shenmo/auto-4915358-dev-bc4479a1
2023-03-03 14:12:10 +00:00
77eb0d84c7 ss-feedback 2023-03-03 22:11:48 +08:00
68ddb3ffcc 去除无用的重复获取 2023-03-03 22:03:32 +08:00
58ea0249d8 调整效果 2023-03-03 21:29:33 +08:00
eb01bf253e !205 薪炎
Merge pull request !205 from shenmo/auto-4915358-dev-f2477c82
2023-03-03 13:28:58 +00:00
c22ce6290b 薪炎 2023-03-03 21:28:47 +08:00
1f7608bf77 2023-03-03 21:26:11 +08:00
16115a455b !204 4.2.3.1
Merge pull request !204 from shenmo/dev
2023-03-03 13:04:39 +00:00
ce680d54f9 !203 4231
Merge pull request !203 from shenmo/auto-4915358-dev-f244898b
2023-03-03 13:04:07 +00:00
a90699163f 4231 2023-03-03 21:02:31 +08:00
3edf39b4ef Merge branch 'Reason' of gitee.com:deepin-community-store/spark-store into Reason 2023-03-02 23:58:53 +08:00
f5c879b369 feat: aarch64 下x11时使用软件渲染 2023-03-02 23:49:08 +08:00
2bd9c4a440 !198 4.2.3
Merge pull request !198 from shenmo/dev
2023-03-02 15:34:05 +00:00
f494f15922 !202 Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
Merge pull request !202 from shenmo/auto-4915358-dev-47465fb4
2023-03-02 15:33:49 +00:00
d5df4057e9 Merge remote-tracking branch 'refs/remotes/origin/dev' into dev 2023-03-02 23:33:27 +08:00
dc07b7cb02 changelog 2023-03-02 23:33:16 +08:00
1bb0bf7d71 !201 Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
Merge pull request !201 from shenmo/auto-4915358-dev-844840b2
2023-03-02 15:32:32 +00:00
cf00d54355 Merge remote-tracking branch 'refs/remotes/origin/dev' into dev 2023-03-02 23:32:04 +08:00
1ea7067379 ci构建线程是2 2023-03-02 23:31:31 +08:00
29ad3cc72d !200 完全修复prerm崩溃
Merge pull request !200 from shenmo/auto-4915358-dev-8846a8bc
2023-03-02 15:27:29 +00:00
dfe57bf2c3 !199 fix: 修复软件构建依赖缺失
Merge pull request !199 from Pluto/auto-5304420-dev-2c49bfa9
2023-03-02 15:26:13 +00:00
b37f8d7f7e 完全修复prerm崩溃 2023-03-02 23:25:49 +08:00
b51b248566 fix: 修复软件构建依赖缺失 2023-03-02 23:13:49 +08:00
21baf598d7 修复prerm崩溃 2023-03-02 23:09:00 +08:00
2c6d706c58 423 2023-03-02 22:40:08 +08:00
1b1f7578d0 changelog 2023-02-24 22:13:40 +08:00
9275425bdf feat: 一键编译并安装脚本 2023-02-24 01:07:09 +08:00
22b1d66c07 fix: 删除不应该删除的指针造成闪退 2023-02-24 00:10:19 +08:00
a3e1d19ac3 !197 feat: 后台安装结束后退出任务栏驻留
* fix: 没有下载的时候直接退出客户端
* feat: 后台安装结束后退出任务栏驻留
* feat: 更新的时候关闭旧实例
2023-02-23 12:50:44 +00:00
762caae49f !196 fix: QtWebEngine
* fix: QtWebEngine
2023-02-23 08:41:14 +00:00
4e4ee205de !195 aptss加入对sdu镜像package文件识别;修改版本号到323t4
Merge pull request !195 from shenmo/auto-4915358-dev-a949fd8a
2023-02-21 07:49:06 +00:00
9d4e19e606 aptss加入对sdu镜像package文件识别;修改版本号到323t4 2023-02-21 15:48:12 +08:00
4d142ec614 !194 fix: ssinstall 失去作用
Merge pull request !194 from Pluto/auto-5304420-dev-cf41f4bd
2023-02-21 06:45:29 +00:00
80cf746f90 fix: ssinstall 失去作用 2023-02-21 14:38:38 +08:00
3b83b335be !193 aptss 获取线路信息 转到从 d. 服务器获取 顺便改了下changelog
Merge pull request !193 from shenmo/auto-4915358-dev-3747efbc
2023-02-20 01:47:48 +00:00
1f0a0e48ff 特性链接修改 2023-02-20 09:46:39 +08:00
432215e040 aptss 获取线路信息 转到从 d. 服务器获取
顺便改了下changelog
2023-02-20 09:32:41 +08:00
1a65386c6b !192 feat: 支持打包时从 debian/changelog 自动获取构建版本号并写入关于窗口
feat: 支持打包时从 debian/changelog 自动获取构建版本号并写入关于窗口
2023-02-18 23:12:26 +00:00
zty199
757dced302 fix: 修复 debian/control 中错误字段
Standards-Version 被错误修改为 Standard-Version

Log: 修复 debian/control 中错误字段,改为 Standards-Version
2023-02-19 07:06:12 +08:00
zty199
854caafd6b feat: 支持打包时从 debian/changelog 自动获取构建版本号并写入关于窗口
修改 debian/rules 文件,configure 时 qmake 添加环境变量 BUILD_VERSION,用于 .pro 文件中获取构建版本号并设置宏定义,在关于窗口中显示

Log: 修改并整理 debian 构建文件夹;修改 .pro 文件,支持打包时自动获取构建版本号;添加 usr/share/dsg/org.deepin.dtkwidget.feature-display.json,用于控制版本特性窗口显示提醒
2023-02-19 06:51:29 +08:00
1332107642 !191 fix: 修复下载列表对话框中,点击某个 item 取消下载按钮后下载列表无法再次显示的问题
fix: 修复下载列表对话框中,点击某个 item 取消下载按钮后下载列表无法再次显示的问题
2023-02-18 17:14:50 +00:00
zty199
4825417de8 fix: 修复下载列表对话框中,点击某个 item 取消下载按钮后下载列表无法再次显示的问题
MainWindow::notify 中焦点判断异常,未去除 QStyleSheetStyle 导致错误认为需要隐藏下载管理对话框

Log: 判断 focusIn 事件前排除 QStyleSheetStyle 对象
2023-02-19 01:08:41 +08:00
0001df153b !190 fix: downloadController 修改为懒汉式单例
fix: downloadController 修改为懒汉式单例
2023-02-18 16:56:12 +00:00
f88b38dd39 Merge branch 'dev' of gitee.com:deepin-community-store/spark-store into dev 2023-02-19 00:48:53 +08:00
3f2404ec1c fix: downloadController 修改为懒汉式单例 2023-02-19 00:45:17 +08:00
5b822194fa !188 fix: 多个应用安装可能会出现某一个应用没有安装
Merge pull request !188 from Pluto/auto-5304420-dev-f9438ba2
2023-02-18 12:21:51 +00:00
33ea9ee065 fix: 多个应用安装可能会出现某一个应用没有安装 2023-02-18 20:06:36 +08:00
d742e85332 !187 fix: 修复下载按钮点击/双击/拖动时,主窗口动作与下载管理对话框动作同时触发问题
Merge pull request !187 from zty199/auto-7392693-dev-bd4133a2
2023-02-17 08:18:26 +00:00
zty199
8dfb1fbe2f fix: 修复下载按钮点击/双击/拖动时,主窗口动作与下载管理对话框动作同时触发问题
下载按钮未屏蔽双击事件,导致触发主窗口最大化动作,同时下载对话框显示在原始位置;拖动时触发下载对话框显示,移动时又隐藏下载对话框,造成闪烁现象;重复点击下载按钮,对话框闪烁

Log: 修改下载按钮和下载对话框焦点策略对象,保证对话框焦点状态与下载按钮同步;对话框显示操作移入下载按钮鼠标事件中处理,隐藏操作移入主窗口事件循环中判断,当主窗口/下载对话框均不是活动窗口时隐藏对话框

* 可能修复 ISSUE #I6FNOW,目前修改后,连续点击下载按钮,对话框将按顺序显示/隐藏
2023-02-17 02:15:14 +08:00
4114b51d87 !186 feat: 支持 DTK 5.6.4 关于对话框“版本特性”显示功能
Merge pull request !186 from zty199/auto-7392693-dev-f4457187
2023-02-16 00:09:05 +00:00
zty199
deec70f14b feat: 支持 DTK 5.6.4 关于对话框“版本特性”显示功能
将版本特性信息写入 json,运行时解析文件信息并初始化版本特性对话框

Log: 添加版本特性 json 文件以及解析文件相关函数,用于构造版本特性对话框;版本号维护放入 src/assets/json/features.json 中统一管理,不再修改 main 函数,运行时从 json 文件读取并显示

* 该提交需要在低版本 DTK 验证能否正常编译运行
2023-02-16 01:18:11 +08:00
ee0d3f87ec !185 4.2.3test2
Merge pull request !185 from shenmo/dev
2023-02-13 07:37:43 +00:00
80adfd5dc1 !184 翻译
Merge pull request !184 from shenmo/auto-4915358-dev-be4c6d8e
2023-02-13 07:37:00 +00:00
e81c846432 加入zh_TW配置 2023-02-13 15:35:28 +08:00
03d60d74f1 翻译 2023-02-13 15:31:29 +08:00
4f2c5f1bdc fix: 内存安全加固 2023-02-12 23:56:25 +08:00
zty199
da03261cbb fix: ISSUE #I6CU7C 下载完成时,即使主窗口被遮挡,下载列表按钮动画效果仍显示在最上层
动画效果 WaterDrop widget 未设置父对象,使用全局坐标映射显示在按钮位置

Log: 对 WaterDrop 添加父对象,与下载列表按钮同级,为标题栏布局子控件,以此限制动画显示范围仅在标题栏内
2023-02-11 19:19:09 +08:00
zty199
48d551424a chore: 更新 debian/changelog
更新 debian/changelog;修正部分格式问题,更新日期

Log: 更新 debian/changelog;修正部分格式问题,更新日期
2023-02-05 22:53:27 +08:00
zty199
ab6c3d37d2 fix: 修复 Deepin 系统上显示“开发者模式未开启”的问题
没有区分 Deepin 和 UOS,在 Deepin 上对开发者模式状态文件进行判断,可能造成错误

Log: 添加判断区分 Deepin 和 UOS,仅在 UOS 判断开发者模式状态文件;优化 main 函数长度,将环境变量设置和 config.ini 读写放入 Utils 独立静态函数中调用;修复从托盘打开主界面时透明度动画不流畅的问题;优化关闭窗口动画代码,与打开窗口动画代码合并;修复主窗口关闭时,从托盘打开关于对话框后,调起主窗口会遮挡关于对话框的问题
2023-02-05 22:44:19 +08:00
de2db98324 cmake-patch: 更新补丁用于处理 v4.2.3~test1 时期版本号截取字符数过短问题 2023-02-05 16:12:21 +08:00
zty199
66d1aacbbe chore: 托盘图标添加鼠标悬浮提示
鼠标悬浮在托盘图标上时,显示气泡“星火应用商店”

Log: trayIcon 设置 toolTip;遗留问题:仅在后台运行时,系统监视器无法正确展示名称(仅显示 spark-store)
2023-02-04 21:41:43 +08:00
57f1b69663 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-02-03 03:03:34 +00:00
zty199
cb093dcc2b fix: 尝试修复 ISSUE #I68I8W 安装结束时随机崩溃问题
暂时未知,目前怀疑安装结束后,DownloadItem 触发 finished() 信号,在详情页槽函数中执行 disconnect 操作时导致崩溃

Log: 去除 disconnect 操作;修改可能造成问题的控件指针获取方式;修复多线程执行下载安装操作时跨线程相关警告

* 该提交可能存在严重问题,建议多进行测试;如果存在问题,及时 revert 该提交
2023-02-03 02:04:18 +08:00
eaf268a10d 423-changelog 2023-02-01 12:45:55 +08:00
zty199
1074e941a6 fix: ISSUE #I6B4CS 重复安装应用的bug
应用安装过程中,重新进入应用详情页,仅通过 `dpkg-query -s $pkgName` 判断本地是否已安装,未判断当前安装任务执行状态

Log: 判断本地安装状态后,执行 isDownloading 函数判断安装任务状态,更新按钮显示状态;整理应用详情页代码
2023-02-01 11:59:16 +08:00
zty199
05cb318737 fix: 修复客户端已经在后台运行时,双击 desktop 图标无法调出主窗口的问题
处理 DTK 单例启动信号时,仅处理了启动参数 >1 的情况;仅执行 spark-store 未处理

Log: 第二个启动参数为空时,仍然调用 onGetUrl 函数,函数中屏蔽了非 spk:// 链接格式的字符串,但仍然执行调出主窗口操作
2023-01-31 16:57:43 +08:00
4ce19e25e5 !182 4.2.2
Merge pull request !182 from shenmo/dev
2023-01-31 04:31:43 +00:00
17c152ce8b update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-31 04:30:03 +00:00
zty199
9275074e10 fix: 修复窗口关闭后台运行时,调用 spk 链接窗口不会自动显示的问题
链接调用时仅执行了窗口 activateWindow() 操作,在窗口隐藏时无效

Log: 添加 setWindowState(Qt::WindowActive) 操作和 show() 操作
2023-01-31 12:12:04 +08:00
e69eaa6296 update tool/apt-fast-conf/apt-fast.conf.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-31 02:50:11 +00:00
35bc1efbad 转oyo
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-31 02:33:59 +00:00
9420959023 cmake-patch: 更新补丁用于处理 v4.2.2 时期的变动部分变动与其它问题
1. v4.2.2 时期的新增的安装文件
2. Makefile 的默认触发的目标异常
3. 以及 SPARK_QM_TRANSLATIONS 文件输出的部分
    其与 SPARK_OVERRIDE_VERSION 的文件输出相同
2023-01-30 23:24:44 +08:00
7a16b5c52f patchs-doc: 补充一些注意事项 2023-01-30 22:21:19 +08:00
24519e6560 patchs-doc: 增加补丁操作说明文档 2023-01-30 22:05:08 +08:00
2104b99208 cmake-patch: 更新补丁用于支持 debian/changelog 版本覆盖构建 2023-01-30 22:03:27 +08:00
zty199
cf549c540d feat: ISSUE #I69IJI 自动关闭到托盘以防止下载和安装中断
添加托盘图标,主窗口关闭后仍然在后台运行;左键单机托盘图标显示主窗口

Log: 添加托盘图标;重构 MainWindow 构造函数,拆分 UI 初始化代码至单独函数;修改启动时窗口渐变动画初始化位置至 showEvent 中
2023-01-30 18:30:43 +08:00
zty199
4b40e3caca feat: ISSUE #I67K8Y 新增 spk://search/keyword 链接格式解析
支持打开该链接跳转搜索页面(禁止直接搜索 %,搜索结果过多会导致搜索页面 QtWebEngine 进程崩溃,无法继续搜索)

Log: 支持链接跳转搜索结果页面;暂不支持直接跳转到应用详情页
2023-01-30 16:19:48 +08:00
1a89c2a1a6 修改: debian/changelog 2023-01-30 15:53:35 +08:00
b1fd1a3c3c fix:zenity-fail-on-wayland 2023-01-30 15:51:35 +08:00
50e895938b transhell改为用source引入 2023-01-30 13:19:07 +08:00
18d2b1edbb update tool/apt-fast-conf/apt-fast.conf.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-30 03:30:45 +00:00
柚子
f91ee56d97 判断oyo是否存在
Signed-off-by: 柚子 <chowhound_xb@163.com>
2023-01-28 16:44:12 +00:00
41a6a3fc04 !181 4.2.1
Merge pull request !181 from shenmo/dev
2023-01-27 09:51:15 +00:00
1266b16d83 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-27 09:50:18 +00:00
4359a9c58d 正确获取语言代码
将load transhell的变量改为local
2023-01-27 16:31:10 +08:00
c243a30dec 修复:安装翻译文件位置错误 2023-01-27 12:31:20 +08:00
f629dca03c 更改到usr/share来加载 2023-01-27 12:26:51 +08:00
f2e1219a83 更新翻译 2023-01-27 12:22:32 +08:00
e2f27c7746 transhell update 1 2023-01-27 11:24:20 +08:00
72ba481180 update tool/ssinstall.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-26 17:05:35 +00:00
8d41966d67 奇怪的符号残留 2023-01-20 09:30:33 +08:00
f2a4ce3b25 文案修改:Ubuntu tag现在指的是22.04 2023-01-20 09:24:50 +08:00
0b2290344b 移除ssinstall的安装测试 2023-01-20 00:18:20 +08:00
a7cb44348d 修改以符合用法 2023-01-20 00:17:35 +08:00
384d4b300d 支持在安装前进行测试(ss-do-upgrade-worker)
用法:pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh test-install-app pkgname
2023-01-20 00:15:24 +08:00
19a1ba4289 修复: linux mint下无法统计下载量
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-19 10:24:30 +00:00
c160f4105d update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-16 09:13:42 +00:00
682a6e38d6 !180 4.2 正式
Merge pull request !180 from shenmo/dev
2023-01-16 09:11:11 +00:00
e4a3a974b5 dWine5标签现在意味着是Wine应用而不是Dwine5应用 2023-01-16 17:00:09 +08:00
eb38f2af05 修复:wayland下无法提示
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-16 08:52:06 +00:00
7163f8ee80 更新时显示正在安装的应用 2023-01-16 15:04:04 +08:00
a934373f1e * 调整:UOS开发者模式提示现在不会那么挤了 2023-01-15 23:05:25 +08:00
ce6ded25f2 fix: mint下无法正常调用aptss
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-15 13:59:49 +00:00
f707fef65b 4.3 2023-01-07 22:30:39 +08:00
721e6580c9 aptss修复一直重复 2023-01-07 22:24:22 +08:00
e20572b28d update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-07 02:50:56 +00:00
05a6af8f86 修改: debian/changelog 2023-01-07 10:39:53 +08:00
d4e84344c3 * 修复: 420t1版本中ssinstall有时会重新下载软件包的问题
* 新增: 安装前会对软件包安装进行dry run以判断是否能正确安装

  * 调整: aptss在进行任何操作前均检测是否存在包文件

  * 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟
2023-01-07 10:34:59 +08:00
f856060d3d 为了避免重复下载,暂时让ssinstall和ssaudit重新使用dpkg 2023-01-07 00:57:54 +08:00
49829f8d3c 统一将获取uri的改成apt-get 2023-01-06 23:53:43 +08:00
4cd3ca56e0 Merge remote-tracking branch 'refs/remotes/origin/dev' into dev 2023-01-06 23:45:31 +08:00
0538777ceb 准备test2 2023-01-06 23:44:37 +08:00
d3b303c66c update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 15:39:10 +00:00
98c4e8a699 更多的汉化 2023-01-06 23:37:34 +08:00
69b7cbe472 apt-fast相关改动:支持显示报错等
* feat: aptss支持显示报错

  * feat: aptss部分提示汉化

  * fix: 修复部分情况下ssinstall实际未安装但是错误显示
2023-01-06 23:30:05 +08:00
539a21ccec update DOCS/spk-doc.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 11:11:16 +00:00
eb40a32cc2 add DOCS/内网部署.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 10:01:47 +00:00
440b7ea88d update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 09:49:41 +00:00
36d273dd5e !179 4.1.2 正式版
Merge pull request !179 from shenmo/dev
2023-01-06 09:43:45 +00:00
6bdc1ee51c update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 09:29:18 +00:00
ecfa9a166d update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 09:24:19 +00:00
199700495c update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 09:23:57 +00:00
0bafab7f94 update DOCS/spk-doc.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 09:14:07 +00:00
dd4deff19d update DOCS/spk-doc.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 09:12:58 +00:00
8b88573283 在ssinstall输出中指出根目录或者单目录 2023-01-05 14:54:57 +08:00
2717cf695c ssinstall不允许安装验证失败的软件包 2023-01-05 14:53:15 +08:00
385803754f 区分版本号,新改动转给412t2 2023-01-05 14:49:23 +08:00
8ba377cf0b changelog 2023-01-05 14:47:29 +08:00
c21d4dac96 支持store分类单独安装 2023-01-05 14:45:53 +08:00
a85200338c 删除apt-fast推荐
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-04 06:43:06 +00:00
5d34dd6413 update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-04 04:36:19 +00:00
bd3daeba75 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-04 04:35:06 +00:00
zty199
8b2a61e4b2 fix: 修复下载列表中进度提示文字显示不完整的问题
QLabel 未处理文字过长的问题

Log: 控件提升为 DLabel,设置文字过长时右侧显示省略号;添加鼠标悬浮提示;固定 item 中应用名称宽度未 120px,保证进度条显示位置对齐
2023-01-03 21:42:46 +08:00
116f14845e 修复control无法识别 2023-01-03 21:42:24 +08:00
77bf544c59 删成安装依赖了
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-03 13:34:09 +00:00
f809d7c15d update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-03 13:33:37 +00:00
1f7f3edbba 删除多余的g++依赖
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-03 13:20:50 +00:00
90f6b6a574 update: translate 2023-01-03 21:18:26 +08:00
3e51ce8381 Merge branch 'dev' of gitee.com:deepin-community-store/spark-store into dev 2023-01-03 21:10:37 +08:00
b7df4a5801 fix: issue I68566 2023-01-03 21:10:28 +08:00
980e4a17d9 * feat: aptss 除ssupdate外的操作时候如果检测到存在源文件存在则不再重复获取
* fix: 修复在apt list锁被锁定的时候异常弹出有更新可用
2023-01-03 13:16:24 +08:00
d5248f4c1b Merge branch 'dev' of gitee.com:deepin-community-store/spark-store into dev 2023-01-01 11:02:04 +08:00
zty199
c169622806 fix: 修复应用详情页“应用反馈”按钮点击后无法调起交流平台问题
QProcess::startDetached 函数调用入参错误

Log: 修改调用方式,拆开 sh 和启动脚本地址分别用于 program 和 arguments
2023-01-01 00:27:04 +08:00
zty199
cc54014b29 fix: 修复应用详情页卸载应用后点击“安装”按钮后客户端崩溃问题
应用卸载后,按钮文字被设置为“安装”,导致点击按钮时判断要从下载列表中找到对应 DownloadItem 并触发安装;此时列表中并不存在此应用,list 访问下标越界导致崩溃

Log: 卸载后将按钮文字设置为“下载”避免该问题
2022-12-31 23:53:06 +08:00
zty199
c636e0882b fix: ISSUE #I68566 下载列表错位,图标错误
DownloadItem 原始定义高度为 54px,上下边距各 4px;然而图片 label 高度定义为 48,且宽度未定义,明显放不下;DownloadListWidget 中添加 item 时,设置每个 item sizeHint 高度只有 50px,与 item 高度不一致

Log: 固定 DownloadItem 高度为 56px;修改 DownloadListWidget 添加 item 时每个 item 的 sizeHint 高度;使用 DLabel 替换 QLabel 用于单个 item 中应用名称显示,使用 setElideMode 保证名称过长时右边显示省略号,并添加鼠标悬浮提示
2022-12-31 23:13:28 +08:00
zty199
4120af7e24 fix: 修复 Deepin/UOS 上始终认为开发者模式未打开的问题
读取 /var/lib/deepin/developer-mode/enabled 文件之前,QFile 未 open

Log: 判断条件中添加 QFile::open 操作;去除没啥意义的 QTextStream,直接使用 QIODevice::readLine 读取文件第一行
2022-12-31 22:08:26 +08:00
09a5789c26 Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev 2022-12-29 12:16:00 +08:00
fc658f324d fix: 检测UOS开发者模式 2022-12-29 12:15:04 +08:00
2861b0573b fix: 检测UOS开发者模式 2022-12-29 12:07:30 +08:00
2ab4ebc0e3 fix: 安装结束的错误判断 2022-12-28 12:31:15 +08:00
e344b16aa0 fix: 校验 serverlist 有效性 2022-12-27 10:54:30 +08:00
30b65350ca fix: 规范代码 2022-12-27 10:24:15 +08:00
0db8c8b1bb 更改文案:星火计划开发者
更改链接:GPL 3的链接更改到主仓库的LICENSE文件而不是GNU官网链接
2022-12-27 01:34:22 +08:00
9e25584bdc 更新翻译:去除“联盟” 2022-12-27 01:31:06 +08:00
ee6d6f145f 最后还是简单的等10s会比较容易 2022-12-27 01:15:07 +08:00
347f6e918f update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-26 15:52:40 +00:00
0fcbd15ab4 update: 4.1.2's changelog 2022-12-26 22:13:11 +08:00
6bdac50059 chore: 默认域名修改为cdn域名 2022-12-26 22:09:34 +08:00
f45b2af260 update: 更新翻译文件 2022-12-26 20:54:47 +08:00
d744c1d978 fix: e645c5e5 参数错误 2022-12-26 20:05:17 +08:00
0544761094 fix: 修复api重复申请内存的泄漏 2022-12-26 19:05:07 +08:00
e645c5e526 fix: 消除qt警告 2022-12-26 19:05:02 +08:00
d75fdd9f80 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-26 08:49:08 +00:00
30f74db0dc Merge branch 'dev' of https://gitee.com/deepin-community-store/spark-store into dev 2022-12-25 22:10:25 +08:00
2d0069ce18 更名为ssaudit 2022-12-25 22:09:42 +08:00
48b91d1887 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-25 14:06:21 +00:00
32cb3d7453 ssinstall禁止安装验证失败的包,审核转到使用ssinstall-audit 2022-12-25 22:00:19 +08:00
zty199
ba3071d62b chore: 去除关于窗口中文描述信息中多余引号
修改翻译文件

Log: 修改翻译文件;修正 debian/changelog 中格式错误(line 8)
2022-12-25 18:10:11 +08:00
zty199
dca80a3fbb fix: 修复配置文件写入位置异常问题
main.cpp 中通过 QStandardPaths 获取配置文件路径,此时未设置组织名称和程序名称,导致路径异常

Log:
1. main.cpp 中提前设置组织名称和程序名称,再读写配置文件
2. main.cpp 中提前检查配置文件所在文件夹是否存在,不存在则创建,再读写配置文件
3. 修复 main.cpp 中修改配置文件后没有写入的问题
4. 去除版本号中重复的 Version 字样(由关于窗口提供)
5. 修复关于窗口中组织图标显示为 deepin 的问题(已去除)
6. 修复 wayland 下窗口设置透明度相关警告(wayland 下禁用透明度动画)
7. 下载列表 wayland 下窗口标题添加翻译
2022-12-25 17:58:00 +08:00
f99c0839dd !178 fix: 修复主窗口关闭后,关于窗口没有自动关闭的问题
* 添加 Application 类,继承 DApplication,将 main 函数中设置属性、关于信息等操作移至 Application 构造函数中进行
* 1.1. 添加 setOrganizationName 操作,设置组织名称为 spark-union,与 SWRT 保持一致
* 1.2. 设置组织名称后,QStandardPaths::AppConfigLocation 等路径相应改变,修改所有配置文件和缓存文件路径(server.list/config.ini 等)
* 1.3. 关于对话框设置父对象后,对话框背景色受主窗口样式表影响,移动部分控件样式表设置方式与位置
* 修复关于窗口不显示组织 Logo 的问题,补充丢失的资源文件,整理资源文件
* 去除 .pro 文件中无效的更新翻译文件脚本调用,整理 .pro 文件,添加编译时更新 ts 文件脚本调用
* 继续修复偶现关闭客户端时崩溃问题(疑似 aria2c 进程未启动,pid 未初始化为随机值,执行 kill 操作时未判断导致)
* 修复进入详情页时焦点默认在分享链接按钮上的问题
* 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数
* 更新翻译文件,去除已经不存在的翻译
2022-12-25 08:28:05 +00:00
8850cfd4a3 update dtk-build-release-tag-20220425.yml 2022-12-25 07:45:19 +00:00
bec8a14baf !177 将默认的README改为英文
Merge pull request !177 from shenmo/dev
2022-12-25 04:46:51 +00:00
1b9c925183 把默认的README改成英文 2022-12-25 12:43:51 +08:00
09221bc2e9 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-25 03:21:04 +00:00
98da0c22fc enhance: 规范代码行为 2022-12-24 10:29:55 +08:00
cadbb351fb enhance: 限制循环变量的作用范围 2022-12-24 10:04:40 +08:00
2de237ce83 fix: aptss ssupdate出错时不再锁死
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-24 10:04:40 +08:00
511fbaa0b0 update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-23 13:55:58 +00:00
a6d85b6ade update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-23 13:55:40 +00:00
5889ac3045 enhance: 下载列表新增 wayland 窗口标题 2022-12-23 18:42:19 +08:00
c1ba14bbd0 fix: 安装依赖缺失 2022-12-23 18:28:38 +08:00
7bdccc7783 Merge branch 'dev' of gitee.com:deepin-community-store/spark-store into dev 2022-12-23 18:12:36 +08:00
momen
3a54cba3e5 !176 让浏览器获取中文页面
* !1 enhanced: 判断系统语言,中文则修改请求头,请求中文网页
2022-12-23 10:12:18 +00:00
79463246fb fix: 修复编译依赖 2022-12-23 18:11:44 +08:00
cc8ff5eff2 enhance: 消除 c11 标准警告 2022-12-23 16:46:32 +08:00
613327b2cc fix: 修复非deepin的wayland环境下ui显示 2022-12-23 16:30:36 +08:00
8b31db843c fix: Wayland 在某些环境下错误识别为 dde 2022-12-23 16:30:36 +08:00
fd4fdbe970 format: 代码格式化 2022-12-23 12:13:48 +08:00
89a3ab0b4c feat: support wayland 2022-12-22 21:50:27 +08:00
0179c2f04f feat: wayland 2022-12-22 00:49:11 +08:00
8918e63484 !171 4.1.1-real
Merge pull request !171 from shenmo/dev
2022-12-21 16:18:05 +00:00
6d1fb80f0f update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-21 16:17:32 +00:00
4add78c6d7 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-21 16:17:19 +00:00
zty199
89c32013bf fix: 修复应用更新失败问题
zenity 处理多选框时,返回结果取值错误导致,获取值实际为已安装版本号,而不是包名

Log: 修改 zenity 参数为 --print-column=2 获取包名
2022-12-21 23:57:06 +08:00
zty199
8f7ce54584 fix: 修复检查到应用更新没有系统通知的问题
错误地把 sudo 改为了 su(su $USER -c xxxxxx)

Log: 还原为 sudo -u $USER xxxxxx
2022-12-21 05:59:10 +00:00
65f3114078 !168 4.1.0
Merge pull request !168 from shenmo/dev
2022-12-21 05:31:36 +00:00
00386c7aeb 修复文案 2022-12-21 13:22:41 +08:00
zty199
3a89394838 fix: 修复可更新应用列表为空时仍然弹出选择应用更新对话框的问题
获取可更新应用列表后直接赋值给 zenity 处理,未对列表为空进行处理

Log: 获取可更新应用列表后,若列表为空则退出;不为空再交给 zenity 处理
2022-12-21 12:09:59 +08:00
a3f3a9153a 仍然有点小问题的更新检测 2022-12-21 09:24:59 +08:00
cc582da96b !167 4.0.1 优化Ubuntu
Merge pull request !167 from shenmo/dev
2022-12-20 02:18:57 +00:00
d5877ffe00 ubuntu 优化显示 2022-12-20 10:17:53 +08:00
58f590560e !166 4.0 代号:Flamescion
Merge pull request !166 from shenmo/dev
2022-12-19 11:04:38 +00:00
f636b82f02 4.0Flamescion 2022-12-19 18:54:36 +08:00
877c3aafd1 正式版 2022-12-19 18:52:37 +08:00
zty199
65c26f035b fix: ISSUE #I66334 安装结束后仍显示 Installing
DownloadItem::install 中 finished 信号发送时间错误:安装操作被放入 QtConcurrent::run 中异步执行,发送信号在主线程中,安装未结束就发送了信号

Log: 调整信号发送位置至子线程中;AppIntoPage::isDownloading 中,若安装任务正在执行,需要 return,否则会出现安装后卸载再重新安装时,直接显示卸载按钮的问题
2022-12-19 17:38:41 +08:00
zty199
ba331cb3fb fix: ISSUE #I66N4Y 关闭动画播放时快速按Alt+F4可反复关闭动画而关不掉商店
动画执行标志位仅在动画结束后被置为不再执行,需要提前

Log: 修改 BaseWidgetOpacity::closeEvent,动画开始执行就修改标志位
2022-12-19 10:55:03 +08:00
zty199
27c95991c5 fix: 修复窗口关闭时崩溃问题
DownloadListWidget 析构时未对 downloadController 指针判空,直接调用 downloadController->stopDownload() 空指针导致崩溃

Log: DownloadListWidget 析构时对 downloadController 指针添加判断
2022-12-19 10:49:53 +08:00
ffd31445b9 !165 4.0.0.3
Merge pull request !165 from shenmo/Framescion
2022-12-19 02:11:26 +00:00
02fd887116 cmake-patch: 更新补丁用于支持 BaseWidgetOpacity 基础类的构建内容
此补丁包含以下内容:
 .gitignore                           |   34 ++++
 CMakeLists.txt                       |   93 ++++++++++
 Makefile                             |   60 ++++++
 assets/spark.png                     |  Bin
 cmake/DebPackageConfig.cmake         |  327 ++++++++++++++++++++++++++++++++++
 cmake/SparkAppimageConfig.cmake      |  133 ++++++++++++++
 cmake/SparkBuildGraphviz.cmake       |    8 +
 cmake/SparkDesktopMacros.cmake       |   35 ++++
 cmake/SparkEnvConfig.cmake           |    8 +
 cmake/SparkFindDtkConfig.cmake       |   11 +
 cmake/SparkFindLibraries.cmake       |    7 +
 cmake/SparkFindQt5Config.cmake       |  154 ++++++++++++++++
 cmake/SparkFindQt6Config.cmake       |   24 ++
 cmake/SparkInstallMacrosConfig.cmake |  132 ++++++++++++++
 cmake/SparkMacrosConfig.cmake        |  129 +++++++++++++
 cmake/SparkMacrosExtendConfig.cmake  |  197 ++++++++++++++++++++
 cmake/SparkTranslatorConfig.cmake    |   27 +++
 cmake/linuxdeployqt-help             |   48 +++++
 cmake/package-deb.descript           |   45 +++++
 cmake/spark-appimage.desktop.in      |    9 +
 cmake/spark-desktop.desktop.in       |   11 +
 Makefile                             |   16 ++
 cmake/DebPackageConfig.cmake         |    8 -
 DOCS/spark-cmake-build-system.md     |  301 +++++++++++++++++++++++++++++++
 CMakeLists.txt                       |    1
 cmake/SparkFindQt5Config.cmake       |    4
 CMakeLists.txt                       |    4
 27 files changed, 1818 insertions(+), 8 deletions(-)
2022-12-19 03:00:25 +08:00
fd3df91017 docs: 添加有关 src 下内容的改进,与"描述主体结构预览"文档的编写规范说明 2022-12-19 02:49:36 +08:00
c9d0c8b751 repo: 添加 BaseWidgetOpacity 基础类来实现继承者的淡出动画来代替主窗口的实现
BaseWidgetOpacity 是一个提供了淡出/淡入动画的基础类

1. closeEvent 窗口关闭时进行淡出动画
    此前在 MainWindow 中实现的淡出动画将由 BaseWidgetOpacity 来实现。

    此前 MainWindow 原有的 DBlurEffectWidget 父类将移交至 BaseWidgetOpacity 继承。

注意:
    如果 MainWindow 在未来重写 closeEvent 事件时将可能丢失 BaseWidgetOpacity 中的淡出效果
2022-12-19 02:47:38 +08:00
adf9032897 fix:商店点击刷新线路之后未默认选中首位 2022-12-18 13:46:55 +08:00
2c1679d0af fix:商店点击刷新线路之后未默认选中首位 2022-12-18 13:03:54 +08:00
95f9806c1c update .workflow/dtk-build-commit-20220425.yml.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-17 01:24:39 +00:00
252d2f491d 更新链接 2022-12-16 21:28:33 +08:00
e2f6d97f94 改为使用全新Web接口 2022-12-16 14:01:12 +08:00
48fd79e9be fix:商店更换线路的选项无效,点击刷新线路之后未默认选中首位 2022-12-15 22:31:00 +08:00
07eb9493cb cmake-patch: 更新补丁用于支持 Qt5 Svg 依赖的构建内容
此补丁包含以下内容:
 .gitignore                           |   34 ++++
 CMakeLists.txt                       |   93 ++++++++++
 Makefile                             |   60 ++++++
 assets/spark.png                     |  Bin
 cmake/DebPackageConfig.cmake         |  327 ++++++++++++++++++++++++++++++++++
 cmake/SparkAppimageConfig.cmake      |  133 ++++++++++++++
 cmake/SparkBuildGraphviz.cmake       |    8 +
 cmake/SparkDesktopMacros.cmake       |   35 ++++
 cmake/SparkEnvConfig.cmake           |    8 +
 cmake/SparkFindDtkConfig.cmake       |   11 +
 cmake/SparkFindLibraries.cmake       |    7 +
 cmake/SparkFindQt5Config.cmake       |  154 ++++++++++++++++
 cmake/SparkFindQt6Config.cmake       |   24 ++
 cmake/SparkInstallMacrosConfig.cmake |  132 ++++++++++++++
 cmake/SparkMacrosConfig.cmake        |  129 +++++++++++++
 cmake/SparkMacrosExtendConfig.cmake  |  197 ++++++++++++++++++++
 cmake/SparkTranslatorConfig.cmake    |   27 +++
 cmake/linuxdeployqt-help             |   48 +++++
 cmake/package-deb.descript           |   45 +++++
 cmake/spark-appimage.desktop.in      |    9 +
 cmake/spark-desktop.desktop.in       |   11 +
 Makefile                             |   16 ++
 cmake/DebPackageConfig.cmake         |    8 -
 DOCS/spark-cmake-build-system.md     |  301 +++++++++++++++++++++++++++++++
 CMakeLists.txt                       |    1
 cmake/SparkFindQt5Config.cmake       |    4
 26 files changed, 1815 insertions(+), 7 deletions(-)
2022-12-15 20:10:34 +08:00
217b299a67 update tool/ssinstall.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-15 12:04:37 +00:00
9738c41bb9 patch: 为星火商店提交一个基础的 cmake 构建补丁
此补丁包含以下内容:
 .gitignore                           |   34 ++++
 CMakeLists.txt                       |   93 ++++++++++
 Makefile                             |   60 ++++++
 assets/spark.png                     |  Bin
 cmake/DebPackageConfig.cmake         |  327 ++++++++++++++++++++++++++++++++++
 cmake/SparkAppimageConfig.cmake      |  133 ++++++++++++++
 cmake/SparkBuildGraphviz.cmake       |    8 +
 cmake/SparkDesktopMacros.cmake       |   35 ++++
 cmake/SparkEnvConfig.cmake           |    8 +
 cmake/SparkFindDtkConfig.cmake       |   11 +
 cmake/SparkFindLibraries.cmake       |    7 +
 cmake/SparkFindQt5Config.cmake       |  154 ++++++++++++++++
 cmake/SparkFindQt6Config.cmake       |   24 ++
 cmake/SparkInstallMacrosConfig.cmake |  132 ++++++++++++++
 cmake/SparkMacrosConfig.cmake        |  129 +++++++++++++
 cmake/SparkMacrosExtendConfig.cmake  |  197 ++++++++++++++++++++
 cmake/SparkTranslatorConfig.cmake    |   27 +++
 cmake/linuxdeployqt-help             |   48 +++++
 cmake/package-deb.descript           |   45 +++++
 cmake/spark-appimage.desktop.in      |    9 +
 cmake/spark-desktop.desktop.in       |   11 +
 Makefile                             |   16 ++
 cmake/DebPackageConfig.cmake         |    8 -
 DOCS/spark-cmake-build-system.md     |  301 +++++++++++++++++++++++++++++++
 24 files changed, 1812 insertions(+), 5 deletions(-)
2022-12-15 15:35:19 +08:00
e17c50d396 fix:安装结束后仍显示Installing 2022-12-15 14:55:46 +08:00
795c3308d3 修改翻译 2022-12-15 14:47:56 +08:00
f026844dba 更新部分翻译 2022-12-14 08:56:25 +08:00
1a05ad05aa update dtk-build-release-tag-20220425.yml 2022-12-13 14:21:46 +00:00
9c91d0a5a0 400t2 公测准备 2022-12-13 21:47:09 +08:00
a27c8b9ace fix:下载取消后下载进度仍然在widget中显示 2022-12-13 21:37:40 +08:00
68d91f71ba 应用详情页添加版本号 2022-12-13 21:30:30 +08:00
fca2086d9f 修复取消下载导致闪退 2022-12-13 21:17:51 +08:00
83ee212484 重写下载按钮逻辑 2022-12-13 20:32:39 +08:00
922cb6a34f fix:应用商店退出时,aria2c仍然在运行 2022-12-13 19:37:46 +08:00
eb00159691 fix:Appinfo界面信息无法复制 2022-12-13 19:25:52 +08:00
3b18fc94b5 将下载按钮更新为自绘按钮 2022-12-13 19:00:36 +08:00
375243503f Merge remote-tracking branch 'refs/remotes/origin/dev' into dev 2022-12-13 18:28:48 +08:00
9b31040efd ssinstall支持相对路径 2022-12-13 18:28:24 +08:00
ac5d86db92 update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-13 09:53:50 +00:00
86f270eca9 修复进度条过长 2022-12-13 17:23:34 +08:00
f5bb95da12 修复左侧边栏样式错误 2022-12-13 17:18:10 +08:00
eadc8dd875 修改: translations/spark-store_zh_CN.ts 2022-12-13 17:13:25 +08:00
91b628e7a6 installation complete 翻译
现在使用AppName来提示
2022-12-13 17:12:41 +08:00
6bd8fc7a1e 修改限制单例运行,再次启动时拉起现有实例 2022-12-13 14:54:59 +08:00
c2e665ecb6 修复英文状态下左侧边栏文字不对齐 2022-12-13 14:52:07 +08:00
50cf537e1d 安装完成通知加上应用名 2022-12-13 14:40:55 +08:00
0f0a5795af Merge remote-tracking branch 'upstream/dev' into dev 2022-12-13 12:53:15 +08:00
09f96d596a fix: 超时时间错误 2022-12-13 12:52:45 +08:00
a2cb7ef112 需求:在安装结束后将安装状态发送系统通知 2022-12-13 12:43:58 +08:00
2ed2512d6c fix:设置界面点击链接仍无效,邮箱文案附近出现未被解析的html标签 2022-12-13 12:40:20 +08:00
d720d0670d fix:下载的进度条仍然过长 2022-12-13 12:36:28 +08:00
da2c019da0 fix:点击取消下载 仍然会有系统通知提示下载完毕 2022-12-13 12:34:48 +08:00
ce8c058265 更新翻译 2022-12-13 10:23:37 +08:00
7f3eadf3a7 更新文案 2022-12-12 21:47:52 +08:00
44ea6755f9 fix:4.0 bug 在设置界面意义不明的文案 2022-12-12 21:37:29 +08:00
9df0e3a3b3 去除安装按钮的子菜单 2022-12-12 21:33:41 +08:00
13550ebbec 修复由于翻译不正确引起的关于页面bug 2022-12-12 21:30:40 +08:00
077034b1d6 fix:4.0 开始自动安装时安装按钮仍然存在 2022-12-12 21:13:28 +08:00
ac21f67030 fix:4.0 安装结束后的Info按钮的中文翻译应当为:详情,而不是信息 2022-12-12 21:10:55 +08:00
292d4aa5c9 fix: 清除网页缓存未生效 2022-12-12 17:36:12 +08:00
fb4d78ce1d 修复下载量统计超时 2022-12-12 16:23:41 +08:00
ad25606ef9 新增文案提示用户发生了什么 2022-12-12 16:20:01 +08:00
6ace772a09 修改发送邮件的等待时间 2022-12-12 16:08:30 +08:00
bfc68fbf6f 修复下载按钮状态未重置 2022-12-12 15:49:41 +08:00
e2c9f1100d 修改: debian/spark-store.postinst 2022-12-12 15:43:23 +08:00
77c2e2ebc8 changelog-400t1 2022-12-12 15:30:03 +08:00
eb06f33269 修复 2022-12-12 15:28:12 +08:00
e2c8eb79a0 添加下载完成后自动安装 2022-12-12 15:26:15 +08:00
c825e4b39c 修改文案 2022-12-12 15:23:48 +08:00
79d12f2409 安全的免密码安装 2022-12-12 15:11:48 +08:00
382b2de5ca 更新翻译 2022-12-12 14:36:33 +08:00
0fea4c13ef 添加多个通知,修复下载进度条过长问题 2022-12-12 14:34:29 +08:00
ff84576aab 更改文案 2022-12-12 12:19:38 +08:00
2b2ebc111e 更新翻译 2022-12-12 12:15:55 +08:00
20fc6f5a77 update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-12 04:00:46 +00:00
83bfb8dfd5 解决依赖没有删除完全导致构建失败问题 2022-12-12 11:52:46 +08:00
db5b85db7d 去除无用依赖 2022-12-11 20:53:35 +08:00
271a7e33f4 添加chatGPT帮忙写的通知推送 2022-12-11 20:40:01 +08:00
478db77d36 点击侧边栏按钮时清空搜索框 2022-12-11 19:28:25 +08:00
a787745752 设置中添加QQ群号,链接改为可点击,搜索后关键词不清空 2022-12-11 19:21:45 +08:00
758b752d6e 修复重新安装按钮文案错误 2022-12-11 18:54:00 +08:00
60ed4c5aff 添加重新安装按钮 2022-12-11 18:41:19 +08:00
2d3366990a feat: 增加主程序退出动画 2022-12-11 18:25:30 +08:00
b63ae13a3e fix shebang 2022-12-11 18:13:03 +08:00
6ff58adffa 左侧边栏加入更新按钮 2022-12-11 18:10:36 +08:00
f948c8905a 添加浏览器GPU支持,编译时间获取,关于窗口修改,启动时窗口居中显示 2022-12-11 17:55:27 +08:00
a31f724b65 修复翻译异常与应用详细页文字过长时显示不完整的问题 2022-12-11 17:47:31 +08:00
8c9c2fcf11 修复非DDE环境下透明度过高的问题 2022-12-11 17:31:10 +08:00
e251616129 update .workflow/dtk-build-commit-20220425.yml.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-11 09:27:16 +00:00
6655e14b6c 构建同步到master
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-11 09:26:37 +00:00
柚子
b3aa2036f8 删除文件 Makefile 2022-12-11 09:22:45 +00:00
8ad1156e3c 修复返回键出现错误问题 2022-12-11 12:02:26 +08:00
b5495fa66e !4 make: 添加快速构建脚本,对 VSCode 用户友好
Merge pull request !4 from zinface/makefile-script
2022-12-11 02:11:09 +00:00
333a1168d4 添加应用详情页下载量显示 2022-12-11 02:05:34 +08:00
8a54dd92a3 添加dbus功能 2022-12-11 01:19:59 +08:00
ae1c50893d 菜单中添加投稿器,更新等 2022-12-11 01:06:52 +08:00
dd0605d0ba 应用详情页添加分享和请求更新按钮,设置页面添加更新客户端和清理缓存、读取缓存大小功能 2022-12-11 01:03:13 +08:00
0817901a59 添加下载列表为空时的提示 2022-12-11 00:29:51 +08:00
e171904a34 抽象出控件动画类 2022-12-11 00:17:09 +08:00
abd0e47c69 make: 添加快速构建脚本,对 VSCode 用户友好
此部分对 VSCode 用户友好,并提供一些可扩展的操作
1. make 时将创建 build 目录并使用 qmake 构建(核心数为机器最大核心数)
2. make run 时将运行此程序(程序构建位置将在: build/src/spark-store)
3. make package 用来提供产出包功能?
2022-12-10 23:16:22 +08:00
1c24079406 添加按下下载按钮时标题栏下载列表按钮抖动 2022-12-10 19:18:23 +08:00
67c0cbf27b fix: 修复一些bug 2022-12-10 13:22:54 +08:00
5cc34e7e3d 修复页面索引错位bug 2022-12-09 22:19:20 +08:00
98cf333386 添加服务器url配置功能 2022-12-09 21:27:01 +08:00
562b582f72 添加设置页面 2022-12-09 19:07:22 +08:00
73917eeeb1 fix: 打包依赖增加g++ 2022-12-09 15:29:17 +08:00
c5913b4198 !1 feat: 增加主程序进入动画
* !1 update src/mainwindow-dtk.cpp.
* update src/mainwindow-dtk.cpp.
* feat: 增加主程序进入动画
2022-12-09 07:26:55 +00:00
c0e9815d9d 修复深色模式下顶栏的按钮未更新的bug 2022-12-09 15:15:48 +08:00
050fe964dd 深色主題寫好啦! 2022-12-09 15:13:41 +08:00
6981a4f476 更改应用详情页UI细节 2022-12-09 14:38:08 +08:00
e72d123a40 更新中文翻译 2022-12-09 13:49:28 +08:00
a10390a6e3 update changelog 2022-12-09 12:01:26 +08:00
3fecd41c4f 下载完成后自动更改按钮文案 2022-12-09 11:59:19 +08:00
f0604afcfc 同步3.5版本的更改 2022-12-09 11:59:04 +08:00
2ec4b1f4d4 4.0 2022-12-09 11:16:11 +08:00
fbffe12501 feat:搜索从网页加载 2022-12-08 22:44:34 +08:00
df7b49dbe2 fix: aria2指定dns,指定最大并发下载数 2022-12-08 17:51:18 +08:00
9d93966124 Merge remote-tracking branch 'upstream/dev' into dev 2022-12-08 17:46:20 +08:00
977b2ebdc9 update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-04 07:09:26 +00:00
28ed452bb0 * feat: aptss不再尝试安装apt-fast,转而自带
* chore:  删除password-check模块
2022-12-04 15:07:44 +08:00
512d86feac update: 更新aria2下载参数 2022-11-27 12:21:15 +08:00
8e1e0cea7a fix: minor updates 2022-11-26 19:33:20 +08:00
d2214114fb Merge remote-tracking branch 'upstream/dev' into dev 2022-11-26 19:27:41 +08:00
c90232022e update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-26 09:27:43 +00:00
84a1554b4b !149 333 feat feat: 首页链接调用浏览器打开
Merge pull request !149 from shenmo/master
2022-11-26 09:27:04 +00:00
71dbf9b958 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-26 09:22:56 +00:00
9d12086f09 !148 feat: 首页链接调用浏览器打开
Merge pull request !148 from zty199/auto-7392693-master-b04b4cba
2022-11-26 09:20:37 +00:00
zty199
54a55e15a9 feat: 首页链接调用浏览器打开
首页链接调用浏览器打开

Log: 使用自定义 WebEngineView 和 WebEnginePage 替代 QWebEngineView,重写 createWindow 方法,当页面存在新建窗口或标签页动作时调用浏览器打开网址;修改 Widget UI 布局,在 page1 添加 QVBoxLayout,保证 WebEngineView 自动撑满布局,去除 webFoot 填充控件;更新翻译文件,添加“请勿频繁搜索”翻译文案,去除残留翻译
2022-11-26 17:14:48 +08:00
5385e2d1b1 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-26 08:50:41 +00:00
1e468ba774 fix: 邮件超时 2022-11-26 14:30:00 +08:00
25efce0017 !147 dev--->master:流水线准备优化,先行同步
Merge pull request !147 from shenmo/dev
2022-11-26 02:07:44 +00:00
707a2b5e4c !146 修正一些问题
Merge pull request !146 from Pluto/dev
2022-11-26 02:06:19 +00:00
b9121c13ab feat: 改进搜索动画 2022-11-26 02:20:17 +08:00
9c80179493 feat: 版本号新增编译时间 2022-11-25 22:29:23 +08:00
2a89135d1a fix: 指针未释放 2022-11-25 22:05:29 +08:00
b91e0142f4 bigimage: 对应用信息下的截图预览优化(#I62F4X) 2022-11-22 11:58:09 +08:00
55897e3cb9 update: 更新介绍 2022-11-20 20:23:45 +08:00
f17fcdfe85 feat: 跳转到反馈器 2022-11-20 20:00:14 +08:00
9046a3a965 fix: 只允许一个更新进程 2022-11-18 01:11:20 +08:00
1e72fcb7f2 !145 文案:修复换行
Merge pull request !145 from shenmo/dev
2022-11-17 14:48:33 +00:00
9007bdf3d3 update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-17 14:48:13 +00:00
afd926ae4a update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-17 14:47:46 +00:00
4949d67852 !144 文案:添加RC入口
Merge pull request !144 from shenmo/dev
2022-11-17 14:46:44 +00:00
5f5d71fbd0 update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-17 14:46:16 +00:00
9fd8f64195 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-17 14:45:25 +00:00
c32ffb7cd2 update .workflow/dtk-build-release-tag-20220425.yml.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-10 11:34:28 +00:00
af9217b1dc !143 333t4
Merge pull request !143 from shenmo/dev
2022-11-10 11:30:47 +00:00
93e218dd53 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-10 11:28:20 +00:00
4de32fa8a6 update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-10 11:27:19 +00:00
2d59a61796 修改: debian/changelog
修改:     debian/spark-store.postinst
	修改:     src/main.cpp
2022-11-09 20:06:50 +08:00
7abdd90215 文案修改 update tool/update-upgrade/ss-do-upgrade.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-08 13:45:24 +00:00
cbd594e217 !142 333t3
Merge pull request !142 from shenmo/dev
2022-10-28 13:45:08 +00:00
42b6a20c97 fix 菜单中进入更新列表失效 2022-10-28 21:43:57 +08:00
110adc995d 文案修改 2022-10-28 10:20:23 +08:00
cd6d0ac133 cmmit 2022-10-28 10:19:17 +08:00
568e73de07 文案修改 2022-10-28 09:58:17 +08:00
62c8841c50 aptss的download也使用ss-apt-fast 2022-10-28 09:55:48 +08:00
6fd611919b Now use ss-apt-fast as aptss backend 2022-10-28 09:08:21 +08:00
77a84785de !141 333t2
Merge pull request !141 from shenmo/dev
2022-10-27 16:58:38 +00:00
9969f4f2fc just in case有些用户没有找到QQ群.... 2022-10-28 00:57:02 +08:00
833a8ec14b version 2022-10-28 00:52:25 +08:00
dd679f3f26 333t2推仓库 2022-10-28 00:50:31 +08:00
5411a832dc fix:更新和检查更新出错时不报错 2022-10-28 00:48:53 +08:00
0aeadb5526 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-27 13:14:10 +00:00
91fd97b878 修改文案:检查更新 2022-10-27 10:37:51 +08:00
f2cf344f62 polkit文件 2022-10-26 16:01:55 +08:00
8d84e433a6 zenity 不再以root启动 2022-10-26 15:43:43 +08:00
a6e9dac2f9 没啥用,又加回来了 2022-10-24 09:22:07 +08:00
495ef3292e 更新提示超时时间增加到15 2022-10-24 09:15:04 +08:00
5900b3cdf3 feat:安装时不再需要网络
modify: 为了CI的构建速度,在构建依赖中不再依赖语言工具
2022-10-24 09:12:37 +08:00
e644214263 !140 3304 策略调整 选中的应用作为整体更新,降低服务器压力
Merge pull request !140 from shenmo/dev
2022-10-23 15:52:04 +00:00
2b76f5e202 3304 2022-10-23 23:50:16 +08:00
6fe06667eb !139 3303-real
Merge pull request !139 from shenmo/dev
2022-10-23 06:06:22 +00:00
f61e3a6ede 引号故障 2022-10-23 14:04:58 +08:00
bddbbcc2e8 !138 3303 暂时关闭实时输出,未找到禁止取消或关闭的方法
Merge pull request !138 from shenmo/dev
2022-10-23 05:58:42 +00:00
8310a59df8 微调样式 2022-10-23 13:58:32 +08:00
05cfdbb318 支持分应用显示正在更新 2022-10-23 13:42:32 +08:00
b5488b6c32 3303 2022-10-23 13:27:14 +08:00
6cec12be9d 3302 修复pkexec未执行 2022-10-23 13:06:03 +08:00
53f9746ebf 3301 推送 2022-10-23 10:21:59 +08:00
b68ef5aab1 !137 3301 sudo去除
Merge pull request !137 from shenmo/dev
2022-10-23 02:20:29 +00:00
c6daf5159c 去除sudo 2022-10-23 10:19:49 +08:00
b0453c7a8a !136 3101重大事故:更新系统修复
Merge pull request !136 from shenmo/dev
2022-10-23 02:15:44 +00:00
c7ee32a452 pkexec 修复 2022-10-23 10:10:55 +08:00
e1d25e401f update debian/spark-store.preinst.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-22 08:19:33 +00:00
6b78dce87e !135 体验优化:更新时添加进度条
Merge pull request !135 from shenmo/dev
2022-10-21 09:47:49 +00:00
e5a198e1d8 添加升级应用时的进度条 2022-10-21 17:46:20 +08:00
1780110e33 !134 330
Merge pull request !134 from shenmo/dev
2022-10-21 09:28:29 +00:00
19901b0d7d update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-21 09:28:06 +00:00
d24af0461b update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-21 09:27:05 +00:00
31a574ec8b !133 feat: 侧边栏更新管理器
Merge pull request !133 from Pluto/dev
2022-10-21 09:26:27 +00:00
3feae61b1b feat: 更新管理器
change: 翻译
2022-10-21 17:20:57 +08:00
eaf65a326c update tool/update-upgrade/ss-do-upgrade.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-21 08:49:18 +00:00
13da2bc441 update tool/update-upgrade/ss-do-upgrade.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-21 08:47:41 +00:00
5420bad0ee 默认免密码查看可更新应用 2022-10-21 14:56:31 +08:00
8465c9ad2d 全部改为zenity 2022-10-21 14:43:15 +08:00
5562e2b5d1 fix:不正确地跳过unhold 2022-10-21 13:59:43 +08:00
a09425f361 符号错误修正 2022-10-21 13:46:23 +08:00
18db530c0d zenity依赖加入 2022-10-21 13:30:21 +08:00
03263edf8c 更新系统zenity,适配apt-mark hold 2022-10-21 13:28:34 +08:00
cd13a1ce08 !132 merge and start develop zenity
Merge pull request !132 from shenmo/dev
2022-10-21 03:03:18 +00:00
1c5f31da6f fix: 左侧菜单字体大小变化 2022-10-20 21:13:59 +08:00
cafb4d1dfe !131 版本号 GUI
Merge pull request !131 from shenmo/dev
2022-10-19 15:15:00 +00:00
828f1a0f05 update src/main.cpp.
版本号

Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-19 15:14:38 +00:00
b03795e364 !130 324正式
Merge pull request !130 from shenmo/dev
2022-10-19 14:54:19 +00:00
c54c13d822 modified: debian/changelog 2022-10-17 18:33:49 +08:00
fdc9550100 tag相关文案修改 2022-10-17 18:31:46 +08:00
458cc49302 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-15 14:26:04 +00:00
e11afad89b !129 反向同步进度
Merge pull request !129 from shenmo/master
2022-10-15 14:25:37 +00:00
43ae031131 !128 增加dbus
Merge pull request !128 from depend/dev
2022-10-15 12:03:18 +00:00
dd6780d636 增加dbus文件,再次启动的时候会唤起第一个进程
并且处理spark打开
2022-10-15 19:55:19 +08:00
42368a0245 !127 转扁平化为正常合入,添加依赖libssl-dev
Merge pull request !127 from shenmo/dev
2022-10-13 16:04:52 +00:00
8ca0035107 根据 https://www.deepinos.org/d/1076-ubuntu2204/3 修改
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-13 16:03:40 +00:00
10332c59e0 !126 324t3发版
* 3.2.4~test3
* 	修改:     debian/changelog
* !125 fix: 对oss进行URL转译
* Merge remote-tracking branch 'upstream/dev' into dev
* fix: 对oss进行URL转译
* !124 fix: 安装时可能出现的超时错误
* update debian/changelog.
* update src/widget.cpp.
* Merge remote-tracking branch 'upstream/dev' into dev
* update debian/changelog.
* Merge remote-tracking branch 'upstream/dev' into dev
* fix: 超时错误
* update README.zh.md.
* update README.md.
* update README.zh.md.
* update debian/changelog.
* !123 feat: 投稿器
* feat: 投稿器
* !122 fix:gpu 参数
* fix: chrome GPU 参数
* Merge remote-tracking branch 'upstream/dev' into dev
* 修复错误的配置文件
* 改为读取/etc
* update debian/changelog.
* UOS 走普通的aptss,aptss支持UOS源
* 更新时不再清除免密码安装设置
* !121 反向同步
* fix
* Merge remote-tracking branch 'upstream/dev' into dev
* fix: high CPU usage because futex is still waiting for queue after illegal exit
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/dev' into dev
* feat: enable GPU
* Merge remote-tracking branch 'upstream/dev' into dev
* Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev
* feat: 清除网页缓存
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-10-12 14:08:21 +00:00
09a1c9f710 3.2.4~test3 2022-10-12 22:08:08 +08:00
ba29c4171c 修改: debian/changelog
修改:     translations/spark-store_en.ts
	修改:     translations/spark-store_fr.ts
	修改:     translations/spark-store_zh_CN.ts
2022-10-12 22:06:30 +08:00
3b9dde23e7 !125 fix: 对oss进行URL转译
Merge pull request !125 from Pluto/dev
2022-10-12 10:59:23 +00:00
746e9bd3d6 Merge remote-tracking branch 'upstream/dev' into dev 2022-10-12 09:31:38 +08:00
d7f0ee983b fix: 对oss进行URL转译 2022-10-12 09:31:23 +08:00
3feec88f7b !124 fix: 安装时可能出现的超时错误
Merge pull request !124 from Pluto/dev
2022-10-09 11:11:25 +00:00
c0ffb64a86 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-09 11:01:55 +00:00
8c08b7e995 update src/widget.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-09 10:41:48 +00:00
4d7e766d75 Merge remote-tracking branch 'upstream/dev' into dev 2022-10-09 18:37:01 +08:00
09115c3961 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-09 10:36:31 +00:00
63998bbce4 Merge remote-tracking branch 'upstream/dev' into dev 2022-10-09 18:36:31 +08:00
967f62f825 fix: 超时错误 2022-10-09 18:36:22 +08:00
e8ae0325e0 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-08 16:13:33 +00:00
66a4563b51 update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-08 16:12:59 +00:00
330ae3eeb8 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-08 16:12:00 +00:00
0534c39ee5 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-08 15:45:37 +00:00
04047c1e44 !123 feat: 投稿器
* feat: 投稿器
2022-10-08 15:38:55 +00:00
5e501b9d17 feat: 投稿器 2022-10-08 23:27:35 +08:00
5a434a9b7d !122 fix:gpu 参数
Merge pull request !122 from Pluto/dev
2022-10-08 14:41:43 +00:00
e554aec98d fix: chrome GPU 参数 2022-10-08 22:24:16 +08:00
ab0f5e6613 Merge remote-tracking branch 'upstream/dev' into dev 2022-10-08 22:20:46 +08:00
59607f6b34 修复错误的配置文件
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-08 14:08:30 +00:00
a13f0ddcb7 改为读取/etc
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-08 13:47:00 +00:00
fec604b481 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-08 03:22:12 +00:00
085eddd66f UOS 走普通的aptss,aptss支持UOS源 2022-10-07 22:31:24 +08:00
30860802dd 更新时不再清除免密码安装设置 2022-09-30 11:27:22 +08:00
30f36ff35d !121 反向同步
Merge pull request !121 from shenmo/master
2022-09-27 12:15:32 +00:00
lisuke
81993625ba !120 添加编译依赖 fakeroot
* 添加 fakeroot 依赖
2022-09-27 12:14:48 +00:00
87b68aca1e !119 323版本 降低dtk版本
Merge pull request !119 from shenmo/dev
2022-09-27 01:53:24 +00:00
10125c5816 update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-27 01:49:01 +00:00
21d33ec347 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-27 01:48:34 +00:00
ad57aa26ff 降低dtk需求版本
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-27 01:34:48 +00:00
8902c81b9e !118 fix: high CPU usage because futex is still waiting for queue after illegal exit
* fix
* Merge remote-tracking branch 'upstream/dev' into dev
* fix: high CPU usage because futex is still waiting for queue after illegal exit
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/dev' into dev
* feat: enable GPU
* !113 3.2.1 merge
* !112 Now stop use mail to collect info
* Merge remote-tracking branch 'upstream/dev' into dev
* Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev
* feat: 清除网页缓存
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-09-27 01:34:18 +00:00
0ad4b6c82c fix 2022-09-26 23:53:28 +08:00
189a0b4939 Merge remote-tracking branch 'upstream/dev' into dev 2022-09-26 23:46:34 +08:00
c65d7b86df fix: high CPU usage because futex is still waiting for queue after illegal exit 2022-09-26 23:46:25 +08:00
e269e6ca57 !116 3.2.2 合并
Merge pull request !116 from shenmo/dev
2022-09-21 18:37:02 +00:00
aff593eba8 !115 3.2.2 启动
* update debian/changelog.
* download可无root运行,相应的,不会自动到最新
* !114 feat: GPU enable
* aptss will now refresh the system source before doing install, downloa…
2022-09-20 04:12:29 +00:00
beaeac60a3 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-20 04:11:58 +00:00
11d68fb4b5 download可无root运行,相应的,不会自动到最新
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-20 04:05:25 +00:00
e7680fe2a0 !114 feat: GPU enable
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/dev' into dev
* feat: enable GPU
* !113 3.2.1 merge
* !112 Now stop use mail to collect info
* Merge remote-tracking branch 'upstream/dev' into dev
* Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev
* feat: 清除网页缓存
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-09-20 04:03:09 +00:00
19dff7fb56 Merge remote-tracking branch 'upstream/master' into dev 2022-09-20 11:55:54 +08:00
67b314d0d2 Merge remote-tracking branch 'upstream/dev' into dev 2022-09-20 11:55:40 +08:00
63b28adaf8 feat: enable GPU 2022-09-20 11:55:36 +08:00
8741973cca aptss will now refresh the system source before doing install, download, policy....etc 2022-09-19 17:58:00 +08:00
8e3787ab07 !113 3.2.1 merge
Merge pull request !113 from shenmo/dev
2022-09-18 13:17:11 +00:00
f7d07e0bf9 !112 Now stop use mail to collect info
* Now abandon mail info collect method and delete the outdated info
2022-09-11 12:24:26 +00:00
9e4df5c5c2 !111 feat: 清除QtWebCore的缓存
* Merge remote-tracking branch 'upstream/dev' into dev
* Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev
* feat: 清除网页缓存
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-09-03 09:25:19 +00:00
829a08d40a Merge remote-tracking branch 'upstream/dev' into dev 2022-09-02 19:28:05 +08:00
411bbe5935 Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev 2022-09-02 19:25:27 +08:00
5d5fbfbad4 feat: 清除网页缓存 2022-09-02 19:24:45 +08:00
af89e64478 !110 检测更新
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-08-31 17:50:24 +00:00
c93c221cf1 文案修改 2022-09-01 01:47:38 +08:00
afee0966c8 update src/widget.ui.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-08-31 17:44:46 +00:00
2df5363c2c feat: 星火应用商店检测更新 2022-09-01 01:39:09 +08:00
971a5dcc63 安装时删除已有的源 2022-09-01 00:40:16 +08:00
a252e7b724 3.2.1 更新源服务器改为aptss 2022-09-01 00:29:37 +08:00
d3987a20ec !108 在检测更新时临时降低优先级到100,防止系统中有且版本一致的包被反复来回更新
* changelog更新
* 修复界面中显示的更新检测服务是否启动不正确
* 在检测更新时临时降低优先级到100,防止系统中有且版本一致的包被反复来回更新
2022-08-29 17:58:39 +00:00
932e754b88 !107 修改: debian/changelog
* 	修改:     debian/changelog
* ssupdate不再更新cache,防止ssinstall出错率
2022-08-29 17:32:05 +00:00
72a771b0f1 !106 界面细节修改,提升下载量的瞩目 补充changelog 准备发320测试
Merge pull request !106 from shenmo/auto-4915358-master-984782a5
2022-08-29 17:01:12 +00:00
b75fbe5674 界面细节修改,提升下载量的瞩目
补充changelog
准备发320测试
2022-08-30 01:00:06 +08:00
6617522a7c !105 cdn
Merge pull request !105 from Pluto/dev
2022-08-29 16:06:31 +00:00
1733d9853d feat: cdn 2022-08-29 23:57:08 +08:00
55c6c13e50 fix: 图片服务器逻辑 2022-08-29 22:50:03 +08:00
9c2f326268 !104 修复错别字 修复spk
* 修复错别字
2022-08-29 14:08:26 +00:00
b1a6f79961 fix: 拼写错误 2022-08-29 21:06:17 +08:00
1561d511d1 Merge remote-tracking branch 'upstream/master' into dev 2022-08-29 21:05:45 +08:00
2d2b431df7 !103 feat: 下载量统计
* Merge remote-tracking branch 'upstream/master' into dev
* feat: 下载量
* fix: spk 搜索问题
* fix: 修复依赖问题
* feat: 统计下载量
* Merge remote-tracking branch 'upstream/master' into dev
* feat: sender-d
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/master' into dev
* fix: enhance download speed
* feat: 从所有镜像源中选取最快镜像源高速下载
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 不再使用http头请求文件大小
* Merge remote-tracking branch 'upstream/master' into dev
* feature: metalink backhend
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 忽略系统原有aria2配置文件
* fix: waitforfinished
2022-08-29 12:53:49 +00:00
c87272b463 Merge remote-tracking branch 'upstream/master' into dev 2022-08-29 20:28:59 +08:00
da632d41e7 feat: 下载量 2022-08-29 20:20:10 +08:00
96b0f0f2be fix: spk 搜索问题 2022-08-29 20:19:42 +08:00
8a7d09b716 fix: 修复依赖问题 2022-08-29 17:26:27 +08:00
fcdcd84462 !101 feat: 统计下载量
* feat: 统计下载量
* Merge remote-tracking branch 'upstream/master' into dev
* feat: sender-d
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/master' into dev
* fix: enhance download speed
* feat: 从所有镜像源中选取最快镜像源高速下载
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 不再使用http头请求文件大小
* Merge remote-tracking branch 'upstream/master' into dev
* feature: metalink backhend
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 忽略系统原有aria2配置文件
* fix: waitforfinished
2022-08-29 08:32:02 +00:00
8f63b58062 feat: 统计下载量 2022-08-29 16:12:37 +08:00
2c8d38a0da Merge remote-tracking branch 'upstream/master' into dev 2022-08-29 15:48:17 +08:00
807777e3dc 3.2
混淆过的.c文件
2022-08-29 15:44:22 +08:00
86a9e66e29 feat: sender-d 2022-08-29 15:40:15 +08:00
15938d0da4 Merge remote-tracking branch 'upstream/master' into dev 2022-08-29 14:50:15 +08:00
1331c369ad update dtk-build-release-tag-20220425.yml 2022-08-29 03:03:23 +00:00
d5182c760b update dtk-build-release-tag-20220425.yml 2022-08-25 15:34:27 +00:00
f9dc1cd09d !100 测试 tag
* update .workflow/dtk-build-release-tag-20220425.yml.
2022-08-25 15:22:17 +00:00
230c860d91 !99 3160 版本推送
* 	修改:     debian/changelog
2022-08-24 23:20:48 +00:00
69f2d6e626 !98 fix: enhance download speed
* Merge remote-tracking branch 'upstream/master' into dev
* fix: enhance download speed
* feat: 从所有镜像源中选取最快镜像源高速下载
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 不再使用http头请求文件大小
* Merge remote-tracking branch 'upstream/master' into dev
* feature: metalink backhend
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 忽略系统原有aria2配置文件
* fix: waitforfinished
2022-08-24 23:08:05 +00:00
6b560492e8 Merge remote-tracking branch 'upstream/master' into dev 2022-08-24 18:39:38 +08:00
8886016357 fix: enhance download speed 2022-08-24 18:37:08 +08:00
9a74368ef5 !97 3.1.5-5 版本号确认
* 3155
* update debian/changelog.
2022-08-24 08:41:17 +00:00
cf5e1cae76 !96 feat: 从所有镜像源中选取最快镜像源高速下载
* feat: 从所有镜像源中选取最快镜像源高速下载
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 不再使用http头请求文件大小
* Merge remote-tracking branch 'upstream/master' into dev
* feature: metalink backhend
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 忽略系统原有aria2配置文件
* fix: waitforfinished
2022-08-24 06:43:40 +00:00
6d23aaa07c feat: 从所有镜像源中选取最快镜像源高速下载 2022-08-24 14:02:55 +08:00
3740b551ef Merge remote-tracking branch 'upstream/master' into dev 2022-08-24 13:37:27 +08:00
4c7d50d117 !95 改为commit自动构建为Pr自动构建测试/更新readme中的依赖包下载地址
* update dtk-build-commit-20220425.yml
* update README.md.
* 更新依赖包链接
2022-08-23 05:26:12 +00:00
6318b5f51d 删除文件 .workflow/dtk-build-release-tag.yml 2022-08-22 09:05:27 +00:00
2f94e78c32 !94 发tag自动触发构建
* update dtk-build-release-tag-20220425.yml
* create dtk-build-commit-20220425.yml
2022-08-22 09:03:45 +00:00
fecda52294 !93 重新以commit为触发条件走ci,gitee go无法从pr获取
* create dtk-build-commit-20220425.yml
2022-08-22 08:57:58 +00:00
8cefdbaca0 !92 ci release
* 	new file:   .workflow/dtk-build-release-tag.yml
2022-08-22 08:48:55 +00:00
0da714b35a !90 modified: .workflow/dtk-build-commit-20220425.yml
* 	modified:   .workflow/dtk-build-commit-20220425.yml
2022-08-22 08:43:47 +00:00
379c5a857d !88 修改ci策略:自动触发
* update dtk-build-commit-20220425.yml
2022-08-22 03:08:46 +00:00
3b349d43ad !87 流水线
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
* create dtk-build-commit-20220425.yml
* 删除文件 .workflow/master-pipeline.yml
* 删除文件 .workflow/dtk-build-commit-20220425.yml
* update .workflow/dtk-build-commit-20220425.yml.
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
* update dtk-build-commit-20220425.yml
2022-08-22 02:38:28 +00:00
b856734843 !86 修改文案 tool/update-upgrade/ss-do-upgrade.sh
* 	修改文案     tool/update-upgrade/ss-do-upgrade.sh
2022-08-19 11:41:10 +00:00
238c43b79e !85 修改: debian/spark-store.postinst 重命名: tool/ss-apt-fast -> tool/aptss
* 删除文件 spark-wine7-devel_7.14~spark-1_amd64.deb
* final
* 	修改:     debian/spark-store.postinst
* 	修改:     tool/update-upgrade/ss-update-controler.sh
* 	修改:     debian/spark-store.postinst
* 只额外生成一份给aptss
* 	修改:     debian/spark-store.postinst
*  要提交的变更:
* 	修改:     tool/aptss
* 	修改:     debian/changelog
* 	修改:     pkg/usr/share/bash-completion/completions/aptss
* 	修改:     pkg/usr/share/bash-completion/completions/aptss
* 	修改:     debian/spark-store.postinst
* aa
* Merge branch 'master' of https://gitee.com/deepin-community-store/spark-store
* 	修改:     src/main.cpp
* Merge branch 'master' of https://gitee.com/deepin-community-store/spark-store
* 	修改:     debian/spark-store.postinst
2022-08-19 07:28:10 +00:00
855b18cfa6 !84 修改: src/main.cpp
* 	修改:     src/main.cpp
* Merge branch 'master' of https://gitee.com/deepin-community-store/spark-store
* 	修改:     debian/spark-store.postinst
2022-08-18 09:41:14 +00:00
bc897969f8 !83 修改: debian/spark-store.postinst
* 	修改:     debian/spark-store.postinst
2022-08-18 09:37:11 +00:00
52af8a8229 !82 modified: debian/changelog modified: debian/spark-store.postinst new file: tool/spark-store.asc
* 	modified:   debian/changelog
2022-08-18 09:31:33 +00:00
5220b886de !81 重新发布3152
* update debian/changelog.
* update debian/spark-store.postinst.
2022-08-18 08:44:13 +00:00
5be7923e60 !80 http2下curl容易报错导致pubkey错误
* update debian/spark-store.postinst.
2022-08-18 08:39:36 +00:00
6ca6f63b1f !79 changelog和版本号
Merge pull request !79 from shenmo/auto-4915358-master-ca4f1682
2022-08-18 01:12:49 +00:00
bda0426a3b changelog和版本号 2022-08-18 09:12:10 +08:00
a75b7b1e57 Merge branch 'master' of https://gitee.com/deepin-community-store/spark-store 2022-08-18 09:10:51 +08:00
8054f85ada !78 fix: 不再使用http头请求文件大小
Merge pull request !78 from Pluto/dev
2022-08-17 15:15:19 +00:00
6f23d07929 fix: 不再使用http头请求文件大小 2022-08-17 23:07:14 +08:00
b73d97d65d Merge remote-tracking branch 'upstream/master' into dev 2022-08-17 22:12:10 +08:00
bc6584eacc Merge branch 'master' of https://gitee.com/deepin-community-store/spark-store 2022-08-17 19:41:50 +08:00
c9e01d10fe !77 修改uos的更新策略,先下载到/var/cache/apt/archives再更新
* 修改uos的更新策略,先下载到/var/cache/apt/archives再更新
2022-08-17 02:59:05 +00:00
c3b9763aa8 Merge branch 'master' of https://gitee.com/deepin-community-store/spark-store 2022-08-15 22:59:12 +08:00
398cd512d7 !76 * 改变更新策略,现在支持应用在更新时引入新依赖 * ss-apt-fast现在默认允许降级,以与apt使用体验一致
*   * 改变更新策略,现在支持应用在更新时引入新依赖
2022-08-15 14:54:03 +00:00
0c0ff452ae !74 修改: debian/spark-store.prerm 新文件: tool/apt-fast-conf/sources.list.d/.keep 删除: tool/apt-fast-conf/sources.list.d/sparkstore.list
* 	修改:     debian/spark-store.prerm
2022-08-09 11:27:38 +00:00
e6d3b035db 修改: debian/spark-store.prerm
新文件:   tool/apt-fast-conf/sources.list.d/.keep
	删除:     tool/apt-fast-conf/sources.list.d/sparkstore.list
2022-08-09 19:26:59 +08:00
5e88f7c1eb !73 3142版本号
* 3142版本号
2022-08-09 11:08:02 +00:00
b639a9d726 !72 * 修复使用更新和安装设置更新商店本体时出错
* * 修复使用更新和安装设置更新商店本体时出错
2022-08-09 10:35:33 +00:00
e2f6a2b3c2 !71 3142准备测试
* 3142版本
2022-08-08 04:50:47 +00:00
c826a3927c !69 metalink 功能
* feature: metalink backhend
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 忽略系统原有aria2配置文件
* fix: waitforfinished
2022-08-08 04:49:17 +00:00
0c367799b7 !70 修复:ssinstall在没有安装apt-fast的情况下首次安装需要依赖的软件时安装失败
* 	修改:     debian/changelog
* 修复:ssinstall在没有安装apt-fast的情况下首次安装需要依赖的软件时安装失败
2022-08-08 04:35:58 +00:00
0e351a667a feature: metalink backhend 2022-08-08 12:21:20 +08:00
e8612f304a Merge remote-tracking branch 'upstream/master' into dev 2022-08-07 23:34:33 +08:00
114b5cdfe5 !68 安装脚本和检测更新脚本检查网络时间超时时间延长至5s
* 安装脚本和检测更新脚本检查网络时间超时时间延长至5s
* ss-update-notify-placer.sh. 更新服务验证网络的超时时间增加到5s
* update debian/changelog.
* update debian/changelog.
* 版本号更新 3141
2022-08-07 02:50:40 +00:00
a563d99bc4 !67 修复: ss-apt-fast full-upgrade未用apt-fast加速
* 修复: ss-apt-fast full-upgrade未用apt-fast加速
2022-08-06 04:50:14 +00:00
b1cb765b6e !66 * 屏蔽了ssinstall之外的安装方式
* 屏蔽了ssinstall之外的安装方式
* 调整了报错框的形式 
* 修复pkexec下ssinstall不处理依赖
2022-08-06 03:13:57 +00:00
49c5583ea9 !65 修复安装时使用wget的问题
修复安装时使用wget但是依赖未写明的问题(改用curl)
准备发布3.1.4
2022-08-06 02:24:00 +00:00
b0dfd6a3da !63 修复UOS未处理模拟软件源,新增ss-apt-fast ssupdate,杂项调整
修复UOS未处理模拟软件源
    删除ssinstall的apt-fast安装功能(转移到ss-apt-fast,并且不会再对UOS安装apt-fast)
    ss-apt-fast除了下载,安装和更新,全部走apt;
    ss-apt-fast现在只会在安装/下载/更新时检测是否有apt-fast并处理
    ss-apt-fast ssupdate 从服务器获取源链接后只更新星火源;
    和 ss-apt-fast ssupdate 功能重复的内容转为调用
2022-08-05 01:34:27 +00:00
a63c1202bd !62 除自动外,手动检查更新前也重新获取list和update
* update tool/update-upgrade/ss-update-controler.sh.
* update tool/update-upgrade/ss-upgrade-list.sh.
* update tool/update-upgrade/ss-upgrade-list.sh.
2022-08-04 02:09:44 +00:00
dfe30f9d6d !59 * 调整 现在与系统更新分开,不再导致更新失败 * 支持直接更新软件源文件,不再让d.吃全部更新流量 * ss-apt-fast不再强制root权限
* !61 $1为policy时,apt-fast换成apt
* 手动更新时也重新获取源文件
* 	修改:     tool/ss-apt-fast
*   * 调整 现在与系统更新分开,不再导致更新失败
2022-08-04 02:00:38 +00:00
b00f3fa501 !58 Change version number
Merge pull request !58 from shenmo/auto-4915358-master-1658494943452
2022-07-22 13:02:38 +00:00
03f35782c6 Change version number 2022-07-22 21:02:10 +08:00
8f192d17ec !57 fix: aria2 配置文件错误
* Merge remote-tracking branch 'upstream/master' into dev
* fix: 忽略系统原有aria2配置文件
* fix: waitforfinished
2022-07-22 13:01:05 +00:00
57bbc9536a Merge remote-tracking branch 'upstream/master' into dev 2022-07-21 18:29:58 +08:00
9f7b46b600 fix: 忽略系统原有aria2配置文件
fix

fix
2022-07-21 18:21:06 +08:00
0dc594b3f1 !56 修复下载提前退出
* 	修改:     src/main.cpp
* 	修改:     debian/changelog
* fix: waitforfinished
2022-07-08 09:37:36 +00:00
cdb4fc05a1 fix: waitforfinished 2022-07-08 17:19:13 +08:00
198384c552 !46 fix !44
* readme: 修正 ubuntu 的编译说明
* download: 检查软件源的有效性
2022-07-02 23:25:35 +08:00
958988d93c !54 download: 在有cdn工作前提下,不使用主域名
* download: 在有cdn工作前提下,不使用主域名
* merge: upstream
* README: 英文修正 ubuntu22 的依赖问题
* Merge remote-tracking branch 'upstream/master'
* widget: 检查cdn状况在下载开始前检测,不堵塞ui线程
* Merge remote-tracking branch 'upstream/master'
* readme: 修正 ubuntu 的编译说明
* download: 检查软件源的有效性
2022-07-02 23:25:35 +08:00
5f9599c47d !52 使用aria2替换原本的多线程下载
* update debian/control.
* fix: readme
* change: 切换到 aria2
* Download: 初步完成对 axel 的适配工作
* README: 英文修正 ubuntu22 的依赖问题
* Merge remote-tracking branch 'upstream/master'
* widget: 检查cdn状况在下载开始前检测,不堵塞ui线程
* Merge remote-tracking branch 'upstream/master'
* readme: 修正 ubuntu 的编译说明
* download: 检查软件源的有效性
2022-07-02 23:25:35 +08:00
766dc8b88a !51 read -e
* update tool/update-upgrade/ss-update-controler.sh.
* update tool/ussinstall.
* update tool/ssinstall.
2022-07-02 23:25:35 +08:00
20d34a7369 !49 ss-apt-fast需要加入sudo
* update tool/ssinstall.
2022-07-02 23:25:35 +08:00
a0c14e7397 !48 widget: 检查cdn状况在下载开始前检测,不堵塞ui线程
* widget: 检查cdn状况在下载开始前检测,不堵塞ui线程
* Merge remote-tracking branch 'upstream/master'
* readme: 修正 ubuntu 的编译说明
* download: 检查软件源的有效性
2022-07-02 23:25:35 +08:00
f24565804d !47 文案和显示效果修改
* update tool/ss-apt-fast.
* update tool/ss-apt-fast.
2022-07-02 23:25:35 +08:00
244176098c !46 fix !44
* readme: 修正 ubuntu 的编译说明
* download: 检查软件源的有效性
2022-07-02 23:25:35 +08:00
ac0a38e670 !44 多线程下载前验证源的有效性
* readme: 修正 ubuntu 的编译说明
* download: 检查软件源的有效性/异步
* download: 检查软件源的有效性
2022-06-26 12:09:16 +00:00
af7990e069 !43 ss-apt-fast相关改动:先行获取mirror和自动安装apt-fast
* 修复 多位数无法显示
* 	modified:   tool/update-upgrade/ss-do-upgrade.sh
* 	modified:   tool/update-upgrade/ss-do-upgrade.sh
* 更改依赖判断方法
* 	modified:   debian/changelog
* * 新增:ssinstall现在会在没有apt-fast的时候自动安装
2022-06-26 06:21:19 +00:00
f8dbca8f6f !42 3.1.2
Merge pull request !42 from shenmo/master
2022-06-21 14:58:37 +00:00
a064b7b534 修改: debian/changelog
修改:     debian/control
	修改:     debian/spark-store.postinst
	修改:     debian/spark-store.prerm
	修改:     spark-store-project.pro
	修改:     src/main.cpp
	新文件:   tool/apt-fast-conf/apt-fast.conf
	新文件:   tool/ss-apt-fast
	修改:     tool/ssinstall
	修改:     tool/update-upgrade/ss-do-upgrade.sh
	修改:     tool/update-upgrade/ss-update-controler.sh
2022-06-21 22:37:39 +08:00
289f3020fe !41 不再case yoyo
Merge pull request !41 from shenmo/master
2022-06-16 05:31:51 +00:00
9cd974fed9 不再case yoyo 2022-06-16 05:31:05 +00:00
4d97a1e87b !40 检测yoyo-daemon
Merge pull request !40 from 柚子/N/A
2022-06-10 10:33:15 +00:00
柚子
d326e8919f 检测yoyo-daemon 2022-06-10 10:32:33 +00:00
Jerry
1828a60ff1 !39 update img url
* fix: update img url
2022-06-07 10:54:26 +00:00
865322c85f !37 修改controler的文案
Merge pull request !37 from shenmo/master
2022-05-15 02:46:38 +00:00
c22c76efc2 update tool/update-upgrade/ss-update-controler.sh. 2022-05-15 02:45:19 +00:00
415dd1a63c !36 update tool/update-upgrade/ss-upgrade-list.sh.
Merge pull request !36 from lv36/N/A
2022-05-15 02:40:01 +00:00
lv36
7e105b59b0 update tool/update-upgrade/ss-upgrade-list.sh.
接对ss-update-controler.sh的修改,
微调了输出的显示,个人认为这样可加强字符显示的对比,增强显示的对比、提醒(自己看着更舒服)
2022-05-14 15:06:41 +00:00
84b3340687 update README.md. 2022-05-11 14:43:24 +00:00
2da576aeab update README.zh.md. 2022-05-11 14:38:51 +00:00
fb94448692 update README.zh.md. 2022-05-11 14:38:29 +00:00
6ba7601efa update README.zh.md. 2022-05-11 14:37:49 +00:00
4ea6c90e78 update README.md. 2022-05-11 14:37:03 +00:00
f3633bb19d add README.md. 2022-05-11 14:36:14 +00:00
090b9a279f 重命名 README.md 为 README.zh.md 2022-05-11 14:25:08 +00:00
1bf8a57802 3.1.1 2022-05-10 12:19:16 +00:00
01f2610e0a update debian/changelog. 2022-05-10 12:18:36 +00:00
3e3c3140d0 update tool/update-upgrade/ss-update-controler.sh. 2022-05-10 12:16:34 +00:00
6ca024b6f3 清理policy和update number文件 2022-05-09 16:42:13 +00:00
c0ea5824b1 修改: debian/changelog 2022-05-09 18:37:08 +08:00
ee60b2e7f6 修改: debian/changelog 2022-05-09 18:36:49 +08:00
53ae863823 修改: tool/password-check/ss-certificate-passwd 2022-05-09 01:00:11 +08:00
3dae7db89a 修复UOS且apt-fast下的提权错误 2022-05-08 15:40:15 +00:00
3b3bf8f0de 修改: src/downloadlist.cpp
修改:     src/widget.cpp
	重命名:   pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy -> tool/auto-install-policy/store.spark-app.ssinstall.policy
	修改:     tool/update-upgrade/ss-update-controler.sh
	修改:     translations/spark-store_en.ts
	修改:     translations/spark-store_fr.ts
	修改:     translations/spark-store_zh_CN.ts
2022-05-08 23:11:42 +08:00
00f9b62b80 修改: debian/changelog 2022-05-08 22:24:03 +08:00
0916a0a97e !34 修改control/修改logo
* 	删除:     assets/Logo-Spark.png
* update src/main.cpp.
* The font used for new logo
* new logo file
* update debian/control.
2022-05-08 14:21:50 +00:00
Jerry
c6505c1c14 update readme 2022-05-03 09:13:29 +00:00
4f600f3ec7 update .workflow/master-pipeline.yml. 2022-04-28 14:35:45 +00:00
bf5d0cb75f update master-pipeline.yml for Gitee Go updated_at:2022-04-28 11:03:54 2022-04-28 11:03:54 +00:00
4ca292bd34 删除文件 target 2022-04-28 10:57:30 +00:00
12cf0a3515 新建 deb 2022-04-27 15:05:16 +00:00
18279ec00d 新建 build 2022-04-27 15:05:06 +00:00
e415798ee0 新建 target 2022-04-27 15:04:58 +00:00
89740ad953 update master-pipeline.yml for Gitee Go updated_at:2022-04-27 15:00:34 2022-04-27 15:00:35 +00:00
3eddb4ce71 update master-pipeline.yml for Gitee Go updated_at:2022-04-27 15:00:31 2022-04-27 15:00:31 +00:00
239a788019 update tool/update-upgrade/ss-update-controler.sh. 2022-04-26 10:23:17 +00:00
dc6210b545 update tool/update-upgrade/ss-update-controler.sh. 2022-04-26 10:19:31 +00:00
94d6a566ca update tool/update-upgrade/ss-do-upgrade.sh. 2022-04-26 10:17:19 +00:00
c66c5c6ca3 114514. 2022-04-26 07:58:07 +00:00
c974349c9f update tool/update-upgrade/ss-do-upgrade.sh. 2022-04-26 06:08:30 +00:00
42362fd0ca update .gitee/Dockerfile. 2022-04-26 06:06:59 +00:00
63bc01c43d update .gitee/Dockerfile. 2022-04-26 05:02:00 +00:00
280cd983cb update master-pipeline.yml for Gitee Go updated_at:2022-04-26 04:23:16 2022-04-26 04:23:17 +00:00
05e95b42e0 update .workflow/master-pipeline.yml. 2022-04-26 04:18:05 +00:00
2614b4ae05 update .gitee/Dockerfile. 2022-04-26 03:37:17 +00:00
e8d55cadb6 update master-pipeline.yml for Gitee Go updated_at:2022-04-26 03:14:38 2022-04-26 03:14:38 +00:00
3534b815cc update master-pipeline.yml for Gitee Go updated_at:2022-04-26 03:11:57 2022-04-26 03:11:58 +00:00
ef75e89916 update master-pipeline.yml for Gitee Go updated_at:2022-04-26 03:11:55 2022-04-26 03:11:55 +00:00
e4daffd052 update master-pipeline.yml for Gitee Go updated_at:2022-04-26 03:11:16 2022-04-26 03:11:16 +00:00
9c29ca2e38 update master-pipeline.yml for Gitee Go updated_at:2022-04-26 02:55:13 2022-04-26 02:55:13 +00:00
733751db8e 干完这一票咱就3.1了 2022-04-26 02:53:26 +00:00
db739181f2 update master-pipeline.yml for Gitee Go updated_at:2022-04-26 02:51:49 2022-04-26 02:51:49 +00:00
0bd87eb100 update master-pipeline.yml for Gitee Go updated_at:2022-04-26 02:51:00 2022-04-26 02:51:01 +00:00
8b690e8dea update master-pipeline.yml for Gitee Go updated_at:2022-04-26 02:50:58 2022-04-26 02:50:58 +00:00
9329c939d7 update .gitee/Dockerfile. 2022-04-26 02:38:36 +00:00
232fe777e5 新文件: tool/password-check/ss-certificate-passwd
修改:     tool/ssinstall
2022-04-26 10:33:37 +08:00
000fcf8c9d update spark-store-project.pro. 2022-04-25 14:17:24 +00:00
30bc12a8b6 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 12:51:44 2022-04-25 12:51:44 +00:00
a7385aff1e update master-pipeline.yml for Gitee Go updated_at:2022-04-25 12:07:43 2022-04-25 12:07:43 +00:00
c5b786d9e6 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 12:06:39 2022-04-25 12:06:39 +00:00
55d254e147 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:58:00 2022-04-25 11:58:00 +00:00
cccad380a4 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:51:03 2022-04-25 11:51:03 +00:00
afe5c00af7 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:44:09 2022-04-25 11:44:09 +00:00
55e7fd836c update .workflow/master-pipeline.yml. 2022-04-25 11:35:47 +00:00
2959d72d1c update .workflow/master-pipeline.yml. 2022-04-25 11:31:33 +00:00
95b4608e82 update .workflow/master-pipeline.yml. 2022-04-25 11:30:00 +00:00
edef44eea8 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:10:01 2022-04-25 11:10:02 +00:00
a4b9bd6a17 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:09:59 2022-04-25 11:09:59 +00:00
a165cd7d67 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:08:06 2022-04-25 11:08:06 +00:00
387d21b29f update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:08:02 2022-04-25 11:08:02 +00:00
63b8ae5ae7 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:03:59 2022-04-25 11:04:00 +00:00
9ae4fa8372 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:03:56 2022-04-25 11:03:56 +00:00
1eb2f8df91 update master-pipeline.yml for Gitee Go updated_at:2022-04-25 11:02:40 2022-04-25 11:02:40 +00:00
ce1de9c367 update .gitee/Dockerfile. 2022-04-25 11:00:44 +00:00
80284b22cb update master-pipeline.yml for Gitee Go updated_at:2022-04-25 09:37:09 2022-04-25 09:37:09 +00:00
ad1b69493a add master-pipeline.yml for Gitee Go created_at:2022-04-25 08:58:29 2022-04-25 08:58:29 +00:00
7ca5e9b0d0 修改: spark-store-project.pro 2022-04-25 13:35:57 +08:00
873a83e6b9 修改: debian/changelog
新文件:   pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
	修改:     spark-store-project.pro
	修改:     src/main.cpp
	修改:     tool/ssinstall
2022-04-25 13:34:25 +08:00
da8ee30fbd update README.md. 2022-04-25 03:33:33 +00:00
6d84fa0fe5 add DOCS/code-analyze.md. 2022-04-25 03:22:03 +00:00
41d6272526 删除文件 code-analyze.md 2022-04-25 03:21:46 +00:00
0f7bdf484f update README.md. 2022-04-25 03:21:09 +00:00
bc67bcb6f0 update code-analyze.md. 2022-04-25 03:18:07 +00:00
134586b580 add DOCS/spk-doc.md. 2022-04-25 03:17:36 +00:00
d645b26c62 新建 DOCS 2022-04-25 03:17:02 +00:00
fdc818cdb4 update code-analyze.md. 2022-04-25 03:16:55 +00:00
1f493a8aca add code-analyze.md. 2022-04-25 03:16:11 +00:00
463a8d0c04 update README.md. 2022-04-25 03:15:17 +00:00
932bbd7995 update debian/changelog. 2022-04-24 08:17:12 +00:00
5f45abc484 update tool/ssinstall. 2022-04-24 08:12:34 +00:00
820ad08bf4 修改: debian/changelog
修改:     添加了Recommends
	修改:     更新版本号,使用自定义DAboutDialog
	修改:     translations/spark-store_en.ts
	修改:     translations/spark-store_fr.ts
	修改:     translations/spark-store_zh_CN.ts
2022-04-24 16:00:37 +08:00
2ddfb3f192 !31 兼容改动改变文案+ssinstall临时提升优先级
* update tool/ssinstall.
* update tool/ssinstall.
* update tool/ssinstall.
* update tool/ssinstall.
* update tool/ssinstall.
* update tool/ssinstall.
* update translations/spark-store_zh_CN.ts.
* update src/widget.ui.
2022-04-24 07:33:47 +00:00
b3ca6878ec update debian/control. 2022-04-23 02:44:50 +00:00
ae6f2354bb update debian/control. 2022-04-23 02:41:15 +00:00
591556a7c8 update debian/changelog. 2022-04-22 09:06:12 +00:00
0bcf8a1ee9 版本号到30312 2022-04-22 09:05:00 +00:00
15b6a22f49 !30 标题栏处理
Merge pull request !30 from shenmo/master
2022-04-22 09:03:47 +00:00
7f1f5528ef update src/main.cpp. 2022-04-22 09:02:46 +00:00
158ba884b1 update debian/control. 2022-04-14 12:57:48 +00:00
d9a50e7b44 修改: 多了单引号 2022-04-14 17:31:56 +08:00
72019f7cce 修改: 现在只检测星火源的更新,避免出现问题
新文件:   检测网络环境,没网就退出
2022-04-14 17:26:54 +08:00
c4b26045d9 update tool/update-upgrade/ss-update-controler.sh. 2022-04-11 08:19:27 +00:00
e14b1baaab 修改: debian/spark-store.postinst
修改:     debian/spark-store.prerm
	修改:     pkg/usr/lib/systemd/system/spark-update-notifier.service
2022-04-11 11:04:56 +08:00
0bfa7c9136 修改: debian/spark-store.prerm
修改:     tool/update-upgrade/ss-update-notify-placer.sh
2022-04-11 09:40:28 +08:00
6d38c0bf70 修改: tool/update-upgrade/ss-update-notify-placer.sh 2022-04-11 01:49:05 +08:00
a932966795 修改: tool/update-upgrade/ss-update-notify-placer.sh
修改:     tool/update-upgrade/ss-update-notify.sh
2022-04-11 01:05:28 +08:00
a63c7ec750 修改: tool/update-upgrade/ss-update-controler.sh 2022-04-11 00:44:42 +08:00
ad53669098 修改: tool/update-upgrade/ss-update-controler.sh
修改:     tool/update-upgrade/ss-update-notify.sh
2022-04-11 00:40:28 +08:00
69b42f2afe 修改: tool/update-upgrade/ss-update-notify-placer.sh
修改:     tool/update-upgrade/ss-update-notify.sh
2022-04-11 00:12:56 +08:00
c4f4465e87 新文件: debian/source/format
修改:     debian/spark-store.postinst
	修改:     debian/spark-store.postrm
	修改:     debian/spark-store.prerm
	修改:     pkg/usr/lib/systemd/system/spark-update-notifier.service
	修改:     spark-store-project.pro
	修改:     tool/update-upgrade/ss-update-controler.sh
2022-04-11 00:01:50 +08:00
f292f954f7 修改: debian/changelog
新文件:   pkg/usr/lib/systemd/system/spark-update-notifier.service
	修改:     src/main.cpp
	修改:     src/widget.cpp
	新文件:   tool/update-upgrade/autostart/spark-update-notifier.desktop
	新文件:   tool/update-upgrade/ss-do-upgrade.sh
	新文件:   tool/update-upgrade/ss-update-controler.sh
	新文件:   tool/update-upgrade/ss-update-notify-placer.sh
	新文件:   tool/update-upgrade/ss-update-notify.sh
	新文件:   tool/update-upgrade/ss-upgrade-list.sh
2022-04-10 23:22:35 +08:00
161c9e320b update src/main.cpp.
注释掉已经废弃的函数,否则可能会对wayland适配造成影响
2022-04-07 17:03:30 +00:00
f33386ee5c 修改: debian/control 2022-04-07 14:31:43 +08:00
RigoLigo
61c10944c9 根据DTK的int& argc,fakeArgc改用一个变量保存而不是使用右值 2022-04-07 05:51:42 +00:00
RigoLigo
6db6fe6060 订正上次提交的参数错位的问题 2022-04-07 05:41:34 +00:00
RigoLigo
14506b18b2 尝试通过在main函数强行加入参数修复一些样式问题 2022-04-07 05:37:09 +00:00
44d1041087 删除文件 src/spark-dstore-patch/.qmake.stash 2022-04-02 14:28:47 +00:00
dd941bcf8e 修改版本号 2022-04-02 22:26:56 +08:00
75fc22d2a2 修改: debian/changelog
删除:     debian/source/format
	修改:     spark-store-project.pro
	新文件:   src/spark-dstore-patch/spark-dstore-patch.pro
	新文件:   src/spark-dstore-patch/spark-dstore-tool.cpp
	修改:     src/spark-store.pro
	删除:     tool/spark-dstore-patch
2022-04-02 22:24:11 +08:00
ee549b91f1 update tool/ussremove. 2022-03-07 12:04:56 +00:00
38209d0efb update tool/ussinstall. 2022-03-07 12:03:31 +00:00
b7dcca35b5 update src/main.cpp. 2022-02-26 11:34:58 +00:00
bb39fe386b update debian/control. 2022-02-26 11:32:00 +00:00
ut003880
3d02922751 chore: 去除 postinst 中 apt update 并行操作
避免输出 log 混乱

Log: 去除 postinst 中 apt update 并行操作
2022-02-21 17:17:51 +08:00
e5ea3c3477 update debian/spark-store.prerm. 2022-02-20 05:18:47 +00:00
0b00cd2f4d update debian/spark-store.postinst. 2022-02-20 05:18:08 +00:00
7f6b8c1f5e update debian/copyright. 2022-02-20 05:17:21 +00:00
zty199
3bfc183c89 chore: 修改 postinst / prerm 脚本
隐藏 asc key 文件下载过程;asc 文件转为 gpg 文件直接放入 /etc/apt/trusted.gpg.d 文件夹生效;隐藏 apt update 输出日志

Log: 修改 postinst / prerm 脚本;修改 copyright 文件
2022-02-04 21:11:47 +08:00
45e1970186 apt update 2022-02-01 15:38:52 +00:00
c8e8560584 如果安装了dstore不再瞎jb刷存在感 2022-02-01 15:35:03 +00:00
5bdf9c69ea source是主仓库 2022-02-01 15:29:13 +00:00
zty199
e48438b5a6 feat: Support dpkg-buildpackage
Support dpkg-buildpackage

Log: Support dpkg-buildpackage
2022-01-16 21:58:36 +08:00
00cb5d2442 update debian/DEBIAN/postinst. 不再需要新的key了 2022-01-14 07:17:50 +00:00
9a84dfffd0 修改: debian/opt/durapps/spark-store/bin/spark-store
修改:     src/main.cpp
2022-01-14 00:36:57 +08:00
45a2b0b8c8 修改: debian/DEBIAN/postinst 2022-01-14 00:30:25 +08:00
a947963fc1 修改: debian/DEBIAN/control
删除:     spark-store_3.0.3-7_amd64.deb
2022-01-13 23:43:39 +08:00
6982a97d22 修改: src/downloadlist.cpp 2021-12-13 20:12:21 +08:00
1ba01588f0 修改: debian/DEBIAN/control
新文件:   debian/opt/durapps/spark-store/bin/spark-dstore-patch
2021-12-13 20:07:33 +08:00
4a7f9f7500 修改: build.sh
新文件:   spark-dstore-patch
2021-12-11 23:28:58 +08:00
47690ee666 修改: debian/DEBIAN/triggers
修改:     debian/opt/durapps/spark-store/bin/spark-store
2021-12-11 23:23:33 +08:00
3477d50689 修改: debian/DEBIAN/control
修改:     debian/opt/durapps/spark-store/bin/spark-store
	修改:     debian/usr/share/spark-store/translations/spark-store_zh_CN.qm
	修改:     src/main.cpp
	修改:     src/widget.cpp
2021-12-11 23:18:40 +08:00
abf1e0df71 add debian/DEBIAN/triggers. 2021-12-11 09:52:54 +00:00
1ac033e850 update debian/DEBIAN/postrm. 2021-12-11 09:52:30 +00:00
c2d9b0324a update debian/DEBIAN/postinst. 2021-12-11 09:52:17 +00:00
5727b54c3f update debian/DEBIAN/control. 2021-12-11 09:52:04 +00:00
d796d296c0 update build.sh. 2021-11-24 20:37:42 +00:00
31ecde133e update debian/DEBIAN/control. 2021-10-26 12:02:41 +00:00
d6d40d2b78 修改: debian/usr/share/spark-store/translations/spark-store_zh_CN.qm
修改:     src/widget.ui
	修改:     translations/spark-store_zh_CN.qm
	修改:     translations/spark-store_zh_CN.ts
2021-10-24 23:46:36 +08:00
ed220702b3 修改: debian/DEBIAN/control
修改:     debian/opt/durapps/spark-store/bin/spark-store
	修改:     debian/usr/share/spark-store/translations/spark-store_zh_CN.qm
	修改:     translations/spark-store_zh_CN.qm
	修改:     translations/spark-store_zh_CN.ts
2021-10-24 22:55:00 +08:00
RigoLigoRLC
bdef388b2e 去除翻译功能,改为催更 2021-10-24 00:46:50 +08:00
a31a36dbd8 chore: 允许应用详情页复制文字 2021-07-15 16:39:27 +08:00
f23809b28e fix: 修复软件包卸载问题
fix: 修复软件包卸载失败以及取消卸载后显示成功的问题
fix: 修复下载列表不显示应用缩略图的问题
chore: 优化部分代码
2021-07-15 16:07:14 +08:00
7d4944279f !24 更新了投稿链接
Merge pull request !24 from momen/master
2021-07-01 03:46:58 +00:00
3dfca9a17d 更新打包文件以及 README.md 2021-06-30 14:37:38 +08:00
9b189f276e chore: 尝试开启 Hidpi 支持 2021-06-30 14:24:22 +08:00
51518e4e88 chore: 支持从源列表文件动态获取镜像源
支持从源列表文件动态获取镜像源,获取失败时默认只使用 d.store.deepinos.org.cn 该地址;

修复之前版本中设置界面“更新源”按钮无效的问题。
2021-06-30 14:14:06 +08:00
zty199
961d174bf7 chore: 尝试添加打包脚本
尝试添加了自动编译打包脚本,由于不会使用 dh_make 故每次需要手动更新打包信息。
2021-06-29 21:52:41 +08:00
10b758d8f3 fix: 尝试修复详情页经常加载失败的问题
关闭传输超时上限,未下载完成则持续等待;可能存在严重问题......
2021-06-29 14:05:01 +08:00
78c5d31a29 Update Translations 2021-06-29 13:50:07 +08:00
adf8b478a8 chore: 修复投递链接;新增应用升级判断
fix: 修复投递链接;
chore: 应用详情页支持判断是否需要升级。
2021-06-29 13:46:26 +08:00
momen
1c748219f8 update README.md.
更新了投稿页面
2021-06-26 10:04:48 +00:00
shenmo
9def55a2c2 roll back: src/downloadlist.cpp 2021-06-21 16:27:07 +08:00
shenmo
cd1892fd66 修改: src/downloadlist.cpp
修改:     src/downloadlist.h
2021-06-21 16:22:23 +08:00
Jerry
83e2302cf8 !23 改 jenkinsfile
Merge pull request !23 from Jerry/N/A
2021-06-21 15:56:35 +08:00
Jerry
4deaf28659 改 jenkinsfile 2021-06-21 15:56:21 +08:00
shenmo
04d6174875 . 2021-06-21 14:13:22 +08:00
shenmo
0d64bff7fa 改版本号,传统艺能 2021-06-18 14:58:52 +08:00
301 changed files with 18889 additions and 12684 deletions

View File

@@ -1,2 +1,4 @@
FROM python:3
RUN pip3 install requests
FROM shenmo7192/uos-21-dtk5.4:1.0
ADD . /root/workdir
WORKDIR /root/workdir
RUN dpkg-buildpackage

59
.gitignore vendored
View File

@@ -1,4 +1,55 @@
*.pro.user*
build/
.vscode/
Lib/
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.dll
*.dylib
# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
Makefile*
*build-*
# Qt unit tests
target_wrapper.*
# Qt qm files
translations/*.qm
# QtCreator
*.autosave
# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*
# QtCreator CMake
CMakeLists.txt.user*
build
# Debian dpkg-buildpackage
debian/*.debhelper*
debian/files
debian/*.substvars
debian/spark-store
.vscode/*

View File

@@ -0,0 +1,39 @@
version: '1.0'
name: dtk-build-commit-20220425
displayName: dtk-build-commit
triggers:
trigger: auto
pr:
branches:
prefix:
- ''
stages:
- name: stage-4e566164
displayName: build
strategy: naturally
trigger: auto
executor: []
steps:
- step: execute@docker
name: execute_by_docker
displayName: 基于镜像的脚本执行
certificate: ''
image: docker.io/debian:buster
command:
- sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
- '# 换源'
- apt update
- export DEBIAN_FRONTEND=noninteractive
- echo "安装git devscripts equivs ..."
- apt install git devscripts equivs curl -y >/dev/null 2>&1
- git clone https://gitlink.org.cn/shenmo7192/dtk-old-bundle.git
- cd dtk-old-bundle
- apt install ./*.deb -y
- cd ..
- rm -rf dtk-old-bundle
- 'mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes -y" '
- dpkg-buildpackage -j2 -b -us -uc
- cd ..
- ls -all
- pwd
strategy: {}

View File

@@ -0,0 +1,66 @@
version: '1.0'
name: dtk-build-release-tag-20220425
displayName: dtk-build-release-tag
triggers:
trigger: auto
push:
tags:
prefix:
- ''
stages:
- name: stage-4e566164
displayName: build
strategy: naturally
trigger: auto
executor: []
steps:
- step: execute@docker
name: execute_by_docker
displayName: 基于镜像的DTK构建
certificate: ''
image: docker.io/debian:buster
command:
- sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
- '# 换源'
- apt update
- export DEBIAN_FRONTEND=noninteractive
- echo "安装git devscripts equivs curl..."
- 'apt install git devscripts equivs curl -y '
- git clone https://gitlink.org.cn/shenmo7192/dtk-old-bundle.git
- cd dtk-old-bundle
- apt install ./*.deb -y
- cd ..
- rm -rf dtk-old-bundle
- ''
- 'mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes -y" '
- dpkg-buildpackage -j2 -b -us -uc
- cd ..
- ls -all
- pwd
- ''
- 'mkdir target '
- for f in $(find . -type f -name "*.deb")
- do
- ' mv $f target'
- done
artifacts:
- name: BUILD_ARTIFACT
path:
- ../target
notify: []
strategy:
retry: '0'
- name: stage-29f3ffbb
displayName: 上传
strategy: naturally
trigger: auto
executor: []
steps:
- step: publish@general_artifacts
name: publish_general_artifacts
displayName: 上传制品
dependArtifact: BUILD_ARTIFACT
artifactName: output
notify: []
strategy:
retry: '0'

View File

@@ -0,0 +1,46 @@
version: '1.0'
name: pipeline-dtk-build-aarch64
displayName: dtk-build-aarch64
triggers:
trigger: manual
push:
tags:
prefix:
- ''
stages:
- name: stage-2c12cce1
displayName: 编译
strategy: naturally
trigger: auto
executor: []
steps:
- step: execute@docker
name: execute_by_docker
displayName: 基于镜像的脚本执行
certificate: ''
image: docker.io/debian:buster
command:
- '# 请在此输入您想执行的脚本'
- sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
- apt update
- export DEBIAN_FRONTEND=noninteractive
- echo "安装wget qemu-user-static"
- apt install wget qemu-user-static xz-utils -y
- mkdir ../spark-store-git
- mv * ../spark-store-git
- wget https://code.gitlink.org.cn/shenmo7192/debian-container-aarch64/raw/branch/master/DEBIANARM.tar.xz
- tar -xf DEBIANARM.tar.xz
- mkdir -p DEBIAN/root/build-spark
- mv ../spark-store-git DEBIAN/root/build-spark/spark-store
- wget https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/spark-build-aarch64.sh && mv spark-build-aarch64.sh DEBIAN/root
- mv /usr/bin/qemu-aarch64-static DEBIAN/
- chroot DEBIAN /qemu-aarch64-static /bin/bash /root/spark-build-aarch64.sh
- ''
- ''
artifacts:
- name: BUILD_ARTIFACT
path:
- ./DEBIAN/root/build-spark/target
notify: []
strategy:
retry: '0'

View File

@@ -1,143 +0,0 @@
cmake_minimum_required(VERSION 3.10)
project(spark_store)
set(EXECUTABLE_NAME spark-store)
# Begin Compilation Options
# When set to ON, DTK Plugin for DDE platform will be built.
# Note that only machines with DTK and dev packages installed can build the plugin.
set(SPARK_BUILD_DTK_PLUGIN ON)
# When set to ON, store will transmit telemetry even in Debug builds.
set(SPARK_FORCE_TELEMETRY OFF)
# End Compilation Options
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
#set(CMAKE_AUTOUIC ON)
set(QT_VERSION 5)
set(REQUIRED_LIBS
Core
Gui
Widgets
Network
Concurrent
LinguistTools)
set(REQUIRED_LIBS_QUALIFIED
Qt5::Core
Qt5::Gui
Qt5::Widgets
Qt5::Network
Qt5::Concurrent)
include_directories(inc)
include_directories(plugin)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(PRE_CONFIGURE_FILE "src/gitver.cpp.in")
set(POST_CONFIGURE_FILE "${CMAKE_CURRENT_BINARY_DIR}/src/gitver.cpp")
include(cmake/git_watcher.cmake)
add_library(gitver STATIC ${POST_CONFIGURE_FILE})
#target_include_directories(gitver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
add_dependencies(gitver check_git)
set(SOURCE_FILES
src/main.cpp
resource/resource.qrc
gui/page/ui/settings.ui
gui/page/ui/homepage.ui
${WRAPPED_UI_FILES}
inc/gitver.h
inc/deepinplatform.h
inc/dtk/spkdtkplugin.h
inc/spkutils.h src/spkutils.cpp
inc/telemetry/collectid.h
inc/spkqsshelper.h gui/spkqsshelper.cpp
inc/qt/elidedlabel.h gui/qt/elidedlabel.cpp
inc/spkwindow.h gui/spkwindow.cpp
inc/spktitlebar.h gui/spktitlebar.cpp
inc/spkiconbutton.h gui/spkiconbutton.cpp
inc/spkui_general.h gui/spkui_general.cpp
inc/spkmainwindow.h gui/spkmainwindow.cpp
inc/spkmsgbox.h gui/spkmsgbox.cpp
inc/spkdialog.h gui/spkdialog.cpp
inc/spkabout.h gui/spkabout.cpp
inc/spkloading.h gui/spkloading.cpp
inc/spksidebartree.h gui/spksidebartree.cpp
inc/spkappitem.h gui/spkappitem.cpp
inc/spkdownloadentry.h gui/spkdownloadentry.cpp
inc/spkpopup.h gui/spkpopup.cpp
inc/spkstretchlayout.h gui/spkstretchlayout.cpp
inc/spkfocuslineedit.h
inc/spknotifydot.h gui/spknotifydot.cpp
inc/spkimgviewer.h gui/spkimgviewer.cpp
inc/page/spkpagebase.h gui/page/spkpagebase.cpp
inc/page/spkpagehome.h gui/page/spkpagehome.cpp
inc/page/spkpageuitest.h gui/page/spkpageuitest.cpp
inc/page/spkpageapplist.h gui/page/spkpageapplist.cpp
inc/page/spkpageappdetails.h gui/page/spkpageappdetails.cpp
inc/page/spkpagedownloads.h gui/page/spkpagedownloads.cpp
inc/page/spkpagesettings.h gui/page/spkpagesettings.cpp
inc/pkgs/spkpkgmgrbase.h
inc/pkgs/spkpkgmgrpacman.h src/pkgs/spkpkgmgrpacman.cpp
inc/pkgs/spkpkgmgrapt.h src/pkgs/spkpkgmgrapt.cpp
inc/spkstore.h src/spkstore.cpp
inc/spkuimsg.h src/spkuimsg.cpp
inc/spklogging.h src/spklogging.cpp
inc/spkresource.h src/spkresource.cpp
inc/spkdownload.h src/spkdownload.cpp
inc/spkconfig.h src/spkconfig.cpp
)
include(cmake/FindLibNotify.cmake)
include(cmake/FindGlib.cmake)
include(cmake/FindGdk3.cmake)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${GDK3_INCLUDE_DIRS})
set(LIBLINKING ${LIBLINKING}
gitver
${LIBNOTIFY_LIBRARIES}
${GLIB_LIBRARIES}
${GDK3_LIBRARIES}
${CMAKE_DL_LIBS})
# Required for a good backtrace
add_compile_options(-g)
add_link_options(-rdynamic)
# Find Qt before adding other build targets
find_package(Qt${QT_VERSION} COMPONENTS ${REQUIRED_LIBS} REQUIRED)
QT5_WRAP_UI(WRAPPED_UI_FILES
gui/page/ui/settings.ui
gui/page/ui/homepage.ui)
add_custom_target(run_lupdate
COMMAND lupdate . -ts lang/zh.ts
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
qt5_add_translation(QM_FILES lang/zh.ts)
add_executable(${EXECUTABLE_NAME} ${SOURCE_FILES} ${QM_FILES})
if(SPARK_BUILD_DTK_PLUGIN)
add_subdirectory(plugin/dtkplugin)
add_dependencies(${EXECUTABLE_NAME} spkdtkplugin)
endif()
target_link_libraries(${EXECUTABLE_NAME} ${REQUIRED_LIBS_QUALIFIED} ${LIBLINKING})
install(TARGETS ${EXECUTABLE_NAME} RUNTIME DESTINATION bin)

328
DOCS/code-analyze.md Normal file
View File

@@ -0,0 +1,328 @@
#### 说明
当前服务器线路列表(项目中包含):
```
https://d.store.deepinos.org.cn/
https://store.deepinos.org.cn/
```
# 星火应用商店文档
# 目录结构
几个目录结构
```
/
/icons 图标文件夹
/tags 首页图标
/tras 多语言翻译
```
主要的文件分析
```js
spark-store.pro Qt工程配置文件
ssinstall 调用包安装器的脚本
icons.qrc 图标资源文件
main.cpp 入口文件
widget.h widget.cpp widget.ui 主要窗口控件
downloadlist.h downloadlist.cpp downloadlist.ui 单个软件的下载安装展示控件
progressload.h progressload.cpp 网页加载显示 得在deepin上编译运行才能搞清楚
workerthreads.h workerthreads.cpp 应用信息加载线程
image_show.h image_show.cpp 应用页面截图预览控件
big_image.h big_image.cpp 大图查看控件
```
# 使用的开源库及第三方工具
* GDebi 一个 Ubuntu 软件中心的轻量级替代品 https://linux.cn/article-4982-1.html
* libnotify 系统通知 https://developer.gnome.org/libnotify/unstable/
# 源码分析
## 应用的组成部分
左侧应用分类菜单
主窗口的下拉菜单
应用列表页面
应用详情页面
应用首页,有几个链接跳转
商店设置页面
下载列表页面
## 应用初始化,及主控件加载
初始化 `DApplication` 进入事件循环。
设置关于我们弹窗 `DAboutDialog`
主控件 Widget 根据不同屏幕大小自适应。
首页打开webview页面如果传入了`spk://`参数,会打开应用详情页。
```cpp
// main.cpp
QString arg1=argv[1];
if(arg1.left(6)=="spk://"){
w.openUrl(QUrl(argv[1]));
}
// widget.cpp
void Widget::openUrl(QUrl u)
{
QString app=serverUrl + "store"+u.path()+"/app.json";
ui->webEngineView->setUrl(app); // 会触发 webEngineView 的
}
```
## Tags处理方式
**Tags处理方式**
```cpp
// widget.cpp
QString tags=json["Tags"].toString(); //Read the Tags
QStringList tagList=tags.split(";");
for (int i=0;i<tagList.size();i++) {
if(tagList[i]=="community")
ui->tag_community->show();//Tags icon shows like this
if(tagList[i]=="ubuntu")
ui->tag_ubuntu->show();
if(tagList[i]=="deepin")
ui->tag_deepin->show();
if(tagList[i]=="uos")
ui->tag_uos->show();
if(tagList[i]=="dtk5")
ui->tag_dtk5->show();
if(tagList[i]=="dwine2")
ui->tag_dwine2->show();
if(tagList[i]=="dwine5")
ui->tag_dwine5->show();
if(tagList[i]=="a2d")
ui->tag_a2d->show();
}
```
**Widget 初始化**
```cpp
void Widget::initConfig()
{
...
// 读取服务器URL并初始化菜单项的链接
QSettings readConfig(QDir::homePath()+"/.config/spark-store/config.ini",QSettings::IniFormat);
if(readConfig.value("server/choose").toString()!=""){
ui->comboBox_server->setCurrentText(readConfig.value("server/choose").toString());
appinfoLoadThread.setServer(serverUrl=readConfig.value("server/choose").toString());
}else {
appinfoLoadThread.setServer(serverUrl="http://sucdn.jerrywang.top/"); // 默认URL
}
configCanSave=true; // 防止触发保存配置信号
menuUrl[0]=serverUrl + "store/#/"; // 首页
// 下面是各个应用分类页面直接加载的webview的
// 每个连接对应一个左侧的菜单项,在构造函数用连接到 chooseLeftMenu 槽函数
menuUrl[1]=serverUrl + "store/#/network";
...
menuUrl[12]=serverUrl + "store/#/others";
...
ui->webfoot->hide();
//初始化首页
ui->webEngineView->setUrl(menuUrl[0]);
}
/**
* 菜单切换逻辑
*
*/
void Widget::chooseLeftMenu(int index)
{
nowMenu=index;
updateUI();
left_list[index]->setStyleSheet("color:#FFFFFF;background-color:"+main_color.name()+";border-radius:8;border:0px");
// index <=12 加载某个分类的应用列表的webviejw
// index == 13 加载下载列表页面
if(index<=12){
if(themeIsDark){
darkurl = URL
ui->webEngineView->setUrl(darkurl);
}else {
ui->webEngineView->setUrl(menuUrl[index]);
}
ui->stackedWidget->setCurrentIndex(0);
}else if (index==13) {
ui->stackedWidget->setCurrentIndex(1);
}
}
```
## 应用下载安装卸载分析
**应用详情页面加载**
```cpp
/**
* 加载单个应用的信息
*/
void Widget::on_webEngineView_urlChanged(const QUrl &arg1)
{
//分析出服务器中的分类名称
...
//如果是app.json就打开详情页
if(arg1.path().right(8)=="app.json"){
...
// 读取相应的应用信息
appinfoLoadThread.requestInterruption();
appinfoLoadThread.wait(100);
appinfoLoadThread.setUrl(arg1);
appinfoLoadThread.start();
}
}
// 设置详情页的APP信息
SpkAppInfoLoaderThread::requestSetAppInformation() -> Widget::sltAppinfoDetails()
// 设置详情页的APP图标
SpkAppInfoLoaderThread::finishedIconLoad() -> Widget::sltAppinfoIcon()
// 设置详情页的APP截图
SpkAppInfoLoaderThread::finishedScreenshotLoad() -> Widget::sltAppinfoScreenshot()
// 下载APP详情信息线程
void SpkAppInfoLoaderThread::run()
{
QProcess get_json;
get_json.start("curl -o app.json " + targetUrl.toString());
QFile app_json("app.json");
app.json
}
```
**应用下载**
Widget::on_pushButton_download_clicked() 是点击下载的安装方法。
最终使用的是 `QNetwrokAccessManager` 进行GET请求获取数据写入文件。
```cpp
void Widget::on_pushButton_download_clicked()
{
if(!isBusy){
file = new QFile(fileName);
...
nowDownload+=1;
startRequest(urList.at(nowDownload-1)); // 进行链接请求
}
}
void Widget::startRequest(QUrl url)
{
reply = manager->get(QNetworkRequest(url));
// 请求响应完成,关闭文件,清理下载队列
connect(reply,SIGNAL(finished()),this,SLOT(httpFinished()));
// 接收应用下载数据
connect(reply,SIGNAL(readyRead()),this,SLOT(httpReadyRead()));
// 更新应用下载进度
connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(updateDataReadProgress(qint64,qint64)));
}
```
使用 QSettings 来读取配置,更换服务源
```cpp
void Widget::on_comboBox_server_currentIndexChanged(const QString &arg1)
{
appinfoLoadThread.setServer(arg1); // 服务器信息更新
if(configCanSave){
ui->label_setting1->show();
QSettings *setConfig=new QSettings(QDir::homePath()+"/.config/spark-store/config.ini",QSettings::IniFormat);
setConfig->setValue("server/choose",arg1);
}
}
```
使用 `QProcess` 来调用各种小文件下载、包安装卸载的命令。
**应用安装**
```cpp
void Widget::httpFinished() // 完成下载
{
...
download_list[nowDownload-1].readyInstall();
download_list[nowDownload-1].free=true;
if(nowDownload<allDownload){ // 如果有排队则下载下一个
...
}
}
void downloadlist::readyInstall()
{
...
ui->pushButton_install->setEnabled(true);
ui->pushButton_install->show();
ui->pushButton_2->hide();
Widget::sendNotification(tr("Finished downloading %1, awaiting to install").arg(ui->label->text()), 5000,
"/tmp/spark-store/icon_"+QString::number(num).toUtf8()+".png");
}
void downloadlist::on_pushButton_install_clicked()
{
//弹出菜单
menu_install->exec(cursor().pos());
}
downloadlist menu_install
downloadlist::install()
gdebi, dpkg, deepin-deb-installer
void downloadlist::install(int t)
{
QtConcurrent::run([=](){
QProcess installer;
installer.start("pkexec gdebi -n /tmp/spark-store/"+ui->label_filename->text().toUtf8());
installer.start("pkexec ssinstall /tmp/spark-store/"+ui->label_filename->text().toUtf8());
installer.start("deepin-deb-installer /tmp/spark-store/"+ui->label_filename->text().toUtf8());
});
}
```
**应用卸载**
```cpp
void Widget::on_pushButton_uninstall_clicked()
{
QtConcurrent::run([=](){
uninstall.start("pkexec apt purge -y "+pkgName);
});
}
```
**仓库源更新**
```cpp
// 更新源列表
void Widget::on_pushButton_updateServer_clicked()
{
QtConcurrent::run([=](){
...
QFile::remove(QDir::homePath().toUtf8()+"/.config/spark-store/server.list");
system("curl -o "+QDir::homePath().toUtf8()+"/.config/spark-store/server.list http://dcstore.shenmo.tech/store/server.list");
server.open(QDir::homePath().toUtf8()+"/.config/spark-store/server.list",std::ios::in);
...
while (getline(server,lineTmp)) {
ui->comboBox_server->addItem(QString::fromStdString(lineTmp));
}
});
}
// 更新星火商店apt源
void Widget::on_pushButton_updateApt_clicked()
{
QtConcurrent::run([=](){
comboBox_server /tmp/spark-store/sparkstore.list
bash脚本 sparkstore.list /etc/apt/sources.list.d/
使QProcess pkexec update.sh
}):
}
```
## 发送系统通知
```cpp
#include <libnotify/notify.h>
static NotifyNotification *_notify = nullptr; // 初始化
notify_init(tr("Spark\\ Store").toLocal8Bit()); // 构造函数初始化
notify_uninit(); // 析构函数调用
void Widget::sendNotification(const QString &message, const int msTimeout, const QString &icon)
{
if(_notify == nullptr)
{
_notify = notify_notification_new(tr("Spark\\ Store").toLocal8Bit(), message.toLocal8Bit(), icon.toLocal8Bit());
notify_notification_set_timeout(_notify, msTimeout);
}
else
notify_notification_update(_notify, tr("Spark\\ Store").toLocal8Bit(), message.toLocal8Bit(), icon.toLocal8Bit());
notify_notification_show(_notify, nullptr);
}
```

27
DOCS/spk-doc.md Normal file
View File

@@ -0,0 +1,27 @@
#### 调用参数(spk规则)
参数只有一个Url该url应当遵循这种格式`spk://<任意合法字符>/web分类/包名`
目前第一字段不进行处理,以后可能会对此识别。在目前阶段,这个字段可以填写任意合法字符
例如:
[spk://abcdefg/games/store.spark-app.hmcl](spk://abcdefg/games/store.spark-app.hmcl)
可选的web分类
| 分类名称 | web分类   |
| -------- | -------------- |
| 网络 | network |
| 社交 | chat |
| 音乐 | music |
| 视频 | video |
| 图像 | image_graphics |
| 游戏 | games |
| 办公 | office |
| 阅读 | reading |
| 开发 | development |
| 工具 | tools |
| 主题 | themes |
| 其他 | others |

View File

@@ -0,0 +1,82 @@
# 关于编写 "描述主体结构预览说明" 的规范
1. 主体结构预览
一般以 `tree` 命令进行获取目录结构进行展示所需要描述的预览内容。
2. 对主体结构中的内容单独说明
并使用所用语言进行非侵入式独立描述,而不是在代码中填充说明与注释。
在单行描述中,尽量不超过您认为最大的字符数量宽度,可以收缩内容的重要性。
在此种说明文档中,尽量使用您所描述的对象支持的代码注释,而不是以白底黑字进行描述。
对于规范的全部:主体结构 + 单独内容中进行简单(而不是简少)的说明。
一个简单的例子,例如: 有关项目源代码结构的预览说明
- 项目结构预览
```
.
├── assets
├── debian
├── DOCS
├── patchs
├── src
├── tool
└── translations
10 directories, 9 files
```
- 来自 debian 目录的说明
```shell
# 将此项目进行 debian 的标志,基于 debian 系列的发行版可对包含
# 此种目录的开源项目进行构建 deb 软件包。
# 1. 构建软件包(打包)
# 执行 dpkg-buildpackage 命令以尝试构建此软件包
dpkg-buildpackage
# 如果构建将会在上级目录中产生一个 deb而源代码目录不会有任何变化。
# 如果出现以下内容可忽视,仅需要查看是否已成功构建软件包:
# gpg: 已跳过 "" 无效的用户ID
# gpg: ...: clear-sign failed: 无效的用户ID
# dpkg-buildpackage: error: failed to sign .dsc file
```
- 来自 patchs 目录的说明
```shell
# 一种用于可扩展的补丁,主要目的是为项目提供可选的应用方案,而不是直接堆砌到
# 当前项目的分支中。您可以认为所有分支都是主线分支。
# 例如:
# 主线稳定分支: master
# 主线开发分支: dev
# 主线其它: ...
# 注意:
# 当您认为您所提交的内容并不会为主线带来 bug fix 之类的内容,请使用补丁。
# 当您所提交的内容会带来不可预知的问题的时候,或会改变目前主线的开发模式时,
# 此种方式可确保您提交的方案可被任意时间被弃用,而不是由其它维护者耗费精力
# 去试图移除您提交的内容,而不是等待由提交者进行新的维护。
```
- 来自其它的内容...可随时由任何人进行补充
- 一些在关此种预览描述的文档
```shell
# 此种描述还将出现在 `src/README.md` 的描述中。
# 当然,我预期会由其它维护者进行移动到 `DOCS` 之下。
# 另外在 `patchs/zinface-community-cmake-build-system.patch` 补丁文件中,
# 也随附过一个简要的文档内容,而它是记录了 `Spark` 为名的构建模式。
# 在未应用此补丁时,将不会出现在任何地方。
```

7
DOCS/内网部署.md Normal file
View File

@@ -0,0 +1,7 @@
需要修改的内容商店默认源位置aptss获取apt-fast.conf和sparkstore.list的地址ssinstall做安装检查的源位置
服务器使用update.sh进行同步。
为方便使用(其实是早期屎山使然),请将仓库放置于 `/home/ftp/spark-store`
仓库管理相关代码请移步 [这里](https://gitee.com/deepin-community-store/repo_auto_update_script)update.sh请联系 @shenmo 获取

6
Jenkinsfile vendored
View File

@@ -4,12 +4,12 @@ pipeline {
stage('build') {
agent {
docker {
image 'jerry979/dtke:5.11'
image 'jerry979/dtke:5.11.1'
}
}
steps {
sh 'mkdir build && cd build && cmake .. && make -j'
sh 'mkdir build && cd build && qmake .. && make '
archiveArtifacts(artifacts: 'build/src/spark-store', allowEmptyArchive: true, defaultExcludes: true)
}
}
@@ -30,4 +30,4 @@ pipeline {
}
}
}
}

703
LICENSE
View File

@@ -1,674 +1,29 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
星火开源软件协议Spark Opensource LICENSE
版权所有 (C) 2023 星火社区
根据 GNU 通用公共许可证第三版GPL v3本软件是自由软件您可以修改和再发布它。但是为了维护原作者的权益并保护社区用户的权益请遵守以下条款
1. 对本仓库下的所有文件生效:本许可证适用于本仓库(或项目)下的所有文件。任何使用、修改或再发布本软件的个人或组织都必须遵守本许可证。
2. 版权声明和许可证文件:您不得移除、隐藏或更改本软件中包含的原作者的版权声明和许可证文件。保留原作者的权益信息对于维护开源软件生态系统至关重要。
3. 版本标注:如果您对本软件做出修改并再发布,您必须在醒目位置标注此版本并非星火社区官方提供。这样可以避免误导使用者认为该软件为星火社区官方提供的版本。
4. 商标使用您不得在再发布版本中使用“星火应用商店”、“Spark Store”或星火应用商店的Logo等可能误导使用者此软件由星火社区官方提供的信息。
5. 其他条款:除上述约定外,您应遵守 GPL v3 的所有其他条款和要求。
GPLV3许可证的完整文本可以在以下链接找到https://www.gnu.org/licenses/gpl-3.0.html
---------------------------------------------------------------------------------------------------------------------------------
Spark Opensource LICENSE
Copyright (C) 2023 The Spark Community
This software is free software; you can modify and redistribute it under the terms of the GNU General Public License version 3 (GPL v3). However, to protect the rights of the original authors and the interests of the community users, please adhere to the following terms:
1. Applicability to all files in this repository: This license applies to all files in this repository (or project). Any individuals or organizations that use, modify, or redistribute this software must comply with this license.
2. Copyright notice and license files: You must not remove, hide, or modify the copyright notice and license files of the original authors included in this software. Preserving the rights information of the original authors is essential for maintaining the open-source software ecosystem.
3. Version annotation: If you modify this software and redistribute it, you must prominently annotate that this version is not provided by the Spark community officially. This is to avoid misleading users into believing that the software is provided by the official Spark community.
4. Trademark usage: You are not allowed to use terms such as "Spark App Store," "Spark Store," or the logo of Spark App Store in redistributed versions, as they may mislead users into believing that the software is provided by the official Spark community.
5. Additional terms: Apart from the above provisions, you must comply with all other terms and requirements of GPL v3.
You can find the full text of GPLV3 license at: https://www.gnu.org/licenses/gpl-3.0.html

674
LICENSE-GPL3 Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

106
README.md
View File

@@ -1,73 +1,83 @@
# 星火应用商店
# 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应用难以获取优质工具分散在民间各大论坛无法形成合力难以改善生态
## You are informed that the aarch64 support is EXPERIMENTAL and there is NO GUARANTEE that this branch will be supported in the future
生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势
Spark Store aims to collect Linux apps for the convieniece of Linux new comers
我们创建了这个应用商店广泛收录大家需要的软件包搜集优质小工具主动适配wine应用存放到储存库供大家获取
The collecting process needs everyone's help
我们支持Deepin 20 ; Ubuntu 20.04 LTS ; UOS Home 20
We set up this APP Store and collect APPs/tools that everyone need widely. Also we pack Windows apps with wine.
希望看到这里的人也可以加入我们的队伍开发或者投递应用都很欢迎共同构建Linux应用生态
All packages will be shared in our repository for users to get freely.
### [在这里投稿](http://upload.spark-app.store)
Distrobution supportedDeepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(May stop support in the future ; UniontechOS Home 21
web页面部分正在开发当中详情请见[web仓库](https://gitee.com/deepin-community-store/DCSAPP_WEB)
*About OpenKylin and deepin 23*
The adaptation work is scheduled after their official release.
You can track our Issue resoving progress here https://gitee.com/deepin-community-store/spark-store/board
#### 说明
We hope people who see here can also join our teamdevelopment help or submit applications are welcomed
当前服务器线路列表(项目中包含):
```
https://d.store.deepinos.org.cn/
https://store.deepinos.org.cn/
```
#### 调用参数(spk规则)
参数只有一个Url该url应当遵循这种格式`spk://<任意合法字符>/web分类/包名`
例如:
[spk://abcdefg/games/store.spark-app.hmcl](spk://abcdefg/games/store.spark-app.hmcl)
If you want to submit an APP to share with othersPlease [Click here](https://upload.deepinos.org/index)
可选的web分类
## 🙌 A simple start
| 分类名称 | web分类   |
| -------- | -------------- |
| 网络应用 | network |
| 社交沟通 | chat |
| 音乐欣赏 | music |
| 视频播放 | video |
| 图形图像 | graphics |
| 游戏娱乐 | games |
| 办公学习 | office |
| 阅读翻译 | reading |
| 编程开发 | development |
| 系统工具 | tools |
| 主题美化 | beautify |
| 其他应用 | others |
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://zunyun01.store.deepinos.org.cn/spark-store-dependencies-kylin.zip)
---
#### Compile and developement
#### 如何编译
Deepin V20/UOS 系统下, 安装依赖
For Deepin V20/UOS 21/ Debian 11
```shell
sudo apt install qt5-default libdtkcore-dev libdtkwidget-dev qtwebengine5-dev libnotify-dev
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 libqt5svg5*
```
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 libqt5svg5*
```
Then
```shell
git clone https://gitee.com/deepin-community-store/spark-store.git
cd spark-store
mkdir build
cd build
qmake ..
make -j
dpkg-buildpackage -j
```
./build文件下的spark-store即为可执行文件
Or:
```shell
git clone https://gitee.com/deepin-community-store/spark-store.git
cd spark-store
./build_and_install.sh
```
## EULA
This is our [EULA](https://genshin-impact.fandom.com/wiki/Eula)
## 🚀 Coorperation
We use Gitee as our code hosting platform. Please click here to contact us.
https://gitee.com/deepin-community-store/spark-store
### Forum
https://www.deepinos.org/
#### QQ Group
https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/

79
README.zh.md Normal file
View File

@@ -0,0 +1,79 @@
# 星火应用商店
[![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)
## 请注意aarch64的支持是实验性的并未确认持续支持
众所周知国内的Linux应用比较少wine应用难以获取优质工具分散在民间各大论坛无法形成合力难以改善生态
生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势
我们创建了这个应用商店广泛收录大家需要的软件包搜集优质小工具主动适配wine应用存放到储存库供大家获取
我们支持Deepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(将会逐渐停止支持) ; UOS Home 21
## 关于协作:分支相关的文档见 [这里](https://deepin-community-store.gitee.io/spark-wiki/#/Dev/Spark-Store-Git-Repo)
*关于OpenKylin和deepin 23*
支持计划将会在对应系统发布正式版之后开始评估和执行
希望看到这里的人也可以加入我们的队伍开发或者投递应用都很欢迎共同构建Linux应用生态
在这里追踪我们的Issue处理情况 https://gitee.com/deepin-community-store/spark-store/board
如果有想要提交的软件包,请 [在这里投稿](https://upload.deepinos.org/index)
## 🙌 简单的开始
如果想安装 `星火应用商店` ,请打开右侧的 [Release] 页面,找到最新版本,并选择适用于当前系统的安装包下载。
如果你在使用 `Debian 11/Ubuntu 20.04`,你需要额外下载[依赖补充包](https://zunyun01.store.deepinos.org.cn/spark-store-dependencies-kylin.zip)
---
#### 编译安装
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 dde-qt5wayland-plugin libqt5svg5*
```
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 libqt5svg5*
```
然后
```shell
git clone https://gitee.com/deepin-community-store/spark-store.git
cd spark-store
dpkg-buildpackage -j
```
或者: 编译并安装
```shell
git clone https://gitee.com/deepin-community-store/spark-store.git
cd spark-store
./build_and_install.sh
```
## EULA
这里是我们的[EULA](https://mzh.moegirl.org.cn/%E4%BC%98%E8%8F%88%C2%B7%E5%8A%B3%E4%BC%A6%E6%96%AF)
## 🚀 协作
非常感谢有兴趣的开发者或爱好者参与 `星火应用商店` 项目,分享你的见解与思路。
### 论坛
https://www.deepinos.org/
#### QQ群
https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/

24
build_and_install.sh Executable file
View File

@@ -0,0 +1,24 @@
# 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 dde-qt5wayland-plugin
# ```
# 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
# ```
echo "Deepin V20/UOS 21 系统下, 安装依赖"
echo "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"
echo "Ubuntu 22.04 系统下, 安装依赖"
echo "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"
dpkg-buildpackage -j$(cat /proc/cpuinfo | grep processor | wc -l)
sudo apt reinstall ../spark-store_*.deb
rm ../spark-store_*

View File

@@ -1,52 +0,0 @@
# - Try to find GDK 3
# Once done, this will define
#
# GDK3_FOUND - system has GDK 3
# GDK3_INCLUDE_DIRS - the GDK 3 include directories
# GDK3_LIBRARIES - link these to use GDK 3
#
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
# Copyright (C) 2013 Igalia S.L.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Source from:
# https://sources.debian.org/src/qtwebkit-opensource-src/5.212.0%7Ealpha2-21/Source/cmake/FindGDK3.cmake/
find_package(PkgConfig)
pkg_check_modules(GDK3 gdk-3.0)
set(VERSION_OK TRUE)
if (GDK3_VERSION)
if (GDK3_FIND_VERSION_EXACT)
if (NOT("${GDK3_FIND_VERSION}" VERSION_EQUAL "${GDK3_VERSION}"))
set(VERSION_OK FALSE)
endif ()
else ()
if ("${GDK3_VERSION}" VERSION_LESS "${GDK3_FIND_VERSION}")
set(VERSION_OK FALSE)
endif ()
endif ()
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDK3 DEFAULT_MSG GDK3_INCLUDE_DIRS GDK3_LIBRARIES VERSION_OK)

View File

@@ -1,125 +0,0 @@
# - Try to find Glib and its components (gio, gobject etc)
# Once done, this will define
#
# GLIB_FOUND - system has Glib
# GLIB_INCLUDE_DIRS - the Glib include directories
# GLIB_LIBRARIES - link these to use Glib
#
# Optionally, the COMPONENTS keyword can be passed to find_package()
# and Glib components can be looked for. Currently, the following
# components can be used, and they define the following variables if
# found:
#
# gio: GLIB_GIO_LIBRARIES
# gobject: GLIB_GOBJECT_LIBRARIES
# gmodule: GLIB_GMODULE_LIBRARIES
# gthread: GLIB_GTHREAD_LIBRARIES
#
# Note that the respective _INCLUDE_DIR variables are not set, since
# all headers are in the same directory as GLIB_INCLUDE_DIRS.
#
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Source from:
# https://sources.debian.org/src/qtwebkit-opensource-src/5.212.0%7Ealpha2-21/Source/cmake/FindGLIB.cmake/
find_package(PkgConfig)
pkg_check_modules(PC_GLIB QUIET glib-2.0)
find_library(GLIB_LIBRARIES
NAMES glib-2.0
HINTS ${PC_GLIB_LIBDIR}
${PC_GLIB_LIBRARY_DIRS}
)
# Files in glib's main include path may include glibconfig.h, which,
# for some odd reason, is normally in $LIBDIR/glib-2.0/include.
get_filename_component(_GLIB_LIBRARY_DIR ${GLIB_LIBRARIES} PATH)
find_path(GLIBCONFIG_INCLUDE_DIR
NAMES glibconfig.h
HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${_GLIB_LIBRARY_DIR}
${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS}
PATH_SUFFIXES glib-2.0/include
)
find_path(GLIB_INCLUDE_DIR
NAMES glib.h
HINTS ${PC_GLIB_INCLUDEDIR}
${PC_GLIB_INCLUDE_DIRS}
PATH_SUFFIXES glib-2.0
)
set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR})
# Version detection
if (EXISTS "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h")
file(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS)
string(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
set(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
set(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
set(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}")
set(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}")
endif ()
# Additional Glib components. We only look for libraries, as not all of them
# have corresponding headers and all headers are installed alongside the main
# glib ones.
foreach (_component ${GLIB_FIND_COMPONENTS})
if (${_component} STREQUAL "gio")
find_library(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR})
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES)
elseif (${_component} STREQUAL "gobject")
find_library(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR})
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES)
elseif (${_component} STREQUAL "gmodule")
find_library(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR})
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES)
elseif (${_component} STREQUAL "gthread")
find_library(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR})
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES)
elseif (${_component} STREQUAL "gio-unix")
# gio-unix is compiled as part of the gio library, but the include paths
# are separate from the shared glib ones. Since this is currently only used
# by WebKitGTK+ we don't go to extraordinary measures beyond pkg-config.
pkg_check_modules(GIO_UNIX QUIET gio-unix-2.0)
endif ()
endforeach ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLIB REQUIRED_VARS GLIB_INCLUDE_DIRS GLIB_LIBRARIES ${ADDITIONAL_REQUIRED_VARS}
VERSION_VAR GLIB_VERSION)
mark_as_advanced(
GLIBCONFIG_INCLUDE_DIR
GLIB_GIO_LIBRARIES
GLIB_GIO_UNIX_LIBRARIES
GLIB_GMODULE_LIBRARIES
GLIB_GOBJECT_LIBRARIES
GLIB_GTHREAD_LIBRARIES
GLIB_INCLUDE_DIR
GLIB_INCLUDE_DIRS
GLIB_LIBRARIES
)

View File

@@ -1,58 +0,0 @@
# - Try to find LibNotify
# This module defines the following variables:
#
# LIBNOTIFY_FOUND - LibNotify was found
# LIBNOTIFY_INCLUDE_DIRS - the LibNotify include directories
# LIBNOTIFY_LIBRARIES - link these to use LibNotify
#
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
# Copyright (C) 2014 Collabora Ltd.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Source from:
# https://sources.debian.org/src/qtwebkit-opensource-src/5.212.0~alpha2-21/Source/cmake/FindLibNotify.cmake/
find_package(PkgConfig)
pkg_check_modules(LIBNOTIFY QUIET libnotify)
find_path(LIBNOTIFY_INCLUDE_DIRS
NAMES notify.h
HINTS ${LIBNOTIFY_INCLUDEDIR}
${LIBNOTIFY_INCLUDE_DIRS}
PATH_SUFFIXES libnotify
)
find_library(LIBNOTIFY_LIBRARIES
NAMES notify
HINTS ${LIBNOTIFY_LIBDIR}
${LIBNOTIFY_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibNotify REQUIRED_VARS LIBNOTIFY_INCLUDE_DIRS LIBNOTIFY_LIBRARIES
VERSION_VAR LIBNOTIFY_VERSION)
mark_as_advanced(
LIBNOTIFY_INCLUDE_DIRS
LIBNOTIFY_LIBRARIES
)

View File

@@ -1,51 +0,0 @@
# - FindXCB
#
# Copyright 2015 Valve Coporation
find_package(PkgConfig)
if(NOT XCB_FIND_COMPONENTS)
set(XCB_FIND_COMPONENTS xcb)
endif()
include(FindPackageHandleStandardArgs)
set(XCB_FOUND true)
set(XCB_INCLUDE_DIRS "")
set(XCB_LIBRARIES "")
foreach(comp ${XCB_FIND_COMPONENTS})
# component name
string(TOUPPER ${comp} compname)
string(REPLACE "-" "_" compname ${compname})
# header name
string(REPLACE "xcb-" "" headername xcb/${comp}.h)
# library name
set(libname ${comp})
pkg_check_modules(PC_${comp} QUIET ${comp})
find_path(${compname}_INCLUDE_DIR NAMES ${headername}
HINTS
${PC_${comp}_INCLUDEDIR}
${PC_${comp}_INCLUDE_DIRS}
)
find_library(${compname}_LIBRARY NAMES ${libname}
HINTS
${PC_${comp}_LIBDIR}
${PC_${comp}_LIBRARY_DIRS}
)
find_package_handle_standard_args(${comp}
FOUND_VAR ${comp}_FOUND
REQUIRED_VARS ${compname}_INCLUDE_DIR ${compname}_LIBRARY)
mark_as_advanced(${compname}_INCLUDE_DIR ${compname}_LIBRARY)
list(APPEND XCB_INCLUDE_DIRS ${${compname}_INCLUDE_DIR})
list(APPEND XCB_LIBRARIES ${${compname}_LIBRARY})
if(NOT ${comp}_FOUND)
set(XCB_FOUND false)
endif()
endforeach()
list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS)

View File

@@ -1,335 +0,0 @@
# git_watcher.cmake
# https://raw.githubusercontent.com/andrew-hardin/cmake-git-version-tracking/master/git_watcher.cmake
#
# Released under the MIT License.
# https://raw.githubusercontent.com/andrew-hardin/cmake-git-version-tracking/master/LICENSE
# This file defines a target that monitors the state of a git repo.
# If the state changes (e.g. a commit is made), then a file gets reconfigured.
# Here are the primary variables that control script behavior:
#
# PRE_CONFIGURE_FILE (REQUIRED)
# -- The path to the file that'll be configured.
#
# POST_CONFIGURE_FILE (REQUIRED)
# -- The path to the configured PRE_CONFIGURE_FILE.
#
# GIT_STATE_FILE (OPTIONAL)
# -- The path to the file used to store the previous build's git state.
# Defaults to the current binary directory.
#
# GIT_WORKING_DIR (OPTIONAL)
# -- The directory from which git commands will be run.
# Defaults to the directory with the top level CMakeLists.txt.
#
# GIT_EXECUTABLE (OPTIONAL)
# -- The path to the git executable. It'll automatically be set if the
# user doesn't supply a path.
#
# GIT_FAIL_IF_NONZERO_EXIT (optional)
# -- Raise a FATAL_ERROR if any of the git commands return a non-zero
# exit code. This is set to TRUE by default. You can set this to FALSE
# if you'd like the build to continue even if a git command fails.
#
# DESIGN
# - This script was designed similar to a Python application
# with a Main() function. I wanted to keep it compact to
# simplify "copy + paste" usage.
#
# - This script is invoked under two CMake contexts:
# 1. Configure time (when build files are created).
# 2. Build time (called via CMake -P).
# The first invocation is what registers the script to
# be executed at build time.
#
# MODIFICATIONS
# You may wish to track other git properties like when the last
# commit was made. There are two sections you need to modify,
# and they're tagged with a ">>>" header.
# Short hand for converting paths to absolute.
macro(PATH_TO_ABSOLUTE var_name)
get_filename_component(${var_name} "${${var_name}}" ABSOLUTE)
endmacro()
# Check that a required variable is set.
macro(CHECK_REQUIRED_VARIABLE var_name)
if(NOT DEFINED ${var_name})
message(FATAL_ERROR "The \"${var_name}\" variable must be defined.")
endif()
PATH_TO_ABSOLUTE(${var_name})
endmacro()
# Check that an optional variable is set, or, set it to a default value.
macro(CHECK_OPTIONAL_VARIABLE_NOPATH var_name default_value)
if(NOT DEFINED ${var_name})
set(${var_name} ${default_value})
endif()
endmacro()
# Check that an optional variable is set, or, set it to a default value.
# Also converts that path to an abspath.
macro(CHECK_OPTIONAL_VARIABLE var_name default_value)
CHECK_OPTIONAL_VARIABLE_NOPATH(${var_name} ${default_value})
PATH_TO_ABSOLUTE(${var_name})
endmacro()
CHECK_REQUIRED_VARIABLE(PRE_CONFIGURE_FILE)
CHECK_REQUIRED_VARIABLE(POST_CONFIGURE_FILE)
CHECK_OPTIONAL_VARIABLE(GIT_STATE_FILE "${CMAKE_BINARY_DIR}/git-state-hash")
CHECK_OPTIONAL_VARIABLE(GIT_WORKING_DIR "${CMAKE_SOURCE_DIR}")
CHECK_OPTIONAL_VARIABLE_NOPATH(GIT_FAIL_IF_NONZERO_EXIT TRUE)
# Check the optional git variable.
# If it's not set, we'll try to find it using the CMake packaging system.
if(NOT DEFINED GIT_EXECUTABLE)
find_package(Git QUIET REQUIRED)
endif()
CHECK_REQUIRED_VARIABLE(GIT_EXECUTABLE)
set(_state_variable_names
GIT_RETRIEVED_STATE
GIT_HEAD_SHA1
GIT_IS_DIRTY
GIT_AUTHOR_NAME
GIT_AUTHOR_EMAIL
GIT_COMMIT_DATE_ISO8601
GIT_COMMIT_SUBJECT
GIT_COMMIT_BODY
GIT_DESCRIBE
# >>>
# 1. Add the name of the additional git variable you're interested in monitoring
# to this list.
)
# Macro: RunGitCommand
# Description: short-hand macro for calling a git function. Outputs are the
# "exit_code" and "output" variables.
macro(RunGitCommand)
execute_process(COMMAND
"${GIT_EXECUTABLE}" ${ARGV}
WORKING_DIRECTORY "${_working_dir}"
RESULT_VARIABLE exit_code
OUTPUT_VARIABLE output
ERROR_VARIABLE stderr
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT exit_code EQUAL 0)
set(ENV{GIT_RETRIEVED_STATE} "false")
# Issue 26: git info not properly set
#
# Check if we should fail if any of the exit codes are non-zero.
if(GIT_FAIL_IF_NONZERO_EXIT)
string(REPLACE ";" " " args_with_spaces "${ARGV}")
message(FATAL_ERROR "${stderr} (${GIT_EXECUTABLE} ${args_with_spaces})")
endif()
endif()
endmacro()
# Function: GetGitState
# Description: gets the current state of the git repo.
# Args:
# _working_dir (in) string; the directory from which git commands will be executed.
function(GetGitState _working_dir)
# This is an error code that'll be set to FALSE if the
# RunGitCommand ever returns a non-zero exit code.
set(ENV{GIT_RETRIEVED_STATE} "true")
# Get whether or not the working tree is dirty.
RunGitCommand(status --porcelain)
if(NOT exit_code EQUAL 0)
set(ENV{GIT_IS_DIRTY} "false")
else()
if(NOT "${output}" STREQUAL "")
set(ENV{GIT_IS_DIRTY} "true")
else()
set(ENV{GIT_IS_DIRTY} "false")
endif()
endif()
# There's a long list of attributes grabbed from git show.
set(object HEAD)
RunGitCommand(show -s "--format=%H" ${object})
if(exit_code EQUAL 0)
set(ENV{GIT_HEAD_SHA1} ${output})
endif()
RunGitCommand(show -s "--format=%an" ${object})
if(exit_code EQUAL 0)
set(ENV{GIT_AUTHOR_NAME} "${output}")
endif()
RunGitCommand(show -s "--format=%ae" ${object})
if(exit_code EQUAL 0)
set(ENV{GIT_AUTHOR_EMAIL} "${output}")
endif()
RunGitCommand(show -s "--format=%ci" ${object})
if(exit_code EQUAL 0)
set(ENV{GIT_COMMIT_DATE_ISO8601} "${output}")
endif()
RunGitCommand(show -s "--format=%s" ${object})
if(exit_code EQUAL 0)
# Escape quotes
string(REPLACE "\"" "\\\"" output "${output}")
set(ENV{GIT_COMMIT_SUBJECT} "${output}")
endif()
RunGitCommand(show -s "--format=%b" ${object})
if(exit_code EQUAL 0)
if(output)
# Escape quotes
string(REPLACE "\"" "\\\"" output "${output}")
# Escape line breaks in the commit message.
string(REPLACE "\r\n" "\\r\\n\\\r\n" safe "${output}")
if(safe STREQUAL output)
# Didn't have windows lines - try unix lines.
string(REPLACE "\n" "\\n\\\n" safe "${output}")
endif()
else()
# There was no commit body - set the safe string to empty.
set(safe "")
endif()
set(ENV{GIT_COMMIT_BODY} "\"${safe}\"")
else()
set(ENV{GIT_COMMIT_BODY} "\"\"") # empty string.
endif()
# Get output of git describe
RunGitCommand(describe --tags ${object})
if(NOT exit_code EQUAL 0)
set(ENV{GIT_DESCRIBE} "unknown")
else()
set(ENV{GIT_DESCRIBE} "${output}")
endif()
# >>>
# 2. Additional git properties can be added here via the
# "execute_process()" command. Be sure to set them in
# the environment using the same variable name you added
# to the "_state_variable_names" list.
endfunction()
# Function: GitStateChangedAction
# Description: this function is executed when the state of the git
# repository changes (e.g. a commit is made).
function(GitStateChangedAction)
foreach(var_name ${_state_variable_names})
set(${var_name} $ENV{${var_name}})
endforeach()
configure_file("${PRE_CONFIGURE_FILE}" "${POST_CONFIGURE_FILE}" @ONLY)
endfunction()
# Function: HashGitState
# Description: loop through the git state variables and compute a unique hash.
# Args:
# _state (out) string; a hash computed from the current git state.
function(HashGitState _state)
set(ans "")
foreach(var_name ${_state_variable_names})
string(SHA256 ans "${ans}$ENV{${var_name}}")
endforeach()
set(${_state} ${ans} PARENT_SCOPE)
endfunction()
# Function: CheckGit
# Description: check if the git repo has changed. If so, update the state file.
# Args:
# _working_dir (in) string; the directory from which git commands will be ran.
# _state_changed (out) bool; whether or no the state of the repo has changed.
function(CheckGit _working_dir _state_changed)
# Get the current state of the repo.
GetGitState("${_working_dir}")
# Convert that state into a hash that we can compare against
# the hash stored on-disk.
HashGitState(state)
# Issue 14: post-configure file isn't being regenerated.
#
# Update the state to include the SHA256 for the pre-configure file.
# This forces the post-configure file to be regenerated if the
# pre-configure file has changed.
file(SHA256 ${PRE_CONFIGURE_FILE} preconfig_hash)
string(SHA256 state "${preconfig_hash}${state}")
# Check if the state has changed compared to the backup on disk.
if(EXISTS "${GIT_STATE_FILE}")
file(READ "${GIT_STATE_FILE}" OLD_HEAD_CONTENTS)
if(OLD_HEAD_CONTENTS STREQUAL "${state}")
# State didn't change.
set(${_state_changed} "false" PARENT_SCOPE)
return()
endif()
endif()
# The state has changed.
# We need to update the state file on disk.
# Future builds will compare their state to this file.
file(WRITE "${GIT_STATE_FILE}" "${state}")
set(${_state_changed} "true" PARENT_SCOPE)
endfunction()
# Function: SetupGitMonitoring
# Description: this function sets up custom commands that make the build system
# check the state of git before every build. If the state has
# changed, then a file is configured.
function(SetupGitMonitoring)
add_custom_target(check_git
ALL
DEPENDS ${PRE_CONFIGURE_FILE}
BYPRODUCTS
${POST_CONFIGURE_FILE}
${GIT_STATE_FILE}
COMMENT "Checking the git repository for changes..."
COMMAND
${CMAKE_COMMAND}
-D_BUILD_TIME_CHECK_GIT=TRUE
-DGIT_WORKING_DIR=${GIT_WORKING_DIR}
-DGIT_EXECUTABLE=${GIT_EXECUTABLE}
-DGIT_STATE_FILE=${GIT_STATE_FILE}
-DPRE_CONFIGURE_FILE=${PRE_CONFIGURE_FILE}
-DPOST_CONFIGURE_FILE=${POST_CONFIGURE_FILE}
-DGIT_FAIL_IF_NONZERO_EXIT=${GIT_FAIL_IF_NONZERO_EXIT}
-P "${CMAKE_CURRENT_LIST_FILE}")
endfunction()
# Function: Main
# Description: primary entry-point to the script. Functions are selected based
# on whether it's configure or build time.
function(Main)
if(_BUILD_TIME_CHECK_GIT)
# Check if the repo has changed.
# If so, run the change action.
CheckGit("${GIT_WORKING_DIR}" changed)
if(changed OR NOT EXISTS "${POST_CONFIGURE_FILE}")
GitStateChangedAction()
endif()
else()
# >> Executes at configure time.
SetupGitMonitoring()
endif()
endfunction()
# And off we go...
Main()

729
debian/changelog vendored Normal file
View File

@@ -0,0 +1,729 @@
spark-store (4.2.6.6) stable; urgency=medium
* 调整:文案修改:安装失败后引导查看详情而不是重新安装
* 修复dpkg阻塞出现漏掉的安装失败现在在安装后检测是否安装
* 修复UOS专业版上安装成功仍然显示失败的问题方式忽略E:等消息,仅检查脚本报错
* 调整卸载应用时采用autopurge以一并卸载依赖
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.6.5) stable; urgency=medium
* 调整ssaudit安装结束时会提示安装结束
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.6.4) stable; urgency=medium
* 修复:关于页面的入口过时
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.6.3) stable; urgency=medium
* 修复:部分下载统计线路失效
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.6.2) stable; urgency=medium
* 新增支持arm架构搜索
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.6.1) stable; urgency=medium
* 修复mint下更新检测不正常
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.6) stable; urgency=medium
* 修复:截图加载失败时点击闪退
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.5.1) stable; urgency=medium
* 调整重写了spark-dstore-patch速度提升尤其对机械硬盘下
* 调整优化了aptss源文件同步策略
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.5) stable; urgency=medium
* 修复ssinstall在文件不存在时仍然报安装成功
* 修复删除不再需要的依赖libc6-dev
* 在aarch64架构安装时也启用32位支持
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.4) stable; urgency=medium
* 修复ssinstall校验失败的时候仍然提示安装成功
* 新增ssinstall可以自动刷新ssupdate以防止仓库更新中导致的安装校验失败
* 修复:在不受支持的平台安装应用时弹出提示不正确
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.3.3) stable; urgency=medium
* aptss 不再使用bwrap去除依赖支持容器中启动
* aptss 支持非root模式启动
* aptss 添加transhell支持
* 关于界面自动获取分支名称
* 现在安装成功则自动删除安装包
* 完成 arm 架构大部分功能适配
* 修复依赖不完整的问题
* 4.3 roadmap 实现,在浏览不支持的应用时会出现提示
* 4.3 roadmap 实现,在下载文件夹没有读写权限时会出现提示
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.3.2~Reason10) stable; urgency=medium
* 完成除web外大部分功能适配
* 修复依赖不完整的问题
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.3.2~Reason9) stable; urgency=medium
* sender-d.sh
* ssinstall和ssaudit的安装测试转到upgrade-worker
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.3.2~Reason8) stable; urgency=medium
* sender-d改用cpp重写在aarch64上稳定运行
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.3.2~Reason7) stable; urgency=medium
* ssinstall发现无法验证时尝试update而不是ssupdate
* 启动每日aptss update
* ssinstall在发现无法安装后尝试先进行下aptss update
* 修复:安装商店后首次启动无法安装任何软件
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.3.2~Reason5) stable; urgency=medium
* aptss 不再使用bwrap去除依赖支持容器中启动
* aptss 支持非root模式启动
* aptss 添加transhell支持
* 关于界面自动获取分支名称
* 现在安装成功则自动删除安装包
-- shenmo <shenmo@spark-app.store>
spark-store (4.2.3.2~Reason3) stable; urgency=medium
* 现在可在x86上编译使用同一套代码
* 暂时在aarch64上使用旧web----等待柚子
* 空间,疾疫,现在是静谧
-- shenmo <shenmo@spark-app.store> Sun, 5 Mar 2022 11:45:14 +0800
spark-store (4.2.3.2~only-for-test1) stable; urgency=medium
* 注意!!!!!! 此版本仅为启动测试还需要进一步完善——hardcode需要改善——关于web界面的调用方式需要在柚子做好之后修改成新的
* fix: hardcode
* fix: sender-d
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2.3.1) stable; urgency=medium
* 修复: ssinstall验证签名出错
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2.3) stable; urgency=medium
* 修复: 编译依赖不全
* 修复: prerm导致的dpkg崩溃
* 新增: aptss 检查package配置增加sdustore
* 新增: 一键编译并安装脚本
* 新增: 后台安装结束后退出任务栏驻留
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2.3~test4) stable; urgency=medium
* 修复: aptss 无法安装
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2.3~test3) stable; urgency=medium
* 调整:打包时从 debian/changelog 自动获取构建版本号并写入关于窗口保证与deb一致
* 新增:支持 DTK 5.6.4 关于对话框“版本特性”显示功能。目前只在deepin编译安装时开启
* 修复:修复下载列表对话框中,点击某个 item 取消下载按钮后下载列表无法再次显示的问题
* 修复:多个应用安装可能会出现某一个应用没有安装
* 修复:修复下载按钮点击/双击/拖动时,主窗口动作与下载管理对话框动作同时触发问题
* aptss 获取线路信息 转到从 d. 服务器获取
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2.3~test2) stable; urgency=medium
* 调整:开启安装包加固
* 添加zh_TW翻译
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2.3~test1) stable; urgency=medium
* 修复因判断安装状态错误创建多个相同任务的bug
* 测试中:尝试修复安装结束的闪退问题 https://gitee.com/deepin-community-store/spark-store/commit/cb093dcc2bb0a193db89aa0ce5f20ea9cc5d56eb
* 修复Deepin 显示开发者模式未开启
* 修复:从托盘打开主窗口时透明度动画不流畅
* 修复:主窗口关闭后,从托盘打开关于窗口会被主窗口遮挡
-- shenmo <shenmo@spark-app.store> Sun, 05 Feb 2023 23:00:00 +0800
spark-store (4.2.2) stable; urgency=medium
* 调整脚本应用的transhell支持转为source导入
* 修复ssinstall弹窗支持wayland
* 新增:应用托盘,下载时候可以放心关闭窗口了
* 新增支持spk://search/内容 格式链接
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2.1) stable; urgency=medium
* 调整支持在安装前进行测试ss-do-upgrade-worker,但是未实装到appinfo
* 修复因依赖不完全导致在LinuxMint下无法下载统计
* 新增:脚本系列应用支持英文
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2) stable; urgency=medium
* 调整UOS开发者模式提示现在不会那么挤了
* 修复wayland下可正常弹出更新提示
* 调整dwine5标签的文案改为Wine应用
* 新增:更新软件时弹窗会显示正在更新的软件包名
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2~test3) stable; urgency=medium
* 修复: aptss ssupdates
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2~test2) stable; urgency=medium
* 修复: 420t1版本中ssinstall有时会重新下载软件包的问题
* 新增: 安装前会对软件包安装进行dry run以判断是否能正确安装
* 调整: aptss在进行任何操作前均检测是否存在Packages文件若存在则不进行ssupdate
* 调整: 修改apt-fast源代码以指定conf位置为/tmp/apt-fast,这部分不再使用bwrap模拟
* 新增: aptss检测Package文件支持分目录目前指定为store
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2~test1) stable; urgency=medium
* 新增: aptss支持显示报错
* 新增: aptss部分提示汉化
* 修复: 修复部分情况下ssinstall实际未安装但是错误显示
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.2) stable; urgency=medium
* feat: 初步的wayland支持
* feat: UOS下检测开发者模式是否开启若未开启则拒绝安装
* fix: 首页的捐赠页面在中文环境下显示中文
* fix: 更新检测模块在aptss ssupdate操作失败后现在会正确地移除锁而不是错误的残留锁。
* chore: ssinstall现在拒绝安装验证失败的包审核操作现在需要改用ssaudit
* fix: Ubuntu下下载列表无法关闭
* fix: 修复进入详情页时焦点默认在分享链接按钮上的问题
* fix: 修复特定情况下的内存泄漏问题
* fix: 适配c11代码规范消除qt编译警告
* fix: 默认服务器域名指向cdn域名
* fix: 消除内部函数的无用变量,限制作用域
* feat: aptss 除ssupdate外的操作时候如果检测到存在源文件存在则不再重复获取
* fix: 修复在apt list锁被锁定的时候异常弹出有更新可用
* chore: 去除安装依赖:g++
* fix: 修复下载列表中进度提示文字显示不完整的问题
* feat: ssinstall支持从单独文件夹中校验软件包
* feat 支持分单文件夹下载。具体内容参见https://gitee.com/deepin-community-store/repo_auto_update_script/blob/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list
* info: 非常感谢 @jwyh 对星火商店代码仓库设计了很多标准,参见 https://deepin-community-store.gitee.io/spark-wiki/#/Dev/Spark-Store-Git-Repo?id=%e6%9b%b4%e6%96%b0%e6%97%a5%e5%bf%97%e8%a7%84%e5%88%99 不过shenmo是自由的
* chore: 添加 Application 类,继承 DApplication将 main 函数中设置属性、关于信息等操作移至 Application 构造函数中进行
* chore: 添加 setOrganizationName 操作,设置组织名称为 spark-union与 SWRT 保持一致
* chore: 设置组织名称后QStandardPaths::AppConfigLocation 等路径相应改变,修改所有配置文件和缓存文件路径
* chore: 关于对话框设置父对象后,对话框背景色受主窗口样式表影响,移动部分控件样式表设置方式与位置
* chore: 去除 .pro 文件中无效的更新翻译文件脚本调用,整理 .pro 文件,添加编译时更新 ts 文件脚本调用
* chore: 继续修复偶现关闭客户端时崩溃问题(疑似 aria2c 进程未启动pid 未初始化为随机值,执行 kill 操作时未判断导致)
* chore: 新增编译依赖,测试安装时不会出现报错
* chore: 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数
* chore: 更新翻译文件,去除已经不存在的翻译
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.2~test2) stable; urgency=medium
* feat: ssinstall支持从单独文件夹中校验软件包
* feat 支持分单文件夹下载。具体内容参见https://gitee.com/deepin-community-store/repo_auto_update_script/blob/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list
* info: 非常感谢 @jwyh 对星火商店代码仓库设计了很多标准,参见 https://deepin-community-store.gitee.io/spark-wiki/#/Dev/Spark-Store-Git-Repo 不过shenmo是自由的
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.2~test1) stable; urgency=medium
* feat: 初步的wayland支持
* feat: UOS下检测开发者模式是否开启若未开启则拒绝安装
* fix: 首页的捐赠页面在中文环境下显示中文
* fix: 更新检测模块在aptss ssupdate操作失败后现在会正确地移除锁而不是错误的残留锁。
* chore: ssinstall现在拒绝安装验证失败的包审核操作现在需要改用ssaudit
* fix: Ubuntu下下载列表无法关闭
* fix: 修复进入详情页时焦点默认在分享链接按钮上的问题
* fix: 修复特定情况下的内存泄漏问题
* fix: 适配c11代码规范消除qt编译警告
* fix: 默认服务器域名指向cdn域名
* fix: 消除内部函数的无用变量,限制作用域
* feat: aptss 除ssupdate外的操作时候如果检测到存在源文件存在则不再重复获取
* fix: 修复在apt list锁被锁定的时候异常弹出有更新可用
* chore: 去除安装依赖:g++
* fix: 修复下载列表中进度提示文字显示不完整的问题
* chore: 添加 Application 类,继承 DApplication将 main 函数中设置属性、关于信息等操作移至 Application 构造函数中进行
* chore: 添加 setOrganizationName 操作,设置组织名称为 spark-union与 SWRT 保持一致
* chore: 设置组织名称后QStandardPaths::AppConfigLocation 等路径相应改变,修改所有配置文件和缓存文件路径
* chore: 关于对话框设置父对象后,对话框背景色受主窗口样式表影响,移动部分控件样式表设置方式与位置
* chore: 去除 .pro 文件中无效的更新翻译文件脚本调用,整理 .pro 文件,添加编译时更新 ts 文件脚本调用
* chore: 继续修复偶现关闭客户端时崩溃问题(疑似 aria2c 进程未启动pid 未初始化为随机值,执行 kill 操作时未判断导致)
* chore: 新增编译依赖,测试安装时不会出现报错
* chore: 暂时去除没有意义的 DBus 接口,使用 DGuiApplicationHelper::newProcessInstance 获取新进程的启动参数
* chore: 更新翻译文件,去除已经不存在的翻译
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.1) stable; urgency=medium
* fix:更新失效
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.0) stable; urgency=medium
* feat: 现在可以支持UOS签名包问题了
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.0.1) stable; urgency=medium
* feat: 提升Ubuntu下的显示效果
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.0.0) stable; urgency=medium
* feat: 修复了成吨的bug后开始正式版
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.0.0~test2) stable; urgency=medium
* feat: 修复了成吨的bug后开始公测
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.0.0~test1) stable; urgency=medium
* feat: 柚子过来补充一下啦
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.4~test1) stable; urgency=medium
* feat: aptss不再尝试安装apt-fast转而自带
* chore: 删除password-check模块
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.3) stable; urgency=medium
* feat: 首页链接调用浏览器打开
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.3~test5) stable; urgency=medium
* 修复可能的内存泄漏问题
* 修复应用搜索为空但仍显示上一次搜索结果的问题
* 修复动画加载延后的问题
* 修复统计下载量卡主渲染线程的问题
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.3~test4) stable; urgency=medium
* Enable i386 arch support by default
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.3~test3) stable; urgency=medium
* Now use ss-apt-fast instead of apt-fast
* 修复:右上角 更新和安装设置 菜单中进入更新列表失效
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.3~test2) stable; urgency=medium
* bug fix: 更新和检查更新出错时不报错.此更新需要一个推送
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.3~test1) stable; urgency=medium
* 3.3.3将会是修复大部分bug后的最终版本
* 图形环境中所有root权限的组件剥离到cli(可用于deepin 23 daily只保证商店本体正常运作不处理安装依赖不满足)
* 文案更改:更新检查-->检查更新
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.1~test1) stable; urgency=medium
* 安装时不再需要联网
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.0.4) stable; urgency=medium
* 为减轻服务器压力,不再单独更新某一个应用,而是作为整体更新
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.0.3) stable; urgency=medium
* 回滚 更新中行为到进度条而不是实时输出
* 更新应用时显示正在更新哪个应用
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.0.2) stable; urgency=medium
* 修复 pkexec未执行
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3.0.1) stable; urgency=medium
* 修复 检查更新的更新进程未实际运行
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3) stable; urgency=medium
* 修复 检查更新 未刷新软件源
* 把检查更新单独拿出作为左列
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3~test3) stable; urgency=medium
* 把检查更新加入免密码
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3~test2) stable; urgency=medium
* 更新检测功能全部更改到zenity
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.3~test1) stable; urgency=medium
* zenity选择可更新应用
* 自动更新检测现在会跳过hold
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2.4) stable; urgency=medium
* 修改tag相关的文案内容wine相关环境已可自动配置了
* 准备发版
-- shenmo <shenmo@spark-app.store> 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 <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2.4~test3) stable; urgency=medium
* 发版合入到master
* 翻译完毕
* 合入先前的各项改动客户端集成投稿器入口和支持修复安装依赖时间较长时错误地返回“安装完毕”结果现在客户端版本更新时不关闭免密码登录UOS安装进程合并正常aptss中
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2.4~test2) stable; urgency=medium
* 客户端集成投稿器入口和支持
* 修复:安装依赖时间较长时错误地返回“安装完毕”结果
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2.4~test1) stable; urgency=medium
* 客户端更新时不关闭免密码登录
* UOS合并正常aptss中
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2.3) stable; urgency=medium
* 客户端异常退出时仍然占用资源问题修复
* 降低dtk依赖版本Debian 11 stable可直接安装
-- shenmo <shenmo@spark-app.store> 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 <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2.1) stable; urgency=medium
* 更改刷新系统源的功能
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2) stable; urgency=medium
* 新增 下载量统计功能
* 新增 显示下载量
* 修复 spk链接生成错误
* 调整 启动时检测商店applist源
* 新增 applist cdn加速
* 调整 ssupdate不再更新/etc/aptss下的cache如要如此请使用aptss update
* 修复 在更新检测设置中的是否开启自动更新检测设置项的显示不随开启或关闭状态改变
* 修复 在检测更新时临时降低优先级到100防止系统中有且版本一致的包被反复来回更新
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.6) stable; urgency=medium
* 修复部分情况下无法选中正确的镜像源的问题
* 合入3.1.5以来的各项修改
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.5-5) stable; urgency=medium
* 从所有镜像源中选取最快镜像源高速下载
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.5-4) stable; urgency=medium
* 更改ss-apt-fast策略现在只会在updatessupdate和没有检测到配置文件的时候更新配置文件
* 新增ss-apt-fast别名aptss
* 更新检测服务优化:从分体改为一体
* aptss 支持自动补全
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.5-3) stable; urgency=medium
* 包内自带密钥
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.5-2) stable; urgency=medium
* 下载软件时跳过获取大小,修复部分软件无法下载的问题
* 修复 获取key时出错指定使用http1.1
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.5-1) stable; urgency=medium
* 改变更新策略UOS也下载加速但是安装不加速
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.5) stable; urgency=medium
* 改变更新策略,现在支持应用在更新时引入新依赖
* ss-apt-fast现在默认允许降级以与apt使用体验一致
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.4-2) stable; urgency=medium
* 客户端下载使用metalink来支持bt下载加速
* 修复使用更新和安装设置更新商店本体时出错
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.4-1) stable; urgency=medium
* 安装脚本和检测更新脚本检查网络时间超时时间延长至5s
* 修复ssinstall在没有安装apt-fast的情况下首次安装需要依赖的软件时安装失败
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.4) stable; urgency=medium
* 发布正式版,同步到官网
* 修复安装时使用wget的问题
* 合并3.1.3-1和3.1.3-2的更改
* 屏蔽了ssinstall之外的安装方式
* 调整了报错框的形式
* 修复pkexec下ssinstall不处理依赖
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.3-2) stable; urgency=medium
* 调整 现在与系统更新分开,不再导致更新失败
* 支持直接更新软件源文件不再让d.吃全部更新流量
* ss-apt-fast不再强制root权限
* 修改ss-apt-fast的策略现在除了安装下载和更新都改用apt
* ssinstall 现在也会在不适用ss-apt-fast的时候模拟源了针对UOS
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.3-1) stable; urgency=medium
* 修复 下载提前退出
* 移除 下载量显示
-- shenmo <shenmo@spark-app.store> 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
* 新增ssinstall现在会在没有apt-fast的时候自动安装
* 新增ss-apt-fast现在会在没有apt-fast的时候自动安装
* 修改删除ssinstall中无用的 || dpkg -P $1
* 新增ss-apt-fast会先下载云上的conf以确保mirror是最新的
* 修复去除wget指令
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.1.2) stable; urgency=medium
* Now let apt-fast method support all mirrors
* Now will download dependencies and upgrade with all mirrors
-- shenmo <shenmo@spark-app.store> 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
* Now ss-update-controler will create symbol link instead of hard link
-- shenmo <shenmo@spark-app.store> 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.
* Modify ssinistall script: Now will ask for password when not run as root
-- shenmo <shenmo@spark-app.store> 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
* Change the style of About Dialog
* Modified depends to avoid Deb installers can not handle "Provides"
-- shenmo <shenmo@spark-app.store> 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
* Now can run on Debian 11
* Now can run on Ubuntu 22.04
-- shenmo <shenmo@spark-app.store> Mon, 17 Jan 2022 00:00:00 +0800
spark-store (3.0.3-11) stable; urgency=medium
* Now support autoupdate
-- shenmo <shenmo@spark-app.store> Mon, 17 Jan 2022 00:00:00 +0800
spark-store (3.0.3-10) stable; urgency=medium
* Now also compile dstore patch
-- shenmo <shenmo@spark-app.store> Mon, 17 Jan 2022 00:00:00 +0800
spark-store (3.0.3-9) stable; urgency=medium
* Support dpkg-buildpackage
-- shenmo <shenmo@spark-app.store> Mon, 17 Jan 2022 00:00:00 +0800

1
debian/compat vendored Normal file
View File

@@ -0,0 +1 @@
11

49
debian/control vendored Normal file
View File

@@ -0,0 +1,49 @@
Source: spark-store
Maintainer: shenmo <shenmo@spark-app.store>
Section: utils
Priority: optional
Build-Depends:
debhelper (>= 9),
pkg-config,
qtchooser (>= 55-gc9562a1-1~),
libqt5core5a,
libqt5gui5,
libqt5widgets5,
libqt5network5,
libqt5concurrent5,
libdtkcore-dev(>=5.0),
libdtkgui-dev(>=5.0),
libdtkwidget-dev(>=5.0),
libqt5svg5-dev,
qttools5-private-dev,
qtwebengine5-dev,
qtwayland5,
qtwayland5-dev-tools,
gcc,
g++
Standards-Version: 4.0.0
Homepage: https://www.spark-app.store/
Package: spark-store
Architecture: any
Depends:${shlibs:Depends}, ${misc:Depends},
libqt5core5a,
libqt5gui5,
libqt5widgets5,
libqt5network5,
libqt5concurrent5,
qtwayland5,
libdtkcore5,
libdtkgui5,
libdtkwidget5,
curl,
openssl,
dde-qt5integration,
aria2,
gnupg,
zenity,
policykit-1,
libnotify-bin,
desktop-file-utils
Description: Spark Store
A community powered app store, based on DTK.

22
debian/copyright vendored Normal file
View File

@@ -0,0 +1,22 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: spark-store
Source: https://gitee.com/deepin-community-store/spark-store
Files: *
Copyright: The Spark Project Developers
License: GPL-3+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General

38
debian/rules vendored Executable file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/make -f
export QT_SELECT = qt5
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1
%:
dh $@ --parallel
override_dh_auto_clean:
rm -rf $(CURDIR)/build
override_dh_auto_configure:
mkdir -p $(CURDIR)/build
qmake BUILD_VERSION=$(DEB_VERSION_UPSTREAM) spark-store-project.pro \
-spec linux-g++ CONFIG+=qtquickcompiler \
-o $(CURDIR)/build/
override_dh_auto_build:
make MAKEFLAGS="$(MAKEFLAGS)" -C $(CURDIR)/build
override_dh_auto_install:
make -C $(CURDIR)/build install \
INSTALL_ROOT=$(CURDIR)/debian/spark-store
# Ignore the dpkg-shlibdeps: warning (it uses none of the library's symbols)
# Qt Mutidedia lib will ref to network libraray.
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--warnings=0

1
debian/source/format vendored Normal file
View File

@@ -0,0 +1 @@
1.0

86
debian/spark-store.postinst vendored Executable file
View File

@@ -0,0 +1,86 @@
#!/bin/bash
case "$1" in
configure)
case `arch` in
x86_64)
echo "Enabling i386 arch..."
dpkg --add-architecture i386
;;
aarch64)
echo "Enabling armhf arch..."
dpkg --add-architecture armhf
;;
*)
echo "Unknown architecture, skip enable 32-bit arch"
;;
esac
mkdir -p /var/lib/aptss/lists
# Remove the sources.list file
rm -f /etc/apt/sources.list.d/sparkstore.list
# Check if /usr/local/bin existed
mkdir -p /usr/local/bin
# Create symbol links for binary files
ln -s -f /opt/durapps/spark-store/bin/spark-store /usr/local/bin/spark-store
ln -s -f /opt/durapps/spark-store/bin/ssinstall /usr/local/bin/ssinstall
ln -s -f /opt/durapps/spark-store/bin/ssaudit /usr/local/bin/ssaudit
ln -s -f /opt/durapps/spark-store/bin/spark-dstore-patch /usr/local/bin/spark-dstore-patch
ln -s -f /opt/durapps/spark-store/bin/aptss /usr/local/bin/ss-apt-fast
ln -s -f /opt/durapps/spark-store/bin/aptss /usr/bin/aptss
# Create symbol links for SSINSTALL
ln -s -f /opt/durapps/spark-store/bin/auto-install-policy/store.spark-app.ssinstall.policy /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
# Install key
mkdir -p /tmp/spark-store-install/
cp -f /opt/durapps/spark-store/bin/spark-store.asc /tmp/spark-store-install/spark-store.asc
gpg --dearmor /tmp/spark-store-install/spark-store.asc
cp -f /tmp/spark-store-install/spark-store.asc.gpg /etc/apt/trusted.gpg.d/spark-store.gpg
# Run apt update to avoid users being fucked up by the non-exist dependency problem
# Now abandoned as aptss now run ssupdate everytime
#aptss ssupdate
# Start upgrade detect service
systemctl enable spark-update-notifier
systemctl start spark-update-notifier
# Update certain caches
update-icon-caches /usr/share/icons/hicolor || true
update-desktop-database /usr/share/applications || true
xdg-mime default spark-store.desktop x-scheme-handler/spk
update-mime-database /usr/share/mime || true
# Send email for statistics
#/tmp/spark-store-install/feedback.sh
# Remove temp dir
rm -rf /tmp/spark-store-install
;;
triggered)
# Quit if deepin-app-store-tool existed
if [ -x "/usr/bin/deepin-app-store-tool" ] ; then
exit 0
fi
# Trigger for UOS debs installation
echo '--------检测到Uniontech标准软件包运行补丁以修正安装--------'
if [ -x "/usr/local/bin/spark-dstore-patch" ] ; then
/usr/local/bin/spark-dstore-patch
echo '-----------spark-dstore-patch补丁工具已运行完毕-----------'
else
echo '------------spark-dstore-patch补丁工具运行失败------------'
fi
;;
esac

6
debian/spark-store.postrm vendored Normal file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
# Update certain caches
update-icon-caches /usr/share/icons/hicolor || true
update-desktop-database /usr/share/applications || true
update-mime-database /usr/share/mime || true

28
debian/spark-store.preinst vendored Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
#检测网络链接畅通
function network-check()
{
#超时时间
local timeout=15
#目标网站
local target=www.baidu.com
#获取响应状态码
local ret_code=`curl -I -s --connect-timeout ${timeout} ${target} -w %{http_code} | tail -n1`
if [ "x$ret_code" = "x200" ]; then
echo "Network Checked successful ! Continue..."
echo "网络通畅,继续安装"
else
#网络不畅通
echo "Network failed ! Cancel the installation"
echo "网络不畅,终止安装"
exit -1
fi
}
#network-check
echo "不再检测网络"

51
debian/spark-store.prerm vendored Executable file
View File

@@ -0,0 +1,51 @@
#!/bin/bash
function notify-send()
{
#Detect the user using such display
local user=$(who | awk '{print $1}' | head -n 1)
#Detect the id of the user
local uid=$(id -u $user)
sudo -u $user DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus notify-send "$@"
}
if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then
# Remove residual symbol links
rm -f /usr/local/bin/spark-store
rm -f /usr/local/bin/ssinstall
rm -f /usr/local/bin/ssaudit
rm -f /usr/local/bin/spark-dstore-patch
rm -f /usr/local/bin/ss-apt-fast
rm -f /usr/bin/aptss
rm -rf /etc/aptss/
rm -rf /var/lib/aptss/
# Remove residual symbol links to stop upgrade detect
rm -f /etc/xdg/autostart/spark-update-notifier.desktop
# Shutdown services
systemctl stop spark-update-notifier
# Stop update detect service
systemctl disable spark-update-notifier
# Clean the auto install polkit file if exist
rm -f /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
# Remove gpg key file
rm -f /etc/apt/trusted.gpg.d/spark-store.gpg
apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C'
else
echo "非卸载操作,不进行配置清理"
if [ ! -z "`pidof spark-store`" ];then
echo "关闭已有 spark-store.."
notify-send "正在升级星火商店" "请在升级结束后重启星火商店" -i spark-store
killall spark-store
else
echo "继续安装 spark-store.."
fi
fi

1
debian/spark-store.triggers vendored Normal file
View File

@@ -0,0 +1 @@
interest-noawait /opt/apps

View File

@@ -1,52 +0,0 @@
# 项目结构和命名规范
## 文件夹结构
### cmake
主要用于 CMake 配置时需要用到的 CMake 模块脚本。
### gui
主要用于显示界面的 C++ 代码文件(即包含 Qt Widgets 代码),无论包含多少与其他组件的联系,都在这个目录内。
这包括 SpkUi 的自定义界面组件、商店主界面自身的 Page 类等等。
### inc
项目中所有以 `#include "xxx.h"` 方式包含到代码中的标头文件,全部放入此目录。
标头文件并不强求目录结构明确,文件用途或来源特殊的除外。
### src
商店主体逻辑。包含基础的 `SpkStore` 类、`main.cpp` 等核心逻辑。
新加入的逻辑如单个功能多于一个cpp文件则必须分装到一个目录内。
### plugin
适配 Deepin 以及其他平台的平台相关插件。
## 命名规范
### 通用规范
类名、成员、方法名一律采用大驼峰形式。例如,`SpkTitleBar::SetTitle` 方法。
C++ 规范要求的和第三方库有较大差异的除外。例如,`SpkUiMessage::_notify`成员。
临时变量采用小驼峰形式或全小写。
名称要对功能要有基础的描述,例如,`SpkUi::SpkCategorySelector` 类。抽象核心逻辑除外。
### 类名
如非第三方代码,一般以 `Spk` 前缀标明。
实现 UI 的类都应归于 `SpkUi` 命名空间。
## 类定义
### 一般规则
Qt 类的 `Q_OBJECT` 应置于类定义最顶端。
`public` `protected``private` 等标签中只应该包含一类成员,
如单个 `public` 标签内只能包含方法,或成员。
信号、槽等不得与普通方法混合。
<!--TODO-->

View File

@@ -1,6 +0,0 @@
# 翻译
由于CMake和Qt的稀烂集成我们不能使用CMake自动lupdate更新翻译。
如果需要更新翻译,请使用`make run_lupdate`目标进行。qm文件的编译无需其他操作只需build即可。

View File

@@ -1,314 +0,0 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "page/spkpageappdetails.h"
#include "spkutils.h"
#include "spkappitem.h"
namespace SpkUi
{
constexpr QSize SpkPageAppDetails::IconSize;
void SpkPageAppDetails::LoadAppResources(QString aPkgName, QString aIcon, QStringList aScreenshots,
QStringList aTags)
{
QPixmap pic;
// Load icon
auto res = RES->RequestResource(0, aPkgName, SpkResource::ResourceType::AppIcon, aIcon);
if(res.status == SpkResource::ResourceStatus::Ready)
{
if(pic.loadFromData(res.data))
mAppIcon->setPixmap(pic.scaled(IconSize,
Qt::IgnoreAspectRatio,
Qt::SmoothTransformation));
else
{
mAppIcon->setPixmap(mBrokenImg);
RES->PurgeCachedResource(aPkgName, SpkResource::ResourceType::AppIcon, 0);
}
}
// Load screenshots. Screenshots have id starting with 1.
if(aScreenshots.isEmpty())
return;
else
{
auto count = aScreenshots.size();
mImgViewer->SetImageTotal(count);
if(count > mScreenshotPreviews.size())
{
auto from = mScreenshotPreviews.size(), to = count - mScreenshotPreviews.size();
for(int i = 0; i <= to; i++)
{
auto wid = new SpkClickLabel;
wid->setProperty("shotId", from + i + 1);
wid->setFixedHeight(200);
wid->setCursor(Qt::PointingHandCursor);
connect(wid, &SpkClickLabel::Pressed, this, &SpkPageAppDetails::ImageClicked);
mScreenshotPreviews.append(wid);
mScreenshotLay->addWidget(wid);
}
}
}
int shotId = 0;
for(auto &i : aScreenshots)
{
shotId++;
res = RES->RequestResource(shotId, aPkgName, SpkResource::ResourceType::AppScreenshot, i,
shotId);
auto preview = mScreenshotPreviews[shotId - 1];
preview->setVisible(true);
if(res.status == SpkResource::ResourceStatus::Ready)
{
if(pic.loadFromData(res.data))
{
mAppImages[shotId] = pic;
mImgViewer->SetPixmap(shotId, &mAppImages[shotId]);
preview->setPixmap(pic.scaledToHeight(200, Qt::SmoothTransformation));
}
else
{
mAppImages[shotId] = mBrokenImg;
RES->PurgeCachedResource(aPkgName, SpkResource::ResourceType::AppScreenshot, 0);
}
}
else
{
preview->setPixmap(mIconLoading);
}
}
// TODO: tags
}
void SpkPageAppDetails::SetWebsiteLink(QString url)
{
mWebsite->setText(QString("<a href=\"%1\">%2</a>").arg(url, tr("Website link")));
}
void SpkPageAppDetails::SetPackagePath(QString url)
{
mPkgPath = url;
}
SpkPageAppDetails::SpkPageAppDetails(QWidget *parent) : SpkPageBase(parent),
mBrokenImg(QIcon(":/icons/broken-icon.svg").pixmap(SpkAppItem::IconSize_)),
mIconLoading(QIcon(":/icons/loading-icon.svg").pixmap(SpkAppItem::IconSize_))
{
mMainArea = new QScrollArea;
mMainArea->setWidgetResizable(true);
mMainArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
mMainLay = new QVBoxLayout(this);
mMainLay->addWidget(mMainArea);
mBottomBar = new QWidget;
mMainLay->addWidget(mBottomBar);
mDetailsLay = new QVBoxLayout(mMainArea);
mDetailsLay->setSizeConstraint(QLayout::SetMinAndMaxSize);
mAppIcon = new QLabel;
mAppTitle = new QLabel;
mAppTitle->setObjectName("styDetTitle");
mAppTitle->setWordWrap(true);
mAppDescription = new QLabel;
mAppDescription->setObjectName("styDetDesc");
mAppDescription->setWordWrap(true);
mAppShortDesc = new QLabel;
mAppShortDesc->setObjectName("styDetDesc");
mAppShortDesc->setWordWrap(true);
// NOTE: Seems Qt have trouble dealing with wrapped text here. Removing the following operations
// to mAppShortDesc will result in broken layout. Very possible that it's a Qt bug.
mAppShortDesc->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
mAppShortDesc->setMinimumWidth(100);
mVersion = new QLabel;
mVersion->setWordWrap(true);
mWebsite = new QLabel;
mPkgName = new QLabel;
mPkgName->setObjectName("styDetPkg");
mPkgName->setWordWrap(true);
mTitleLay = new QVBoxLayout;
mTitleLay->setAlignment(Qt::AlignTop);
mTitleLay->addWidget(mAppTitle);
mTitleLay->addWidget(mVersion);
mTitleLay->addWidget(mAppShortDesc);
mTitleLay->addWidget(mPkgName);
mTitleLay->addWidget(mWebsite);
mTitleLay->setSpacing(0);
mIconTitleLay = new QHBoxLayout;
mIconTitleLay->setAlignment(Qt::AlignLeft);
mIconTitleLay->addWidget(mAppIcon);
mIconTitleLay->addSpacing(15);
mIconTitleLay->addLayout(mTitleLay);
mIconTitleWidget = new QWidget;
mIconTitleWidget->setLayout(mIconTitleLay);
mAuthor = new SpkDetailEntry;
mAuthor->SetTitle(tr("Author"));
mContributor = new SpkDetailEntry;
mContributor->SetTitle(tr("Contributor"));
// mSite = new SpkDetailEntry;
// mSite->SetTitle(tr("Website"));
mArch = new SpkDetailEntry;
mArch->SetTitle(tr("Architecture"));
mSize = new SpkDetailEntry;
mSize->SetTitle(tr("Size"));
mDetailLay = new SpkStretchLayout;
mDetailLay->setSpacing(12);
mDetailLay->addWidget(mAuthor);
mDetailLay->addWidget(mContributor);
mDetailLay->addWidget(mSize);
mDetailLay->addWidget(mArch);
// mDetailLay->addWidget(mSite);
// mDetailWidget = new QWidget;
// mDetailWidget->setLayout(mDetailLay);
// mDetailWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
mDetailsLay->setAlignment(Qt::AlignTop);
mDetailsLay->addWidget(mIconTitleWidget);
mDetailsLay->addLayout(mDetailLay);
mDetailsLay->addWidget(mAppDescription);
// mMainLay->addStretch();
mScreenshotLay = new QHBoxLayout;
mScreenshotArea = new QScrollArea;
mWid4ShotArea = new QWidget;
mWid4ShotArea->setLayout(mScreenshotLay);
mScreenshotArea->setWidget(mWid4ShotArea);
mScreenshotArea->setWidgetResizable(true);
mScreenshotArea->setFixedHeight(230);
mScreenshotArea->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
mDetailsLay->addWidget(mScreenshotArea);
mWid4MainArea = new QWidget;
mWid4MainArea->setLayout(mDetailsLay);
mMainArea->setWidget(mWid4MainArea);
mWebsite->setTextFormat(Qt::RichText);
mWebsite->setOpenExternalLinks(true);
// Bottom bar buttons
mBottomBarLay = new QHBoxLayout;
mBottomBar->setLayout(mBottomBarLay);
mBtnDownload = new QPushButton;
mBtnDownload->setText(tr("Download"));
// mBtnInstall = new QPushButton;
// mBtnInstall->setText(tr("Install"));
mBtnUninstall = new QPushButton;
mBtnUninstall->setText(tr("Uninstall"));
mBtnRequestUpdate = new QPushButton;
mBtnRequestUpdate->setText(tr("Request Update"));
mBtnReport = new QPushButton;
mBtnReport->setText(tr("Report"));
mBottomBarLay->addStretch();
mBottomBarLay->addWidget(mBtnDownload);
// mBottomBarLay->addWidget(mBtnInstall);
mBottomBarLay->addWidget(mBtnUninstall);
mBottomBarLay->addWidget(mBtnRequestUpdate);
mBottomBarLay->addWidget(mBtnReport);
mImgViewer = new SpkImgViewer;
mImgViewer->setVisible(false);
connect(mBtnDownload, &QPushButton::clicked,
[=](){ emit RequestDownload(mAppTitle->text(), mPkgName->text(),
"/store/reading/youdao-dict/youdao-dict_6.0.0-0~ubuntu_amd64.deb");
});
}
SpkPageAppDetails::~SpkPageAppDetails()
{
delete mImgViewer;
}
void SpkPageAppDetails::ResourceAcquisitionFinished(int id, ResourceResult result)
{
QPixmap img;
// qDebug() << "PageAppDetails: Resource" << id << "acquired";
if(!id)
{
// id == 0, icon
if(result.status == SpkResource::ResourceStatus::Ready)
{
if(img.loadFromData(result.data))
mAppIcon->setPixmap(img.scaled(SpkAppItem::IconSize_,
Qt::IgnoreAspectRatio,
Qt::SmoothTransformation));
else
mAppIcon->setPixmap(mBrokenImg);
}
else if(result.status == SpkResource::ResourceStatus::Failed)
{
mAppIcon->setPixmap(mBrokenImg);
RES->PurgeCachedResource(mPkgName->text(), SpkResource::ResourceType::AppIcon, 0);
}
}
else
{
auto preview = mScreenshotPreviews[id - 1];
preview->setVisible(true);
if(result.status == SpkResource::ResourceStatus::Ready)
{
if(img.loadFromData(result.data))
{
mAppImages[id] = img;
mImgViewer->SetPixmap(id, &mAppImages[id]);
mScreenshotPreviews[id - 1]->setPixmap(img.scaledToHeight(200, Qt::SmoothTransformation));
}
else
{
mImgViewer->SetPixmap(id, &mBrokenImg);
mScreenshotPreviews[id - 1]->setPixmap(mBrokenImg);
}
}
else if(result.status == SpkResource::ResourceStatus::Failed)
{
mImgViewer->SetPixmap(id, &mBrokenImg);
mScreenshotPreviews[id - 1]->setPixmap(mBrokenImg);
RES->PurgeCachedResource(mPkgName->text(), SpkResource::ResourceType::AppIcon, 0);
}
}
}
void SpkPageAppDetails::Activated()
{
RES->Acquire(this, false);
for(auto &i : mScreenshotPreviews)
i->setVisible(false);
mImgViewer->Clear();
}
void SpkPageAppDetails::ImageClicked()
{
mImgViewer->ShowWithImage(sender()->property("shotId").toInt());
}
SpkDetailEntry::SpkDetailEntry(QWidget *parent) : QWidget(parent)
{
setLayout(&mLay);
mLay.addWidget(&mTitle);
mLay.addWidget(&mField);
mTitle.setAlignment(Qt::AlignLeft);
mField.setAlignment(Qt::AlignRight);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
setMinimumWidth(300);
setAutoFillBackground(true);
}
}

View File

@@ -1,181 +0,0 @@
#include "page/spkpageapplist.h"
#include "spkutils.h"
#include "spkuimsg.h"
namespace SpkUi
{
SpkPageAppList::SpkPageAppList(QWidget *parent) : SpkPageBase(parent)
{
mLoadingIcon = new QPixmap(QIcon(":/icons/loading-icon.svg").pixmap(SpkAppItem::IconSize_));
mBrokenIcon = new QPixmap(QIcon(":/icons/broken-icon.svg").pixmap(SpkAppItem::IconSize_));
mAppsWidget = new QWidget;
mAppsArea = new QScrollArea(this);
mMainLay = new QVBoxLayout(this);
mItemLay = new SpkStretchLayout(mAppsWidget);
mPageSwitchWidget = new QWidget;
mPageSwitchLay = new QHBoxLayout(mPageSwitchWidget);
mBtnPgUp = new QPushButton;
mBtnPgDown = new QPushButton;
mBtnGotoPage = new QPushButton;
mPageInput = new QLineEdit;
mPageValidator = new QIntValidator(mPageInput);
mPageIndicator = new QLabel;
mPageValidator->setRange(1, 99);
mPageInput->setFixedWidth(50);
mPageInput->setValidator(mPageValidator);
mBtnGotoPage->setText(tr("Goto"));
mBtnPgUp->setText(tr("Previous"));
mBtnPgDown->setText(tr("Next"));
mBtnGotoPage->setFocusPolicy(Qt::NoFocus);
mBtnPgDown->setFocusPolicy(Qt::NoFocus);
mBtnPgUp->setFocusPolicy(Qt::NoFocus);
mPageSwitchLay->addWidget(mPageIndicator);
mPageSwitchLay->addStretch();
mPageSwitchLay->addWidget(mPageInput);
mPageSwitchLay->addWidget(mBtnGotoPage);
mPageSwitchLay->addWidget(mBtnPgUp);
mPageSwitchLay->addWidget(mBtnPgDown);
mAppsArea->setWidget(mAppsWidget);
mAppsArea->setWidgetResizable(true);
mMainLay->addWidget(mAppsArea);
mMainLay->addWidget(mPageSwitchWidget);
setLayout(mMainLay);
connect(mBtnPgUp, &QPushButton::clicked, this, &SpkPageAppList::PageUp);
connect(mBtnPgDown, &QPushButton::clicked, this, &SpkPageAppList::PageDown);
connect(mBtnGotoPage, &QPushButton::clicked, this, &SpkPageAppList::GotoPage);
}
void SpkPageAppList::AddApplicationEntry(QString name, QString pkgName, QString description,
QString iconUrl, int appId)
{
auto item = new SpkAppItem(appId, this);
auto id = mAppItemList.size();
connect(item, &SpkAppItem::clicked, this, &SpkPageAppList::ApplicationClicked);
item->SetTitle(name);
item->SetDescription(description);
item->setProperty("pkg_name", pkgName);
auto iconRes = RES->RequestResource(id, pkgName, SpkResource::ResourceType::AppIcon,
iconUrl, 0);
QPixmap icon;
if(iconRes.status == SpkResource::ResourceStatus::Ready)
{
if(icon.loadFromData(iconRes.data))
item->SetIcon(icon.scaled(SpkAppItem::IconSize_,
Qt::IgnoreAspectRatio,
Qt::SmoothTransformation));
else
{
item->SetIcon(*mBrokenIcon);
RES->PurgeCachedResource(pkgName, SpkResource::ResourceType::AppIcon, 0);
}
}
else
item->SetIcon(*mLoadingIcon);
mAppItemList.append(item);
mItemLay->addWidget(item);
}
void SpkPageAppList::ClearAll()
{
QWidget *itm;
QLayoutItem *layitm;
while((layitm = mItemLay->takeAt(0)))
{
itm = layitm->widget();
itm->hide();
itm->deleteLater();
}
mAppItemList.clear();
mAppsArea->verticalScrollBar()->setValue(0);
}
void SpkPageAppList::ResourceAcquisitionFinished(int id, ResourceResult result)
{
QPixmap icon;
// qDebug() << "PageAppList: Resource" << id << "acquired";
auto item = mAppItemList[id];
if(result.status == SpkResource::ResourceStatus::Ready)
{
if(icon.loadFromData(result.data))
item->SetIcon(icon.scaled(SpkAppItem::IconSize_,
Qt::IgnoreAspectRatio,
Qt::SmoothTransformation));
else
item->SetIcon(*mBrokenIcon);
}
else if(result.status == SpkResource::ResourceStatus::Failed)
{
item->SetIcon(*mBrokenIcon);
RES->PurgeCachedResource(item->property("pkg_name").toString(),
SpkResource::ResourceType::AppIcon, 0);
}
}
void SpkPageAppList::SetPageStatus(int total, int current, int itemCount, QString &keyword)
{
mCurrentPage = current;
mKeyword = keyword;
mPageIndicator->setText(tr("Page %1 / %2, %3 apps in total")
.arg(current).arg(total).arg(itemCount));
mBtnPgUp->setDisabled(current == 1);
mBtnPgDown->setDisabled(total == current || total == 1);
mBtnGotoPage->setDisabled(total == 1);
mPageValidator->setTop(total);
}
void SpkPageAppList::DisablePageSwitchers()
{
mBtnPgDown->setDisabled(true);
mBtnPgUp->setDisabled(true);
mBtnGotoPage->setDisabled(true);
}
void SpkPageAppList::PageUp()
{
DisablePageSwitchers();
if(mKeyword.isEmpty())
emit SwitchListPage(mCategoryId, mCurrentPage - 1);
else
emit SwitchSearchPage(mKeyword, mCurrentPage - 1);
}
void SpkPageAppList::PageDown()
{
DisablePageSwitchers();
if(mKeyword.isEmpty())
emit SwitchListPage(mCategoryId, mCurrentPage + 1);
else
emit SwitchSearchPage(mKeyword, mCurrentPage + 1);
}
void SpkPageAppList::GotoPage()
{
if(mPageInput->text().isEmpty())
return SpkUiMessage::SendStoreNotification(tr("Please enter page number to go to!"));
int page = mPageInput->text().toInt();
if(page > mPageValidator->top())
return SpkUiMessage::SendStoreNotification(tr("Page %1 is not a valid page number!")
.arg(page));
DisablePageSwitchers();
if(mKeyword.isEmpty())
emit SwitchListPage(mCategoryId, page);
else
emit SwitchSearchPage(mKeyword, page);
}
void SpkPageAppList::Activated()
{
RES->Acquire(this, false);
}
}

View File

@@ -1,41 +0,0 @@
#include "page/spkpagebase.h"
/*
* Documentation on
* How to Add a New Page to Main Window Side Bar
*
* 1. Derive your page widget class from SpkPageBase (reference implementation
* in SpkPageSettings) and add them to CMakeLists
*
* 2. Add the ID for the page in enum SpkUi::SpkStackedPages (in spkmainwindow.h)
* and add it as a resource context if needed
*
* 3. Include the page's header file in spkmainwindow.h and add a pointer to it in
* SpkUi::SpkMainWidget
*
* 4. Add a tree item or icon button for the corresponding page inside
* SpkUi::SpkMainWidget, and initialize it in SpkUi::SpkMainWidget::SpkMainWidget.
* Take references of existing entries, and write similar code close to each other
* to make the source look nice. Don't forget to add the item to the UI.
*
* 5. Make the linkage between the page and the sidebar item at the end of
* SpkUi::SpkMainWidget::SpkMainWidget().
*
*/
SpkPageBase::SpkPageBase(QWidget *parent) : QWidget(parent)
{
}
void SpkPageBase::ResourceAcquisitionFinished(int id, ResourceResult result)
{
Q_UNUSED(id);
Q_UNUSED(result);
}
void SpkPageBase::Activated()
{
; // Do nothing
}

View File

@@ -1,214 +0,0 @@
#include "page/spkpagedownloads.h"
#include "pkgs/spkpkgmgrbase.h"
#include "spkuimsg.h"
#include "spkutils.h"
SpkUi::SpkPageDownloads::SpkPageDownloads(QWidget *parent) :
SpkPageBase(parent)
{
mMainLay = new QVBoxLayout(this);
mLayEntries = new QVBoxLayout;
mScrollWidget = new QWidget;
mScrollArea = new QScrollArea(this);
mLayEntries->setAlignment(Qt::AlignTop);
mScrollWidget->setLayout(mLayEntries);
mScrollArea->setWidget(mScrollWidget);
mScrollArea->setWidgetResizable(true);
mMainLay->addWidget(mScrollArea);
setLayout(mMainLay);
mDownloadMgr = new SpkDownloadMgr(this);
connect(mDownloadMgr, &SpkDownloadMgr::DownloadProgressed,
this, &SpkPageDownloads::DownloadProgress);
mNextDownloadId = 0;
mCurrentStatus = Idle;
connect(mDownloadMgr, &SpkDownloadMgr::DownloadStopped,
this, &SpkPageDownloads::DownloadStopped, Qt::QueuedConnection);
connect(PKG, &SpkPkgMgrBase::ReportInstallResult,
this, &SpkPageDownloads::InstallationEnded);
}
SpkUi::SpkPageDownloads::~SpkPageDownloads()
{
// TODO
}
void SpkUi::SpkPageDownloads::DownloadProgress(qint64 downloadedBytes, qint64 totalBytes, int id)
{
if(!totalBytes)
return;
if(mCurrentStatus == Waiting && totalBytes)
{
mCurrentStatus = Downloading;
mEntries[id]->SetTotalBytes(totalBytes);
mEntries[id]->SetStatus(SpkDownloadEntry::Downloading);
}
mEntries[id]->Progress(downloadedBytes);
}
void SpkUi::SpkPageDownloads::AddDownloadTask(QString name, QString pkgName, QString path)
{
// Add a new download entry into the UI
auto entry = new SpkDownloadEntry;
auto iconData = RES->CacheLookup(pkgName, SpkResource::ResourceType::AppIcon, 0);
auto id = mNextDownloadId;
QPixmap icon;
if(iconData.status != SpkResource::ResourceStatus::Ready || !icon.loadFromData(iconData.data))
icon.load(":/icons/broken-icon.svg");
entry->SetBasicInfo(name, icon, mDownloadMgr->GetDestFilePath(path));
entry->SetStatus(SpkDownloadEntry::Waiting);
entry->setProperty("entryId", id);
entry->setProperty("path", path);
mNextDownloadId++;
mEntries[id] = entry;
mLayEntries->addWidget(entry);
connect(entry, &SpkDownloadEntry::Action,
this, &SpkPageDownloads::EntryAction);
NewDownloadTask(id, path);
}
void SpkUi::SpkPageDownloads::DownloadStopped(SpkDownloadMgr::TaskResult status, int id)
{
switch(status)
{
case SpkDownloadMgr::Success:
mEntries[id]->SetStatus(SpkDownloadEntry::ToBeInstalled);
break;
case SpkDownloadMgr::FailCannotCreateFile:
mEntries[id]->SetStatus(SpkDownloadEntry::DownloadFailed,
tr("Cannot create download file. Download failed."));
break;
case SpkDownloadMgr::FailNoVaibleServer:
mEntries[id]->SetStatus(SpkDownloadEntry::DownloadFailed,
tr("Connection unstable or server failure. Download failed."));
break;
case SpkDownloadMgr::FailCancel:
mEntries[id]->SetStatus(SpkDownloadEntry::DownloadFailed,
tr("This download was cancelled."));
break;
case SpkDownloadMgr::Fail:
mEntries[id]->SetStatus(SpkDownloadEntry::DownloadFailed,
tr("Unknown error. Download failed."));
break;
}
if(status == SpkDownloadMgr::Success)
SpkUiMessage::SendDesktopNotification(
tr("App \"%1\" downloaded, and ready to install.").arg(mEntries[id]->GetTaskName()));
else if(status != SpkDownloadMgr::FailCancel)
SpkUiMessage::SendDesktopNotification(
tr("Error occurred downloading \"%1\".").arg(mEntries[id]->GetTaskName()));
// Continue next download task
if(!mWaitingDownloads.isEmpty())
{
auto nextTask = mWaitingDownloads.dequeue();
auto nextEntry = mEntries[nextTask.first];
nextEntry->SetStatus(SpkDownloadEntry::Starting);
mDownloadMgr->StartNewDownload(nextTask.second, nextTask.first);
mCurrentStatus = Waiting;
}
else
{
mCurrentStatus = Idle;
}
}
void SpkUi::SpkPageDownloads::EntryAction(SpkDownloadEntry::EntryAction act)
{
SpkDownloadEntry *entry = static_cast<SpkDownloadEntry*>(sender());
auto id = entry->property("entryId").toInt();
switch(act)
{
case SpkDownloadEntry::AbortDownload:
mDownloadMgr->CancelCurrentDownload(); // Only one task at a time so simply abort download
break;
case SpkDownloadEntry::RetryDownload:
mLayEntries->removeWidget(entry); // Move to list tail
mLayEntries->addWidget(entry);
NewDownloadTask(id, entry->property("path").toString());
entry->SetStatus(SpkDownloadEntry::Waiting);
break;
case SpkDownloadEntry::StartInstall:
switch(PKG->ExecuteInstallation(entry->GetFilePath(), id))
{
case SpkPkgMgrBase::Succeeded:
entry->SetStatus(SpkDownloadEntry::Installing);
break;
case SpkPkgMgrBase::Failed:
entry->SetStatus(SpkDownloadEntry::InstallFailed,
tr("Failed to start installation."));
break;
default: break;
}
break;
case SpkDownloadEntry::RemoveEntry:
mLayEntries->removeWidget(entry);
mEntries.remove(id);
for(auto i = mWaitingDownloads.begin(); i != mWaitingDownloads.end(); i++)
{
if(i->first == id)
{
mWaitingDownloads.erase(i);
break;
}
}
entry->setVisible(false);
entry->deleteLater();
break;
}
}
void SpkUi::SpkPageDownloads::InstallationEnded(int id,
SpkPkgMgrBase::PkgInstallResult result,
int exitCode)
{
if(result == SpkPkgMgrBase::Succeeded)
{
mEntries[id]->SetStatus(SpkDownloadEntry::Installed);
}
else
{
mEntries[id]->SetStatus(SpkDownloadEntry::InstallFailed,
tr("Install failed, exit code: %1.").arg(exitCode));
}
}
void SpkUi::SpkPageDownloads::NewDownloadTask(int id, QString downloadPath)
{
if(mCurrentStatus != Idle)
mWaitingDownloads.enqueue({ id, downloadPath }); // Queue download task for future
else
{
auto nextEntry = mEntries[id];
nextEntry->SetStatus(SpkDownloadEntry::Starting);
mCurrentStatus = Waiting;
if(!mDownloadMgr->StartNewDownload(downloadPath, id)) // Initiate a download task when idle
{
// If fails to start then try next one. Emitting this signal causes
// SpkPageDownloads::DownloadStopped to be activated and thus tries next item in queue
emit mDownloadMgr->DownloadStopped(SpkDownloadMgr::FailNoVaibleServer, id);
}
}
}

View File

@@ -1,50 +0,0 @@
#include <QDesktopServices>
#include "page/spkpagehome.h"
#include "spkabout.h"
#include "gitver.h"
SpkUi::SpkPageHome::SpkPageHome(QWidget *parent) :
SpkPageBase(parent)
{
ui = new Ui::SpkHomepage;
ui->setupUi(this);
SetupUi();
}
void SpkUi::SpkPageHome::LinkActivated(QString s)
{
QDesktopServices::openUrl(QUrl(s));
}
void SpkUi::SpkPageHome::SetupUi()
{
ui->lblIcon->setPixmap(QIcon(":/icons/spark-store.svg").pixmap(QSize(128, 128)));
ui->hlayTitle->setAlignment(Qt::AlignHCenter);
ui->lblVersion->setText(ui->lblVersion->text().arg(GitVer::DescribeTags()));
ui->lblNewAnnouncement->setVisible(false);
// Click event will propagate to the main window and cause the window to move when
// mouse enters the zoom & move detection area. Disable mouse event propagation.
ui->lblAuthor->setAttribute(Qt::WA_NoMousePropagation, true);
ui->widReloadCategory->setVisible(false);
ui->widReloadCategory->setAttribute(Qt::WA_StyledBackground);
ui->lblCategoryErrIcon->setPixmap(QIcon::fromTheme("dialog-error").pixmap(QSize(32, 32)));
connect(ui->lblAuthor, &QLabel::linkActivated,
this, &SpkPageHome::LinkActivated);
connect(ui->btnSubmit, &QPushButton::clicked,
[&](){ LinkActivated("https://upload.deepinos.org"); });
connect(ui->btnFeedback, &QPushButton::clicked,
[&](){ LinkActivated("https://www.deepinos.org/t/spark-feedback"); });
connect(ui->btnDonation, &QPushButton::clicked,
[&](){ LinkActivated("https://spark.deepinos.org.cn/"); });
connect(ui->btnAbout, &QPushButton::clicked,
[&](){ SpkAbout::Show(); });
}

View File

@@ -1,225 +0,0 @@
#include <QtConcurrent/QtConcurrentRun>
#include <QMutexLocker>
#include <QFutureWatcher>
#include "spkutils.h"
#include "page/spkpagesettings.h"
#include "spkmsgbox.h"
namespace SpkUi
{
SpkPageSettings::SpkPageSettings(QWidget *parent) :
SpkPageBase(parent)
{
mMainArea = new QScrollArea();
mMainLay = new QVBoxLayout(this);
mSettingsWidget = new QWidget(this);
ui = new Ui::SpkUiSettings;
ui->setupUi(mSettingsWidget);
mMainLay->addWidget(mMainArea);
mMainArea->setWidget(mSettingsWidget);
mMainArea->setWidgetResizable(true);
CFG->BindField("url/repo", &this->mRepoListUrl,
"https://d.store.deepinos.org.cn/store/server.list");
mBytesDownloads = mBytesResource = -1;
connect(&mFwResourceClean, &QFutureWatcher<void>::finished,
this, &SpkPageSettings::CleanedResource);
connect(&mFwResourceCount, &QFutureWatcher<void>::finished,
this, &SpkPageSettings::CountFinishResource);
connect(&mFwDownloadClean, &QFutureWatcher<void>::finished,
this, &SpkPageSettings::CleanedDownload);
connect(&mFwDownloadCount, &QFutureWatcher<void>::finished,
this, &SpkPageSettings::CountFinishDownload);
connect(ui->btnViewDownloadedContent, &QPushButton::clicked,
this, &SpkPageSettings::on_btnViewDownloadedContent_clicked);
connect(ui->btnViewResourceCache, &QPushButton::clicked,
this, &SpkPageSettings::on_btnViewResourceCache_clicked);
connect(ui->btnCleanDownloadedContent, &QPushButton::clicked,
this, &SpkPageSettings::on_btnCleanDownloadedContent_clicked);
connect(ui->btnCleanResourceCache, &QPushButton::clicked,
this, &SpkPageSettings::on_btnCleanResourceCache_clicked);
SetupUi();
}
SpkPageSettings::~SpkPageSettings()
{
delete mSettingsWidget;
}
void SpkPageSettings::SetupUi()
{
ui->lblSettingsTitle->setObjectName("styConfTitle");
ui->lblCleanup->setObjectName("styConfTitle");
ui->lblAdvanced->setObjectName("styConfTitle");
connect(ui->btnSave, &QPushButton::clicked,
this, &SpkPageSettings::SaveConfiguration);
}
void SpkPageSettings::ReadConfiguration()
{
ui->spnConcurrentResDownloads->setValue(CFG->ReadField("resource/concurrent", 5).toInt());
ui->edtApiUrl->setText(CFG->ReadField("url/api", "").toString());
ui->edtResourceUrl->setText(CFG->ReadField("url/res", "").toString());
ui->edtResourceCachePath->setText(CFG->ReadField("dirs/cache", "").toString());
ui->edtDownloadPath->setText(CFG->ReadField("dirs/download", "").toString());
ui->edtDownloadServers->setPlainText(CFG->ReadField("download/servers", "").toString());
ui->edtQssPath->setText(CFG->ReadField("internal/qss_path", "").toString());
ui->edtRepoListUrl->setText(CFG->ReadField("url/repo", "").toString());
ui->cmbLightDarkTheme->setCurrentIndex(CFG->ReadField("ui/theme", 0).toInt());
}
void SpkPageSettings::SaveConfiguration()
{
CFG->SetSettings("resource/concurrent", ui->spnConcurrentResDownloads->value());
CFG->SetField("url/api", ui->edtApiUrl->text());
CFG->SetField("url/res", ui->edtResourceUrl->text());
CFG->SetSettings("dirs/cache", ui->edtResourceCachePath->text());
CFG->SetField("dirs/download", ui->edtDownloadPath->text());
CFG->SetSettings("internal/qss_path", ui->edtQssPath->text());
CFG->SetField("url/repo", ui->edtRepoListUrl->text());
if(!CFG->SetField("download/servers", ui->edtDownloadServers->toPlainText()))
SpkMsgBox::StaticExec(tr("Cannot change distribution servers.\n"
"There's probably still downloads going on."),
tr("Cannot set distribution server"),
QMessageBox::Warning);
if(!CFG->SetField("ui/theme", ui->cmbLightDarkTheme->currentIndex()))
SpkMsgBox::StaticExec(tr("Auto mode can only be used when DDE plugin is loaded.\n"
"Option change is not applied."),
tr("Cannot set theme mode"),
QMessageBox::Warning);
}
void SpkPageSettings::CountCleaning()
{
ui->lblSizeDownloadedContent->setText(tr("Counting..."));
ui->lblSizeResourceCache->setText(tr("Counting..."));
auto futureDownload = QtConcurrent::run([&]()
{
QDirIterator itr(ui->edtDownloadPath->text().replace('*', QDir::homePath()),
QDirIterator::Subdirectories);
if(mMutDownload.tryLock(0))
{
int64_t size = 0;
while(itr.hasNext())
{
QFile f(itr.next());
size += f.size();
}
mBytesDownloads = size;
mMutDownload.unlock();
}
});
auto futureResource = QtConcurrent::run([&]()
{
QDirIterator itr(ui->edtResourceCachePath->text().replace('*', QDir::homePath()),
QDirIterator::Subdirectories);
if(mMutResource.tryLock((0)))
{
int64_t size = 0;
while(itr.hasNext())
{
QFile f(itr.next());
size += f.size();
}
mBytesResource = size;
mMutResource.unlock();
}
});
mFwDownloadCount.setFuture(futureDownload);
mFwResourceCount.setFuture(futureResource);
}
void SpkPageSettings::CleanedResource()
{
ui->lblSizeResourceCache->setText(tr("Cleaned"));
}
void SpkPageSettings::CleanedDownload()
{
ui->lblSizeDownloadedContent->setText(tr("Cleaned"));
}
void SpkPageSettings::Activated()
{
ReadConfiguration();
CountCleaning();
}
void SpkPageSettings::CountFinishResource()
{
if(mBytesResource >= 0)
ui->lblSizeResourceCache->setText(SpkUtils::BytesToSize(mBytesResource));
}
void SpkPageSettings::CountFinishDownload()
{
if(mBytesDownloads >= 0)
ui->lblSizeDownloadedContent->setText(SpkUtils::BytesToSize(mBytesDownloads));
}
void SpkPageSettings::on_btnViewResourceCache_clicked()
{
QDesktopServices::openUrl(ui->edtResourceCachePath->text().replace('*', QDir::homePath()));
}
void SpkPageSettings::on_btnViewDownloadedContent_clicked()
{
QDesktopServices::openUrl(ui->edtDownloadPath->text().replace('*', QDir::homePath()));
}
void SpkPageSettings::on_btnCleanResourceCache_clicked()
{
ui->lblSizeResourceCache->setText(tr("Cleaning..."));
auto future = QtConcurrent::run([&]()
{
QDirIterator itr(ui->edtResourceCachePath->text().replace('*', QDir::homePath()),
QDirIterator::Subdirectories);
if(mMutDownload.tryLock(0))
{
int64_t size = 0;
while(itr.hasNext())
{
QFile f(itr.next());
f.remove();
}
mBytesDownloads = size;
mMutDownload.unlock();
}
});
mFwResourceClean.setFuture(future);
}
void SpkPageSettings::on_btnCleanDownloadedContent_clicked()
{
ui->lblSizeDownloadedContent->setText(tr("Cleaning..."));
auto futureDownload = QtConcurrent::run([&]()
{
QDirIterator itr(ui->edtDownloadPath->text().replace('*', QDir::homePath()),
QDirIterator::Subdirectories);
if(mMutDownload.tryLock(0))
{
int64_t size = 0;
while(itr.hasNext())
{
QFile f(itr.next());
f.remove();
}
mBytesDownloads = size;
mMutDownload.unlock();
}
});
mFwDownloadClean.setFuture(futureDownload);
}
}

View File

@@ -1,165 +0,0 @@
#include <QApplication>
#include "spkabout.h"
#include "inc/page/spkpageuitest.h"
#include "spkpopup.h"
#include "spkui_general.h"
#include "pkgs/spkpkgmgrbase.h"
SpkUi::SpkPageUiTest::SpkPageUiTest(QWidget *parent) : QSplitter(parent)
{
setObjectName("spk_pg_qsstest");
TextStylesheet = new QTextEdit(this);
TextStylesheet->setObjectName("spk_pg_qsstest_qsstext");
TextStylesheet->setPlainText(SpkUi::CurrentStylesheet);
BtnApply = new QPushButton(this);
BtnApply->setObjectName("spk_pg_qsstest_btnapply");
BtnApply->setText("Apply");
connect(BtnApply, &QPushButton::pressed, this, &SpkPageUiTest::SetStylesheet);
BtnFetch = new QPushButton(this);
BtnFetch->setObjectName("spk_pg_qsstest_btnfetch");
BtnFetch->setText("Fetch Stylesheet");
connect(BtnFetch, &QPushButton::pressed, this, &SpkPageUiTest::FetchStylesheet);
HLayInputBtns = new QHBoxLayout;
HLayInputBtns->setObjectName("spk_pg_qsstest_hlay_inputbtns");
HLayInputBtns->addWidget(BtnFetch);
HLayInputBtns->addWidget(BtnApply);
Btn = new QPushButton(this);
Btn->setObjectName("spk_pg_qsstest_button");
Btn->setText("TestButton");
Chk = new QCheckBox(this);
Chk->setObjectName("spk_pg_qsstest_checkbox");
Chk->setText("CheckBox");
Rad = new QRadioButton(this);
Rad->setObjectName("spk_pg_qsstest_radiobtn");
Rad->setText("RadioButton");
Loading = new SpkLoading(this);
Loading->setObjectName("spk_pg_qsstest_loading");
Loading->start();
Prog = new QProgressBar(this);
Prog->setObjectName("spk_pg_qsstest_prog");
Prog->setValue(65);
Prog->setRange(0, 100);
AppItem = new SpkAppItem(0, this);
AppItem->setObjectName("spk_pg_qsstest_appitem");
AppItem->SetTitle("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
AppItem->SetDescription("Nam vehicula lacus vitae leo fermentum efficitur. "
"Phasellus finibus risus id aliquam pulvinar.");
AppItem->SetIcon(QIcon::fromTheme("dialog-information").pixmap(72, 72));
Detail1 = new SpkDetailEntry; Detail1->SetTitle("Foo"); Detail1->SetValue("1");
Detail2 = new SpkDetailEntry; Detail2->SetTitle("Foo"); Detail2->SetValue("1");
Detail3 = new SpkDetailEntry; Detail3->SetTitle("Foo"); Detail3->SetValue("1");
DetailsLay = new SpkStretchLayout;
DetailsLay->addWidget(Detail1);
DetailsLay->addWidget(Detail2);
DetailsLay->addWidget(Detail3);
DetailsWidget = new QWidget;
DetailsWidget->setLayout(DetailsLay);
PopupText = new QLineEdit(this);
PopupText->setObjectName("spk_pg_qsstest_poptext");
PopupText->setText("Hello, world");
ShowPopup = new QPushButton(this);
ShowPopup->setText("Show Popup");
connect(ShowPopup, &QPushButton::clicked, this, &SpkPageUiTest::ShowPopupSlot);
ShowAbout = new QPushButton(this);
ShowAbout->setText("Show About Dialog");
connect(ShowAbout, &QPushButton::clicked, [](){ SpkAbout::Show(); });
ShowPkgmgr = new QPushButton(this);
ShowPkgmgr->setText("Show Install Menu");
connect(ShowPkgmgr, &QPushButton::clicked, [=](){ SpkPkgMgrBase::Instance()->ExecuteInstallation(PopupText->text(), 0); });
SlideV = new QSlider(this);
SlideV->setObjectName("spk_pg_qsstest_slider_v");
SlideV->setOrientation(Qt::Vertical);
SlideV->setMaximum(1000);
SlideV->setMinimum(0);
SlideH = new QSlider(this);
SlideH->setObjectName("spk_pg_qsstest_slider_h");
SlideH->setOrientation(Qt::Horizontal);
SlideH->setMaximum(1000);
SlideH->setMinimum(0);
IconBtn = new SpkIconButton(this);
IconBtn->setObjectName("spk_pg_qsstest_iconbtn");
IconBtn->SetIcon(QIcon(":/icons/settings.svg"), QSize{ 16, 16 });
VLayTestWidgets = new QVBoxLayout;
VLayTestWidgets->setObjectName("spk_pg_qsstest_vlay_btn");
VLayTestWidgets->addWidget(Btn);
VLayTestWidgets->addWidget(Chk);
VLayTestWidgets->addWidget(Rad);
VLayTestWidgets->addWidget(IconBtn);
VLayTestWidgets->addWidget(Loading);
VLayTestWidgets->addWidget(PopupText);
VLayTestWidgets->addWidget(ShowPopup);
VLayTestWidgets->addWidget(ShowAbout);
VLayTestWidgets->addWidget(ShowPkgmgr);
VLayTestWidgets->addWidget(AppItem);
VLayTestWidgets->addWidget(DetailsWidget);
Group = new QGroupBox(this);
Group->setObjectName("spk_pg_qsstest_groupbox");
Group->setTitle("GroupBox");
Group->setLayout(VLayTestWidgets);
VLayInput = new QVBoxLayout;
VLayInput->setObjectName("spk_pg_qsstest_inputlay");
VLayInput->addWidget(TextStylesheet);
VLayInput->addLayout(HLayInputBtns);
VLayWidgets = new QVBoxLayout;
VLayWidgets->setObjectName("spk_pg_qsstest_widgetlay");
VLayWidgets->addWidget(Group);
VLayWidgets->addWidget(SlideH);
VLayWidgets->addWidget(Prog);
HLay4Slider = new QHBoxLayout;
HLay4Slider->setObjectName("spk_pg_qsstest_hlay_for_slider");
HLay4Slider->addLayout(VLayWidgets);
HLay4Slider->addWidget(SlideV);
WidL = new QWidget(this);
WidL->setObjectName("spk_pg_qsstest_widleft");
WidL->setLayout(HLay4Slider);
WidL->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
WidR = new QWidget(this);
WidR->setObjectName("spk_pg_qsstest_widright");
WidR->setLayout(VLayInput);
addWidget(WidL);
addWidget(WidR);
}
void SpkUi::SpkPageUiTest::SetStylesheet()
{
qApp->setStyleSheet(TextStylesheet->toPlainText());
}
void SpkUi::SpkPageUiTest::FetchStylesheet()
{
TextStylesheet->setPlainText(SpkUi::CurrentStylesheet);
}
void SpkUi::SpkPageUiTest::ShowPopupSlot()
{
SpkUi::Popup->Show(PopupText->text());
}

View File

@@ -1,361 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SpkHomepage</class>
<widget class="QWidget" name="SpkHomepage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>648</width>
<height>554</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="hlayTitle">
<item>
<widget class="QLabel" name="lblIcon">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>{spark-store-icon}</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblTitle">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>40</pointsize>
</font>
</property>
<property name="text">
<string>Spark Store</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="lblAuthor">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Brought to you by &lt;a href=&quot;https://spark-app.store&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Spark Project&lt;/span&gt;&lt;/a&gt;, an open source software project.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>50</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QGridLayout" name="vlayBtns">
<item row="1" column="1">
<widget class="SpkNotifyDot" name="lblNewAnnouncement">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblAboutProject">
<property name="text">
<string>About this project...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="btnFeedback">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Feedback</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QPushButton" name="btnDonation">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Donation</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="btnAnnouncements">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Announcements</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="btnSubmit">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Submit Software</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QWidget" name="widReloadCategory" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="lblCategoryErrIcon">
<property name="text">
<string>{error-icon}</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lblCategoryErr">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Category failed to load. Click the button to retry.</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnReloadCategory">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Reload</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lblVersion">
<property name="text">
<string>Version %1</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnAbout">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>About</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>SpkNotifyDot</class>
<extends>QLabel</extends>
<header>spknotifydot.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@@ -1,472 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SpkUiSettings</class>
<widget class="QWidget" name="SpkUiSettings">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>581</width>
<height>896</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="layTitle">
<item>
<widget class="QLabel" name="lblSettingsTitle">
<property name="text">
<string>Spark Store Settings</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="btnSave">
<property name="text">
<string>Apply</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="lineTitle">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblRestartHint">
<property name="text">
<string>Configuration entries marked &quot;*&quot; will only take effect after restarting Spark Store.</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="laySettings">
<item row="5" column="0">
<widget class="QLabel" name="lblApiUrl">
<property name="text">
<string>Store API URL</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="lblResourceUrl">
<property name="text">
<string>Store resource URL</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="edtDownloadPath">
<property name="spkcfg_key" stdset="0">
<string notr="true">dirs/download</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="lblResourceCachePath">
<property name="text">
<string>Resource cache path*</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblAptRepo">
<property name="text">
<string>APT Repository</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="edtResourceUrl">
<property name="spkcfg_key" stdset="0">
<string>url/res</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="layAptRepo">
<property name="spacing">
<number>4</number>
</property>
<item>
<widget class="QComboBox" name="cmbAptRepo">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="spkcfg_key" stdset="0">
<string notr="true">pkgmgr/apt_repo</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnFetchAptRepo">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Fetch all</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnApplyAptRepo">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Apply</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblLightDarkTheme">
<property name="text">
<string>Light/dark theme</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="edtResourceCachePath">
<property name="spkcfg_key" stdset="0">
<string>dirs/cache</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPlainTextEdit" name="edtDownloadServers">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>150</height>
</size>
</property>
<property name="baseSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="spkcfg_key" stdset="0">
<string notr="true">download/servers</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cmbLightDarkTheme">
<property name="currentIndex">
<number>3</number>
</property>
<property name="frame">
<bool>true</bool>
</property>
<property name="spkcfg_key" stdset="0">
<string notr="true">gui/theme</string>
</property>
<item>
<property name="text">
<string>Auto (DDE only)</string>
</property>
</item>
<item>
<property name="text">
<string>Always Light</string>
</property>
</item>
<item>
<property name="text">
<string>Always Dark</string>
</property>
</item>
<item>
<property name="text">
<string>Manual</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblDownloadPath">
<property name="toolTip">
<string/>
</property>
<property name="toolTipDuration">
<number>-1</number>
</property>
<property name="text">
<string>Download path*</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblDownloadServers">
<property name="toolTip">
<string>Server addresses are separated with two semicolons (;;).</string>
</property>
<property name="toolTipDuration">
<number>1</number>
</property>
<property name="text">
<string>Download servers</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="edtApiUrl">
<property name="spkcfg_key" stdset="0">
<string>url/api</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="lblRepoListUrl">
<property name="text">
<string>APT Repository Source</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="edtRepoListUrl"/>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="lblHomeNotice">
<property name="text">
<string>Note: character &quot;*&quot; in paths are replaced with the current user's home path.</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblCleanup">
<property name="text">
<string>Cache and Downloads cleanup</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblCleanupDescription">
<property name="text">
<string>Spark Store caches resources such as app icons and screenshots locally. If you want to free up space, you can clear them here or delete them manually.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="layCleanup">
<item row="1" column="3">
<widget class="QPushButton" name="btnCleanDownloadedContent">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="btnViewResourceCache">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>View</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="btnViewDownloadedContent">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>View</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblDownloadedContent">
<property name="text">
<string>Downloaded content</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblResourceCache">
<property name="text">
<string>Resource cache</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="btnCleanResourceCache">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lblSizeResourceCache">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lblSizeDownloadedContent">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="lblAdvanced">
<property name="text">
<string>Advanced</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblAdvancedDescription">
<property name="text">
<string>Advanced settings are low-level configurations that can affect usability and are not meant to be modified by average users.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="layAdvanced">
<item row="0" column="0">
<widget class="QLabel" name="lblConcurrentResDownloads">
<property name="text">
<string>Concurrent resource downloads*</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spnConcurrentResDownloads">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>6</number>
</property>
<property name="value">
<number>5</number>
</property>
<property name="spkcfg_key" stdset="0">
<string>resource/concurrent</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblQssPath">
<property name="text">
<string>Default Qt Style Sheet template*</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="edtQssPath">
<property name="spkcfg_key" stdset="0">
<string>internal/qss_path</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -1,133 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
/*
* Slight modifications has been done to the code to make it fit into the project.
*/
#include "qt/elidedlabel.h"
#include <QPainter>
#include <QSizePolicy>
#include <QTextLayout>
//! [0]
ElidedLabel::ElidedLabel(const QString &text, QWidget *parent)
: QFrame(parent)
, elided(false)
, content(text)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
}
//! [0]
//! [1]
void ElidedLabel::setText(const QString &newText)
{
content = newText;
update();
}
//! [1]
//! [2]
void ElidedLabel::paintEvent(QPaintEvent *event)
{
QFrame::paintEvent(event);
QPainter painter(this);
QFontMetrics fontMetrics = painter.fontMetrics();
bool didElide = false;
int lineSpacing = fontMetrics.lineSpacing();
int y = 0;
QTextLayout textLayout(content, painter.font());
textLayout.beginLayout();
forever {
QTextLine line = textLayout.createLine();
if (!line.isValid())
break;
line.setLineWidth(width());
int nextLineY = y + lineSpacing;
if (height() >= nextLineY + lineSpacing) {
line.draw(&painter, QPoint(0, y));
y = nextLineY;
//! [2]
//! [3]
} else {
QString lastLine = content.mid(line.textStart());
QString elidedLastLine = fontMetrics.elidedText(lastLine, Qt::ElideRight, width());
painter.drawText(QPoint(0, y + fontMetrics.ascent()), elidedLastLine);
line = textLayout.createLine();
didElide = line.isValid();
break;
}
}
textLayout.endLayout();
//! [3]
//! [4]
if (didElide != elided) {
elided = didElide;
emit elisionChanged(didElide);
}
}
ElidedLabel::ElidedLabel(QWidget *parent)
: QFrame(parent)
, elided(false)
, content("")
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
}
//! [4]

View File

@@ -1,73 +0,0 @@
#include <QDesktopServices>
#include "spkabout.h"
#include "gitver.h"
SpkAbout::SpkAbout(QWidget *parent) : SpkDialog(parent)
{
setWindowModality(Qt::ApplicationModal);
// mDialogWidget->setMaximumWidth(600);
mDialogWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
setFixedSize(550, 450);
SetResizable(false); // Do you like the dilemma of using self created widget?
mIconLay = new QHBoxLayout;
mSpkVersion = new QLabel;
mSpkVersion->setText(tr("<h1>Spark Store</h1>"
"<h3>Version <a href=\"https://www.spark-app.store\">%1</a></h3>"
"<t>Built on %2 %3</t>")
.arg(GitVer::DescribeTags(),
__DATE__, __TIME__));
connect(mSpkVersion, &QLabel::linkActivated,
[](const QString &link){ QDesktopServices::openUrl(link); });
mSpkIcon = new QLabel;
mSpkIcon->setPixmap(QIcon(":/icons/spark-store.svg").pixmap(QSize(128, 128)));
auto description = tr(
"Spark Store was started when Chinese home-grown Linux operating systems "
"had initially hit the market. Because the Linux desktop ecosystem is not "
"good enough at the time being, volunteers built this small App Store in "
"the hope that users can get useful applications faster.\n\n"
"Right now we are not just a Chinese group. We are discovering our way into "
"more Debian-based Linux OSes, and build a real community software repository "
"for users around the world.");
mDescriptionText = new QLabel;
mDescriptionText->setObjectName("spk_about_desc");
mDescriptionText->setWordWrap(true);
mDescriptionText->setText(description);
mIconLay->addStretch(3);
mIconLay->addWidget(mSpkIcon);
mIconLay->addStretch(1);
mIconLay->addWidget(mSpkVersion);
mIconLay->addStretch(3);
mIconLay->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
AddStretch();
AddLayout(mIconLay);
AddSpacing(18);
AddWidget(mDescriptionText);
AddStretch();
SetMargin(18, 0, 18, 18);
GetTitleBar()->SetOperationButton(SpkTitleBar::OperationButton::Close);
GetTitleBar()->SetTitle(tr("About Spark Store"));
}
SpkAbout::~SpkAbout()
{
// delete mIconLay;
// delete mDescriptionText;
}
void SpkAbout::Show()
{
SpkAbout *b = new SpkAbout;
b->Exec();
delete b;
}

View File

@@ -1,63 +0,0 @@
#include <QPainter>
#include <QStyleOption>
#include "spkappitem.h"
#include "qt/elidedlabel.h"
const QSize SpkAppItem::IconSize_;
SpkAppItem::SpkAppItem(int appId, QWidget *parent) : QWidget(parent)
{
mAppId = appId;
mMainLay = new QHBoxLayout(this);
mLayText = new QVBoxLayout;
mIcon = new QLabel;
mIcon->setFixedSize(IconSize, IconSize);
mIcon->setAutoFillBackground(false);
// NOTE: Make mTitle ElidedTitle too?
mTitle = new QLabel;
mTitle->setWordWrap(false);
mTitle->setObjectName("styAppItmTitle");
mTitle->setAutoFillBackground(true);
mDescription = new ElidedLabel;
// mDescription->setWordWrap(true); // Commented out since ElidedLabel lacks of these methods
mDescription->setObjectName("styAppItmDesc");
mDescription->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
// mDescription->setAlignment(Qt::AlignTop | Qt::AlignLeft);
// mDescription->setAutoFillBackground(true);
mLayText->addWidget(mTitle);
mLayText->addWidget(mDescription);
mLayText->setAlignment(Qt::AlignTop);
mMainLay->setMargin(5);
mMainLay->addWidget(mIcon);
mMainLay->addLayout(mLayText);
setMinimumHeight(82);
setMaximumHeight(82);
setMinimumWidth(300);
}
void SpkAppItem::paintEvent(QPaintEvent *e)
{
Q_UNUSED(e)
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
void SpkAppItem::mousePressEvent(QMouseEvent *e)
{
mPressCond = true;
}
void SpkAppItem::mouseReleaseEvent(QMouseEvent *e)
{
if(mPressCond)
emit clicked(mAppId);
mPressCond = false;
}

View File

@@ -1,61 +0,0 @@
#include "spkmainwindow.h"
namespace SpkUi
{
SpkCategorySelector::SpkCategorySelector(QWidget *parent) : QWidget(parent)
{
mBtnLayout = new QVBoxLayout(this);
mGroup = new QButtonGroup(this);
}
void SpkCategorySelector::AddButton(QString aBtnText, int aCategoryId, QPixmap *aBtnIcon)
{
auto btn = new SpkCategoryButton(this);
btn->SetText(aBtnText);
if(aBtnIcon)
btn->SetIcon(*aBtnIcon);
mBtnList.append(btn);
mGroup->addButton(btn, aCategoryId ? aCategoryId : -1);
mBtnLayout->addWidget(btn);
}
void SpkCategorySelector::DeleteAllButtons() // TODO: UNTESTED
{
foreach (auto i, mBtnList)
{
mBtnLayout->removeWidget(i);
mGroup->removeButton(i);
i->deleteLater();
}
mBtnList.clear();
}
SpkCategoryButton::SpkCategoryButton(QWidget *parent) : QPushButton(parent)
{
mIcon = new QLabel(this);
mIcon->setObjectName("spk_categorybtn_label");
mText = new QLabel(this);
mText->setObjectName("spk_categorybtn_text");
mLayout = new QHBoxLayout;
mLayout->setObjectName("spk_categorybtn_lay");
mLayout->addSpacing(Spacing);
mLayout->addWidget(mIcon);
mLayout->addSpacing(Spacing);
mLayout->addStretch();
mLayout->addWidget(mText);
mLayout->addStretch();
mLayout->addSpacing(Spacing);
setLayout(mLayout);
}
void SpkCategoryButton::SetIcon(QPixmap aImage)
{
mIcon->setPixmap(aImage);
}
void SpkCategoryButton::SetText(QString aText)
{
mText->setText(aText);
}
}

View File

@@ -1,115 +0,0 @@
#include "spkdialog.h"
#include <QEventLoop>
SpkDialog::SpkDialog(QWidget *parent) : SpkWindow(parent)
{
mDialogWidget = new QWidget;
mMainVLay = new QVBoxLayout;
mWidgetsVLay = new QVBoxLayout();
mBtnLay = new QHBoxLayout();
mBtnGroup = new QButtonGroup(this);
mMainVLay->addLayout(mWidgetsVLay);
mMainVLay->addLayout(mBtnLay);
mBtnLay->setAlignment(Qt::AlignCenter);
SetCentralWidget(mDialogWidget);
mDialogWidget->setLayout(mMainVLay);
// idClicked is not available on platforms we support, shouldn't change it
connect(mBtnGroup, QOverload<int>::of(&QButtonGroup::buttonClicked),
this, &SpkDialog::ButtonPressed);
connect(this, &SpkWindow::Closed, this, &SpkDialog::ForceClose);
}
SpkDialog::~SpkDialog()
{
auto itp = mParentsList.begin();
for(auto itw = mWidgetsList.begin(); itw != mWidgetsList.end(); itw++)
{
(*itw)->setParent(*(itp++));// We shall never take the ownership of these widgets
}
delete mDialogWidget;
}
void SpkDialog::AddButton(QString text, SpkUi::SpkButtonStyle style)
{
auto b = new QPushButton();
b->setText(text);
b->setMinimumWidth(100);
b->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
switch(style)
{
case SpkUi::SpkButtonStyle::Recommend:
b->setObjectName("sty_recommendbtn");
break;
case SpkUi::SpkButtonStyle::Warn:
b->setObjectName("sty_warnbtn");
break;
default:
break;
}
mBtnLay->addWidget(b);
mBtnGroup->addButton(b);
}
void SpkDialog::AddWidget(QWidget *w)
{
// Adding a widget does not take the ownership.
mWidgetsVLay->addWidget(w);
mWidgetsList << w;
mParentsList << w->parentWidget();
}
void SpkDialog::AddLayout(QLayout *w)
{
mWidgetsVLay->addLayout(w);
mWidgetsList << w;
mParentsList << w->parentWidget();
}
void SpkDialog::AddSpacing(int a)
{
mWidgetsVLay->addSpacing(a);
}
void SpkDialog::AddStretch(int a)
{
mWidgetsVLay->addStretch(a);
}
void SpkDialog::SetMargin(int a)
{
mWidgetsVLay->setMargin(a);
}
int SpkDialog::Exec()
{
QEventLoop loop;
connect(this, &SpkDialog::ExitEventLoop, &loop, &QEventLoop::exit);
connect(this, &SpkDialog::CloseWindow, this, &QMainWindow::close);
show();
return loop.exec();
}
void SpkDialog::ButtonPressed(int aBtnId)
{
disconnect(this, &SpkWindow::Closed, this, &SpkDialog::ForceClose);
emit ExitEventLoop(-aBtnId - 2);
emit CloseWindow();
}
void SpkDialog::ForceClose()
{
disconnect(this, &SpkDialog::CloseWindow, this, &QMainWindow::close);
emit ExitEventLoop(-1);
}
void SpkDialog::SetMargin(int left, int top, int right, int bottom)
{
mWidgetsVLay->setContentsMargins(left, top, right, bottom);
}

View File

@@ -1,201 +0,0 @@

#include "spkdownloadentry.h"
#include "spklogging.h"
#include "spkutils.h"
#include <QDebug>
constexpr QSize SpkDownloadEntry::IconSize;
SpkDownloadEntry::SpkDownloadEntry(QWidget *parent)
{
mIcon = new QLabel;
mAppName = new ElidedLabel;
mMessage = new QLabel;
mProgress = new QProgressBar;
mLoading = new SpkLoading;
mBtnDelete = new QPushButton;
mBtnActions = new QPushButton;
mLayInfo = new QVBoxLayout;
mLayMsgs = new QHBoxLayout;
mLayMain = new QHBoxLayout;
mLoading->setVisible(false);
mIcon->setFixedSize(IconSize);
mProgress->setRange(0, 1000);
mLayMsgs->addWidget(mAppName);
mLayMsgs->addStretch();
mLayMsgs->addWidget(mMessage);
mLayInfo->addLayout(mLayMsgs);
mLayInfo->addWidget(mProgress);
mLayInfo->setAlignment(Qt::AlignVCenter);
mLayMain->addWidget(mIcon);
mLayMain->addLayout(mLayInfo);
mLayMain->addWidget(mLoading);
mLayMain->addWidget(mBtnActions);
mLayMain->addWidget(mBtnDelete);
setLayout(mLayMain);
connect(mBtnActions, &QPushButton::clicked, this, &SpkDownloadEntry::ActionButton);
connect(mBtnDelete, &QPushButton::clicked, this, &SpkDownloadEntry::DeleteButton);
mStatus = Invalid;
mLastReportTime = QTime::currentTime();
}
SpkDownloadEntry::~SpkDownloadEntry()
{
// TODO
}
void SpkDownloadEntry::SetTotalBytes(qint64 total)
{
mTotalBytes = total;
mReadableTotalSize = SpkUtils::BytesToSize(total);
mLastReportTime = QTime::currentTime();
}
void SpkDownloadEntry::SetBasicInfo(QString name, QPixmap icon, QString filePath)
{
mAppName->setText(name);
mIcon->setPixmap(icon.scaled(IconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
mFilePath = filePath;
}
void SpkDownloadEntry::SetStatus(DownloadEntryStatus status, QString msg)
{
mStatus = status;
switch(status)
{
case Waiting:
mMessage->setText(tr("Waiting for download"));
mProgress->setVisible(false);
mBtnActions->setVisible(false);
mBtnDelete->setVisible(true);
mBtnDelete->setText(tr("Cancel"));
break;
case Starting:
mMessage->setText(tr("Starting download"));
mBtnDelete->setVisible(false);
break;
case Downloading:
mMessage->setText(tr(""));
mProgress->setVisible(true);
mBtnActions->setVisible(false);
mBtnDelete->setVisible(true);
break;
case DownloadFailed:
mMessage->setText(msg);
mProgress->setVisible(false);
mBtnActions->setVisible(true);
mBtnActions->setText(tr("Retry"));
break;
case ToBeInstalled:
mMessage->setText(tr("Download Finished"));
mProgress->setVisible(false);
mBtnActions->setVisible(true);
mBtnDelete->setVisible(false);
mBtnActions->setText(tr("Install"));
break;
case Installing:
mMessage->setText("");
mProgress->setVisible(false);
mBtnActions->setVisible(false);
mBtnDelete->setVisible(false);
mLoading->setVisible(true);
mLoading->Begin();
break;
case Installed:
mMessage->setText(tr("Installed"));
mLoading->End();
mLoading->setVisible(false);
mBtnDelete->setVisible(true);
mBtnDelete->setText(tr("Delete"));
break;
case InstallFailed:
mMessage->setText(msg.isEmpty() ? tr("Install Failed") : msg);
mLoading->End();
mLoading->setVisible(false);
mBtnActions->setVisible(true);
mBtnActions->setText(tr("Install"));
mBtnDelete->setVisible(true);
mBtnDelete->setText(tr("Cancel"));
break;
case Invalid:
break;
}
}
void SpkDownloadEntry::Progress(qint64 bytes)
{
auto now = QTime::currentTime();
auto msecDiff = mLastReportTime.msecsTo(now);
if(msecDiff != 0)
{
auto bytesPerSec = (bytes - mDownloadedBytes) / (msecDiff / 1000.0);
qDebug() << "Bytes" << bytes - mDownloadedBytes
<< "MsDiff" << msecDiff / 1000.0
<< "Bytes-Per-Seg" << bytesPerSec;
auto speedSize = SpkUtils::BytesToSize(static_cast<size_t>(bytesPerSec));
mMessage->setText(QString("%1/%2(%3/s)")
.arg(SpkUtils::BytesToSize(bytes), mReadableTotalSize, speedSize));
}
mDownloadedBytes = bytes;
mProgress->setValue(static_cast<int>(((double)bytes) / mTotalBytes * 1000));
mLastReportTime = now;
}
void SpkDownloadEntry::ActionButton()
{
switch(mStatus)
{
case DownloadFailed:
emit Action(RetryDownload);
break;
case ToBeInstalled:
case InstallFailed:
emit Action(StartInstall);
break;
default:
break;
}
}
void SpkDownloadEntry::DeleteButton()
{
switch(mStatus)
{
case Waiting:
case DownloadFailed:
case Installed:
case InstallFailed:
case ToBeInstalled:
emit Action(RemoveEntry);
break;
case Downloading:
emit Action(AbortDownload);
break;
default:
break;
}
}

View File

@@ -1,56 +0,0 @@
#include <QMargins>
#include <QPainter>
#include <QVariant>
#include <QDebug>
#include "spkiconbutton.h"
SpkIconButton::SpkIconButton(QWidget *parent) :
QPushButton(parent)
{
setFocusPolicy(Qt::NoFocus);
}
void SpkIconButton::SetIcon(QIcon i, QSize s)
{
mPmapPaintedIcon = i.pixmap(s);
setFixedSize((mPmapSize = s.grownBy(QMargins(IconMargin, IconMargin, IconMargin, IconMargin))));
}
void SpkIconButton::SetIcon(QPixmap m)
{
mPmapPaintedIcon = m;
setFixedSize((mPmapSize = m.size().grownBy(QMargins(IconMargin, IconMargin,
IconMargin, IconMargin))));
}
void SpkIconButton::SetIconSize(QSize s)
{
setFixedSize((mPmapSize = s.grownBy(QMargins(IconMargin, IconMargin, IconMargin, IconMargin))));
}
void SpkIconButton::paintEvent(QPaintEvent *e)
{
QPushButton::paintEvent(e);
// Paint the icon mask
QPainter p(this), p1(&mPmapPaintedIcon);
QBrush b(Qt::SolidPattern);
p.drawPixmap(IconMargin, IconMargin, mPmapPaintedIcon);
if(isDown() || isChecked())
{
b.setColor(SpkUi::ColorBtnMaskSelected);
}
else
{
b.setColor(SpkUi::ColorBtnMaskUnselected);
}
p1.setCompositionMode(QPainter::CompositionMode_SourceIn);
p1.fillRect(0, 0, mPmapSize.width(), mPmapSize.height(), b);
p1.end();
p.drawPixmap(IconMargin, IconMargin, mPmapPaintedIcon);
p.end();
}

View File

@@ -1,120 +0,0 @@
#include "spktitlebar.h"
#include "spkimgviewer.h"
#include "spkui_general.h"
#include <QDebug>
#include <QFocusEvent>
#include <QGuiApplication>
#include <QScreen>
SpkImgViewer::SpkImgViewer(QWidget *parent) :
SpkWindow(parent),
mIconLoading(QIcon(":/icons/loading-icon.svg").pixmap({ 72, 72 }))
{
mImgIndict = new QLabel;
mImgIndict->setText("%1/%2");
mBtnPrev = new QPushButton;
mBtnPrev->setText("<");
mBtnNext = new QPushButton;
mBtnNext->setText(">");
auto titleBar = GetTitleBar();
titleBar->SetUseIcon(false);
titleBar->SetTitle(tr("Image Preview"));
titleBar->SetOperationButton(SpkTitleBar::OperationButton::Close);
auto lay = titleBar->GetUserSpace();
lay->setAlignment(Qt::AlignVCenter);
lay->addStretch();
lay->addWidget(mBtnPrev);
lay->addWidget(mImgIndict);
lay->addWidget(mBtnNext);
lay->addStretch();
mImgArea = new QScrollArea;
mImgArea->setWidgetResizable(true);
mImgArea->setContentsMargins(10, 10, 10, 10);
mImgShow = new ImgView;
mImgArea->setWidget(mImgShow);
auto w = new QWidget;
auto l = new QHBoxLayout;
l->setContentsMargins(10, 10, 10, 10);
l->addWidget(mImgArea);
w->setLayout(l);
SetCentralWidget(w);
connect(mBtnPrev, &QPushButton::clicked,
[&](){ if(mCurrentImg > 0) { SwitchToImage(--mCurrentImg); } });
connect(mBtnNext, &QPushButton::clicked,
[&](){ if(mCurrentImg < mTotalImg) { SwitchToImage(++mCurrentImg); } });
}
void SpkImgViewer::ShowWithImage(int idx)
{
SwitchToImage(idx);
show();
}
void SpkImgViewer::Clear()
{
mImgMap.clear();
mImgShow->SetPixmap(nullptr);
mCurrentImg = 1;
}
void SpkImgViewer::SetPixmap(int idx, QPixmap *img)
{
mImgMap[idx] = img;
if(mCurrentImg == idx)
{
mImgShow->SetPixmap(img);
}
ResizeToFitImageSize(img->size());
}
void SpkImgViewer::SwitchToImage(int idx)
{
auto img = mImgMap.value(idx, nullptr);
mCurrentImg = idx;
mImgShow->SetPixmap(img ? img : &mIconLoading);
if(img)
ResizeToFitImageSize(img->size());
if(idx == 1)
{
mBtnPrev->setEnabled(false);
mBtnNext->setEnabled(true);
}
else if(idx == mTotalImg)
{
mBtnPrev->setEnabled(true);
mBtnNext->setEnabled(false);
}
else
{
mBtnPrev->setEnabled(true);
mBtnNext->setEnabled(true);
}
mImgIndict->setText(QString("%1/%2").arg(mCurrentImg).arg(mTotalImg));
}
bool SpkImgViewer::event(QEvent *e)
{
if(e->type() == QEvent::WindowDeactivate)
close();
return SpkWindow::event(e);
}
void SpkImgViewer::ResizeToFitImageSize(QSize s)
{
auto targetSize = s;
targetSize.rheight() += SpkTitleBar::Height;
targetSize = s.grownBy(QMargins(10, 10, 10, 10));
targetSize = targetSize.boundedTo(SpkUi::PrimaryScreenSize * 0.8);
resize(targetSize);
targetSize /= 2;
auto targetPos = SpkUi::PrimaryScreenSize / 2 - targetSize;
move(targetPos.width(), targetPos.height());
}

View File

@@ -1,79 +0,0 @@
#include <QPaintEvent>
#include <QPainter>
#include "spkloading.h"
#include "spkui_general.h"
SpkLoading::SpkLoading(QWidget *parent) : QFrame(parent)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
mAnimTimer = new QTimeLine(400, this);
mAnimTimer->setFrameRange(10, 30);
mAnimTimer->setEasingCurve(QEasingCurve::InCubic);
for(int i = 0; i < 5; i++)
mSizeList.append(20);
connect(mAnimTimer, &QTimeLine::frameChanged, this, &SpkLoading::timer);
connect(mAnimTimer, &QTimeLine::finished, this, &SpkLoading::loop);
}
void SpkLoading::paintEvent(QPaintEvent *e)
{
QPainter p(this);
QPen pen(Qt::NoPen);
QBrush b(SpkUi::CurrentColorSet[SpkUi::Qss::AccentColor], Qt::SolidPattern);
p.setBrush(b);
p.setPen(pen);
p.setRenderHint(QPainter::Antialiasing);
dx = width() / 2 - dh * 2;
dy = height() / 2;
double r;
for(int i = 0; i < 5; i++)
{
r = dh * mSizeList[i] / 80;
p.drawEllipse({ dx, dy }, r, r);
dx += dh;
}
e->accept();
}
void SpkLoading::resizeEvent(QResizeEvent *e)
{
// Calculate size of drawing space
if(mUserHeight != 0 && mUserHeight * 5 <= e->size().width())
{
dw = 5 * mUserHeight;
dh = mUserHeight;
return;
}
dh = e->size().height();
if(width() < dh * 5)
{
dw = e->size().width();
dh = dw / 5;
}
else
dw = dh * 5;
}
void SpkLoading::timer(int s)
{
for(int i = 4; i > 0; i--)
mSizeList[i] = mSizeList[i - 1];
mSizeList[0] = s;
update();
}
void SpkLoading::loop()
{
mAnimTimer->setDirection(mAnimTimer->direction() == QTimeLine::Forward ?
QTimeLine::Backward : QTimeLine::Forward);
mAnimTimer->start();
}
void SpkLoading::reset()
{
for(int i = 0; i < 5; i++)
mSizeList[i] = 20;
update();
}

View File

@@ -1,570 +0,0 @@
#include <QGuiApplication>
#include <QScreen>
#include <QJsonArray>
#include "spkmsgbox.h"
#include "spkmainwindow.h"
#include "spklogging.h"
#include "spkutils.h"
#include "spkuimsg.h"
SpkMainWindow::SpkMainWindow(QWidget *parent) : SpkWindow(parent)
{
ui = new SpkUi::SpkMainWidget(this);
Initialize();
SetCentralWidget(ui);
RefreshCategoryData();
GetTitleBar()->SetTitle("");
GetTitleBar()->SetUseIcon(true);
GetTitleBar()->SetIcon(QIcon(":/icons/spark-store.svg").pixmap({ 40, 40 }));
GetTitleBar()->setObjectName("spk_mw_titlebar");
GetTitleBar()->setAttribute(Qt::WA_StyledBackground);
auto size = QGuiApplication::primaryScreen()->size() * 0.5;
size = size.expandedTo(QSize(900, 600));
resize(size);
auto pos = QGuiApplication::primaryScreen()->size() * 0.5 - size * 0.5;
move(pos.width(), pos.height());
}
void SpkMainWindow::SwitchDayNightTheme()
{
if(SpkUi::CurrentStyle == SpkUi::Dark)
SpkUi::SetGlobalStyle(SpkUi::Light, true);
else
SpkUi::SetGlobalStyle(SpkUi::Dark, true);
ReloadThemedUiIcons();
}
void SpkMainWindow::SwitchToPage(SpkUi::SpkStackedPages page)
{
if(mCurrentPage != page)
{
ui->Pager->setCurrentIndex(int(page));
mCurrentPage = page;
// If the page is a SpkPageBase (with a resource context), activate it for resource acquisition
auto tryActivate = qobject_cast<SpkPageBase *>(ui->Pager->currentWidget());
if(tryActivate)
tryActivate->Activated();
ui->BtnBack->setVisible(page == SpkUi::SpkStackedPages::PgAppDetails);
ui->BtnBack->setEnabled(true);
}
}
void SpkMainWindow::PopulateCategories(QJsonArray aCategoryData)
{
using SpkUi::SpkSidebarSelector;
QTreeWidgetItem *catg;
if(ui->CategoryParentItem->childCount()) // Clear all existing children if there is any
foreach(auto &i, ui->CategoryParentItem->takeChildren())
delete i;
foreach(auto i, aCategoryData)
{
if(i.isObject())
{
auto j = i.toObject();
double typeId;
QString typeName;
if(j.contains("type_id") && j.value("type_id").isDouble())
typeId = j.value("type_id").toDouble();
else goto WRONG_CATEGORY;
if(j.contains("type_name") && j.value("type_name").isString())
typeName = j.value("type_name").toString();
else goto WRONG_CATEGORY;
catg = new QTreeWidgetItem(ui->CategoryParentItem, QStringList(typeName));
catg->setData(0, SpkSidebarSelector::RoleItemIsCategory, true);
catg->setData(0, SpkSidebarSelector::RoleItemCategoryPageId, typeId);
continue;
WRONG_CATEGORY:;
}
ui->CategoryParentItem->setExpanded(true);
}
}
void SpkMainWindow::RefreshCategoryData()
{
// Asynchronously call category API
using namespace SpkUtils;
VerifySingleRequest(mCategoryGetReply);
mCategoryGetReply = STORE->SendApiRequest("type/get_type_list");
DeleteReplyLater(mCategoryGetReply);
connect(mCategoryGetReply, &QNetworkReply::finished, this, &SpkMainWindow::CategoryDataReceived);
}
void SpkMainWindow::CategoryDataReceived()
{
QJsonValue retval;
auto verify = SpkUtils::VerifyReplyJson(mCategoryGetReply, retval);
if(verify || !retval.isArray())
{
sErr(tr("Failed to load categories! Type=%1 Code=%2").arg(retval.type()).arg(verify));
sNotify(tr("Cannot load categories! Type: %1 Code: %2").arg(retval.type()).arg(verify));
ui->PageHome->ui->widReloadCategory->setVisible(true);
return;
}
ui->PageHome->ui->widReloadCategory->setVisible(false);
PopulateCategories(retval.toArray());
}
void SpkMainWindow::EnterCategoryList(int aCategoryId, int aPage)
{
// Asynchronously call category API
using namespace SpkUtils;
VerifySingleRequest(mCategoryAppListGetReply);
QJsonObject reqData;
QJsonDocument reqDoc;
reqData.insert("type_id", QJsonValue(aCategoryId));
reqData.insert("page", QJsonValue(aPage));
reqDoc.setObject(reqData);
mCategoryAppListGetReply = STORE->SendApiRequest("application/get_application_list", reqDoc);
DeleteReplyLater(mCategoryAppListGetReply);
connect(mCategoryAppListGetReply, &QNetworkReply::finished,
this, &SpkMainWindow::CategoryListDataReceived);
setCursor(Qt::BusyCursor);
ui->PageAppList->SetCurrentCategory(aCategoryId); // AppList needs to remember current category
}
void SpkMainWindow::CategoryListDataReceived()
{
QJsonValue retval;
setCursor(Qt::ArrowCursor);
int verify = SpkUtils::VerifyReplyJson(mCategoryAppListGetReply, retval);
if(verify || !retval.isObject())
{
sErr(tr("Failed to load app list of category! Type=%1 Code=%2").arg(retval.type()).arg(verify));
sNotify(tr("Failed to load app list of category! Type: %1 Code: %2").arg(retval.type()).arg(verify));
return;
}
SwitchToPage(SpkUi::PgAppList);
PopulateAppList(retval.toObject(), "");
}
void SpkMainWindow::SearchKeyword(QString aKeyword, int aPage)
{
using namespace SpkUtils;
VerifySingleRequest(mCategoryAppListGetReply);
QJsonObject reqData;
QJsonDocument reqDoc;
reqData.insert("application_name", QJsonValue(aKeyword));
reqData.insert("page", QJsonValue(aPage));
reqDoc.setObject(reqData);
mCategoryAppListGetReply = STORE->SendApiRequest("application/get_application_list", reqDoc);
mCategoryAppListGetReply->setProperty("keyword", aKeyword);
DeleteReplyLater(mCategoryAppListGetReply);
connect(mCategoryAppListGetReply, &QNetworkReply::finished,
this, &SpkMainWindow::SearchDataReceived);
setCursor(Qt::BusyCursor);
}
void SpkMainWindow::SearchDataReceived()
{
QJsonValue retval;
setCursor(Qt::ArrowCursor);
auto verify = SpkUtils::VerifyReplyJson(mCategoryAppListGetReply, retval);
if(verify || !retval.isObject())
{
sErr(tr("Failed to search keyword! Type=%1 Code=%2").arg(retval.type()).arg(verify));
sNotify(tr("Failed to search keyword! Type: %1 Code: %2").arg(retval.type()).arg(verify));
return;
}
SwitchToPage(SpkUi::PgAppList);
PopulateAppList(retval.toObject(), mCategoryAppListGetReply->property("keyword").toString());
}
void SpkMainWindow::PopulateAppList(QJsonObject appData, QString &&keyword)
{
auto w = ui->PageAppList;
w->ClearAll();
static auto err =
[](){
sErr("Received invalid application list data!");
SpkUiMessage::SendStoreNotification(tr("Received an invalid response. Please try again!"));
return;
};
int pgCurrent, pgTotal, totalApps;
if(appData.contains("currentPage") && appData.value("currentPage").isDouble())
pgCurrent = appData.value("currentPage").toInt();
else return err();
if(appData.contains("totalPages") && appData.value("totalPages").isDouble())
pgTotal = appData.value("totalPages").toInt();
else return err();
if(appData.contains("count") && appData.value("count").isDouble())
totalApps = appData.value("count").toInt();
else return err();
w->SetPageStatus(pgTotal, pgCurrent, totalApps, keyword);
if(!appData.contains("data") || !appData.value("data").isArray())
return err();
auto apps = appData.value("data").toArray();
for(auto &&i : apps)
{
if(i.isObject())
{
auto j = i.toObject();
QString pkgName, displayName, description, iconPath;
int appid;
if(j.contains("package") && j.value("package").isString())
pkgName = j.value("package").toString();
else continue;
if(j.contains("application_name_zh") && j.value("application_name_zh").isString())
displayName = j.value("application_name_zh").toString();
else continue;
if(j.contains("description") && j.value("description").isString())
description = j.value("description").toString();
else continue;
if(j.contains("application_id") && j.value("application_id").isDouble())
appid = j.value("application_id").toInt();
else continue;
if(j.contains("icons") && j.value("icons").isString())
iconPath = j.value("icons").toString();
else continue;
w->AddApplicationEntry(displayName, pkgName, description, iconPath, appid);
}
}
}
void SpkMainWindow::EnterAppDetails(int aAppId)
{
using namespace SpkUtils;
VerifySingleRequest(mAppDetailsGetReply);
QJsonObject reqData;
QJsonDocument reqDoc;
reqData.insert("application_id", QJsonValue(aAppId));
reqDoc.setObject(reqData);
mAppDetailsGetReply = STORE->SendApiRequest("application/get_application_detail", reqDoc);
DeleteReplyLater(mAppDetailsGetReply);
connect(mAppDetailsGetReply, &QNetworkReply::finished,
this, &SpkMainWindow::AppDetailsDataReceived);
setCursor(Qt::BusyCursor);
}
void SpkMainWindow::AppDetailsDataReceived()
{
QJsonValue retval;
setCursor(Qt::ArrowCursor);
auto verify = SpkUtils::VerifyReplyJson(mAppDetailsGetReply, retval);
if(verify || !retval.isObject())
{
sErr(tr("Failed to open app details page! Type=%1 Code=%2").arg(retval.type()).arg(verify));
sNotify(tr("Failed to open app details page! Type: %1 Code: %2").arg(retval.type()).arg(verify));
return;
}
SwitchToPage(SpkUi::PgAppList);
PopulateAppDetails(retval.toObject());
}
void SpkMainWindow::PopulateAppDetails(QJsonObject appDetails)
{
QString pkgName, author, contributor, site, iconPath, arch, version, details, shortDesc, name,
pkgPath;
QStringList screenshots, tags;
int packageSize;
static auto err =
[](){
sErr("Received invalid application details!");
SpkUiMessage::SendStoreNotification(tr("Received an invalid response. Please try again!"));
return;
};
if(appDetails.contains("package") && appDetails.value("package").isString())
pkgName = appDetails.value("package").toString();
else return err();
if(appDetails.contains("application_name_zh") && appDetails.value("application_name_zh").isString())
name = appDetails.value("application_name_zh").toString();
else name = pkgName;
if(appDetails.contains("version") && appDetails.value("version").isString())
version = appDetails.value("version").toString();
else return err();
if(appDetails.contains("icons") && appDetails.value("icons").isString())
iconPath= appDetails.value("icons").toString();
if(appDetails.contains("author") && appDetails.value("author").isString())
author = appDetails.value("author").toString();
if(appDetails.contains("contributor") && appDetails.value("contributor").isString())
contributor = appDetails.value("contributor").toString();
if(appDetails.contains("website") && appDetails.value("website").isString())
site = appDetails.value("website").toString();
if(appDetails.contains("description") && appDetails.value("description").isString())
shortDesc = appDetails.value("description").toString();
if(appDetails.contains("more") && appDetails.value("more").isString())
details = appDetails.value("more").toString();
if(appDetails.contains("arch") && appDetails.value("arch").isString())
arch = appDetails.value("arch").toString();
if(appDetails.contains("size") && appDetails.value("size").isDouble())
packageSize = appDetails.value("size").toInt();
if(appDetails.contains("deb_url") && appDetails.value("deb_url").isString())
pkgPath = appDetails.value("deb_url").toString();
QJsonArray imgs;
if(appDetails.contains("img_urls") && appDetails.value("img_urls").isArray())
imgs = appDetails.value("img_urls").toArray();
if(!imgs.isEmpty())
for(auto &&i : imgs)
if(i.isString()) screenshots << i.toString();
QJsonArray tags_j;
if(appDetails.contains("tags") && appDetails.value("tags").isArray())
imgs = appDetails.value("tags").toArray();
if(!tags_j.isEmpty())
for(auto &&i : tags_j)
if(i.isString()) tags << i.toString();
// Details string has a strangely appended LF. IDK but still should remove it.
shortDesc = shortDesc.trimmed();
auto w = ui->PageAppDetails;
w->mPkgName->setText(pkgName);
w->mAppTitle->setText(name);
w->mAppShortDesc->setText(shortDesc);
w->mAppDescription->setText(details);
w->mAuthor->SetValue(author);
w->mContributor->SetValue(contributor);
// w->mSite->SetValue(site); // Doesn't look good, I disabled it temporarily. Better solution?
w->SetWebsiteLink(site);
w->mArch->SetValue(arch);
w->mSize->SetValue(SpkUtils::BytesToSize(packageSize));
w->mVersion->setText(version);
w->SetPackagePath(pkgPath);
SwitchToPage(SpkUi::PgAppDetails);
ui->AppDetailsItem->setHidden(false);
ui->CategoryWidget->setCurrentItem(ui->AppDetailsItem);
w->LoadAppResources(pkgName, iconPath, screenshots, tags);
}
void SpkMainWindow::ReloadThemedUiIcons()
{
for(auto &i : mThemedUiIconReferences)
i.first->SetIcon(SpkUi::GetThemedIcon(i.second), QSize { 20, 20 });
}
// ==================== Main Window Initialization ====================
void SpkMainWindow::Initialize()
{
connect(ui->SidebarMgr, &SpkUi::SpkSidebarSelector::SwitchToPage,
this, &SpkMainWindow::SwitchToPage);
connect(ui->SidebarMgr, &SpkUi::SpkSidebarSelector::SwitchToCategory,
this, &SpkMainWindow::EnterCategoryList);
connect(ui->PageAppList, &SpkUi::SpkPageAppList::SwitchListPage,
this, &SpkMainWindow::EnterCategoryList);
connect(ui->PageAppList, &SpkUi::SpkPageAppList::SwitchSearchPage,
this, &SpkMainWindow::SearchKeyword);
connect(ui->SearchEdit, &QLineEdit::returnPressed,
[=](){ emit SearchKeyword(ui->SearchEdit->text(), 1); });
connect(ui->PageAppList, &SpkUi::SpkPageAppList::ApplicationClicked,
this, &SpkMainWindow::EnterAppDetails);
connect(ui->BtnDayNight, &QPushButton::clicked,
this, &SpkMainWindow::SwitchDayNightTheme);
if(SpkUi::States::IsUsingDtkPlugin)
{
connect(SpkUi::DtkPlugin, &SpkDtkPlugin::DarkLightThemeChanged,
this, &SpkMainWindow::ReloadThemedUiIcons);
}
connect(ui->PageAppDetails, &SpkUi::SpkPageAppDetails::RequestDownload,
ui->PageDownloads, &SpkUi::SpkPageDownloads::AddDownloadTask);
connect(ui->PageHome->ui->btnReloadCategory, &QPushButton::clicked,
this, &SpkMainWindow::RefreshCategoryData);
connect(&SpkUi::SpkUiMetaObject, &SpkUi::UiMetaObject::SetThemeButtonVisible,
[=](bool visible)
{
ui->BtnDayNight->setVisible(visible);
ReloadThemedUiIcons();
});
// Register themed button icons
// mThemedUiIconReferences.append({ ui->BtnSettings, "settings" });
mThemedUiIconReferences.append({ ui->BtnDayNight, "daynight" });
ReloadThemedUiIcons();
}
// ==================== Main Widget Initialization ====================
SpkUi::SpkMainWidget::SpkMainWidget(QWidget *parent) : QFrame(parent)
{
setObjectName("spk_mainwidget");
Pager = new QStackedWidget(this);
Pager->setObjectName("spk_mw_pager");
Pager->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
SidebarMgr = new SpkSidebarSelector(this);
SidebarMgr->setObjectName("spk_mw_sidebar_mgr");
BtnSettings = new SpkIconButton(this);
BtnSettings->setObjectName("styPlainChkBtn");
BtnSettings->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
BtnSettings->setCheckable(true);
BtnSettings->setFixedSize({ 40, 40 });
BtnSettings->SetIcon(QIcon(":/icons/settings.svg"), QSize(20, 20));
BtnSettings->setProperty("spk_pageno", PgSettings);
SidebarMgr->BindPageSwitcherButton(BtnSettings);
BtnDayNight = new SpkIconButton(this);
BtnDayNight->setObjectName("styPlainChkBtn");
BtnDayNight->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
BtnDayNight->setFixedSize({ 40, 40 });
BtnDayNight->SetIcon(QIcon(":/icons/daynight.svg"), QSize(20, 20));
BtnBack = new SpkIconButton(this);
BtnBack->setFixedSize({ 40, 40 });
BtnBack->SetIcon(QIcon(":/icons/back.svg"), QSize(20, 20));
BtnBack->setVisible(false);
using SpkUi::SpkSidebarSelector;
CategoryWidget = new SpkSidebarTree(this);
CategoryWidget->setObjectName("styMwCateg");
CategoryWidget->setAutoFillBackground(true);
CategoryWidget->setColumnCount(1);
CategoryWidget->setHeaderHidden(true);
CategoryWidget->setSelectionMode(QAbstractItemView::SelectionMode::SingleSelection);
CategoryWidget->setFixedWidth(200);
//============ Sidebar entries BEGIN ============
HomepageItem = new QTreeWidgetItem(QStringList(tr("Home")));
HomepageItem->setData(0, SpkSidebarSelector::RoleItemIsCategory, false);
HomepageItem->setData(0, SpkSidebarSelector::RoleItemCategoryPageId, SpkStackedPages::PgHomepage);
AppDetailsItem = new QTreeWidgetItem(QStringList(tr("App Details")));
AppDetailsItem->setData(0, SpkSidebarSelector::RoleItemIsCategory, false);
AppDetailsItem->setData(0, SpkSidebarSelector::RoleItemCategoryPageId, SpkStackedPages::PgAppDetails);
CategoryParentItem = new QTreeWidgetItem(QStringList(tr("Categories")));
CategoryParentItem->setFlags(CategoryParentItem->flags().setFlag(Qt::ItemIsSelectable, false));
DownloadsItem = new QTreeWidgetItem(QStringList(tr("Downloads")));
DownloadsItem->setData(0, SpkSidebarSelector::RoleItemIsCategory, false);
DownloadsItem->setData(0, SpkSidebarSelector::RoleItemCategoryPageId, SpkStackedPages::PgDownloads);
#ifndef NDEBUG
UiTestItem = new QTreeWidgetItem(QStringList(tr("UI TEST")));
UiTestItem->setData(0, SpkSidebarSelector::RoleItemIsCategory, false);
UiTestItem->setData(0, SpkSidebarSelector::RoleItemCategoryPageId, SpkStackedPages::PgQssTest);
#endif
//============ Sidebar entries END ============
CategoryWidget->addTopLevelItem(HomepageItem);
SidebarMgr->AddUnusableItem(CategoryParentItem);
CategoryWidget->addTopLevelItem(AppDetailsItem);
CategoryWidget->addTopLevelItem(CategoryParentItem);
CategoryWidget->addTopLevelItem(DownloadsItem);
CategoryWidget->addTopLevelItem(UiTestItem);
CategoryWidget->setFocusPolicy(Qt::NoFocus);
// Must be done after added into a view.
AppDetailsItem->setHidden(true); // Hide until we actually open up a Details page
CategoryParentItem->setExpanded(true);
// FIXMEIFPOSSIBLE: Fusion adds extra gradient.
// Details: https://forum.qt.io/topic/128190/fusion-style-kept-adding-an-extra-
// layer-of-gradient-to-my-selected-item-of-qtreewidget-even-with-qss
if(SpkUi::OldSystemStyle)
CategoryWidget->setStyle(SpkUi::OldSystemStyle);
SidebarMgr->BindCategoryWidget(CategoryWidget);
HorizontalDivide = new QHBoxLayout;
HorizontalDivide->setObjectName("spk_mw_divide_hlay");
HorizontalDivide->setSpacing(0);
HorizontalDivide->setContentsMargins(0, 0, 0, 0);
HorizontalDivide->setAlignment(Qt::AlignLeft);
if(!SpkUi::States::IsUsingDtkPlugin)
HorizontalDivide->addSpacing(SpkWindow::BorderWidth);
HorizontalDivide->addWidget(CategoryWidget);
HorizontalDivide->addWidget(Pager);
//============ Search Bar ============
SearchEdit = new SpkFocusLineEdit(this);
SearchEdit->setPlaceholderText(tr("Press Enter to search"));
SearchEdit->setFixedWidth(30);
SearchEdit->setFixedHeight(30);
SearchBarAnim = new QTimeLine(300, this);
SearchBarAnim->setDuration(300);
SearchBarAnim->setEasingCurve(QEasingCurve::OutExpo);
SearchBarAnim->setUpdateInterval(20);
ActClearSearchBar = SearchEdit->addAction(QIcon(":/icons/clear-input.svg"),
QLineEdit::TrailingPosition);
ActClearSearchBar->setVisible(false); // Invisible by default
ActSearchIcon = SearchEdit->addAction(QIcon(":/icons/search-mini.svg"), QLineEdit::LeadingPosition);
connect(SearchEdit, &SpkFocusLineEdit::focusGained,
[=](){
ActClearSearchBar->setVisible(true);
SearchBarAnim->setDirection(QTimeLine::Forward);
SearchBarAnim->start();
});
connect(SearchEdit, &SpkFocusLineEdit::focusLost,
[=](){
ActClearSearchBar->setVisible(false);
SearchBarAnim->setDirection(QTimeLine::Backward);
SearchBarAnim->start();
});
connect(SearchBarAnim, &QTimeLine::valueChanged,
[=](qreal v){
SearchEdit->setFixedWidth(static_cast<int>(250 * v) + 30);
});
connect(ActClearSearchBar, &QAction::triggered, [=](){ SearchEdit->clear(); });
connect(BtnBack, &QPushButton::clicked,
[=](){
SidebarMgr->GoBack();
BtnBack->setEnabled(false);
});
auto space = static_cast<SpkWindow*>(parent)->GetTitleBar()->GetUserSpace();
space->addSpacing(50);
space->addWidget(BtnDayNight);
space->addWidget(BtnSettings);
space->addWidget(BtnBack);
space->addWidget(SearchEdit);
space->addStretch();
//============ Pages =============
// Red-Black tree based map will be able to sort things. Just for convenience of ordering pages.
QMap<SpkStackedPages, QWidget*> sorter;
// Initialize pages
PageAppList = new SpkUi::SpkPageAppList(this);
PageAppList->setProperty("spk_pageid", SpkStackedPages::PgAppList);
sorter[PgAppList] = PageAppList;
PageAppDetails = new SpkUi::SpkPageAppDetails(this);
PageAppDetails->setProperty("spk_pageid", SpkStackedPages::PgAppDetails);
sorter[PgAppDetails] = PageAppDetails;
PageDownloads = new SpkUi::SpkPageDownloads(this);
PageDownloads->setProperty("spk_pageid", SpkStackedPages::PgDownloads);
sorter[PgDownloads] = PageDownloads;
PageSettings = new SpkUi::SpkPageSettings(this);
PageSettings->setProperty("spk_pageid", SpkStackedPages::PgSettings);
sorter[PgSettings] = PageSettings;
PageHome = new SpkUi::SpkPageHome(this);
PageSettings->setProperty("spk_pageid", SpkStackedPages::PgHomepage);
sorter[PgHomepage] = PageHome;
#ifndef NDEBUG // If only in debug mode should we initialize QSS test page
PageQssTest = new SpkUi::SpkPageUiTest(this);
PageQssTest->setProperty("spk_pageid", SpkStackedPages::PgQssTest);
sorter[PgQssTest] = PageQssTest;
#endif
for(auto i : sorter)
Pager->addWidget(i);
// Default page selection : homepage
HomepageItem->setSelected(true);
// Manually "activate" the default page item to make the sidebar tree know about default item
emit CategoryWidget->itemPressed(HomepageItem, 0);
setLayout(HorizontalDivide);
}

View File

@@ -1,139 +0,0 @@
#include <QScrollArea>
#include <QDebug>
#include <QGuiApplication>
#include <QScreen>
#include "spkui_general.h"
#include "spkmainwindow.h"
#include "spkmsgbox.h"
#include "spkstore.h"
// Suppress unwanted Clazy check warnings
// clazy:excludeall=connect-3arg-lambda,lambda-in-connect
const QSize SpkMsgBox::IconSize; // I don't know why I need it, compiler wants that
SpkMsgBox::SpkMsgBox(QWidget *parent)
{
Q_UNUSED(parent);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
}
int SpkMsgBox::StaticExec(QString msg, QString title, QMessageBox::Icon icon,
QMessageBox::StandardButtons buttons, QString extra, bool expanded)
{
SpkMsgBox *b = new SpkMsgBox(SpkStore::Instance->GetRootWindow());
QWidget *wMsgWidget = new QWidget;
QHBoxLayout *wMsg = new QHBoxLayout(wMsgWidget);
QPushButton *wExpandBtn;
QScrollArea *wExtraArea;
QLabel *wMsgText = new QLabel,
*wExtraInfo,
*wIcon;
int InitialHeight;
bool hasextra = extra.length() != 0;
if(icon)
{
wIcon = new QLabel;
QIcon icon_;
switch(icon)
{
case QMessageBox::Critical:
icon_ = QIcon::fromTheme("dialog-error");
break;
case QMessageBox::Warning:
icon_ = QIcon::fromTheme("dialog-warning");
break;
case QMessageBox::Information:
icon_ = QIcon::fromTheme("dialog-information");
break;
case QMessageBox::Question:
icon_ = QIcon::fromTheme("dialog-question");
break;
case QMessageBox::NoIcon:
break;
}
if(icon)
wIcon->setPixmap(icon_.pixmap(IconSize));
wMsg->addWidget(wIcon);
}
wMsgText->setText(msg);
wMsgText->setAlignment(Qt::AlignLeft);
wMsg->addWidget(wMsgText);
wMsg->setSpacing(10);
wMsgWidget->setLayout(wMsg);
b->AddWidget(wMsgWidget);
b->GetTitleBar()->SetTitle(title);
b->GetTitleBar()->SetOperationButton(SpkTitleBar::OperationButton::Close);
b->SetResizable(false);
b->SetCentralMargin(Margin, Margin, Margin, Margin);
b->setMaximumSize(SpkUi::PrimaryScreenSize * 0.6);
if(hasextra)
{
wExpandBtn = new QPushButton;
wExtraInfo = new QLabel;
wExtraArea = new QScrollArea;
wExtraInfo->setText(extra);
wExtraArea->setWidget(wExtraInfo);
wExtraArea->setVisible(false);
wExtraArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
wExpandBtn->setText(tr("Details"));
wExpandBtn->setMaximumWidth(100);
wExpandBtn->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
wExpandBtn->setCheckable(true);
wExpandBtn->setObjectName("styChkBtn");
connect(wExpandBtn, &QPushButton::clicked,
[&](){ // FIXME: hint doesn't change when visibility changes, this is a quirky hack
wExtraArea->setVisible(wExpandBtn->isChecked());
if(wExpandBtn->isChecked())
b->setFixedHeight(b->sizeHint().height());
else
b->setFixedHeight(InitialHeight);
});
b->mBtnLay->addWidget(wExpandBtn);
b->mBtnLay->addStretch();
b->AddWidget(wExtraArea);
}
b->AddSpacing(3);
AddButtons(b, buttons);
if(hasextra)
{
b->mBtnLay->addStretch(); // Keep conventional buttons centered
if(expanded)
emit wExpandBtn->clicked();
}
InitialHeight = b->minimumSizeHint().height();
auto pos = (SpkUi::PrimaryScreenSize - b->sizeHint()) / 2;
b->move(pos.width(), pos.height());
b->setWindowModality(Qt::ApplicationModal);
b->setFixedSize(b->sizeHint());
auto r = b->Exec();
if(r != -1)
r = b->mButtonList[r]; // Retrieve the correct button
delete b;
return r;
}
void SpkMsgBox::AddButtons(SpkMsgBox *me, QMessageBox::StandardButtons b)
{
// If anyone can do it better, please let me know, I wrote this on the airplane
using btn = QMessageBox::StandardButton;
if(!b) return;
if(b.testFlag(btn::Ok)) { me->AddButton(tr("OK")); me->mButtonList << btn::Ok; };
if(b.testFlag(btn::Cancel)) { me->AddButton(tr("Cancel")); me->mButtonList << btn::Cancel; };
if(b.testFlag(btn::Yes)) { me->AddButton(tr("Yes")); me->mButtonList << btn::Yes; };
if(b.testFlag(btn::No)) { me->AddButton(tr("No")); me->mButtonList << btn::No; };
if(b.testFlag(btn::Apply)) { me->AddButton(tr("Apply")); me->mButtonList << btn::Apply; };
if(b.testFlag(btn::Reset)) { me->AddButton(tr("Reset")); me->mButtonList << btn::Reset; };
if(b.testFlag(btn::Abort)) { me->AddButton(tr("Abort")); me->mButtonList << btn::Abort; };
if(b.testFlag(btn::Retry)) { me->AddButton(tr("Retry")); me->mButtonList << btn::Retry; };
if(b.testFlag(btn::Ignore)) { me->AddButton(tr("Ignore")); me->mButtonList << btn::Ignore; };
if(b.testFlag(btn::Reset)) { me->AddButton(tr("Reset")); me->mButtonList << btn::Reset; };
if(b.testFlag(btn::Close)) { me->AddButton(tr("Close")); me->mButtonList << btn::Close; };
if(b.testFlag(btn::Open)) { me->AddButton(tr("Open")); me->mButtonList << btn::Open; };
}

View File

@@ -1,35 +0,0 @@
#include <QPaintEvent>
#include <QPainter>
#include <QBrush>
#include "spknotifydot.h"
#include "spkstore.h"
/*
* The font size and the actual geometry of this widget is hard coded
* If you want to use this widget code please consider improving it
*/
SpkNotifyDot::SpkNotifyDot(QWidget *parent) :
QLabel(parent)
{
}
void SpkNotifyDot::paintEvent(QPaintEvent *e)
{
QPainter p(this);
int h = height();
p.setRenderHint(QPainter::Antialiasing);
p.setBrush(QBrush(QColor(255, 70, 50)));
p.setPen(Qt::transparent);
p.drawEllipse(0, 0, h, h);
p.setBrush(QBrush(QColor(Qt::white)));
p.setPen(Qt::white);
p.setFont(QFont("sansserif", 10, 1000));
p.drawText(QRect(0, 0, h, h), Qt::AlignHCenter | Qt::AlignVCenter, text());
p.end();
}

View File

@@ -1,82 +0,0 @@
#include "spkpopup.h"
#include <QDebug>
namespace SpkUi
{
SpkPopup::SpkPopup(QWidget *parent, int aMillis) : QWidget(parent)
{
setAttribute(Qt::WA_TransparentForMouseEvents);
setAttribute(Qt::WA_TranslucentBackground);
setWindowFlags(Qt::FramelessWindowHint);
mText = new QLabel();
mText->setStyleSheet("border-radius: 11px;"
"background-color: rgba(0,0,0,150);"
"color: white;"
"padding: 5px;");
mText->setText(tr("(No Text)"));
mBox = new QHBoxLayout(this);
mBox->addWidget(mText);
mBox->setContentsMargins(0, 0, 0, 0);
// The reason why we contain it in a widget is that, if we want a QLabel have rounded corners,
// then it must be able to be displayed with a translucent background. However, setting
// Qt::WA_TranslucentBackground will cause the entire background of QLabel transparent.
// Therefore we need a container (SpkPopup) with a transparent background as the canvas layer
// of the actual displayed text.
mAnim = new QSequentialAnimationGroup(this);
// Disabled as translucency doesn't work well on every platform :(
// mAnimFadeIn = new QPropertyAnimation(this, "windowOpacity");
// mAnimFadeOut = new QPropertyAnimation(this, "windowOpacity");
// mAnimFadeIn->setStartValue(0.0);
// mAnimFadeIn->setEndValue(1.0);
// mAnimFadeOut->setStartValue(1.0);
// mAnimFadeOut->setEndValue(0.0);
// Using moving animation instead
mAnimFadeIn = new QPropertyAnimation(this, "pos");
mAnimFadeOut = new QPropertyAnimation(this, "pos");
mAnimFadeIn->setDuration(250);
mAnimFadeOut->setDuration(250);
mAnimFadeIn->setEasingCurve(QEasingCurve::InQuad);
mAnimFadeOut->setEasingCurve(QEasingCurve::InQuad);
mAnim->addAnimation(mAnimFadeIn);
mAnim->addPause(aMillis);
mAnim->addAnimation(mAnimFadeOut);
setVisible(false);
connect(mAnim, &QAnimationGroup::stateChanged,
[=](QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
{
// qDebug() << "OldState" << oldState << "NewState" << newState;
if(newState == QAbstractAnimation::Stopped)
setVisible(false);
});
}
void SpkPopup::Show(QString aText)
{
if(mAnim->state() == QSequentialAnimationGroup::Running)
mAnim->stop();
QSize parentSize = parentWidget()->size();
mText->setText(aText);
adjustSize();
move(QPoint((parentSize.width() - width()) / 2, parentSize.height() - height() - 30)/* +
parentWidget()->pos()*/);
setMaximumWidth(parentSize.width() - 200);
setWindowOpacity(1);
show();
mAnimFadeIn->setStartValue(QPoint((parentSize.width() - width()) / 2,
parentSize.height() + height()));
mAnimFadeIn->setEndValue(QPoint((parentSize.width() - width()) / 2,
parentSize.height() - height() - 80));
mAnimFadeOut->setStartValue(QPoint((parentSize.width() - width()) / 2,
parentSize.height() - height() - 80));
mAnimFadeOut->setEndValue(QPoint((parentSize.width() - width()) / 2,
parentSize.height() + height()));
qDebug() << "Popup size " << size() << "position" << pos() << "parent size" << parentWidget()->size();
mAnim->start();
}
}

View File

@@ -1,93 +0,0 @@
#include "spkqsshelper.h"
const std::list<SpkUi::Qss::ColorSetIndex> SpkUi::Qss::AccentColorExceptions
{
AccentColor,
AccentColorHighlighted,
TextOnAccentColor,
};
const std::map<SpkUi::Qss::ColorSetIndex, const char *> SpkUi::Qss::ColorSet2Token
{
{ GlobalBgnd, "GBG_" },
{ ControlsBgnd, "CBG_" },
{ ControlsBgndHighlighted, "CBGH" },
{ SelectionBgnd, "ACC_" },
{ SelectionBgndHighlighted, "ACCH" },
{ LightCtrlsGradLight, "LCTL1" },
{ LightCtrlsGradDark, "LCTL2" },
{ LightCtrlsGradDarker, "LCTL3" },
{ LightCtrlsDisabledBackground, "LCTLD" },
{ DarkCtrlsGradLight, "DCTL1" },
{ DarkCtrlsGradDark, "DCTL2" },
{ DarkCtrlsGradDarker, "DCTL3" },
{ DarkCtrlsDisabledBackground, "DCTLD" },
{ TextOnSelection, "TXACC" },
{ TextOnGlobalBgnd, "TXGBG" },
{ TextOnControlsBgnd, "TXCBG" },
{ TextLighter, "TXL1" },
{ TextEvenLighter, "TXL2" },
{ TextDisabled, "TXD" },
{ GlossyEdge, "GLS" },
{ ShadesEdge, "SHD" },
{ ScrollBarNorm, "SCBN" },
{ ScrollBarHover, "SCBH" },
{ DivideLine, "DVL" },
};
const std::map<SpkUi::Qss::ColorSetIndex, QColor> SpkUi::Qss::DarkColorSet
{
{ GlobalBgnd, 0x282828 },
{ ControlsBgnd, 0x323232 },
{ ControlsBgndHighlighted, 0xff0000 },
{ SelectionBgnd, 0x0070ff },
{ SelectionBgndHighlighted, QColor(0x0070ff).lighter(120) },
{ LightCtrlsGradLight, 0x6b6b6b },
{ LightCtrlsGradDark, 0x656565 },
{ LightCtrlsGradDarker, 0x606060 },
{ LightCtrlsDisabledBackground, 0x808080 },
{ DarkCtrlsGradLight, 0x404040 },
{ DarkCtrlsGradDark, 0x383838 },
{ DarkCtrlsGradDarker, 0x323232 },
{ DarkCtrlsDisabledBackground, 0x525252 },
{ TextOnSelection, ColorTextOnBackground(0x0070ff) },
{ TextOnGlobalBgnd, ColorTextOnBackground(0x282828) },
{ TextOnControlsBgnd, ColorTextOnBackground(0x282828) },
{ TextLighter, 0xd5d5d5 },
{ TextEvenLighter, 0x505050 },
{ TextDisabled, 0xbebebe },
{ GlossyEdge, 0x656565 },
{ ShadesEdge, 0x7b7b7b },
{ ScrollBarNorm, 0x404040 },
{ ScrollBarHover, 0x656565 },
{ DivideLine, 0x424242 },
};
const std::map<SpkUi::Qss::ColorSetIndex, QColor> SpkUi::Qss::LightColorSet
{
{ GlobalBgnd, 0xf8f8f8 },
{ ControlsBgnd, 0xf8f8f8 },
{ ControlsBgndHighlighted, 0xff0000 },
{ SelectionBgnd, 0x0070ff },
{ SelectionBgndHighlighted, QColor(0x0070ff).lighter(120) },
{ LightCtrlsGradLight, 0xfbfbfb },
{ LightCtrlsGradDark, 0xf2f2f2 },
{ LightCtrlsGradDarker, 0xebebeb },
{ LightCtrlsDisabledBackground, 0xe0e0e0 },
{ DarkCtrlsGradLight, 0xe4e4e4 },
{ DarkCtrlsGradDark, 0xcecece },
{ DarkCtrlsGradDarker, 0xb8b8b8 },
{ DarkCtrlsDisabledBackground, 0xababab },
{ TextOnSelection, ColorTextOnBackground(0x0070ff) },
{ TextOnGlobalBgnd, ColorTextOnBackground(0xf8f8f8) },
{ TextOnControlsBgnd, ColorTextOnBackground(0xf8f8f8) },
{ TextLighter, 0x2a2a2a },
{ TextEvenLighter, 0xa0a0a0 },
{ TextDisabled, 0x8a8a8a },
{ GlossyEdge, 0x9d9d9d },
{ ShadesEdge, 0xc5c5c5 },
{ ScrollBarNorm, 0xa0a0a0 },
{ ScrollBarHover, 0x858585 },
{ DivideLine, 0xd5d5d5 },
};

View File

@@ -1,31 +0,0 @@
#include <QMouseEvent>
#include "spksidebartree.h"
SpkUi::SpkSidebarTree::SpkSidebarTree(QWidget *parent) :
QTreeWidget(parent)
{
}
void SpkUi::SpkSidebarTree::mouseMoveEvent(QMouseEvent *e)
{
// This is solely for forcibly disabling the view to change selection when dragging on the view
// and probably the only reason why this class began its existence
if((e->buttons() & Qt::LeftButton))
setState(NoState);
else
QTreeWidget::mouseMoveEvent(e);
}
void SpkUi::SpkSidebarTree::mousePressEvent(QMouseEvent *e)
{
// Prevent anything being deselected
if(e->modifiers().testFlag(Qt::ControlModifier) && e->buttons().testFlag(Qt::LeftButton))
{
auto i = itemAt(e->pos());
if(i && i->isSelected())
return;
}
QTreeWidget::mousePressEvent(e);
}

View File

@@ -1,92 +0,0 @@
#include "spkstretchlayout.h"
SpkStretchLayout::SpkStretchLayout(QWidget *parent) : QLayout(parent)
{
}
SpkStretchLayout::~SpkStretchLayout()
{
QLayoutItem *item;
while((item = takeAt(0)))
delete item;
}
void SpkStretchLayout::addItem(QLayoutItem *item)
{
mItems.append(item);
}
QSize SpkStretchLayout::sizeHint() const
{
if(mItems.isEmpty())
return { 300, 300 };
auto w = geometry().width() - spacing();
auto it = mItems.first();
int countPerLine = w / (it->minimumSize().width() + spacing());
int lines = ceil((double)mItems.size() / countPerLine);
auto h = static_cast<int>(it->minimumSize().height() * lines + spacing() * lines);
return { w, h };
}
QSize SpkStretchLayout::minimumSize() const
{
// It works this way, but I honestly have no idea WHY IT WORKS
auto r = sizeHint();
r.setWidth(300);
return r;
}
int SpkStretchLayout::count() const
{
return mItems.size();
}
QLayoutItem *SpkStretchLayout::itemAt(int i) const
{
return mItems.value(i);
}
QLayoutItem *SpkStretchLayout::takeAt(int i)
{
return i >= 0 && i < mItems.size() ? mItems.takeAt(i) : nullptr;
}
void SpkStretchLayout::setGeometry(const QRect &rect)
{
QLayout::setGeometry(rect);
if(mItems.isEmpty())
return;
int spc = spacing(), w = rect.width() - spc;
QSize size;
auto itm = mItems.first();
// All items are considered the same, so we only calculate with the first item.
// Figure out how many at most can we squeeze into one line
int countPerLine = w / (itm->minimumSize().width() + spacing());
if(countPerLine < 1)
countPerLine = 1;
if(countPerLine >= mItems.size()) // All items fit in one line
size = itm->minimumSize();
// Won't fit in one line.
else // Stretch items.
size = QSize {(w / countPerLine - spc), itm->maximumSize().height() };
auto origin = geometry().topLeft();
QLayoutItem *o;
for(int i = 0; i < mItems.size(); i++)
{
o = mItems.at(i);
QRect geo;
geo.setSize(size);
geo.moveTo((i % countPerLine) * (size.width() + spc) + spc + origin.x(),
(i / countPerLine) * (size.height() + spacing()) + spc + origin.y());
o->setGeometry(geo);
}
// qDebug() << rect;
}

View File

@@ -1,149 +0,0 @@
#include <QEvent>
#include <QMouseEvent>
#include "spkwindow.h"
#include "spkui_general.h"
#include "spktitlebar.h"
SpkTitleBar::SpkTitleBar(QWidget *parent) : QFrame(parent)
{
mLinkedWindow = nullptr;
setFixedHeight(Height);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
mIcon = new QLabel(this);
mTitle = new QLabel(this);
mIcon->setFixedSize(40, 40);
mMainLayout = new QHBoxLayout(this);
mUserSpace = new QHBoxLayout();
mBtnGroup = new QHBoxLayout();
mBtnMin = new SpkTitleBarDefaultButton(this);
mBtnMaxRestore = new SpkTitleBarDefaultButton(this);
mBtnClose= new SpkTitleBarDefaultButton(this);
mMainLayout->setSpacing(8);
mBtnGroup->setSpacing(0);
mMainLayout->addSpacing(12);
mMainLayout->addWidget(mIcon);
mMainLayout->addWidget(mTitle);
mMainLayout->addLayout(mUserSpace);
mMainLayout->addLayout(mBtnGroup);
mBtnGroup->addWidget(mBtnMin);
mBtnGroup->addWidget(mBtnMaxRestore);
mBtnGroup->addWidget(mBtnClose);
mBtnMin->SetRole(OperationButton::Minimize);
mBtnMaxRestore->SetRole(OperationButton::MaximizeRestore);
mBtnClose->SetRole(OperationButton::Close);
mMainLayout->setContentsMargins(0, 0, 0, 1);
setLayout(mMainLayout);
connect(mBtnClose, &QPushButton::clicked, this, &SpkTitleBar::CloseWindow);
connect(mBtnMin, &QPushButton::clicked, this, &SpkTitleBar::MinimizeWindow);
connect(mBtnMaxRestore, &QPushButton::clicked, this, &SpkTitleBar::MaximizeRestoreWindow);
}
SpkTitleBar::~SpkTitleBar()
{
//qDebug() << "Freed title bar!";
}
void SpkTitleBar::SetOperationButton(OperationButton type)
{
mBtnClose->setVisible(type & OperationButton::Close);
mBtnMaxRestore->setVisible(type & OperationButton::MaximizeRestore);
mBtnMin->setVisible(type & OperationButton::Minimize);
}
bool SpkTitleBar::event(QEvent *evt)
{
switch(evt->type())
{
case QEvent::MouseButtonDblClick:
{
if(static_cast<QMouseEvent*>(evt)->button())
emit mBtnMaxRestore->clicked();
break;
}
default:;
}
return QWidget::event(evt);
}
void SpkTitleBar::CloseWindow()
{
if(mLinkedWindow)
mLinkedWindow->close();
}
void SpkTitleBar::MinimizeWindow()
{
if(mLinkedWindow)
mLinkedWindow->setWindowState(Qt::WindowMinimized);
}
void SpkTitleBar::MaximizeRestoreWindow()
{
if(mLinkedWindow)
{
if(mLinkedWindow->windowState().testFlag(Qt::WindowMaximized))
mLinkedWindow->setWindowState(mLinkedWindow->windowState() & ~Qt::WindowMaximized);
else
mLinkedWindow->setWindowState(Qt::WindowMaximized);
}
}
SpkTitleBarDefaultButton::SpkTitleBarDefaultButton(QWidget* parent) : QPushButton(parent)
{
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
setMaximumWidth(ButtonWidth);
setMinimumWidth(ButtonWidth);
setFocusPolicy(Qt::NoFocus);
}
void SpkTitleBarDefaultButton::paintEvent(QPaintEvent *e)
{
QPushButton::paintEvent(e);
QPainter painter;
painter.begin(this);
PaintSymbol(painter);
painter.end();
}
void SpkTitleBarDefaultButton::PaintSymbol(QPainter &p)
{
QPen pen(SpkUi::ColorLine);
p.setPen(pen);
auto mh = height() / 2, mw = width() / 2, h = height(), w = width();
constexpr int fr = 10;
switch(Role)
{
case Minimize:
p.drawLine(mw - w / fr, mh, mw + w / fr, mh);
break;
case MaximizeRestore:
p.drawRect(mw - w / fr, mh - h / fr,
w / fr * 2, h / fr * 2);
break;
case Restore:
p.drawRect(mw - w / fr - 2, mh - w / fr + 2, w / fr * 2, h / fr * 2);
p.drawLine(mw - w / fr, mh - h / fr - 2, mw + w / fr, mh - h / fr - 2);
p.drawLine(mw + w / fr, mh - h / fr - 2, mw + w / fr, mh + h / fr - 2);
break;
case Close:
p.drawLine(mw - h / fr * 1.3, mh - h / fr * 1.3,
mw + h / fr * 1.3, mh + h / fr * 1.3);
p.drawLine(mw - h / fr * 1.3, mh + h / fr * 1.3,
mw + h / fr * 1.3, mh - h / fr * 1.3);
break;
}
}
void SpkTitleBarDefaultButton::SetRole(OperationButton role)
{
Role = role;
}

View File

@@ -1,332 +0,0 @@
//
// Created by rigoligo on 2021/5/8.
//
#include <QApplication>
#include <QFile>
#include <QTextStream>
#include <QLibrary>
#include <QDir>
#include <QMessageBox>
#include <QDateTime>
#include <QDebug>
#include <QScreen>
#include <QPluginLoader>
#include <QStyleFactory>
#include <csignal>
#include <execinfo.h>
#include "spkui_general.h"
#include "spkmsgbox.h"
#include "spkpopup.h"
#include "spklogging.h"
#include "spkstore.h"
#include "spkutils.h"
namespace SpkUi
{
UiMetaObject SpkUiMetaObject;
SpkUiStyle CurrentStyle;
QString StylesheetBase, CurrentStylesheet;
QColor ColorLine, ColorBack, ColorBtnMaskSelected, ColorBtnMaskUnselected;
QSize PrimaryScreenSize;
SpkDtkPlugin *DtkPlugin = nullptr;
QStyle *OldSystemStyle = nullptr;
std::map<Qss::ColorSetIndex, QColor> CurrentColorSet;
SpkPopup *Popup;
namespace States
{
bool IsDDE = false, IsUsingDtkPlugin = false;
bool DoRespondAutoTheme = false;
int LightDarkMode = 3; // Default to Manual
bool ThemeConfigCallback()
{
switch(LightDarkMode)
{
case 0:
if(!DtkPlugin) return false;
SpkUiMetaObject.SetDarkLightTheme(DtkPlugin->GetIsDarkTheme());
break;
case 1:
SetGlobalStyle(Light, true);
SpkUiMetaObject.SetThemeButtonVisible(false);
break;
case 2:
SetGlobalStyle(Dark, true);
SpkUiMetaObject.SetThemeButtonVisible(false);
break;
case 3:
SpkUiMetaObject.SetThemeButtonVisible(true);
break;
}
return true;
}
}
namespace Priv
{
bool CrashHandlerActivated;
}
// ======================= Static Linkage Private Functions ========================
static void SetBtnMaskColor()
{
ColorBtnMaskUnselected = ColorTextOnBackground(CurrentColorSet[Qss::ControlsBgnd]);
ColorBtnMaskSelected = ColorTextOnBackground(CurrentColorSet[Qss::AccentColor]);
}
// ======================== Public Functions =========================
void Initialize()
{
// Obtain global stylesheets
QFile ObtainStylesheet;
ObtainStylesheet.setFileName(CFG->ReadField("internal/qss_path",
":/stylesheet/stylesheet/default.css")
.toString());
ObtainStylesheet.open(QIODevice::ReadOnly);
StylesheetBase = ObtainStylesheet.readAll();
ObtainStylesheet.close();
CurrentStyle = SpkUiStyle::Invalid;
#ifdef NDEBUG
SetGlobalStyle(Light, false);
#else
SetGlobalStyle(qEnvironmentVariableIntValue("SPK_FORCE_DARK") ? Dark : Light, false);
#endif
// Initalize crash handler
signal(SIGSEGV, SpkUi::CrashSignalHandler);
signal(SIGABRT, SpkUi::CrashSignalHandler);
signal(SIGFPE, SpkUi::CrashSignalHandler);
// Prepare theme following for DDE
if((States::IsDDE = CheckIsDeepinDesktop()))
PrepareForDeepinDesktop();
// Misc data initialization
PrimaryScreenSize = QGuiApplication::primaryScreen()->size();
CFG->BindField("ui/theme", &States::LightDarkMode, 3, States::ThemeConfigCallback);
}
void GuessAppropriateTheme()
{
// FIXME: Too difficult, not implementing it
}
bool CheckIsDeepinDesktop()
{
QString Desktop(getenv("XDG_CURRENT_DESKTOP"));
// This method of checking is from DTK source code.
if(Desktop.contains("deepin", Qt::CaseInsensitive) ||
Desktop.contains("tablet", Qt::CaseInsensitive))
return true;
else
return false;
}
void PrepareForDeepinDesktop()
{
#ifndef NDEBUG
qApp->addLibraryPath(qApp->applicationDirPath() + "/plugin/dtkplugin");
#else
// You must `make install' before these work in release mode
qApp->addLibraryPath("/usr/local/lib");
qApp->addLibraryPath("/usr/lib");
#endif
if(!qEnvironmentVariableIntValue("SPARK_NO_DTK_PLUGIN"))
{
QPluginLoader p("libspkdtkplugin");
if(p.load())
{
auto i = qobject_cast<SpkDtkPlugin*>(p.instance());
if(i)
{
DtkPlugin = i;
States::IsUsingDtkPlugin = true;
i->Initialize();
SpkUiMetaObject.SetAccentColor(i->GetAccentColor()); // Match OS accent color
SpkUiMetaObject.SetDarkLightTheme(i->GetIsDarkTheme()); // Match OS dark theme type
QObject::connect(i, &SpkDtkPlugin::AccentColorChanged,
&SpkUiMetaObject, &UiMetaObject::SetAccentColor);
QObject::connect(i, &SpkDtkPlugin::DarkLightThemeChanged,
&SpkUiMetaObject, &UiMetaObject::SetDarkLightTheme);
}
}
}
// NOTE: Chameleon style kept adding unwanted blue focus indication border
// to widgets that shouldn't have borders.
// We need to eliminate this irritating problem.
if(qEnvironmentVariableIntValue("SPARK_NO_QSTYLE_CHANGE"))
return;
OldSystemStyle = QStyleFactory::create("chameleon"); // TreeWidget doesn't work well with Fusion
auto styles = QStyleFactory::keys();
styles.removeAll("chameleon");
if(styles.contains("Fusion"))
{
auto style = QStyleFactory::create("Fusion");
qApp->setStyle(style);
}
else if(styles.size()) // What? This shouldn't happen.
qApp->setStyle(QStyleFactory::create(styles[0]));
else // Duh...
sWarn(QObject::tr("Cannot find styles other than 'chameleon'! You may see widgets "
"with unwanted blue borders."));
}
void SetGlobalStyle(const SpkUiStyle aStyle, const bool aPreserveAccentColor)
{
if(aStyle == CurrentStyle) // Don't waste precious CPU time parsing new style sheet!
return;
CurrentStyle = aStyle;
Qss::ColorSet tempset;
switch(aStyle)
{
case Invalid:
case Light:
tempset = Qss::LightColorSet;
ColorLine = Qt::black;
break;
case Dark:
tempset = Qss::DarkColorSet;
ColorLine = Qt::white;
break;
}
if(aPreserveAccentColor)
{
for(auto i : Qss::AccentColorExceptions)
tempset[i] = CurrentColorSet[i];
}
CurrentColorSet = tempset;
CurrentStylesheet = StylesheetFromColors(CurrentColorSet);
SetBtnMaskColor();
qApp->setStyleSheet(CurrentStylesheet);
}
QString WriteStackTrace(const QString &aStackTrace)
{
QString path = QDir::homePath() + "/.local/share/spark-store/crash/";
QFile StackTraceFile;
if(!QDir().exists(path))
if(!QDir().mkpath(path))
return QObject::tr("Stack trace directory %1 cannot be created. "
"Stack trace wasn't saved.").arg(path);
path += QString::number(QDateTime::currentDateTimeUtc().toSecsSinceEpoch());
while(QFile::exists(path))
path += "_";
StackTraceFile.setFileName(path);
StackTraceFile.open(QIODevice::WriteOnly);
if(StackTraceFile.isOpen() && StackTraceFile.isWritable())
{
QTextStream StackTraceWriter;
StackTraceWriter.setDevice(&StackTraceFile);
StackTraceWriter << QDateTime::currentDateTime().toLocalTime().toString() << "\n\n";
StackTraceWriter << aStackTrace;
StackTraceFile.close();
return QObject::tr("Stack trace written to \"%1\".").arg(path);
}
return QObject::tr("Stack trace file %1 cannot be opened. "
"Stack trace wasn't saved.").arg(path);
}
void CrashSignalHandler(int sig)
{
QString msg(QObject::tr("Program has received signal %1 during normal execution.\n\n")),
trace;
switch(sig)
{
case SIGSEGV:
msg = msg.arg(QObject::tr("\"SIGSEGV\" (Segmentation fault)"));
goto CRASH;
case SIGFPE:
msg = msg.arg(QObject::tr("\"SIGFPE\" (Arithmetic exception)"));
goto CRASH;
case SIGABRT:
msg = msg.arg(QObject::tr("\"SIGABRT\" (Abort)"));
CRASH:
{
if(Priv::CrashHandlerActivated) // If error occured in the handler...
{
signal(SIGABRT, SIG_DFL); // Return control flow to OS and give up
raise(SIGABRT);
exit(2);
}
Priv::CrashHandlerActivated = true;
void* TraceStack[StackTraceArraySize];
int StackTraceSize = backtrace(TraceStack, StackTraceArraySize);
auto TraceTextArray = backtrace_symbols(TraceStack, StackTraceArraySize);
trace = QString(QObject::tr("Stack trace:\n"));
for(int i = 0; i < StackTraceSize; i++)
trace += QString::number(i) + "> " + QString(TraceTextArray[i]) + '\n';
msg += QObject::tr("Spark Store cannot continue.\n\n");
msg += WriteStackTrace(trace);
SpkMsgBox::StaticExec(msg, QObject::tr("Spark Store Crashed"), QMessageBox::Critical,
QMessageBox::Ok, trace);
exit(2);
}
default:
sErrPop(QObject::tr("Unknown signal %1 received in crash handler. "
"Program internals may be corrupted. Please decide if you want "
"to continue execution.").arg(sig));
}
}
QIcon GetThemedIcon(QString name)
{
if(CurrentStyle == SpkUiStyle::Dark)
name += "-dark";
return QIcon(":/icons/" + name + ".svg");
}
QString StylesheetFromColors(Qss::ColorSet aColors)
{
QString ret = StylesheetBase;
foreach(auto &i, aColors)
ret = ret.replace(Qss::ColorSet2Token.at(i.first), i.second.name());
return ret;
}
QColor ColorTextOnBackground(QColor c)
{
// From https://github.com/feiyangqingyun/qtkaifajingyan
double gray = (0.299 * c.red() + 0.587 * c.green() + 0.114 * c.blue()) / 255;
return gray > 0.5 ? Qt::black : Qt::white;
}
// =================== UiMetaObject =======================
// UiMetaObject is the signal-slot receiver for DDE plugin, receiving the DDE system level
// notifications of UI theme changes
// Communications with UI widgets are also done here
void UiMetaObject::SetAccentColor(QColor aColor)
{
if(!SpkUi::States::DoRespondAutoTheme)
return;
CurrentColorSet[Qss::AccentColor] = aColor.lighter(90);
CurrentColorSet[Qss::AccentColorHighlighted] = aColor.lighter(105);
CurrentColorSet[Qss::TextOnAccentColor] = ColorTextOnBackground(aColor);
SetBtnMaskColor();
qApp->setStyleSheet(StylesheetFromColors(CurrentColorSet));
}
void UiMetaObject::SetDarkLightTheme(bool isDark)
{
if(!SpkUi::States::DoRespondAutoTheme)
return;
if(isDark)
SetGlobalStyle(Dark, true);
else
SetGlobalStyle(Light, true);
}
}

View File

@@ -1,326 +0,0 @@
#include <QVBoxLayout>
#include <QApplication>
#include <QStyleHints>
#include <QPainterPath>
#include <QFile>
#include <QPushButton>
#include <QMouseEvent>
#include "spklogging.h"
#include "spkwindow.h"
#include "spkui_general.h"
#include "spktitlebar.h"
#include <QDebug>
SpkWindow::SpkWindow(QWidget *parent) : QWidget(parent)
{
mUseCustomEvents = SpkUi::DtkPlugin == nullptr; // Put to the front, to prevent warnings
if(SpkUi::DtkPlugin && !qEnvironmentVariableIntValue("SPARK_NO_DXCB"))
SpkUi::DtkPlugin->addWindow(this, parent); // Register window to DXcb so we got Deepin
else
setWindowFlags(Qt::FramelessWindowHint); // Remove default title bar
setAttribute(Qt::WA_Hover);
mCornerRadius = 5;
mUserCentralWidget = nullptr;
mResizable = true;
mMoving = mResizing = false;
mCloseHook = nullptr;
mMaximized = windowState().testFlag(Qt::WindowMaximized);
setMouseTracking(true);
PopulateUi();
}
SpkWindow::~SpkWindow()
{
}
bool SpkWindow::event(QEvent *evt)
{
// These custom events weren't useful for Deepin platform
if(!mUseCustomEvents)
return QWidget::event(evt);
switch(evt->type())
{
case QEvent::WindowStateChange:
{
mMaximized = windowState().testFlag(Qt::WindowMaximized);
if(mMaximized)
mTitleBarComponent->mBtnMaxRestore->SetRole(SpkTitleBarDefaultButton::Restore);
else
mTitleBarComponent->mBtnMaxRestore->SetRole(SpkTitleBarDefaultButton::MaximizeRestore);
break;
}
case QEvent::MouseButtonPress:
{
// if(!mResizable) break;
auto e = static_cast<QMouseEvent*>(evt);
if(e->button() != Qt::LeftButton) break;
auto edge = DetectEdgeOnThis(e->pos());
if(edge)
{
mResizing = true;
mEdgesBeingResized = edge;
return true;
}
else
{
if(!QWidget::event(evt) || 1) // Movable property is not implemented, let move anywhere
{
mMoveOffset = e->globalPos() - pos();
mMoving = true;
mResizing = false;
}
return true;
}
break;
}
case QEvent::MouseButtonRelease:
{
// if(!mResizable) break;
auto e = static_cast<QMouseEvent*>(evt);
if(e->button() != Qt::LeftButton) break;
mResizing = false;
mMoving = false;
unsetCursor();
return true;
break;
}
case QEvent::HoverMove:
{
if((mResizing || !mResizable) && !mMoving) break;
if(mMaximized)
{
unsetCursor();
break;
}
if(mResizable && !mMoving)
{
auto e = static_cast<QHoverEvent*>(evt);
auto edge = DetectEdgeOnThis(e->pos());
SetMouseCursor(edge);
}
break;
}
case QEvent::MouseMove:
{
if(mMaximized) break;
auto e = static_cast<QMouseEvent*>(evt);
if(mResizing && mResizable)
{
ResizeWindowByCursor(e->globalPos());
return true; // Intercept resize movements
}
else if(mMoving)
{
move(e->globalPos() - mMoveOffset);
}
break;
}
default:
;
}
return QWidget::event(evt);
}
Qt::Edges SpkWindow::DetectEdgeOnThis(QPoint p)
{
Qt::Edges edge;
if(p.x() < BorderWidth) edge |= Qt::LeftEdge;
if(p.x() > width() - BorderWidth) edge |= Qt::RightEdge;
if(p.y() < BorderWidth) edge |= Qt::TopEdge;
if(p.y() > height() - BorderWidth) edge |= Qt::BottomEdge;
return edge;
}
void SpkWindow::SetMouseCursor(Qt::Edges e)
{
switch(e)
{
case Qt::TopEdge:
case Qt::BottomEdge:
setCursor(Qt::SizeVerCursor);
break;
case Qt::LeftEdge:
case Qt::RightEdge:
setCursor(Qt::SizeHorCursor);
break;
case Qt::TopEdge | Qt::LeftEdge:
case Qt::BottomEdge | Qt::RightEdge:
setCursor(Qt::SizeFDiagCursor);
break;
case Qt::TopEdge | Qt::RightEdge:
case Qt::BottomEdge | Qt::LeftEdge:
setCursor(Qt::SizeBDiagCursor);
break;
default:
unsetCursor();
}
}
void SpkWindow::ResizeWindowByCursor(QPoint p)
{
auto r_ = geometry(), r = r_;
switch(mEdgesBeingResized)
{
case Qt::TopEdge | Qt::LeftEdge:
r.setLeft(p.x());
if(r.width() < minimumWidth()) // If smaller than minimum the window moves, so we stop it
r.setLeft(r_.left());
case Qt::TopEdge:
r.setTop(p.y());
if(r.height() < minimumHeight()) // Same
r.setTop(r_.top());
break;
case Qt::BottomEdge | Qt::LeftEdge:
r.setLeft(p.x());
if(r.width() < minimumWidth())
r.setLeft(r_.left());
case Qt::BottomEdge:
r.setBottom(p.y());
if(r.height() < minimumHeight())
r.setBottom(r_.bottom());
break;
case Qt::TopEdge | Qt::RightEdge:
r.setTop(p.y());
r.setRight(p.x());
if(r.height() < minimumHeight())
r.setTop(r_.top());
if(r.width() < minimumWidth())
r.setRight(r_.right());
break;
case Qt::BottomEdge | Qt::RightEdge:
r.setBottom(p.y());
if(r.height() < minimumHeight())
r.setBottom(r_.bottom());
case Qt::RightEdge:
r.setRight(p.x());
if(r.width() < minimumWidth())
r.setRight(r_.right());
break;
case Qt::LeftEdge:
r.setLeft(p.x());
if(r.width() < minimumWidth())
r.setLeft(r_.left());
break;
default:
return;
}
setGeometry(r);
}
void SpkWindow::closeEvent(QCloseEvent *e)
{
if(mCloseHook)
{
if(mCloseHook())
e->accept();
else
e->ignore();
emit Closed();
return;
}
e->accept();
emit Closed();
}
void SpkWindow::paintEvent(QPaintEvent *e)
{
QWidget::paintEvent(e);
if(!mUseCustomEvents)
return;
QPainter painter(this);
painter.setBrush(QBrush(Qt::NoBrush));
painter.setPen(QPen(SpkUi::ColorLine));
QRect rect = this->rect();
rect.adjust(0, 0, -1, -1);
painter.drawRect(rect);
}
void SpkWindow::SetCornerRadius(int radius)
{
mCornerRadius = radius;
}
void SpkWindow::PopulateUi()
{
mMainVLayout = new QVBoxLayout;
mTitleBarComponent = new SpkTitleBar(this);
setLayout(mMainVLayout);
mMainVLayout->addWidget(mTitleBarComponent);
mMainVLayout->setAlignment(Qt::AlignTop);
if(mUseCustomEvents)
mMainVLayout->setContentsMargins(1, 1, 1, 1);
else
mMainVLayout->setContentsMargins(0, 0, 0, 0);
mMainVLayout->setSpacing(0);
mTitleBarComponent->SetTitle(qAppName());
mTitleBarComponent->SetUseIcon(false);
mTitleBarComponent->SetLinkedWindow(this);
setWindowFlag(Qt::NoDropShadowWindowHint, false);
}
void SpkWindow::SetCentralWidget(QWidget *widget)
{
if(mUserCentralWidget)
mMainVLayout->removeWidget(mUserCentralWidget);
mUserCentralWidget = widget;
mMainVLayout->addWidget(widget);
}
void SpkWindow::SetUseTitleBar(bool x)
{
mTitleBarComponent->setVisible(x);
}
void SpkWindow::SetCentralMargin(int a, int b, int c, int d)
{
if(mUserCentralWidget)
mUserCentralWidget->setContentsMargins(a, b, c, d);
}
void SpkWindow::SetCloseHook(bool (*f)())
{
mCloseHook = f;
}
void SpkWindow::ClearCloseHook()
{
mCloseHook = nullptr;
}
void SpkWindow::RecalculateSize()
{
mMainVLayout->activate();
}
bool SpkWindow::GetUseTitleBar()
{
return mTitleBarComponent->isVisible();
}
SpkTitleBar *SpkWindow::GetTitleBar()
{
return mTitleBarComponent;
}
SpkTitleBar *SpkWindow::SetTitleBar(SpkTitleBar *bar, bool replace)
{
if(!bar)
return nullptr;
auto ret = mTitleBarComponent;
mMainVLayout->removeWidget(mTitleBarComponent);
if(replace)
mMainVLayout->insertWidget(0, bar);
mTitleBarComponent = bar;
bar->SetLinkedWindow(this);
return ret;
}

View File

@@ -1,9 +0,0 @@
//
// Created by rigoligo on 2021/5/8.
//
#pragma once
// Stub
#endif //_DEEPINPLATFORM_H_

View File

@@ -1,22 +0,0 @@
#pragma once
#include <QWidget>
class SpkDtkPlugin : public QObject
{
Q_OBJECT
public:
virtual ~SpkDtkPlugin() = default;
virtual void Initialize() = 0;
virtual void addWindow(QWidget* w, QObject* parent) = 0;
virtual QColor GetAccentColor() = 0;
virtual bool GetIsDarkTheme() = 0;
signals:
void AccentColorChanged(QColor);
void DarkLightThemeChanged(bool isDark);
};
QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE(SpkDtkPlugin, "org.spark-store.client.dtkplugin")
QT_END_NAMESPACE

View File

@@ -1,8 +0,0 @@
#pragma once
namespace GitVer
{
const char *DescribeTags();
const char *CommitDate();
}

View File

@@ -1,86 +0,0 @@
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include <QLabel>
#include <QScrollArea>
#include <QVBoxLayout>
#include <QFormLayout>
#include "page/spkpagebase.h"
#include "spkstretchlayout.h"
#include "spkimgviewer.h"
namespace SpkUi
{
class SpkDetailEntry;
class SpkClickLabel : public QLabel
{
Q_OBJECT
protected:
virtual void mousePressEvent(QMouseEvent *e) override { emit Pressed(); }
signals:
void Pressed();
};
class SpkPageAppDetails : public SpkPageBase
{
Q_OBJECT
public:
SpkPageAppDetails(QWidget *parent = nullptr);
~SpkPageAppDetails();
void LoadAppResources(QString pkgName, QString icon, QStringList screenshots, QStringList tags);
void SetWebsiteLink(QString url);
void SetPackagePath(QString url);
private:
QString mPkgPath;
QPixmap mBrokenImg, mIconLoading;
public slots:
void ResourceAcquisitionFinished(int id, ResourceResult result);
void Activated();
public:
static constexpr QSize IconSize { 144, 144 };
// Main Area
QScrollArea *mMainArea, *mScreenshotArea;
QWidget *mDetailWidget, *mIconTitleWidget, *mWid4MainArea, *mWid4ShotArea;
QLabel *mAppTitle, *mAppIcon, *mAppDescription, *mAppShortDesc, *mPkgName, *mVersion,
*mWebsite;
SpkDetailEntry *mAuthor, *mContributor, *mSite, *mArch, *mSize;
SpkStretchLayout *mDetailLay;
QVBoxLayout *mDetailsLay, *mTitleLay, *mMainLay;
QHBoxLayout *mIconTitleLay, *mScreenshotLay;
QList<SpkClickLabel*> mScreenshotPreviews;
QMap<int, QPixmap> mAppImages;
SpkImgViewer *mImgViewer;
// Bottom bar
QWidget *mBottomBar;
QPushButton *mBtnInstall, *mBtnDownload, *mBtnUninstall, *mBtnRequestUpdate, *mBtnReport;
QHBoxLayout *mBottomBarLay;
signals:
void RequestDownload(QString name, QString pkgName, QString path);
private slots:
void ImageClicked();
};
class SpkDetailEntry : public QWidget
{
Q_OBJECT
public:
SpkDetailEntry(QWidget *parent = nullptr);
void SetTitle(const QString &s) { mTitle.setText(s); }
void SetValue(const QString &s) { mField.setText(s); }
private:
QLabel mTitle, mField;
QHBoxLayout mLay;
};
}

View File

@@ -1,63 +0,0 @@
#pragma once
#include <QtWidgets>
#include "spkresource.h"
#include "spkappitem.h"
#include "page/spkpagebase.h"
#include "spkstretchlayout.h"
namespace SpkUi
{
class SpkPageAppList : public SpkPageBase
{
Q_OBJECT
public:
SpkPageAppList(QWidget *parent = nullptr);
void AddApplicationEntry(QString name, QString pkgName, QString description, QString iconUrl,
int appId);
void ClearAll();
void SetPageStatus(int total, int current, int itemCount, QString &keyword);
void SetCurrentCategory(int categoryId) { mCategoryId = categoryId; }
private:
void DisablePageSwitchers();
public:
private:
QVBoxLayout *mMainLay;
QHBoxLayout *mPageSwitchLay;
QPushButton *mBtnPgUp, *mBtnPgDown, *mBtnGotoPage;
QLineEdit *mPageInput;
QScrollArea *mAppsArea;
QLabel *mPageIndicator;
QWidget *mAppsWidget, *mPageSwitchWidget;
SpkStretchLayout *mItemLay;
QList<SpkAppItem *> mAppItemList;
// Cached icons
QPixmap *mLoadingIcon,
*mBrokenIcon;
QIntValidator *mPageValidator;
int mCategoryId, mCurrentPage;
QString mKeyword;
signals:
void ApplicationClicked(int appId);
void SwitchListPage(int categoryId, int page);
void SwitchSearchPage(QString keyword, int page);
public slots:
void ResourceAcquisitionFinished(int id, ResourceResult result);
void Activated();
private slots:
void PageUp();
void PageDown();
void GotoPage();
};
}

View File

@@ -1,27 +0,0 @@
#pragma once
#include <QtWidgets>
#include <spkresource.h>
class SpkPageBase : public QWidget
{
Q_OBJECT
public:
SpkPageBase(QWidget *parent = nullptr);
public slots:
/**
* @brief This signal is emitted by resource manager when a resource acquisition requested
* has finished.
* @param id The request ID
* @param result The data retrieved
*/
virtual void ResourceAcquisitionFinished(int id, ResourceResult result);
/**
* @brief This is an optional signal for Resource Context objects, mainly used for notifying the
* context that it is now activated (therefore it needs to acquire the resource manager).
*/
virtual void Activated();
};

View File

@@ -1,45 +0,0 @@
#ifndef SPKPAGEDOWNLOADS_H
#define SPKPAGEDOWNLOADS_H
#include "spkdownload.h"
#include "spkdownloadentry.h"
#include "page/spkpagebase.h"
#include "pkgs/spkpkgmgrbase.h"
namespace SpkUi
{
class SpkPageDownloads : public SpkPageBase
{
Q_OBJECT
public:
SpkPageDownloads(QWidget *parent = nullptr);
~SpkPageDownloads();
public slots:
void AddDownloadTask(QString name, QString pkgName, QString path);
private:
// Logic
SpkDownloadMgr *mDownloadMgr;
QMap<uint, SpkDownloadEntry*> mEntries;
uint mNextDownloadId;
QQueue<QPair<int, QString>> mWaitingDownloads;
enum { Idle, Waiting, Downloading } mCurrentStatus;
// UI
QVBoxLayout *mLayEntries, *mMainLay;
QWidget *mScrollWidget;
QScrollArea *mScrollArea;
private slots:
void DownloadProgress(qint64 downloadedBytes, qint64 totalBytes, int id);
void DownloadStopped(SpkDownloadMgr::TaskResult status, int id);
void EntryAction(SpkDownloadEntry::EntryAction);
void InstallationEnded(int id, SpkPkgMgrBase::PkgInstallResult, int exitCode);
private:
void NewDownloadTask(int id, QString downloadPath);
};
}
#endif // SPKPAGEDOWNLOADS_H

View File

@@ -1,25 +0,0 @@
#pragma once
#include <QVBoxLayout>
#include "page/spkpagebase.h"
#include "ui_homepage.h"
namespace SpkUi
{
class SpkPageHome : public SpkPageBase
{
Q_OBJECT
public:
SpkPageHome(QWidget *parent = nullptr);
~SpkPageHome() { }
Ui::SpkHomepage *ui;
private slots:
void LinkActivated(QString);
private:
void SetupUi();
};
}

View File

@@ -1,56 +0,0 @@
#pragma once
#include <QScrollArea>
#include <QVBoxLayout>
#include <QFutureWatcher>
#include <QMutex>
#include "page/spkpagebase.h"
#include "ui_settings.h"
namespace SpkUi
{
class SpkPageSettings : public SpkPageBase
{
Q_OBJECT
public:
SpkPageSettings(QWidget *parent = nullptr);
~SpkPageSettings();
void SetupUi();
void ReadConfiguration();
void SaveConfiguration();
void CountCleaning();
virtual void Activated() override;
private slots:
void on_btnCleanDownloadedContent_clicked();
void on_btnCleanResourceCache_clicked();
void on_btnViewDownloadedContent_clicked();
void on_btnViewResourceCache_clicked();
void CountFinishResource();
void CountFinishDownload();
void CleanedResource();
void CleanedDownload();
private:
QScrollArea *mMainArea;
QVBoxLayout *mMainLay;
QWidget *mSettingsWidget;
Ui::SpkUiSettings *ui;
QString mRepoListUrl;
QFutureWatcher<void> mFwResourceCount,
mFwDownloadCount,
mFwResourceClean,
mFwDownloadClean;
QMutex mMutResource, mMutDownload;
int64_t mBytesResource, mBytesDownloads;
};
}

View File

@@ -1,63 +0,0 @@
#pragma once
#include <QWidget>
#include <QSplitter>
#include <QPushButton>
#include <QRadioButton>
#include <QCheckBox>
#include <QGroupBox>
#include <QTextEdit>
#include <QLineEdit>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QSlider>
#include <QProgressBar>
#include "spkappitem.h"
#include "spkstretchlayout.h"
#include "page/spkpageappdetails.h"
#include "spkiconbutton.h"
#include "spkloading.h"
namespace SpkUi
{
class SpkPageUiTest : public QSplitter
{
Q_OBJECT
public:
SpkPageUiTest(QWidget *parent = nullptr);
QWidget *WidL, *WidR;
QVBoxLayout *VLayWidgets,
*VLayTestWidgets,
*VLayInput;
QHBoxLayout *HLay4Slider,
*HLayInputBtns;
QTextEdit *TextStylesheet;
QPushButton *BtnApply;
QPushButton *BtnFetch;
QPushButton *Btn;
QCheckBox *Chk;
QRadioButton *Rad;
QGroupBox *Group;
QSlider *SlideH;
QSlider *SlideV;
SpkIconButton *IconBtn;
QProgressBar *Prog;
SpkLoading *Loading;
SpkAppItem *AppItem;
SpkStretchLayout *DetailsLay;
SpkDetailEntry *Detail1, *Detail2, *Detail3;
QWidget *DetailsWidget;
QLineEdit *PopupText;
QPushButton *ShowPopup,
*ShowAbout,
*ShowPkgmgr;
public slots:
void SetStylesheet();
void FetchStylesheet();
void ShowPopupSlot();
};
}

View File

@@ -1,36 +0,0 @@
#pragma once
#include "spkpkgmgrbase.h"
#include <QProcess>
class SpkPkgMgrApt final : public SpkPkgMgrBase
{
Q_OBJECT
public:
SpkPkgMgrApt(QObject *parent = nullptr);
static bool DetectRequirements();
virtual PkgInstallResult ExecuteInstallation(QString pkgPath,
int entryId) override;
// APT backend specific
bool ChangeServerRepository(QString content);
private:
void CheckInstallerAvailability();
private slots:
void InstallerExited(int, QProcess::ExitStatus);
private:
QAction *mActAptitudeTerm,
*mActAptTerm,
*mActGdebi,
*mActDeepinPkgInst;
QProcess mInstaller;
};

View File

@@ -1,91 +0,0 @@
#pragma once
#include <QObject>
#include <QMenu>
#include <QAction>
#include <QCursor>
#include <QUrl>
#include <QDesktopServices>
#include "spkutils.h"
class SpkPkgMgrBase : public QObject
{
Q_OBJECT
public:
SpkPkgMgrBase(QObject *parent = nullptr) : QObject(parent)
{
Q_ASSERT(mInstance == nullptr);
mInstance = this;
mActOpen = new QAction(tr("Open package"), this);
mActOpenDir = new QAction(tr("Open containing directory"), this);
mMenu = new QMenu(tr("Package Actions"));
mMenu->addAction(mActOpen);
mMenu->addAction(mActOpenDir);
mMenu->setAttribute(Qt::WA_TranslucentBackground);
mMenu->setWindowFlags(Qt::Popup | Qt::FramelessWindowHint);
}
enum PkgInstallResult
{
Failed,
Succeeded,
Ignored ///< No installation action is taken, no messages be displayed
};
/**
* @brief Detects if this system qualified to use this kind of packaging
*/
static bool DetectRequirements() { return true; }
/**
* @brief Popup a menu at cursor to select installation methods
* and do installation accordingly
* @param pkgPath Path to the package file
* @param entryId ID of the download entry
*/
virtual PkgInstallResult ExecuteInstallation(QString pkgPath, int entryId)
{
Q_UNUSED(entryId);
auto item = mMenu->exec(QCursor::pos());
if(item == mActOpenDir)
QDesktopServices::openUrl(QUrl(SpkUtils::CutPath(pkgPath)));
else if(item == mActOpen)
QDesktopServices::openUrl(QUrl(pkgPath));
return Ignored;
}
/**
* @brief Called when Spark Store installs a software when it's running
* in CLI mode
* @param pkgPath Path to the package file
*/
virtual PkgInstallResult CliInstall(QString pkgPath)
{
qInfo() << tr("Spark Store cannot install your package because no supported "
"packaging system has been found. You shall decide what you "
"want to do with the downloaded package.\n\n"
"File path:")
<< pkgPath;
return Ignored;
}
public:
static SpkPkgMgrBase *Instance() { return mInstance; }
protected:
QAction *mActOpenDir, *mActOpen, *mActDesc;
QMenu *mMenu;
int mCurrentItemId; ///< ID of currently installing download item
private:
static SpkPkgMgrBase *mInstance;
signals:
void ReportInstallResult(int entryId,
SpkPkgMgrBase::PkgInstallResult result,
int exitCode);
};

View File

@@ -1,20 +0,0 @@
#pragma once
#include "spkpkgmgrbase.h"
class SpkPkgMgrPacman final : public SpkPkgMgrBase
{
Q_OBJECT
public:
SpkPkgMgrPacman(QObject *parent = nullptr);
static bool DetectRequirements();
virtual PkgInstallResult ExecuteInstallation(QString pkgPath,
int entryId) override;
};

View File

@@ -1,87 +0,0 @@
#pragma once
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
/*
* Slight modifications has been done to the code to make it fit into the project.
*/
#include <QFrame>
#include <QString>
//! [0]
class ElidedLabel : public QFrame
{
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText)
Q_PROPERTY(bool isElided READ isElided)
public:
explicit ElidedLabel(const QString &text, QWidget *parent = nullptr);
explicit ElidedLabel(QWidget *parent = nullptr);
void setText(const QString &text);
const QString & text() const { return content; }
bool isElided() const { return elided; }
protected:
void paintEvent(QPaintEvent *event) override;
signals:
void elisionChanged(bool elided);
private:
bool elided;
QString content;
};
//! [0]

View File

@@ -1,23 +0,0 @@
#pragma once
#include <QLabel>
#include <QPushButton>
#include <QHBoxLayout>
#include "spkdialog.h"
class SpkAbout : public SpkDialog
{
Q_OBJECT
public:
SpkAbout(QWidget* parent = nullptr);
~SpkAbout();
static void Show();
private:
QHBoxLayout *mIconLay;
QLabel *mSpkIcon;
QLabel *mSpkVersion;
QLabel *mDescriptionText;
};

View File

@@ -1,41 +0,0 @@
#pragma once
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include "qt/elidedlabel.h"
class SpkAppItem : public QWidget
{
Q_OBJECT
public:
SpkAppItem(int appId, QWidget *parent = nullptr);
void SetIcon(QPixmap p) { mIcon->setPixmap(p); }
void SetTitle(QString s) { mTitle->setText(s); }
void SetDescription(QString s) { mDescription->setText(s); }
protected:
void paintEvent(QPaintEvent *e);
void mousePressEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
public:
static constexpr int IconSize = 72;
static constexpr QSize IconSize_ = { IconSize, IconSize };
private:
QLabel *mIcon;
QLabel *mTitle;
ElidedLabel *mDescription;
int mAppId;
bool mPressCond;
QVBoxLayout *mLayText;
QHBoxLayout *mMainLay;
signals:
void clicked(int);
};

View File

@@ -1,51 +0,0 @@
#ifndef SPKCONFIG_H
#define SPKCONFIG_H
#include <QSettings>
#include <QHash>
#include <QPair>
#include <functional>
class SpkConfig : public QObject
{
Q_OBJECT
public:
SpkConfig(QObject *parent, QString configPath);
~SpkConfig();
/**
* @brief BindField If a variable is bound to the specified key, then future chanegs via SetField
* will modify the provided variable. A callback can also be specified to make
* sure the chanegs are acceptable.
* @param key
* @param value A pointer to the variable to be bound
* @param defaultValue
* @param callback When SetField is called to modify this specific key associated with a callback,
* the callback is called. If the callback returned false then the original value
* is restored to the value target, and changes won't be saved in mSettings, and
* SetField will return false too. It is used to ensure if the target can accept
* the changes.
* @return false when the key is already bound.
*/
bool BindField(QString key, QString* value, QString defaultValue, std::function<bool(void)> callback = nullptr);
bool BindField(QString key, int* value, int defaultValue, std::function<bool(void)> callback = nullptr);
bool SetField(QString key, QString value);
bool SetField(QString key, int value);
// Wrapper of QSettings::value, used for "read once on startup" configurations
QVariant ReadField(QString key, QVariant defaultValue);
// Wrapper of QSettings::setValue, used for "set and restart to take effect" configurations
void SetSettings(QString key, QVariant value);
// Wrapper of QSettings::sync
void Sync();
private:
QSettings mSettings;
QHash<QString, QPair<QString*, std::function<bool(void)>>> mStringBindMap;
QHash<QString, QPair<int*,std::function<bool(void)>>> mIntBindMap;
};
#endif // SPKCONFIG_H

View File

@@ -1,40 +0,0 @@
#pragma once
#include <QList>
#include <QButtonGroup>
#include "spkui_general.h"
#include "spktitlebar.h"
#include "spkwindow.h"
class SpkDialog : public SpkWindow
{
Q_OBJECT
friend class SpkMsgBox;
public:
SpkDialog(QWidget *parent = nullptr);
~SpkDialog();
void AddButton(QString text, SpkUi::SpkButtonStyle style = SpkUi::SpkButtonStyle::Normal);
void AddWidget(QWidget*);
void AddLayout(QLayout*);
void AddSpacing(int);
void AddStretch(int a = 0);
void SetMargin(int);
void SetMargin(int, int, int, int);
int Exec();
private slots:
void ButtonPressed(int);
void ForceClose();
signals:
void ExitEventLoop(int);
void CloseWindow();
protected:
QWidget *mDialogWidget;
private:
QVBoxLayout *mMainVLay, *mWidgetsVLay;
QHBoxLayout *mBtnLay;
QButtonGroup *mBtnGroup;
QList<QObject*> mWidgetsList, mParentsList;
};

View File

@@ -1,125 +0,0 @@
#pragma once
#include "spkstore.h"
#include <QTimer>
/**
* @note SpkDownloadMgr does NOT do download scheduling and other things; it's only a multithreaded
* downloader; it manages the threads that are downloading stuff from the Internet.
*
* Because of this, SpkDownloadMgr does not support complex download queues, cannot handle
* pauses, and can only work on a sequential list of tasks.
*/
class SpkDownloadMgr : public QObject
{
Q_OBJECT
public:
SpkDownloadMgr(QObject *parent = nullptr);
~SpkDownloadMgr();
static constexpr int MaximumThreadRetryCount = 3;
enum TaskResult
{
Success = 0,
FailCannotCreateFile, ///< Failed because destination file cannot be created
FailNoVaibleServer, ///< Failed because no server provides file size or download stalled on
///< all of them
FailCancel, ///< User has cancelled the task
Fail
};
/**
* @brief DownloadWorker is not a real worker but more of a worker-like structure. It holds
* information about one download thread, such as offset, total bytes and received bytes.
* Workers' scheduling is still done by SpkDownloadMgr synchronously, avoiding
* unnecessary race conditions and data safety problems.
* DownloadWorker is also used in mFailureRetryQueue to indicate the blocks that needed
* to be retried on other servers.
*
* Each worker has a watch dog value, incremented each time the download speed is
* updated, and zeroed each time the worker has data ready. If the value exceeds a
* preset maximum, then this worker is considered timed out and killed.
*/
struct DownloadWorker
{
QNetworkReply *Reply; ///< Reply from the network
int Watchdog; ///< Watch dog value watching for a timed out worker
qint64 BeginOffset; ///< Where should a worker start downloading
qint64 BytesNeeded; ///< How many bytes a worker should fetch in total
qint64 BytesRecvd; ///< How many bytes a worker has received till now
};
constexpr static int WatchDogMaximum = 7;
struct RemoteFileInfo
{
qint64 Size = -1;
bool SupportPartialDownload = false; ///< Whether this file can be downloaded multithreaded
QByteArray Md5;
};
void SetNewServers(QList<QString> servers);
/**
* @note This function uses BLOCKING IO!
*/
static RemoteFileInfo GetRemoteFileInfo(QUrl url);
QString GetDestFilePath(QString downloadPath);
private:
QList<QString> mServers; ///< Multithreaded download
QList<DownloadWorker> mScheduledWorkers;
// If one scheduled task fails a few times in a row, we must give it up on that server and put
// its responsible block onto this queue so we can try downloading the block from other servers
QQueue<DownloadWorker> mFailureRetryQueue;
QFile mDestFile;
QString mDestFolder, mCurrentRemotePath;
RemoteFileInfo mCurrentRemoteFileInfo;
QTimer mProgressEmitterTimer;
qint64 mDownloadedBytes;
int mCurrentDownloadId; ///< Indicates download status. -1 means no download going on.
int mActiveWorkerCount;
QString mBulkServerPaths; ///< Config string, modification are taken care of by callback.
public slots:
void SetDestinationFolder(QString path);
/**
* @brief StartNewDownload try to start new download task.
* @param path File path. Domain name excluded. No leading slashes.
* @param downloadId Emitted with progress, finish and error so the UI know whose status it is.
* @return true for success and false for failure.
*/
bool StartNewDownload(QString path, int downloadId);
bool PauseCurrentDownload();
bool CancelCurrentDownload();
private slots:
void WorkerFinish();
void WorkerDownloadProgress(); ///< Be connected to ***QNetworkReply::readyRead***
void WorkerError(QNetworkReply::NetworkError);
void ProgressTimer();
private:
void ProcessWorkerError(DownloadWorker &, int id);
void LinkReplyWithMe(QNetworkReply*);
void TryScheduleFailureRetries();
void TryScheduleFailureRetries(int i); ///< Try schedule on a specific task slot.
bool ServerAddressesChangedCallback(); ///< Called by SpkConfig upon address changing
signals:
void DownloadProgressed(qint64 bytes, qint64 total, int id);
void DownloadStopped(TaskResult status, int id);
};

View File

@@ -1,78 +0,0 @@
#pragma once
#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include "qt/elidedlabel.h"
#include "spkloading.h"
#include <QProgressBar>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QTime>
class SpkDownloadEntry : public QWidget
{
Q_OBJECT
public:
explicit SpkDownloadEntry(QWidget* parent = nullptr);
~SpkDownloadEntry();
static constexpr QSize IconSize { 64, 64 };
enum DownloadEntryStatus
{
Invalid = -1,
Waiting,
Starting,
Downloading,
DownloadFailed,
ToBeInstalled,
Installing,
Installed,
InstallFailed
};
void SetTotalBytes(qint64 total);
void SetBasicInfo(QString name, QPixmap icon, QString filePath);
void SetStatus(DownloadEntryStatus status, QString msg = "");
void Progress(qint64 bytes);
QString GetTaskName() { return mAppName->text(); }
QString GetFilePath() { return mFilePath; }
enum EntryAction
{
AbortDownload,
RetryDownload,
StartInstall,
RemoveEntry
};
private slots:
void ActionButton();
void DeleteButton();
private:
QLabel *mIcon, *mMessage;
ElidedLabel *mAppName;
QProgressBar *mProgress;
QPushButton *mBtnDelete,
*mBtnActions; // Actions include Retry Pause Install etc, one status at a time
SpkLoading *mLoading;
QHBoxLayout *mLayMsgs, *mLayMain;
QVBoxLayout *mLayInfo;
// Download status data
qint64 mTotalBytes, mDownloadedBytes;
QTime mLastReportTime;
QString mReadableTotalSize;
QString mFilePath;
DownloadEntryStatus mStatus;
signals:
void Action(EntryAction);
};

View File

@@ -1,4 +0,0 @@
#ifndef SPKFILLWIDGET_H
#define SPKFILLWIDGET_H
#endif // SPKFILLWIDGET_H

View File

@@ -1,19 +0,0 @@
#pragma once
#include <QtWidgets/QLineEdit>
class SpkFocusLineEdit final : public QLineEdit
{
Q_OBJECT
public:
explicit SpkFocusLineEdit(QWidget *parent = nullptr) : QLineEdit(parent) {}
protected:
void focusInEvent(QFocusEvent *e) override { emit focusGained(); }
void focusOutEvent(QFocusEvent *e) override { emit focusLost(); }
signals:
void focusGained();
void focusLost();
};

View File

@@ -1,30 +0,0 @@
#ifndef SPKICONBUTTON_H
#define SPKICONBUTTON_H
#include <QPushButton>
#include "spkui_general.h"
class SpkIconButton : public QPushButton
{
Q_OBJECT
public:
SpkIconButton(QWidget *parent = nullptr);
~SpkIconButton() {};
void SetIcon(QIcon, QSize);
void SetIcon(QPixmap);
void SetIconSize(QSize);
protected:
void paintEvent(QPaintEvent *) override;
private:
static enum { Dark, Light } sCurrentTheme;
QPixmap mPmapPaintedIcon;
QSize mPmapSize;
static constexpr int IconMargin = 8; // shall we make it changable?
};
#endif // SPKICONBUTTON_H

View File

@@ -1,61 +0,0 @@
#pragma once
#include <QPainter>
#include <QScrollArea>
#include "spkwindow.h"
class ImgView : public QWidget
{
Q_OBJECT
public:
ImgView(QWidget *parent = nullptr) : QWidget(parent) { mPixmap = nullptr; }
void SetPixmap(QPixmap *p) { mPixmap = p; if(p) setFixedSize(p->size()); update(); }
protected:
void paintEvent(QPaintEvent *e)
{
QPainter p(this);
if(mPixmap)
p.drawPixmap(0, 0, *mPixmap);
p.end();
e->accept();
}
private:
QPixmap *mPixmap;
};
class SpkImgViewer : public SpkWindow
{
Q_OBJECT
public:
SpkImgViewer(QWidget *parent = nullptr);
void ShowWithImage(int idx);
void SetImageTotal(int a) { mTotalImg = a; }
public slots:
void Clear();
void SetPixmap(int idx, QPixmap *img);
private slots:
void SwitchToImage(int idx);
protected:
bool event(QEvent*) override;
private:
void ResizeToFitImageSize(QSize);
private:
QPushButton *mBtnPrev, *mBtnNext;
QScrollArea *mImgArea;
QLabel *mImgIndict;
QMap<int, QPixmap*> mImgMap;
int mCurrentImg, mTotalImg;
QPixmap mIconLoading;
ImgView *mImgShow;
};

View File

@@ -1,25 +0,0 @@
#ifndef SPKJSONAPICONSUMER_H
#define SPKJSONAPICONSUMER_H
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QtNetwork/QNetworkAccessManager>
class SpkJsonApiConsumer: public QObject
{
Q_OBJECT
public:
SpkJsonApiConsumer();
private:
QNetworkAccessManager mNet;
public slots:
void RequestUrl(QUrl);
signals:
void RequestFinish(QJsonDocument, int);
};
#endif // SPKJSONAPICONSUMER_H

View File

@@ -1,34 +0,0 @@
#pragma once
#include <QFrame>
#include <QTimeLine>
class SpkLoading : public QFrame
{
Q_OBJECT
public:
explicit SpkLoading(QWidget *parent = nullptr);
virtual void paintEvent(QPaintEvent *e) override;
virtual void resizeEvent(QResizeEvent *e) override;
private:
QTimeLine *mAnimTimer;
QList<int> mSizeList;
int mUserHeight = 0;
int dw, dh;
double dx, dy;
public slots:
void start() { mAnimTimer->start(); }
void stop() { mAnimTimer->stop(); }
void Begin() { start(); setVisible(true); }
void End() { stop(); setVisible(false); }
void setHeight(int h) { mUserHeight = h; }
void reset();
private slots:
void timer(int s);
void loop();
};

View File

@@ -1,44 +0,0 @@
/**
* @brief Simple logging for Spark Store
*/
#pragma once
#pragma push_macro("signals")
#undef signals
#include <libnotify/notify.h>
#define signals DUMMY
#pragma pop_macro("signals")
#include <QString>
#include <QStringListModel>
#include <QTextStream>
#include <QFile>
class SpkLogger
{
QStringListModel mLogData;
QString mLogPath;
QFile mLogFile;
QTextStream mLogWriter;
static SpkLogger *Instance;
void Initialize(QString suggestPath = "");
bool NotifyViable = false;
public:
SpkLogger(QString suggestPath = "");
~SpkLogger();
static SpkLogger *GetInstance() { return Instance; };
void Log(QString message);
void Warning(QString message);
void Error(QString message, bool pop = false);
void Critical(QString message);
void Notify(QString);
};
#define sLog(X) SpkLogger::GetInstance()->Log(X)
#define sWarn(X) SpkLogger::GetInstance()->Warning(X)
#define sErr(X) SpkLogger::GetInstance()->Error(X)
#define sErrPop(X) SpkLogger::GetInstance()->Error(X,true)
#define sCritical(X) SpkLogger::GetInstance()->Critical(X)
#define sNotify(X) SpkLogger::GetInstance()->Notify(X)

View File

@@ -1,236 +0,0 @@
//
// Created by rigoligo on 2021/5/9.
//
#pragma once
#include "spkwindow.h"
#include <vector>
#include <QTextEdit>
#include <QStackedWidget>
#include <QButtonGroup>
#include <QJsonObject>
#include "spksidebartree.h" // In place of #include <QTreeWidget>
#include <QPointer>
#include <QTimeLine>
#include <QQueue>
#include "spkfocuslineedit.h"
#include "spkiconbutton.h"
#include "page/spkpageuitest.h"
#include "page/spkpagehome.h"
#include "page/spkpageapplist.h"
#include "page/spkpageappdetails.h"
#include "page/spkpagedownloads.h"
#include "page/spkpagesettings.h"
class QNetworkReply;
namespace SpkUi
{
enum SpkStackedPages
{
PgInvalid = -1,
PgHomepage,
PgAppList,
PgAppDetails,
PgDownloads,
PgSettings,
PgQssTest // Must be at last
};
const std::vector<SpkStackedPages> ResourceContexts
{
PgAppList
};
class SpkSidebarSelector : public QObject
{
Q_OBJECT
private:
QPushButton *mLastCheckedBtn;
QTreeWidgetItem *mLastSelectedItem;
QTreeWidget *mCategoryWidget;
QVector<QTreeWidgetItem *> mUnusableItems; // Unselectable top level items; never changes
QTreeWidgetItem* mLastCategoryItem;
int mLastCategoryPage;
public:
SpkSidebarSelector(QObject *parent = nullptr) : QObject(parent)
{
mLastCheckedBtn = nullptr;
mLastSelectedItem = nullptr;
}
// Tree item can either represent a page or a category, data of special roles
// help identify them; Buttons instead can only represent a page
constexpr static int RoleItemIsCategory = Qt::UserRole + 1;
constexpr static int RoleItemCategoryPageId= Qt::UserRole + 2;
void BindPageSwitcherButton(QAbstractButton* w)
{
connect(w, &QAbstractButton::toggled,
this, &SpkSidebarSelector::ButtonToggled);
connect(w, &QAbstractButton::pressed,
this, &SpkSidebarSelector::ButtonPressed);
}
void BindCategoryWidget(QTreeWidget* w)
{
mCategoryWidget = w;
connect(w, &QTreeWidget::itemPressed, this,
&SpkSidebarSelector::TreeItemSelected);
}
void AddUnusableItem(QTreeWidgetItem *i) { mUnusableItems.append(i); }
void GoBack()
{
emit SwitchToCategory(mLastCategoryPage, 0);
mCategoryWidget->currentItem()->setSelected(false);
mLastCategoryItem->setSelected(true);
}
private slots:
// We assume the objects in interest all have the correct properties
void ButtonToggled(bool aBtnState)
{
auto b = qobject_cast<QPushButton*>(sender());
if(mLastCheckedBtn)
{
if(mLastCheckedBtn != b)
{
mLastCheckedBtn->setChecked(false);
mLastCheckedBtn = nullptr;
}
}
else if(mLastSelectedItem)
{
mLastSelectedItem->setSelected(false);
mLastSelectedItem = nullptr;
}
mLastCheckedBtn = b;
auto id = b->property("spk_pageno").toInt();
emit SwitchToPage(static_cast<SpkStackedPages>(id));
}
void ButtonPressed()
{ // Prevent a selected button from being deselected by clicking on it
auto b = qobject_cast<QPushButton*>(sender());
if(mLastCheckedBtn == b)
b->setChecked(false);
}
void TreeItemSelected(QTreeWidgetItem *item, int column)
{
if(mUnusableItems.contains(item))
{
UnusableItemSelected(item); return;
}
if(mLastCheckedBtn)
{
mLastCheckedBtn->setChecked(false);
mLastCheckedBtn = nullptr;
}
mLastSelectedItem = item;
auto id = item->data(column, RoleItemCategoryPageId).toInt();
if(item->data(column, RoleItemIsCategory).toBool())
emit SwitchToCategory(id, 0), mLastCategoryPage = id, mLastCategoryItem = item;
else
emit SwitchToPage(static_cast<SpkStackedPages>(id));
}
void UnusableItemSelected(QTreeWidgetItem *i)
{
i->setSelected(false);
if(mLastSelectedItem)
{
mLastSelectedItem->setSelected(true);
}
else if(mLastCheckedBtn)
{
mLastCheckedBtn->setChecked(true);
}
}
signals:
void SwitchToCategory(int aCategoryId, int aPage);
void SwitchToPage(SpkStackedPages aPageId);
};
class SpkMainWidget : public QFrame
{
Q_OBJECT
public:
SpkMainWidget(QWidget *parent = nullptr);
QHBoxLayout *HorizontalDivide;
QStackedWidget *Pager;
// Category widget is for switching pages
SpkIconButton *BtnSettings, *BtnFeedback, *BtnLogs, *BtnDayNight, *BtnBack;
SpkSidebarTree *CategoryWidget;
QMap<int, QTreeWidgetItem> *CategoryItemMap;
SpkSidebarSelector *SidebarMgr;
QTreeWidgetItem *HomepageItem,
*CategoryParentItem,
*AppDetailsItem,
*DownloadsItem,
*UiTestItem;
// Title bar search bar
SpkFocusLineEdit *SearchEdit;
QAction *ActClearSearchBar, *ActSearchIcon;
QTimeLine *SearchBarAnim;
//Pages
SpkPageUiTest *PageQssTest;
SpkPageHome *PageHome;
SpkPageAppList *PageAppList;
SpkPageAppDetails *PageAppDetails;
SpkPageDownloads *PageDownloads;
SpkPageSettings *PageSettings;
};
}
class SpkMainWindow : public SpkWindow
{
Q_OBJECT
private:
SpkUi::SpkMainWidget *ui;
public:
SpkMainWindow(QWidget *parent = nullptr);
void PopulateCategories(QJsonArray);
private:
void Initialize();
private:
QPointer<QNetworkReply> mCategoryGetReply,
mCategoryAppListGetReply,
mAppDetailsGetReply;
SpkUi::SpkStackedPages mCurrentPage = SpkUi::PgInvalid;
QList<QPair<SpkIconButton*, QString>> mThemedUiIconReferences;
public slots:
void ReloadThemedUiIcons();
void RefreshCategoryData();
private slots:
void SwitchDayNightTheme();
void SwitchToPage(SpkUi::SpkStackedPages page);
void CategoryDataReceived();
// Enter a category (and switch pages)
void EnterCategoryList(int aCategoryId, int aPage);
void CategoryListDataReceived();
// Search a keyword (and switch pages)
void SearchKeyword(QString aKeyword, int aPage);
void SearchDataReceived();
// Enter the details page of an application (and switch pages)
void EnterAppDetails(int aAppId);
void AppDetailsDataReceived();
private:
void PopulateAppList(QJsonObject appData, QString &&keyword);
void PopulateAppDetails(QJsonObject appDetails);
};

View File

@@ -1,20 +0,0 @@
#pragma once
#include <QStyle>
#include <QMessageBox>
#include "spkdialog.h"
class SpkMsgBox : public SpkDialog
{
Q_OBJECT
public:
SpkMsgBox(QWidget *parent = nullptr);
static int StaticExec(QString msg, QString title, QMessageBox::Icon = QMessageBox::NoIcon,
QMessageBox::StandardButtons = QMessageBox::Ok, QString extra = "",
bool expanded = false);
private:
static void AddButtons(SpkMsgBox *me, QMessageBox::StandardButtons b);
QList<QMessageBox::StandardButton> mButtonList;
static constexpr QSize IconSize {48, 48};
static constexpr int Margin = 10;
};

View File

@@ -1,17 +0,0 @@
#pragma once
#include <QLabel>
class SpkNotifyDot : public QLabel
{
Q_OBJECT
public:
SpkNotifyDot(QWidget *parent = nullptr);
~SpkNotifyDot() {}
protected:
virtual void paintEvent(QPaintEvent *) override;
// virtual int widthForHeight(int h) override;
};

View File

@@ -1,30 +0,0 @@
#pragma once
#include <QLabel>
#include <QWidget>
#include <QHBoxLayout>
#include <QPropertyAnimation>
#include <QSequentialAnimationGroup>
class SpkMainWindow;
namespace SpkUi
{
class SpkPopup : public QWidget
{
Q_OBJECT
public:
SpkPopup(QWidget *parent, int aMillis = 3000);
public slots:
void Show(QString aText);
private:
QPoint MoveOffset;
QLabel *mText;
QHBoxLayout *mBox;
QPropertyAnimation *mAnimFadeIn, *mAnimFadeOut;
QSequentialAnimationGroup *mAnim;
};
}

View File

@@ -1,51 +0,0 @@
#pragma once
#include <map>
#include <list>
#include <QColor>
namespace SpkUi
{
QColor ColorTextOnBackground(QColor);
namespace Qss
{
enum ColorSetIndex
{
GlobalBgnd = 0,
ControlsBgnd,
ControlsBgndHighlighted,
SelectionBgnd, AccentColor = SelectionBgnd,
SelectionBgndHighlighted, AccentColorHighlighted = SelectionBgndHighlighted,
LightCtrlsGradLight,
LightCtrlsGradDark,
LightCtrlsGradDarker,
LightCtrlsDisabledBackground,
DarkCtrlsGradLight,
DarkCtrlsGradDark,
DarkCtrlsGradDarker,
DarkCtrlsDisabledBackground,
TextOnSelection, TextOnAccentColor = TextOnSelection,
TextOnGlobalBgnd,
TextOnControlsBgnd,
TextLighter,
TextEvenLighter,
TextDisabled,
GlossyEdge,
ShadesEdge,
ScrollBarNorm,
ScrollBarHover,
DivideLine,
};
extern const std::list<ColorSetIndex> AccentColorExceptions;
extern const std::map<ColorSetIndex, const char *> ColorSet2Token;
extern const std::map<ColorSetIndex, QColor>
DarkColorSet, LightColorSet;
using ColorSet = std::map<Qss::ColorSetIndex, QColor>;
}
}

View File

@@ -1,101 +0,0 @@
#pragma once
#include <QObject>
#include <QQueue>
#include <QSemaphore>
#include <QMap>
#include <QNetworkReply>
#include <QVariant>
struct ResourceResult;
class SpkResourceContext;
class SpkPageBase;
class SpkResource : public QObject
{
Q_OBJECT
public:
enum class ResourceType { HomeImage, AppIcon, TagIcon, AppScreenshot, };
enum class ResourceStatus
{
Ready, ///< The resource is ready to be read now and the file link is included
Deferred, ///< The resource is not in cache or outdated, and is being downloaded
Failed, ///< The requested resource can not be downloaded and thus can not be loaded.
};
private:
struct ResourceTask
{
QString pkgName, path;
ResourceType type;
QVariant info;
int id;
};
static const QMap<ResourceType, QString> ResourceName;
public:
SpkResource(QObject *parent = nullptr);
ResourceResult
RequestResource(const int aId, const QString &aPkgName, ResourceType aType, const QString &aPath,
const QVariant &aInfo = 0);
void PurgeCachedResource(const QString &aPkgName, SpkResource::ResourceType aType,
const QVariant &aInfo);
inline QString GetCachePath(const ResourceTask &task);
ResourceResult CacheLookup(QString pkgName, ResourceType type, QVariant info);
/**
* @brief When the resource context was changed, the new context needs to acquire the resource
* manager, so the resource manager can download resource for the new context.
*
* A resource context, in Spark Store, is likely to be a "page" of the UI. AppList is
* a page, Homepage is a page, AppDetails is a page. But each category is not a separated
* context; they're all from AppList page.
* @param dest Pass a SpkResourceContext as the resource acquisition destination. Signals will
* be connected in this function internally. When a resource was downloaded, this
* object will be notified.
* @param clearQueue determines if the awaiting tasks needs to be cleared.
* @param stopOngoing determines if ongoing tasks needs to be terminated.
*/
void Acquire(SpkPageBase *dest, bool stopOngoing, bool clearQueue = true);
public:
static SpkResource* Instance;
const int mMaximumConcurrent; ///< Maximum number of concurrent resource downloads
const QString mCacheDirectory;///< Where caches were stored
private slots:
void ResourceDownloaded();
void TryBeginAwaitingTasks();
private:
ResourceResult LocateCachedResource(const ResourceTask &task);
signals:
void AcquisitionFinish(int id, ResourceResult result);
private:
// Operations to mAwaitingRequests and mWorkingRequests must be all made synchronously.
// When connecting signal/slot pairs regarding operations to them, use QueuedConnection.
QQueue<ResourceTask> mAwaitingRequests;
QSemaphore *mRequestSemaphore;
QMap<QNetworkReply*, int> mWorkingRequests;
};
struct ResourceResult
{
SpkResource::ResourceStatus status;
QByteArray data;
};
Q_DECLARE_METATYPE(ResourceResult);
/**
* @brief SpkResourceContext is meant to be used by connecting signals from it. An object inheriting
* it would be theoretically a resource context. A resource context can acquire a SpkResource
* management object for downloading resources. More details at SpkResource::Acquire.
*/

View File

@@ -1,17 +0,0 @@
#pragma once
#include <QTreeWidget>
namespace SpkUi
{
class SpkSidebarTree : public QTreeWidget
{
Q_OBJECT
public:
SpkSidebarTree(QWidget* parent = nullptr);
protected:
void mouseMoveEvent(QMouseEvent *) override;
void mousePressEvent(QMouseEvent *) override;
};
}

View File

@@ -1,51 +0,0 @@
#pragma once
#include <QJsonDocument>
#include <QString>
#include <QSettings>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkAccessManager>
#include "spklogging.h"
#include "spkresource.h"
#include "spkconfig.h"
class SpkMainWindow;
/**
* @brief SpkStore class is the core of the store client side program, it is constructed first and
* handling all processing after the launch. All client side data should be held by it,
* including preferences class, category names, request URLs, downloads status, packaging
* backend interfaces and so on.
*/
class SpkStore : public QObject
{
Q_OBJECT
public:
static SpkStore *Instance;
SpkConfig *mCfg;
SpkStore(bool aCli, QString &aLogPath);
~SpkStore();
SpkMainWindow* GetRootWindow() { return mMainWindow; }
void SetApiRequestUrl(QString aUrlStr) { mApiRequestUrl = aUrlStr; }
QString GetApiRequestUrl() { return mApiRequestUrl; }
QNetworkReply *SendApiRequest(QString path, QJsonDocument param = QJsonDocument());
QNetworkReply *SendResourceRequest(QString path); ///< WARNING: Only intended for SpkResource!
QNetworkReply *SendDownloadRequest(QUrl file, qint64 fromByte = -1, qint64 toByte = -1);
QNetworkReply *SendCustomHeadRequest(QNetworkRequest);
private:
SpkLogger *mLogger;
SpkMainWindow *mMainWindow = nullptr;
SpkResource *mResMgr = nullptr;
QNetworkAccessManager *mNetMgr = nullptr;
QString mDistroName,
mApiRequestUrl,
mResourceRequestUrl,
mUserAgentStr,
mConfigPath;
};

Some files were not shown because too many files have changed in this diff Show More