Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. on run
  2.  
  3. --edit this to be the correct location and file to run (typically only edit after the "drive_c")
  4. set toRun to "$WINEPREFIX/drive_c/Program Files/MyProgram/MyProgramName.exe"
  5.  
  6. --edit winePrefix if you are not using the default prefix
  7. set winePrefix to "$HOME/.wine"
  8.  
  9. --edit wineLocation if your wine install is not the default location
  10. set wineLocation to "/usr/local/bin"
  11.  
  12. -------------------------------------------------------
  13. --DO NOT EDIT ANYTHING BELOW THIS LINE
  14. -------------------------------------------------------
  15. set toRunPath to do shell script "WINEPREFIX=\"" & winePrefix & "\"; TEMPVAR=\"" & toRun & "\"; echo \"${TEMPVAR%/*}\""
  16. set toRunFile to do shell script "WINEPREFIX=\"" & winePrefix & "\"; TEMPVAR=\"" & toRun & "\"; TEMPVAR2=\"" & toRunPath & "\"; echo \"${TEMPVAR#$TEMPVAR2/}\""
  17. do shell script "PATH=\"" & wineLocation & ":$PATH\"; export WINEPREFIX=\"" & winePrefix & "\"; cd \"" & toRunPath & "\"; wine \"" & toRunFile & "\" > /dev/null 2>&1 &"
  18.  
  19. end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement