comparison src/nsis-1-fixes.patch @ 3774:d76aee4b2c2b

nsis: update patch from mxe * src/nsis-1-fixes.patch: update to latest from mxe.cc
author John Donoghue
date Wed, 21 Jan 2015 11:09:13 -0500
parents 60cd6f076a3d
children a14a5640d12b
comparison
equal deleted inserted replaced
3773:42666a54673f 3774:d76aee4b2c2b
1 This file is part of MXE. 1 This file is part of MXE.
2 See index.html for further information. 2 See index.html for further information.
3 3
4 Contains ad hoc patches for cross building. 4 Contains ad hoc patches for cross building.
5 5
6 From a2aff1c5e0febc993545ecd8379135ec7b53358b Mon Sep 17 00:00:00 2001 6 From d143dbb2e06d8597dfea89d4b9f55f44ddc6e7f1 Mon Sep 17 00:00:00 2001
7 From: MXE 7 From: MXE
8 Date: Sun, 12 Aug 2012 12:33:26 +0200 8 Date: Sun, 12 Aug 2012 12:33:26 +0200
9 Subject: [PATCH 1/3] explicit mingw cross prefix 9 Subject: [PATCH 1/4] explicit mingw cross prefix
10 10
11 This patch has been taken from: 11 This patch has been taken from:
12 http://sourceforge.net/tracker/index.php?func=detail&aid=3305366&group_id=22049&atid=373085 12 http://sourceforge.net/tracker/index.php?func=detail&aid=3305366&group_id=22049&atid=373085
13 13
14 diff --git a/SCons/Tools/crossmingw.py b/SCons/Tools/crossmingw.py 14 diff --git a/SCons/Tools/crossmingw.py b/SCons/Tools/crossmingw.py
45 + defenv['MINGW_CROSS_PREFIX'] = mingw_cross_prefix 45 + defenv['MINGW_CROSS_PREFIX'] = mingw_cross_prefix
46 46
47 Export('defenv') 47 Export('defenv')
48 48
49 -- 49 --
50 1.8.2.1 50 1.8.2.2
51 51
52 52
53 From d48abdf87538c76261cc447501e0abd755b88c4b Mon Sep 17 00:00:00 2001 53 From 2c32b56851aa15ad8460ed3dd0944ecb78b43ea9 Mon Sep 17 00:00:00 2001
54 From: MXE 54 From: MXE
55 Date: Sun, 12 Aug 2012 12:36:39 +0200 55 Date: Sun, 12 Aug 2012 12:36:39 +0200
56 Subject: [PATCH 2/3] add missing header 56 Subject: [PATCH 2/4] add missing header
57 57
58 58
59 diff --git a/Source/util.h b/Source/util.h 59 diff --git a/Source/util.h b/Source/util.h
60 index 4259a6a..664923e 100755 60 index 4259a6a..664923e 100755
61 --- a/Source/util.h 61 --- a/Source/util.h
67 +# include <unistd.h> 67 +# include <unistd.h>
68 #endif 68 #endif
69 69
70 70
71 -- 71 --
72 1.8.2.1 72 1.8.2.2
73 73
74 74
75 From ed27d84aa1de6aee0a2ba788e90a6d0857d2d535 Mon Sep 17 00:00:00 2001 75 From ad29c1f6af0eba959e3bcb96992d1a709ba58aca Mon Sep 17 00:00:00 2001
76 From: MXE 76 From: MXE
77 Date: Fri, 3 May 2013 17:28:44 +1000 77 Date: Fri, 3 May 2013 17:28:44 +1000
78 Subject: [PATCH 3/3] Enable native 64-bit build 78 Subject: [PATCH 3/4] Enable native 64-bit build
79 79
80 Taken from: 80 Taken from:
81 http://anonscm.debian.org/gitweb/?p=collab-maint/nsis.git;a=blob;f=debian/patches/makensis_native_64bit.patch;h=2256a0e193db894dd99507ac0de66f8ae060b46b;hb=HEAD 81 http://anonscm.debian.org/gitweb/?p=collab-maint/nsis.git;a=blob;f=debian/patches/makensis_native_64bit.patch;h=2256a0e193db894dd99507ac0de66f8ae060b46b;hb=HEAD
82 82
83 diff --git a/SCons/Config/gnu b/SCons/Config/gnu 83 diff --git a/SCons/Config/gnu b/SCons/Config/gnu
582 + if ( dwError == ERROR_INSUFFICIENT_BUFFER ) 582 + if ( dwError == ERROR_INSUFFICIENT_BUFFER )
583 { 583 {
584 SetLastError( 0 ); 584 SetLastError( 0 );
585 return dwResult; 585 return dwResult;
586 -- 586 --
587 1.8.2.1 587 1.8.2.2
588 588
589 diff -ur a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp 589
590 --- a/Contrib/InstallOptions/InstallerOptions.cpp 2009-02-04 09:08:31.000000000 -0500 590 From 055b07791400ae22bde948f60d71e3311e25f452 Mon Sep 17 00:00:00 2001
591 +++ b/Contrib/InstallOptions/InstallerOptions.cpp 2014-02-14 18:14:18.638628714 -0500 591 From: MXE
592 @@ -33,6 +33,7 @@ 592 Date: Thu, 9 May 2013 13:08:59 +1000
593 #define strdup(x) STRDUP(x) 593 Subject: [PATCH 4/4] i686-w64-mingw32 fixes
594 #define stricmp(x,y) lstrcmpi(x,y) 594
595 //#define abs(x) ((x) < 0 ? -(x) : (x)) 595
596 +#define min(x,y) ((x) < (y) ? (x) : (y)) 596 diff --git a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp
597 597 index d8303b0..fefc8f8 100755
598 char *WINAPI STRDUP(const char *c) 598 --- a/Contrib/InstallOptions/InstallerOptions.cpp
599 +++ b/Contrib/InstallOptions/InstallerOptions.cpp
600 @@ -13,6 +13,7 @@
601 #include <cderr.h>
602 #include "resource.h"
603 #include "shellapi.h"
604 +#include <algorithm>
605
606 #include <nsis/pluginapi.h> // nsis plugin
607
608 @@ -149,7 +150,7 @@ struct FieldType {
609 int nField; // field number in INI file
610 char *pszHwndEntry; // "HWND" or "HWND2"
611
612 - long wndProc;
613 + long wndProc;
614 };
615
616 // initial buffer size. buffers will grow as required.
617 @@ -759,7 +760,7 @@ BOOL CALLBACK cfgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
618 DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT);
619
620 // Make some more room so the focus rect won't cut letters off
621 - rc.right = min(rc.right + 2, lpdis->rcItem.right);
622 + rc.right = std::min(rc.right + 2, lpdis->rcItem.right);
623
624 // Move rect to right if in RTL mode
625 if (bRTL)
626 @@ -877,7 +878,7 @@ int WINAPI NumbersOnlyPasteWndProc(HWND hWin, UINT uMsg, WPARAM wParam, LPARAM l
627 if (OpenClipboard(hWin))
628 {
629 HGLOBAL hData = GetClipboardData(CF_TEXT);
630 -
631 +
632 if (hData)
633 {
634 char *lpData = (char *) GlobalLock(hData);
635 @@ -1346,7 +1347,7 @@ int WINAPI createCfgDlg()
636
637 int keycolor = *bmp & 0xFFFFFF;
638
639 - // Search for transparent pixels
640 + // Search for transparent pixels
641 for (y = bm.bmHeight - 1; y >= 0; y--) {
642 for (x = 0; x < bm.bmWidth;) {
643 if ((*bmp & 0xFFFFFF) == keycolor) {
644 diff --git a/Contrib/Makensisw/afxres.h b/Contrib/Makensisw/afxres.h
645 index d4c5e1f..16b729d 100755
646 --- a/Contrib/Makensisw/afxres.h
647 +++ b/Contrib/Makensisw/afxres.h
648 @@ -1,4 +1,4 @@
649 -#define _WIN32_IE 0x0400
650 +#define _WIN32_IE 0x0501
651 #include <windows.h>
652
653 #ifndef IDC_STATIC
654 diff --git a/Contrib/Makensisw/makensisw.h b/Contrib/Makensisw/makensisw.h
655 index beadc3f..1479b2f 100755
656 --- a/Contrib/Makensisw/makensisw.h
657 +++ b/Contrib/Makensisw/makensisw.h
658 @@ -22,7 +22,7 @@
659 #ifndef MAKENSIS_H
660 #define MAKENSIS_H
661
662 -#define _WIN32_IE 0x0400
663 +#define _WIN32_IE 0x0501
664 #include <windows.h>
665 #include <commctrl.h>
666 #include "utils.h"
667 diff --git a/Source/SConscript b/Source/SConscript
668 index 505e438..f9aee9d 100755
669 --- a/Source/SConscript
670 +++ b/Source/SConscript
671 @@ -71,7 +71,7 @@ AddAvailableLibs(env, libs)
672
673 ##### Defines
674
675 -env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
676 +env.Append(CPPDEFINES = ['_WIN32_IE=0x0501'])
677
678 ##### Set PCH
679
680 diff --git a/Source/exehead/SConscript b/Source/exehead/SConscript
681 index bebdd54..2f4e490 100755
682 --- a/Source/exehead/SConscript
683 +++ b/Source/exehead/SConscript
684 @@ -53,7 +53,7 @@ Import('env compression solid_compression')
685
686 env.Append(CPPDEFINES = ['EXEHEAD'])
687 env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN'])
688 -env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
689 +env.Append(CPPDEFINES = ['_WIN32_IE=0x0501'])
690
691 ### Some other settings
692
693 diff --git a/Source/util.cpp b/Source/util.cpp
694 index 18c31a2..fc9443f 100755
695 --- a/Source/util.cpp
696 +++ b/Source/util.cpp
697 @@ -1,15 +1,15 @@
698 /*
699 * util.cpp
700 - *
701 + *
702 * This file is a part of NSIS.
703 - *
704 + *
705 * Copyright (C) 1999-2009 Nullsoft and Contributors
706 - *
707 + *
708 * Licensed under the zlib/libpng license (the "License");
709 * you may not use this file except in compliance with the License.
710 - *
711 + *
712 * Licence details can be found in the file COPYING.
713 - *
714 + *
715 * This software is provided 'as-is', without any express or implied
716 * warranty.
717 */
718 @@ -616,7 +616,7 @@ typedef struct _VXD_VERSION_RESOURCE {
719 } VXD_VERSION_RESOURCE, *PVXD_VERSION_RESOURCE;
720 #pragma pack( pop, pre_vxd_ver )
721
722 -static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData )
723 +static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData )
599 { 724 {
725
726 HANDLE hFile = NULL;
727 @@ -673,7 +673,7 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData )
728 pDosExeHdr = (PIMAGE_DOS_HEADER) pView;
729
730 // Check to make sure the file has a DOS EXE header.
731 - if ( pDosExeHdr->e_magic != IMAGE_DOS_SIGNATURE )
732 + if ( pDosExeHdr->e_magic != IMAGE_DOS_SIGNATURE )
733 {
734 if ( pView )
735 UnmapViewOfFile( pView );
736 @@ -693,7 +693,7 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData )
737 + pDosExeHdr->e_lfanew );
738
739 // Check to make sure the file is a VxD.
740 - if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE )
741 + if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE )
742 {
743 if ( pView )
744 UnmapViewOfFile( pView );
745 @@ -769,18 +769,18 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData )
746 return TRUE;
747 }
748
749 -static DWORD GetVxdVersionInfoSize( LPCSTR szFile )
750 +static DWORD GetVxdVersionInfoSize( LPCSTR szFile )
751 {
752 DWORD dwResult = 0;
753
754 // Call GetVxdVersion() with NULL for the pointer to the buffer.
755 - if ( !GetVxdVersion( szFile, &dwResult, NULL ) )
756 + if ( !GetVxdVersion( szFile, &dwResult, NULL ) )
757 {
758 DWORD dwError = GetLastError();
759
760 // GetVxdVersion() will fail with ERROR_INSUFFICIENT_BUFFER and
761 // the required buffer size will be returned in dwResult.
762 - if ( dwError == ERROR_INSUFFICIENT_BUFFER )
763 + if ( dwError == ERROR_INSUFFICIENT_BUFFER )
764 {
765 SetLastError( 0 );
766 return dwResult;
767 @@ -791,7 +791,7 @@ static DWORD GetVxdVersionInfoSize( LPCSTR szFile )
768 return 0;
769 }
770
771 -static BOOL GetVxdVersionInfo( LPCSTR szFile, DWORD dwLen, LPVOID lpData )
772 +static BOOL GetVxdVersionInfo( LPCSTR szFile, DWORD dwLen, LPVOID lpData )
773 {
774 return GetVxdVersion( szFile, &dwLen, lpData );
775 }
776 --
777 1.8.2.2
778