mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
commit
68da5dda52
9 changed files with 8 additions and 65 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule "share/container"]
|
||||
path = share/container
|
||||
url = git@github.com:firstlookmedia/dangerzone-converter.git
|
7
BUILD.md
7
BUILD.md
|
@ -1,12 +1,5 @@
|
|||
# Development environment
|
||||
|
||||
After cloning this git repo, make sure to checkout the git submodules.
|
||||
|
||||
```
|
||||
git submodule init
|
||||
git submodule update
|
||||
```
|
||||
|
||||
## Debian/Ubuntu
|
||||
|
||||
Install dependencies:
|
||||
|
|
|
@ -18,12 +18,10 @@ git fetch
|
|||
git tag -v v$VERSION
|
||||
```
|
||||
|
||||
If the tag verifies successfully, check it out, and also its submodules:
|
||||
If the tag verifies successfully and check it out:
|
||||
|
||||
```
|
||||
git checkout v$VERSION
|
||||
git submodule init
|
||||
git submodule update
|
||||
```
|
||||
|
||||
## macOS release
|
||||
|
|
|
@ -61,7 +61,7 @@ class PullImageTask(TaskBase):
|
|||
def run(self):
|
||||
self.update_label.emit("Pulling container image")
|
||||
self.update_details.emit("")
|
||||
args = ["pull", "debian:buster"]
|
||||
args = ["pull", "flmcode/dangerzone"]
|
||||
returncode, _ = self.exec_container(args, watch="stderr")
|
||||
|
||||
if returncode != 0:
|
||||
|
@ -71,26 +71,6 @@ class PullImageTask(TaskBase):
|
|||
self.task_finished.emit()
|
||||
|
||||
|
||||
class BuildContainerTask(TaskBase):
|
||||
def __init__(self, global_common, common):
|
||||
super(BuildContainerTask, self).__init__()
|
||||
self.global_common = global_common
|
||||
self.common = common
|
||||
|
||||
def run(self):
|
||||
container_path = self.global_common.get_resource_path("container")
|
||||
self.update_label.emit("Building container (this might take a long time)")
|
||||
self.update_details.emit("")
|
||||
args = ["build", "-t", "dangerzone", container_path]
|
||||
returncode, _ = self.exec_container(args)
|
||||
|
||||
if returncode != 0:
|
||||
self.task_failed.emit(f"Return code: {returncode}")
|
||||
return
|
||||
|
||||
self.task_finished.emit()
|
||||
|
||||
|
||||
class ConvertToPixels(TaskBase):
|
||||
def __init__(self, global_common, common):
|
||||
super(ConvertToPixels, self).__init__()
|
||||
|
@ -111,7 +91,7 @@ class ConvertToPixels(TaskBase):
|
|||
f"{self.common.document_filename}:/tmp/input_file",
|
||||
"-v",
|
||||
f"{self.common.pixel_dir.name}:/dangerzone",
|
||||
"dangerzone",
|
||||
"flmcode/dangerzone",
|
||||
"document-to-pixels",
|
||||
]
|
||||
returncode, output = self.exec_container(args)
|
||||
|
@ -220,7 +200,7 @@ class ConvertToPDF(TaskBase):
|
|||
f"{self.common.safe_dir.name}:/safezone",
|
||||
]
|
||||
+ envs
|
||||
+ ["dangerzone", "pixels-to-pdf",]
|
||||
+ ["flmcode/dangerzone", "pixels-to-pdf",]
|
||||
)
|
||||
returncode, output = self.exec_container(args)
|
||||
|
||||
|
@ -229,4 +209,3 @@ class ConvertToPDF(TaskBase):
|
|||
return
|
||||
|
||||
self.task_finished.emit()
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import platform
|
|||
import subprocess
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from .tasks import PullImageTask, BuildContainerTask, ConvertToPixels, ConvertToPDF
|
||||
from .tasks import PullImageTask, ConvertToPixels, ConvertToPDF
|
||||
|
||||
|
||||
class TasksWidget(QtWidgets.QWidget):
|
||||
|
@ -59,7 +59,7 @@ class TasksWidget(QtWidgets.QWidget):
|
|||
|
||||
def start(self):
|
||||
if self.global_common.settings.get("update_container"):
|
||||
self.tasks += [PullImageTask, BuildContainerTask]
|
||||
self.tasks += [PullImageTask]
|
||||
self.tasks += [ConvertToPixels, ConvertToPDF]
|
||||
self.next_task()
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ sys.path.insert(0, root)
|
|||
import dangerzone
|
||||
|
||||
version = dangerzone.dangerzone_version
|
||||
print("Flock Agent version: {}".format(version))
|
||||
print("Dangerzone version: {}".format(version))
|
||||
|
||||
if p == "Darwin":
|
||||
datas = [("../../share", "share"), ("../macos/../macos/document.icns", ".")]
|
||||
|
|
|
@ -40,11 +40,7 @@
|
|||
<Directory Id="FolderPyQt5QtTranslations" Name="translations" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="FolderShare" Name="share">
|
||||
<Directory Id="FolderShareContainer" Name="container">
|
||||
<Directory Id="FolderShareContainerScripts" Name="scripts" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="FolderShare" Name="share" />
|
||||
<Directory Id="FolderWin32com" Name="win32com">
|
||||
<Directory Id="FolderWin32comShell" Name="shell" />
|
||||
</Directory>
|
||||
|
@ -202,23 +198,6 @@
|
|||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="FolderShareContainer">
|
||||
<Component Id="FolderComponentShareContainer" Guid="4a3e5a58-8804-40eb-8216-5f0d75e8afa2">
|
||||
<File Source="..\..\dist\dangerzone\share\container\Dockerfile" />
|
||||
<File Source="..\..\dist\dangerzone\share\container\LICENSE" />
|
||||
<File Source="..\..\dist\dangerzone\share\container\README.md" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="FolderShareContainerScripts">
|
||||
<Component Id="FolderComponentShareContainerScripts" Guid="863a148f-b0cd-404f-ab59-fc29d5961786">
|
||||
<File Source="..\..\dist\dangerzone\share\container\scripts\document-to-pixels" />
|
||||
<File Source="..\..\dist\dangerzone\share\container\scripts\document-to-pixels-unpriv" />
|
||||
<File Source="..\..\dist\dangerzone\share\container\scripts\pixels-to-pdf" />
|
||||
<File Source="..\..\dist\dangerzone\share\container\scripts\pixels-to-pdf-unpriv" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="FolderWin32comShell">
|
||||
<Component Id="FolderComponentWin32comShell" Guid="b51f7768-64f2-4666-a919-736a6ae6c332">
|
||||
<File Source="..\..\dist\dangerzone\win32com\shell\shell.pyd" />
|
||||
|
|
2
setup.py
2
setup.py
|
@ -29,8 +29,6 @@ setuptools.setup(
|
|||
["install/linux/media.firstlook.dangerzone.png"],
|
||||
),
|
||||
("share/dangerzone", file_list("share")),
|
||||
("share/dangerzone/container", file_list("share/container")),
|
||||
("share/dangerzone/container/scripts", file_list("share/container/scripts")),
|
||||
],
|
||||
classifiers=[
|
||||
"Programming Language :: Python",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 9de7f4cd81e71df0dcea4c4f9a76bee6a27cb234
|
Loading…
Reference in a new issue