From 6c001b6e0f27f4ce856635c72e59622fcea24202 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Mon, 7 Dec 2015 13:35:23 -0800 Subject: [PATCH] Add TypeCatalogGen --- .gitignore | 6 +- src/TypeCatalogGen/README.md | 8 ++ src/TypeCatalogGen/Runtime/project.json | 126 ++++++++++++++++++++++++ src/TypeCatalogGen/build.sh | 8 ++ src/TypeCatalogGen/project.json | 31 ++++++ 5 files changed, 177 insertions(+), 2 deletions(-) create mode 100644 src/TypeCatalogGen/README.md create mode 100644 src/TypeCatalogGen/Runtime/project.json create mode 100755 src/TypeCatalogGen/build.sh create mode 100644 src/TypeCatalogGen/project.json diff --git a/.gitignore b/.gitignore index 9c7812735b..3b20ad7d57 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -/bin/ +bin/ +obj/ /lib/ /approot/ /src/*/bin/ @@ -6,4 +7,5 @@ /.vscode/ project.lock.json *-tests.xml -obj/ \ No newline at end of file +/src/TypeCatalogGen/powershell.inc +/src/TypeCatalogGen/CorePsTypeCatalog.cs diff --git a/src/TypeCatalogGen/README.md b/src/TypeCatalogGen/README.md new file mode 100644 index 0000000000..82216eae21 --- /dev/null +++ b/src/TypeCatalogGen/README.md @@ -0,0 +1,8 @@ +# TypeCatalogGen + +`./build.sh` runs the Core PowerShell `TypeCatalogGen.exe` under Mono +on Linux (using `dotnet-cli`). The `Runtime` folder is a facade +project that, when published, produces a list of the currently used +runtime assemblies for .NET Core. The output is +`CorePsTypeCatalog.cs`, which contains an "initialized" dictionary +that we copy into `typecatalog.cs` of `System.Management.Automation` diff --git a/src/TypeCatalogGen/Runtime/project.json b/src/TypeCatalogGen/Runtime/project.json new file mode 100644 index 0000000000..937820ea9b --- /dev/null +++ b/src/TypeCatalogGen/Runtime/project.json @@ -0,0 +1,126 @@ +{ + "version": "1.0.0.0", + "description": "Facade to generate folder of dependencies", + "authors": [ "andschwa" ], + "tags": [ "" ], + "projectUrl": "", + "licenseUrl": "", + + "frameworks": { + "dnxcore50": { + "dependencies": { + "Microsoft.CSharp": "4.0.1-beta-23516", + "System.Collections": "4.0.11-beta-23516", + "System.Linq": "4.0.1-beta-23516", + "System.Runtime": "4.0.21-beta-23516", + "System.Threading": "4.0.11-beta-23516", + "Microsoft.VisualBasic": "10.0.1-beta-23516", + "Microsoft.Win32.Primitives": "4.0.1-beta-23516", + "Microsoft.Win32.Registry": "4.0.0-beta-23516", + "Microsoft.Win32.Registry.AccessControl": "4.0.0-beta-23516", + "System.AppContext": "4.0.1-beta-23516", + "System.Collections.Concurrent": "4.0.11-beta-23516", + "System.Collections.NonGeneric": "4.0.1-beta-23516", + "System.Collections.Specialized": "4.0.1-beta-23516", + "System.ComponentModel": "4.0.1-beta-23516", + "System.ComponentModel.Annotations": "4.0.11-beta-23516", + "System.ComponentModel.EventBasedAsync": "4.0.11-beta-23516", + "System.ComponentModel.Primitives": "4.0.1-beta-23516", + "System.ComponentModel.TypeConverter": "4.0.1-beta-23516", + "System.Console": "4.0.0-beta-23516", + "System.Data.Common": "4.0.1-beta-23516", + "System.Data.SqlClient": "4.0.0-beta-23516", + "System.Diagnostics.Contracts": "4.0.1-beta-23516", + "System.Diagnostics.Debug": "4.0.11-beta-23516", + "System.Diagnostics.FileVersionInfo": "4.0.0-beta-23516", + "System.Diagnostics.Process": "4.1.0-beta-23516", + "System.Diagnostics.TextWriterTraceListener": "4.0.0-beta-23516", + "System.Diagnostics.Tools": "4.0.1-beta-23516", + "System.Diagnostics.TraceSource": "4.0.0-beta-23516", + "System.Diagnostics.Tracing": "4.0.21-beta-23516", + "System.Dynamic.Runtime": "4.0.11-beta-23516", + "System.Globalization": "4.0.11-beta-23516", + "System.Globalization.Calendars": "4.0.1-beta-23516", + "System.Globalization.Extensions": "4.0.1-beta-23516", + "System.IO": "4.0.11-beta-23516", + "System.IO.Compression": "4.1.0-beta-23516", + "System.IO.Compression.ZipFile": "4.0.1-beta-23516", + "System.IO.FileSystem": "4.0.1-beta-23516", + "System.IO.FileSystem.Primitives": "4.0.1-beta-23516", + "System.IO.FileSystem.Watcher": "4.0.0-beta-23516", + "System.IO.UnmanagedMemoryStream": "4.0.1-beta-23516", + "System.Linq.Expressions": "4.0.11-beta-23516", + "System.Linq.Parallel": "4.0.1-beta-23516", + "System.Linq.Queryable": "4.0.1-beta-23516", + "System.Net.Http": "4.0.1-beta-23516", + "System.Net.Http.WinHttpHandler": "4.0.0-beta-23516", + "System.Net.NameResolution": "4.0.0-beta-23516", + "System.Net.NetworkInformation": "4.1.0-beta-23516", + "System.Net.Primitives": "4.0.11-beta-23516", + "System.Net.Security": "4.0.0-beta-23516", + "System.Net.Sockets": "4.1.0-beta-23516", + "System.Net.WebHeaderCollection": "4.0.1-beta-23516", + "System.Net.WebSockets": "4.0.0-beta-23516", + "System.ObjectModel": "4.0.11-beta-23516", + "System.Reflection.DispatchProxy": "4.0.1-beta-23516", + "System.Reflection": "4.1.0-beta-23516", + "System.Reflection.Emit": "4.0.1-beta-23516", + "System.Reflection.Emit.ILGeneration": "4.0.1-beta-23516", + "System.Reflection.Emit.Lightweight": "4.0.1-beta-23516", + "System.Reflection.Extensions": "4.0.1-beta-23516", + "System.Reflection.Primitives": "4.0.1-beta-23516", + "System.Reflection.TypeExtensions": "4.1.0-beta-23516", + "System.Resources.ResourceManager": "4.0.1-beta-23516", + "System.Runtime.Extensions": "4.0.11-beta-23516", + "System.Runtime.Handles": "4.0.1-beta-23516", + "System.Runtime.InteropServices": "4.0.21-beta-23516", + "System.Runtime.InteropServices.WindowsRuntime": "4.0.1-beta-23516", + "System.Runtime.Loader": "4.0.0-beta-23516", + "System.Runtime.Numerics": "4.0.1-beta-23516", + "System.Runtime.Serialization.Json": "4.0.1-beta-23516", + "System.Runtime.Serialization.Primitives": "4.1.0-beta-23516", + "System.Runtime.Serialization.Xml": "4.1.0-beta-23516", + "System.Security.AccessControl": "4.0.0-beta-23516", + "System.Security.Claims": "4.0.1-beta-23516", + "System.Security.Cryptography.Encoding": "4.0.0-beta-23516", + "System.Security.Cryptography.Algorithms": "4.0.0-beta-23516", + "System.Security.Cryptography.Primitives": "4.0.0-beta-23516", + "System.Security.Cryptography.X509Certificates": "4.0.0-beta-23516", + "System.Security.Principal": "4.0.1-beta-23516", + "System.Security.Principal.Windows": "4.0.0-beta-23516", + "System.ServiceModel.Duplex": "4.0.1-beta-23516", + "System.ServiceModel.Http": "4.0.11-beta-23516", + "System.ServiceModel.NetTcp": "4.1.0-beta-23516", + "System.ServiceModel.Primitives": "4.1.0-beta-23516", + "System.ServiceModel.Security": "4.0.1-beta-23516", + "System.ServiceProcess.ServiceController": "4.1.0-beta-23516", + "System.Text.Encoding": "4.0.11-beta-23516", + "System.Text.Encoding.CodePages": "4.0.1-beta-23516", + "System.Text.Encoding.Extensions": "4.0.11-beta-23516", + "System.Text.RegularExpressions": "4.0.11-beta-23516", + "System.Threading.AccessControl": "4.0.0-beta-23516", + "System.Threading.Overlapped": "4.0.1-beta-23516", + "System.Threading.Tasks": "4.0.11-beta-23516", + "System.Threading.Tasks.Parallel": "4.0.1-beta-23516", + "System.Threading.Thread": "4.0.0-beta-23516", + "System.Threading.ThreadPool": "4.0.10-beta-23516", + "System.Threading.Timer": "4.0.1-beta-23516", + "System.Xml.ReaderWriter": "4.0.11-beta-23516", + "System.Xml.XDocument": "4.0.11-beta-23516", + "System.Xml.XmlDocument": "4.0.1-beta-23516", + "System.Xml.XmlSerializer": "4.0.11-beta-23516", + "System.Xml.XPath": "4.0.1-beta-23516", + "System.Xml.XPath.XDocument": "4.0.1-beta-23516", + "System.Xml.XPath.XmlDocument": "4.0.1-beta-23516", + "System.Net.WebSockets.Client": "4.0.0-beta-23516", + "System.Resources.ReaderWriter": "4.0.0-beta-23516", + "System.Runtime.CompilerServices.VisualC": "4.0.0-beta-23516", + "System.Net.Utilities": "4.0.0-beta-23516", + "System.IO.FileSystem.AccessControl": "4.0.0-beta-23516", + "System.IO.FileSystem.DriveInfo": "4.0.0-beta-23516", + "System.IO.MemoryMappedFiles": "4.0.0-beta-23516", + "System.IO.Pipes": "4.0.0-beta-23516" + } + } + } +} diff --git a/src/TypeCatalogGen/build.sh b/src/TypeCatalogGen/build.sh new file mode 100755 index 0000000000..f918114573 --- /dev/null +++ b/src/TypeCatalogGen/build.sh @@ -0,0 +1,8 @@ +. mono-snapshot mono +export DOTNET_REFERENCE_ASSEMBLIES_PATH=$MONO_PREFIX/lib/mono/xbuild-frameworks/ + +(cd Runtime && dotnet publish --framework dnxcore50 --runtime ubuntu.14.04-x64 --output bin) +ls Runtime/bin/*.dll | sed ':a;N;$!ba;s/\n/;/g' > powershell.inc + +dotnet restore +dotnet run CorePsTypeCatalog.cs powershell.inc diff --git a/src/TypeCatalogGen/project.json b/src/TypeCatalogGen/project.json new file mode 100644 index 0000000000..ed6ea92b24 --- /dev/null +++ b/src/TypeCatalogGen/project.json @@ -0,0 +1,31 @@ +{ + "version": "1.0.0.0", + "description": "PowerShell TypeCatalogGen.exe", + "authors": [ "andschwa" ], + "tags": [ "" ], + "projectUrl": "", + "licenseUrl": "", + + "compilationOptions": { + "emitEntryPoint": true + }, + + "dependencies": { + "System.Reflection.Metadata": "1.1.1-beta-23516", + "System.Collections.Immutable": "1.1.38-beta-23516" + }, + + "compileFiles": [ + "../monad/monad/nttargets/assemblies/core/PSAssemblyLoadContext/TypeCatalogGen/TypeCatalogGen.cs" + ], + + "frameworks": { + "dnx451": { + "frameworkAssemblies": { + "System.Runtime": "", + "System.IO": "", + "System.Reflection.Primitives": "" + } + } + } +}