Skip to content

Commit

Permalink
Version 0.11.2 (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bwc9876 authored Aug 27, 2023
2 parents edafe86 + 3b7b00f commit c399372
Show file tree
Hide file tree
Showing 14 changed files with 358 additions and 312 deletions.
139 changes: 69 additions & 70 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"owmods_gui/backend",
"xtask"
]
resolver = "2"

[profile.release]
panic = "abort"
Expand Down
14 changes: 7 additions & 7 deletions owmods_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "owmods_cli"
authors = ["Bwc9876 <[email protected]>"]
description = "A CLI Tool To Manage OWML Mods"
version = "0.11.1"
version = "0.11.2"
edition = "2021"
readme = "./README.md"
repository = "https://github.com/ow-mods/ow-mod-man/"
Expand All @@ -12,19 +12,19 @@ license = "GPL-3.0-or-later"
depends = "libssl1.1"

[dependencies]
owmods_core = { version = "0.11.1", path = "../owmods_core" }
clap = { version = "4.3.23", features = ["derive"] }
owmods_core = { version = "0.11.2", path = "../owmods_core" }
clap = { version = "4.4.0", features = ["derive"] }
colored = "2.0.4"
anyhow = "1.0.75"
indicatif = { version = "0.17.6", features = ["improved_unicode"] }
tokio = { version = "1.32.0", features = ["macros"] }
log = { version = "0.4.20", features = ["std"] }
clap_complete = "4.3.2"
clap_complete = "4.4.0"

[build-dependencies]
clap = { version = "4.3.23", features = ["derive"] }
clap_complete = "4.3.2"
clap_mangen = "0.2.12"
clap = { version = "4.4.0", features = ["derive"] }
clap_complete = "4.4.0"
clap_mangen = "0.2.13"

[[bin]]
name = "owmods"
Expand Down
7 changes: 6 additions & 1 deletion owmods_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use log::{error, info, warn, LevelFilter};
use owmods_core::{
alerts::fetch_alert,
config::Config,
constants::OWML_UNIQUE_NAME,
db::{LocalDatabase, RemoteDatabase},
download::{
download_and_install_owml, install_mod_from_db, install_mod_from_url, install_mod_from_zip,
Expand Down Expand Up @@ -268,7 +269,11 @@ async fn run_from_cli(cli: BaseCli) -> Result<()> {
let local_mod = local_db.get_mod(unique_name);
let mut flag = true;

if *overwrite && local_mod.is_some() {
if unique_name == OWML_UNIQUE_NAME {
warn!("OWML is already installed, use `owmods update` to update it");
warn!("Or use `owmods setup` to reinstall it");
flag = false;
} else if *overwrite && local_mod.is_some() {
warn!("Overriding {}", unique_name);
} else if let Some(local_mod) = local_db.get_mod(unique_name) {
error!(
Expand Down
8 changes: 4 additions & 4 deletions owmods_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "owmods_core"
authors = ["Bwc9876 <[email protected]>"]
description = "The core library for the Outer Wilds Mod Manager"
version = "0.11.1"
version = "0.11.2"
edition = "2021"
readme = "./README.md"
license = "GPL-3.0-or-later"
Expand All @@ -15,7 +15,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
opener = "0.6.1"
directories = "5.0.1"
reqwest = { version = "0.11.19", default-features = false, features = [
reqwest = { version = "0.11.20", default-features = false, features = [
"blocking",
"json",
"rustls-tls",
Expand All @@ -36,7 +36,7 @@ typeshare = "1.0.1"
lazy_static = "1.4.0"
tempfile = "3.8.0"
unicode-normalization = "0.1.22"
regex = "1.9.3"
regex = "1.9.4"

[dev-dependencies]
tokio-test = "0.4.2"
tokio-test = "0.4.3"
10 changes: 5 additions & 5 deletions owmods_core/src/db/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ struct RawRemoteDatabase {
pub struct RemoteDatabase {
/// A hashmap of unique names to mods
pub mods: HashMap<String, RemoteMod>,
/// OWML, if it exists
pub owml: Option<RemoteMod>,
}

impl From<RawRemoteDatabase> for RemoteDatabase {
Expand All @@ -37,7 +39,8 @@ impl From<RawRemoteDatabase> for RemoteDatabase {
for remote_mod in mods.values_mut() {
remote_mod.version = fix_version(&remote_mod.version).to_string();
}
Self { mods }
let owml = mods.remove(OWML_UNIQUE_NAME);
Self { mods, owml }
}
}

Expand Down Expand Up @@ -133,9 +136,6 @@ impl RemoteDatabase {
/// ```
///
pub fn get_mod(&self, unique_name: &str) -> Option<&RemoteMod> {
if unique_name == OWML_UNIQUE_NAME {
return None;
}
self.mods.get(unique_name)
}

Expand All @@ -161,7 +161,7 @@ impl RemoteDatabase {
/// ```
///
pub fn get_owml(&self) -> Option<&RemoteMod> {
self.mods.get(OWML_UNIQUE_NAME)
self.owml.as_ref()
}

/// Search the database with the given query, pulls from various fields of the mod
Expand Down
5 changes: 2 additions & 3 deletions owmods_core/src/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ pub mod bars {
pub fn by_unique_name(&self, unique_name: &str) -> Option<&ProgressBar> {
self.bars
.values()
.filter(|b| matches!(b.success, None))
.filter(|b| b.success.is_none())
.find(|b| match &b.unique_name {
Some(bar_name) => bar_name == unique_name,
_ => false,
Expand Down Expand Up @@ -472,8 +472,7 @@ pub mod bars {
bar.success = Some(payload.success);
}
if self.bars.values().all(|b| {
matches!(b.success, Some(_))
&& matches!(b.progress_action, ProgressAction::Extract)
b.success.is_some() && matches!(b.progress_action, ProgressAction::Extract)
}) {
return Some(self.bars.iter().any(|b| !b.1.success.unwrap_or(true)));
}
Expand Down
2 changes: 1 addition & 1 deletion owmods_core/src/toggle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub fn toggle_mod(
local_mod.manifest.dependencies.clone().unwrap_or_default();
let mut toggled_mods: Vec<String> = vec![unique_name.to_string()];
while !to_toggle.is_empty() {
for dep in to_toggle.drain(..).collect::<Vec<String>>() {
for dep in std::mem::take(&mut to_toggle) {
if toggled_mods.contains(&dep) {
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions owmods_core/src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ fn check_mod_conflicts(local_mod: &LocalMod, db: &LocalDatabase) -> Vec<ModValid
///
pub fn check_mod(local_mod: &LocalMod, db: &LocalDatabase) -> Vec<ModValidationError> {
let mut errors: Vec<ModValidationError> = vec![];
errors.extend(check_mod_deps(local_mod, db).into_iter());
errors.extend(check_mod_conflicts(local_mod, db).into_iter());
errors.extend(check_mod_deps(local_mod, db));
errors.extend(check_mod_conflicts(local_mod, db));
if let Some(dll_error) = check_mod_dll(local_mod) {
errors.push(dll_error);
}
Expand Down
8 changes: 4 additions & 4 deletions owmods_gui/backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "owmods_gui"
version = "0.11.1"
version = "0.11.2"
license = "GPL-3.0-or-later"
edition = "2021"

[build-dependencies]
tauri-build = { version = "1.4.0", features = [] }

[dependencies]
owmods_core = { version = "0.11.1", path = "../../owmods_core" }
owmods_core = { version = "0.11.2", path = "../../owmods_core" }
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.4.1", features = [
Expand All @@ -31,8 +31,8 @@ typeshare = "1.0.1"
notify = { version = "6.1.1", default-features = false, features = [
"macos_kqueue",
] }
regex = "1.9.3"
time = { version = "0.3.27", features = ["macros", "local-offset"] }
regex = "1.9.4"
time = { version = "0.3.28", features = ["macros", "local-offset"] }
tauri-plugin-deep-link = "0.1.2"
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
opener = "0.6.1"
Expand Down
2 changes: 2 additions & 0 deletions owmods_gui/backend/src/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ impl LogData {
}
}
self.queued_emits.clear();
self.eval_indices();
self.emit_behind(false);
}

Expand Down Expand Up @@ -255,6 +256,7 @@ impl LogData {
}
self.queued_emits.push(None);
} else {
self.eval_indices();
self.emit_update();
}
// Process the emit queue semi-regularly
Expand Down
12 changes: 6 additions & 6 deletions owmods_gui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@fontsource/roboto": "5.0.8",
"@mui/icons-material": "5.14.3",
"@mui/lab": "5.0.0-alpha.140",
"@mui/material": "5.14.5",
"@mui/icons-material": "5.14.6",
"@mui/lab": "5.0.0-alpha.141",
"@mui/material": "5.14.6",
"@tauri-apps/api": "1.4.0",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand All @@ -38,15 +38,15 @@
"@typescript-eslint/eslint-plugin": "6.4.1",
"@typescript-eslint/parser": "6.4.1",
"@vitejs/plugin-react": "4.0.4",
"eslint": "8.47.0",
"eslint": "8.48.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"jsdom": "22.1.0",
"prettier": "3.0.2",
"typescript": "5.1.6",
"typescript": "5.2.2",
"vite": "4.4.9",
"vite-imagetools": "5.0.8",
"vite-plugin-html": "3.2.0",
"vitest": "0.34.2"
"vitest": "0.34.3"
}
}
Loading

0 comments on commit c399372

Please sign in to comment.