[Wine] Re: Applescript and .exe?
CaptainKarrow
wineforum-user at winehq.org
Sat Jan 1 06:11:27 CST 2011
CaptainKarrow wrote:
> Hi there!
>
> I've used Wine a couple of years ago when I used Ubuntu as OS. Nowadays I have a Mac and recently installed Wine on it. When it comes to codes in Applescript I'm a newbie.
>
> My question is, how do I fix so that I don't have to use the terminal to start an .exe program? Just enter a script in Applescript, save it as an application and start it through that?
>
> I've googled and found some scripts but none of them works for me. I've tried these (with a modification to suit my .exe location and .wine location):
>
>
> Code:
> --edit this to be the correct location and file to run (typically only edit after the "drive_c")
> set toRun to "~/desktop/bullion/bulliator.exe"
> --edit winePrefix if you are not using the default prefix
> set winePrefix to "~/.wine"
> --edit wineLocation if your wine install is not the default location
> set wineLocation to "/opt/local/bin"
> --edit dyldFallbackLibraryPath if your using X11.app that is not the default Apple one
> set dyldFallbackLibraryPath to "/usr/X11/lib"
> -------------------------------------------------------
> --DO NOT EDIT ANYTHING BELOW THIS LINE
> -------------------------------------------------------
> set toRunPath to do shell script "TEMPVAR=\"" & toRun & "\"; echo \"${TEMPVAR%/*}\""
> set toRunFile to do shell script "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
>
>
> Clicking this "app" doesn't do anything.
>
>
> Code:
> do shell script "/Applications/Wine.app/Contents/MacOS/startwine /Users/myuser/Programs/ASP32/Asp32.exe"
>
>
> Clicking this "app" starts X11 and then a small popup window with a yellow warning sign (with a "!") comes up. No text, just the warning sign.
>
>
> Code:
> tell application "Terminal"
> do script "/opt/local/bin/wine ~/.wine/drive_c/Program\\ Files/$PATH_TO_PROGRAM.exe"
> end tell
>
>
> Clicking this "app" starts X11 and then a small popup window with a yellow warning sign (with a "!") comes up. No text, just the warning sign.
More information about the wine-users
mailing list