2005-04-16 18:48:50 +00:00
|
|
|
target = 'makensis'
|
|
|
|
|
|
|
|
pch = 'Platform.h'
|
|
|
|
|
|
|
|
makensis_files = Split("""
|
|
|
|
build.cpp
|
|
|
|
clzma.cpp
|
|
|
|
crc32.c
|
|
|
|
DialogTemplate.cpp
|
|
|
|
dirreader.cpp
|
2006-03-11 11:15:07 +00:00
|
|
|
fileform.cpp
|
2005-04-16 18:48:50 +00:00
|
|
|
growbuf.cpp
|
2007-10-03 13:31:56 +00:00
|
|
|
icon.cpp
|
2005-04-16 18:48:50 +00:00
|
|
|
lang.cpp
|
|
|
|
lineparse.cpp
|
|
|
|
makenssi.cpp
|
2006-10-16 07:53:49 +00:00
|
|
|
manifest.cpp
|
2005-04-16 18:48:50 +00:00
|
|
|
mmap.cpp
|
|
|
|
Plugins.cpp
|
|
|
|
ResourceEditor.cpp
|
|
|
|
ResourceVersionInfo.cpp
|
2017-10-03 20:48:29 +00:00
|
|
|
BinInterop.cpp
|
2005-04-16 18:48:50 +00:00
|
|
|
script.cpp
|
2017-05-03 12:08:09 +00:00
|
|
|
scriptpp.cpp
|
2005-04-16 18:48:50 +00:00
|
|
|
ShConstants.cpp
|
|
|
|
strlist.cpp
|
|
|
|
tokens.cpp
|
2010-04-20 15:29:55 +00:00
|
|
|
tstring.cpp
|
2011-12-05 23:44:26 +00:00
|
|
|
utf.cpp
|
2005-04-16 18:48:50 +00:00
|
|
|
util.cpp
|
2007-01-25 12:57:44 +00:00
|
|
|
winchar.cpp
|
2006-03-11 11:15:07 +00:00
|
|
|
writer.cpp
|
2005-04-16 18:48:50 +00:00
|
|
|
""")
|
|
|
|
|
|
|
|
bzip2_files = Split("""
|
|
|
|
bzip2/blocksort.c
|
|
|
|
bzip2/bzlib.c
|
|
|
|
bzip2/compress.c
|
|
|
|
bzip2/huffman.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
lzma_files = Split("""
|
|
|
|
7zip/7zGuids.cpp
|
2006-10-16 08:46:36 +00:00
|
|
|
7zip/7zip/Common/OutBuffer.cpp
|
|
|
|
7zip/7zip/Common/StreamUtils.cpp
|
2005-04-16 18:48:50 +00:00
|
|
|
7zip/7zip/Compress/LZ/LZInWindow.cpp
|
|
|
|
7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
|
|
|
|
7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
|
|
|
|
7zip/Common/Alloc.cpp
|
2006-10-16 08:46:36 +00:00
|
|
|
7zip/Common/CRC.cpp
|
2005-04-16 18:48:50 +00:00
|
|
|
""")
|
|
|
|
|
|
|
|
libs = Split("""
|
|
|
|
gdi32
|
|
|
|
user32
|
|
|
|
pthread
|
|
|
|
iconv
|
2011-06-15 22:48:02 +00:00
|
|
|
shlwapi
|
2017-10-03 20:48:29 +00:00
|
|
|
oleaut32
|
2021-08-18 23:48:20 +00:00
|
|
|
version
|
2021-08-17 15:08:24 +00:00
|
|
|
shell32
|
2005-04-16 18:48:50 +00:00
|
|
|
""")
|
|
|
|
|
2010-02-07 21:24:09 +00:00
|
|
|
Import('env AddAvailableLibs AddZLib')
|
2005-04-16 18:48:50 +00:00
|
|
|
|
2005-09-24 15:49:38 +00:00
|
|
|
##### Use available libraries
|
2005-04-16 18:48:50 +00:00
|
|
|
|
2005-11-08 19:30:18 +00:00
|
|
|
if env['PLATFORM'] == 'win32':
|
|
|
|
# XXX will cause problems if makensis is cross compiled
|
|
|
|
# on freebsd, libversion.a exists and gives trouble if linked
|
|
|
|
libs += ['version']
|
|
|
|
|
2005-09-24 15:49:38 +00:00
|
|
|
AddAvailableLibs(env, libs)
|
2010-02-07 21:24:09 +00:00
|
|
|
AddZLib(env, env['PLATFORM'], 'install-compiler')
|
2005-04-16 18:48:50 +00:00
|
|
|
|
2006-02-24 19:10:42 +00:00
|
|
|
##### Defines
|
2005-09-02 16:15:13 +00:00
|
|
|
|
2013-05-04 13:32:47 +00:00
|
|
|
env.Append(CPPDEFINES = ['MAKENSIS'])
|
2005-09-17 08:33:00 +00:00
|
|
|
env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
|
2005-09-02 16:15:13 +00:00
|
|
|
|
2005-04-16 18:48:50 +00:00
|
|
|
##### Set PCH
|
|
|
|
|
|
|
|
# XXX doesn't work
|
|
|
|
#env['PCH'] = env.PCH(pch)[0]
|
|
|
|
#env['PCHSTOP'] = pch
|
|
|
|
|
2005-05-12 16:27:35 +00:00
|
|
|
##### LZMA specific defines
|
2005-04-16 18:48:50 +00:00
|
|
|
|
2006-11-11 13:04:35 +00:00
|
|
|
lzma_env = env.Clone()
|
2005-04-16 18:48:50 +00:00
|
|
|
lzma_env.Append(CPPDEFINES = ['COMPRESS_MF_BT'])
|
|
|
|
lzma_files = lzma_env.Object(lzma_files)
|
|
|
|
|
|
|
|
##### Compile makensis
|
|
|
|
|
2010-02-07 21:24:09 +00:00
|
|
|
files = makensis_files + bzip2_files + lzma_files
|
2005-04-16 18:48:50 +00:00
|
|
|
|
|
|
|
makensis = env.Program(target, files)
|
|
|
|
|
|
|
|
Return('makensis')
|