diff --git a/debian/changelog b/debian/changelog index 8eca23a..67be9a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 * 修复:判断是否安装状态错误 diff --git a/debian/spark-store.postinst b/debian/spark-store.postinst index 0e22c2d..9298834 100755 --- a/debian/spark-store.postinst +++ b/debian/spark-store.postinst @@ -13,8 +13,8 @@ case "$1" in echo "Will not enable armhf since 4271" ;; loongarch64) - echo "Enabling ABI1(OldWorld) arch..." - dpkg --add-architecture loongarch64 + echo "Nope we DO NOT WANT ABI1 now" + dpkg --remove-architecture loongarch64 ;; *) diff --git a/src/backend/downloadworker.cpp b/src/backend/downloadworker.cpp index d6f92af..d44f350 100644 --- a/src/backend/downloadworker.cpp +++ b/src/backend/downloadworker.cpp @@ -120,6 +120,7 @@ void DownloadController::startDownload(const QString &url) QString downloadDir = "/tmp/spark-store/"; //下载目录 QString aria2ConnectionPerServer = "--max-connection-per-server=1"; //每个服务器最大连接数 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 @@ -147,6 +148,7 @@ void DownloadController::startDownload(const QString &url) command.append(aria2SizePerThreads.toUtf8()); command.append(aria2ConnectionPerServer.toUtf8()); command.append(aria2ConnectionMax.toUtf8()); + command.append(aria2ConnectionTimeout.toUtf8()); if (useMetalink) { diff --git a/src/main.cpp b/src/main.cpp index 172291c..a224011 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -148,49 +148,9 @@ int main(int argc, char *argv[]) // qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-web-security"); #ifdef __sw_64__ 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 + /** * NOTE: https://zhuanlan.zhihu.com/p/550285855 * 避免 wayland 环境下从 QtWebEngine 后退回到 QWidget 时黑屏闪烁 diff --git a/tool/spark-dstore-patch b/tool/spark-dstore-patch index c955fcd..e0292ab 100755 --- a/tool/spark-dstore-patch +++ b/tool/spark-dstore-patch @@ -7,7 +7,7 @@ enumAppInfoList() { appInfoList=() apps="/opt/apps" - list=$(ls $apps) + list=$(ls $apps 2>/dev/null) for appID in $list; do appInfoList+=("$appID") done @@ -78,7 +78,7 @@ if [ ! -d "/usr/share/icons/hicolor/scalable/apps" ];then mkdir -p /usr/share/icons/hicolor/scalable/apps 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 target_icon_path=/usr/share/icons/hicolor/scalable/apps/$(basename ${icon_root_icon_path}) if [ ! -e ${target_icon_path} ];then @@ -90,19 +90,23 @@ done function exec_link_clean(){ # 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/icons -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 {} \; & - find /usr/share/glib-2.0 -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 {} \; & - find /usr/share/fcitx -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 {} \; & - find /usr/share/locale -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 {} \; & - find /usr/lib/mozilla/plugins -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 {} \; & - find /usr/share/fonts -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 {} \; & + 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 {} \; 2>/dev/null & + 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 {} \; 2>/dev/null & + 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 {} \; 2>/dev/null & + 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 {} \; 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 {} \; 2>/dev/null & + 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 {} \; 2>/dev/null & + 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 {} \; 2>/dev/null & + + +} +function exec_uos_package_update(){ update-icon-caches /usr/share/icons/* > /dev/null 2>&1 & update-desktop-database -q > /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----------------" if [ ! -e /usr/bin/deepin-app-store-tool ];then # execute linkApp function for each app and print output exec_uos_package_link + fi exec_v23_icon_link exec_link_clean +wait +exec_uos_package_update echo "----------------Finished----------------"