Skip to content
Permalink
Browse files

- added OS, and CultureInfo to log

  • Loading branch information
cozy1 committed Oct 12, 2019
1 parent 8f37570 commit eb5fdf0b755893d6acf98fa1ab02087a1557570e
@@ -9,6 +9,7 @@
using System.Threading;
using RocksmithToolkitGUI.Config;
using NLog;
using System.Globalization;

namespace RocksmithToolkitGUI
{
@@ -47,6 +48,7 @@ static void Main(string[] args)
String.Format(" - RocksmithToolkitUpdater: v{0}\r\n ", updaterVersion) +
String.Format(" - Dynamic Difficulty Creator: v{0}\r\n ", FileVersionInfo.GetVersionInfo(Path.Combine(ExternalApps.TOOLKIT_ROOT, ExternalApps.APP_DDC)).ProductVersion) +
String.Format(" - OS: {0} ({1} bit)\r\n ", Environment.OSVersion, Environment.Is64BitOperatingSystem ? "64" : "32") +
String.Format(" - CultureInfo: {0}\r\n ", CultureInfo.CurrentCulture.ToString()) +
String.Format(" - .NET Framework Runtime: v{0}\r\n ", Environment.Version) +
String.Format(" - JIT: {0}\r\n ", JitVersionInfo.GetJitVersion()) +
String.Format(" - WINE_INSTALLED: {0}\r\n ", GeneralExtension.IsWine()) +
@@ -1,6 +1,7 @@
Rocksmith Toolkit Release Notes

- simplified custom exception messages to encourage users to reads them completely
- added OS, and CultureInfo to log
- simplified custom exception messages to encourage users to read them
- added toolkit library validation check
- improved tone name error handling
- unpacker audio naming fixes
@@ -287,9 +287,7 @@ private static void InitRijndael(Rijndael rij, byte[] key, CipherMode cipher)
{
if (!activated)
{
// invoke Start method outside of ASP.NET
// WebActivatorEx.ActivationManager.RunPreStartMethods(true);
Startup.Start();
Startup.Start(); // invoke Start method
activated = true;
}

@@ -5,10 +5,9 @@
using System.Security.Authentication;
using RocksmithToolkitLib.Extensions;
using System.Diagnostics;
// using WebActivatorEx;
using System.Globalization;


// [assembly: PreApplicationStartMethod(typeof(RocksmithToolkitLib.Startup), "Start", RunInDesigner = true)]
namespace RocksmithToolkitLib
{
public static class ToolkitVersion
@@ -86,7 +85,12 @@ public static bool IsRSTKLibValid()
// return false;
var rstkLibPath = typeof(RocksmithToolkitLib.ToolkitVersion).Assembly.Location;
var libDate = File.GetCreationTime(rstkLibPath);
if (DateTime.Now > libDate.AddDays(30))
// account for user's DateTime regional differences
CultureInfo cultureInfo = new CultureInfo("en-US");
DateTime libDT = DateTime.Parse(libDate.ToString(), cultureInfo, DateTimeStyles.NoCurrentDateDefault);
DateTime nowDT = DateTime.Parse(DateTime.Now.ToString(), cultureInfo, DateTimeStyles.NoCurrentDateDefault);

if (nowDT > libDT.AddDays(30))
return false;

return true;
@@ -95,7 +99,7 @@ public static bool IsRSTKLibValid()

public static class Startup
{
// class library entry point hackery
// hackery used as class library entry point
public static void Start()
{
if (!ToolkitVersion.IsRSTKLibValid())

0 comments on commit eb5fdf0

Please sign in to comment.
You can’t perform that action at this time.