Skip to content

Commit

Permalink
Update check, changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
elpatron68 committed Oct 16, 2022
1 parent 065b97b commit d0e204c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 13 deletions.
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# SnowRunner-Tool Changes

## v1.0.5.1 (16.10.2022)
- Fixed a bug which deleted backup files while moving old backups to new location at the first start of v1.0.5.0
- Fixed a bug preventing the tool to start if Steam client is not installed
- Made update check more resistant against failures

## v1.0.5.0 (15.10.2022)
- Add support for Steam platform
- Remove PAK backup functionality
- UI changes

## v1.0.4.0 (21.08.2022)

- Option to restore a single save game slot (#1 - #4) or all slots from a backup
Expand Down
17 changes: 12 additions & 5 deletions SnowRunner-Tool/DiscoverPaths.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,19 @@ public static string FindBaseDirectory(string platform)
{
RegistryKey key;
key = Registry.CurrentUser.OpenSubKey(@"Software\Valve\Steam");
String value = (String)key.GetValue("SteamPath");
value = value.Replace("/", "\\");
value = value + @"\userdata";
if (Directory.Exists(value))
try
{
String value = (String)key.GetValue("SteamPath");
value = value.Replace("/", "\\");
value = value + @"\userdata";
if (Directory.Exists(value))
{
p = SteamParser.SteamSaveGameDirectory(value);
}
}
catch
{
p = SteamParser.SteamSaveGameDirectory(value);
// Registry key not found
}
}
if (platform == "epic")
Expand Down
29 changes: 22 additions & 7 deletions SnowRunner-Tool/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ public MainWindow(ILogger logger, string[] args)
{
case 0:
// No platform found
Winforms.MessageBox.Show("No saved games were found. You have to have at least one save game to use SnowRunner-Tool", "Platform detection");
Winforms.MessageBox.Show("No saved games were found. You have to have at least one save game to use SnowRunner-Tool.\n\n" +
"Restart SnowRunner-Tool after you have saved the game at least once.", "Platform detection");
// Close();
Application.Current.Shutdown();
break;
case 1:
// Epic
Expand All @@ -81,7 +84,8 @@ public MainWindow(ILogger logger, string[] args)
Winforms.MessageBoxManager.OK = "Steam";
Winforms.MessageBoxManager.Cancel = "Epic Games";
Winforms.MessageBoxManager.Register();
var answer = Winforms.MessageBox.Show("Saved games from the Epic Games- and Steam- version of SnowRunner were found. Select the platform you want to use.", "Select SnowRunner platform", Winforms.MessageBoxButtons.OKCancel);
var answer = Winforms.MessageBox.Show("Saved games from the Epic Games- and Steam- version of SnowRunner were found.\n\n" +
"Select the platform you want to use.", "Select SnowRunner platform", Winforms.MessageBoxButtons.OKCancel);
Winforms.MessageBoxManager.Unregister();
switch (answer)
{
Expand Down Expand Up @@ -477,11 +481,19 @@ private async void MnChkUpd_Click(object sender, RoutedEventArgs e)

private async void CheckUpdate()
{
(int, string) r = await UpdateCheck.CheckGithubReleses(AssemblyVersion);
int result = r.Item1;
if (result > 0)
try
{
(int, string) r = await UpdateCheck.CheckGithubReleses(AssemblyVersion);
int result = r.Item1;
if (result > 0)
{
ToastNote.Notify("Update available", "A new version of SnowRunner-Tool is available. See menu 'Help - Check for update' to download the latest version.");
}
}
catch
{
ToastNote.Notify("Update available", "A new version of SnowRunner-Tool is available. See menu 'Help - Check for update' to download the latest version.");
_logger.Warning("Update check failed.");
// No internet connection
}
}

Expand Down Expand Up @@ -739,7 +751,10 @@ private void SetAutobackup(int interval)
default:
break;
}
fswGameBackup.EnableRaisingEvents = interval > 0;
if (Platform != null)
{
fswGameBackup.EnableRaisingEvents = interval > 0;
}
}

private void FileSystemWatcher_Changed(object sender, FileSystemEventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion SnowRunner-Tool/SnowRunner-Tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>P:\snowrunner\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down

0 comments on commit d0e204c

Please sign in to comment.