Permalink
Browse files

add spidermonkey dep + basic embed example

  • Loading branch information...
1 parent 8bddbe1 commit eb93c56ed224b94715ec00cb26beddae7055b319 @tmpvar committed Aug 14, 2011
Showing 6,262 changed files with 1,045,509 additions and 8 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
View
@@ -1,3 +1,2 @@
SConscript('src/SConstruct', variant_dir='build')
SConscript('example/SConstruct', variant_dir='bin')
-
View
@@ -1 +1 @@
-*.*
+*
View
@@ -1,7 +1,33 @@
+from os import path
+import subprocess
-webgl = File('../build/libWebGL.a')
+current_dir = path.abspath('.')
+build_dir = path.abspath(path.join(current_dir, '..', 'build'))
+
+webgl = File(path.join(build_dir, 'libWebGL.a'))
+spidermonkey_src = path.abspath(path.join(current_dir, '..', 'deps', 'spidermonkey', 'js', 'src'))
+spidermonkey = File(path.join(spidermonkey_src, 'libjs_static.a'))
+spidermonkey_includes = spidermonkey_src
+
+FRAMEWORKS = ['OpenGL', 'Cocoa']
Program('triangle', 'triangle.cc',
- LIBS=[webgl],
- FRAMEWORKS=['OpenGL', 'Cocoa']
+ LIBS = [webgl],
+ FRAMEWORKS = FRAMEWORKS
)
+
+# Configure spidermonkey
+if not path.isfile(path.join(spidermonkey_src, 'Makefile')):
+ spidermonkey_configure = [path.join(spidermonkey_src, 'configure'),'--disable-shared-js']
+ subprocess.call(spidermonkey_configure, cwd=spidermonkey_src)
+
+# Make spidermonkey
+spidermonkey_make = ['make', '-f', path.join(spidermonkey_src, 'Makefile')]
+subprocess.call(spidermonkey_make, cwd=spidermonkey_src)
+
+# Make webgljs
+env = Environment(CPPPATH=spidermonkey_includes)
+env.Program('webgljs', Glob('js/*.cc'),
+ LIBS = [webgl, spidermonkey],
+ FRAMEWORKS = FRAMEWORKS
+ )
View
@@ -0,0 +1,2 @@
+spidermonkey/js/src/Makefile
+
@@ -0,0 +1 @@
+721f9b43513e24e14c669113fd34b730457a4509 js185-1.0.0
View
@@ -0,0 +1,59 @@
+1. The latest release notes for SpiderMonkey can be found at:
+
+ https://developer.mozilla.org/En/SpiderMonkey/1.8.5
+
+
+2. js/jsd contains code for debugging support for the JavaScript engine in js/src.
+
+
+Packaging Notes
+---------------
+This release is based on revision 5f8f494a4c29 of https://hg.mozilla.org/releases/mozilla-2.0, with
+a few trivial changes applied to improve the manageability of the standalone-release. In addition
+to running autoconf 2.13 before bundling the release, the changes in the patches directory were
+applied.
+
+This standalone release introduces a new, experimental, naming convention for the SpiderMonkey
+shared library. This naming convention will not be rolled back into the mainline Mozilla source
+tree, however the relevant patches are included with this distribution.
+
+Note: Please copy wes@page.ca on bugs related to packaging this standalone release.
+
+Linux and non-Mac OS X Unices
+-----------------------------
+Previous releases and the master source repositories build a shared library named libmozjs.so. In
+an effort to make version identification easier for embedders and OS distribution maintainers, this
+standalone release builds libmozjs185.so.1.0.0 (.dylib.1.0.0 on Mac OS X).
+
+libmozjs185 indicates that this is the SpiderMonkey library which implements JavaScript 1.8.5. The
+1.0.0 suffix is of the form major.minor.micro revision. While it is unlikely that more than one
+official source release for a given version of JavaScript will be published, it has happened in the
+past (e.g JS 1.4-1), and we want to provide clear direction in case there is a compelling need:
+
+* a change in major revision number indicates a change which is ABI and API incompatible with the
+ previous release,
+
+* a change in minor revision number indicates a change which is ABI incompatible, but API
+ compatible with the previous release,
+
+* a change in micro revision number indicates a change which is both ABI and API compatible with
+ the previous release.
+
+A symbolic link will be provided linking libmoz185.js.so to this library, along with
+libmoz185.js.so.1.0 when building the install target.
+
+Most embeddings building on Unix or Linux should link against libmozjs185.so.1.0.
+
+The static library has been renamed, from libjs_static.a to libmozjs185-1.0.a.
+
+Mac OS X
+--------
+The versioning rules and symbolic links are the same as for the other flavours of Unix, but the
+library name is now libmozjs185.1.0.0.dylib.
+
+Most embeddings building on Mac OS X should link against libmozjs185.1.0.dylib.
+
+Microsoft Windows
+-----------------
+The versioning rules are the same as for Unix, but the the library name is now
+libmozjs185-1.0.dll. Symbolic links will not be created.
@@ -0,0 +1,103 @@
+#!gmake
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+
+
+DEPTH = ../..
+topsrcdir = @top_srcdir@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE = jsdebug
+LIBRARY_NAME = jsd
+FORCE_SHARED_LIB= 1
+ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),WINNT)
+LIBRARY_NAME = jsd32$(VERSION_NUMBER)
+endif
+
+# REQUIRES = java js
+
+
+EXTRA_DSO_LDOPTS += \
+ $(MOZ_COMPONENT_LIBS) \
+ $(MOZ_JS_LIBS) \
+ $(NULL)
+EXPORTS = jsdebug.h
+
+ifdef JS_THREADSAFE
+DEFINES += -DJS_THREADSAFE
+endif
+
+CSRCS = \
+ jsdebug.c \
+ jsd_atom.c \
+ jsd_high.c \
+ jsd_hook.c \
+ jsd_lock.c \
+ jsd_obj.c \
+ jsd_scpt.c \
+ jsd_stak.c \
+ jsd_step.c \
+ jsd_text.c \
+ jsd_val.c \
+ $(NULL)
+
+ifdef JSD_STANDALONE
+DIRS += jsdb
+else
+DIRS += idl
+CPPSRCS = jsd_xpc.cpp
+IS_COMPONENT = 1
+LIBXUL_LIBRARY = 1
+
+ifdef MOZ_ENABLE_LIBXUL
+FORCE_SHARED_LIB=
+MODULE_NAME = JavaScript_Debugger
+EXPORT_LIBRARY = 1
+endif
+endif
+
+ifdef ENABLE_TESTS
+TOOL_DIRS += test
+endif
+
+include $(topsrcdir)/config/rules.mk
+
+DEFINES += -DEXPORT_JSD_API
@@ -0,0 +1,6 @@
+js/jsd contains code for debugging support for the C-based JavaScript engine
+in js/src. jsd_xpc.cpp provides an XPCOM binding for the library.
+
+js/jsd/jsdb is a console debugger using only native code (see README in that
+directory.) This debugger is no longer being actively developed, though it
+should work.
@@ -0,0 +1,52 @@
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE = jsdebug
+XPIDL_MODULE = jsdservice
+
+XPIDLSRCS = \
+ jsdIDebuggerService.idl \
+ $(NULL)
+
+include $(topsrcdir)/config/rules.mk
Oops, something went wrong.

0 comments on commit eb93c56

Please sign in to comment.