为wine / heidisql

时间:2018-09-19 07:56:57

标签: macos wine heidisql

好吧,mac脚本对我来说是全新的,我也不知道如何调试它。

我已经从pkg中安装了酒(而不是从brew等设备中安装),并在heidisql中安装了酒。

按照说明,我在mac脚本编辑器中创建了该文件,并将其另存为“应用程序”,然后将其复制到“应用程序”文件夹中。

注意:我可以通过在启动器中运行“稳定葡萄酒”来运行heidisql,然后输入

wine "$HOME/.wine/drive_c/Program Files/HeidiSQL/heidisql.exe"

无效的脚本:

on run

    --edit this to be the correct location and file to run (typically only edit after the "drive_c")
    set toRun to "$HOME/.wine/drive_c/Program Files/HeidiSQL/heidisql.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"

    --edit dyldFallbackLibraryPath to your X11 lib folder, this one is set for XQuartz on 10.6+
    set dyldFallbackLibraryPath to "/opt/X11/lib"
    -------------------------------------------------------
    --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 WINEPREFIX=\"" & winePrefix & "\"; export DYLD_FALLBACK_LIBRARY_PATH=\"" & dyldFallbackLibraryPath & "\"; cd \"" & toRunPath & "\"; wine \"" & toRunFile & "\" > /dev/null 2>&1 &"

end run

但是,当我通过双击应用程序文件夹中的应用程序脚本来运行该脚本时,它会在任务栏中闪烁脚本图标,然后什么也不做。知道发生了什么问题或如何调试吗?

1 个答案:

答案 0 :(得分:0)

最终解决方案。做了“哪种酒”来找出安装程序的位置,并在脚本中替换了/ usr / bin / local。

on run

    --edit this to be the correct location and file to run (typically only edit after the "drive_c")
    set toRun to "$HOME/.wine/drive_c/Program Files/HeidiSQL/heidisql.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"
    set wineLocation to "/Applications/Wine Stable.app/Contents/Resources/wine/bin/"

    --edit dyldFallbackLibraryPath to your X11 lib folder, this one is set for XQuartz on 10.6+
    set dyldFallbackLibraryPath to "/opt/X11/lib"
    -------------------------------------------------------
    --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 WINEPREFIX=\"" & winePrefix & "\"; export DYLD_FALLBACK_LIBRARY_PATH=\"" & dyldFallbackLibraryPath & "\"; cd \"" & toRunPath & "\"; wine \"" & toRunFile & "\" > /dev/null 2>&1 &"

end run