Export to GitHub

winetricks - Variables.wiki


Environment Variables Read by Winetricks

On startup, Winetricks checks the value of several environment variables:

  • WINE - which wine binary to use (default: wine)
  • WINEPREFIX - path to default wineprefix (default: $HOME/.wine)
  • XDG_CACHE_HOME - path to system's user data cache (default: $HOME/.cache)
  • W_CACHE - path to Winetrick's user data cache (default: $XDG_CACHE_HOME/winetricks}
  • LANG - used when outputting localized messages.

(Todo: complete this list)

Predefined Variables

Verbs can rely on the following variables being set before they are executed:

  • WINE - use this if you need to run wine
  • WINEPREFIX - set to current wineprefix (not always the default one)
  • W_APPDATA_UNIX - Unix path to user's Application Data folder
  • W_APPDATA_WIN - Windows path to user's Application Data folder
  • W_CACHE - a Unix path to the directory where downloaded files are cached.
  • W_CACHE_WIN - a Windows path version of W_CACHE
  • W_DRIVE_C - a Unix path to the C:\ directory
  • W_ISO_MOUNT_ROOT - the Unix path to where the install disc is mounted
  • W_ISO_MOUNT_LETTER - the drive letter the install disc is mounted on
  • W_KEY - the key for this package (set by w_read_key)
  • W_OPT_UNATTENDED - if 1, install app without asking any questions
  • W_PACKAGE - the code for the currently executing recipe. e.g. this is set to bioshock_demo before calling load_bioshock_demo.
  • W_PROGRAMS_DRIVE - drive letter the standard Program Files directory is on
  • W_PROGRAMS_UNIX - Unix path to standard Programs Files directory
  • W_PROGRAMS_WIN - Windows path to standard Programs Files directory
  • W_PROGRAMS_X86_UNIX - Unix path to standard 32 bit Programs Files directory
  • W_PROGRAMS_X86_WIN - Windows path to standard 32 bit Programs Files directory
  • W_TMP - a Unix path to a directory which exists and is empty when the function starts, and is deleted when the function exits. This is where to unpack .zip files, etc.
  • W_TMP_WIN - same as W_TMP, but as a Windows path

(TODO: correct and complete this list)