Skip to content

Commit 5682401

Browse files
committed
Merge pull request #92 from Azure/dev
.
2 parents 7a97e3a + 6fce817 commit 5682401

File tree

163 files changed

+11973
-10679
lines changed

Some content is hidden

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

163 files changed

+11973
-10679
lines changed

AzurePowershell.Test.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<HDInsightTestDebug>.\src\ServiceManagement\HDInsight\Commands.HDInsight.Test\bin\Debug\Microsoft.WindowsAzure.Commands.HDInsight.Test.dll</HDInsightTestDebug>
3131
<StorageTestDebug>.\src\ServiceManagement\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll</StorageTestDebug>
3232
<KeyVaultTestDebug>.\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll</KeyVaultTestDebug>
33-
<UsageAggregationTestDebug>.\src\ResourceManager\Commerce\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll</UsageAggregationTestDebug>
33+
<UsageAggregationTestDebug>.\src\ResourceManager\UsageAggregates\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll</UsageAggregationTestDebug>
3434
<TestFilter>"!Functional&#x26;!Scenario&#x26;!AzureRTScenario&#x26;!Sequential&#x26;!PIRTest&#x26;!Preview&#x26;!ADDomain&#x26;!Network&#x26;!AzureRTUpload&#x26;!AzureRTCleanUp"</TestFilter>
3535
<ScenarioTestFilter>All</ScenarioTestFilter>
3636
<OneSDKCITFilter>"OneSDK&#x26;CIT"</OneSDKCITFilter>
@@ -59,7 +59,7 @@
5959
<XUnitTests Include=".\src\ResourceManager\AzureBatch\Commands.Batch.Test\bin\Debug\Microsoft.Azure.Commands.Batch.Test.dll"/>
6060
<XUnitTests Include=".\src\ResourceManager\Websites\Commands.Websites.Test\bin\Debug\Microsoft.Azure.Commands.Websites.Test.dll"/>
6161
<XUnitTests Include=".\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll"/>
62-
<XUnitTests Include=".\src\ResourceManager\Commerce\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll"/>
62+
<XUnitTests Include=".\src\ResourceManager\UsageAggregates\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll"/>
6363
<XUnitTests Include=".\src\ServiceManagement\ManagedCache\Commands.ManagedCache.Test\bin\Debug\Microsoft.Azure.Commands.ManagedCache.Test.dll"/>
6464
<XUnitTests Include=".\src\ServiceManagement\RemoteApp\Commands.RemoteApp.Test\bin\Debug\Microsoft.Azure.Commands.RemoteApp.Tests.dll"/>
6565
<XUnitTests Include=".\src\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll"/>

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## 2015.09.03 version 0.9.8
2+
* Azure Redis Cache cmdlets
3+
* New-AzureRMRedisCache - 'RedisVersion' parameter is deprecated.
24
* Azure Compute (ARM) Cmdlets
35
* Added -Launch parameter for Get-AzureRemoteDesktopFile cmdlet
46
* Added Id parameter for VM cmdlets to support piping scenario without ResourceGroupName parameter

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ This repository contains a set of PowerShell cmdlets for developers and administ
6969
* PowerShell remoting
7070
* Manage extension
7171
* BG Info
72+
* Chef
7273
* Puppet
7374
* Custom Script
7475
* Access

build.proj

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<AzureResourceManagerSln Include=".\src\ResourceManager.sln" />
2424
<AzureServiceManagementSln Include=".\src\ServiceManagement.sln" />
2525
<SetupSln Include=".\setup\azurepowershell.sln" />
26+
<SetupPowershellGetSln Include=".\setup-powershellget\powershellget.sln" />
2627
</ItemGroup>
2728

2829
<UsingTask
@@ -160,11 +161,16 @@
160161
Importance="high"
161162
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/115492 (Wix38.msi)"
162163
ContinueOnError="false" />
163-
<!--<MSBuild
164+
<MSBuild
165+
Projects="@(SetupPowershellGetSln)"
166+
Targets="Build"
167+
Properties="$(DebugBuildConfig)"
168+
ContinueOnError="false" />
169+
<MSBuild
164170
Projects="@(SetupSln)"
165171
Targets="Build"
166172
Properties="$(DebugBuildConfig)"
167-
ContinueOnError="false" />-->
173+
ContinueOnError="false" />
168174
</Target>
169175

170176
<!-- Build the Setup -->
@@ -177,11 +183,16 @@
177183
Importance="high"
178184
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/115492 (Wix38.msi)"
179185
ContinueOnError="false" />
180-
<!--<MSBuild
186+
<MSBuild
187+
Projects="@(SetupPowershellGetSln)"
188+
Targets="Build"
189+
Properties="$(ReleaseBuildConfig)"
190+
ContinueOnError="false" />
191+
<MSBuild
181192
Projects="@(SetupSln)"
182193
Targets="Build"
183194
Properties="$(ReleaseBuildConfig)"
184-
ContinueOnError="false" />-->
195+
ContinueOnError="false" />
185196
</Target>
186197

187198
<!-- Build the Cmdlets and Setup in all configurations -->
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup useLegacyV2RuntimeActivationPolicy="true">
4+
5+
<!--
6+
Use supportedRuntime tags to explicitly specify the version(s) of the .NET Framework runtime that
7+
the custom action should run on. If no versions are specified, the chosen version of the runtime
8+
will be the "best" match to what Microsoft.Deployment.WindowsInstaller.dll was built against.
9+
10+
WARNING: leaving the version unspecified is dangerous as it introduces a risk of compatibility
11+
problems with future versions of the .NET Framework runtime. It is highly recommended that you specify
12+
only the version(s) of the .NET Framework runtime that you have tested against.
13+
14+
Note for .NET Framework v3.0 and v3.5, the runtime version is still v2.0.
15+
16+
In order to enable .NET Framework version 2.0 runtime activation policy, which is to load all assemblies
17+
by using the latest supported runtime, @useLegacyV2RuntimeActivationPolicy="true".
18+
19+
For more information, see http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx
20+
-->
21+
22+
<supportedRuntime version="v4.0" />
23+
<supportedRuntime version="v2.0.50727"/>
24+
25+
</startup>
26+
27+
<!--
28+
Add additional configuration settings here. For more information on application config files,
29+
see http://msdn.microsoft.com/en-us/library/kza1yk3a.aspx
30+
-->
31+
32+
</configuration>
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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+
15+
namespace Microsoft.WindowsAzure.Setup
16+
{
17+
using System;
18+
using System.IO;
19+
using Deployment.WindowsInstaller;
20+
using System.Threading;
21+
22+
public class CustomAction
23+
{
24+
// The exception object which will store (if) exception which is occured in our sta thread
25+
private static Exception _STAThreadException;
26+
27+
private static uint[] powerShellDefaultColorTable = new uint[]
28+
{
29+
0x0, 0x800000, 0x8000, 0x808000, 0x80, 0x562401, 0xF0EDEE, 0xC0C0C0,
30+
0x808080, 0xFF0000, 0xFF00, 0xFFFF00, 0xFF, 0xFF00FF, 0xFFFF, 0xFFFFFF
31+
};
32+
33+
// Method which contains our custom action behaviour
34+
private static void RunSTAThread(object sessionObject)
35+
{
36+
try
37+
{
38+
Session session = sessionObject as Session;
39+
40+
string powerShellShortcutPath = session.CustomActionData["ShortcutPath"];
41+
string powerShellDefaultShortcutPath = session.CustomActionData["DefaultShortcutPath"];
42+
43+
if (!File.Exists(powerShellShortcutPath))
44+
{
45+
_STAThreadException = new Exception(string.Format("UpdatePSShortcut: file {0} does not exist", powerShellShortcutPath));
46+
return;
47+
}
48+
49+
ShellLink powerShellShellLink = new ShellLink(powerShellShortcutPath);
50+
if (File.Exists(powerShellDefaultShortcutPath))
51+
{
52+
session.Log("UpdatePSShortcut: found default Windows PowerShell shortcut at {0}", powerShellDefaultShortcutPath);
53+
ShellLink powerShellDefaultShellLink = new ShellLink(powerShellDefaultShortcutPath);
54+
powerShellShellLink.ConsoleProperties = powerShellDefaultShellLink.ConsoleProperties;
55+
}
56+
else
57+
{
58+
session.Log("UpdatePSShortcut: default Windows PowerShell shortcut does not exist at {0}", powerShellDefaultShortcutPath);
59+
60+
for (int i = 0; i < powerShellShellLink.ConsoleProperties.ColorTable.Length; i++)
61+
{
62+
powerShellShellLink.ConsoleProperties.ColorTable[i] = powerShellDefaultColorTable[i];
63+
}
64+
powerShellShellLink.AutoPosition = true;
65+
powerShellShellLink.CommandHistoryBufferSize = 50;
66+
powerShellShellLink.CommandHistoryBufferCount = 4;
67+
68+
powerShellShellLink.InsertMode = true;
69+
70+
powerShellShellLink.PopUpBackgroundColor = 15;
71+
powerShellShellLink.PopUpTextColor = 3;
72+
73+
powerShellShellLink.QuickEditMode = true;
74+
75+
powerShellShellLink.ScreenBackgroundColor = 5;
76+
powerShellShellLink.ScreenTextColor = 6;
77+
78+
powerShellShellLink.SetScreenBufferSize(120, 3000);
79+
powerShellShellLink.SetWindowSize(120, 50);
80+
}
81+
powerShellShellLink.Save();
82+
session.Log("UpdatePSShortcut: success");
83+
}
84+
catch (Exception ex)
85+
{
86+
_STAThreadException = new Exception(string.Format("UpdatePSShortcut: failed with exception {0}", ex.Message));
87+
}
88+
}
89+
90+
[CustomAction]
91+
public static ActionResult UpdatePSShortcut(Session session)
92+
{
93+
Thread staThread = new Thread(RunSTAThread);
94+
staThread.SetApartmentState(ApartmentState.STA);
95+
staThread.Start(session);
96+
// Wait for the new thread to finish its operations
97+
staThread.Join();
98+
99+
// If there is any exception in the new thread pass it to the installer
100+
if (_STAThreadException != null)
101+
{
102+
session.Log(_STAThreadException.Message);
103+
return ActionResult.Failure;
104+
}
105+
106+
return ActionResult.Success;
107+
}
108+
}
109+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
15+
using System.Reflection;
16+
using System.Runtime.InteropServices;
17+
18+
// General Information about an assembly is controlled through the following
19+
// set of attributes. Change these attribute values to modify the information
20+
// associated with an assembly.
21+
[assembly: AssemblyTitle("Setup")]
22+
[assembly: AssemblyDescription("")]
23+
[assembly: AssemblyCompany("Microsoft")]
24+
[assembly: AssemblyProduct("Setup")]
25+
[assembly: AssemblyCopyright("Copyright © Microsoft")]
26+
[assembly: AssemblyTrademark("")]
27+
[assembly: AssemblyCulture("")]
28+
29+
// Setting ComVisible to false makes the types in this assembly not visible
30+
// to COM components. If you need to access a type in this assembly from
31+
// COM, set the ComVisible attribute to true on that type.
32+
[assembly: ComVisible(false)]
33+
34+
// The following GUID is for the ID of the typelib if this project is exposed to COM
35+
[assembly: Guid("f4aa30f2-d2ce-4aef-88ed-a048b771c272")]
36+
37+
// Version information for an assembly consists of the following four values:
38+
//
39+
// Major Version
40+
// Minor Version
41+
// Build Number
42+
// Revision
43+
//
44+
// You can specify all the values or you can default the Build and Revision Numbers
45+
// by using the '*' as shown below:
46+
// [assembly: AssemblyVersion("1.0.*")]
47+
[assembly: AssemblyVersion("1.0.0.0")]
48+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{EA5BD11B-10B3-433D-A250-92AE76669D8D}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>Microsoft.WindowsAzure.Setup</RootNamespace>
12+
<AssemblyName>Microsoft.WindowsAzure.Setup</AssemblyName>
13+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<WixCATargetsPath Condition=" '$(WixCATargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets</WixCATargetsPath>
16+
<TargetFrameworkProfile />
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="System" />
37+
<Reference Include="System.Core" />
38+
<Reference Include="System.Xml.Linq" />
39+
<Reference Include="System.Xml" />
40+
<Reference Include="Microsoft.Deployment.WindowsInstaller" />
41+
</ItemGroup>
42+
<ItemGroup>
43+
<Compile Include="CustomAction.cs" />
44+
<Compile Include="Properties\AssemblyInfo.cs" />
45+
<Compile Include="ShellLink.cs" />
46+
<Content Include="CustomAction.config" />
47+
</ItemGroup>
48+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
49+
<Import Project="$(WixCATargetsPath)" />
50+
</Project>

0 commit comments

Comments
 (0)