mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12: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:
|
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
|
```sh
|
||||||
npm install --global create-dmg
|
brew install create-dmg graphicsmagick imagemagick
|
||||||
brew install graphicsmagick imagemagick
|
|
||||||
```
|
```
|
||||||
|
|
||||||
And then run `build_app.py --with-codesign`:
|
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")
|
build_path = os.path.join(root, "build")
|
||||||
dist_path = os.path.join(root, "dist")
|
dist_path = os.path.join(root, "dist")
|
||||||
app_path = os.path.join(dist_path, "Dangerzone.app")
|
app_path = os.path.join(dist_path, "Dangerzone.app")
|
||||||
|
dmg_path = os.path.join(dist_path, "Dangerzone.dmg")
|
||||||
|
|
||||||
print("○ Deleting old build and dist")
|
print("○ Deleting old build and dist")
|
||||||
if os.path.exists(build_path):
|
if os.path.exists(build_path):
|
||||||
|
@ -76,12 +77,9 @@ def main():
|
||||||
return
|
return
|
||||||
|
|
||||||
print("○ Creating DMG")
|
print("○ Creating DMG")
|
||||||
run(["create-dmg", app_path, "--identity", identity_name_application])
|
run(["create-dmg", dmg_path, 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]
|
|
||||||
|
|
||||||
print(f"○ Finished building DMG: {dmg_filename}")
|
print(f"○ Finished building DMG: {dmg_path}")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("○ Skipping code signing")
|
print("○ Skipping code signing")
|
||||||
|
|
Loading…
Reference in a new issue