Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
【脚本】解读逆水寒安装脚本
deepin Talks
990
views ·
3
replies ·
To
floor
Go
i8520
deepin
2019-10-11 20:11
Author
本帖最后由 i8520 于 2019-10-11 12:38 编辑
#!/bin/bash
##容器版本(看你自己安装的是什么版)wine-staging,wine执行程序路径
wine=/opt/wine-staging/bin/wine
##类似CSS,需要用到路径为/home/i8520/netease-wine ,就用prefix_dir代替---------------
prefix_dir=${HOME}/netease-wine/
mkprefix_dir(){
##如果逆水寒DEB包,安装的时候没有创建 /home/i8520/netease-wine 这个文件路径就创建------
mkdir -p ${prefix_dir}
(
echo "45" ; sleep 1
##tar.gz 解压到 /home/i8520/netease-wine----------------------------------------
tar xvf /opt/netease-wine/com.163.n.tar.gz -C ${prefix_dir} ; sleep 1
echo "75" ; sleep 1
echo "# 游戏正在启动中…… " ; sleep 30
echo "100" ; sleep 1
)|
##启动了一个图形界面宽度是600,高度好像是两行文字决定的----------------------------------
zenity --progress --title="WineHQ-Staging" --text="正在解压wine容器,解压位置:${prefix_dir},请稍等……" --percentage=0 --width=600 --auto-close --no-cancel
}
if [ -d ${prefix_dir}/com.163.n ]; then
##删除这个路径下的 逆水寒.desktop-----------------------------------------------------
rm ~/.local/share/applications/wine/Programs/逆水寒.desktop
##网易游戏容器-运行NGP---------------------------------------------------------------
WINEPREFIX=${prefix_dir}/com.163.n ${wine} "${prefix_dir}/com.163.n/drive_c/Netease/逆水寒(NGP游戏平台)/out/Release/LootHoarder.exe"
else
##如果mkprefix_dir(){} 没有被执行就在执行一次------------------------------------------
mkprefix_dir
##再次启动-网易游戏容器-运行NGP--------------------------------------------------------
WINEPREFIX=${prefix_dir}/com.163.n ${wine} "${prefix_dir}/com.163.n/drive_c/Netease/逆水寒(NGP游戏平台)/out/Release/LootHoarder.exe"
fi
exit 0
Copy the Code
可以参考这个脚本来制作tar.gz的容器便于别人使用
Reply
Like 0
Favorite
View the author
All Replies
i8520
deepin
2019-10-11 20:29
#1
这个方便非专业人事使用,很简单,很适合游戏付容器一起打包
Reply
Like 0
View the author
jianguo922
deepin
2019-10-12 02:08
#2
谢谢分享
Reply
Like 0
View the author
aida
deepin
2019-10-12 18:18
#3
感谢分享
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
What is the purpose of UOS AI?
Cannot upgrade "Deepin 25.0.10"
chrome browser
Feature Request: Adding an option for a "Floating Dock" mode in DDE
[Feature Request] Drop-down grid panel for window snap layouts
Popular Events
More
可以参考这个脚本来制作tar.gz的容器便于别人使用