From 1f9c77ef36545172046bba19b4601ebe4c1e6f61 Mon Sep 17 00:00:00 2001 From: Jai A Date: Tue, 7 Nov 2023 21:11:49 -0700 Subject: [PATCH] Bump version + fix neoforge 1.20.2+ --- Cargo.lock | 6 +++--- theseus/Cargo.toml | 2 +- theseus/src/api/profile/mod.rs | 18 +++++++++++------- theseus/src/launcher/args.rs | 10 +++++++--- theseus_cli/Cargo.toml | 2 +- theseus_gui/package.json | 2 +- theseus_gui/src-tauri/Cargo.toml | 2 +- theseus_gui/src-tauri/tauri.conf.json | 2 +- 8 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 49a344502..9293c5b82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4685,7 +4685,7 @@ dependencies = [ [[package]] name = "theseus" -version = "0.6.0" +version = "0.6.1" dependencies = [ "async-recursion", "async-tungstenite", @@ -4733,7 +4733,7 @@ dependencies = [ [[package]] name = "theseus_cli" -version = "0.6.0" +version = "0.6.1" dependencies = [ "argh", "color-eyre", @@ -4760,7 +4760,7 @@ dependencies = [ [[package]] name = "theseus_gui" -version = "0.6.0" +version = "0.6.1" dependencies = [ "chrono", "cocoa", diff --git a/theseus/Cargo.toml b/theseus/Cargo.toml index 6e5fcaad0..4c4c6b93d 100644 --- a/theseus/Cargo.toml +++ b/theseus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "theseus" -version = "0.6.0" +version = "0.6.1" authors = ["Jai A "] edition = "2018" diff --git a/theseus/src/api/profile/mod.rs b/theseus/src/api/profile/mod.rs index 4f5e87932..fa3496552 100644 --- a/theseus/src/api/profile/mod.rs +++ b/theseus/src/api/profile/mod.rs @@ -1034,13 +1034,17 @@ fn sanitize_loader_version_string(s: &str, loader: PackDependency) -> &str { // If one, take the first // If none, take the whole thing PackDependency::Forge | PackDependency::NeoForge => { - let mut split: std::str::Split<'_, char> = s.split('-'); - match split.next() { - Some(first) => match split.next() { - Some(second) => second, - None => first, - }, - None => s, + if s.starts_with("1.") { + let mut split: std::str::Split<'_, char> = s.split('-'); + match split.next() { + Some(first) => match split.next() { + Some(second) => second, + None => first, + }, + None => s, + } + } else { + s } } // For quilt, etc we take the whole thing, as it functions like: 0.20.0-beta.11 (and should not be split here) diff --git a/theseus/src/launcher/args.rs b/theseus/src/launcher/args.rs index 884fb831e..286a4a499 100644 --- a/theseus/src/launcher/args.rs +++ b/theseus/src/launcher/args.rs @@ -11,6 +11,7 @@ use daedalus::{ modded::SidedDataEntry, }; use dunce::canonicalize; +use std::collections::HashSet; use std::io::{BufRead, BufReader}; use std::{collections::HashMap, path::Path}; use uuid::Uuid; @@ -40,9 +41,9 @@ pub fn get_class_paths( Some(get_lib_path(libraries_path, &library.name, false)) }) - .collect::, _>>()?; + .collect::, _>>()?; - cps.push( + cps.insert( canonicalize(client_path) .map_err(|_| { crate::ErrorKind::LauncherError(format!( @@ -55,7 +56,10 @@ pub fn get_class_paths( .to_string(), ); - Ok(cps.join(classpath_separator(java_arch))) + Ok(cps + .into_iter() + .collect::>() + .join(classpath_separator(java_arch))) } pub fn get_class_paths_jar>( diff --git a/theseus_cli/Cargo.toml b/theseus_cli/Cargo.toml index 82f16579d..0c8dd56c8 100644 --- a/theseus_cli/Cargo.toml +++ b/theseus_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "theseus_cli" -version = "0.6.0" +version = "0.6.1" authors = ["Jai A "] edition = "2018" diff --git a/theseus_gui/package.json b/theseus_gui/package.json index fee36b404..f54967a01 100644 --- a/theseus_gui/package.json +++ b/theseus_gui/package.json @@ -1,7 +1,7 @@ { "name": "theseus_gui", "private": true, - "version": "0.6.0", + "version": "0.6.1", "type": "module", "scripts": { "dev": "vite", diff --git a/theseus_gui/src-tauri/Cargo.toml b/theseus_gui/src-tauri/Cargo.toml index 2ec1e8303..7a271c319 100644 --- a/theseus_gui/src-tauri/Cargo.toml +++ b/theseus_gui/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "theseus_gui" -version = "0.6.0" +version = "0.6.1" description = "A Tauri App" authors = ["you"] license = "" diff --git a/theseus_gui/src-tauri/tauri.conf.json b/theseus_gui/src-tauri/tauri.conf.json index 0e1f43881..9f3fdd169 100644 --- a/theseus_gui/src-tauri/tauri.conf.json +++ b/theseus_gui/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Modrinth App", - "version": "0.6.0" + "version": "0.6.1" }, "tauri": { "allowlist": {