Jim Park's Unicode NSIS merging - Step 1 : switch to TCHARs where relevant.
Compiler output is identical before & after this step git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/branches/wizou@6036 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4e48722b63
commit
752d7d239a
209 changed files with 9698 additions and 7658 deletions
49
SConstruct
49
SConstruct
|
@ -156,6 +156,7 @@ opts.Add(PathVariable('APPEND_LIBPATH', 'Additional paths to search for librarie
|
|||
opts.Add(('APPEND_CCFLAGS', 'Additional C/C++ compiler flags'))
|
||||
opts.Add(('APPEND_LINKFLAGS', 'Additional linker flags'))
|
||||
# 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'))
|
||||
|
@ -179,10 +180,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'))
|
||||
|
||||
|
@ -200,19 +208,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()
|
||||
|
||||
######################################################################
|
||||
|
@ -401,7 +422,9 @@ defenv.Depends(installer_target, '$INSTDISTDIR')
|
|||
defenv.Sign(installer_target)
|
||||
defenv.Alias('dist-installer', installer_target)
|
||||
|
||||
AlwaysBuild(defenv.AddPostAction(installer_target, Delete('$INSTDISTDIR')))
|
||||
# Comment out the following if you want to see the installation directory
|
||||
# after the build is finished.
|
||||
#AlwaysBuild(defenv.AddPostAction(installer_target, Delete('$INSTDISTDIR')))
|
||||
|
||||
defenv.Alias('dist', ['dist-zip', 'dist-installer'])
|
||||
|
||||
|
@ -412,9 +435,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