annotate src/nsis-1-fixes.patch @ 4118:a14a5640d12b

nsis: update to 2.50 * src/nsis.mk: update version, checksum * src/nsis-1-fixes.patch: updated match from mxe.cc
author John Donoghue
date Thu, 31 Mar 2016 07:50:33 -0400
parents d76aee4b2c2b
children a62c4469e2aa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2687
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
1 This file is part of MXE.
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
2 See index.html for further information.
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
3
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
4 Contains ad hoc patches for cross building.
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
5
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
6 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
7 From: Mark Brand <mabrand@mabrand.nl>
2687
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
8 Date: Sun, 12 Aug 2012 12:33:26 +0200
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
9 Subject: [PATCH] explicit mingw cross prefix
2687
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
10
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
11 This patch has been taken from:
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
12 http://sourceforge.net/tracker/index.php?func=detail&aid=3305366&group_id=22049&atid=373085
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
13
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
14 diff --git a/SCons/Tools/crossmingw.py b/SCons/Tools/crossmingw.py
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
15 index 1111111..2222222 100755
2687
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
16 --- a/SCons/Tools/crossmingw.py
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
17 +++ b/SCons/Tools/crossmingw.py
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
18 @@ -61,6 +61,9 @@ prefixes = SCons.Util.Split("""
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
19 """)
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
20
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
21 def find(env):
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
22 + if env.has_key('MINGW_CROSS_PREFIX'):
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
23 + return env['MINGW_CROSS_PREFIX']
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
24 +
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
25 for prefix in prefixes:
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
26 # First search in the SCons path and then the OS path:
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
27 if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'):
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
28 diff --git a/SConstruct b/SConstruct
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
29 index 1111111..2222222 100755
2687
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
30 --- a/SConstruct
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
31 +++ b/SConstruct
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
32 @@ -59,6 +59,7 @@ doc = [
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
33
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
34 path = ARGUMENTS.get('PATH', '')
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
35 toolset = ARGUMENTS.get('TOOLSET', '')
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
36 +mingw_cross_prefix = ARGUMENTS.get('MINGW_CROSS_PREFIX', '')
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
37
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
38 if toolset and path:
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
39 defenv = Environment(ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip'])
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
40 @@ -69,6 +70,8 @@ else:
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
41 defenv = Environment(TOOLS = toolset.split(',') + ['zip'])
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
42 if not toolset and not path:
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
43 defenv = Environment()
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
44 +if mingw_cross_prefix:
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
45 + defenv['MINGW_CROSS_PREFIX'] = mingw_cross_prefix
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
46
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
47 Export('defenv')
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
48
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
49
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
50 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
51 From: freeman <free.man.uu@gmail.com>
2687
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
52 Date: Sun, 12 Aug 2012 12:36:39 +0200
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
53 Subject: [PATCH] add missing header
2687
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
54
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
55
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
56 diff --git a/Source/util.h b/Source/util.h
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
57 index 1111111..2222222 100755
2687
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
58 --- a/Source/util.h
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
59 +++ b/Source/util.h
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
60 @@ -25,6 +25,7 @@
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
61 #ifndef _WIN32
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
62 # include <iconv.h>
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
63 # include <stdio.h>
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
64 +# include <unistd.h>
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
65 #endif
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
66
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
67
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
68
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
69 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
70 From: Tony Theodore <tonyt@logyst.com>
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
71 Date: Fri, 3 May 2013 17:28:44 +1000
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
72 Subject: [PATCH] Enable native 64-bit build
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
73
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
74 Taken from:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
75 http://anonscm.debian.org/gitweb/?p=collab-maint/nsis.git;a=blob;f=debian/patches/makensis_native_64bit.patch;h=2256a0e193db894dd99507ac0de66f8ae060b46b;hb=HEAD
2687
de129d8bdb4b package nsis: fixed build failure
Mark Brand <mabrand@mabrand.nl>
parents:
diff changeset
76
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
77 diff --git a/SCons/Config/gnu b/SCons/Config/gnu
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
78 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
79 --- a/SCons/Config/gnu
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
80 +++ b/SCons/Config/gnu
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
81 @@ -95,8 +95,6 @@ makensis_env.Append(CXXFLAGS = ['-Wno-non-virtual-dtor']) # ignore virtual dtor
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
82 makensis_env.Append(CXXFLAGS = ['-Wall']) # all warnings
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
83
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
84 conf = FlagsConfigure(makensis_env)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
85 -conf.CheckCompileFlag('-m32') #
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
86 -conf.CheckLinkFlag('-m32') #
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
87 conf.CheckLinkFlag('$MAP_FLAG') # generate map file
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
88 if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
89 TestStrip(conf) # strip
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
90 @@ -149,8 +147,6 @@ conf.Finish()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
91 ### cross-platform util environment adjustments
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
92
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
93 conf = FlagsConfigure(cp_util_env)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
94 -conf.CheckCompileFlag('-m32')
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
95 -conf.CheckLinkFlag('-m32')
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
96 if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
97 TestStrip(conf) # strip
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
98 conf.Finish()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
99 @@ -160,8 +156,6 @@ conf.Finish()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
100 test_env = defenv.Clone()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
101 test_env.Append(CPPPATH = ['#$BUILD_CONFIG'])
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
102 conf = FlagsConfigure(test_env)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
103 -conf.CheckCompileFlag('-m32')
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
104 -conf.CheckLinkFlag('-m32')
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
105 conf.Finish()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
106
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
107 ### weird GCC requirements
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
108 diff --git a/Source/DialogTemplate.cpp b/Source/DialogTemplate.cpp
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
109 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
110 --- a/Source/DialogTemplate.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
111 +++ b/Source/DialogTemplate.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
112 @@ -74,7 +74,7 @@ void ReadVarLenArr(LPBYTE &seeker, WCHAR* &readInto, unsigned int uCodePage) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
113 if (IS_INTRESOURCE(x)) { \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
114 *(WORD*)seeker = 0xFFFF; \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
115 seeker += sizeof(WORD); \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
116 - *(WORD*)seeker = ConvertEndianness(WORD(DWORD(x))); \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
117 + *(WORD*)seeker = ConvertEndianness(WORD((ULONG_PTR)(x))); \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
118 seeker += sizeof(WORD); \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
119 } \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
120 else { \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
121 @@ -444,7 +444,7 @@ void CDialogTemplate::ConvertToRTL() {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
122 szClass = winchar_toansi(m_vItems[i]->szClass);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
123
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
124 // Button
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
125 - if (long(m_vItems[i]->szClass) == 0x80) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
126 + if ((ULONG_PTR)(m_vItems[i]->szClass) == 0x80) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
127 m_vItems[i]->dwStyle ^= BS_LEFTTEXT;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
128 m_vItems[i]->dwStyle ^= BS_RIGHT;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
129 m_vItems[i]->dwStyle ^= BS_LEFT;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
130 @@ -458,13 +458,13 @@ void CDialogTemplate::ConvertToRTL() {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
131 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
132 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
133 // Edit
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
134 - else if (long(m_vItems[i]->szClass) == 0x81) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
135 + else if ((ULONG_PTR)(m_vItems[i]->szClass) == 0x81) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
136 if ((m_vItems[i]->dwStyle & ES_CENTER) == 0) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
137 m_vItems[i]->dwStyle ^= ES_RIGHT;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
138 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
139 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
140 // Static
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
141 - else if (long(m_vItems[i]->szClass) == 0x82) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
142 + else if ((ULONG_PTR)(m_vItems[i]->szClass) == 0x82) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
143 if ((m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFT || (m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFTNOWORDWRAP)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
144 {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
145 m_vItems[i]->dwStyle &= ~SS_TYPEMASK;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
146 @@ -571,7 +571,7 @@ BYTE* CDialogTemplate::Save(DWORD& dwSize) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
147 // Write all of the items
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
148 for (unsigned int i = 0; i < m_vItems.size(); i++) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
149 // DLGITEMTEMPLATE[EX]s must be aligned on DWORD boundary
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
150 - if (DWORD(seeker - pbDlg) % sizeof(DWORD))
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
151 + if ((seeker - pbDlg) % sizeof(DWORD))
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
152 seeker += sizeof(WORD);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
153
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
154 if (m_bExtended) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
155 @@ -622,7 +622,7 @@ BYTE* CDialogTemplate::Save(DWORD& dwSize) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
156 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
157 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
158
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
159 - assert((DWORD) seeker - (DWORD) pbDlg == dwSize);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
160 + assert((DWORD)(seeker - pbDlg) == dwSize);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
161
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
162 // DONE!
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
163 return pbDlg;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
164 diff --git a/Source/Platform.h b/Source/Platform.h
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
165 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
166 --- a/Source/Platform.h
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
167 +++ b/Source/Platform.h
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
168 @@ -53,6 +53,7 @@ typedef unsigned char UCHAR;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
169 typedef const char *LPCCH, *PCSTR, *LPCSTR;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
170 typedef unsigned short WCHAR, OLECHAR, *PWCHAR, *LPWCH, *PWCH, *NWPSTR, *LPWSTR, *PWSTR, *BSTR;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
171 typedef const unsigned short *LPCWCH, *PCWCH, *LPCWSTR, *PCWSTR, *LPCOLESTR;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
172 +typedef int INT_PTR;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
173 typedef unsigned int UINT_PTR;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
174 // basic stuff
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
175 typedef void * HANDLE;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
176 @@ -60,8 +61,8 @@ typedef HANDLE HWND;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
177 typedef HANDLE HMODULE;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
178 typedef unsigned long HKEY;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
179 // some gdi
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
180 -typedef unsigned long COLORREF;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
181 -typedef unsigned long HBRUSH;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
182 +typedef DWORD COLORREF;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
183 +typedef UINT32 HBRUSH;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
184 // bool
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
185 # define FALSE 0
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
186 # define TRUE 1
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
187 @@ -166,7 +167,7 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
188 # define MAKEINTRESOURCE MAKEINTRESOURCEA
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
189 # endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
190 # ifndef IMAGE_FIRST_SECTION
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
191 -# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (DWORD) h + \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
192 +# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (ULONG_PTR) h + \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
193 FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + \
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
194 FIX_ENDIAN_INT16(PIMAGE_NT_HEADERS(h)->FileHeader.SizeOfOptionalHeader) ) )
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
195 # endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
196 @@ -174,7 +175,7 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
197 # define RGB(r,g,b) ((DWORD)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16)))
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
198 # endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
199 # ifndef MAKELONG
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
200 -# define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
201 +# define MAKELONG(a,b) ((DWORD)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
202 # endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
203 #endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
204 #ifndef IS_INTRESOURCE
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
205 @@ -197,8 +198,10 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
206 # define FOF_NOERRORUI 0x0400
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
207 #endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
208
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
209 -#ifndef ULONG_PTR
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
210 -# define ULONG_PTR DWORD
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
211 +// mingw32 and w64-mingw32 do not define ULONG_PTR
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
212 +// but rather declare ULONG_PTR via typedef (see basetsd.h)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
213 +#if !defined(__MINGW32__) && !defined(ULONG_PTR)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
214 +# define ULONG_PTR unsigned long
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
215 #endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
216
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
217 #ifndef IDC_HAND
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
218 @@ -238,7 +241,7 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
219 # undef INVALID_FILE_ATTRIBUTES
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
220 #endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
221 #ifndef INVALID_FILE_ATTRIBUTES
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
222 -# define INVALID_FILE_ATTRIBUTES ((unsigned long) -1)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
223 +# define INVALID_FILE_ATTRIBUTES ((DWORD) -1)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
224 #endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
225
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
226 // shell folders
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
227 diff --git a/Source/Plugins.cpp b/Source/Plugins.cpp
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
228 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
229 --- a/Source/Plugins.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
230 +++ b/Source/Plugins.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
231 @@ -29,7 +29,7 @@
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
232 #include "dirreader.h"
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
233
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
234 #ifdef _WIN32
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
235 -# include <WinNT.h>
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
236 +# include <winnt.h>
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
237 #else
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
238 # include <sys/stat.h>
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
239 #endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
240 @@ -136,8 +136,8 @@ void Plugins::GetExports(const string &pathToDll, bool displayInfo)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
241 DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
242 PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
243 DWORD na = FIX_ENDIAN_INT32(exports->AddressOfNames);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
244 - unsigned long *names = (unsigned long*)((unsigned long) exports + (char *) na - ExportDirVA);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
245 - for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
246 + LPDWORD names = (LPDWORD)((ULONG_PTR)exports + na - ExportDirVA);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
247 + for (DWORD j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
248 {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
249 const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
250 const string signature = dllName + "::" + name;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
251 diff --git a/Source/ResourceEditor.cpp b/Source/ResourceEditor.cpp
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
252 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
253 --- a/Source/ResourceEditor.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
254 +++ b/Source/ResourceEditor.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
255 @@ -27,20 +27,10 @@ using namespace std;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
256 #define ALIGN(dwToAlign, dwAlignOn) dwToAlign = (dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
257 #define RALIGN(dwToAlign, dwAlignOn) ((dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
258
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
259 -#ifndef _WIN32
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
260 -static inline ULONG ConvertEndianness(ULONG u) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
261 - return FIX_ENDIAN_INT32(u);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
262 -}
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
263 -#endif
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
264 -
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
265 static inline DWORD ConvertEndianness(DWORD d) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
266 return FIX_ENDIAN_INT32(d);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
267 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
268
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
269 -static inline LONG ConvertEndianness(LONG l) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
270 - return FIX_ENDIAN_INT32(l);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
271 -}
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
272 -
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
273 static inline WORD ConvertEndianness(WORD w) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
274 return FIX_ENDIAN_INT16(w);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
275 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
276 @@ -52,7 +42,7 @@ PIMAGE_NT_HEADERS CResourceEditor::GetNTHeaders(BYTE* pbPE) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
277 throw runtime_error("PE file contains invalid DOS header");
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
278
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
279 // Get NT headers
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
280 - PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)(pbPE + ConvertEndianness(dosHeader->e_lfanew));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
281 + PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)(pbPE + ConvertEndianness((DWORD)dosHeader->e_lfanew));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
282 if (ntHeaders->Signature != IMAGE_NT_SIGNATURE)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
283 throw runtime_error("PE file missing NT signature");
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
284
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
285 @@ -684,7 +674,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
286 rdDir.NumberOfIdEntries = ConvertEndianness(rdDir.NumberOfIdEntries);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
287
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
288 CopyMemory(seeker, &rdDir, sizeof(IMAGE_RESOURCE_DIRECTORY));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
289 - crd->m_dwWrittenAt = DWORD(seeker);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
290 + crd->m_ulWrittenAt = (ULONG_PTR)(seeker);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
291 seeker += sizeof(IMAGE_RESOURCE_DIRECTORY);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
292
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
293 for (int i = 0; i < crd->CountEntries(); i++) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
294 @@ -705,7 +695,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
295 rDirE.UName.NameString.NameIsString = (crd->GetEntry(i)->HasName()) ? 1 : 0;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
296
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
297 CopyMemory(seeker, &rDirE, sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
298 - crd->GetEntry(i)->m_dwWrittenAt = DWORD(seeker);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
299 + crd->GetEntry(i)->m_ulWrittenAt = (ULONG_PTR)(seeker);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
300 seeker += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
301 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
302 qDirs.pop();
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
303 @@ -721,7 +711,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
304 rDataE.Size = ConvertEndianness(cRDataE->GetSize());
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
305
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
306 CopyMemory(seeker, &rDataE, sizeof(IMAGE_RESOURCE_DATA_ENTRY));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
307 - cRDataE->m_dwWrittenAt = DWORD(seeker);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
308 + cRDataE->m_ulWrittenAt = (ULONG_PTR)(seeker);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
309 seeker += sizeof(IMAGE_RESOURCE_DATA_ENTRY);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
310
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
311 qDataEntries.pop();
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
312 @@ -733,7 +723,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
313 while (!qStrings.empty()) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
314 CResourceDirectoryEntry* cRDirE = qStrings.front();
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
315
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
316 - PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->UName.NameString.NameOffset = ConvertEndianness(DWORD(seeker) - DWORD(pbRsrcSec));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
317 + PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_ulWrittenAt)->UName.NameString.NameOffset = ConvertEndianness((DWORD) (seeker - pbRsrcSec));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
318
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
319 WCHAR* szName = cRDirE->GetName();
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
320 WORD iLen = winchar_strlen(szName) + 1;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
321 @@ -754,7 +744,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
322 while (!qDataEntries2.empty()) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
323 CResourceDataEntry* cRDataE = qDataEntries2.front();
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
324 CopyMemory(seeker, cRDataE->GetData(), cRDataE->GetSize());
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
325 - PIMAGE_RESOURCE_DATA_ENTRY(cRDataE->m_dwWrittenAt)->OffsetToData = ConvertEndianness(seeker - pbRsrcSec + m_dwResourceSectionVA);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
326 + PIMAGE_RESOURCE_DATA_ENTRY(cRDataE->m_ulWrittenAt)->OffsetToData = ConvertEndianness((DWORD)(seeker - pbRsrcSec) + m_dwResourceSectionVA);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
327
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
328 seeker += RALIGN(cRDataE->GetSize(), 8);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
329
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
330 @@ -764,21 +754,21 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
331 /*
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
332 * Set all of the directory entries offsets.
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
333 */
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
334 - SetOffsets(m_cResDir, DWORD(pbRsrcSec));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
335 + SetOffsets(m_cResDir, (ULONG_PTR)(pbRsrcSec));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
336 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
337
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
338 // Sets the offsets in directory entries
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
339 -void CResourceEditor::SetOffsets(CResourceDirectory* resDir, DWORD newResDirAt) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
340 +void CResourceEditor::SetOffsets(CResourceDirectory* resDir, ULONG_PTR newResDirAt) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
341 for (int i = 0; i < resDir->CountEntries(); i++) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
342 - PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY rde = PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(resDir->GetEntry(i)->m_dwWrittenAt);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
343 + PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY rde = PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(resDir->GetEntry(i)->m_ulWrittenAt);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
344 if (resDir->GetEntry(i)->IsDataDirectory()) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
345 rde->UOffset.DirectoryOffset.DataIsDirectory = 1;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
346 - rde->UOffset.DirectoryOffset.OffsetToDirectory = resDir->GetEntry(i)->GetSubDirectory()->m_dwWrittenAt - newResDirAt;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
347 + rde->UOffset.DirectoryOffset.OffsetToDirectory = resDir->GetEntry(i)->GetSubDirectory()->m_ulWrittenAt - newResDirAt;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
348 rde->UOffset.OffsetToData = ConvertEndianness(rde->UOffset.OffsetToData);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
349 SetOffsets(resDir->GetEntry(i)->GetSubDirectory(), newResDirAt);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
350 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
351 else {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
352 - rde->UOffset.OffsetToData = ConvertEndianness(resDir->GetEntry(i)->GetDataEntry()->m_dwWrittenAt - newResDirAt);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
353 + rde->UOffset.OffsetToData = ConvertEndianness((DWORD)(resDir->GetEntry(i)->GetDataEntry()->m_ulWrittenAt - newResDirAt));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
354 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
355 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
356 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
357 @@ -887,7 +877,7 @@ int CResourceDirectory::CountEntries() {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
358 // Returns -1 if can not be found
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
359 int CResourceDirectory::Find(WCHAR* szName) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
360 if (IS_INTRESOURCE(szName))
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
361 - return Find((WORD) (DWORD) szName);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
362 + return Find((WORD) (ULONG_PTR) szName);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
363 else
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
364 if (szName[0] == '#')
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
365 return Find(WORD(winchar_stoi(szName + 1)));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
366 @@ -965,7 +955,7 @@ CResourceDirectoryEntry::CResourceDirectoryEntry(WCHAR* szName, CResourceDirecto
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
367 if (IS_INTRESOURCE(szName)) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
368 m_bHasName = false;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
369 m_szName = 0;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
370 - m_wId = (WORD) (DWORD) szName;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
371 + m_wId = (WORD) (ULONG_PTR) szName;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
372 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
373 else {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
374 m_bHasName = true;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
375 @@ -979,7 +969,7 @@ CResourceDirectoryEntry::CResourceDirectoryEntry(WCHAR* szName, CResourceDataEnt
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
376 if (IS_INTRESOURCE(szName)) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
377 m_bHasName = false;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
378 m_szName = 0;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
379 - m_wId = (WORD) (DWORD) szName;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
380 + m_wId = (WORD) (ULONG_PTR) szName;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
381 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
382 else {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
383 m_bHasName = true;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
384 diff --git a/Source/ResourceEditor.h b/Source/ResourceEditor.h
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
385 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
386 --- a/Source/ResourceEditor.h
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
387 +++ b/Source/ResourceEditor.h
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
388 @@ -27,7 +27,7 @@
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
389
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
390 #include "Platform.h"
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
391 #ifdef _WIN32
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
392 -# include <WinNT.h>
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
393 +# include <winnt.h>
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
394 #else
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
395 // all definitions for non Win32 platforms were taken from MinGW's free Win32 library
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
396 # define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
397 @@ -156,7 +156,7 @@ private:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
398 CResourceDirectory* ScanDirectory(PRESOURCE_DIRECTORY rdRoot, PRESOURCE_DIRECTORY rdToScan);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
399
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
400 void WriteRsrcSec(BYTE* pbRsrcSec);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
401 - void SetOffsets(CResourceDirectory* resDir, DWORD newResDirAt);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
402 + void SetOffsets(CResourceDirectory* resDir, ULONG_PTR newResDirAt);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
403
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
404 DWORD AdjustVA(DWORD dwVirtualAddress, DWORD dwAdjustment);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
405 DWORD AlignVA(DWORD dwVirtualAddress);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
406 @@ -180,7 +180,7 @@ public:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
407
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
408 void Destroy();
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
409
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
410 - DWORD m_dwWrittenAt;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
411 + ULONG_PTR m_ulWrittenAt;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
412
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
413 private:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
414 IMAGE_RESOURCE_DIRECTORY m_rdDir;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
415 @@ -204,7 +204,7 @@ public:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
416
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
417 CResourceDataEntry* GetDataEntry();
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
418
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
419 - DWORD m_dwWrittenAt;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
420 + ULONG_PTR m_ulWrittenAt;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
421
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
422 private:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
423 bool m_bHasName;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
424 @@ -232,7 +232,7 @@ public:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
425 DWORD GetCodePage();
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
426 DWORD GetOffset();
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
427
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
428 - DWORD m_dwWrittenAt;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
429 + ULONG_PTR m_ulWrittenAt;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
430
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
431 private:
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
432 BYTE* m_pbData;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
433 diff --git a/Source/ResourceVersionInfo.cpp b/Source/ResourceVersionInfo.cpp
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
434 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
435 --- a/Source/ResourceVersionInfo.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
436 +++ b/Source/ResourceVersionInfo.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
437 @@ -146,7 +146,7 @@ int GetVersionHeader (LPSTR &p, WORD &wLength, WORD &wValueLength, WORD &wType)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
438 p += sizeof(WORD);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
439 szKey = (WCHAR*)p;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
440 p += (winchar_strlen(szKey) + 1) * sizeof (WCHAR);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
441 - while ( ((long)p % 4) != 0 )
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
442 + while ( ((ULONG_PTR)p % 4) != 0 )
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
443 p++;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
444 return p - baseP;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
445 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
446 diff --git a/Source/fileform.cpp b/Source/fileform.cpp
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
447 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
448 --- a/Source/fileform.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
449 +++ b/Source/fileform.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
450 @@ -149,7 +149,7 @@ void ctlcolors_writer::write(const ctlcolors *data)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
451 m_sink->write_int(data->text);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
452 m_sink->write_int(data->bkc);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
453 m_sink->write_int(data->lbStyle);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
454 - m_sink->write_int((int) data->bkb);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
455 + m_sink->write_int((INT_PTR) data->bkb);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
456 m_sink->write_int(data->bkmode);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
457 m_sink->write_int(data->flags);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
458 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
459 diff --git a/Source/mmap.cpp b/Source/mmap.cpp
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
460 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
461 --- a/Source/mmap.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
462 +++ b/Source/mmap.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
463 @@ -322,7 +322,7 @@ void MMapFile::release(void *pView, int size)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
464 if (!pView)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
465 return;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
466
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
467 - unsigned int alignment = ((unsigned int)pView) % m_iAllocationGranularity;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
468 + unsigned int alignment = ((ULONG_PTR)pView) % m_iAllocationGranularity;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
469 pView = (char *)pView - alignment;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
470 size += alignment;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
471 #ifdef _WIN32
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
472 diff --git a/Source/script.cpp b/Source/script.cpp
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
473 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
474 --- a/Source/script.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
475 +++ b/Source/script.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
476 @@ -2129,7 +2129,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
477 int k=line.gettoken_enum(1,rootkeys[0]);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
478 if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
479 if (k == -1) PRINTHELP()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
480 - build_header.install_reg_rootkey=(int)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
481 + build_header.install_reg_rootkey=(INT_PTR)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
482 if (!build_header.install_reg_rootkey) PRINTHELP() // SHCTX is invalid here
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
483 build_header.install_reg_key_ptr = add_string(line.gettoken_str(2),0);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
484 if (line.gettoken_str(2)[0] == '\\')
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
485 @@ -5184,7 +5184,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
486 int k=line.gettoken_enum(2,rootkeys[0]);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
487 if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
488 if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
489 - ent.offsets[1]=(int)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
490 + ent.offsets[1]=(INT_PTR)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
491 ent.offsets[2]=add_string(line.gettoken_str(3));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
492 ent.offsets[3]=add_string(line.gettoken_str(4));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
493 if (which_token == TOK_READREGDWORD) ent.offsets[4]=1;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
494 @@ -5216,7 +5216,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
495 if (k == -1) k=line.gettoken_enum(a,rootkeys[1]);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
496 if (k == -1) PRINTHELP()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
497 ent.which=EW_DELREG;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
498 - ent.offsets[1]=(int)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
499 + ent.offsets[1]=(INT_PTR)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
500 ent.offsets[2]=add_string(line.gettoken_str(a+1));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
501 ent.offsets[3]=(which_token==TOK_DELETEREGKEY)?0:add_string(line.gettoken_str(a+2));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
502 if (line.gettoken_str(a+1)[0] == '\\')
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
503 @@ -5236,7 +5236,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
504 if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
505 if (k == -1) PRINTHELP()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
506 ent.which=EW_WRITEREG;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
507 - ent.offsets[0]=(int)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
508 + ent.offsets[0]=(INT_PTR)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
509 ent.offsets[1]=add_string(line.gettoken_str(2));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
510 if (line.gettoken_str(2)[0] == '\\')
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
511 warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
512 @@ -5305,7 +5305,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
513 int k=line.gettoken_enum(2,rootkeys[0]);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
514 if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
515 if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
516 - ent.offsets[1]=(int)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
517 + ent.offsets[1]=(INT_PTR)rootkey_tab[k];
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
518 ent.offsets[2]=add_string(line.gettoken_str(3));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
519 ent.offsets[3]=add_string(line.gettoken_str(4));
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
520 ent.offsets[4]=which_token == TOK_ENUMREGKEY;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
521 diff --git a/Source/util.cpp b/Source/util.cpp
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
522 index 1111111..2222222 100755
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
523 --- a/Source/util.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
524 +++ b/Source/util.cpp
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
525 @@ -77,9 +77,9 @@ int update_bitmap(CResourceEditor* re, WORD id, const char* filename, int width/
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
526 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
527
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
528 if (width != 0) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
529 - LONG biWidth;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
530 + INT32 biWidth;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
531 fseek(f, 18, SEEK_SET); // Seek to the width member of the header
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
532 - fread(&biWidth, sizeof(LONG), 1, f);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
533 + fread(&biWidth, sizeof(INT32), 1, f);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
534 FIX_ENDIAN_INT32_INPLACE(biWidth);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
535 if (width != biWidth) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
536 fclose(f);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
537 @@ -88,9 +88,9 @@ int update_bitmap(CResourceEditor* re, WORD id, const char* filename, int width/
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
538 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
539
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
540 if (height != 0) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
541 - LONG biHeight;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
542 + INT32 biHeight;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
543 fseek(f, 22, SEEK_SET); // Seek to the height member of the header
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
544 - fread(&biHeight, sizeof(LONG), 1, f);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
545 + fread(&biHeight, sizeof(INT32), 1, f);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
546 FIX_ENDIAN_INT32_INPLACE(biHeight);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
547 // Bitmap height can be negative too...
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
548 if (height != abs(biHeight)) {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
549 @@ -689,8 +689,8 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData )
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
550 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
551
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
552 // Find the beginning of the NT header at offset e_lfanew.
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
553 - pNtExeHdr = (PIMAGE_NT_HEADERS) ( (DWORD) pView
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
554 - + (DWORD) pDosExeHdr->e_lfanew );
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
555 + pNtExeHdr = (PIMAGE_NT_HEADERS) ( (ULONG_PTR) pView
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
556 + + pDosExeHdr->e_lfanew );
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
557
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
558 // Check to make sure the file is a VxD.
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
559 if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE )
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
560 @@ -728,8 +728,8 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData )
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
561 }
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
562
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
563 // e32_winresoff contains the offset of the resource in the VxD.
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
564 - pVerRes = (VXD_VERSION_RESOURCE *) ( (DWORD) pView
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
565 - + (DWORD) pLEHdr->e32_winresoff );
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
566 + pVerRes = (VXD_VERSION_RESOURCE *) ( (ULONG_PTR) pView
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
567 + + pLEHdr->e32_winresoff );
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
568 dwSize = pVerRes->dwResSize;
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
569 pRawRes = &(pVerRes->bVerData);
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
570
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
571 @@ -780,7 +780,7 @@ static DWORD GetVxdVersionInfoSize( LPCSTR szFile )
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
572
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
573 // GetVxdVersion() will fail with ERROR_INSUFFICIENT_BUFFER and
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
574 // the required buffer size will be returned in dwResult.
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
575 - if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER )
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
576 + if ( dwError == ERROR_INSUFFICIENT_BUFFER )
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
577 {
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
578 SetLastError( 0 );
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
579 return dwResult;
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
580
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
581 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
582 From: Tony Theodore <tonyt@logyst.com>
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
583 Date: Thu, 9 May 2013 13:08:59 +1000
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
584 Subject: [PATCH] i686-w64-mingw32 fixes
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
585
2994
a1d474da2036 Update nsis to mxe devel branch 22-May 2013.
John Donoghue <john.donoghue@ieee.org>
parents: 2687
diff changeset
586
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
587 diff --git a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
588 index 1111111..2222222 100755
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
589 --- a/Contrib/InstallOptions/InstallerOptions.cpp
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
590 +++ b/Contrib/InstallOptions/InstallerOptions.cpp
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
591 @@ -13,6 +13,7 @@
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
592 #include <cderr.h>
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
593 #include "resource.h"
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
594 #include "shellapi.h"
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
595 +#include <algorithm>
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
596
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
597 #include <nsis/pluginapi.h> // nsis plugin
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
598
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
599 @@ -759,7 +760,7 @@ BOOL CALLBACK cfgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
600 DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT);
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
601
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
602 // Make some more room so the focus rect won't cut letters off
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
603 - rc.right = min(rc.right + 2, lpdis->rcItem.right);
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
604 + rc.right = std::min(rc.right + 2, lpdis->rcItem.right);
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
605
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
606 // Move rect to right if in RTL mode
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
607 if (bRTL)
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
608 diff --git a/Contrib/Makensisw/afxres.h b/Contrib/Makensisw/afxres.h
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
609 index 1111111..2222222 100755
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
610 --- a/Contrib/Makensisw/afxres.h
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
611 +++ b/Contrib/Makensisw/afxres.h
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
612 @@ -1,4 +1,4 @@
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
613 -#define _WIN32_IE 0x0400
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
614 +#define _WIN32_IE 0x0501
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
615 #include <windows.h>
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
616
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
617 #ifndef IDC_STATIC
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
618 diff --git a/Contrib/Makensisw/makensisw.h b/Contrib/Makensisw/makensisw.h
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
619 index 1111111..2222222 100755
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
620 --- a/Contrib/Makensisw/makensisw.h
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
621 +++ b/Contrib/Makensisw/makensisw.h
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
622 @@ -22,7 +22,7 @@
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
623 #ifndef MAKENSIS_H
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
624 #define MAKENSIS_H
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
625
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
626 -#define _WIN32_IE 0x0400
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
627 +#define _WIN32_IE 0x0501
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
628 #include <windows.h>
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
629 #include <commctrl.h>
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
630 #include "utils.h"
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
631 diff --git a/Source/SConscript b/Source/SConscript
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
632 index 1111111..2222222 100755
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
633 --- a/Source/SConscript
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
634 +++ b/Source/SConscript
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
635 @@ -71,7 +71,7 @@ AddAvailableLibs(env, libs)
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
636
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
637 ##### Defines
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
638
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
639 -env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
640 +env.Append(CPPDEFINES = ['_WIN32_IE=0x0501'])
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
641
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
642 ##### Set PCH
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
643
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
644 diff --git a/Source/exehead/SConscript b/Source/exehead/SConscript
4118
a14a5640d12b nsis: update to 2.50
John Donoghue
parents: 3774
diff changeset
645 index 1111111..2222222 100755
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
646 --- a/Source/exehead/SConscript
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
647 +++ b/Source/exehead/SConscript
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
648 @@ -53,7 +53,7 @@ Import('env compression solid_compression')
3526
60cd6f076a3d allow nsis to compile with 32-bit mingw-w64
John W. Eaton <jwe@octave.org>
parents: 2994
diff changeset
649
3774
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
650 env.Append(CPPDEFINES = ['EXEHEAD'])
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
651 env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN'])
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
652 -env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
653 +env.Append(CPPDEFINES = ['_WIN32_IE=0x0501'])
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
654
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
655 ### Some other settings
d76aee4b2c2b nsis: update patch from mxe
John Donoghue
parents: 3526
diff changeset
656