build: add -zip option to macdeployqtplus

This zips the app bundle in /dist.
This commit is contained in:
fanquake 2020-05-26 09:11:05 +08:00 committed by Hennadii Stepanov
parent f608a409f7
commit c38561d6b1
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -397,6 +397,7 @@ ap.add_argument("-no-plugins", dest="plugins", action="store_false", default=Tru
ap.add_argument("-no-strip", dest="strip", action="store_false", default=True, help="don't run 'strip' on the binaries") ap.add_argument("-no-strip", dest="strip", action="store_false", default=True, help="don't run 'strip' on the binaries")
ap.add_argument("-dmg", nargs="?", const="", metavar="basename", help="create a .dmg disk image") ap.add_argument("-dmg", nargs="?", const="", metavar="basename", help="create a .dmg disk image")
ap.add_argument("-translations-dir", nargs=1, metavar="path", default=None, help="Path to Qt's translations. Base translations will automatically be added to the bundle's resources.") ap.add_argument("-translations-dir", nargs=1, metavar="path", default=None, help="Path to Qt's translations. Base translations will automatically be added to the bundle's resources.")
ap.add_argument("-zip", nargs="?", const="", metavar="zip", help="create a .zip containing the app bundle")
config = ap.parse_args() config = ap.parse_args()
@ -593,6 +594,11 @@ if config.dmg is not None:
# ------------------------------------------------ # ------------------------------------------------
if config.zip is not None:
shutil.make_archive('{}'.format(appname), format='zip', root_dir='dist', base_dir='Bitcoin-Qt.app')
# ------------------------------------------------
print("+ Done +") print("+ Done +")
sys.exit(0) sys.exit(0)