# HG changeset patch # User John Donoghue # Date 1421856553 18000 # Node ID d76aee4b2c2b0be1a1e754c6351cb745a4d63147 # Parent 42666a54673f040c349934cbe1598f9712495690 nsis: update patch from mxe * src/nsis-1-fixes.patch: update to latest from mxe.cc diff -r 42666a54673f -r d76aee4b2c2b src/nsis-1-fixes.patch --- a/src/nsis-1-fixes.patch Wed Jan 21 08:21:40 2015 -0500 +++ b/src/nsis-1-fixes.patch Wed Jan 21 11:09:13 2015 -0500 @@ -3,10 +3,10 @@ Contains ad hoc patches for cross building. -From a2aff1c5e0febc993545ecd8379135ec7b53358b Mon Sep 17 00:00:00 2001 +From d143dbb2e06d8597dfea89d4b9f55f44ddc6e7f1 Mon Sep 17 00:00:00 2001 From: MXE Date: Sun, 12 Aug 2012 12:33:26 +0200 -Subject: [PATCH 1/3] explicit mingw cross prefix +Subject: [PATCH 1/4] explicit mingw cross prefix This patch has been taken from: http://sourceforge.net/tracker/index.php?func=detail&aid=3305366&group_id=22049&atid=373085 @@ -47,13 +47,13 @@ Export('defenv') -- -1.8.2.1 +1.8.2.2 -From d48abdf87538c76261cc447501e0abd755b88c4b Mon Sep 17 00:00:00 2001 +From 2c32b56851aa15ad8460ed3dd0944ecb78b43ea9 Mon Sep 17 00:00:00 2001 From: MXE Date: Sun, 12 Aug 2012 12:36:39 +0200 -Subject: [PATCH 2/3] add missing header +Subject: [PATCH 2/4] add missing header diff --git a/Source/util.h b/Source/util.h @@ -69,13 +69,13 @@ -- -1.8.2.1 +1.8.2.2 -From ed27d84aa1de6aee0a2ba788e90a6d0857d2d535 Mon Sep 17 00:00:00 2001 +From ad29c1f6af0eba959e3bcb96992d1a709ba58aca Mon Sep 17 00:00:00 2001 From: MXE Date: Fri, 3 May 2013 17:28:44 +1000 -Subject: [PATCH 3/3] Enable native 64-bit build +Subject: [PATCH 3/4] Enable native 64-bit build Taken from: http://anonscm.debian.org/gitweb/?p=collab-maint/nsis.git;a=blob;f=debian/patches/makensis_native_64bit.patch;h=2256a0e193db894dd99507ac0de66f8ae060b46b;hb=HEAD @@ -584,16 +584,195 @@ SetLastError( 0 ); return dwResult; -- -1.8.2.1 +1.8.2.2 + + +From 055b07791400ae22bde948f60d71e3311e25f452 Mon Sep 17 00:00:00 2001 +From: MXE +Date: Thu, 9 May 2013 13:08:59 +1000 +Subject: [PATCH 4/4] i686-w64-mingw32 fixes + -diff -ur a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp ---- a/Contrib/InstallOptions/InstallerOptions.cpp 2009-02-04 09:08:31.000000000 -0500 -+++ b/Contrib/InstallOptions/InstallerOptions.cpp 2014-02-14 18:14:18.638628714 -0500 -@@ -33,6 +33,7 @@ - #define strdup(x) STRDUP(x) - #define stricmp(x,y) lstrcmpi(x,y) - //#define abs(x) ((x) < 0 ? -(x) : (x)) -+#define min(x,y) ((x) < (y) ? (x) : (y)) +diff --git a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp +index d8303b0..fefc8f8 100755 +--- a/Contrib/InstallOptions/InstallerOptions.cpp ++++ b/Contrib/InstallOptions/InstallerOptions.cpp +@@ -13,6 +13,7 @@ + #include + #include "resource.h" + #include "shellapi.h" ++#include + + #include // nsis plugin + +@@ -149,7 +150,7 @@ struct FieldType { + int nField; // field number in INI file + char *pszHwndEntry; // "HWND" or "HWND2" + +- long wndProc; ++ long wndProc; + }; + + // initial buffer size. buffers will grow as required. +@@ -759,7 +760,7 @@ BOOL CALLBACK cfgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) + DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT); + + // Make some more room so the focus rect won't cut letters off +- rc.right = min(rc.right + 2, lpdis->rcItem.right); ++ rc.right = std::min(rc.right + 2, lpdis->rcItem.right); + + // Move rect to right if in RTL mode + if (bRTL) +@@ -877,7 +878,7 @@ int WINAPI NumbersOnlyPasteWndProc(HWND hWin, UINT uMsg, WPARAM wParam, LPARAM l + if (OpenClipboard(hWin)) + { + HGLOBAL hData = GetClipboardData(CF_TEXT); +- ++ + if (hData) + { + char *lpData = (char *) GlobalLock(hData); +@@ -1346,7 +1347,7 @@ int WINAPI createCfgDlg() + + int keycolor = *bmp & 0xFFFFFF; + +- // Search for transparent pixels ++ // Search for transparent pixels + for (y = bm.bmHeight - 1; y >= 0; y--) { + for (x = 0; x < bm.bmWidth;) { + if ((*bmp & 0xFFFFFF) == keycolor) { +diff --git a/Contrib/Makensisw/afxres.h b/Contrib/Makensisw/afxres.h +index d4c5e1f..16b729d 100755 +--- a/Contrib/Makensisw/afxres.h ++++ b/Contrib/Makensisw/afxres.h +@@ -1,4 +1,4 @@ +-#define _WIN32_IE 0x0400 ++#define _WIN32_IE 0x0501 + #include + + #ifndef IDC_STATIC +diff --git a/Contrib/Makensisw/makensisw.h b/Contrib/Makensisw/makensisw.h +index beadc3f..1479b2f 100755 +--- a/Contrib/Makensisw/makensisw.h ++++ b/Contrib/Makensisw/makensisw.h +@@ -22,7 +22,7 @@ + #ifndef MAKENSIS_H + #define MAKENSIS_H + +-#define _WIN32_IE 0x0400 ++#define _WIN32_IE 0x0501 + #include + #include + #include "utils.h" +diff --git a/Source/SConscript b/Source/SConscript +index 505e438..f9aee9d 100755 +--- a/Source/SConscript ++++ b/Source/SConscript +@@ -71,7 +71,7 @@ AddAvailableLibs(env, libs) + + ##### Defines + +-env.Append(CPPDEFINES = ['_WIN32_IE=0x0500']) ++env.Append(CPPDEFINES = ['_WIN32_IE=0x0501']) + + ##### Set PCH + +diff --git a/Source/exehead/SConscript b/Source/exehead/SConscript +index bebdd54..2f4e490 100755 +--- a/Source/exehead/SConscript ++++ b/Source/exehead/SConscript +@@ -53,7 +53,7 @@ Import('env compression solid_compression') - char *WINAPI STRDUP(const char *c) + env.Append(CPPDEFINES = ['EXEHEAD']) + env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN']) +-env.Append(CPPDEFINES = ['_WIN32_IE=0x0500']) ++env.Append(CPPDEFINES = ['_WIN32_IE=0x0501']) + + ### Some other settings + +diff --git a/Source/util.cpp b/Source/util.cpp +index 18c31a2..fc9443f 100755 +--- a/Source/util.cpp ++++ b/Source/util.cpp +@@ -1,15 +1,15 @@ + /* + * util.cpp +- * ++ * + * This file is a part of NSIS. +- * ++ * + * Copyright (C) 1999-2009 Nullsoft and Contributors +- * ++ * + * Licensed under the zlib/libpng license (the "License"); + * you may not use this file except in compliance with the License. +- * ++ * + * Licence details can be found in the file COPYING. +- * ++ * + * This software is provided 'as-is', without any express or implied + * warranty. + */ +@@ -616,7 +616,7 @@ typedef struct _VXD_VERSION_RESOURCE { + } VXD_VERSION_RESOURCE, *PVXD_VERSION_RESOURCE; + #pragma pack( pop, pre_vxd_ver ) + +-static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) ++static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) { + + HANDLE hFile = NULL; +@@ -673,7 +673,7 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) + pDosExeHdr = (PIMAGE_DOS_HEADER) pView; + + // Check to make sure the file has a DOS EXE header. +- if ( pDosExeHdr->e_magic != IMAGE_DOS_SIGNATURE ) ++ if ( pDosExeHdr->e_magic != IMAGE_DOS_SIGNATURE ) + { + if ( pView ) + UnmapViewOfFile( pView ); +@@ -693,7 +693,7 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) + + pDosExeHdr->e_lfanew ); + + // Check to make sure the file is a VxD. +- if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE ) ++ if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE ) + { + if ( pView ) + UnmapViewOfFile( pView ); +@@ -769,18 +769,18 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) + return TRUE; + } + +-static DWORD GetVxdVersionInfoSize( LPCSTR szFile ) ++static DWORD GetVxdVersionInfoSize( LPCSTR szFile ) + { + DWORD dwResult = 0; + + // Call GetVxdVersion() with NULL for the pointer to the buffer. +- if ( !GetVxdVersion( szFile, &dwResult, NULL ) ) ++ if ( !GetVxdVersion( szFile, &dwResult, NULL ) ) + { + DWORD dwError = GetLastError(); + + // GetVxdVersion() will fail with ERROR_INSUFFICIENT_BUFFER and + // the required buffer size will be returned in dwResult. +- if ( dwError == ERROR_INSUFFICIENT_BUFFER ) ++ if ( dwError == ERROR_INSUFFICIENT_BUFFER ) + { + SetLastError( 0 ); + return dwResult; +@@ -791,7 +791,7 @@ static DWORD GetVxdVersionInfoSize( LPCSTR szFile ) + return 0; + } + +-static BOOL GetVxdVersionInfo( LPCSTR szFile, DWORD dwLen, LPVOID lpData ) ++static BOOL GetVxdVersionInfo( LPCSTR szFile, DWORD dwLen, LPVOID lpData ) + { + return GetVxdVersion( szFile, &dwLen, lpData ); + } +-- +1.8.2.2 +