mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-24 02:04:07 +08:00
parent
936626b7e8
commit
1244278e7e
@ -20,7 +20,7 @@
|
||||
<?define SimpleProductVersion = "$(env.SimpleProductVersion)" ?>
|
||||
<?define ProductSemanticVersion = "$(env.ProductSemanticVersion)" ?>
|
||||
<?define ProductProgFilesDir = "$(env.ProductProgFilesDir)" ?>
|
||||
<?define AddPathDefault = "$(env.AddPathDefault)"?>
|
||||
<?define PwshPath = "$(env.PwshPath)" ?>
|
||||
<!-- Explorer context submenu entries. The ampersand denotes the keyboard shortcut. -->
|
||||
<?define ExplorerContextSubMenuDialogText = "Open &here"?>
|
||||
<?define ExplorerContextSubMenuElevatedDialogText = "Open here as &Administrator"?>
|
||||
@ -165,7 +165,7 @@
|
||||
<!-- add ourselves to %PATH% so pwsh.exe can be started from Windows PowerShell or cmd.exe -->
|
||||
<Component Id="SetPath" Guid="{9dbb7763-7baf-48e7-b025-3bdedcb0632f}" KeyPath="yes">
|
||||
<Condition>ADD_PATH=1</Condition>
|
||||
<Environment Id="PATH" Action="set" Name="PATH" Part="last" Permanent="no" System="yes" Value="[$(var.ProductDirectoryName)]"/>
|
||||
<Environment Id="PATH" Action="set" Name="PATH" Part="last" Permanent="no" System="yes" Value="[$(var.ProductDirectoryName)]$(var.PwshPath)"/>
|
||||
</Component>
|
||||
<!-- Explorer context menu with 2 submenus to open PowerShell normally or as an Administator.
|
||||
See https://blogs.msdn.microsoft.com/andrew_richards/2017/03/01/enhancing-the-open-command-prompt-here-shift-right-click-context-menu-experience/ for details -->
|
||||
@ -243,7 +243,7 @@
|
||||
<Fragment>
|
||||
<UI>
|
||||
<Property Id="REGISTER_MANIFEST" Value="1" />
|
||||
<Property Id="ADD_PATH" Value="$(var.AddPathDefault)" />
|
||||
<Property Id="ADD_PATH" Value="1" />
|
||||
<Dialog Id="ExplorerContextMenuDialog" Width="370" Height="270" Title="!(loc.ExitDialog_Title)">
|
||||
<!-- If the checkboxes are defined first, then they are first in the tab order and can be ticked and unticked using the spacebar -->
|
||||
<Control Id="AddToPathCheckBox" Type="CheckBox" X="20" Y="60" Width="290" Height="17" Property="ADD_PATH" CheckBoxValue="0" Text="Add $(var.ProductName) to Path Environment Variable"/>
|
||||
|
@ -1637,6 +1637,11 @@
|
||||
<File Id="fil66F0F6FD1F8BC9AEE1ABDC8C805F396C" KeyPath="yes" Source="$(env.ProductSourcePath)\en-US\default.help.txt" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dirA620CA71E6FF4F50B6D7BB0761D17036" Name="preview">
|
||||
<Component Id="cmpA620CA71E6FF4F50B6D7BB0761D17036" Guid="{A620CA71-E6FF-4F50-B6D7-BB0761D17036}">
|
||||
<File Id="filA620CA71E6FF4F50B6D7BB0761D17036" KeyPath="yes" Source="$(env.ProductSourcePath)\preview\pwsh-preview.cmd" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="dir9956A485678594F33C936BA160AD06C4" Name="Modules">
|
||||
<Directory Id="dir9C2FC7DD1B408AD4F70123DF50131CBD" Name="PackageManagement">
|
||||
<Directory Id="dirBE29553BD60B3A0392916BB9B7487287" Name="1.1.7.0">
|
||||
@ -1959,6 +1964,7 @@
|
||||
<ComponentRef Id="cmp0AC970BEC366F9ADB96BD5FA34459C23" />
|
||||
<ComponentRef Id="cmp268C3104F2C2E1772E901BF932388BA0" />
|
||||
<ComponentRef Id="cmp5C3D90690414B641947FDA684E9BE9A9" />
|
||||
<ComponentRef Id="cmpA620CA71E6FF4F50B6D7BB0761D17036" />
|
||||
<ComponentRef Id="cmp2F126B84C7D50DC3F8F8E273DD6CE7DC" />
|
||||
<ComponentRef Id="cmp492FB39320E285A540ADEADE18A5F96E" />
|
||||
<ComponentRef Id="cmp07ED031B944723D46CE6E7A4657FAFB2" />
|
||||
|
@ -24,6 +24,10 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Include="..\powershell-win-core\pwsh-preview.cmd">
|
||||
<Link>preview\pwsh-preview.cmd</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
1
src/powershell-win-core/pwsh-preview.cmd
Normal file
1
src/powershell-win-core/pwsh-preview.cmd
Normal file
@ -0,0 +1 @@
|
||||
@"%~dp0\..\pwsh.exe" %*
|
@ -2429,14 +2429,14 @@ function New-MSIPackage
|
||||
[Environment]::SetEnvironmentVariable("ProductVersionWithName", $productVersionWithName, "Process")
|
||||
if(!$isPreview)
|
||||
{
|
||||
[Environment]::SetEnvironmentVariable("AddPathDefault", '1', "Process")
|
||||
[Environment]::SetEnvironmentVariable("PwshPath", '', "Process")
|
||||
[Environment]::SetEnvironmentVariable("UpgradeCodeX64", '31ab5147-9a97-4452-8443-d9709f0516e1', "Process")
|
||||
[Environment]::SetEnvironmentVariable("UpgradeCodeX86", '1d00683b-0f84-4db8-a64f-2f98ad42fe06', "Process")
|
||||
[Environment]::SetEnvironmentVariable("IconPath", 'assets\Powershell_black.ico', "Process")
|
||||
}
|
||||
else
|
||||
{
|
||||
[Environment]::SetEnvironmentVariable("AddPathDefault", '0', "Process")
|
||||
[Environment]::SetEnvironmentVariable("PwshPath", 'preview', "Process")
|
||||
[Environment]::SetEnvironmentVariable("UpgradeCodeX64", '39243d76-adaf-42b1-94fb-16ecf83237c8', "Process")
|
||||
[Environment]::SetEnvironmentVariable("UpgradeCodeX86", '86abcfbd-1ccc-4a88-b8b2-0facfde29094', "Process")
|
||||
[Environment]::SetEnvironmentVariable("IconPath", 'assets\Powershell_av_colors.ico', "Process")
|
||||
|
Loading…
Reference in New Issue
Block a user