You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes include:
* Asking permission from user for every installation - this includes an `all` option for eliminating subsequent questions
* Improved error handling - warning upon non-zero exit code
* Initial check for latest .NET Framework installed - should be at least 4
* Check for correct Chocolatey installation
* Fixed the syntax in docs header on invoking the setup script from the command prompt
* Added example syntax in docs header for invoking the setup script from powershell itself
} until ($script:answer-eq"y"-or$script:answer-eq"n"-or$script:answer-eq"a")
38
+
39
+
if ($script:answer-eq"n") {
40
+
Write-Host-ForegroundColor Yellow "You have chosen not to install $($programName). Some features of NativeScript may not work correctly if you haven't already installed it"
41
+
return
42
+
}
43
+
}
44
+
45
+
Write-Host$message
46
+
Invoke-Expression($script)
47
+
if ($LASTEXITCODE-ne0) {
48
+
Write-Host-ForegroundColor Yellow "WARNING: $($programName) not installed"
Install "Chocolately(It's mandatory for the rest of the script)""Installing Chocolately""iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
15
60
16
-
# install dependenciess with Chocolately
61
+
if ((Get-Command"cinst"-ErrorAction SilentlyContinue) -eq$null) {
62
+
Write-Host-ForegroundColor Red "Chocolatey is not installed or not configured properly. Download it from https://chocolatey.org/, install, set it up and run this script again."
63
+
Pause
64
+
exit1
65
+
}
17
66
18
-
write-host"To ensure consistent environment, this script will re-install all NativeScript dependencies."
67
+
# Install dependenciess with Chocolately
19
68
20
-
write-host-BackgroundColor Black -ForegroundColor Yellow "Installing Google Chrome (required to debug NativeScript apps)"
21
-
cinst googlechrome --force --yes
69
+
Install "Google Chrome""Installing Google Chrome (required to debug NativeScript apps)""cinst googlechrome --force --yes"
22
70
23
-
write-host-BackgroundColor Black -ForegroundColor Yellow "Installing Java Development Kit"
24
-
cinst jdk8 --force --yes
71
+
Install "Java Development Kit""Installing Java Development Kit""cinst jdk8 --force --yes"
25
72
26
-
write-host-BackgroundColor Black -ForegroundColor Yellow "Installing Android SDK"
write-host-BackgroundColor Black -ForegroundColor Yellow "This script has modified your environment. You need to log off and log back on for the changes to take effect."
48
-
Write-Host"Press any key to continue..."
49
-
[void][System.Console]::ReadKey($true)
93
+
Write-Host-ForegroundColor Green "This script has modified your environment. You need to log off and log back on for the changes to take effect."
0 commit comments