mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Move container to its own folder
This commit is contained in:
parent
0b9823a34e
commit
fe028e5f0c
4 changed files with 16 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
from PyQt5 import QtCore, QtWidgets
|
||||
import os
|
||||
import sys
|
||||
import signal
|
||||
import click
|
||||
|
@ -39,6 +40,17 @@ def main(filename):
|
|||
return
|
||||
|
||||
filename = filename[0]
|
||||
else:
|
||||
# Validate filename
|
||||
filename = os.path.abspath(os.path.expanduser(filename))
|
||||
try:
|
||||
open(filename, "rb")
|
||||
except FileNotFoundError:
|
||||
print("File not found")
|
||||
return
|
||||
except PermissionError:
|
||||
print("Permission denied")
|
||||
return
|
||||
|
||||
main_window.start(filename)
|
||||
sys.exit(app.exec_())
|
||||
|
|
|
@ -10,8 +10,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||
self.common = common
|
||||
|
||||
self.setWindowTitle("dangerzone")
|
||||
self.setMinimumWidth(600)
|
||||
self.setMinimumHeight(500)
|
||||
self.setMinimumWidth(500)
|
||||
self.setMinimumHeight(400)
|
||||
|
||||
self.task_label = QtWidgets.QLabel()
|
||||
self.task_label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
|
|
|
@ -54,9 +54,9 @@ class BuildContainerTask(TaskBase):
|
|||
self.common = common
|
||||
|
||||
def run(self):
|
||||
containerfile = self.common.get_resource_path("Containerfile")
|
||||
container_path = self.common.get_resource_path("container")
|
||||
self.update_label.emit("Building container")
|
||||
self.update_details.emit("")
|
||||
args = ["podman", "build", "-t", "dangerzone", "-f", containerfile]
|
||||
args = ["podman", "build", "-t", "dangerzone", container_path]
|
||||
self.execute_podman(args)
|
||||
self.thread_finished.emit()
|
||||
|
|
Loading…
Reference in a new issue