Skip to content

Instantly share code, notes, and snippets.

@shmerl

shmerl/wine_run.sh

Last active Oct 26, 2020
Embed
What would you like to do?
Custom Wine running
#!/bin/bash
# Configuration (set through environment variables):
#
# WINEPREFIX what prefix to use.
# WINEPATH to use custom location of Wine (e.g. /opt/wine-master).
# WINEARCH to set architecture (win64/win32).
#
# Notes:
#
# WINEPREFIX this one you most probably need, otherwise, it will fall back to
# default prefix at $HOME/.wine
#
# WINEPATH should be set if you need custom Wine, otherwise it will fall back to
# default (implict) Wine, which is a common usage. This is not a Wine env variable,
# but simply custom variable used in the script to set a location if needed.
#
# WINEARCH is normally needed to be set only once, when creating a new prefix.
#
# Uses wine_env.sh which sets the environment
#
source $(dirname ${BASH_SOURCE[0]})/wine_env.sh
echo "Wine environment"
printf "Wine prefix : "
if [[ "${WINEPREFIX+iset}" ]]; then
echo "$WINEPREFIX"
else
echo "default(!)"
fi
echo "Wine arch : ${wine_arch}"
printf "Wine location: "
if [[ "${WINEPATH+iset}" ]]; then
echo "$WINEPATH"
else
echo "default"
fi
echo "Wine binary : ${wine_bin}"
echo "==========================================="
$wine_bin "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment