Code and scripts to build the firefox extension for windows.
This commit is contained in:
parent
dfe0df83bd
commit
47d8264272
45
extensions/mk-winxpi.sh
Normal file
45
extensions/mk-winxpi.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#make the .dll library (xpcom)
|
||||
echo '*******************************************'
|
||||
echo '** Using a pre-built dll **'
|
||||
echo '** **'
|
||||
echo '** To rebuild the windows xpcom dll **'
|
||||
echo '** 1. edit the win/makefile.mak **'
|
||||
echo '** 2. enter the path to your gecko-sdk **'
|
||||
echo '** 3. In cmd box, enter the following: **'
|
||||
echo '** 4. nmake cfg=Release makefile.mak **'
|
||||
echo '*******************************************'
|
||||
echo
|
||||
|
||||
#copy all files to a temp directory
|
||||
rm -rf temp
|
||||
mkdir temp
|
||||
cp -r common temp
|
||||
cp -r win temp
|
||||
cd temp
|
||||
|
||||
#remove all svn stuff
|
||||
echo 'Removing svn stuff'
|
||||
find . -name "*svn*" |xargs rm -rf
|
||||
|
||||
#build the casa.jar
|
||||
echo 'building casa.jar'
|
||||
cd common/casajar
|
||||
zip -rD casa.jar *
|
||||
mv casa.jar ../.
|
||||
|
||||
#copy files to correct location
|
||||
cd ../..
|
||||
cp win/Release/MiCASAKeys.dll win/xpi/components/.
|
||||
cp common/casa.jar win/xpi/chrome/.
|
||||
|
||||
#now zip up the xpi
|
||||
cd win/xpi
|
||||
echo 'creating XPI'
|
||||
zip -rD casa4windows.xpi *
|
||||
|
||||
# copy xpi to extensions folder
|
||||
cp casa4windows.xpi ../../../.
|
||||
cd ../../..
|
||||
|
||||
echo 'Done'
|
||||
|
101
extensions/win/IMiCASAKeys.h
Normal file
101
extensions/win/IMiCASAKeys.h
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
* DO NOT EDIT. THIS FILE IS GENERATED FROM IMiCASAKeys.idl
|
||||
*/
|
||||
|
||||
#ifndef __gen_IMiCASAKeys_h__
|
||||
#define __gen_IMiCASAKeys_h__
|
||||
|
||||
|
||||
#ifndef __gen_nsISupports_h__
|
||||
#include "nsISupports.h"
|
||||
#endif
|
||||
|
||||
/* For IDL files that don't want to include root IDL files. */
|
||||
#ifndef NS_NO_VTABLE
|
||||
#define NS_NO_VTABLE
|
||||
#endif
|
||||
|
||||
/* starting interface: IMiCASAKeys */
|
||||
#define IMICASAKEYS_IID_STR "a3f70ce4-fae8-4bd1-98eb-0cf581e4b4dc"
|
||||
|
||||
#define IMICASAKEYS_IID \
|
||||
{0xa3f70ce4, 0xfae8, 0x4bd1, \
|
||||
{ 0x98, 0xeb, 0x0c, 0xf5, 0x81, 0xe4, 0xb4, 0xdc }}
|
||||
|
||||
class NS_NO_VTABLE IMiCASAKeys : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(IMICASAKEYS_IID)
|
||||
|
||||
/* PRInt32 miCASAWriteKey (in AUTF8String secretId, in AUTF8String key, in AUTF8String value); */
|
||||
NS_IMETHOD MiCASAWriteKey(const nsACString & secretId, const nsACString & key, const nsACString & value, PRInt32 *_retval) = 0;
|
||||
|
||||
/* PRInt32 miCASAReadKey (in AUTF8String secretId, in AUTF8String key, out AUTF8String value); */
|
||||
NS_IMETHOD MiCASAReadKey(const nsACString & secretId, const nsACString & key, nsACString & value, PRInt32 *_retval) = 0;
|
||||
|
||||
};
|
||||
|
||||
/* Use this macro when declaring classes that implement this interface. */
|
||||
#define NS_DECL_IMICASAKEYS \
|
||||
NS_IMETHOD MiCASAWriteKey(const nsACString & secretId, const nsACString & key, const nsACString & value, PRInt32 *_retval); \
|
||||
NS_IMETHOD MiCASAReadKey(const nsACString & secretId, const nsACString & key, nsACString & value, PRInt32 *_retval);
|
||||
|
||||
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
|
||||
#define NS_FORWARD_IMICASAKEYS(_to) \
|
||||
NS_IMETHOD MiCASAWriteKey(const nsACString & secretId, const nsACString & key, const nsACString & value, PRInt32 *_retval) { return _to MiCASAWriteKey(secretId, key, value, _retval); } \
|
||||
NS_IMETHOD MiCASAReadKey(const nsACString & secretId, const nsACString & key, nsACString & value, PRInt32 *_retval) { return _to MiCASAReadKey(secretId, key, value, _retval); }
|
||||
|
||||
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
|
||||
#define NS_FORWARD_SAFE_IMICASAKEYS(_to) \
|
||||
NS_IMETHOD MiCASAWriteKey(const nsACString & secretId, const nsACString & key, const nsACString & value, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->MiCASAWriteKey(secretId, key, value, _retval); } \
|
||||
NS_IMETHOD MiCASAReadKey(const nsACString & secretId, const nsACString & key, nsACString & value, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->MiCASAReadKey(secretId, key, value, _retval); }
|
||||
|
||||
#if 0
|
||||
/* Use the code below as a template for the implementation class for this interface. */
|
||||
|
||||
/* Header file */
|
||||
class _MYCLASS_ : public IMiCASAKeys
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IMICASAKEYS
|
||||
|
||||
_MYCLASS_();
|
||||
|
||||
private:
|
||||
~_MYCLASS_();
|
||||
|
||||
protected:
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
/* Implementation file */
|
||||
NS_IMPL_ISUPPORTS1(_MYCLASS_, IMiCASAKeys)
|
||||
|
||||
_MYCLASS_::_MYCLASS_()
|
||||
{
|
||||
/* member initializers and constructor code */
|
||||
}
|
||||
|
||||
_MYCLASS_::~_MYCLASS_()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* PRInt32 miCASAWriteKey (in AUTF8String secretId, in AUTF8String key, in AUTF8String value); */
|
||||
NS_IMETHODIMP _MYCLASS_::MiCASAWriteKey(const nsACString & secretId, const nsACString & key, const nsACString & value, PRInt32 *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* PRInt32 miCASAReadKey (in AUTF8String secretId, in AUTF8String key, out AUTF8String value); */
|
||||
NS_IMETHODIMP _MYCLASS_::MiCASAReadKey(const nsACString & secretId, const nsACString & key, nsACString & value, PRInt32 *_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* End of implementation class template. */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __gen_IMiCASAKeys_h__ */
|
19
extensions/win/IMiCASAKeys.idl
Normal file
19
extensions/win/IMiCASAKeys.idl
Normal file
@ -0,0 +1,19 @@
|
||||
#include <nsISupports.idl>
|
||||
|
||||
|
||||
[scriptable, uuid(A3F70CE4-FAE8-4bd1-98EB-0CF581E4B4DC)]
|
||||
interface IMiCASAKeys : nsISupports
|
||||
{
|
||||
PRInt32 miCASAWriteKey(
|
||||
in AUTF8String secretId,
|
||||
in AUTF8String key,
|
||||
in AUTF8String value
|
||||
);
|
||||
|
||||
PRInt32 miCASAReadKey(
|
||||
in AUTF8String secretId,
|
||||
in AUTF8String key,
|
||||
out AUTF8String value
|
||||
);
|
||||
};
|
||||
|
BIN
extensions/win/IMiCASAKeys.xpt
Normal file
BIN
extensions/win/IMiCASAKeys.xpt
Normal file
Binary file not shown.
173
extensions/win/MiCASAKeys.cpp
Normal file
173
extensions/win/MiCASAKeys.cpp
Normal file
@ -0,0 +1,173 @@
|
||||
#include "MiCASAKeys.h"
|
||||
#include <nsMemory.h>
|
||||
#include <nsStringAPI.h>
|
||||
|
||||
/* Implementation file */
|
||||
NS_IMPL_ISUPPORTS1(MiCASAKeys, IMiCASAKeys)
|
||||
|
||||
MiCASAKeys::MiCASAKeys()
|
||||
{
|
||||
m_bLibraryLoaded = FALSE;
|
||||
m_pCASAOpen = NULL;
|
||||
m_pCASAClose = NULL;
|
||||
m_pCASAWriteKey = NULL;
|
||||
m_pCASAReadKey = NULL;
|
||||
|
||||
/* member initializers and constructor code */
|
||||
m_hCASALibrary = LoadLibrary("micasa.dll");
|
||||
|
||||
if (m_hCASALibrary)
|
||||
{
|
||||
m_pCASAOpen = (PCASAOPEN)GetProcAddress(m_hCASALibrary, "miCASAOpenSecretStoreCache");
|
||||
m_pCASAClose = (PCASACLOSE)GetProcAddress(m_hCASALibrary, "miCASACloseSecretStoreCache");
|
||||
m_pCASAWriteKey = (PCASAWRITEKEY)GetProcAddress(m_hCASALibrary, "miCASAWriteKey");
|
||||
m_pCASAReadKey = (PCASAREADKEY)GetProcAddress(m_hCASALibrary, "miCASAReadKey");
|
||||
|
||||
m_bLibraryLoaded = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
MiCASAKeys::~MiCASAKeys()
|
||||
{
|
||||
/* destructor code */
|
||||
// if (m_bLibraryLoaded == TRUE)
|
||||
// {
|
||||
// FreeLibrary(m_hCASALibrary);
|
||||
// m_bLibraryLoaded = FALSE;
|
||||
// }
|
||||
}
|
||||
|
||||
/* PRInt32 miCASAWriteKey (in string secretId, in string key, in string value); */
|
||||
//NS_IMETHODIMP MiCASAKeys::MiCASAWriteKey(const char *secretId, const char *key, const char *value, PRInt32 *_retval)
|
||||
|
||||
/* PRInt32 miCASAWriteKey (in AUTF8String secretId, in AUTF8String key, in AUTF8String value); */
|
||||
NS_IMETHODIMP MiCASAKeys::MiCASAWriteKey(const nsACString & secretId, const nsACString & key, const nsACString & value, PRInt32 *_retval)
|
||||
{
|
||||
|
||||
if (m_bLibraryLoaded == TRUE)
|
||||
{
|
||||
nsresult result;
|
||||
SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"};
|
||||
SSCS_SECRET_ID_T sharedId;
|
||||
SSCS_SECRETSTORE_T ssId;
|
||||
HANDLE context;
|
||||
|
||||
ssId.version = NSSCS_VERSION_NUMBER;
|
||||
strncpy((char *)ssId.ssName, (char *)SSCS_DEFAULT_SECRETSTORE_ID, sizeof(ssId.ssName));
|
||||
|
||||
result = NSSCS_E_SYSTEM_FAILURE;
|
||||
|
||||
if (m_pCASAOpen)
|
||||
{
|
||||
context = (*m_pCASAOpen)(
|
||||
&ssId,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
|
||||
if (context)
|
||||
{
|
||||
sharedId.len = secretId.Length() + 1;
|
||||
strncpy((char *)sharedId.id, secretId.BeginReading(), sizeof(sharedId.id));
|
||||
|
||||
if (m_pCASAWriteKey)
|
||||
{
|
||||
result = (*m_pCASAWriteKey)(
|
||||
context,
|
||||
0,
|
||||
&sessionKeyChain,
|
||||
&sharedId,
|
||||
(unsigned char *)key.BeginReading(),
|
||||
key.Length() + 1,
|
||||
(unsigned char *)value.BeginReading(),
|
||||
value.Length() + 1,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
(*m_pCASAClose)(
|
||||
context,
|
||||
0,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
*_retval = result;
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NSSCS_E_SERVICE_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
||||
/* PRInt32 miCASAReadKey (in string secretId, in string key, out string value); */
|
||||
//NS_IMETHODIMP MiCASAKeys::MiCASAReadKey(const char *secretId, const char *key, char **value, PRInt32 *_retval)
|
||||
|
||||
/* PRInt32 miCASAReadKey (in AUTF8String secretId, in AUTF8String key, out AUTF8String value); */
|
||||
NS_IMETHODIMP MiCASAKeys::MiCASAReadKey(const nsACString & secretId, const nsACString & key, nsACString & value, PRInt32 *_retval)
|
||||
{
|
||||
|
||||
if (m_bLibraryLoaded == TRUE)
|
||||
{
|
||||
nsresult result;
|
||||
SSCS_KEYCHAIN_ID_T sessionKeyChain = {26, "SSCS_SESSION_KEY_CHAIN_ID"};
|
||||
SSCS_SECRET_ID_T sharedId;
|
||||
SSCS_SECRETSTORE_T ssId;
|
||||
uint32_t bytesRequired;
|
||||
HANDLE context;
|
||||
|
||||
ssId.version = NSSCS_VERSION_NUMBER;
|
||||
strncpy((char *)ssId.ssName, (char *)SSCS_DEFAULT_SECRETSTORE_ID, sizeof(ssId.ssName));
|
||||
|
||||
result = NSSCS_E_SYSTEM_FAILURE;
|
||||
|
||||
if (m_pCASAOpen)
|
||||
{
|
||||
context = (*m_pCASAOpen)(
|
||||
&ssId,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
if (context)
|
||||
{
|
||||
uint32_t valueLength = 256;
|
||||
unsigned char tempValue[257];
|
||||
|
||||
sharedId.len = secretId.Length() + 1;
|
||||
strncpy((char *)sharedId.id, secretId.BeginReading(), sizeof(sharedId.id));
|
||||
|
||||
if (m_pCASAReadKey)
|
||||
{
|
||||
result = (*m_pCASAReadKey)(
|
||||
context,
|
||||
0,
|
||||
&sessionKeyChain,
|
||||
&sharedId,
|
||||
(unsigned char *)key.BeginReading(),
|
||||
key.Length() + 1,
|
||||
tempValue,
|
||||
&valueLength,
|
||||
NULL,
|
||||
&bytesRequired,
|
||||
NULL);
|
||||
|
||||
value.Assign((char *)tempValue, valueLength - 1);
|
||||
}
|
||||
|
||||
(*m_pCASAClose)(
|
||||
context,
|
||||
0,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
*_retval = result;
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NSSCS_E_SERVICE_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
86
extensions/win/MiCASAKeys.h
Normal file
86
extensions/win/MiCASAKeys.h
Normal file
@ -0,0 +1,86 @@
|
||||
#ifndef _MICASA_KEYS_H_
|
||||
#define _MICASA_KEYS_H_
|
||||
|
||||
#include <windows.h>
|
||||
#include "IMiCASAKeys.h"
|
||||
#include <micasa.h>
|
||||
|
||||
#define MICASA_KEYS_CONTRACTID "@novell.com/CASA/MiCASAKeys;1"
|
||||
#define MICASA_KEYS_CLASSNAME "Common Authentication Services Adapter"
|
||||
// {287249D7-A851-4aa4-9AEE-5BCDA3B53566}
|
||||
#define MICASA_KEYS_CID { 0x287249d7, 0xa851, 0x4aa4, { 0x9a, 0xee, 0x5b, 0xcd, 0xa3, 0xb5, 0x35, 0x66 } }
|
||||
|
||||
// External prototypes not yet in micasa.h
|
||||
typedef
|
||||
void *
|
||||
(STDAPICALLTYPE *PCASAOPEN)(
|
||||
SSCS_SECRETSTORE_T * ssid,
|
||||
unsigned long ssFlags,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
typedef
|
||||
int
|
||||
(STDAPICALLTYPE *PCASACLOSE)(
|
||||
void * context,
|
||||
unsigned long ssFlags,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
|
||||
typedef
|
||||
int
|
||||
(STDAPICALLTYPE *PCASAWRITEKEY)(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||||
SSCS_SECRET_ID_T * sharedSecretID,
|
||||
SS_UTF8_T * key,
|
||||
uint32_t keyLen,
|
||||
uint8_t * val,
|
||||
uint32_t valLen,
|
||||
SSCS_PASSWORD_T * epPassword,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
typedef
|
||||
int
|
||||
(STDAPICALLTYPE *PCASAREADKEY)(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||||
SSCS_SECRET_ID_T * sharedSecretID,
|
||||
SS_UTF8_T * key,
|
||||
uint32_t keyLen,
|
||||
uint8_t * val,
|
||||
uint32_t * valLen,
|
||||
SSCS_PASSWORD_T * epPassword,
|
||||
uint32_t * bytesRequired,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
|
||||
/* Header file */
|
||||
class MiCASAKeys : public IMiCASAKeys
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IMICASAKEYS
|
||||
|
||||
MiCASAKeys();
|
||||
|
||||
private:
|
||||
~MiCASAKeys();
|
||||
HINSTANCE m_hCASALibrary;
|
||||
BOOLEAN m_bLibraryLoaded;
|
||||
|
||||
PCASAOPEN m_pCASAOpen;
|
||||
PCASACLOSE m_pCASAClose;
|
||||
PCASAWRITEKEY m_pCASAWriteKey;
|
||||
PCASAREADKEY m_pCASAReadKey;
|
||||
|
||||
protected:
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif //_MICASA_KEYS_H_
|
BIN
extensions/win/MiCASAKeys.suo
Normal file
BIN
extensions/win/MiCASAKeys.suo
Normal file
Binary file not shown.
17
extensions/win/MiCASAKeysModule.cpp
Normal file
17
extensions/win/MiCASAKeysModule.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "MiCASAKeys.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(MiCASAKeys)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{
|
||||
MICASA_KEYS_CLASSNAME,
|
||||
MICASA_KEYS_CID,
|
||||
MICASA_KEYS_CONTRACTID,
|
||||
MiCASAKeysConstructor,
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("MiCASAModule", components)
|
||||
|
BIN
extensions/win/Release/MiCASAKeys.dll
Normal file
BIN
extensions/win/Release/MiCASAKeys.dll
Normal file
Binary file not shown.
237
extensions/win/makefile.mak
Normal file
237
extensions/win/makefile.mak
Normal file
@ -0,0 +1,237 @@
|
||||
GECKO_SDK_PATH=d:\gecko-sdk
|
||||
CASA_SDK_PATH=c:\PROGRA~1\Novell\CASA
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=Debug
|
||||
!MESSAGE No configuration specified. Defaulting to Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "makefile.mak" CFG="Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\MiCASAKeys.dll" "$(OUTDIR)\MiCASAKeys.bsc"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\MiCASAKeys.obj"
|
||||
-@erase "$(INTDIR)\MiCASAKeys.sbr"
|
||||
-@erase "$(INTDIR)\MiCASAKeysModule.obj"
|
||||
-@erase "$(INTDIR)\MiCASAKeysModule.sbr"
|
||||
-@erase "$(INTDIR)\vc70.idb"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.bsc"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.dll"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.exp"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MD /W3 /O1 /I "$(GECKO_SDK_PATH)\include" /I "$(CASA_SDK_PATH)\include" /FI"$(GECKO_SDK_PATH)\include\mozilla-config.h" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XPCOM_GLUE" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\MiCASAKeys.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\MiCASAKeys.bsc"
|
||||
BSC32_SBRS= \
|
||||
"$(INTDIR)\MiCASAKeys.sbr" \
|
||||
"$(INTDIR)\MiCASAKeysModule.sbr"
|
||||
|
||||
"$(OUTDIR)\MiCASAKeys.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
|
||||
$(BSC32) @<<
|
||||
$(BSC32_FLAGS) $(BSC32_SBRS)
|
||||
<<
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib nspr4.lib plds4.lib plc4.lib xpcomglue.lib shlwapi.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\MiCASAKeys.pdb" /machine:I386 /out:"$(OUTDIR)\MiCASAKeys.dll" /implib:"$(OUTDIR)\MiCASAKeys.lib" /libpath:"$(GECKO_SDK_PATH)\lib"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\MiCASAKeys.obj" \
|
||||
"$(INTDIR)\MiCASAKeysModule.obj"
|
||||
|
||||
"$(OUTDIR)\MiCASAKeys.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
TargetPath=.\Release\MiCASAKeys.dll
|
||||
SOURCE="$(InputPath)"
|
||||
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
!ELSEIF "$(CFG)" == "Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\MiCASAKeys.dll" "$(OUTDIR)\MiCASAKeys.bsc"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\MiCASAKeys.obj"
|
||||
-@erase "$(INTDIR)\MiCASAKeys.sbr"
|
||||
-@erase "$(INTDIR)\MiCASAKeysModule.obj"
|
||||
-@erase "$(INTDIR)\MiCASAKeysModule.sbr"
|
||||
-@erase "$(INTDIR)\vc70.idb"
|
||||
-@erase "$(INTDIR)\vc70.pdb"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.bsc"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.dll"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.exp"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.ilk"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.lib"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MDd /W3 /Gm /ZI /Od /I "$(GECKO_SDK_PATH)\include" /I "$(CASA_SDK_PATH)\include" /FI"$(GECKO_SDK_PATH)\include\mozilla-config.h" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XPCOM_GLUE" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\MiCASAKeys.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\MiCASAKeys.bsc"
|
||||
BSC32_SBRS= \
|
||||
"$(INTDIR)\MiCASAKeys.sbr" \
|
||||
"$(INTDIR)\MiCASAKeysModule.sbr"
|
||||
|
||||
"$(OUTDIR)\MiCASAKeys.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
|
||||
$(BSC32) @<<
|
||||
$(BSC32_FLAGS) $(BSC32_SBRS)
|
||||
<<
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib nspr4.lib plds4.lib plc4.lib xpcomglue.lib shlwapi.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\MiCASAKeys.pdb" /debug /machine:I386 /out:"$(OUTDIR)\MiCASAKeys.dll" /implib:"$(OUTDIR)\MiCASAKeys.lib" /pdbtype:sept /libpath:"$(GECKO_SDK_PATH)\lib"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\MiCASAKeys.obj" \
|
||||
"$(INTDIR)\MiCASAKeysModule.obj"
|
||||
|
||||
"$(OUTDIR)\MiCASAKeys.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
TargetPath=.\Debug\MiCASAKeys.dll
|
||||
SOURCE="$(InputPath)"
|
||||
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
!ENDIF
|
||||
|
||||
NO_EXTERNAL_DEPS=1
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("MiCASAKeys.dep")
|
||||
!INCLUDE "MiCASAKeys.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "MiCASAKeys.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "Release" || "$(CFG)" == "Debug"
|
||||
SOURCE=.\MiCASAKeys.cpp
|
||||
|
||||
"$(INTDIR)\MiCASAKeys.obj" "$(INTDIR)\MiCASAKeys.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
SOURCE=.\MiCASAKeysModule.cpp
|
||||
|
||||
"$(INTDIR)\MiCASAKeysModule.obj" "$(INTDIR)\MiCASAKeysModule.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
!ENDIF
|
||||
|
243
extensions/win/makefile.new
Normal file
243
extensions/win/makefile.new
Normal file
@ -0,0 +1,243 @@
|
||||
GECKO_SDK_PATH=c:\source\xpcom\gecko-sdk
|
||||
CASA_SDK_PATH=c:\PROGRA~1\Novell\CASA
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=Debug
|
||||
!MESSAGE No configuration specified. Defaulting to Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "makefile.mak" CFG="Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\MiCASAKeys.dll" "$(OUTDIR)\MiCASAKeys.bsc"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\MiCASAKeys.obj"
|
||||
-@erase "$(INTDIR)\MiCASAKeys.sbr"
|
||||
-@erase "$(INTDIR)\MiCASAKeysModule.obj"
|
||||
-@erase "$(INTDIR)\MiCASAKeysModule.sbr"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.bsc"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.dll"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.exp"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MD /W3 /O1 /I "$(GECKO_SDK_PATH)\include" /I "$(CASA_SDK_PATH)\include" /FI"$(GECKO_SDK_PATH)\include\mozilla-config.h" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XPCOM_GLUE" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\MiCASAKeys.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
#CPP_PROJ=/nologo /MD /W3 /O2 /I "$(GECKO_SDK_PATH)\include" /I "$(CASA_SDK_PATH)\include" /FI"$(GECKO_SDK_PATH)\include\mozilla-config.h" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYCOMPONENT_EXPORTS" /D "XPCOM_GLUE" /D "_WINDLL" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\MiCASAKeys.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /EHsc /c
|
||||
#CPP_PROJ=/nologo /MD /W3 /O1 /I "$(GECKO_SDK_PATH)\include" /I "$(CASA_SDK_PATH)\include" /FI"$(GECKO_SDK_PATH)\include\mozilla-config.h" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XPCOM_GLUE" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\MiCASAKeys.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\MiCASAKeys.bsc"
|
||||
BSC32_SBRS= \
|
||||
"$(INTDIR)\MiCASAKeys.sbr" \
|
||||
"$(INTDIR)\MiCASAKeysModule.sbr"
|
||||
|
||||
"$(OUTDIR)\MiCASAKeys.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
|
||||
$(BSC32) @<<
|
||||
$(BSC32_FLAGS) $(BSC32_SBRS)
|
||||
<<
|
||||
|
||||
LINK32=link.exe
|
||||
#LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib nspr4.lib plds4.lib plc4.lib xpcomglue.lib shlwapi.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\MiCASAKeys.pdb" /machine:I386 /out:"$(OUTDIR)\MiCASAKeys.dll" /implib:"$(OUTDIR)\MiCASAKeys.lib" /libpath:"$(GECKO_SDK_PATH)\lib"
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib nspr4.lib plds4.lib plc4.lib xpcomglue.lib shlwapi.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\MiCASAKeys.pdb" /machine:I386 /out:"$(OUTDIR)\MiCASAKeys.dll" /implib:"$(OUTDIR)\MiCASAKeys.lib" /libpath:"$(GECKO_SDK_PATH)\lib"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\MiCASAKeys.obj" \
|
||||
"$(INTDIR)\MiCASAKeysModule.obj"
|
||||
|
||||
"$(OUTDIR)\MiCASAKeys.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
TargetPath=.\Release\MiCASAKeys.dll
|
||||
SOURCE="$(InputPath)"
|
||||
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
!ELSEIF "$(CFG)" == "Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\MiCASAKeys.dll" "$(OUTDIR)\MiCASAKeys.bsc"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\MiCASAKeys.obj"
|
||||
-@erase "$(INTDIR)\MiCASAKeys.sbr"
|
||||
-@erase "$(INTDIR)\MiCASAKeysModule.obj"
|
||||
-@erase "$(INTDIR)\MiCASAKeysModule.sbr"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.bsc"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.dll"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.exp"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.ilk"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.lib"
|
||||
-@erase "$(OUTDIR)\MiCASAKeys.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
#CPP_PROJ=/nologo /MDd /W3 /Gm /ZI /Od /I "$(GECKO_SDK_PATH)\include" /I "$(CASA_SDK_PATH)\include" /FI"$(GECKO_SDK_PATH)\include\mozilla-config.h" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XPCOM_GLUE" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\MiCASAKeys.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
||||
#CPP_PROJ=/nologo /MDd /W3 /ZI /Od /I "$(GECKO_SDK_PATH)\include" /I "$(CASA_SDK_PATH)\include" /FI"$(GECKO_SDK_PATH)\include\mozilla-config.h" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XPCOM_GLUE" /D "MYCOMPONENT_EXPORTS" /D "_WINDLL" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\MiCASAKeys.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /RTC1 /EHsc /c
|
||||
CPP_PROJ=/nologo /MDd /W3 /Gm /ZI /Od /I "$(GECKO_SDK_PATH)\include" /I "$(CASA_SDK_PATH)\include" /FI"$(GECKO_SDK_PATH)\include\mozilla-config.h" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XPCOM_GLUE" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\MiCASAKeys.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\MiCASAKeys.bsc"
|
||||
BSC32_SBRS= \
|
||||
"$(INTDIR)\MiCASAKeys.sbr" \
|
||||
"$(INTDIR)\MiCASAKeysModule.sbr"
|
||||
|
||||
"$(OUTDIR)\MiCASAKeys.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
|
||||
$(BSC32) @<<
|
||||
$(BSC32_FLAGS) $(BSC32_SBRS)
|
||||
<<
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib nspr4.lib plds4.lib plc4.lib xpcomglue.lib shlwapi.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\MiCASAKeys.pdb" /debug /machine:I386 /out:"$(OUTDIR)\MiCASAKeys.dll" /implib:"$(OUTDIR)\MiCASAKeys.lib" /pdbtype:sept /libpath:"$(GECKO_SDK_PATH)\lib"
|
||||
#LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib nspr4.lib plds4.lib plc4.lib xpcomglue.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\MiCASAKeys.pdb" /debug /machine:I386 /out:"$(OUTDIR)\MiCASAKeys.dll" /implib:"$(OUTDIR)\MiCASAKeys.lib" /libpath:"$(GECKO_SDK_PATH)\lib"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\MiCASAKeys.obj" \
|
||||
"$(INTDIR)\MiCASAKeysModule.obj"
|
||||
|
||||
"$(OUTDIR)\MiCASAKeys.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
TargetPath=.\Debug\MiCASAKeys.dll
|
||||
SOURCE="$(InputPath)"
|
||||
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
!ENDIF
|
||||
|
||||
NO_EXTERNAL_DEPS=1
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("MiCASAKeys.dep")
|
||||
!INCLUDE "MiCASAKeys.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "MiCASAKeys.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "Release" || "$(CFG)" == "Debug"
|
||||
SOURCE=.\MiCASAKeys.cpp
|
||||
|
||||
"$(INTDIR)\MiCASAKeys.obj" "$(INTDIR)\MiCASAKeys.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
SOURCE=.\MiCASAKeysModule.cpp
|
||||
|
||||
"$(INTDIR)\MiCASAKeysModule.obj" "$(INTDIR)\MiCASAKeysModule.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
!ENDIF
|
||||
|
BIN
extensions/win/xpi/components/IMiCASAKeys.xpt
Normal file
BIN
extensions/win/xpi/components/IMiCASAKeys.xpt
Normal file
Binary file not shown.
119
extensions/win/xpi/install.js
Normal file
119
extensions/win/xpi/install.js
Normal file
@ -0,0 +1,119 @@
|
||||
// install.js
|
||||
// XpiInstaller
|
||||
|
||||
var XpiInstaller = {
|
||||
// --- Editable items begin ---
|
||||
|
||||
extFullName: 'Novell CASA', // The name displayed to the user (don't include the version)
|
||||
extShortName: 'casa', // The leafname of the JAR file (without the .jar part)
|
||||
extVersion: '1.0',
|
||||
extAuthor: 'CSL.Manojna',
|
||||
extLocaleNames: null, // e.g. ['en-US', 'en-GB']
|
||||
extSkinNames: null, // e.g. ['classic', 'modern']
|
||||
extPostInstallMessage: 'Extension successfully installed.', // Set to null for no post-install message
|
||||
|
||||
// --- Editable items end ---
|
||||
|
||||
profileInstall: true,
|
||||
silentInstall: false,
|
||||
|
||||
install: function()
|
||||
{
|
||||
var jarName = this.extShortName + '.jar';
|
||||
var profileDir = Install.getFolder('Profile', 'chrome');
|
||||
|
||||
// Parse HTTP arguments
|
||||
this.parseArguments();
|
||||
|
||||
// Check if extension is already installed in profile
|
||||
if (File.exists(Install.getFolder(profileDir, jarName)))
|
||||
{
|
||||
if (!this.silentInstall)
|
||||
{
|
||||
Install.alert('Updating existing Profile install of ' + this.extFullName + ' to version ' + this.extVersion + '.');
|
||||
}
|
||||
this.profileInstall = true;
|
||||
}
|
||||
else if (!this.silentInstall)
|
||||
{
|
||||
// Ask user for install location, profile or browser dir?
|
||||
this.profileInstall = Install.confirm('Install ' + this.extFullName + ' ' + this.extVersion + ' to your Profile directory (OK) or your Browser directory (Cancel)?');
|
||||
}
|
||||
|
||||
// Init install
|
||||
var dispName = this.extFullName + ' ' + this.extVersion;
|
||||
var regName = '/' + this.extAuthor + '/' + this.extShortName;
|
||||
Install.initInstall(dispName, regName, this.extVersion);
|
||||
|
||||
// Find directory to install into
|
||||
var installPath;
|
||||
if (this.profileInstall) installPath = profileDir;
|
||||
else installPath = Install.getFolder('chrome');
|
||||
|
||||
// Add JAR file
|
||||
Install.addFile(null, 'chrome/' + jarName, installPath, null);
|
||||
|
||||
// Register chrome
|
||||
var jarPath = Install.getFolder(installPath, jarName);
|
||||
var installType = this.profileInstall ? Install.PROFILE_CHROME : Install.DELAYED_CHROME;
|
||||
|
||||
// Register content
|
||||
Install.registerChrome(Install.CONTENT | installType, jarPath, 'content/' + this.extShortName + '/');
|
||||
|
||||
// Register locales
|
||||
for (var locale in this.extLocaleNames)
|
||||
{
|
||||
var regPath = 'locale/' + this.extLocaleNames[locale] + '/' + this.extShortName + '/';
|
||||
Install.registerChrome(Install.LOCALE | installType, jarPath, regPath);
|
||||
}
|
||||
|
||||
// Register skins
|
||||
for (var skin in this.extSkinNames)
|
||||
{
|
||||
var regPath = 'skin/' + this.extSkinNames[skin] + '/' + this.extShortName + '/';
|
||||
Install.registerChrome(Install.SKIN | installType, jarPath, regPath);
|
||||
}
|
||||
|
||||
// Perform install
|
||||
var err = Install.performInstall();
|
||||
if (err == Install.SUCCESS || err == Install.REBOOT_NEEDED)
|
||||
{
|
||||
if (!this.silentInstall && this.extPostInstallMessage)
|
||||
{
|
||||
Install.alert(this.extPostInstallMessage);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.handleError(err);
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
parseArguments: function()
|
||||
{
|
||||
// Can't use string handling in install, so use if statement instead
|
||||
var args = Install.arguments;
|
||||
if (args == 'p=0')
|
||||
{
|
||||
this.profileInstall = false;
|
||||
this.silentInstall = true;
|
||||
}
|
||||
else if (args == 'p=1')
|
||||
{
|
||||
this.profileInstall = true;
|
||||
this.silentInstall = true;
|
||||
}
|
||||
},
|
||||
|
||||
handleError: function(err)
|
||||
{
|
||||
if (!this.silentInstall)
|
||||
{
|
||||
Install.alert('Error: Could not install ' + this.extFullName + ' ' + this.extVersion + ' (Error code: ' + err + ')');
|
||||
}
|
||||
Install.cancelInstall(err);
|
||||
}
|
||||
};
|
||||
|
||||
XpiInstaller.install();
|
44
extensions/win/xpi/install.rdf
Normal file
44
extensions/win/xpi/install.rdf
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0"?>
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
|
||||
<em:id>{CE9E7AA3-C32A-444b-9BF1-703DAADC0E3C}</em:id>
|
||||
<em:name>Novell CASA</em:name>
|
||||
<em:version>1.0</em:version>
|
||||
<em:description>Common Authentication Service Adapter</em:description>
|
||||
<em:creator>CSL.Manojna</em:creator>
|
||||
<!-- optional items -->
|
||||
<em:contributor>Jim Norman</em:contributor>
|
||||
<em:homepageURL>http://www.novell.com</em:homepageURL>
|
||||
<em:iconURL>chrome://casa/skin/CASA_48.png</em:iconURL>
|
||||
<em:aboutURL>chrome://casa/content/about.xul</em:aboutURL>
|
||||
|
||||
<em:file>
|
||||
<Description about="urn:mozilla:extension:file:casa.jar">
|
||||
<em:package>content/</em:package>
|
||||
<!-- optional items -->
|
||||
<em:skin>skin/classic/</em:skin>
|
||||
</Description>
|
||||
</em:file>
|
||||
|
||||
<em:targetApplication> <!-- Firefox -->
|
||||
<Description>
|
||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
||||
<em:minVersion>0.9</em:minVersion>
|
||||
<em:maxVersion>1.5.1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<em:targetApplication> <!-- Mozilla Suite -->
|
||||
<Description>
|
||||
<em:id>{86c18b42-e466-45a9-ae7a-9b95ba6f5640}</em:id>
|
||||
<em:minVersion>1.7</em:minVersion>
|
||||
<em:maxVersion>1.8</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
|
||||
</RDF>
|
Loading…
Reference in New Issue
Block a user