Debian Codegraph @

Source/SConscript

raw
1 target = 'makensis'
2
3 pch = 'Platform.h'
4
5 makensis_files = Split("""
6 build.cpp
7 clzma.cpp
8 crc32.c
9 DialogTemplate.cpp
10 dirreader.cpp
11 fileform.cpp
12 growbuf.cpp
13 icon.cpp
14 lang.cpp
15 lineparse.cpp
16 makenssi.cpp
17 manifest.cpp
18 mmap.cpp
19 Plugins.cpp
20 ResourceEditor.cpp
21 ResourceVersionInfo.cpp
22 BinInterop.cpp
23 script.cpp
24 scriptpp.cpp
25 ShConstants.cpp
26 strlist.cpp
27 tokens.cpp
28 tstring.cpp
29 utf.cpp
30 util.cpp
31 winchar.cpp
32 writer.cpp
33 """)
34
35 bzip2_files = Split("""
36 bzip2/blocksort.c
37 bzip2/bzlib.c
38 bzip2/compress.c
39 bzip2/huffman.c
40 """)
41
42 lzma_files = Split("""
43 7zip/7zGuids.cpp
44 7zip/7zip/Common/OutBuffer.cpp
45 7zip/7zip/Common/StreamUtils.cpp
46 7zip/7zip/Compress/LZ/LZInWindow.cpp
47 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
48 7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
49 7zip/Common/Alloc.cpp
50 7zip/Common/CRC.cpp
51 """)
52
53 libs = Split("""
54 gdi32
55 user32
56 pthread
57 iconv
58 shlwapi
59 oleaut32
60 version
61 shell32
62 """)
63
64 Import('env AddAvailableLibs AddZLib')
65
66 ##### Use available libraries
67
68 if env['PLATFORM'] == 'win32':
69 # XXX will cause problems if makensis is cross compiled
70 # on freebsd, libversion.a exists and gives trouble if linked
71 libs += ['version']
72
73 AddAvailableLibs(env, libs)
74 AddZLib(env, env['PLATFORM'], 'install-compiler')
75
76 ##### Defines
77
78 env.Append(CPPDEFINES = ['MAKENSIS'])
79 env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
80
81 ##### Set PCH
82
83 # XXX doesn't work
84 #env['PCH'] = env.PCH(pch)[0]
85 #env['PCHSTOP'] = pch
86
87 ##### LZMA specific defines
88
89 lzma_env = env.Clone()
90 lzma_env.Append(CPPDEFINES = ['COMPRESS_MF_BT'])
91 lzma_files = lzma_env.Object(lzma_files)
92
93 ##### Compile makensis
94
95 files = makensis_files + bzip2_files + lzma_files
96
97 makensis = env.Program(target, files)
98
99 Return('makensis')