File tree Expand file tree Collapse file tree 6 files changed +31
-17
lines changed Expand file tree Collapse file tree 6 files changed +31
-17
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,30 @@ Param(
17
17
[switch ]$Install
18
18
)
19
19
20
- cd c:\
21
- $welcomeMessage = @"
20
+ $error.clear ()
21
+ try {
22
+ if ($Install.IsPresent ) {
23
+ Write-Output @"
24
+
25
+ Finalizing installation of Azure PowerShell.
26
+ Installing Azure Modules from PowerShell Gallery.
27
+ This may take some time...
28
+ "@
29
+ Get-PackageProvider - Name NuGet - ForceBootstrap
30
+ Install-Module AzureRM.Installer
31
+ Install-AzureRM
32
+ } else {
33
+ cd c:\
34
+ $welcomeMessage = @"
22
35
For a list of all Azure cmdlets type 'help azure'.
23
36
For a list of Azure Pack cmdlets type 'Get-Command *wapack*'.
24
37
"@
25
- Write-Output $welcomeMessage
38
+ Write-Output $welcomeMessage
26
39
27
- $VerbosePreference = " Continue"
40
+ $VerbosePreference = " Continue"
41
+ }
42
+ }
43
+ catch { Write-Output $error }
44
+ if ($error ) {
45
+ Read-Host - Prompt " An error occured during installation. Press any key..."
46
+ }
Original file line number Diff line number Diff line change 102
102
<CustomAction Id =" SetCustomActionDataValue" Return =" check" Property =" UpdatePSShortcut"
103
103
Value =" ShortcutPath=[AzureSdkMenu]Microsoft Azure PowerShell.lnk;DefaultShortcutPath=[ProgramMenuFolder]System Tools\Windows PowerShell.lnk" />
104
104
<CustomAction Id =" SetExecutionPolicy" Property =" POWERSHELLEXE" ExeCommand =" -NoLogo -NoProfile -Command " Set-ExecutionPolicy RemoteSigned -Force" " Execute =" deferred" Impersonate =" no" Return =" check" />
105
- <CustomAction Id =" RunModuleInstallScript" Property =" POWERSHELLEXE" ExeCommand =" -NoLogo -NoProfile -Command " \" [PowerShellFolder]\ShortcutStartup.ps1 -Install \"" " Execute =" deferred" Impersonate =" no" Return =" check" />
105
+ <CustomAction Id =" RunModuleInstallScript" Property =" POWERSHELLEXE" ExeCommand =" -NoLogo -NoProfile -Command " . \" [PowerShellFolder]\ShortcutStartup.ps1\" -Install " " Execute =" deferred" Impersonate =" no" Return =" check" />
106
106
107
107
<InstallExecuteSequence >
108
108
<Custom Action =" SetCustomActionDataValue" After =" CreateShortcuts" >NOT Installed</Custom >
Original file line number Diff line number Diff line change 15
15
$scriptFolder = Split-Path - Path $MyInvocation.MyCommand.Definition - Parent
16
16
. ($scriptFolder + ' .\SetupEnv.ps1' )
17
17
18
- msbuild " $env: AzurePSRoot \build.proj" / t:BuildDebug
18
+ msbuild " $env: AzurePSRoot \build.proj" / t:Build
Original file line number Diff line number Diff line change @@ -50,13 +50,8 @@ if ($wixInstallRoot -eq $null){
50
50
# and we just register both 3.8 & 3.5 to simplify the script
51
51
$env: path = $env: path + " ;$wixInstallRoot "
52
52
53
- # Build the cmdlets in debug mode
54
- msbuild " $env: AzurePSRoot \build.proj" / t:" BuildDebug "
53
+ # Build the cmdlets and installer in debug mode
54
+ msbuild " $env: AzurePSRoot \build.proj" / t:Build
55
55
56
- # Regenerate the installer files
57
- & " $env: AzurePSRoot \tools\Installer\generate.ps1" ' Debug'
58
-
59
- # Build the installer
60
- msbuild " $env: AzurePSRoot \build.proj" / t:" BuildSetupDebug"
61
-
62
- Write-Host " MSI file path: $env: AzurePSRoot \setup\build\Debug\AzurePowerShell.msi"
56
+ Write-Host " MSI file path: $env: AzurePSRoot \setup\build\Debug\AzurePowerShell.msi"
57
+ Write-Host " MSI for PowerShell Gallery: $env: AzurePSRoot \setup-powershellget\build\Debug\AzurePowerShellGet.msi"
Original file line number Diff line number Diff line change @@ -16,4 +16,4 @@ $scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
16
16
. ($scriptFolder + ' .\SetupTestEnv.ps1' )
17
17
18
18
$env: AZURE_TEST_MODE = " Playback"
19
- msbuild.exe $env: AzurePSRoot \build.proj / t:" Test;BuildSetupDebug "
19
+ msbuild.exe $env: AzurePSRoot \build.proj / t:Test
Original file line number Diff line number Diff line change 15
15
$scriptFolder = Split-Path - Path $MyInvocation.MyCommand.Definition - Parent
16
16
. ($scriptFolder + ' .\SetupTestEnv.ps1' )
17
17
18
- msbuild.exe $env: AzurePSRoot \build.proj / t:" BuildDebug ;BeforeRunTests;MockedScenarioTests"
18
+ msbuild.exe $env: AzurePSRoot \build.proj / t:" Build ;BeforeRunTests;MockedScenarioTests"
You can’t perform that action at this time.
0 commit comments