Merge pull request  from shenmo/dev
This commit is contained in:
shenmo 2024-04-27 11:12:55 +00:00 committed by Gitee
commit a20454b92c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 34 additions and 59 deletions

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
* 修复:判断是否安装状态错误

@ -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
;;
*)

@ -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)
{

@ -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

@ -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----------------"