Skip to content

Instantly share code, notes, and snippets.

@RJNY
Created February 8, 2018 21:41
Show Gist options
  • Save RJNY/230f199a3255d7305d6f02eb85b449ec to your computer and use it in GitHub Desktop.
Save RJNY/230f199a3255d7305d6f02eb85b449ec to your computer and use it in GitHub Desktop.
on run
set toRun to "$WINEPREFIX/drive_c/Program Files (x86)/PlayOnline/SquareEnix/FINAL FANTASY XI/polboot.exe"
set winePrefix to "$HOME/.wine"
set wineLocation to "/usr/local/bin"
set dyldFallbackLibraryPath to "/opt/X11/lib"
set toRunPath to do shell script "WINEPREFIX=\"" & winePrefix & "\"; TEMPVAR=\"" & toRun & "\"; echo \"${TEMPVAR%/*}\""
set toRunFile to do shell script "WINEPREFIX=\"" & winePrefix & "\"; TEMPVAR=\"" & toRun & "\"; TEMPVAR2=\"" & toRunPath & "\"; echo \"${TEMPVAR#$TEMPVAR2/}\""
do shell script "PATH=\"" & wineLocation & ":$PATH\"; export WINEPREFIX=\"" & winePrefix & "\"; export DYLD_FALLBACK_LIBRARY_PATH=\"" & dyldFallbackLibraryPath & "\"; cd \"" & toRunPath & "\"; wine \"" & toRunFile & "\" > /dev/null 2>&1 &"
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment