Skip to content

Commit 0cb5e66

Browse files
Adde support for Linux and Windows
1 parent a7cdf84 commit 0cb5e66

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog for Ferium
22

3+
## [3.7.1] - 06.11.2021
4+
5+
- Ferium now compiles successfully on Linux
6+
- `add_mod()` now adds the mod_id to the config rather than the provided mod ID/slug
7+
38
## [3.7.0] - 04.11.2021
49

510
- Migrated to [Ferinth](https://crates.io/ferinth)

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ license = "MPL-2.0"
1010
publish = false
1111

1212
[dependencies]
13+
# Use `rustls` rather than OpenSSL
1314
reqwest = { version = "0", default-features = false, features = ["json", "rustls-tls"] }
1415
# Use bleeding edge version of `clap`
1516
clap = { git = "https://github.com/clap-rs/clap/", features = ["yaml"] }

makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ build-mac:
88
build-win:
99
cargo clean
1010
# For Windows x64
11-
cargo build --target=x86_64-pc-windows-msvc --release
12-
# For Windows on arm
13-
cargo build --target=aarch64-pc-windows-msvc --release
11+
cargo build --target=x86_64-pc-windows-gnu --release
1412

1513
build-linux:
1614
cargo clean
1715
# For Linux x86-64
18-
cargo build --target=x86_64-unknown-linux-musl --release
19-
# For Linux arm
20-
cargo build --target=aarch64-unknown-linux-musl --release
16+
cargo build --target=x86_64-unknown-linux-gnu --release
2117

2218
install:
2319
cargo install --force --path . --root ~

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ async fn add_mod_modrinth(
334334
match modrinth.get_mod(&mod_id).await {
335335
Ok(mod_) => {
336336
// And if so, append mod to config and write
337-
config.mod_slugs.push(mod_id);
337+
config.mod_slugs.push(mod_.id);
338338
println!("✓ ({})", mod_.title);
339339
}
340340
Err(_) => {

src/util/wrappers.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{
99
path::{Path, PathBuf},
1010
};
1111

12-
// Only macOS uses a sync file picker
12+
// macOS can only uses a sync file picker
1313
#[cfg(target_os = "macos")]
1414
/// Uses the appropriate file picker to pick a file
1515
pub async fn pick_folder(path: &Path) -> Option<PathBuf> {
@@ -20,10 +20,13 @@ pub async fn pick_folder(path: &Path) -> Option<PathBuf> {
2020
#[cfg(not(target_os = "macos"))]
2121
/// Uses the appropriate file picker to pick a file
2222
pub async fn pick_folder(path: &Path) -> Option<PathBuf> {
23-
rfd::AsyncFileDialog::new()
23+
match rfd::AsyncFileDialog::new()
2424
.set_directory(path)
2525
.pick_folder()
26-
.await
26+
.await {
27+
Some(handle) => Some(handle.path().into()),
28+
None => None,
29+
}
2730
}
2831

2932
/// Get a maximum of `count` number of the latest versions of Minecraft

0 commit comments

Comments
 (0)