diff --git a/BUILD.md b/BUILD.md index 6346ff3..acc61e8 100644 --- a/BUILD.md +++ b/BUILD.md @@ -69,8 +69,7 @@ poetry run ./install/macos/build_app.py If you want to build for distribution, you'll need a codesigning certificate, and you'll also need to have [create-dmg](https://github.com/sindresorhus/create-dmg) installed: ```sh -npm install --global create-dmg -brew install graphicsmagick imagemagick +brew install create-dmg graphicsmagick imagemagick ``` And then run `build_app.py --with-codesign`: diff --git a/install/macos/build_app.py b/install/macos/build_app.py old mode 100755 new mode 100644 index df336da..93d2e13 --- a/install/macos/build_app.py +++ b/install/macos/build_app.py @@ -32,6 +32,7 @@ def main(): build_path = os.path.join(root, "build") dist_path = os.path.join(root, "dist") app_path = os.path.join(dist_path, "Dangerzone.app") + dmg_path = os.path.join(dist_path, "Dangerzone.dmg") print("○ Deleting old build and dist") if os.path.exists(build_path): @@ -76,12 +77,9 @@ def main(): return print("○ Creating DMG") - run(["create-dmg", app_path, "--identity", identity_name_application]) - dmg_filename = glob.glob(f"{root}/*.dmg")[0] - shutil.move(dmg_filename, dist_path) - dmg_filename = glob.glob(f"{dist_path}/*.dmg")[0] + run(["create-dmg", dmg_path, app_path, "--identity", identity_name_application]) - print(f"○ Finished building DMG: {dmg_filename}") + print(f"○ Finished building DMG: {dmg_path}") else: print("○ Skipping code signing")