Skip to content

Commit

Permalink
More crash dump report for mé !
Browse files Browse the repository at this point in the history
  • Loading branch information
MaelElseware committed Aug 29, 2018
1 parent 0f68abd commit bc75172
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 14 deletions.
1 change: 1 addition & 0 deletions CleanAndLaunch/CleanAndLaunch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
1 change: 1 addition & 0 deletions ManifestBuilder/ManifestBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
15 changes: 11 additions & 4 deletions NaturalLauncher/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,19 @@ private void Website_Click(object sender, RoutedEventArgs e)

private void Setting_Click(object sender, RoutedEventArgs e)
{
if (sw == null)
try
{
if (sw == null)
{
sw = new Settings();
}
sw.SetMainWindowRef(this);
sw.Show();
}
catch(Exception exception)
{
sw = new Settings();
App.SendReport(exception, "Could Not Open Setting window");
}
sw.SetMainWindowRef(this);
sw.Show();
}

private void Verify_Click(object sender, RoutedEventArgs e)
Expand Down
1 change: 1 addition & 0 deletions NaturalLauncher/NaturalLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
4 changes: 2 additions & 2 deletions NaturalLauncher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
8 changes: 6 additions & 2 deletions NaturalLauncher/SelfUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ public static bool Verify(byte[] data, string PublicKeyPath, string SignatureHex

if (publicKey == null)
{
throw new ArgumentNullException("publicKey");
MessageBoxResult AlertBox = MessageBox.Show("Your launcher is missing the public crypto key", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
throw new ArgumentNullException("MissingKeyFile");
}

if (signature == null)
Expand All @@ -293,7 +294,10 @@ public static bool Verify(byte[] data, string PublicKeyPath, string SignatureHex

public static X509Certificate2 LoadPublicKey(string PublicKeyPath)
{
return new X509Certificate2(PublicKeyPath);
if(File.Exists(PublicKeyPath))
return new X509Certificate2(PublicKeyPath);
else
throw new ArgumentNullException("MissingKeyFile");
}

public static byte[] StringToByte(string str)
Expand Down
22 changes: 16 additions & 6 deletions NaturalLauncher/Settings.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@ public Settings()
break;
}

XmlBuilder.ReadConfigXml(out string uno, out bool dos, out string discordStatus, out bool keepAlive);
Launcher.keepLauncherAlive = keepAlive;
DiscordTxtbox.Text = discordStatus;
KeepAliveChecker.IsChecked = keepAlive;

windowfullyopen = true;
try
{
XmlBuilder.ReadConfigXml(out string uno, out bool dos, out string discordStatus, out bool keepAlive);
Launcher.keepLauncherAlive = keepAlive;
DiscordTxtbox.Text = discordStatus;
KeepAliveChecker.IsChecked = keepAlive;
windowfullyopen = true;
}
catch(Exception exception)
{
App.SendReport(exception, "Could Not Read ConfigXml");
}

}

Expand Down Expand Up @@ -200,6 +206,10 @@ private void BrowseHLFolderButton_Click(object sender, RoutedEventArgs e)
Launcher.HLFolder = folderPath;
Launcher.NSFolder = folderPath + System.IO.Path.DirectorySeparatorChar + "ns";
}
else
{
// throw new FileNotFoundException("Could not find HL folder"); // no need to crash the launcher for this
}

MainWindowReference.CallUpdateGame();
}
Expand Down

0 comments on commit bc75172

Please sign in to comment.