This change-bundle starts the process of re-activating pluglets.

Next step is to figure out the best way to fix these unresolved symbols
at link time when building pluglet.dll

/cygdrive/d/Projects/mozilla/MOZILLA_NIH/FIREFOX_1_5_0_1/mozilla/./build/cygwin-wrapper link -NOLOGO -DLL -OUT:pluglet.dll -PDB:pluglet.pdb -SUBSYSTEM:WINDOWS  List.obj Pluglet.obj PlugletEngine.obj PlugletFactory.obj PlugletInputStream.obj PlugletLoader.obj PlugletManager.obj PlugletPeer.obj PlugletStreamInfo.obj PlugletStreamListener.obj PlugletsDir.obj Registry.obj PlugletViewFactory.obj   ./module.res   -DEBUG -DEBUGTYPE:CV         kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib D:\Files_2k\j2sdk1.4.2_03/lib/jvm.lib ../../../dist/lib/xpcom.lib ../../../dist/lib/xpcom_core.lib ../../../dist/lib/nspr4.lib ../../../dist/lib/plc4.lib ../../../dist/lib/plds4.lib
   Creating library pluglet.lib and object pluglet.exp
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nsFileSpec::~nsFileSpec(void)" (__imp_??1nsFileSpec@@UAE@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nsDirectoryIterator::~nsDirectoryIterator(void)" (__imp_??1nsDirectoryIterator@@UAE@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class nsDirectoryIterator & __thiscall nsDirectoryIterator::operator++(void)" (__imp_??EnsDirectoryIterator@@QAEAAV0@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall nsDirectoryIterator::nsDirectoryIterator(class nsFileSpec const &,int)" (__imp_??0nsDirectoryIterator@@QAE@ABVnsFileSpec@@H@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall nsFileSpec::nsFileSpec(char const *,int)" (__imp_??0nsFileSpec@@QAE@PBDH@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nsSpecialSystemDirectory::~nsSpecialSystemDirectory(void)" (__imp_??1nsSpecialSystemDirectory@@UAE@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall nsFileSpec::operator+=(char const *)" (__imp_??YnsFileSpec@@QAEXPBD@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall nsSpecialSystemDirectory::nsSpecialSystemDirectory(enum nsSpecialSystemDirectory::SystemDirectories)" (__imp_??0nsSpecialSystemDirectory@@QAE@W4SystemDirectories@0@@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall nsFileSpec::GetCString(void)const " (__imp_?GetCString@nsFileSpec@@QBEPBDXZ)
PlugletViewFactory.obj : error LNK2001: unresolved external symbol "public: __thiscall PlugletViewWindows::PlugletViewWindows(void)" (??0PlugletViewWindows@@QAE@XZ)
pluglet.dll : fatal error LNK1120: 10 unresolved externals

M makefiles

+java/plugins/Makefile
+java/plugins/src/Makefile

Add generation of these Makefiles

M plugins/src/Makefile.in

- copy some content from webclient

M plugins/src/Pluglet.cpp
M plugins/src/PlugletEngine.cpp
M plugins/src/PlugletStreamListener.cpp

- Changes from John Sublet.
This commit is contained in:
edburns%acm.org 2006-03-21 03:25:34 +00:00
Родитель f2afdb24cd
Коммит ef22aa3aa0
5 изменённых файлов: 76 добавлений и 46 удалений

Просмотреть файл

@ -4,3 +4,5 @@ java/webclient/src_moz/gtk/Makefile
java/webclient/src_moz/Makefile
java/webclient/src_ie/Makefile
java/webclient/src_share/Makefile
java/plugins/Makefile
java/plugins/src/Makefile

Просмотреть файл

@ -32,30 +32,22 @@ LIBRARY_NAME = pluglet
MODULE = pluglet
IS_COMPONENT = 1
JDKINCLUDE= -I$(JDKHOME)/include
ifeq ($(OS_ARCH), Linux)
JDKINCLUDE += -I$(JDKHOME)/include/linux
archExpr = case "`uname -m`" in \
i[3-6]86) \
echo i386 \
;; \
sparc*) \
echo sparc \
;; \
*) \
uname -m \
;; \
esac
ifeq ($(OS_ARCH),Linux)
INCLUDES := -I$(MOZ_JDKHOME)/include -I$(MOZ_JDKHOME)/include/linux $(INCLUDES) \
-I$(DEPTH)/widget/src/gtk -I../src_share
else
ifeq ($(OS_ARCH),WINNT)
INCLUDES := -I$(MOZ_JDKHOME)/include -I$(MOZ_JDKHOME)/include/win32 $(INCLUDES) \
-I../src_share -I.
else
ifeq ($(OS_ARCH),Darwin)
INCLUDES := -I$(MOZ_JDKHOME)/include $(INCLUDES) -I../src_share -I.
else
INCLUDES := -I$(MOZ_JDKHOME)/include -I$(MOZ_JDKHOME)/include/solaris $(INCLUDES) \
-I$(DEPTH)/widget/src/gtk -I../src_share
endif
endif
ifeq ($(OS_ARCH), SunOS)
JDKINCLUDE += -I$(JDKHOME)/include/solaris
archExpr = uname -p
endif
HOSTTYPE = $(shell $(archExpr))
CPPSRCS = \
List.cpp \
@ -70,21 +62,53 @@ CPPSRCS = \
PlugletStreamListener.cpp \
PlugletsDir.cpp \
Registry.cpp \
PlugletViewMotif.cpp \
PlugletViewFactory.cpp \
$(NULL)
CXXFLAGS := $(JDKINCLUDE) $(MOZ_TOOLKIT_REGISTRY_CFLAGS) -D_REENTRANT -DOJI_DISABLE $(CXXFLAGS)
# edburns: 20060320
# PlugletViewMotif.cpp \
DSO_LDOPTS += \
-L$(JDKHOME)/jre/lib/$(HOSTTYPE)/ \
-L$(JDKHOME)/jre/lib/$(HOSTTYPE)/client \
-ljava -ljvm -lawt -lXt\
-lgdk
ifneq ($(OS_ARCH), Linux)
DSO_LDOPTS += \
-lthread
CXXFLAGS := $(MOZ_TOOLKIT_REGISTRY_CFLAGS) -DMOZILLA_INTERNAL_API -D_REENTRANT -DOJI_DISABLE $(CXXFLAGS)
ifeq ($(OS_ARCH),Darwin)
INCLUDES += -I$(MOZ_JDKHOME)/include -I.
DSO_LDOPTS += -L/System/Library/Frameworks/JavaVM.Framework/Libraries -ljvm_compat
DLL_SUFFIX = .jnilib
endif #DARWIN
INCLUDES += -I$(MOZILLA_FIVE_HOME)/../include/xpcom \
-I$(MOZILLA_FIVE_HOME)/../include/plugin \
-I$(MOZILLA_FIVE_HOME)/../include/string \
-I$(MOZILLA_FIVE_HOME)/../include/xpcom_obsolete \
ifeq ($(OS_ARCH),Linux)
DSO_LDOPTS += \
-L$(JAVAHOME)/jre/lib/i386 \
-L$(JAVAHOME)/jre/lib/i386/client \
-L$(JAVAHOME)/jre/lib/i386/native_threads \
-Xlinker -rpath $(JAVAHOME)/jre/lib/i386 \
-Xlinker -rpath $(JAVAHOME)/jre/lib/i386/client \
-Xlinker -rpath $(JAVAHOME)/jre/lib/i386/native_threads \
-ljvm -lhpi -ljava -lawt -lXt -lgdk -lgtkxtbin -lgtksuperwin
DEFINES += -DDISABLE_JIT
endif # LINUX
ifeq ($(OS_ARCH),WINNT)
EXTRA_LIBS += \
$(JAVAHOME)/lib/jvm.lib \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
endif # WINNT
ifeq (($OS_ARCH),SunOS)
DSO_LDOPTS += \
-L$(JAVAHOME)/jre/lib/sparc \
-L$(JAVAHOME)/jre/lib/sparc/classic \
-L$(JAVAHOME)/jre/lib/sparc/native_threads \
-R$(JAVAHOME)/jre/lib/sparc \
-R$(JAVAHOME)/jre/lib/sparc/classic \
-R$(JAVAHOME)/jre/lib/sparc/native_threads \
-ljvm -lhpi -lthread
endif
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -36,10 +36,9 @@ jmethodID Pluglet::printMID = NULL;
static NS_DEFINE_IID(kIPluginInstanceIID, NS_IPLUGININSTANCE_IID);
NS_IMPL_ISUPPORTS(Pluglet, kIPluginInstanceIID);
NS_IMPL_ISUPPORTS1(Pluglet,nsIPluginInstance);
Pluglet::Pluglet(jobject object) {
NS_INIT_REFCNT();
jthis = PlugletEngine::GetJNIEnv()->NewGlobalRef(object);
//nb check for null
peer = NULL;

Просмотреть файл

@ -21,6 +21,7 @@
#include "PlugletEngine.h"
#include "Pluglet.h"
#include "nsIServiceManager.h"
#include "nsServiceManagerUtils.h"
#include "prenv.h"
#include "PlugletManager.h"
#include "nsIGenericFactory.h"
@ -142,7 +143,7 @@ jobject PlugletEngine::plugletManager = NULL;
#define PLUGIN_MIME_DESCRIPTION "*:*:Pluglet Engine"
NS_IMPL_ISUPPORTS(PlugletEngine,kIPluginIID);
NS_IMPL_ISUPPORTS1(PlugletEngine,nsIPlugin);
NS_METHOD PlugletEngine::Initialize(void) {
//nb ???
return NS_OK;
@ -217,7 +218,6 @@ char *ToString(jobject obj,JNIEnv *env) {
}
PlugletEngine::PlugletEngine() {
NS_INIT_REFCNT();
PlugletLog::log = PR_NewLogModule("pluglets");
dir = new PlugletsDir();
engine = this;
@ -309,13 +309,19 @@ JNIEnv * PlugletEngine::GetJNIEnv(void) {
jobject PlugletEngine::GetPlugletManager(void) {
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletEngine::GetPlugletManager\n"));
if (!pluginManager) {
nsresult res;
NS_WITH_SERVICE(nsIPluginManager,_pluginManager,kPluginManagerCID,&res);
if (NS_SUCCEEDED(res)) {
pluginManager = _pluginManager;
}
("PlugletEngine::GetPlugletManager\n"));
//Changed by John Sublet NS_WITH_SERVICE deprecated currently is
//problematic: lxr.mozilla.org indicates version of
//do_GetService that allows the res to be included in the
//do_GetService call but that wouldn't work: FIXME
//NS_WITH_SERVICE(nsIPluginManager,_pluginManager,kPluginManagerCID,&res);
nsCOMPtr<nsIPluginManager> _pluginManager (do_GetService(kPluginManagerCID));
// Changed by John Sublet : FIXME this assumes _pluginManager will be properly set to NULL
if (_pluginManager) {
pluginManager = _pluginManager;
}
if (!pluginManager) {
return NULL;

Просмотреть файл

@ -43,7 +43,6 @@ void PlugletStreamListener::Initialize(void) {
}
PlugletStreamListener::PlugletStreamListener(jobject object) {
NS_INIT_REFCNT();
jthis = PlugletEngine::GetJNIEnv()->NewGlobalRef(object);
if (!onStopBindingMID) {
Initialize();
@ -118,7 +117,7 @@ NS_METHOD PlugletStreamListener::GetStreamType(nsPluginStreamType *result) {
static NS_DEFINE_IID(kIPluginStreamListenerIID, NS_IPLUGINSTREAMLISTENER_IID);
NS_IMPL_ISUPPORTS(PlugletStreamListener, kIPluginStreamListenerIID);
NS_IMPL_ISUPPORTS1(PlugletStreamListener, nsIPluginStreamListener);