diff --git a/ICSharpCode.Decompiler.Console/IlspyCmdProgram.cs b/ICSharpCode.Decompiler.Console/IlspyCmdProgram.cs index 3821f042f..74013f342 100644 --- a/ICSharpCode.Decompiler.Console/IlspyCmdProgram.cs +++ b/ICSharpCode.Decompiler.Console/IlspyCmdProgram.cs @@ -53,13 +53,13 @@ Remarks: [Option("-usepdb", "Use PDB.", CommandOptionType.SingleOrNoValue)] public (bool IsSet, string Value) InputPDBFile { get; } - [Option("-l|--list ", "Lists all entities of the specified type(s). Valid types: c(lass), i(interface), s(truct), d(elegate), e(num)", CommandOptionType.MultipleValue)] + [Option("-l|--list ", "Lists all entities of the specified type(s). Valid types: c(lass), i(nterface), s(truct), d(elegate), e(num)", CommandOptionType.MultipleValue)] public string[] EntityTypes { get; } = new string[0]; [Option("-v|--version", "Show version of ICSharpCode.Decompiler used.", CommandOptionType.NoValue)] public bool ShowVersion { get; } - [Option("-lv|--languageversion", "C# Language version: CSharp1, CSharp2, CSharp3, CSharp4, CSharp5, CSharp6, CSharp7_0, CSharp7_1, CSharp7_2, CSharp7_3, CSharp8_0 or Latest", CommandOptionType.SingleValue)] + [Option("-lv|--languageversion ", "C# Language version: CSharp1, CSharp2, CSharp3, CSharp4, CSharp5, CSharp6, CSharp7_0, CSharp7_1, CSharp7_2, CSharp7_3, CSharp8_0 or Latest", CommandOptionType.SingleValue)] public LanguageVersion LanguageVersion { get; } = LanguageVersion.Latest; [DirectoryExists] diff --git a/ICSharpCode.Decompiler.Console/README.md b/ICSharpCode.Decompiler.Console/README.md index d5c56afd6..5acd0c163 100644 --- a/ICSharpCode.Decompiler.Console/README.md +++ b/ICSharpCode.Decompiler.Console/README.md @@ -14,21 +14,22 @@ dotnet tool for decompiling .NET assemblies and generating portable PDBs Usage: ilspycmd [arguments] [options] Arguments: - Assembly file name The assembly that is being decompiled. This argument is mandatory. + Assembly file name The assembly that is being decompiled. This argument is mandatory. Options: - -h|--help Show help information - -o|--outputdir The output directory, if omitted decompiler output is written to standard out. - -p|--project Decompile assembly as compilable project. This requires the output directory option. - -t|--type The fully qualified name of the type to decompile. - -il|--ilcode Show IL code. - -d|--debuginfo Generate PDB. - -l|--list Lists all entities of the specified type(s). Valid types: c(lass), i(interface), s(truct), d(elegate), e(num) - -v|--version Show version of ICSharpCode.Decompiler used. - -lv|--languageversion C# Language version: CSharp1, CSharp2, CSharp3, CSharp4, CSharp5, CSharp6, CSharp7_0, CSharp7_1, CSharp7_2, CSharp7_3, CSharp8_0 or Latest - -r|--referencepath Path to a directory containing dependencies of the assembly that is being decompiled. - --no-dead-code Remove dead code. - --no-dead-stores Remove dead stores. + -h|--help Show help information + -o|--outputdir The output directory, if omitted decompiler output is written to standard out. + -p|--project Decompile assembly as compilable project. This requires the output directory option. + -t|--type The fully qualified name of the type to decompile. + -il|--ilcode Show IL code. + -genpdb Generate PDB. + -usepdb Use PDB. + -l|--list Lists all entities of the specified type(s). Valid types: c(lass), i(nterface), s(truct), d(elegate), e(num) + -v|--version Show version of ICSharpCode.Decompiler used. + -lv|--languageversion C# Language version: CSharp1, CSharp2, CSharp3, CSharp4, CSharp5, CSharp6, CSharp7_0, CSharp7_1, CSharp7_2, CSharp7_3, CSharp8_0 or Latest + -r|--referencepath Path to a directory containing dependencies of the assembly that is being decompiled. + --no-dead-code Remove dead code. + --no-dead-stores Remove dead stores. Remarks: -o is valid with every option and required when using -p. diff --git a/ILSpy.WithPackage.sln b/ILSpy.WithPackage.sln index e362c907c..b8813b52b 100644 --- a/ILSpy.WithPackage.sln +++ b/ILSpy.WithPackage.sln @@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.Decompiler.PdbP EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.Tests", "ILSpy.Tests\ILSpy.Tests.csproj", "{B51C6636-B8D1-4200-9869-08F2689DE6C2}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.ReadyToRun", "ILSpy.ReadyToRun\ILSpy.ReadyToRun.csproj", "{4A9EDD49-EE62-4417-9140-EF82E39214E4}" +EndProject Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "ILSpy.Package", "ILSpy.Package\ILSpy.Package.wapproj", "{BAB51A23-9C15-42CC-8465-EB732BF9A932}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{58AA7BDB-174C-4566-BD8A-EC461F1D6848}" @@ -189,6 +191,18 @@ Global {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|x86.ActiveCfg = Release|x86 {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|x86.Build.0 = Release|x86 {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|x86.Deploy.0 = Release|x86 + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Debug|x64.ActiveCfg = Debug|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Debug|x64.Build.0 = Debug|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Debug|x86.ActiveCfg = Debug|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Debug|x86.Build.0 = Debug|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Release|Any CPU.Build.0 = Release|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Release|x64.ActiveCfg = Release|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Release|x64.Build.0 = Release|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Release|x86.ActiveCfg = Release|Any CPU + {4A9EDD49-EE62-4417-9140-EF82E39214E4}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ILSpy/AboutPage.cs b/ILSpy/AboutPage.cs index 3582ad705..ae14f3c50 100644 --- a/ILSpy/AboutPage.cs +++ b/ILSpy/AboutPage.cs @@ -18,7 +18,6 @@ using System; using System.ComponentModel; -using System.ComponentModel.Composition; using System.IO; using System.Linq; using System.Net; @@ -28,14 +27,14 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Input; +using System.Windows.Navigation; using System.Xml.Linq; using ICSharpCode.AvalonEdit.Rendering; using ICSharpCode.Decompiler; -using ICSharpCode.ILSpy.Docking; -using ICSharpCode.ILSpy.ViewModels; using ICSharpCode.ILSpy.Properties; using ICSharpCode.ILSpy.TextView; + using OSVersionHelper; namespace ICSharpCode.ILSpy @@ -45,8 +44,7 @@ namespace ICSharpCode.ILSpy { public override void Execute(object parameter) { - MainWindow.Instance.UnselectAll(); - DockWorkspace.Instance.ActiveTabPage.ShowTextView(Display); + MainWindow.Instance.NavigateTo(new RequestNavigateEventArgs(new Uri("resource://aboutpage"), null)); } static readonly Uri UpdateUrl = new Uri("https://ilspy.net/updates.xml"); @@ -89,7 +87,8 @@ namespace ICSharpCode.ILSpy foreach (var plugin in App.ExportProvider.GetExportedValues()) plugin.Write(output); output.WriteLine(); - using (Stream s = typeof(AboutPage).Assembly.GetManifestResourceStream(typeof(AboutPage), "README.txt")) { + output.Address = new Uri("resource://AboutPage"); + using (Stream s = typeof(AboutPage).Assembly.GetManifestResourceStream(typeof(AboutPage), "ILSpyAboutPage.txt")) { using (StreamReader r = new StreamReader(s)) { string line; while ((line = r.ReadLine()) != null) { @@ -97,10 +96,10 @@ namespace ICSharpCode.ILSpy } } } - output.AddVisualLineElementGenerator(new MyLinkElementGenerator("SharpDevelop", "http://www.icsharpcode.net/opensource/sd/")); output.AddVisualLineElementGenerator(new MyLinkElementGenerator("MIT License", "resource:license.txt")); output.AddVisualLineElementGenerator(new MyLinkElementGenerator("LGPL", "resource:LGPL.txt")); output.AddVisualLineElementGenerator(new MyLinkElementGenerator("MS-PL", "resource:MS-PL.txt")); + output.AddVisualLineElementGenerator(new MyLinkElementGenerator("third-party notices", "resource:third-party-notices.txt")); textView.ShowText(output); } diff --git a/ILSpy/App.xaml.cs b/ILSpy/App.xaml.cs index ec05fb882..f01ee49d6 100644 --- a/ILSpy/App.xaml.cs +++ b/ILSpy/App.xaml.cs @@ -22,17 +22,16 @@ using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; +using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Documents; using System.Windows.Navigation; using System.Windows.Threading; -using ICSharpCode.ILSpy.TextView; using ICSharpCode.ILSpy.Options; using Microsoft.VisualStudio.Composition; -using System.Text; namespace ICSharpCode.ILSpy { @@ -233,20 +232,7 @@ namespace ICSharpCode.ILSpy void Window_RequestNavigate(object sender, RequestNavigateEventArgs e) { - if (e.Uri.Scheme == "resource") { - AvalonEditTextOutput output = new AvalonEditTextOutput(); - using (Stream s = typeof(App).Assembly.GetManifestResourceStream(typeof(App), e.Uri.AbsolutePath)) { - using (StreamReader r = new StreamReader(s)) { - string line; - while ((line = r.ReadLine()) != null) { - output.Write(line); - output.WriteLine(); - } - } - } - Docking.DockWorkspace.Instance.ShowText(output); - e.Handled = true; - } + ILSpy.MainWindow.Instance.NavigateTo(e); } } } \ No newline at end of file diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 811f20390..763e624d9 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -418,6 +418,8 @@ + + LGPL.txt @@ -470,7 +472,6 @@ - diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index 543329090..6a144c7c4 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -25,7 +25,6 @@ using System.IO; using System.Linq; using System.Reflection.Metadata; using System.Reflection.Metadata.Ecma335; -using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using System.Windows; @@ -34,6 +33,7 @@ using System.Windows.Input; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Media.Imaging; +using System.Windows.Navigation; using System.Windows.Threading; using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.Documentation; @@ -41,7 +41,6 @@ using ICSharpCode.Decompiler.Metadata; using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.Decompiler.TypeSystem.Implementation; using ICSharpCode.ILSpy.Analyzers; -using ICSharpCode.ILSpy.Controls; using ICSharpCode.ILSpy.Docking; using ICSharpCode.ILSpy.TextView; using ICSharpCode.ILSpy.TreeNodes; @@ -49,7 +48,6 @@ using ICSharpCode.ILSpy.ViewModels; using ICSharpCode.TreeView; using Microsoft.Win32; using OSVersionHelper; -using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout.Serialization; namespace ICSharpCode.ILSpy @@ -996,6 +994,10 @@ namespace ICSharpCode.ILSpy if (node != null && node.View(DockWorkspace.Instance.ActiveTabPage)) return; } + if (newState?.ViewedUri != null) { + NavigateTo(new RequestNavigateEventArgs(newState.ViewedUri, null), recordHistory: false); + return; + } decompilationTask = DockWorkspace.Instance.ActiveTabPage.ShowTextViewAsync(textView => textView.DecompileAsync(this.CurrentLanguage, this.SelectedNodes, new DecompilationOptions() { TextViewState = newState })); } @@ -1078,9 +1080,50 @@ namespace ICSharpCode.ILSpy ignoreDecompilationRequests = false; DecompileSelectedNodes(newState.ViewState as DecompilerTextViewState, false); } - #endregion + internal void NavigateTo(RequestNavigateEventArgs e, bool recordHistory = true) + { + if (e.Uri.Scheme == "resource") { + if (e.Uri.Host == "aboutpage") { + RecordHistory(); + DockWorkspace.Instance.ActiveTabPage.ShowTextView(AboutPage.Display); + e.Handled = true; + return; + } + AvalonEditTextOutput output = new AvalonEditTextOutput { + Address = e.Uri, + Title = e.Uri.AbsolutePath, + EnableHyperlinks = true + }; + using (Stream s = typeof(App).Assembly.GetManifestResourceStream(typeof(App), e.Uri.AbsolutePath)) { + using (StreamReader r = new StreamReader(s)) { + string line; + while ((line = r.ReadLine()) != null) { + output.Write(line); + output.WriteLine(); + } + } + } + RecordHistory(); + DockWorkspace.Instance.ShowText(output); + e.Handled = true; + } + + void RecordHistory() + { + if (!recordHistory) + return; + var currentState = DockWorkspace.Instance.ActiveTabPage.GetState(); + if (currentState != null) + history.UpdateCurrent(new NavigationState(currentState)); + ignoreDecompilationRequests = true; + UnselectAll(); + ignoreDecompilationRequests = false; + history.Record(new NavigationState(new ViewState { ViewedUri = e.Uri })); + } + } + protected override void OnStateChanged(EventArgs e) { base.OnStateChanged(e); diff --git a/ILSpy/Metadata/Helpers.cs b/ILSpy/Metadata/Helpers.cs index 98c9215d6..38f69d30d 100644 --- a/ILSpy/Metadata/Helpers.cs +++ b/ILSpy/Metadata/Helpers.cs @@ -91,7 +91,9 @@ namespace ICSharpCode.ILSpy.Metadata public ViewState GetState() { - return new ViewState { DecompiledNodes = SelectedTreeNode == null ? null : new[] { SelectedTreeNode } }; + return new ViewState { + DecompiledNodes = SelectedTreeNode == null ? null : new HashSet(new[] { SelectedTreeNode }) + }; } } diff --git a/ILSpy/NavigationState.cs b/ILSpy/NavigationState.cs index 74cbd1bc4..008ad9f4a 100644 --- a/ILSpy/NavigationState.cs +++ b/ILSpy/NavigationState.cs @@ -18,11 +18,13 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using ICSharpCode.ILSpy.TextView; using ICSharpCode.TreeView; namespace ICSharpCode.ILSpy { + [DebuggerDisplay("Nodes = {treeNodes.Count}, State = [{ViewState}]")] public class NavigationState : IEquatable { private readonly HashSet treeNodes; @@ -32,7 +34,7 @@ namespace ICSharpCode.ILSpy public NavigationState(ViewState viewState) { - this.treeNodes = new HashSet(viewState.DecompiledNodes); + this.treeNodes = new HashSet((IEnumerable)viewState.DecompiledNodes ?? Array.Empty()); ViewState = viewState; } @@ -44,8 +46,16 @@ namespace ICSharpCode.ILSpy public bool Equals(NavigationState other) { - // TODO: should this care about the view state as well? - return this.treeNodes.SetEquals(other.treeNodes); + if (!this.treeNodes.SetEquals(other.treeNodes)) + return false; + + if (object.ReferenceEquals(this.ViewState, other.ViewState)) + return true; + + if (this.ViewState == null) + return false; + + return this.ViewState.Equals(other.ViewState); } } } diff --git a/ILSpy/README.txt b/ILSpy/README.txt deleted file mode 100644 index e522f7eec..000000000 --- a/ILSpy/README.txt +++ /dev/null @@ -1,19 +0,0 @@ -ILSpy is the open-source .NET assembly browser and decompiler. -Website: https://ilspy.net/ -Found a bug?: https://github.com/icsharpcode/ILSpy/issues/new - -Copyright 2011-2020 AlphaSierraPapa for the SharpDevelop team -License: ILSpy is distributed under the MIT License. - -Included open-source libraries: - Mono.Cecil: MIT License (part of ILSpy) - LightJson: MIT License (part of ICSharpCode.Decompiler) - Humanizer: MIT License (part of ICSharpCode.Decompiler) - AvalonEdit: MIT License - SharpTreeView: LGPL - ILSpy.BamlDecompiler: MIT License - CommandLineUtils: Apache License 2.0 (part of ICSharpCode.Decompiler.Console) - ILCompiler.Reflection.ReadyToRun: MIT License (part of ILSpy.ReadyToRun) - Iced: MIT License (part of ILSpy.ReadyToRun) - -Current and past contributors: https://github.com/icsharpcode/ILSpy/graphs/contributors diff --git a/ILSpy/TextView/AvalonEditTextOutput.cs b/ILSpy/TextView/AvalonEditTextOutput.cs index 1cbe917b7..15c3f25a6 100644 --- a/ILSpy/TextView/AvalonEditTextOutput.cs +++ b/ILSpy/TextView/AvalonEditTextOutput.cs @@ -83,6 +83,12 @@ namespace ICSharpCode.ILSpy.TextView public string IndentationString { get; set; } = "\t"; public string Title { get; set; } + + /// + /// Gets/sets the that is displayed by this view. + /// Used to identify the AboutPage and other views built into ILSpy in the navigation history. + /// + public Uri Address { get; set; } internal readonly List elementGenerators = new List(); diff --git a/ILSpy/TextView/DecompilerTextView.cs b/ILSpy/TextView/DecompilerTextView.cs index afa23e5d7..781ee8832 100644 --- a/ILSpy/TextView/DecompilerTextView.cs +++ b/ILSpy/TextView/DecompilerTextView.cs @@ -71,6 +71,7 @@ namespace ICSharpCode.ILSpy.TextView BracketHighlightRenderer bracketHighlightRenderer; FoldingManager foldingManager; ILSpyTreeNode[] decompiledNodes; + Uri currentAddress; DefinitionLookup definitionLookup; TextSegmentCollection references; @@ -647,6 +648,7 @@ namespace ICSharpCode.ILSpy.TextView if (this.DataContext is PaneModel model) { model.Title = textOutput.Title; } + currentAddress = textOutput.Address; } #endregion @@ -1010,7 +1012,7 @@ namespace ICSharpCode.ILSpy.TextView public DecompilerTextViewState GetState() { - if (decompiledNodes == null) + if (decompiledNodes == null && currentAddress == null) return null; var state = new DecompilerTextViewState(); @@ -1018,7 +1020,8 @@ namespace ICSharpCode.ILSpy.TextView state.SaveFoldingsState(foldingManager.AllFoldings); state.VerticalOffset = textEditor.VerticalOffset; state.HorizontalOffset = textEditor.HorizontalOffset; - state.DecompiledNodes = decompiledNodes; + state.DecompiledNodes = decompiledNodes == null ? null : new HashSet(decompiledNodes); + state.ViewedUri = currentAddress; return state; } @@ -1059,9 +1062,16 @@ namespace ICSharpCode.ILSpy.TextView #endregion } - public class ViewState + [DebuggerDisplay("Nodes = {DecompiledNodes}, ViewedUri = {ViewedUri}")] + public class ViewState : IEquatable { - public ILSpyTreeNode[] DecompiledNodes; + public HashSet DecompiledNodes; + public Uri ViewedUri; + + public virtual bool Equals(ViewState other) + { + return ViewedUri == other.ViewedUri && (DecompiledNodes == other.DecompiledNodes || DecompiledNodes?.SetEquals(other.DecompiledNodes) == true); + } } public class DecompilerTextViewState : ViewState @@ -1084,5 +1094,16 @@ namespace ICSharpCode.ILSpy.TextView foreach (var folding in list) folding.DefaultClosed = !ExpandedFoldings.Any(f => f.Item1 == folding.StartOffset && f.Item2 == folding.EndOffset); } + + public override bool Equals(ViewState other) + { + if (other is DecompilerTextViewState vs) { + return base.Equals(vs) + && FoldingsChecksum == vs.FoldingsChecksum + && VerticalOffset == vs.VerticalOffset + && HorizontalOffset == vs.HorizontalOffset; + } + return false; + } } } diff --git a/README.md b/README.md index ab17b550b..90dbac521 100644 --- a/README.md +++ b/README.md @@ -33,18 +33,8 @@ Features License ------- -ILSpy is distributed under the MIT License. - -Included open-source libraries: - * Mono.Cecil: MIT License (part of ILSpy) - * LightJson: MIT License (part of ICSharpCode.Decompiler) - * Humanizer: MIT License (part of ICSharpCode.Decompiler) - * AvalonEdit: MIT License - * SharpTreeView: LGPL - * ILSpy.BamlDecompiler: MIT license - * CommandLineUtils: Apache License 2.0 (part of ICSharpCode.Decompiler.Console) - * ILCompiler.Reflection.ReadyToRun: MIT License (part of ILSpy.ReadyToRun) - * Iced: MIT License (part of ILSpy.ReadyToRun) +ILSpy is distributed under the MIT License. Please see the [About](doc/ILSpyAboutPage.txt) doc for details, +as well as [third party notices](doc/third-party-notices.txt) for included open-source libraries. How to build ------------ diff --git a/doc/ILSpyAboutPage.txt b/doc/ILSpyAboutPage.txt new file mode 100644 index 000000000..876ac0ccd --- /dev/null +++ b/doc/ILSpyAboutPage.txt @@ -0,0 +1,13 @@ +ILSpy is the open-source .NET assembly browser and decompiler. + +Website: https://ilspy.net/ +Found a bug? https://github.com/icsharpcode/ILSpy/issues/new + +Copyright 2011-2020 AlphaSierraPapa for the ILSpy team +Current and past contributors: https://github.com/icsharpcode/ILSpy/graphs/contributors + +ILSpy is distributed under the MIT License. There is only one first-party component that has a different license: + SharpTreeView: LGPL + +ILSpy uses other open-source libraries to make its magic happen, and we want to thank the people working +on those components! For the respective licenses and copyright information please see third-party notices. \ No newline at end of file diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 000000000..3a44b4dd7 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,18 @@ +# Files + +## License-Related + +|File|Contents/Usage| +|---|---| +|ILSpyAboutPage.txt|Binary inclusion in ILSpy for About listing ILSpy components' licenses and third party notices link| +|third-party-notices.txt|Binary inclusion in ILSpy for third party libraries and code used in ILSpy and its components| +|copyright.txt|Copyright notice for ILSpy| +|license.txt|MIT license for ILSpy| +|lgpl.txt|LGPL license| +|MS-PL.txt|MS-PL license| + +## Other + +|File|Contents| +|---|---| +| | | \ No newline at end of file diff --git a/doc/copyright.txt b/doc/copyright.txt index 697532a3a..27a3402af 100644 --- a/doc/copyright.txt +++ b/doc/copyright.txt @@ -1,4 +1,4 @@ -Copyright 2011-2020 for the SharpDevelop team +Copyright 2011-2020 for the ILSpy team by AlphaSierraPapa, Christoph Wille @@ -7,5 +7,4 @@ by Austria email: office@alphasierrapapa.com - court of jurisdiction: Landesgericht Leoben - + court of jurisdiction: Landesgericht Leoben \ No newline at end of file diff --git a/doc/license.txt b/doc/license.txt index 6b994e062..cf249a8df 100644 --- a/doc/license.txt +++ b/doc/license.txt @@ -1,14 +1,6 @@ -The following MIT license applies to ILSpy, NRefactory and ICSharpCode.Decompiler. -Mono.Cecil also uses the MIT license (Copyright JB Evain). -ILCompiler.Reflection.ReadyToRun also uses the MIT license (Copyright Microsoft). -Iced also uses the MIT license (Copyright 0xd4d). -AvalonEdit and SharpTreeView use LGPL, which can be found in the LGPL.txt file. -ILSpy.BamlDecompiler uses the MS-PL, which can be found in the MS-PL.txt file. +MIT license - -MIT license: - -Copyright (c) 2011-2014 AlphaSierraPapa for the SharpDevelop team +Copyright (c) 2011-2020 AlphaSierraPapa for the ILSpy team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software @@ -24,4 +16,4 @@ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PA PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/doc/third-party-notices.txt b/doc/third-party-notices.txt new file mode 100644 index 000000000..bbb4476a0 --- /dev/null +++ b/doc/third-party-notices.txt @@ -0,0 +1,474 @@ +ILSpy uses third-party libraries or other resources that may +be distributed under licenses different than the ILSpy software. + +In the event that we accidentally failed to list a required notice, +please bring it to our attention through any of the ways detailed here: + + https://github.com/icsharpcode/ILSpy/issues + +The attached notices are provided for information only, and are sorted alphabetically. + +For any licenses that require disclosure of source, sources are available at +https://github.com/icsharpcode/ILSpy/. + + +License Notice for AvalonDock (part of ILSpy) +--------------------------- + +https://github.com/Dirkster99/AvalonDock/blob/master/LICENSE + + +Ms-PL +Microsoft Public License (Ms-PL) + +This license governs use of the accompanying software. If you use the software, +you accept this license. If you do not accept the license, do not use the software. + +1. Definitions + +The terms "reproduce," "reproduction," "derivative works," and "distribution" have +the same meaning here as under U.S. copyright law. + +A "contribution" is the original software, or any additions or changes to the software. + +A "contributor" is any person that distributes its contribution under this license. + +"Licensed patents" are a contributor's patent claims that read directly on its contribution. + +2. Grant of Rights + +(A) Copyright Grant- Subject to the terms of this license, including the license +conditions and limitations in section 3, each contributor grants you a +non-exclusive, worldwide, royalty-free copyright license to reproduce its +contribution, prepare derivative works of its contribution, and distribute its +contribution or any derivative works that you create. + +(B) Patent Grant- Subject to the terms of this license, including the license +conditions and limitations in section 3, each contributor grants you a + non-exclusive, worldwide, royalty-free license under its licensed patents to + make, have made, use, sell, offer for sale, import, and/or otherwise dispose + of its contribution in the software or derivative works of the contribution + in the software. + +3. Conditions and Limitations + +(A) No Trademark License- This license does not grant you rights to use any +contributors' name, logo, or trademarks. + +(B) If you bring a patent claim against any contributor over patents that +you claim are infringed by the software, your patent license from such +contributor to the software ends automatically. + +(C) If you distribute any portion of the software, you must retain all +copyright, patent, trademark, and attribution notices that are present +in the software. + +(D) If you distribute any portion of the software in source code form, you +may do so only under this license by including a complete copy of this +license with your distribution. If you distribute any portion of the software +in compiled or object code form, you may only do so under a license that +complies with this license. + +(E) The software is licensed "as-is." You bear the risk of using it. The +contributors give no express warranties, guarantees or conditions. You may +have additional consumer rights under your local laws which this license +cannot change. To the extent permitted under your local laws, the contributors +exclude the implied warranties of merchantability, fitness for a particular +purpose and non-infringement. + + +License Notice for AvalonEdit (part of ILSpy) +--------------------------- + +https://github.com/icsharpcode/AvalonEdit/blob/master/LICENSE + +MIT License + +Copyright (c) AvalonEdit Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +License Notice for CommandLineUtils (part of ICSharpCode.Decompiler.Console) +--------------------------- + +https://github.com/natemcmaster/CommandLineUtils/blob/master/LICENSE.txt + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + + +License Notice for Data Grid Extensions (part of ILSpy) +--------------------------- + +https://github.com/tom-englert/DataGridExtensions/blob/master/License + +The MIT License (MIT) +Copyright (c) 2012-2019 tom-englert.de + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +License Notice for Humanizer (part of ICSharpCode.Decompiler) +--------------------------- + +https://github.com/Humanizr/Humanizer/blob/master/LICENSE + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +============================================================================== + +Inflector (https://github.com/srkirkland/Inflector) +The MIT License (MIT) +Copyright (c) 2013 Scott Kirkland + +============================================================================== + +ByteSize (https://github.com/omar/ByteSize) +The MIT License (MIT) +Copyright (c) 2013-2014 Omar Khudeira (http://omar.io) + +============================================================================== + + +License Notice for Iced (part of ILSpy.ReadyToRun) +--------------------------- + +https://github.com/0xd4d/iced/blob/master/LICENSE.txt + +Copyright (C) 2018-2019 de4dot@gmail.com + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +License Notice for ILCompiler.Reflection.ReadyToRun (part of ILSpy.ReadyToRun) +--------------------------- + +https://opensource.org/licenses/MIT + + +License Notice for LightJson (part of ICSharpCode.Decompiler) +--------------------------- + +https://github.com/MarcosLopezC/LightJson/blob/master/LICENSE.txt + +The MIT License (MIT) + +Copyright (c) 2018 Marcos López C. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +License Notice for Mono.Cecil (part of ILSpy) +--------------------------- + +https://github.com/jbevain/cecil/blob/master/LICENSE.txt + +Copyright (c) 2008 - 2015 Jb Evain +Copyright (c) 2008 - 2011 Novell, Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +License Notice for OSVersionHelper (part of ILSpy) +--------------------------- + +https://github.com/novotnyllc/OSVersionHelper/blob/master/LICENSE.txt + +The MIT License (MIT) + +Copyright (c) [year] [fullname] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file