This commit is contained in:
2026-07-10 15:11:51 +08:00
parent 8bfcf23bc2
commit da17239d7d
148 changed files with 2542 additions and 4873 deletions
+53 -10
View File
@@ -1,14 +1,57 @@
#!/usr/bin/env bash
##makedesc: Install wine (latest) + ppa
echo
echo "==============================================="
echo "Installing wine (latest)..."
echo "==============================================="
echo
set -eo pipefail
sudo dpkg --add-architecture i386
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo add-apt-repository -y "deb https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs 2>/dev/null) main"
sudo apt install -y --autoremove winehq-stable
wine --version
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: wine on macOS requires Wine Skin, CrossOver, or manual setup" >&2
exit 1
fi
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo
echo "==============================================="
echo "Installing wine"
echo "==============================================="
echo
sudo dpkg --add-architecture i386
if installed wget; then
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
else
curl -fsSL https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
fi
sudo add-apt-repository -y "deb https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs 2>/dev/null) main"
sudo apt install -y --autoremove winehq-stable
echo
echo "Finish!"
wine --version
echo
}
remove() {
echo
echo "==============================================="
echo "Removing wine"
echo "==============================================="
echo
sudo apt remove --purge -y "wine*"
rm -rf "$HOME/.wine"
rm -f "$HOME/.config/menus/applications-merged/"*wine*
rm -rf "$HOME/.local/share/applications/wine"
rm -f "$HOME/.local/share/desktop-directories/"*wine*
rm -f "$HOME/.local/share/icons/"*wine*
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac