Compare commits

..

No commits in common. "b427477a17e473c9627359a155bf06fc72449a62" and "d14d3b178c2258eb5cb4f2ec785b9f3ae32073a8" have entirely different histories.

3 changed files with 18 additions and 32 deletions

View File

@ -16,7 +16,6 @@ jobs:
- wine
baseImage:
- mcr.microsoft.com/devcontainers/base:debian
- mcr.microsoft.com/devcontainers/base:ubuntu
steps:
- uses: actions/checkout@v3

View File

@ -1,7 +1,7 @@
{
"name": "Wine",
"id": "wine",
"version": "0.0.5",
"version": "0.0.4",
"description": "Installs Wine.",
"documentationURL": "https://github.com/Maks1mS/devcontainers-features/tree/main/src/wine",
"options": {

View File

@ -36,12 +36,21 @@ update_rc_file() {
fi
}
add_wine_repo() {
wget -nv https://dl.winehq.org/wine-builds/winehq.key -O- | apt-key add -
echo "deb https://dl.winehq.org/wine-builds/$1 $VERSION_CODENAME main" >/etc/apt/sources.list.d/winehq.list
}
install_debian() {
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture i386
apt-get update
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
telnet \
cabextract \
gnupg2 \
wget
wget https://dl.winehq.org/wine-builds/winehq.key -O - | apt-key add -
echo "deb https://dl.winehq.org/wine-builds/debian $VERSION_CODENAME main" >/etc/apt/sources.list.d/winehq.list
set_wine_version_preference() {
if [ "${WINEVERSION}" != "latest" ]; then
{
echo "Package: *wine* *wine*:i386"
@ -49,13 +58,11 @@ set_wine_version_preference() {
echo "Pin-Priority: 1001"
} >/etc/apt/preferences.d/winehq.pref
fi
}
install_wine() {
apt-get update
apt-get install -y --install-recommends winehq-staging
wget -nv https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -O /usr/bin/winetricks
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -O /usr/bin/winetricks
chmod +rx /usr/bin/winetricks
snippet="export WINEHOME=\"$_REMOTE_USER_HOME\"
@ -72,7 +79,7 @@ export WINEDEBUG=-all"
wine wineboot --init
mkdir -p "$COREFONTS_CACHE_DIR"
for filename in ${COREFONTS_FILES[@]}; do
wget -nv -P "$COREFONTS_CACHE_DIR" "$COREFONTS_BASE_URL\$filename"
wget -P "$COREFONTS_CACHE_DIR" "$COREFONTS_BASE_URL\$filename"
done
winetricks corefonts
EOF
@ -85,27 +92,7 @@ EOF
. /etc/os-release
if [ "${ID}" = "ubuntu" ]; then
install_ubuntu() {
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture i386
apt-get update
apt-get install -y apt-transport-https ca-certificates telnet cabextract gnupg2 wget
add_wine_repo "ubuntu"
set_wine_version_preference
install_wine
}
install_ubuntu
elif [ "${ID}" = "debian" ] || [ "${ID_LIKE}" = "debian" ]; then
install_debian() {
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture i386
apt-get update
apt-get install -y apt-transport-https ca-certificates telnet cabextract gnupg2 wget
add_wine_repo "debian"
set_wine_version_preference
install_wine
}
if [ "${ID}" = "debian" ]; then
install_debian
else
echo "Linux distro ${ID} not supported."