Rename gui dirs and remove non-required dependencies

This commit is contained in:
Bernd Schoolmann 2024-02-09 15:47:20 +01:00
parent 39d1ec6980
commit 53989ebaa3
No known key found for this signature in database
26 changed files with 34 additions and 70 deletions

View File

@ -2,7 +2,7 @@ id: com.quexten.Goldwarden
runtime: org.gnome.Platform
runtime-version: '45'
sdk: org.gnome.Sdk
command: src/goldwarden_ui_main.py
command: goldwarden_ui_main.py
finish-args:
# Allow network access for sync
- --share=network
@ -28,7 +28,7 @@ finish-args:
# biometric / user password auth
- --system-talk-name=org.freedesktop.PolicyKit1
modules:
- ./ui/python3-requirements.json
- ./gui/python3-requirements.json
- name: wl-clipboard
buildsystem: meson
config-opts:
@ -40,11 +40,11 @@ modules:
- name: goldwarden-python-ui
buildsystem: simple
build-commands:
- cp -R ./ui/* /app/bin
- chmod +x /app/bin/src/goldwarden_ui_main.py
- install -D ./ui/com.quexten.Goldwarden.desktop /app/share/applications/com.quexten.Goldwarden.desktop
- install -D ./ui/goldwarden.svg /app/share/icons/hicolor/scalable/apps/com.quexten.Goldwarden.svg
- install -Dm644 ./ui/com.quexten.Goldwarden.metainfo.xml -t /app/share/metainfo/
- cp -R ./gui/* /app/bin
- chmod +x /app/bin/goldwarden_ui_main.py
- install -D ./gui/com.quexten.Goldwarden.desktop /app/share/applications/com.quexten.Goldwarden.desktop
- install -D ./gui/goldwarden.svg /app/share/icons/hicolor/scalable/apps/com.quexten.Goldwarden.svg
- install -Dm644 ./gui/com.quexten.Goldwarden.metainfo.xml -t /app/share/metainfo/
sources:
- type: dir
path: ./

View File

@ -2,7 +2,7 @@
Name=Goldwarden
Comment=A Bitwarden compatible desktop password manager
Keywords=password;ssh;auto-type;keys;
Exec=src/goldwarden_ui_main.py
Exec=goldwarden_ui_main.py
Terminal=false
Type=Application
Icon=com.quexten.Goldwarden

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,4 @@
#!/usr/bin/env python3
import src.linux.main as linux_main
linux_main.main()

View File

@ -0,0 +1,14 @@
{
"name": "python3-tendo",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"tendo==0.3.0\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ce/3f/761077d55732b0b1a673b15d4fdaa947a7c1eb5c9a23b7142df557019823/tendo-0.3.0-py3-none-any.whl",
"sha256": "026b70b355ea4c9da7c2123fa2d5c280c8983c1b34e329ff49260e2e78b93be7"
}
]
}

1
gui/requirements.txt Normal file
View File

@ -0,0 +1 @@
tendo==0.3.0

View File

@ -51,7 +51,7 @@ class SettingsWinvdow(Gtk.ApplicationWindow):
self.autotype_button.set_label("Quick Access")
self.autotype_button.set_margin_top(10)
def quickaccess_button_clicked():
p = subprocess.Popen(["python3", "-m", "src.ui.quickaccess"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
p = subprocess.Popen(["python3", "-m", "src.gui.quickaccess"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
p.stdin.write(f"{token}\n".encode())
p.stdin.flush()
self.autotype_button.connect("clicked", lambda button: quickaccess_button_clicked())

View File

@ -5,7 +5,7 @@ from tendo import singleton
from .monitors import dbus_autofill_monitor
from .monitors import dbus_monitor
import sys
from services import goldwarden
from src.services import goldwarden
from threading import Thread
import os
import secrets
@ -38,7 +38,7 @@ def main():
dbus_monitor.run_daemon(token)
if not "--hidden" in sys.argv:
p = subprocess.Popen(["python3", "-m", "src.ui.settings"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
p = subprocess.Popen(["python3", "-m", "src.gui.settings"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
p.stdin.write(f"{token}\n".encode())
p.stdin.flush()

View File

@ -16,7 +16,7 @@ class GoldwardenDBUSService(dbus.service.Object):
@dbus.service.method('com.quexten.Goldwarden.Autofill')
def autofill(self):
p = subprocess.Popen(["python3", "-m", "src.ui.quickaccess"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
p = subprocess.Popen(["python3", "-m", "src.gui.quickaccess"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
p.stdin.write(f"{daemon_token}\n".encode())
p.stdin.flush()
return ""

View File

@ -16,14 +16,14 @@ class GoldwardenDBUSService(dbus.service.Object):
@dbus.service.method('com.quexten.Goldwarden.ui.QuickAccess')
def quickaccess(self):
p = subprocess.Popen(["python3", "-m", "src.ui.quickaccess"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
p = subprocess.Popen(["python3", "-m", "src.gui.quickaccess"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
p.stdin.write(f"{daemon_token}\n".encode())
p.stdin.flush()
return ""
@dbus.service.method('com.quexten.Goldwarden.ui.Settings')
def settings(self):
subprocess.Popen(["python3", "-m", "src.ui.settings"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
subprocess.Popen(["python3", "-m", "src.gui.settings"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=root_path, start_new_session=True)
p.stdin.write(f"{daemon_token}\n".encode())
p.stdin.flush()
return ""

View File

@ -1,6 +1,6 @@
import subprocess
import os
from src.services import goldwarden
from gui.src.services import goldwarden
root_path = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir))

View File

@ -1,49 +0,0 @@
{
"name": "python3-requirements",
"buildsystem": "simple",
"build-commands": [],
"modules": [
{
"name": "python3-ChaCha20",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"ChaCha20==1.1.1\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/7d/93/2c5c7203bcb1ece177a49d14b32f0e0511f7d4eaf8446c15f7d64af082ad/ChaCha20-1.1.1.tar.gz",
"sha256": "6d6b1ef373058540369c14d2369ab14ee4ffaeae4dc53d8a18b5b617bd06c6bb"
}
]
},
{
"name": "python3-chacha20poly1305",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"chacha20poly1305==0.0.3\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/38/2c/5b4eb73c5cb30ded3082af025e76f529764971c57c02b101e842ff998f63/chacha20poly1305-0.0.3.tar.gz",
"sha256": "f2f005c7cf4638ffa4ff06c02c78748068b642916795c6d16c7cc5e355e70edf"
}
]
},
{
"name": "python3-tendo",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"tendo==0.3.0\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ce/3f/761077d55732b0b1a673b15d4fdaa947a7c1eb5c9a23b7142df557019823/tendo-0.3.0-py3-none-any.whl",
"sha256": "026b70b355ea4c9da7c2123fa2d5c280c8983c1b34e329ff49260e2e78b93be7"
}
]
}
]
}

View File

@ -1,3 +0,0 @@
ChaCha20==1.1.1
chacha20poly1305==0.0.3
tendo==0.3.0

View File

@ -1,3 +0,0 @@
import linux.main as linux_main
linux_main.main()