Skip to content

Instantly share code, notes, and snippets.

@auvipy
Forked from jhcarr/Sencha Env Setup Script
Last active August 29, 2015 14:17
Show Gist options
  • Save auvipy/13d2cb4e2535b925bc9f to your computer and use it in GitHub Desktop.
Save auvipy/13d2cb4e2535b925bc9f to your computer and use it in GitHub Desktop.
### Ubuntu 14.04, 64-bit
### Sencha Touch Environment Setup
# Update Java environment and tools
sudo apt-get update
sudo apt-get install openjdk-7-jdk
sudo apt-get install openjdk-7-jre
# Double-check version information
java -version
# Install Apache Ant
sudo apt-get install ant
# Double-check version information
ant -version
# Install Ruby 1.9.3
sudo apt-get install ruby1.9.3
# Install curl
sudo apt-get install curl
# Install git
sudo apt-get install git
# NodeJS and npm
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
node --version
npm --version
# If you're not sure you got the right version of NodeJS from apt-get:
sudo npm install -g n
n stable
# Install Phonegap
sudo npm install -g phonegap
# The Android SDK will require you to add in 32-bit libraries as they will be unavailable on 64-bit Ubuntu installations.
sudo apt-get install lib32z1:i386 libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386
## 1) Download Sencha Touch
## 2) Download Sencha Cmd
## 3) Download Android SDK
## 4) Unzip all downloads and install them.
## NOTE: ellipses refer to the semver numbers of the latest versions of each of the these tools.
cp -r ~/Downloads ~/Tools && cd ~/Tools
unzip adt-bundle...
unzip sencha-touch...
unzip SenchaCmd...
# Add android components to PATH in .bashrc or .zshrc
ANDROID_SDK="/home/<username>/Tools/adt-bundle.../sdk/tools"
ANDROID_PLATFORM="/home/<username>/Tools/adt-bundle.../sdk/platform-tools"
echo export PATH="$PATH:$ANDROID_SDK:$ANDROID_PLATFORM" >> ~/.bashrc
## Once these tools have been installed, the rest of the environment will need to be set up manually as it requires a .run wizard.
# Run the Android SDK manager
android
# and install Android 4.4.2 (API 19)
# Run the SenchaCmd .run file
# To verify that these steps succeeded, you should be able to run the following commands to create a Sencha Touch + Phonegap project
mkdir ~/Workspace && cd ~/Workspace
sencha -sdk ~/Tools/touch-1.2.3 generate app TestApp ./TestApp
cd ./TestApp
sencha phonegap init com.test.TestApp TestApp
# Open phonegap.local.properties and change "platforms = ios" to "platforms = android"
sencha --debug app build native
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment