Skip to content

Commit 5150c70

Browse files
authored
Add bin extension support (#650)
1 parent 9d2dc60 commit 5150c70

14 files changed

Lines changed: 48 additions & 22 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
* text
22
*.snk binary
3+
*.bin binary
34
*.png binary
45

56
src/Verify/EmptyFiles/* binary

docs/diff-tool.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
147147
* Supports text files: True
148148
* Use shell execute: True
149149
* Environment variable for custom install location: `DiffEngine_BeyondCompare`
150-
* Supported binaries: .7z, .bcpkg, .bmp, .bz, .bz2, .cab, .chm, .deb, .ear, .gif, .gz, .ico, .img, .iso, .iso, .jar, .jpeg, .jpg, .kmz, .nupkg, .pdf, .png, .rar, .rpm, .rtf, .svg, .swm, .tar, .tbz, .tbz2, .tbz2, .tgz, .tif, .tiff, .war, .wim, .xlsx, .xz, .zip, .zipx
150+
* Supported binaries: .7z, .bcpkg, .bin, .bmp, .bz, .bz2, .cab, .chm, .deb, .ear, .gif, .gz, .ico, .img, .iso, .iso, .jar, .jpeg, .jpg, .kmz, .nupkg, .pdf, .png, .rar, .rpm, .rtf, .svg, .swm, .tar, .tbz, .tbz2, .tbz2, .tgz, .tif, .tiff, .war, .wim, .xlsx, .xz, .zip, .zipx
151151

152152
#### Notes:
153153

154154
* [Command line reference](https://www.scootersoftware.com/v4help/index.html?command_line_reference.html)
155155
* Enable [Automatically reload unless changes will be discarded](https://www.scootersoftware.com/v4help/optionstweak.html) in `Tools > Options > Tweaks > File Operations`.
156-
* For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip.
156+
* For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip.
157157
`Tools > Options > Archive Types`. Scroll down to Zip, then add extra extension to the semicolon delimited list.
158158

159159
#### Windows settings:
@@ -279,7 +279,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
279279
* Supports text files: True
280280
* Use shell execute: True
281281
* Environment variable for custom install location: `DiffEngine_ExamDiff`
282-
* Supported binaries: .svg
282+
* Supported binaries: .bin, .svg
283283

284284
#### Notes:
285285

@@ -358,7 +358,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
358358
* Supports text files: True
359359
* Use shell execute: True
360360
* Environment variable for custom install location: `DiffEngine_Kaleidoscope`
361-
* Supported binaries: .bmp, .gif, .ico, .jpeg, .jpg, .png, .svg, .tif, .tiff
361+
* Supported binaries: .bin, .bmp, .gif, .ico, .jpeg, .jpg, .png, .svg, .tif, .tiff
362362

363363
#### OSX settings:
364364

@@ -445,6 +445,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
445445
-d "tempFile.txt" "targetFile.txt"
446446
```
447447
* Scanned paths:
448+
* `C:\Program Files\Neovim\binnvim.exe`
448449
* `%PATH%nvim.exe`
449450

450451
#### OSX settings:
@@ -668,7 +669,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
668669
* Supports text files: True
669670
* Use shell execute: True
670671
* Environment variable for custom install location: `DiffEngine_TortoiseGitMerge`
671-
* Supported binaries: .svg
672+
* Supported binaries: .bin, .svg
672673

673674
#### Windows settings:
674675

@@ -794,7 +795,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
794795
* Supports text files: True
795796
* Use shell execute: True
796797
* Environment variable for custom install location: `DiffEngine_WinMerge`
797-
* Supported binaries: .bmp, .bw, .cut, .dds, .exr, .g3, .gif, .hdp, .hdr, .ico, .iff, .j2c, .j2k, .jif, .jng, .jp2, .jpe, .jpeg, .jpg, .jxr, .koa, .lbm, .mng, .pbm, .pcd, .pct, .pcx, .pfm, .pgm, .pic, .pict, .png, .ppm, .psd, .ras, .rgb, .rgba, .sgi, .svg, .targa, .tga, .tif, .tiff, .wap, .wbm, .wbmp, .wdp, .webp, .xbm, .xpm
798+
* Supported binaries: .bin, .bmp, .bw, .cut, .dds, .exr, .g3, .gif, .hdp, .hdr, .ico, .iff, .j2c, .j2k, .jif, .jng, .jp2, .jpe, .jpeg, .jpg, .jxr, .koa, .lbm, .mng, .pbm, .pcd, .pct, .pcx, .pfm, .pgm, .pic, .pict, .png, .ppm, .psd, .ras, .rgb, .rgba, .sgi, .svg, .targa, .tga, .tif, .tiff, .wap, .wbm, .wbmp, .wdp, .webp, .xbm, .xpm
798799

799800
#### Notes:
800801

@@ -1030,7 +1031,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
10301031
* Supports text files: True
10311032
* Use shell execute: False
10321033
* Environment variable for custom install location: `DiffEngine_VisualStudioCode`
1033-
* Supported binaries: .svg
1034+
* Supported binaries: .bin, .svg
10341035

10351036
#### Notes:
10361037

docs/diff-tool.order.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ For example `VisualStudio,Meld` will result in VisualStudio then Meld then all o
5151
```cs
5252
DiffTools.UseOrder(DiffTool.VisualStudio, DiffTool.AraxisMerge);
5353
```
54-
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L183-L187' title='Snippet source file'>snippet source</a> | <a href='#snippet-UseOrder' title='Start of snippet'>anchor</a></sup>
54+
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L188-L192' title='Snippet source file'>snippet source</a> | <a href='#snippet-UseOrder' title='Start of snippet'>anchor</a></sup>
5555
<!-- endSnippet -->

src/DiffEngine.Tests/DiffToolsTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ static async Task AddToolAndLaunch()
117117
}
118118
/**
119119
120+
[Fact]
121+
public Task LaunchSpecificBinaryDiff() =>
122+
DiffRunner.LaunchAsync(DiffTool.VisualStudioCode,
123+
Path.Combine(SourceDirectory, "input.temp.bin"),
124+
Path.Combine(SourceDirectory, "input.target.bin"));
120125
[Fact]
121126
public Task LaunchSpecificTextDiff() =>
122127
DiffRunner.LaunchAsync(DiffTool.VisualStudioCode,

src/DiffEngine.Tests/diffTools.include.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
1212
* Supports text files: True
1313
* Use shell execute: True
1414
* Environment variable for custom install location: `DiffEngine_BeyondCompare`
15-
* Supported binaries: .7z, .bcpkg, .bmp, .bz, .bz2, .cab, .chm, .deb, .ear, .gif, .gz, .ico, .img, .iso, .iso, .jar, .jpeg, .jpg, .kmz, .nupkg, .pdf, .png, .rar, .rpm, .rtf, .svg, .swm, .tar, .tbz, .tbz2, .tbz2, .tgz, .tif, .tiff, .war, .wim, .xlsx, .xz, .zip, .zipx
15+
* Supported binaries: .7z, .bcpkg, .bin, .bmp, .bz, .bz2, .cab, .chm, .deb, .ear, .gif, .gz, .ico, .img, .iso, .iso, .jar, .jpeg, .jpg, .kmz, .nupkg, .pdf, .png, .rar, .rpm, .rtf, .svg, .swm, .tar, .tbz, .tbz2, .tbz2, .tgz, .tif, .tiff, .war, .wim, .xlsx, .xz, .zip, .zipx
1616

1717
#### Notes:
1818

1919
* [Command line reference](https://www.scootersoftware.com/v4help/index.html?command_line_reference.html)
2020
* Enable [Automatically reload unless changes will be discarded](https://www.scootersoftware.com/v4help/optionstweak.html) in `Tools > Options > Tweaks > File Operations`.
21-
* For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip.
21+
* For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip.
2222
`Tools > Options > Archive Types`. Scroll down to Zip, then add extra extension to the semicolon delimited list.
2323

2424
#### Windows settings:
@@ -144,7 +144,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
144144
* Supports text files: True
145145
* Use shell execute: True
146146
* Environment variable for custom install location: `DiffEngine_ExamDiff`
147-
* Supported binaries: .svg
147+
* Supported binaries: .bin, .svg
148148

149149
#### Notes:
150150

@@ -223,7 +223,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
223223
* Supports text files: True
224224
* Use shell execute: True
225225
* Environment variable for custom install location: `DiffEngine_Kaleidoscope`
226-
* Supported binaries: .bmp, .gif, .ico, .jpeg, .jpg, .png, .svg, .tif, .tiff
226+
* Supported binaries: .bin, .bmp, .gif, .ico, .jpeg, .jpg, .png, .svg, .tif, .tiff
227227

228228
#### OSX settings:
229229

@@ -310,6 +310,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
310310
-d "tempFile.txt" "targetFile.txt"
311311
```
312312
* Scanned paths:
313+
* `C:\Program Files\Neovim\binnvim.exe`
313314
* `%PATH%nvim.exe`
314315

315316
#### OSX settings:
@@ -533,7 +534,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
533534
* Supports text files: True
534535
* Use shell execute: True
535536
* Environment variable for custom install location: `DiffEngine_TortoiseGitMerge`
536-
* Supported binaries: .svg
537+
* Supported binaries: .bin, .svg
537538

538539
#### Windows settings:
539540

@@ -659,7 +660,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
659660
* Supports text files: True
660661
* Use shell execute: True
661662
* Environment variable for custom install location: `DiffEngine_WinMerge`
662-
* Supported binaries: .bmp, .bw, .cut, .dds, .exr, .g3, .gif, .hdp, .hdr, .ico, .iff, .j2c, .j2k, .jif, .jng, .jp2, .jpe, .jpeg, .jpg, .jxr, .koa, .lbm, .mng, .pbm, .pcd, .pct, .pcx, .pfm, .pgm, .pic, .pict, .png, .ppm, .psd, .ras, .rgb, .rgba, .sgi, .svg, .targa, .tga, .tif, .tiff, .wap, .wbm, .wbmp, .wdp, .webp, .xbm, .xpm
663+
* Supported binaries: .bin, .bmp, .bw, .cut, .dds, .exr, .g3, .gif, .hdp, .hdr, .ico, .iff, .j2c, .j2k, .jif, .jng, .jp2, .jpe, .jpeg, .jpg, .jxr, .koa, .lbm, .mng, .pbm, .pcd, .pct, .pcx, .pfm, .pgm, .pic, .pict, .png, .ppm, .psd, .ras, .rgb, .rgba, .sgi, .svg, .targa, .tga, .tif, .tiff, .wap, .wbm, .wbmp, .wdp, .webp, .xbm, .xpm
663664

664665
#### Notes:
665666

@@ -895,7 +896,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
895896
* Supports text files: True
896897
* Use shell execute: False
897898
* Environment variable for custom install location: `DiffEngine_VisualStudioCode`
898-
* Supported binaries: .svg
899+
* Supported binaries: .bin, .svg
899900

900901
#### Notes:
901902

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


src/DiffEngine/Implementation/BeyondCompare.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ static string RightOsxLinuxArguments(string temp, string target) =>
2727
RequiresTarget: true,
2828
BinaryExtensions:
2929
[
30+
".bin",
3031
".svg",
3132
".pdf",
3233
".bmp",
@@ -91,7 +92,7 @@ static string RightOsxLinuxArguments(string temp, string target) =>
9192
Notes: """
9293
* [Command line reference](https://www.scootersoftware.com/v4help/index.html?command_line_reference.html)
9394
* Enable [Automatically reload unless changes will be discarded](https://www.scootersoftware.com/v4help/optionstweak.html) in `Tools > Options > Tweaks > File Operations`.
94-
* For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip.
95+
* For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip.
9596
`Tools > Options > Archive Types`. Scroll down to Zip, then add extra extension to the semicolon delimited list.
9697
""");
9798
}

src/DiffEngine/Implementation/ExamDiff.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ static string RightArguments(string temp, string target)
2525
UseShellExecute: true,
2626
RequiresTarget: true,
2727
Cost: "Paid",
28-
BinaryExtensions: [".svg"],
28+
BinaryExtensions:
29+
[
30+
".bin",
31+
".svg"
32+
],
2933
OsSupport: new(
3034
Windows: new(
3135
"ExamDiff.exe",

src/DiffEngine/Implementation/Kaleidoscope.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ public static Definition Kaleidoscope() =>
2020
".jpeg",
2121
".png",
2222
".tiff",
23-
".tif"
23+
".tif",
24+
".bin"
2425
],
2526
OsSupport: new(
2627
Osx: new(

0 commit comments

Comments
 (0)