Created
December 4, 2011 12:20
-
-
Save OneOfOne/1430063 to your computer and use it in GitHub Desktop.
Arch32D's wine launcher script.
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 | |
IFS=$(echo -en "\n\b") | |
if [ -e /opt/arch32 ]; then | |
CDIR="$(pwd)" arch32 $0 ${@}; exit | |
else | |
if [ -d "$CDIR" ]; then | |
cd "$CDIR" | |
fi | |
unset CDIR | |
if [ "$1" = "kill" ]; then | |
wineserver -k | |
elif [ "$1" = "t" ]; then | |
shift | |
winetricks $@ | |
elif [ "$1" = "cfg" ]; then | |
wine winecfg | |
elif [ "$1" = "make" ]; then | |
shift; N="${1}"; P="$(pwd)/${N}" | |
if [ -d "${P}" ]; then | |
echo "${P} exists; exiting." | |
exit 1; | |
fi | |
mkdir "${P}" | |
echo "#!/bin/sh" > "${N}.sh" | |
echo 'IFS=$(echo -en "\n\b")' >> "${N}.sh" | |
echo 'WINEPREFIX="'$P'" wnew ${@}' >> "${N}.sh" | |
chmod +x "${N}.sh" | |
WINEPREFIX="${P}" wnew t -q sandbox nocrashdialog fontsmooth=rgb d3dx9 | |
ln -s /mnt/cdrom "${P}/dosdevices/d:" | |
else | |
T="$(echo $1-$(date "+%Y-%m-%d-%T") | perl -pe 's/[^\w-]/_/g')" | |
echo SOCKS=$SOCKS WINEPREFIX="$WINEPREFIX" wine explorer /desktop=$T,1920x1080 ${@} | |
if [ -z "$SOCKS" ]; then | |
wine explorer /desktop=$T,1920x1080 ${@} | |
else | |
tsocks wine explorer /desktop=$T,1920x1080 ${@} | |
fi | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment