Quickinstall (Windows)¶
Abstract¶
This is the quick installation documentation. This is a tersely written documentation for experienced developers. This documentation targets developers using Windows computers.
Unfortunately, the Fabric tools is not supported on Windows, so you need to do build steps manually. But they’re easy and you can always create some bat files.
Note
Windows is not the author’s main development platform. If you spot some errors, stupidity or have comments please contact me.
Installing Prerequisites¶
Note
I use Chokolatey – This is very opinionated, and you need admin access to your machine. If you know a better/alternate way contact me, or please issue a pull request on GitHub.
Install Chokolatey – this makes installing tools on Windows actually bearable.
Note
Please make sure you use Chokolatey in a admin shell.
Install tools:
C:> choco install git
Optionally install GOW – a light-weight set of UNIX like tools:
C:> choco install GOW
Node.js¶
Install Node and the node package manager npm:
C:> choco install nodejs.install
Close and reopen the shell, and:
C:> npm install -g grunt-cli
Python Setup¶
Install Python:
C:> choco install python2
At the time of this writing, Chokolatey installs Python to C:/tools/python2.x.x and adds this directory to the PATH. But unfortunately, it doesn’t add the Scripts directory within the python installation to the PATH. Make sure thyt you correct thos before you continue.
Python packages:
C:> pip install virtualenv
ExtJs¶
ExtJs – we need Sencha Command to build apps. Please follow the instructions there to install the tool. Please make sure to use ExtJs version 6.x. On my machine, sencha gives me the following output:
$ sencha
Sencha Cmd v6.0.0.202
Sencha Cmd provides several categories of commands and some global switches. In
most cases, the first step is to generate an application based on a Sencha SDK
such as Ext JS or Sencha Touch:
sencha -sdk /path/to/sdk generate app MyApp /path/to/myapp
Sencha Cmd supports Ext JS 4.1.1a and higher and Sencha Touch 2.1 and higher.
To get help on commands use the help command:
sencha help generate app
For more information on using Sencha Cmd, consult the guides found here:
http://docs.sencha.com/cmd/
Options
* --beta, -be - Enable beta package repositories
* --cwd, -cw - Sets the directory from which commands should execute
* --debug, -d - Sets log level to higher verbosity
* --info, -i - Sets log level to default
* --nologo, -n - Suppress the initial Sencha Cmd version display
* --plain, -pl - enables plain logging output (no highlighting)
* --quiet, -q - Sets log level to warnings and errors only
* --sdk-path, -sd - The location of the SDK to use for non-app commands
* --strict, -st - Treats warnings as errors, exiting with error if any warnings are present
* --time, -ti - Display the execution time after executing all commands
Categories
* app - Perform various application build processes
* compass - Wraps execution of compass for sass compilation
* compile - Compile sources to produce concatenated output and metadata
* cordova - Quick init Support for Cordova
* fs - Utility commands to work with files
* generate - Generates models, controllers, etc. or an entire application
* manifest - Extract class metadata
* package - Manages local and remote packages
* phonegap - Quick init support for PhoneGap
* repository - Manage local repository and remote repository connections
* space - Commands for interacting with Sencha Space.
* theme - Commands for low-level operations on themes
* web - Manages a simple HTTP file server
Commands
* ant - Invoke Ant with helpful properties back to Sencha Cmd
* audit - Search from the current folder for Ext JS frameworks and report their license
* build - Builds a project from a legacy JSB3 file.
* config - Load a properties file or sets a configuration property
* help - Displays help for commands
* js - Executes arbitrary JavaScript file(s)
* upgrade - Upgrades Sencha Cmd
* which - Displays the path to the current version of Sencha Cmd
Nexiles ExtJs widgets¶
Because this template uses the nexiles theme, we need to add the nexiles ext package repository. This needs to be done only once:
C:> sencha package repo add nexiles http://developer.nexiles.com/packages/ext
Clone Template, First Time Setup¶
Setup project directory¶
Clone the template repository, cd into the repo and do:
C:> virtualenv .
C:> Scripts\activate
C:> pip install -r requirements-windows.txt
C:> npm install
This needs to be done only once.
ExtJS Framework Setup¶
Due to the size of the ExtJS framework, we don’t include it in the repository. Use Sencha Command to create a initial empty app. To do so, cd into the repo and:
C:> grunt coffee
C:> grunt coffee
C:> sencha generate app -classic -ext AppTemplate static
This will populate the static/ext directory with the needed framework files.
First Build¶
Always activate the virtualenv!
Change directory to the repo dir and do:
C:> Scripts\activate
C:> grunt build