Use appropriate zlib DLL depending on version.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6255 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
golubdr 2012-08-22 23:32:05 +00:00
parent 4247359df9
commit 957653f389
3 changed files with 11 additions and 1 deletions

View file

@ -430,6 +430,8 @@ if 'ZLIB_W32' in defenv:
break
defenv['ZLIB_W32_DLL'] = defenv.FindFile('zlib1.dll',
[defenv['ZLIB_W32'], defenv['ZLIB_W32_LIB']])
defenv['ZLIB_W32_NEW_DLL'] = defenv.FindFile('zlib.dll',
[defenv['ZLIB_W32'], defenv['ZLIB_W32_LIB']])
tools = defenv['TOOLS']
@ -484,6 +486,8 @@ inst_env['NSISCONFDIR'] = os.path.abspath(str(defenv['INSTDISTDIR']))
def build_installer(target, source, env):
cmdline = FindMakeNSIS(env, str(env['INSTDISTDIR'])) + ' %sDOUTFILE=%s %s' % (optchar, target[0].abspath, env['INSTVER'])
if 'ZLIB_W32_NEW_DLL' in env and env['ZLIB_W32_NEW_DLL']:
cmdline += ' %sDUSE_NEW_ZLIB' % optchar
cmd = env.Command(None, source, cmdline + ' $SOURCE')
AlwaysBuild(cmd)
# Comment out the following if you want to see the installation directory