blob: 6f2d70b4a0802055e75411e1ec9e5f312ea8206b [file] [log] [blame] [edit]
diff -aurN 001/SCons/Config/gnu 002/SCons/Config/gnu
--- 001/SCons/Config/gnu
+++ 002/SCons/Config/gnu
@@ -21,6 +21,8 @@
def cross_env(env):
if env['PLATFORM'] != 'win32':
env.Tool('crossmingw', toolpath = [Dir('../Tools').rdir()])
+ else:
+ env.Tool('mingw_w64')
### flags
@@ -44,6 +46,8 @@
defenv['SUBSYS_WIN'] = '-Wl,--subsystem,windows'
defenv['MSVCRT_FLAG'] = ''
defenv['STDCALL'] = '"__attribute__((__stdcall__))"'
+defenv['SHLIBPREFIX'] = ''
+defenv['PLATFORM'] = 'win32'
# 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
+++ 002/SCons/utils.py
@@ -16,19 +16,6 @@
appropriate compiler and linker options to the environment
"""
zlib = 'z'
- if platform == 'win32':
- if 'ZLIB_W32' in env:
- # Add include and library path of zlib for Win32
- env.Append(CPPPATH = env['ZLIB_W32_INC'])
- env.Append(LIBPATH = env['ZLIB_W32_LIB'])
- zlib = ['zdll', 'z']
- if 'ZLIB_W32_DLL' in env and env['ZLIB_W32_DLL']:
- env.DistributeW32Bin(env['ZLIB_W32_DLL'], alias=alias)
- if 'ZLIB_W32_NEW_DLL' in env and env['ZLIB_W32_NEW_DLL']:
- env.DistributeW32Bin(env['ZLIB_W32_NEW_DLL'], alias=alias)
- else:
- print('Please specify folder of zlib for Win32 via ZLIB_W32')
- Exit(1)
# Avoid unnecessary configuring when cleaning targets
# and a clash when scons is run in parallel operation.
diff -aurN 001/SConstruct 002/SConstruct
--- 001/SConstruct
+++ 002/SConstruct
@@ -251,7 +251,7 @@
# write version into version.h
f = open(defenv.File('#$BUILD_CONFIG/nsis-version.h').abspath, 'w')
f.write('// This file is automatically generated by SCons\n// DO NOT EDIT THIS FILE\n')
-f.write('#include "%s"\n' % File('#/Source/tchar.h').abspath)
+f.write('#include "../../../Source/tchar.h"\n')
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/util.cpp 002/Source/util.cpp
--- 001/Source/util.cpp
+++ 002/Source/util.cpp
@@ -1129,7 +1129,10 @@
{
STARTUPINFO si = { sizeof(STARTUPINFO), };
PROCESS_INFORMATION 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);
+ if (!result)
return GetLastError();
WaitForSingleObject(pi.hProcess, INFINITE);
GetExitCodeProcess(pi.hProcess, &si.cb);