Allow building with a specific win32 targeted cross compiler (#3305366)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6156 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
9540aa5d5c
commit
737a5c8468
3 changed files with 8 additions and 1 deletions
|
@ -100,6 +100,8 @@ To build NSIS Menu, install \W{http://www.wxwidgets.org/}{wxWidgets 2.8}, create
|
|||
|
||||
As of NSIS 2.01, the compiler, makensis, also compiles on POSIX platforms. POSIX platforms include Linux, *BSD, Mac OS X and others. Since the generated installer will eventually run on Windows, a \W{http://www.libsdl.org/extras/win32/cross/README.txt}{cross-compiler} is needed in order to compile them.
|
||||
|
||||
The command line option XGCC_W32_PREFIX could be used to explicitly select a specific win32 targeted cross compiler. The value of XGCC_W32_PREFIX has to be the prefix of the toolchain. For example XGCC_W32_PREFIX=i686-w64-mingw32 would deploy the win32 targeted MinGW-w64 cross compiler if it is available on the build system.
|
||||
|
||||
If no cross-compiler is available, use the following:
|
||||
|
||||
\c scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all
|
||||
|
|
|
@ -31,7 +31,7 @@ defenv['ALIGN_FLAG'] = '-Wl,--file-alignment,512'
|
|||
defenv['CPP_REQUIRES_STDLIB'] = 1
|
||||
defenv['SUBSYS_CON'] = '-Wl,--subsystem,console'
|
||||
defenv['MSVCRT_FLAG'] = ''
|
||||
defenv['STDCALL'] = '__attribute__((__stdcall__))'
|
||||
defenv['STDCALL'] = '"__attribute__((__stdcall__))"'
|
||||
|
||||
### defines
|
||||
|
||||
|
|
|
@ -61,6 +61,11 @@ prefixes = SCons.Util.Split("""
|
|||
""")
|
||||
|
||||
def find(env):
|
||||
# Explicitly specified toolchain to build Windows executables
|
||||
# takes predominance.
|
||||
prefix = SCons.Script.ARGUMENTS.get('XGCC_W32_PREFIX', None)
|
||||
if prefix:
|
||||
prefixes.insert(0, prefix)
|
||||
for prefix in prefixes:
|
||||
# First search in the SCons path and then the OS path:
|
||||
if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue