Skip to content
Permalink
Browse files

- unpacker audio naming fixes

  • Loading branch information...
cozy1 committed Sep 16, 2019
1 parent 16369af commit 7486b46065ab76de46b109fecd555c0de9759e2c

Large diffs are not rendered by default.

@@ -133,6 +133,18 @@ All CDLC arrangements must have DDC for Rocksmith
If you wish to overwrite existing DDC you must first
remove the existing DDC from the CDLC. DDC may be
removed/added using the main DDC tab menu feature.</value>
</data>
<data name="creator_autosavetemplate.ToolTip" xml:space="preserve">
<value>If checked automatically saves template
'.dlc.xml' file on the application exit.

If uncheck, templates must be saved
manually by pressing 'Save Template'
button.

NOTE for Pack/Unpacker Usage:
If checked produces friendly named
audio files for non-songpack CDLC.</value>
</data>
<data name="general_lockappid.ToolTip" xml:space="preserve">
<value>Lock App ID

Some generated files are not rendered by default. Learn more.

@@ -205,45 +205,49 @@ public List<string> UnpackSongs(IEnumerable<string> srcPaths, string destPath)
continue;
}

// ODLC status
var isODLC = !Directory.EnumerateFiles(unpackedDir, "toolkit.version", SearchOption.AllDirectories).Any();
if (isODLC || srcPlatform.platform == GamePlatform.None)
continue;

try
// added bulk process to create template xml files here so unpacked folders may be loaded quickly in CDLC Creator if desired
if (ConfigRepository.Instance().GetBoolean("creator_autosavetemplate")) // && !srcPath.Contains("_sp_") && !srcPath.Contains("_songpack_"))
{
// added a bulk process to create template xml files here so unpacked folders may be loaded quickly in CDLC Creator if desired
progress += step;
GlobalExtension.ShowProgress(String.Format("Creating Template XML file for: '{0}'", Path.GetFileName(srcPath)), progress);
using (var packageCreator = new DLCPackageCreator.DLCPackageCreator())
try
{
DLCPackageData info = null;
if (srcPlatform.version == GameVersion.RS2014)
info = DLCPackageData.LoadFromFolder(unpackedDir, srcPlatform, srcPlatform, true, true);
else
info = DLCPackageData.RS1LoadFromFolder(unpackedDir, srcPlatform, false);
// check for ODLC/SongPack
//var isODLC = !Directory.EnumerateFiles(unpackedDir, "toolkit.version", SearchOption.AllDirectories).Any();
var isSongPack = Directory.EnumerateFiles(unpackedDir, "*.wem", SearchOption.AllDirectories).Count() > 2;
if (isSongPack) // && isODLC)
throw new Exception("Found too many *.wem files.");

info.GameVersion = srcPlatform.version;
if (srcPlatform.platform == GamePlatform.None)
throw new Exception("Could not determine GamePlatform.");

switch (srcPlatform.platform)
{
case GamePlatform.Pc:
info.Pc = true;
break;
case GamePlatform.Mac:
info.Mac = true;
break;
case GamePlatform.XBox360:
info.XBox360 = true;
break;
case GamePlatform.PS3:
info.PS3 = true;
break;
}
progress += step;
GlobalExtension.ShowProgress(String.Format("Creating Template XML file for: '{0}'", Path.GetFileName(srcPath)), progress);

// save template xml file (except SongPacks)
if (ConfigRepository.Instance().GetBoolean("creator_autosavetemplate") && !srcPath.Contains("_sp_") && !srcPath.Contains("_songpack_"))
using (var packageCreator = new DLCPackageCreator.DLCPackageCreator())
{
DLCPackageData info = null;
if (srcPlatform.version == GameVersion.RS2014)
info = DLCPackageData.LoadFromFolder(unpackedDir, srcPlatform, srcPlatform, true, true);
else
info = DLCPackageData.RS1LoadFromFolder(unpackedDir, srcPlatform, false);

info.GameVersion = srcPlatform.version;

switch (srcPlatform.platform)
{
case GamePlatform.Pc:
info.Pc = true;
break;
case GamePlatform.Mac:
info.Mac = true;
break;
case GamePlatform.XBox360:
info.XBox360 = true;
break;
case GamePlatform.PS3:
info.PS3 = true;
break;
}

packageCreator.FillPackageCreatorForm(info, unpackedDir);
// fix descrepancies
packageCreator.CurrentGameVersion = srcPlatform.version;
@@ -254,13 +258,13 @@ public List<string> UnpackSongs(IEnumerable<string> srcPaths, string destPath)
packageCreator.SaveTemplateFile(unpackedDir, false);
}
}
}
catch (Exception ex)
{
if (ex.Message.Contains("Object reference"))
errorsFound.AppendLine(String.Format("Could not create Template XML file for: {0}{1}", Path.GetFileName(srcPath) + new string(' ', 5), Environment.NewLine));
else
errorsFound.AppendLine(String.Format("Could not create Template XML file for: {0}{1}{2}{1}", Path.GetFileName(srcPath) + new string(' ', 5), Environment.NewLine, ex.Message));
catch (Exception ex)
{
if (ex.Message.Contains("Object reference"))
errorsFound.AppendLine(String.Format("Could not create Template XML file for: {0}{1}", Path.GetFileName(srcPath) + new string(' ', 5), Environment.NewLine));
else
errorsFound.AppendLine(String.Format("Could not create Template XML file for: {0}{1}{2}{1}", Path.GetFileName(srcPath) + new string(' ', 5), Environment.NewLine, ex.Message));
}
}
}

@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("bbb0fc46")]
[assembly: AssemblyInformationalVersion("16369af2")]
[assembly: AssemblyConfiguration("")]
@@ -1,5 +1,6 @@
Rocksmith Toolkit Release Notes

- unpacker audio naming fixes
- restored missing toolkit CLI executables
- added DDC Unit Testing to RocksmithToolkitGUI.Tests
- merged PsarcLoader into PSARC namespace
@@ -547,7 +547,6 @@ public static DLCPackageData RS1LoadFromFolder(string unpackedDir, Platform plat
/// <param name = "sourcePlatform"></param>
/// <param name="fixMultiTone">If set to <c>true</c> fix low bass tuning </param>
/// <param name="fixLowBass">If set to <c>true</c> fix multitone exceptions </param>
/// <param name="renameAudioPreview">If set to <c>true</c> rename preview audio with friendly name </param>
public static DLCPackageData LoadFromFolder(string unpackedDir, Platform targetPlatform, Platform sourcePlatform = null, bool fixMultiTone = false, bool fixLowBass = false)
{
if (sourcePlatform == null || sourcePlatform.platform == GamePlatform.None || sourcePlatform.version == GameVersion.None)
@@ -701,7 +700,7 @@ public static DLCPackageData LoadFromFolder(string unpackedDir, Platform targetP
BetterDialog2.ShowDialog(errMsg, MESSAGEBOX_CAPTION, null, null, "OK", Bitmap.FromHicon(SystemIcons.Warning.Handle), "Warning ...", 150, 150);
}
else if (bnkFiles.Count > 2)
throw new FileLoadException("<ERROR> Found too many *.bnk files ..." + Environment.NewLine + Environment.NewLine);
throw new FileLoadException("<ERROR> Found too many *.bnk files. SongPacks can not be auto loaded ..." + Environment.NewLine);
else
{
// extract .bnk file data
@@ -56,7 +56,7 @@ public static string GetWwisePath()

if (String.IsNullOrEmpty(wwiseRoot))
throw new FileNotFoundException("Could not find Audiokinetic Wwise installation." + Environment.NewLine +
"Please confirm that either Wwise v2013.2.x v2014.1.x 2015.1.x or 2016.2.x series is installed." + Environment.NewLine);
"Download and install Wwise v2013.2.x from: ignition.customsforge.com/cfsm/wwise" + Environment.NewLine);

var wwiseCLIPath = Directory.EnumerateFiles(wwiseRoot, "WwiseCLI.exe", SearchOption.AllDirectories);
if (!wwiseCLIPath.Any())
@@ -68,7 +68,8 @@ public static string GetWwisePath()

if (!wwiseCLIPath.Any())
throw new FileNotFoundException("Could not find 'WwiseCLI.exe' in " + wwiseRoot + Environment.NewLine +
"Please confirm that either Wwise v2013.2.x v2014.1.x 2015.1.x or 2016.2.x series is installed." + Environment.NewLine);
"Download and install Wwise v2013.2.x from: ignition.customsforge.com/cfsm/wwise" + Environment.NewLine);
// "Please confirm that either Wwise v2013.2.x v2014.1.x 2015.1.x or 2016.2.x series is installed." + Environment.NewLine);

//win32 = 32bit x64 = 64bit
string wwiseCLIexe = wwiseCLIPath.AsParallel().SingleOrDefault(e => e.Contains("Authoring\\Win32"));
@@ -103,9 +104,10 @@ public static string GetWwisePath()

if (Selected == OggFile.WwiseVersion.None)
throw new FileNotFoundException("You have no compatible version of Audiokinetic Wwise installed." + Environment.NewLine +
"Install supportend Wwise version, which are v2013.2.x || v2014.1.x || v2015.1.x || v2016.2.x series " + Environment.NewLine +
"Download and install Wwise v2013.2.x from: ignition.customsforge.com/cfsm/wwise" + Environment.NewLine +
//"Install supported Wwise version, which are v2013.2.x || v2014.1.x || v2015.1.x || v2016.2.x series " + Environment.NewLine +
"if you would like to use toolkit's Wwise autoconvert feature. Did you remember to set the Wwise" + Environment.NewLine +
"installation path in the toolkit General Config menu?" + Environment.NewLine);
"installation path in the toolkit General Config menu if you have a custom Wwise installation?" + Environment.NewLine);

return wwiseCLIexe;
}
@@ -27,5 +27,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("bbb0fc46")]
[assembly: AssemblyInformationalVersion("16369af2")]
[assembly: AssemblyConfiguration("")]
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("bbb0fc46")]
[assembly: AssemblyInformationalVersion("16369af2")]
[assembly: AssemblyConfiguration("")]
@@ -1,3 +1,3 @@
2.9.2.0
bbb0fc46
16369af2

0 comments on commit 7486b46

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