Has anyone figured out any trickery to use Beyond Compare via the external tools menu? I can load a single file just fine but can't figure out a way to tell it to load a second file to compare the first one to.
Thanks,
Will
Using Beyond Compare via the external tools menu
Moderator: kfury77
Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
Please try to follow these guidelines. This will help to receive faster and more accurate response.
- Check the Support section of the corresponding product first. Chances are you will find your answer there;
- Do not create new topics for already reported problems. Add your comments to the existing topics instead;
- Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
- Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
- Include the version number of the software you are using;
- This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
- Karlis
- Site Admin
- Posts: 3605
- Joined: Mon Jul 15, 2002 5:24 pm
- Location: Riga, Latvia, Europe
- Contact:
Re: Using Beyond Compare via the external tools menu
Do you have the specification of how the command line should be formatted to compare two files? This is an open question. I would like to implement an integgration not only with Beyond Compare but with comparison tools in general and the question is - how this can be done. Is it simply compare.exe %firstfile %secondfile ? Can you find out this for me, please? Thanks.
Re: Using Beyond Compare via the external tools menu
This page gives information on various version control systems let themselves be configured to launch an external compare utility (Beyond Compare in this case). For the most part, they just let you plug in a command line with some replaceable parameters that represent the files to compare. A few also give you the capability of passing a title for each file to put in the titlebar. This is handy for version control, as they often have to pull down a file revision to a temp file to do the compare - being able to specify a title lets the diff utility display something more useful than a randomly generated filename (I'm guessing WeBuilder wouldn't really need something like that).
I'd propose having something as simple as $1 and $2 to specify the files to compare, but something like %1/%2 or $(file1)/$(file2) would work just as well.
So the commandline that would be configured in WeBuilder might look something like:
"c:\program files\beyond compare\BComp.exe" "$1" "$2"
Some compare utilities might need more on the command line, but generally the only things that would vary from launch to launch would be the file names. So some other program might have a config that looks like:
"c:\util\superdiff.exe" /right "$2" /left "$1"
The one key bit that you'd need to document is whether WeBuilder would put quotes around the file name or not, so the configuration would be able to take it into account.
I don't think it needs to be anything more complex than that (I don't think there's a need for WeBuilder to launch a merge operation), but maybe someone else has a different opinion.
I'd propose having something as simple as $1 and $2 to specify the files to compare, but something like %1/%2 or $(file1)/$(file2) would work just as well.
So the commandline that would be configured in WeBuilder might look something like:
"c:\program files\beyond compare\BComp.exe" "$1" "$2"
Some compare utilities might need more on the command line, but generally the only things that would vary from launch to launch would be the file names. So some other program might have a config that looks like:
"c:\util\superdiff.exe" /right "$2" /left "$1"
The one key bit that you'd need to document is whether WeBuilder would put quotes around the file name or not, so the configuration would be able to take it into account.
I don't think it needs to be anything more complex than that (I don't think there's a need for WeBuilder to launch a merge operation), but maybe someone else has a different opinion.
- Karlis
- Site Admin
- Posts: 3605
- Joined: Mon Jul 15, 2002 5:24 pm
- Location: Riga, Latvia, Europe
- Contact:
Re: Using Beyond Compare via the external tools menu
I see, so it is not as easy as simply having user to choose his or her favorite diff tool and go. The command line needs to be set. Still, your solution seems to be the most reasonable of what we can use.
Re: Using Beyond Compare via the external tools menu
My post was from a 'completeist' point of view. Being able to specify parameters adds flexibility, but I think that just being able to specify an executable would work well enough. I'd guess that most comparison programs will work well enough with just the 2 files to compare on the command line.
For those that don't, the user can use a batch file or some other wrapper to add whatever other gunk is needed.
For those that don't, the user can use a batch file or some other wrapper to add whatever other gunk is needed.
- syrupcore
- Top Contributor
- Posts: 917
- Joined: Thu Jul 21, 2005 12:58 am
- Location: Portland, Oregon, usa
- Contact:
Re: Using Beyond Compare via the external tools menu
if you set the explorer to use the regular system context menu, you can select any file and select "left side of compare". when you click another, the context menu offers "compare to X" where X is the first file you selected. this works well enough for me.
seems as though the problem is that webuilder's tools menu is focused on doing something with the current file - there's no interface to do something with two files. I'm going to investigate beyond compare's command line options and see if there are two command lines options I might use as two "tools". The first tool would set the left file and the second tool would set the right file and open BC. If it works out, I'll report back.
seems as though the problem is that webuilder's tools menu is focused on doing something with the current file - there's no interface to do something with two files. I'm going to investigate beyond compare's command line options and see if there are two command lines options I might use as two "tools". The first tool would set the left file and the second tool would set the right file and open BC. If it works out, I'll report back.