Last active
June 12, 2024 17:27
-
-
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
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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