зеркало из https://github.com/mozilla/pjs.git
r=pedemont, sr=blizzard OS/2 only - get NPNULL plugin working on OS/2
This commit is contained in:
Родитель
80474fae36
Коммит
c1c2583e67
|
@ -27,9 +27,11 @@ VPATH = @srcdir@
|
||||||
|
|
||||||
include $(DEPTH)/config/autoconf.mk
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
|
MODULE = plugin
|
||||||
LIBRARY_NAME = npnulos2
|
LIBRARY_NAME = npnulos2
|
||||||
EXPORT_LIBRARY = 1
|
RESFILE = npnulos2.res
|
||||||
REQUIRES = java \
|
REQUIRES = java \
|
||||||
|
plugin \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CPPSRCS = \
|
CPPSRCS = \
|
||||||
|
@ -42,20 +44,25 @@ CPPSRCS = \
|
||||||
utils.cpp\
|
utils.cpp\
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
RES_FILE = $(srcdir)/npnulos2.res
|
# plugins should always be shared, even in the "static" build
|
||||||
|
FORCE_SHARED_LIB = 1
|
||||||
|
|
||||||
|
NO_DIST_INSTALL = 1
|
||||||
|
NO_INSTALL = 1
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
|
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
MOZ_POST_DSO_LIB_COMMAND = rc -n -x2 $(RES_FILE)
|
install-plugin: $(SHARED_LIBRARY)
|
||||||
|
ifdef SHARED_LIBRARY
|
||||||
$(SHARED_LIBRARY): $(OBJS) $(RES_FILE)
|
$(INSTALL) $(SHARED_LIBRARY) $(DIST)/bin/plugins
|
||||||
|
endif
|
||||||
$(RES_FILE): $(srcdir)/npnulos2.rc
|
|
||||||
ifneq ($(DEPTH),$(topsrcdir))
|
libs:: install-plugin
|
||||||
cp $(srcdir)/plugicon.ico ./plugicon.ico
|
|
||||||
cp $(srcdir)/resource.h ./resource.h
|
install:: $(SHARED_LIBRARY)
|
||||||
|
ifdef SHARED_LIBRARY
|
||||||
|
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir)/plugins
|
||||||
endif
|
endif
|
||||||
rc -n -x2 -r $(srcdir)/npnulos2.rc
|
|
||||||
|
|
|
@ -39,21 +39,22 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
extern char szAppName[];
|
extern char szAppName[];
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
|
||||||
void __cdecl dbgOut(LPSTR format, ...) {
|
void dbgOut(PSZ format, ...) {
|
||||||
static char buf[1024];
|
static char buf[1024];
|
||||||
lstrcpy(buf, szAppName);
|
strcpy(buf, szAppName);
|
||||||
lstrcat(buf, ": ");
|
strcat(buf, ": ");
|
||||||
va_list va;
|
va_list va;
|
||||||
va_start(va, format);
|
va_start(va, format);
|
||||||
wvsprintf(&buf[lstrlen(buf)], format, va);
|
vsprintf(&buf[strlen(buf)], format, va);
|
||||||
va_end(va);
|
va_end(va);
|
||||||
lstrcat(buf, "\n");
|
strcat(buf, "\n");
|
||||||
OutputDebugString(buf);
|
printf("%s\n", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
|
||||||
void __cdecl dbgOut(LPSTR format, ...);
|
void dbgOut(PSZ format, ...);
|
||||||
#define dbgOut1(x) dbgOut(x)
|
#define dbgOut1(x) dbgOut(x)
|
||||||
#define dbgOut2(x,y) dbgOut(x, y)
|
#define dbgOut2(x,y) dbgOut(x, y)
|
||||||
#define dbgOut3(x,y,z) dbgOut(x, y, z)
|
#define dbgOut3(x,y,z) dbgOut(x, y, z)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче