
The official plugins are now stored in architecture specific subdirectories under NSIS\Plugins. !AddPluginDir also gained a new (optional) architecture flag because MakeNSIS now stores separate plugin information for each target architecture. Storing plugins in the root of the Plugins directory is no longer supported. MinGW does not implement the unicode CRT startup functions so the entry point functions and linker parameters had to be changed. The unicode tools use the ansi entry point and a small helper function that calls into the real code: _tmain has full argc+argv emulation while wWinMain does not pass the command line parameters. The stubs do not use any CRT functions and have no CRT or unicode helper code, they call our entry point directly. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6269 212acab6-be3b-0410-9dea-997c60f758d6
104 lines
1.8 KiB
Python
104 lines
1.8 KiB
Python
files = Split("""
|
|
bgbg.c
|
|
components.c
|
|
exec.c
|
|
fileform.c
|
|
Main.c
|
|
plugin.c
|
|
Ui.c
|
|
util.c
|
|
#Source/crc32.c
|
|
""")
|
|
|
|
resources = Split("""
|
|
resource.rc
|
|
""")
|
|
|
|
resource_files = Split("""
|
|
nsis.ico
|
|
uninst.ico
|
|
bitmap1.bmp
|
|
""")
|
|
|
|
bzip2_files = Split("""
|
|
#Source/bzip2/bzlib.c
|
|
#Source/bzip2/decompress.c
|
|
#Source/bzip2/huffman.c
|
|
""")
|
|
|
|
lzma_files = Split("""
|
|
#Source/7zip/LZMADecode.c
|
|
""")
|
|
|
|
zlib_files = Split("""
|
|
#Source/zlib/INFBLOCK.C
|
|
""")
|
|
|
|
libs = Split("""
|
|
kernel32
|
|
user32
|
|
gdi32
|
|
shell32
|
|
advapi32
|
|
comdlg32
|
|
comctl32
|
|
ole32
|
|
version
|
|
uuid
|
|
""")
|
|
|
|
Import('env compression solid_compression')
|
|
|
|
### Defines
|
|
|
|
env.Append(CPPDEFINES = ['EXEHEAD'])
|
|
env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN'])
|
|
env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
|
|
|
|
### Some other settings
|
|
|
|
if 'NSIS_CONFIG_LOG_STDOUT' in env['NSIS_CPPDEFINES']:
|
|
env.Append(LINKFLAGS = env['SUBSYS_CON'])
|
|
else:
|
|
env.Append(LINKFLAGS = env['SUBSYS_WIN'])
|
|
|
|
### Compression specific configuration
|
|
|
|
if compression == 'bzip2':
|
|
env.Append(CPPDEFINES = ['NSIS_COMPRESS_USE_BZIP2'])
|
|
files += bzip2_files
|
|
elif compression == 'lzma':
|
|
env.Append(CPPDEFINES = ['NSIS_COMPRESS_USE_LZMA'])
|
|
env.Append(CPPDEFINES = ['LZMACALL=__fastcall'])
|
|
files += lzma_files
|
|
elif compression == 'zlib':
|
|
env.Append(CPPDEFINES = ['NSIS_COMPRESS_USE_ZLIB'])
|
|
env.Append(CPPDEFINES = ['ZEXPORT=__stdcall'])
|
|
files += zlib_files
|
|
|
|
if solid_compression:
|
|
env.Append(CPPDEFINES = ['NSIS_COMPRESS_WHOLE'])
|
|
|
|
### Build with no sub-build-directories
|
|
|
|
objs = []
|
|
|
|
def basename(file):
|
|
return file.split('/')[-1].split('.')[0]
|
|
|
|
for file in files:
|
|
objs.append(env.Object(target = basename(file), source = file))
|
|
|
|
### Resources
|
|
|
|
res = env.RES(resources)
|
|
env.Depends(res, resource_files)
|
|
objs = objs + res
|
|
|
|
### Build stub
|
|
|
|
stub = env.Program(target = 'stub_' + compression, source = objs, LIBS = libs)
|
|
|
|
### Return stub
|
|
|
|
Return('stub')
|