- 1 Welcome to MIT App Inventor
- 1.1 Introduction
- 1.2 Contributors
- 1.3 Setup instructions (Vagrant)
- 1.4 Setup instructions (manual)
- 1.4.1 Dependencies
- 1.4.2 Forking or cloning
- 1.4.3 Checkout dependencies
- 1.4.4 Troubleshooting common installation issues
- 1.4.5 Compiling
- 1.4.6 Running the server(s)
- 1.4.7 Accessing your local server
- 1.4.8 Running tests
- 1.4.9 Building Release Code
- 1.4.10 Hot-reloading GWT code with ‘Super Dev Mode’
- 1.5 Need help?
Welcome to MIT App Inventor
Learn more about MIT App Inventor .
This code is designed to be run in Google ‘s App Engine. MIT runs a public exemplify that all are welcome to use to build App Inventor Applications. You do not need to compile or use this code if you wish to build MIT App Inventor applications .
We provide this code for reference and for feel people who wish to operate their own App Inventor case and/or put up to the project .
This code is tested and known to work with Java 8.
The best manner to go about integrating changes in App Inventor is to start a conversation in the Open Source forum about whatever you intend to change or add .
We use very brief and informal design documents with descriptions of the proposed changes and screenshots of how the functionality would look like and behave, in regulate to gather adenine much feedback from the community, adenine early as possible. We generally use shared Google doctor for this ( with permissions to add comments ), but any format that is accessible from a vane browser ( and allows comments ) would do .
If you have skipped this footfall and have gone ahead and made your changes already, feel dislodge to open a pull request, but do n’t be excessively surprise if we ask you to go back and document it in a design document. Remember that the main goal of doing this is to gather as much feedback, as early as possible. We will besides possibly ask you to put an example with your changes on appspot, and provide a change Companion app ( if that applies ) so that reviewers can play with the changes before looking at the source .
Check out our open source site to find a fortune more data about the project and how to contribute to it .
Setup instructions (Vagrant)
The easiest way to get a development environment up and running is to use the put up Vagrantfile. Install Vagrant and open a terminal in the root directory of this depository. Run the surveil commands
vagrant plugin install vagrant-vbguest
#optionally for virtualbox users, and entirely once vagrant up
#initializes the VM
It may take a few minutes for Vagrant to initialize as it will pull down a virtual machine prototype from the Internet and configure it with all of the App Inventor dependencies. subsequent start-ups will be faster. Next, enter the virtual machine by running :
This should open up a terminal within the virtual machine in the directory
/vagrant/appinventor. This directory is the same as the
appinventor directory in this repository, shared between your host machine and the virtual machine. Any changes made on one side will be visible in the other. This allows you to edit files on your host machine with your choose editor, while keeping the build environment relegated to the virtual machine. To build App Inventor, you may now run :
and to run App Inventor :
Press Ctrl+C to quit the server. Enter die at the prompt to leave the virtual machine. To reclaim resources when you are not actively developing, you can run
vagrant halt to stop the virtual machine. To completely remove the virtual machine, run
vagrant destroy. If you destroy the VM, you will need to start these instructions from the top .
note 1 : For macOS users, if you are using VirtualBox and get any error while initializing the VM it may be due to security restrictions in System Preferences, consider reading this article .
note 2 : If it seems like none of the dependencies are installed in the VM, run
vagrant provision .
For better operation, consider using the manual instructions .
Setup instructions (manual)
This is a quick guide to get started with the sources. More detailed instructions can be found here, a slide express can be seen here, and all the documentation for the project is available in our locate .
You will need a full Java JDK ( adaptation 8, OpenJDK preferred ; JRE is not adequate ) and Python to compile and run the servers .
You will besides need a copy of the Google Cloud SDK for Java and ant .
If you want to make changes to the source, you are going to need to run an automatize quiz suite, and for that you will besides need phantomjs. Have a look at the testing department for more information .
note 1 : If you are working on a 64-bit linux organization, you need to install 32-bit version of : glibc ( to get a 32-bit translation of ld-linux.so ), zlib and libstdc++ .
If you are on a Debian-based distribution ( Ubuntu ), function :
$ sudo apt-get install libc6:i386 zlib1g:i386 libstdc++6:i386
If you are on an RPM-based distribution ( Fedora ), practice :
$ sudo dnf install glibc.i686 zlib.i686 libstdc++.i686
notice 2 : certain Java 8 features, such as lambda expressions, are not supported on Android, so please do n’t use them in your changes to the source code .
Forking or cloning
Consider forking the visualize if you want to make changes to the sources. If you merely want to run it locally, you can plainly clone it .
If you decide to fork, follow the instructions given by github. After that you can clone your own copy of the sources with :
$ git clone https://flickroom.net/YOUR_USER_NAME/appinventor-sources.git
Make certain you change YOUR_USER_NAME to your user name .
Configuring a outback sharpen to this repository is besides a good mind if you are forking :
$ cd appinventor-sources $ git remote add upstream https://flickroom.net/mit-cml/appinventor-sources.git
finally, you will besides have to make certain that you are ignoring files that need dismiss :
$ cp sample-.gitignore .gitignore
App Inventor uses Blockly, the web-based ocular program editor from Google, as a core character of its editor. Blockly core is made available to App Inventor as a rotter submodule. The first base meter after forking or cloning the repository, you will need to perform the follow commands :
$ git submodule update --init
For developers who will be working on Blockly within the context of App Inventor, the preferable checkout routine is to perform a
git submodule init, edit the
.git/config file to use the read/write SSH URL for MIT CML ‘s Blockly fork alternatively of the public read-only HTTPS URL assumed by default option ( to support pushing changes ). After changing
git submodule update will pull the repository .
If you need to switch back to a outgrowth that does contains the Blockly and Closure Library sources in the tree, you will need to run the instruction :
$ git submodule deinit --all
to clear out the submodules before switching branches. When switching back, you will need to repeat the low-level formatting and update procedure above .
Troubleshooting common installation issues
Run this command to run a self-diagnosis of your environment. This command tries to figure out park installation issues and offers you a solution to fix them yourself. Make sure this passes all the checks before you proceed promote .
Linux and macOS
Before compiling the code, an auth key is needed. You can create one by running the pursuit commands :
$ cd appinventor $ ant MakeAuthKey
once the key is in plaza, type the following to compile ( from the appinventor folder ) :
You will see a bunch of stuff in the terminal and after a few minutes ( it can take from 2 to 10 minutes, depending on your machine specification ) you should see a message saying something like Build Successful .
Running the server(s)
There are two servers in App Inventor, the chief server that deals with undertaking information, and the build server that creates apk files. More detailed information can be found in the App Inventor Developer Overview document .
Running the main server
$ your-google-cloud-SDK-folder/bin/java_dev_appserver.sh --port=8888 --address=0.0.0.0 appengine/build/war/
Make indisputable you change your-google-cloud-SDK-folder to wherever in your hard drive you have placed the Google Cloud SDK .
Running the build server
The build server can be run from the concluding by typing :
$ cd appinventor/buildserver $ ant RunLocalBuildServer
note that you will merely need to run the build server if you are going to build an app as an apk. You can do all the layout and programming without having the build server run, but you will need it to download the apk .
Accessing your local server
You should immediately be up and running ; you can test this by pointing your browser to :
Before entering or scanning the QR code in the Companion, check the box labeled “ Use Legacy Flickroomn ” .
The automatize tests depend on Phantomjs. Make sure you install it and add it to your path. After that, you can run all tests by typing the surveil in a terminal window :
$ ant tests
Building Release Code
Release builds with optimizations turned on for the web components of the organization can be done by passing
ant, e.g. :
Read more: Google drive
ant -Drelease=true noplay
The handout shape sets the following extra options :
- Blockly Editor is compiled with SIMPLE optimizations (instead of RAW)
- App Engine YaClient module is compiled without
to create per-language/browser builds
- App Engine YaClient module is compiled with optimization tuned to 9 and with 8 threads
Hot-reloading GWT code with ‘Super Dev Mode’
- Run the main server.
- Open http://localhost:9876 (GWT CodeServer) and drag the two bookmarklets (Dev Mode On & Off) to the bookmarks bar.
- Open http://localhost:8888 (App Engine server)
- To see changes “live”:
- Save your changes in file.
- Click on the “Dev Mode On” bookmarklet.
- A popup will be shown with a button to compile
- Press that button to compile. (That button is actually a bookmarklet. So you can drag this button to the bookmarks bar as well. This will come handy for subsequent compilations)
- After that, GWT CodeServer will compile the module incrementally.
- Refresh the page and that’s it! The changes are live.
Logs can be found at hypertext transfer protocol : //localhost:9876/log/ode and SourceMaps at hypertext transfer protocol : //localhost:9876/sourcemaps/ode
Join our community .