如何在 Ubuntu 上获取最新版本的 winetricks?

and*_*.46 22 updates command-line wine winetricks software-installation

我已经安装Wine,我对当前版本很满意,但winetricks由于各种错误消息让我失望了几次。

如何更新winetricks以获取 Ubuntu 上的最新版本?

and*_*.46 28

winetricksUbuntu 安装附带的版本通常很旧,即使是更现代的 PPA提供的版本也可能有点滞后。这是一个好主意,也是一个非常安全的winetricks手动更新,独立于您的主要Wine安装,这可以通过几个简单的步骤完成:

1.检查最新版本,删除旧版本:

首先使用这个方便的单行检查看看上游可用的最新版本是什么:

curl --silent --show-error \
https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks --stderr - \
| grep ^WINETRICKS_VERSION | cut -d '=' -f 2
Run Code Online (Sandbox Code Playgroud)

然后,如果这胜过您自己安装的版本(从命令行查看您的版本winetricks --version),请删除您当前安装的版本:

sudo apt-get remove winetricks
Run Code Online (Sandbox Code Playgroud)

2.安装最新版本:

然后下载并安装最新版本:

wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks 
sudo mv -v winetricks /usr/local/bin
Run Code Online (Sandbox Code Playgroud)

正如在我自己的系统上演示的那样,可以测试最新版本:

andrew@ilium~$ winetricks --version
20210206-next - sha256sum: e5457a7a984969443119a4c0c1a01607fc8bf8adca114f265669402b24b960b8
andrew@ilium~$ 
Run Code Online (Sandbox Code Playgroud)

3. 添加一些额外内容并检查更新的语法:

确保您有一些必需的“帮助”应用程序winetricks可以运行也是一个好主意,尽管其中大部分应该已经安装在您的 Wine 副本中:

sudo apt-get install cabextract p7zip unrar unzip wget zenity
Run Code Online (Sandbox Code Playgroud)

然后检查正确的用法,这可能与您的旧版本有所不同:

andrew@ilium~$ winetricks -h
Usage: /usr/local/bin/winetricks [options] [command|verb|path-to-verb] ...
Executes given verbs.  Each verb installs an application or changes a setting.

Options:
    --country=CC      Set country code to CC and don't detect your IP address
-f,  --force           Don't check whether packages were already installed
    --gui             Show gui diagnostics even when driven by commandline
    --isolate         Install each app or game in its own bottle (WINEPREFIX)
    --self-update     Update this application to the last version
    --update-rollback Rollback the last self update
-k, --keep_isos       Cache isos (allows later installation without disc)
    --no-clean        Don't delete temp directories (useful during debugging)
-q, --unattended      Don't ask any questions, just install automatically
-r, --ddrescue        Retry hard when caching scratched discs
-t  --torify          Run downloads under torify, if available
    --verify          Run (automated) GUI tests for verbs, if available
-v, --verbose         Echo all commands as they are executed
-h, --help            Display this message and exit
-V, --version         Display version and exit

Commands:
list                  list categories
list-all              list all categories and their verbs
apps list             list verbs in category 'applications'
benchmarks list       list verbs in category 'benchmarks'
dlls list             list verbs in category 'dlls'
games list            list verbs in category 'games'
settings list         list verbs in category 'settings'
list-cached           list cached-and-ready-to-install verbs
list-download         list verbs which download automatically
list-manual-download  list verbs which download with some help from the user
list-installed        list already-installed verbs
arch=32|64            create wineprefix with 32 or 64 bit, this option must be
                      given before prefix=foobar and will not work in case of
                      the default wineprefix.
prefix=foobar         select WINEPREFIX=/home/andrew/.local/share/wineprefixes/foobar
annihilate            Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX
andrew@ilium~$ 
Run Code Online (Sandbox Code Playgroud)

4. 安全地逆转这些步骤:

如果出于某种原因您希望返回到旧的存储库版本,您可以简单地运行以下命令:

sudo rm /usr/local/bin/winetricks
sudo apt-get install winetricks
Run Code Online (Sandbox Code Playgroud)

一切都将如此。

笔记:

  • WineHQ Wiki: winetricks来自 WineHQ Wiki 的所有最佳 winetricks 信息。
  • 半自动化:现在可以通过运行来部分自动化更新过程sudo winetricks --self-update,如果对结果不满意,请使用: 回滚sudo winetricks --update-rollback

  • 改用`sudo mv -v winetricks /usr/bin`? (4认同)
  • 传统上,用户编译或打包文件的位置是 `/usr/local/bin` 甚至是 `~/bin`,但肯定会使用 `/usr/bin`。 (2认同)
  • @FrankNocke 我不时回来确保它仍然是现代 Ubuntu 的有效答案:) (2认同)

m93*_*93a 7

更新了2019年的答案

Disco 和 Eoan 中提供的 winetricks 版本能够自我更新[1]
如果您碰巧使用 19.04 或更高版本,只需运行:

sudo apt install winetricks
sudo winetricks --self-update
Run Code Online (Sandbox Code Playgroud)

如果您使用的是较旧版本的 Ubuntu,可以在此处获取 .deb 软件包: https:
//packages.ubuntu.com/eoan/all/winetricks/download