Jim Park's Unicode NSIS merging - Step 2 : merge TCHARs changes into trunk
Compiler output is identical before & after this step git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6037 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
commit
cdf7735a77
206 changed files with 8437 additions and 6403 deletions
47
SConstruct
47
SConstruct
|
@ -159,6 +159,7 @@ opts.Add(('APPEND_LINKFLAGS', 'Additional linker flags'))
|
|||
opts.Add(PathVariable('WXWIN', 'Path to wxWindows library folder (e.g. C:\\Dev\\wxWidgets-2.8.10)', os.environ.get('WXWIN')))
|
||||
opts.Add(PathVariable('ZLIB_W32', 'Path to Win32 zlib library folder (e.g. C:\\Dev\\zlib-1.2.3)', os.environ.get('ZLIB_W32')))
|
||||
# build options
|
||||
opts.Add(BoolVariable('UNICODE', 'Build the Unicode version of the executable', 'no'))
|
||||
opts.Add(BoolVariable('DEBUG', 'Build executables with debugging information', 'no'))
|
||||
opts.Add(PathVariable('CODESIGNER', 'A program used to sign executables', None))
|
||||
opts.Add(BoolVariable('STRIP', 'Strips executables of any unrequired data such as symbols', 'yes'))
|
||||
|
@ -182,10 +183,17 @@ if 'NSIS_CONFIG_CONST_DATA_PATH' in defenv['NSIS_CPPDEFINES']:
|
|||
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_DATA', '"%s"' % defenv.subst('$PREFIX_DATA'))])
|
||||
|
||||
# Need this early for the config header files to be placed in
|
||||
if defenv['DEBUG']:
|
||||
defenv.Replace(BUILD_PREFIX = 'build/debug')
|
||||
|
||||
if defenv['UNICODE']:
|
||||
if defenv['DEBUG']:
|
||||
defenv.Replace(BUILD_PREFIX = 'build/udebug')
|
||||
else:
|
||||
defenv.Replace(BUILD_PREFIX = 'build/urelease')
|
||||
else:
|
||||
defenv.Replace(BUILD_PREFIX = 'build/release')
|
||||
if defenv['DEBUG']:
|
||||
defenv.Replace(BUILD_PREFIX = 'build/debug')
|
||||
else:
|
||||
defenv.Replace(BUILD_PREFIX = 'build/release')
|
||||
|
||||
defenv.Replace(BUILD_CONFIG = defenv.subst('$BUILD_PREFIX/config'))
|
||||
|
||||
|
@ -203,19 +211,32 @@ for i in defenv['NSIS_CPPDEFINES']:
|
|||
if type(i) is not str:
|
||||
sconf_h.write('#define %s %s\n' % (i[0], i[1]))
|
||||
if str(i[1])[0] != '"':
|
||||
defines_h.write('definedlist.add("%s", "%s");\n' % (i[0], i[1]))
|
||||
defines_h.write('definedlist.add(_T("%s"), _T("%s"));\n' % (i[0], i[1]))
|
||||
else:
|
||||
defines_h.write('definedlist.add("%s", %s);\n' % (i[0], i[1]))
|
||||
defines_h.write('definedlist.add(_T("%s"), _T(%s));\n' % (i[0], i[1]))
|
||||
else:
|
||||
sconf_h.write('#define %s\n' % (i))
|
||||
defines_h.write('definedlist.add("%s");\n' % (i))
|
||||
defines_h.write('definedlist.add(_T("%s"));\n' % (i))
|
||||
sconf_h.close()
|
||||
defines_h.close()
|
||||
|
||||
# write version into version.h
|
||||
f = open(defenv.File('#$BUILD_CONFIG/nsis-version.h').abspath, 'w')
|
||||
f.write('// This file is automatically generated by SCons\n// DO NOT EDIT THIS FILE\n')
|
||||
f.write('#define NSIS_VERSION "v%s"\n' % defenv['VERSION'])
|
||||
f.write('#include "tchar.h"\n')
|
||||
|
||||
if defenv.has_key('VER_MAJOR'):
|
||||
defenv['VERSION'] = defenv['VER_MAJOR']
|
||||
if defenv.has_key('VER_MINOR'):
|
||||
defenv['VERSION'] += '.' + defenv['VER_MINOR']
|
||||
if defenv.has_key('VER_REVISION'):
|
||||
defenv['VERSION'] += '.' + defenv['VER_REVISION']
|
||||
|
||||
if defenv['UNICODE']:
|
||||
defenv['VERSION'] += "-Unicode"
|
||||
|
||||
f.write('#define NSIS_VERSION _T("v%s")\n' % defenv['VERSION'])
|
||||
|
||||
f.close()
|
||||
|
||||
######################################################################
|
||||
|
@ -413,6 +434,8 @@ def build_installer(target, source, env):
|
|||
cmdline = FindMakeNSIS(env, str(env['INSTDISTDIR'])) + ' %sDOUTFILE=%s %s' % (optchar, target[0].abspath, env['INSTVER'])
|
||||
cmd = env.Command(None, source, cmdline + ' $SOURCE')
|
||||
AlwaysBuild(cmd)
|
||||
# Comment out the following if you want to see the installation directory
|
||||
# after the build is finished.
|
||||
AlwaysBuild(env.AddPostAction(cmd, Delete('$INSTDISTDIR')))
|
||||
env.Alias('dist-installer', cmd)
|
||||
|
||||
|
@ -433,9 +456,15 @@ defenv.Alias('dist', ['dist-zip', 'dist-installer'])
|
|||
for d in doc:
|
||||
if d in defenv['SKIPDOC']:
|
||||
continue
|
||||
defenv.DistributeDoc(d)
|
||||
if defenv['UNICODE']:
|
||||
defenv.DistributeDoc('Unicode/' + d)
|
||||
else:
|
||||
defenv.DistributeDoc(d)
|
||||
|
||||
defenv.DistributeConf('nsisconf.nsh')
|
||||
if defenv['UNICODE']:
|
||||
defenv.DistributeConf('Unicode/nsisconf.nsh')
|
||||
else:
|
||||
defenv.DistributeConf('nsisconf.nsh')
|
||||
|
||||
######################################################################
|
||||
####### Stubs ###
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue