diff --git a/games/sse-nxmhandler-wrapper.sh b/games/sse-nxmhandler-wrapper.sh new file mode 100644 index 0000000..2556099 --- /dev/null +++ b/games/sse-nxmhandler-wrapper.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env zsh + +# WARNING!! This file is not well written. It probably only works on my setup, +# with Lutris thinking it's running Skyrim from GOG, but really running MO2 + +local conf_file="${HOME}/.config/lutris/games/the_elder_scrolls_v_skyrim_special_edition-1703312623.yml" + +local wine_ver="$(cat "${conf_file}" | yq -r ".wine.version")" + +local wine_bin +if [[ -d "${HOME}/.local/share/Steam/compatibilitytools.d/${wine_ver}" ]]; then + wine_bin="${HOME}/.local/share/Steam/compatibilitytools.d/${wine_ver}/files/bin" +elif [[ -d "${HOME}/.local/share/lutris/runners/wine/${wine_ver}" ]]; then + wine_bin="${HOME}/.local/share/lutris/runners/wine/${wine_ver}/bin" +fi + +local wine="${wine_bin}/wine" +local wineserver="${wine_bin}/wineserver" + +let server_pid="$(pgrep -xf "${wineserver}" | head -n1)" + +local server_env_arr=(${(0)"$(