nsis, nsis-svn: Update.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Maintainer: Renato Silva <br.renatosilva@gmail.com>
|
||||
|
||||
_realname='nsis-nsisunz'
|
||||
pkgbase="mingw-w64-${_realname}"
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.0
|
||||
pkgrel=1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
diff -aurN 000/SConstruct 001/SConstruct
|
||||
--- 000/SConstruct 2015-07-30 17:41:05.466688600 -0300
|
||||
+++ 001/SConstruct 2015-07-30 17:42:01.576176500 -0300
|
||||
--- 000/SConstruct 2016-01-05 22:43:57.720268200 -0200
|
||||
+++ 001/SConstruct 2016-01-05 22:43:57.751520300 -0200
|
||||
@@ -123,10 +123,10 @@
|
||||
'relocatable': {
|
||||
'dest': '',
|
||||
@@ -35,8 +35,8 @@ diff -aurN 000/SConstruct 001/SConstruct
|
||||
def DistributeStubs(files, names=[], path='', alias=None):
|
||||
return defenv.Distribute(files, names, 'data', 'Stubs', path, alias, 'stubs')
|
||||
diff -aurN 000/Source/build.cpp 001/Source/build.cpp
|
||||
--- 000/Source/build.cpp 2015-07-30 17:41:43.326141400 -0300
|
||||
+++ 001/Source/build.cpp 2015-07-30 17:42:01.591803600 -0300
|
||||
--- 000/Source/build.cpp 2016-01-05 20:25:09.797546300 -0200
|
||||
+++ 001/Source/build.cpp 2016-01-05 20:27:03.794162700 -0200
|
||||
@@ -394,7 +394,9 @@
|
||||
if (dir) nsis_dir = dir;
|
||||
else {
|
||||
@@ -49,9 +49,9 @@ diff -aurN 000/Source/build.cpp 001/Source/build.cpp
|
||||
nsis_dir = PosixBug_CtoTString(PREFIX_DATA);
|
||||
#endif
|
||||
diff -aurN 000/Source/makenssi.cpp 001/Source/makenssi.cpp
|
||||
--- 000/Source/makenssi.cpp 2015-07-30 17:41:43.482395400 -0300
|
||||
+++ 001/Source/makenssi.cpp 2015-07-30 17:42:01.607427200 -0300
|
||||
@@ -556,7 +556,8 @@
|
||||
--- 000/Source/makenssi.cpp 2016-01-05 20:25:09.938172300 -0200
|
||||
+++ 001/Source/makenssi.cpp 2016-01-05 20:27:03.803162300 -0200
|
||||
@@ -559,7 +559,8 @@
|
||||
TCHAR* env_var = _tgetenv(_T("NSISCONFDIR"));
|
||||
if(env_var == NULL)
|
||||
#ifndef NSIS_CONFIG_CONST_DATA_PATH
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
diff -aurN 001/SCons/Config/gnu 002/SCons/Config/gnu
|
||||
--- 001/SCons/Config/gnu 2015-07-30 17:41:53.263659500 -0300
|
||||
+++ 002/SCons/Config/gnu 2015-07-30 17:43:26.060723100 -0300
|
||||
@@ -11,6 +11,8 @@
|
||||
--- 001/SCons/Config/gnu 2016-01-05 22:44:50.845375300 -0200
|
||||
+++ 002/SCons/Config/gnu 2016-01-05 22:44:50.861001300 -0200
|
||||
@@ -21,6 +21,8 @@
|
||||
def cross_env(env):
|
||||
if env['PLATFORM'] != 'win32':
|
||||
env.Tool('crossmingw', toolpath = [Dir('../Tools').rdir()])
|
||||
@@ -10,7 +10,7 @@ diff -aurN 001/SCons/Config/gnu 002/SCons/Config/gnu
|
||||
|
||||
### flags
|
||||
|
||||
@@ -33,6 +35,8 @@
|
||||
@@ -44,6 +46,8 @@
|
||||
defenv['SUBSYS_WIN'] = '-Wl,--subsystem,windows'
|
||||
defenv['MSVCRT_FLAG'] = ''
|
||||
defenv['STDCALL'] = '"__attribute__((__stdcall__))"'
|
||||
@@ -20,8 +20,8 @@ diff -aurN 001/SCons/Config/gnu 002/SCons/Config/gnu
|
||||
# Don't allow mingw to link with LIBGCC*.DLL and LIBSTDC++-*.DLL
|
||||
if defenv['PLATFORM'] == 'win32':
|
||||
diff -aurN 001/SCons/utils.py 002/SCons/utils.py
|
||||
--- 001/SCons/utils.py 2015-07-30 17:41:53.279286200 -0300
|
||||
+++ 002/SCons/utils.py 2015-07-30 17:43:26.060723100 -0300
|
||||
--- 001/SCons/utils.py 2016-01-05 22:44:12.595300800 -0200
|
||||
+++ 002/SCons/utils.py 2016-01-05 22:44:12.673423300 -0200
|
||||
@@ -16,19 +16,6 @@
|
||||
appropriate compiler and linker options to the environment
|
||||
"""
|
||||
@@ -43,8 +43,8 @@ diff -aurN 001/SCons/utils.py 002/SCons/utils.py
|
||||
# Avoid unnecessary configuring when cleaning targets
|
||||
# and a clash when scons is run in parallel operation.
|
||||
diff -aurN 001/SConstruct 002/SConstruct
|
||||
--- 001/SConstruct 2015-07-30 17:42:01.576176500 -0300
|
||||
+++ 002/SConstruct 2015-07-30 17:43:26.076348500 -0300
|
||||
--- 001/SConstruct 2016-01-05 22:43:57.751520300 -0200
|
||||
+++ 002/SConstruct 2016-01-05 22:43:57.782770900 -0200
|
||||
@@ -252,7 +252,7 @@
|
||||
# write version into version.h
|
||||
f = open(defenv.File('#$BUILD_CONFIG/nsis-version.h').abspath, 'w')
|
||||
@@ -54,22 +54,10 @@ diff -aurN 001/SConstruct 002/SConstruct
|
||||
|
||||
if (not defenv.has_key('VER_PACKED')) and defenv.has_key('VER_MAJOR') and defenv.has_key('VER_MINOR'):
|
||||
packed_r = packed_b = 0
|
||||
diff -aurN 001/Source/Platform.h 002/Source/Platform.h
|
||||
--- 001/Source/Platform.h 2015-07-30 17:41:53.294909500 -0300
|
||||
+++ 002/Source/Platform.h 2015-07-30 17:43:26.091971400 -0300
|
||||
@@ -139,7 +139,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#ifdef _countof
|
||||
+#if !defined(__MINGW32__) && defined(_countof)
|
||||
#define COUNTOF _countof
|
||||
#else
|
||||
#define COUNTOF(a) (sizeof(a)/sizeof(a[0]))
|
||||
diff -aurN 001/Source/script.cpp 002/Source/script.cpp
|
||||
--- 001/Source/script.cpp 2015-07-30 17:41:53.779286400 -0300
|
||||
+++ 002/Source/script.cpp 2015-07-30 17:43:26.091971400 -0300
|
||||
@@ -3145,7 +3145,8 @@
|
||||
--- 001/Source/script.cpp 2016-01-05 20:25:50.828879800 -0200
|
||||
+++ 002/Source/script.cpp 2016-01-05 20:52:42.575814900 -0200
|
||||
@@ -3182,7 +3182,8 @@
|
||||
{
|
||||
TCHAR* cmdstr=line.gettoken_str(1);
|
||||
struct postbuild_cmd *newcmd, *prevcmd;
|
||||
@@ -80,13 +68,13 @@ diff -aurN 001/Source/script.cpp 002/Source/script.cpp
|
||||
_tcscpy(newcmd->cmd,cmdstr);
|
||||
for (prevcmd=postbuild_cmds; prevcmd && prevcmd->next;) prevcmd = prevcmd->next;
|
||||
diff -aurN 001/Source/util.cpp 002/Source/util.cpp
|
||||
--- 001/Source/util.cpp 2015-07-30 17:41:53.576160400 -0300
|
||||
+++ 002/Source/util.cpp 2015-07-30 17:43:26.107598100 -0300
|
||||
@@ -959,7 +959,10 @@
|
||||
--- 001/Source/util.cpp 2016-01-05 20:25:50.469504200 -0200
|
||||
+++ 002/Source/util.cpp 2016-01-05 20:52:42.575814900 -0200
|
||||
@@ -967,7 +967,10 @@
|
||||
{
|
||||
STARTUPINFO si = { sizeof(STARTUPINFO), };
|
||||
PROCESS_INFORMATION pi;
|
||||
- if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
|
||||
- if (!CreateProcess(NULL, const_cast<LPSTR>(cmd), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
|
||||
+ LPSTR modifiable_cmd = strdup(cmd);
|
||||
+ BOOL result = CreateProcess(NULL, modifiable_cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
||||
+ free(modifiable_cmd);
|
||||
|
||||
@@ -1,203 +0,0 @@
|
||||
diff -aurN 002/Contrib/InstallOptions/InstallerOptions.cpp 003/Contrib/InstallOptions/InstallerOptions.cpp
|
||||
--- 002/Contrib/InstallOptions/InstallerOptions.cpp 2015-07-30 17:43:11.591945200 -0300
|
||||
+++ 003/Contrib/InstallOptions/InstallerOptions.cpp 2015-07-30 17:44:30.451475300 -0300
|
||||
@@ -788,7 +788,7 @@
|
||||
{
|
||||
// Get TxtColor unless the user has set another using SetCtlColors
|
||||
if (!GetWindowLongPtr(lpdis->hwndItem, GWLP_USERDATA))
|
||||
- SetTextColor(lpdis->hDC, (COLORREF) pField->hImage);
|
||||
+ SetTextColor(lpdis->hDC, (uintptr_t) pField->hImage);
|
||||
|
||||
// Draw the text
|
||||
DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_CENTER | DT_VCENTER | DT_WORDBREAK | (bRTL ? DT_RTLREADING : 0));
|
||||
diff -aurN 002/Contrib/Makensisw/utils.cpp 003/Contrib/Makensisw/utils.cpp
|
||||
--- 002/Contrib/Makensisw/utils.cpp 2015-07-30 17:43:11.763818500 -0300
|
||||
+++ 003/Contrib/Makensisw/utils.cpp 2015-07-30 17:44:30.467101000 -0300
|
||||
@@ -683,7 +683,7 @@
|
||||
path=_tcsrchr(pathf,_T('\\'));
|
||||
if(path!=NULL) *path=0;
|
||||
lstrcat(pathf,LOCALDOCS);
|
||||
- if ((int)ShellExecute(g_sdata.hwnd,_T("open"),pathf,NULL,NULL,SW_SHOWNORMAL)<=32)
|
||||
+ if ((uintptr_t)ShellExecute(g_sdata.hwnd,_T("open"),pathf,NULL,NULL,SW_SHOWNORMAL)<=32)
|
||||
ShellExecuteA(g_sdata.hwnd,"open",DOCPATH,NULL,NULL,SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
diff -aurN 002/Contrib/Math/Source/Math.c 003/Contrib/Math/Source/Math.c
|
||||
--- 002/Contrib/Math/Source/Math.c 2015-07-30 17:43:11.545067800 -0300
|
||||
+++ 003/Contrib/Math/Source/Math.c 2015-07-30 17:44:30.467101000 -0300
|
||||
@@ -28,8 +28,8 @@
|
||||
PlaceVariable(vb, pi);
|
||||
if (pi->item == NULL) return;
|
||||
|
||||
- while ((pi->OpsStack) && ((((int) pi->OpsStack->param2) < precedence)
|
||||
- || ((((int)pi->OpsStack->param2) == precedence)
|
||||
+ while ((pi->OpsStack) && ((((uintptr_t) pi->OpsStack->param2) < precedence)
|
||||
+ || ((((uintptr_t)pi->OpsStack->param2) == precedence)
|
||||
&& (precedence != OPERATOR_SET_PRECEDENCE))))
|
||||
{
|
||||
// second operand for our operator
|
||||
@@ -857,7 +857,7 @@
|
||||
break;
|
||||
case ITV_ARRITEM:
|
||||
{
|
||||
- ExpressionItem *&ei = ((ArrayDesc*)(var->param1))->array[(int)var->param2];
|
||||
+ ExpressionItem *&ei = ((ArrayDesc*)(var->param1))->array[(uintptr_t)var->param2];
|
||||
CleanupItems(ei);
|
||||
ei = CopyItem(result);
|
||||
}
|
||||
@@ -930,7 +930,7 @@
|
||||
case ITV_ARRITEM:
|
||||
{
|
||||
// array item
|
||||
- ExpressionItem *ei = ((ArrayDesc*)(item->param1))->array[(int)item->param2];
|
||||
+ ExpressionItem *ei = ((ArrayDesc*)(item->param1))->array[(uintptr_t)item->param2];
|
||||
if (ei)
|
||||
result = CopyItem(ei);
|
||||
else
|
||||
@@ -1176,7 +1176,7 @@
|
||||
}
|
||||
while (true)
|
||||
{
|
||||
- RunAndGetConst((int) ifbr, result, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t) ifbr, result, ITC_INT);
|
||||
if (ifmode)
|
||||
{
|
||||
// we need then or else branch?
|
||||
@@ -1260,20 +1260,20 @@
|
||||
CleanupItems(si); CleanupItems(var);
|
||||
} else if (subtype == ITF_TYPE)
|
||||
{
|
||||
- int newtype = (int) MathFunctions[ioptions].fptr;
|
||||
+ uintptr_t newtype = (uintptr_t) MathFunctions[ioptions].fptr;
|
||||
if (newtype < ITC_UNKNOWN)
|
||||
{
|
||||
// get as possibly close to ready expression
|
||||
- RunAndGetConst((int)item->param1, result, newtype);
|
||||
+ RunAndGetConst((uintptr_t)item->param1, result, newtype);
|
||||
if (ioptions == ITFT_CARRAY_ID)
|
||||
CopyArray(result);
|
||||
} else if (newtype == FTT_FLOATF)
|
||||
{
|
||||
// float format function
|
||||
ExpressionItem *arg1, *arg2;
|
||||
- RunAndGetConst((int)item->param1, arg1, ITC_FLOAT);
|
||||
+ RunAndGetConst((uintptr_t)item->param1, arg1, ITC_FLOAT);
|
||||
double value = *((double*)&(arg1->param1));
|
||||
- RunAndGetConst((int)item->param2, arg2, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)item->param2, arg2, ITC_INT);
|
||||
int format = (int) *((__int64*)&(arg2->param1));
|
||||
|
||||
result = AllocItem();
|
||||
@@ -1331,7 +1331,7 @@
|
||||
} else
|
||||
{
|
||||
// oops :-o function call :)
|
||||
- RunAndGetConst((int)item->param1, result, ITC_FLOAT);
|
||||
+ RunAndGetConst((uintptr_t)item->param1, result, ITC_FLOAT);
|
||||
double &value = *((double*)&(result->param1));
|
||||
if (subtype == ITF_MATH1)
|
||||
{
|
||||
@@ -1365,7 +1365,7 @@
|
||||
{
|
||||
// normal 2-arg math function
|
||||
ExpressionItem *arg2;
|
||||
- RunAndGetConst((int)item->param2, arg2, ITC_FLOAT);
|
||||
+ RunAndGetConst((uintptr_t)item->param2, arg2, ITC_FLOAT);
|
||||
double value2 = *((double*)&(arg2->param1));
|
||||
value = ((Math2FuncPtr)(MathFunctions[ioptions].fptr))(value, value2);
|
||||
CleanupItems(arg2);
|
||||
@@ -1388,7 +1388,7 @@
|
||||
if ((*((ExpressionItem **) &(item->param2)))->type != IT_EXPRESSION)
|
||||
{
|
||||
// one index - user need a char
|
||||
- RunAndGetConst((int)item->param2, index, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)item->param2, index, ITC_INT);
|
||||
|
||||
int pos = (int) *((__int64*)&(index->param1));
|
||||
if (pos < 0) pos += len; // -index - means from end
|
||||
@@ -1408,7 +1408,7 @@
|
||||
if ((*((ExpressionItem **) &(item->param2)))->param1 == 0)
|
||||
index = AllocItem();
|
||||
else
|
||||
- RunAndGetConst((int)(*((ExpressionItem **) &(item->param2)))->param1, index, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)(*((ExpressionItem **) &(item->param2)))->param1, index, ITC_INT);
|
||||
if ((*((ExpressionItem **) &(item->param2)))->next->param1 == 0)
|
||||
{
|
||||
// if second index is skipped -> -1 (till last char)
|
||||
@@ -1416,7 +1416,7 @@
|
||||
*((__int64*)&(index2->param1)) = -1;
|
||||
}
|
||||
else
|
||||
- RunAndGetConst((int)(*((ExpressionItem **) &(item->param2)))->next->param1, index2, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)(*((ExpressionItem **) &(item->param2)))->next->param1, index2, ITC_INT);
|
||||
|
||||
// ok, we've got two indexes
|
||||
int pos1 = (int) *((__int64*)&(index->param1));
|
||||
@@ -1445,16 +1445,16 @@
|
||||
} else
|
||||
{
|
||||
// argument is array
|
||||
- RunAndGetConst((int)item->param2, index, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)item->param2, index, ITC_INT);
|
||||
|
||||
// convert array pointer to array item pointer
|
||||
aritem->type = IT_VARIABLE | ITV_ARRITEM;
|
||||
aritem->param2 = (EIPARAM) *((__int64*)&(index->param1));
|
||||
|
||||
ArrayDesc *ad = (ArrayDesc*)aritem->param1;
|
||||
- if (((int)aritem->param2) >= ad->count)
|
||||
+ if (((uintptr_t)aritem->param2) >= ad->count)
|
||||
{
|
||||
- ad->count = ((int)aritem->param2)+1;
|
||||
+ ad->count = ((uintptr_t)aritem->param2)+1;
|
||||
while (ad->count > ad->size)
|
||||
{
|
||||
// resize array
|
||||
diff -aurN 002/Source/script.cpp 003/Source/script.cpp
|
||||
--- 002/Source/script.cpp 2015-07-30 17:43:26.091971400 -0300
|
||||
+++ 003/Source/script.cpp 2015-07-30 17:44:30.482726600 -0300
|
||||
@@ -2293,7 +2293,7 @@
|
||||
int k=line.gettoken_enum(1,rootkeys[0]);
|
||||
if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
|
||||
if (k == -1) PRINTHELP()
|
||||
- build_header.install_reg_rootkey=(INT)rootkey_tab[k];
|
||||
+ build_header.install_reg_rootkey=(INT_PTR)rootkey_tab[k];
|
||||
if (!build_header.install_reg_rootkey) PRINTHELP() // SHCTX is invalid here
|
||||
build_header.install_reg_key_ptr = add_string(line.gettoken_str(2),0);
|
||||
if (line.gettoken_str(2)[0] == _T('\\'))
|
||||
@@ -5340,7 +5340,7 @@
|
||||
int k=line.gettoken_enum(2,rootkeys[0]);
|
||||
if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
|
||||
if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
|
||||
- ent.offsets[1]=(INT)rootkey_tab[k];
|
||||
+ ent.offsets[1]=(INT_PTR)rootkey_tab[k];
|
||||
ent.offsets[2]=add_string(line.gettoken_str(3));
|
||||
ent.offsets[3]=add_string(line.gettoken_str(4));
|
||||
if (which_token == TOK_READREGDWORD) ent.offsets[4]=1;
|
||||
@@ -5372,7 +5372,7 @@
|
||||
if (k == -1) k=line.gettoken_enum(a,rootkeys[1]);
|
||||
if (k == -1) PRINTHELP()
|
||||
ent.which=EW_DELREG;
|
||||
- ent.offsets[1]=(INT)rootkey_tab[k];
|
||||
+ ent.offsets[1]=(INT_PTR)rootkey_tab[k];
|
||||
ent.offsets[2]=add_string(line.gettoken_str(a+1));
|
||||
ent.offsets[3]=(which_token==TOK_DELETEREGKEY)?0:add_string(line.gettoken_str(a+2));
|
||||
if (line.gettoken_str(a+1)[0] == _T('\\'))
|
||||
@@ -5392,7 +5392,7 @@
|
||||
if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
|
||||
if (k == -1) PRINTHELP()
|
||||
ent.which=EW_WRITEREG;
|
||||
- ent.offsets[0]=(INT)rootkey_tab[k];
|
||||
+ ent.offsets[0]=(INT_PTR)rootkey_tab[k];
|
||||
ent.offsets[1]=add_string(line.gettoken_str(2));
|
||||
if (line.gettoken_str(2)[0] == _T('\\'))
|
||||
warning_fl(_T("%") NPRIs _T(": registry path name begins with \'\\\', may cause problems"),line.gettoken_str(0));
|
||||
@@ -5459,7 +5459,7 @@
|
||||
int k=line.gettoken_enum(2,rootkeys[0]);
|
||||
if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
|
||||
if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
|
||||
- ent.offsets[1]=(INT)rootkey_tab[k];
|
||||
+ ent.offsets[1]=(INT_PTR)rootkey_tab[k];
|
||||
ent.offsets[2]=add_string(line.gettoken_str(3));
|
||||
ent.offsets[3]=add_string(line.gettoken_str(4));
|
||||
ent.offsets[4]=which_token == TOK_ENUMREGKEY;
|
||||
@@ -1,7 +1,7 @@
|
||||
diff -aurN 003/SConstruct 004/SConstruct
|
||||
--- 003/SConstruct 2015-07-30 17:44:13.810819400 -0300
|
||||
+++ 004/SConstruct 2015-07-30 17:52:11.671153600 -0300
|
||||
@@ -517,10 +517,8 @@
|
||||
diff -aurN 002/SConstruct 004/SConstruct
|
||||
--- 002/SConstruct 2016-01-05 22:43:57.782770900 -0200
|
||||
+++ 004/SConstruct 2016-01-05 22:43:57.798392900 -0200
|
||||
@@ -518,10 +518,8 @@
|
||||
def GetArcSuffix(env, unicode = None):
|
||||
if unicode is None:
|
||||
unicode = 'UNICODE' in env['CPPDEFINES']
|
||||
@@ -14,10 +14,10 @@ diff -aurN 003/SConstruct 004/SConstruct
|
||||
|
||||
######################################################################
|
||||
####### Distribution ###
|
||||
diff -aurN 003/Source/build.cpp 004/Source/build.cpp
|
||||
--- 003/Source/build.cpp 2015-07-30 17:44:13.467068100 -0300
|
||||
+++ 004/Source/build.cpp 2015-07-30 17:52:11.671153600 -0300
|
||||
@@ -3538,7 +3538,7 @@
|
||||
diff -aurN 002/Source/build.cpp 004/Source/build.cpp
|
||||
--- 002/Source/build.cpp 2016-01-05 20:30:55.101586600 -0200
|
||||
+++ 004/Source/build.cpp 2016-01-05 22:33:38.994344500 -0200
|
||||
@@ -3541,7 +3541,7 @@
|
||||
|
||||
tstring searchPath = definedlist.find(_T("NSISDIR"));
|
||||
searchPath += PLATFORM_PATH_SEPARATOR_STR _T("Plugins") PLATFORM_PATH_SEPARATOR_STR;
|
||||
@@ -25,8 +25,8 @@ diff -aurN 003/Source/build.cpp 004/Source/build.cpp
|
||||
+ searchPath += get_target_suffix(false);
|
||||
|
||||
SCRIPT_MSG(_T("Processing default plugins: \"%") NPRIs PLATFORM_PATH_SEPARATOR_STR _T("*.dll\"\n"), searchPath.c_str());
|
||||
if (!m_pPlugins->Initialize(searchPath.c_str(), !!display_script))
|
||||
@@ -3825,22 +3825,33 @@
|
||||
if (!m_pPlugins->Initialize(searchPath.c_str(), is_target_64bit(), !!display_script))
|
||||
@@ -3820,21 +3820,32 @@
|
||||
|
||||
CEXEBuild::TARGETTYPE CEXEBuild::get_target_type(const TCHAR*s) const
|
||||
{
|
||||
@@ -55,17 +55,32 @@ diff -aurN 003/Source/build.cpp 004/Source/build.cpp
|
||||
{
|
||||
switch(tt)
|
||||
{
|
||||
- case TARGET_X86ANSI :return _T("x86-ansi");
|
||||
- case TARGET_X86UNICODE:return _T("x86-unicode");
|
||||
+ case TARGET_X86ANSI :return include_arch? _T("x86-ansi") : _T("ansi");
|
||||
+ case TARGET_X86UNICODE:return include_arch? _T("x86-unicode") : _T("unicode");
|
||||
#if !defined(_WIN32) || defined(_WIN64) // BUGBUG: Need a better define for this
|
||||
- case TARGET_AMD64 :return _T("amd64-unicode");
|
||||
+ case TARGET_AMD64 :return include_arch? _T("amd64-unicode") : _T("unicode");
|
||||
#endif
|
||||
default:return defval;
|
||||
- case TARGET_X86ANSI : return _T("x86-ansi");
|
||||
- case TARGET_X86UNICODE: return _T("x86-unicode");
|
||||
- case TARGET_AMD64 : return _T("amd64-unicode");
|
||||
+ case TARGET_X86ANSI : return include_arch? _T("x86-ansi") : _T("ansi");
|
||||
+ case TARGET_X86UNICODE: return include_arch? _T("x86-unicode") : _T("unicode");
|
||||
+ case TARGET_AMD64 : return include_arch? _T("amd64-unicode") : _T("unicode");
|
||||
default: return defval;
|
||||
}
|
||||
@@ -3848,7 +3859,7 @@
|
||||
}
|
||||
@@ -3845,17 +3856,22 @@
|
||||
errstr += _T(": Target parameter must be one of: "), errstr += prefix;
|
||||
for(int comma = 0, i = CEXEBuild::TARGETFIRST; i < CEXEBuild::TARGETCOUNT; ++i)
|
||||
{
|
||||
- const TCHAR *ts = get_target_suffix((CEXEBuild::TARGETTYPE) i, 0);
|
||||
+ // TODO: test this
|
||||
+ const TCHAR *ts = get_target_suffix((CEXEBuild::TARGETTYPE) i, true, 0);
|
||||
+ const TCHAR *ts2 = get_target_suffix((CEXEBuild::TARGETTYPE) i, false, 0);
|
||||
if (!ts) continue;
|
||||
if (comma++) errstr += _T(", "), errstr += prefix;
|
||||
errstr += ts;
|
||||
+ if (!ts2) continue;
|
||||
+ errstr += _T(", /");
|
||||
+ errstr += ts2;
|
||||
}
|
||||
ERROR_MSG(_T("Error: %") NPRIs _T("\n"), errstr.c_str());
|
||||
}
|
||||
|
||||
int CEXEBuild::load_stub()
|
||||
{
|
||||
@@ -74,24 +89,24 @@ diff -aurN 003/Source/build.cpp 004/Source/build.cpp
|
||||
}
|
||||
|
||||
int CEXEBuild::update_exehead(const tstring& file, size_t *size/*=NULL*/) {
|
||||
diff -aurN 003/Source/build.h 004/Source/build.h
|
||||
--- 003/Source/build.h 2015-07-30 17:44:13.513942100 -0300
|
||||
+++ 004/Source/build.h 2015-07-30 17:52:11.686779200 -0300
|
||||
@@ -127,8 +127,8 @@
|
||||
} TARGETTYPE;
|
||||
diff -aurN 002/Source/build.h 004/Source/build.h
|
||||
--- 002/Source/build.h 2016-01-05 22:43:39.563983700 -0200
|
||||
+++ 004/Source/build.h 2016-01-05 22:43:40.860865100 -0200
|
||||
@@ -128,8 +128,8 @@
|
||||
TARGETTYPE m_target_type;
|
||||
TARGETTYPE get_target_type(const TCHAR*s) const;
|
||||
bool m_previous_x86_unicode;
|
||||
- const TCHAR* get_target_suffix(CEXEBuild::TARGETTYPE tt, const TCHAR*defval = _T("?")) const;
|
||||
- const TCHAR* get_target_suffix() const {return get_target_suffix(m_target_type);}
|
||||
- const TCHAR* get_target_suffix() const { return get_target_suffix(m_target_type); }
|
||||
+ const TCHAR* get_target_suffix(CEXEBuild::TARGETTYPE tt, const bool include_arch, const TCHAR*defval = _T("?")) const;
|
||||
+ const TCHAR* get_target_suffix(const bool include_arch) const {return get_target_suffix(m_target_type, include_arch);}
|
||||
bool is_target_64bit() const { return TARGET_AMD64 == m_target_type; }
|
||||
|
||||
void set_default_output_filename(const tstring& filename);
|
||||
diff -aurN 003/Source/makenssi.cpp 004/Source/makenssi.cpp
|
||||
--- 003/Source/makenssi.cpp 2015-07-30 17:44:13.685817700 -0300
|
||||
+++ 004/Source/makenssi.cpp 2015-07-30 17:52:11.686779200 -0300
|
||||
@@ -643,7 +643,7 @@
|
||||
+ const TCHAR* get_target_suffix(const bool include_arch) const { return get_target_suffix(m_target_type, include_arch); }
|
||||
static bool is_targettype_64bit(TARGETTYPE tt) { return TARGET_AMD64 == tt; }
|
||||
bool is_target_64bit() const { return is_targettype_64bit(m_target_type); }
|
||||
void print_bad_targettype_parameter(const TCHAR*cmdname, const TCHAR*prefix = _T("")) const;
|
||||
diff -aurN 002/Source/makenssi.cpp 004/Source/makenssi.cpp
|
||||
--- 002/Source/makenssi.cpp 2016-01-05 20:30:55.101586600 -0200
|
||||
+++ 004/Source/makenssi.cpp 2016-01-05 22:31:11.613989400 -0200
|
||||
@@ -646,7 +646,7 @@
|
||||
_ftprintf(g_output,_T("\nProcessed "));
|
||||
if (files_processed) _ftprintf(g_output,_T("%d file%") NPRIs _T(", "),files_processed,files_processed==1?_T(""):_T("s"));
|
||||
if (cmds_processed) _ftprintf(g_output,_T("%d command line command%") NPRIs _T(", "),cmds_processed,cmds_processed==1?_T(""):_T("s"));
|
||||
@@ -100,10 +115,10 @@ diff -aurN 003/Source/makenssi.cpp 004/Source/makenssi.cpp
|
||||
fflush(g_output);
|
||||
}
|
||||
|
||||
diff -aurN 003/Source/script.cpp 004/Source/script.cpp
|
||||
--- 003/Source/script.cpp 2015-07-30 17:44:30.482726600 -0300
|
||||
+++ 004/Source/script.cpp 2015-07-30 17:52:11.702403200 -0300
|
||||
@@ -4780,7 +4780,7 @@
|
||||
diff -aurN 002/Source/script.cpp 004/Source/script.cpp
|
||||
--- 002/Source/script.cpp 2016-01-05 20:52:42.575814900 -0200
|
||||
+++ 004/Source/script.cpp 2016-01-05 22:37:17.250715600 -0200
|
||||
@@ -4812,7 +4812,7 @@
|
||||
{
|
||||
pluginfullpath = definedlist.find(_T("NSISDIR"));
|
||||
pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + _T("Plugins");
|
||||
@@ -112,20 +127,3 @@ diff -aurN 003/Source/script.cpp 004/Source/script.cpp
|
||||
pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + t;
|
||||
}
|
||||
t = (TCHAR*) pluginfullpath.c_str();
|
||||
@@ -6104,10 +6104,15 @@
|
||||
es += _T(": Target parameter must be one of: /");
|
||||
for(int comma = 0, i = CEXEBuild::TARGETFIRST; i < CEXEBuild::TARGETCOUNT; ++i)
|
||||
{
|
||||
- const TCHAR *ts = get_target_suffix((CEXEBuild::TARGETTYPE) i, 0);
|
||||
+ // TODO: test this
|
||||
+ const TCHAR *ts = get_target_suffix((CEXEBuild::TARGETTYPE) i, true, 0);
|
||||
+ const TCHAR *ts2 = get_target_suffix((CEXEBuild::TARGETTYPE) i, false, 0);
|
||||
if (!ts) continue;
|
||||
if (comma++) es += _T(", /");
|
||||
es += ts;
|
||||
+ if (!ts2) continue;
|
||||
+ es += _T(", /");
|
||||
+ es += ts2;
|
||||
}
|
||||
ERROR_MSG(_T("Error: %") NPRIs _T("\n"), es.c_str());
|
||||
return PS_ERROR;
|
||||
@@ -1,26 +0,0 @@
|
||||
diff -aurN 004/SCons/Config/gnu 005/SCons/Config/gnu
|
||||
--- 004/SCons/Config/gnu 2015-07-30 17:52:05.608642000 -0300
|
||||
+++ 005/SCons/Config/gnu 2015-07-30 17:53:54.233861800 -0300
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
### flags
|
||||
|
||||
-def entry(x,u):
|
||||
- if x == 'NSISWinMainNOCRT':
|
||||
+def entry(x,u,a):
|
||||
+ if x == 'NSISWinMainNOCRT' and a == 'x86':
|
||||
x = '_' + x
|
||||
elif x == 'DllMain':
|
||||
x = '_DllMain@12'
|
||||
diff -aurN 004/SConstruct 005/SConstruct
|
||||
--- 004/SConstruct 2015-07-30 17:52:11.671153600 -0300
|
||||
+++ 005/SConstruct 2015-07-30 17:53:54.249485000 -0300
|
||||
@@ -307,7 +307,7 @@
|
||||
unicodestr = "None"
|
||||
if 'UNICODE' in env['CPPDEFINES']:
|
||||
unicodestr = "True"
|
||||
- env.Append(LINKFLAGS = ['${ENTRY_FLAG("%s",%s)}' % (entry,unicodestr)])
|
||||
+ env.Append(LINKFLAGS = ['${ENTRY_FLAG("%s",%s,"%s")}' % (entry,unicodestr,env['TARGET_ARCH'])])
|
||||
|
||||
if nodeflib:
|
||||
env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG']) # no default libraries
|
||||
@@ -1,10 +1,11 @@
|
||||
# Maintainer: Renato Silva <br.renatosilva@gmail.com>
|
||||
|
||||
_realname='nsis'
|
||||
pkgbase="mingw-w64-${_realname}-svn"
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn"
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=r6593
|
||||
pkgver=r6699
|
||||
pkgrel=1
|
||||
url='http://nsis.sourceforge.net'
|
||||
pkgdesc='Windows installer development tool (mingw-w64)'
|
||||
@@ -19,15 +20,11 @@ makedepends=(${MINGW_PACKAGE_PREFIX}-gcc
|
||||
source=(${_realname}.svn::svn+'http://svn.code.sf.net/p/nsis/code/NSIS/trunk'
|
||||
001-fhs-directory-structure.patch
|
||||
002-compile-fixes.patch
|
||||
003-fixes-for-64-bit.patch
|
||||
004-remove-redundant-architecture-suffix.patch
|
||||
005-fix-entry-point-in-64-bit.patch)
|
||||
003-remove-redundant-architecture-suffix.patch)
|
||||
md5sums=('SKIP'
|
||||
'1b2a86a7abbe4aeb90b1c6f5a730ceb4'
|
||||
'e65797ad69865b4b7b76cf711f76a6d2'
|
||||
'8052f972a69e297574345c3d355b8ba2'
|
||||
'ea57b9d2a2aa58c7b8fe59319e725925'
|
||||
'70d8a61e4717815ad171363ba12f7778')
|
||||
'1d35428b3c49268cabbfcadfa7edb115'
|
||||
'ef4d711bb7d37531b3d7a633eac4e929'
|
||||
'bd18b19ae696c9a1bd022e0c0f101ccd')
|
||||
|
||||
# Circumvent problem where makepkg will add the exe extension to some files
|
||||
# when compressing the 64-bit package
|
||||
@@ -40,28 +37,13 @@ pkgver() {
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}.svn"
|
||||
|
||||
# Linker script
|
||||
case "${CARCH}" in
|
||||
x86_64) sed -i 's/pei-i386/pei-x86-64/' SCons/config/linker_script ;;
|
||||
i686) sed -i 's/pei-x86-64/pei-i386/' SCons/config/linker_script ;;
|
||||
esac
|
||||
#case "${CARCH}" in
|
||||
# x86_64) cp -v /mingw64/x86_64-w64-mingw32/lib/ldscripts/i386pep.x SCons/config/linker_script ;;
|
||||
# i686) cp -v /mingw32/i686-w64-mingw32/lib/ldscripts/i386pe.x SCons/config/linker_script ;;
|
||||
#esac
|
||||
#sed -i 's/\.rsrc BLOCK/.ndata BLOCK(__section_alignment__) : { *(.ndata) }\n.rsrc BLOCK/' SCons/config/linker_script
|
||||
|
||||
if [[ -n $(svn diff SConstruct) ]]; then
|
||||
msg2 'Skipping already applied patches'
|
||||
return 0
|
||||
fi
|
||||
|
||||
patch -p1 < "${startdir}"/001-fhs-directory-structure.patch
|
||||
patch -p1 < "${startdir}"/002-compile-fixes.patch
|
||||
patch -p1 < "${startdir}"/003-fixes-for-64-bit.patch
|
||||
patch -p1 < "${startdir}"/004-remove-redundant-architecture-suffix.patch
|
||||
patch -p1 < "${startdir}"/005-fix-entry-point-in-64-bit.patch
|
||||
patch -p1 < "${startdir}"/003-remove-redundant-architecture-suffix.patch
|
||||
}
|
||||
|
||||
_build() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
diff -aurN 000/SConstruct 001/SConstruct
|
||||
--- 000/SConstruct 2015-04-27 16:19:25.203399600 -0300
|
||||
+++ 001/SConstruct 2015-04-27 19:41:00.187400200 -0300
|
||||
--- 000/SConstruct 2016-01-05 22:43:57.720268200 -0200
|
||||
+++ 001/SConstruct 2016-01-05 22:43:57.751520300 -0200
|
||||
@@ -123,10 +123,10 @@
|
||||
'relocatable': {
|
||||
'dest': '',
|
||||
@@ -35,9 +35,9 @@ diff -aurN 000/SConstruct 001/SConstruct
|
||||
def DistributeStubs(files, names=[], path='', alias=None):
|
||||
return defenv.Distribute(files, names, 'data', 'Stubs', path, alias, 'stubs')
|
||||
diff -aurN 000/Source/build.cpp 001/Source/build.cpp
|
||||
--- 000/Source/build.cpp 2015-04-27 16:19:02.015892500 -0300
|
||||
+++ 001/Source/build.cpp 2015-04-29 17:08:18.340909200 -0300
|
||||
@@ -393,7 +393,9 @@
|
||||
--- 000/Source/build.cpp 2016-01-05 20:25:09.797546300 -0200
|
||||
+++ 001/Source/build.cpp 2016-01-05 20:27:03.794162700 -0200
|
||||
@@ -394,7 +394,9 @@
|
||||
if (dir) nsis_dir = dir;
|
||||
else {
|
||||
#ifndef NSIS_CONFIG_CONST_DATA_PATH
|
||||
@@ -49,9 +49,9 @@ diff -aurN 000/Source/build.cpp 001/Source/build.cpp
|
||||
nsis_dir = PosixBug_CtoTString(PREFIX_DATA);
|
||||
#endif
|
||||
diff -aurN 000/Source/makenssi.cpp 001/Source/makenssi.cpp
|
||||
--- 000/Source/makenssi.cpp 2015-04-27 16:19:02.172145900 -0300
|
||||
+++ 001/Source/makenssi.cpp 2015-04-29 17:08:09.122152600 -0300
|
||||
@@ -556,7 +556,8 @@
|
||||
--- 000/Source/makenssi.cpp 2016-01-05 20:25:09.938172300 -0200
|
||||
+++ 001/Source/makenssi.cpp 2016-01-05 20:27:03.803162300 -0200
|
||||
@@ -559,7 +559,8 @@
|
||||
TCHAR* env_var = _tgetenv(_T("NSISCONFDIR"));
|
||||
if(env_var == NULL)
|
||||
#ifndef NSIS_CONFIG_CONST_DATA_PATH
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
diff -aurN 001/Contrib/Library/LibraryLocal/LibraryLocal.cpp 002/Contrib/Library/LibraryLocal/LibraryLocal.cpp
|
||||
--- 001/Contrib/Library/LibraryLocal/LibraryLocal.cpp 2015-04-27 19:40:45.906145700 -0300
|
||||
+++ 002/Contrib/Library/LibraryLocal/LibraryLocal.cpp 2015-04-27 19:41:16.968653400 -0300
|
||||
@@ -41,7 +41,7 @@
|
||||
hr = LoadTypeLib(fullpath, &typeLib);
|
||||
#else
|
||||
// If built without UNICODE, we still need to convert this string to a Unicode string.
|
||||
- WCHAR *ole_filename = WinWStrDupFromTChar(fullpath);
|
||||
+ WCHAR *ole_filename = (WCHAR*) WinWStrDupFromTChar(fullpath);
|
||||
if (!ole_filename) return 0;
|
||||
hr = LoadTypeLib(ole_filename, &typeLib);
|
||||
free(ole_filename);
|
||||
diff -aurN 001/SCons/Config/gnu 002/SCons/Config/gnu
|
||||
--- 001/SCons/Config/gnu 2015-04-27 19:40:44.296771200 -0300
|
||||
+++ 002/SCons/Config/gnu 2015-04-29 18:20:41.525404600 -0300
|
||||
@@ -11,6 +11,8 @@
|
||||
--- 001/SCons/Config/gnu 2016-01-05 22:44:50.845375300 -0200
|
||||
+++ 002/SCons/Config/gnu 2016-01-05 22:44:50.861001300 -0200
|
||||
@@ -21,6 +21,8 @@
|
||||
def cross_env(env):
|
||||
if env['PLATFORM'] != 'win32':
|
||||
env.Tool('crossmingw', toolpath = [Dir('../Tools').rdir()])
|
||||
@@ -22,7 +10,7 @@ diff -aurN 001/SCons/Config/gnu 002/SCons/Config/gnu
|
||||
|
||||
### flags
|
||||
|
||||
@@ -33,6 +35,8 @@
|
||||
@@ -44,6 +46,8 @@
|
||||
defenv['SUBSYS_WIN'] = '-Wl,--subsystem,windows'
|
||||
defenv['MSVCRT_FLAG'] = ''
|
||||
defenv['STDCALL'] = '"__attribute__((__stdcall__))"'
|
||||
@@ -32,8 +20,8 @@ diff -aurN 001/SCons/Config/gnu 002/SCons/Config/gnu
|
||||
# Don't allow mingw to link with LIBGCC*.DLL and LIBSTDC++-*.DLL
|
||||
if defenv['PLATFORM'] == 'win32':
|
||||
diff -aurN 001/SCons/utils.py 002/SCons/utils.py
|
||||
--- 001/SCons/utils.py 2015-04-27 19:40:44.328020200 -0300
|
||||
+++ 002/SCons/utils.py 2015-04-27 19:41:16.984278400 -0300
|
||||
--- 001/SCons/utils.py 2016-01-05 22:44:12.595300800 -0200
|
||||
+++ 002/SCons/utils.py 2016-01-05 22:44:12.673423300 -0200
|
||||
@@ -16,19 +16,6 @@
|
||||
appropriate compiler and linker options to the environment
|
||||
"""
|
||||
@@ -55,8 +43,8 @@ diff -aurN 001/SCons/utils.py 002/SCons/utils.py
|
||||
# Avoid unnecessary configuring when cleaning targets
|
||||
# and a clash when scons is run in parallel operation.
|
||||
diff -aurN 001/SConstruct 002/SConstruct
|
||||
--- 001/SConstruct 2015-04-27 19:41:00.187400200 -0300
|
||||
+++ 002/SConstruct 2015-04-27 19:41:16.999909200 -0300
|
||||
--- 001/SConstruct 2016-01-05 22:43:57.751520300 -0200
|
||||
+++ 002/SConstruct 2016-01-05 22:43:57.782770900 -0200
|
||||
@@ -252,7 +252,7 @@
|
||||
# write version into version.h
|
||||
f = open(defenv.File('#$BUILD_CONFIG/nsis-version.h').abspath, 'w')
|
||||
@@ -66,22 +54,10 @@ diff -aurN 001/SConstruct 002/SConstruct
|
||||
|
||||
if (not defenv.has_key('VER_PACKED')) and defenv.has_key('VER_MAJOR') and defenv.has_key('VER_MINOR'):
|
||||
packed_r = packed_b = 0
|
||||
diff -aurN 001/Source/Platform.h 002/Source/Platform.h
|
||||
--- 001/Source/Platform.h 2015-04-27 19:40:44.749941800 -0300
|
||||
+++ 002/Source/Platform.h 2015-04-27 19:41:16.999909200 -0300
|
||||
@@ -139,7 +139,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#ifdef _countof
|
||||
+#if !defined(__MINGW32__) && defined(_countof)
|
||||
#define COUNTOF _countof
|
||||
#else
|
||||
#define COUNTOF(a) (sizeof(a)/sizeof(a[0]))
|
||||
diff -aurN 001/Source/script.cpp 002/Source/script.cpp
|
||||
--- 001/Source/script.cpp 2015-04-27 19:40:44.531144400 -0300
|
||||
+++ 002/Source/script.cpp 2015-04-27 19:41:17.015533500 -0300
|
||||
@@ -3129,7 +3129,8 @@
|
||||
--- 001/Source/script.cpp 2016-01-05 20:25:50.828879800 -0200
|
||||
+++ 002/Source/script.cpp 2016-01-05 20:52:42.575814900 -0200
|
||||
@@ -3182,7 +3182,8 @@
|
||||
{
|
||||
TCHAR* cmdstr=line.gettoken_str(1);
|
||||
struct postbuild_cmd *newcmd, *prevcmd;
|
||||
@@ -92,13 +68,13 @@ diff -aurN 001/Source/script.cpp 002/Source/script.cpp
|
||||
_tcscpy(newcmd->cmd,cmdstr);
|
||||
for (prevcmd=postbuild_cmds; prevcmd && prevcmd->next;) prevcmd = prevcmd->next;
|
||||
diff -aurN 001/Source/util.cpp 002/Source/util.cpp
|
||||
--- 001/Source/util.cpp 2015-04-27 19:40:44.687393700 -0300
|
||||
+++ 002/Source/util.cpp 2015-04-27 19:41:17.015533500 -0300
|
||||
@@ -959,7 +959,10 @@
|
||||
--- 001/Source/util.cpp 2016-01-05 20:25:50.469504200 -0200
|
||||
+++ 002/Source/util.cpp 2016-01-05 20:52:42.575814900 -0200
|
||||
@@ -967,7 +967,10 @@
|
||||
{
|
||||
STARTUPINFO si = { sizeof(STARTUPINFO), };
|
||||
PROCESS_INFORMATION pi;
|
||||
- if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
|
||||
- if (!CreateProcess(NULL, const_cast<LPSTR>(cmd), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
|
||||
+ LPSTR modifiable_cmd = strdup(cmd);
|
||||
+ BOOL result = CreateProcess(NULL, modifiable_cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
||||
+ free(modifiable_cmd);
|
||||
|
||||
@@ -1,212 +0,0 @@
|
||||
diff -aurN 002/Contrib/InstallOptions/InstallerOptions.cpp 003/Contrib/InstallOptions/InstallerOptions.cpp
|
||||
--- 002/Contrib/InstallOptions/InstallerOptions.cpp 2015-04-27 19:41:08.578026100 -0300
|
||||
+++ 003/Contrib/InstallOptions/InstallerOptions.cpp 2015-04-27 19:41:34.312408900 -0300
|
||||
@@ -777,7 +777,7 @@
|
||||
{
|
||||
// Get TxtColor unless the user has set another using SetCtlColors
|
||||
if (!GetWindowLongPtr(lpdis->hwndItem, GWLP_USERDATA))
|
||||
- SetTextColor(lpdis->hDC, (COLORREF) pField->hImage);
|
||||
+ SetTextColor(lpdis->hDC, (uintptr_t) pField->hImage);
|
||||
|
||||
// Draw the text
|
||||
DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_CENTER | DT_VCENTER | DT_WORDBREAK | (bRTL ? DT_RTLREADING : 0));
|
||||
diff -aurN 002/Contrib/Makensisw/utils.cpp 003/Contrib/Makensisw/utils.cpp
|
||||
--- 002/Contrib/Makensisw/utils.cpp 2015-04-27 19:41:10.421775800 -0300
|
||||
+++ 003/Contrib/Makensisw/utils.cpp 2015-04-27 19:41:34.328034200 -0300
|
||||
@@ -648,7 +648,7 @@
|
||||
ti.cbSize = sizeof(TOOLINFO);
|
||||
ti.uFlags = TTF_IDISHWND;
|
||||
ti.hwnd = g_tip.tip_p;
|
||||
- ti.uId = (UINT) hWnd;
|
||||
+ ti.uId = (UINT_PTR) hWnd;
|
||||
ti.lpszText = (LPTSTR) lpszToolTip;
|
||||
SendMessage(g_tip.tip, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
|
||||
}
|
||||
@@ -672,7 +672,7 @@
|
||||
path=_tcsrchr(pathf,_T('\\'));
|
||||
if(path!=NULL) *path=0;
|
||||
lstrcat(pathf,LOCALDOCS);
|
||||
- if ((int)ShellExecute(g_sdata.hwnd,_T("open"),pathf,NULL,NULL,SW_SHOWNORMAL)<=32)
|
||||
+ if ((uintptr_t)ShellExecute(g_sdata.hwnd,_T("open"),pathf,NULL,NULL,SW_SHOWNORMAL)<=32)
|
||||
ShellExecuteA(g_sdata.hwnd,"open",DOCPATH,NULL,NULL,SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
diff -aurN 002/Contrib/Math/Source/Math.c 003/Contrib/Math/Source/Math.c
|
||||
--- 002/Contrib/Math/Source/Math.c 2015-04-27 19:41:08.656151700 -0300
|
||||
+++ 003/Contrib/Math/Source/Math.c 2015-04-27 19:41:34.343660900 -0300
|
||||
@@ -28,8 +28,8 @@
|
||||
PlaceVariable(vb, pi);
|
||||
if (pi->item == NULL) return;
|
||||
|
||||
- while ((pi->OpsStack) && ((((int) pi->OpsStack->param2) < precedence)
|
||||
- || ((((int)pi->OpsStack->param2) == precedence)
|
||||
+ while ((pi->OpsStack) && ((((uintptr_t) pi->OpsStack->param2) < precedence)
|
||||
+ || ((((uintptr_t)pi->OpsStack->param2) == precedence)
|
||||
&& (precedence != OPERATOR_SET_PRECEDENCE))))
|
||||
{
|
||||
// second operand for our operator
|
||||
@@ -857,7 +857,7 @@
|
||||
break;
|
||||
case ITV_ARRITEM:
|
||||
{
|
||||
- ExpressionItem *&ei = ((ArrayDesc*)(var->param1))->array[(int)var->param2];
|
||||
+ ExpressionItem *&ei = ((ArrayDesc*)(var->param1))->array[(uintptr_t)var->param2];
|
||||
CleanupItems(ei);
|
||||
ei = CopyItem(result);
|
||||
}
|
||||
@@ -930,7 +930,7 @@
|
||||
case ITV_ARRITEM:
|
||||
{
|
||||
// array item
|
||||
- ExpressionItem *ei = ((ArrayDesc*)(item->param1))->array[(int)item->param2];
|
||||
+ ExpressionItem *ei = ((ArrayDesc*)(item->param1))->array[(uintptr_t)item->param2];
|
||||
if (ei)
|
||||
result = CopyItem(ei);
|
||||
else
|
||||
@@ -1176,7 +1176,7 @@
|
||||
}
|
||||
while (true)
|
||||
{
|
||||
- RunAndGetConst((int) ifbr, result, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t) ifbr, result, ITC_INT);
|
||||
if (ifmode)
|
||||
{
|
||||
// we need then or else branch?
|
||||
@@ -1260,20 +1260,20 @@
|
||||
CleanupItems(si); CleanupItems(var);
|
||||
} else if (subtype == ITF_TYPE)
|
||||
{
|
||||
- int newtype = (int) MathFunctions[ioptions].fptr;
|
||||
+ uintptr_t newtype = (uintptr_t) MathFunctions[ioptions].fptr;
|
||||
if (newtype < ITC_UNKNOWN)
|
||||
{
|
||||
// get as possibly close to ready expression
|
||||
- RunAndGetConst((int)item->param1, result, newtype);
|
||||
+ RunAndGetConst((uintptr_t)item->param1, result, newtype);
|
||||
if (ioptions == ITFT_CARRAY_ID)
|
||||
CopyArray(result);
|
||||
} else if (newtype == FTT_FLOATF)
|
||||
{
|
||||
// float format function
|
||||
ExpressionItem *arg1, *arg2;
|
||||
- RunAndGetConst((int)item->param1, arg1, ITC_FLOAT);
|
||||
+ RunAndGetConst((uintptr_t)item->param1, arg1, ITC_FLOAT);
|
||||
double value = *((double*)&(arg1->param1));
|
||||
- RunAndGetConst((int)item->param2, arg2, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)item->param2, arg2, ITC_INT);
|
||||
int format = (int) *((__int64*)&(arg2->param1));
|
||||
|
||||
result = AllocItem();
|
||||
@@ -1331,7 +1331,7 @@
|
||||
} else
|
||||
{
|
||||
// oops :-o function call :)
|
||||
- RunAndGetConst((int)item->param1, result, ITC_FLOAT);
|
||||
+ RunAndGetConst((uintptr_t)item->param1, result, ITC_FLOAT);
|
||||
double &value = *((double*)&(result->param1));
|
||||
if (subtype == ITF_MATH1)
|
||||
{
|
||||
@@ -1365,7 +1365,7 @@
|
||||
{
|
||||
// normal 2-arg math function
|
||||
ExpressionItem *arg2;
|
||||
- RunAndGetConst((int)item->param2, arg2, ITC_FLOAT);
|
||||
+ RunAndGetConst((uintptr_t)item->param2, arg2, ITC_FLOAT);
|
||||
double value2 = *((double*)&(arg2->param1));
|
||||
value = ((Math2FuncPtr)(MathFunctions[ioptions].fptr))(value, value2);
|
||||
CleanupItems(arg2);
|
||||
@@ -1388,7 +1388,7 @@
|
||||
if ((*((ExpressionItem **) &(item->param2)))->type != IT_EXPRESSION)
|
||||
{
|
||||
// one index - user need a char
|
||||
- RunAndGetConst((int)item->param2, index, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)item->param2, index, ITC_INT);
|
||||
|
||||
int pos = (int) *((__int64*)&(index->param1));
|
||||
if (pos < 0) pos += len; // -index - means from end
|
||||
@@ -1408,7 +1408,7 @@
|
||||
if ((*((ExpressionItem **) &(item->param2)))->param1 == 0)
|
||||
index = AllocItem();
|
||||
else
|
||||
- RunAndGetConst((int)(*((ExpressionItem **) &(item->param2)))->param1, index, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)(*((ExpressionItem **) &(item->param2)))->param1, index, ITC_INT);
|
||||
if ((*((ExpressionItem **) &(item->param2)))->next->param1 == 0)
|
||||
{
|
||||
// if second index is skipped -> -1 (till last char)
|
||||
@@ -1416,7 +1416,7 @@
|
||||
*((__int64*)&(index2->param1)) = -1;
|
||||
}
|
||||
else
|
||||
- RunAndGetConst((int)(*((ExpressionItem **) &(item->param2)))->next->param1, index2, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)(*((ExpressionItem **) &(item->param2)))->next->param1, index2, ITC_INT);
|
||||
|
||||
// ok, we've got two indexes
|
||||
int pos1 = (int) *((__int64*)&(index->param1));
|
||||
@@ -1445,16 +1445,16 @@
|
||||
} else
|
||||
{
|
||||
// argument is array
|
||||
- RunAndGetConst((int)item->param2, index, ITC_INT);
|
||||
+ RunAndGetConst((uintptr_t)item->param2, index, ITC_INT);
|
||||
|
||||
// convert array pointer to array item pointer
|
||||
aritem->type = IT_VARIABLE | ITV_ARRITEM;
|
||||
aritem->param2 = (EIPARAM) *((__int64*)&(index->param1));
|
||||
|
||||
ArrayDesc *ad = (ArrayDesc*)aritem->param1;
|
||||
- if (((int)aritem->param2) >= ad->count)
|
||||
+ if (((uintptr_t)aritem->param2) >= ad->count)
|
||||
{
|
||||
- ad->count = ((int)aritem->param2)+1;
|
||||
+ ad->count = ((uintptr_t)aritem->param2)+1;
|
||||
while (ad->count > ad->size)
|
||||
{
|
||||
// resize array
|
||||
diff -aurN 002/Source/script.cpp 003/Source/script.cpp
|
||||
--- 002/Source/script.cpp 2015-04-27 19:41:17.015533500 -0300
|
||||
+++ 003/Source/script.cpp 2015-04-27 19:41:34.359285100 -0300
|
||||
@@ -2287,7 +2287,7 @@
|
||||
int k=line.gettoken_enum(1,rootkeys[0]);
|
||||
if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
|
||||
if (k == -1) PRINTHELP()
|
||||
- build_header.install_reg_rootkey=(INT)rootkey_tab[k];
|
||||
+ build_header.install_reg_rootkey=(INT_PTR)rootkey_tab[k];
|
||||
if (!build_header.install_reg_rootkey) PRINTHELP() // SHCTX is invalid here
|
||||
build_header.install_reg_key_ptr = add_string(line.gettoken_str(2),0);
|
||||
if (line.gettoken_str(2)[0] == _T('\\'))
|
||||
@@ -5321,7 +5321,7 @@
|
||||
int k=line.gettoken_enum(2,rootkeys[0]);
|
||||
if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
|
||||
if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
|
||||
- ent.offsets[1]=(INT)rootkey_tab[k];
|
||||
+ ent.offsets[1]=(INT_PTR)rootkey_tab[k];
|
||||
ent.offsets[2]=add_string(line.gettoken_str(3));
|
||||
ent.offsets[3]=add_string(line.gettoken_str(4));
|
||||
if (which_token == TOK_READREGDWORD) ent.offsets[4]=1;
|
||||
@@ -5353,7 +5353,7 @@
|
||||
if (k == -1) k=line.gettoken_enum(a,rootkeys[1]);
|
||||
if (k == -1) PRINTHELP()
|
||||
ent.which=EW_DELREG;
|
||||
- ent.offsets[1]=(INT)rootkey_tab[k];
|
||||
+ ent.offsets[1]=(INT_PTR)rootkey_tab[k];
|
||||
ent.offsets[2]=add_string(line.gettoken_str(a+1));
|
||||
ent.offsets[3]=(which_token==TOK_DELETEREGKEY)?0:add_string(line.gettoken_str(a+2));
|
||||
if (line.gettoken_str(a+1)[0] == _T('\\'))
|
||||
@@ -5373,7 +5373,7 @@
|
||||
if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
|
||||
if (k == -1) PRINTHELP()
|
||||
ent.which=EW_WRITEREG;
|
||||
- ent.offsets[0]=(INT)rootkey_tab[k];
|
||||
+ ent.offsets[0]=(INT_PTR)rootkey_tab[k];
|
||||
ent.offsets[1]=add_string(line.gettoken_str(2));
|
||||
if (line.gettoken_str(2)[0] == _T('\\'))
|
||||
warning_fl(_T("%") NPRIs _T(": registry path name begins with \'\\\', may cause problems"),line.gettoken_str(0));
|
||||
@@ -5440,7 +5440,7 @@
|
||||
int k=line.gettoken_enum(2,rootkeys[0]);
|
||||
if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
|
||||
if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
|
||||
- ent.offsets[1]=(INT)rootkey_tab[k];
|
||||
+ ent.offsets[1]=(INT_PTR)rootkey_tab[k];
|
||||
ent.offsets[2]=add_string(line.gettoken_str(3));
|
||||
ent.offsets[3]=add_string(line.gettoken_str(4));
|
||||
ent.offsets[4]=which_token == TOK_ENUMREGKEY;
|
||||
129
mingw-w64-nsis/003-remove-redundant-architecture-suffix.patch
Normal file
129
mingw-w64-nsis/003-remove-redundant-architecture-suffix.patch
Normal file
@@ -0,0 +1,129 @@
|
||||
diff -aurN 002/SConstruct 004/SConstruct
|
||||
--- 002/SConstruct 2016-01-05 22:43:57.782770900 -0200
|
||||
+++ 004/SConstruct 2016-01-05 22:43:57.798392900 -0200
|
||||
@@ -518,10 +518,8 @@
|
||||
def GetArcSuffix(env, unicode = None):
|
||||
if unicode is None:
|
||||
unicode = 'UNICODE' in env['CPPDEFINES']
|
||||
- suff = '-unicode'
|
||||
- if not unicode:
|
||||
- suff = '-ansi'
|
||||
- return GetArcCPU(env) + suff
|
||||
+ # We do not use GetArcCPU here because this is constant in the MSYS2 package
|
||||
+ return 'unicode' if unicode else 'ansi'
|
||||
|
||||
######################################################################
|
||||
####### Distribution ###
|
||||
diff -aurN 002/Source/build.cpp 004/Source/build.cpp
|
||||
--- 002/Source/build.cpp 2016-01-05 20:30:55.101586600 -0200
|
||||
+++ 004/Source/build.cpp 2016-01-05 22:33:38.994344500 -0200
|
||||
@@ -3541,7 +3541,7 @@
|
||||
|
||||
tstring searchPath = definedlist.find(_T("NSISDIR"));
|
||||
searchPath += PLATFORM_PATH_SEPARATOR_STR _T("Plugins") PLATFORM_PATH_SEPARATOR_STR;
|
||||
- searchPath += get_target_suffix();
|
||||
+ searchPath += get_target_suffix(false);
|
||||
|
||||
SCRIPT_MSG(_T("Processing default plugins: \"%") NPRIs PLATFORM_PATH_SEPARATOR_STR _T("*.dll\"\n"), searchPath.c_str());
|
||||
if (!m_pPlugins->Initialize(searchPath.c_str(), is_target_64bit(), !!display_script))
|
||||
@@ -3820,21 +3820,32 @@
|
||||
|
||||
CEXEBuild::TARGETTYPE CEXEBuild::get_target_type(const TCHAR*s) const
|
||||
{
|
||||
+ tstring str = s;
|
||||
+#if defined(__GNUC__)
|
||||
+ if (s && !_tcsstr(s, _TEXT("-")))
|
||||
+#if defined(__x86_64__) || defined(__LP64__)
|
||||
+ str = _TEXT("amd64-") + str;
|
||||
+#else
|
||||
+ str = _TEXT("x86-") + str;
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
for(int i = CEXEBuild::TARGETFIRST; i < CEXEBuild::TARGETCOUNT; ++i)
|
||||
{
|
||||
CEXEBuild::TARGETTYPE tt = (CEXEBuild::TARGETTYPE) i;
|
||||
- if (!_tcsicmp(get_target_suffix(tt, _T("")),s) && *s) return tt;
|
||||
+ if (!_tcsicmp(get_target_suffix(tt, true, _T("")),str.c_str()) && *s) return tt;
|
||||
+ if (!_tcsicmp(get_target_suffix(tt, false, _T("")),str.c_str()) && *s) return tt;
|
||||
}
|
||||
return TARGET_UNKNOWN;
|
||||
}
|
||||
|
||||
-const TCHAR* CEXEBuild::get_target_suffix(CEXEBuild::TARGETTYPE tt, const TCHAR*defval) const
|
||||
+const TCHAR* CEXEBuild::get_target_suffix(CEXEBuild::TARGETTYPE tt, const bool include_arch, const TCHAR*defval) const
|
||||
{
|
||||
switch(tt)
|
||||
{
|
||||
- case TARGET_X86ANSI : return _T("x86-ansi");
|
||||
- case TARGET_X86UNICODE: return _T("x86-unicode");
|
||||
- case TARGET_AMD64 : return _T("amd64-unicode");
|
||||
+ case TARGET_X86ANSI : return include_arch? _T("x86-ansi") : _T("ansi");
|
||||
+ case TARGET_X86UNICODE: return include_arch? _T("x86-unicode") : _T("unicode");
|
||||
+ case TARGET_AMD64 : return include_arch? _T("amd64-unicode") : _T("unicode");
|
||||
default: return defval;
|
||||
}
|
||||
}
|
||||
@@ -3845,17 +3856,22 @@
|
||||
errstr += _T(": Target parameter must be one of: "), errstr += prefix;
|
||||
for(int comma = 0, i = CEXEBuild::TARGETFIRST; i < CEXEBuild::TARGETCOUNT; ++i)
|
||||
{
|
||||
- const TCHAR *ts = get_target_suffix((CEXEBuild::TARGETTYPE) i, 0);
|
||||
+ // TODO: test this
|
||||
+ const TCHAR *ts = get_target_suffix((CEXEBuild::TARGETTYPE) i, true, 0);
|
||||
+ const TCHAR *ts2 = get_target_suffix((CEXEBuild::TARGETTYPE) i, false, 0);
|
||||
if (!ts) continue;
|
||||
if (comma++) errstr += _T(", "), errstr += prefix;
|
||||
errstr += ts;
|
||||
+ if (!ts2) continue;
|
||||
+ errstr += _T(", /");
|
||||
+ errstr += ts2;
|
||||
}
|
||||
ERROR_MSG(_T("Error: %") NPRIs _T("\n"), errstr.c_str());
|
||||
}
|
||||
|
||||
int CEXEBuild::load_stub()
|
||||
{
|
||||
- return update_exehead(stub_filename+_T("-")+get_target_suffix(), &m_exehead_original_size);
|
||||
+ return update_exehead(stub_filename+_T("-")+get_target_suffix(false), &m_exehead_original_size);
|
||||
}
|
||||
|
||||
int CEXEBuild::update_exehead(const tstring& file, size_t *size/*=NULL*/) {
|
||||
diff -aurN 002/Source/build.h 004/Source/build.h
|
||||
--- 002/Source/build.h 2016-01-05 22:43:39.563983700 -0200
|
||||
+++ 004/Source/build.h 2016-01-05 22:43:40.860865100 -0200
|
||||
@@ -128,8 +128,8 @@
|
||||
TARGETTYPE m_target_type;
|
||||
TARGETTYPE get_target_type(const TCHAR*s) const;
|
||||
bool m_previous_x86_unicode;
|
||||
- const TCHAR* get_target_suffix(CEXEBuild::TARGETTYPE tt, const TCHAR*defval = _T("?")) const;
|
||||
- const TCHAR* get_target_suffix() const { return get_target_suffix(m_target_type); }
|
||||
+ const TCHAR* get_target_suffix(CEXEBuild::TARGETTYPE tt, const bool include_arch, const TCHAR*defval = _T("?")) const;
|
||||
+ const TCHAR* get_target_suffix(const bool include_arch) const { return get_target_suffix(m_target_type, include_arch); }
|
||||
static bool is_targettype_64bit(TARGETTYPE tt) { return TARGET_AMD64 == tt; }
|
||||
bool is_target_64bit() const { return is_targettype_64bit(m_target_type); }
|
||||
void print_bad_targettype_parameter(const TCHAR*cmdname, const TCHAR*prefix = _T("")) const;
|
||||
diff -aurN 002/Source/makenssi.cpp 004/Source/makenssi.cpp
|
||||
--- 002/Source/makenssi.cpp 2016-01-05 20:30:55.101586600 -0200
|
||||
+++ 004/Source/makenssi.cpp 2016-01-05 22:31:11.613989400 -0200
|
||||
@@ -646,7 +646,7 @@
|
||||
_ftprintf(g_output,_T("\nProcessed "));
|
||||
if (files_processed) _ftprintf(g_output,_T("%d file%") NPRIs _T(", "),files_processed,files_processed==1?_T(""):_T("s"));
|
||||
if (cmds_processed) _ftprintf(g_output,_T("%d command line command%") NPRIs _T(", "),cmds_processed,cmds_processed==1?_T(""):_T("s"));
|
||||
- _ftprintf(g_output,_T("writing output (%") NPRIs _T("):\n"),build.get_target_suffix());
|
||||
+ _ftprintf(g_output,_T("writing output (%") NPRIs _T("):\n"),build.get_target_suffix(true));
|
||||
fflush(g_output);
|
||||
}
|
||||
|
||||
diff -aurN 002/Source/script.cpp 004/Source/script.cpp
|
||||
--- 002/Source/script.cpp 2016-01-05 20:52:42.575814900 -0200
|
||||
+++ 004/Source/script.cpp 2016-01-05 22:37:17.250715600 -0200
|
||||
@@ -4812,7 +4812,7 @@
|
||||
{
|
||||
pluginfullpath = definedlist.find(_T("NSISDIR"));
|
||||
pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + _T("Plugins");
|
||||
- pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + get_target_suffix();
|
||||
+ pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + get_target_suffix(false);
|
||||
pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + t;
|
||||
}
|
||||
t = (TCHAR*) pluginfullpath.c_str();
|
||||
@@ -1,131 +0,0 @@
|
||||
diff -aurN 003/SConstruct 004/SConstruct
|
||||
--- 003/SConstruct 2015-04-27 19:41:24.328031800 -0300
|
||||
+++ 004/SConstruct 2015-04-29 19:29:54.008843900 -0300
|
||||
@@ -517,10 +517,8 @@
|
||||
def GetArcSuffix(env, unicode = None):
|
||||
if unicode is None:
|
||||
unicode = 'UNICODE' in env['CPPDEFINES']
|
||||
- suff = '-unicode'
|
||||
- if not unicode:
|
||||
- suff = '-ansi'
|
||||
- return GetArcCPU(env) + suff
|
||||
+ # We do not use GetArcCPU here because this is constant in the MSYS2 package
|
||||
+ return 'unicode' if unicode else 'ansi'
|
||||
|
||||
######################################################################
|
||||
####### Distribution ###
|
||||
diff -aurN 003/Source/build.cpp 004/Source/build.cpp
|
||||
--- 003/Source/build.cpp 2015-04-29 17:07:35.168968000 -0300
|
||||
+++ 004/Source/build.cpp 2015-04-29 20:52:49.116318400 -0300
|
||||
@@ -3531,7 +3531,7 @@
|
||||
|
||||
tstring searchPath = definedlist.find(_T("NSISDIR"));
|
||||
searchPath += PLATFORM_PATH_SEPARATOR_STR _T("Plugins") PLATFORM_PATH_SEPARATOR_STR;
|
||||
- searchPath += get_target_suffix();
|
||||
+ searchPath += get_target_suffix(false);
|
||||
|
||||
SCRIPT_MSG(_T("Processing default plugins: \"%") NPRIs PLATFORM_PATH_SEPARATOR_STR _T("*.dll\"\n"), searchPath.c_str());
|
||||
if (!m_pPlugins->Initialize(searchPath.c_str(), !!display_script))
|
||||
@@ -3818,22 +3818,33 @@
|
||||
|
||||
CEXEBuild::TARGETTYPE CEXEBuild::get_target_type(const TCHAR*s) const
|
||||
{
|
||||
+ tstring str = s;
|
||||
+#if defined(__GNUC__)
|
||||
+ if (s && !_tcsstr(s, _TEXT("-")))
|
||||
+#if defined(__x86_64__) || defined(__LP64__)
|
||||
+ str = _TEXT("amd64-") + str;
|
||||
+#else
|
||||
+ str = _TEXT("x86-") + str;
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
for(int i = CEXEBuild::TARGETFIRST; i < CEXEBuild::TARGETCOUNT; ++i)
|
||||
{
|
||||
CEXEBuild::TARGETTYPE tt = (CEXEBuild::TARGETTYPE) i;
|
||||
- if (!_tcsicmp(get_target_suffix(tt, _T("")),s) && *s) return tt;
|
||||
+ if (!_tcsicmp(get_target_suffix(tt, true, _T("")),str.c_str()) && *s) return tt;
|
||||
+ if (!_tcsicmp(get_target_suffix(tt, false, _T("")),str.c_str()) && *s) return tt;
|
||||
}
|
||||
return TARGET_UNKNOWN;
|
||||
}
|
||||
|
||||
-const TCHAR* CEXEBuild::get_target_suffix(CEXEBuild::TARGETTYPE tt, const TCHAR*defval) const
|
||||
+const TCHAR* CEXEBuild::get_target_suffix(CEXEBuild::TARGETTYPE tt, const bool include_arch, const TCHAR*defval) const
|
||||
{
|
||||
switch(tt)
|
||||
{
|
||||
- case TARGET_X86ANSI :return _T("x86-ansi");
|
||||
- case TARGET_X86UNICODE:return _T("x86-unicode");
|
||||
+ case TARGET_X86ANSI :return include_arch? _T("x86-ansi") : _T("ansi");
|
||||
+ case TARGET_X86UNICODE:return include_arch? _T("x86-unicode") : _T("unicode");
|
||||
#if !defined(_WIN32) || defined(_WIN64) // BUGBUG: Need a better define for this
|
||||
- case TARGET_AMD64 :return _T("amd64-unicode");
|
||||
+ case TARGET_AMD64 :return include_arch? _T("amd64-unicode") : _T("unicode");
|
||||
#endif
|
||||
default:return defval;
|
||||
}
|
||||
@@ -3841,7 +3852,7 @@
|
||||
|
||||
int CEXEBuild::load_stub()
|
||||
{
|
||||
- return update_exehead(stub_filename+_T("-")+get_target_suffix(), &m_exehead_original_size);
|
||||
+ return update_exehead(stub_filename+_T("-")+get_target_suffix(false), &m_exehead_original_size);
|
||||
}
|
||||
|
||||
int CEXEBuild::update_exehead(const tstring& file, size_t *size/*=NULL*/) {
|
||||
diff -aurN 003/Source/build.h 004/Source/build.h
|
||||
--- 003/Source/build.h 2015-04-27 19:41:24.640532200 -0300
|
||||
+++ 004/Source/build.h 2015-04-29 16:48:10.350951100 -0300
|
||||
@@ -127,8 +127,8 @@
|
||||
} TARGETTYPE;
|
||||
TARGETTYPE m_target_type;
|
||||
TARGETTYPE get_target_type(const TCHAR*s) const;
|
||||
- const TCHAR* get_target_suffix(CEXEBuild::TARGETTYPE tt, const TCHAR*defval = _T("?")) const;
|
||||
- const TCHAR* get_target_suffix() const {return get_target_suffix(m_target_type);}
|
||||
+ const TCHAR* get_target_suffix(CEXEBuild::TARGETTYPE tt, const bool include_arch, const TCHAR*defval = _T("?")) const;
|
||||
+ const TCHAR* get_target_suffix(const bool include_arch) const {return get_target_suffix(m_target_type, include_arch);}
|
||||
bool is_target_64bit() const { return TARGET_AMD64 == m_target_type; }
|
||||
|
||||
void set_default_output_filename(const tstring& filename);
|
||||
diff -aurN 003/Source/makenssi.cpp 004/Source/makenssi.cpp
|
||||
--- 003/Source/makenssi.cpp 2015-04-29 17:07:26.168995000 -0300
|
||||
+++ 004/Source/makenssi.cpp 2015-04-29 20:59:58.180403700 -0300
|
||||
@@ -643,7 +643,7 @@
|
||||
_ftprintf(g_output,_T("\nProcessed "));
|
||||
if (files_processed) _ftprintf(g_output,_T("%d file%") NPRIs _T(", "),files_processed,files_processed==1?_T(""):_T("s"));
|
||||
if (cmds_processed) _ftprintf(g_output,_T("%d command line command%") NPRIs _T(", "),cmds_processed,cmds_processed==1?_T(""):_T("s"));
|
||||
- _ftprintf(g_output,_T("writing output (%") NPRIs _T("):\n"),build.get_target_suffix());
|
||||
+ _ftprintf(g_output,_T("writing output (%") NPRIs _T("):\n"),build.get_target_suffix(true));
|
||||
fflush(g_output);
|
||||
}
|
||||
|
||||
diff -aurN 003/Source/script.cpp 004/Source/script.cpp
|
||||
--- 003/Source/script.cpp 2015-04-27 19:41:34.359285100 -0300
|
||||
+++ 004/Source/script.cpp 2015-04-29 21:17:31.785221400 -0300
|
||||
@@ -4762,7 +4762,7 @@
|
||||
{
|
||||
pluginfullpath = definedlist.find(_T("NSISDIR"));
|
||||
pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + _T("Plugins");
|
||||
- pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + get_target_suffix();
|
||||
+ pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + get_target_suffix(false);
|
||||
pluginfullpath += tstring(PLATFORM_PATH_SEPARATOR_STR) + t;
|
||||
t = (TCHAR*) pluginfullpath.c_str();
|
||||
}
|
||||
@@ -6085,10 +6085,15 @@
|
||||
es += _T(": Target parameter must be one of: /");
|
||||
for(int comma = 0, i = CEXEBuild::TARGETFIRST; i < CEXEBuild::TARGETCOUNT; ++i)
|
||||
{
|
||||
- const TCHAR *ts = get_target_suffix((CEXEBuild::TARGETTYPE) i, 0);
|
||||
+ // TODO: test this
|
||||
+ const TCHAR *ts = get_target_suffix((CEXEBuild::TARGETTYPE) i, true, 0);
|
||||
+ const TCHAR *ts2 = get_target_suffix((CEXEBuild::TARGETTYPE) i, false, 0);
|
||||
if (!ts) continue;
|
||||
if (comma++) es += _T(", /");
|
||||
es += ts;
|
||||
+ if (!ts2) continue;
|
||||
+ es += _T(", /");
|
||||
+ es += ts2;
|
||||
}
|
||||
ERROR_MSG(_T("Error: %") NPRIs _T("\n"),es.c_str());
|
||||
return PS_ERROR;
|
||||
@@ -1,26 +0,0 @@
|
||||
diff -aurN 004/SCons/Config/gnu 005/SCons/Config/gnu
|
||||
--- 004/SCons/Config/gnu 2015-04-29 18:20:50.150418600 -0300
|
||||
+++ 005/SCons/Config/gnu 2015-05-03 18:59:14.093116800 -0300
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
### flags
|
||||
|
||||
-def entry(x,u):
|
||||
- if x == 'NSISWinMainNOCRT':
|
||||
+def entry(x,u,a):
|
||||
+ if x == 'NSISWinMainNOCRT' and a == 'x86':
|
||||
x = '_' + x
|
||||
elif x == 'DllMain':
|
||||
x = '_DllMain@12'
|
||||
diff -aurN 004/SConstruct 005/SConstruct
|
||||
--- 004/SConstruct 2015-04-29 19:29:54.008843900 -0300
|
||||
+++ 005/SConstruct 2015-05-03 18:58:11.889884700 -0300
|
||||
@@ -307,7 +307,7 @@
|
||||
unicodestr = "None"
|
||||
if 'UNICODE' in env['CPPDEFINES']:
|
||||
unicodestr = "True"
|
||||
- env.Append(LINKFLAGS = ['${ENTRY_FLAG("%s",%s)}' % (entry,unicodestr)])
|
||||
+ env.Append(LINKFLAGS = ['${ENTRY_FLAG("%s",%s,"%s")}' % (entry,unicodestr,env['TARGET_ARCH'])])
|
||||
|
||||
if nodeflib:
|
||||
env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG']) # no default libraries
|
||||
@@ -1,8 +1,9 @@
|
||||
# Maintainer: Renato Silva <br.renatosilva@gmail.com>
|
||||
|
||||
_realname='nsis'
|
||||
pkgbase="mingw-w64-${_realname}"
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=3.0b1
|
||||
pkgver=3.0b3
|
||||
pkgrel=1
|
||||
url='http://nsis.sourceforge.net'
|
||||
pkgdesc='Windows installer development tool (mingw-w64)'
|
||||
@@ -16,15 +17,11 @@ makedepends=(${MINGW_PACKAGE_PREFIX}-gcc
|
||||
source=("http://sourceforge.net/projects/nsis/files/NSIS%203%20Pre-release/${pkgver}/nsis-${pkgver}-src.tar.bz2"
|
||||
001-fhs-directory-structure.patch
|
||||
002-compile-fixes.patch
|
||||
003-fixes-for-64-bit.patch
|
||||
004-remove-redundant-architecture-suffix.patch
|
||||
005-fix-entry-point-in-64-bit.patch)
|
||||
md5sums=('93f6719b933366c08016a4a0fd2af91d'
|
||||
'21816ca18271cc8d5af683b45a73b902'
|
||||
'ea04f7ae8b31477234abb8306c2996ff'
|
||||
'e71131ced072dda8b45593cc2a2b0b6c'
|
||||
'd505471649e0e7053343a86a4eb7f77b'
|
||||
'f44c0e8124eef3ba57f9d9f95923d2a2')
|
||||
003-remove-redundant-architecture-suffix.patch)
|
||||
md5sums=('482ffda1cb1b8e919a06ac128e9fc8a2'
|
||||
'1d35428b3c49268cabbfcadfa7edb115'
|
||||
'ef4d711bb7d37531b3d7a633eac4e929'
|
||||
'bd18b19ae696c9a1bd022e0c0f101ccd')
|
||||
|
||||
# Circumvent problem where makepkg will add the exe extension to some files
|
||||
# when compressing the 64-bit package
|
||||
@@ -32,20 +29,9 @@ options=('!strip')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}-src"
|
||||
|
||||
# Linker script
|
||||
[[ "${CARCH}" = x86_64 ]] && sed -i 's/pei-i386/pei-x86-64/' SCons/config/linker_script
|
||||
#case "${CARCH}" in
|
||||
# x86_64) cp -v /mingw64/x86_64-w64-mingw32/lib/ldscripts/i386pep.x SCons/config/linker_script ;;
|
||||
# i686) cp -v /mingw32/i686-w64-mingw32/lib/ldscripts/i386pe.x SCons/config/linker_script ;;
|
||||
#esac
|
||||
#sed -i 's/\.rsrc BLOCK/.ndata BLOCK(__section_alignment__) : { *(.ndata) }\n.rsrc BLOCK/' SCons/config/linker_script
|
||||
|
||||
patch -p1 < "${startdir}"/001-fhs-directory-structure.patch
|
||||
patch -p1 < "${startdir}"/002-compile-fixes.patch
|
||||
patch -p1 < "${startdir}"/003-fixes-for-64-bit.patch
|
||||
patch -p1 < "${startdir}"/004-remove-redundant-architecture-suffix.patch
|
||||
patch -p1 < "${startdir}"/005-fix-entry-point-in-64-bit.patch
|
||||
patch -p1 < "${startdir}"/003-remove-redundant-architecture-suffix.patch
|
||||
}
|
||||
|
||||
_build() {
|
||||
|
||||
Reference in New Issue
Block a user