Posted Dec 06 by Benjamin Chilibeck.
Updated Feb 06.

Easily package your appworks apps using the Node.js Appworks Builder Beta.

4830 views. 0 comments.

AppWorks Builder

No one likes to do the same thing over and over, but everyone likes to use cool new technologies!

Introducing the first beta version of the AppWorks builder. The appworks builder is written in Node.js and packaged using NPM. Eventually, it will be available as a direct install from npm, but we would like to get it into a more stable state first.

Version 0.0.3 The AppWorks Beta Builder now supports packaging shortcut apps!
Version 0.0.1 The first version with support for packaging mobile apps.

  1. Node.js

    If you already have node.js installed skip to step 2, otherwise we need to install Node.js on your system. Head over to nodejs.org to download and install it.

  2. NPM

    NPM stands for Node package manager, anyone using linux will be familiar with package managers already but the idea is you can easily install software components or “packages” from the command line.

    First download the appworks builder:

    awbuild-0.0.3.tgz (3kB)

    Now open a command prompt and navigate to where you downloaded the file. Run the following command to install the Appworks builder on your system.

    npm install -g awbuild-0.0.3.tgz

    You should see the following output:

    npm http GET https://registry.npmjs.org/moxie-zip/0.0.3
    npm http GET https://registry.npmjs.org/properties-parser/0.1.1
    npm http GET https://registry.npmjs.org/checksum/0.1.1
    npm http GET https://registry.npmjs.org/commander/2.1.0
    npm http 304 https://registry.npmjs.org/properties-parser/0.1.1
    npm http 304 https://registry.npmjs.org/moxie-zip/0.0.3
    npm http 304 https://registry.npmjs.org/commander/2.1.0
    npm http 304 https://registry.npmjs.org/checksum/0.1.1
    npm http GET https://registry.npmjs.org/optimist
    npm http 304 https://registry.npmjs.org/optimist
    npm http GET https://registry.npmjs.org/wordwrap
    npm http 304 https://registry.npmjs.org/wordwrap
    C:\Users\USERNAME\AppData\Roaming\npm\awbuild -> C:\Users\USERNAME\AppData\Roaming\npm\node_modules\awbuild\lib\run.js
    awbuild@0.0.3 C:\Users\USERNAME\AppData\Roaming\npm\node_modules\awbuild
    ??? commander@2.1.0
    ??? moxie-zip@0.0.3
    ??? properties-parser@0.1.1
    ??? checksum@0.1.1 (optimist@0.3.7)
    
  3. Let's make sure everything is working!

    In the same command prompt type awbuild -h. You should see the following output if everything went as planned.

    C:\Dev>awbuild -h
    
      Usage: run.js [options] [dir]
    
      Options:
    
        -h, --help     output usage information
        -V, --version  output the version number
        -l, --logs     Print lots of logs
        -u, --update   Update the value of releaseNumber in the app.propertites file
    
  4. Time to build!

    On the command prompt navigate to a folder that contains an AppWorks app. For example C:\Dev:

    C:/Dev
    |- /sampleapp_1.0.0
    |- /demoapp_1.0.0
    |- /testapp_1.0.0
    

    We have three sample apps in this C:\Dev directory. Lets package the first one.

    C:\Dev>awbuild sampleapp_1.0.0

    You should see the following:

    -------------------------------------
    AppWorks App Builder Version 0.0.3
    -------------------------------------
    
    app.properties values:
    
    displayName: Sample App 1
    description: A sample application
    releaseNumber: 1
    minimumClientVersion: 1
    type: app
    
    -------------------------------------
    Success! App is ready with name: sampleapp_1.0.0.zip
    -------------------------------------
    

Summary

That's it, our new directory listing is below. There is now a new zip file sampleapp_1.0.0.zip with the same name as the folder you just ran the awbuild on. This zip is ready to install on your AppWorks gateway.

C:/Dev
|- /sampleapp_1.0.0
|- /sampleapp_1.0.0.zip
|- /demoapp_1.0.0
|- /testapp_1.0.0

Currently the builder only supports packaging AppWorks apps but we'll be adding support for more types in the future. Post any questions or comments in the forums!


Table of Contents

Your comment

To leave a comment, please sign in.