OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 Google Inc. All rights reserved. | 2 # Copyright (c) 2012 Google Inc. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Utility functions to perform Xcode-style build steps. | 6 """Utility functions to perform Xcode-style build steps. |
7 | 7 |
8 These functions are executed via gyp-mac-tool when using the Makefile generator. | 8 These functions are executed via gyp-mac-tool when using the Makefile generator. |
9 """ | 9 """ |
10 | 10 |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 and copy it into the bundle as embedded.mobileprovision, | 359 and copy it into the bundle as embedded.mobileprovision, |
360 2. copy Entitlements.plist from user or SDK next to the bundle, | 360 2. copy Entitlements.plist from user or SDK next to the bundle, |
361 3. code sign the bundle. | 361 3. code sign the bundle. |
362 """ | 362 """ |
363 substitutions, overrides = self._InstallProvisioningProfile( | 363 substitutions, overrides = self._InstallProvisioningProfile( |
364 provisioning, self._GetCFBundleIdentifier()) | 364 provisioning, self._GetCFBundleIdentifier()) |
365 entitlements_path = self._InstallEntitlements( | 365 entitlements_path = self._InstallEntitlements( |
366 entitlements, substitutions, overrides) | 366 entitlements, substitutions, overrides) |
367 subprocess.check_call([ | 367 subprocess.check_call([ |
368 'codesign', '--force', '--sign', key, '--entitlements', | 368 'codesign', '--force', '--sign', key, '--entitlements', |
369 entitlements_path, os.path.join( | 369 entitlements_path, '--timestamp=none', os.path.join( |
370 os.environ['TARGET_BUILD_DIR'], | 370 os.environ['TARGET_BUILD_DIR'], |
371 os.environ['FULL_PRODUCT_NAME'])]) | 371 os.environ['FULL_PRODUCT_NAME'])]) |
372 | 372 |
373 def _InstallProvisioningProfile(self, profile, bundle_identifier): | 373 def _InstallProvisioningProfile(self, profile, bundle_identifier): |
374 """Installs embedded.mobileprovision into the bundle. | 374 """Installs embedded.mobileprovision into the bundle. |
375 | 375 |
376 Args: | 376 Args: |
377 profile: string, optional, short name of the .mobileprovision file | 377 profile: string, optional, short name of the .mobileprovision file |
378 to use, if empty or the file is missing, the best file installed | 378 to use, if empty or the file is missing, the best file installed |
379 will be used | 379 will be used |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 data = data.replace('$(%s)' % key, value) | 578 data = data.replace('$(%s)' % key, value) |
579 return data | 579 return data |
580 if isinstance(data, list): | 580 if isinstance(data, list): |
581 return [self._ExpandVariables(v, substitutions) for v in data] | 581 return [self._ExpandVariables(v, substitutions) for v in data] |
582 if isinstance(data, dict): | 582 if isinstance(data, dict): |
583 return {k: self._ExpandVariables(data[k], substitutions) for k in data} | 583 return {k: self._ExpandVariables(data[k], substitutions) for k in data} |
584 return data | 584 return data |
585 | 585 |
586 if __name__ == '__main__': | 586 if __name__ == '__main__': |
587 sys.exit(main(sys.argv[1:])) | 587 sys.exit(main(sys.argv[1:])) |
OLD | NEW |