Skip to content

Instantly share code, notes, and snippets.

@appleneko2001
Created June 10, 2023 08:19
Show Gist options
  • Select an option

  • Save appleneko2001/1c91e10f73d897873c132d7ba87515d0 to your computer and use it in GitHub Desktop.

Select an option

Save appleneko2001/1c91e10f73d897873c132d7ba87515d0 to your computer and use it in GitHub Desktop.
Used for double clicking .exe file
#!/usr/bin/env xdg-open
[Desktop Entry]
Categories=System
Exec=wine_loader.sh %f
Icon=wine
Name=Wine Windows Application Loader
Terminal=false
Type=Application
#!/bin/bash
__EXEC_DIR="$( cd "$( dirname "$1" )" && pwd )"
if [[ $1 == "/"* ]] ;
then
__EXEC_ENV="$1.env"
else
__EXEC_ENV="$( cd "$( dirname "$1" )" && pwd )/$1.env"
fi
# DIR="$( cd "$( dirname "$i" )" && pwd )"
if [ -f "$__EXEC_ENV" ]
then
echo Loading $__EXEC_ENV
export $(cat "$__EXEC_ENV" | xargs)
fi
/usr/bin/wine "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment