Skip to content

Instantly share code, notes, and snippets.

@adejones
Last active February 19, 2023 18:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adejones/36691cf1569bc93f26e88367c2a85243 to your computer and use it in GitHub Desktop.
Save adejones/36691cf1569bc93f26e88367c2a85243 to your computer and use it in GitHub Desktop.
Script for Wine app using mac driver (now default) - open up Apple's Script Editor, edit , save as Application
on run
--edit this to be the correct location and file to run (typically only edit after the "drive_c")
set toRun to "$WINEPREFIX/drive_c/Program Files/MyProgram/MyProgramName.exe"
--edit winePrefix if you are not using the default prefix
set winePrefix to "$HOME/.wine"
--edit wineLocation if your wine install is not the default location
set wineLocation to "/usr/local/bin"
-- With workaround for broken FreeType 2.7 rendering by switching to renderer from FreeType 2.6
-- export FREETYPE_PROPERTIES="truetype:interpreter-version=35"
-- See comment from Lucian Poston here: https://bugs.winehq.org/show_bug.cgi?id=41639
-------------------------------------------------------
--DO NOT EDIT ANYTHING BELOW THIS LINE
-------------------------------------------------------
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 FREETYPE_PROPERTIES=\"truetype:interpreter-version=35\"; export WINEPREFIX=\"" & winePrefix & "\"; cd \"" & toRunPath & "\"; wine \"" & toRunFile & "\" > /dev/null 2>&1 &"
end run
@adejones
Copy link
Author

adejones commented May 18, 2018

Added workaround for broken FreeType 2.7 rendering by switching to renderer from FreeType 2.6
export FREETYPE_PROPERTIES="truetype:interpreter-version=35"
See comment from Lucian Poston here: https://bugs.winehq.org/show_bug.cgi?id=41639#c5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment