Commit Graph
50 Commits
Author SHA1 Message Date
James Truher 8583cf5e96 update PSVersionTable code to use powershell.version rather than .version because on Linux the .version file doesn't seem to be binplaced. I postulate this is because it's a hidden file 2016-05-19 13:19:16 -07:00
Jim Truher (MSFT) cfd5bded5b add functionality to PSVersionTable to include GitCommitID and update tests 2016-05-18 15:35:09 -07:00
Andrew Schwartzmeyer 64efb9d799 Fix ReadLineWithTabCompletion port
Revert change made within the function since the function itself is
compiled out for the portable version of PowerShell.
2016-05-17 13:47:47 -07:00
Andrew Schwartzmeyer b67d765b3a Use WrapSize for WindowSize when unavailable 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 7afe9aa60f Say that the portable UI supports virtual terminal
Which is most likely true.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 772ecb8f8e Rename OPEN flag to PORTABLE
Makes more sense.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 44028f0da3 Fix formatting and output when stdout is redirected 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer fa86c89925 Enable pre and post write in WriteToConsole 2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer fbc794b933 Guard BufferSize for improper terminals 2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer 86e8673826 Don't build more unused code
This code is all used for reading secure strings, which we don't yet
support.
2016-05-17 13:28:44 -07:00
Jason Shirk 533a5e3225 Import System.Console In/Out/Error stream changes
Thanks Jason.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 630eb69c7c Add managed entrance for powershell project
The powershell project's `Main` function initializes the custom
`AssemblyLoadContext` and then delegates to `UnmanagedPSEntry.Start`.
This lets us undo several changes to the `ConsoleHost` managed
entry (notably, the `Start` function signature does not have to change,
thus the `consoleFilePath` variable still exists).
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer a1a722c4a1 Add powershell project shim
The `src/powershell` project builds Core PowerShell as a .NET CLI app,
with a dependency on `Microsoft.PowerShell.ConsoleHost`, so that the
latter can remain a library.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 72b763a7e1 Fix ConsoleHost on Windows CoreCLR build 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer fc9aa4cd88 Make ConsoleHost internals visible to powershell-tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer d8b2d1fb0e Fix command-line parser to support --parameters 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer c4bfc52c76 Migrate ConsoleHost .gitignore 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 849ea50ab7 Load PSReadLine by correct name
Linux is case-sensitive, so the modules are too.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 78dd93c1ac Build PSReadLine for ConsoleHost 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 2e71a090e7 Use ~/.powershell for ConsoleHost profile on Linux 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 8af7d5f344 Guard use of ConsoleControl in ConsoleHostRawUserInterface
This uses the RawUserInterface implementation from the original
CoreConsoleHost.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 02e9f100d2 Guard use of ConsoleControl in ConsoleHostUserInterface 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 702082f597 Guard use of ConsoleControl in ConsoleHost 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 3cd0d75278 Don't build ConsoleControl 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 602c7c39fc Don't build EngineInstaller 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 04f551fe91 Don't build MshHostMshSnapin 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 2f73af53df Remove native host dependency for ConsoleHost
When Open PowerShell is built (as .NET Core project), `OPEN` is defined.
The `Start` function normally used as the entry point from PowerShell's
custom native host is instead the real `Main` entry point of the
program, so it can be launched from the `dotnet` host.

Because Core PowerShell depends on the native host to setup the custom
assembly load context, we do it here in managed code immediately on
start-up.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 6f425d0ffd Make ConsoleHost deploy profiles and native libraries 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 2d2d58cb23 Make ConsoleHost/AssemblyInfo portable 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer ad9c4084d8 Make ConsoleHost emit powershell executable 2016-05-17 13:28:44 -07:00
PowerShell Team 3998ce06ba Update files from Source Depot changeset [SD:700586]
Corresponds to 84837459913bb00660964d19ea07f5e0c7b4b442 in psl-monad.
2016-04-28 13:53:04 -07:00
PowerShell Team 78a18c3f70 Revert "Update files from psl-monad"
This reverts commit 9ed2c2a68b.
This commit is here to make source-depot branch a parent of master
2016-04-06 12:03:50 -07:00
PowerShell Team 9ed2c2a68b Update files from psl-monad
This commit uses psl-monad branch source-depot 28156300
And corresponds to [SD:692351]
2016-04-06 11:55:18 -07:00
Sergei Vorobev 2464d58a51 Fix file casing to enable C# binding generation
Use windows-build\gen\<project> instead of windows-builg\gen\<somename>
2016-04-04 14:18:10 -07:00
Sergei Vorobev 8e4343e881 Merge remote-tracking branch 'origin/source-depot' into vors/master 2016-04-04 12:56:23 -07:00
Andrew Schwartzmeyer 151b5525c6 Merge src/Modules and host specific Modules 2016-04-01 19:40:18 -07:00
PowerShell Team bd599ed62a Move Module files from psl-monad submodule to super-project
This commit uses master branch 8abffd25ebc33cbc0b4ce224b46e699704b01728
2016-04-01 19:00:51 -07:00
Andrew Schwartzmeyer 1293c63289 Deploy powershell.exe as content for ConsoleHost
CMake will now output the artifacts of the native build into the
ConsoleHost project, where .NET CLI picks it up as content and deploys
it automatically.
2016-04-01 16:48:16 -07:00
PowerShell Team 5386c71bb2 Update files from psl-monad
This commit uses psl-monad branch source-depot cc6afbeb
And corresponds to [SD:692351]
2016-03-31 17:27:44 -07:00
Sergei Vorobev fe5bb28fd1 Remove compileFiles and resource sections from project.json files 2016-03-30 17:16:50 -07:00
Sergei Vorobev abf005fc38 Update AssemlbyInfo.cs files to use snk from super-project
Conflicts:
	src/System.Management.Automation/AssemblyInfo.cs
2016-03-30 17:16:49 -07:00
PowerShell Team 60b3b304f2 Move files from psl-monad submodule to super-project
This commit uses psl-monad branch source-depot 7209cb9
And corresponds to [SD:688741]
2016-03-30 17:16:23 -07:00
Andrew Schwartzmeyer 2f29f43e42 Set default culture to en-US
So that the resource manager doesn't try to load a non-existent
satellite assembly (and thus throw).

The culture `en-US` is the default `CurrentCulture` on all platforms I
tested, specifically not `en`.

Note that there is a problem with the FullCLR build where some other
assembly is still attempting to reference `Logging.resources` instead of
`System.Management.Automation.Logging.resources`.
2016-03-26 18:49:13 -07:00
Andrew Schwartzmeyer af9296035c Replace ConsoleHost's namedResource section with resource 2016-03-26 15:30:45 -07:00
Sergei Vorobev f7c7a1a38e Simplify Microsoft.PowerShell.ConsoleHost/project.json 2016-03-22 15:32:29 -07:00
Andrew Schwartzmeyer 7f60921094 Target net451 instead of dnx451 for FulLCLR 2016-03-09 14:25:35 -08:00
Andrew Schwartzmeyer 966be6a792 Treat C# warnings as errors 2016-02-24 16:33:17 -08:00
Andrew Schwartzmeyer e6e4dcafbe Build with new framework and new CLI
All libraries now use the framework `netstandard1.5`, and import the
`dnxcore50` and `portable` frameworks. The app that is published,
Microsoft.PowerShell.Linux.Host, that is, the top-level dependency that
emits an executable, instead targets `netstandardapp1.5` and has a new
`runtimes` key so that .NET CLI's `restore` and `publish` commands know
which runtime implementations to resolve.

When switching to the new CLI, we needed to fix how we specified our
dependencies. In particular, the .NET CLI team helped me figure out how
to download packages that are reference assembly only on Linux, with
implementations on Windows. The result of this is the new `frameworks`
setup.

Additionally, we were incorrectly specifying our build dependencies;
that is, projects we also build (not packages). The solution was much
cleaner. We removed the `type: build` section and replaced it with the
version `1.0.0-*` that all our projects currently use.

The `project.json` files also had their names, descriptions,
indentation, and versions fixed.

The build scripts were simplified.
2016-02-18 10:06:56 -08:00
Andrew Schwartzmeyer e0d81406d1 Update FullCLR ConsoleHost dependencies
Such that only one publish command is required.
2016-02-05 12:12:33 -08:00
Andrew Schwartzmeyer 989b59c089 Add Microsoft.PowerShell.ConsoleHost
For the Windows console.
2016-02-02 15:43:54 -08:00