-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DiffMerge requires wrapper script #11056
Comments
We don’t yet have a solution, but we’re discussing it. You’re welcome to join in. |
@vitorgalvao A SourceGear representative pointed me to a script that is included with the dmg file. But for that to work properly I would need to replace strings inside the script file to point to the files homebrew cask installs. I can't seem to find a documented way of doing this, neither in documentation or other cask formulae. Is homebrew's "inreplace" supported? |
Not sure. Pinging @phinze @ndr-qef. |
The Docs (which seem to be only applicable to sudo cp Extras/diffmerge.sh /usr/bin/diffmerge
sudo chmod 755 /usr/bin/diffmerge
sudo cp Extras/diffmerge.1 /usr/share/man/man1/diffmerge.1
sudo chmod 644 /usr/share/man/man1/diffmerge.1 Reference: https://sourcegear.com/diffmerge/webhelp/sec__inst__mac.html I have been inspecting the installer package ( #!/bin/sh
## A little script to make it easier to launch DiffMerge from the command line.
## Install this script into a folder in your path, such as /usr/bin or /usr/local/bin.
##
## Version 4.2.0.697
## Copyright (C) 2003-2013 SourceGear LLC. All Rights Reserved.
##############################################################################
## Change DIFFMERGE_PATH to point to where you installed DiffMerge
DIFFMERGE_PATH=/Applications/DiffMerge.app
## The actual executable is hidden inside the .app bundle.
DIFFMERGE_EXE=${DIFFMERGE_PATH}/Contents/MacOS/DiffMerge
## Launch DiffMerge using the given command line arguments. Use --help for
## additional information or see the man page distributed along with this
## shell script.
exec ${DIFFMERGE_EXE} --nosplash "$@" Thus it looks like the manual steps that are required for the DMG installation, are performed by the PKG install. |
Note this is marked as an enhancement request. This is a BUG. Having a program not crash should not be an enhancement request. |
As a workaround for command line installations, I am recommending users at my work use until this is fixed: curl -O http://download-us.sourcegear.com/DiffMerge/4.2.0/DiffMerge.4.2.0.697.intel.stable.pkg
sudo installer -pkg ~/Downloads/DiffMerge.4.2.0.697.intel.stable.pkg -target / |
Seems the obvious solution would be to just use the |
Yep, I agree. |
As I have reported at SourceGear forums DiffMerge requires a wrapper script to work from command line.
My reply at SourceGear forum
The error
/build/sgdm400/Apple/intel/Release_patched/wxWidgets-3.0.0-rc1/src/common/arrstr.cpp(368): assert "nIndex < m_nCount" failed in RemoveAt(): bad index in wxArrayString::Remove
is due to calling the program from the command line without a path, like having it in $PATH$ /usr/local/bin/diffmerge
<--- works, no error$ /opt/homebrew-cask/Caskroom/diffmerge/4.2.0.697/DiffMerge.app/Contents/MacOS/DiffMerge
<--- works, no error$ diffmerge
<--- works, but gives errorSo either use absolute path when calling the program or use a small wrapper script. Save this as
/usr/local/bin/diffmerge
and make it executable withchmod +x /usr/local/bin/diffmerge
End reply
So I wanted to try and submit my workaround to the cask formula, but I can't figure out the best and recommended way to approach it. What I want to accomplish is making the formula create the small wrapper script above instead of
binary 'DiffMerge.app/Contents/MacOS/DiffMerge', :target => 'diffmerge'
which is currently does now.The text was updated successfully, but these errors were encountered: