nsis64 / Source / SConscript

target = 'makensis'

pch = 'Platform.h'

makensis_files = Split("""
	build.cpp
	clzma.cpp
	crc32.c
	DialogTemplate.cpp
	dirreader.cpp
	fileform.cpp
	growbuf.cpp
	icon.cpp
	lang.cpp
	lineparse.cpp
	makenssi.cpp
	manifest.cpp
	mmap.cpp
	Plugins.cpp
	ResourceEditor.cpp
	ResourceVersionInfo.cpp
	script.cpp
	ShConstants.cpp
	strlist.cpp
	tokens.cpp
	tstring.cpp
	utf.cpp
	util.cpp
	validateunicode.cpp
	winchar.cpp
	writer.cpp
""")

bzip2_files = Split("""
	bzip2/blocksort.c
	bzip2/bzlib.c
	bzip2/compress.c
	bzip2/huffman.c
""")

lzma_files = Split("""
	7zip/7zGuids.cpp
	7zip/7zip/Common/OutBuffer.cpp
	7zip/7zip/Common/StreamUtils.cpp
	7zip/7zip/Compress/LZ/LZInWindow.cpp
	7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
	7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
	7zip/Common/Alloc.cpp
	7zip/Common/CRC.cpp
""")

libs = Split("""
	gdi32
	user32
	pthread
	iconv
	shlwapi
""")

Import('env AddAvailableLibs AddZLib')

##### Use available libraries

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']

AddAvailableLibs(env, libs)
AddZLib(env, env['PLATFORM'], 'install-compiler')

##### Defines

env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])

##### Set PCH

# XXX doesn't work
#env['PCH'] = env.PCH(pch)[0]
#env['PCHSTOP'] = pch

##### LZMA specific defines

lzma_env = env.Clone()
lzma_env.Append(CPPDEFINES = ['COMPRESS_MF_BT'])
lzma_files = lzma_env.Object(lzma_files)

##### Compile makensis

files = makensis_files + bzip2_files + lzma_files

makensis = env.Program(target, files)

Return('makensis')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.