forked from zq1997/deepin-wine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·54 lines (46 loc) · 1.93 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
set -e
# 添加架构
ARCHITECTURE=$(dpkg --print-architecture && dpkg --print-foreign-architectures)
if ! echo "$ARCHITECTURE" | grep -qE 'amd64|i386'; then
echo "必须amd64/i386机型才能移植deepin-wine"
return 1
fi
echo "$ARCHITECTURE" | grep -qE 'i386' || sudo dpkg --add-architecture i386
sudo apt-get update
LIST_FILE="/etc/apt/sources.list.d/deepin-wine.i-m.dev.list"
# 添加软件源
sudo tee "$LIST_FILE" >/dev/null << "EOF"
deb [trusted=yes] https://deepin-wine.i-m.dev /
EOF
# 设置优先级
sudo tee "/etc/apt/preferences.d/deepin-wine.i-m.dev.pref" >/dev/null << "EOF"
Package: *
Pin: release l=deepin-wine
Pin-Priority: 200
EOF
# 添加XDG_DATA_DIRS配置,使得应用图标能正常显示
sudo tee "/etc/profile.d/deepin-wine.i-m.dev.sh" >/dev/null << "EOF"
XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/local/share:/usr/share}
for deepin_dir in /opt/apps/*/entries; do
if [ -d "$deepin_dir/applications" ]; then
XDG_DATA_DIRS="$XDG_DATA_DIRS:$deepin_dir"
fi
done
export XDG_DATA_DIRS
EOF
# 刷新软件源
sudo apt-get update --no-list-cleanup -o Dir::Etc::sourcelist="$LIST_FILE" -o Dir::Etc::sourceparts="-"
printf "
\033[32m大功告成,现在可以试试安装更新deepin-wine软件了,如:
微信:sudo apt-get install com.qq.weixin.deepin
QQ:sudo apt-get install com.qq.im.deepin
TIM:sudo apt-get install com.qq.office.deepin
钉钉:sudo apt-get install com.dingtalk.deepin
完整列表见 https://deepin-wine.i-m.dev/
\033[31;1m
\033[5m🌟\033[25m 尽量将main restricted universe multiverse这几个系统源都启用(自行百度),免得依赖问题多。
\033[5m🌟\033[25m 安装后需要注销重登录才能显示应用图标。
\033[5m🌟\033[25m 出了问题?先去github主页看README,再看别人提过的issue,再百度搜搜,避免直接就提issue。
\033[36;1m如果觉得有用,不妨来给项目加个star:\033[25mhttps://github.com/zq1997/deepin-wine
\033[0m"