Compare commits

..

17 Commits

Author SHA1 Message Date
87b68aca1e !119 323版本 降低dtk版本
Merge pull request !119 from shenmo/dev
2022-09-27 01:53:24 +00:00
10125c5816 update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-27 01:49:01 +00:00
21d33ec347 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-27 01:48:34 +00:00
ad57aa26ff 降低dtk需求版本
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-27 01:34:48 +00:00
8902c81b9e !118 fix: high CPU usage because futex is still waiting for queue after illegal exit
* fix
* Merge remote-tracking branch 'upstream/dev' into dev
* fix: high CPU usage because futex is still waiting for queue after illegal exit
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/dev' into dev
* feat: enable GPU
* !113 3.2.1 merge
* !112 Now stop use mail to collect info
* Merge remote-tracking branch 'upstream/dev' into dev
* Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev
* feat: 清除网页缓存
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-09-27 01:34:18 +00:00
e269e6ca57 !116 3.2.2 合并
Merge pull request !116 from shenmo/dev
2022-09-21 18:37:02 +00:00
aff593eba8 !115 3.2.2 启动
* update debian/changelog.
* download可无root运行,相应的,不会自动到最新
* !114 feat: GPU enable
* aptss will now refresh the system source before doing install, downloa…
2022-09-20 04:12:29 +00:00
beaeac60a3 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-20 04:11:58 +00:00
11d68fb4b5 download可无root运行,相应的,不会自动到最新
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-20 04:05:25 +00:00
e7680fe2a0 !114 feat: GPU enable
* Merge remote-tracking branch 'upstream/master' into dev
* Merge remote-tracking branch 'upstream/dev' into dev
* feat: enable GPU
* !113 3.2.1 merge
* !112 Now stop use mail to collect info
* Merge remote-tracking branch 'upstream/dev' into dev
* Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev
* feat: 清除网页缓存
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-09-20 04:03:09 +00:00
8741973cca aptss will now refresh the system source before doing install, download, policy....etc 2022-09-19 17:58:00 +08:00
8e3787ab07 !113 3.2.1 merge
Merge pull request !113 from shenmo/dev
2022-09-18 13:17:11 +00:00
f7d07e0bf9 !112 Now stop use mail to collect info
* Now abandon mail info collect method and delete the outdated info
2022-09-11 12:24:26 +00:00
9e4df5c5c2 !111 feat: 清除QtWebCore的缓存
* Merge remote-tracking branch 'upstream/dev' into dev
* Merge branch 'dev' of gitee.com:uniartisan2018/spark-store into dev
* feat: 清除网页缓存
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-09-03 09:25:19 +00:00
af89e64478 !110 检测更新
* 文案修改
* update src/widget.ui.
* feat: 星火应用商店检测更新
2022-08-31 17:50:24 +00:00
971a5dcc63 安装时删除已有的源 2022-09-01 00:40:16 +08:00
a252e7b724 3.2.1 更新源服务器改为aptss 2022-09-01 00:29:37 +08:00
13 changed files with 187 additions and 187 deletions

21
debian/changelog vendored
View File

@@ -1,3 +1,24 @@
spark-store (3.2.3) stable; urgency=medium
* 客户端异常退出时仍然占用资源问题修复
* 降低dtk依赖版本Debian 11 stable可直接安装
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2.2) stable; urgency=medium
* aptss will now refresh the system source before doing install, policy....etc
* 启动客户端GPU加速支持
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2.1) stable; urgency=medium
* 更改刷新系统源的功能
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (3.2) stable; urgency=medium spark-store (3.2) stable; urgency=medium
* 新增 下载量统计功能 * 新增 下载量统计功能

6
debian/control vendored
View File

@@ -11,9 +11,9 @@ Build-Depends:
libqt5widgets5, libqt5widgets5,
libqt5network5, libqt5network5,
libqt5concurrent5, libqt5concurrent5,
libdtkcore-dev(>=5.2), libdtkcore-dev(>=5.0),
libdtkgui-dev(>=5.2), libdtkgui-dev(>=5.0),
libdtkwidget-dev(>=5.2), libdtkwidget-dev(>=5.0),
qttools5-private-dev, qttools5-private-dev,
libnotify-dev, libnotify-dev,
qtwebengine5-dev qtwebengine5-dev

View File

@@ -6,6 +6,11 @@ case "$1" in
# config for aptss # config for aptss
mkdir -p /etc/aptss/sources.list.d mkdir -p /etc/aptss/sources.list.d
ln -s -f /etc/apt/sources.list /etc/aptss/sources.list ln -s -f /etc/apt/sources.list /etc/aptss/sources.list
# Remove the sources.list file
if [ -e /etc/apt/sources.list.d/sparkstore.list ];then
rm /etc/apt/sources.list.d/sparkstore.list
fi
# Check if /usr/local/bin existed # Check if /usr/local/bin existed

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")); dialog.setVersion(DApplication::buildVersion("Version 3.2.3"));
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")); a.setApplicationVersion(DApplication::buildVersion("3.2.3"));
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

@@ -18,6 +18,7 @@
#include <QSettings> #include <QSettings>
#include <QGraphicsOpacityEffect> #include <QGraphicsOpacityEffect>
#include <QtConcurrent> // 并发 #include <QtConcurrent> // 并发
#include <QCloseEvent> // close event
#include <DApplication> #include <DApplication>
#include <DGuiApplicationHelper> #include <DGuiApplicationHelper>
@@ -572,14 +573,14 @@ void Widget::chooseLeftMenu(int index)
updateUI(); updateUI();
if(index <= 12) if (index <= 12)
{ {
if(themeIsDark) if (themeIsDark)
{ {
QString darkurl = menuUrl[index].toString(); QString darkurl = menuUrl[index].toString();
QStringList list = darkurl.split("/"); QStringList list = darkurl.split("/");
darkurl.clear(); darkurl.clear();
for(int i = 0; i < list.size() - 1; i++) for (int i = 0; i < list.size() - 1; i++)
{ {
darkurl += list[i] + "/"; darkurl += list[i] + "/";
} }
@@ -687,22 +688,18 @@ void Widget::searchApp(QString text)
} }
else else
{ {
// sendNotification(tr("Spark store could only process spk:// links for now. The search feature is coming soon!"));
// ui->webView->setUrl(QUrl("http://www.baidu.com/s?wd="+text)); // 这东西对接百度
// ui->stackedWidget->setCurrentIndex(0);
// 禁止同时进行多次搜索 // 禁止同时进行多次搜索
if(!mutex.tryLock()) if (!mutex.tryLock())
{ {
return; return;
} }
// 关键字搜索处理 // 关键字搜索处理
httpClient->get("https://search.deepinos.org.cn/appinfo/search") httpClient->get("https://search.deepinos.org.cn/appinfo/search")
.header("content-type", "application/json") .header("content-type", "application/json")
.queryParam("keyword", text) .queryParam("keyword", text)
.onResponse([this](QByteArray result) .onResponse([this](QByteArray result)
{ {
auto json = QJsonDocument::fromJson(result).array(); auto json = QJsonDocument::fromJson(result).array();
if (json.empty()) if (json.empty())
{ {
@@ -711,20 +708,24 @@ void Widget::searchApp(QString text)
mutex.unlock(); mutex.unlock();
return; return;
} }
displaySearchApp(json); displaySearchApp(json); })
}) .onError([this](QString errorStr)
.onError([this](QString errorStr) {
{
qDebug() << "请求出错:" << errorStr; qDebug() << "请求出错:" << errorStr;
sendNotification(QString(tr("Request Error: %1")).arg(errorStr)); sendNotification(QString(tr("Request Error: %1")).arg(errorStr));
mutex.unlock(); mutex.unlock();
return; return; })
}) .timeout(10 * 1000)
.timeout(10 * 1000) .exec();
.exec();
} }
} }
void Widget::closeEvent(QCloseEvent *event)
{
mutex.unlock();
httpClient->deleteLater();
}
/** /**
* @brief 展示搜索的APP信息 * @brief 展示搜索的APP信息
*/ */
@@ -1090,77 +1091,13 @@ void Widget::on_pushButton_updateApt_clicked()
ui->pushButton_updateApt->setEnabled(false); ui->pushButton_updateApt->setEnabled(false);
ui->label_aptserver->setText(tr("Updating, please wait...")); ui->label_aptserver->setText(tr("Updating, please wait..."));
std::fstream sourcesList, policy, update; QString storeSpk = "spk://store/tools/spark-store";
QDir tmpdir("/tmp"); openUrl(storeSpk);
auto tmpPath = QString::fromUtf8(TMP_PATH).toStdString(); ui->label_aptserver->setText(tr(""));
bool unknownError = true;
tmpdir.mkpath("spark-store");
sourcesList.open(tmpPath + "/sparkstore.list", std::ios::out);
// 商店已经下架会替换系统库的包,优先级 policy 弃用
// policy.open(tmpPath + "/sparkstore", std::ios::out);
if(sourcesList /*&& policy*/)
{
auto serverAddr = ui->comboBox_server->currentText();
sourcesList << "deb [by-hash=force] ";
sourcesList << serverAddr.toUtf8().toStdString();
sourcesList << " /";
sourcesList.close();
/*
* policy << "Package: *\n" << "Pin: origin *" <<
* serverAddr.mid(serverAddr.indexOf('.')).toUtf8().toStdString() << "\n" <<
* "Pin-Priority: 90"; // 降低星火源的优先级,防止从星火安装已存在的系统包,破坏依赖
* policy.close();
*/
update.open(tmpPath + "/update.sh", std::ios::out);
if(update)
{
unknownError = false;
update << "#!/bin/sh\n" <<
"mv " + tmpPath + "/sparkstore.list /etc/apt/sources.list.d/sparkstore.list && " <<
// "mv " + tmpPath + "/sparkstore /etc/apt/preferences.d/sparkstore && " <<
"apt update";
update.close();
system(("chmod +x " + tmpPath + "/update.sh").c_str());
QProcess runupdate;
runupdate.start("pkexec", QStringList() << QString::fromStdString(tmpPath + "/update.sh"));
runupdate.waitForFinished();
QString error = runupdate.readAllStandardError();
QStringList everyError = error.split("\n");
bool haveError = false;
for(int i = 0; i < everyError.size(); i++)
{
if(everyError[i].left(2) == "E:")
{
haveError = true;
}
}
if(!haveError)
{
ui->label_aptserver->setText("deb [by-hash=force] " + ui->comboBox_server->currentText().toUtf8() + " /");
}
else
{
ui->label_aptserver->setText(tr("Apt has reported an error. Please use apt update in terminal to locate the problem."));
}
}
}
if(unknownError)
{
ui->label_aptserver->setText(tr("Unknown error!"));
}
ui->pushButton_updateApt->setEnabled(true); ui->pushButton_updateApt->setEnabled(true);
}); });
} }
void Widget::on_pushButton_uninstall_clicked() void Widget::on_pushButton_uninstall_clicked()
@@ -1212,6 +1149,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();
@@ -127,6 +128,7 @@ private:
void setfoot(int); void setfoot(int);
void updatefoot(); void updatefoot();
void updateUI(); void updateUI();
void closeEvent(QCloseEvent *event);
quint64 dirFileSize(const QString &path); quint64 dirFileSize(const QString &path);

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">
@@ -1220,7 +1220,7 @@
<string notr="true">color:#808080</string> <string notr="true">color:#808080</string>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check update for Spark Store. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
@@ -1237,7 +1237,7 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_6">
<property name="text"> <property name="text">
<string>Source Server</string> <string>Spark Store Update</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -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

View File

@@ -150,7 +150,7 @@
<message> <message>
<location filename="../src/widget.ui" line="547"/> <location filename="../src/widget.ui" line="547"/>
<location filename="../src/widget.cpp" line="910"/> <location filename="../src/widget.cpp" line="910"/>
<location filename="../src/widget.cpp" line="1183"/> <location filename="../src/widget.cpp" line="1119"/>
<source>Install</source> <source>Install</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -347,11 +347,6 @@
<source>Refresh</source> <source>Refresh</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../src/widget.ui" line="1223"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../src/widget.ui" line="1233"/> <location filename="../src/widget.ui" line="1233"/>
<source>Update</source> <source>Update</source>
@@ -359,7 +354,7 @@
</message> </message>
<message> <message>
<location filename="../src/widget.ui" line="1240"/> <location filename="../src/widget.ui" line="1240"/>
<source>Source Server</source> <source>Spark Store Update</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
@@ -427,6 +422,11 @@
<source>Take effect when restart</source> <source>Take effect when restart</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../src/widget.ui" line="1223"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check update for Spark Store. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../src/widget.ui" line="1334"/> <location filename="../src/widget.ui" line="1334"/>
<source>0B</source> <source>0B</source>
@@ -493,17 +493,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1152"/> <location filename="../src/widget.cpp" line="1123"/>
<source>Apt has reported an error. Please use apt update in terminal to locate the problem.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.cpp" line="1159"/>
<source>Unknown error!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.cpp" line="1187"/>
<source>Uninstall succeeded</source> <source>Uninstall succeeded</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -518,12 +508,12 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1209"/> <location filename="../src/widget.cpp" line="1145"/>
<source>Temporary cache was cleaned</source> <source>Temporary cache was cleaned</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1291"/> <location filename="../src/widget.cpp" line="1227"/>
<source>The URL has been copied to the clipboard</source> <source>The URL has been copied to the clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@@ -211,7 +211,7 @@ Nous sommes nés pour le changement.</translation>
<message> <message>
<location filename="../src/widget.ui" line="547"/> <location filename="../src/widget.ui" line="547"/>
<location filename="../src/widget.cpp" line="910"/> <location filename="../src/widget.cpp" line="910"/>
<location filename="../src/widget.cpp" line="1183"/> <location filename="../src/widget.cpp" line="1119"/>
<source>Install</source> <source>Install</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -370,7 +370,7 @@ Nous sommes nés pour le changement.</translation>
</message> </message>
<message> <message>
<location filename="../src/widget.ui" line="1223"/> <location filename="../src/widget.ui" line="1223"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check update for Spark Store. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
@@ -380,7 +380,7 @@ Nous sommes nés pour le changement.</translation>
</message> </message>
<message> <message>
<location filename="../src/widget.ui" line="1240"/> <location filename="../src/widget.ui" line="1240"/>
<source>Source Server</source> <source>Spark Store Update</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
@@ -557,15 +557,15 @@ Nous sommes nés pour le changement.</translation>
<translation type="vanished">Redémarrez pour prendre effet</translation> <translation type="vanished">Redémarrez pour prendre effet</translation>
</message> </message>
<message> <message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;使apt工具获取软件使线&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="vanished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Le rôle du serveur source est de s&apos;assurer que le logiciel est mis à jour et prend en charge l&apos;utilisation de l&apos;outil apt pour obtenir le logiciel. Nous préférons généralement que vous utilisiez la première ligne comme source de mise à jour, qui est généralement la plus stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation type="vanished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Le rôle du serveur source est de s&apos;assurer que le logiciel est mis à jour et prend en charge l&apos;utilisation de l&apos;outil apt pour obtenir le logiciel. Nous préférons généralement que vous utilisiez la première ligne comme source de mise à jour, qui est généralement la plus stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<source></source> <source></source>
<translation type="vanished">Mettre à jour la source APT</translation> <translation type="vanished">Mettre à jour la source APT</translation>
</message> </message>
<message> <message>
<source></source> <source></source>
<translation type="vanished">Source APT: </translation> <translation type="vanished">Source APT: </translation>
</message> </message>
<message> <message>
@@ -676,27 +676,17 @@ Nous sommes nés pour le changement.</translation>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1152"/> <location filename="../src/widget.cpp" line="1123"/>
<source>Apt has reported an error. Please use apt update in terminal to locate the problem.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.cpp" line="1159"/>
<source>Unknown error!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.cpp" line="1187"/>
<source>Uninstall succeeded</source> <source>Uninstall succeeded</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1209"/> <location filename="../src/widget.cpp" line="1145"/>
<source>Temporary cache was cleaned</source> <source>Temporary cache was cleaned</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1291"/> <location filename="../src/widget.cpp" line="1227"/>
<source>The URL has been copied to the clipboard</source> <source>The URL has been copied to the clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@@ -205,7 +205,7 @@
<message> <message>
<location filename="../src/widget.ui" line="547"/> <location filename="../src/widget.ui" line="547"/>
<location filename="../src/widget.cpp" line="910"/> <location filename="../src/widget.cpp" line="910"/>
<location filename="../src/widget.cpp" line="1183"/> <location filename="../src/widget.cpp" line="1119"/>
<source>Install</source> <source>Install</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -379,19 +379,18 @@
<translation type="vanished"></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.ui" line="1223"/> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Jump to the Spark app store home page to check for updates. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <translation type="vanished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;使apt工具获取软件使线&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/widget.ui" line="1233"/> <location filename="../src/widget.ui" line="1233"/>
<source>Update</source> <source>Update</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.ui" line="1240"/> <location filename="../src/widget.ui" line="1240"/>
<source>Source Server</source> <source>Spark Store Update</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.ui" line="1260"/> <location filename="../src/widget.ui" line="1260"/>
@@ -476,13 +475,18 @@
<message> <message>
<location filename="../src/widget.ui" line="912"/> <location filename="../src/widget.ui" line="912"/>
<source>Request Update</source> <source>Request Update</source>
<translation type="unfinished">/</translation> <translation>/</translation>
</message> </message>
<message> <message>
<location filename="../src/widget.ui" line="1194"/> <location filename="../src/widget.ui" line="1194"/>
<source>Take effect when restart</source> <source>Take effect when restart</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../src/widget.ui" line="1223"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check update for Spark Store. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation>
</message>
<message> <message>
<location filename="../src/widget.ui" line="1334"/> <location filename="../src/widget.ui" line="1334"/>
<source>0B</source> <source>0B</source>
@@ -518,6 +522,10 @@
<source>Not Exist</source> <source>Not Exist</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Update finished</source>
<translation type="obsolete"></translation>
</message>
<message> <message>
<location filename="../src/widget.cpp" line="139"/> <location filename="../src/widget.cpp" line="139"/>
<location filename="../src/widget.cpp" line="409"/> <location filename="../src/widget.cpp" line="409"/>
@@ -599,14 +607,12 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1152"/>
<source>Apt has reported an error. Please use apt update in terminal to locate the problem.</source> <source>Apt has reported an error. Please use apt update in terminal to locate the problem.</source>
<translation>使apt update来查看错误原因</translation> <translation type="vanished">使apt update来查看错误原因</translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1159"/>
<source>Unknown error!</source> <source>Unknown error!</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<source>Yes</source> <source>Yes</source>
@@ -656,17 +662,17 @@ Click yes to continue.</source>
<translation type="vanished"></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1187"/> <location filename="../src/widget.cpp" line="1123"/>
<source>Uninstall succeeded</source> <source>Uninstall succeeded</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1209"/> <location filename="../src/widget.cpp" line="1145"/>
<source>Temporary cache was cleaned</source> <source>Temporary cache was cleaned</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widget.cpp" line="1291"/> <location filename="../src/widget.cpp" line="1227"/>
<source>The URL has been copied to the clipboard</source> <source>The URL has been copied to the clipboard</source>
<translation></translation> <translation></translation>
</message> </message>