Skip to content
Permalink
Browse files

- added system display setting logging and verification

- fixed VS Sandbox error that occurs when using newer version of .NET Framework
- fixed known VS MouseUp glitch in CDLC Creator GUI
  • Loading branch information...
cozy1 committed Mar 6, 2019
1 parent a61b219 commit 6b07b79cacfa5088c830cd5b4abdfe6e4895c58d
Showing with 429 additions and 309 deletions.
  1. +1 −1 CreateToolkitShortcut/CreateToolkitShortcut/CreateToolkitShortcut.csproj
  2. +4 −1 RocksmithTookitGUI/App.config
  3. +1 −1 RocksmithTookitGUI/CDLC2Tab/CDLC2Tab.cs
  4. +1 −1 RocksmithTookitGUI/Config/GeneralConfig.cs
  5. +2 −2 RocksmithTookitGUI/DDC/DDC.cs
  6. +1 −1 RocksmithTookitGUI/DLCInlayCreator/DLCInlayCreator.cs
  7. +209 −207 RocksmithTookitGUI/DLCPackageCreator/DLCPackageCreator.Designer.cs
  8. +25 −17 RocksmithTookitGUI/DLCPackageCreator/DLCPackageCreator.cs
  9. +3 −0 RocksmithTookitGUI/DLCPackageCreator/DLCPackageCreator.resx
  10. +2 −2 RocksmithTookitGUI/DLCPackerUnpacker/DLCPackerUnpacker.cs
  11. +15 −12 RocksmithTookitGUI/MainForm.Designer.cs
  12. +19 −8 RocksmithTookitGUI/MainForm.cs
  13. +1 −1 RocksmithTookitGUI/Program.cs
  14. +1 −1 RocksmithTookitGUI/Properties/AssemblyInfo.cs
  15. +1 −2 RocksmithTookitGUI/ReadMe.txt
  16. +3 −0 RocksmithTookitGUI/ReleaseNotes.txt
  17. +1 −1 RocksmithTookitGUI/RocksmithToolkitGUI.csproj
  18. +2 −2 RocksmithTookitGUI/UpdateForm.cs
  19. +3 −3 RocksmithToolkitCLI/convert2012/Program.cs
  20. +3 −3 RocksmithToolkitCLI/packagecreator/Program.cs
  21. +10 −0 RocksmithToolkitLib/App.config
  22. +13 −13 RocksmithToolkitLib/DLCPackage/DLCPackageCreator.cs
  23. +2 −2 RocksmithToolkitLib/DLCPackage/DLCPackageData.cs
  24. +1 −1 RocksmithToolkitLib/DLCPackage/Packer.cs
  25. +15 −15 RocksmithToolkitLib/Extensions/ExternalApps.cs
  26. +68 −2 RocksmithToolkitLib/Extensions/GeneralExtension.cs
  27. +1 −1 RocksmithToolkitLib/Properties/AssemblyInfo.cs
  28. +1 −1 RocksmithToolkitLib/PsarcLoader/PsarcLoader.cs
  29. +3 −2 RocksmithToolkitLib/RocksmithToolkitLib.csproj
  30. +1 −1 RocksmithToolkitLib/ToolkitVersion.cs
  31. +2 −2 RocksmithToolkitLib/ToolkitVersionOnline.cs
  32. +1 −1 RocksmithToolkitLib/XmlRepository/XmlRepository.cs
  33. +10 −0 RocksmithToolkitUpdater/App.config
  34. +1 −1 RocksmithToolkitUpdater/Properties/AssemblyInfo.cs
  35. +1 −0 RocksmithToolkitUpdater/RocksmithToolkitUpdater.csproj
  36. BIN ThirdPartyApps/tools/CreateToolkitShortcut.exe
  37. +1 −1 VersionInfo.txt
@@ -58,7 +58,7 @@
<PostBuildEvent>REM Copy CreateToolkitShortCut.exe to tools folder

if $(ConfigurationName) == Release (
COPY /Y "$(TargetDir)CreateToolkitShortcut.exe" "$(SolutionDir)\..\Third-party Apps\tools\CreateToolkitShortcut.exe"
COPY /Y "$(TargetDir)CreateToolkitShortcut.exe" "$(SolutionDir)\..\ThirdPartyApps\tools\CreateToolkitShortcut.exe"
)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- App.config is solution to error 'caused the assembly to be sandboxed' -->
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<runtime>
<!-- solution to error 'caused the assembly to be sandboxed' -->
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
@@ -27,7 +27,7 @@ public CDLC2Tab()
InitializeComponent();
try
{
if (!GeneralExtensions.IsInDesignMode)
if (!GeneralExtension.IsInDesignMode)
InitOutputDir();
}
catch { /*For mono compatibility*/ }
@@ -52,7 +52,7 @@ public GeneralConfig()
PopulateConfigDDC();

// force static Wwise path and settings for Mac Mono/Wine packages on first run
if ((Environment.OSVersion.Platform == PlatformID.MacOSX || GeneralExtensions.IsWine()) && ConfigRepository.Instance().GetBoolean("general_firstrun"))
if ((Environment.OSVersion.Platform == PlatformID.MacOSX || GeneralExtension.IsWine()) && ConfigRepository.Instance().GetBoolean("general_firstrun"))
{
ConfigRepository.Instance()["general_autoupdate"] = "false";
ConfigRepository.Instance()["general_replacerepo"] = "true";
@@ -654,7 +654,7 @@ private void bw_DoWork(object sender, DoWorkEventArgs e)
var consoleOutput = String.Empty;
currentCount++;
int count = currentCount;
GeneralExtensions.InvokeIfRequired(lblStatus, delegate
GeneralExtension.InvokeIfRequired(lblStatus, delegate
{
lblStatus.Text = String.Format("Processing file {0} of {1} ... Please wait.", count, totalCount);
});
@@ -685,7 +685,7 @@ private void bw_DoWork(object sender, DoWorkEventArgs e)
if (!String.IsNullOrEmpty(errorsFound.ToString()))
ProcessOutput = errorsFound.ToString();

GeneralExtensions.InvokeIfRequired(lblStatus, delegate
GeneralExtension.InvokeIfRequired(lblStatus, delegate
{
lblStatus.Text = String.Format("Sucessfully processed {0} of {1} files ...", totalCount - errorCount, totalCount);
});
@@ -401,7 +401,7 @@ private void inlayGenerateButton_Click(object sender, EventArgs e)
packageData.Inlay.IconPath = IconFile;
packageData.Inlay.Frets24 = Frets24;
packageData.Inlay.Colored = Colored;
packageData.Inlay.DLCSixName = GeneralExtensions.RandomName(6);
packageData.Inlay.DLCSixName = GeneralExtension.RandomName(6);

// CRITICAL - 24 fret inlays have naming dependencies
if (Frets24) packageData.Inlay.DLCSixName = String.Format("24fret_{0}", packageData.Inlay.DLCSixName);

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -62,7 +62,7 @@ public DLCPackageCreator()
InitializeComponent();

// it is better to be hidden initially and then unhide when needed
if (GeneralExtensions.IsInDesignMode)
if (GeneralExtension.IsInDesignMode)
btnDevUse.Visible = true;

lstArrangements.AllowDrop = true;
@@ -71,12 +71,15 @@ public DLCPackageCreator()
rbRs2014.MouseEnter += rbRs2014_MouseEnter;
numVolSong.MouseEnter += Volume_MouseEnter;
numVolPreview.MouseEnter += Volume_MouseEnter;
rbRs2012.MouseDown += GameVersion_MouseDown;
rbRs2014.MouseDown += GameVersion_MouseDown;
rbConvert.MouseDown += GameVersion_MouseDown;
rbRs2012.MouseUp += GameVersion_MouseUp;
rbRs2014.MouseUp += GameVersion_MouseUp;
rbConvert.MouseUp += GameVersion_MouseUp;
// using MouseUp event may result in known VS double clicking glitch
// when one control is over another control and the topmost
// control is double clicked then the background control can
// inadvertantly intercept the second click as a MouseUp event
// in this case it clears the GUI and produces undesired results
rbRs2012.MouseClick += GameVersion_MouseClick;
rbRs2014.MouseClick += GameVersion_MouseClick;
rbConvert.MouseClick += GameVersion_MouseClick;
gbGameVersion.MouseEnter += GameVersion_MouseEnter;

// Generate package worker
bwGenerate.DoWork += new DoWorkEventHandler(GeneratePackage);
@@ -392,7 +395,7 @@ public dynamic CreateNewTone(string toneName = "Default")

public Arrangement GenMetronomeArr(Arrangement arr)
{
var mArr = GeneralExtensions.Copy(arr);
var mArr = GeneralExtension.Copy(arr);
var songXml = Song2014.LoadFromFile(mArr.SongXml.File);
var newXml = Path.GetTempFileName();
mArr.SongXml = new RocksmithToolkitLib.DLCPackage.AggregateGraph.SongXML { File = newXml };
@@ -813,11 +816,11 @@ private void DuplicateTone()
switch (CurrentGameVersion)
{
case GameVersion.RS2012:
tone = GeneralExtensions.Copy<Tone>((Tone)lstTones.SelectedItem);
tone = GeneralExtension.Copy<Tone>((Tone)lstTones.SelectedItem);
break;
case GameVersion.None:
case GameVersion.RS2014:
tone = GeneralExtensions.Copy<Tone2014>((Tone2014)lstTones.SelectedItem);
tone = GeneralExtension.Copy<Tone2014>((Tone2014)lstTones.SelectedItem);
break;
}

@@ -1524,7 +1527,7 @@ private void PopulateTonesLB()
form.CurrentGameVersion = CurrentGameVersion;
form.toneControl.CurrentGameVersion = CurrentGameVersion;
form.toneControl.Init();
form.toneControl.Tone = GeneralExtensions.Copy(tone);
form.toneControl.Tone = GeneralExtension.Copy(tone);
form.LoadToneFile(ConfigGlobals.DefaultToneFile, false);
lstTones.Items.Add(form.toneControl.Tone);
}
@@ -1875,7 +1878,7 @@ public DLCPackageData PackageGenerate()
// only validate lyrics that do not use a custom font (RS2014 ONLY)
if (!arr.CustomFont)
{
var oldXml = GeneralExtensions.CopyToTempFile(arr.SongXml.File);
var oldXml = GeneralExtension.CopyToTempFile(arr.SongXml.File);
using (var outputStream = new FileStream(arr.SongXml.File, FileMode.Create, FileAccess.ReadWrite))
{
var vocals2014 = RocksmithToolkitLib.Sng2014HSL.Sng2014FileWriter.ReadVocals(oldXml);
@@ -2104,7 +2107,7 @@ private void btnToneAdd_Click(object sender, EventArgs e)
form.CurrentGameVersion = CurrentGameVersion;
form.toneControl.CurrentGameVersion = CurrentGameVersion;
form.toneControl.Init();
form.toneControl.Tone = GeneralExtensions.Copy(tone);
form.toneControl.Tone = GeneralExtension.Copy(tone);
form.ShowDialog();

if (form.Saved)
@@ -2132,16 +2135,18 @@ private void ClickedInputControl(object sender, EventArgs e)
//IsDirty = true;
}

private void GameVersion_MouseDown(object sender, MouseEventArgs e)
private void GameVersion_MouseEnter(object sender, EventArgs e)
{
PreviousGameVersion = CurrentGameVersion;
}

private void GameVersion_MouseUp(object sender, MouseEventArgs e)
private void GameVersion_MouseClick(object sender, MouseEventArgs e)
{
// GameVersion_CheckedChanged usage comes with problems
// everytime the value of checked is changed the event handler fires

// GameVersion_MouseUp has known VS glitch when one control is on top of another control

// DO NOT ResetPackageCreatorForm if converting RS2014 => RS1
if (PreviousGameVersion == GameVersion.None || PreviousGameVersion == GameVersion.RS2012)
ResetPackageCreatorForm(PreviousGameVersion);
@@ -2454,7 +2459,8 @@ private void btnAlbumArt_Click(object sender, EventArgs e)
if (ofd.FileName.IsValidImage())
AlbumArtPath = ofd.FileName;
else
MessageBox.Show("The selected image is not valid or not supported." + Environment.NewLine + "MimeType doesn't match with file extension!", MESSAGEBOX_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
MessageBox.Show("The selected image is not valid or not supported." + Environment.NewLine +
"MimeType doesn't match with file extension!", MESSAGEBOX_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
@@ -2613,7 +2619,7 @@ private void btnToneEdit_Click(object sender, EventArgs e)
form.CurrentGameVersion = currentGameVersion;
form.toneControl.CurrentGameVersion = currentGameVersion;
form.toneControl.Init();
form.toneControl.Tone = GeneralExtensions.Copy(tone);
form.toneControl.Tone = GeneralExtension.Copy(tone);
form.ShowDialog();

if (form.Saved)
@@ -2878,5 +2884,7 @@ private void ResetPackageCreatorForm(GameVersion oldGameVersion)
txtDlcKey.Clear();
}



}
}
@@ -120,6 +120,9 @@
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>23, 3</value>
</metadata>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>23, 3</value>
</metadata>
<data name="txtAudioPath.ToolTip" xml:space="preserve">
<value>WARNING: If the toolkit locates
an existing *_preview.* audio file
@@ -339,7 +339,7 @@ public void UpdateAppId(object sender, DoWorkEventArgs e)
{
using (var tkReader = new StreamReader(tkStream))
{
var tkInfo = GeneralExtensions.GetToolkitInfo(tkReader);
var tkInfo = GeneralExtension.GetToolkitInfo(tkReader);
var packageComment = tkInfo.PackageComment;
if (String.IsNullOrEmpty(packageComment))
packageComment = TKI_APPID;
@@ -545,7 +545,7 @@ private void btnFixLowBassTuning_Click(object sender, EventArgs e)
// TODO consider user of regular packer here
RocksmithToolkitLib.DLCPackage.DLCPackageCreator.Generate(destPath, info, packagePlatform);

if (!GeneralExtensions.IsInDesignMode)
if (!GeneralExtension.IsInDesignMode)
IOExtension.DeleteDirectory(unpackedDir);
}

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

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 6b07b79

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