Search Unity

Help - Diff tools forced via Plastic fail to launch on MacOS [Solved]

Discussion in 'Unity Version Control' started by spryx, Feb 6, 2022.

  1. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    Has anyone managed to get any external (or internal for that matter) diff tools to work in Unity on MacOS?
    I've tried everything, even the client cloud edition and manual configuration. The default diff works ONLY in the plastic application:

    upload_2022-2-6_9-6-33.png

    In Unity.. I always get this:
    upload_2022-2-6_9-7-49.png
     
  2. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    Bump
     
  3. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @spryx, I'm sorry for the delayed response! In a Mac Terminal window, could you try running

    cat /usr/local/bin/macmergetool

    and see if it returns something like this?

    "/Applications/PlasticSCM.app/Contents/Applications/macmergetool.app/Contents/MacOS/macmergetool" "$@"

    If it does, then your merge tool's environment path should be configured correctly. If not, then you may need to try running the Plastic SCM configure tool to reconfigure the path for the merge tool.
     
  4. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    This is currently the one set. It does work via Plastic, just not in Unity.

    Last login: Mon Feb 14 18:01:11 on console
    djflan@Dans-MacBook-Pro ~ % cat /usr/local/bin/macmergetool
    #!/bin/sh
    exec "/Applications/PlasticSCM.app/Contents/Applications/macmergetool.app/Contents/MacOS/macmergetool" "$@"
    djflan@Dans-MacBook-Pro ~ %
     
  5. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    460
    Hey @spryx,

    I have seen this before for one other customer, not sure how this issue manifests itself, but I do know how to remedy it. The error message in your screenshot is referencing the Windows version of the merge tool "mergetool" when it should be using the Mac version "macmergetool".

    To resolve this, please can you open your ~/plastic4/client.conf file and identify all references to "mergetool" and change them to "/usr/local/bin/macmergetool"

    Please see below a snippet from my working client.conf file for reference.

    Code (CSharp):
    1. ...
    2.   <MergeTools>
    3.     <MergeToolData>
    4.       <FileType>enTextFile</FileType>
    5.       <FileExtensions>*</FileExtensions>
    6.       <Tools>
    7.         <string>/usr/local/bin/macmergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -sh="@sourcehash" -d="@destinationfile" -dn="@destinationsymbolic" -dh="@destinationhash" -a -r="@output" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -m="@mergetype" -re="@resultencoding" --progress="@progress" --extrainfofile="@extrainfofile"</string>
    8.       </Tools>
    9.     </MergeToolData>
    10.   </MergeTools>
    11.   <DiffTools>
    12.     <DiffToolData>
    13.       <FileType>enTextFile</FileType>
    14.       <FileExtensions>*</FileExtensions>
    15.       <Tools>
    16.         <string>/usr/local/bin/macmergetool -s="@sourcefile" -sn="@sourcesymbolic" -d="@destinationfile" -dn="@destinationsymbolic" -t="@filetype" -i="@comparationmethod" -e="@fileencoding"</string>
    17.       </Tools>
    18.     </DiffToolData>
    19.   </DiffTools>
    20. ...
    Hope this helps!
     
    Last edited: Feb 17, 2022
    ZO5KmUG6R, spryx and Ryan-Unity like this.
  6. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    That fixed the issue. Thank you!
     
  7. onio

    onio

    Joined:
    May 9, 2020
    Posts:
    1
    Alternate fix for this is to create a symbolic link for macmergetool:

    Type in Terminal:
    cd /usr/local/bin/
    ln -s macmergetool mergetool