User Tools

Site Tools


doc:dev_blockly

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:dev_blockly [2014/11/02 07:27] admindoc: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 :-)
  
  
 ===== Install emscripten ===== ===== Install emscripten =====
-Under Ubuntu 14.04 that's easy: Just 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 generates a 'undefined setjmp()error 
  
-  sudo apt-get install emscripten+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 ===== ===== Compile Luac as javascript binary =====
Line 26: Line 26:
  
   CC= emcc   CC= emcc
 +  
 +make a note of the compiler flags, which are used (e.g. ''-O2 -Wall''), as they are used again later.
 +
 +Make sure **not** to use the -DLUA_USE_POSIX directive, because it makes the compiler to use  _setjmp/_longjmp instead a "normal" setjmp/longjmp, which fails later when you run the .js result....
 +
      
 comment the LIBS directive, as it seems not to be used and creates a warning comment the LIBS directive, as it seems not to be used and creates a warning
Line 40: Line 45:
                  
   emcc:   emcc:
-        $(MAKE) comp MYCFLAGS=-DLUA_USE_POSIX+        $(MAKE) comp MYCFLAGS=
  
  
Line 52: Line 57:
 build luac.js build luac.js
  
-  emcc -o luac.js  luac.o print.o liblua.a+  emcc -O2 -Wall  -o luac.js  luac.o print.o liblua.a 
  
 test it test it
Line 62: Line 68:
  
 and load it via local webserver (''php -S localhost:8000'') into browser for testing and load it via local webserver (''php -S localhost:8000'') into browser for testing
 +
 +
 +===== Create own blockly Content =====
 +
 +  cp blockly_compressed.js blockly_uncompressed.js lua_compressed.js ../web/blockly/
 +
doc/dev_blockly.txt · Last modified: 2015/01/04 15:09 by admin