mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-09 07:05:59 +08:00
commit
a20454b92c
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
|||||||
|
spark-store (4.2.12) stable; urgency=medium
|
||||||
|
|
||||||
|
* 修复:飞腾部分设备上白屏的问题
|
||||||
|
* 修复:下载开始时长时等待(降低链接超时时长)
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Sun, 5 Mar 2022 11:45:14 +0800
|
||||||
|
|
||||||
spark-store (4.2.11) stable; urgency=medium
|
spark-store (4.2.11) stable; urgency=medium
|
||||||
|
|
||||||
* 修复:判断是否安装状态错误
|
* 修复:判断是否安装状态错误
|
||||||
|
4
debian/spark-store.postinst
vendored
4
debian/spark-store.postinst
vendored
@ -13,8 +13,8 @@ case "$1" in
|
|||||||
echo "Will not enable armhf since 4271"
|
echo "Will not enable armhf since 4271"
|
||||||
;;
|
;;
|
||||||
loongarch64)
|
loongarch64)
|
||||||
echo "Enabling ABI1(OldWorld) arch..."
|
echo "Nope we DO NOT WANT ABI1 now"
|
||||||
dpkg --add-architecture loongarch64
|
dpkg --remove-architecture loongarch64
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
@ -120,6 +120,7 @@ void DownloadController::startDownload(const QString &url)
|
|||||||
QString downloadDir = "/tmp/spark-store/"; //下载目录
|
QString downloadDir = "/tmp/spark-store/"; //下载目录
|
||||||
QString aria2ConnectionPerServer = "--max-connection-per-server=1"; //每个服务器最大连接数
|
QString aria2ConnectionPerServer = "--max-connection-per-server=1"; //每个服务器最大连接数
|
||||||
QString aria2ConnectionMax = "--max-concurrent-downloads=16"; //最大同时下载数
|
QString aria2ConnectionMax = "--max-concurrent-downloads=16"; //最大同时下载数
|
||||||
|
QString aria2ConnectionTimeout = "--connect-timeout=5"; // 1 秒服务器连接超时(像 spark1.uniartisan.com、cdn.dl.uniartisan.com、momen.d.store.deepinos.org.cn 等服务器失效时不影响即时下载)
|
||||||
|
|
||||||
|
|
||||||
if (useMetalink) //如果是metalink
|
if (useMetalink) //如果是metalink
|
||||||
@ -147,6 +148,7 @@ void DownloadController::startDownload(const QString &url)
|
|||||||
command.append(aria2SizePerThreads.toUtf8());
|
command.append(aria2SizePerThreads.toUtf8());
|
||||||
command.append(aria2ConnectionPerServer.toUtf8());
|
command.append(aria2ConnectionPerServer.toUtf8());
|
||||||
command.append(aria2ConnectionMax.toUtf8());
|
command.append(aria2ConnectionMax.toUtf8());
|
||||||
|
command.append(aria2ConnectionTimeout.toUtf8());
|
||||||
|
|
||||||
if (useMetalink)
|
if (useMetalink)
|
||||||
{
|
{
|
||||||
|
42
src/main.cpp
42
src/main.cpp
@ -148,49 +148,9 @@ int main(int argc, char *argv[])
|
|||||||
// qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-web-security");
|
// qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-web-security");
|
||||||
#ifdef __sw_64__
|
#ifdef __sw_64__
|
||||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--no-sandbox");
|
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--no-sandbox");
|
||||||
#elif __aarch64__
|
|
||||||
QString env = QString::fromUtf8(qgetenv("QTWEBENGINE_CHROMIUM_FLAGS"));
|
|
||||||
env = env.trimmed();
|
|
||||||
/**
|
|
||||||
* NOTE: 参考帮助手册代码,对于部分 ARM CPU 设备,
|
|
||||||
* --disable-gpu 保证网页正常显示
|
|
||||||
* --single-process 避免 QtWebEngine 崩溃(可选)
|
|
||||||
*/
|
|
||||||
env += " --disable-gpu";
|
|
||||||
if (Utils::isPhytium()) {
|
|
||||||
env += " --single-process";
|
|
||||||
}
|
|
||||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", env.trimmed().toUtf8());
|
|
||||||
|
|
||||||
if (Utils::isWayland()) {
|
|
||||||
/**
|
|
||||||
* WARNING: DDM TreeLand 混合器下,设置
|
|
||||||
* QT_WAYLAND_SHELL_INTEGRATION 环境变量
|
|
||||||
* 会导致崩溃 By justforlxz
|
|
||||||
*/
|
|
||||||
if (!Utils::isTreeLand()) {
|
|
||||||
/**
|
|
||||||
* NOTE: 参考帮助手册代码,对于麒麟 CPU 设备,
|
|
||||||
* 避免 wayland 环境下 QtWebEngine 崩溃
|
|
||||||
*/
|
|
||||||
qputenv("QT_WAYLAND_SHELL_INTEGRATION", "kwayland-shell");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
QSurfaceFormat format;
|
|
||||||
format.setRenderableType(QSurfaceFormat::OpenGLES);
|
|
||||||
QSurfaceFormat::setDefaultFormat(format);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* NOTE: https://zhuanlan.zhihu.com/p/550285855
|
|
||||||
* 避免 X11 环境下从 QtWebEngine 后退回到 QWidget 时黑屏闪烁
|
|
||||||
*/
|
|
||||||
if (!Utils::isWayland()) {
|
|
||||||
qputenv("QMLSCENE_DEVICE", "softwarecontext");
|
|
||||||
DApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NOTE: https://zhuanlan.zhihu.com/p/550285855
|
* NOTE: https://zhuanlan.zhihu.com/p/550285855
|
||||||
* 避免 wayland 环境下从 QtWebEngine 后退回到 QWidget 时黑屏闪烁
|
* 避免 wayland 环境下从 QtWebEngine 后退回到 QWidget 时黑屏闪烁
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
enumAppInfoList() {
|
enumAppInfoList() {
|
||||||
appInfoList=()
|
appInfoList=()
|
||||||
apps="/opt/apps"
|
apps="/opt/apps"
|
||||||
list=$(ls $apps)
|
list=$(ls $apps 2>/dev/null)
|
||||||
for appID in $list; do
|
for appID in $list; do
|
||||||
appInfoList+=("$appID")
|
appInfoList+=("$appID")
|
||||||
done
|
done
|
||||||
@ -78,7 +78,7 @@ if [ ! -d "/usr/share/icons/hicolor/scalable/apps" ];then
|
|||||||
mkdir -p /usr/share/icons/hicolor/scalable/apps
|
mkdir -p /usr/share/icons/hicolor/scalable/apps
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for icon_root_icon_path in $(ls /usr/share/icons/*.png /usr/share/icons/*.svg)
|
for icon_root_icon_path in $(ls /usr/share/icons/*.png /usr/share/icons/*.svg 2>/dev/null)
|
||||||
do
|
do
|
||||||
target_icon_path=/usr/share/icons/hicolor/scalable/apps/$(basename ${icon_root_icon_path})
|
target_icon_path=/usr/share/icons/hicolor/scalable/apps/$(basename ${icon_root_icon_path})
|
||||||
if [ ! -e ${target_icon_path} ];then
|
if [ ! -e ${target_icon_path} ];then
|
||||||
@ -90,19 +90,23 @@ done
|
|||||||
function exec_link_clean(){
|
function exec_link_clean(){
|
||||||
# remove broken links in /usr/share
|
# remove broken links in /usr/share
|
||||||
|
|
||||||
find /usr/share/applications -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/applications -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/share/icons -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/icons -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/share/mime/packages -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/mime/packages -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/share/glib-2.0 -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/glib-2.0 -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/share/dbus-1/services -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/dbus-1/services -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/share/fcitx -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/fcitx -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/share/help -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/help -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/share/locale -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/locale -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/fcitx -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/fcitx -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/lib/mozilla/plugins -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/lib/mozilla/plugins -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/share/polkit-1/actions -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/polkit-1/actions -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /usr/share/fonts -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /usr/share/fonts -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
find /etc/fonts/conf.d -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; &
|
find /etc/fonts/conf.d -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
function exec_uos_package_update(){
|
||||||
update-icon-caches /usr/share/icons/* > /dev/null 2>&1 &
|
update-icon-caches /usr/share/icons/* > /dev/null 2>&1 &
|
||||||
update-desktop-database -q > /dev/null 2>&1 &
|
update-desktop-database -q > /dev/null 2>&1 &
|
||||||
update-mime-database -V /usr/share/mime > /dev/null 2>&1 &
|
update-mime-database -V /usr/share/mime > /dev/null 2>&1 &
|
||||||
@ -110,13 +114,15 @@ function exec_link_clean(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
echo "----------------Running Spark DStore Patch----------------"
|
echo "----------------Running Spark DStore Patch----------------"
|
||||||
if [ ! -e /usr/bin/deepin-app-store-tool ];then
|
if [ ! -e /usr/bin/deepin-app-store-tool ];then
|
||||||
# execute linkApp function for each app and print output
|
# execute linkApp function for each app and print output
|
||||||
exec_uos_package_link
|
exec_uos_package_link
|
||||||
|
|
||||||
fi
|
fi
|
||||||
exec_v23_icon_link
|
exec_v23_icon_link
|
||||||
exec_link_clean
|
exec_link_clean
|
||||||
|
wait
|
||||||
|
exec_uos_package_update
|
||||||
echo "----------------Finished----------------"
|
echo "----------------Finished----------------"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user