From 6fcfe0c819827d139a30d9ab78c099be9893608f Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Wed, 27 Oct 2021 14:09:51 -0500 Subject: [PATCH] Improved decomp error debugging --- .../ZuneUIXTools.ViewModels.csproj | 2 +- ZuneUIXTools/MainWindow.xaml.cs | 10 +- ZuneUIXTools/ZuneUIXTools.csproj | 4 +- test/testA.decomp.uix | 12 ++- test/text.decomp.uix | 102 +++++++++++++++++- test/text.uib | Bin 2235 -> 2354 bytes test/text.uix | 9 +- 7 files changed, 131 insertions(+), 8 deletions(-) diff --git a/ZuneUIXTools.ViewModels/ZuneUIXTools.ViewModels.csproj b/ZuneUIXTools.ViewModels/ZuneUIXTools.ViewModels.csproj index 7dd79a7..f4dd354 100644 --- a/ZuneUIXTools.ViewModels/ZuneUIXTools.ViewModels.csproj +++ b/ZuneUIXTools.ViewModels/ZuneUIXTools.ViewModels.csproj @@ -3,7 +3,7 @@ netstandard2.0 preview - true + false uixtools.pfx diff --git a/ZuneUIXTools/MainWindow.xaml.cs b/ZuneUIXTools/MainWindow.xaml.cs index e9dbe9b..51294da 100644 --- a/ZuneUIXTools/MainWindow.xaml.cs +++ b/ZuneUIXTools/MainWindow.xaml.cs @@ -266,7 +266,7 @@ namespace ZuneUIXTools Application.Run(); InterpreterContext.UseDecompile = false; - File.WriteAllText(System.IO.Path.ChangeExtension(compiledFile, ".decomp.uix"), InterpreterContext.DecompileResult.InnerXml); + File.WriteAllText(System.IO.Path.ChangeExtension(compiledFile, $".decomp.uix"), InterpreterContext.DecompileResults.Last().InnerXml); } catch (Exception ex) { @@ -276,6 +276,14 @@ namespace ZuneUIXTools $"Failed to decompile '{compiledFile}'", "Zune UIX Tools", MessageBoxButton.OK, MessageBoxImage.Error ); + System.Diagnostics.Debug.WriteLine(ex.ToString()); + + TextBlock errBlock = new TextBlock + { + Text = ex.ToString(), + Margin = new Thickness(0, 0, 0, 4) + }; + ErrorPanel.Children.Add(errBlock); }); } } diff --git a/ZuneUIXTools/ZuneUIXTools.csproj b/ZuneUIXTools/ZuneUIXTools.csproj index bba5e81..bfd9f49 100644 --- a/ZuneUIXTools/ZuneUIXTools.csproj +++ b/ZuneUIXTools/ZuneUIXTools.csproj @@ -5,8 +5,8 @@ net48 true Images\VCSIrisProject.ico - true - uixtools.pfx + diff --git a/test/testA.decomp.uix b/test/testA.decomp.uix index e0dcda1..0d4b67e 100644 --- a/test/testA.decomp.uix +++ b/test/testA.decomp.uix @@ -1 +1,11 @@ - \ No newline at end of file + + + + + + + + + + + \ No newline at end of file diff --git a/test/text.decomp.uix b/test/text.decomp.uix index 34dc37a..10c5c45 100644 --- a/test/text.decomp.uix +++ b/test/text.decomp.uix @@ -1 +1,101 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/text.uib b/test/text.uib index 8ab2146bf547f072514e8af05ebe7ebdf808efdf..4fbcb3c15b711bac6c3863c54fcbf7ed865e0586 100644 GIT binary patch delta 826 zcmdljxJgJl)YD1o3o`?QI6DJ_0S5#daWXLc|6e;%T9Z*?qH8zvzyA^w&+2kWGB7YO zF)>I@W@2n%m0)CGxI9^rQFQVGMu~b+1_lOckTin~n3M&Ratt6K&%nUI#=yhCz`)7C z2PPF57#P?Y6v5(33=9l{49Z}V4NR(lNmVcj(ksXy3|6TICe^{>;$TvPfq_AsL6(7` z9%KA`Pp4g&*2F#`ib9RmYHD+2>V4+8_kWCjL?Squye3mF&~RxmIytY=_g*u}uW zaFBt4;RFK%!+8bkSPoeAXNr1s}DFbGcX!5Fff2zd4_?3 z;VJ_I!(#>phL51wU}Rw6Wn^HGWMp8FXJlYdXJlZ|XJlZoW@KP+Wn^IRVPs$kVPs%P zU}Rv(Wn^HeWMp8dXJlY#1rgnh3=ESP85m|VGB7M+WMEjy$iT3Jk%8ebBLl-ZMh1rK z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