mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Now that we have all the Dart packages we need in //third_party, we can build skyx bundles by default. As part of this change, I've made it possible to build skyx bundles on Linux and I've made the gn target names of the mojoms in //sky/services consistent with each other and with //mojo/services/public. TBR=eseidel@google.com Review URL: https://codereview.chromium.org/1227973002 .
40 lines
1.2 KiB
Python
Executable File
40 lines
1.2 KiB
Python
Executable File
#!/usr/bin/env python
|
|
# Copyright 2015 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import argparse
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
SKY_TOOLS_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
SRC_ROOT = os.path.dirname(os.path.dirname(SKY_TOOLS_DIR))
|
|
DART_SDK = os.path.join(SRC_ROOT, 'third_party', 'dart-sdk', 'dart-sdk', 'bin')
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description='Packaging tool for Sky apps')
|
|
parser.add_argument('--package-root', type=str)
|
|
parser.add_argument('--manifest', type=str)
|
|
parser.add_argument('--asset-base', type=str)
|
|
parser.add_argument('--snapshot', type=str)
|
|
parser.add_argument('-o', '--output-file', type=str)
|
|
args = parser.parse_args()
|
|
|
|
command = [
|
|
os.path.join(DART_SDK, 'dart'),
|
|
'--package-root=%s' % args.package_root,
|
|
os.path.join(SKY_TOOLS_DIR, 'skyx', 'bin', 'skyx.dart'),
|
|
'--asset-base', args.asset_base,
|
|
'--snapshot', args.snapshot,
|
|
'--output-file', args.output_file,
|
|
]
|
|
|
|
if args.manifest:
|
|
command += ['--manifest', args.manifest]
|
|
|
|
subprocess.check_call(command)
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main())
|