Skip to content

Commit 6169f08

Browse files
committed
Merge pull request #997 from NativeScript/totev/setup-win
A script to setup Windows machine for nativeScript development
2 parents e05a98b + 80a5990 commit 6169f08

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

setup/native-script.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
# A Boxstarter script to set up Windows machine for NativeScript development
3+
4+
# install dependenciess with Chocolately
5+
6+
cinst googlechrome
7+
cinst nodejs.install -version 0.12.7
8+
cinst jdk8
9+
cinst gradle -version 2.3
10+
cinst android-sdk
11+
12+
# setup android sdk
13+
echo yes | cmd /c $env:localappdata\Android\android-sdk\tools\android update sdk --filter tools,platform-tools,android-22,build-tools-22.0.1,sys-img-x86-android-22,extra-android-m2repository,extra-google-m2repository,extra-android-support --all --no-ui
14+
15+
# setup environment
16+
17+
if (!$env:ANDROID_HOME) { [Environment]::SetEnvironmentVariable("ANDROID_HOME", "$env:localappdata\Android\android-sdk", "User") }
18+
$oldPathUser = [Environment]::GetEnvironmentVariable("PATH", "User")
19+
$pathMachine = [Environment]::GetEnvironmentVariable("PATH", "Machine")
20+
$myPath = [Environment]::GetEnvironmentVariable("PATH")
21+
22+
[Environment]::SetEnvironmentVariable("PATH", "$myPath;$oldPathUser;$pathMachine;$env:localappdata\Android\android-sdk\tools;$env:localappdata\Android\android-sdk\platform-tools")
23+
[Environment]::SetEnvironmentVariable("PATH", "$oldPathUser;$env:localappdata\Android\android-sdk\tools;$env:localappdata\Android\android-sdk\platform-tools", "User")
24+
25+
# install NativeScript CLI
26+
npm install -g nativescript
27+
28+
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

Comments
 (0)