Skip to content

Commit

Permalink
Launch fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew committed Jan 12, 2016
1 parent 3510bdc commit 0c9b793
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 11 deletions.
30 changes: 28 additions & 2 deletions SteamCleaner/Clients/Gog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,40 @@ internal class Gog
{
public static bool Exisit()
{
var root = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\GOG.com\Games");
var regPath = "";
var is64Bit = Environment.Is64BitOperatingSystem;
if (is64Bit)
{
Console.WriteLine("64 Bit operating system detected");
regPath = @"SOFTWARE\Wow6432Node\GOG.com\Games";
}
else
{
Console.WriteLine("32 Bit operating system detected");
regPath = @"SOFTWARE\GOG.com\Games";
}

var root = Registry.LocalMachine.OpenSubKey(regPath);
return root != null;
}

public static List<string> GetGames()
{
var paths = new List<string>();
var root = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\GOG.com\Games");
var regPath = "";
var is64Bit = Environment.Is64BitOperatingSystem;
if (is64Bit)
{
Console.WriteLine("64 Bit operating system detected");
regPath = @"SOFTWARE\Wow6432Node\GOG.com\Games";
}
else
{
Console.WriteLine("32 Bit operating system detected");
regPath = @"SOFTWARE\GOG.com\Games";
}

var root = Registry.LocalMachine.OpenSubKey(regPath);
if (root != null)
paths.AddRange(
root.GetSubKeyNames()
Expand Down
44 changes: 40 additions & 4 deletions SteamCleaner/Clients/Origin.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#region

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand All @@ -13,15 +14,41 @@ internal class Origin
{
public static bool Exist()
{
var key = Registry.LocalMachine.OpenSubKey(@"Software\Origin");
var regPath = "";
var is64Bit = Environment.Is64BitOperatingSystem;
if (is64Bit)
{
Console.WriteLine("64 Bit operating system detected");
regPath = @"Software\Wow6432Node\Origin";
}
else
{
Console.WriteLine("32 Bit operating system detected");
regPath = @"Software\Origin";
}

var key = Registry.LocalMachine.OpenSubKey(regPath);
return key?.GetValue("ClientPath") != null;
}

public static List<string> GetGames()
{
if (!Exist()) return null;
var paths = new List<string>();
var root = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Electronic Arts");
var regPath = "";
var is64Bit = Environment.Is64BitOperatingSystem;
if (is64Bit)
{
Console.WriteLine("64 Bit operating system detected");
regPath = @"SOFTWARE\Wow6432Node\Electronic Arts";
}
else
{
Console.WriteLine("32 Bit operating system detected");
regPath = @"SOFTWARE\Electronic Arts";
}

var root = Registry.LocalMachine.OpenSubKey(regPath);
if (root != null)
paths.AddRange(
root.GetSubKeyNames()
Expand All @@ -30,8 +57,17 @@ public static List<string> GetGames()
.Select(key => key.GetValue(@"Install Dir"))
.Select(o => o?.ToString())
.Where(Directory.Exists));

var legacyRoot = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\EA Games");
if (is64Bit)
{
Console.WriteLine("64 Bit operating system detected");
regPath = @"SOFTWARE\Wow6432Node\EA Games";
}
else
{
Console.WriteLine("32 Bit operating system detected");
regPath = @"SOFTWARE\EA Games";
}
var legacyRoot = Registry.LocalMachine.OpenSubKey(regPath);
if (legacyRoot != null)
paths.AddRange(
legacyRoot.GetSubKeyNames()
Expand Down
15 changes: 14 additions & 1 deletion SteamCleaner/Clients/Steam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,21 @@ public static string FixPath(string dir)

public static string GetSteamPath()
{
var regPath = "";
var steamPath = "";
var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Valve\Steam");
var is64Bit = Environment.Is64BitOperatingSystem;
if (is64Bit)
{
Console.WriteLine("64 Bit operating system detected");
regPath = "SOFTWARE\\Wow6432Node\\Valve\\Steam";
}
else
{
Console.WriteLine("32 Bit operating system detected");
regPath = "SOFTWARE\\Valve\\Steam";
}

var key = Registry.LocalMachine.OpenSubKey(regPath);
if (key != null)
{
var o = key.GetValue("InstallPath");
Expand Down
6 changes: 3 additions & 3 deletions SteamCleaner/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// associated with an assembly.

[assembly: AssemblyTitle("SteamCleaner")]
[assembly: AssemblyDescription("Free up space on your PC from all those pesky redistributables left by Steam")]
[assembly: AssemblyDescription("A PC utility for restoring disk space from various game like Origin, Steam and GoG")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SteamCleaner")]
Expand Down Expand Up @@ -39,5 +39,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
1 change: 1 addition & 0 deletions SteamCleaner/SteamCleaner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>noun_131514_cc.ico</ApplicationIcon>
Expand Down
2 changes: 1 addition & 1 deletion version.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<steamcleaner>
<version>1.5</version>
<version>1.6</version>
<url>https://github.com/Codeusa/SteamCleaner/releases/latest</url>
</steamcleaner>

9 comments on commit 0c9b793

@wopian
Copy link
Contributor

@wopian wopian commented on 0c9b793 Jan 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (1.6) hasn't fixed the no-launch issue on Windows 10 Pro 64x.

@andrewmd5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use Windows 10 64x so you might want to get more descriptive.

@wopian
Copy link
Contributor

@wopian wopian commented on 0c9b793 Jan 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GUI never opens and the process kills itself after a couple of seconds of being opened.

1.4 works fine, 1.5 and 1.6 do not.

@andrewmd5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redownload 1.6

@wopian
Copy link
Contributor

@wopian wopian commented on 0c9b793 Jan 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@xDragonZ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested 1.4 and 1.7, it doesn't launch the app, perhaps I don't have steam installed?

@andrewmd5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xDragonZ download 1.8, create an issue with what the log file says.

@FrobtheBuilder
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xDragonZ you don't know if you have steam installed?

@xDragonZ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FrobtheBuilder Duh, I open the steam directly on my external drive

Please sign in to comment.