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

Unified Diff: samples/total/bin/start-total

Issue 10635015: Delete proxy and total samples, which have bit-rotted. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/total/README ('k') | samples/total/client/Adminz.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/total/bin/start-total
===================================================================
--- samples/total/bin/start-total (revision 9011)
+++ samples/total/bin/start-total (working copy)
@@ -1,72 +0,0 @@
-#!/usr/bin/env python2.6
-# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-import optparse
-import os
-import subprocess
-import sys
-import shutil
-
-ROOT=os.path.abspath(
- os.path.join(os.path.dirname(sys.argv[0]), '../../../'))
-def rootPath(*args):
- return os.path.join(ROOT, *args)
-
-HERE = rootPath('samples/total')
-def herePath(*args):
- return os.path.join(HERE, *args)
-
-sys.path.append(rootPath('tools'))
-import utils
-
-def GetOutputPath(mode):
- return rootPath(
- utils.GetBuildRoot(utils.GuessOS(), mode, utils.GuessArchitecture()),
- 'dart')
-
-def BuildDart(mode):
- if subprocess.call([
- 'tools/build.py',
- '--mode=%s' % mode],
- cwd = ROOT) != 0:
- return False
- return True
-
-def RunTotal(mode):
- serverPath = herePath('server')
- # Update dart.js
- outJsPath = serverPath + '/out';
- if not os.path.exists(outJsPath):
- os.makedirs(outJsPath)
- shutil.copy(rootPath('client/dart.js'), outJsPath)
- dartExePath = GetOutputPath(mode)
- if not os.path.exists(dartExePath):
- raise Exception("Couldn't find dart executable at " + dartExePath)
- subprocess.check_call(
- [dartExePath, 'TotalRunner.dart'],
- cwd = serverPath)
-
-def main():
- parser = optparse.OptionParser()
- parser.add_option('--no-build',
- dest = 'build',
- action = 'store_false',
- default = True,
- help = 'Skip reubilding of dart')
- parser.add_option('--mode',
- dest = 'mode',
- default = "release",
- help = 'Mode to use when building dependencies (release or debug)')
- options, args = parser.parse_args()
- if options.build:
- result = BuildDart(options.mode)
- if not result:
- print('Aborting servers startup - build failed. (bypass with --no-build).')
- return 1
- RunTotal(options.mode)
- return 0
-
-if __name__ == '__main__':
- sys.exit(main())
« no previous file with comments | « samples/total/README ('k') | samples/total/client/Adminz.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698