forked from getsolus/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
onedrive-gui: initial inclusion in the repository
The inclusion of onedrive-gui resolves getsolus#329 **Summary** Add the onedrive-gui package, which provides a gui for package onedrive. **Test Plan** - Launched application - Linked to account - Set up partial sync (exclude and include of directories) **Checklist** - [x] Package was built and tested against unstable
- Loading branch information
Showing
6 changed files
with
486 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This file is used to indicate primary maintainership for this package. A package may list more than one maintainer to avoid bus factor issues. People on this list may be considered “subject-matter experts”. Please note that Solus staff may need to perform necessary rebuilds, upgrades, or security fixes as part of the normal maintenance of the Solus package repository. If you believe this package requires an update, follow documentation from https://help.getsol.us/docs/packaging/procedures/request-a-package-update. In the event that this package becomes insufficiently maintained, the Solus staff reserves the right to request a new maintainer, or deprecate and remove this package from the repository entirely. | ||
|
||
Maik Wöhl | ||
- Matrix: @maikwoehl:matrix.org | ||
- Email: [email protected] |
80 changes: 80 additions & 0 deletions
80
packages/o/onedrive-gui/files/0001-make-project-buildable.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
commit a7535e521c05171953cf05d2caa486d9ff01de5c | ||
Author: Maik Wöhl <[email protected]> | ||
Date: Sat Jan 20 15:19:18 2024 +0100 | ||
|
||
Make project buildable | ||
|
||
diff --git a/MANIFEST.in b/MANIFEST.in | ||
new file mode 100644 | ||
index 0000000..fca4e5b | ||
--- /dev/null | ||
+++ b/MANIFEST.in | ||
@@ -0,0 +1,2 @@ | ||
+graft src/ui | ||
+graft src/resources | ||
diff --git a/pyproject.toml b/pyproject.toml | ||
new file mode 100644 | ||
index 0000000..e0f1aac | ||
--- /dev/null | ||
+++ b/pyproject.toml | ||
@@ -0,0 +1,14 @@ | ||
+[project] | ||
+name = "onedrive-gui" | ||
+version = "1.0.3" | ||
+description = "A simple GUI for Linux OneDrive Client, with multi-account support." | ||
+readme = "README.md" | ||
+requires-python = ">=3.8" | ||
+license = {file = "LICENSE"} | ||
+ | ||
+[project.scripts] | ||
+onedrive-gui = "OneDriveGUI:main" | ||
+ | ||
+[build-system] | ||
+requires = ["setuptools >= 61.0"] | ||
+build-backend = "setuptools.build_meta" | ||
diff --git a/src/OneDriveGUI.py b/src/OneDriveGUI.py | ||
index 608aa39..5fd04d7 100644 | ||
--- a/src/OneDriveGUI.py | ||
+++ b/src/OneDriveGUI.py | ||
@@ -3164,7 +3164,8 @@ def shorten_path(path, limit): | ||
return path | ||
|
||
|
||
-if __name__ == "__main__": | ||
+def main(): | ||
+ global gui_settings | ||
gui_settings = read_gui_settings() | ||
|
||
logging.basicConfig( | ||
@@ -3173,21 +3174,31 @@ if __name__ == "__main__": | ||
level=config_debug_level(), | ||
) | ||
|
||
+ global client_bin_path | ||
client_bin_path = config_client_bin_path() | ||
+ global client_version | ||
client_version = get_installed_client_version() | ||
+ global global_config | ||
global_config = create_global_config() | ||
|
||
if len(global_config) > 0: | ||
save_global_config() | ||
|
||
+ global temp_global_config | ||
temp_global_config = copy.deepcopy(global_config) | ||
|
||
+ global app | ||
app = QApplication(sys.argv) | ||
app.setApplicationName("OneDriveGUI") | ||
app.setWindowIcon(QIcon(DIR_PATH + "/resources/images/icons8-clouds-48.png")) | ||
|
||
+ global main_window | ||
main_window = MainWindow() | ||
main_window_start_state() | ||
+ global profile_settings_window | ||
profile_settings_window = ProfileSettingsWindow() | ||
|
||
app.exec() | ||
+ | ||
+if __name__ == "__main__": | ||
+ main() |
261 changes: 261 additions & 0 deletions
261
packages/o/onedrive-gui/files/0002-create-package-directory.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,261 @@ | ||
commit 22e7d043d15c30f747dc19382dc73e1d734ce010 | ||
Author: Maik Wöhl <[email protected]> | ||
Date: Sun Jan 21 16:50:39 2024 +0100 | ||
|
||
Create package directory | ||
|
||
diff --git a/MANIFEST.in b/MANIFEST.in | ||
index fca4e5b..6aa67f5 100644 | ||
--- a/MANIFEST.in | ||
+++ b/MANIFEST.in | ||
@@ -1,2 +1,2 @@ | ||
-graft src/ui | ||
-graft src/resources | ||
+graft src/onedrive_gui/ui | ||
+graft src/onedrive_gui/resources | ||
diff --git a/pyproject.toml b/pyproject.toml | ||
index e0f1aac..b84da14 100644 | ||
--- a/pyproject.toml | ||
+++ b/pyproject.toml | ||
@@ -7,7 +7,7 @@ requires-python = ">=3.8" | ||
license = {file = "LICENSE"} | ||
|
||
[project.scripts] | ||
-onedrive-gui = "OneDriveGUI:main" | ||
+onedrive-gui = "onedrive_gui.OneDriveGUI:main" | ||
|
||
[build-system] | ||
requires = ["setuptools >= 61.0"] | ||
diff --git a/src/OneDriveGUI.py b/src/onedrive_gui/OneDriveGUI.py | ||
similarity index 99% | ||
rename from src/OneDriveGUI.py | ||
rename to src/onedrive_gui/OneDriveGUI.py | ||
index 5fd04d7..60c0d0e 100644 | ||
--- a/src/OneDriveGUI.py | ||
+++ b/src/onedrive_gui/OneDriveGUI.py | ||
@@ -43,26 +43,26 @@ from urllib3 import HTTPSConnectionPool | ||
# TODO: Split into multiple files once all main features are implemented. | ||
|
||
# Imports for main window. | ||
-from ui.ui_mainwindow import Ui_MainWindow | ||
-from ui.ui_list_item_widget import Ui_list_item_widget | ||
-from ui.ui_process_status_page import Ui_status_page | ||
+from .ui.ui_mainwindow import Ui_MainWindow | ||
+from .ui.ui_list_item_widget import Ui_list_item_widget | ||
+from .ui.ui_process_status_page import Ui_status_page | ||
|
||
|
||
# Imports for Profiles windows. | ||
-from ui.ui_profile_settings_window import Ui_profile_settings_window | ||
-from ui.ui_profile_settings_page import Ui_profile_settings | ||
+from .ui.ui_profile_settings_window import Ui_profile_settings_window | ||
+from .ui.ui_profile_settings_page import Ui_profile_settings | ||
|
||
# Imports for GUI settings window | ||
-from ui.ui_gui_settings_window import Ui_gui_settings_window | ||
+from .ui.ui_gui_settings_window import Ui_gui_settings_window | ||
|
||
# Import for login windows. | ||
# Don't use WebEngine login window when running from AppImage. | ||
DIR_PATH = os.path.dirname(os.path.realpath(__file__)) | ||
APPIMAGE = True if "tmp/.mount_one" in DIR_PATH.lower() else False | ||
if APPIMAGE: | ||
- from ui.ui_external_login import Ui_ExternalLoginWindow | ||
+ from .ui.ui_external_login import Ui_ExternalLoginWindow | ||
else: | ||
- from ui.ui_login import Ui_LoginWindow | ||
+ from .ui.ui_login import Ui_LoginWindow | ||
|
||
|
||
PROFILES_FILE = os.path.expanduser("~/.config/onedrive-gui/profiles") | ||
diff --git a/src/onedrive_gui/__init__.py b/src/onedrive_gui/__init__.py | ||
new file mode 100644 | ||
index 0000000..e69de29 | ||
diff --git a/src/resources/OneDriveGUI.desktop b/src/onedrive_gui/resources/OneDriveGUI.desktop | ||
similarity index 100% | ||
rename from src/resources/OneDriveGUI.desktop | ||
rename to src/onedrive_gui/resources/OneDriveGUI.desktop | ||
diff --git a/src/resources/default_config b/src/onedrive_gui/resources/default_config | ||
similarity index 100% | ||
rename from src/resources/default_config | ||
rename to src/onedrive_gui/resources/default_config | ||
diff --git a/src/resources/images/OneDriveGUI.ico b/src/onedrive_gui/resources/images/OneDriveGUI.ico | ||
similarity index 100% | ||
rename from src/resources/images/OneDriveGUI.ico | ||
rename to src/onedrive_gui/resources/images/OneDriveGUI.ico | ||
diff --git a/src/resources/images/OneDriveGUI.png b/src/onedrive_gui/resources/images/OneDriveGUI.png | ||
similarity index 100% | ||
rename from src/resources/images/OneDriveGUI.png | ||
rename to src/onedrive_gui/resources/images/OneDriveGUI.png | ||
diff --git a/src/resources/images/account.png b/src/onedrive_gui/resources/images/account.png | ||
similarity index 100% | ||
rename from src/resources/images/account.png | ||
rename to src/onedrive_gui/resources/images/account.png | ||
diff --git a/src/resources/images/close-filled.png b/src/onedrive_gui/resources/images/close-filled.png | ||
similarity index 100% | ||
rename from src/resources/images/close-filled.png | ||
rename to src/onedrive_gui/resources/images/close-filled.png | ||
diff --git a/src/resources/images/folder.png b/src/onedrive_gui/resources/images/folder.png | ||
similarity index 100% | ||
rename from src/resources/images/folder.png | ||
rename to src/onedrive_gui/resources/images/folder.png | ||
diff --git a/src/resources/images/gear.png b/src/onedrive_gui/resources/images/gear.png | ||
similarity index 100% | ||
rename from src/resources/images/gear.png | ||
rename to src/onedrive_gui/resources/images/gear.png | ||
diff --git a/src/resources/images/icons8-cloud-cross-40_2.png b/src/onedrive_gui/resources/images/icons8-cloud-cross-40_2.png | ||
similarity index 100% | ||
rename from src/resources/images/icons8-cloud-cross-40_2.png | ||
rename to src/onedrive_gui/resources/images/icons8-cloud-cross-40_2.png | ||
diff --git a/src/resources/images/icons8-cloud-done-40_2.png b/src/onedrive_gui/resources/images/icons8-cloud-done-40_2.png | ||
similarity index 100% | ||
rename from src/resources/images/icons8-cloud-done-40_2.png | ||
rename to src/onedrive_gui/resources/images/icons8-cloud-done-40_2.png | ||
diff --git a/src/resources/images/icons8-cloud-sync-40_2.png b/src/onedrive_gui/resources/images/icons8-cloud-sync-40_2.png | ||
similarity index 100% | ||
rename from src/resources/images/icons8-cloud-sync-40_2.png | ||
rename to src/onedrive_gui/resources/images/icons8-cloud-sync-40_2.png | ||
diff --git a/src/resources/images/icons8-clouds-48.ico b/src/onedrive_gui/resources/images/icons8-clouds-48.ico | ||
similarity index 100% | ||
rename from src/resources/images/icons8-clouds-48.ico | ||
rename to src/onedrive_gui/resources/images/icons8-clouds-48.ico | ||
diff --git a/src/resources/images/icons8-clouds-48.png b/src/onedrive_gui/resources/images/icons8-clouds-48.png | ||
similarity index 100% | ||
rename from src/resources/images/icons8-clouds-48.png | ||
rename to src/onedrive_gui/resources/images/icons8-clouds-48.png | ||
diff --git a/src/resources/images/icons8-clouds-80-dark-edge.png b/src/onedrive_gui/resources/images/icons8-clouds-80-dark-edge.png | ||
similarity index 100% | ||
rename from src/resources/images/icons8-clouds-80-dark-edge.png | ||
rename to src/onedrive_gui/resources/images/icons8-clouds-80-dark-edge.png | ||
diff --git a/src/resources/images/icons8-green-circle-48.png b/src/onedrive_gui/resources/images/icons8-green-circle-48.png | ||
similarity index 100% | ||
rename from src/resources/images/icons8-green-circle-48.png | ||
rename to src/onedrive_gui/resources/images/icons8-green-circle-48.png | ||
diff --git a/src/resources/images/icons8-red-circle-48.png b/src/onedrive_gui/resources/images/icons8-red-circle-48.png | ||
similarity index 100% | ||
rename from src/resources/images/icons8-red-circle-48.png | ||
rename to src/onedrive_gui/resources/images/icons8-red-circle-48.png | ||
diff --git a/src/resources/images/menu.png b/src/onedrive_gui/resources/images/menu.png | ||
similarity index 100% | ||
rename from src/resources/images/menu.png | ||
rename to src/onedrive_gui/resources/images/menu.png | ||
diff --git a/src/resources/images/pause.png b/src/onedrive_gui/resources/images/pause.png | ||
similarity index 100% | ||
rename from src/resources/images/pause.png | ||
rename to src/onedrive_gui/resources/images/pause.png | ||
diff --git a/src/resources/images/play.png b/src/onedrive_gui/resources/images/play.png | ||
similarity index 100% | ||
rename from src/resources/images/play.png | ||
rename to src/onedrive_gui/resources/images/play.png | ||
diff --git a/src/resources/images/quit.png b/src/onedrive_gui/resources/images/quit.png | ||
similarity index 100% | ||
rename from src/resources/images/quit.png | ||
rename to src/onedrive_gui/resources/images/quit.png | ||
diff --git a/src/resources/images/stop.png b/src/onedrive_gui/resources/images/stop.png | ||
similarity index 100% | ||
rename from src/resources/images/stop.png | ||
rename to src/onedrive_gui/resources/images/stop.png | ||
diff --git a/src/resources/images/storage.png b/src/onedrive_gui/resources/images/storage.png | ||
similarity index 100% | ||
rename from src/resources/images/storage.png | ||
rename to src/onedrive_gui/resources/images/storage.png | ||
diff --git a/src/resources/images/user-account.png b/src/onedrive_gui/resources/images/user-account.png | ||
similarity index 100% | ||
rename from src/resources/images/user-account.png | ||
rename to src/onedrive_gui/resources/images/user-account.png | ||
diff --git a/src/resources/images/warning.png b/src/onedrive_gui/resources/images/warning.png | ||
similarity index 100% | ||
rename from src/resources/images/warning.png | ||
rename to src/onedrive_gui/resources/images/warning.png | ||
diff --git a/src/ui/create_new_profile.ui b/src/onedrive_gui/ui/create_new_profile.ui | ||
similarity index 100% | ||
rename from src/ui/create_new_profile.ui | ||
rename to src/onedrive_gui/ui/create_new_profile.ui | ||
diff --git a/src/ui/external_login.ui b/src/onedrive_gui/ui/external_login.ui | ||
similarity index 100% | ||
rename from src/ui/external_login.ui | ||
rename to src/onedrive_gui/ui/external_login.ui | ||
diff --git a/src/ui/gui_settings_window.ui b/src/onedrive_gui/ui/gui_settings_window.ui | ||
similarity index 100% | ||
rename from src/ui/gui_settings_window.ui | ||
rename to src/onedrive_gui/ui/gui_settings_window.ui | ||
diff --git a/src/ui/import_existing_profile.ui b/src/onedrive_gui/ui/import_existing_profile.ui | ||
similarity index 100% | ||
rename from src/ui/import_existing_profile.ui | ||
rename to src/onedrive_gui/ui/import_existing_profile.ui | ||
diff --git a/src/ui/list_item_widget.ui b/src/onedrive_gui/ui/list_item_widget.ui | ||
similarity index 100% | ||
rename from src/ui/list_item_widget.ui | ||
rename to src/onedrive_gui/ui/list_item_widget.ui | ||
diff --git a/src/ui/login.ui b/src/onedrive_gui/ui/login.ui | ||
similarity index 100% | ||
rename from src/ui/login.ui | ||
rename to src/onedrive_gui/ui/login.ui | ||
diff --git a/src/ui/mainwindow.ui b/src/onedrive_gui/ui/mainwindow.ui | ||
similarity index 100% | ||
rename from src/ui/mainwindow.ui | ||
rename to src/onedrive_gui/ui/mainwindow.ui | ||
diff --git a/src/ui/mainwindow.ui.autosave b/src/onedrive_gui/ui/mainwindow.ui.autosave | ||
similarity index 100% | ||
rename from src/ui/mainwindow.ui.autosave | ||
rename to src/onedrive_gui/ui/mainwindow.ui.autosave | ||
diff --git a/src/ui/process_status_page.ui b/src/onedrive_gui/ui/process_status_page.ui | ||
similarity index 100% | ||
rename from src/ui/process_status_page.ui | ||
rename to src/onedrive_gui/ui/process_status_page.ui | ||
diff --git a/src/ui/profile_settings_page.ui b/src/onedrive_gui/ui/profile_settings_page.ui | ||
similarity index 100% | ||
rename from src/ui/profile_settings_page.ui | ||
rename to src/onedrive_gui/ui/profile_settings_page.ui | ||
diff --git a/src/ui/profile_settings_window.ui b/src/onedrive_gui/ui/profile_settings_window.ui | ||
similarity index 100% | ||
rename from src/ui/profile_settings_window.ui | ||
rename to src/onedrive_gui/ui/profile_settings_window.ui | ||
diff --git a/src/ui/setup_wizard.ui b/src/onedrive_gui/ui/setup_wizard.ui | ||
similarity index 100% | ||
rename from src/ui/setup_wizard.ui | ||
rename to src/onedrive_gui/ui/setup_wizard.ui | ||
diff --git a/src/ui/test.ui b/src/onedrive_gui/ui/test.ui | ||
similarity index 100% | ||
rename from src/ui/test.ui | ||
rename to src/onedrive_gui/ui/test.ui | ||
diff --git a/src/ui/ui_create_new_profile.py b/src/onedrive_gui/ui/ui_create_new_profile.py | ||
similarity index 100% | ||
rename from src/ui/ui_create_new_profile.py | ||
rename to src/onedrive_gui/ui/ui_create_new_profile.py | ||
diff --git a/src/ui/ui_external_login.py b/src/onedrive_gui/ui/ui_external_login.py | ||
similarity index 100% | ||
rename from src/ui/ui_external_login.py | ||
rename to src/onedrive_gui/ui/ui_external_login.py | ||
diff --git a/src/ui/ui_gui_settings_window.py b/src/onedrive_gui/ui/ui_gui_settings_window.py | ||
similarity index 100% | ||
rename from src/ui/ui_gui_settings_window.py | ||
rename to src/onedrive_gui/ui/ui_gui_settings_window.py | ||
diff --git a/src/ui/ui_import_existing_profile.py b/src/onedrive_gui/ui/ui_import_existing_profile.py | ||
similarity index 100% | ||
rename from src/ui/ui_import_existing_profile.py | ||
rename to src/onedrive_gui/ui/ui_import_existing_profile.py | ||
diff --git a/src/ui/ui_list_item_widget.py b/src/onedrive_gui/ui/ui_list_item_widget.py | ||
similarity index 100% | ||
rename from src/ui/ui_list_item_widget.py | ||
rename to src/onedrive_gui/ui/ui_list_item_widget.py | ||
diff --git a/src/ui/ui_login.py b/src/onedrive_gui/ui/ui_login.py | ||
similarity index 100% | ||
rename from src/ui/ui_login.py | ||
rename to src/onedrive_gui/ui/ui_login.py | ||
diff --git a/src/ui/ui_mainwindow.py b/src/onedrive_gui/ui/ui_mainwindow.py | ||
similarity index 100% | ||
rename from src/ui/ui_mainwindow.py | ||
rename to src/onedrive_gui/ui/ui_mainwindow.py | ||
diff --git a/src/ui/ui_process_status_page.py b/src/onedrive_gui/ui/ui_process_status_page.py | ||
similarity index 100% | ||
rename from src/ui/ui_process_status_page.py | ||
rename to src/onedrive_gui/ui/ui_process_status_page.py | ||
diff --git a/src/ui/ui_profile_settings_page.py b/src/onedrive_gui/ui/ui_profile_settings_page.py | ||
similarity index 100% | ||
rename from src/ui/ui_profile_settings_page.py | ||
rename to src/onedrive_gui/ui/ui_profile_settings_page.py | ||
diff --git a/src/ui/ui_profile_settings_window.py b/src/onedrive_gui/ui/ui_profile_settings_window.py | ||
similarity index 100% | ||
rename from src/ui/ui_profile_settings_window.py | ||
rename to src/onedrive_gui/ui/ui_profile_settings_window.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
0001-make-project-buildable.patch | ||
0002-create-package-directory.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name : onedrive-gui | ||
version : 1.0.3 | ||
release : 1 | ||
source : | ||
- https://github.com/bpozdena/OneDriveGUI/archive/refs/tags/v1.0.3.tar.gz : 30511dd2b9c3c548e125564c08e2aaf50f0cfe348abded5733ea04dfa8eb93cf | ||
homepage : https://github.com/bpozdena/OneDriveGUI | ||
license : GPL-3.0-or-later | ||
component : network.clients | ||
summary : A simple GUI for Linux OneDrive Client, with multi-account support. | ||
description: | | ||
A simple GUI for Linux OneDrive Client, with multi-account support. | ||
builddeps : | ||
- python-build | ||
- python-installer | ||
- python-pyside6 | ||
- python-requests | ||
- python-wheel | ||
rundeps : | ||
- onedrive | ||
- python-pyside6 | ||
- python-requests | ||
setup : | | ||
%apply_patches | ||
build : | | ||
%python3_setup | ||
install : | | ||
%python3_install |
Oops, something went wrong.