Skip to content
Permalink
Browse files

- fixed packer/unpacker PromptComplete now comes to front

  • Loading branch information
cozy1 committed Dec 1, 2019
1 parent 9e2420b commit e9757e8621d869b28de226cc9dfa2579c1eb9f5c
@@ -612,9 +612,9 @@ public string SaveTemplateFile(string templateDir = "", bool validate = true)
IsDirty = false;
}
}
catch
catch (Exception ex)
{
// DO NOTHING //
throw new Exception("<ERROR> SaveTemplateFile Failed ..." + Environment.NewLine + ex.Message);
}

// Re-Absolutize the paths
@@ -2412,11 +2412,9 @@ private void ProcessCompleted(object sender, RunWorkerCompletedEventArgs e)

message += String.Format("{0}Would you like to open the folder where the package was generated?{0}", Environment.NewLine);
if (MessageBox.Show(message, MESSAGEBOX_CAPTION, MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
Process.Start(Path.GetDirectoryName(DestPath));
}
break;

break;
case "error":
var message2 = String.Format("Package generation {2} failed. See below: {0}{1}{0}", Environment.NewLine, errorsFound, ToolkitVersion.RSTKGuiVersion);
MessageBox.Show(message2, MESSAGEBOX_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
@@ -2603,10 +2601,16 @@ private void btnAudio_Click(object sender, EventArgs e)
/// </summary>
private void btnDevUse_Click(object sender, EventArgs e)
{
PackageRating = "4";
return;
//PackageRating = "4";
//return;

//IOExtension.DeleteDirectory(null);

IOExtension.DeleteDirectory(null);
var l = DateTime.Parse("2019/10/22").Ticks;
var dateTime = new DateTime(l);
var degugMe = Application.LocalUserAppDataPath;

This comment has been minimized.

Copy link
@L0FKA

L0FKA Dec 6, 2019

Contributor

debugging this sill? :)


return;

string srcPath;
string destPath;
@@ -2638,8 +2642,6 @@ private void btnDevUse_Click(object sender, EventArgs e)

var recycleDir = Packer.RecycleUnpackedDir(unpackedDir);
var recycleFolder = Packer.RecycleUnpackedDir(unpackedFolder);


}

private void btnTemplateSave_Click(object sender, EventArgs e)
@@ -23,7 +23,7 @@
namespace RocksmithToolkitGUI.DLCPackerUnpacker
{
public partial class DLCPackerUnpacker : UserControl
{
{
private const string MESSAGEBOX_CAPTION = "CDLC Packer/Unpacker";
private const string TKI_APPID = "(AppID by Packer/Unpacker)";
private BackgroundWorker bwRepack = new BackgroundWorker();
@@ -124,7 +124,7 @@ private void PromptComplete(string destDirPath, bool actionPacking = true, strin

errMsg += "Would you like to open the destination path? ";

if (MessageBox.Show(new Form { TopMost = true }, errMsg, MESSAGEBOX_CAPTION, MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
if (MessageBox.Show(errMsg, MESSAGEBOX_CAPTION, MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
Process.Start(destDirPath);
}

@@ -92,7 +92,9 @@ static void Main(string[] args)
var exception = e.ExceptionObject as Exception;
GlobalsConfig.Log.Error(" - Unhandled.Exception:\n\nSource: {0}\nTarget: {1}\n{2}", exception.Source, exception.TargetSite, exception.ToString());

if (MessageBox.Show(String.Format("Unhandled.Exception:\n\n{0}\nPlease send us the {1} file if you need help. Open log file now?", exception.Message.ToString(), Path.GetFileName(logPath)), "Please Read This Important Message Completely ...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
if (MessageBox.Show(String.Format("Unhandled.Exception:\n\n{0}\nPlease send us the {1} file if you need help. Open log file now?",
exception.Message.ToString(), Path.GetFileName(logPath)),
"Please Read This Important Message Completely ...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
{
Process.Start(logPath);
}
@@ -113,13 +115,15 @@ static void Main(string[] args)

if (exception.Message != null && exception.Message.Contains("expired"))
{
MessageBox.Show(String.Format("Activation.ThreadException:\n\n{0}", exception.Message), "Please Read This Important Message Completely ...", MessageBoxButtons.OK, MessageBoxIcon.Warning);
MessageBox.Show(String.Format("Activation.ThreadException:\n\n{0}", exception.Message),
"Please Read This Important Message Completely ...", MessageBoxButtons.OK, MessageBoxIcon.Warning);
Application.Exit();
}
else
{
var exMessage = String.IsNullOrEmpty(packerErrMsg) ? exception.Message : String.Format("{0}\nPacker.ThreadException (Corrupt CDLC):\n{1}\n", exception.Message, packerErrMsg.Trim());
if (MessageBox.Show(String.Format("Application.ThreadException:\n\n{0}\n\nPlease send us the {1} file if you need help. Open log file now?", exMessage, Path.GetFileName(logPath)), "Please Read This Important Message Completely ...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
if (MessageBox.Show(String.Format("Application.ThreadException:\n\n{0}\n\nPlease send us the {1} file if you need help. Open log file now?", exMessage, Path.GetFileName(logPath)),
"Please Read This Important Message Completely ...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
{
Process.Start(logPath);
}
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.1")]
[assembly: AssemblyInformationalVersion("fa63cc4e")]
[assembly: AssemblyConfiguration("2019-11-15T14:17:05")]
[assembly: AssemblyInformationalVersion("9e2420bb")]
[assembly: AssemblyConfiguration("2019-11-30T19:10:24")]
@@ -1,5 +1,6 @@
Rocksmith Toolkit Release Notes

- fixed packer/unpacker PromptComplete now comes to front
- autoconvert old template relative path format to the new format
- added additional exception handling for corrupt '*.dlc.xml' templates
- fixed LoadFromFolder custom font handling
@@ -186,6 +186,9 @@ public static string Unpack(string srcPath, string destDirPath, Platform overrid

foreach (var sngFile in sngFiles)
{
// prevent ContextSwitchDeadlock exceptions in long processes
Application.DoEvents();

var xmlEofFile = Path.Combine(Path.GetDirectoryName(sngFile), String.Format("{0}.xml", Path.GetFileNameWithoutExtension(sngFile)));
xmlEofFile = xmlEofFile.Replace(String.Format("bin{0}{1}", Path.DirectorySeparatorChar, srcPlatform.GetPathName()[1].ToLower()), "arr");
var xmlSngFile = xmlEofFile.Replace(".xml", ".sng.xml");
@@ -693,6 +696,9 @@ private static string ExtractPSARC(string srcPath, string destPath, Stream input
// InflateEntries - compatible with RS1 and RS2014 files
foreach (var entry in psarc.TOC)
{
// prevent ContextSwitchDeadlock exceptions in long processes
Application.DoEvents();

// remove invalid characters from entry.Name so CDLC can be unpacked
var validEntryName = entry.Name.Replace("?", "~");
var inputPath = Path.Combine(destPath, validEntryName);
@@ -706,9 +712,6 @@ private static string ExtractPSARC(string srcPath, string destPath, Stream input
else
{
Directory.CreateDirectory(Path.GetDirectoryName(inputPath));
if (entry.Name.Contains("man_lead.xml"))
Debug.WriteLine("Found it.");

psarc.InflateEntry(entry, inputPath);
// Close
if (entry.Data != null)
@@ -1184,6 +1187,10 @@ public static string GetUnpackedDir(string srcPath, string destPath, Platform ta
}
}

// system archive file handling
if (fnameWithoutExt.EndsWith(".psarc"))
fnameWithoutExt = fnameWithoutExt.Replace(".psarc", "_psarc");

var unpackedDir = String.Format("{0}_{1}", fnameWithoutExt, targetPlatform);

if (!String.IsNullOrEmpty(destPath))
@@ -1266,6 +1273,10 @@ public static string RecycleUnpackedDir(string srcPath)
}
}

// special handling of system archive files
if (srcPath.Contains("_psarc"))
fileExtension = ".psarc";

versionPlatformExtension.Add(versionPlatform, fileExtension);
}
}
@@ -1277,6 +1288,8 @@ public static string RecycleUnpackedDir(string srcPath)
{
var vpIndex = srcPath.LastIndexOf(item.Key, StringComparison.Ordinal);
var pathWoVP = srcPath.Substring(0, vpIndex);
// special handling of system archives
pathWoVP = pathWoVP.Replace("_psarc", "");
destPath = String.Format("{0}{1}", pathWoVP, item.Value);
break;
}
@@ -729,6 +729,19 @@ public static string SplitString(string inputText, int lineLength, bool splitOnS
return finalString;
}

/// <summary>
/// Split contiguous string on caps and insert spaces
/// </summary>
/// <param name="source"></param>
/// <returns></returns>
public static string SplitCamelCase(string source)
{
string[] resultArray = Regex.Split(source, @"(?<!^)(?=[A-Z])");
var result = String.Join(" ", resultArray).Trim();

return result;
}

#endregion
}
}
@@ -8,7 +8,7 @@ namespace RocksmithToolkitLib
{
public enum GamePlatform { Pc, Mac, XBox360, PS3, None };
public enum GameVersion { RS2012, RS2014, None };

public class Platform
{
public GamePlatform platform { get; set; }
@@ -40,7 +40,8 @@ public override int GetHashCode()

public EndianBitConverter GetBitConverter
{
get{
get
{
switch (platform)
{
case GamePlatform.Pc:
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.1")]
[assembly: AssemblyInformationalVersion("fa63cc4e")]
[assembly: AssemblyConfiguration("2019-11-15T14:17:05")]
[assembly: AssemblyInformationalVersion("9e2420bb")]
[assembly: AssemblyConfiguration("2019-11-30T19:10:24")]
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.1")]
[assembly: AssemblyInformationalVersion("fa63cc4e")]
[assembly: AssemblyConfiguration("2019-11-15T14:17:05")]
[assembly: AssemblyInformationalVersion("9e2420bb")]
[assembly: AssemblyConfiguration("2019-11-30T19:10:24")]
@@ -1,3 +1,3 @@
2.9.2.1
fa63cc4e
2019-11-15T14:17:05
9e2420bb
2019-11-30T19:10:24

0 comments on commit e9757e8

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