Compare commits
236 Commits
4.3.3.1-fi
...
dev
Author | SHA1 | Date | |
---|---|---|---|
b69dca63e3 | |||
f5ef22b64d | |||
b704ee0093 | |||
4c93f0e389 | |||
30acad7516 | |||
1f6e68ca3f | |||
9bf8ff8c50 | |||
0c3151948c | |||
a20e96c63f | |||
59588c90d5 | |||
5a66c86b54 | |||
e603dc3fce | |||
fec28e76e8 | |||
|
a54c8970ee | ||
8e40670f55 | |||
b693c27adf | |||
1be6e62d55 | |||
7b6df76276 | |||
e69deb4b95 | |||
286a8bc2cf | |||
934062aa3b | |||
ce9aa95eac | |||
8f708aa8b2 | |||
ca71fe2787 | |||
f09abddda0 | |||
9bf218cfee | |||
2d53e655f7 | |||
2a88c99607 | |||
38a3b4ee4f | |||
7cad4937c1 | |||
5a84a4d3de | |||
4acd2332bf | |||
6bb3e8dfbf | |||
63910b6491 | |||
ea78b37d86 | |||
d5ad1d0204 | |||
6f89f8b694 | |||
27e41f35f0 | |||
c36492cd0b | |||
cc087030fd | |||
6d5e526834 | |||
c1923ad6af | |||
f300dd1f4d | |||
35d1e8b198 | |||
68d7f42751 | |||
9fdf0051a1 | |||
875e8770a3 | |||
f37d73708b | |||
1e8fcf9bb0 | |||
b261d6433a | |||
196ae84eb5 | |||
b68029f5db | |||
b5e0b709cc | |||
8e617ceda4 | |||
0607df0967 | |||
f925ac7242 | |||
a9d9f035de | |||
8177556e5d | |||
03c53c3977 | |||
567a24a6ec | |||
7fb697f56e | |||
5211bbb951 | |||
525a90f441 | |||
e539fb5912 | |||
703713a706 | |||
b6de24e098 | |||
88a157dd45 | |||
34b8670a40 | |||
d5b2d4ddf4 | |||
01bb90879b | |||
1c64278723 | |||
17c90c5d07 | |||
539607553d | |||
85daec6428 | |||
e38d23dba0 | |||
7da6689e6d | |||
73a3733bc1 | |||
9593ebb813 | |||
fd1f13f59d | |||
50c916a8cc | |||
f7baf015c0 | |||
90b21d40cf | |||
c5b5b6d3ba | |||
ef4b21fb8c | |||
72e3d54f8d | |||
50fd18fbe4 | |||
e98def4839 | |||
da65d3b90e | |||
e416ffdbff | |||
33c892b39d | |||
f071fcb00d | |||
a2aadf44e3 | |||
c0e670f6c1 | |||
59f506c8e6 | |||
ca6e47e9a3 | |||
0ca73a2a28 | |||
9493f0738a | |||
688ed679b5 | |||
233b5e8c76 | |||
4fc8ef3f48 | |||
cd4f104e1a | |||
9b92894e4f | |||
05a5b89464 | |||
d5af9c2cf1 | |||
fb6446292c | |||
616453ed7d | |||
3ef8f4da7f | |||
a743002b12 | |||
7ab203c86a | |||
5bc65827b2 | |||
8b408d42d3 | |||
ef2a0027c1 | |||
9ae6e00d71 | |||
c0b2edf1b0 | |||
2cb69c72f3 | |||
705478fdf0 | |||
75ac14a8b8 | |||
a779a3532b | |||
50adf55762 | |||
f08366a3d5 | |||
8cb92d9972 | |||
9e15e701c2 | |||
3ba3364fb9 | |||
064b068135 | |||
051b04bf0b | |||
f72ab76e2c | |||
6640dc9bba | |||
4e1b04bf6e | |||
3c2a6ac635 | |||
0d12df77cc | |||
86b57ecdc1 | |||
4a846b825c | |||
ea6e7a19bd | |||
930111f2df | |||
b708b63113 | |||
42b25b33dc | |||
d454a58671 | |||
34d2ef715e | |||
8ff21d81c4 | |||
0d1f23e017 | |||
89b366d35f | |||
74cc0fbce9 | |||
93dfdbc57c | |||
24f3be1373 | |||
f7fcf5ef11 | |||
b35ac593cb | |||
a9c137110c | |||
48257722fb | |||
623db2ea76 | |||
059ac5b270 | |||
c54785224c | |||
aa0bcff076 | |||
e62451ff89 | |||
6d67571545 | |||
8e9528dfa8 | |||
e331f8d580 | |||
3dde50ce27 | |||
7a1eeb8d4d | |||
bbc4d27d7a | |||
fdd5fcaef1 | |||
782066cf57 | |||
ddf1f7396b | |||
17b5c9afce | |||
65172300be | |||
b8846eb9b6 | |||
e602dd8823 | |||
b0c688a6c8 | |||
dc28c2e9d1 | |||
b4935edf0a | |||
4f294cee8f | |||
45c52d7755 | |||
90ad08a6f9 | |||
819e680222 | |||
6697bd04f1 | |||
2a6e9046e7 | |||
460d965ac1 | |||
2b929f8a06 | |||
f2cafe0567 | |||
564966daef | |||
668e5dc28d | |||
7ae592776d | |||
6f3980e6cb | |||
e2a0079c6e | |||
73f84a2861 | |||
8218080f40 | |||
264b0ba8da | |||
b114db583b | |||
832b53dfc9 | |||
244f58ecce | |||
470666cf41 | |||
4abfc19399 | |||
e3e8684f18 | |||
|
c60399df0b | ||
|
9036140ceb | ||
|
da7e8ea9fc | ||
a158966e2d | |||
105c7f3751 | |||
|
aa3f2fbce4 | ||
1ab8da0e1a | |||
072be29804 | |||
8e7aa445cf | |||
f5faebe91e | |||
5bcf2ce4f5 | |||
992d1e7023 | |||
86f8a3b501 | |||
46a1daeafc | |||
0566d546df | |||
b3eb13ada5 | |||
19bfd4031c | |||
d2844b8b8a | |||
f02c279c8a | |||
|
6fa0e11927 | ||
f0830822c7 | |||
7c9b503b0e | |||
|
5a248859ec | ||
f03e032a1b | |||
9657c13106 | |||
a3355516cf | |||
|
eb88fc85c5 | ||
|
5dc0d52530 | ||
c8cbaa9c8b | |||
11d7073905 | |||
5e55607dbf | |||
|
761f67f02c | ||
97755980bc | |||
beaa19e9e5 | |||
8cfd219d67 | |||
b153edf8dc | |||
90ed903197 | |||
4c59762086 | |||
a49c35dbcb | |||
b6f57c727b | |||
d0dec1b3b0 | |||
b125993336 | |||
5a37f24145 | |||
a7b32db9b5 |
@ -7,7 +7,7 @@ import json
|
||||
sha = os.getenv("GIT_COMMIT")
|
||||
# sha = '48fed26c51a8c42554e45f72f43e49703e04c97f'
|
||||
#get sha from environment
|
||||
url = "https://gitee.com/api/v5/repos/deepin-community-store/spark-store/commits/{}/comments".format(sha)
|
||||
url = "https://gitee.com/api/v5/repos/spark-store-project/spark-store/commits/{}/comments".format(sha)
|
||||
|
||||
token = os.getenv("gitee_token")
|
||||
|
||||
|
2
.gitignore
vendored
@ -53,4 +53,4 @@ debian/*.substvars
|
||||
debian/spark-store
|
||||
|
||||
.vscode/*
|
||||
src/spark-store
|
||||
obj-*
|
||||
|
@ -34,7 +34,7 @@ stages:
|
||||
- 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
|
||||
- wget https://gitee.com/spark-store-project/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
|
||||
- ''
|
||||
|
@ -30,7 +30,7 @@
|
||||
`{SOURCE_URL}/{ARCH}/{CATOGARY}/applist.json`
|
||||
说明:SOURCE_URL:线路链接,目前推荐 https://cdn.d.store.deepinos.org.cn,你也可以使用其他的星火线路
|
||||
ARCH:架构文件夹 x86是store或amd64-store,arm是aarch64-store。特别的,如果你使用非https://cdn.d.store.deepinos.org.cn的线路,你可能会发现amd64-store会返回404,因为不是所有的服务器都支持软连接
|
||||
CATOGARY:分类目录。参考 https://gitee.com/deepin-community-store/spark-store/blob/dev/DOCS/spk-doc.md 中 store 直达的对应关系
|
||||
CATOGARY:分类目录。参考 https://gitee.com/spark-store-project/spark-store/blob/dev/DOCS/spk-doc.md 中 store 直达的对应关系
|
||||
|
||||
例子:https://cdn.d.store.deepinos.org.cn/aarch64-store/tools/applist.json
|
||||
|
||||
|
@ -4,4 +4,4 @@
|
||||
|
||||
为方便使用(其实是早期屎山使然),请将仓库放置于 `/home/ftp/spark-store`
|
||||
|
||||
仓库管理相关代码请移步 [这里](https://gitee.com/deepin-community-store/repo_auto_update_script),update.sh请联系 @shenmo 获取
|
||||
仓库管理相关代码请移步 [这里](https://gitee.com/spark-store-project/repo_auto_update_script),update.sh请联系 @shenmo 获取
|
92
FAQ.md
@ -1,91 +1,91 @@
|
||||
# FAQ
|
||||
## Spark App Store FAQ and Support Guide
|
||||
## Spark Store FAQ and Support Guide
|
||||
|
||||
### Introduction
|
||||
The Spark App Store is an application store aimed at Linux users and supports multiple Linux distributions. Below are some commonly asked questions and solutions. Please note that this document is primarily intended for ordinary users who are not familiar with Linux and the APT package management system.
|
||||
The Spark Store is an application store designed for Linux users, supporting various Linux distributions. Below are some frequently asked questions and their solutions. Please note that this document primarily targets ordinary users unfamiliar with Linux and the `apt` package management system.
|
||||
|
||||
---
|
||||
|
||||
### Communication and Feedback
|
||||
**Q: Where can I join the community group?**
|
||||
**A:** You can click [here](https://www.deepinos.org/) to enter the main communication platform of the Spark Store.
|
||||
> ⚠️ If the above link doesn't work, you can also join our QQ groups as an alternative. The group numbers are 872690351 and 865927727. We also offer forums for communication.
|
||||
**Q: How can I participate in discussions?**
|
||||
**A:** You can click [this link](https://bbs.spark-app.store/) to enter the Spark Forum for communication.
|
||||
> 📣 You can also join our QQ Discussion Groups: 872690351 and 865927727.
|
||||
|
||||
#### Differences Between arm64 and amd64
|
||||
---
|
||||
|
||||
arm64
|
||||
### Difference Between arm64 and amd64
|
||||
|
||||
* Full Name: Advanced RISC Machine 64-bit
|
||||
* Main Use: Primarily used in mobile devices, embedded systems, and some new servers and desktop computers.
|
||||
* Advantages: Low power consumption, high efficiency, suitable for battery-driven and heat-sensitive devices.
|
||||
* Main Manufacturers: Apple, Qualcomm, HiSilicon, Phytium, etc.
|
||||
#### arm64
|
||||
|
||||
amd64
|
||||
* Full Name: Advanced RISC Machine 64-bit
|
||||
* Primary Use: Mainly applied to mobile devices, embedded systems, and some new servers and desktop computers
|
||||
* Advantages: Low power consumption, high efficiency, suitable for battery-powered and heat-sensitive devices
|
||||
* Major Manufacturers: Apple, Qualcomm, HiSilicon, Phytium, etc.
|
||||
|
||||
* Full Name: AMD 64-bit, also known as x86_64
|
||||
* Main Use: Primarily used in desktop computers, laptops, and servers.
|
||||
* Advantages: High performance, suitable for computation-intensive applications.
|
||||
* Main Manufacturers: Intel and AMD.
|
||||
* The main differences between the two are in the instruction sets and application scenarios. amd64 is usually used for high-performance computers and servers, while arm64 is more commonly used in power-sensitive settings.
|
||||
#### amd64
|
||||
|
||||
* Full Name: AMD 64-bit, also known as x86_64
|
||||
* Primary Use: Mainly applied to desktop computers, laptops, and servers
|
||||
* Advantages: High performance, suitable for compute-intensive applications
|
||||
* Major Manufacturers: Intel and AMD
|
||||
|
||||
The main difference between the two lies in their instruction sets and application scenarios. amd64 is typically used for high-performance computers and servers, while arm64 is more commonly used in environments with strict power consumption requirements.
|
||||
|
||||
#### How to Check:
|
||||
|
||||
Linux:
|
||||
|
||||
- Open the terminal.
|
||||
- Type `uname -m` or `arch` and press Enter.
|
||||
- You will see your processor architecture (possibly x86_64, aarch64, etc.).
|
||||
- Open the Linux terminal
|
||||
- Enter the command `uname -m` or `arch` and press `Enter`
|
||||
- You will see your computer's processor architecture (e.g., x86_64, aarch64)
|
||||
|
||||
---
|
||||
|
||||
### Domestic Architecture Support
|
||||
**Q: I use a domestic chip architecture, how can I get applications?**
|
||||
**A:** Currently, Spark Store supports **arm** architecture for domestic chips. You can download deb packages suitable for arm64 architecture.
|
||||
> ⚠️ Please note that this is experimental support. If you encounter any issues, please provide feedback via Spark's communication platform, QQ group, or forums.
|
||||
**Q: My computer uses a domestic architecture. How can I obtain the Spark Store?**
|
||||
**A:** Currently, the Spark Store supports **ARM** architecture and **LoongArch New World** architecture. You can download deb packages (software installation packages) for arm64 and loong64 architectures.
|
||||
> ⚠️ Please note that this support is experimental. If you encounter issues, please report them to us via the Spark Forum or QQ Discussion Group.
|
||||
|
||||
---
|
||||
|
||||
### Dependency Issues
|
||||
**Q: I get errors when installing dependencies**
|
||||
**A:** If you are using UOS or deepin, please do not install the dependency packages. For Kali Linux/Kdeneon etc., temporary support is not available, please compile and install yourself.
|
||||
> 💡 If errors occur, try running `sudo apt update` before attempting the installation again. If the issue persists, refer to the first question and seek help on the community platform.
|
||||
### Dependency Installation Issues
|
||||
**Q: What if dependency package installation fails?**
|
||||
**A:** If you are using UOS or deepin, do not install dependencies. Only some Linux distributions require dependency packages. For unsupported distributions, you may need to compile manually. See the [Spark Store Introduction](https://gitee.com/spark-store-project/spark-store/blob/dev/README.md).
|
||||
> 💡 When errors occur, run `sudo apt update` first and try again. If the issue persists, refer to the above and seek help via communication platforms.
|
||||
|
||||
---
|
||||
|
||||
### Submission and App Updates
|
||||
**Q: Where can I submit applications?**
|
||||
**A:** You can find the "Submit Application" option in the upper-right corner menu of the app store interface.
|
||||
### Software Submission and Updates
|
||||
**Q: Where can I submit software?**
|
||||
**A:** You can find the "Submit Application" option in the top-right menu of the app store interface. We provide two submission methods: **Submission Tools** and **Online Platform**.
|
||||
|
||||
---
|
||||
|
||||
### Support for Non-deepin/UOS Users
|
||||
**Q: I'm not a deepin/UOS user; can I use the Spark App Store?**
|
||||
**A:** Yes, you can directly install if you're using Ubuntu 22.04. For Ubuntu 20.04/Debian10/Debian11, please install the dependencies first.
|
||||
**Q: Can I use Spark Store if I am not a deepin/UOS user?**
|
||||
**A:** It can be installed normally on Debian-based distributions. For example, if you use Ubuntu 22.04, install directly. For Ubuntu 20.04 / Debian 10 / Debian 11, install dependencies first. Additionally, experience may not be guaranteed if installed on non-Debian Linux distributions.
|
||||
|
||||
---
|
||||
|
||||
### Installation Methods
|
||||
**Q: Can I use dpkg -i for installation?**
|
||||
**A:** No! Use `sudo apt install ./xxxx.deb` to install, or use graphical installers like gdebi.
|
||||
> ⚠️ Using dpkg directly will not handle software dependencies, which is a common mistake.
|
||||
**Q: Can I install using `dpkg -i`?**
|
||||
**A:** We **strongly advise against this**. In the directory where the package is saved, use `sudo apt install ./spark-store*.deb` or a graphical installer like Gdebi.
|
||||
> ⚠️ Direct use of `dpkg` generally does not handle software dependencies, potentially causing installation failures or damaging the system's dependency environment.
|
||||
|
||||
---
|
||||
|
||||
### System Updates
|
||||
**Q: Will the Spark Store affect normal system updates?**
|
||||
**A:** No, the Spark Store has separated its application sources from system sources and will not affect regular system updates.
|
||||
**Q: Will Spark Store affect normal system updates?**
|
||||
**A:** No. The current version of Spark Store has decoupled its application sources from system sources and will not affect normal system updates.
|
||||
|
||||
---
|
||||
|
||||
### Reporting Issues and Removing Apps
|
||||
**Q: Some apps are outdated or inactive, and I want them removed**
|
||||
**A:** You can report issues [here](https://gitee.com/deepin-community-store/software_-issue).
|
||||
### Reporting Issues and Application Removal
|
||||
**Q: Some applications are outdated or invalid. I want them removed.**
|
||||
**A:** You can [report issues here](https://gitee.com/spark-store-project/software_-issue).
|
||||
|
||||
---
|
||||
|
||||
### Installing Spark App Store
|
||||
If you wish to install the Spark App Store, please visit the [Release page](https://gitee.com/deepin-community-store/spark-store/releases), find the latest version, and choose the package suitable for your current system.
|
||||
|
||||
> ⚠️ Special Note: If you are using Debian10/Debian11 or Ubuntu 20.04, you may need to download additional dependency packages. After downloading, unzip multiple times until you see the software user guide. For operating systems later than Ubuntu 22.04, you do not need to install dependency packages. Just follow the steps above to install the main program directly.
|
||||
### Installing Spark Store
|
||||
If you need to install Spark Store, visit the [Release Page](https://gitee.com/spark-store-project/spark-store/releases), find the latest version, and download the installer suitable for your system.
|
||||
|
||||
> ⚠️ Special Note: If you are using Debian 10 / Debian 11 or Ubuntu 20.04, you need to download the dependency supplementary package additionally. After downloading, extract multiple times until dependency instructions are visible, then follow steps to install dependencies. For Ubuntu 22.04 and later, no dependency package is required. Follow the above instructions to install the main program directly.
|
||||
---
|
83
FAQ.zh.md
@ -1,90 +1,91 @@
|
||||
# FAQ
|
||||
## 星火应用商店FAQ与支持指南
|
||||
## 星火应用商店 FAQ 与支持指南
|
||||
|
||||
### 简介
|
||||
星火应用商店是一个面向 Linux 用户的应用商店,支持多种不同的 Linux 发行版。以下是一些常见问题及解决方案。请注意,该文档主要面向对 Linux 和 APT 软件包管理系统不熟悉的普通用户。
|
||||
星火应用商店是一个面向 Linux 用户的应用商店,支持多种不同的 Linux 发行版。以下是一些常见问题及解决方案。请注意,该文档主要面向对 Linux 和 `apt` 软件包管理系统不熟悉的普通用户。
|
||||
|
||||
---
|
||||
|
||||
### 交流与反馈
|
||||
**Q: 在哪进交流群?**
|
||||
**A:** 你可以点击[这里](https://www.deepinos.org/)进入星火商店的主交流平台。
|
||||
> ⚠️ 如果上面的链接无法使用,你还可以加入我们的 QQ 群作为备选方案,群号是 872690351 和 865927727。我们还提供论坛作为交流平台。
|
||||
**Q: 如何参与交流讨论?**
|
||||
**A:** 您可以点击[此链接](https://bbs.spark-app.store/)进入星火社区论坛进行交流。
|
||||
> 📣 您还可以加入我们的 QQ 交流群,群号是 872690351 和 865927727。
|
||||
|
||||
arm64与amd64的区别
|
||||
---
|
||||
|
||||
arm64
|
||||
### arm64 与 amd64 的区别
|
||||
|
||||
* 全称: Advanced RISC Machine 64-bit
|
||||
* 主要用途: 主要应用于移动设备、嵌入式系统以及一些新型的服务器和桌面计算机。
|
||||
* 优势: 低功耗、高效率,适合用在电池驱动和热敏感的设备。
|
||||
#### arm64
|
||||
|
||||
* 全称: Advanced RISC Machine 64-bit;
|
||||
* 主要用途: 主要应用于移动设备、嵌入式系统以及一些新型的服务器和桌面计算机;
|
||||
* 优势: 低功耗、高效率,适合用在电池驱动和热敏感的设备;
|
||||
* 主要生产商: 苹果、高通、海思、飞腾等。
|
||||
|
||||
amd64
|
||||
#### amd64
|
||||
|
||||
* 全称: AMD 64-bit, 也被称为 x86_64
|
||||
* 主要用途: 主要应用于桌面计算机、笔记本以及服务器。
|
||||
* 优势: 高性能,适用于计算密集型应用。
|
||||
* 主要生产商: Intel和AMD。
|
||||
* 两者最主要的不同在于指令集和应用场景。amd64通常用于高性能需求的计算机和服务器,而arm64则更多应用于功耗要求更严格的场合。
|
||||
* 全称: AMD 64-bit, 也被称为 x86_64;
|
||||
* 主要用途: 主要应用于桌面计算机、笔记本以及服务器;
|
||||
* 优势: 高性能,适用于计算密集型应用;
|
||||
* 主要生产商: Intel 和 AMD。
|
||||
|
||||
查看方法:
|
||||
两者最主要的不同在于指令集和应用场景。amd64 通常用于高性能需求的计算机和服务器,而arm64则更多应用于功耗要求更严格的场合。
|
||||
|
||||
Linux:
|
||||
#### 查看方法:
|
||||
|
||||
- 打开终端。
|
||||
- 输入 uname -m 或 arch 并按回车。
|
||||
- 你将看到你的处理器架构(可能是 x86_64, aarch64 等)。
|
||||
- 打开 Linux 终端;
|
||||
- 输入命令 `uname -m` 或 `arch` 并按 `Enter` 键执行;
|
||||
- 您将看到您计算机的处理器架构(可能是 x86_64, aarch64 等)。
|
||||
---
|
||||
|
||||
### 国产架构支持
|
||||
**Q: 我是国产架构,怎么获取应用?**
|
||||
**A:** 目前,星火商店支持**arm**架构的国产芯片。你可以下载适用于 arm64 架构的deb包(软件安装包)。
|
||||
> ⚠️ 请注意,这是实验性的支持。如果遇到问题,请在星火交流平台、QQ群或论坛向我们反馈。
|
||||
**Q: 我的计算机属于国产架构,如何获取星火应用商店?**
|
||||
**A:** 目前,星火商店支持 **ARM** 架构和**龙芯·新世界**架构的国产芯片。您可以下载适用于 arm64 架构和 loong64 架构的 deb 包(软件安装包)。
|
||||
> ⚠️ 请注意,这项支持是实验性的。若遇到问题,请在星火社区论坛或 QQ 交流群向我们反馈。
|
||||
|
||||
---
|
||||
|
||||
### 安装依赖问题
|
||||
**Q: 安装依赖包出现错误**
|
||||
**A:** 如果你使用UOS或deepin,请不要安装依赖包。对于Kali Linux/Kdeneon等,暂时不支持,请自行编译安装。
|
||||
> 💡 出现错误时,尝试运行 `sudo apt update` 后再尝试安装。如果问题仍然存在,请参考第一条,进入交流平台寻求帮助。
|
||||
**Q: 安装依赖包出现错误,怎么办?**
|
||||
**A:** 如果您使用 UOS 或 deepin,请不要安装依赖包。仅有部分 Linux 发行版需要安装依赖包,此外对于不在支持列表中的发行版可能需要您自行编译安装,详见[星火应用商店简介](https://gitee.com/spark-store-project/spark-store/blob/dev/README.zh.md)。
|
||||
> 💡 出现错误时,请运行 `sudo apt update` 后再尝试安装。如果问题仍然存在,请参考上文,进入交流平台寻求帮助。
|
||||
|
||||
---
|
||||
|
||||
### 投稿与应用更新
|
||||
**Q: 在哪里投稿?**
|
||||
**A:** 你可以在应用商店界面的右上角菜单找到“投递应用”的选项。
|
||||
**Q: 在哪里可以投稿软件?**
|
||||
**A:** 您可以在应用商店界面的右上角菜单找到“投递应用”的选项,我们提供了**投递工具**和**在线平台**两种投稿方案。
|
||||
|
||||
---
|
||||
|
||||
### 非deepin/UOS用户支持
|
||||
**Q: 我不是deepin/UOS用户,可以使用星火应用商店吗?**
|
||||
**A:** 可以,如果你是使用 Ubuntu 22.04,请直接安装。对于 Ubuntu 20.04/Debian10/Debian11,请先安装依赖包。
|
||||
### 非 deepin/UOS 用户支持
|
||||
**Q: 我不是 deepin/UOS 用户,可以使用星火应用商店吗?**
|
||||
**A:** 在 Debian 系发行版可正常安装使用。例如,如果您使用 Ubuntu 22.04,请直接安装;对于 Ubuntu 20.04 / Debian 10 / Debian 11,请先安装依赖包。此外,如果您在非 Debian 系 Linux 发行版安装使用星火应用商店,软件的体验可能无法得到保证。
|
||||
|
||||
---
|
||||
|
||||
### 安装方法
|
||||
**Q: 我可以用dpkg -i安装吗?**
|
||||
**A:** 不可以!使用 `sudo apt install ./xxxx.deb` 来安装,或者使用gdebi等图形化的安装器。
|
||||
> ⚠️ 直接使用dpkg是不会处理软件依赖的,这是一个常见的错误。
|
||||
**Q: 我可以用 `dpkg -i` 安装吗?**
|
||||
**A:** 我们**极不建议您这样做**。请在安装包保存目录下,使用 `sudo apt install ./spark-store*.deb` 安装,或使用 Gdebi 等图形化安装器。
|
||||
> ⚠️ 直接使用 `dpkg` 一般不会处理软件依赖,可能致使安装失败、破坏系统依赖环境。
|
||||
|
||||
---
|
||||
|
||||
### 系统更新
|
||||
**Q: 星火商店会影响系统正常更新吗?**
|
||||
**A:** 不会,星火商店已经将应用源与系统源分开,不会影响系统的正常更新。
|
||||
**Q: 星火应用商店会影响系统正常更新吗?**
|
||||
**A:** 不会,当前版本的星火应用商店已将应用源与系统源解耦合,不会影响系统的正常更新。
|
||||
|
||||
---
|
||||
|
||||
### 报告问题和应用下架
|
||||
**Q: 有些应用已经过时或者失效了,我想让他下架**
|
||||
**A:** 你可以前往 [这里](https://gitee.com/deepin-community-store/software_-issue) 报告问题。
|
||||
**Q: 有些应用已经过时或者失效了,我想让它下架。**
|
||||
**A:** 您可以[前往这里](https://gitee.com/spark-store-project/software_-issue)报告问题。
|
||||
|
||||
---
|
||||
|
||||
### 安装星火应用商店
|
||||
如果你想安装星火应用商店,请打开[Release页面](https://gitee.com/deepin-community-store/spark-store/releases),找到最新版本,并选择适用于当前系统的安装包下载。
|
||||
如果您需要安装星火应用商店,请打开 [Release 页面](https://gitee.com/spark-store-project/spark-store/releases),找到最新版本,并选择适用于当前系统的安装包下载。
|
||||
|
||||
> ⚠️ 特别提示: 如果你在使用 Debian10/Debian11 或 Ubuntu 20.04,你可能额外下载依赖补充包。您需要在下载完依赖包后,解压多次一直到看到内部的软件使用说明,对于 Ubuntu22.04 以后的操作系统版本,您无需安装依赖包,您需要按照上面的操作直接安装本体程序。
|
||||
> ⚠️ 特别提示: 如果您在使用 Debian 10 / Debian 11 或 Ubuntu 20.04,则需要额外下载依赖补充包;您需要在下载完依赖包后,解压多次直至内部的依赖包使用说明可见,按照步骤安装依赖。对于 Ubuntu 22.04 以后的操作系统版本,您无需安装依赖包,按照上面的操作直接安装本体程序即可。
|
||||
|
||||
---
|
170
README.md
@ -1,40 +1,52 @@
|
||||
# Spark App Store
|
||||
[](https://gitee.com/spark-store-project/spark-store/stargazers) [](https://gitee.com/spark-store-project/spark-store/members)
|
||||
# Spark Store
|
||||
[](https://gitee.com/spark-store-project/spark-store/stargazers) [](https://gitee.com/spark-store-project/spark-store/members)
|
||||

|
||||
|
||||
## Introduction
|
||||
|
||||
Welcome to the Spark App Store! This is an app store designed for Linux users, aiming to solve the problem of dispersed and difficult-to-obtain applications in the Linux ecosystem. No matter what type of Linux distribution you are using, you may find suitable software packages here.
|
||||
## Introduction
|
||||
|
||||
The number of Linux applications is relatively limited, and the availability of Wine software is also quite challenging. Excellent development and tool resources are scattered across various communities and forums, making it difficult for the entire ecosystem to improve comprehensively.
|
||||
Welcome to the **Spark Store**! This is an application store designed for Linux platform users, aiming to address the issues of fragmented and difficult-to-obtain software within the Linux ecosystem. Regardless of your Linux distribution, you may find suitable software packages here.
|
||||
|
||||
The construction of the ecosystem is not dependent on the isolated efforts of individuals but requires the participation of the entire community. Only when everyone's "sparks" gather together can they ignite a "prairie fire."
|
||||
The number of Linux applications is relatively limited, and obtaining Wine software can also be challenging. Excellent development kits and tool resources are scattered across various communities and forums, making it difficult for the entire ecosystem to achieve comprehensive improvement.
|
||||
|
||||
To improve this situation, we have launched this app store. We have broadly included various user-demand software packages, gathered high-quality tools, and actively adapted Wine applications, all stored in our software library for easy user access.
|
||||
Ecosystem construction does not rely on isolated individual efforts but requires full community participation. Only when everyone's "spark" gathers in one place can it ignite a prairie fire.
|
||||
|
||||
**Currently supported Linux distributions include:**
|
||||
To improve this situation, we have launched the Spark Store. The Spark Community extensively collects software packages for various user needs, aggregates high-quality small tools, and proactively adapts Wine applications. All resources are stored in our repository, allowing users to conveniently access these applications.
|
||||
|
||||
- **amd64 architecture:** deepin 20 / deepin 23 / Ubuntu 20.04 / Ubuntu 22.04 / UOS Home Edition 20
|
||||
- **arm64 architecture:** UOS Professional Edition 1060 / Ubuntu 22.04 / deepin 23
|
||||
- **loong64 architecture:** deepin 23
|
||||
**Currently supported Linux distributions include (but are not limited to):**
|
||||
|
||||
> Special Note: We also support all versions of Ubuntu operating systems higher than Ubuntu 22.04, such as Ubuntu 22.10, 23.04, 23.10, etc.
|
||||
- **amd64 Architecture:** deepin 20 / deepin 23 / Ubuntu 20.04 / Ubuntu 22.04 / UOS Home Edition 20 / Debian 11+
|
||||
- **arm64 Architecture:** UOS Professional Edition 1060 / Ubuntu 22.04 / deepin 23
|
||||
- **loong64 Architecture:** deepin 23
|
||||
|
||||
**Important Notice:** This software does not provide any form of warranty. If you plan to use it on UOS Professional Edition, please make sure to understand and enable Developer Mode. Make sure you have basic troubleshooting capabilities. It should be clear that we have not conducted extensive testing on the UOS operating system. Therefore, using the Spark client may lead to a series of issues like failed system updates, data loss, etc., all risks to be borne by the user.
|
||||
> Special Note: Spark Store also supports all Ubuntu OS versions newer than Ubuntu 22.04, such as Ubuntu 22.10, 23.04, 23.10, etc. Additionally, Spark Store may adapt to other Linux distributions beyond the listed platforms; you may conduct installation tests accordingly.
|
||||
|
||||
## Team Collaboration: For detailed documentation related to branch management, please see [this link](https://wiki.spark-app.store/#/Dev/Spark-Store-Git-Repo).
|
||||
**Important Notice:** This software cannot guarantee continuous availability, uninterrupted operation, or meeting specific performance requirements. The Spark community makes no commitment to the functional completeness, stability, or error-free operation of this software. For example, if you plan to use it on UOS Professional Edition (or other similar specific platforms), please ensure you understand and enable the "Developer Mode" features. Basic troubleshooting capabilities are required. It is important to note that the Spark community cannot conduct extensive testing on some special platforms. Therefore, using the Spark Store client on these platforms may lead to various issues such as system update failures or data loss. Using this software indicates your understanding and acceptance that all risks must be borne by the user.
|
||||
|
||||
We warmly welcome you to join our development team. Whether you want to participate in development or submit applications, you can find your place here to jointly promote the development of the Linux application ecosystem.
|
||||
## About Team Collaboration
|
||||
|
||||
You can track our Issue handling status in real-time through the following link: [Gitee Issue Board](https://gitee.com/spark-store-project/spark-store/board).
|
||||
Organization Repository Links:
|
||||
|
||||
If you have a software package you'd like to submit, please [click here to submit](https://upload.deepinos.org.cn/index).
|
||||
https://gitee.com/spark-store-project/spark-store
|
||||
|
||||
## Contents
|
||||
https://gitcode.com/spark-store-project/spark-store
|
||||
|
||||
- [Read the copyright](#read-the-copyright)
|
||||
- [Determine your system architecture](#determine-your-system-architecture)
|
||||
- [System support and installation guide](#system-support-and-installation-guide)
|
||||
- [For Deepin / UOS Users](#for-deepin-users)
|
||||
https://github.com/spark-store-project/spark-store
|
||||
|
||||
Refer to [this link](https://wiki.spark-app.store/#/Dev/Spark-Store-Git-Repo) for detailed documentation on branch management.
|
||||
|
||||
We warmly welcome you to join our development team. Whether you wish to participate in development or plan to submit applications, you can find your place here to jointly promote the development of the Linux application ecosystem.
|
||||
|
||||
You can track our Issue processing status in real-time via the [Issue Board](https://gitee.com/spark-store-project/spark-store/board).
|
||||
|
||||
If you have software packages to submit, please [click here to contribute](https://wiki.spark-app.store/#/Submit/Submit).
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Read the Copyright Notice](#read-the-copyright-notice)
|
||||
- [Determine Your System Architecture](#determine-your-system-architecture)
|
||||
- [System Support and Installation Instructions](#system-support-and-installation-instructions)
|
||||
- [For deepin Users](#for-deepin-users)
|
||||
- [For Ubuntu Users](#for-ubuntu-users)
|
||||
- [For Debian Users](#for-debian-users)
|
||||
- [Frequently Asked Questions (FAQ)](#frequently-asked-questions-faq)
|
||||
@ -42,126 +54,126 @@ If you have a software package you'd like to submit, please [click here to submi
|
||||
|
||||
---
|
||||
|
||||
## Read [the copyright](LICENSE)
|
||||
## Read the [Copyright Notice](LICENSE)
|
||||
|
||||
|
||||
## Determine Your System Architecture
|
||||
|
||||
## Determine your system architecture
|
||||
Before installing any software, you need to know which architecture your computer is running on (e.g., x86_64/amd64 or aarch64/arm64), which also applies to the Spark Store.
|
||||
|
||||
Before installing any software, you need to know what architecture your computer runs on (such as x86_64/amd64 or aarch64/arm64).
|
||||
**How to Check:**
|
||||
|
||||
**How to check:**
|
||||
1. Open the Linux terminal.
|
||||
2. Enter the command `uname -m` or `arch` and press `Enter`.
|
||||
|
||||
1. Open a Linux terminal.
|
||||
2. Type `uname -m` or `arch` and press Enter.
|
||||
You will see the terminal output result, which helps determine your system architecture. Examples:
|
||||
|
||||
You will see an output, and that's your system architecture.
|
||||
- If you see `x86_64`, your system is amd64 architecture.
|
||||
- If you see `aarch64`, your system is arm64 architecture.
|
||||
|
||||
- If you see `x86_64`, your system is AMD64 architecture.
|
||||
- If you see `aarch64`, your system is ARM64 architecture.
|
||||
Based on this result, you need to download the corresponding version of the Spark Store installer to use it properly.
|
||||
|
||||
---
|
||||
|
||||
## System support and installation guide
|
||||
## System Support and Installation Instructions
|
||||
|
||||
### For Deepin Users
|
||||
Based on your Linux distribution and system architecture, here are detailed steps to install Spark Store.
|
||||
|
||||
#### For Deepin Users
|
||||
### For deepin Users
|
||||
|
||||
#### For deepin Users
|
||||
|
||||
1. **Download and Install**
|
||||
|
||||
You can directly search for Spark App Store in the Deepin Store to install, or copy this link to open and install in your browser:
|
||||
You can directly search for `Spark Store` in the deepin App Store for installation, or copy this link to your browser address bar to jump to the deepin App Store installation page.
|
||||
|
||||
> appstore://deepin-home-appstore-client?app_detail_info/spark-store
|
||||
|
||||
To use the latest version, please visit the [Spark App Store Release page](https://gitee.com/spark-store-project/spark-store/releases) and download the latest version suitable for Deepin. Install to use.
|
||||
Versions published in the deepin App Store may not be the latest. To use the latest version, visit the Spark Store [Gitee Release Page](https://gitee.com/spark-store-project/spark-store/releases) or [Gitcode Release Page](https://gitcode.com/spark-store-project/spark-store/releases) and download the latest version for deepin, then install it.
|
||||
|
||||
Assuming you've downloaded to the `Downloads` folder in your user directory, we recommend you use the APT tool to install:
|
||||
Assuming you downloaded the installer to the Downloads folder under your home directory, we recommend using the `apt` tool for installation to avoid potential dependency issues:
|
||||
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
sudo apt install ./spark-store*.deb
|
||||
```
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
sudo apt install ./spark-store*.deb
|
||||
```
|
||||
|
||||
### For Ubuntu Users
|
||||
|
||||
#### For Ubuntu 20.04 Users
|
||||
|
||||
1. **Download Dependencies**
|
||||
* Please visit the [Spark App Store Dependency Download page](https://gitee.com/spark-store-project/spark-store-dependencies/releases) and download the latest dependency package.
|
||||
* Unzip the dependency package multiple times until you see multiple installation packages ending with `.deb`.
|
||||
* Follow the instructions in the dependency package to install all the dependencies at once.
|
||||
* Visit the [Spark Store Dependency Package Download Page](https://gitee.com/spark-store-project/spark-store-dependencies/releases) to download the latest dependency package;
|
||||
* Extract the dependency package multiple times until you see numerous `.deb` installation packages;
|
||||
* Follow the instructions inside the dependency package to install all dependencies at once.
|
||||
|
||||
2. **Download and Install**
|
||||
|
||||
Visit the [Spark App Store Release page](https://gitee.com/spark-store-project/spark-store/releases), download the installation package that matches your computer's architecture, and install it.
|
||||
Visit the Spark Store [Gitee Release Page](https://gitee.com/spark-store-project/spark-store/releases) or [Gitcode Release Page](https://gitcode.com/spark-store-project/spark-store/releases) to download and install the installer matching your computer's architecture.
|
||||
|
||||
Assuming you've downloaded to the `Downloads` folder in your user directory, we recommend you use the APT tool to install:
|
||||
Assuming you downloaded the installer to the Downloads folder under your home directory, we recommend using the `apt` tool for installation to avoid potential dependency issues:
|
||||
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
sudo apt install ./spark-store*.deb
|
||||
```
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
sudo apt install ./spark-store*.deb
|
||||
```
|
||||
|
||||
#### For Ubuntu 22.04 and Higher Version Users
|
||||
|
||||
1. **No Need to Install Dependencies**
|
||||
#### For Ubuntu 22.04 and Newer Ubuntu Versions
|
||||
1. **No Dependency Package Required**
|
||||
|
||||
2. **Download and Install**
|
||||
|
||||
Visit the [Spark App Store Release page](https://gitee.com/spark-store-project/spark-store/releases), download the installation package that matches your computer's architecture, and install it.
|
||||
Visit the Spark Store [Gitee Release Page](https://gitee.com/spark-store-project/spark-store/releases) or [Gitcode Release Page](https://gitcode.com/spark-store-project/spark-store/releases) to download and install the installer matching your computer's architecture.
|
||||
|
||||
Assuming you've downloaded to the `Downloads` folder in your user directory, we recommend you use the APT tool to install:
|
||||
Assuming you downloaded the installer to the Downloads folder under your home directory, we recommend using the `apt` tool for installation to avoid potential dependency issues:
|
||||
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
sudo apt install ./spark-store*.deb
|
||||
```
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
sudo apt install ./spark-store*.deb
|
||||
```
|
||||
|
||||
### For Debian Users
|
||||
|
||||
#### For Debian 11 Users
|
||||
|
||||
1. **Download Dependencies**
|
||||
* Please visit the [Spark App Store Dependency Download page](https://gitee.com/spark-store-project/spark-store-dependencies/releases) and download the latest dependency package.
|
||||
* Unzip the dependency package multiple times until you see multiple installation packages ending with `.deb`.
|
||||
* Follow the instructions in the dependency package to install all the dependencies at once.
|
||||
* Visit the [Spark Store Dependency Package Download Page](https://gitee.com/spark-store-project/spark-store-dependencies/releases) to download the latest dependency package;
|
||||
* Extract the dependency package multiple times until you see numerous `.deb` installation packages;
|
||||
* Follow the instructions inside the dependency package to install all dependencies at once.
|
||||
|
||||
2. **Download and Install**
|
||||
|
||||
Please visit the [Spark App Store Release page](https://gitee.com/spark-store-project/spark-store/releases) and download. Install to use.
|
||||
Visit the Spark Store [Gitee Release Page](https://gitee.com/spark-store-project/spark-store/releases) or [Gitcode Release Page](https://gitcode.com/spark-store-project/spark-store/releases) to download and install the installer.
|
||||
|
||||
#### For Debian 12+ Users
|
||||
|
||||
1. **No Need to Install Dependencies**
|
||||
1. **No Dependency Package Required**
|
||||
|
||||
2. **Download and Install**
|
||||
|
||||
Please visit the [Spark App Store Release page](https://gitee.com/spark-store-project/spark-store/releases), download the installation package that matches your computer's architecture, and install it.
|
||||
Visit the Spark Store [Gitee Release Page](https://gitee.com/spark-store-project/spark-store/releases) or [Gitcode Release Page](https://gitcode.com/spark-store-project/spark-store/releases) to download and install the installer matching your computer's architecture.
|
||||
|
||||
Assuming you've downloaded to the `Downloads` folder in your user directory, we recommend you use the APT tool to install:
|
||||
Assuming you downloaded the installer to the Downloads folder under your home directory, we recommend using the `apt` tool for installation to avoid potential dependency issues:
|
||||
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
sudo apt install ./spark-store*.deb
|
||||
```
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
sudo apt install ./spark-store*.deb
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Frequently Asked Questions (FAQ)
|
||||
|
||||
Please refer to the [Spark App Store FAQ and Support Guide](https://gitee.com/spark-store-project/spark-store/blob/dev/FAQ.md).
|
||||
|
||||
You can also check the [Chinese version](https://gitee.com/spark-store-project/spark-store/blob/dev/FAQ.zh.md) here.
|
||||
Please refer to the [Spark Store FAQ and Support Guide](https://gitee.com/spark-store-project/spark-store/blob/dev/FAQ.md);
|
||||
For advanced users requiring custom aptss config configuration, please refer to the [aptss Repository](https://gitee.com/GXDE-OS/aptss).
|
||||
|
||||
---
|
||||
|
||||
## Contact and Feedback
|
||||
|
||||
- If you have any questions or suggestions, please submit them via email or on our [Gitee page](https://gitee.com/spark-store-project/spark-store/issues).
|
||||
- If you want to follow our development progress, you can go to the [Spark App Store Board](https://gitee.com/spark-store-project/spark-store/board) for more information.
|
||||
- Our [Forum](https://bbs.spark-app.store/)
|
||||
- Our [QQ Group](https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/)
|
||||
- For commercial support, please leave your issue~
|
||||
|
||||
- If you have any questions or suggestions, please submit issues via email or the [Issue Page](https://gitee.com/spark-store-project/spark-store/issues);
|
||||
- If you want to follow our development progress, visit the [Spark Store Board](https://gitee.com/spark-store-project/spark-store/board) for more information;
|
||||
- Welcome to visit the [Spark Community Forum](https://bbs.spark-app.store/) to join discussions;
|
||||
- Our QQ Discussion Group: 872690351 and 865927727;
|
||||
- If you or your organization requires commercial support, please leave a message for consultation.
|
||||
---
|
122
README.zh.md
@ -1,61 +1,70 @@
|
||||
# 星火应用商店
|
||||
[](https://gitee.com/spark-store-project/spark-store/stargazers) [](https://gitee.com/spark-store-project/spark-store/members)
|
||||
|
||||

|
||||
|
||||
|
||||
## 简介
|
||||
|
||||
欢迎来到星火应用商店!这是一个为Linux用户设计的应用商店,旨在解决Linux生态下应用分散、难以获取的问题。无论你是使用什么类型的Linux发行版,这里都有可能找到适合你的软件包。
|
||||
欢迎来到**星火应用商店**!这是一个为 Linux 平台用户设计的应用商店,旨在解决 Linux 生态下应用分散、难以获取的问题。无论您使用什么类型的 Linux 发行版,在这里都有可能找到适合您的软件包。
|
||||
|
||||
|
||||
Linux 应用的数量相对有限,Wine 软件的可获得性也颇为困难。优秀的开发和工具资源散布在各大社区和论坛之间,这种分散化让整个生态系统难以得到全面的提升。
|
||||
Linux 应用的数量相对有限,Wine 软件的可获取性也颇为困难。优秀的开发套件和工具资源散布在各大社区和论坛之间,这种分散化让整个生态系统难以得到全面的提升。
|
||||
|
||||
生态系统的构建并非依赖个体的孤立努力,而需要全社区共同参与。只有当大家的“星火”聚集一处,方可引发“燎原之势”。
|
||||
|
||||
为了改善这一现状,我们推出了这个应用商店。我们广泛地收录了各种用户需求的软件包,汇集了高质量的小工具,并主动对 Wine 应用进行了适配,一切都储存在我们的软件库中,使得用户可以方便地获取这些应用。
|
||||
为了改善这一现状,我们推出了星火应用商店。星火社区广泛地收录了各种用户需求的软件包,汇集了高质量的小工具,并主动对 Wine 应用进行了适配,一切都储存在我们的软件库中,使得用户可以方便地获取这些应用。
|
||||
|
||||
**当前支持的Linux发行版包括:**
|
||||
**当前支持的 Linux 发行版包括(但不限于):**
|
||||
|
||||
- **amd64架构:** deepin 20 / deepin 23 / Ubuntu 20.04 / Ubuntu 22.04 / UOS家庭版20
|
||||
- **arm64架构:** UOS专业版1060 / Ubuntu 22.04 / deepin 23
|
||||
- **loong64架构:** deepin 23
|
||||
- **amd64 架构:** deepin 20 / deepin 23 / Ubuntu 20.04 / Ubuntu 22.04 / UOS 家庭版 20 / Debian 11+
|
||||
- **arm64 架构:** UOS 专业版 1060 / Ubuntu 22.04 / deepin 23
|
||||
- **loong64 架构:** deepin 23
|
||||
|
||||
> 特别说明:我们还支持所有版本高于Ubuntu 22.04的Ubuntu操作系统,例如Ubuntu 22.10、23.04、23.10等。
|
||||
> 特别说明:星火应用商店还支持所有版本高于 Ubuntu 22.04 的 Ubuntu 操作系统,例如 Ubuntu 22.10、23.04、23.10 等。此外星火应用商店也可能适配除上述平台的其他 Linux 发行版,您可自行进行安装测试。
|
||||
|
||||
**重要须知:** 本软件不提供任何形式的保证。若您计划在UOS专业版上使用,请务必了解并启用开发者模式。请确保您具备基础的故障排查能力。需要明确的是,我们没有在UOS操作系统上进行广泛的测试。因此,使用星火客户端可能会导致一系列问题,如系统更新失败、数据丢失等,所有风险需由用户自行承担。
|
||||
**重要须知:** 本软件无法保证持续可用、无中断运行或满足特定性能要求。星火社区对其功能完整性、稳定性及无错误运行不作任何承诺。例如,若您计划在 UOS 专业版(或其他类似特定平台)上使用,请务必了解并启用“开发者模式”相关功能。请确保您具备基础的故障排查能力。需要明确的是,星火社区无法在部分特殊平台上进行广泛测试。因此,在这些平台上使用星火应用商店客户端可能会导致一系列问题,如系统更新失败、数据丢失等;使用该软件,即代表您理解并同意所有风险需由用户自行承担。
|
||||
|
||||
|
||||
|
||||
## 关于团队协作
|
||||
|
||||
组织仓库链接:
|
||||
|
||||
https://gitee.com/spark-store-project/spark-store
|
||||
|
||||
https://gitcode.com/spark-store-project/spark-store
|
||||
|
||||
https://github.com/spark-store-project/spark-store
|
||||
|
||||
分支管理相关的详细文档可参见 [此链接](https://wiki.spark-app.store/#/Dev/Spark-Store-Git-Repo)。
|
||||
参见[此链接](https://wiki.spark-app.store/#/Dev/Spark-Store-Git-Repo)以获取分支管理相关的详细文档。
|
||||
|
||||
我们热忱欢迎您加入我们的开发团队。无论您是想参与开发,还是想提交应用,都能在这里找到属于您的一席之地,共同推动Linux应用生态的发展。
|
||||
我们热忱欢迎您加入我们的开发团队。无论您是希望参与开发,还是计划提交应用,都能在这里找到属于您的一席之地,共同推动 Linux 应用生态的发展。
|
||||
|
||||
您可以通过以下链接,实时跟踪我们的Issue处理状态:[Gitee Issue看板](https://gitee.com/spark-store-project/spark-store/board)。
|
||||
您可以通过以下链接,实时跟踪我们的 Issue 处理状态:[Issue 看板](https://gitee.com/spark-store-project/spark-store/board)。
|
||||
|
||||
若您有软件包想要提交,敬请 [点击此处进行投稿](https://wiki.spark-app.store/#/Submit/Submit)。
|
||||
若您有软件包需要提交,敬请[点击此处进行投稿](https://wiki.spark-app.store/#/Submit/Submit)。
|
||||
|
||||
|
||||
|
||||
|
||||
## 目录
|
||||
|
||||
- [阅读版权声明](#阅读版权声明)
|
||||
- [确定你的系统架构](#确定你的系统架构)
|
||||
- [系统支持与安装指引](#系统支持与安装指引)
|
||||
- [对于 Deepin / UOS 用户](#对于deepin用户)
|
||||
- [对于 Ubuntu 用户](#对于ubuntu用户)
|
||||
- [对于 Debian 用户](#对于debian用户)
|
||||
- [常见问题(FAQ)](#常见问题faq)
|
||||
- [联系与反馈](#联系与反馈)
|
||||
- [星火应用商店](#星火应用商店)
|
||||
- [简介](#简介)
|
||||
- [关于团队协作](#关于团队协作)
|
||||
- [目录](#目录)
|
||||
- [阅读版权声明](#阅读版权声明)
|
||||
- [确定你的系统架构](#确定你的系统架构)
|
||||
- [系统支持与安装指引](#系统支持与安装指引)
|
||||
- [对于 deepin 用户](#对于-deepin-用户)
|
||||
- [对于 deepin 用户](#对于-deepin-用户-1)
|
||||
- [对于 Ubuntu 用户](#对于-ubuntu-用户)
|
||||
- [对于 Ubuntu 20.04 用户](#对于-ubuntu-2004-用户)
|
||||
- [对于 Ubuntu 22.04 及更高版本的 Ubuntu 用户](#对于-ubuntu-2204-及更高版本的-ubuntu-用户)
|
||||
- [对于 Debian 用户](#对于-debian-用户)
|
||||
- [对于 Debian 11 用户](#对于-debian-11-用户)
|
||||
- [对于 Debian 12+ 用户](#对于-debian-12-用户)
|
||||
- [常见问题(FAQ)](#常见问题faq)
|
||||
- [联系与反馈](#联系与反馈)
|
||||
|
||||
---
|
||||
|
||||
@ -64,59 +73,64 @@ https://github.com/spark-store-project/spark-store
|
||||
|
||||
## 确定你的系统架构
|
||||
|
||||
在安装任何软件之前,你需要知道你的计算机运行的是哪种架构(如x86_64/amd64或aarch64/arm64)。
|
||||
在安装任何软件之前,您需要知道你的计算机运行在何种架构之上(如 x86_64/amd64 或 aarch64/arm64),对于星火应用商店亦是如此。
|
||||
|
||||
**如何检查:**
|
||||
|
||||
1. 打开Linux终端。
|
||||
2. 输入 `uname -m` 或 `arch` 并按回车。
|
||||
1. 打开 Linux 终端。
|
||||
2. 输入命令 `uname -m` 或 `arch` 并按 `Enter` 键执行。
|
||||
|
||||
你会看到一个输出,这就是你的系统架构。
|
||||
您会看到终端输出结果,借此您可判断计算机的系统架构。举例:
|
||||
|
||||
- 如果看到 `x86_64`,你的系统是AMD64架构。
|
||||
- 如果看到 `aarch64`,你的系统是ARM64架构。
|
||||
- 如果您看到 `x86_64`,说明您的系统为 amd64 架构。
|
||||
- 如果您看到 `aarch64`,说明您的系统为 arm64 架构。
|
||||
|
||||
根据这一结果,您需要下载对应版本的星火应用商店安装包以正常使用。
|
||||
|
||||
---
|
||||
|
||||
## 系统支持与安装指引
|
||||
|
||||
根据你的Linux发行版和系统架构,以下是安装星火应用商店的详细步骤。
|
||||
根据您的 Linux 发行版和系统架构,以下是安装星火应用商店的详细步骤。
|
||||
|
||||
### 对于 Deepin 用户
|
||||
### 对于 deepin 用户
|
||||
|
||||
#### 对于 Deepin 用户
|
||||
#### 对于 deepin 用户
|
||||
|
||||
1. **下载并安装**
|
||||
|
||||
您可直接在深度商店搜索 星火应用商店 安装,或复制此链接到浏览器打开安装
|
||||
您可直接在深度应用商店搜索 `星火应用商店` 安装,或复制此链接到浏览器地址栏,跳转至深度应用商店安装。
|
||||
|
||||
> appstore://deepin-home-appstore-client?app_detail_info/spark-store
|
||||
|
||||
|
||||
若要使用最新版本,请访问[星火应用商店的Release页面](https://gitee.com/spark-store-project/spark-store/releases)或[Gitcode的Release页面](https://gitcode.com/spark-store-project/spark-store/releases)并下载适用于Deepin的最新版本。安装后即可使用。
|
||||
深度应用商店发布的版本可能不是最新的。若要使用最新版本,请访问星火应用商店 [Gitee 的 Release 页面](https://gitee.com/spark-store-project/spark-store/releases)或 [Gitcode 的 Release 页面](https://gitcode.com/spark-store-project/spark-store/releases)并下载适用于 deepin 的最新版本,安装后即可使用。
|
||||
|
||||
假设您下载到用户目录下的 Downloads 文件夹, 我们推荐您使用 APT 工具安装:
|
||||
假设您将安装包下载至用户目录下的 Downloads 文件夹,我们推荐您使用 `apt` 工具进行安装以避免潜在的依赖问题:
|
||||
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
sudo apt install ./spark-store*.deb
|
||||
```
|
||||
2. **使用更新器**
|
||||
您可以在应用商店左下角找到更新按钮,点击即可查看更新列表。
|
||||
|
||||
|
||||
### 对于 Ubuntu 用户
|
||||
|
||||
#### 对于 Ubuntu 20.04 用户
|
||||
|
||||
1. **下载依赖包**
|
||||
* 请访问[星火应用商店依赖包下载页面](https://gitee.com/spark-store-project/spark-store-dependencies/releases), 下载最新的依赖包。
|
||||
* 请多次解压依赖包,直到你可以看到诸多以 deb 结尾的安装包。
|
||||
* 请访问[星火应用商店依赖包下载页面](https://gitee.com/spark-store-project/spark-store-dependencies/releases),下载最新的依赖包;
|
||||
* 请多次解压依赖包,直至您可以看到诸多以 deb 结尾的安装包;
|
||||
* 依据依赖包内的说明,一次性安装所有的依赖包。
|
||||
|
||||
|
||||
2. **下载并安装**
|
||||
|
||||
请访问[星火应用商店的Release页面](https://gitee.com/spark-store-project/spark-store/releases)或[Gitcode的Release页面](https://gitcode.com/spark-store-project/spark-store/releases),下载和您电脑相同架构的安装包并安装。
|
||||
请访问星火应用商店 [Gitee 的 Release 页面](https://gitee.com/spark-store-project/spark-store/releases)或 [Gitcode 的 Release 页面](https://gitcode.com/spark-store-project/spark-store/releases),下载和您电脑相同架构的安装包并安装。
|
||||
|
||||
假设您下载到用户目录下的 Downloads 文件夹, 我们推荐您使用 APT 工具安装:
|
||||
假设您将安装包下载至用户目录下的 Downloads 文件夹,我们推荐您使用 `apt` 工具进行安装以避免潜在的依赖问题:
|
||||
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
@ -129,9 +143,9 @@ https://github.com/spark-store-project/spark-store
|
||||
|
||||
2. **下载并安装**
|
||||
|
||||
请访问[星火应用商店的Release页面](https://gitee.com/spark-store-project/spark-store/releases)或[Gitcode的Release页面](https://gitcode.com/spark-store-project/spark-store/releases),下载和您电脑相同架构的安装包并安装。
|
||||
请访问星火应用商店 [Gitee 的 Release 页面](https://gitee.com/spark-store-project/spark-store/releases)或 [Gitcode 的 Release 页面](https://gitcode.com/spark-store-project/spark-store/releases),下载和您电脑相同架构的安装包并安装。
|
||||
|
||||
假设您下载到用户目录下的 Downloads 文件夹, 我们推荐您使用 APT 工具安装:
|
||||
假设您将安装包下载至用户目录下的 Downloads 文件夹,我们推荐您使用 `apt` 工具进行安装以避免潜在的依赖问题:
|
||||
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
@ -143,13 +157,13 @@ https://github.com/spark-store-project/spark-store
|
||||
#### 对于 Debian 11 用户
|
||||
|
||||
1. **下载依赖包**
|
||||
* 请访问[星火应用商店依赖包下载页面](https://gitee.com/spark-store-project/spark-store-dependencies/releases), 下载最新的依赖包。
|
||||
* 请多次解压依赖包,直到你可以看到诸多以 deb 结尾的安装包。
|
||||
* 请访问[星火应用商店依赖包下载页面](https://gitee.com/spark-store-project/spark-store-dependencies/releases), 下载最新的依赖包;
|
||||
* 请多次解压依赖包,直到您可以看到诸多以 deb 结尾的安装包;
|
||||
* 依据依赖包内的说明,一次性安装所有的依赖包。
|
||||
|
||||
2. **下载并安装**
|
||||
|
||||
请访问[星火应用商店的Release页面](https://gitee.com/spark-store-project/spark-store/releases)或[Gitcode的Release页面](https://gitcode.com/spark-store-project/spark-store/releases)并下载,安装后即可使用。
|
||||
请访问星火应用商店 [Gitee 的 Release 页面](https://gitee.com/spark-store-project/spark-store/releases)或 [Gitcode 的 Release 页面](https://gitcode.com/spark-store-project/spark-store/releases)并下载,安装后即可使用。
|
||||
|
||||
|
||||
#### 对于 Debian 12+ 用户
|
||||
@ -159,9 +173,9 @@ https://github.com/spark-store-project/spark-store
|
||||
|
||||
2. **下载并安装**
|
||||
|
||||
请访问[星火应用商店的Release页面](https://gitee.com/spark-store-project/spark-store/releases)或[Gitcode的Release页面](https://gitcode.com/spark-store-project/spark-store/releases),下载和您电脑相同架构的安装包并安装。
|
||||
请访问星火应用商店 [Gitee 的 Release 页面](https://gitee.com/spark-store-project/spark-store/releases)或 [Gitcode 的 Release 页面](https://gitcode.com/spark-store-project/spark-store/releases),下载和您电脑相同架构的安装包并安装。
|
||||
|
||||
假设您下载到用户目录下的 Downloads 文件夹, 我们推荐您使用 APT 工具安装:
|
||||
假设您将安装包下载至用户目录下的 Downloads 文件夹,我们推荐您使用 `apt` 工具进行安装以避免潜在的依赖问题:
|
||||
|
||||
```shell
|
||||
cd ~/Downloads
|
||||
@ -171,18 +185,20 @@ https://github.com/spark-store-project/spark-store
|
||||
|
||||
## 常见问题(FAQ)
|
||||
|
||||
请参见[星火应用商店FAQ与支持指南](https://gitee.com/spark-store-project/spark-store/blob/dev/FAQ.md)。
|
||||
请参见[星火应用商店 FAQ 与支持指南](https://gitee.com/spark-store-project/spark-store/blob/dev/FAQ.zh.md);
|
||||
|
||||
对于高级用户,如需自定义配置 aptss config,请参阅 [aptss 软件仓库](https://gitee.com/GXDE-OS/aptss)。
|
||||
|
||||
|
||||
在这里可以查阅[中文版本](https://gitee.com/spark-store-project/spark-store/blob/dev/FAQ.zh.md)。
|
||||
|
||||
---
|
||||
|
||||
## 联系与反馈
|
||||
|
||||
- 如果您有任何问题或建议,请通过邮件或在[Gitee页面](https://gitee.com/spark-store-project/spark-store/issues)上提交问题。
|
||||
- 如果你想关注我们的开发进度,可以跳转[星火应用商店Board](https://gitee.com/spark-store-project/spark-store/board)获取更多信息。
|
||||
- 我们的[论坛](https://bbs.spark-app.store/)
|
||||
- 我们的QQ群 872690351
|
||||
- 商业支持请留言咨询~
|
||||
- 如果您有任何问题或建议,请通过邮件或在 [Issue 页面](https://gitee.com/spark-store-project/spark-store/issues)上提交问题;
|
||||
- 如果你想关注我们的开发进度,可以跳转至[星火应用商店 Board](https://gitee.com/spark-store-project/spark-store/board) 获取更多信息;
|
||||
- 欢迎访问[星火社区论坛](https://bbs.spark-app.store/)加入讨论;
|
||||
- 我们的 QQ 交流群号:872690351 和 865927727;
|
||||
- 若您和您的组织需要寻求商业支持,请留言咨询。
|
||||
|
||||
---
|
||||
|
58
debian/changelog
vendored
@ -1,7 +1,49 @@
|
||||
spark-store (4.3.3.1-fix2) UNRELEASED; urgency=medium
|
||||
spark-store (4.8.1~test1) UNRELEASED; urgency=medium
|
||||
|
||||
* 添加全新的更新器
|
||||
* 替换了新版更新器的polkit policy
|
||||
|
||||
-- momen <vmomenv@gmail.com> Tue, 15 Jul 2025 01:03:08 +0800
|
||||
|
||||
spark-store (4.8.0) UNRELEASED; urgency=medium
|
||||
|
||||
* ssinstall重写,支持安装到ACE和自动安装到ACE,支持只允许安装到本地
|
||||
* 商店支持展示ACE标识,支持识别 native amber-ce-bookworm amber-ce-trixie amber-ce-sid amber-ce-deepin23
|
||||
* 投稿器支持新版spec
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Tue, 24 Sep 2024 11:27:08 +0800
|
||||
|
||||
spark-store (4.5.2) UNRELEASED; urgency=medium
|
||||
|
||||
* 支持安装到 ACE Bookworm
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Tue, 24 Sep 2024 11:27:08 +0800
|
||||
|
||||
spark-store (4.5.1) UNRELEASED; urgency=medium
|
||||
|
||||
* 修复 aptss 部分报错
|
||||
* 重新设计了 Tag 区的展示方式
|
||||
* 新增 Fish 补全
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Tue, 24 Sep 2024 11:27:08 +0800
|
||||
|
||||
spark-store (4.5.0) UNRELEASED; urgency=medium
|
||||
|
||||
* 支持从商店中直接启动应用
|
||||
* ssinstall 修复安装时不再指定版本号以避免出现问题
|
||||
* aptss支持fish补全
|
||||
* 修复: distrobox下无法正常校验应用hash
|
||||
* aptss 4.5.0
|
||||
* 应用更新新增进度条
|
||||
* 支持识别Debian
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Tue, 24 Sep 2024 11:27:08 +0800
|
||||
|
||||
spark-store (4.3.3.2) UNRELEASED; urgency=medium
|
||||
|
||||
* 提升升级工具体验,不再反复弹窗
|
||||
* 提升aptss使用体验,汇报目前所在阶段而不是卡住不动
|
||||
* 修复debian sid 无法卸载
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Tue, 24 Sep 2024 11:27:08 +0800
|
||||
|
||||
@ -179,7 +221,7 @@ spark-store (4.2.7.3) stable; urgency=medium
|
||||
|
||||
* 修复:aptss现在会正确地透传错误码而不是exit 0
|
||||
* 修复:下载时如果卡0%(无法下载metalink),会在超时后报错中断而不是一直傻等
|
||||
* 修复:排队下载时CPU占满单核的bug https://gitee.com/deepin-community-store/spark-store/issues/I7B91V
|
||||
* 修复:排队下载时CPU占满单核的bug https://gitee.com/spark-store-project/spark-store/issues/I7B91V
|
||||
* 修复:在终端中打开的icon过大导致无法投稿到UOS
|
||||
* 修复:v23下编译出错
|
||||
* 薪怎:支持崩溃日志收集系统
|
||||
@ -416,7 +458,7 @@ spark-store (4.2.3~test2) stable; urgency=medium
|
||||
spark-store (4.2.3~test1) stable; urgency=medium
|
||||
|
||||
* 修复:因判断安装状态错误创建多个相同任务的bug
|
||||
* 测试中:尝试修复安装结束的闪退问题 https://gitee.com/deepin-community-store/spark-store/commit/cb093dcc2bb0a193db89aa0ce5f20ea9cc5d56eb
|
||||
* 测试中:尝试修复安装结束的闪退问题 https://gitee.com/spark-store-project/spark-store/commit/cb093dcc2bb0a193db89aa0ce5f20ea9cc5d56eb
|
||||
* 修复:Deepin 显示开发者模式未开启
|
||||
* 修复:从托盘打开主窗口时透明度动画不流畅
|
||||
* 修复:主窗口关闭后,从托盘打开关于窗口会被主窗口遮挡
|
||||
@ -498,8 +540,8 @@ spark-store (4.1.2) stable; urgency=medium
|
||||
* 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是自由的
|
||||
* feat: 支持分单文件夹下载。具体内容参见:https://gitee.com/spark-store-project/repo_auto_update_script/blob/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list
|
||||
* info: 非常感谢 @jwyh 对星火商店代码仓库设计了很多标准,参见 https://wiki.spark-app.store/#/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 构造函数中进行
|
||||
@ -518,8 +560,8 @@ spark-store (4.1.2) stable; urgency=medium
|
||||
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是自由的
|
||||
* feat: 支持分单文件夹下载。具体内容参见:https://gitee.com/spark-store-project/repo_auto_update_script/blob/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list
|
||||
* info: 非常感谢 @jwyh 对星火商店代码仓库设计了很多标准,参见 https://wiki.spark-app.store/#/Dev/Spark-Store-Git-Repo ,不过shenmo是自由的
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
@ -730,7 +772,7 @@ spark-store (3.2.4) stable; urgency=medium
|
||||
|
||||
spark-store (3.2.4~test4) stable; urgency=medium
|
||||
|
||||
* 现在在商店启动后点击spk链接仍会正常启动 https://gitee.com/deepin-community-store/spark-store/commit/dd6780d636042bf12d77414e6f1552cc7d1ed24c
|
||||
* 现在在商店启动后点击spk链接仍会正常启动 https://gitee.com/spark-store-project/spark-store/commit/dd6780d636042bf12d77414e6f1552cc7d1ed24c
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
|
2
debian/copyright
vendored
@ -1,6 +1,6 @@
|
||||
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
|
||||
Source: https://gitee.com/spark-store-project/spark-store
|
||||
|
||||
Files: *
|
||||
Copyright: The Spark Project Developers
|
||||
|
2
debian/spark-store.postinst
vendored
@ -41,7 +41,7 @@ case "$1" in
|
||||
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
|
||||
|
||||
ln -sf /usr/lib/qt5/bin/spark-update-tool /usr/bin/spark-update-tool
|
||||
|
||||
|
||||
# Install key
|
||||
|
2
debian/spark-store.prerm
vendored
@ -51,7 +51,7 @@ for username in `ls /home`
|
||||
|
||||
# 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'
|
||||
apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C' || true
|
||||
else
|
||||
|
||||
if [ ! -z "`pidof spark-store`" ] ; then
|
||||
|
@ -5,7 +5,7 @@
|
||||
> 用于 zinface-community-cmake-build-system.patch 补丁化构建方式
|
||||
|
||||
```shell
|
||||
git clone https://gitee.com/deepin-community-store/spark-store
|
||||
git clone https://gitee.com/spark-store-project/spark-store
|
||||
cd spark-store
|
||||
git am < patchs/zinface-community-cmake-build-system.patch
|
||||
make package
|
||||
|
@ -2,13 +2,14 @@
|
||||
Description=Spark Store update notifier
|
||||
After=apt-daily.service network.target network-online.target systemd-networkd.service NetworkManager.service connman.service
|
||||
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
RemainAfterExit=yes
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/opt/durapps/spark-store/bin/update-upgrade/ss-update-notifier.sh
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
RestartSec=15 # 可以设置为更长的重试间隔,比如 15 秒或 30 秒
|
||||
StartLimitIntervalSec=1h # 设置为 1 小时的时间窗口
|
||||
StartLimitBurst=3 # 最大允许失败次数为 3 次
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
|
@ -40,7 +40,7 @@ _aptss()
|
||||
"list"
|
||||
"search"
|
||||
"show" "showsrc"
|
||||
"install" "remove" "purge" "autoremove"
|
||||
"install" "remove" "purge" "autoremove" "autopurge"
|
||||
"update"
|
||||
"upgrade" "full-upgrade" "dist-upgrade"
|
||||
"edit-sources"
|
||||
|
242
pkg/usr/share/fish/completions/aptss.fish
Normal file
@ -0,0 +1,242 @@
|
||||
# 清除已有的 aptss 补全(如果有的话)
|
||||
complete -c aptss -e
|
||||
|
||||
# 禁用默认的文件补全(避免显示当前目录文件)
|
||||
complete -c aptss -f
|
||||
|
||||
########################################################################
|
||||
# aptss Fish 补全脚本(中文说明版,软件包补全显示简介)
|
||||
#
|
||||
# 说明:
|
||||
# 1. 子命令和选项的说明采用中文显示。
|
||||
# 2. 软件包补全部分不再调用 apt-cache,而是解析 aptss 自有的软件源索引文件,
|
||||
# 从 /var/lib/aptss/lists/*Packages(或 *Sources)中提取软件包名称及简介信息。
|
||||
#
|
||||
# 注意:如果你的 aptss 软件源索引文件位置或格式有变化,请相应修改下面的 awk 命令。
|
||||
########################################################################
|
||||
|
||||
### 辅助函数
|
||||
|
||||
# 解析 /var/lib/aptss/lists/*Packages 文件,输出符合当前输入前缀的“软件包<TAB>简介”
|
||||
function __fish_aptss_print_packages
|
||||
set cur (commandline -ct)
|
||||
# 将所有匹配的 Packages 文件拼接后,用 awk 分段解析(RS="" 表示以空行为分段)
|
||||
awk -v cur="$cur" '
|
||||
BEGIN { RS=""; FS="\n" }
|
||||
{
|
||||
pkg = ""; desc = "";
|
||||
for(i=1; i<=NF; i++){
|
||||
if($i ~ /^Package: /) { pkg = substr($i, 10) } # “Package: ”共9个字符
|
||||
else if($i ~ /^Description: /) { desc = substr($i, 14) } # “Description: ”共13个字符
|
||||
}
|
||||
if(pkg != "" && (cur == "" || pkg ~ ("^" cur))) {
|
||||
print pkg "\t" desc
|
||||
}
|
||||
}
|
||||
' /var/lib/aptss/lists/*Packages 2>/dev/null
|
||||
end
|
||||
|
||||
# 解析已安装软件包(这里仍使用 dpkg-query,如果需要使用 aptss 数据,可另外构造)
|
||||
function __fish_aptss_print_installed_packages
|
||||
set cur (commandline -ct)
|
||||
dpkg-query -W -f='${Package}\t${Description}\n' 2>/dev/null | grep -i "^$cur"
|
||||
end
|
||||
|
||||
# 解析 /var/lib/aptss/lists/*Sources 文件,输出源代码包信息(如果存在)
|
||||
function __fish_aptss_print_source_packages
|
||||
set cur (commandline -ct)
|
||||
awk -v cur="$cur" '
|
||||
BEGIN { RS=""; FS="\n" }
|
||||
{
|
||||
pkg = ""; desc = "";
|
||||
for(i=1; i<=NF; i++){
|
||||
if($i ~ /^Package: /) { pkg = substr($i, 10) }
|
||||
else if($i ~ /^Description: /) { desc = substr($i, 14) }
|
||||
}
|
||||
if(pkg != "" && (cur == "" || pkg ~ ("^" cur))) {
|
||||
print pkg "\t" desc
|
||||
}
|
||||
}
|
||||
' /var/lib/aptss/lists/*Sources 2>/dev/null
|
||||
end
|
||||
|
||||
# 翻译子命令为中文说明(用于补全时显示在括号内)
|
||||
function __fish_translate_aptss_cmd
|
||||
switch $argv[1]
|
||||
case ssupdate
|
||||
echo "更新软件源"
|
||||
case list
|
||||
echo "列出软件包"
|
||||
case search
|
||||
echo "搜索软件包"
|
||||
case show
|
||||
echo "显示软件包信息"
|
||||
case showsrc
|
||||
echo "显示源包信息"
|
||||
case install
|
||||
echo "安装软件包"
|
||||
case remove
|
||||
echo "移除软件包"
|
||||
case purge
|
||||
echo "彻底移除软件包"
|
||||
case autoremove
|
||||
echo "自动移除不必要的软件包"
|
||||
case update
|
||||
echo "更新软件包列表"
|
||||
case upgrade
|
||||
echo "升级软件包"
|
||||
case full-upgrade
|
||||
echo "完全升级(可能移除其他软件包)"
|
||||
case dist-upgrade
|
||||
echo "发行版升级"
|
||||
case edit-sources
|
||||
echo "编辑软件源列表"
|
||||
case help
|
||||
echo "显示帮助信息"
|
||||
case source
|
||||
echo "下载源代码包"
|
||||
case build-dep
|
||||
echo "安装构建依赖"
|
||||
case clean
|
||||
echo "清除软件包缓存"
|
||||
case autoclean
|
||||
echo "自动清理旧缓存"
|
||||
case download
|
||||
echo "下载软件包"
|
||||
case changelog
|
||||
echo "显示更新日志"
|
||||
case moo
|
||||
echo "彩蛋"
|
||||
case depends
|
||||
echo "显示软件包依赖"
|
||||
case rdepends
|
||||
echo "显示软件包逆向依赖"
|
||||
case policy
|
||||
echo "显示软件包策略"
|
||||
case '*'
|
||||
echo $argv[1]
|
||||
end
|
||||
end
|
||||
|
||||
### 定义各类子命令组
|
||||
|
||||
# 所有子命令列表
|
||||
set -g __aptss_commands ssupdate list search show showsrc install remove purge autoremove update upgrade full-upgrade dist-upgrade edit-sources help source build-dep clean autoclean download changelog moo depends rdepends policy
|
||||
|
||||
# 需要补全二进制软件包名称的子命令(例如 install、show、search、download、changelog、depends、rdepends)
|
||||
set -l __aptss_pkg_subcmds install show search download changelog depends rdepends
|
||||
|
||||
# 需要补全已安装软件包的子命令(例如 remove、purge、autoremove)
|
||||
set -l __aptss_installed_pkg_subcmds remove purge autoremove
|
||||
|
||||
# 需要补全源代码包的子命令(例如 source、build-dep、showsrc、policy)
|
||||
set -l __aptss_src_pkg_subcmds source build-dep showsrc policy
|
||||
|
||||
### 子命令补全
|
||||
# 未输入子命令时,显示所有候选子命令,并在括号中显示中文说明
|
||||
for cmd in $__aptss_commands
|
||||
set desc (__fish_translate_aptss_cmd $cmd)
|
||||
complete -c aptss -a $cmd -d "$desc" -n "not __fish_seen_subcommand_from $__aptss_commands"
|
||||
end
|
||||
|
||||
### 公共选项(适用于一组子命令)
|
||||
set -l group1 "install remove purge upgrade dist-upgrade full-upgrade autoremove"
|
||||
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l show-progress -d '显示进度'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l fix-broken -d '修复损坏的依赖'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l purge -d '清除配置文件'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l verbose-versions -d '显示详细版本'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l auto-remove -d '自动移除依赖'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -s s -l simulate -d '模拟/试运行'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l download -d '下载软件包'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l fix-missing -d '修复丢失文件'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l fix-policy -d '修复策略'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l ignore-hold -d '忽略锁定'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l force-yes -d '强制确认'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l trivial-only -d '仅处理简单情况'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l reinstall -d '重新安装'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l solver -d '使用求解器'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -s t -l target-release -d '目标版本'
|
||||
|
||||
# 附加的 GENERIC 选项
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -s d -l download-only -d '仅下载'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -s y -l assume-yes -d '默认确认'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -l assume-no -d '默认否定'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -s u -l show-upgraded -d '显示升级情况'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $group1" -s m -l ignore-missing -d '忽略缺失'
|
||||
|
||||
### 针对各个子命令的专用选项
|
||||
|
||||
# update 命令
|
||||
complete -c aptss -n "__fish_seen_subcommand_from update" -l list-cleanup -d '清理列表'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from update" -l print-uris -d '显示 URI'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from update" -l allow-insecure-repositories -d '允许不安全的仓库'
|
||||
|
||||
# list 命令
|
||||
complete -c aptss -n "__fish_seen_subcommand_from list" -l installed -d '已安装的软件包'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from list" -l upgradable -d '可升级的软件包'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from list" -l manual-installed -d '手动安装的软件包'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from list" -s v -l verbose -d '详细模式'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from list" -s a -l all-versions -d '显示所有版本'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from list" -s t -l target-release -d '目标版本'
|
||||
|
||||
# show 命令
|
||||
complete -c aptss -n "__fish_seen_subcommand_from show" -s a -l all-versions -d '显示所有版本'
|
||||
|
||||
# depends 和 rdepends 命令(逐项添加各选项)
|
||||
for opt in i important installed pre-depends depends recommends suggests replaces breaks conflicts enhances recurse implicit
|
||||
complete -c aptss -n "__fish_seen_subcommand_from depends rdepends" -l $opt -d $opt
|
||||
end
|
||||
complete -c aptss -n "__fish_seen_subcommand_from depends rdepends" -s i -d '选项 -i'
|
||||
|
||||
# search 命令
|
||||
complete -c aptss -n "__fish_seen_subcommand_from search" -s n -l names-only -d '仅匹配名称'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from search" -s f -l full -d '全文搜索'
|
||||
|
||||
# showsrc 命令
|
||||
complete -c aptss -n "__fish_seen_subcommand_from showsrc" -l only-source -d '仅显示源代码'
|
||||
|
||||
# source 命令
|
||||
complete -c aptss -n "__fish_seen_subcommand_from source" -s s -l simulate -d '模拟'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from source" -s b -l compile -d '编译/构建'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from source" -s P -l build-profiles -d '构建配置'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from source" -l diff-only -d '仅显示差异'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from source" -l debian-only -d '仅限 Debian'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from source" -l tar-only -d '仅打包 tar'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from source" -l dsc-only -d '仅下载 DSC'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from source" -s t -l target-release -d '目标版本'
|
||||
|
||||
# build-dep 命令
|
||||
complete -c aptss -n "__fish_seen_subcommand_from build-dep" -s a -l host-architecture -d '主机架构'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from build-dep" -s s -l simulate -d '模拟'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from build-dep" -s P -l build-profiles -d '构建配置'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from build-dep" -s t -l target-release -d '目标版本'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from build-dep" -l purge -d '清除'
|
||||
complete -c aptss -n "__fish_seen_subcommand_from build-dep" -l solver -d '求解依赖'
|
||||
|
||||
# moo 命令
|
||||
complete -c aptss -n "__fish_seen_subcommand_from moo" -l color -d '彩蛋模式'
|
||||
|
||||
# clean 和 autoclean 命令
|
||||
complete -c aptss -n "__fish_seen_subcommand_from clean autoclean" -s s -l simulate -d '模拟'
|
||||
|
||||
### 针对 -t/--target-release 的特殊补全
|
||||
complete -c aptss -n '
|
||||
begin
|
||||
set -l prev (commandline -poc | string trim)
|
||||
test "$prev" = "-t" -o "$prev" = "--target-release"
|
||||
end
|
||||
' -a '(__fish_aptss_target_release)' -d '目标版本'
|
||||
|
||||
### 软件包补全
|
||||
# 对于需要二进制软件包名称的子命令,调用 __fish_aptss_print_packages,
|
||||
# 输出的每一行格式为 "包名<TAB>简介",Fish 会将 TAB 后内容显示为注释。
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $__aptss_pkg_subcmds" -a '(__fish_aptss_print_packages)'
|
||||
|
||||
# 对于 remove、purge、autoremove 命令,补全已安装的软件包(使用 dpkg-query 输出)
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $__aptss_installed_pkg_subcmds" -a '(__fish_aptss_print_installed_packages)' -d '已安装软件包'
|
||||
|
||||
# 对于 source、build-dep、showsrc、policy 命令,补全源代码包,
|
||||
# 如果存在对应的 Sources 索引文件,则调用 __fish_aptss_print_source_packages,
|
||||
# 否则可考虑默认使用二进制包的索引。
|
||||
complete -c aptss -n "__fish_seen_subcommand_from $__aptss_src_pkg_subcmds" -a '(__fish_aptss_print_source_packages)' -d '源代码包'
|
Before ![]() (image error) Size: 89 KiB After ![]() (image error) Size: 253 KiB ![]() ![]() |
Before (image error) Size: 14 KiB After (image error) Size: 7.9 KiB |
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<vendor>Spark Store</vendor>
|
||||
<icon_name>x-package-repository</icon_name>
|
||||
<action id="store.spark-app.ss-do-upgrade">
|
||||
<description>运行ss-do-upgrade需要权限</description>
|
||||
<message>要使用ss-do-upgrade需要权限</message>
|
||||
<defaults>
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<action id="com.spark.update">
|
||||
<description>Run the Spark Update Tool</description>
|
||||
<message>Authentication is required to update the system</message>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/spark-update-tool</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
<defaults>
|
||||
<allow_active>yes</allow_active>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
</defaults>
|
||||
</action>
|
||||
</policyconfig>
|
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_HASH_CHECK_FAILED="Failed in checking package hash! \nPossibly reason can be the package is broken, laggy in sync of Spark Store repository, or, there is a malware attempt to attack. \nIf you don't know what happend, please try install again after execute the command below\n sudo aptss update\n\nIf the problem still happen, please click APP Feedback button in the APP information page to feedback to us.\n\n If you are in the Audition Group,Please use ssaudit instead of ssinstall to audit APPs,for ssinstall is used for password-free install now.\nIf you want to install an app that is removed from Spark Store repository,you can also use ssaudit."
|
||||
TRANSHELL_CONTENT_PLEASE_RUN_AS_ROOT="Please run ssinstall as root"
|
||||
TRANSHELL_CONTENT_FILE_NOT_EXIST="File not exist"
|
||||
TRANSHELL_CONTENT_WILL_NOT_DELETE_DEB="No delete after install option given, will not delete the deb"
|
||||
TRANSHELL_CONTENT_DEB_IS_DELETED="--delete-after-install option is given and the installation is succeeded, delete the deb file."
|
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_HASH_CHECK_FAILED="软件包校验失败!这不应该发生!\n可能是因为软件包已损坏,星火仓库未同步,或者最坏的情况:恶意软件尝试利用自动安装来入侵系统!\n如果你不清楚发生了什么,请执行 sudo aptss update 后再尝试安装。\n如果问题仍然存在,请在应用信息界面点击 应用反馈 来提交反馈给我们!\n\n 如果你是审核人员,请使用 ssaudit来替代ssinstall进行审核工作,因为现在ssinstall已经被用于免密安装。\n如果你正在尝试安装已经下架的星火应用,也可用ssaudit来替代ssinstall"
|
||||
TRANSHELL_CONTENT_PLEASE_RUN_AS_ROOT="请使用root启动ssinstall"
|
||||
TRANSHELL_CONTENT_FILE_NOT_EXIST="文件不存在"
|
||||
TRANSHELL_CONTENT_WILL_NOT_DELETE_DEB="未指定安装后删除或安装出错,不删除deb包"
|
||||
TRANSHELL_CONTENT_DEB_IS_DELETED="使用了--delete-after-install选项且安装未出错,删除deb包"
|
@ -40,6 +40,9 @@ qm.path = /usr/share/spark-store/translations
|
||||
bash_completion.files += pkg/usr/share/bash-completion/completions/aptss
|
||||
bash_completion.path = /usr/share/bash-completion/completions
|
||||
|
||||
fish_completion.files += pkg/usr/share/fish/completions/aptss.fish
|
||||
fish_completion.path = /usr/share/fish/completions/
|
||||
|
||||
desktop.files += pkg/usr/share/applications/*.desktop
|
||||
desktop.path = /usr/share/applications
|
||||
|
||||
@ -73,5 +76,13 @@ INSTALLS += \
|
||||
tmp \
|
||||
service \
|
||||
bash_completion \
|
||||
fish_completion \
|
||||
polkit-1
|
||||
# 暂时不添加
|
||||
|
||||
SUBDIRS += src/spark-update-tool
|
||||
|
||||
spark-update-tool.subdir = src/spark-update-tool
|
||||
spark-update-tool.file = src/spark-update-tool/spark-update-tool.pro
|
||||
spark-update-tool.target = spark-update-tool
|
||||
spark-update-tool.depends = spark-store
|
||||
|
62
spark-update-tool/.gitignore
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
build
|
||||
.vscode
|
||||
.cache
|
||||
CMakeLists.txt.user
|
||||
CMakeLists.txt.user.*
|
||||
obj-x86_64-linux-gnu
|
||||
# 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-update-tool
|
||||
|
||||
.vscode/*
|
||||
src/spark-update-tool
|
58
spark-update-tool/CMakeLists.txt
Normal file
@ -0,0 +1,58 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(spark-update-tool VERSION 0.1 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
|
||||
find_package(Qt5 REQUIRED COMPONENTS Widgets Network Concurrent)
|
||||
|
||||
|
||||
find_package(Qt5 REQUIRED COMPONENTS Widgets Network Concurrent Core Gui)
|
||||
|
||||
# 定义所有项目源文件,现在无需条件判断
|
||||
set(PROJECT_SOURCES
|
||||
src/main.cpp
|
||||
src/mainwindow.cpp
|
||||
src/mainwindow.h
|
||||
src/mainwindow.ui
|
||||
src/aptssupdater.h src/aptssupdater.cpp
|
||||
src/icons.qrc
|
||||
src/appdelegate.h src/appdelegate.cpp
|
||||
src/applistmodel.h src/applistmodel.cpp
|
||||
src/downloadmanager.h src/downloadmanager.cpp
|
||||
)
|
||||
|
||||
|
||||
add_executable(spark-update-tool
|
||||
${PROJECT_SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(spark-update-tool PRIVATE
|
||||
Qt5::Widgets
|
||||
Qt5::Network
|
||||
Qt5::Concurrent
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
)
|
||||
|
||||
|
||||
set_target_properties(spark-update-tool PROPERTIES
|
||||
# ${BUNDLE_ID_OPTION} # 如果上面取消注释,这里也取消注释
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
|
||||
)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS spark-update-tool
|
||||
BUNDLE DESTINATION .
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
29
spark-update-tool/README.md
Normal file
@ -0,0 +1,29 @@
|
||||
### 星火软件更新器
|
||||
|
||||
#### 简介
|
||||
|
||||
欢迎使用星火软件更新器!本工具可帮助您便捷地更新 Linux 计算机上的各类程序。
|
||||
|
||||
本版本专为仅包含 Qt5 的 Linux 发行版设计。
|
||||
**请在 root 权限下运行本程序。**
|
||||
|
||||
#### 当前支持的 Linux 发行版
|
||||
|
||||
- [x] GXDE OS
|
||||
- [x] Ubuntu
|
||||
- [x] deepin
|
||||
- [ ] Kylin
|
||||
|
||||
#### 功能清单
|
||||
|
||||
| 功能模块 | 描述 |
|
||||
|------------------|--------------------------------------|
|
||||
| 应用名识别 | 基于 `ss-do-upgrade.sh` 部分代码实现 |
|
||||
| 应用包大小识别 | 通过 dpkg 获取包大小信息 |
|
||||
| 获取应用图标 | 利用 QDesktopServices 实现 |
|
||||
| 支持 ACE 兼容环境| |
|
||||
| 多线程下载 | 基于 aptss 方案 |
|
||||
|
||||
#### 联系与反馈
|
||||
|
||||
如有问题或建议,欢迎联系:momen@momen.world
|
5
spark-update-tool/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
spark-update-tool (1.0.0) unstable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- momen <vmomenv@gmail.com> Wed, 18 Jun 2025 00:00:00 +0000
|
1
spark-update-tool/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
9
|
13
spark-update-tool/debian/control
Normal file
@ -0,0 +1,13 @@
|
||||
Source: spark-update-tool
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: momen <vmomenv@gmail.com>
|
||||
Build-Depends: debhelper (>= 9)
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: https://gitee.com/spark-store-project/Spark-Update-Tool
|
||||
|
||||
Package: spark-update-tool
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Spark Update Tool
|
||||
星火应用商店更新组件。This package provides the Spark Update Tool. It includes features for checking for updates, downloading, and applying them seamlessly.
|
7
spark-update-tool/debian/copyright
Normal file
@ -0,0 +1,7 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: spark-update-tool
|
||||
Source: https://gitee.com/spark-store-project/Spark-Update-Tool
|
||||
|
||||
Files: *
|
||||
Copyright: 2025, momen <vmomenv@gmail.com>
|
||||
License: GPL-3.0+
|
3
spark-update-tool/debian/install
Normal file
@ -0,0 +1,3 @@
|
||||
build/spark-update-tool /usr/bin/
|
||||
debian/spark-update-tool.desktop /usr/share/applications
|
||||
resources/128*128/spark-update-tool.png /usr/share/icons/hicolor/128x128/apps
|
11
spark-update-tool/debian/postrm
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
purge)
|
||||
|
||||
rm -rf /usr/share/spark-update-tool
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
7
spark-update-tool/debian/rules
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr
|
1
spark-update-tool/debian/source/format
Normal file
@ -0,0 +1 @@
|
||||
3.0 (native)
|
9
spark-update-tool/debian/spark-update-tool.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=Spark Update Tool
|
||||
Comment=A Qt-based application for managing and updating software
|
||||
Exec=spark-update-tool
|
||||
Icon=spark-update-tool
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Utility;
|
BIN
spark-update-tool/resources/128*128/spark-update-tool.png
Normal file
After ![]() (image error) Size: 8.9 KiB |
1
spark-update-tool/resources/default_icon.svg
Normal file
After (image error) Size: 86 KiB |
1
spark-update-tool/resources/down_arrow.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="12" height="16" viewBox="0 0 12 16"><defs><clipPath id="master_svg0_1_074"><rect x="0.75" y="2" width="10.5" height="12" rx="0"/></clipPath></defs><g><rect x="0" y="0" width="12" height="16" rx="0" fill="#000000" fill-opacity="0" style="mix-blend-mode:passthrough"/><g clip-path="url(#master_svg0_1_074)"><g transform="matrix(1,0,0,-1,0,24.015625)"><g><path d="M4.71094,12.2187505Q4.94531,12.0078125,5.25,12.0078125Q5.55469,12.0078125,5.78906,12.2187505L10.2891,16.7187525Q10.5,16.9531225,10.5,17.2578125Q10.5,17.5625025,10.2891,17.7968725Q10.0547,18.0078125,9.75,18.0078125Q9.44531,18.0078125,9.21094,17.7968725L5.25,13.8125025L1.28906,17.7968725Q1.05469,18.0078125,0.75,18.0078125Q0.445312,18.0078125,0.210938,17.7968725Q0,17.5625025,0,17.2578125Q0,16.9531225,0.210938,16.7187525L4.71094,12.2187505Z" fill="#4B5563" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></g></g></svg>
|
After (image error) Size: 1009 B |
1
spark-update-tool/resources/spark-update-tool.svg
Normal file
After (image error) Size: 14 KiB |
321
spark-update-tool/src/appdelegate.cpp
Normal file
@ -0,0 +1,321 @@
|
||||
#include "appdelegate.h"
|
||||
#include <QIcon>
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QProgressBar>
|
||||
#include <QPushButton>
|
||||
#include <QPainter>
|
||||
#include <QMouseEvent>
|
||||
|
||||
AppDelegate::AppDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent), m_downloadManager(new DownloadManager(this)), m_installProcess(nullptr) {
|
||||
connect(m_downloadManager, &DownloadManager::downloadFinished, this,
|
||||
[this](const QString &packageName, bool success) {
|
||||
if (m_downloads.contains(packageName)) {
|
||||
m_downloads[packageName].isDownloading = false;
|
||||
emit updateDisplay(packageName);
|
||||
qDebug() << (success ? "下载完成:" : "下载失败:") << packageName;
|
||||
if (success) {
|
||||
enqueueInstall(packageName);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
connect(m_downloadManager, &DownloadManager::downloadProgress, this,
|
||||
[this](const QString &packageName, int progress) {
|
||||
if (m_downloads.contains(packageName)) {
|
||||
m_downloads[packageName].progress = progress;
|
||||
qDebug()<<progress;
|
||||
emit updateDisplay(packageName); // 实时刷新进度条
|
||||
}
|
||||
});
|
||||
m_spinnerTimer.start();
|
||||
}
|
||||
|
||||
void AppDelegate::setModel(QAbstractItemModel *model) {
|
||||
m_model = model;
|
||||
}
|
||||
|
||||
void AppDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const {
|
||||
painter->save();
|
||||
|
||||
if (option.state & QStyle::State_Selected)
|
||||
painter->fillRect(option.rect, option.palette.highlight());
|
||||
else
|
||||
painter->fillRect(option.rect, QColor("#F3F4F6"));
|
||||
|
||||
QFont boldFont = option.font;
|
||||
boldFont.setBold(true);
|
||||
QFont normalFont = option.font;
|
||||
|
||||
QString name = index.data(Qt::DisplayRole).toString();
|
||||
QString currentVersion = index.data(Qt::UserRole + 2).toString();
|
||||
QString newVersion = index.data(Qt::UserRole + 3).toString();
|
||||
QString iconPath = index.data(Qt::UserRole + 4).toString();
|
||||
QString size = index.data(Qt::UserRole + 5).toString();
|
||||
QString description = index.data(Qt::UserRole + 6).toString();
|
||||
|
||||
QRect rect = option.rect;
|
||||
int margin = 10, spacing = 6, iconSize = 40;
|
||||
|
||||
QRect iconRect(rect.left() + margin, rect.top() + (rect.height() - iconSize) / 2, iconSize, iconSize);
|
||||
QIcon(iconPath).paint(painter, iconRect);
|
||||
|
||||
int textX = iconRect.right() + margin;
|
||||
int textWidth = rect.width() - textX - 100;
|
||||
|
||||
QRect nameRect(textX, rect.top() + margin, textWidth, 20);
|
||||
painter->setFont(boldFont);
|
||||
painter->setPen(QColor("#333333"));
|
||||
painter->drawText(nameRect, Qt::AlignLeft | Qt::AlignVCenter, name);
|
||||
|
||||
QRect versionRect(textX, nameRect.bottom() + spacing, textWidth, 20);
|
||||
painter->setFont(normalFont);
|
||||
painter->setPen(QColor("#888888"));
|
||||
painter->drawText(versionRect, Qt::AlignLeft | Qt::AlignVCenter,
|
||||
QString("当前版本: %1 → 新版本: %2").arg(currentVersion, newVersion));
|
||||
|
||||
QRect descRect(textX, versionRect.bottom() + spacing, textWidth, 40);
|
||||
painter->setFont(normalFont);
|
||||
painter->setPen(QColor("#AAAAAA"));
|
||||
painter->drawText(descRect, Qt::TextWordWrap,
|
||||
QString("包大小:%1 MB").arg(QString::number(size.toDouble() / (1024 * 1024), 'f', 2)));
|
||||
|
||||
QString packageName = index.data(Qt::UserRole + 1).toString();
|
||||
bool isDownloading = m_downloads.contains(packageName) && m_downloads[packageName].isDownloading;
|
||||
int progress = m_downloads.value(packageName, DownloadInfo{0, false}).progress;
|
||||
bool isInstalled = m_downloads.value(packageName).isInstalled;
|
||||
bool isInstalling = m_downloads.value(packageName).isInstalling;
|
||||
|
||||
if (isDownloading) {
|
||||
QRect progressRect(rect.right() - 270, rect.top() + (rect.height() - 20) / 2, 150, 20);
|
||||
QStyleOptionProgressBar progressBarOption;
|
||||
progressBarOption.rect = progressRect;
|
||||
progressBarOption.minimum = 0;
|
||||
progressBarOption.maximum = 100;
|
||||
progressBarOption.progress = progress;
|
||||
progressBarOption.text = QString("%1%").arg(progress);
|
||||
progressBarOption.textVisible = true;
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &progressBarOption, painter);
|
||||
|
||||
// 修改后的取消按钮绘制代码
|
||||
QRect buttonRect(rect.right() - 80, rect.top() + (rect.height() - 30) / 2, 70, 30);
|
||||
painter->setPen(Qt::NoPen);
|
||||
painter->setBrush(QColor("#ff4444")); // 红色背景
|
||||
painter->drawRoundedRect(buttonRect, 4, 4); // 圆角矩形
|
||||
|
||||
painter->setPen(Qt::white); // 白色文字
|
||||
painter->setFont(option.font);
|
||||
painter->drawText(buttonRect, Qt::AlignCenter, "取消");
|
||||
} else if (isInstalling) {
|
||||
// 安装中:显示转圈和文字
|
||||
QRect spinnerRect(option.rect.right() - 80, option.rect.top() + (option.rect.height() - 30) / 2, 30, 30);
|
||||
int angle = (m_spinnerTimer.elapsed() / 10) % 360;
|
||||
QPen pen(QColor("#2563EB"), 3);
|
||||
painter->setPen(pen);
|
||||
painter->setRenderHint(QPainter::Antialiasing, true);
|
||||
QRectF arcRect = spinnerRect.adjusted(3, 3, -3, -3);
|
||||
painter->drawArc(arcRect, angle * 16, 120 * 16); // 120度弧
|
||||
|
||||
QRect textRect(option.rect.right() - 120, option.rect.top() + (option.rect.height() - 30) / 2, 110, 30);
|
||||
painter->setPen(QColor("#2563EB"));
|
||||
painter->setFont(option.font);
|
||||
painter->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, "正在安装中");
|
||||
} else {
|
||||
QRect buttonRect(option.rect.right() - 80, option.rect.top() + (option.rect.height() - 30) / 2, 70, 30);
|
||||
painter->setPen(Qt::NoPen);
|
||||
if (isInstalled) {
|
||||
painter->setBrush(QColor("#10B981"));
|
||||
painter->drawRoundedRect(buttonRect, 4, 4);
|
||||
painter->setPen(Qt::white);
|
||||
painter->drawText(buttonRect, Qt::AlignCenter, "已安装");
|
||||
} else if (m_downloads.contains(packageName) && !m_downloads[packageName].isDownloading) {
|
||||
// 下载完成,按钮绿色,样式不变
|
||||
painter->setBrush(QColor("#10B981"));
|
||||
painter->drawRoundedRect(buttonRect, 4, 4);
|
||||
painter->setPen(Qt::white);
|
||||
painter->drawText(buttonRect, Qt::AlignCenter, "下载完成");
|
||||
// 不需要特殊处理样式,交互在 editorEvent 控制
|
||||
} else {
|
||||
painter->setBrush(QColor("#e9effd"));
|
||||
painter->drawRoundedRect(buttonRect, 4, 4);
|
||||
painter->setPen(QColor("#2563EB"));
|
||||
painter->drawText(buttonRect, Qt::AlignCenter, "更新");
|
||||
}
|
||||
}
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
QSize AppDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const {
|
||||
return QSize(option.rect.width(), 110);
|
||||
}
|
||||
|
||||
bool AppDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
|
||||
const QStyleOptionViewItem &option, const QModelIndex &index) {
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
|
||||
QRect rect = option.rect;
|
||||
QString packageName = index.data(Qt::UserRole + 1).toString();
|
||||
|
||||
if (m_downloads.contains(packageName) && m_downloads[packageName].isDownloading) {
|
||||
QRect cancelButtonRect(rect.right() - 70, rect.top() + (rect.height() - 20) / 2, 60, 20);
|
||||
if (cancelButtonRect.contains(mouseEvent->pos())) {
|
||||
m_downloadManager->cancelDownload(packageName);
|
||||
m_downloads.remove(packageName);
|
||||
emit updateDisplay(packageName);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
QRect buttonRect(rect.right() - 80, rect.top() + (rect.height() - 30) / 2, 70, 30);
|
||||
if (buttonRect.contains(mouseEvent->pos())) {
|
||||
// 判断是否为“下载完成”状态,如果是则不响应点击
|
||||
if (m_downloads.contains(packageName) && !m_downloads[packageName].isDownloading) {
|
||||
// “下载完成”状态,按钮失效,点击无效
|
||||
return false;
|
||||
}
|
||||
QString downloadUrl = index.data(Qt::UserRole + 7).toString();
|
||||
QString outputPath = QString("%1/%2.metalink").arg(QDir::tempPath(), packageName);
|
||||
|
||||
m_downloads[packageName] = {0, true};
|
||||
m_downloadManager->startDownload(packageName, downloadUrl, outputPath);
|
||||
emit updateDisplay(packageName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return QStyledItemDelegate::editorEvent(event, model, option, index);
|
||||
}
|
||||
|
||||
void AppDelegate::startDownloadForAll() {
|
||||
if (!m_model) return;
|
||||
for (int row = 0; row < m_model->rowCount(); ++row) {
|
||||
QModelIndex index = m_model->index(row, 0);
|
||||
QString packageName = index.data(Qt::UserRole + 1).toString();
|
||||
if (m_downloads.contains(packageName) && (m_downloads[packageName].isDownloading || m_downloads[packageName].isInstalled))
|
||||
continue; // 跳过正在下载或已安装的
|
||||
QString downloadUrl = index.data(Qt::UserRole + 7).toString();
|
||||
QString outputPath = QString("%1/%2.metalink").arg(QDir::tempPath(), packageName);
|
||||
m_downloads[packageName] = {0, true, false};
|
||||
m_downloadManager->startDownload(packageName, downloadUrl, outputPath);
|
||||
emit updateDisplay(packageName);
|
||||
}
|
||||
}
|
||||
|
||||
// 新增:安装队列相关实现
|
||||
void AppDelegate::enqueueInstall(const QString &packageName) {
|
||||
m_installQueue.enqueue(packageName);
|
||||
if (!m_isInstalling) {
|
||||
startNextInstall();
|
||||
}
|
||||
}
|
||||
|
||||
void AppDelegate::startNextInstall() {
|
||||
if (m_installQueue.isEmpty()) {
|
||||
m_isInstalling = false;
|
||||
m_installingPackage.clear();
|
||||
return;
|
||||
}
|
||||
m_isInstalling = true;
|
||||
QString packageName = m_installQueue.dequeue();
|
||||
m_installingPackage = packageName;
|
||||
m_downloads[packageName].isInstalling = true;
|
||||
emit updateDisplay(packageName);
|
||||
|
||||
// 查找 /tmp 下以包名开头的 .deb 文件
|
||||
QDir tempDir(QDir::tempPath());
|
||||
QStringList debs = tempDir.entryList(QStringList() << QString("%1_*.deb").arg(packageName), QDir::Files);
|
||||
QString debPath;
|
||||
if (!debs.isEmpty()) {
|
||||
debPath = tempDir.absoluteFilePath(debs.first());
|
||||
} else {
|
||||
debs = tempDir.entryList(QStringList() << QString("%1*.deb").arg(packageName), QDir::Files);
|
||||
if (!debs.isEmpty()) {
|
||||
debPath = tempDir.absoluteFilePath(debs.first());
|
||||
}
|
||||
}
|
||||
|
||||
if (debPath.isEmpty()) {
|
||||
qWarning() << "未找到deb文件,包名:" << packageName;
|
||||
m_downloads[packageName].isInstalling = false;
|
||||
emit updateDisplay(packageName);
|
||||
m_installingPackage.clear();
|
||||
startNextInstall();
|
||||
return;
|
||||
}
|
||||
|
||||
m_installProcess = new QProcess(this);
|
||||
|
||||
// 新增:准备安装日志文件
|
||||
QString logPath = QString("/tmp/%1_install.log").arg(packageName);
|
||||
QFile *logFile = new QFile(logPath, m_installProcess);
|
||||
if (logFile->open(QIODevice::Append | QIODevice::Text)) {
|
||||
// 设置权限为777
|
||||
QFile::setPermissions(logPath, QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner |
|
||||
QFile::ReadGroup | QFile::WriteGroup | QFile::ExeGroup |
|
||||
QFile::ReadOther | QFile::WriteOther | QFile::ExeOther);
|
||||
connect(m_installProcess, &QProcess::readyReadStandardOutput, this, [this, packageName, logFile]() {
|
||||
QByteArray out = m_installProcess->readAllStandardOutput();
|
||||
logFile->write(out);
|
||||
logFile->flush();
|
||||
QString text = QString::fromLocal8Bit(out);
|
||||
qDebug().noquote() << text;
|
||||
// 检查“软件包已安装”关键字
|
||||
if (text.contains(QStringLiteral("软件包已安装"))) {
|
||||
m_downloads[packageName].isInstalling = false;
|
||||
m_downloads[packageName].isInstalled = true;
|
||||
emit updateDisplay(packageName);
|
||||
}
|
||||
});
|
||||
connect(m_installProcess, &QProcess::readyReadStandardError, this, [this, logFile]() {
|
||||
QByteArray err = m_installProcess->readAllStandardError();
|
||||
logFile->write(err);
|
||||
logFile->flush();
|
||||
qDebug().noquote() << QString::fromLocal8Bit(err);
|
||||
});
|
||||
connect(m_installProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
this, [this, packageName, logFile](int /*exitCode*/, QProcess::ExitStatus /*status*/) {
|
||||
if (logFile) logFile->close();
|
||||
// 若未检测到“软件包已安装”,此处兜底
|
||||
if (!m_downloads[packageName].isInstalled) {
|
||||
m_downloads[packageName].isInstalling = false;
|
||||
}
|
||||
emit updateDisplay(packageName);
|
||||
m_installProcess->deleteLater();
|
||||
m_installProcess = nullptr;
|
||||
m_installingPackage.clear();
|
||||
startNextInstall();
|
||||
});
|
||||
} else {
|
||||
// 日志文件无法打开时,仍然要连接原有信号
|
||||
connect(m_installProcess, &QProcess::readyReadStandardOutput, this, [this, packageName]() {
|
||||
QByteArray out = m_installProcess->readAllStandardOutput();
|
||||
QString text = QString::fromLocal8Bit(out);
|
||||
qDebug().noquote() << text;
|
||||
if (text.contains(QStringLiteral("软件包已安装"))) {
|
||||
m_downloads[packageName].isInstalling = false;
|
||||
m_downloads[packageName].isInstalled = true;
|
||||
emit updateDisplay(packageName);
|
||||
}
|
||||
});
|
||||
connect(m_installProcess, &QProcess::readyReadStandardError, this, [this]() {
|
||||
QByteArray err = m_installProcess->readAllStandardError();
|
||||
qDebug().noquote() << QString::fromLocal8Bit(err);
|
||||
});
|
||||
connect(m_installProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
this, [this, packageName](int /*exitCode*/, QProcess::ExitStatus /*status*/) {
|
||||
emit updateDisplay(packageName);
|
||||
m_installProcess->deleteLater();
|
||||
m_installProcess = nullptr;
|
||||
m_installingPackage.clear();
|
||||
startNextInstall();
|
||||
});
|
||||
}
|
||||
|
||||
// 注意参数顺序:deb路径在前,--no-create-desktop-entry在后
|
||||
QStringList args;
|
||||
args << debPath << "--no-create-desktop-entry";
|
||||
m_installProcess->start("ssinstall", args);
|
||||
}
|
46
spark-update-tool/src/appdelegate.h
Normal file
@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QHash>
|
||||
#include <QQueue>
|
||||
#include <QProcess>
|
||||
#include <QElapsedTimer>
|
||||
#include "downloadmanager.h"
|
||||
|
||||
struct DownloadInfo {
|
||||
int progress = 0;
|
||||
bool isDownloading = false;
|
||||
bool isInstalled = false;
|
||||
bool isInstalling = false; // 新增:标记是否正在安装
|
||||
};
|
||||
|
||||
class AppDelegate : public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AppDelegate(QObject *parent = nullptr);
|
||||
|
||||
void setModel(QAbstractItemModel *model);
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
bool editorEvent(QEvent *event, QAbstractItemModel *model,
|
||||
const QStyleOptionViewItem &option, const QModelIndex &index) override;
|
||||
void startDownloadForAll();
|
||||
|
||||
signals:
|
||||
void updateDisplay(const QString &packageName);
|
||||
|
||||
private:
|
||||
DownloadManager *m_downloadManager;
|
||||
QHash<QString, DownloadInfo> m_downloads;
|
||||
QAbstractItemModel *m_model = nullptr;
|
||||
|
||||
QQueue<QString> m_installQueue;
|
||||
bool m_isInstalling = false;
|
||||
QProcess *m_installProcess = nullptr;
|
||||
QString m_installingPackage; // 当前正在安装的包名
|
||||
QElapsedTimer m_spinnerTimer; // 用于转圈动画
|
||||
|
||||
void enqueueInstall(const QString &packageName);
|
||||
void startNextInstall();
|
||||
};
|
62
spark-update-tool/src/applistmodel.cpp
Normal file
@ -0,0 +1,62 @@
|
||||
#include "applistmodel.h"
|
||||
|
||||
AppListModel::AppListModel(QObject *parent) : QAbstractListModel(parent) {}
|
||||
|
||||
int AppListModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
if (parent.isValid())
|
||||
return 0;
|
||||
return m_data.size();
|
||||
}
|
||||
|
||||
QVariant AppListModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid() || index.row() >= m_data.size())
|
||||
return QVariant();
|
||||
|
||||
const QVariantMap &map = m_data.at(index.row()); // 直接访问 QVariantMap
|
||||
switch (role) {
|
||||
case Qt::DisplayRole:
|
||||
return map.value("name");
|
||||
case Qt::UserRole + 1: // 包名
|
||||
return map.value("package");
|
||||
case Qt::UserRole + 2: // 当前版本
|
||||
return map.value("current_version");
|
||||
case Qt::UserRole + 3: // 新版本
|
||||
return map.value("new_version");
|
||||
case Qt::UserRole + 4: // 图标路径
|
||||
return map.value("icon");
|
||||
case Qt::UserRole + 5: // 文件大小
|
||||
return map.value("size");
|
||||
case Qt::UserRole + 6: // 描述
|
||||
return map.value("description");
|
||||
case Qt::UserRole + 7: // 下载 URL
|
||||
return map.value("download_url"); // 返回下载 URL
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
|
||||
void AppListModel::setUpdateData(const QJsonArray &updateInfo)
|
||||
{
|
||||
beginResetModel();
|
||||
m_data.clear(); // 清空 QList<QVariantMap>
|
||||
|
||||
for (const auto &item : updateInfo) {
|
||||
QJsonObject obj = item.toObject();
|
||||
QVariantMap map;
|
||||
map["package"] = obj["package"].toString();
|
||||
map["name"] = obj["name"].toString();
|
||||
map["current_version"] = obj["current_version"].toString();
|
||||
map["new_version"] = obj["new_version"].toString();
|
||||
map["icon"] = obj["icon"].toString();
|
||||
map["size"] = obj["size"].toString();
|
||||
map["download_url"] = obj["download_url"].toString(); // 确保设置下载 URL
|
||||
m_data.append(map); // 添加到 QList<QVariantMap>
|
||||
|
||||
qDebug() << "设置到模型的包名:" << map["package"].toString();
|
||||
qDebug() << "设置到模型的下载 URL:" << map["download_url"].toString(); // 检查设置的数据
|
||||
}
|
||||
|
||||
endResetModel();
|
||||
}
|
26
spark-update-tool/src/applistmodel.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef APPLISTMODEL_H
|
||||
#define APPLISTMODEL_H
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QJsonArray>
|
||||
// 添加 QJsonObject 头文件
|
||||
#include <QJsonObject>
|
||||
|
||||
class AppListModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AppListModel(QObject *parent = nullptr);
|
||||
|
||||
// 重写方法
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
// 设置更新数据
|
||||
void setUpdateData(const QJsonArray &data);
|
||||
|
||||
private:
|
||||
QList<QVariantMap> m_data; // 修改类型为 QList<QVariantMap>
|
||||
};
|
||||
|
||||
#endif // APPLISTMODEL_H
|
398
spark-update-tool/src/aptssupdater.cpp
Normal file
@ -0,0 +1,398 @@
|
||||
#include "aptssupdater.h"
|
||||
#include <QProcess>
|
||||
#include <QTextStream>
|
||||
#include <QRegularExpression>
|
||||
#include <QFile>
|
||||
#include <qdebug.h>
|
||||
|
||||
aptssUpdater::aptssUpdater(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
packageName = getUpdateablePackages();
|
||||
}
|
||||
|
||||
QStringList aptssUpdater::getUpdateablePackages()
|
||||
{
|
||||
QStringList packageDetails;
|
||||
QProcess process;
|
||||
QString command = R"(env LANGUAGE=en_US /usr/bin/apt -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf list --upgradable -o Dir::Etc::sourcelist="/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="/dev/null" -o APT::Get::List-Cleanup="0" | awk 'NR>1')";
|
||||
|
||||
process.start("bash", QStringList() << "-c" << command);
|
||||
if (!process.waitForFinished()) {
|
||||
qWarning() << "Process failed to finish.";
|
||||
return packageDetails;
|
||||
}
|
||||
|
||||
QString output = process.readAllStandardOutput();
|
||||
QStringList lines = output.split('\n', Qt::SkipEmptyParts);
|
||||
|
||||
// 创建临时文件
|
||||
QTemporaryFile tempFile;
|
||||
tempFile.setAutoRemove(false);
|
||||
if (tempFile.open()) {
|
||||
QTextStream stream(&tempFile);
|
||||
|
||||
for (const QString &line : lines) {
|
||||
QRegularExpression regex(R"(([\w\-\+\.]+)/\S+\s+([^\s]+)\s+\S+\s+\[upgradable from: ([^\]]+)\])");
|
||||
QRegularExpressionMatch match = regex.match(line);
|
||||
if (match.hasMatch()) {
|
||||
QString name = match.captured(1);
|
||||
QString newVersion = match.captured(2);
|
||||
QString oldVersion = match.captured(3);
|
||||
|
||||
// 检查版本是否相同,相同则跳过
|
||||
if (newVersion == oldVersion) {
|
||||
qDebug() << "跳过版本相同的包:" << name << "(" << oldVersion << "→" << newVersion << ")";
|
||||
continue;
|
||||
}
|
||||
|
||||
// 写入内存列表
|
||||
packageDetails << QString("%1: %2 → %3").arg(name, oldVersion, newVersion);
|
||||
|
||||
// 写入临时文件(原始数据)
|
||||
stream << name << "|" << oldVersion << "|" << newVersion << "\n";
|
||||
}
|
||||
}
|
||||
tempFile.close();
|
||||
m_tempFilePath = tempFile.fileName();
|
||||
qDebug()<< "临时文件路径:" << m_tempFilePath;
|
||||
|
||||
} else {
|
||||
qWarning() << "无法创建临时文件";
|
||||
}
|
||||
|
||||
return packageDetails;
|
||||
}
|
||||
|
||||
|
||||
QStringList aptssUpdater::getPackageSizes()
|
||||
{
|
||||
QStringList packageDetails;
|
||||
QProcess process;
|
||||
|
||||
// 获取可更新包名列表
|
||||
QStringList updateablePackages;
|
||||
for (const QString &pkgInfo : packageName) {
|
||||
updateablePackages << pkgInfo.section(":", 0, 0).trimmed();
|
||||
}
|
||||
|
||||
foreach (const QString &packageName, updateablePackages) {
|
||||
// 构建新命令(包含包名参数)
|
||||
QString command = QString("apt download %1 --print-uris -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf "
|
||||
"-o Dir::Etc::sourcelist=\"/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list\" "
|
||||
"-o Dir::Etc::sourceparts=\"/dev/null\"").arg(packageName);
|
||||
|
||||
process.start("bash", QStringList() << "-c" << command);
|
||||
if (!process.waitForFinished()) {
|
||||
qWarning() << "获取包信息失败:" << packageName;
|
||||
continue;
|
||||
}
|
||||
|
||||
QString output = process.readAllStandardOutput();
|
||||
// 使用正则匹配所有信息
|
||||
// 调整正则表达式匹配分组
|
||||
QRegularExpression regex(R"('([^']+)'\s+(\S+)\s+(\d+)\s+SHA512:([^\s]+))"); // 分组1:URL 分组2:文件名 分组3:大小 分组4:SHA512
|
||||
QRegularExpressionMatch match = regex.match(output);
|
||||
|
||||
if (match.hasMatch()) {
|
||||
QString url = match.captured(1);
|
||||
QString fileName = match.captured(2);
|
||||
QString size = match.captured(3);
|
||||
QString sha512 = match.captured(4);
|
||||
|
||||
// 调整字段顺序:包名 | 大小 | URL | SHA512
|
||||
packageDetails << QString("%1: %2|%3|%4").arg(packageName, size, url, sha512);
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "完整包信息:" << packageDetails;
|
||||
return packageDetails;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QStringList aptssUpdater::getDesktopAppNames()
|
||||
{
|
||||
QStringList appNames;
|
||||
QProcess dpkgProcess;
|
||||
|
||||
// 获取当前系统语言环境
|
||||
QString lang = QLocale().name().replace("_", "-");
|
||||
|
||||
// 遍历所有可更新包(复用已有的临时文件数据)
|
||||
QStringList packages = packageName;
|
||||
|
||||
foreach (const QString &package, packages) {
|
||||
QString packageName = package.split(":")[0];
|
||||
QString finalName = packageName; // 默认使用包名
|
||||
|
||||
// 获取包文件列表
|
||||
dpkgProcess.start("dpkg", QStringList() << "-L" << packageName);
|
||||
dpkgProcess.waitForFinished();
|
||||
QStringList files = QString(dpkgProcess.readAllStandardOutput()).split('\n', Qt::SkipEmptyParts);
|
||||
|
||||
// 先检查常规应用目录
|
||||
QStringList regularDesktopFiles = files.filter("/usr/share/applications/");
|
||||
QString regularAppName;
|
||||
if (!regularDesktopFiles.isEmpty()) {
|
||||
checkDesktopFiles(regularDesktopFiles, regularAppName, lang, packageName);
|
||||
}
|
||||
|
||||
// 如果常规目录没有找到,再检查特殊目录
|
||||
if (regularAppName.isEmpty()) {
|
||||
QStringList specialDesktopFiles = files.filter(QRegularExpression(QString("/opt/apps/%1/entries/applications").arg(packageName)));
|
||||
QString specialAppName;
|
||||
if (!specialDesktopFiles.isEmpty()) {
|
||||
checkDesktopFiles(specialDesktopFiles, specialAppName, lang, packageName);
|
||||
if (!specialAppName.isEmpty()) {
|
||||
finalName = specialAppName;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
finalName = regularAppName;
|
||||
}
|
||||
|
||||
// 输出格式为[软件名|包名]
|
||||
appNames << QString("[%1|%2]").arg(finalName, packageName);
|
||||
}
|
||||
qDebug()<< "应用名称列表:" << appNames;
|
||||
return appNames;
|
||||
}
|
||||
|
||||
|
||||
bool aptssUpdater::checkDesktopFiles(const QStringList &desktopFiles, QString &appName, const QString &lang, const QString &packageName)
|
||||
{
|
||||
QString lastValidName;
|
||||
QRegularExpression noDisplayRe("^NoDisplay=(true|True)");
|
||||
QRegularExpression nameRe("^Name\\[?" + lang + "?\\]?=(.*)");
|
||||
QRegularExpression nameOrigRe("^Name=(.*)");
|
||||
|
||||
foreach (const QString &filePath, desktopFiles) {
|
||||
if (!filePath.endsWith(".desktop")) continue;
|
||||
|
||||
QFile file(filePath);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) continue;
|
||||
|
||||
bool skip = false;
|
||||
QString currentName;
|
||||
|
||||
QTextStream in(&file);
|
||||
while (!in.atEnd()) {
|
||||
QString line = in.readLine().trimmed();
|
||||
|
||||
// 检查NoDisplay属性
|
||||
if (line.startsWith("NoDisplay=")) {
|
||||
if (noDisplayRe.match(line).hasMatch()) {
|
||||
skip = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 优先匹配本地化名称
|
||||
if (currentName.isEmpty()) {
|
||||
QRegularExpressionMatch match = nameRe.match(line);
|
||||
if (match.hasMatch()) {
|
||||
currentName = match.captured(1);
|
||||
continue;
|
||||
}
|
||||
|
||||
// 匹配原始名称
|
||||
match = nameOrigRe.match(line);
|
||||
if (match.hasMatch()) {
|
||||
currentName = match.captured(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!skip && !currentName.isEmpty()) {
|
||||
lastValidName = currentName;
|
||||
}
|
||||
}
|
||||
|
||||
// 处理最终的有效名称
|
||||
if (!lastValidName.isEmpty()) {
|
||||
appName = lastValidName; // 直接赋值而不是使用<<
|
||||
return true;
|
||||
}
|
||||
|
||||
// 回退到包名
|
||||
appName = packageName;
|
||||
return false;
|
||||
}
|
||||
|
||||
QStringList aptssUpdater::getPackageIcons()
|
||||
{
|
||||
QStringList packageIcons;
|
||||
QProcess dpkgProcess;
|
||||
|
||||
// 遍历所有可更新包
|
||||
QStringList packages = packageName;
|
||||
|
||||
foreach (const QString &package, packages) {
|
||||
QString packageName = package.split(":")[0];
|
||||
QString iconPath = ":/resources/default_icon.svg"; // 默认图标
|
||||
|
||||
// 获取包文件列表
|
||||
dpkgProcess.start("dpkg", QStringList() << "-L" << packageName);
|
||||
dpkgProcess.waitForFinished();
|
||||
QStringList files = QString(dpkgProcess.readAllStandardOutput()).split('\n', Qt::SkipEmptyParts);
|
||||
|
||||
// 查找.desktop文件
|
||||
QStringList desktopFiles = files.filter(QRegularExpression("/(usr/share|opt/apps)/.*\\.desktop$"));
|
||||
|
||||
// 从.desktop文件中提取图标
|
||||
foreach (const QString &desktopFile, desktopFiles) {
|
||||
QFile file(desktopFile);
|
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream in(&file);
|
||||
while (!in.atEnd()) {
|
||||
QString line = in.readLine().trimmed();
|
||||
if (line.startsWith("Icon=")) {
|
||||
QString iconName = line.mid(5).trimmed();
|
||||
|
||||
// 处理相对图标名(如Icon=vscode)
|
||||
if (!iconName.contains('/')) {
|
||||
// 查找标准图标路径
|
||||
QStringList iconPaths = {
|
||||
QString("/usr/share/pixmaps/%1.png").arg(iconName),
|
||||
QString("/usr/share/icons/hicolor/48x48/apps/%1.png").arg(iconName),
|
||||
QString("/usr/share/icons/hicolor/scalable/apps/%1.svg").arg(iconName),
|
||||
QString("/opt/apps/%1/entries/icons/hicolor/48x48/apps/%2.png").arg(packageName, iconName)
|
||||
};
|
||||
|
||||
foreach (const QString &path, iconPaths) {
|
||||
if (QFile::exists(path)) {
|
||||
iconPath = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 已经是绝对路径
|
||||
if (QFile::exists(iconName)) {
|
||||
iconPath = iconName;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
|
||||
// 如果.desktop中没有找到图标,尝试直接查找包中的图标文件
|
||||
if (iconPath == ":/resources/default_icon.svg") {
|
||||
QStringList iconFiles = files.filter(QRegularExpression("/(usr/share/pixmaps|usr/share/icons|opt/apps/.*/entries/icons)/.*\\.(png|svg)$"));
|
||||
if (!iconFiles.isEmpty()) {
|
||||
iconPath = iconFiles.first();
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "包名:" << packageName << "图标路径:" << iconPath;
|
||||
packageIcons << QString("%1: %2").arg(packageName, iconPath);
|
||||
}
|
||||
|
||||
return packageIcons;
|
||||
}
|
||||
|
||||
|
||||
QJsonArray aptssUpdater::getUpdateInfoAsJson()
|
||||
{
|
||||
QJsonArray jsonArray;
|
||||
|
||||
// 获取所有需要的信息
|
||||
QStringList sizes = getPackageSizes();
|
||||
QStringList names = getDesktopAppNames();
|
||||
QStringList icons = getPackageIcons();
|
||||
|
||||
// 创建包名到各种信息的映射
|
||||
QHash<QString, QHash<QString, QString>> packageInfo;
|
||||
|
||||
// 解析包版本信息
|
||||
for (const QString &pkg : packageName) {
|
||||
QStringList parts = pkg.split(": ");
|
||||
if (parts.size() >= 2) {
|
||||
QString packageName = parts[0];
|
||||
QStringList versions = parts[1].split(" → ");
|
||||
if (versions.size() == 2) {
|
||||
packageInfo[packageName]["current_version"] = versions[0];
|
||||
packageInfo[packageName]["new_version"] = versions[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 解析包详细信息(新增部分)
|
||||
for (const QString &sizeInfo : sizes) {
|
||||
QStringList parts = sizeInfo.split(": ");
|
||||
if (parts.size() == 2) {
|
||||
QString packageName = parts[0];
|
||||
QStringList details = parts[1].split("|");
|
||||
if (details.size() == 3) { // 现在包含大小|URL|SHA512
|
||||
packageInfo[packageName]["size"] = details[0];
|
||||
packageInfo[packageName]["url"] = details[1];
|
||||
packageInfo[packageName]["sha512"] = details[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 解析应用名称信息
|
||||
for (const QString &nameInfo : names) {
|
||||
if (nameInfo.startsWith("[") && nameInfo.endsWith("]")) {
|
||||
QString content = nameInfo.mid(1, nameInfo.length() - 2);
|
||||
QStringList parts = content.split("|");
|
||||
if (parts.size() == 2) {
|
||||
QString displayName = parts[0];
|
||||
QString packageName = parts[1];
|
||||
packageInfo[packageName]["display_name"] = displayName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 解析图标信息
|
||||
for (const QString &iconInfo : icons) {
|
||||
QStringList parts = iconInfo.split(": ");
|
||||
if (parts.size() == 2) {
|
||||
QString packageName = parts[0];
|
||||
packageInfo[packageName]["icon"] = parts[1].trimmed();
|
||||
}
|
||||
}
|
||||
|
||||
// 构建JSON数组
|
||||
for (const QString &packageName : packageInfo.keys()) {
|
||||
QJsonObject jsonObj;
|
||||
jsonObj["package"] = packageName;
|
||||
|
||||
// 使用显示名称(如果有),否则使用包名
|
||||
if (packageInfo[packageName].contains("display_name")) {
|
||||
jsonObj["name"] = packageInfo[packageName]["display_name"];
|
||||
} else {
|
||||
jsonObj["name"] = packageName;
|
||||
}
|
||||
|
||||
jsonObj["current_version"] = packageInfo[packageName]["current_version"];
|
||||
jsonObj["new_version"] = packageInfo[packageName]["new_version"];
|
||||
jsonObj["icon"] = packageInfo[packageName]["icon"];
|
||||
jsonObj["ignored"] = false; // 默认不忽略
|
||||
|
||||
// 如果有大小信息也加入
|
||||
if (packageInfo[packageName].contains("size")) {
|
||||
jsonObj["size"] = packageInfo[packageName]["size"];
|
||||
}
|
||||
|
||||
// 在构建JSON对象时添加新字段(在jsonObj中添加):
|
||||
if (packageInfo[packageName].contains("url")) {
|
||||
jsonObj["download_url"] = packageInfo[packageName]["url"];
|
||||
qDebug() << "生成的下载 URL:" << packageInfo[packageName]["url"]; // 检查生成的 URL
|
||||
} else {
|
||||
qWarning() << "未找到下载 URL,包名:" << packageName;
|
||||
jsonObj["download_url"] = ""; // 设置为空字符串以避免崩溃
|
||||
}
|
||||
jsonObj["sha512"] = packageInfo[packageName]["sha512"];
|
||||
jsonArray.append(jsonObj);
|
||||
}
|
||||
qDebug()<<jsonArray;
|
||||
return jsonArray;
|
||||
}
|
||||
|
||||
|
28
spark-update-tool/src/aptssupdater.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef APTSSUPDATER_H
|
||||
#define APTSSUPDATER_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStringList>
|
||||
#include <QTemporaryFile>
|
||||
#include <QLocale>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
class aptssUpdater : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit aptssUpdater(QWidget *parent = nullptr);
|
||||
|
||||
QStringList getUpdateablePackages(); // 查询可更新包列表及更新内容
|
||||
QStringList getPackageSizes(); // 获取每个包的大小
|
||||
QStringList getDesktopAppNames(); // 获取桌面应用名称列表
|
||||
QStringList getPackageIcons(); // 获取包图标列表
|
||||
QJsonArray getUpdateInfoAsJson(); // 获取更新信息的 JSON 格式
|
||||
QString m_tempFilePath;
|
||||
signals:
|
||||
private:
|
||||
bool checkDesktopFiles(const QStringList &desktopFiles, QString &appName, const QString &lang, const QString &packageName);
|
||||
QStringList packageName;
|
||||
};
|
||||
|
||||
#endif // APTSSUPDATER_H
|
117
spark-update-tool/src/downloadmanager.cpp
Normal file
@ -0,0 +1,117 @@
|
||||
#include "downloadmanager.h"
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QRegularExpression>
|
||||
#include <QDebug>
|
||||
|
||||
DownloadManager::DownloadManager(QObject *parent) : QObject(parent)
|
||||
{
|
||||
cleanupTempFiles();
|
||||
}
|
||||
|
||||
void DownloadManager::startDownload(const QString &packageName, const QString &url, const QString &outputPath)
|
||||
{
|
||||
if (m_processes.contains(packageName)) {
|
||||
qWarning() << packageName << " is already downloading.";
|
||||
return;
|
||||
}
|
||||
|
||||
QString metalinkUrl = url + ".metalink";
|
||||
QFileInfo fileInfo(outputPath);
|
||||
|
||||
QStringList arguments = {
|
||||
"--enable-rpc=false",
|
||||
"--console-log-level=warn",
|
||||
"--summary-interval=1",
|
||||
"--allow-overwrite=true",
|
||||
"--dir=" + fileInfo.absolutePath(),
|
||||
"--out=" + fileInfo.fileName(),
|
||||
metalinkUrl
|
||||
};
|
||||
|
||||
QProcess *process = new QProcess(this);
|
||||
m_processes.insert(packageName, process);
|
||||
|
||||
// 新增:准备日志文件
|
||||
QString logPath = QString("/tmp/%1_download.log").arg(packageName);
|
||||
QFile *logFile = new QFile(logPath, process);
|
||||
if (logFile->open(QIODevice::Append | QIODevice::Text)) {
|
||||
// 设置权限为777
|
||||
QFile::setPermissions(logPath, QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner |
|
||||
QFile::ReadGroup | QFile::WriteGroup | QFile::ExeGroup |
|
||||
QFile::ReadOther | QFile::WriteOther | QFile::ExeOther);
|
||||
connect(process, &QProcess::readyReadStandardOutput, this, [this, packageName, process, logFile]() {
|
||||
while (process->canReadLine()) {
|
||||
QString line = QString::fromUtf8(process->readLine()).trimmed();
|
||||
// 写入日志
|
||||
logFile->write(line.toUtf8() + '\n');
|
||||
logFile->flush();
|
||||
QRegularExpression regex(R"(\((\d+)%\))");
|
||||
QRegularExpressionMatch match = regex.match(line);
|
||||
if (match.hasMatch()) {
|
||||
int progress = match.captured(1).toInt();
|
||||
emit downloadProgress(packageName, progress);
|
||||
}
|
||||
}
|
||||
});
|
||||
connect(process, &QProcess::readyReadStandardError, this, [process, logFile]() {
|
||||
QByteArray err = process->readAllStandardError();
|
||||
logFile->write(err);
|
||||
logFile->flush();
|
||||
});
|
||||
}
|
||||
|
||||
connect(process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
this, [this, packageName, outputPath, logFile](int exitCode, QProcess::ExitStatus status) {
|
||||
bool success = (exitCode == 0 && status == QProcess::NormalExit);
|
||||
if (!success) {
|
||||
qWarning() << "Download failed for" << packageName << "exit code:" << exitCode;
|
||||
}
|
||||
|
||||
removeAria2Files(outputPath); // 清理残留 .aria2
|
||||
emit downloadFinished(packageName, success);
|
||||
|
||||
if (logFile) logFile->close();
|
||||
|
||||
QProcess *proc = m_processes.take(packageName);
|
||||
if (proc) proc->deleteLater();
|
||||
});
|
||||
|
||||
process->start("aria2c", arguments);
|
||||
}
|
||||
|
||||
void DownloadManager::cancelDownload(const QString &packageName)
|
||||
{
|
||||
if (!m_processes.contains(packageName)) return;
|
||||
|
||||
QProcess *process = m_processes.take(packageName);
|
||||
if (process) {
|
||||
process->kill(); // 立即终止
|
||||
process->waitForFinished(3000); // 最多等待3秒
|
||||
process->deleteLater();
|
||||
}
|
||||
|
||||
emit downloadFinished(packageName, false); // 显式通知取消
|
||||
|
||||
}
|
||||
|
||||
void DownloadManager::removeAria2Files(const QString &filePath)
|
||||
{
|
||||
QString ariaFile = filePath + ".aria2";
|
||||
QFile::remove(ariaFile);
|
||||
}
|
||||
|
||||
bool DownloadManager::isDownloading(const QString &packageName) const
|
||||
{
|
||||
return m_processes.contains(packageName);
|
||||
}
|
||||
|
||||
void DownloadManager::cleanupTempFiles()
|
||||
{
|
||||
QDir tempDir(QDir::tempPath());
|
||||
QStringList leftovers = tempDir.entryList(QStringList() << "*.aria2", QDir::Files);
|
||||
for (const QString &f : leftovers) {
|
||||
tempDir.remove(f);
|
||||
}
|
||||
}
|
28
spark-update-tool/src/downloadmanager.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef DOWNLOADMANAGER_H
|
||||
#define DOWNLOADMANAGER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QProcess>
|
||||
|
||||
class DownloadManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DownloadManager(QObject *parent = nullptr);
|
||||
void startDownload(const QString &packageName, const QString &url, const QString &outputPath);
|
||||
void cancelDownload(const QString &packageName);
|
||||
bool isDownloading(const QString &packageName) const;
|
||||
|
||||
signals:
|
||||
void downloadProgress(const QString &packageName, int progress);
|
||||
void downloadFinished(const QString &packageName, bool success);
|
||||
|
||||
private:
|
||||
void cleanupTempFiles();
|
||||
void removeAria2Files(const QString &filePath);
|
||||
|
||||
QMap<QString, QProcess*> m_processes;
|
||||
};
|
||||
|
||||
#endif // DOWNLOADMANAGER_H
|
8
spark-update-tool/src/icons.qrc
Normal file
@ -0,0 +1,8 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>../resources/down_arrow.svg</file>
|
||||
<file>../resources/default_icon.svg</file>
|
||||
<file>../resources/spark-update-tool.svg</file>
|
||||
<file>../resources/128*128/spark-update-tool.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
86
spark-update-tool/src/main.cpp
Normal file
@ -0,0 +1,86 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
#include <QProcess>
|
||||
#include <QMessageBox>
|
||||
#include <unistd.h> // for geteuid
|
||||
#include <cstdlib> // for getenv
|
||||
#include <QDebug> // For debugging output
|
||||
|
||||
bool isRoot() {
|
||||
return geteuid() == 0;
|
||||
}
|
||||
|
||||
bool elevateToRoot() {
|
||||
QString program = QCoreApplication::applicationFilePath();
|
||||
qDebug() << "Current application path:" << program;
|
||||
|
||||
QByteArray display = qgetenv("DISPLAY");
|
||||
QByteArray xauthority = qgetenv("XAUTHORITY");
|
||||
|
||||
QStringList args;
|
||||
args << "env"
|
||||
<< "DISPLAY=" + display
|
||||
<< "XAUTHORITY=" + xauthority
|
||||
<< program;
|
||||
|
||||
QProcess process;
|
||||
process.setProgram("pkexec");
|
||||
process.setArguments(args);
|
||||
|
||||
qDebug() << "Attempting to elevate using pkexec with arguments:" << args;
|
||||
|
||||
process.start();
|
||||
if (!process.waitForStarted(5000)) {
|
||||
qDebug() << "Failed to start pkexec.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 阻塞等待提权进程退出(比如主程序窗口关闭)
|
||||
if (!process.waitForFinished(-1)) { // 等待直到新进程退出
|
||||
qDebug() << "pkexec process waitForFinished failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
int exitCode = process.exitCode();
|
||||
QProcess::ExitStatus exitStatus = process.exitStatus();
|
||||
|
||||
qDebug() << "pkexec exit code:" << exitCode;
|
||||
qDebug() << "pkexec exit status:" << exitStatus;
|
||||
qDebug() << "pkexec stderr:" << process.readAllStandardError();
|
||||
|
||||
return (exitStatus == QProcess::NormalExit && exitCode == 0);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// 必须在 QGuiApplication 实例创建之前调用
|
||||
// QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||
|
||||
QApplication a(argc, argv);
|
||||
a.setWindowIcon(QIcon(":/resources/128*128/spark-update-tool.png"));
|
||||
if (!isRoot()) {
|
||||
qDebug() << "Not running as root. Attempting to elevate...";
|
||||
if (!elevateToRoot()) {
|
||||
qDebug() << "Elevation failed or pkexec command was not executed successfully.";
|
||||
QMessageBox::critical(nullptr,
|
||||
"权限不足",
|
||||
"提权失败!\n\n您的系统可能不支持 `pkexec` 或 `polkit` 配置不正确,"
|
||||
"或者您取消了授权。\n\n请尝试使用 `sudo` 命令运行此程序:"
|
||||
"\n\n在终端中输入:\n`sudo " + QCoreApplication::applicationName() + "`");
|
||||
return 0; // 提权失败,退出程序
|
||||
} else {
|
||||
// 如果 elevateToRoot 返回 true,说明 pkexec 命令本身执行成功
|
||||
// 但这并不意味着原始程序以 root 权限启动了
|
||||
// 因为 elevateToRoot 启动的是一个新的进程,当前进程应该退出
|
||||
// 否则会并行运行两个程序实例
|
||||
qDebug() << "pkexec command executed successfully (new process likely started). Exiting current process.";
|
||||
return 0; // 当前非root进程退出
|
||||
}
|
||||
} else {
|
||||
qDebug() << "Running as root.";
|
||||
}
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
229
spark-update-tool/src/mainwindow.cpp
Normal file
@ -0,0 +1,229 @@
|
||||
#include "mainwindow.h"
|
||||
#include "./ui_mainwindow.h"
|
||||
#include <QProcess>
|
||||
#include <QMessageBox>
|
||||
#include <QProgressDialog>
|
||||
#include <QtConcurrent> // 新增
|
||||
#include <QFutureWatcher> // 新增
|
||||
#include <QIcon>
|
||||
#include <qicon.h>
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
, m_model(new AppListModel(this))
|
||||
, m_delegate(new AppDelegate(this))
|
||||
{
|
||||
QIcon icon(":/resources/128*128/spark-update-tool.png");
|
||||
setWindowIcon(icon);
|
||||
QProgressDialog *progressDialog = new QProgressDialog("正在与服务器通信,获取更新信息中...", QString(), 0, 0, this);
|
||||
progressDialog->setWindowModality(Qt::ApplicationModal);
|
||||
progressDialog->setCancelButton(nullptr);
|
||||
progressDialog->setWindowTitle("请稍候");
|
||||
progressDialog->setMinimumDuration(0);
|
||||
progressDialog->setWindowFlags(progressDialog->windowFlags() & ~Qt::WindowCloseButtonHint); // 禁用关闭按钮
|
||||
progressDialog->show();
|
||||
//异步执行runAptssUpgrade
|
||||
QFutureWatcher<void> *watcher = new QFutureWatcher<void>(this);
|
||||
connect(watcher, &QFutureWatcher<void>::finished, this, [=]() {
|
||||
progressDialog->close();
|
||||
progressDialog->deleteLater();
|
||||
watcher->deleteLater();
|
||||
ui->setupUi(this);
|
||||
QIcon icon(":/resources/128*128/spark-update-tool.png");
|
||||
setWindowIcon(icon);
|
||||
// 创建 QListView 并设置父控件为 ui->appWidget
|
||||
listView = new QListView(ui->appWidget);
|
||||
listView->setModel(m_model);
|
||||
listView->setItemDelegate(m_delegate);
|
||||
|
||||
// 新增:确保 delegate 拥有 model 指针
|
||||
m_delegate->setModel(m_model);
|
||||
|
||||
// 设置 QListView 填充 ui->appWidget
|
||||
QVBoxLayout *layout = new QVBoxLayout(ui->appWidget);
|
||||
layout->addWidget(listView);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
connect(m_delegate, &AppDelegate::updateDisplay, this, [=](const QString &packageName) {
|
||||
for (int i = 0; i < m_model->rowCount(); ++i) {
|
||||
QModelIndex index = m_model->index(i);
|
||||
if (index.data(Qt::UserRole + 1).toString() == packageName) {
|
||||
m_model->dataChanged(index, index); // 刷新该行
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 新增:点击“更新全部”按钮批量下载
|
||||
connect(ui->updatePushButton, &QPushButton::clicked, this, [=](){
|
||||
qDebug()<<"更新全部按钮被点击";
|
||||
m_delegate->startDownloadForAll();
|
||||
});
|
||||
|
||||
checkUpdates();
|
||||
initStyle();
|
||||
});
|
||||
|
||||
// 启动异步任务
|
||||
watcher->setFuture(QtConcurrent::run([this](){
|
||||
runAptssUpgrade();
|
||||
}));
|
||||
}
|
||||
//初始化控件样式
|
||||
void MainWindow::initStyle()
|
||||
{
|
||||
//设置窗口标题
|
||||
this->setWindowTitle("软件更新中心");
|
||||
|
||||
//查询框样式
|
||||
ui->plainTextEdit->setStyleSheet(R"(
|
||||
QPlainTextEdit {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #E5E7EB;
|
||||
border-radius: 4px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
font-size: 9px;
|
||||
line-height: 1.4;
|
||||
color: #9CA3AF;
|
||||
}
|
||||
)");
|
||||
|
||||
ui->plainTextEdit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
ui->plainTextEdit->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
||||
//筛选框样式
|
||||
ui->FilterComboBox->setStyleSheet(R"(
|
||||
QComboBox {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #E5E7EB;
|
||||
border-radius: 4px;
|
||||
color: #4B5563;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
QComboBox::drop-down {
|
||||
border: none;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
image: url(:/resources/down_arrow.svg);
|
||||
width: 12px;
|
||||
height: 16px;
|
||||
}
|
||||
QComboBox QAbstractItemView {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #E5E7EB;
|
||||
color: #4B5563;
|
||||
selection-background-color: #F3F4F6;
|
||||
selection-color: #111827;
|
||||
}
|
||||
)");
|
||||
|
||||
//更新软件按钮样式
|
||||
ui->updatePushButton->setStyleSheet(R"(
|
||||
QPushButton {
|
||||
background-color: #2563EB;
|
||||
color: #FFFFFF;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
padding: 6px 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
background-color: #1D4ED8; /* 深一点的 hover 效果,可选 */
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
background-color: #1E40AF; /* 按下效果,可选 */
|
||||
}
|
||||
|
||||
QPushButton:disabled {
|
||||
background-color: #A5B4FC;
|
||||
color: #F9FAFB;
|
||||
}
|
||||
)");
|
||||
|
||||
//设置背景填充颜色
|
||||
ui->backgroundWidget->setStyleSheet(R"(
|
||||
QWidget {
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 12px;
|
||||
}
|
||||
)");
|
||||
|
||||
//设置主背景颜色
|
||||
this->setStyleSheet("background-color: #F8FAFC;");
|
||||
|
||||
// 添加滚动条样式
|
||||
this->setStyleSheet(R"(
|
||||
QScrollBar:vertical {
|
||||
background: #F3F4F6;
|
||||
width: 8px;
|
||||
margin: 0px;
|
||||
}
|
||||
QScrollBar::handle:vertical {
|
||||
background: #D1D5DB;
|
||||
border-radius: 4px;
|
||||
min-height: 30px;
|
||||
}
|
||||
QScrollBar::handle:vertical:hover {
|
||||
background: #9CA3AF;
|
||||
}
|
||||
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
|
||||
background: none;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
QScrollBar:horizontal {
|
||||
background: #F3F4F6;
|
||||
height: 8px;
|
||||
margin: 0px;
|
||||
}
|
||||
QScrollBar::handle:horizontal {
|
||||
background: #D1D5DB;
|
||||
border-radius: 4px;
|
||||
min-width: 30px;
|
||||
}
|
||||
QScrollBar::handle:horizontal:hover {
|
||||
background: #9CA3AF;
|
||||
}
|
||||
)");
|
||||
}
|
||||
void MainWindow::checkUpdates()
|
||||
{
|
||||
aptssUpdater updater;
|
||||
QJsonArray updateInfo = updater.getUpdateInfoAsJson();
|
||||
m_model->setUpdateData(updateInfo);
|
||||
|
||||
for (const auto &item : updateInfo) {
|
||||
QJsonObject obj = item.toObject();
|
||||
qDebug() << "模型设置的包名:" << obj["package"].toString();
|
||||
qDebug() << "模型设置的下载 URL:" << obj["download_url"].toString(); // 检查模型数据
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::runAptssUpgrade()
|
||||
{
|
||||
QProcess process;
|
||||
QStringList args;
|
||||
args << "sudo" <<"aptss" << "ssupdate";
|
||||
process.start("sudo", args);
|
||||
if (!process.waitForStarted(5000)) {
|
||||
QMessageBox::warning(this, "升级失败", "无法启动 sudo aptss ssupdate");
|
||||
return;
|
||||
}
|
||||
process.write("n\n");
|
||||
process.closeWriteChannel();
|
||||
process.waitForFinished(-1);
|
||||
if (process.exitCode() != 0) {
|
||||
QMessageBox::warning(this, "升级失败", "执行 sudo aptss ssupdate 失败,请检查系统环境。");
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
33
spark-update-tool/src/mainwindow.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include "aptssupdater.h"
|
||||
#include "applistmodel.h"
|
||||
#include "appdelegate.h"
|
||||
#include <QListView>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
void checkUpdates();
|
||||
void initStyle();
|
||||
void runAptssUpgrade();
|
||||
AppListModel *m_model;
|
||||
AppDelegate *m_delegate;
|
||||
QListView *listView; // 声明 QListView 指针
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
256
spark-update-tool/src/mainwindow.ui
Normal file
@ -0,0 +1,256 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1440</width>
|
||||
<height>858</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QWidget" name="titleWidget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Noto Sans Vai</family>
|
||||
<pointsize>22</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>软件更新中心</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1245</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QWidget" name="backgroundWidget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_4" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>38</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>38</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>38</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tabStopDistance">
|
||||
<double>81.000000000000000</double>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>搜索软件...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>214</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>214</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<widget class="QComboBox" name="FilterComboBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>102</width>
|
||||
<height>38</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>102</width>
|
||||
<height>38</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>102</width>
|
||||
<height>38</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContentsOnFirstShow</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>按名称</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="updatePushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>118</x>
|
||||
<y>0</y>
|
||||
<width>96</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>更新全部</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="appWidget" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1440</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -35,14 +35,13 @@ Application::Application(int &argc, char **argv)
|
||||
setApplicationName("spark-store"); // 影响 ~/.config/spark-union ~/.local/share/spark-union 下文件夹名称
|
||||
setApplicationDisplayName(QObject::tr("Spark Store")); // 设置窗口显示标题 (Wayland 下会显示 Qt 原生标题栏)
|
||||
setProductName(QObject::tr("Spark Store"));
|
||||
setProductIcon(QIcon::fromTheme("spark-store"));
|
||||
setProductIcon(QIcon(":/icon/sparky.png"));
|
||||
setApplicationHomePage("https://gitee.com/spark-store-project");
|
||||
setApplicationDescription(
|
||||
QObject::tr(
|
||||
"<span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/>"
|
||||
"<a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/>"
|
||||
"<span style=' font-size:12pt;'>Spark developers</span>"));
|
||||
setApplicationLicense(" <a href='https://gitee.com/spark-store-project/spark-store/blob/Flamescion/LICENSE'>Spark Opensource License</a> ");
|
||||
"<span style=' font-size:10pt;font-weight:60;'>Sparky is our mascot, designed by <a href='https://tai3.cn/'>Tyson Tan</a></span><br/>"));
|
||||
setApplicationLicense(" <a href='https://gitee.com/spark-store-project/spark-store/blob/Flamescion/LICENSE'>GPL V3</a> ");
|
||||
|
||||
// 检查 ~/.config/spark-union/spark-store 文件夹是否存在
|
||||
checkAppConfigLocation();
|
||||
|
@ -44,24 +44,50 @@
|
||||
<file>icon/light/text.svg</file>
|
||||
<file>icon/light/update.svg</file>
|
||||
<file>icon/logo.svg</file>
|
||||
<file>icon/sparky.png</file>
|
||||
<file>json/features.json</file>
|
||||
<file>tags/a2d-small.png</file>
|
||||
<file>tags/a2d_full.svg</file>
|
||||
<file>tags/a2d.png</file>
|
||||
<file>tags/community-small.png</file>
|
||||
<file>tags/a2d.svg</file>
|
||||
<file>tags/community_full.svg</file>
|
||||
<file>tags/community.png</file>
|
||||
<file>tags/community.svg</file>
|
||||
<file>tags/deepin-small.png</file>
|
||||
<file>tags/debian_full.svg</file>
|
||||
<file>tags/debian.png</file>
|
||||
<file>tags/debian.svg</file>
|
||||
<file>tags/deepin_full.svg</file>
|
||||
<file>tags/deepin.png</file>
|
||||
<file>tags/deepin.svg</file>
|
||||
<file>tags/dtk-small.png</file>
|
||||
<file>tags/dwine2-small.png</file>
|
||||
<file>tags/dwine5-small.png</file>
|
||||
<file>tags/dtk_full.svg</file>
|
||||
<file>tags/dtk.png</file>
|
||||
<file>tags/dtk.svg</file>
|
||||
<file>tags/dwine2_full.svg</file>
|
||||
<file>tags/dwine2.png</file>
|
||||
<file>tags/dwine2.svg</file>
|
||||
<file>tags/dwine5_full.svg</file>
|
||||
<file>tags/dwine5.png</file>
|
||||
<file>tags/dwine5.svg</file>
|
||||
<file>tags/logo_icon.svg</file>
|
||||
<file>tags/ubuntu-small.png</file>
|
||||
<file>tags/ubuntu_full.svg</file>
|
||||
<file>tags/ubuntu.png</file>
|
||||
<file>tags/uos-authorize.svg</file>
|
||||
<file>tags/uos-small.png</file>
|
||||
<file>tags/ubuntu.svg</file>
|
||||
<file>tags/uos_full.svg</file>
|
||||
<file>tags/uos.png</file>
|
||||
<file>tags/uos.svg</file>
|
||||
<file>tags/amber-ce-bookworm_full.svg</file>
|
||||
<file>tags/amber-ce-bookworm.png</file>
|
||||
<file>tags/amber-ce-bookworm.svg</file>
|
||||
<file>tags/amber-ce-sid_full.svg</file>
|
||||
<file>tags/amber-ce-sid.png</file>
|
||||
<file>tags/amber-ce-sid.svg</file>
|
||||
<file>tags/amber-ce-trixie_full.svg</file>
|
||||
<file>tags/amber-ce-trixie.png</file>
|
||||
<file>tags/amber-ce-trixie.svg</file>
|
||||
<file>tags/native_full.svg</file>
|
||||
<file>tags/native.png</file>
|
||||
<file>tags/native.svg</file>
|
||||
<file>translations/qtwebengine_zh.qm</file>
|
||||
<file>tags/amber-ce-deepin_full.svg</file>
|
||||
<file>tags/amber-ce-deepin.svg</file>
|
||||
<file>tags/amber-ce-deepin.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
BIN
src/assets/icon/logo.xcf
Normal file
1
src/assets/icon/spark-store.svg
Normal file
After (image error) Size: 7.9 KiB |
BIN
src/assets/icon/sparky.png
Normal file
After ![]() (image error) Size: 401 KiB |
@ -20,6 +20,6 @@
|
||||
"description": "Fix 1 detailed description..."
|
||||
}
|
||||
],
|
||||
"linkUrl": "https://gitee.com/deepin-community-store/spark-store/releases/",
|
||||
"linkUrl": "https://gitee.com/spark-store-project/spark-store/releases/",
|
||||
"linkButtonVisible": true
|
||||
}
|
||||
|
Before ![]() (image error) Size: 16 KiB |
Before ![]() (image error) Size: 248 KiB After ![]() (image error) Size: 7.3 KiB ![]() ![]() |
1
src/assets/tags/a2d.svg
Normal file
After (image error) Size: 12 KiB |
1
src/assets/tags/a2d_full.svg
Normal file
After (image error) Size: 12 KiB |
BIN
src/assets/tags/amber-ce-bookworm.png
Normal file
After ![]() (image error) Size: 8.6 KiB |
1
src/assets/tags/amber-ce-bookworm.svg
Normal file
After (image error) Size: 22 KiB |
1
src/assets/tags/amber-ce-bookworm_full.svg
Normal file
After (image error) Size: 22 KiB |
BIN
src/assets/tags/amber-ce-deepin.png
Normal file
After ![]() (image error) Size: 8.1 KiB |
1
src/assets/tags/amber-ce-deepin.svg
Normal file
After (image error) Size: 18 KiB |
1
src/assets/tags/amber-ce-deepin_full.svg
Normal file
After (image error) Size: 19 KiB |
BIN
src/assets/tags/amber-ce-sid.png
Normal file
After ![]() (image error) Size: 7.9 KiB |
1
src/assets/tags/amber-ce-sid.svg
Normal file
After (image error) Size: 18 KiB |
1
src/assets/tags/amber-ce-sid_full.svg
Normal file
After (image error) Size: 18 KiB |
BIN
src/assets/tags/amber-ce-trixie.png
Normal file
After ![]() (image error) Size: 8.2 KiB |
1
src/assets/tags/amber-ce-trixie.svg
Normal file
After (image error) Size: 18 KiB |
1
src/assets/tags/amber-ce-trixie_full.svg
Normal file
After (image error) Size: 18 KiB |
Before ![]() (image error) Size: 1.6 KiB |
Before ![]() (image error) Size: 32 KiB After ![]() (image error) Size: 11 KiB ![]() ![]() |
Before (image error) Size: 13 KiB After (image error) Size: 178 KiB |
1
src/assets/tags/community_full.svg
Normal file
After (image error) Size: 738 KiB |
BIN
src/assets/tags/debian.png
Normal file
After ![]() (image error) Size: 7.9 KiB |
1
src/assets/tags/debian.svg
Normal file
After (image error) Size: 26 KiB |
1
src/assets/tags/debian_full.svg
Normal file
After (image error) Size: 27 KiB |
Before ![]() (image error) Size: 1.9 KiB |
BIN
src/assets/tags/deepin.png
Normal file
After ![]() (image error) Size: 9.2 KiB |
Before (image error) Size: 4.3 KiB After (image error) Size: 17 KiB |
1
src/assets/tags/deepin_full.svg
Normal file
After (image error) Size: 18 KiB |
Before ![]() (image error) Size: 954 B |
BIN
src/assets/tags/dtk.png
Normal file
After ![]() (image error) Size: 6.9 KiB |
1
src/assets/tags/dtk.svg
Normal file
After (image error) Size: 13 KiB |
1
src/assets/tags/dtk_full.svg
Normal file
After (image error) Size: 19 KiB |
Before ![]() (image error) Size: 5.7 KiB |
BIN
src/assets/tags/dwine2.png
Normal file
After ![]() (image error) Size: 6.3 KiB |
1
src/assets/tags/dwine2.svg
Normal file
After (image error) Size: 16 KiB |
1
src/assets/tags/dwine2_full.svg
Normal file
After (image error) Size: 18 KiB |
Before ![]() (image error) Size: 1.1 KiB |
BIN
src/assets/tags/dwine5.png
Normal file
After ![]() (image error) Size: 6.0 KiB |
Before (image error) Size: 1.7 KiB After (image error) Size: 16 KiB |
1
src/assets/tags/dwine5_full.svg
Normal file
After (image error) Size: 17 KiB |
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>logo icon</title>
|
||||
<defs>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
|
||||
<stop stop-color="#00F1FF" offset="0%"></stop>
|
||||
<stop stop-color="#008AFF" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="light" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="1" transform="translate(-460.000000, -159.000000)">
|
||||
<g id="tittlebar" transform="translate(450.000000, 150.000000)">
|
||||
<g id="logo-icon" transform="translate(10.000000, 9.000000)">
|
||||
<g>
|
||||
<rect id="矩形" fill="url(#linearGradient-1)" x="0" y="0" width="32" height="32" rx="8"></rect>
|
||||
<path d="M23,25 L23,24.0002278 C21.6666667,24.0002278 21,24.0002278 21,24.0002278 L21,20 L22,20 L22,19 L21,19 L21,17 L20,17.5 L20,19 L19,19 L19,20 L20,20 L20,24.0002278 C20,24.0002278 20,24.0002278 20,24.0002278 C20,24.5523868 20.4476132,25 20.9997722,25 C20.9998481,25 20.9999241,25 21,25 L23,25 Z M24.0210414,23.9789586 L24.0210414,22.2215556 L24.0210414,22.2215556 L24.6565969,21.6226667 L27.2207674,25 L29.0052118,25 L25.6099302,20.7304444 L28.4678057,18.0074755 L26.6711391,18.0074755 L24.0210414,20.6204444 L24,15.5 L23,15 L23,25 C23.5639056,25 24.0210414,24.5428642 24.0210414,23.9789586 Z" id="tk" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
<path d="M10.275,24 C13.175,24 15.35,23.2 16.85,21.6 C18.275,20.075 19,17.825 19,15 C19,12.15 18.275,10.05 16.85,8.55 C15.35,6.95 13.175,6 10.275,6 L4,6 L4,24 L10.275,24 Z M9.725,21 L7,21 L7,9 L9.725,9 C11.95,9 13.575,9.15 14.6,10.175 C15.6,11.175 16,12.75 16,15 C16,17.2 15.6,18.9 14.6,19.95 C13.575,20.975 11.95,21 9.725,21 Z" id="D" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before (image error) Size: 2.0 KiB |
BIN
src/assets/tags/native.png
Normal file
After ![]() (image error) Size: 6.7 KiB |