From bd25e070c8e1e12efc46dd443da8a7d27ebb9d4f Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 30 Jan 2004 22:04:10 +0000 Subject: [PATCH] - compiles without PSDK again - moved all defines that are missing without PSDK to Platform.h git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3436 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/7zip/7zGuids.cpp | 6 +++--- Source/DialogTemplate.cpp | 5 ----- Source/DialogTemplate.h | 9 +-------- Source/Plugins.cpp | 2 +- Source/Plugins.h | 6 +----- Source/ResourceEditor.h | 9 +-------- Source/ResourceVersionInfo.cpp | 2 +- Source/afxres.h | 2 +- Source/build.cpp | 2 +- Source/exehead/Main.c | 3 +-- Source/exehead/Ui.c | 25 +------------------------ Source/exehead/afxres.h | 2 +- Source/exehead/bgbg.c | 2 +- Source/exehead/config.h | 4 ---- Source/exehead/exec.c | 2 +- Source/exehead/fileform.c | 2 +- Source/exehead/util.c | 6 +----- Source/lang.cpp | 2 +- Source/makenssi.cpp | 2 +- Source/script.cpp | 6 +----- Source/strlist.h | 2 ++ Source/tokens.cpp | 2 +- Source/util.cpp | 2 +- 23 files changed, 24 insertions(+), 81 deletions(-) diff --git a/Source/7zip/7zGuids.cpp b/Source/7zip/7zGuids.cpp index a8cd57db..af770534 100644 --- a/Source/7zip/7zGuids.cpp +++ b/Source/7zip/7zGuids.cpp @@ -2,11 +2,11 @@ // #include "StdAfx.h" -#include -#include #ifndef INITGUID #define INITGUID #endif +#include +#include +#include "../Platform.h" #include "7zip/ICoder.h" #include "7zip/Compress/LZ/IMatchFinder.h" - diff --git a/Source/DialogTemplate.cpp b/Source/DialogTemplate.cpp index b76a6950..78f79fca 100644 --- a/Source/DialogTemplate.cpp +++ b/Source/DialogTemplate.cpp @@ -21,7 +21,6 @@ */ #include "DialogTemplate.h" -#include ////////////////////////////////////////////////////////////////////// // Utilities @@ -263,10 +262,6 @@ int CDialogTemplate::RemoveItem(WORD wId) { return 0; } -#ifndef DS_SHELLFONT -#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS) -#endif - // Sets the font of the dialog void CDialogTemplate::SetFont(char* szFaceName, WORD wFontSize) { if (lstrcmp(szFaceName, "MS Shell Dlg")) { diff --git a/Source/DialogTemplate.h b/Source/DialogTemplate.h index 004d77fe..ed5e91d2 100644 --- a/Source/DialogTemplate.h +++ b/Source/DialogTemplate.h @@ -27,19 +27,12 @@ #pragma once #endif // _MSC_VER > 1000 -#include +#include "Platform.h" #include #include using namespace std; -#ifndef IS_INTRESOURCE -#ifndef ULONG_PTR -#define ULONG_PTR DWORD -#endif -#define IS_INTRESOURCE(_r) (((ULONG_PTR)(_r) >> 16) == 0) -#endif - struct DialogItemTemplate { DWORD dwHelpId; // Extended only diff --git a/Source/Plugins.cpp b/Source/Plugins.cpp index 38735963..34ca4198 100644 --- a/Source/Plugins.cpp +++ b/Source/Plugins.cpp @@ -2,7 +2,7 @@ #ifdef NSIS_CONFIG_PLUGIN_SUPPORT #include "Plugins.h" -#include +#include "Platform.h" #include diff --git a/Source/Plugins.h b/Source/Plugins.h index b0888758..c58a5e89 100644 --- a/Source/Plugins.h +++ b/Source/Plugins.h @@ -1,11 +1,7 @@ - - #ifndef __X18_PLUGINS_H #define __X18_PLUGINS_H - -#include -#include +#include "Platform.h" #include "strlist.h" struct plugin { diff --git a/Source/ResourceEditor.h b/Source/ResourceEditor.h index becacb99..e8887703 100644 --- a/Source/ResourceEditor.h +++ b/Source/ResourceEditor.h @@ -29,7 +29,7 @@ #ifdef RESOURCE_EDITOR_NOT_API -#include +#include "Platform.h" #include #include #include @@ -40,13 +40,6 @@ #include using namespace std; -#ifndef IS_INTRESOURCE -#ifndef ULONG_PTR -#define ULONG_PTR DWORD -#endif -#define IS_INTRESOURCE(_r) (((ULONG_PTR)(_r) >> 16) == 0) -#endif - class CResourceDirectory; class CResourceDirectoryEntry; class CResourceDataEntry; diff --git a/Source/ResourceVersionInfo.cpp b/Source/ResourceVersionInfo.cpp index d7b86308..ac4e2beb 100644 --- a/Source/ResourceVersionInfo.cpp +++ b/Source/ResourceVersionInfo.cpp @@ -2,7 +2,7 @@ // ////////////////////////////////////////////////////////////////////// -#include +#include "Platform.h" #include "build.h" #include "ResourceVersionInfo.h" diff --git a/Source/afxres.h b/Source/afxres.h index b3cc0671..f4a413f2 100644 --- a/Source/afxres.h +++ b/Source/afxres.h @@ -1,4 +1,4 @@ -#include +#include "Platform.h" #ifndef IDC_STATIC #define IDC_STATIC -1 diff --git a/Source/build.cpp b/Source/build.cpp index d28b3711..8e7b3587 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -1,4 +1,4 @@ -#include +#include "Platform.h" #include #include "exehead/config.h" #include "exehead/fileform.h" diff --git a/Source/exehead/Main.c b/Source/exehead/Main.c index 102ce7d1..4d71b39c 100644 --- a/Source/exehead/Main.c +++ b/Source/exehead/Main.c @@ -24,8 +24,7 @@ */ -#include -#include +#include "../Platform.h" #include #include "resource.h" #include "util.h" diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index ba87b188..48f23e5e 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -20,7 +20,7 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#include +#include "../Platform.h" #include #include #include @@ -34,9 +34,6 @@ #include "exec.h" #include "lang.h" -#define LB_ICONWIDTH 20 -#define LB_ICONHEIGHT 20 - #ifdef NSIS_CONFIG_VISIBLE_SUPPORT HICON g_hIcon; #endif @@ -721,9 +718,6 @@ static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM } } if (enlink->msg==WM_SETCURSOR) { -#ifndef IDC_HAND -#define IDC_HAND MAKEINTRESOURCE(32649) -#endif SetCursor(LoadCursor(0,IDC_HAND)); } } @@ -857,9 +851,6 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar bi.lpfn = BrowseCallbackProc; bi.lParam = (LPARAM)dir; bi.lpszTitle = GetNSISStringTT(browse_text); -#ifndef BIF_NEWDIALOGSTYLE -#define BIF_NEWDIALOGSTYLE 0x0040 -#endif bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE; idlist = SHBrowseForFolder(&bi); if (idlist) @@ -940,10 +931,6 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar #ifdef NSIS_CONFIG_COMPONENTPAGE -#ifndef TVITEM -#define TVITEM TV_ITEM -#endif - static int NSISCALL SetChildrenStates(HWND hwTree, HTREEITEM hItem, int iChecked) { int iCheckedChildren = 0, iChildren = 0, *pFlags, iState = 1; @@ -1132,13 +1119,6 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar TreeView_SetImageList(hwndTree1, hImageList, TVSIL_STATE); -#ifndef TVM_SETITEMHEIGHT -#define TVM_SETITEMHEIGHT (TV_FIRST + 27) -#endif -#ifndef TVM_GETITEMHEIGHT -#define TVM_GETITEMHEIGHT (TV_FIRST + 28) -#endif - if (SendMessage(hwndTree1, TVM_GETITEMHEIGHT, 0, 0) < 16) SendMessage(hwndTree1, TVM_SETITEMHEIGHT, 16, 0); @@ -1533,9 +1513,6 @@ static DWORD WINAPI install_thread(LPVOID p) #ifdef NSIS_CONFIG_VISIBLE_SUPPORT -// listview unfolds partly hidden labels if it does not have infotip text -#define LVS_EX_LABELTIP 0x00004000 - static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { HWND linsthwnd=insthwnd; diff --git a/Source/exehead/afxres.h b/Source/exehead/afxres.h index b3cc0671..3b7a44cf 100644 --- a/Source/exehead/afxres.h +++ b/Source/exehead/afxres.h @@ -1,4 +1,4 @@ -#include +#include "../Platform.h" #ifndef IDC_STATIC #define IDC_STATIC -1 diff --git a/Source/exehead/bgbg.c b/Source/exehead/bgbg.c index e0bdd902..60e228f8 100644 --- a/Source/exehead/bgbg.c +++ b/Source/exehead/bgbg.c @@ -1,4 +1,4 @@ -#include +#include "../Platform.h" #include "resource.h" #include "config.h" #include "fileform.h" diff --git a/Source/exehead/config.h b/Source/exehead/config.h index 3cd1d7c5..53572850 100644 --- a/Source/exehead/config.h +++ b/Source/exehead/config.h @@ -387,10 +387,6 @@ #define NSIS_DEFAULT_LANG 1033 #endif -#ifndef INVALID_FILE_ATTRIBUTES -#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) -#endif - #define VARS_SECTION_NAME ".ndata" typedef char NSIS_STRING[NSIS_MAX_STRLEN]; diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index d1806ba5..6c3917be 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -1,4 +1,4 @@ -#include +#include "../Platform.h" #include #include #include "fileform.h" diff --git a/Source/exehead/fileform.c b/Source/exehead/fileform.c index 8cbc3876..514cb135 100644 --- a/Source/exehead/fileform.c +++ b/Source/exehead/fileform.c @@ -1,4 +1,4 @@ -#include +#include "../Platform.h" #include "fileform.h" #include "util.h" #include "state.h" diff --git a/Source/exehead/util.c b/Source/exehead/util.c index 64e90314..cda3942e 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -1,4 +1,4 @@ -#include +#include "../Platform.h" #include #include "util.h" #include "state.h" @@ -27,10 +27,6 @@ NSIS_STRING g_usrvars[1]; #define SECTION_VARS_RWD "/section:" ## VARS_SECTION_NAME ## ",rwd" #pragma comment(linker, SECTION_VARS_RWD) -#ifndef INVALID_FILE_ATTRIBUTES -#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) -#endif - int NSISCALL my_PIDL2Path(char *out, LPITEMIDLIST idl) { int Res; diff --git a/Source/lang.cpp b/Source/lang.cpp index c9a8b8f5..279c051e 100644 --- a/Source/lang.cpp +++ b/Source/lang.cpp @@ -1,4 +1,4 @@ -#include +#include "Platform.h" #include #include #include "build.h" diff --git a/Source/makenssi.cpp b/Source/makenssi.cpp index f1283ae9..ad402745 100644 --- a/Source/makenssi.cpp +++ b/Source/makenssi.cpp @@ -28,7 +28,7 @@ const char *NSIS_VERSION="v2.0rc3"; Includes portions derived from bzip2 (see documentation for details). */ -#include +#include "Platform.h" #include #include diff --git a/Source/script.cpp b/Source/script.cpp index ae586a5f..2e4c94ac 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -1,4 +1,4 @@ -#include +#include "Platform.h" #include #include #define _RICHEDIT_VER 0x0200 @@ -13,10 +13,6 @@ #include "lang.h" #include "exehead/resource.h" -#ifndef FOF_NOERRORUI -#define FOF_NOERRORUI 0x0400 -#endif - #define MAX_INCLUDEDEPTH 10 #define MAX_LINELENGTH 4096 diff --git a/Source/strlist.h b/Source/strlist.h index 478835d5..03d848b9 100644 --- a/Source/strlist.h +++ b/Source/strlist.h @@ -1,6 +1,8 @@ #ifndef _STRLIST_H_ #define _STRLIST_H_ +#include "Platform.h" +#include #include // for gcc class IGrowBuf diff --git a/Source/tokens.cpp b/Source/tokens.cpp index ee55f7e6..43a88e3d 100644 --- a/Source/tokens.cpp +++ b/Source/tokens.cpp @@ -1,4 +1,4 @@ -#include +#include "Platform.h" #include #include diff --git a/Source/util.cpp b/Source/util.cpp index c8341261..0a6ab27d 100644 --- a/Source/util.cpp +++ b/Source/util.cpp @@ -1,4 +1,4 @@ -#include +#include "Platform.h" #include #include #include