mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Fix macOS build script, and install create-dmg from homebrew instead of npm
This commit is contained in:
parent
26ea568080
commit
0067f37494
2 changed files with 4 additions and 7 deletions
3
BUILD.md
3
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`:
|
||||
|
|
8
install/macos/build_app.py
Executable file → Normal file
8
install/macos/build_app.py
Executable file → Normal file
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue