Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2009-07-14 10:53:04
Size: 1427
Editor: anonymous
Comment:
Revision 3 as of 2009-07-14 11:00:28
Size: 2113
Editor: anonymous
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
====== Jslibs ====== = Jslibs =
Line 14: Line 14:
 * source dev on win32: dos file format
 * no autoconf: wants u to manual download/unpack js and nspr (and libpng ...)
 * source dev on win32: dos file format, ugly indent
 * no autoconf: wants u to manual download/unpack js and nspr (and libpng and ...)
Line 52: Line 52:



= wx / gluescript =

http://www.wxjavascript.net/ *deprecated*
http://gluescript.sourceforge.net/
~/freej/3rdparty/gluescript
 * complete? bindings to wx window toolkit, all platforms (I did not test that yet)
 * very weired c++ templates which I don't understand ;)
 * uses POCO C++ Libraries http://pocoproject.org/
   "platform independent c++ classes various stuff, also a javascript object"
 * uses fancy build generator: premake ... lua based?! http://premake.sourceforge.net
   "Premake is self-hosting; you will need a copy of Premake installed in order to build the source code from the repository" ... *lol*
 * ^^ therefore could not compile and test

ScriptTree/JsLibs hier beschreiben...

Jslibs

Created Montag 13 Juli 2009

standalone JavaScript development runtime environment with general purpose native libraries http://code.google.com/p/jslibs/

pro:

  • lots of bindings
  • generic dll/so loader

con:

  • source dev on win32: dos file format, ugly indent
  • no autoconf: wants u to manual download/unpack js and nspr (and libpng and ...)
  • needs xulrunner-1.9.1 (fixable)
  • still does not compile !VA_ARGS macro probs

  • many bindings incomplete
  • bindings too low level, e.g.

http://code.google.com/p/jslibs/wiki/jsaudio ("example 1" at very bottom) "A simple ogg player"

 LoadModule('jsio');
 LoadModule('jsstd');
 LoadModule('jssound');
 LoadModule('jsaudio');

 var decoder = new OggVorbisDecoder(new File('41_30secOgg-q0.ogg').Open(File.RDONLY));
 var sourceId = Oal.GenSource();

 var pcm;
 while ( pcm = decoder.Read(10000) ) {

  var bufferId = Oal.Buffer(pcm);
  Oal.SourceQueueBuffers(sourceId, bufferId);
  if ( Oal.GetSourceInteger(sourceId, Oal.SOURCE_STATE) == Oal.INITIAL )
   Oal.PlaySource(sourceId);
 };

 var totalTime = decoder.frames/decoder.rate;
 var currentTimeOffset = Oal.GetSourceReal(sourceId, Oal.SEC_OFFSET);
 Sleep( 1000 * (totalTime - currentTimeOffset) );

what to do with it?

  • steal code from src/common
  • steal jsio bindings
  • their macros looks quite usable for us

wx / gluescript

http://www.wxjavascript.net/ *deprecated* http://gluescript.sourceforge.net/ ~/freej/3rdparty/gluescript

  • complete? bindings to wx window toolkit, all platforms (I did not test that yet)
  • very weired c++ templates which I don't understand ;)

  • uses POCO C++ Libraries http://pocoproject.org/

    • "platform independent c++ classes various stuff, also a javascript object"
  • uses fancy build generator: premake ... lua based?! http://premake.sourceforge.net

    • "Premake is self-hosting; you will need a copy of Premake installed in order to build the source code from the repository" ... *lol*
  • therefore could not compile and test

ScriptTree/JsLibs (last edited 2009-07-14 11:08:45 by anonymous)