diff options
author | Micah Lee <micah@micahflee.com> | 2020-11-06 09:33:37 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-11-06 09:33:37 -0800 |
commit | 7d477103e2b4a9e0f27189cb1ed77d9cb38d4afa (patch) | |
tree | bb72786e8304c262371f826d7e9413022680e3dc /desktop | |
parent | 7f18a5e973cbfd93176a6636d10df0fd37e8224b (diff) | |
download | onionshare-7d477103e2b4a9e0f27189cb1ed77d9cb38d4afa.tar.gz onionshare-7d477103e2b4a9e0f27189cb1ed77d9cb38d4afa.zip |
Add DMG creation to macOS package script
Diffstat (limited to 'desktop')
-rwxr-xr-x | desktop/package/macos/build.py | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/desktop/package/macos/build.py b/desktop/package/macos/build.py index c84e02cb..1c5e6a95 100755 --- a/desktop/package/macos/build.py +++ b/desktop/package/macos/build.py @@ -86,7 +86,43 @@ def main(): ) print(f"○ Signed app bundle: {app_path}") - print("○ TODO: Make a DMG package") + if not os.path.exists("/usr/local/bin/create-dmg"): + print("○ Error: create-dmg is not installed") + return + + print("○ Creating DMG") + dmg_path = os.path.join(desktop_dir, "macOS", "OnionShare.dmg") + run( + [ + "create-dmg", + "--volname", + "OnionShare", + "--volicon", + os.path.join( + desktop_dir, "src", "onionshare", "resources", "onionshare.icns" + ), + "--window-size", + "400", + "200", + "--icon-size", + "100", + "--icon", + "OnionShare.app", + "100", + "70", + "--hide-extension", + "OnionShare.app", + "--app-drop-link", + "300", + "70", + dmg_path, + app_path, + "--identity", + identity_name_application, + ] + ) + + print(f"○ Finished building DMG: {dmg_path}") if __name__ == "__main__": |