Compare commits

..

4 Commits
3.2.1 ... 3.2.2

Author SHA1 Message Date
aff593eba8 !115 3.2.2 启动
* update debian/changelog.
* download可无root运行,相应的,不会自动到最新
* !114 feat: GPU enable
* aptss will now refresh the system source before doing install, downloa…
2022-09-20 04:12:29 +00:00
8e3787ab07 !113 3.2.1 merge
Merge pull request !113 from shenmo/dev
2022-09-18 13:17:11 +00:00
f7d07e0bf9 !112 Now stop use mail to collect info
* Now abandon mail info collect method and delete the outdated info
2022-09-11 12:24:26 +00:00
9e4df5c5c2 !111 feat: 清除QtWebCore的缓存
* Merge remote-tracking branch 'upstream/dev' into dev
* Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev
* feat: 清除网页缓存
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-09-03 09:25:19 +00:00
8 changed files with 96 additions and 39 deletions

7
debian/changelog vendored
View File

@@ -1,3 +1,10 @@
spark-store (3.2.2) stable; urgency=medium
* aptss will now refresh the system source before doing install, policy....etc
* 启动客户端GPU加速支持
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2.1) stable; urgency=medium spark-store (3.2.1) stable; urgency=medium
* 更改刷新系统源的功能 * 更改刷新系统源的功能

View File

@@ -6,4 +6,4 @@ Subject: spark-store_3.0.2: $(lsb_release -a | grep "Description" | sed -e "s#\t
$(uname -a)" | tee /tmp/spark-store-install/feedback.txt > /dev/null $(uname -a)" | tee /tmp/spark-store-install/feedback.txt > /dev/null
curl -s --url "smtp://smtp.163.com" --mail-from "sparkstorefeedback@163.com" --mail-rcpt "sparkstorefeedback@163.com" --upload-file /tmp/spark-store-install/feedback.txt --user "sparkstorefeedback@163.com:YWYGLQNOPLWNNJJY" curl -s --url "smtp://smtp.163.com" --mail-from "${MAIL_FEEDBACK}" --mail-rcpt "${MAIL_FEEDBACK}" --upload-file /tmp/spark-store-install/feedback.txt --user "${MAIL_FEEDBACK}:${M}AIL_AUTH"

View File

@@ -13,6 +13,10 @@ int main(int argc, char *argv[])
DApplication::loadDXcbPlugin(); // 已废弃但是对于非deepin桌面可以正常使用标题栏 DApplication::loadDXcbPlugin(); // 已废弃但是对于非deepin桌面可以正常使用标题栏
DApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // 开启 Hidpi 支持 DApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // 开启 Hidpi 支持
// 程序内强制添加"-platformtheme deepin"参数喂给Qt让Qt正确使用Deepin主题修复各种奇怪样式问题 // 程序内强制添加"-platformtheme deepin"参数喂给Qt让Qt正确使用Deepin主题修复各种奇怪样式问题
// 浏览器开启 GPU 支持
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--ignore-gpu-blacklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-accelerated-video-decode");
QVector<char*> fakeArgs(argc + 2); QVector<char*> fakeArgs(argc + 2);
fakeArgs[0] = argv[0]; fakeArgs[0] = argv[0];
fakeArgs[1] = "-platformtheme"; fakeArgs[1] = "-platformtheme";
@@ -30,7 +34,7 @@ int main(int argc, char *argv[])
DAboutDialog dialog; DAboutDialog dialog;
a.setAboutDialog(&dialog); a.setAboutDialog(&dialog);
dialog.setLicense(QObject::tr("We publish this program under GPL V3")); dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
dialog.setVersion(DApplication::buildVersion("Version 3.2.1")); dialog.setVersion(DApplication::buildVersion("Version 3.2.2"));
dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo
dialog.setProductName(QLabel::tr("Spark Store")); dialog.setProductName(QLabel::tr("Spark Store"));
dialog.setDescription( dialog.setDescription(
@@ -51,7 +55,7 @@ int main(int argc, char *argv[])
a.setOrganizationName("spark-union"); a.setOrganizationName("spark-union");
a.setOrganizationDomain("https://www.deepinos.org/"); a.setOrganizationDomain("https://www.deepinos.org/");
a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文 a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文
a.setApplicationVersion(DApplication::buildVersion("3.2.1")); a.setApplicationVersion(DApplication::buildVersion("3.2.2"));
a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store"); a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store");
a.setApplicationDescription( a.setApplicationDescription(
QObject::tr( QObject::tr(

View File

@@ -1148,6 +1148,16 @@ void Widget::on_pushButton_clear_clicked() // 清空临时缓存目录
}); });
} }
void Widget::on_pushButton_clearWebCache_clicked()
{
QtConcurrent::run([=]()
{
QString dataLocal = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation);
QDir cacheDir(dataLocal );
cacheDir.removeRecursively(); });
}
quint64 Widget::dirFileSize(const QString &path) quint64 Widget::dirFileSize(const QString &path)
{ {
QDir dir(path); QDir dir(path);

View File

@@ -91,6 +91,7 @@ private slots:
void on_pushButton_updateApt_clicked(); void on_pushButton_updateApt_clicked();
void on_pushButton_uninstall_clicked(); void on_pushButton_uninstall_clicked();
void on_pushButton_clear_clicked(); void on_pushButton_clear_clicked();
void on_pushButton_clearWebCache_clicked();
void on_pushButton_website_clicked(); void on_pushButton_website_clicked();
void on_pushButton_clicked(); void on_pushButton_clicked();
void on_btn_openDir_clicked(); void on_btn_openDir_clicked();

View File

@@ -345,7 +345,7 @@
<number>0</number> <number>0</number>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>3</number>
</property> </property>
<widget class="QWidget" name="page"> <widget class="QWidget" name="page">
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
@@ -489,7 +489,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>903</width> <width>889</width>
<height>849</height> <height>849</height>
</rect> </rect>
</property> </property>
@@ -993,8 +993,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>869</width> <width>851</width>
<height>325</height> <height>324</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
@@ -1123,8 +1123,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>738</width> <width>889</width>
<height>886</height> <height>716</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_23"> <layout class="QVBoxLayout" name="verticalLayout_23">
@@ -1285,7 +1285,31 @@
<item> <item>
<widget class="QWidget" name="widget_10" native="true"> <widget class="QWidget" name="widget_10" native="true">
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="3"> <item row="2" column="0" colspan="5">
<widget class="QLabel" name="label_12">
<property name="styleSheet">
<string notr="true">color:#808080</string>
</property>
<property name="text">
<string>Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="tmp_size_ui">
<property name="text">
<string>0B</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Location/tmp/spark-store</string>
</property>
</widget>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer_5"> <spacer name="horizontalSpacer_5">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@@ -1305,16 +1329,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="4">
<widget class="QLabel" name="label_12">
<property name="styleSheet">
<string notr="true">color:#808080</string>
</property>
<property name="text">
<string>Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.</string>
</property>
</widget>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_13"> <widget class="QLabel" name="label_13">
<property name="maximumSize"> <property name="maximumSize">
@@ -1328,17 +1342,10 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="0" column="3">
<widget class="QLabel" name="tmp_size_ui"> <widget class="QPushButton" name="pushButton_clearWebCache">
<property name="text"> <property name="text">
<string>0B</string> <string>Clear Web Cache</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Location/tmp/spark-store</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -1,11 +1,5 @@
#/bin/bash #/bin/bash
if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] || [ "$1" = "download" ] ; then
if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then
###刷新apt-fast配置 ###刷新apt-fast配置
mkdir -p /tmp/aptss-conf/ mkdir -p /tmp/aptss-conf/
@@ -17,10 +11,35 @@ chmod -R 755 /tmp/aptss-conf
fi fi
if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; then
DEPEND=`which apt-fast` DEPEND=`which apt-fast`
if [ "$DEPEND" = "" ] ; then if [ "$DEPEND" = "" ] ; then
echo "未安装依赖apt-fast 开始安装" echo "未安装依赖apt-fast 开始安装"
sudo aptss ssupdate && sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt install apt-fast -y aptss ssupdate && bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt install apt-fast -y
fi
sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt update -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
###执行
bwrap --dev-bind / / \
--bind '/tmp/aptss-conf/apt-fast.conf' /etc/apt-fast.conf \
--bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list \
apt-fast "$@" --allow-downgrades
elif [ "$1" = "download" ];then
DEPEND=`which apt-fast`
if [ "$DEPEND" = "" ] ; then
echo "未安装依赖apt-fast 开始安装"
aptss ssupdate && bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt install apt-fast -y
fi fi
###执行 ###执行
@@ -30,6 +49,15 @@ bwrap --dev-bind / / \
apt-fast "$@" --allow-downgrades apt-fast "$@" --allow-downgrades
elif [ "$1" = "policy" ] || [ "$1" = "search" ];then
sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt update -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
###执行
bwrap --dev-bind / / \
--bind '/tmp/aptss-conf/apt-fast.conf' /etc/apt-fast.conf \
--bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list \
apt "$@" --allow-downgrades
elif [ "$1" = "ssupdate" ];then elif [ "$1" = "ssupdate" ];then
mkdir -p /tmp/aptss-conf/ mkdir -p /tmp/aptss-conf/

View File

@@ -65,7 +65,7 @@ fi
if [ "$DEPEND" != "" ] && [ "$isuos" = "" ]; then if [ "$DEPEND" != "" ] && [ "$isuos" = "" ]; then
echo "检测到apt-fast使用aptss进行多线程下载加速" echo "检测到apt-fast使用aptss进行多线程下载加速"
echo ---------------------------------------------------------------------------------- echo ----------------------------------------------------------------------------------
echo "$upass" | sudo -S dpkg -i $1 || sudo aptss ssupdate && sudo aptss install -yf echo "$upass" | sudo -S dpkg -i $1 || sudo aptss install -yf
fi fi
@@ -90,7 +90,7 @@ fi
if [ "$DEPEND" != "" ] && [ "$isuos" = "" ]; then if [ "$DEPEND" != "" ] && [ "$isuos" = "" ]; then
echo "检测到apt-fast使用aptss进行多线程下载加速" echo "检测到apt-fast使用aptss进行多线程下载加速"
echo ---------------------------------------------------------------------------------- echo ----------------------------------------------------------------------------------
dpkg -i $1 || aptss ssupdate && aptss install -yf dpkg -i $1 || aptss install -yf
fi fi