mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 09:07:58 +01:00
Windows binaries and stuff.
This commit is contained in:
@@ -11,4 +11,9 @@ binary-component components/7.0-Darwin_x86_64-gcc3/dactyl.so abi=Darwin_x86_64-g
|
||||
binary-component components/8.0-Darwin_x86_64-gcc3/dactyl.so abi=Darwin_x86_64-gcc3 platformversion>=8.0 platformversion<8.*
|
||||
binary-component components/9.0-Darwin_x86_64-gcc3/dactyl.so abi=Darwin_x86_64-gcc3 platformversion>=9.0 platformversion<9.*
|
||||
|
||||
binary-component components/6.0-WINNT_x86-msvc/dactyl.dll abi=WINNT_x86-msvc appversion>=6.0 appversion<6.*
|
||||
binary-component components/7.0-WINNT_x86-msvc/dactyl.dll abi=WINNT_x86-msvc appversion>=7.0 appversion<7.*
|
||||
binary-component components/8.0-WINNT_x86-msvc/dactyl.dll abi=WINNT_x86-msvc platformversion>=8.0 platformversion<8.*
|
||||
binary-component components/9.0-WINNT_x86-msvc/dactyl.dll abi=WINNT_x86-msvc platformversion>=9.0 platformversion<9.*
|
||||
|
||||
# vim:se tw=0 ft=cfg:
|
||||
|
||||
@@ -12,15 +12,17 @@ SED := $(shell if [ "xoo" = x$$(echo foo | sed -E 's/f(o)/\1/' 2>/dev/null) ]; \
|
||||
fi)
|
||||
|
||||
|
||||
GECKO_SDK_PATH := $(shell pkg-config --libs libxul | $(SED) 's,([^-]|-[^L])*-L([^ ]+)/lib.*,\2,')
|
||||
PKGCONFIG ?= pkg-config
|
||||
GECKO_SDK_PATH := $(shell $(PKGCONFIG) --libs libxul | $(SED) 's,([^-]|-[^L])*-L([^ ]+)/lib.*,\2,')
|
||||
|
||||
CXX ?= c++
|
||||
CXX ?= c++ -o
|
||||
LINK ?= c++
|
||||
|
||||
MKDEP ?= $(CXX) -M
|
||||
|
||||
PYTHON ?= python2
|
||||
|
||||
CPPFLAGS += -fno-rtti \
|
||||
EXCPPFLAGS = -fno-rtti \
|
||||
-fno-exceptions \
|
||||
-fshort-wchar \
|
||||
-fPIC \
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
em:type="2"
|
||||
em:name="Dactyl Binary Utils"
|
||||
em:version="0.1"
|
||||
em:description="Binary utilities for dactyl add-ons">
|
||||
em:description="Binary utilities for dactyl add-ons"
|
||||
em:unpack="true">
|
||||
|
||||
<em:targetApplication>
|
||||
<Description
|
||||
|
||||
@@ -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,6 +57,7 @@
|
||||
# define JS_XDRScript JS_XDRScriptObject
|
||||
typedef JSObject JSScriptType;
|
||||
|
||||
# if GECKO_MAJOR < 8
|
||||
# define NewObjectInputStreamFromBuffer NS_NewObjectInputStreamFromBuffer
|
||||
# define NewBufferFromStorageStream NS_NewBufferFromStorageStream
|
||||
# if GECKO_MAJOR > 6
|
||||
@@ -66,6 +65,7 @@
|
||||
# else
|
||||
# define NewObjectOutputWrappedStorageStream(a, b, c) NS_NewObjectOutputWrappedStorageStream((a), (b))
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
typedef JSScript JSScriptType;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user