Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2009-07-14 10:53:04
Size: 1427
Editor: anonymous
Comment:
Revision 4 as of 2009-07-14 11:08:45
Size: 2101
Editor: anonymous
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
ScriptTree/JsLibs hier beschreiben...
====== Jslibs ======
<<TableOfContents>>
= 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 24: Line 24:
{{{ {{{#!java
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

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"

   1  LoadModule('jsio');
   2  LoadModule('jsstd');
   3  LoadModule('jssound');
   4  LoadModule('jsaudio');
   5 
   6  var decoder = new OggVorbisDecoder(new File('41_30secOgg-q0.ogg').Open(File.RDONLY));
   7  var sourceId = Oal.GenSource();
   8 
   9  var pcm;
  10  while ( pcm = decoder.Read(10000) ) {
  11 
  12   var bufferId = Oal.Buffer(pcm);
  13   Oal.SourceQueueBuffers(sourceId, bufferId);
  14   if ( Oal.GetSourceInteger(sourceId, Oal.SOURCE_STATE) == Oal.INITIAL )
  15    Oal.PlaySource(sourceId);
  16  };
  17 
  18  var totalTime = decoder.frames/decoder.rate;
  19  var currentTimeOffset = Oal.GetSourceReal(sourceId, Oal.SEC_OFFSET);
  20  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)