From 10eaaa09630b2da7403fd7bd92b88195a0bd4e79 Mon Sep 17 00:00:00 2001 From: "locka%iol.ie" Date: Thu, 2 Dec 1999 22:17:18 +0000 Subject: [PATCH] Made ActiveX plugin buildable git-svn-id: svn://10.0.0.236/trunk@55094 18797224-902f-48f8-a5cc-f745e15eee43 --- .../browser/activex/src/plugin/MozActiveX.cpp | 37 +++++++ .../browser/activex/src/plugin/MozActiveX.rc | 102 ++++++++++++++++++ .../browser/activex/src/plugin/StdAfx.cpp | 1 + .../browser/activex/src/plugin/StdAfx.h | 86 +++++++++++++++ .../browser/activex/src/plugin/makefile.win | 92 ++++------------ .../browser/activex/src/plugin/mkctldef.bat | 15 +++ 6 files changed, 262 insertions(+), 71 deletions(-) create mode 100644 mozilla/embedding/browser/activex/src/plugin/MozActiveX.cpp create mode 100644 mozilla/embedding/browser/activex/src/plugin/MozActiveX.rc create mode 100644 mozilla/embedding/browser/activex/src/plugin/StdAfx.cpp create mode 100644 mozilla/embedding/browser/activex/src/plugin/StdAfx.h create mode 100755 mozilla/embedding/browser/activex/src/plugin/mkctldef.bat diff --git a/mozilla/embedding/browser/activex/src/plugin/MozActiveX.cpp b/mozilla/embedding/browser/activex/src/plugin/MozActiveX.cpp new file mode 100644 index 00000000000..656476d1a49 --- /dev/null +++ b/mozilla/embedding/browser/activex/src/plugin/MozActiveX.cpp @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +// npmozax.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f MozillaControlps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include "initguid.h" + +CComModule _Module; + +//BEGIN_OBJECT_MAP(ObjectMap) +//END_OBJECT_MAP() diff --git a/mozilla/embedding/browser/activex/src/plugin/MozActiveX.rc b/mozilla/embedding/browser/activex/src/plugin/MozActiveX.rc new file mode 100644 index 00000000000..f23b1f58b61 --- /dev/null +++ b/mozilla/embedding/browser/activex/src/plugin/MozActiveX.rc @@ -0,0 +1,102 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "\0" + VALUE "FileDescription", "Mozilla ActiveX control and plugin module\0" + VALUE "FileExtents", "*|*|*.axs\0" + VALUE "FileOpenName", "ActiveX (*.*)|ActiveX (*.*)|ActiveScript(*.axs)\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "NPMOZAX\0" + VALUE "LegalCopyright", "Copyright 1999\0" + VALUE "LegalTrademarks", "\0" + VALUE "MIMEType", "application/x-oleobject|application/oleobject|text/x-activescript\0" + VALUE "OriginalFilename", "NPMOZAX.DLL\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "Mozilla ActiveX control and plugin support\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // !_MAC + + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/mozilla/embedding/browser/activex/src/plugin/StdAfx.cpp b/mozilla/embedding/browser/activex/src/plugin/StdAfx.cpp new file mode 100644 index 00000000000..09f15b61cc9 --- /dev/null +++ b/mozilla/embedding/browser/activex/src/plugin/StdAfx.cpp @@ -0,0 +1 @@ +#include "StdAfx.h" \ No newline at end of file diff --git a/mozilla/embedding/browser/activex/src/plugin/StdAfx.h b/mozilla/embedding/browser/activex/src/plugin/StdAfx.h new file mode 100644 index 00000000000..8725eddd585 --- /dev/null +++ b/mozilla/embedding/browser/activex/src/plugin/StdAfx.h @@ -0,0 +1,86 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#if !defined(AFX_STDAFX_H__1339B542_3453_11D2_93B9_000000000000__INCLUDED_) +#define AFX_STDAFX_H__1339B542_3453_11D2_93B9_000000000000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define STRICT + +#define _WIN32_WINNT 0x0400 +#define _ATL_APARTMENT_THREADED +#define _ATL_STATIC_REGISTRY + +#define USE_PLUGIN + +// ATL headers +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include +#include +#include +#include +#include +#include + +#ifdef USE_PLUGIN +#include +#endif + +// STL headers +#include +#include +#include + +// New winsock2.h doesn't define this anymore +typedef long int32; + +#include "ActiveXTypes.h" +#include "BrowserDiagnostics.h" + +#include "PropertyList.h" +#include "PropertyBag.h" +#include "ItemContainer.h" +#include "ControlSite.h" +#include "ControlSiteIPFrame.h" + +#include "npapi.h" +//#include "nsIFactory.h" +//#include "nsIPlugin.h" +//#include "nsIPluginInstance.h" +//#include "ActiveXPlugin.h" +//#include "ActiveXPluginInstance.h" +#include "ActiveScriptSite.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__1339B542_3453_11D2_93B9_000000000000__INCLUDED) diff --git a/mozilla/embedding/browser/activex/src/plugin/makefile.win b/mozilla/embedding/browser/activex/src/plugin/makefile.win index b0c447ce745..fd23a41ed1b 100644 --- a/mozilla/embedding/browser/activex/src/plugin/makefile.win +++ b/mozilla/embedding/browser/activex/src/plugin/makefile.win @@ -19,29 +19,17 @@ # # Contributor(s): -!if "$(MSSDK)" == "" -!message This module requires the MS Platform SDK to be installed. -!else - -DLLNAME = npax +DLLNAME = npmozax QUIET = -DEPTH =..\..\.. - +DEPTH =..\..\..\..\.. # The default is to include control support unless told to do otherwise -!ifndef MOZ_ACTIVEX_NO_CONTROL_SUPPORT -MOZ_ACTIVEX_CONTROL_SUPPORT = 1 -!endif - -!ifndef MOZ_ACTIVEX_NO_PLUGIN_SUPPORT -# MOZ_ACTIVEX_PLUGIN_SUPPORT = 1 -!endif - +MOZ_ACTIVEX_PLUGIN_SUPPORT = 1 MAKE_OBJ_TYPE = DLL DLL=.\$(OBJDIR)\$(DLLNAME).dll -RESFILE = MozillaControl.res -DEFFILE = npmozctl.def +RESFILE = MozActiveX.res +DEFFILE = npmozax.def OBJS = \ .\$(OBJDIR)\StdAfx.obj \ @@ -49,11 +37,11 @@ OBJS = \ .\$(OBJDIR)\ControlSiteIPFrame.obj \ .\$(OBJDIR)\ItemContainer.obj \ .\$(OBJDIR)\PropertyBag.obj \ - .\$(OBJDIR)\MozillaControl.obj \ # .\$(OBJDIR)\ActiveXPlugin.obj \ # .\$(OBJDIR)\ActiveXPluginInstance.obj \ .\$(OBJDIR)\ActiveScriptSite.obj \ .\$(OBJDIR)\LegacyPlugin.obj \ + .\$(OBJDIR)\MozActiveX.obj \ .\$(OBJDIR)\npwin.obj \ $(NULL) @@ -61,36 +49,12 @@ OBJS = \ LINCS= \ !ifdef MOZ_ACTIVEX_PLUGIN_SUPPORT + -I..\control \ -I$(MOZ_PLUGINSDK)\include \ !endif - -I$(PUBLIC)\raptor \ - -I$(PUBLIC)\xpcom \ - -I$(PUBLIC)\dom \ - -I$(PUBLIC)\js \ - -I$(PUBLIC)\netlib \ - -I$(PUBLIC)\java \ - -I$(PUBLIC)\plugin \ - -I$(PUBLIC)\caps \ - -I$(PUBLIC)\oji \ - -I$(PUBLIC)\editor \ - -I$(PUBLIC)\uconv \ - -I$(PUBLIC)\intl \ - -I$(PUBLIC)\locale \ - -I$(PUBLIC)\lwbrk \ - -I$(PUBLIC)\unicharutil \ - -I$(PUBLIC)\pref \ - -I$(PUBLIC)\wallet \ - -I$(PUBLIC)\rdf \ - -I$(PUBLIC)\profile \ $(NULL) LLIBS= \ -!ifdef MOZ_ACTIVEX_CONTROL_SUPPORT - $(DIST)\lib\gkgfxwin.lib \ - $(DIST)\lib\gkweb.lib \ - $(DIST)\lib\xpcom.lib \ - $(LIBNSPR) \ -!endif $(NULL) WIN_LIBS = \ @@ -115,49 +79,35 @@ LCFLAGS = $(LCFLAGS) -DMOZ_NO_DEBUG_RTL LCFLAGS = $(LCFLAGS) -DMOZ_ACTIVEX_PLUGIN_SUPPORT !endif -!ifdef MOZ_ACTIVEX_CONTROL_SUPPORT -LCFLAGS = $(LCFLAGS) -DMOZ_ACTIVEX_CONTROL_SUPPORT -!endif - install:: $(DLL) $(MAKE_INSTALL) $(DLL) $(DIST)\bin - $(MAKE_INSTALL) MozillaControl.html $(DIST)\bin\res - regsvr32 /s /c $(DIST)\bin\$(DLLNAME).dll $(DEFFILE) : mkctldef.bat mkctldef.bat $(DEFFILE) -MozillaControl_i.c MozillaControl.h: MozillaControl.idl - midl /Oicf /h MozillaControl.h /iid MozillaControl_i.c MozillaControl.idl +ActiveScriptSite.cpp: ../control/ActiveScriptSite.cpp + -cp ../control/ActiveScriptSite.cpp . -ActiveScriptSite.cpp: StdAfx.h ActiveScriptSite.h +npwin.cpp: $(MOZ_PLUGINSDK)/common/npwin.cpp + -cp -f $(MOZ_PLUGINSDK)/common/npwin.cpp . + +MozActiveX.cpp: StdAfx.h LegacyPlugin.cpp \ ActiveXPlugin.cpp \ ActiveXPluginInstance.cpp: StdAfx.h ActiveXPlugin.h ActiveXPluginInstance.h -npwin.cpp: $(MOZ_PLUGINSDK)/common/npwin.cpp - -cp -f $(MOZ_PLUGINSDK)/common/npwin.cpp . +PropertyBag.cpp : ../control/PropertyBag.cpp + -cp ../control/PropertyBag.cpp . -ControlSite.cpp \ -ControlSiteIPFrame.cpp \ -PropertyBag.cpp : StdAfx.h PropertyBag.h ControlSite.h ControlSiteIPFrame.h +ControlSite.cpp : ../control/ControlSite.cpp + -cp ../control/ControlSite.cpp . -ItemContainer.cpp : StdAfx.h ItemContainer.h +ControlSiteIPFrame.cpp : ../control/ControlSiteIPFrame.cpp + -cp ../control/ControlSiteIPFrame.cpp . -guids.cpp: StdAfx.h guids.h - -control_and_plugin: - nmake /f makefile.win MOZ_ACTIVEX_PLUGIN_SUPPORT=1 MOZ_ACTIVEX_CONTROL_SUPPORT=1 - -plugin_only:: - nmake /f makefile.win MOZ_ACTIVEX_PLUGIN_SUPPORT=1 MOZ_ACTIVEX_NO_CONTROL_SUPPORT=1 - -control_only:: - nmake /f makefile.win MOZ_ACTIVEX_CONTROL_SUPPORT=1 MOZ_ACTIVEX_NO_PLUGIN_SUPPORT=1 +ItemContainer.cpp : ../control/ItemContainer.cpp + -cp ../control/ItemContainer.cpp . clobber:: - -regsvr32 /s /c /u $(DIST)\bin\$(DLLNAME).dll -del $(DEFFILE) - -!endif diff --git a/mozilla/embedding/browser/activex/src/plugin/mkctldef.bat b/mozilla/embedding/browser/activex/src/plugin/mkctldef.bat new file mode 100755 index 00000000000..a5731e7ca21 --- /dev/null +++ b/mozilla/embedding/browser/activex/src/plugin/mkctldef.bat @@ -0,0 +1,15 @@ +@echo off + +REM This script generates the DEF file for the control DLL depending on +REM what has been set to go into it + +echo ; npmozax.def : Declares the module parameters. > %1 +echo ; This file was autogenerated by mkctldef.bat! >> %1 +echo. >> %1 +echo LIBRARY "npmozax.DLL" >> %1 +echo EXPORTS >> %1 +echo ; Plugin exports >> %1 +echo NP_GetEntryPoints @1 >> %1 +echo NP_Initialize @2 >> %1 +echo NP_Shutdown @3 >> %1 +echo ; NSGetFactory @10 >> %1