Skip to content

Commit

Permalink
use steam arma 3 tools
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Oct 18, 2024
1 parent 0fb469b commit 096151e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
17 changes: 13 additions & 4 deletions bin/src/modules/binarize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,28 @@ impl Module for Binarize {
#[cfg(not(windows))]
fn init(&mut self, ctx: &Context) -> Result<Report, Error> {
use error::bbe7_wine_not_found::WineNotFound;
use hemtt_common::steam;

let mut report = Report::new();

if cfg!(target_os = "macos") {
report.push(PlatformNotSupported::code());
return Ok(report);
}

let tools_path = {
let default = dirs::home_dir()
.expect("home directory exists")
.join(".local/share/arma3tools");
if let Ok(path) = std::env::var("HEMTT_BI_TOOLS") {
PathBuf::from(path)
} else {
if !default.exists() {
report.push(PlatformNotSupported::code());
} else if !default.exists() {
let Some(tools_dir) = steam::find_app(233_800) else {
report.push(ToolsNotFound::code(Severity::Warning));
return Ok(report);
}
};
tools_dir
} else {
default
}
};
Expand Down
5 changes: 3 additions & 2 deletions book/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

[Introduction](README.md)

- [Installation](installation.md)
- [Installation](installation/index.md)
- [Arma 3 Tools](installation/arma3tools.md)

# Mod Projects

- [Configuration](configuration/index.md)
- [Minimum](configuration/minimum.md)
- [Version](configuration/version.md)
- [Lints](configuration/lints.md)
- [Addon](configuration/addon.md)
- [Addon](configuration/addon.md)]
- [P Drive](configuration/p-drive.md)
- [Custom Commands](configuration/custom-commands.md)
- [Commands](commands/index.md)
Expand Down
17 changes: 17 additions & 0 deletions book/installation/arma3tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Arma 3 Tools

HEMTT will use your installation of Arm 3 Tools to binarize supported files (p3d, rtm, wrp).

## Installation

### Windows

Arma 3 Tools can be installed using [Steam](https://store.steampowered.com/app/233800/Arma_3_Tools/). After installation, run the tools at least once to ensure the registry keys are set.

### Linux

Arma 3 Tools can be installed using [SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD). After installation, run the tools at least once to ensure the registry keys are set.

```bash
steamcmd +login anonymous +force_install_dir /path/to/arma3tools +app_update 233780 validate +quit
```
File renamed without changes.

0 comments on commit 096151e

Please sign in to comment.