Skip to content

Instantly share code, notes, and snippets.

@ramirez7
Last active November 3, 2022 19:27
Show Gist options
  • Save ramirez7/9fc5bc79ef7962b431c6601598b9130b to your computer and use it in GitHub Desktop.
Save ramirez7/9fc5bc79ef7962b431c6601598b9130b to your computer and use it in GitHub Desktop.
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils -p wineWowPackages.stable
set -e
if [[ -z "$1" ]]; then
echo "USAGE: ./nix-wine-run.sh PATH_TO_EXE"
exit 1
fi
# We don't need Gecko or Mono:
export WINEDLLOVERRIDES='mscoree=d;mshtml=d'
# Create a temporary WINEPREFIX for isolation:
export WINEPREFIX=$(mktemp -d)
trap "rm -rf $WINEPREFIX" EXIT
WINEDEBUG='-all' wine64 "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment