diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/SConstruct | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/SConstruct')
-rw-r--r-- | linden/indra/SConstruct | 109 |
1 files changed, 83 insertions, 26 deletions
diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index f94f661..2aeee01 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct | |||
@@ -11,7 +11,7 @@ | |||
11 | # | 11 | # |
12 | # scons -h | 12 | # scons -h |
13 | # | 13 | # |
14 | # Written by Tom Yedwab, 6/2006. | 14 | # Originally written by Tom Yedwab, 6/2006. |
15 | # | 15 | # |
16 | ################################################# | 16 | ################################################# |
17 | 17 | ||
@@ -54,6 +54,8 @@ opts.Add(EnumOption('BTARGET', 'Set build target', 'server', | |||
54 | allowed_values=('client', 'server', 'all'))) | 54 | allowed_values=('client', 'server', 'all'))) |
55 | opts.Add(EnumOption('DISTCC', 'Enabled distcc', 'yes', | 55 | opts.Add(EnumOption('DISTCC', 'Enabled distcc', 'yes', |
56 | allowed_values=('yes', 'no'))) | 56 | allowed_values=('yes', 'no'))) |
57 | opts.Add(EnumOption('MOZLIB', 'Enabled llmozlib/mozilla support', 'yes', | ||
58 | allowed_values=('yes', 'no'))) | ||
57 | opts.Add(EnumOption('COLORGCC', 'Enabled colorgcc', 'yes', | 59 | opts.Add(EnumOption('COLORGCC', 'Enabled colorgcc', 'yes', |
58 | allowed_values=('yes', 'no'))) | 60 | allowed_values=('yes', 'no'))) |
59 | opts.Add(EnumOption('GRID', 'Client package\'s default grid', 'default', | 61 | opts.Add(EnumOption('GRID', 'Client package\'s default grid', 'default', |
@@ -68,6 +70,7 @@ build_param = ARGUMENTS.get('BUILD', 'releasefordownload') | |||
68 | arch = ARGUMENTS.get('ARCH', 'i686') | 70 | arch = ARGUMENTS.get('ARCH', 'i686') |
69 | target_param = ARGUMENTS.get('BTARGET', 'server') | 71 | target_param = ARGUMENTS.get('BTARGET', 'server') |
70 | enable_distcc = ARGUMENTS.get('DISTCC', 'yes') | 72 | enable_distcc = ARGUMENTS.get('DISTCC', 'yes') |
73 | enable_mozlib = ARGUMENTS.get('MOZLIB', 'yes') | ||
71 | enable_colorgcc = ARGUMENTS.get('COLORGCC', 'yes') | 74 | enable_colorgcc = ARGUMENTS.get('COLORGCC', 'yes') |
72 | grid = ARGUMENTS.get('GRID', 'default') | 75 | grid = ARGUMENTS.get('GRID', 'default') |
73 | # OPENSOURCE: do not edit the following line: | 76 | # OPENSOURCE: do not edit the following line: |
@@ -123,7 +126,7 @@ for build_target in targets: | |||
123 | client_external_libs = [] | 126 | client_external_libs = [] |
124 | system_link_flags = '' | 127 | system_link_flags = '' |
125 | 128 | ||
126 | if platform != 'linux' and build_target == 'client': | 129 | if platform != 'linux' and build_target == 'client' and enable_mozlib == 'yes': |
127 | 130 | ||
128 | ### Mozilla include directories ### | 131 | ### Mozilla include directories ### |
129 | 132 | ||
@@ -189,6 +192,14 @@ for build_target in targets: | |||
189 | include_dirs += [ '../libraries/' + system_str + '/include/atk-1.0' ] | 192 | include_dirs += [ '../libraries/' + system_str + '/include/atk-1.0' ] |
190 | include_dirs += [ '../libraries/' + system_str + '/include/ELFIO' ] | 193 | include_dirs += [ '../libraries/' + system_str + '/include/ELFIO' ] |
191 | include_dirs += [ '../libraries/' + system_str + '/include/llfreetype2' ] | 194 | include_dirs += [ '../libraries/' + system_str + '/include/llfreetype2' ] |
195 | |||
196 | # llmozlib stuff | ||
197 | if enable_mozlib == 'yes': | ||
198 | flags += '-DLL_LIBXUL_ENABLED=1 ' | ||
199 | client_external_libs += [ 'llmozlib' ] | ||
200 | client_external_libs += [ 'mozjs', 'nspr4', 'plc4', 'plds4', 'profdirserviceprovider_s', 'xpcom', 'xul' ] | ||
201 | else: | ||
202 | flags += '-DLL_LIBXUL_ENABLED=0 ' | ||
192 | else: | 203 | else: |
193 | # Mac-only flags | 204 | # Mac-only flags |
194 | flags += '-x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -faltivec -fasm-blocks -g -O2 -fmessage-length=0 -mtune=G4 -Wno-deprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.3 -DLL_DARWIN=1 -Wmost -Wno-sign-compare -Wno-switch -fpch-preprocess -F./newview/build/Deployment -fconstant-cfstrings -ffor-scope -Wno-reorder -isysroot /Developer/SDKs/MacOSX10.3.9.sdk ' | 205 | flags += '-x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -faltivec -fasm-blocks -g -O2 -fmessage-length=0 -mtune=G4 -Wno-deprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.3 -DLL_DARWIN=1 -Wmost -Wno-sign-compare -Wno-switch -fpch-preprocess -F./newview/build/Deployment -fconstant-cfstrings -ffor-scope -Wno-reorder -isysroot /Developer/SDKs/MacOSX10.3.9.sdk ' |
@@ -287,10 +298,10 @@ for build_target in targets: | |||
287 | 298 | ||
288 | ### Load a files.lst and files.PLATFORM.lst for each module ### | 299 | ### Load a files.lst and files.PLATFORM.lst for each module ### |
289 | 300 | ||
290 | def load_files(module): | 301 | def load_files(module, source_fname): |
291 | new_list = [] | 302 | new_list = [] |
292 | try: | 303 | try: |
293 | list_file = open('./' + module + '/files.lst', 'r') | 304 | list_file = open('./' + module + '/' + source_fname, 'r') |
294 | list = Split(list_file.read()) | 305 | list = Split(list_file.read()) |
295 | for x in list: | 306 | for x in list: |
296 | file = os.path.join(build_dir, x) | 307 | file = os.path.join(build_dir, x) |
@@ -301,8 +312,9 @@ for build_target in targets: | |||
301 | else: | 312 | else: |
302 | new_list.append(file) | 313 | new_list.append(file) |
303 | list_file.close() | 314 | list_file.close() |
304 | except IOError: | 315 | except IOError, val: |
305 | print 'Error: no files.lst exists for module ' + module | 316 | print 'Error: unable to open file list',source_fname, |
317 | print 'for module', module + ":", val | ||
306 | return [] | 318 | return [] |
307 | 319 | ||
308 | try: | 320 | try: |
@@ -319,8 +331,13 @@ for build_target in targets: | |||
319 | 331 | ||
320 | ### Create a static library from the module ### | 332 | ### Create a static library from the module ### |
321 | 333 | ||
322 | def create_static_module_from_dir(input_dir, mod_name, local_flags="", extra_depends=None): | 334 | def create_static_module_from_dir( |
323 | files_list = load_files(input_dir) | 335 | input_dir, |
336 | mod_name, | ||
337 | local_flags="", | ||
338 | source_files = 'files.lst', | ||
339 | extra_depends=None): | ||
340 | files_list = load_files(input_dir, source_files) | ||
324 | BuildDir(build_dir + '/' + input_dir, input_dir) | 341 | BuildDir(build_dir + '/' + input_dir, input_dir) |
325 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) | 342 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) |
326 | if extra_depends: | 343 | if extra_depends: |
@@ -329,11 +346,15 @@ for build_target in targets: | |||
329 | tgt = local_env.StaticLibrary(lib_dir + '/' + mod_name, files_list) | 346 | tgt = local_env.StaticLibrary(lib_dir + '/' + mod_name, files_list) |
330 | Default(tgt) | 347 | Default(tgt) |
331 | 348 | ||
332 | def create_static_module(module, local_flags="", extra_depends=None): | 349 | def create_static_module(module, local_flags="", source_files = 'files.lst', extra_depends=None): |
333 | create_static_module_from_dir(module, module, local_flags, extra_depends) | 350 | create_static_module_from_dir(module, module, local_flags, source_files, extra_depends) |
334 | 351 | ||
335 | def create_dynamic_module(module, local_flags="", module_libs = None): | 352 | def create_dynamic_module( |
336 | files_list = load_files(module) | 353 | module, |
354 | local_flags="", | ||
355 | module_libs = None, | ||
356 | source_files = 'files.lst'): | ||
357 | files_list = load_files(module, source_files) | ||
337 | BuildDir(build_dir + '/' + module, module) | 358 | BuildDir(build_dir + '/' + module, module) |
338 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) | 359 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) |
339 | tgt = local_env.SharedLibrary(lib_dir + '/' + module, files_list, LIBS = module_libs) | 360 | tgt = local_env.SharedLibrary(lib_dir + '/' + module, files_list, LIBS = module_libs) |
@@ -341,8 +362,9 @@ for build_target in targets: | |||
341 | 362 | ||
342 | ### Create an executable from the module ### | 363 | ### Create an executable from the module ### |
343 | 364 | ||
344 | def create_executable(exec_file, module, module_libs): | 365 | def create_executable( |
345 | files_list = load_files(module) | 366 | exec_file, module, module_libs, source_files = 'files.lst'): |
367 | files_list = load_files(module, source_files) | ||
346 | BuildDir(build_dir + '/' + module, module) | 368 | BuildDir(build_dir + '/' + module, module) |
347 | tgt = env.Program(exec_file, files_list, LIBS = module_libs) | 369 | tgt = env.Program(exec_file, files_list, LIBS = module_libs) |
348 | Default(tgt) | 370 | Default(tgt) |
@@ -365,7 +387,7 @@ for build_target in targets: | |||
365 | create_static_module('llxml') | 387 | create_static_module('llxml') |
366 | create_static_module('lscript', extra_depends=build_dir + '/lscript/lscript_compile/indra.y.h') | 388 | create_static_module('lscript', extra_depends=build_dir + '/lscript/lscript_compile/indra.y.h') |
367 | 389 | ||
368 | net_external_libs = [ 'curl', 'ssl', 'crypto', 'aprutil-1', 'apr-1' ] | 390 | net_external_libs = [ 'curl', 'cares', 'ssl', 'crypto', 'aprutil-1', 'apr-1' ] |
369 | common_external_libs = net_external_libs + [ 'xmlrpc', 'expat', 'z' ] | 391 | common_external_libs = net_external_libs + [ 'xmlrpc', 'expat', 'z' ] |
370 | 392 | ||
371 | if build_target == 'client': | 393 | if build_target == 'client': |
@@ -375,6 +397,7 @@ for build_target in targets: | |||
375 | ############################# | 397 | ############################# |
376 | output_crashlogger_bin = 'linux_crash_logger/linux-crash-logger-' + arch + '-bin' | 398 | output_crashlogger_bin = 'linux_crash_logger/linux-crash-logger-' + arch + '-bin' |
377 | external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] | 399 | external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] |
400 | external_libs.remove('cares') | ||
378 | internal_libs = [ 'llvfs', 'llmath', 'llcommon' ] | 401 | internal_libs = [ 'llvfs', 'llmath', 'llcommon' ] |
379 | create_executable(output_crashlogger_bin + '-globalsyms', 'linux_crash_logger', internal_libs + external_libs) | 402 | create_executable(output_crashlogger_bin + '-globalsyms', 'linux_crash_logger', internal_libs + external_libs) |
380 | env.Command(output_crashlogger_bin, output_crashlogger_bin + '-globalsyms', hidesyms_cmd) | 403 | env.Command(output_crashlogger_bin, output_crashlogger_bin + '-globalsyms', hidesyms_cmd) |
@@ -393,6 +416,7 @@ for build_target in targets: | |||
393 | output_bin = 'newview/secondlife-' + arch + '-bin' | 416 | output_bin = 'newview/secondlife-' + arch + '-bin' |
394 | 417 | ||
395 | external_libs = client_external_libs + common_external_libs + [ 'freetype', 'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 'vorbis', 'fmod-3.75', 'db-4.2', 'openjpeg' ] | 418 | external_libs = client_external_libs + common_external_libs + [ 'freetype', 'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 'vorbis', 'fmod-3.75', 'db-4.2', 'openjpeg' ] |
419 | external_libs.remove('cares') | ||
396 | 420 | ||
397 | internal_libs = [ 'lscript', 'llwindow', 'llrender', 'llprimitive', | 421 | internal_libs = [ 'lscript', 'llwindow', 'llrender', 'llprimitive', |
398 | 'llmedia', 'llinventory', | 422 | 'llmedia', 'llinventory', |
@@ -402,6 +426,7 @@ for build_target in targets: | |||
402 | 426 | ||
403 | create_executable(output_bin + '-globalsyms', 'newview', internal_libs + external_libs) | 427 | create_executable(output_bin + '-globalsyms', 'newview', internal_libs + external_libs) |
404 | env.Command(output_bin, output_bin + '-globalsyms', hidesyms_cmd) | 428 | env.Command(output_bin, output_bin + '-globalsyms', hidesyms_cmd) |
429 | Default(output_bin) | ||
405 | 430 | ||
406 | if buildtype == 'releasefordownload': | 431 | if buildtype == 'releasefordownload': |
407 | 432 | ||
@@ -412,13 +437,15 @@ for build_target in targets: | |||
412 | if platform == 'linux': | 437 | if platform == 'linux': |
413 | env.Command(output_bin + '-stripped', output_bin, strip_cmd) | 438 | env.Command(output_bin + '-stripped', output_bin, strip_cmd) |
414 | env.Command(output_crashlogger_bin + '-stripped', output_crashlogger_bin, strip_cmd) | 439 | env.Command(output_crashlogger_bin + '-stripped', output_crashlogger_bin, strip_cmd) |
415 | manifest_file = 'linux_tools/client-manifest-' + arch | ||
416 | product_name = 'SecondLife_' + arch + '_' + version_major + "_" + version_minor + "_" + version_patch + "_" + version_build | 440 | product_name = 'SecondLife_' + arch + '_' + version_major + "_" + version_minor + "_" + version_patch + "_" + version_build |
417 | if grid != 'default': | 441 | if grid not in ['default', 'agni']: |
418 | product_name += "_" + grid.upper() | 442 | product_name += "_" + grid.upper() |
419 | package_name = product_name + '.tar.bz2' | 443 | package_name = product_name + '.tar.bz2' |
420 | cmd = 'rm -rf newview/' + product_name + '* && newview/linux_tools/package-client.sh ' + manifest_file + ' ' + product_name + ' ' + grid | 444 | cmd = 'rm -rf newview/%(pn)s* && newview/viewer_manifest.py --grid=%(grid)s --installer_name=%(pn)s --arch=%(arch)s' % { |
421 | env.Command('newview/' + package_name, 'newview/' + manifest_file, cmd) | 445 | 'pn': product_name, |
446 | 'grid':grid, | ||
447 | 'arch':arch} | ||
448 | env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd) | ||
422 | Depends('newview/' + package_name, output_bin + '-stripped') | 449 | Depends('newview/' + package_name, output_bin + '-stripped') |
423 | Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') | 450 | Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') |
424 | Default('newview/' + package_name) | 451 | Default('newview/' + package_name) |
@@ -524,21 +551,51 @@ for build_target in targets: | |||
524 | create_executable('newsim/simulator' + file_suffix, 'newsim', | 551 | create_executable('newsim/simulator' + file_suffix, 'newsim', |
525 | internal_libs + external_libs) | 552 | internal_libs + external_libs) |
526 | 553 | ||
554 | # texture upload verifier | ||
555 | external_libs = common_external_libs + [ 'kdu', 'dl' ] | ||
556 | internal_libs = [ | ||
557 | 'llimage', | ||
558 | 'llkdustatic', | ||
559 | 'llinventory', | ||
560 | 'llmessage', | ||
561 | 'llvfs', | ||
562 | 'llxml', | ||
563 | 'llcommon', | ||
564 | 'llmath' ] | ||
565 | create_executable( | ||
566 | 'web/doc/asset-upload/plugins/verify-texture', | ||
567 | 'web/doc/asset-upload/plugins', | ||
568 | internal_libs + external_libs, | ||
569 | 'verify-texture.lst') | ||
570 | |||
571 | # notecard upload verifier | ||
572 | create_executable( | ||
573 | 'web/doc/asset-upload/plugins/verify-notecard', | ||
574 | 'web/doc/asset-upload/plugins', | ||
575 | internal_libs + external_libs, | ||
576 | 'verify-notecard.lst') | ||
577 | |||
578 | # LSL compiler plugin for asset upload CGI. | ||
579 | external_libs = common_external_libs | ||
580 | internal_libs = ['lscript', 'llmath', 'llcommon'] | ||
581 | create_executable('web/doc/asset-upload/plugins/lsl_compiler/lslc' + file_suffix, 'web/doc/asset-upload/plugins/lsl_compiler/', internal_libs + external_libs); | ||
582 | |||
527 | # Test | 583 | # Test |
528 | Depends('test/test', 'newsim/simulator' + file_suffix) | 584 | Depends('test/test', 'newsim/simulator' + file_suffix) |
529 | external_libs = common_external_libs + ['mysqlclient'] | 585 | external_libs = common_external_libs + ['mysqlclient'] |
530 | internal_libs = [ 'lldatabase', 'llinventory', 'llmessage', 'llxml', | 586 | internal_libs = [ 'lldatabase', 'llinventory', 'llmessage', 'llxml', |
531 | 'llvfs', 'llmath', 'llcommon' ] | 587 | 'llvfs', 'llmath', 'llcommon' ] |
532 | create_executable('test/test' + file_suffix, 'test', | 588 | test_executable = 'test/test' + file_suffix |
589 | create_executable(test_executable, 'test', | ||
533 | internal_libs + external_libs) | 590 | internal_libs + external_libs) |
534 | 591 | ||
535 | # Run test. foo_target is never actually built, so this test always happens. | 592 | # Run tests |
536 | test_results_file = 'test/test_results' + file_suffix + '.txt' | 593 | test_results_file = 'test/test_results' + file_suffix + '.txt' |
537 | env.Command('foo_target', 'test/test' + file_suffix, "$SOURCE 1>" | 594 | env.Command(test_results_file, |
538 | + test_results_file + " 2>&1; " | 595 | test_executable, |
539 | + "sed -n '/^Total Tests/,$ p' " + test_results_file) | 596 | "$SOURCE 2>&1 | tee $TARGET") |
540 | Depends('foo_target', 'test/test' + file_suffix) | 597 | Depends(test_results_file, test_executable) |
541 | Default('foo_target') | 598 | Default(test_results_file) |
542 | 599 | ||
543 | ######### | 600 | ######### |
544 | # DONE # | 601 | # DONE # |