From c81e9faad0f8cef711c66197023e5934eb0a85c4 Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Wed, 22 Jan 2025 23:18:58 -0600 Subject: make some changes after testing some mod loaders - fabric - forge - neoforge --- src/launcher/runner.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/launcher/runner.rs') diff --git a/src/launcher/runner.rs b/src/launcher/runner.rs index 50a9ff8..a58602e 100644 --- a/src/launcher/runner.rs +++ b/src/launcher/runner.rs @@ -14,6 +14,13 @@ use super::{Launch, LaunchInfo}; #[derive(Clone, Copy)] struct LaunchArgSub<'a, 'l, F: FeatureMatcher>(&'a LaunchInfo<'l, F>); +// FIXME: this is not correct +#[cfg(windows)] +const PATH_SEP: &str = ";"; + +#[cfg(not(windows))] +const PATH_SEP: &str = ":"; + impl<'rep, 'l, F: FeatureMatcher> SubFunc<'rep> for LaunchArgSub<'rep, 'l, F> { fn substitute(&self, key: &str) -> Option> { match key { @@ -24,8 +31,8 @@ impl<'rep, 'l, F: FeatureMatcher> SubFunc<'rep> for LaunchArgSub<'rep, 'l, F> { "auth_session" => Some(Cow::Borrowed("-")), // TODO "auth_uuid" => Some(Cow::Borrowed("00000000-0000-0000-0000-000000000000")), // TODO "auth_xuid" => Some(Cow::Borrowed("00000000-0000-0000-0000-000000000000")), // TODO - "classpath" => Some(Cow::Borrowed(self.0.classpath.as_str())), // TODO - "classpath_separator" => None, // FIXME + "classpath" => Some(Cow::Borrowed(self.0.classpath.as_str())), + "classpath_separator" => Some(Cow::Borrowed(PATH_SEP)), "game_assets" => self.0.virtual_assets_path.as_ref() .map(|s| s.as_path().as_java_path().to_string_lossy()), "game_directory" => Some(self.0.instance_home.as_java_path().to_string_lossy()), -- cgit v1.2.3-70-g09d2