From c1bcb53bdaad4043ce86e4a017b857728297475e Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sat, 4 Oct 2025 09:42:04 +1000 Subject: [PATCH 1/4] . --- .gitattributes | 1 + src/DiffEngine.Tests/input.target.bin | 1 + src/DiffEngine.Tests/input.temp.bin | 1 + 3 files changed, 3 insertions(+) create mode 100644 src/DiffEngine.Tests/input.target.bin create mode 100644 src/DiffEngine.Tests/input.temp.bin diff --git a/.gitattributes b/.gitattributes index 1a8d1a7b..4d53ba7e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,6 @@ * text *.snk binary +*.bin binary *.png binary src/Verify/EmptyFiles/* binary diff --git a/src/DiffEngine.Tests/input.target.bin b/src/DiffEngine.Tests/input.target.bin new file mode 100644 index 00000000..25cb955b --- /dev/null +++ b/src/DiffEngine.Tests/input.target.bin @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/DiffEngine.Tests/input.temp.bin b/src/DiffEngine.Tests/input.temp.bin new file mode 100644 index 00000000..6b2aaa76 --- /dev/null +++ b/src/DiffEngine.Tests/input.temp.bin @@ -0,0 +1 @@ + \ No newline at end of file From 07d4393f3b3bf86041deafe83ffcb27b7219bad3 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sat, 4 Oct 2025 09:48:39 +1000 Subject: [PATCH 2/4] . --- docs/diff-tool.order.md | 2 +- src/DiffEngine.Tests/DiffToolsTest.cs | 5 +++++ src/DiffEngine/Implementation/BeyondCompare.cs | 3 ++- src/DiffEngine/Implementation/Kaleidoscope.cs | 3 ++- src/DiffEngine/Implementation/WinMerge.cs | 1 + 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/diff-tool.order.md b/docs/diff-tool.order.md index 09ad705d..0251c032 100644 --- a/docs/diff-tool.order.md +++ b/docs/diff-tool.order.md @@ -51,5 +51,5 @@ For example `VisualStudio,Meld` will result in VisualStudio then Meld then all o ```cs DiffTools.UseOrder(DiffTool.VisualStudio, DiffTool.AraxisMerge); ``` -snippet source | anchor +snippet source | anchor diff --git a/src/DiffEngine.Tests/DiffToolsTest.cs b/src/DiffEngine.Tests/DiffToolsTest.cs index b3696cb1..7b4d0ac8 100644 --- a/src/DiffEngine.Tests/DiffToolsTest.cs +++ b/src/DiffEngine.Tests/DiffToolsTest.cs @@ -115,6 +115,11 @@ static async Task AddToolAndLaunch() #endregion } + [Fact] + public Task LaunchSpecificBinaryDiff() => + DiffRunner.LaunchAsync(DiffTool.ExamDiff, + Path.Combine(SourceDirectory, "input.temp.bin"), + Path.Combine(SourceDirectory, "input.target.bin")); /** [Fact] diff --git a/src/DiffEngine/Implementation/BeyondCompare.cs b/src/DiffEngine/Implementation/BeyondCompare.cs index 504a94ba..85701202 100644 --- a/src/DiffEngine/Implementation/BeyondCompare.cs +++ b/src/DiffEngine/Implementation/BeyondCompare.cs @@ -27,6 +27,7 @@ static string RightOsxLinuxArguments(string temp, string target) => RequiresTarget: true, BinaryExtensions: [ + ".bin", ".svg", ".pdf", ".bmp", @@ -91,7 +92,7 @@ static string RightOsxLinuxArguments(string temp, string target) => Notes: """ * [Command line reference](https://www.scootersoftware.com/v4help/index.html?command_line_reference.html) * Enable [Automatically reload unless changes will be discarded](https://www.scootersoftware.com/v4help/optionstweak.html) in `Tools > Options > Tweaks > File Operations`. - * For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip. + * For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip. `Tools > Options > Archive Types`. Scroll down to Zip, then add extra extension to the semicolon delimited list. """); } diff --git a/src/DiffEngine/Implementation/Kaleidoscope.cs b/src/DiffEngine/Implementation/Kaleidoscope.cs index 128317c2..4f930343 100644 --- a/src/DiffEngine/Implementation/Kaleidoscope.cs +++ b/src/DiffEngine/Implementation/Kaleidoscope.cs @@ -20,7 +20,8 @@ public static Definition Kaleidoscope() => ".jpeg", ".png", ".tiff", - ".tif" + ".tif", + ".bin" ], OsSupport: new( Osx: new( diff --git a/src/DiffEngine/Implementation/WinMerge.cs b/src/DiffEngine/Implementation/WinMerge.cs index 0f12a7a7..5dd8b59e 100644 --- a/src/DiffEngine/Implementation/WinMerge.cs +++ b/src/DiffEngine/Implementation/WinMerge.cs @@ -27,6 +27,7 @@ static string RightArguments(string temp, string target) Cost: "Free with option to donate", BinaryExtensions: [ + ".bin", ".svg", ".bmp", ".cut", From 9076d2511b92f8cdfd788455d192ac2d63ecd2d4 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sat, 4 Oct 2025 10:10:35 +1000 Subject: [PATCH 3/4] . --- src/DiffEngine.Tests/DiffToolsTest.cs | 6 +++--- src/DiffEngine.Tests/diffTools.include.md | 15 ++++++++------- src/DiffEngine/Implementation/ExamDiff.cs | 6 +++++- src/DiffEngine/Implementation/Neovim.cs | 3 ++- src/DiffEngine/Implementation/TortoiseGitMerge.cs | 6 +++++- src/DiffEngine/Implementation/VsCode.cs | 8 ++++++-- 6 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/DiffEngine.Tests/DiffToolsTest.cs b/src/DiffEngine.Tests/DiffToolsTest.cs index 7b4d0ac8..3bb49754 100644 --- a/src/DiffEngine.Tests/DiffToolsTest.cs +++ b/src/DiffEngine.Tests/DiffToolsTest.cs @@ -115,13 +115,13 @@ static async Task AddToolAndLaunch() #endregion } + /** + [Fact] public Task LaunchSpecificBinaryDiff() => - DiffRunner.LaunchAsync(DiffTool.ExamDiff, + DiffRunner.LaunchAsync(DiffTool.VisualStudioCode, Path.Combine(SourceDirectory, "input.temp.bin"), Path.Combine(SourceDirectory, "input.target.bin")); - /** - [Fact] public Task LaunchSpecificTextDiff() => DiffRunner.LaunchAsync(DiffTool.VisualStudioCode, diff --git a/src/DiffEngine.Tests/diffTools.include.md b/src/DiffEngine.Tests/diffTools.include.md index 6ca28f9f..d42227ff 100644 --- a/src/DiffEngine.Tests/diffTools.include.md +++ b/src/DiffEngine.Tests/diffTools.include.md @@ -12,13 +12,13 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_BeyondCompare` - * 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 + * 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 #### Notes: * [Command line reference](https://www.scootersoftware.com/v4help/index.html?command_line_reference.html) * Enable [Automatically reload unless changes will be discarded](https://www.scootersoftware.com/v4help/optionstweak.html) in `Tools > Options > Tweaks > File Operations`. - * For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip. + * For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip. `Tools > Options > Archive Types`. Scroll down to Zip, then add extra extension to the semicolon delimited list. #### Windows settings: @@ -144,7 +144,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_ExamDiff` - * Supported binaries: .svg + * Supported binaries: .bin, .svg #### Notes: @@ -223,7 +223,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_Kaleidoscope` - * Supported binaries: .bmp, .gif, .ico, .jpeg, .jpg, .png, .svg, .tif, .tiff + * Supported binaries: .bin, .bmp, .gif, .ico, .jpeg, .jpg, .png, .svg, .tif, .tiff #### OSX settings: @@ -310,6 +310,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a -d "tempFile.txt" "targetFile.txt" ``` * Scanned paths: + * `C:\Program Files\Neovim\binnvim.exe` * `%PATH%nvim.exe` #### OSX settings: @@ -533,7 +534,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_TortoiseGitMerge` - * Supported binaries: .svg + * Supported binaries: .bin, .svg #### Windows settings: @@ -659,7 +660,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_WinMerge` - * 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 + * 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 #### Notes: @@ -895,7 +896,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: False * Environment variable for custom install location: `DiffEngine_VisualStudioCode` - * Supported binaries: .svg + * Supported binaries: .bin, .svg #### Notes: diff --git a/src/DiffEngine/Implementation/ExamDiff.cs b/src/DiffEngine/Implementation/ExamDiff.cs index 415f0025..0c88818a 100644 --- a/src/DiffEngine/Implementation/ExamDiff.cs +++ b/src/DiffEngine/Implementation/ExamDiff.cs @@ -25,7 +25,11 @@ static string RightArguments(string temp, string target) UseShellExecute: true, RequiresTarget: true, Cost: "Paid", - BinaryExtensions: [".svg"], + BinaryExtensions: + [ + ".bin", + ".svg" + ], OsSupport: new( Windows: new( "ExamDiff.exe", diff --git a/src/DiffEngine/Implementation/Neovim.cs b/src/DiffEngine/Implementation/Neovim.cs index cd68e27f..544b2fdd 100644 --- a/src/DiffEngine/Implementation/Neovim.cs +++ b/src/DiffEngine/Implementation/Neovim.cs @@ -19,7 +19,8 @@ public static Definition Neovim() OsSupport: new( Windows: new( "nvim.exe", - launchArguments), + launchArguments, + searchDirectory: @"C:\Program Files\Neovim\bin"), Linux: new( "nvim", launchArguments), diff --git a/src/DiffEngine/Implementation/TortoiseGitMerge.cs b/src/DiffEngine/Implementation/TortoiseGitMerge.cs index 54c9f9ea..5626a405 100644 --- a/src/DiffEngine/Implementation/TortoiseGitMerge.cs +++ b/src/DiffEngine/Implementation/TortoiseGitMerge.cs @@ -10,7 +10,11 @@ public static Definition TortoiseGitMerge() => UseShellExecute: true, RequiresTarget: true, Cost: "Free", - BinaryExtensions: [".svg"], + BinaryExtensions: + [ + ".svg", + ".bin" + ], OsSupport: new( Windows: new( "TortoiseGitMerge.exe", diff --git a/src/DiffEngine/Implementation/VsCode.cs b/src/DiffEngine/Implementation/VsCode.cs index 7dda75ef..010ad187 100644 --- a/src/DiffEngine/Implementation/VsCode.cs +++ b/src/DiffEngine/Implementation/VsCode.cs @@ -14,7 +14,11 @@ public static Definition VisualStudioCode() UseShellExecute: false, RequiresTarget: true, Cost: "Free", - BinaryExtensions: [".svg"], + BinaryExtensions: + [ + ".svg", + ".bin" + ], OsSupport: new( Windows: new( "code.cmd", @@ -28,6 +32,6 @@ public static Definition VisualStudioCode() "code", launchArguments, "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/")), - Notes: " * [Command line reference](https://code.visualstudio.com/docs/editor/command-line)"); + Notes: " * [Command line reference](https://code.visualstudio.com/docs/editor/command-line)"); } } \ No newline at end of file From b7d6b97664c0e5adffdebd46d3b9ee9ca22d6d9f Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 4 Oct 2025 00:10:56 +0000 Subject: [PATCH 4/4] Docs changes --- docs/diff-tool.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/diff-tool.md b/docs/diff-tool.md index 686df17f..3d2587b8 100644 --- a/docs/diff-tool.md +++ b/docs/diff-tool.md @@ -147,13 +147,13 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_BeyondCompare` - * 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 + * 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 #### Notes: * [Command line reference](https://www.scootersoftware.com/v4help/index.html?command_line_reference.html) * Enable [Automatically reload unless changes will be discarded](https://www.scootersoftware.com/v4help/optionstweak.html) in `Tools > Options > Tweaks > File Operations`. - * For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip. + * For `.kmz`, and `.nupkg`, Beyond Compare needs to be configured to treat them as zip. `Tools > Options > Archive Types`. Scroll down to Zip, then add extra extension to the semicolon delimited list. #### Windows settings: @@ -279,7 +279,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_ExamDiff` - * Supported binaries: .svg + * Supported binaries: .bin, .svg #### Notes: @@ -358,7 +358,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_Kaleidoscope` - * Supported binaries: .bmp, .gif, .ico, .jpeg, .jpg, .png, .svg, .tif, .tiff + * Supported binaries: .bin, .bmp, .gif, .ico, .jpeg, .jpg, .png, .svg, .tif, .tiff #### OSX settings: @@ -445,6 +445,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a -d "tempFile.txt" "targetFile.txt" ``` * Scanned paths: + * `C:\Program Files\Neovim\binnvim.exe` * `%PATH%nvim.exe` #### OSX settings: @@ -668,7 +669,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_TortoiseGitMerge` - * Supported binaries: .svg + * Supported binaries: .bin, .svg #### Windows settings: @@ -794,7 +795,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: True * Environment variable for custom install location: `DiffEngine_WinMerge` - * 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 + * 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 #### Notes: @@ -1030,7 +1031,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Supports text files: True * Use shell execute: False * Environment variable for custom install location: `DiffEngine_VisualStudioCode` - * Supported binaries: .svg + * Supported binaries: .bin, .svg #### Notes: