Make iOS Flutter apps extensible (flutter/engine#2654)
This patch switches us to building Runner.app on the end-developer's machine, which will eventually let them customize their app.
This commit is contained in:
39
engine/src/flutter/sky/tools/copy_dir.py
Normal file
39
engine/src/flutter/sky/tools/copy_dir.py
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2016 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 subprocess
|
||||
import shutil
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
def MakeStamp(stamp_path):
|
||||
dir_name = os.path.dirname(stamp_path)
|
||||
|
||||
if not os.path.isdir(dir_name):
|
||||
os.makedirs()
|
||||
|
||||
with open(stamp_path, 'a'):
|
||||
os.utime(stamp_path, None)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Copy a directory')
|
||||
|
||||
parser.add_argument('--src', type=str)
|
||||
parser.add_argument('--dst', type=str)
|
||||
parser.add_argument('--stamp', type=str)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
shutil.rmtree(args.dst, True)
|
||||
shutil.copytree(args.src, args.dst)
|
||||
|
||||
MakeStamp(args.stamp)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
@@ -45,15 +45,14 @@ def main():
|
||||
shutil.copytree(os.path.join(simulator_sdk, sim_tools),
|
||||
os.path.join(args.dst, sim_tools))
|
||||
|
||||
# TODO(abarth): Add once https://github.com/flutter/engine/pull/2654 lands.
|
||||
# subprocess.call([
|
||||
# 'lipo',
|
||||
# device_dylib,
|
||||
# simulator_dylib,
|
||||
# '-create',
|
||||
# '-output',
|
||||
# os.path.join(args.dst, 'Tools/common/Flutter.framework/Flutter')
|
||||
# ])
|
||||
subprocess.call([
|
||||
'lipo',
|
||||
device_dylib,
|
||||
simulator_dylib,
|
||||
'-create',
|
||||
'-output',
|
||||
os.path.join(args.dst, 'Tools/common/Flutter.framework/Flutter')
|
||||
])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user