Skip to content

Commit d33a538

Browse files
authored
include default path for bindiff on windows (#36)
1 parent 9e3a4bc commit d33a538

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/bindiffhelper/BinDiffHelperPlugin.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ public class BinDiffHelperPlugin extends ProgramPlugin {
6363
Exporter binExportExporter;
6464
String binDiffBinary;
6565
String diffCommand;
66+
protected String defaultBinPath;
6667
protected String defaultDiffCommand;
67-
6868
Program program;
6969

7070
public final static String BDBINPROPERTY = "de.ubfx.bindiffhelper.bindiffbinary";
@@ -103,12 +103,15 @@ public BinDiffHelperPlugin(PluginTool tool) {
103103
}
104104

105105
if (System.getProperty("os.name").toLowerCase().contains("win")) {
106+
defaultBinPath = "C:\\Program Files\\BinDiff\\bin\\bindiff.exe";
106107
defaultDiffCommand = "notepad++ -multiInst -nosession -lc -pluginMessage=compare \"$file1\" \"$file2\"";
107108
}
108109
if (System.getProperty("os.name").toLowerCase().contains("nix")) {
110+
// defaultBinPath = "/opt/bindiff/bin/bindiff";
109111
defaultDiffCommand = "x-terminal-emulator -e 'diff -u \"$file1\" \"$file2\"'";
110112
}
111113

114+
binDiffBinary = Preferences.getProperty(BDBINPROPERTY, defaultBinPath);
112115
diffCommand = Preferences.getProperty(DIFFCOMMAND, defaultDiffCommand);
113116

114117
provider = new BinDiffHelperProvider(this, this.getCurrentProgram());

0 commit comments

Comments
 (0)