diff --git a/ThunderstoreCLI/Game/ModProfile.cs b/ThunderstoreCLI/Game/ModProfile.cs index e842c10..5a43fb0 100644 --- a/ThunderstoreCLI/Game/ModProfile.cs +++ b/ThunderstoreCLI/Game/ModProfile.cs @@ -20,7 +20,7 @@ internal ModProfile(GameDefinition gameDef, string name, string tcliDirectory) { Name = name; - var directory = Path.Combine(tcliDirectory, "Profiles", gameDef.Identifier, name); + var directory = Path.GetFullPath(Path.Combine(tcliDirectory, "Profiles", gameDef.Identifier, name)); if (!Directory.Exists(directory)) { Directory.CreateDirectory(directory); diff --git a/ThunderstoreCLI/Options.cs b/ThunderstoreCLI/Options.cs index b442cf1..9a3a14f 100644 --- a/ThunderstoreCLI/Options.cs +++ b/ThunderstoreCLI/Options.cs @@ -75,11 +75,6 @@ public override bool Validate() return false; } - if (!Directory.Exists(TcliDirectory)) - { - Directory.CreateDirectory(TcliDirectory!); - } - return true; } } diff --git a/tcli-bepinex-installer/src/main.rs b/tcli-bepinex-installer/src/main.rs index 546de59..70b2618 100644 --- a/tcli-bepinex-installer/src/main.rs +++ b/tcli-bepinex-installer/src/main.rs @@ -345,21 +345,24 @@ fn output_instructions(game_dir: PathBuf, bep_dir: PathBuf, platform: GamePlatfo ); let mut ld_library = OsString::from(game_dir.join("doorstop_libs")); - if let Some(orig) = env::var_os("LD_LIBRARY") { + if let Some(orig) = env::var_os("LD_LIBRARY_PATH") { ld_library.push(":"); ld_library.push(orig); } - println!("ENVIRONMENT:LD_LIBRARY={}", ld_library.to_string_lossy()); + println!( + "ENVIRONMENT:LD_LIBRARY_PATH={}", + ld_library.to_string_lossy() + ); - let mut ld_preload = OsString::from(game_dir.join("doorstop_libs").join({ + let mut ld_preload = OsString::from({ // FIXME: properly determine arch of the game exe, instead of assuming its the same as this exe if cfg!(target_arch = "x86_64") { "libdoorstop_x64.so" } else { "libdoorstop_x86.so" } - })); + }); if let Some(orig) = env::var_os("LD_PRELOAD") { ld_preload.push(":"); ld_preload.push(orig);