{"id":69,"date":"2015-05-28T08:08:53","date_gmt":"2015-05-28T08:08:53","guid":{"rendered":"http:\/\/fluentreports.com\/blog\/?p=69"},"modified":"2015-05-28T08:08:53","modified_gmt":"2015-05-28T08:08:53","slug":"nativescript-installation-on-linux","status":"publish","type":"post","link":"http:\/\/fluentreports.com\/blog\/?p=69","title":{"rendered":"NativeScript - Installation on Linux"},"content":{"rendered":"<p>For those just starting out on NativeScript here is what you need to get a fully running system on Linux Ubuntu 14.04 (64 bit).<\/p>\n<p>The first step is to do a update and add i386 architecture to your box and then download all the compilers:<br \/>\n<pre>sudo dpkg --add-architecture i386\nsudo apt-get update\nsudo apt-get upgrade\nsudo apt-get install -y libncurses5:i386 libstdc++6:i386 zlib1g:i386 lib32z1 lib32ncurses5 lib32bz2-1.0 libstdc++6:i386\n\n# Pull in all the Development stuff\nsudo apt-get install -y mc linux-headers-generic build-essential g++ ant git openjdk-7-jdk p7zip p7zip-full<\/pre><br \/>\nNext we need to download and build Node (This takes a while depending on the machine):<br \/>\n<pre>sudo wget -q --output-document=\/usr\/src\/node-latest.tar.gz http:\/\/nodejs.org\/dist\/node-latest.tar.gz\npushd \/usr\/src\nsudo tar zxvf node-latest.tar.gz &amp;gt; \/dev\/null\nsudo chown -R $USER:$USER node-v*\ncd node-v*\n.\/configure\nmake\nsudo make install\npopd<\/pre><br \/>\nNext we need to download and install the android SDK:<br \/>\n<pre>\u00a0 sudo wget -q --output-document=\/usr\/src\/android-sdk.tgz\u00a0 http:\/\/dl.google.com\/android\/android-sdk_r24.2-linux.tgz\n\u00a0 pushd \/usr\/local\n\u00a0 echo Extracting Android SDK...\n\u00a0 sudo tar zxvf \/usr\/src\/android-sdk.tgz &amp;gt; \/dev\/null\n\u00a0 sudo chown -R $USER:$USER \/usr\/local\/android-sdk-linux\n\u00a0 popd<\/pre><br \/>\nNext we are going to setup all the Paths so that some of the stuff we run later works properly:<br \/>\n<pre>&nbsp;&nbsp;ANDROID_NDK_FILENAME=android-ndk-r10e\n\u00a0 export JAVA_HOME=\/usr\/lib\/jvm\/java-7-openjdk-amd64\n\u00a0 export ANT_HOME=\/usr\/local\/ant\n\u00a0 export ANDROID_HOME=\/usr\/local\/android-sdk-linux\n\u00a0 export PATH=$PATH:$ANDROID_HOME\/tools:$ANDROID_HOME\/platform-tools:\/usr\/local\/$ANDROID_NDK_FILENAME\n\u00a0 echo &#039;export ANDROID_HOME=\/usr\/local\/android-sdk-linux&#039; &amp;gt;&amp;gt; ~\/.bashrc\n\u00a0 echo &#039;export PATH=$PATH:$ANDROID_HOME\/tools:$ANDROID_HOME\/platform-tools:\/usr\/local\/$ANDROID_NDK_FILENAME&#039; &amp;gt;&amp;gt; ~\/.bashrc\n\u00a0 echo &quot;export JAVA_HOME=\/usr\/lib\/jvm\/java-7-openjdk-amd64&quot; &amp;gt;&amp;gt; ~\/.bashrc\n\u00a0 echo &quot;export ANT_HOME=\/usr\/local\/ant&quot; &amp;gt;&amp;gt; ~\/.bashrc\n\n\u00a0 if [[ -f ~\/.profile ]]; then\n\u00a0\u00a0\u00a0 echo &#039;ANDROID_HOME=\/usr\/local\/android-sdk-linux&#039; &amp;gt;&amp;gt; ~\/.profile\n\u00a0\u00a0\u00a0 echo &#039;PATH=$PATH:$ANDROID_HOME\/tools:$ANDROID_HOME\/platform-tools:\/usr\/local\/$ANDROID_NDK_FILENAME&#039; &amp;gt;&amp;gt; ~\/.profile\n\u00a0\u00a0\u00a0 echo &quot;export JAVA_HOME=\/usr\/lib\/jvm\/java-7-openjdk-amd64&quot; &amp;gt;&amp;gt; ~\/.profile\n\u00a0\u00a0\u00a0 echo &quot;export ANT_HOME=\/usr\/local\/ant&quot; &amp;gt;&amp;gt; ~\/.profile\n\u00a0 fi\n\n\u00a0 if [[ -f ~\/.bash_profile ]]; then\n\u00a0\u00a0\u00a0 echo &#039;export ANDROID_HOME=\/usr\/local\/android-sdk-linux&#039; &amp;gt;&amp;gt; ~\/.bash_profile\n\u00a0\u00a0\u00a0 echo &#039;export PATH=$PATH:$ANDROID_HOME\/tools:$ANDROID_HOME\/platform-tools:\/usr\/local\/$ANDROID_NDK_FILENAME&#039; &amp;gt;&amp;gt; ~\/.bash_profile\n\u00a0\u00a0\u00a0 echo &quot;export JAVA_HOME=\/usr\/lib\/jvm\/java-7-openjdk-amd64&quot; &amp;gt;&amp;gt; ~\/.bash_profile\n\u00a0\u00a0\u00a0 echo &quot;export ANT_HOME=\/usr\/local\/ant&quot; &amp;gt;&amp;gt; ~\/.bash_profile\n\u00a0 fi<\/pre><br \/>\nNow we need to install all the Android SDK's, and yes we are install 17, 21, and 22.\u00a0\u00a0 17&amp;21 are required for different things.\u00a0 22 is for the latest sdk.<br \/>\n<pre>android update sdk --no-ui --filter platform-tool,android-17,android-21,android-22,build-tools-22.0.1<\/pre><br \/>\n(OPTIONAL) Now we need install the Android NDK -- This is only needed if you are planning to build actual android runtime and metadata tool.<br \/>\n<pre>&nbsp;&nbsp;ANDROID_NDK_FILENAME=android-ndk-r10e\n\u00a0 sudo wget -q --output-document=\/usr\/src\/$ANDROID_NDK_FILENAME.7z http:\/\/dl.google.com\/android\/ndk\/$ANDROID_NDK_FILENAME-linux-x86_64.bin\n\u00a0 sudo chmod a+r \/usr\/src\/$ANDROID_NDK_FILENAME.7z\n\u00a0 sudo mkdir \/usr\/local\/$ANDROID_NDK_FILENAME\n\u00a0 sudo chmod 777 \/usr\/local\/$ANDROID_NDK_FILENAME\n\u00a0 7z x \/usr\/src\/$ANDROID_NDK_FILENAME.7z -o\/usr\/loca<\/pre><br \/>\nNow we need to install Grunt, and the nativescript<br \/>\n<pre>\u00a0 sudo npm install grunt -g --unsafe-perm\n\u00a0 sudo npm install grunt-cli -g --unsafe-perm\n\u00a0 sudo npm install nativescript -g --unsafe-perm<\/pre><br \/>\nAnd finally we will clone and install each of the primary NativeScript Repo's<br \/>\n<pre>\u00a0 mkdir ~\/repos\n\u00a0 pushd ~\/repos\n\u00a0 git clone https:\/\/github.com\/NativeScript\/NativeScript\n\u00a0 git clone https:\/\/github.com\/NativeScript\/android-runtime\n\u00a0 git clone https:\/\/github.com\/NativeScript\/nativescript-cli\n\u00a0 git clone https:\/\/github.com\/NativeScript\/android-metadata-generator\n\n\u00a0 cd NativeScript\n\u00a0 npm install\n\u00a0 cd ..\n\n\u00a0 cd android-runtime\n\u00a0 npm install\n\u00a0 cd ..\n\n\u00a0 cd nativescript-cli\n\u00a0 npm install\n\u00a0 cd ..\n\n\u00a0 cd android-metadata-generator\n\u00a0 npm install\n\u00a0 cd ..\n\n\u00a0 popd<\/pre><br \/>\nYou now have everything you need to build all the components of NativeScript.\u00a0\u00a0 In each of the repos; you can do a <strong>grunt<\/strong> to build that specific repo.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For those just starting out on NativeScript here is what you need to get a fully running system on Linux Ubuntu 14.04 (64 bit). The first step is to do a update and add i386 architecture to your box and then download all the compilers: sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get upgrade&hellip; <a class=\"more-link\" href=\"http:\/\/fluentreports.com\/blog\/?p=69\">Continue reading <span class=\"screen-reader-text\">NativeScript - Installation on Linux<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[3,15],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-javascript","category-nativescript","entry"],"_links":{"self":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=69"}],"version-history":[{"count":2,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":71,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/69\/revisions\/71"}],"wp:attachment":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}