shell.js and opengl

28 views
Skip to first unread message

LM

unread,
Feb 16, 2012, 9:39:43 AM2/16/12
to v8cgi
Had a few questions regarding v8cgi.

Has anyone been able to get the shell.js example working in version
0.9.2? The quit, exit, bye seem to fail on Windows running from a
command prompt. I changed the code to the following to get it to
work:

cmd = system.stdin.readLine();
cmd = cmd.toString("utf-8");
var cmdquit = cmd.substr (0,4);
if (cmdquit == "quit" || cmdquit == "exit") { break; }
cmdquit = cmd.substr (0,3);
if (cmdquit == "bye") { break; }

A bit messy since readLine has a max of 65535. However, was having
trouble getting the read to work properly and match the carriage
return and/or line feed endings. Also, running toString("utf-8") on a
single character doesn't work well if someone is inputting a valid two
character utf-8 code.

Second question, is the OpenGL API ( API_GL ) available in the Windows
binary or has it not been compiled in? Tried the examples in the
example\OpenGL directory and I get:
Cannot find module 'GL'
Was hoping to do some experimenting with the OpenGL API.

Anyone have a simple way to build v8cgi from scratch on Windows with
mingw? At first, I couldn't even get the qt files to build (for the
v8 part) with the versions of mingw and msys I had installed. Then I
downloaded qt's version of mingw and tried with it. It took a day
just to compile their examples. Haven't had the chance to get any
further in the build process. Are there some simple steps to follow
or possibly a bash script that could run in msys that could implement
the entire build process from start to finish (including wget of
sources/tools)?

Thanks.

LM

unread,
Feb 16, 2012, 10:00:22 AM2/16/12
to v8cgi
On Feb 16, 9:39 am, LM <lme...@gmail.com> wrote:
> At first, I couldn't even get the qt files to build (for the
> v8 part) with the versions of mingw and msys I had installed.  Then I
> downloaded qt's version of mingw and tried with it.

Okay, I'm probably on a wild goose chase getting qt built, but had
read Chrome uses webkit and v8, so was trying to recreate that. Just
saw a reference that said qt has it's own Javascript code and doesn't
use v8. Guess I need to back up and start with just getting this to
build http://code.google.com/p/v8/ ? Any hints or further references/
information on a Windows build would be greatly appreciated. Thanks.

Ondřej Žára

unread,
Feb 16, 2012, 5:18:18 PM2/16/12
to v8...@googlegroups.com
Hi,

1) the exit/quit/bye commands in sample/shell.js are indeed not
working on Windows. Sorry for that; Windows support is not the main
focus of v8cgi development. I will fix them it soon - the reason is
(of course) the different line ending (\r\n) on Windows. In the
meantime, try the exit() v8cgi function.

2) Windows build of v8cgi does not contain the "gl" module. I was not
able to build it on MinGW (it is a contributed code).

3) Finally, v8/v8cgi builds normally on MinGW *without* qt. I will
send you the exact build command tomorrow when I get to my Windows
building box. Please post any errors you encounter; it should be
pretty easy to solve them.


Sincerely,
Ondrej Zara

2012/2/16 LM <lme...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "v8cgi" group.
> To post to this group, send email to v8...@googlegroups.com.
> To unsubscribe from this group, send email to v8cgi+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/v8cgi?hl=en.
>

Ondřej Žára

unread,
Feb 20, 2012, 8:27:25 AM2/20/12
to v8...@googlegroups.com
This is how I build v8cgi with MinGW:

scons memcached=0 pgsql=1 reuse_context=0 fibers=0
mysql_path="c:/program files/mysql/include/" pgsql_path="c:/program
files/pgsql/include" cpppath="c:/program files/sqlite;c:/program
files/gd/include;c:\program
files\httpd\srclib\apr-util\include;c:/program
files/httpd/include;c:/program
files/httpd/srclib/apr/include;c:/program
files/pthreads-win32/include;d:/fcgi-2.4.0/include"
libpath="c:/program files/sqlite;c:/program files/gd/lib;c:/program
files/pgsql/lib;c:/program
files/pthreads-win32/lib;d:/fcgi-2.4.0/libfcgi/.libs" fcgi=0 tls=0

O.

2012/2/16 Ondřej Žára <ondre...@gmail.com>:

LM

unread,
Feb 27, 2012, 7:35:28 AM2/27/12
to v8cgi
Thank you very much. Will give it a try and see if I can get it to
build on my end.
Reply all
Reply to author
Forward
0 new messages