Installer uu-steam-decklinux-1-steam-decklinux
该脚本仅供阅读,不能直接用来在Wine游戏助手中安装游戏。
要通过命令安装游戏,请下载完整脚本。
安装命令:/opt/apps/net.winegame.client/files/bin/winegame -i ./xxx.json
custom-name: UU Steam Deck 加速插件
files:
- setup:
filename: uudesk-installer.sh
url: http://uudeck.com
game:
exe: $GAMEDIR/run.sh
installer:
- move:
dst: $GAMEDIR/uudeck-installer.sh
src: setup
- chmodx: $GAMEDIR/uudeck-installer.sh
- write_file:
content: |-
#!/bin/bash
exec zenity --password --title="输入sudo密码"
file: $GAMEDIR/askpass.sh
- chmodx: $GAMEDIR/askpass.sh
- write_file:
content: |-
#!/bin/bash
export SUDO_ASKPASS="$GAMEDIR/askpass.sh"
output() {
while read line; do
echo "# $line"
done | \
LD_LIBRARY_PATH="" zenity --progress \
--width=500 --height=200 \
--title="$1" \
--pulsate
}
{
if [ -e /etc/systemd/system/uuplugin.service ]; then
echo "停止旧版UU服务..."
set -x
sudo -A systemctl stop uuplugin.service
sudo -A systemctl disable uuplugin.service
sudo -A rm -rf /etc/systemd/system/uuplugin.service
fi
if [ -e /home/deck/uu ]; then
echo "删除旧版UU文件..."
set -x
sudo -A rm -rf /home/deck/uu
fi
echo "安装UU加速插件..."
set -x
curl -s uudeck.com | sudo -A bash \
&& echo "安装成功,请在手机上安装“UU主机加速”app,选“安装Steam Deck插件”进行配对使用。" \
|| echo "安装失败,如需帮助,可在 https://hu60.cn/q.php/bbs.topic.104610.html 发帖,请复制上方所有输出到帖子中。"
} | output "安装UU加速插件..."
file: $GAMEDIR/install.sh
- chmodx: $GAMEDIR/install.sh
- write_file:
content: |-
#!/bin/bash
if ! [ -e /etc/systemd/system/uuplugin.service ] || ! [ -e /home/deck/uu ]; then
"$GAMEDIR/install.sh"
fi
export SUDO_ASKPASS="$GAMEDIR/askpass.sh"
output() {
while read line; do
echo "# $line"
done | \
LD_LIBRARY_PATH="" zenity --progress \
--width=500 --height=200 \
--title="$1" \
--pulsate
}
{
set -x
echo "启动UU加速插件..."
systemctl start uuplugin.service
systemctl status uuplugin.service \
&& echo "启动成功,请在手机上安装“UU主机加速”app,选“安装Steam Deck插件”进行配对使用。" \
|| echo "启动失败,可尝试右击选择“执行维护脚本”重新安装UU加速插件。"
} | output "启动UU加速插件..."
file: $GAMEDIR/run.sh
- chmodx: $GAMEDIR/run.sh
- execute:
command: $GAMEDIR/install.sh
description: 安装UU加速插件...
require-binaries: zenity, curl, bash
system:
disable_runtime: true
manual_command: $GAMEDIR/install.sh
{
"custom-name": "UU Steam Deck \u52a0\u901f\u63d2\u4ef6",
"files": [
{
"setup": {
"filename": "uudesk-installer.sh",
"url": "http://uudeck.com"
}
}
],
"game": {
"exe": "$GAMEDIR/run.sh"
},
"installer": [
{
"move": {
"dst": "$GAMEDIR/uudeck-installer.sh",
"src": "setup"
}
},
{
"chmodx": "$GAMEDIR/uudeck-installer.sh"
},
{
"write_file": {
"content": "#!/bin/bash\nexec zenity --password --title=\"\u8f93\u5165sudo\u5bc6\u7801\"",
"file": "$GAMEDIR/askpass.sh"
}
},
{
"chmodx": "$GAMEDIR/askpass.sh"
},
{
"write_file": {
"content": "#!/bin/bash\nexport SUDO_ASKPASS=\"$GAMEDIR/askpass.sh\"\noutput() {\n while read line; do\n echo \"# $line\"\n done | \\\n LD_LIBRARY_PATH=\"\" zenity --progress \\\n --width=500 --height=200 \\\n --title=\"$1\" \\\n --pulsate\n}\n{\n if [ -e /etc/systemd/system/uuplugin.service ]; then\n echo \"\u505c\u6b62\u65e7\u7248UU\u670d\u52a1...\"\n set -x\n sudo -A systemctl stop uuplugin.service\n sudo -A systemctl disable uuplugin.service\n sudo -A rm -rf /etc/systemd/system/uuplugin.service\n fi\n if [ -e /home/deck/uu ]; then\n echo \"\u5220\u9664\u65e7\u7248UU\u6587\u4ef6...\"\n set -x\n sudo -A rm -rf /home/deck/uu\n fi\n echo \"\u5b89\u88c5UU\u52a0\u901f\u63d2\u4ef6...\"\n set -x\n curl -s uudeck.com | sudo -A bash \\\n && echo \"\u5b89\u88c5\u6210\u529f\uff0c\u8bf7\u5728\u624b\u673a\u4e0a\u5b89\u88c5\u201cUU\u4e3b\u673a\u52a0\u901f\u201dapp\uff0c\u9009\u201c\u5b89\u88c5Steam Deck\u63d2\u4ef6\u201d\u8fdb\u884c\u914d\u5bf9\u4f7f\u7528\u3002\" \\\n || echo \"\u5b89\u88c5\u5931\u8d25\uff0c\u5982\u9700\u5e2e\u52a9\uff0c\u53ef\u5728 https://hu60.cn/q.php/bbs.topic.104610.html \u53d1\u5e16\uff0c\u8bf7\u590d\u5236\u4e0a\u65b9\u6240\u6709\u8f93\u51fa\u5230\u5e16\u5b50\u4e2d\u3002\"\n} | output \"\u5b89\u88c5UU\u52a0\u901f\u63d2\u4ef6...\"",
"file": "$GAMEDIR/install.sh"
}
},
{
"chmodx": "$GAMEDIR/install.sh"
},
{
"write_file": {
"content": "#!/bin/bash\nif ! [ -e /etc/systemd/system/uuplugin.service ] || ! [ -e /home/deck/uu ]; then\n \"$GAMEDIR/install.sh\"\nfi\nexport SUDO_ASKPASS=\"$GAMEDIR/askpass.sh\"\noutput() {\n while read line; do\n echo \"# $line\"\n done | \\\n LD_LIBRARY_PATH=\"\" zenity --progress \\\n --width=500 --height=200 \\\n --title=\"$1\" \\\n --pulsate\n}\n{\n set -x\n echo \"\u542f\u52a8UU\u52a0\u901f\u63d2\u4ef6...\"\n systemctl start uuplugin.service\n systemctl status uuplugin.service \\\n && echo \"\u542f\u52a8\u6210\u529f\uff0c\u8bf7\u5728\u624b\u673a\u4e0a\u5b89\u88c5\u201cUU\u4e3b\u673a\u52a0\u901f\u201dapp\uff0c\u9009\u201c\u5b89\u88c5Steam Deck\u63d2\u4ef6\u201d\u8fdb\u884c\u914d\u5bf9\u4f7f\u7528\u3002\" \\\n || echo \"\u542f\u52a8\u5931\u8d25\uff0c\u53ef\u5c1d\u8bd5\u53f3\u51fb\u9009\u62e9\u201c\u6267\u884c\u7ef4\u62a4\u811a\u672c\u201d\u91cd\u65b0\u5b89\u88c5UU\u52a0\u901f\u63d2\u4ef6\u3002\"\n} | output \"\u542f\u52a8UU\u52a0\u901f\u63d2\u4ef6...\"",
"file": "$GAMEDIR/run.sh"
}
},
{
"chmodx": "$GAMEDIR/run.sh"
},
{
"execute": {
"command": "$GAMEDIR/install.sh",
"description": "\u5b89\u88c5UU\u52a0\u901f\u63d2\u4ef6..."
}
}
],
"require-binaries": "zenity, curl, bash",
"system": {
"disable_runtime": true,
"manual_command": "$GAMEDIR/install.sh"
}
}