Commit graph

83 commits

Author SHA1 Message Date
Steve Lee 1244278e7e [package] (#7345)
enable `pwsh-preview` to work on Windows
2018-07-25 13:32:10 -07:00
Dongbo Wang 6f3e9d0881
Added Markdown rendering cmdlets (#6926)
- `ConvertFrom-Markdown` is used for converting a markdown document or string to a MarkdownInfo object. It can optionally return an HTML or a VT100 encoded string in addition to an AST of the markdown document.
- `Show-Markdown` is used to either display the VT100 encoded string on the console or redirect the HTML string to the browser.
- `Set/Get-MarkdownOption` cmdlets are used to view or set markdown rendering options.
2018-07-13 13:56:17 -07:00
Dongbo Wang c34866d0fa [Feature] Remove 'VisualBasic' support from Add-Type 2018-07-12 23:50:09 -07:00
Travis Plunk b15709f444 update to latest package references, runtime framework, and SDK (#7272)
* update to latest package references

* update runtime framework

* update sdk

* automatically read NuGet package dependency info from csproj, where version info is fully qualified

* update file.wxs
2018-07-13 09:00:35 +05:00
Aditya Patwardhan b5601cfb66 [Feature] Added wix component updates 2018-07-12 17:17:52 -07:00
Paul Higinbotham a57fafedc6 Add ThreadJob module package and tests (#7169) 2018-07-05 17:38:12 -07:00
Andrew d04fef469b Merge Third Party Notices and License updates (#7203)
* Merge Third Party Notices

* Use capital J for 'json'
2018-06-29 11:46:19 -07:00
Ilya 839ecb866f Move to dotnet core 2.1.1 (#7161) 2018-06-28 23:10:10 -07:00
Steve Lee b25c1f6cbb When installing using MSI, set the working directory of the shortcut to the user home directory (#7072)
Leverage the -WorkingDirectory parameter on pwsh.exe to set the initial location.

Fix #5705
2018-06-19 18:33:01 -07:00
Christoph Bergmeister 0487a1be2f Disambiguate icon on Windows for preview builds/installers to use Powershell_av_colors and make daily build use Powershell_avatar instead (#7086)
Closes #6317
Using the preview side-by-side with the RTM version is a pain/confusing due to the icons being the same.
This makes the preview build (i.e. the embedded icon in `pwsh.exe`) and MSI installer package (shortcut icon and context menu) use the [Powershell_av_colors icon](https://raw.githubusercontent.com/PowerShell/PowerShell/master/assets/Powershell_av_colors.ico)
![image](https://user-images.githubusercontent.com/9250262/41491336-6e354936-70f0-11e8-965e-9b5e83be925b.png)

Therefore change the icon of the daily build (which used to use the Powershell_av_colors icon) to [Powershell_avatar](https://raw.githubusercontent.com/PowerShell/PowerShell/master/assets/Powershell_avatar.ico)
![image](https://user-images.githubusercontent.com/9250262/41491346-80f890a0-70f0-11e8-9ab5-bb789454c134.png)
This means that people like me who have a shortcut to pwsh of the daily build pinned to the taskbar, probably need to re-pin it to the taskbar to receive all changes (otherwise one will only get the change in the icon of the window)

Note: The `Test-IsPreview` method had to be moved to the build module, which is OK because the packaging module has a declared dependency on the build module in its manifest.
2018-06-18 15:54:11 -07:00
Steve Lee 11a98c47fb Update third party notices (#7042)
Based on adding a reference to new assemblies, need to update ThirdPartyNotices.txt
Add ThirdPartyNotices to all packages
2018-06-12 10:58:05 -07:00
Steve Lee 92cb949cac Use PSReadLine 2.0.0-beta2 from PSGallery (#6998)
Removed building PSReadLine from the repository. Instead, change to downloading from PSGallery.
2018-06-06 09:42:19 -07:00
Steve Lee 5dc7a6cb07 Add Windows Compatibility Pack 2.0.0 to PS Core and adopt the official .NET Core 2.1 (#6958)
To support PowerShell modules built with .NET Windows Compatibility Pack, we decided that it was best to ship the WCP assemblies with PS Core. This also adds many new .NET APIs be default while only adding ~3.5 MB additional disk footprint (to a ~137 MB install currently).
Also update the build to adopt the official .NET Core 2.1.
2018-06-03 22:06:26 -07:00
Steve Lee ed282ce0ef Update PowerShell to build against netcoreapp.2.1-rc1 (#6873) 2018-05-16 23:18:53 -07:00
Ilya 84344cbb32 Update PowerShell to build with .NET Core SDK 2.1.300-rc1-008662 (#6718)
* Build Update
- Change `TargetFramework` to `netcoreapp2.1` and removed unnecessary `RuntimeFrameworkVersion` from `PowerShell.Common.props`
- Update dotnet SDK to 2.1.300-rc1-008662
- Update `TypeGen` target in `Build.psm1` to work with 2.1
- Rename macOS runtime to `osx-x64` as the old build logic expects 10.12 and breaks running on 10.13 system.
- Remove `PackageReference` to `System.Memory` as it's part of dotnetcore 2.1
- Update search for `crossgen` executable to find the matching version

* Test Update
- Update test tools `WebListener` to latest `asp.net core`
- Marked `AuthHeader Redirect` tests as `Pending` due to change in CoreFX
2018-05-02 16:58:39 -07:00
Christoph Bergmeister 16e1823e33 Packaging: Add registry keys to support library folder background for explorer context menu (#6784)
Fixes #6590 by adding registry keys to support the existing explorer context menu also when being inside a library folder. It follows the existing pattern that was already applied to special cases such as drives, Desktop, etc.
Manually Tested on Win 10 1709
Thanks to @mklement0 for triaging the issue and already researching the required registry key (he should also be included in the release notes)
2018-05-02 14:43:25 -07:00
Ilya ffa7e4bac0 Enhance and refactor Add-Type cmdlet (#6141)
- Can compile a source from strings (TypeDefinition and MemberDefinition).
- Can compile from files.
- Can compile only to a file (without loading the produced assembly).
- Do not recompile and don't reload if the sources have not changed.
- Implement `-IgnoreWarnings` to not treat warnings as errors. By default, the cmdlet considers warnings as errors.
- Add VisualBasic support.
- Add new `-CompilerOptions` parameter to allow setting Roslyn command line parameters including:
    - Parser options.
    - Compile options.
    - Emit options.

**ATTENTION:** The `CompilerOptions` can be specified along with other options like `-OutputAssembly`, `-Language` and `-IgnoreWarnings`. The explicit setting parameters will take precedence over the same settings specified in `-CompileOptions`.

See docs about the compiler options:
https://github.com/dotnet/roslyn/blob/master/docs/compilers/CSharp/CommandLine.md
https://github.com/dotnet/roslyn/blob/master/docs/compilers/Visual%20Basic/CommandLine.md

**ATTENTION:** `-OutputType` default is `Library`. If `-OutputType` is absent the `-OutputType` default overlaps a value in `CompileOptions`. In other words output type ("target" ot "t" in command line) is always ignored in `CompileOptions`. We have to use `-OutputType` to set an output type.
2018-04-25 22:40:26 -07:00
Christoph Bergmeister fa3305534f Use '-WorkingDirectory' parameter to handle context menu when path contains single quotes. (#6660)
Use new '-WorkingDirectory' parameter on pwsh.exe to be able to use context menu when path contains single quotes.
2018-04-24 17:03:14 -07:00
Steve Lee f760fde0b7 Remove support for file to opt-out of telemetry, only support env var (#6601)
Since a PR added support to opt out of telemetry via an environment variable, we can remove the,
always intended to be a temporary, solution of deleting a file to opt out of telemetry since the
environment variable can be defined at the system level and exist before even installing PowerShell Core.

Because the variable is defined as opt out, a value of true, yes, or 1 means no telemetry is sent.
2018-04-13 10:29:39 -07:00
Steve Lee 5d3456d11b Fix formatting of tables where headers span multiple rows (#6504)
* In cases where the header spans multiple rows, need to correctly calculate whitespace and trim appropriately

* Use System.Span<int> and C# 7.2 language in SMA

* Added new ref assemblies to Files.wxs
refactor tests to remove similar xml content
added single column test case
2018-04-03 07:24:23 +04:00
Travis Plunk 77f36498e6
Simplify the paths the MSI uses (#6442)
- Implementation of PowerShell/PowerShell-RFC#115 (If anything changes in the RFC, we will treat it as a bug, and fix it later)
- Update registry and directory paths to use 6 for the version for stable and 6-preview for a preview release
- Add checkbox to set path
- default checkbox to off for preview builds and on for stable builds
2018-04-02 10:47:29 -07:00
Steve Lee c18b9999d6 Enable [Environment]::OSVersion to return current OS rather than compatible version (#6457)
* add application manifest dictating compatibility so that osversion shows appropriate os version on Windows
2018-03-28 13:36:16 -07:00
Travis Plunk 701b919345
MSI: add function to generate a MSP (#6445)
add a function to generate an MSP
2018-03-26 14:39:48 -07:00
Ilya 1b745f6a98 Add Test-Json cmdlet (NJsonSchema) (#5229)
Resolve #4220.

The cmdlet is based on NJsonSchema.
It allows to check:

JSON by only parsing
JSON against Schema
implicitly check Schema by parsing (based on previous line check)
NJsonSchema is under MIT (approved see https://github.com/PowerShell/PowerShell/pull/5229#issuecomment-342983215)
2018-03-26 11:52:48 -07:00
Travis Plunk 1730d8c496
MSI: update path with proper value (#6441)
MSI: update path with proper value
- Add verification that path is updated
2018-03-21 12:23:24 -07:00
Travis Plunk f7c2b7def1
MSI: remove the version from the product name (#6415)
MSI: remove the version from the product name

During patching the original MSI information is displayed.
This makes installing a patch for an MSI with a specific version very confusing.
2018-03-20 10:49:01 -07:00
Travis Plunk a099786cdc
Update to DotNet 2.0.6 (#6403)
Update to DotNet 2.0.6
  - this addresses [Microsoft Security Advisory CVE-2018-0875: Hash Collision can cause Denial of Service](https://github.com/PowerShell/Announcements/issues/4)
  - This is a port of d607f207b9 to 6.1
2018-03-15 14:54:00 -07:00
Travis Plunk 8ba6f319f3
MSI: update architecture specific filenames (#6379) 2018-03-13 14:02:12 -07:00
Travis Plunk da905f891b
MSI: Make sure that file components are patchable (#6303)
MSI: Make sure that file components are patchable
- avoid changing names and guids of components between builds as this prevents patch generation
- This required submitting the file generated by heat
- add code to make sure the generated file is not out of date
2018-03-06 10:13:26 -08:00
Travis Plunk 0e276c4e63
Make sure explorer context menu can be patched (#6302)
Make sure explorer context menu can be patched
- set keypath for explorer log context menu
2018-03-05 10:28:56 -08:00
Travis Plunk 7c7ec241a0
MSI: Cause preview builds to install Side by side with release builds (#6301)
MSI: Cause preview builds to install Side by side with release builds
- change the upgrade code if there is a preview part of the version
2018-03-05 10:27:47 -08:00
Travis Plunk 49ec403899
fix MSI creation errors, and capture wixpdb for later patch creation (#6221)
- add `wixpdb` output when creating `MSI` package
- capture `wixpdb` in official build
- clean up anything left behind from previous MSI builds before starting MSI build to prevent using dirty files.
- make sure MSI creation fails if there is an error
- ignore `.wixpdb` files in git
- Add functionality to `Start-NativeExecution` to 
    - only display output if there is an error 
    - log caller information
- WXS validation error fixes
    - Remove unused `ExitDialog` to fix ICE82
    - Add KeyPath to `SetPath` to fix ICE18
    - Use `HKMU` which translates to `HKLM` to runtime to fix various validation errors about creating the shortcut
- Suppress Validation errors
    - suppress ICE61, which is about same version upgrades being allowed
    - suppress ICE57, caused by the shortcut not being installed per user
2018-02-26 15:45:15 -08:00
Christoph Bergmeister 96bd86e5e3 fix various places that still refer to old versions of pwsh (#6179) 2018-02-23 09:54:58 -08:00
Christoph Bergmeister fddfb54669 Add options to enable PSRemoting and register Windows Event Logging Manifest to MSI installer (#5999) 2018-02-22 18:07:10 +04:00
Travis Plunk f906e9ddba
Revert PR 6043 - Adds script to patch the shortcut working directory to the user's home folder (#6203)
Revert PR 6043 - Remove failing script from MSI

reverted from commit 795c611
2018-02-21 10:29:29 -08:00
Travis Plunk ca959a735a
change the registry version detection value to semver from the default value (#6192)
change the registry version detection value to semanticversion from the default value
fixes #6171
2018-02-21 10:28:12 -08:00
Travis Plunk fa40a87bd7
Add registry value for easy detection (#6094)
Add registry value for easy detection. For example, the presence of a single key of 6.0.* x64. This is much faster than MSI detection.

Note there are currently two GUIDs, one for 6.0.* x64 and one for 6.0.* x86.

fixes #6090
2018-02-05 10:02:58 -08:00
Steve Lee 6ceaf92bf9 change logo to SVG (#6072)
Current README uses a PNG which doesn't scale for high dpi displays (starts to look fuzzy).
Created 64 pixel wide version of svg of the black logo and inserted into README.md.
Note that it currently doesn't render as the absolute URL points to master so that it gets
rendered correctly in other places where the README.md is used (like docker hub).
2018-02-02 18:35:59 -08:00
Chris Duck 795c61125a Adds script to patch the shortcut working directory to the user's home folder. (#6043)
Update the shortcut created by the installer to use %HOMEDRIVE%%HOMEPATH% for the working directory.
2018-01-31 08:11:29 +04:00
Benjamin Staneck 51dbfae0ff Rework Windows Start menu folder name (#5891)
Changes the Windows start menu folder name from ProductSemanticVersionWithName to ProductSemanticVersionWithNameAndOptionalArchitecture - now the start menu is `PowerShell` for all versions.
2018-01-26 08:14:55 +04:00
Christoph Bergmeister d3a775da9a Packaging: simplify building an installable package for Windows (#5871)
This is the continuation of PR 5499 that had to be abandoned due to a fatal merge conflict and I did not want to risk accidentally reverting recent fixes.

    Remove unnecessary/unused default for productGuid because it always gets a new Guid when being called from Start-PSPackage
    Add defaults for required files but also add extra path validation attribute
    Rename ProductGuid to ProductCode
2018-01-17 15:34:03 -08:00
Christoph Bergmeister a07cc49809 Use HKLM instead of HKCU registry keys since the current installation scope is perMachine. (#5915) 2018-01-17 07:09:12 +04:00
Christoph Bergmeister bb09b88390 Fix start menu folder clash of shortcut when x86 and x64 are both installed by appending " (x86)" for x86 to the . (#5826) 2018-01-10 18:18:44 -08:00
Christoph Bergmeister 378e8d5678 Make Explorer context menu registry entries platform specific to allow side by side of x86 and x64. The main menu has a " (x86)" appended to the main menu. (#5824)
Make explorer context menu registry entries platform specific to allow them to work also when both x86 and x64 are installed. The main menu has a " (x86)" appended to the main menu as well.
2018-01-10 08:17:06 +04:00
Christoph Bergmeister d2863fc50d Reduce image file sizes using lossless compression with imgbot (#5808) 2018-01-09 14:51:57 -08:00
Christoph Bergmeister f8a5fc1f19 packaging: x86 package gets installed as an x64 component and has the same UpgradeCode as the x64 installer leading to an uninstallation of an x64 installation (and vice versa) (#5812)
Fix bug #5597: x86/x64 installer are uninstalling each other when installing either of them:

-Make x86 installer to be installed as an x86 component (-arch argument to candle.exe, which sets the `sys.BUILDARCH` variable)
-Make the UpgradeCode unique per platform
-Replace `var.ProductTargetArchitecture` variable with sys.BUILDARCH use to have only 1 variable for the architecture
-Additionally, the architecture was appended to the package name to be able to distinguish the installations.
2018-01-08 12:32:38 -08:00
Chris e351a7e5c2 Move checkbox to the top to allow toggling it using the space bar (the Enter key already defaults to the Finish) button. (#5792)
Move definition of Launch PowerShell checkbox to the top to allow toggling it using the spacebar (the Enter key already defaults to the Finish button).
Reuse product name variable.
2018-01-06 11:53:45 +04:00
Chris ceb8f50e43 Add option to add explorer context menu in Windows installer (#5774)
A new dialogue is added in the Windows installer to offer the option of adding explorer.exe context menus to open PowerShell in the current location as a normal shell or as administrator. The context menu entries are achiveven via registry entries and is available when right-clicking on:
- the background of explorer
- a folder in explorer
- a drive in explorer
- on the Desktop
2018-01-05 21:53:19 +04:00
Travis Plunk 24298f76f5
Packaging: make mac package require 10.12 or newer (#5649)
Fixes #4290
Make mac package require 10.12 or newer.
Required that the package is installed to a disk with macOS installed.
The Apple example XML had a background image added as well, so I added a background image:
https://user-images.githubusercontent.com/10873629/33738943-014c9d00-db50-11e7-9628-310ce6427438.png
2017-12-08 10:55:34 -08:00
Steve Lee 4bc52d2358 Use consistent '(c)' for copyright symbol (#5210)
- Remove the year about copyright
- Fix casing of `All rights reserved`
- Replace Unicode characters representing single quote with a single quote
2017-10-26 14:12:19 -07:00