- makensis should now compile on any POSIX compliment platform (Linux, *BSD, Mac OS X, etc.)

- improved makefiles so nothing is compiled when it's already up-to-date
- Added SW_HIDE to ExecShell's accepted show modes


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3518 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-03-29 20:21:00 +00:00
parent 8567625b0e
commit 4c5f8a30eb
46 changed files with 2054 additions and 679 deletions

View file

@ -2,11 +2,13 @@
// #include "StdAfx.h"
#ifndef INITGUID
#define INITGUID
#ifdef WIN32
# include <objbase.h>
# include <initguid.h>
#endif
#include <objbase.h>
#include <initguid.h>
#include "../Platform.h"
#define INITGUID
#include "7zip/ICoder.h"
#include "7zip/Compress/LZ/IMatchFinder.h"

View file

@ -3,6 +3,10 @@
#ifndef __STDAFX_H
#define __STDAFX_H
#include <windows.h>
#ifdef _WIN32
# include <windows.h>
#else
# include "../../../Platform.h"
#endif
#endif

View file

@ -15,7 +15,8 @@ namespace BT_NAMESPACE {
#ifdef __USE_3_BYTES
#pragma pack(push, PragmaBinTree, 1)
//#pragma pack(push, PragmaBinTree, 1)
#pragma pack(1)
struct CIndex
{
@ -31,7 +32,8 @@ struct CIndex
};
const UINT32 kMaxValForNormalize = CIndex(-1);
#pragma pack(pop, PragmaBinTree)
//#pragma pack(pop, PragmaBinTree)
#pragma pack()
#else
@ -54,7 +56,8 @@ const UINT32 kMaxValForNormalize = (UINT32(1) << 31) - 1;
// #endif
#pragma pack(push, PragmaBinTreePair, 1)
//#pragma pack(push, PragmaBinTreePair, 1)
#pragma pack(1)
// #pragma pack(push, 1)
struct CPair
@ -64,7 +67,8 @@ struct CPair
};
// #pragma pack(pop)
#pragma pack(pop, PragmaBinTreePair)
//#pragma pack(pop, PragmaBinTreePair)
#pragma pack()
class CInTree: public CLZInWindow
{

View file

@ -40,13 +40,13 @@ namespace BT_NAMESPACE {
CInTree::CInTree():
_hash(0),
#ifdef HASH_ARRAY_2
_hash2(0),
#ifdef HASH_ARRAY_3
_hash3(0),
#endif
#endif
_hash(0),
_son(0),
_cutValue(0xFF)
{
@ -134,7 +134,7 @@ static const UINT32 kEmptyHashValue = 0;
HRESULT CInTree::Init(ISequentialInStream *stream)
{
RINOK(CLZInWindow::Init(stream));
int i;
unsigned int i;
for(i = 0; i < kHashSize; i++)
_hash[i] = kEmptyHashValue;

View file

@ -3,6 +3,10 @@
#ifndef __STDAFX_H
#define __STDAFX_H
#include <windows.h>
#ifdef _WIN32
# include <windows.h>
#else
# include "../../../../Platform.h"
#endif
#endif

View file

@ -254,10 +254,11 @@ public:
HRESULT Create();
MY_UNKNOWN_IMP2(
/*MY_UNKNOWN_IMP2(
ICompressSetCoderProperties,
ICompressWriteCoderProperties
)
)*/
MY_UNKNOWN_IMP
STDMETHOD(Init)(
ISequentialOutStream *outStream);

View file

@ -3,6 +3,10 @@
#ifndef __STDAFX_H
#define __STDAFX_H
#include <windows.h>
#ifdef _WIN32
# include <windows.h>
#else
# include "../../../../Platform.h"
#endif
#endif

View file

@ -3,6 +3,10 @@
#ifndef __STDAFX_H
#define __STDAFX_H
#include <windows.h>
#ifdef _WIN32
# include <windows.h>
#else
# include "../../../../Platform.h"
#endif
#endif

View file

@ -5,20 +5,52 @@
#ifndef __MYUNKNOWN_H
#define __MYUNKNOWN_H
#ifdef WIN32
#ifdef _WIN32
// #include <guiddef.h>
#include <basetyps.h>
#else
#else
#include "../../Platform.h"
#include <string>
#define HRESULT LONG
#define STDMETHODCALLTYPE __stdcall
#if ((_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED))
# define STDMETHODCALLTYPE __stdcall
#else
# if defined(__GNUC__) && defined(__i386__)
# define STDMETHODCALLTYPE __attribute__((__stdcall__))
# else
# define STDMETHODCALLTYPE
# endif
#endif
#define PROPID ULONG
#define STDMETHOD_(t, f) virtual t STDMETHODCALLTYPE f
#define STDMETHOD(f) STDMETHOD_(HRESULT, f)
#define STDMETHODIMP_(type) type STDMETHODCALLTYPE
#define STDMETHODIMP STDMETHODIMP_(HRESULT)
#define VT_UI4 1
#define VT_BSTR 2
typedef struct _PROPVARIANT
{
WORD vt;
ULONG ulVal;
wchar_t *bstrVal;
} PROPVARIANT;
#define S_OK 0
#define E_NOINTERFACE 0x80000001
#define E_ABORT 0x80000002
#define E_INVALIDARG 0x80070057
#define E_FAIL 0x80004005
#define E_OUTOFMEMORY 0x8007000E
#define PURE = 0;
typedef struct {
@ -35,33 +67,34 @@ typedef struct {
#endif
#ifdef INITGUID
#define MY_DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
MY_EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#else
#define MY_DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
MY_EXTERN_C const GUID name
#endif
#ifdef __cplusplus
#define REFGUID const GUID &
typedef const GUID & REFGUID;
#else
#define REFGUID const GUID * __MIDL_CONST
#endif
#define MIDL_INTERFACE(x) struct
#define MIDL_INTERFACE(x) struct
inline int operator==(REFGUID g1, REFGUID g2)
{
for (int i = 0; i < sizeof(g1); i++)
for (unsigned int i = 0; i < sizeof(g1); i++)
if (((unsigned char *)&g1)[i] != ((unsigned char *)&g2)[i])
return false;
return true;
}
inline int operator!=(REFGUID &g1, REFGUID &g2)
inline int operator!=(REFGUID g1, REFGUID g2)
{ return !(g1 == g2); }
struct IUnknown
{
STDMETHOD(QueryInterface) (const GUID *iid, void **outObject) PURE;
STDMETHOD(QueryInterface) (REFGUID iid, void **outObject) PURE;
STDMETHOD_(ULONG, AddRef)() PURE;
STDMETHOD_(ULONG, Release)() PURE;
};

View file

@ -50,10 +50,10 @@ public:
_p = NULL;
return pt;
}
HRESULT CoCreateInstance(REFCLSID rclsid, REFIID iid, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
/*HRESULT CoCreateInstance(REFCLSID rclsid, REFIID iid, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
{
return ::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, (void**)&_p);
}
}*/
/*
HRESULT CoCreateInstance(LPCOLESTR szProgID, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
{
@ -65,16 +65,16 @@ public:
return hr;
}
*/
template <class Q>
/*template <class Q>
HRESULT QueryInterface(REFGUID iid, Q** pp) const
{
return _p->QueryInterface(iid, (void**)pp);
}
}*/
};
//////////////////////////////////////////////////////////
class CMyComBSTR
/*class CMyComBSTR
{
public:
BSTR m_str;
@ -83,7 +83,7 @@ public:
// CMyComBSTR(int nSize) { m_str = ::SysAllocStringLen(NULL, nSize); }
// CMyComBSTR(int nSize, LPCOLESTR sz) { m_str = ::SysAllocStringLen(sz, nSize); }
CMyComBSTR(const CMyComBSTR& src) { m_str = src.MyCopy(); }
/*
/ *
CMyComBSTR(REFGUID src)
{
LPOLESTR szGuid;
@ -91,7 +91,7 @@ public:
m_str = ::SysAllocString(szGuid);
CoTaskMemFree(szGuid);
}
*/
* /
~CMyComBSTR() { ::SysFreeString(m_str); }
CMyComBSTR& operator=(const CMyComBSTR& src)
{
@ -132,7 +132,7 @@ public:
m_str = NULL;
}
bool operator!() const { return (m_str == NULL); }
};
};*/
//////////////////////////////////////////////////////////

View file

@ -3,6 +3,10 @@
#ifndef __STDAFX_H
#define __STDAFX_H
#include <windows.h>
#ifdef _WIN32
# include <windows.h>
#else
# include "../../Platform.h"
#endif
#endif

View file

@ -5,7 +5,11 @@
#ifndef __COMMON_TYPES_H
#define __COMMON_TYPES_H
#include <basetsd.h>
#ifdef _WIN32
# include <basetsd.h>
#else
# include "../../Platform.h"
#endif
typedef unsigned char UINT8;
typedef unsigned short UINT16;