@@ -11,7 +11,7 @@ write-host -BackgroundColor Black -ForegroundColor Yellow "Installing Google Chr
11
11
cinst googlechrome
12
12
13
13
write-host - BackgroundColor Black - ForegroundColor Yellow " Installing node.js"
14
- cinst nodejs.install - version 5.1 . 0
14
+ cinst nodejs.install - version 4.2 . 5
15
15
16
16
write-host - BackgroundColor Black - ForegroundColor Yellow " Installing Java Development Kit"
17
17
cinst jdk8
@@ -20,11 +20,14 @@ write-host -BackgroundColor Black -ForegroundColor Yellow "Installing Android SD
20
20
cinst android- sdk
21
21
22
22
# setup android sdk
23
- echo yes | cmd / c $env: localappdata \Android\android- sdk\tools\android update sdk -- filter " tools,platform-tools,android-23,build-tools-23.0.2,extra-android-m2repository" -- all -- no- ui
23
+ echo yes | cmd / c " $env: localappdata \Android\android-sdk\tools\android" update sdk -- filter " tools,platform-tools,android-23" -- all -- no- ui
24
+ echo yes | cmd / c " $env: localappdata \Android\android-sdk\tools\android" update sdk -- filter " build-tools-23.0.1,extra-android-m2repository" -- all -- no- ui
24
25
25
26
# setup environment
26
27
27
- if (! $env: ANDROID_HOME ) { [Environment ]::SetEnvironmentVariable(" ANDROID_HOME" , " $env: localappdata \Android\android-sdk" , " User" ) }
28
+ if (! $env: ANDROID_HOME ) {
29
+ [Environment ]::SetEnvironmentVariable(" ANDROID_HOME" , " $env: localappdata \Android\android-sdk" , " User" )
30
+ }
28
31
29
32
if (! $env: JAVA_HOME ) {
30
33
$curVer = (Get-ItemProperty " HKLM:\SOFTWARE\JavaSoft\Java Development Kit" ).CurrentVersion
@@ -34,6 +37,12 @@ if (!$env:JAVA_HOME) {
34
37
35
38
# install NativeScript CLI
36
39
write-host - BackgroundColor Black - ForegroundColor Yellow " Installing NativeScript CLI"
37
- npm install - g nativescript
40
+
41
+ $oldPathUser = [Environment ]::GetEnvironmentVariable(" PATH" , " User" )
42
+ $pathMachine = [Environment ]::GetEnvironmentVariable(" PATH" , " Machine" )
43
+ $myPath = [Environment ]::GetEnvironmentVariable(" PATH" )
44
+ [Environment ]::SetEnvironmentVariable(" PATH" , " $myPath ;$oldPathUser ;$pathMachine ;$env: ProgramFiles \nodejs" )
45
+
46
+ cmd / c " npm" install - g nativescript
38
47
39
48
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."
0 commit comments