Skip to content
Permalink
Browse files

- improved error checking in CDLC Creator

- fixed issues with the way CDCL Creator handles jvocal repackaging
- improved compatibility with CustomFontGenerator (special thanks to iminashi)
  • Loading branch information
cozy1 committed Nov 1, 2019
1 parent dc9ace6 commit 374512640249fccdd5f829e9f977e2d67c732ae8
Showing with 832 additions and 349 deletions.
  1. +13 −11 PatchAssemblyVersion.ps1
  2. BIN RocksmithPreBuild.exe
  3. +2 −1 RocksmithPreBuild/Program.cs
  4. +43 −18 RocksmithTookitGUI/DLCPackageCreator/ArrangementForm.cs
  5. +2 −2 RocksmithTookitGUI/DLCPackageCreator/DLCPackageCreator.Designer.cs
  6. +131 −136 RocksmithTookitGUI/DLCPackageCreator/DLCPackageCreator.cs
  7. +1 −0 RocksmithTookitGUI/DLCPackageCreator/ShowLightsForm.cs
  8. +13 −11 RocksmithTookitGUI/DLCPackageCreator/VocalsForm.Designer.cs
  9. +2 −0 RocksmithTookitGUI/DLCPackageCreator/VocalsForm.cs
  10. +1 −2 RocksmithTookitGUI/DLCPackerUnpacker/DLCPackerUnpacker.Designer.cs
  11. +5 −4 RocksmithTookitGUI/DLCPackerUnpacker/DLCPackerUnpacker.cs
  12. +12 −0 RocksmithTookitGUI/DLCPackerUnpacker/DLCPackerUnpacker.resx
  13. +1 −1 RocksmithTookitGUI/MainForm.cs
  14. +46 −36 RocksmithTookitGUI/Program.cs
  15. +2 −2 RocksmithTookitGUI/Properties/AssemblyInfo.cs
  16. +3 −0 RocksmithTookitGUI/ReleaseNotes.txt
  17. +1 −0 RocksmithTookitGUI/RocksmithToolkitGUI.csproj
  18. BIN RocksmithToolkitLib.Tests/Resources/CustomFont_jvocals_v1_p.psarc
  19. BIN RocksmithToolkitLib.Tests/Resources/CustomFont_vocals_v1_p.psarc
  20. +2 −0 RocksmithToolkitLib.Tests/RocksmithToolkitLib.Tests.csproj
  21. +3 −0 RocksmithToolkitLib.Tests/Sng2014FileTest.cs
  22. +6 −2 RocksmithToolkitLib/DLCPackage/AggregateGraph2014/AggregateGraph2014.cs
  23. +8 −5 RocksmithToolkitLib/DLCPackage/Arrangement.cs
  24. +12 −6 RocksmithToolkitLib/DLCPackage/DLCPackageCreator.cs
  25. +19 −46 RocksmithToolkitLib/DLCPackage/DLCPackageData.cs
  26. +29 −20 RocksmithToolkitLib/DLCPackage/Packer.cs
  27. +14 −9 RocksmithToolkitLib/DLCPackage/SoundBankGenerator.cs
  28. +16 −14 RocksmithToolkitLib/Extensions/TreeViewOfd.designer.cs
  29. +4 −1 RocksmithToolkitLib/Ogg/OggFile.cs
  30. +336 −0 RocksmithToolkitLib/Ogg/WemFile.cs
  31. +2 −2 RocksmithToolkitLib/Properties/AssemblyInfo.cs
  32. +5 −4 RocksmithToolkitLib/RocksmithToolkitLib.csproj
  33. +1 −1 RocksmithToolkitLib/ToolkitVersion.cs
  34. +91 −3 RocksmithToolkitLib/XML/GlyphDefinitions.cs
  35. +2 −2 RocksmithToolkitUpdater/Properties/AssemblyInfo.cs
  36. +2 −2 VersionInfo.txt
  37. +2 −8 appveyor.yml
@@ -2,10 +2,10 @@ param([string]$Assembly_File)

$content = [IO.File]::ReadAllText($Assembly_File)

$regexAIV = new-object System.Text.RegularExpressions.Regex ('(AssemblyInformationalVersion(Attribute)?\s*\(\s*\")(.*)(\"\s*\))',
$regexAV = new-object System.Text.RegularExpressions.Regex ('(AssemblyVersion(Attribute)?\s*\(\s*\")(.*)(\"\s*\))',
[System.Text.RegularExpressions.RegexOptions]::MultiLine)

$regexAV = new-object System.Text.RegularExpressions.Regex ('(AssemblyVersion(Attribute)?\s*\(\s*\")(.*)(\"\s*\))',
$regexAIV = new-object System.Text.RegularExpressions.Regex ('(AssemblyInformationalVersion(Attribute)?\s*\(\s*\")(.*)(\"\s*\))',
[System.Text.RegularExpressions.RegexOptions]::MultiLine)

$regexAC = new-object System.Text.RegularExpressions.Regex ('(AssemblyConfiguration(Attribute)?\s*\(\s*\")(.*)(\"\s*\))',
@@ -15,23 +15,25 @@ $regexAC = new-object System.Text.RegularExpressions.Regex ('(AssemblyConfigurat
$env:GIT_HASH = $env:APPVEYOR_REPO_COMMIT.Substring(0, 8)
$Assembly_Informational_Version = "$env:GIT_HASH"

# NOTE TO DEVS
# Manually edit the '$AssemblyVersion' and '$AssemblyConfiguration' values here
# before committing a major revisions/releases to github
# these will be automatically applied to all AssemblyInfo.cs files by AppVeyor ...
# Manually edit the '$AssemblyVersion', and '$AssemblyConfiguration' values here as needed
# before committing a major new revisions/releases to github after all testing is completed
# these will be automatically applied to the AssemblyInfo.cs files by AppVeyor ...
$Assembly_Version = "2.9.2.1"

# $AssemblyConfiguration = "BUILD", "BETA", "RELEASE", or (any other string)
# $AssemblyConfiguration = $env:APPVEYOR_REPO_COMMIT_TIMESTAMP.Substring(0,19)
# default usage is for sortable ISO8601 DateTime
# $AssemblyConfiguration = $env:APPVEYOR_REPO_COMMIT_TIMESTAMP.Substring(0,19)
$Assembly_Configuration = $env:APPVEYOR_REPO_COMMIT_TIMESTAMP.Substring(0,19)

# appveyor console output
Write-Host "- Patching: $Assembly_File"
Write-Host "- AssemblyVersion: $Assembly_Version"
Write-Host "- AssemblyInformationVersion: $env:GIT_HASH"
Write-Host "- AssemblyVersion: $Assembly_Configuration"
Write-Host "- AssemblyInformationVersion: $Assembly_Informational_Version"
Write-Host "- AssemblyConfiguration: $Assembly_Configuration"

# update assembly info
$content = $regexAC.Replace($content, '${1}' + $Assembly_Configuration + '${4}')
$content = $regexAIV.Replace($content, '${1}' + $Assembly_Informational_Version + '${4}')
$content = $regexAV.Replace($content, '${1}' + $Assembly_Version + '${4}')
$content = $regexAIV.Replace($content, '${1}' + $Assembly_Informational_Version + '${4}')
$content = $regexAC.Replace($content, '${1}' + $Assembly_Configuration + '${4}')

[IO.File]::WriteAllText($Assembly_File, $content)
BIN +0 Bytes (100%) RocksmithPreBuild.exe
Binary file not shown.
@@ -141,7 +141,7 @@ private static void Main(string[] args)
Console.WriteLine("");

// process (read or write) the PatchAssemblyVersion.ps1 file
Console.WriteLine(" - Reading: " + patchAssemblyVersionPath);
Console.Write(" - Reading: " + patchAssemblyVersionPath);
lines = File.ReadAllLines(patchAssemblyVersionPath).ToList();
if (lines.Any())
{
@@ -156,6 +156,7 @@ private static void Main(string[] args)
if (args[1].ToUpper() == "READ")
{
assemblyVersion = GetStringInBetween("\"", "\"", line);

Console.WriteLine(" - Read $Assembly_Version: " + assemblyVersion);
}
else
@@ -177,7 +177,7 @@ private set
var scrollSpeed = value.ScrollSpeed;
if (scrollSpeed == 0)
scrollSpeed = Convert.ToInt32(ConfigRepository.Instance().GetDecimal("creator_scrollspeed") * 10);

tbarScrollSpeed.Value = Math.Min(scrollSpeed, tbarScrollSpeed.Maximum);
UpdateScrollSpeedDisplay();

@@ -194,7 +194,7 @@ private set
var diaMsg = "Invalid Arrangement Default/Bonus/Alternate Conditon ... " + Environment.NewLine + Environment.NewLine +
"Toolkit will reset the arrangement to" + Environment.NewLine +
"the default represent condition." + Environment.NewLine;
BetterDialog2.ShowDialog(diaMsg, "<WARNING> Arrangement Represent", null, null, "OK", Bitmap.FromHicon(SystemIcons.Warning.Handle), "Warning", 150, 150);
BetterDialog2.ShowDialog(diaMsg, "Arrangement Represent ...", null, null, "OK", Bitmap.FromHicon(SystemIcons.Warning.Handle), "Warning", 150, 150);
value.Represent = true;
value.BonusArr = false;
}
@@ -369,7 +369,7 @@ public bool AddXmlArrangement(string xmlFilePath)
SongXml = new SongXML { File = xmlFilePath }
};

var arrType = DetectArrangementType(xmlFilePath);
ArrangementType arrType = DetectArrangementType(xmlFilePath);

// SETUP FIELDS
if (arrType == ArrangementType.Vocal)
@@ -383,17 +383,20 @@ public bool AddXmlArrangement(string xmlFilePath)
{
cmbArrangementName.SelectedItem = ArrangementName.JVocals;

// Try to find a custom font texture with the filename lyrics.dds
string fontTexture = Path.Combine(Path.GetDirectoryName(xmlFilePath), "lyrics.dds");
if (File.Exists(fontTexture))
{
Arrangement.LyricArt = fontTexture;
}
//// Try to find a custom font dds file
//var projectDir = Path.GetDirectoryName(xmlFilePath);
//// e.g. path D:\\Temp\RS Root\dlc\Nanase-Aikawa_Yumemiru-Shoujo-ja-Irarenai_v2_RS2014_Pc\EOF\innayumemirushoujojairarenai_jvocals.xml
//if (Path.GetFileName(projectDir).Equals("EOF"))
// projectDir = Path.GetDirectoryName(projectDir);

//var customFontPath = Directory.EnumerateFiles(projectDir, "*.dds", SearchOption.AllDirectories)
// .Where(fn => Path.GetFileName(fn).Equals("lyrics.dds") || Path.GetFileName(fn).StartsWith("lyrics_")).FirstOrDefault();

//if (!String.IsNullOrEmpty(customFontPath))
// Arrangement.LyricArt = customFontPath;
}
else
{
cmbArrangementName.SelectedItem = ArrangementName.Vocals;
}
}
else if (arrType == ArrangementType.ShowLight)
{
@@ -402,7 +405,17 @@ public bool AddXmlArrangement(string xmlFilePath)
}
else // add Instrument Arrangement
{
_song2014 = Song2014.LoadFromFile(xmlFilePath);
try
{
_song2014 = Song2014.LoadFromFile(xmlFilePath);
}
catch (Exception ex)
{
BetterDialog2.ShowDialog("Could not add file to Arrangements: " + Path.GetFileName(xmlFilePath) + Environment.NewLine +
ex.InnerException.Message, "Invalid Instrument Arrangement", null, null, "OK", Bitmap.FromHicon(SystemIcons.Warning.Handle), "Warning", 150, 150);
return false;
}

if (_song2014 == null)
return false;

@@ -435,7 +448,7 @@ public bool AddXmlArrangement(string xmlFilePath)

if (!hasTuning)
{
MessageBox.Show("<Warning> Default E Standard tuning was selected for" + Environment.NewLine +
MessageBox.Show("<WARNING> Default E Standard tuning was selected for" + Environment.NewLine +
"this RS1 arrangement. Please confirm the arrangement " + Environment.NewLine +
"tuning and all other data before leaving the editor.",
"Default Tuning Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
@@ -546,6 +559,7 @@ public bool AddXmlArrangement(string xmlFilePath)
return false;
}
}

return true;
}

@@ -590,12 +604,12 @@ private void EditShowlights()

private void EditVocals()
{
using (var form = new VocalsForm(Arrangement.LyricArt, Arrangement.SongXml.File))
using (var form = new VocalsForm(Arrangement.LyricsArtPath, Arrangement.SongXml.File))
{
if (DialogResult.OK != form.ShowDialog())
return;

Arrangement.LyricArt = File.Exists(form.ArtPath) ? form.ArtPath : null;
Arrangement.LyricsArtPath = File.Exists(form.ArtPath) ? form.ArtPath : null;

if (!String.IsNullOrEmpty(form.VocalsPath))
{
@@ -676,14 +690,24 @@ private bool FixBassTuning()

public bool IsAlreadyAdded(string xmlFilePath)
{
var xmlFileName = Path.GetFileName(xmlFilePath);
for (int i = 0; i < _parentControl.lstArrangements.Items.Count; i++)
{
var selectedArrangement = (Arrangement)_parentControl.lstArrangements.Items[i];
var selectedArrangementFileName = Path.GetFileName(selectedArrangement.SongXml.File);
var arrangementFileName = Path.GetFileName(Arrangement.SongXml.File);
// potential issue using full path so just use file names
// D:\\Temp\RS Root\dlc\Font Test Project\innayumemirushoujojairarenai_jvocals.xml
// D:\Temp\RS Root\dlc\Font Test Project\innayumemirushoujojairarenai_jvocals.xml

if (xmlFileName != selectedArrangementFileName)
continue;
if (!String.IsNullOrEmpty(arrangementFileName) && xmlFileName != arrangementFileName)
continue;

if (!xmlFilePath.Equals(selectedArrangement.SongXml.File)) continue;
if (xmlFilePath.Equals(Arrangement.SongXml.File)) continue;
return true;
}

return false;
}

@@ -1043,7 +1067,8 @@ private void btnBrowseXml_Click(object sender, EventArgs e)
return;
}

AddXmlArrangement(XmlPath);
if (!AddXmlArrangement(XmlPath))
XmlPath = String.Empty;
}
}

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

0 comments on commit 3745126

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