Skip to content

Commit 29f8f3a

Browse files
committed
Merge pull request Azure#958 from stankovski/dev
Added installation script and updated scripts to use new msbuild configuration
2 parents 434cf42 + df99235 commit 29f8f3a

File tree

6 files changed

+31
-17
lines changed

6 files changed

+31
-17
lines changed

setup-powershellget/Setup/ShortcutStartup.ps1

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,30 @@ Param(
1717
[switch]$Install
1818
)
1919

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 = @"
2235
For a list of all Azure cmdlets type 'help azure'.
2336
For a list of Azure Pack cmdlets type 'Get-Command *wapack*'.
2437
"@
25-
Write-Output $welcomeMessage
38+
Write-Output $welcomeMessage
2639

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+
}

setup-powershellget/azurecmd.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<CustomAction Id="SetCustomActionDataValue" Return="check" Property="UpdatePSShortcut"
103103
Value="ShortcutPath=[AzureSdkMenu]Microsoft Azure PowerShell.lnk;DefaultShortcutPath=[ProgramMenuFolder]System Tools\Windows PowerShell.lnk" />
104104
<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"/>
105+
<CustomAction Id="RunModuleInstallScript" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -Command &quot;. \&quot;[PowerShellFolder]\ShortcutStartup.ps1\&quot; -Install&quot;" Execute="deferred" Impersonate="no" Return="check"/>
106106

107107
<InstallExecuteSequence>
108108
<Custom Action="SetCustomActionDataValue" After="CreateShortcuts">NOT Installed</Custom>

tools/Build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
1616
. ($scriptFolder + '.\SetupEnv.ps1')
1717

18-
msbuild "$env:AzurePSRoot\build.proj" /t:BuildDebug
18+
msbuild "$env:AzurePSRoot\build.proj" /t:Build

tools/BuildInstaller.ps1

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,8 @@ if ($wixInstallRoot -eq $null){
5050
#and we just register both 3.8 & 3.5 to simplify the script
5151
$env:path = $env:path + ";$wixInstallRoot"
5252

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
5555

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"

tools/RunCheckInTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ $scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
1616
. ($scriptFolder + '.\SetupTestEnv.ps1')
1717

1818
$env:AZURE_TEST_MODE="Playback"
19-
msbuild.exe $env:AzurePSRoot\build.proj /t:"Test;BuildSetupDebug"
19+
msbuild.exe $env:AzurePSRoot\build.proj /t:Test

tools/RunMockedScenarioTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
1616
. ($scriptFolder + '.\SetupTestEnv.ps1')
1717

18-
msbuild.exe $env:AzurePSRoot\build.proj /t:"BuildDebug;BeforeRunTests;MockedScenarioTests"
18+
msbuild.exe $env:AzurePSRoot\build.proj /t:"Build;BeforeRunTests;MockedScenarioTests"

0 commit comments

Comments
 (0)