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
|
@ -1,38 +1,44 @@
|
|||
target = "NSIS"
|
||||
Import('BuildUtil env')
|
||||
|
||||
files = Split("""
|
||||
nsismenu/nsismenu.cpp
|
||||
nsismenu/nslinks.cpp
|
||||
nsismenu/nsismenu.cpp
|
||||
nsismenu/nslinks.cpp
|
||||
""")
|
||||
|
||||
resources = Split("""
|
||||
nsismenu/nsisicon.ico
|
||||
nsismenu/nsisicon.ico
|
||||
""")
|
||||
|
||||
rc = 'nsismenu/nsismenu.rc'
|
||||
|
||||
libs = Split("""
|
||||
advapi32
|
||||
comctl32
|
||||
gdi32
|
||||
shell32
|
||||
user32
|
||||
wxbase28
|
||||
wxmsw28_core
|
||||
wxmsw28_html
|
||||
advapi32
|
||||
comctl32
|
||||
gdi32
|
||||
shell32
|
||||
user32
|
||||
""")
|
||||
|
||||
if env['UNICODE']:
|
||||
libs.append(["wxbase28u", "wxmsw28u_core", "wxmsw28u_html"])
|
||||
else:
|
||||
libs.append(["wxbase28", "wxmsw28_core", "wxmsw28_html"])
|
||||
|
||||
html = Split("""
|
||||
#Menu/index.html
|
||||
#Menu/index.html
|
||||
""")
|
||||
|
||||
images = Split("""
|
||||
#Menu/images/header.gif
|
||||
#Menu/images/line.gif
|
||||
#Menu/images/site.gif
|
||||
#Menu/images/line.gif
|
||||
#Menu/images/site.gif
|
||||
""")
|
||||
|
||||
Import('BuildUtil env')
|
||||
|
||||
if env['UNICODE']:
|
||||
images.append("#Menu/images/Unicode/header.gif")
|
||||
else:
|
||||
images.append("#Menu/images/header.gif")
|
||||
|
||||
import os
|
||||
from os.path import join
|
||||
|
@ -40,56 +46,60 @@ from os.path import join
|
|||
if env['PLATFORM'] != 'win32' and WhereIs('wx-config') or \
|
||||
env['PLATFORM'] == 'win32' and env.get('WXWIN'):
|
||||
|
||||
# build
|
||||
# build
|
||||
|
||||
if env['PLATFORM'] != 'win32':
|
||||
rc = libs = []
|
||||
if env['PLATFORM'] != 'win32':
|
||||
rc = libs = []
|
||||
|
||||
nsis_menu = BuildUtil(
|
||||
target,
|
||||
files,
|
||||
libs,
|
||||
res = rc,
|
||||
resources = resources,
|
||||
flags = ['$MSVCRT_FLAG', '$EXCEPTION_FLAG'],
|
||||
root_util = True,
|
||||
cross_platform = True
|
||||
)
|
||||
nsis_menu = BuildUtil(
|
||||
target,
|
||||
files,
|
||||
libs,
|
||||
res = rc,
|
||||
resources = resources,
|
||||
flags = ['$MSVCRT_FLAG', '$EXCEPTION_FLAG'],
|
||||
root_util = True,
|
||||
cross_platform = True
|
||||
)
|
||||
|
||||
# manifest
|
||||
# manifest
|
||||
|
||||
if env.has_key('MSVS_VERSION'):
|
||||
if float(env['MSVS_VERSION'].replace('Exp','')) >= 8.0:
|
||||
manifest = env.SideEffect('%s.exe.manifest' % target, nsis_menu)
|
||||
env.DistributeBin(manifest, alias='install-utils')
|
||||
if env.has_key('MSVS_VERSION'):
|
||||
if float(env['MSVS_VERSION'].replace('Exp','')) >= 8.0:
|
||||
manifest = env.SideEffect('%s.exe.manifest' % target, nsis_menu)
|
||||
env.DistributeBin(manifest, alias='install-utils')
|
||||
|
||||
# set directories
|
||||
# set directories
|
||||
|
||||
if nsis_menu[0].env['PLATFORM'] == 'win32':
|
||||
wxlib = [join(env['WXWIN'], 'lib', 'vc_libnsis')]
|
||||
wxinc = [
|
||||
join(env['WXWIN'], 'include'),
|
||||
join(env['WXWIN'], 'lib', 'vc_libnsis', 'msw')
|
||||
]
|
||||
nsis_menu[0].env.Append(LIBPATH = wxlib)
|
||||
nsis_menu[0].env.Append(CPPPATH = wxinc)
|
||||
else:
|
||||
nsis_menu[0].env.ParseConfig('wx-config --cxxflags --libs')
|
||||
if nsis_menu[0].env['PLATFORM'] == 'win32':
|
||||
wxinc = [join(env['WXWIN'], 'include')]
|
||||
|
||||
# install menu files
|
||||
if env['UNICODE']:
|
||||
wxlib = [join(os.environ['WXWIN'], 'lib', 'vc_libunsis')]
|
||||
wxinc.append(join(os.environ['WXWIN'], 'lib', 'vc_libunsis', 'mswu'))
|
||||
else:
|
||||
wxlib = [join(os.environ['WXWIN'], 'lib', 'vc_libnsis')]
|
||||
wxinc.append(join(os.environ['WXWIN'], 'lib', 'vc_libnsis', 'msw'))
|
||||
|
||||
env.DistributeMenu(html, alias='install-utils')
|
||||
env.DistributeMenu(images, path='images', alias='install-utils')
|
||||
nsis_menu[0].env.Append(LIBPATH = wxlib)
|
||||
nsis_menu[0].env.Append(CPPPATH = wxinc)
|
||||
else:
|
||||
nsis_menu[0].env.ParseConfig('wx-config --cxxflags --libs')
|
||||
|
||||
# install menu files
|
||||
|
||||
env.DistributeMenu(html, alias='install-utils')
|
||||
env.DistributeMenu(images, path='images', alias='install-utils')
|
||||
|
||||
else:
|
||||
|
||||
# no wxWidgets
|
||||
def err(target, source, env):
|
||||
if env['PLATFORM'] == 'win32':
|
||||
print '*** error: WXWIN must be set to build NSIS Menu!'
|
||||
else:
|
||||
print '*** error: wx-config must be in the PATH to build NSIS Menu!'
|
||||
return 1
|
||||
|
||||
# no wxWidgets
|
||||
def err(target, source, env):
|
||||
if env['PLATFORM'] == 'win32':
|
||||
print '*** error: WXWIN must be set to build NSIS Menu!'
|
||||
else:
|
||||
print '*** error: wx-config must be in the PATH to build NSIS Menu!'
|
||||
return 1
|
||||
|
||||
cmd = env.Command(target, files, Action(err, ''))
|
||||
env.Alias('NSIS Menu', cmd)
|
||||
cmd = env.Command(target, files, Action(err, ''))
|
||||
env.Alias('NSIS Menu', cmd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue