doc:dev_blockly
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:dev_blockly [2014/11/01 18:59] – admin | doc:dev_blockly [2015/01/04 15:09] (current) – admin | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| - | This is more a maintaince handbook for the OOBD team themself as anything the normal developer need to be worried about, so just forget this page | + | This is more a installation scrapbook from the OOBD team themself as anything the normal developer need to be worried about, so just forget this page :-) |
| - | Download the [[http:// | ||
| - | Install | + | ===== Install |
| + | The package under Ubuntu 14.04 is too old (1.10), but we'll need 1.12.1 to have the fastcomp compiler active. The older version | ||
| - | svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm , following http:// | + | So download the [[http://kripken.github.io/emscripten-site/docs/building_from_source/building_emscripten_from_source_using_the_sdk.html#building-emscripten-from-source-using-the-sdk|actual SDK]] and build it locally. |
| + | |||
| + | ===== Compile Luac as javascript binary ===== | ||
| + | Download the actual lua archive (http:// | ||
| + | |||
| + | in main Makefile, add a new target (emcc): | ||
| + | |||
| + | # Convenience platforms targets. | ||
| + | PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris emcc | ||
| + | |||
| + | | ||
| + | In scr/ | ||
| + | |||
| + | replace the gcc compiler against emcc | ||
| + | |||
| + | CC= emcc | ||
| + | | ||
| + | make a note of the compiler flags, which are used (e.g. '' | ||
| + | |||
| + | Make sure **not** to use the -DLUA_USE_POSIX directive, because it makes the compiler to use _setjmp/ | ||
| + | |||
| + | | ||
| + | comment the LIBS directive, as it seems not to be used and creates a warning | ||
| + | |||
| + | # LIBS= -lm $(MYLIBS) | ||
| + | |||
| + | |||
| + | creates a new target with only luac, but without lua itself | ||
| + | |||
| + | ALL_C= $(LUA_A) $(LUAC_T) | ||
| + | comp: | ||
| + | |||
| + | Add the new defined target as emcc build target | ||
| + | | ||
| + | emcc: | ||
| + | $(MAKE) comp MYCFLAGS= | ||
| + | |||
| + | |||
| + | Start the build process | ||
| + | |||
| + | emmake make emcc | ||
| + | | ||
| + | change into the source dir | ||
| + | cd src/ | ||
| + | | ||
| + | build luac.js | ||
| + | |||
| + | emcc -O2 -Wall -o luac.js | ||
| + | |||
| + | |||
| + | test it | ||
| + | nodejs luac.js | ||
| + | | ||
| + | build html wrapper | ||
| + | |||
| + | emcc -o luac.html | ||
| + | |||
| + | and load it via local webserver ('' | ||
| + | |||
| + | |||
| + | ===== Create own blockly Content ===== | ||
| + | |||
| + | cp blockly_compressed.js blockly_uncompressed.js lua_compressed.js ../ | ||
doc/dev_blockly.1414864798.txt.gz · Last modified: 2014/11/01 18:59 by admin
