Last active
November 3, 2023 05:15
Star
You must be signed in to star a gist
Environment setting for custom Wine usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Helper script for wine_run.sh / winetricks_run.sh | |
# Sets environment. See wine_run.sh for details on | |
# configurable variables usage. | |
# $wine variable is a shortcut, setting /opt/$wine for $wine_path | |
# But explicitly set $wine_path takes priority. | |
if [[ "${wine+isset}" ]] && ! [[ "${wine_path+isset}" ]]; then | |
wine_path="/opt/${wine}" | |
fi | |
if [[ "${wine_path+isset}" ]]; then | |
export PATH=${wine_path}/bin:$PATH | |
if [[ -e "${wine_path}/lib64/wine/x86_64-unix" ]]; then | |
export LD_LIBRARY_PATH="${wine_path}/lib64/wine/x86_64-unix:${LD_LIBRARY_PATH}" | |
fi | |
if [[ -e "${wine_path}/lib/wine/x86_64-unix" ]]; then | |
export LD_LIBRARY_PATH="${wine_path}/lib/wine/x86_64-unix:${LD_LIBRARY_PATH}" | |
fi | |
if [[ -e "${wine_path}/lib/wine/i386-unix" ]]; then | |
export LD_LIBRARY_PATH="${wine_path}/lib/wine/i386-unix:${LD_LIBRARY_PATH}" | |
fi | |
fi | |
# Since 64-bit prefixes are now universal, by default using wine64 binary. | |
# Once Wine will unify everything in a 64-bit wine binary, this can be changed. | |
# If you want to force wine binary instead of wine64, use $wine_bin variable. | |
export wine_bin=${wine_bin:-"wine64"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment