App Inventor Build Helper Script

Hello,

I was bored today and I wanted to work on a little bit of a different project, so I decided to create a script that handles some common App Inventor developement tasks, namely:

  • Building everything (-a)
  • Just building the blocks editor (-b)
  • Building components and installing the companion (-c)
  • Running the local web server (-r)
  • And running tests (-t)

Advantages

a) Less typing. Just do ai -br instead of:

ant noplay; /usr/local/google-cloud-sdk/bin/java_dev_appserver.sh --port=8888 --address=0.0.0.0 appengine/build/war

b) Works from any directory.
c) You can put your options in any order, builds will always happen first.

To install

  1. Download ai.txt (1.3 KB)
  2. Remove the .txt extension
mv ai.txt ai
  1. Open it up in your favorite editor
  2. Change the top two variables so that they match your machine (make sure the paths are absolute)
gcloud=your-google-cloud-SDK-folder/bin/java_dev_appserver.sh
aisources=your-path-to/appinventor-sources
  1. Add the script somewhere in your PATH
  2. Make sure you have write and execute permissions on the file
chmod u+w path-to/ai
chmod u+x path-to/ai

Now this is just based on how I tend to develop, so feel free to change things and add your own shortcuts to the script! And if you want, please share your changes, because there’s probably someone else who would be interested.

(if there’s someone who could get a “quiet” mode working I would personally love that hehe)

Thank you for your time!
–Beka

7 Likes