Skip to content

Commit

Permalink
fix binarize not running on 1.11.1 (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson authored Mar 2, 2024
1 parent 2c9f8f3 commit 352a278
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bin/src/modules/binarize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ mod error;
#[derive(Default)]
pub struct Binarize {
command: Option<String>,
available: bool,
}

impl Module for Binarize {
Expand All @@ -36,12 +35,10 @@ impl Module for Binarize {
let hkcu = winreg::RegKey::predef(winreg::enums::HKEY_CURRENT_USER);
let Ok(key) = hkcu.open_subkey("Software\\Bohemia Interactive\\binarize") else {
report.warn(ToolsNotFound::code());
self.available = false;
return Ok(report);
};
let Ok(path) = key.get_value::<String, _>("path") else {
report.warn(ToolsNotFound::code());
self.available = false;
return Ok(report);
};
let path = PathBuf::from(path).join("binarize_x64.exe");
Expand All @@ -55,13 +52,12 @@ impl Module for Binarize {
fn init(&mut self, _ctx: &Context) -> Result<Report, Error> {
let mut report = Report::new();
report.warn(PlatformNotSupported::code());
self.available = false;
Ok(report)
}

#[allow(clippy::too_many_lines)]
fn pre_build(&self, ctx: &Context) -> Result<Report, Error> {
if !self.available {
if self.command.is_none() {
return Ok(Report::new());
}
let mut targets = Vec::with_capacity(ctx.addons().len());
Expand Down

0 comments on commit 352a278

Please sign in to comment.