mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-23 18:52:21 +08:00
修改: src/downloadlist.cpp
修改: src/widget.cpp 重命名: pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy -> tool/auto-install-policy/store.spark-app.ssinstall.policy 修改: tool/update-upgrade/ss-update-controler.sh 修改: translations/spark-store_en.ts 修改: translations/spark-store_fr.ts 修改: translations/spark-store_zh_CN.ts
This commit is contained in:
parent
00f9b62b80
commit
3b3bf8f0de
@ -71,7 +71,7 @@ void downloadlist::setValue(qint64 value)
|
|||||||
ui->label_2->setText(QString::number(double(value) / 100) + "% (" + speed + ")");
|
ui->label_2->setText(QString::number(double(value) / 100) + "% (" + speed + ")");
|
||||||
if(ui->label_2->text().left(4) == "100%")
|
if(ui->label_2->text().left(4) == "100%")
|
||||||
{
|
{
|
||||||
ui->label_2->setText(tr("Downloaded, waiting to install"));
|
ui->label_2->setText(tr("Downloaded. Open APP Upgrade and Install Settings to enable password-free installation"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ void Widget::initUI()
|
|||||||
// 添加菜单项
|
// 添加菜单项
|
||||||
QAction *actionSubmission = new QAction(tr("Submit App"), this);
|
QAction *actionSubmission = new QAction(tr("Submit App"), this);
|
||||||
QAction *setting = new QAction(tr("Settings"));
|
QAction *setting = new QAction(tr("Settings"));
|
||||||
QAction *upgrade = new QAction(tr("App Upgrade"));
|
QAction *upgrade = new QAction(tr("APP Upgrade and Install Settings"));
|
||||||
|
|
||||||
QMenu *menu = new QMenu;
|
QMenu *menu = new QMenu;
|
||||||
menu->addAction(setting);
|
menu->addAction(setting);
|
||||||
|
@ -1,8 +1,40 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
|
||||||
echo "因为目前没有有时间的Qt程序员志愿者所以现在加功能只有让shenmo写脚本了..."
|
reset
|
||||||
echo
|
|
||||||
echo "此功能被添加的原因是:为了防止影响系统更新,星火源默认的优先级是400,低于默认的500。这导致了与系统仓库相同包名的软件包无法正常更新到比系统仓库更高的版本。例如:hugo,系统仓库中的低版本会被优先安装,而且默认不会更新到星火的更新的版本"
|
endloop=0
|
||||||
|
|
||||||
|
#####################检测是否启动过了更新检测工具
|
||||||
|
while [ $endloop -eq 0 ] ;do
|
||||||
|
|
||||||
|
if [ -f /etc/xdg/autostart/spark-update-notifier.desktop ];then
|
||||||
|
text_update_open="关闭"
|
||||||
|
#已经开启了就显示关闭
|
||||||
|
else
|
||||||
|
text_update_open="开启"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy ];then
|
||||||
|
text_auto_install_open="关闭"
|
||||||
|
#已经开启了就显示关闭
|
||||||
|
else
|
||||||
|
text_auto_install_open="开启"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "欢迎使用星火更新和安装设置工具"
|
||||||
|
echo "请在以下操作中选择一个进行~"
|
||||||
|
echo "输入0 查看自动更新相关功能使用前须知(重要)"
|
||||||
|
echo "输入1 $text_update_open星火更新检测工具(如果开启则会在系统启动后自动检测更新。如有更新则会弹出通知)"
|
||||||
|
echo "输入2 查看可更新软件包列表并决定是否更新"
|
||||||
|
echo "输入3 $text_auto_install_open点击安装免输入密码功能"
|
||||||
|
echo "输入4 退出脚本"
|
||||||
|
read option
|
||||||
|
|
||||||
|
case $option in
|
||||||
|
0)
|
||||||
|
reset
|
||||||
|
echo "此须知适用于自动更新功能"
|
||||||
echo "此脚本可以检测星火源中是否有比当前系统更高版本的软件包,由您决定是否安装"
|
echo "此脚本可以检测星火源中是否有比当前系统更高版本的软件包,由您决定是否安装"
|
||||||
echo "此脚本使用apt update/apt list --upgrade/apt upgrade来更新软件源、列出更新列表和操作更新"
|
echo "此脚本使用apt update/apt list --upgrade/apt upgrade来更新软件源、列出更新列表和操作更新"
|
||||||
echo
|
echo
|
||||||
@ -14,44 +46,26 @@ echo
|
|||||||
echo "请按回车继续..."
|
echo "请按回车继续..."
|
||||||
#"只有回车可以用啊!""啊?"“你说的任意都行啊”“唔。。。戳到我的盲区了”
|
#"只有回车可以用啊!""啊?"“你说的任意都行啊”“唔。。。戳到我的盲区了”
|
||||||
read
|
read
|
||||||
|
|
||||||
reset
|
reset
|
||||||
|
;;
|
||||||
endloop=0
|
|
||||||
|
|
||||||
|
|
||||||
while [ $endloop -eq 0 ] ;do
|
|
||||||
|
|
||||||
if [ -f /etc/xdg/autostart/spark-update-notifier.desktop ];then
|
|
||||||
textupdateopen="关闭"
|
|
||||||
#已经开启了就显示关闭
|
|
||||||
else
|
|
||||||
textupdateopen="开启"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "欢迎使用星火更新工具 脚本版 "
|
|
||||||
echo "请在以下操作中选择一个进行~"
|
|
||||||
echo "输入1 $textupdateopen星火更新检测工具(如果开启则会在系统启动后自动检测更新。如有更新则会弹出通知)"
|
|
||||||
echo "输入2 查看可更新软件包列表并决定是否更新"
|
|
||||||
echo "输入3 退出脚本"
|
|
||||||
read option
|
|
||||||
|
|
||||||
case $option in
|
|
||||||
1)
|
1)
|
||||||
echo "执行以下操作需要授权..."
|
echo "执行以下操作需要授权..."
|
||||||
if [ -f /etc/xdg/autostart/spark-update-notifier.desktop ];then
|
if [ -f /etc/xdg/autostart/spark-update-notifier.desktop ];then
|
||||||
echo "检测到已经启动了自动更新检测,关闭中"
|
echo "检测到已经启动了自动更新检测,执行关闭"
|
||||||
sudo systemctl disable spark-update-notifier
|
sudo systemctl disable spark-update-notifier
|
||||||
sudo rm /etc/xdg/autostart/spark-update-notifier.desktop
|
sudo rm /etc/xdg/autostart/spark-update-notifier.desktop
|
||||||
|
sleep 3
|
||||||
|
reset
|
||||||
else
|
else
|
||||||
echo "未检测到自动更新检测,启动中"
|
echo "未检测到自动更新检测,启动"
|
||||||
sudo systemctl enable spark-update-notifier
|
sudo systemctl enable spark-update-notifier
|
||||||
sudo service spark-update-notifier start
|
sudo service spark-update-notifier start
|
||||||
# ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop $XDG_CONFIG_HOME/autostart
|
# ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop $XDG_CONFIG_HOME/autostart
|
||||||
#
|
#
|
||||||
sudo ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop /etc/xdg/autostart
|
sudo ln -s /opt/durapps/spark-store/bin/update-upgrade/autostart/spark-update-notifier.desktop /etc/xdg/autostart
|
||||||
/opt/durapps/spark-store/bin/update-upgrade/ss-update-notify.sh now
|
/opt/durapps/spark-store/bin/update-upgrade/ss-update-notify.sh now
|
||||||
|
sleep 3
|
||||||
|
reset
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -59,10 +73,40 @@ case $option in
|
|||||||
echo "执行以下操作需要授权..."
|
echo "执行以下操作需要授权..."
|
||||||
/opt/durapps/spark-store/bin/update-upgrade/ss-upgrade-list.sh
|
/opt/durapps/spark-store/bin/update-upgrade/ss-upgrade-list.sh
|
||||||
/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh
|
/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh
|
||||||
|
echo "请按回车返回"
|
||||||
|
read
|
||||||
|
reset
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
echo "按回车退出"
|
if [ -f /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy ];then
|
||||||
|
echo "检测到已经启动了免输入密码,执行关闭"
|
||||||
|
sudo rm /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||||
|
sleep 3
|
||||||
|
reset
|
||||||
|
else
|
||||||
|
|
||||||
|
cat << EOF
|
||||||
|
请注意:这个功能尚未开发完成,一旦开启,则运行pkexec ssinstall时不再需要授权
|
||||||
|
仅对星火内置安装器生效
|
||||||
|
理论上会存在一定的安全风险~
|
||||||
|
如果接受,请输入1,否则输入2
|
||||||
|
EOF
|
||||||
|
read is_accept_polkiy
|
||||||
|
|
||||||
|
if [ "$is_accept_polkiy" = "1" ];then
|
||||||
|
echo "执行以下操作需要授权..."
|
||||||
|
sudo ln /opt/durapps/spark-store/bin/auto-install-policy/store.spark-app.ssinstall.policy /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||||
|
echo 已启动
|
||||||
|
sleep 3
|
||||||
|
reset
|
||||||
|
else
|
||||||
|
echo 未同意,返回
|
||||||
|
sleep 3
|
||||||
|
reset
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
4)
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -447,6 +447,11 @@
|
|||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/widget.cpp" line="195"/>
|
||||||
|
<source>APP Upgrade and Install Settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.cpp" line="344"/>
|
<location filename="../src/widget.cpp" line="344"/>
|
||||||
<source>Not Exist</source>
|
<source>Not Exist</source>
|
||||||
@ -472,11 +477,6 @@
|
|||||||
<source>Failed to get the name to the file to be downloaded.</source>
|
<source>Failed to get the name to the file to be downloaded.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../src/widget.cpp" line="195"/>
|
|
||||||
<source>App Upgrade</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.cpp" line="900"/>
|
<location filename="../src/widget.cpp" line="900"/>
|
||||||
<source>Upgrade</source>
|
<source>Upgrade</source>
|
||||||
@ -582,7 +582,7 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/downloadlist.cpp" line="74"/>
|
<location filename="../src/downloadlist.cpp" line="74"/>
|
||||||
<source>Downloaded, waiting to install</source>
|
<source>Downloaded. Open APP Upgrade and Install Settings to enable password-free installation</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -629,6 +629,11 @@ Nous sommes nés pour le changement.</translation>
|
|||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/widget.cpp" line="195"/>
|
||||||
|
<source>APP Upgrade and Install Settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.cpp" line="344"/>
|
<location filename="../src/widget.cpp" line="344"/>
|
||||||
<source>Not Exist</source>
|
<source>Not Exist</source>
|
||||||
@ -645,11 +650,6 @@ Nous sommes nés pour le changement.</translation>
|
|||||||
<source>Failed to get the name to the file to be downloaded.</source>
|
<source>Failed to get the name to the file to be downloaded.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../src/widget.cpp" line="195"/>
|
|
||||||
<source>App Upgrade</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.cpp" line="706"/>
|
<location filename="../src/widget.cpp" line="706"/>
|
||||||
<source>Relative apps Not Found!</source>
|
<source>Relative apps Not Found!</source>
|
||||||
@ -776,7 +776,7 @@ Nous sommes nés pour le changement.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/downloadlist.cpp" line="74"/>
|
<location filename="../src/downloadlist.cpp" line="74"/>
|
||||||
<source>Downloaded, waiting to install</source>
|
<source>Downloaded. Open APP Upgrade and Install Settings to enable password-free installation</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -505,8 +505,8 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.cpp" line="195"/>
|
<location filename="../src/widget.cpp" line="195"/>
|
||||||
<source>App Upgrade</source>
|
<source>APP Upgrade and Install Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>应用更新和安装设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.cpp" line="344"/>
|
<location filename="../src/widget.cpp" line="344"/>
|
||||||
@ -728,9 +728,8 @@ Click yes to continue.</source>
|
|||||||
<translation>深度软件包安装器</translation>
|
<translation>深度软件包安装器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/downloadlist.cpp" line="74"/>
|
|
||||||
<source>Downloaded, waiting to install</source>
|
<source>Downloaded, waiting to install</source>
|
||||||
<translation>已完成,等待安装</translation>
|
<translation type="vanished">已完成,等待安装</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/downloadlist.cpp" line="100"/>
|
<location filename="../src/downloadlist.cpp" line="100"/>
|
||||||
@ -756,6 +755,11 @@ Click yes to continue.</source>
|
|||||||
<source>Installing...</source>
|
<source>Installing...</source>
|
||||||
<translation type="obsolete">正在安装</translation>
|
<translation type="obsolete">正在安装</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/downloadlist.cpp" line="74"/>
|
||||||
|
<source>Downloaded. Open APP Upgrade and Install Settings to enable password-free installation</source>
|
||||||
|
<translation type="unfinished">下载完成 可进入应用更新和安装设置来启动免密码安装</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/downloadlist.cpp" line="190"/>
|
<location filename="../src/downloadlist.cpp" line="190"/>
|
||||||
<source>Finish</source>
|
<source>Finish</source>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user