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:
parent
4247359df9
commit
957653f389
3 changed files with 11 additions and 1 deletions
|
@ -123,7 +123,11 @@ ${MementoSection} "NSIS Core Files (required)" SecCore
|
||||||
File /nonfatal ..\NSIS.exe.manifest
|
File /nonfatal ..\NSIS.exe.manifest
|
||||||
SetOutPath $INSTDIR\Bin
|
SetOutPath $INSTDIR\Bin
|
||||||
File ..\Bin\makensis.exe
|
File ..\Bin\makensis.exe
|
||||||
|
!ifdef USE_NEW_ZLIB
|
||||||
|
File ..\Bin\zlib.dll
|
||||||
|
!else
|
||||||
File ..\Bin\zlib1.dll
|
File ..\Bin\zlib1.dll
|
||||||
|
!endif
|
||||||
|
|
||||||
IfFileExists $INSTDIR\nsisconf.nsi "" +2
|
IfFileExists $INSTDIR\nsisconf.nsi "" +2
|
||||||
Rename $INSTDIR\nsisconf.nsi $INSTDIR\nsisconf.nsh
|
Rename $INSTDIR\nsisconf.nsi $INSTDIR\nsisconf.nsh
|
||||||
|
|
|
@ -22,8 +22,10 @@ def AddZLib(env, platform, alias='install-utils'):
|
||||||
env.Append(CPPPATH = env['ZLIB_W32_INC'])
|
env.Append(CPPPATH = env['ZLIB_W32_INC'])
|
||||||
env.Append(LIBPATH = env['ZLIB_W32_LIB'])
|
env.Append(LIBPATH = env['ZLIB_W32_LIB'])
|
||||||
zlib = ['zdll', 'z']
|
zlib = ['zdll', 'z']
|
||||||
if 'ZLIB_W32_DLL' in env:
|
if 'ZLIB_W32_DLL' in env and env['ZLIB_W32_DLL']:
|
||||||
env.DistributeW32Bin(env['ZLIB_W32_DLL'], alias=alias)
|
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:
|
else:
|
||||||
print 'Please specify folder of zlib for Win32 via ZLIB_W32'
|
print 'Please specify folder of zlib for Win32 via ZLIB_W32'
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
|
|
@ -430,6 +430,8 @@ if 'ZLIB_W32' in defenv:
|
||||||
break
|
break
|
||||||
defenv['ZLIB_W32_DLL'] = defenv.FindFile('zlib1.dll',
|
defenv['ZLIB_W32_DLL'] = defenv.FindFile('zlib1.dll',
|
||||||
[defenv['ZLIB_W32'], defenv['ZLIB_W32_LIB']])
|
[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']
|
tools = defenv['TOOLS']
|
||||||
|
|
||||||
|
@ -484,6 +486,8 @@ inst_env['NSISCONFDIR'] = os.path.abspath(str(defenv['INSTDISTDIR']))
|
||||||
|
|
||||||
def build_installer(target, source, env):
|
def build_installer(target, source, env):
|
||||||
cmdline = FindMakeNSIS(env, str(env['INSTDISTDIR'])) + ' %sDOUTFILE=%s %s' % (optchar, target[0].abspath, env['INSTVER'])
|
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')
|
cmd = env.Command(None, source, cmdline + ' $SOURCE')
|
||||||
AlwaysBuild(cmd)
|
AlwaysBuild(cmd)
|
||||||
# Comment out the following if you want to see the installation directory
|
# Comment out the following if you want to see the installation directory
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue