mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 00:37:58 +01:00
Make binaries compilable on non-hemorrhage-edge releases. Add binaries subrepo.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
|
|
||||||
interfaces components/dactylIUtils.xpt
|
interfaces components/dactylIUtils.xpt
|
||||||
|
binary-component components/6.0-Linux_x86_64-gcc3/dactyl.so abi=Linux_x86_64-gcc3 appversion>=6.0 appversion<6.*
|
||||||
|
binary-component components/7.0-Linux_x86_64-gcc3/dactyl.so abi=Linux_x86_64-gcc3 appversion>=7.0 appversion<7.*
|
||||||
|
binary-component components/8.0-Linux_x86_64-gcc3/dactyl.so abi=Linux_x86_64-gcc3 platformversion>=8.0 platformversion<8.*
|
||||||
binary-component components/9.0-Linux_x86_64-gcc3/dactyl.so abi=Linux_x86_64-gcc3 platformversion>=9.0 platformversion<9.*
|
binary-component components/9.0-Linux_x86_64-gcc3/dactyl.so abi=Linux_x86_64-gcc3 platformversion>=9.0 platformversion<9.*
|
||||||
|
|
||||||
# vim:se tw=0 ft=cfg:
|
# vim:se tw=0 ft=cfg:
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
|
|
||||||
PLATFORM = 9.0-Linux_x86_64-gcc3
|
GECKO_MAJOR ?= 9
|
||||||
DEFINES = -DGECKO_MAJOR=9 -DGECKO_MINOR=0
|
GECKO_MINOR ?= 0
|
||||||
|
ABI_OS ?= Linux
|
||||||
|
ABI_ARCH ?= x86_64
|
||||||
|
ABI_COMPILER ?= gcc3
|
||||||
|
ABI ?= $(GECKO_MAJOR).$(GECKO_MINOR)-$(ABI_OS)_$(ABI_ARCH)-$(ABI_COMPILER)
|
||||||
|
DEFINES = -DGECKO_MAJOR=$(GECKO_MAJOR) -DGECKO_MINOR=$(GECKO_MINOR)
|
||||||
|
|
||||||
SED ?= sed -r
|
SED ?= sed -r
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
ROOT = ..
|
ROOT = ..
|
||||||
|
|
||||||
XPTDIR = $(ROOT)/components/
|
XPTDIR = $(ROOT)/components/
|
||||||
SODIR = $(ROOT)/components/$(PLATFORM)/
|
SODIR = $(ROOT)/components/$(ABI)/
|
||||||
OBJDIR = $(PLATFORM)/
|
OBJDIR = $(ABI)/
|
||||||
|
|
||||||
MODULE = $(SODIR)dactyl
|
MODULE = $(SODIR)dactyl
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ GECKO_CONFIG_INCLUDE = -include mozilla-config.h
|
|||||||
|
|
||||||
GECKO_DEFINES = -DMOZILLA_STRICT_API
|
GECKO_DEFINES = -DMOZILLA_STRICT_API
|
||||||
|
|
||||||
GECKO_INCLUDES = -I$(PLATFORM)/ \
|
GECKO_INCLUDES = -I$(ABI)/ \
|
||||||
-I$(GECKO_SDK_PATH) \
|
-I$(GECKO_SDK_PATH) \
|
||||||
-I$(GECKO_SDK_PATH)/idl \
|
-I$(GECKO_SDK_PATH)/idl \
|
||||||
-I$(GECKO_SDK_PATH)/include
|
-I$(GECKO_SDK_PATH)/include
|
||||||
@@ -40,13 +40,13 @@ sinclude $(ROOT)/config.local.mk
|
|||||||
|
|
||||||
XPTS = $(XPIDLSRCS:%.idl=$(XPTDIR)%.xpt)
|
XPTS = $(XPIDLSRCS:%.idl=$(XPTDIR)%.xpt)
|
||||||
OBJS = $(CPPSRCS:%.cpp=$(OBJDIR)%.o)
|
OBJS = $(CPPSRCS:%.cpp=$(OBJDIR)%.o)
|
||||||
HEADERS = $(XPIDLSRCS:%.idl=$(PLATFORM)/%.h)
|
HEADERS = $(XPIDLSRCS:%.idl=$(ABI)/%.h)
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
$(OBJS): $(HEADERS)
|
$(OBJS): $(HEADERS)
|
||||||
|
|
||||||
$(PLATFORM)/%.h: %.idl
|
$(ABI)/%.h: %.idl
|
||||||
$(IDL_H) $@ $(GECKO_INCLUDES) $<
|
$(IDL_H) $@ $(GECKO_INCLUDES) $<
|
||||||
|
|
||||||
$(XPTDIR)%.xpt: %.idl
|
$(XPTDIR)%.xpt: %.idl
|
||||||
@@ -71,9 +71,15 @@ dirs: $(XPTDIR) $(SODIR) $(OBJDIR)
|
|||||||
$(XPTDIR) $(SODIR) $(OBJDIR):
|
$(XPTDIR) $(SODIR) $(OBJDIR):
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
build: dirs $(XPTS) $(MODULE).so
|
module: dirs $(MODULE).so
|
||||||
|
|
||||||
|
xpts: $(XPTS)
|
||||||
|
|
||||||
|
build: dirs module xpts
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm $(MODULE).so
|
rm $(MODULE).so
|
||||||
|
|
||||||
|
.PHONY: module xpts build clean all depend
|
||||||
|
|
||||||
sinclude .depend
|
sinclude .depend
|
||||||
|
|||||||
@@ -35,8 +35,6 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#define JS_XDRScript JS_XDRScriptObject
|
|
||||||
|
|
||||||
#include "mozJSLoaderUtils.h"
|
#include "mozJSLoaderUtils.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
|
|
||||||
@@ -55,7 +53,7 @@ using namespace mozilla::scache;
|
|||||||
|
|
||||||
static nsresult
|
static nsresult
|
||||||
ReadScriptFromStream(JSContext *cx, nsIObjectInputStream *stream,
|
ReadScriptFromStream(JSContext *cx, nsIObjectInputStream *stream,
|
||||||
JSScript **script)
|
JSScriptType **script)
|
||||||
{
|
{
|
||||||
*script = nsnull;
|
*script = nsnull;
|
||||||
|
|
||||||
@@ -110,7 +108,7 @@ ReadScriptFromStream(JSContext *cx, nsIObjectInputStream *stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static nsresult
|
static nsresult
|
||||||
WriteScriptToStream(JSContext *cx, JSScript *script,
|
WriteScriptToStream(JSContext *cx, JSScriptType *script,
|
||||||
nsIObjectOutputStream *stream)
|
nsIObjectOutputStream *stream)
|
||||||
{
|
{
|
||||||
JSXDRState *xdr = JS_XDRNewMem(cx, JSXDR_ENCODE);
|
JSXDRState *xdr = JS_XDRNewMem(cx, JSXDR_ENCODE);
|
||||||
@@ -152,7 +150,7 @@ WriteScriptToStream(JSContext *cx, JSScript *script,
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
ReadCachedScript(nsIStartupCache* cache, nsACString &uri, JSContext *cx, JSScript **script)
|
ReadCachedScript(nsIStartupCache* cache, nsACString &uri, JSContext *cx, JSScriptType **script)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
@@ -173,7 +171,7 @@ ReadCachedScript(nsIStartupCache* cache, nsACString &uri, JSContext *cx, JSScrip
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
WriteCachedScript(nsIStartupCache* cache, nsACString &uri, JSContext *cx, JSScript *script)
|
WriteCachedScript(nsIStartupCache* cache, nsACString &uri, JSContext *cx, JSScriptType *script)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,10 @@
|
|||||||
#ifndef mozJSLoaderUtils_h
|
#ifndef mozJSLoaderUtils_h
|
||||||
#define mozJSLoaderUtils_h
|
#define mozJSLoaderUtils_h
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(GECKO_MAJOR) && GECKO_MAJOR < 9
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is evil. Very evil.
|
* This is evil. Very evil.
|
||||||
#define nsString_h___
|
#define nsString_h___
|
||||||
@@ -50,6 +54,22 @@
|
|||||||
#include "nsStringAPI.h"
|
#include "nsStringAPI.h"
|
||||||
#include "jsapi.h"
|
#include "jsapi.h"
|
||||||
|
|
||||||
|
#if defined(GECKO_MAJOR) && GECKO_MAJOR < 9
|
||||||
|
#include "jsapi.h"
|
||||||
|
# define JS_XDRScript JS_XDRScriptObject
|
||||||
|
typedef JSObject JSScriptType;
|
||||||
|
|
||||||
|
# define NewObjectInputStreamFromBuffer NS_NewObjectInputStreamFromBuffer
|
||||||
|
# define NewBufferFromStorageStream NS_NewBufferFromStorageStream
|
||||||
|
# if GECKO_MAJOR > 6
|
||||||
|
# define NewObjectOutputWrappedStorageStream NS_NewObjectOutputWrappedStorageStream
|
||||||
|
# else
|
||||||
|
# define NewObjectOutputWrappedStorageStream(a, b, c) NS_NewObjectOutputWrappedStorageStream((a), (b))
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
typedef JSScript JSScriptType;
|
||||||
|
#endif
|
||||||
|
|
||||||
class nsIURI;
|
class nsIURI;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
@@ -60,9 +80,9 @@ class StartupCache;
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
ReadCachedScript(nsIStartupCache* cache, nsACString &uri,
|
ReadCachedScript(nsIStartupCache* cache, nsACString &uri,
|
||||||
JSContext *cx, JSScript **scriptObj);
|
JSContext *cx, JSScriptType **scriptObj);
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
WriteCachedScript(nsIStartupCache* cache, nsACString &uri,
|
WriteCachedScript(nsIStartupCache* cache, nsACString &uri,
|
||||||
JSContext *cx, JSScript *scriptObj);
|
JSContext *cx, JSScriptType *scriptObj);
|
||||||
#endif /* mozJSLoaderUtils_h */
|
#endif /* mozJSLoaderUtils_h */
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ static nsresult
|
|||||||
ReadScript(nsIURI *uri, JSContext *cx, JSObject *target_obj,
|
ReadScript(nsIURI *uri, JSContext *cx, JSObject *target_obj,
|
||||||
jschar *charset, const char *uriStr,
|
jschar *charset, const char *uriStr,
|
||||||
nsIIOService *serv, nsIPrincipal *principal,
|
nsIIOService *serv, nsIPrincipal *principal,
|
||||||
JSScript **scriptObjp)
|
JSScriptType **scriptObjp)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIChannel> chan;
|
nsCOMPtr<nsIChannel> chan;
|
||||||
nsCOMPtr<nsIInputStream> instream;
|
nsCOMPtr<nsIInputStream> instream;
|
||||||
@@ -518,12 +518,17 @@ dactylUtils::LoadSubScript (const PRUnichar * aURL
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool writeScript = false;
|
bool writeScript = false;
|
||||||
JSScript *scriptObj = nsnull;
|
JSScriptType *scriptObj = nsnull;
|
||||||
JSVersion version = cx->findVersion();
|
JSVersion version = cx->findVersion();
|
||||||
|
|
||||||
nsCAutoString cachePath;
|
nsCAutoString cachePath;
|
||||||
cachePath.Append("jssubloader/");
|
cachePath.Append("jssubloader/");
|
||||||
cachePath.Append(version);
|
cachePath.Append(version);
|
||||||
|
if (charset) {
|
||||||
|
cachePath.Append("/");
|
||||||
|
cachePath.Append(NS_ConvertUTF16toUTF8(
|
||||||
|
nsDependentString(reinterpret_cast<PRUnichar*>(charset))));
|
||||||
|
}
|
||||||
|
|
||||||
if (false)
|
if (false)
|
||||||
// This is evil. Very evil. Unfortunately, the PathifyURI symbol is
|
// This is evil. Very evil. Unfortunately, the PathifyURI symbol is
|
||||||
|
|||||||
@@ -503,33 +503,33 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
|
|
||||||
if (isinstance(context, ["Sandbox"]))
|
if (isinstance(context, ["Sandbox"]))
|
||||||
return Cu.evalInSandbox(str, context, "1.8", fileName, lineNumber);
|
return Cu.evalInSandbox(str, context, "1.8", fileName, lineNumber);
|
||||||
else {
|
|
||||||
if (!context)
|
|
||||||
context = userContext || ctxt;
|
|
||||||
|
|
||||||
if (services.has("dactyl") && services.dactyl.evalInContext)
|
if (!context)
|
||||||
return services.dactyl.evalInContext(str, context, fileName, lineNumber);
|
context = userContext || ctxt;
|
||||||
else
|
|
||||||
|
if (services.has("dactyl") && services.dactyl.evalInContext)
|
||||||
|
return services.dactyl.evalInContext(str, context, fileName, lineNumber);
|
||||||
|
|
||||||
|
try {
|
||||||
|
context[EVAL_ERROR] = null;
|
||||||
|
context[EVAL_STRING] = str;
|
||||||
|
context[EVAL_RESULT] = null;
|
||||||
|
|
||||||
|
this.loadScript("resource://dactyl-content/eval.js", context);
|
||||||
|
if (context[EVAL_ERROR]) {
|
||||||
try {
|
try {
|
||||||
context[EVAL_ERROR] = null;
|
context[EVAL_ERROR].fileName = info.file;
|
||||||
context[EVAL_STRING] = str;
|
context[EVAL_ERROR].lineNumber += info.line;
|
||||||
context[EVAL_RESULT] = null;
|
|
||||||
this.loadScript("resource://dactyl-content/eval.js", context);
|
|
||||||
if (context[EVAL_ERROR]) {
|
|
||||||
try {
|
|
||||||
context[EVAL_ERROR].fileName = info.file;
|
|
||||||
context[EVAL_ERROR].lineNumber += info.line;
|
|
||||||
}
|
|
||||||
catch (e) {}
|
|
||||||
throw context[EVAL_ERROR];
|
|
||||||
}
|
|
||||||
return context[EVAL_RESULT];
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
delete context[EVAL_ERROR];
|
|
||||||
delete context[EVAL_RESULT];
|
|
||||||
delete context[EVAL_STRING];
|
|
||||||
}
|
}
|
||||||
|
catch (e) {}
|
||||||
|
throw context[EVAL_ERROR];
|
||||||
|
}
|
||||||
|
return context[EVAL_RESULT];
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
delete context[EVAL_ERROR];
|
||||||
|
delete context[EVAL_RESULT];
|
||||||
|
delete context[EVAL_STRING];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user