From 64db6ff417a1a1542d22bd7ba109b82f54ef8ce0 Mon Sep 17 00:00:00 2001 From: Alistair Young Date: Fri, 16 Jan 2015 08:41:20 -0600 Subject: [PATCH] Allow defaulting to CWD as install directory. --- x64-unfixer/Program.cs | 15 ++++++++++++--- x64-unfixer/Properties/AssemblyInfo.cs | 8 ++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/x64-unfixer/Program.cs b/x64-unfixer/Program.cs index 890b797..f3ea5eb 100644 --- a/x64-unfixer/Program.cs +++ b/x64-unfixer/Program.cs @@ -152,7 +152,7 @@ private static void Main (string[] args) Console.WriteLine ("Operation completed.") ; } - public static string FindKsp () + private static string FindKsp () { if ((Environment.OSVersion.Platform != PlatformID.Win32NT) || (!Environment.Is64BitOperatingSystem)) @@ -181,8 +181,17 @@ public static string FindKsp () if (kspDir == null) { - Console.WriteLine("FATALITY: KSP not installed or could not find install location."); - Environment.Exit(2); + // If we can't find the install that way, fall back to checking if we are in it. + Console.WriteLine ("Cannot locate KSP; not a Steam install. Trying local directory...") ; + + kspDir = Environment.CurrentDirectory ; + + if (!(File.Exists (Path.Combine (kspDir, "KSP.exe")))) + { + Console.WriteLine ("FATALITY: KSP not installed or could not find install location.") ; + Console.WriteLine ("On non-Steam installs, x64-unfixer MUST be run from the main game directory (where KSP.EXE is located)."); + Environment.Exit (2) ; + } } Console.WriteLine ("KSP found at: {0}", kspDir); diff --git a/x64-unfixer/Properties/AssemblyInfo.cs b/x64-unfixer/Properties/AssemblyInfo.cs index 0c3c09a..99f2f28 100644 --- a/x64-unfixer/Properties/AssemblyInfo.cs +++ b/x64-unfixer/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle ("x64-unfixer")] -[assembly: AssemblyDescription ("")] +[assembly: AssemblyDescription("Patch mods that don't run on Windows x64 such that they do.")] #if DEBUG [assembly: AssemblyConfiguration ("Debug")] @@ -16,7 +16,7 @@ [assembly: AssemblyCompany ("")] [assembly: AssemblyProduct ("x64-unfixer")] -[assembly: AssemblyCopyright ("Copyright © Alistair Young 2014")] +[assembly: AssemblyCopyright("Copyright © Alistair Young 2014-2015")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] @@ -38,5 +38,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion ("1.4.0")] -[assembly: AssemblyFileVersion ("1.4.0.0")] +[assembly: AssemblyVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.0.0")]