Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: plugin/build.scons

Issue 150184: Add a dependency to the Mac installer build stage so that the postflight.sh s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2009, Google Inc. 1 # Copyright 2009, Google Inc.
2 # All rights reserved. 2 # All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 '-F$MAC_BREAKPAD_DIR', 268 '-F$MAC_BREAKPAD_DIR',
269 '-F$CG_DIR', 269 '-F$CG_DIR',
270 ] 270 ]
271 env['SHLIBPREFIX'] = [''] 271 env['SHLIBPREFIX'] = ['']
272 env['SHLIBSUFFIX'] = [''] 272 env['SHLIBSUFFIX'] = ['']
273 plugin_dll = env.SharedLibrary('o3d', inputs) 273 plugin_dll = env.SharedLibrary('o3d', inputs)
274 plugin_artifacts = env.Replicate('$ARTIFACTS_DIR/O3D.plugin/Contents/MacOS/', plugin_dll) 274 plugin_artifacts = env.Replicate('$ARTIFACTS_DIR/O3D.plugin/Contents/MacOS/', plugin_dll)
275 275
276 # insert version number into Info.plist 276 # insert version number into Info.plist
277 env.ReplaceStrings( 277 env.ReplaceStrings(
278 'mac/processed/Info.plist', '$SCONSTRUCT_DIR/plugin/mac/Info.plist', 278 'mac/processed/Info.plist', '$SCONSTRUCT_DIR/plugin/mac/Info.plist',
279 REPLACE_STRINGS = plugin_replace_strings 279 REPLACE_STRINGS = plugin_replace_strings
280 ) 280 )
281 281
282 # copy mac resource data 282 # copy mac resource data
283 env.Replicate('$ARTIFACTS_DIR/O3D.plugin/Contents/', 283 env.Replicate('$ARTIFACTS_DIR/O3D.plugin/Contents/',
284 '$SCONSTRUCT_DIR/plugin/mac/Resources') 284 '$SCONSTRUCT_DIR/plugin/mac/Resources')
285 env.Replicate('$ARTIFACTS_DIR/O3D.plugin/Contents', 285 env.Replicate('$ARTIFACTS_DIR/O3D.plugin/Contents',
286 'mac/processed/Info.plist') 286 'mac/processed/Info.plist')
287 287
288 # Make a string substituted version of o3d_plugin.r in the artifacts 288 # Make a string substituted version of o3d_plugin.r in the artifacts
289 # directory. 289 # directory.
290 env.ReplaceStrings( 290 env.ReplaceStrings(
291 '$ARTIFACTS_DIR/o3d_plugin.r', 'mac/o3d_plugin.r', 291 '$ARTIFACTS_DIR/o3d_plugin.r', 'mac/o3d_plugin.r',
292 REPLACE_STRINGS = plugin_replace_strings 292 REPLACE_STRINGS = plugin_replace_strings
293 ) 293 )
294 # Compile the string substituted o3d_plugin.r to make o3d.rsrc 294 # Compile the string substituted o3d_plugin.r to make o3d.rsrc
295 env.Command('$ARTIFACTS_DIR/O3D.plugin/Contents/Resources/o3d.rsrc', 295 env.Command('$ARTIFACTS_DIR/O3D.plugin/Contents/Resources/o3d.rsrc',
296 ['$ARTIFACTS_DIR/o3d_plugin.r'], 296 ['$ARTIFACTS_DIR/o3d_plugin.r'],
297 [ 297 [
298 'Rez -useDF "$ARTIFACTS_DIR/o3d_plugin.r" -o "$ARTIFACTS_DIR/O3D.pl ugin/Contents/Resources/o3d.rsrc"' 298 'Rez -useDF "$ARTIFACTS_DIR/o3d_plugin.r" -o "$ARTIFACTS_DIR/O3D.pl ugin/Contents/Resources/o3d.rsrc"'
299 ]) 299 ])
300 300
301 if env['DEBUG']: 301 if env['DEBUG']:
302 stripCmd = 'echo debug build, no strip' 302 stripCmd = 'echo debug build, no strip'
303 else: 303 else:
304 stripCmd = 'strip -S "$ARTIFACTS_DIR/O3D.plugin/Contents/MacOS/o3d"' 304 stripCmd = 'strip -S "$ARTIFACTS_DIR/O3D.plugin/Contents/MacOS/o3d"'
305 305
306 # Cleanup end result and build the installer 306 # Cleanup end result
307 created_installer = env.Command('$ARTIFACTS_DIR/plugin_done', 307 created_installer = env.Command('$ARTIFACTS_DIR/plugin_done',
308 [env.Dir('$ARTIFACTS_DIR/O3D.plugin')], 308 [env.Dir('$ARTIFACTS_DIR/O3D.plugin')],
309 [ 309 [
310 'xcodebuild -project installer/mac/O3D_Stats/O3D_Stats.xcodeproj - configuration Release', 310 'xcodebuild -project installer/mac/O3D_Stats/O3D_Stats.xcodeproj - configuration Release',
311 'ditto "$SCONSTRUCT_DIR/installer/mac/O3D_Stats/build/Release/O3D_ Stats.bundle" "$ARTIFACTS_DIR/O3D_Stats.bundle"', 311 'ditto "$SCONSTRUCT_DIR/installer/mac/O3D_Stats/build/Release/O3D_ Stats.bundle" "$ARTIFACTS_DIR/O3D_Stats.bundle"',
312 # Because the frameworks are inside a plugin bundle (not applicati on bundle) the plugin executable needs to be 312 # Because the frameworks are inside a plugin bundle (not applicati on bundle) the plugin executable needs to be
313 # tweaked to reference their paths via @loader_path instead of @ex ecutable_path. 313 # tweaked to reference their paths via @loader_path instead of @ex ecutable_path.
314 '$SCONSTRUCT_DIR/plugin/mac/Tools/fix_install_names.sh $ARTIFACTS_ DIR/O3D.plugin/Contents/MacOS/o3d', 314 '$SCONSTRUCT_DIR/plugin/mac/Tools/fix_install_names.sh $ARTIFACTS_ DIR/O3D.plugin/Contents/MacOS/o3d',
315 315
316 # make a copy of the executable, before we strip all the symbols 316 # make a copy of the executable, before we strip all the symbols
(...skipping 29 matching lines...) Expand all
346 REPLACE_STRINGS = plugin_replace_strings 346 REPLACE_STRINGS = plugin_replace_strings
347 ) 347 )
348 if int(ARGUMENTS.get('MAC_KILLSWITCH', 0)): 348 if int(ARGUMENTS.get('MAC_KILLSWITCH', 0)):
349 kill_command = 'rm "$ARTIFACTS_DIR/O3D.plugin/Contents/MacOS/o3d"' 349 kill_command = 'rm "$ARTIFACTS_DIR/O3D.plugin/Contents/MacOS/o3d"'
350 else: 350 else:
351 kill_command = 'echo normal binary' 351 kill_command = 'echo normal binary'
352 # Cleanup end result and build the installer 352 # Cleanup end result and build the installer
353 env.Command(env.Dir('$ARTIFACTS_DIR/O3D.mpkg'), 353 env.Command(env.Dir('$ARTIFACTS_DIR/O3D.mpkg'),
354 [ 354 [
355 "$ARTIFACTS_DIR/plugin_done", 355 "$ARTIFACTS_DIR/plugin_done",
356 "$ARTIFACTS_DIR/postflight.sh",
356 ], 357 ],
357 [ 358 [
358 # Delete first as Copy can fail to overwrite if the packproj is locked 359 # Delete first as Copy can fail to overwrite if the packproj is locked
359 Delete("$ARTIFACTS_DIR/$MAC_INSTALLER_PROJECT"), 360 Delete("$ARTIFACTS_DIR/$MAC_INSTALLER_PROJECT"),
360 # Copy installer project file into artifacts so it can operate o n files local to own directory 361 # Copy installer project file into artifacts so it can operate o n files local to own directory
361 # and so work on debug or release builds without change. 362 # and so work on debug or release builds without change.
362 Copy("$ARTIFACTS_DIR/$MAC_INSTALLER_PROJECT", 363 Copy("$ARTIFACTS_DIR/$MAC_INSTALLER_PROJECT",
363 '$MAC_INSTALLER_DIR/$MAC_INSTALLER_PROJECT'), 364 '$MAC_INSTALLER_DIR/$MAC_INSTALLER_PROJECT'),
364 'ditto "$MAC_INSTALLER_DIR/GoogleSoftwareUpdate.pkg" "$ARTIFACT S_DIR/GoogleSoftwareUpdate.pkg"', 365 'ditto "$MAC_INSTALLER_DIR/GoogleSoftwareUpdate.pkg" "$ARTIFACT S_DIR/GoogleSoftwareUpdate.pkg"',
365 # Make the installer. 366 # Make the installer.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 if os.path.exists(swiftshader_path): 417 if os.path.exists(swiftshader_path):
417 env.Requires(plugin_install, 418 env.Requires(plugin_install,
418 env.Replicate('$FIREFOX_PLUGIN_DIR/O3DExtras', swiftshader_path)) 419 env.Replicate('$FIREFOX_PLUGIN_DIR/O3DExtras', swiftshader_path))
419 420
420 if env.Bit('windows'): 421 if env.Bit('windows'):
421 # Make the logging program 422 # Make the logging program
422 exe = env.ComponentProgram('statsLogger', 423 exe = env.ComponentProgram('statsLogger',
423 logging_lib + ['win/logger_main.cc']) 424 logging_lib + ['win/logger_main.cc'])
424 # Copy the resulting executable to the Artifacts directory. 425 # Copy the resulting executable to the Artifacts directory.
425 env.Replicate('$ARTIFACTS_DIR', [exe]) 426 env.Replicate('$ARTIFACTS_DIR', [exe])
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698