mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 02:12:36 +02:00
Enable the sandbox
This commit is contained in:
parent
2dd509f980
commit
720810da5d
2 changed files with 46 additions and 21 deletions
|
@ -65,10 +65,12 @@ def main():
|
||||||
shutil.rmtree(os.path.join(dist_path, "dangerzone"))
|
shutil.rmtree(os.path.join(dist_path, "dangerzone"))
|
||||||
|
|
||||||
os.symlink(
|
os.symlink(
|
||||||
"dangerzone", os.path.join(app_path, "Contents/MacOS/dangerzone-container"),
|
"dangerzone",
|
||||||
|
os.path.join(app_path, "Contents/MacOS/dangerzone-container"),
|
||||||
)
|
)
|
||||||
os.symlink(
|
os.symlink(
|
||||||
"dangerzone", os.path.join(app_path, "Contents/MacOS/dangerzone-cli"),
|
"dangerzone",
|
||||||
|
os.path.join(app_path, "Contents/MacOS/dangerzone-cli"),
|
||||||
)
|
)
|
||||||
|
|
||||||
print(f"○ Finished build app: {app_path}")
|
print(f"○ Finished build app: {app_path}")
|
||||||
|
@ -91,24 +93,37 @@ def main():
|
||||||
|
|
||||||
# Detect if create-dmg is installed
|
# Detect if create-dmg is installed
|
||||||
if not os.path.exists("/usr/local/bin/create-dmg"):
|
if not os.path.exists("/usr/local/bin/create-dmg"):
|
||||||
print("Error: create-dmg is not installed")
|
print("create-dmg is not installed, skipping creating a DMG")
|
||||||
return
|
return
|
||||||
|
|
||||||
print("○ Creating DMG")
|
print("○ Creating DMG")
|
||||||
run([
|
run(
|
||||||
|
[
|
||||||
"create-dmg",
|
"create-dmg",
|
||||||
"--volname", "Dangerzone",
|
"--volname",
|
||||||
"--volicon", icon_path,
|
"Dangerzone",
|
||||||
"--window-size", "400", "200",
|
"--volicon",
|
||||||
"--icon-size", "100",
|
icon_path,
|
||||||
"--icon", "Dangerzone.app", "100", "70",
|
"--window-size",
|
||||||
"--hide-extension", "Dangerzone.app",
|
"400",
|
||||||
"--app-drop-link", "300", "70",
|
"200",
|
||||||
|
"--icon-size",
|
||||||
|
"100",
|
||||||
|
"--icon",
|
||||||
|
"Dangerzone.app",
|
||||||
|
"100",
|
||||||
|
"70",
|
||||||
|
"--hide-extension",
|
||||||
|
"Dangerzone.app",
|
||||||
|
"--app-drop-link",
|
||||||
|
"300",
|
||||||
|
"70",
|
||||||
dmg_path,
|
dmg_path,
|
||||||
app_path,
|
app_path,
|
||||||
"--identity",
|
"--identity",
|
||||||
identity_name_application
|
identity_name_application,
|
||||||
])
|
]
|
||||||
|
)
|
||||||
|
|
||||||
print(f"○ Finished building DMG: {dmg_path}")
|
print(f"○ Finished building DMG: {dmg_path}")
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,21 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<!-- Required for binaries built with PyInstaller -->
|
<key>com.apple.security.app-sandbox</key>
|
||||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>com.apple.security.inherit</key>
|
||||||
<key>com.apple.vm.networking</key>
|
<true/>
|
||||||
|
<key>com.apple.security.files.user-selected.read-write</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.network.client</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.network.server</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.hypervisor</key>
|
||||||
|
<true/>
|
||||||
|
<!-- <key>com.apple.vm.networking</key>
|
||||||
|
<true/> -->
|
||||||
|
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
Loading…
Reference in a new issue