Prepare a framework providing an embeddable Flutter view controller
This commit is contained in:
44
engine/src/flutter/sky/tools/change_install_name.py
Executable file
44
engine/src/flutter/sky/tools/change_install_name.py
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/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 subprocess
|
||||
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='Changes the install name of a dylib')
|
||||
|
||||
parser.add_argument('--dylib', type=str)
|
||||
parser.add_argument('--install_name', type=str)
|
||||
parser.add_argument('--stamp', type=str)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
subprocess.check_call([
|
||||
'/usr/bin/env',
|
||||
'xcrun',
|
||||
'install_name_tool',
|
||||
'-id',
|
||||
args.install_name,
|
||||
args.dylib,
|
||||
])
|
||||
|
||||
MakeStamp(args.stamp)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user