mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 09:43:57 +08:00
Build PowerShell using DNX
This commit is contained in:
parent
9adb30e698
commit
fed949af2e
@ -23,7 +23,6 @@
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
|
||||
"Microsoft.CSharp": "4.0.1-beta-23420",
|
||||
"System.Collections": "4.0.11-beta-23420",
|
||||
"System.Linq": "4.0.1-beta-23420",
|
||||
|
@ -7,6 +7,7 @@
|
||||
"licenseUrl": "",
|
||||
|
||||
"compile": [
|
||||
"../src/assembly-info/Microsoft.Management.Infrastructure.assembly-info.cs",
|
||||
"../src/monad/wmi/WMIv2/Client/DotNetAPI/cs/AssemblyInfo.cs",
|
||||
"../src/monad/wmi/WMIv2/Client/DotNetAPI/cs/CancellationMode.cs",
|
||||
"../src/monad/wmi/WMIv2/Client/DotNetAPI/cs/CimApplication.cs",
|
||||
|
@ -6,8 +6,6 @@
|
||||
"projectUrl": "",
|
||||
"licenseUrl": "",
|
||||
|
||||
"scripts": { "prebuild": "powershell ./generate-csbindings.ps1" },
|
||||
|
||||
"compile": [
|
||||
"../src/monad/monad/src/commands/utility/new-object.cs",
|
||||
"../src/monad/monad/src/commands/utility/Measure-Object.cs",
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Samples.PowerShell.Host
|
||||
namespace Microsoft.PowerShell.Linux.Host
|
||||
{
|
||||
using System;
|
||||
using System.Globalization;
|
||||
@ -13,7 +13,7 @@ namespace Microsoft.Samples.PowerShell.Host
|
||||
/// </summary>
|
||||
internal class MyHost : PSHost, IHostSupportsInteractiveSession
|
||||
{
|
||||
public MyHost(PSListenerConsoleSample program)
|
||||
public MyHost(Program program)
|
||||
{
|
||||
this.program = program;
|
||||
}
|
||||
@ -21,7 +21,7 @@ namespace Microsoft.Samples.PowerShell.Host
|
||||
/// <summary>
|
||||
/// A reference to the PSHost implementation.
|
||||
/// </summary>
|
||||
private PSListenerConsoleSample program;
|
||||
private Program program;
|
||||
|
||||
/// <summary>
|
||||
/// The culture information of the thread that created
|
@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Samples.PowerShell.Host
|
||||
namespace Microsoft.PowerShell.Linux.Host
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,12 +11,7 @@ namespace Microsoft.Samples.PowerShell.Host
|
||||
using System.Runtime.InteropServices;
|
||||
using PowerShell = System.Management.Automation.PowerShell;
|
||||
|
||||
/// <summary>
|
||||
/// This sample shows how to implement a basic read-evaluate-print
|
||||
/// loop (or 'listener') that allowing you to interactively work
|
||||
/// with the Windows PowerShell engine.
|
||||
/// </summary>
|
||||
internal class PSListenerConsoleSample
|
||||
public class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to read user input.
|
||||
@ -79,6 +74,7 @@ namespace Microsoft.Samples.PowerShell.Host
|
||||
/// </summary>
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hit Main!");
|
||||
// Custom argument parsing
|
||||
string initialScript = null;
|
||||
if (args.Length > 0)
|
||||
@ -129,7 +125,7 @@ namespace Microsoft.Samples.PowerShell.Host
|
||||
// TODO: check for input on stdin
|
||||
|
||||
// Create the listener and run it
|
||||
PSListenerConsoleSample listener = new PSListenerConsoleSample(initialScript);
|
||||
Program listener = new Program(initialScript);
|
||||
|
||||
// only run if there was no script file passed in
|
||||
if (initialScript == null)
|
||||
@ -148,10 +144,7 @@ namespace Microsoft.Samples.PowerShell.Host
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the PSListenerConsoleSample class.
|
||||
/// </summary>
|
||||
public PSListenerConsoleSample(string initialScript)
|
||||
public Program(string initialScript)
|
||||
{
|
||||
// Create the host and runspace instances for this interpreter.
|
||||
// Note that this application does not support console files so
|
34
Microsoft.PowerShell.Linux.Host/project.json
Normal file
34
Microsoft.PowerShell.Linux.Host/project.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"description": "PowerShell On Linux Console",
|
||||
"authors": [ "andschwa" ],
|
||||
"tags": [ "" ],
|
||||
"projectUrl": "",
|
||||
"licenseUrl": "",
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
|
||||
"System.Management.Automation": "",
|
||||
"Microsoft.PowerShell.Security": "",
|
||||
"Microsoft.PowerShell.Commands.Utility": "",
|
||||
"Microsoft.PowerShell.Commands.Management": ""
|
||||
},
|
||||
|
||||
"commands": {
|
||||
"powershell": "Microsoft.PowerShell.Linux.Host"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Console": "4.0.0-beta-23420",
|
||||
"Microsoft.CSharp": "4.0.1-beta-23420",
|
||||
"System.Collections": "4.0.11-beta-23420",
|
||||
"System.Linq": "4.0.1-beta-23420",
|
||||
"System.Runtime": "4.0.21-beta-23420",
|
||||
"System.Threading": "4.0.11-beta-23420",
|
||||
"System.Diagnostics.FileVersionInfo": "4.0.0-beta-23420"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -10,7 +10,7 @@ using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.Samples.PowerShell.Host
|
||||
namespace Microsoft.PowerShell.Linux.Host
|
||||
{
|
||||
// this is all from https://msdn.microsoft.com/en-us/library/ee706570%28v=vs.85%29.aspx
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Samples.PowerShell.Host
|
||||
namespace Microsoft.PowerShell.Linux.Host
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Samples.PowerShell.Host
|
||||
namespace Microsoft.PowerShell.Linux.Host
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
@ -7,6 +7,7 @@
|
||||
"licenseUrl": "",
|
||||
|
||||
"compile": [
|
||||
"../src/assembly-info/System.Management.Automation.assembly-info.cs",
|
||||
"../src/monad/monad/src/engine/ChildrenCmdletProviderInterfaces.cs",
|
||||
"../src/monad/monad/src/engine/CmdletFamilyProviderInterfaces.cs",
|
||||
"../src/monad/monad/src/engine/MshCmdlet.cs",
|
||||
@ -665,7 +666,7 @@
|
||||
"TypesXmlStrings" : "../src/monad/monad/src/engine/resources/TypesXmlStrings.resx",
|
||||
"TransactionStrings" : "../src/monad/monad/src/engine/resources/TransactionStrings.resx",
|
||||
"WildcardPatternStrings" : "../src/monad/monad/src/engine/resources/WildcardPatternStrings.resx",
|
||||
"RemotingErrorIdStrings" : "../src/monad/monad/src/engine/resources/RemotingErrorIdStrings.resx",
|
||||
"RemotingErrorIdStrings" : "../src/monad/monad/src/engine/resources/remotingerroridstrings.resx",
|
||||
"DebuggerStrings" : "../src/monad/monad/src/engine/resources/DebuggerStrings.resx",
|
||||
"FormatAndOut_MshParameter" : "../src/monad/monad/src/engine/resources/FormatAndOut_MshParameter.resx",
|
||||
"NativeCP" : "../src/monad/monad/src/engine/resources/NativeCP.resx",
|
||||
@ -675,7 +676,7 @@
|
||||
"CoreClrStubResources" : "../src/monad/monad/src/engine/resources/CoreClrStubResources.resx",
|
||||
"FormatAndOut_format_xxx" : "../src/monad/monad/src/engine/resources/FormatAndOut_format_xxx.resx",
|
||||
"FormatAndOut_out_xxx" : "../src/monad/monad/src/engine/resources/FormatAndOut_out_xxx.resx",
|
||||
"Modules" : "../src/monad/monad/src/engine/resources/Modules.resx"
|
||||
"Modules" : "../src/monad/monad/src/engine/resources/modules.resx"
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
|
11
nuget.config
Normal file
11
nuget.config
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="asptnetcidev" value="https://www.myget.org/F/aspnetcidev/" />
|
||||
<add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v2/" />
|
||||
</packageSources>
|
||||
<activePackageSource>
|
||||
<add key="asptnetcidev" value="https://www.myget.org/F/aspnetcidev/" />
|
||||
<add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v2/" />
|
||||
</activePackageSource>
|
||||
</configuration>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user