
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
71 lines
1.7 KiB
Python
71 lines
1.7 KiB
Python
# FIXME: install assembly and pascal includes into the correct locations
|
|
|
|
lib_target = "pluginapi"
|
|
|
|
lib_files = Split("""
|
|
pluginapi.c
|
|
""")
|
|
|
|
api_files = Split("""
|
|
pluginapi.h
|
|
nsis_tchar.h
|
|
#Source/exehead/api.h
|
|
""")
|
|
|
|
example = Split("""
|
|
exdll.c
|
|
exdll.dpr
|
|
exdll.dsp
|
|
exdll.dsw
|
|
exdll_with_unit.dpr
|
|
exdll-vs2008.sln
|
|
exdll-vs2008.vcproj
|
|
nsis.pas
|
|
extdll.inc
|
|
""")
|
|
|
|
Import('env plugin_env plugin_uenv GetArcSuffix PerformPluginExtrasDistOperationOnce')
|
|
|
|
unicodetarget = 'UNICODE' in env['CPPDEFINES']
|
|
plugin_envT = plugin_env
|
|
if unicodetarget:
|
|
plugin_envT = plugin_uenv
|
|
lib_targetT = lib_target + '-' + GetArcSuffix(plugin_envT, unicodetarget)
|
|
|
|
|
|
|
|
# build library
|
|
|
|
api_envT = plugin_envT.Clone()
|
|
api_envT.Append(CPPPATH = ['#Source/exehead']) # For api.h
|
|
lib = api_envT.Library(lib_targetT, lib_files)
|
|
|
|
|
|
# distribute library, files and examples
|
|
|
|
if PerformPluginExtrasDistOperationOnce(plugin_envT, unicodetarget):
|
|
env.DistributeExamples(api_files, path='Plugin/nsis')
|
|
env.DistributeExamples(example, path='Plugin')
|
|
|
|
if env['PLATFORM'] == 'win32':
|
|
env.DistributeExamples(lib, path='Plugin/nsis')
|
|
else:
|
|
example += lib_files
|
|
|
|
if env.has_key('PREFIX_PLUGINAPI_INC'):
|
|
env.Distribute(api_files, None, 'pluginapi_inc', '', 'nsis', 'pluginapi', 'pluginapi')
|
|
|
|
if env.has_key('PREFIX_PLUGINAPI_LIB'):
|
|
env.Distribute(lib, None, 'pluginapi_lib', '', 'nsis', 'pluginapi', 'pluginapi')
|
|
|
|
|
|
# make sure all the other plug-ins can use the library
|
|
|
|
if PerformPluginExtrasDistOperationOnce(plugin_envT, unicodetarget):
|
|
env.Install('#$BUILD_PREFIX/api/nsis', api_files)
|
|
|
|
env.Install('#$BUILD_PREFIX/api/nsis', lib)
|
|
plugin_envT.Append(CPPPATH = ['#$BUILD_PREFIX/api'])
|
|
plugin_envT.Append(LIBPATH = ['#$BUILD_PREFIX/api/nsis'])
|
|
plugin_envT.Append(LIBS = [lib_targetT])
|
|
|