-
Notifications
You must be signed in to change notification settings - Fork 606
Build
Developers of Blockly Games need to build the project in order to make changes.
First, download the source code. Git is the easiest:
git clone https://github.com/google/blockly-games.git
Or use Subversion:
svn checkout https://github.com/google/blockly-games
Or just download a ZIP:
https://github.com/google/blockly-games/archive/master.zip
Enter the Blockly Games directory you just created, and get/build the dependencies (Closure is the main one):
cd blockly-games/
make deps
If make deps
fails with an error, try running it again and see if it gets farther. Pulling code from Github can sometimes be flaky.
The next step is to build all the English versions of the applications:
make en
There shouldn't be any errors.
Optionally, you might wish to build all the languages, not just English. Be warned that this takes approximately 4 hours, so this may be something you should do overnight.
make languages
While developing a game, it is nice to be able to quickly recompile only the English version of a single game. Here are the build commands for the existing games:
make index-en
make puzzle-en
make maze-en
make bird-en
make turtle-en
make movie-en
make music-en
make pond-docs-en
make pond-tutor-en
make pond-duck-en
make gallery-en
The previously mentioned make en
is just a shortcut for all the above commands.
Point a browser at blockly-games/appengine/index.html?lang=en
and you should
see all the games.
You may notice in the browser's console that there's a failed request for
file:///common/storage.js
on every game page. That's normal, storage is only
available when run on App Engine.
To avoid having to recompile after small changes, visit
/admin
(or blockly-games/appengine/admin.html
if being served directly off a file system)
to switch to uncompressed mode.
Now you can just press reload in the browser to get the
latest version after most changes. Note that edits to the Closure Templates
(*.soy
) and changes to dependencies (goog.require
) still require a
recompile.