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
Next revisionBoth sides next revision
doc:dev_blockly [2014/11/01 18:59] admindoc:dev_blockly [2014/11/09 17:02] 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://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#sdk-downloads|emscripten- Package]] and install in ~/bin by following the instructions. Make sure to install the other listed programs (cmake,nodejs,..)  first (clang and llvm is not listed as needed,please install this too) 
  
-Install your own llvm version, as the original ubuntu version is not build with javascript support+===== Install emscripten ===== 
 +Under Ubuntu 14.04 that's easy: Just install 
  
-svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm , following http://llvm.org/docs/GettingStarted.html#setting-up-your-environment+  sudo apt-get install emscripten 
 +   
 +===== Compile Luac as javascript binary =====
  
 +Download the actual lua archive (http://www.lua.org/ftp/). Keep in mind that OOBD (actual) still uses the older lua 5.1 system. Unpack the archive and do some modifications in the make files:
  
  
 +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/Makefile
 +
 +replace the gcc compiler against emcc
 +
 +  CC= emcc
 +  
 +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:   $(ALL_C)
 +
 +Add the new defined target as emcc build target
 +        
 +  emcc:
 +        $(MAKE) comp MYCFLAGS=-DLUA_USE_POSIX
 +
 +
 +Start the build process 
 +
 +  emmake make emcc
 +  
 +change into the source dir
 +  cd src/
 +  
 +build luac.js
 +
 +  emcc -o luac.js  luac.o print.o liblua.a
 +
 +test it
 +  nodejs luac.js
 +  
 +build html wrapper
 +
 +  emcc -o luac.html  luac.o print.o liblua.a
 +
 +and load it via local webserver (''php -S localhost:8000'') into browser for testing
doc/dev_blockly.txt · Last modified: 2015/01/04 15:09 by admin