Skip to content

Commit 3ec24ea

Browse files
committed
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
2 parents faef27a + 434cf42 commit 3ec24ea

File tree

137 files changed

+2216
-1828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+2216
-1828
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,5 @@ UpgradeLog*.htm
193193
# Microsoft Fakes
194194
FakesAssemblies/
195195

196-
.vs/
196+
.vs/
197+
/tools/*.dll

build.proj

Lines changed: 172 additions & 121 deletions
Large diffs are not rendered by default.

setup-powershellget/Setup/CustomAction.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ private static void RunSTAThread(object sessionObject)
7878
powerShellShellLink.SetScreenBufferSize(120, 3000);
7979
powerShellShellLink.SetWindowSize(120, 50);
8080
}
81+
powerShellShellLink.SetFont();
8182
powerShellShellLink.Save();
8283
session.Log("UpdatePSShortcut: success");
8384
}

setup-powershellget/Setup/ShellLink.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,14 @@ public void SetWindowSize(short x, short y)
435435
this.consoleProperties.dwWindowSize = c;
436436
}
437437

438+
public void SetFont()
439+
{
440+
this.consoleProperties.FaceName = "Lucida Console";
441+
this.consoleProperties.uFontFamily = 54;
442+
this.consoleProperties.uFontWeight = 400;
443+
this.consoleProperties.uCursorSize = 25;
444+
}
445+
438446
// This does more than console colors
439447
private void SetConsoleProperties()
440448
{
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
[CmdletBinding()]
15+
Param(
16+
[Parameter(Mandatory=$False, HelpMessage="Use Install parameter to install Azure modules from PowerShell Gallery.")]
17+
[switch]$Install
18+
)
19+
20+
cd c:\
21+
$welcomeMessage = @"
22+
For a list of all Azure cmdlets type 'help azure'.
23+
For a list of Azure Pack cmdlets type 'Get-Command *wapack*'.
24+
"@
25+
Write-Output $welcomeMessage
26+
27+
$VerbosePreference = "Continue"

setup-powershellget/azurecmd.wxs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@
2727
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
2828
<Property Id="ALLUSERS" Value="1" />
2929
<!-- per machine install-->
30+
31+
<Property Id="POWERSHELLEXE"><![CDATA[C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe]]></Property>
3032

3133
<Property Id="PSCOMPATIBLEVERSION">
3234
<RegistrySearch Id="PSCOMPATIBLEVERSION" Root="HKLM" Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine" Name="PSCompatibleVersion" Type="raw" />
3335
</Property>
34-
35-
<Condition Message="This setup requires the Windows PowerShell 3.0 or compatible version to be installed.">
36+
37+
<Condition Message="This setup requires the Windows PowerShell 5.0 or compatible version to be installed.">
3638
<!-- This condition will break if PowerShell has version x3.0 and it is not compatible with 3.0 -->
37-
<![CDATA[Installed or (PSCOMPATIBLEVERSION >< "3.0")]]>
39+
<![CDATA[Installed or (PSCOMPATIBLEVERSION >< "5.0")]]>
3840
</Condition>
3941

4042
<PropertyRef Id="NETFRAMEWORK40FULL" />
@@ -71,15 +73,18 @@
7173
<!-- Work around bug that PowerShell does not always consider default module paths. -->
7274
<Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="[PowerShellFolder]ServiceManagement" System="yes" />
7375
</Component>
76+
<Component Id="AzureSdkShortcutScript" Guid="3d0d589a-b34c-4c48-9a4c-df78f286c6a3">
77+
<File Id="AzureSdkShortcutScriptFile" KeyPath="yes" Source="$(var.SolutionDir)\Setup\ShortcutStartup.ps1" />
78+
</Component>
7479
</DirectoryRef>
75-
80+
7681
<DirectoryRef Id="AzureSdkMenu">
7782
<Component Id="AzureSdkShortcut" Guid="A9B58A22-F746-451D-8840-F887D8014C3C">
7883
<Shortcut Id="AzureSdkStartMenuShortcut"
7984
Name="Microsoft Azure PowerShell"
8085
Description="Microsoft PowerShell cmdlets"
8186
Target="[POWERSHELLPATH]\powershell.exe"
82-
Arguments="-NoExit -ExecutionPolicy Bypass -File &quot;[PowerShellFolder]ServiceManagement\Azure\Services\ShortcutStartup.ps1&quot;"/>
87+
Arguments="-NoExit -ExecutionPolicy Bypass -File &quot;[PowerShellFolder]\ShortcutStartup.ps1&quot;"/>
8388
<RemoveFolder Id="AzureSdkMenu" On="uninstall"/>
8489
<RemoveFile Id="RemoveStaleFiles" Directory="StaleAzureSdkMenu" Name="Windows Azure PowerShell.lnk" On="both"/>
8590
<RegistryValue Root="HKCU" Key="SOFTWARE\Microsoft\Microsoft SDKs\WindowsAzure\$(var.version)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
@@ -89,16 +94,21 @@
8994
<Feature Id="azurecmd" Title="Microsoft Azure PowerShell" Level="1" Description="Windows PowerShell commandlets">
9095
<ComponentRef Id="PSModulePath.System" />
9196
<ComponentRef Id="AzureSdkShortcut" />
97+
<ComponentRef Id="AzureSdkShortcutScript" />
9298
</Feature>
9399

94100
<Binary Id="CustomActions" SourceFile="$(var.caSourceDir)\Microsoft.WindowsAzure.Setup.CA.dll"/>
95101
<CustomAction Id="UpdatePSShortcut" BinaryKey="CustomActions" DllEntry="UpdatePSShortcut" Execute ="deferred" Impersonate="no"/>
96102
<CustomAction Id="SetCustomActionDataValue" Return="check" Property="UpdatePSShortcut"
97103
Value="ShortcutPath=[AzureSdkMenu]Microsoft Azure PowerShell.lnk;DefaultShortcutPath=[ProgramMenuFolder]System Tools\Windows PowerShell.lnk" />
104+
<CustomAction Id="SetExecutionPolicy" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command &quot;Set-ExecutionPolicy RemoteSigned -Force&quot;" Execute="deferred" Impersonate="no" Return="check"/>
105+
<CustomAction Id="RunModuleInstallScript" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command &quot;\&quot;[PowerShellFolder]\ShortcutStartup.ps1 -Install\&quot;&quot;" Execute="deferred" Impersonate="no" Return="check"/>
98106

99107
<InstallExecuteSequence>
100108
<Custom Action="SetCustomActionDataValue" After="CreateShortcuts">NOT Installed</Custom>
101109
<Custom Action="UpdatePSShortcut" After="SetCustomActionDataValue">NOT Installed</Custom>
110+
<Custom Action="SetExecutionPolicy" After="UpdatePSShortcut">NOT Installed</Custom>
111+
<Custom Action="RunModuleInstallScript" After="SetExecutionPolicy">NOT Installed</Custom>
102112
</InstallExecuteSequence>
103113

104114
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\media\License.rtf" />

setup-powershellget/powershellget.wixproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ProductVersion>3.5</ProductVersion>
77
<ProjectGuid>{36d6e303-e057-4963-a093-c7aae0fd92b3}</ProjectGuid>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<OutputName>AzurePowerShell</OutputName>
9+
<OutputName>AzurePowerShellGet</OutputName>
1010
<OutputType>Package</OutputType>
1111
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
1212
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>

0 commit comments

Comments
 (0)