35def createChromeApp(buildRoot, antTarget, resultFile):
36 buildDir = os.path.join(buildRoot, 'war')
37
38
39
40
41
42
43 execute(DART_PATH + '/third_party/apache_ant/v1_7_1/bin/ant', '-f',
44 'build-appengine.xml', '-Dbuild.dir=' + buildRoot, antTarget)
45
46
47
48 chrome = CLIENT_PATH + '/tests/drt/chrome'
49
50
51 if platform.system() == 'Darwin':
52 chrome = CLIENT_PATH + '/tests/drt/Chromium.app/Contents/MacOS/Chromium'
53
54 keyFile = DART_PATH + '/samples/swarm/swarm-dev.pem'
55 execute(chrome, '--pack-extension=' + buildDir,
56 '--pack-extension-key=' + keyFile)
57
58 resultFile = os.path.join(buildRoot, resultFile)
59 os.rename(buildDir + '.crx', resultFile)
60 return os.path.abspath(resultFile)
61
62