Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
Allow defaulting to CWD as install directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
cerebrate committed Jan 16, 2015
1 parent f4dc29b commit 64db6ff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
15 changes: 12 additions & 3 deletions x64-unfixer/Program.cs
Expand Up @@ -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))
Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions x64-unfixer/Properties/AssemblyInfo.cs
Expand Up @@ -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")]
Expand All @@ -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 ("")]

Expand All @@ -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")]

0 comments on commit 64db6ff

Please sign in to comment.