mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-26 01:22:27 +01:00
Windows binaries and stuff.
This commit is contained in:
@@ -17,8 +17,6 @@ CPPSRCS = \
|
||||
subscriptLoader.cpp \
|
||||
$(NULL)
|
||||
|
||||
GECKO_CONFIG_INCLUDE = -include mozilla-config.h
|
||||
|
||||
GECKO_DEFINES = -DMOZILLA_STRICT_API
|
||||
|
||||
GECKO_INCLUDES = -I$(ABI)/ \
|
||||
@@ -41,6 +39,8 @@ endif
|
||||
include $(ROOT)/config.mk
|
||||
sinclude $(ROOT)/config.local.mk
|
||||
|
||||
CPPFLAGS += $(EXCPPFLAGS)
|
||||
|
||||
XPTS = $(XPIDLSRCS:%.idl=$(XPTDIR)%.xpt)
|
||||
OBJS = $(CPPSRCS:%.cpp=$(OBJDIR)%.o)
|
||||
HEADERS = $(XPIDLSRCS:%.idl=$(ABI)/%.h)
|
||||
@@ -72,20 +72,20 @@ $(ABI)/%.h: %.idl
|
||||
$(XPTDIR)%.xpt: %.idl
|
||||
$(IDL_XPT) $@ $(GECKO_INCLUDES) $<
|
||||
|
||||
_CPPFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(DEFINES)
|
||||
_CPPFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(DEFINES)
|
||||
|
||||
$(OBJDIR)%.o: %.cpp Makefile
|
||||
$(CXX) -o $@ -c $(_CPPFLAGS) $<
|
||||
$(CXX)$@ -c $(_CPPFLAGS) $<
|
||||
|
||||
.depend: $(CPPSRCS) Makefile
|
||||
$(MKDEP) $(_CPPFLAGS) $(CPPSRCS) | $(SED) 's;^[^ ];$(OBJDIR)&;' >.depend
|
||||
|
||||
$(MODULE).so: $(OBJS)
|
||||
$(CXX) -o $@ $(OBJS) $(LDFLAGS) $(GECKO_LDFLAGS)
|
||||
$(LINK) -o $@ $(OBJS) $(LDFLAGS) $(GECKO_LDFLAGS)
|
||||
chmod +x $@
|
||||
|
||||
$(MODULE).dll: $(OBJS)
|
||||
$(CXX) -o $@ $(OBJS) $(GECKO_LDFLAGS)
|
||||
$(LINK)$@ $(GECKO_LDFLAGS) $(OBJS)
|
||||
|
||||
$(XPTDIR) $(SODIR) $(OBJDIR):
|
||||
mkdir -p $@
|
||||
|
||||
2
binary/src/config.h
Normal file
2
binary/src/config.h
Normal file
@@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
#include "mozilla-config.h"
|
||||
@@ -168,6 +168,7 @@ dactylUtils::CreateGlobal(JSContext *cx, jsval *out)
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
*out = OBJECT_TO_JSVAL(global);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -281,7 +282,9 @@ dactylUtils::GetGlobalForObject(const jsval &aObject,
|
||||
NS_ERROR_XPC_BAD_CONVERT_JS);
|
||||
|
||||
JSObject *obj = JSVAL_TO_OBJECT(aObject);
|
||||
#ifndef WIN32 /* Why? No idea. */
|
||||
if (obj->isProxy())
|
||||
#endif
|
||||
obj = obj->unwrap();
|
||||
|
||||
JSObject *global = JS_GetGlobalForObject(cx, obj);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#include "dactylIUtils.h"
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
@@ -40,9 +40,7 @@
|
||||
#ifndef mozJSLoaderUtils_h
|
||||
#define mozJSLoaderUtils_h
|
||||
|
||||
|
||||
#if defined(GECKO_MAJOR) && GECKO_MAJOR < 9
|
||||
#endif
|
||||
#include "config.h"
|
||||
|
||||
/*
|
||||
* This is evil. Very evil.
|
||||
@@ -59,12 +57,14 @@
|
||||
# define JS_XDRScript JS_XDRScriptObject
|
||||
typedef JSObject JSScriptType;
|
||||
|
||||
# if GECKO_MAJOR < 8
|
||||
# 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))
|
||||
# if GECKO_MAJOR > 6
|
||||
# define NewObjectOutputWrappedStorageStream NS_NewObjectOutputWrappedStorageStream
|
||||
# else
|
||||
# define NewObjectOutputWrappedStorageStream(a, b, c) NS_NewObjectOutputWrappedStorageStream((a), (b))
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
typedef JSScript JSScriptType;
|
||||
|
||||
Reference in New Issue
Block a user