Git Product home page Git Product logo

sencha-cordova-builder's Introduction

Sencha Cordova Builder

Enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch. Since the project is just a collection of build files, all that's needed is to import a file in your Sencha Touch build.xml and implement your logic where you want.

This current release was developed and tested on a Mac. Although I have not personally tested this on a PC, others have and reported success.

This project has absolutely no affiliation with Sencha or PhoneGap.

Released under the MIT license. See LICENSE.md for details.

Goals

  • Simple installation and configuration
  • Keep it familiar, no extra tools/scripts required
  • Work with the framework, not against it
  • Use conventions already provided by Sencha Touch

Requirements

Assuming you want to develop for both Android and iOS:

  • Android SDK
  • Mac
  • Windows is also supported
  • xCode
  • PhoneGap (Cordova) 2.0+
  • Sencha Touch 2.1+
  • Sencha Cmd 3.0+

Mac Installation

  1. If you already have the Sencha Tools Bridge installed, uninstall that first.

  2. Download and extract the project

  3. Install the script inside the project as ./sencha install

  4. Modify the cordova.properties file to match your environment by modifying the cordova.lib property which is the path to your PhoneGap framework.

  5. Finally, import the main cordova build file into your Sencha Touch build.xml file then implement the build you want to run. Assuming the project is extracted to the root directory and you're building for Android:

     <import file="/sencha-cordova-builder/build-cordova.xml" />
     <target name="-after-build" depends="-build-android" />
    

Windows Installation

  1. Download and extract the project

  2. Modify the cordova.properties file to match your environment by modifying the cordova.lib property which is the path to your PhoneGap framework.

  3. Finally, import the main cordova build file into your Sencha Touch build.xml file then implement the build you want to run. Assuming the project is extracted to the root directory and you're building for Android:

     <import file="/sencha-cordova-builder/build-cordova.xml" />
     <target name="-after-build" depends="-build-android" />
    

Usage

Building for Android

To build for Android, plug into the -after-build target provided by Sencha Touch as follows:

<target name="-after-build" depends="-build-android" />

The Sencha Cordova Builder provides various steps for you to inject your own logic during some key phases in the build process.

  • -before-init-android
  • -after-init-android
  • -before-build-android
  • -after-build-android

A common scenario might be to tap into the -after-build-android phase to automatically clean/compile/run your Android project. Assuming you're on a mac, here are some examples:

<target name="-after-build-android">
    <!-- clean -->
    <exec executable="${cordova.android.project}/cordova/clean" />

    <!-- compile -->
    <exec executable="${cordova.android.project}/cordova/debug" />

    <!-- emulate -->
    <exec executable="${cordova.android.project}/cordova/emulate" />

    <!-- or all in one shot (clean, compile, emulate) -->
    <exec executable="${cordova.android.project}/cordova/BOOM" />
</target>

If you're on Windows and want to rebuild the Android project, you'll need to delete the _android.built file that was placed in the root of your Sencha Touch app. This file is used as a flag to know when the build process has completed. If you're on Mac, you won't need to do this as long as you install the sencha script.

Building for iOS

To build for iOS, plug into the -after-build target provided by Sencha Touch as follows:

<target name="-after-build" depends="-build-ios" />

The Sencha Cordova Builder provides various steps for you to inject your own logic during some key phases in the build process.

  • -before-init-ios
  • -after-init-ios
  • -before-build-ios
  • -after-build-ios

If you're on Windows and want to rebuild the iOS project, you'll need to delete the _ios.built file that was placed in the root of your Sencha Touch app. This file is used as a flag to know when the build process has completed. If you're on Mac, you won't need to do this as long as you install the sencha script.

Building Android and iOS Together

As a convenience, you can build Android and iOS together by plugging into the -after-build target provided by Sencha Touch as follows:

<target name="-after-build" depends="-build-cordova-all" />

You can of course still tap into the following phases:

  • -before-init-android
  • -after-init-android
  • -before-build-android
  • -after-build-android
  • -before-init-ios
  • -after-init-ios
  • -before-build-ios
  • -after-build-ios

If you're on Windows and want to rebuild the Android and iOS projects, you'll need to delete the _android.built and _ios.built files that were placed in the root of your Sencha Touch app. These files are used as flags to know when the build process has completed. If you're on Mac, you won't need to do this as long as you install the sencha script.

sencha-cordova-builder's People

Contributors

bricemason avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sencha-cordova-builder's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.