question about DiffMerge creating new processes on Mac
Moderator: SourceGear
question about DiffMerge creating new processes on Mac
I'm running DiffMerge 3.3 on a Mac using the diffmerge.sh wrapper script to invoke it. Is there some way to make a new invocation use the existing instance of DiffMerge, instead of creating a new app instance each time? It's a pain to diff 10 files and then have to close 10 instances of DiffMerge, separate windows in 1 instances would be way more convenient.
-
- Posts: 534
- Joined: Tue Jun 05, 2007 11:37 am
- Location: SourceGear
- Contact:
Re: question about DiffMerge creating new processes on Mac
sorry, but no. i don't currently have any code in there to hand the subsequent
files to the first instance.
FWIW, you can use one of the "File | Open..." menu items to open the subsequent
file sets in a new window; these will be kept in the same process.
I'll log a feature request for this.
jeff
item:14334
files to the first instance.
FWIW, you can use one of the "File | Open..." menu items to open the subsequent
file sets in a new window; these will be kept in the same process.
I'll log a feature request for this.
jeff
item:14334
-
- Posts: 3
- Joined: Fri Jun 19, 2009 4:08 pm
Re: question about DiffMerge creating new processes on Mac
It might make more sense to add some basic AppleScript support to DiffMerge, so that you can use some variation on
tell application "DiffMerge"
compare files "file1" and "file2"
end tell
This will DTRT with regards to opening DiffMerge from scratch v.s. activating an existing instance.
= Mike
tell application "DiffMerge"
compare files "file1" and "file2"
end tell
This will DTRT with regards to opening DiffMerge from scratch v.s. activating an existing instance.
= Mike
-
- Posts: 534
- Joined: Tue Jun 05, 2007 11:37 am
- Location: SourceGear
- Contact:
Re: question about DiffMerge creating new processes on Mac
That's an interesting suggestion. I must admit that I'm a bit of an AppleScript novice,
so I'll have to log this and research it. Since DiffMerge runs on Windows, Linux, and
Mac using the same source (wxWidgets rocks), I haven't had much need/opportunity to
dive into a lot of platform-isms, but this is an area that needs work.
In the mean time, can you use the "do shell script" command to launch the
wrapper script that I put on the DMG?
http://developer.apple.com/technotes/tn2002/tn2065.html
I haven't had a chance to try this, but it's worth a try. I put a diffmerge shell
script and a README for installing it in a directory on the DMG.
Hope this helps,
jeff
14498
so I'll have to log this and research it. Since DiffMerge runs on Windows, Linux, and
Mac using the same source (wxWidgets rocks), I haven't had much need/opportunity to
dive into a lot of platform-isms, but this is an area that needs work.
In the mean time, can you use the "do shell script" command to launch the
wrapper script that I put on the DMG?
http://developer.apple.com/technotes/tn2002/tn2065.html
I haven't had a chance to try this, but it's worth a try. I put a diffmerge shell
script and a README for installing it in a directory on the DMG.
Hope this helps,
jeff
14498
-
- Posts: 3
- Joined: Fri Jun 19, 2009 4:08 pm
Re: question about DiffMerge creating new processes on Mac
Jeff,
The OP is already invoking the shell script, which is what gets them multiple instances of the app.
My suggestion re: using AppleScript was just to take advantage of the fact that it will either look up an existing instance of the app, or create a new one, before dispatching the "open this" message to it, and that you can invoke that from a shellscript wrapper like the one you currently ship.
= Mike
The OP is already invoking the shell script, which is what gets them multiple instances of the app.
My suggestion re: using AppleScript was just to take advantage of the fact that it will either look up an existing instance of the app, or create a new one, before dispatching the "open this" message to it, and that you can invoke that from a shellscript wrapper like the one you currently ship.
= Mike
-
- Posts: 534
- Joined: Tue Jun 05, 2007 11:37 am
- Location: SourceGear
- Contact:
Re: question about DiffMerge creating new processes on Mac
Thanks for the update.
Yeah, that sounds like it might just do the trick.
I'll see if I can't make this work.
thanks again,
jeff
Yeah, that sounds like it might just do the trick.
I'll see if I can't make this work.
thanks again,
jeff