Skip to content

Latest commit

 

History

History
217 lines (171 loc) · 8.37 KB

README.md

File metadata and controls

217 lines (171 loc) · 8.37 KB

Winetricks

Build Status License

Homepage of Winetricks, previously hosted at https://code.google.com/p/winetricks.

Winetricks is an easy way to work around problems in Wine.

It has a menu of supported games/apps for which it can do all the workarounds automatically. It also allows the installation of missing DLLs and tweaking of various Wine settings.

The latest version can be downloaded here: https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks

Tagged releases are accessible here: https://github.com/Winetricks/winetricks/releases

Installing

The winetricks package should be used if it is available and up to date. The package is available in most mainstream (Unix-like) Operating Systems:

Note: packaged Debian / Ubuntu winetricks versions are typically outdated, so a manual installation is recommended.

If the package is unavailable, outdated, or the latest version is desired, a manual installation of winetricks can be done. It is highly recommended to uninstall any previously installed version of winetricks first.

If you don't uninstall a previously installed, packaged version of winetricks... Well then you get to pick up the pieces!

E.g. for Debian / Ubuntu:

sudo apt-get purge winetricks

Then, for Ubuntu, use a shell script to download the current winetricks script(s). E.g.:

# Create and switch to a temporary directory writeable by current user. See:
#   https://www.tldp.org/LDP/abs/html/subshells.html
cd "$(mktemp -d)"

# Use a BASH "here document" to create an updater shell script file.
# See:
#   https://www.tldp.org/LDP/abs/html/here-docs.html
# >  outputs stdout to a file, overwriting any pre-existing file
# << takes input, directly from the script itself, till the second '_EOF_SCRIPT' marker, as stdin
# the cat command hooks these 2 streams up (stdin and stdout)
###### create update_winetricks START ########
cat > update_winetricks <<_EOF_SCRIPT
#!/bin/sh

# Create and switch to a temporary directory writeable by current user. See:
#   https://www.tldp.org/LDP/abs/html/subshells.html
cd "$(mktemp -d)"

# Download the latest winetricks script (master="latest version") from Github.
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks

# Mark the winetricks script (we've just downloaded) as executable. See:
#   https://www.tldp.org/LDP/GNU-Linux-Tools-Summary/html/x9543.htm
chmod +x winetricks

# Move the winetricks script to a location which will be in the standard user PATH. See:
#   https://www.tldp.org/LDP/abs/html/internalvariables.html
sudo mv winetricks /usr/bin

# Download the latest winetricks BASH completion script (master="latest version") from Github.
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks.bash-completion

# Move the winetricks BASH completion script to a standard location for BASH completion modules. See:
#   https://www.tldp.org/LDP/abs/html/tabexpansion.html
sudo mv winetricks.bash-completion /usr/share/bash-completion/completions/winetricks
_EOF_SCRIPT 
###### create update_winetricks FINISH ########

# Mark the update_winetricks script (we've just written out) as executable. See:
#   https://www.tldp.org/LDP/GNU-Linux-Tools-Summary/html/x9543.htm
chmod +x update_winetricks

# We must escalate privileges to root, as regular Linux users do not have write access to '/usr/bin'.
sudo mv update_winetricks /usr/bin/

See the manpages for the individual functions, if you are not clear how they are being used, e.g.

man mktemp
man mv
man wget
man sudo
...

An alternative updater script implementation, using su in place of sudo, is also possible: