Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,38 @@ We use ***very brief and informal*** design documents with descriptions of the p

If you have skipped this step and have gone ahead and made your changes already, feel free to open a pull request, but don't be too surprised 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 also possibly ask you to put an instance with your changes on [appspot](http://appspot.com), and provide a modified Companion app (if that applies) so that reviewers can play with the changes before looking at the source.

### Forking or cloning
Consider ***forking*** the project if you want to make changes to the sources. If you simply want to run it locally, you can simply ***clone*** it.

#### Forking
If you decide to fork, follow the [instructions](https://help.github.com/articles/fork-a-repo) given by github. After that you can clone your own copy of the sources with:

$ git clone https://github.com/YOUR_USER_NAME/punya.git

Make sure you change *YOUR_USER_NAME* to your user name.

Configuring a remote pointing to this repository is also a good idea if you are forking:

$ cd punya
$ git remote add upstream https://github.com/mit-dig/punya.git

Finally, you will also have to make sure that you are ignoring files that need ignoring:

$ cp sample-.gitignore .gitignore

### Checkout dependencies
App Inventor uses Blockly, the web-based visual programming editor from Google, as a core part of its editor. Blockly core is made available to App Inventor as a git submodule. The first time after forking or cloning the repository, you will need to perform the following commands:

$ git submodule update --init

For developers who will be working on Blockly within the context of App Inventor, the preferred checkout procedure 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](https://github.com/mit-cml/blockly) instead of the public read-only HTTPS URL assumed by default (to support pushing changes). After changing `.git/config`, a `git submodule update` will pull the repository.

If you need to switch back to a branch that does contains the Blockly and Closure Library sources in the tree, you will need to run the command:

$ git submodule deinit --all

to clear out the submodules ___before switching branches___. When switching back, you will need to repeat the initialization and update procedure above.

## Setup instructions (Vagrant)

The easiest way to get a development environment up and running is to use the provided Vagrantfile. Install [Vagrant](https://vagrantup.com) and open a terminal in the root directory of this repository. Run the following commands
Expand Down Expand Up @@ -81,38 +113,6 @@ If you are on an RPM-based distribution(Fedora), use:

Note 2: Certain Java 8 features, such as lambda expressions, are not supported on Android, so please don't use them in your changes to the source code.

### Forking or cloning
Consider ***forking*** the project if you want to make changes to the sources. If you simply want to run it locally, you can simply ***clone*** it.

#### Forking
If you decide to fork, follow the [instructions](https://help.github.com/articles/fork-a-repo) given by github. After that you can clone your own copy of the sources with:

$ git clone https://github.com/YOUR_USER_NAME/punya.git

Make sure you change *YOUR_USER_NAME* to your user name.

Configuring a remote pointing to this repository is also a good idea if you are forking:

$ cd punya
$ git remote add upstream https://github.com/mit-dig/punya.git

Finally, you will also have to make sure that you are ignoring files that need ignoring:

$ cp sample-.gitignore .gitignore

### Checkout dependencies
App Inventor uses Blockly, the web-based visual programming editor from Google, as a core part of its editor. Blockly core is made available to App Inventor as a git submodule. The first time after forking or cloning the repository, you will need to perform the following commands:

$ git submodule update --init

For developers who will be working on Blockly within the context of App Inventor, the preferred checkout procedure 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](https://github.com/mit-cml/blockly) instead of the public read-only HTTPS URL assumed by default (to support pushing changes). After changing `.git/config`, a `git submodule update` will pull the repository.

If you need to switch back to a branch that does contains the Blockly and Closure Library sources in the tree, you will need to run the command:

$ git submodule deinit --all

to clear out the submodules ___before switching branches___. When switching back, you will need to repeat the initialization 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 common installation issues and offers you a solution to fix them yourself. Make sure this passes all the checks before you proceed further.

Expand Down Expand Up @@ -156,19 +156,19 @@ The build server can be run from the terminal by typing:

Note that you will only 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 running, but you will need it to download the apk.

### Accessing your local server
## Accessing your local server
You should now be up and running; you can test this by pointing your browser to:

http://localhost:8888

Before entering or scanning the QR code in the Companion, check the box labeled "Use Legacy Connection".

### Running tests
## Running tests
The automated tests depend on [Phantomjs](http://phantomjs.org/). Make sure you install it and add it to your path. After that, you can run all tests by typing the following in a terminal window:

$ ant tests

### Building Release Code
## Building Release Code

Release builds with optimizations turned on for the web components of the system can be done by passing `-Drelease=true` to `ant`, e.g.:

Expand All @@ -182,7 +182,7 @@ The release configuration sets the following additional options:
- App Engine YaClient module is compiled without `<collapse-all-properties/>` 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'
## Hot-reloading GWT code with 'Super Dev Mode'
1. Run `ant devmode`
2. [Run the main server](#running-the-main-server).
3. Open http://localhost:9876 (*GWT CodeServer*) and drag the two bookmarklets (*Dev Mode On & Off*) to the bookmarks bar.
Expand Down
73 changes: 27 additions & 46 deletions appinventor/appengine/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -591,36 +591,39 @@
</uptodate>
</target>

<path id="YaClientApp.classpath">
<pathelement location="src"/>
<pathelement location="${build.dir}/components/ComponentTranslation/src"/>
<pathelement location="${build.war.dir}/WEB-INF/classes"/>
<pathelement location="${local.build.dir}/AiRebindLib.jar" />
<pathelement location="${build.dir}/common/CommonUtils-gwt.jar" />
<pathelement location="${build.dir}/common/CommonVersion-gwt.jar" />
<pathelement location="${build.dir}/components/CommonConstants-gwt.jar" />
<!-- external libs -->
<pathelement location="${lib.dir}/findbugs/jsr305.jar" />
<pathelement location="${lib.dir}/guava/guava-20.0.jar" />
<pathelement location="${lib.dir}/guava/guava-gwt-20.0.jar" />
<pathelement location="${lib.dir}/guava/error_prone_annotations-2.0.12.jar" />
<pathelement location="${lib.dir}/guava/j2objc-annotations-1.1.jar" />
<pathelement location="${lib.dir}/gwt_dragdrop/gwt-dnd-3.2.3.jar" />
<pathelement location="${lib.dir}/gwt_incubator/gwt-incubator-20101117-r1766.jar" />
<pathelement location="${lib.dir}/gwt_query/gwtquery-1.5-beta1.jar" />
<pathelement location="${lib.dir}/charba/charba-2.5.jar" />
<!-- gwt libs -->
<pathelement location="${gwt.sdk}/gwt-dev.jar"/>
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
</path>

<target name="YaClientApp"
description="GWT compile to JavaScript"
depends="common_CommonUtils,common_CommonVersion,components_CommonConstants,AiClientLib,AiRebindLib,CheckYaClientApp"
unless="YaClientApp.uptodate">
<mkdir dir="${build.extra.dir}" />
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src"/>
<pathelement location="${build.dir}/components/ComponentTranslation/src"/>
<pathelement location="${build.war.dir}/WEB-INF/classes"/>
<pathelement location="${local.build.dir}/AiRebindLib.jar" />
<pathelement location="${build.dir}/common/CommonUtils-gwt.jar" />
<pathelement location="${build.dir}/common/CommonVersion-gwt.jar" />
<pathelement location="${build.dir}/components/CommonConstants-gwt.jar" />
<!-- external libs -->
<pathelement location="${lib.dir}/findbugs/jsr305.jar" />
<pathelement location="${lib.dir}/guava/guava-20.0.jar" />
<pathelement location="${lib.dir}/guava/guava-gwt-20.0.jar" />
<pathelement location="${lib.dir}/guava/error_prone_annotations-2.0.12.jar" />
<pathelement location="${lib.dir}/guava/j2objc-annotations-1.1.jar" />
<pathelement location="${lib.dir}/gwt_dragdrop/gwt-dnd-3.2.3.jar" />
<pathelement location="${lib.dir}/gwt_incubator/gwt-incubator-20101117-r1766.jar" />
<pathelement location="${lib.dir}/gwt_jquery/gwt-jquery1.1.jar" />
<pathelement location="${lib.dir}/gwt_query/gwtquery-1.5-beta1.jar" />
<pathelement location="${lib.dir}/charba/charba-2.5.jar" />
<!-- gwt libs -->
<pathelement location="${gwt.sdk}/gwt-dev.jar"/>
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
<path refid="YaClientApp.classpath" />
</classpath>
<jvmarg value="-Xss2M"/> <!-- increase if you see a StackOverflowError -->
<jvmarg value="-Xmx2G"/>
Expand All @@ -638,30 +641,8 @@
description="Run development mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.codeserver.CodeServer">
<classpath>
<pathelement location="src" />
<pathelement location="${build.dir}/components/ComponentTranslation/src" />
<pathelement location="${build.war.dir}/WEB-INF/classes" />
<pathelement location="${local.build.dir}/AiRebindLib.jar" />
<pathelement location="${build.dir}/common/BlocksEditorHttpConstants-gwt.jar" />
<pathelement location="${build.dir}/common/CommonUtils-gwt.jar" />
<pathelement location="${build.dir}/common/CommonVersion-gwt.jar" />
<pathelement location="${build.dir}/components/CommonConstants-gwt.jar" />
<!-- external libs -->
<pathelement location="${lib.dir}/findbugs/jsr305.jar" />
<pathelement location="${lib.dir}/guava/guava-20.0.jar" />
<pathelement location="${lib.dir}/guava/guava-gwt-20.0.jar" />
<pathelement location="${lib.dir}/guava/error_prone_annotations-2.0.12.jar" />
<pathelement location="${lib.dir}/guava/j2objc-annotations-1.1.jar" />
<pathelement location="${lib.dir}/gwt_dragdrop/gwt-dnd-3.2.3.jar" />
<pathelement location="${lib.dir}/gwt_incubator/gwt-incubator-20101117-r1766.jar" />
<pathelement location="${lib.dir}/gwt_query/gwtquery-1.5-beta1.jar" />
<pathelement location="${lib.dir}/gwt_jquery/gwt-jquery1.1.jar" />
<!-- gwt libs -->
<path refid="YaClientApp.classpath" />
<pathelement location="${gwt.sdk}/gwt-codeserver.jar" />
<pathelement location="${gwt.sdk}/gwt-dev.jar" />
<pathelement location="${gwt.sdk}/gwt-user.jar" />
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
</classpath>
<jvmarg value="-Xmx1G" />
<arg line="-style PRETTY -logLevel INFO" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ top.HTML5DragDrop_reportError = function(errorCode) {};
top.HTML5DragDrop_confirmOverwriteKey = function(callback) {};
top.HTML5DragDrop_confirmOverwriteAsset = function(proejctId, name, callback) {};
top.HTML5DragDrop_checkProjectNameForCollision = function(name) {};
top.HTML5DragDrop_shouldShowDropTarget = function(target) {};s
top.HTML5DragDrop_shouldShowDropTarget = function(target) {};

var dropdiv = document.createElement('div');
dropdiv.className = 'dropdiv';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ defaultEndpoint = http://dbpedia.org/sparql
#not found: http://orion.tw.rpi.edu/~pattoe/moac.ttl
#syntax errors: https://www.w3.org/2001/sw/RDFCore/Schema/200212bwm/rdfs-namespace.xml

ontologies = http://xmlns.com/foaf/0.1/,http://hxl.humanitarianresponse.info/ns/hxl.ttl,https://download.bio2rdf.org/files/current/drugbank/drugbank.schema.owl,http://purl.org/dc/terms/,https://schema.org/version/latest/schemaorg-current-http.ttl,https://projects.cs.dal.ca/niche/sleepapnea.owl,https://www.w3.org/2000/01/rdf-schema#
ontologies = http://xmlns.com/foaf/0.1/,http://hxl.humanitarianresponse.info/ns/hxl.ttl,https://download.bio2rdf.org/files/current/drugbank/drugbank.schema.owl,http://purl.org/dc/terms/,https://schema.org/version/latest/schemaorg-current-http.ttl,https://projects.cs.dal.ca/niche/sleepapnea.owl
2 changes: 2 additions & 0 deletions appinventor/components/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@
<!-- Used by LDP-CoAP components -->
<copy toFile="${public.deps.dir}/element-connector-1.0.7.jar" file="${lib.dir}/element-connector/element-connector-1.0.7.jar" />
<copy toFile="${public.deps.dir}/californium-core-ldp-1.0.0-SNAPSHOT.jar" file="${lib.dir}/californium-core-ldp/californium-core-ldp-1.0.0-SNAPSHOT.jar" />
<!-- Used by GooglePlacesService -->
<copy toFile="${public.deps.dir}/google-maps-services-0.18.1.jar" file="${lib.dir}/google-maps-services/google-maps-services-0.18.1.jar" />
<!-- End PUNYA dependencies -->


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,8 @@ private YaVersion() {
public static final int LIGHTSENSOR_COMPONENT_VERSION = 1;
public static final int THERMOMETER_COMPONENT_VERSION = 1;

public static final int GPLACES_COMPONENT_VERSION = 1;

// Companion Versions and Update Information

// The PREFERRED_COMPANION is displayed to the end-user if
Expand Down
Loading