File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ write-host -BackgroundColor Black -ForegroundColor Yellow "Installing Google Chr
1111cinst googlechrome
1212
1313write-host - BackgroundColor Black - ForegroundColor Yellow " Installing node.js"
14- cinst nodejs.install - version 0.12 . 7
14+ cinst nodejs.install - version 5.1 . 0
1515
1616write-host - BackgroundColor Black - ForegroundColor Yellow " Installing Java Development Kit"
1717cinst jdk8
@@ -25,12 +25,12 @@ echo yes | cmd /c $env:localappdata\Android\android-sdk\tools\android update sdk
2525# setup environment
2626
2727if (! $env: ANDROID_HOME ) { [Environment ]::SetEnvironmentVariable(" ANDROID_HOME" , " $env: localappdata \Android\android-sdk" , " User" ) }
28- $oldPathUser = [Environment ]::GetEnvironmentVariable(" PATH" , " User" )
29- $pathMachine = [Environment ]::GetEnvironmentVariable(" PATH" , " Machine" )
30- $myPath = [Environment ]::GetEnvironmentVariable(" PATH" )
3128
32- [Environment ]::SetEnvironmentVariable(" PATH" , " $myPath ;$oldPathUser ;$pathMachine ;$env: localappdata \Android\android-sdk\tools;$env: localappdata \Android\android-sdk\platform-tools" )
33- [Environment ]::SetEnvironmentVariable(" PATH" , " $oldPathUser ;$env: localappdata \Android\android-sdk\tools;$env: localappdata \Android\android-sdk\platform-tools" , " User" )
29+ if (! $env: JAVA_HOME ) {
30+ $curVer = (Get-ItemProperty " HKLM:\SOFTWARE\JavaSoft\Java Development Kit" ).CurrentVersion
31+ $javaHome = (Get-ItemProperty " HKLM:\Software\JavaSoft\Java Development Kit\$curVer " ).JavaHome
32+ [Environment ]::SetEnvironmentVariable(" JAVA_HOME" , $javaHome , " User" )
33+ }
3434
3535# install NativeScript CLI
3636write-host - BackgroundColor Black - ForegroundColor Yellow " Installing NativeScript CLI"
You can’t perform that action at this time.
0 commit comments