(bundle_dir, options, platform)
| 652 | return matches |
| 653 | |
| 654 | def create_dmg(bundle_dir, options, platform): |
| 655 | # setup |
| 656 | dmg_dir = os.path.join("build", "dmg") |
| 657 | rmtree(dmg_dir) |
| 658 | mkdirs(dmg_dir) |
| 659 | |
| 660 | # create file tree for the .dmg |
| 661 | # It's important to use symlinks=True, otherwise notarization will fail |
| 662 | # since copytree will resolve them while copying (making them no longer |
| 663 | # signed) |
| 664 | shutil.copytree(bundle_dir, '%s/Defold.app' % dmg_dir, symlinks=True) |
| 665 | shutil.copy('bundle-resources/dmg_ds_store', '%s/.DS_Store' % dmg_dir) |
| 666 | shutil.copytree('bundle-resources/dmg_background', '%s/.background' % dmg_dir) |
| 667 | run.command(['ln', '-sf', '/Applications', '%s/Applications' % dmg_dir]) |
| 668 | |
| 669 | # create dmg |
| 670 | dmg_file = os.path.join("target/editor", "Defold-%s.dmg" % platform) |
| 671 | if os.path.exists(dmg_file): |
| 672 | os.remove(dmg_file) |
| 673 | run.command(['hdiutil', 'create', '-fs', 'JHFS+', '-volname', 'Defold', '-srcfolder', dmg_dir, dmg_file]) |
| 674 | |
| 675 | # sign the dmg |
| 676 | if not options.skip_codesign: |
| 677 | certificate = mac_certificate(options.codesigning_identity) |
| 678 | if certificate is None: |
| 679 | error("Codesigning certificate not found for signing identity %s" % (options.codesigning_identity)) |
| 680 | sys.exit(1) |
| 681 | |
| 682 | run.command(['codesign', '-s', certificate, dmg_file]) |
| 683 | notarize_dmg(dmg_file, options) |
| 684 | |
| 685 | def notarization_status(uuid, notarization_username, notarization_password, notarization_team_id = None): |
| 686 | args = ['xcrun', 'notarytool', 'info', |
no test coverage detected