forked from CEMULinux/cemutil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu-wine.sh
70 lines (51 loc) · 2 KB
/
ubuntu-wine.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
if [ -z "$DISPLAY" ]; then
export DISPLAY=:0.0
fi
if ! $(lsb_release -a | grep -q -e "18.04" -e "18.10" -e "19.04" -e "19.10" -e "20.04" -e "20.10"); then
echo "You need at least Ubuntu 18.04"
exit 1
fi
# add i386 architecture, necessary for wine
sudo dpkg --add-architecture i386
# download wine repo key
sudo wget -nc https://dl.winehq.org/wine-builds/winehq.key
# add wine repo key
sudo apt-key add winehq.key
if $(lsb_release -a | grep -q -e "18.04"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
fi
if $(lsb_release -a | grep -q -e "18.10"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main'
fi
if $(lsb_release -a | grep -q -e "19.04"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ disco main'
fi
if $(lsb_release -a | grep -q -e "19.10"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main'
fi
if $(lsb_release -a | grep -q -e "20.04"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
fi
if $(lsb_release -a | grep -q -e "20.10"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ groovy main'
fi
if $(lsb_release -a | grep -q -e "21.04"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ hirsute main'
fi
if $(lsb_release -a | grep -q -e "21.10"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ impish main'
fi
if $(lsb_release -a | grep -q -e "22.04"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main'
fi
if $(lsb_release -a | grep -q -e "22.10"); then
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ kinetic main'
fi
sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport -y
sudo apt update
# install wine-staging
sudo apt -y install --install-recommends winehq-staging
# install winetricks
sudo apt -y install winetricks
#cleanup
sudo rm -rf winehq.key