diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d54019b..75537c9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -20,7 +20,7 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. Linux, Windows] + - OS / distribution: [e.g. Linux - openSuSE Leap 15.5, Windows 11] - Architecture (32 or 64 bit) - Desktop type / Window Manager (KDE, Xfce, Cinnamon, MATE etc) - Thunderbird version and arch (Tb xx.xx.x, 32 or 64 bit) diff --git a/.gitignore b/.gitignore index 2ecfc52..2409c7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,11 @@ -/*.xpi -/SysTray-X -/app/SysTray-X/.qmake.stash -/app/SysTray-X/SysTray-X.pro.user.* -/bin -/bin-* +*.xpi +SysTray-X +app/SysTray-X/.qmake.stash +app/SysTray-X/SysTray-X.pro.user.* +bin +bins +bin-* +tmp +Test +Old +Doc diff --git a/Makefile b/Makefile index 9631a87..e30c677 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,16 @@ else ifeq (GNU/Linux,$(shell uname -o)) SYSTEM = Linux - QMAKE = qmake-qt5 - ifeq (, $(shell which qmake-qt5 2>/dev/null)) - ifeq (, $(shell which qmake 2>/dev/null)) - $(error "No qmake in $(PATH)") + QMAKE = qmake-qt5 + ifeq (, $(shell which qmake-qt5 2>/dev/null)) + QMAKE = qmake6 + ifeq (, $(shell which qmake6 2>/dev/null)) + ifeq (, $(shell which qmake 2>/dev/null)) + $(error "No qmake in $(PATH)") + endif + QMAKE = qmake + endif endif - QMAKE = qmake - endif else $(error "Unknown system") endif diff --git a/README.md b/README.md index 88a9a91..a7b7d5e 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,18 @@ Installing the repository: sudo zypper ar -f https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons/openSUSE_Tumbleweed/ SysTray-X ``` +###### Slowroll + +```bash +sudo zypper ar -f https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons/openSUSE_Slowroll/ SysTray-X +``` + +###### 15.6 + +```bash +sudo zypper ar -f https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons/15.6/ SysTray-X +``` + ###### 15.5 ```bash @@ -143,6 +155,42 @@ sudo zypper in systray-x-minimal Installing the repository: +###### 24.04 LTS + +Remove the Thunderbird snap package: +```bash +sudo apt remove thunderbird +``` + +Install the deb Thunderbird repository: +```bash +sudo add-apt-repository ppa:mozillateam/ppa +sudo nano /etc/apt/preferences.d/mozillateamppa + +``` + +Insert this into the preferences file (it blocks the snap package): +```bash +Package: thunderbird* +Pin: release o=LP-PPA-mozillateam +Pin-Priority: 1001 +``` +Save the file. + +Refresh the repositories and install the deb version of Thunderbird: +```bash +sudo apt update +sudo apt install thunderbird +``` + +Now install the SysTray-X repository: +```bash +wget -q https://download.opensuse.org/repositories/home:/Ximi1970/xUbuntu_24.04/Release.key +sudo mv -f Release.key /etc/apt/trusted.gpg.d/Systray-x.Ximi1970.asc +sudo bash -c 'echo "deb https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons/xUbuntu_24.04 ./" > /etc/apt/sources.list.d/systray-x.list' +sudo apt update +``` + ###### 23.10 ```bash @@ -307,6 +355,13 @@ sudo dnf config-manager --add-repo https://download.opensuse.org/repositories/ho sudo dnf update --refresh ``` +###### 40 + +```bash +sudo dnf config-manager --add-repo https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons/Fedora_40/home:Ximi1970:Mozilla:Add-ons.repo +sudo dnf update --refresh +``` + ###### 39 ```bash @@ -589,6 +644,7 @@ it : lgbaldoni nl : pt_BR : fabianski7 ru_RU : agvantibo +zh_CN : UM-Li ### Remarks diff --git a/app/.gitignore b/app/.gitignore index 30d388a..ac67559 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1 +1,2 @@ -build* \ No newline at end of file +build* +Test diff --git a/app/SysTray-X/SysTray-X-app/SysTray-X-app.pro b/app/SysTray-X/SysTray-X-app/SysTray-X-app.pro index aa552c9..87a82b0 100644 --- a/app/SysTray-X/SysTray-X-app/SysTray-X-app.pro +++ b/app/SysTray-X/SysTray-X-app/SysTray-X-app.pro @@ -19,15 +19,25 @@ include( ../SysTray-X.pri ) # # Set the Qt modules # -QT += core gui +QT += core gui widgets unix:!macx: { contains(DEFINES,KDE_INTEGRATION) { - QT += dbus KNotifications - } - QT += x11extras -} + lessThan(QT_MAJOR_VERSION, 6): { + QT += dbus -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + INCLUDEPATH += /usr/include/KF5/KNotifications + LIBS += -lKF5Notifications + } + greaterThan(QT_MAJOR_VERSION, 5): { + INCLUDEPATH += /usr/include/KF6/KStatusNotifierItem + LIBS += -lKF6StatusNotifierItem + } + } + + lessThan(QT_MAJOR_VERSION, 6): { + QT += x11extras + } +} # # Define the target @@ -45,7 +55,8 @@ TRANSLATIONS = \ languages/$${TARGET}.it.ts \ languages/$${TARGET}.nl.ts \ languages/$${TARGET}.pt-BR.ts \ - languages/$${TARGET}.ru.ts + languages/$${TARGET}.ru.ts \ + languages/$${TARGET}.zh-CN.ts # The following define makes your compiler emit warnings if you use # any feature of Qt which has been marked as deprecated (the exact warnings @@ -150,20 +161,22 @@ win32: { SOURCES += \ + debugwidget.cpp \ main.cpp \ nativeeventfilterbase.cpp \ - shortcut.cpp \ systrayxlink.cpp \ systrayxicon.cpp \ systrayx.cpp \ - debugwidget.cpp \ preferencesdialog.cpp \ preferences.cpp \ + shortcut.cpp \ windowctrl.cpp + unix: { -SOURCES += \ + SOURCES += \ nativeeventfilter-x11.cpp \ windowctrl-unix.cpp + contains(DEFINES,KDE_INTEGRATION) { SOURCES += \ systrayxstatusnotifier.cpp @@ -177,17 +190,18 @@ SOURCES += \ HEADERS += \ debug.h \ + debugwidget.h \ nativeeventfilterbase.h \ - shortcut.h \ + preferencesdialog.h \ + preferences.h \ systrayxlink.h \ systrayxicon.h \ systrayx.h \ - debugwidget.h \ - preferencesdialog.h \ - preferences.h \ + shortcut.h \ windowctrl.h + unix: { -HEADERS += \ + HEADERS += \ nativeeventfilter-x11.h \ windowctrl-unix.h @@ -197,9 +211,13 @@ HEADERS += \ } } win32: { -HEADERS += \ - nativeeventfilter-win.h \ + HEADERS += \ windowctrl-win.h + + lessThan(QT_MAJOR_VERSION, 6): { + HEADERS += \ + nativeeventfilter-win.h + } } FORMS += \ diff --git a/app/SysTray-X/SysTray-X-app/aboutdialog.ui b/app/SysTray-X/SysTray-X-app/aboutdialog.ui index 6bfa01c..1457e60 100644 --- a/app/SysTray-X/SysTray-X-app/aboutdialog.ui +++ b/app/SysTray-X/SysTray-X-app/aboutdialog.ui @@ -23,7 +23,10 @@ - SysTray-X Companion App by Ximi1970 + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App by Ximi1970 + + + true diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.qm index 1d9ef5d..8c230ad 100644 Binary files a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.qm and b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.qm differ diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts index 79c89b2..4798595 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts @@ -9,43 +9,47 @@ Über SysTray-X - SysTray-X Companion App by Ximi1970 - SysTray-X Companion App by Ximi1970 + SysTray-X Companion App by Ximi1970 - + + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App by Ximi1970 + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App von Ximi1970 + + + Version: Ausführung: - + 0.0.1 - + Build: Build: - - + + 0 - + Hash: Hash: - + Branch: Branch: - + master @@ -102,73 +106,73 @@ SysTray-X Einstellungen - + Default icon Standardsymbol - - - - + + + + Icon Symbol - + Minimize main to tray, close children Hauptfenster in Systemleiste verbergen, Kinderfenster schließen - + Minimize all windows to tray Alle Fenster in Systemleiste verbergen - - + + Default Thunderbird Thunderbird Symbol - + Lookthrough icon Unsichtbares Symbol - - + + Custom icon Benutzerdefiniert Symbol - - + + Choose Wählen - + KDE integration (Hide) KDE integration (Verbergen) - + Mail notification icon E-Mail-Benachrichtigung Symbol - + Blank icon Leeres Symbol - + New mail icon Neue Nachricht Symbol - + No icon Kein Symbol @@ -185,63 +189,63 @@ Dunkel - + Windows Fenster - + Close Schließen - + Restore startup positions Fensterpositionen wiederherstellen beim Start - + Minimize Minimieren - - + + Default minimize Standard Minimieren - + Minimize to tray, method 2 In Systemleiste verbergen, Methode 2 - + Default close Standard Schließen - + Minimize main, close children Hauptfenster minimieren, Kinderfenster schließen - + Minimize all windows Alle Fenster minimieren - + Start application minimized Anwendung minimiert starten - + Invert icon Symbol umkehren - + Number properties Nummereigenschaften @@ -250,248 +254,273 @@ Anzahl neuer Nachrichten anzeigen - + Number color Nummerfarbe - + Number size Nummergröße - + Alignment Nummernausrichtung - + Top left Oben links - + Top centre Oben in der Mitte - + Top right Oben rechts - + Middle left Mitte links - + Middle centre Mittleres Zentrum - + Middle right Mitte rechts - + Bottom left Unten links - + Bottom centre Unten in der Mitte - + Bottom right Unten rechts - + Margins (left, top, right, bottom): Ränder (links, oben, rechts, unten): - + + Position + Position + + + + Correct window positions + Corriegere fensterpositionen + + + + No titlebar correction + Keine Korrektur mit Titelleiste + + + + Add titlebar size + Größe der Titelleiste hinzufügen + + + + Subtract titlebar size + Größe der Titelleiste hinzufügen subtrahieren + + + Startup Start-up - + Default startup Standardstart - + Start application in tray Anwendung in Systemleiste starten - + Count Zähler - + Show message count Anzahl Nachrichten anzeigen - + Show new indicator Indikator für neue Nachrichten anzeigen - + Startup delay Startverzögerung - + Count type E-Mail-Benachrichtigungstyp - + Unread Ungelesene Nachrichten - + New Neue Nachrichten - + New indicator Neu Indikator - + Icon round Symbol rund - + Icon star Symbol Stern - + Shade Schattierung - + Special options Sonderoptionen - + API count method API-Zählmethode - + Apps Anwendungen - + Close application Stopanwendung - - + + Browse... Durchsuche... - - + + Arguments: Argumente: - + Start application Startanwendung - + Mail Nachrichten - + Use the preferences dialog in Thunderbird to select the accounts and folders Verwenden Sie den Einstellungsdialog in Thunderbird, um die Konten und Ordner auszuwählen - + Shortcuts Tastatürkürzel - + Current show / hide shortcut: Aktuelle Tastenkombination zum Anzeigen / Verbergen - + New show / hide shortcut: Neuer Tastenkombination zum Anzeigen / Verbergen - + Clear Löschen - + Debug Debug - + Display debug window Debug-Fenster anzeigen - + Save Speichern - + Cancel Annullieren - - + + Minimize to tray Hauptfenster minimieren - - + + Open Image Bild öffnen - - + + Image Files (*.png *.jpg *.bmp) Bilddateien (*.png *.jpg *.bmp) - - + + Select application Anwendung auswählen @@ -499,27 +528,27 @@ SysTrayX - + &Show/Hide &Anzeigen/Verbergen - + &Preferences &Einstellungen - + &About &Über - + &Quit &Beenden - + Close Schließen diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.qm index 5cd9a42..208ae56 100644 Binary files a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.qm and b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.qm differ diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.ts index 1fede97..4e86fc3 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.ts @@ -9,43 +9,47 @@ Σχετικά με το SysTray-x - SysTray-X Companion App by Ximi1970 - Συνοδευτική εφαρμογή SysTray-X από τον Ximi1970 + Συνοδευτική εφαρμογή SysTray-X από τον Ximi1970 - + + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App by Ximi1970 + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Συνοδευτική εφαρμογή από το Ximi1970 + + + Version: Έκδοση: - + 0.0.1 - + Build: Εξαγωγή: - - + + 0 - + Hash: Κωδικός: - + Branch: Κλαδί: - + master @@ -102,63 +106,63 @@ Προτιμήσεις SysTray-X - + Default icon Προεπιλεγμένο εικονίδιο - - - - + + + + Icon Εικονίδιο - - + + Default Thunderbird Προεπιλογή Thunderbird - + Lookthrough icon Διαφανές εικονίδιο - - + + Custom icon Προσαρμοσμένο εικονίδιο - - + + Choose Επιλέξτε - + KDE integration (Hide) Ενσωμάτωση στον KDE (Απόκρυψη) - + Mail notification icon Εικονίδιο ειδοποίησης αλληλογραφίας - + Blank icon Κενό εικονίδιο - + New mail icon Εικονίδιο νέας αλληλογραφίας - + No icon Χωρίς εικονίδιο @@ -175,73 +179,73 @@ σκοτάδι - + Windows Παράθυρα - + Minimize Ελαχιστοποίηση - - + + Default minimize Προεπιλεγμένη ελαχιστοποίηση - + Minimize to tray, method 2 Μέθοδος 2 - + Close Κλείσιμο - + Default close Προεπιλεγμένο κλείσιμο - + Minimize main to tray, close children Ελαχιστοποίηση κυρίως παραθύρου στην περιοχή ειδοποιήσεων, κλείσιμο θυγατρικών - + Minimize all windows to tray Ελαχιστοποίηση όλων των παραθύρων στην περιοχή ειδοποιήσεων - + Minimize main, close children Ελαχιστοποίηση κυρίως παραθύρου, κλείσιμο θυγατρικών - + Minimize all windows Ελαχιστοποίηση όλων των παραθύρων - + Start application minimized Ελαχιστοποιημένη εκκίνηση της εφαρμογής - + Restore startup positions Επαναφορά θέσεων παραθύρου κατά την εκκίνηση - + Invert icon Αντιστρέψτε εικονίδιο - + Number properties Ιδιότητες αριθμών @@ -250,248 +254,273 @@ Προβολή μετρητή μη-αναγνωσμένης αλληλογραφίας - + Number color Χρώμα μετρητή - + Number size Μέγεθος μετρητή - + Alignment Ευθυγραμμία - + Top left Κορυφαίο αριστερά - + Top centre Κορυφαίο κέντρο - + Top right Κορυφαίο δεξιά - + Middle left Μέση αριστερά - + Middle centre Μεσαίο κέντρο - + Middle right Μέση δεξιά - + Bottom left Κάτω αριστερά - + Bottom centre Κάτω κέντρο - + Bottom right Κάτω δεξιά - + Margins (left, top, right, bottom): Περιθώρια (αριστερά, Κορυφαίο, δεξιά, Κάτω): - + + Position + Τοποθεσία + + + + Correct window positions + Προσαρμόστε τις θέσεις των παραθύρων + + + + No titlebar correction + Καμία διόρθωση γραμμής τίτλου + + + + Add titlebar size + Προσθήκη μεγέθους γραμμής τίτλου + + + + Subtract titlebar size + Αφαιρέστε το μέγεθος της γραμμής τίτλου + + + Startup Αρχή - + Default startup Προεπιλεγμένη εκκίνηση - + Start application in tray Εκκινήστε την εφαρμογή στο δίσκο συστήματος - + Count Μετρητής - + Show message count Προβολή μετρητή αλληλογραφίας - + Show new indicator Εμφάνιση νέας ένδειξης - + Startup delay Καθυστέρηση έναρξης - + Count type Τύπος μετρητή μηνυμάτων - + Unread Μη αναγνωσμένα - + New Νέα - + New indicator Νέος δείκτης - + Icon round Στρογγυλό εικονίδιο - + Icon star Αστέρι εικονίδιο - + Shade Απόχρωση - + Special options Ειδικές επιλογές - + API count method Μέθοδος καταμέτρησης API - + Close application Κλείσιμο αίτησης - - + + Browse... ξεφυλλίζω... - - + + Arguments: Επιχειρήματα: - + Mail Αλληλογραφία - + Use the preferences dialog in Thunderbird to select the accounts and folders Χρησιμοποιήστε το παράθυρο διαλόγου Προτιμήσεις Thunderbird για να επιλέξετε λογαριασμούς και φακέλους - + Clear Αφαιρώ - + Debug Αποσφαλμάτωση - + Display debug window Προβολή παραθύρου αποσφαλμάτωσης - - + + Minimize to tray Ελαχιστοποίηση στην περιοχή ειδοποιήσεων - + Apps Εφαρμογές - + Start application Εφαρμογή εκκίνησης - + Shortcuts Συντομεύσεις - + Current show / hide shortcut: Τρέχουσα συντόμευση Εμφάνιση / Απόκρυψη - + New show / hide shortcut: Νέα συντόμευση Εμφάνιση / Απόκρυψη - + Save Αποθήκευση - + Cancel Άκυρο - - + + Open Image Άνοιγμα εικόνας - - + + Image Files (*.png *.jpg *.bmp) Αρχεία εικόνας (*.png *.jpg *.bmp) - - + + Select application επιλέξτε εφαρμογή @@ -499,27 +528,27 @@ SysTrayX - + &Show/Hide &Εμφάνιση/Απόκρυψη - + &Preferences &Προτιμήσεις - + &About &Σχετικά - + &Quit &Έξοδος - + Close Κλείσιμο diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.ts index 603d9cf..0a9fac6 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.ts @@ -9,45 +9,49 @@ About SysTray-X - SysTray-X Companion App by Ximi1970 - SysTray-X Companion App by Ximi1970 + SysTray-X Companion App by Ximi1970 - + + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App by Ximi1970 + + + + Version: Version: - + 0.0.1 Do not translate - + Build: Build: - - + + 0 Do not translate - + Hash: Hash: - + Branch: Branch: - + master Do not translate @@ -107,73 +111,73 @@ SysTray-X Preferences - + Default icon Default icon - - - - + + + + Icon Icon - + Minimize main to tray, close children Minimize main to tray, close children - + Minimize all windows to tray Minimize all windows to tray - - + + Default Thunderbird Default Thunderbird - + Lookthrough icon Lookthrough icon - - + + Custom icon Custom icon - - + + Choose Choose - + KDE integration (Hide) KDE integration (Hide) - + Mail notification icon Mail notification icon - + Blank icon Blank icon - + New mail icon New mail icon - + No icon No icon @@ -190,63 +194,63 @@ Dark - + Windows Windows - + Close Close - + Restore startup positions Restore window positions on startup - + Minimize Minimize - - + + Default minimize Default minimize - + Minimize to tray, method 2 Minimize to tray, method 2 - + Default close Default close - + Minimize main, close children Minimize main, close children - + Minimize all windows Minimize all windows - + Start application minimized Start application minimized - + Invert icon Invert icon - + Number properties Number properties @@ -255,199 +259,224 @@ Display unread message count - + Number color Number color - + Number size Number size - + Alignment Alignment - + Top left Top left - + Top centre Top centre - + Top right Top right - + Middle left Middle left - + Middle centre Middle centre - + Middle right Middle right - + Bottom left Bottom left - + Bottom centre Bottom centre - + Bottom right Bottom right - + Margins (left, top, right, bottom): Margins (left, top, right, bottom): - + + Position + + + + + Correct window positions + + + + + No titlebar correction + + + + + Add titlebar size + + + + + Subtract titlebar size + + + + Startup Startup - + Default startup Default startup - + Start application in tray Start application in tray - + Count Count - + Show message count Show message count - + Show new indicator Show new messages indicator - + Startup delay Startup delay - + Count type Count type - + Unread Unread - + New New - + New indicator New indicator - + Icon round Icon round - + Icon star Icon star - + Shade Shade - + Special options Special options - + API count method API count method - + Apps Apps - + Close application Close application - - + + Browse... Browse... - - + + Arguments: Arguments: - + Start application Start application - + Mail Mail - + Use the preferences dialog in Thunderbird to select the accounts and folders Use the preferences dialog in Thunderbird to select the accounts and folders - + Shortcuts Shortcuts - + Current show / hide shortcut: Current Show / Hide shortcut - + New show / hide shortcut: New Show / Hide shortcut @@ -464,51 +493,51 @@ New shortcut - + Clear Clear - + Debug Debug - + Display debug window Display debug window - + Save Save - + Cancel Cancel - - + + Minimize to tray Minimize to tray - - + + Open Image Open Image - - + + Image Files (*.png *.jpg *.bmp) Image Files (*.png *.jpg *.bmp) - - + + Select application Select application @@ -516,27 +545,27 @@ SysTrayX - + &Show/Hide &Show/Hide - + &Preferences &Preferences - + &About &About - + &Quit &Quit - + Close Close diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.qm index f6da257..2baad7f 100644 Binary files a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.qm and b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.qm differ diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts index 4ca907c..f73959d 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts @@ -9,44 +9,48 @@ Informazioni su SysTray-X - SysTray-X Companion App by Ximi1970 Associata? Collegata? Pensarci ancora su. - Companion App per SysTray-X di Ximi1970 + Companion App per SysTray-X di Ximi1970 - + + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App by Ximi1970 + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App-X di Ximi1970 + + + Version: Versione: - + 0.0.1 0.0.1 - + Build: Build: - - + + 0 0 - + Hash: Hash: - + Branch: Branch: - + master master @@ -103,63 +107,63 @@ Preferenze di SysTray-X - + Default icon Icona predefinita - - - - + + + + Icon Icona - - + + Default Thunderbird Predefinita di Thunderbird - + Lookthrough icon Icona trasparente - - + + Custom icon Icona personalizzata - - + + Choose Scegli - + KDE integration (Hide) Integrazione KDE (Nascondi) - + Mail notification icon Icona notifica posta - + Blank icon Icona vuota - + New mail icon Icona nuova posta - + No icon Nessuna icona @@ -176,73 +180,73 @@ Scuro - + Windows Finestre - + Minimize Minimizza - + Close Chiudi - - + + Default minimize Minimizzazione predefinita - + Minimize to tray, method 2 Minimizza nel vassoio, metodo 2 - + Default close Chiusura predefinita - + Minimize main to tray, close children Minimizza principale nel vassoio, chiudi sottofinestre - + Minimize all windows to tray Minimizza tutte le finestre nel vassoio - + Minimize main, close children Minimizza principale, chiudi sottofinestre - + Minimize all windows Minimizza tutte le finestre - + Start application minimized Avvia applicazione minimizzata - + Restore startup positions Ripristina le posizioni della finestra all'avvio - + Invert icon Icona inverti - + Number properties Proprietà numero @@ -251,248 +255,273 @@ Mostra numero di messaggi non letti - + Number color Colore numero - + Number size Dimensione numero - + Alignment Allineamento - + Top left A sinistra in alto - + Top centre In alto al centro - + Top right In alto a destra - + Middle left Al centro a sinistra - + Middle centre Centro centrale - + Middle right In mezzo a destra - + Bottom left In basso a sinistra - + Bottom centre In basso al centro - + Bottom right In basso a destra - + Margins (left, top, right, bottom): Margini (sinistra, in alto, destra, in basso): - + + Position + Posizione + + + + Correct window positions + Posizioni corrette delle finestre + + + + No titlebar correction + Nessuna correzione della barra del titolo + + + + Add titlebar size + Aggiungi la dimensione della barra del titolo + + + + Subtract titlebar size + Sottrai la dimensione della barra del titolo + + + Startup Avviare - + Default startup Avvio predefinito - + Start application in tray Minimizza principale nel vassoio - + Count Conteggio - + Show message count Mostra numero di messaggi - + Show new indicator Mostra nuovo indicatore - + Startup delay Ritardo all'avvio - + Count type Tipo conteggio - + Unread Non letti - + New Nuovi - + New indicator Nuovo indicatore - + Icon round Icona rotonda - + Icon star Stella icona - + Shade Sfumatura - + Special options Opzioni speciali - + API count method Metodo di conteggio API - + Close application Applicazione alla chiusura - - + + Browse... Sfogliare... - - + + Arguments: Argomenti: - + Mail Messaggi - + Use the preferences dialog in Thunderbird to select the accounts and folders Usa la finestra di dialogo delle preferenze in Thunderbird per selezionare account e cartelle - + Clear Rimuovi - + Debug Debug - + Display debug window Mostra finestra di debug - - + + Minimize to tray Minimizza nel vassoio - + Apps Applicazioni - + Start application Applicazione di avvio - + Shortcuts Scorciatoie - + Current show / hide shortcut: Scorciatoia corrente Mostra / Nascondi - + New show / hide shortcut: Nuova scorciatoia Mostra / Nascondi - + Save Salva - + Cancel Annulla - - + + Open Image Apri immagine - - + + Image Files (*.png *.jpg *.bmp) File immagine (*.png *.jpg *.bmp) - - + + Select application Selezionare l'applicazione @@ -500,27 +529,27 @@ SysTrayX - + &Show/Hide &Mostra/Nascondi - + &Preferences &Preferenze - + &About &Informazioni - + &Quit &Esci - + Close Chiudi diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.qm index 93f80aa..82c5690 100644 Binary files a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.qm and b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.qm differ diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.ts index 008a520..639e0de 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.ts @@ -9,45 +9,49 @@ Over SysTray-X - SysTray-X Companion App by Ximi1970 - SysTray-X Companion App door Ximi1970 + SysTray-X Companion App door Ximi1970 - + + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App by Ximi1970 + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App door Ximi1970 + + + Version: Versie: - + 0.0.1 Niet vertalen - + Build: Build: - - + + 0 Niet vertalen - + Hash: Hash: - + Branch: Branch: - + master Niet vertalen @@ -106,73 +110,73 @@ SysTray-X Opties - + Default icon Standaard pictogram - - - - + + + + Icon Pictogram - + Minimize main to tray, close children Minimaliseer hoofdvenster, sluit kindvensters - + Minimize all windows to tray Minimaliseer alle vensters - - + + Default Thunderbird Standaard Thunderbird - + Lookthrough icon Doorzichtig pictogram - - + + Custom icon Aangepast pictogram - - + + Choose Kies - + KDE integration (Hide) KDE integratie (Verbergen) - + Mail notification icon Berichten notificatie pictogram - + Blank icon Leeg pictogram - + New mail icon Nieuw bericht pictogram - + No icon Geen pictogram @@ -189,63 +193,63 @@ Donker - + Windows Vensters - + Close Sluiten - + Restore startup positions Herstel vensterposities bij opstarten - + Minimize Minimaliseren - - + + Default minimize Standaard minimalisatie - + Minimize to tray, method 2 Minimaliseer naar systeemvak, methode 2 - + Default close Standaard sluiting - + Minimize main, close children Minimaliseer hoofdvenster, sluit kindvensters - + Minimize all windows Minimaliseer alle vensters - + Start application minimized Start programma geminimaliseerd - + Invert icon Inverteer pictogram - + Number properties Nummer opties @@ -254,248 +258,273 @@ Aantal ongelezen berichten weergeven - + Number color Nummer kleur - + Number size Nummer grootte - + Alignment Uitlijning - + Top left Linksboven - + Top centre Middenboven - + Top right Rechtsboven - + Middle left Midden links - + Middle centre Midden midden - + Middle right Midden rechts - + Bottom left Linksonder - + Bottom centre Middenonder - + Bottom right Rechtsonder - + Margins (left, top, right, bottom): Marges (links, boven, rechts, onder): - + + Position + Positie + + + + Correct window positions + Corrigeer vensterposities + + + + No titlebar correction + Geen titelbalk correctie + + + + Add titlebar size + Titlebalk grootte toevoegen + + + + Subtract titlebar size + Titlebalk grootte aftrekken + + + Startup Opstarten - + Default startup Standaard opstarten - + Start application in tray Start in systeemvak - + Count Teller - + Show message count Aantal berichten weergeven - + Show new indicator Indicator voor nieuwe berichten - + Startup delay Opstartvertraging - + Count type Type berichttelling - + Unread Ongelezen - + New Nieuw - + New indicator Nieuw indicator - + Icon round Rond icoon - + Icon star Ster icoon - + Shade Tint - + Special options Speciale opties - + API count method API tel methode - + Apps Apps - + Close application Stop programma - - + + Browse... Bestand zoeken... - - + + Arguments: Argumenten: - + Start application Start programma - + Mail Berichten - + Use the preferences dialog in Thunderbird to select the accounts and folders Gebruik het voorkeurenvenster in Thunderbird om de accounts en mappen te selecteren - + Shortcuts Snelkoppelingen - + Current show / hide shortcut: Huidige snelkoppeling Tonen / Verbergen - + New show / hide shortcut: Nieuwe snelkoppeling Tonen / Verbergen - + Clear Verwijderen - + Debug Debug - + Display debug window Toon debug venster - + Save Bewaren - + Cancel Annnuleren - - + + Minimize to tray Minimaliseer naar systeemvak - - + + Open Image Open afbeelding - - + + Image Files (*.png *.jpg *.bmp) Afbeeldingsbestanden (*.png *.jpg *.bmp) - - + + Select application Selecteer programma @@ -503,27 +532,27 @@ SysTrayX - + &Show/Hide &Tonen/Verbergen - + &Preferences &Opties - + &About O&ver - + &Quit &Afsluiten - + Close Sluiten diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.qm index 1cd794c..8d52259 100644 Binary files a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.qm and b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.qm differ diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.ts index 9ac1a67..8d0b677 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.ts @@ -10,42 +10,42 @@ - SysTray-X Companion App by Ximi1970 - + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App by Ximi1970 + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Aplicativo complementar de Ximi1970 - + Version: Versão: - + 0.0.1 - + Build: - - + + 0 - + Hash: - + Branch: - + master @@ -105,73 +105,73 @@ SysTray-X Preferências - + Default icon Ícone padrão - - - - + + + + Icon Ícone - + Minimize main to tray, close children Minimize o pai para a bandeja, feche os filhos - + Minimize all windows to tray Minimize todas as janelas para a tray - - + + Default Thunderbird Padrão do Thunderbird - + Lookthrough icon Ícone transparente - - + + Custom icon Ícone personalizado - - + + Choose Escolher - + KDE integration (Hide) Integração com o KDE (oculta o ícone) - + Mail notification icon Ícone de notificação - + Blank icon Ícone branco - + New mail icon Ícone de novo e-mail - + No icon Nenhum ícone @@ -188,64 +188,64 @@ Escuro - + Windows Janela - + Close Fechar - + Restore startup positions Restaurar posições da janela na inicialização - + Minimize Miminizar - - + + Default minimize Comportamento padrão - + Minimize to tray, method 2 Minimizar para à área de notificações? (muito grande) Minimizar para a tray, método 2 - + Default close Fechamento padrão - + Minimize main, close children Minimize os filhos principais e próximos - + Minimize all windows Minimize todas as janelas - + Start application minimized Iniciar aplicação minimizada - + Invert icon Ícone inverter - + Number properties Propriedades do número @@ -254,248 +254,273 @@ Exibir contador de mensagens não lidas - + Number color Cor do número - + Number size Tamanho do número - + Alignment Alinhamento - + Top left Canto superior esquerdo - + Top centre Centro superior - + Top right Canto superior direito - + Middle left Meio esquerdo - + Middle centre Centro médio - + Middle right Meio à direita - + Bottom left Canto inferior esquerdo - + Bottom centre Centro inferior - + Bottom right Canto inferior direito - + Margins (left, top, right, bottom): Margens (esquerdo, superior, direito, inferior): - + + Position + Posição + + + + Correct window positions + Posições corretas da janela + + + + No titlebar correction + Nenhuma correção na barra de título + + + + Add titlebar size + Adicionar tamanho da barra de título + + + + Subtract titlebar size + Subtraia o tamanho da barra de título + + + Startup Comece - + Default startup Inicialização padrão - + Start application in tray Inicie o aplicativo na bandeja - + Count Contador - + Show message count Exibir contador de mensagens - + Show new indicator Mostrar novo indicador - + Startup delay Atraso de inicialização - + Count type Tipo do contador - + Unread Não lidos - + New Novos - + New indicator Novo indicador - + Icon round Ícone redondo - + Icon star Ícone de estrela - + Shade Matiz - + Special options Opções especiais - + API count method Método de contagem de API - + Apps Aplicativos - + Close application Fechando aplicativo - - + + Browse... Procurar... - - + + Arguments: Argumentos: - + Start application Aplicativo de inicialização - + Mail E-mail - + Use the preferences dialog in Thunderbird to select the accounts and folders Use a janela de preferências no Thunderbird para selecionar as contas e pastas - + Shortcuts Atalhos - + Current show / hide shortcut: Atual Mostrar / Ocultar atalho - + New show / hide shortcut: Novo atalho Mostrar / Ocultar - + Clear Remover - + Debug Depuração - + Display debug window Mostrar janela de depuração - + Save Salvar - + Cancel Cancelar - - + + Minimize to tray Minimizar para a tray - - + + Open Image Abrir imagem - - + + Image Files (*.png *.jpg *.bmp) Arquivo de imagem (*.png *.jpg *.bmp) - - + + Select application Selecione o aplicativo @@ -503,27 +528,27 @@ SysTrayX - + &Show/Hide &Exibir/Ocultar - + &Preferences &Preferências - + &About &Sobre - + &Quit &Sair - + Close Fechar diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.qm index ae475d4..fbdaac5 100644 Binary files a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.qm and b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.qm differ diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.ts index b97e086..57831f6 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.ts @@ -9,43 +9,47 @@ О SysTray-X - SysTray-X Companion App by Ximi1970 - Приложение-компаньон к дополнению SysTray-X от Ximi1970 + Приложение-компаньон к дополнению SysTray-X от Ximi1970 - + + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App by Ximi1970 + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Приложение-компаньон от Ximi1970 + + + Version: Версия: - + 0.0.1 - + Build: Сборка: - - + + 0 - + Hash: Хеш: - + Branch: Ветвь : - + master @@ -102,73 +106,73 @@ Настройки SysTray-X - + Default icon Иконка по умолчанию - - - - + + + + Icon Иконка - + Minimize main to tray, close children Свернуть главное окно в трей, закрыть остальные - + Minimize all windows to tray Свернуть все окна в трей - - + + Default Thunderbird Стандартная Thunderbird - + Lookthrough icon Прозрачная иконка - - + + Custom icon Своя иконка - - + + Choose Выбрать - + KDE integration (Hide) Интеграция с KDE (Скрыть) - + Mail notification icon Иконка уведомления - + Blank icon Пустая иконка - + New mail icon Иконка "Новые письма" - + No icon Без иконки (только цифры) @@ -185,64 +189,64 @@ Темная - + Windows Окна - + Close При закрытии - + Restore startup positions Восстановить положение окон при запуске - + Minimize Свернуть - - + + Default minimize Need documentation what methods do... Свернуть окно - + Minimize to tray, method 2 Свернуть в трей, вариант 2 - + Default close Закрыть - + Minimize main, close children Свернуть главное окно, закрыть другие - + Minimize all windows Свернуть все окна - + Start application minimized Запуск приложения свернутым - + Invert icon Инвертировать значок - + Number properties Настройки индикатора кол-ва @@ -251,248 +255,273 @@ Показывать кол-во непрочитанных писем - + Number color Цвет числа - + Number size Размер числа - + Alignment Выравнивание - + Top left Верхний левый - + Top centre Верхний центр - + Top right Верхний правый - + Middle left Средний левый - + Middle centre Средний центральный - + Middle right Средний правый - + Bottom left Нижний левый - + Bottom centre Нижний центральный - + Bottom right Нижний правый - + Margins (left, top, right, bottom): Отступ (левый, Верхний, правый, Нижний): - + + Position + Позиция + + + + Correct window positions + Правильное расположение окон + + + + No titlebar correction + Без исправления названия + + + + Add titlebar size + Добавить размер заголовка + + + + Subtract titlebar size + Вычтите размер строки заголовка + + + Startup Запуск - + Default startup Запуск по умолчанию - + Start application in tray Запустить приложение в трее - + Count счетчик - + Show message count Показать количество писем - + Show new indicator Показать новый индикатор - + Startup delay Задержка запуска - + Count type Алгоритм подсчета - + Unread Непрочитанные - + New Новые - + New indicator Новый индикатор - + Icon round Круглый значок - + Icon star Значок звезды - + Shade Оттенок - + Special options Специальные опции - + API count method Метод подсчета API - + Apps Программы - + Close application Заявление о закрытии - - + + Browse... просматривать... - - + + Arguments: аргументы: - + Start application Приложение при запуске - + Mail Письма - + Use the preferences dialog in Thunderbird to select the accounts and folders Используйте диалоговое окно настроек в Thunderbird, чтобы выбрать учетные записи и папки - + Shortcuts Сочетания - + Current show / hide shortcut: Текущий ярлык Показать / Скрыть - + New show / hide shortcut: Новый ярлык Показать / Скрыть - + Clear Удалять - + Debug Отладка - + Display debug window Показывать окно отладки - + Save Сохранить - + Cancel Отменить - - + + Minimize to tray Свернуть в трей - - + + Open Image Открыть изображение - - + + Image Files (*.png *.jpg *.bmp) Файлы изображений (*.png *.jpg *.bmp) - - + + Select application выберите приложение @@ -500,27 +529,27 @@ SysTrayX - + &Show/Hide &Показать/Скрыть - + &Preferences &Настройки - + &About &О приложении - + &Quit &Выход - + Close Закрыть diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.zh-CN.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.zh-CN.qm new file mode 100644 index 0000000..26677c1 Binary files /dev/null and b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.zh-CN.qm differ diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.zh-CN.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.zh-CN.ts new file mode 100644 index 0000000..8018f46 --- /dev/null +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.zh-CN.ts @@ -0,0 +1,556 @@ + + + + + AboutDialog + + + About SysTray-X + 关于 SysTray-X + + + SysTray-X Companion App by Ximi1970 + SysTray-X 配套应用,作者 Ximi1970 + + + + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> Companion App by Ximi1970 + <a href="https://github.com/Ximi1970/systray-x">SysTray-X</a> 配套应用,作者 Ximi1970 + + + + Version: + 版本: + + + + 0.0.1 + 0.0.1 + + + + Build: + 构建: + + + + + 0 + 0 + + + + Hash: + Hash: + + + + Branch: + 分支: + + + + master + master + + + + DebugWidget + + + SysTray-X Debug + SysTray-X 调试 + + + + Unread mail: + 未读邮件: + + + + + 0 + 0 + + + + New mail: + 新邮件: + + + + Test 1 + 测试 1 + + + + Test 2 + 测试 2 + + + + Test 3 + 测试 3 + + + + Test 4 + 测试 4 + + + + PreferencesDialog + + + SysTray-X Preferences + SysTray-X 首选项 + + + + Windows + 窗口 + + + + Close + 关闭按钮 + + + + Default close + 普通关闭 + + + + Minimize main to tray, close children + 主窗口收回托盘,子窗口关闭 + + + + Minimize all windows to tray + 所有窗口收回托盘 + + + + Minimize main, close children + 主窗口最小化,子窗口关闭 + + + + Minimize all windows + 所有窗口最小化 + + + + Startup + 启动方式 + + + + Default startup + 普通启动 + + + + Start application minimized + 最小化启动 + + + + Start application in tray + 启动至托盘 + + + + Restore startup positions + 启动时恢复窗口位置 + + + + Minimize + 最小化按钮 + + + + + Default minimize + 最小化 + + + + + Minimize to tray + 收回托盘 + + + + Minimize to tray, method 2 + 收回托盘,方法 2 + + + + + + + Icon + 图标 + + + + Position + 位置 + + + + Correct window positions + 正确的窗口位置 + + + + No titlebar correction + 没有标题栏修正 + + + + Add titlebar size + 添加标题栏大小 + + + + Subtract titlebar size + 减去标题栏大小 + + + + Default icon + 默认 + + + + + Default Thunderbird + Thunderbird 默认 + + + + Lookthrough icon + 透明 + + + + + Custom icon + 自定义 + + + + + Choose + 选择图标 + + + + KDE integration (Hide) + KDE 集成(隐藏) + + + + Mail notification icon + 有未读邮件时 + + + + Blank icon + 空白 + + + + New mail icon + 新邮件 + + + + No icon + + + + + Invert icon + 反色 + + + + Count + 计数 + + + + Show message count + 显示消息计数 + + + + Show new indicator + 显示新消息提示 + + + + Startup delay + 启动延迟秒数 + + + + Count type + 计数类型 + + + + Unread + 未读消息 + + + + New + 新消息 + + + + Number properties + 数字属性 + + + + Margins (left, top, right, bottom): + 边距(左,上,中,下): + + + + Number color + 颜色 + + + + Number size + 字号 + + + + Alignment + 位置 + + + + Top left + 左上 + + + + Top centre + 中上 + + + + Top right + 右上 + + + + Middle left + 左中 + + + + Middle centre + 正中 + + + + Middle right + 右中 + + + + Bottom left + 左下 + + + + Bottom centre + 中下 + + + + Bottom right + 右下 + + + + New indicator + 新消息提示 + + + + Icon round + 圆点 + + + + Icon star + 星形 + + + + Shade + 背景色 + + + + Special options + 特殊 + + + + API count method + 由 API 提供计数方法 + + + + Apps + 应用 + + + + Close application + 关闭应用时 + + + + + Browse... + 浏览... + + + + + Arguments: + 参数: + + + + Start application + 启动应用时 + + + + Mail + 邮件 + + + + Use the preferences dialog in Thunderbird to select the accounts and folders + 在 Thunderbird 的插件首选项中选择要监视的账户和文件夹 + + + + Shortcuts + 快捷键 + + + + Current show / hide shortcut: + 当前显示 / 隐藏快捷键: + + + + New show / hide shortcut: + 新的显示 / 隐藏快捷键: + + + + Clear + 清空 + + + + Debug + 调试 + + + + Display debug window + 显示调试窗口 + + + + Cancel + 取消 + + + + Save + 保存 + + + + + Open Image + 打开图片 + + + + + Image Files (*.png *.jpg *.bmp) + 图片文件(*.png *.jpg *.bmp) + + + + + Select application + 选择应用 + + + + SysTrayX + + + &Show/Hide + 显示 / 隐藏(&S) + + + + &Preferences + 首选项(&P) + + + + &About + 关于(&A) + + + + &Quit + 退出(&Q) + + + + Close + 关闭 + + + + SysTrayXIcon + + + SysTray-X: Thunderbird add-on companion app + SysTray-X:Thunderbird 插件配套应用 + + + + SysTrayXStatusNotifier + + + Thunderbird add-on companion app + Thunderbird 插件配套应用 + + + diff --git a/app/SysTray-X/SysTray-X-app/nativeeventfilter-win.cpp b/app/SysTray-X/SysTray-X-app/nativeeventfilter-win.cpp index 320f1b1..babb8be 100644 --- a/app/SysTray-X/SysTray-X-app/nativeeventfilter-win.cpp +++ b/app/SysTray-X/SysTray-X-app/nativeeventfilter-win.cpp @@ -90,7 +90,11 @@ const QMap< Qt::Key, int > NativeEventFilterWin::m_virtual_key_map { /* * Catch the key press */ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) bool NativeEventFilterWin::nativeEventFilter( const QByteArray& eventType, void* message, long* result ) +#else +bool NativeEventFilterWin::nativeEventFilter( const QByteArray& eventType, void* message, qintptr* result ) +#endif { Q_UNUSED( eventType ) Q_UNUSED( result ) @@ -114,9 +118,13 @@ bool NativeEventFilterWin::nativeEventFilter( const QByteArray& eventType, void* */ bool NativeEventFilterWin::connectShortcut( QKeySequence key_seq ) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) Qt::Key key_code = Qt::Key( key_seq[ 0 ] & static_cast< int >( ~Qt::KeyboardModifierMask ) ); Qt::KeyboardModifiers key_modifiers = Qt::KeyboardModifiers( key_seq[ 0 ] & static_cast( Qt::KeyboardModifierMask ) ); - +#else + Qt::Key key_code = Qt::Key( key_seq[ 0 ].toCombined() & static_cast< int >( ~Qt::KeyboardModifierMask ) ); + Qt::KeyboardModifiers key_modifiers = Qt::KeyboardModifiers( key_seq[ 0 ].toCombined() & static_cast( Qt::KeyboardModifierMask ) ); +#endif return connectShortcut( key_code, key_modifiers ); } diff --git a/app/SysTray-X/SysTray-X-app/nativeeventfilter-win.h b/app/SysTray-X/SysTray-X-app/nativeeventfilter-win.h index ff16f44..71c51ee 100644 --- a/app/SysTray-X/SysTray-X-app/nativeeventfilter-win.h +++ b/app/SysTray-X/SysTray-X-app/nativeeventfilter-win.h @@ -38,7 +38,11 @@ class NativeEventFilterWin : public NativeEventFilterBase * * @return Result */ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) bool nativeEventFilter( const QByteArray& eventType, void* message, long* result ) override; +#else + bool nativeEventFilter( const QByteArray& eventType, void* message, qintptr* result ) override; +#endif protected: diff --git a/app/SysTray-X/SysTray-X-app/nativeeventfilter-x11.cpp b/app/SysTray-X/SysTray-X-app/nativeeventfilter-x11.cpp index 4e9c781..4efeae9 100644 --- a/app/SysTray-X/SysTray-X-app/nativeeventfilter-x11.cpp +++ b/app/SysTray-X/SysTray-X-app/nativeeventfilter-x11.cpp @@ -9,7 +9,9 @@ /* * Qt includes */ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #include +#endif #include @@ -22,7 +24,11 @@ const int NativeEventFilterX11::m_valid_mods_mask = ShiftMask | ControlMask | Mo /* * Catch the key press */ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) bool NativeEventFilterX11::nativeEventFilter( const QByteArray& eventType, void* message, long* result ) +#else +bool NativeEventFilterX11::nativeEventFilter( const QByteArray& eventType, void* message, qintptr* result ) +#endif { Q_UNUSED( eventType ) Q_UNUSED( result ) @@ -48,9 +54,13 @@ bool NativeEventFilterX11::nativeEventFilter( const QByteArray& eventType, void* */ bool NativeEventFilterX11::connectShortcut( QKeySequence key_seq ) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) Qt::Key key_code = Qt::Key( key_seq[ 0 ] & static_cast< int >( ~Qt::KeyboardModifierMask ) ); Qt::KeyboardModifiers key_modifiers = Qt::KeyboardModifiers( key_seq[ 0 ] & static_cast( Qt::KeyboardModifierMask ) ); - +#else + Qt::Key key_code = Qt::Key( key_seq[ 0 ].toCombined() & static_cast< int >( ~Qt::KeyboardModifierMask ) ); + Qt::KeyboardModifiers key_modifiers = Qt::KeyboardModifiers( key_seq[ 0 ].toCombined() & static_cast( Qt::KeyboardModifierMask ) ); +#endif return connectShortcut( key_code, key_modifiers ); } @@ -127,7 +137,12 @@ bool NativeEventFilterX11::connectShortcut( Qt::Key key_code, Qt::KeyboardModifi /* * Get the X11 display */ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) Display *display = QX11Info::display(); +#else + QNativeInterface::QX11Application *x11App = qApp->nativeInterface(); + Display *display = x11App->display(); +#endif /* * Get the final key code @@ -153,7 +168,12 @@ bool NativeEventFilterX11::connectShortcut( Qt::Key key_code, Qt::KeyboardModifi */ bool NativeEventFilterX11::disconnectShortcut() { - Display* display = QX11Info::display(); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + Display *display = QX11Info::display(); +#else + QNativeInterface::QX11Application *x11App = qApp->nativeInterface(); + Display *display = x11App->display(); +#endif /* * Ungrab the key diff --git a/app/SysTray-X/SysTray-X-app/nativeeventfilter-x11.h b/app/SysTray-X/SysTray-X-app/nativeeventfilter-x11.h index 0cf9203..cd67c99 100644 --- a/app/SysTray-X/SysTray-X-app/nativeeventfilter-x11.h +++ b/app/SysTray-X/SysTray-X-app/nativeeventfilter-x11.h @@ -33,7 +33,11 @@ class NativeEventFilterX11 : public NativeEventFilterBase * * @return Result */ - bool nativeEventFilter( const QByteArray& eventType, void* message, long* result ) override; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + bool nativeEventFilter( const QByteArray& eventType, void* message, long* result ) override; +#else + bool nativeEventFilter( const QByteArray& eventType, void* message, qintptr* result ) override; +#endif protected: diff --git a/app/SysTray-X/SysTray-X-app/nativeeventfilterbase.cpp b/app/SysTray-X/SysTray-X-app/nativeeventfilterbase.cpp index 887fc62..31118d5 100644 --- a/app/SysTray-X/SysTray-X-app/nativeeventfilterbase.cpp +++ b/app/SysTray-X/SysTray-X-app/nativeeventfilterbase.cpp @@ -12,7 +12,6 @@ /* * Qt includes */ -#include #include diff --git a/app/SysTray-X/SysTray-X-app/nativeeventfilterbase.h b/app/SysTray-X/SysTray-X-app/nativeeventfilterbase.h index 5f5ab2d..1829736 100644 --- a/app/SysTray-X/SysTray-X-app/nativeeventfilterbase.h +++ b/app/SysTray-X/SysTray-X-app/nativeeventfilterbase.h @@ -15,6 +15,7 @@ #include #include #include +#include /* * Predefines diff --git a/app/SysTray-X/SysTray-X-app/preferences.cpp b/app/SysTray-X/SysTray-X-app/preferences.cpp index 216b7bf..ebdb65a 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.cpp +++ b/app/SysTray-X/SysTray-X-app/preferences.cpp @@ -48,8 +48,11 @@ Preferences::Preferences( QObject *parent ) : QObject( parent ) m_minimize_type = PREF_MINIMIZE_METHOD_1; m_close_type = PREF_MINIMIZE_MAIN_TRAY_CLOSE_CHILDREN_WINDOWS; m_minimize_icon_type = PREF_MINIMIZE_TRAY_ICON; - m_startup_type = PREF_START_DEFAULT; + + m_window_positions_correction = false; + m_window_positions_correction_type = PREF_NO_CORRECTION; + m_restore_window_positions = false; m_default_icon_type = PREF_DEFAULT_ICON_DEFAULT; @@ -114,7 +117,14 @@ Preferences::Preferences( QObject *parent ) : QObject( parent ) #if ( defined( Q_OS_UNIX ) && defined( NO_SHORTCUTS ) ) m_shortcuts_option = false; #else - m_shortcuts_option = true; + if( m_platform == "wayland" ) + { + m_shortcuts_option = false; + } + else + { + m_shortcuts_option = true; + } #endif /* // XDG_SESSION_DESKTOP @@ -439,6 +449,58 @@ void Preferences::setStartupType( Preferences::StartupType startup_type ) } +/* + * Get the window positions correction state + */ +bool Preferences::getWindowPositionsCorrection() const +{ + return m_window_positions_correction; +} + + +/* + * Set the window positions correction state + */ +void Preferences::setWindowPositionsCorrection( bool state ) +{ + if( m_window_positions_correction != state ) + { + m_window_positions_correction = state; + + /* + * Tell the world the new preference + */ + emit signalWindowPositionsCorrectionChange(); + } +} + + +/* + * Get the window positions correction type + */ +Preferences::WindowPositionsCorrectionType Preferences::getWindowPositionsCorrectionType() const +{ + return m_window_positions_correction_type; +} + + +/* + * Set the minimize type. + */ +void Preferences::setWindowPositionsCorrectionType( WindowPositionsCorrectionType window_positions_correction_type ) +{ + if( m_window_positions_correction_type != window_positions_correction_type) + { + m_window_positions_correction_type = window_positions_correction_type; + + /* + * Tell the world the new preference + */ + emit signalWindowPositionsCorrectionTypeChange(); + } +} + + /* * Get the start minmized pref. */ diff --git a/app/SysTray-X/SysTray-X-app/preferences.h b/app/SysTray-X/SysTray-X-app/preferences.h index b08f16f..dd10030 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.h +++ b/app/SysTray-X/SysTray-X-app/preferences.h @@ -53,6 +53,15 @@ class Preferences : public QObject PREF_MINIMIZE_TRAY_ICON }; + /* + * Position correction + */ + enum WindowPositionsCorrectionType { + PREF_NO_CORRECTION = 0, + PREF_ADD_CORRECTION, + PREF_SUBTRACT_CORRECTION + }; + /* * Startup types */ @@ -188,34 +197,6 @@ class Preferences : public QObject */ void setBrowserBuildID( const QString buildID ); - /** - * @brief getStartupType. Get the startup type. - * - * @return The startup type. - */ - StartupType getStartupType() const; - - /** - * @brief setStartupType. Set the startup type. - * - * @param startup_type The startup type. - */ - void setStartupType( StartupType startup_type ); - - /** - * @brief getRestoreWindowPositions. Get the restore window positions state. - * - * @return The state. - */ - bool getRestoreWindowPositions() const; - - /** - * @brief setRestoreWindowPositions. Set the restore window positions state. - * - * @param state The state. - */ - void setRestoreWindowPositions( bool state ); - /** * @brief getMinimizeType. Get the minimize type. * @@ -258,6 +239,62 @@ class Preferences : public QObject */ void setMinimizeIconType( MinimizeIconType minimize_icon_type ); + /** + * @brief getStartupType. Get the startup type. + * + * @return The startup type. + */ + StartupType getStartupType() const; + + /** + * @brief setStartupType. Set the startup type. + * + * @param startup_type The startup type. + */ + void setStartupType( StartupType startup_type ); + + /** + * @brief getWindowPositionsCorrection. Get the window positions correction state. + * + * @return The state. + */ + bool getWindowPositionsCorrection() const; + + /** + * @brief setWindowPositionsCorrection. Set the window positions correction state. + * + * @param state The state. + */ + void setWindowPositionsCorrection( bool state ); + + /** + * @brief getRestoreWindowPositions. Get the restore window positions state. + * + * @return The state. + */ + bool getRestoreWindowPositions() const; + + /** + * @brief setRestoreWindowPositions. Set the restore window positions state. + * + * @param state The state. + */ + void setRestoreWindowPositions( bool state ); + + /** + * @brief getWindowPositionsCorrectionType. Get the window positions correction type + * + * @return the window positions correction type. + */ + WindowPositionsCorrectionType getWindowPositionsCorrectionType() const; + + /** + * @brief setWindowPositionsCorrectionType. Set the window positions correction type. + * + * @param window_positions_correction_type The window positions correction type. + */ + void setWindowPositionsCorrectionType( WindowPositionsCorrectionType window_positions_correction_type ); + /** * @brief getDefaultIconType. Get the default icon type. * @@ -689,6 +726,16 @@ class Preferences : public QObject */ void signalStartupTypeChange(); + /** + * @brief signalWindowPositionsCorrectionChange. Signal a window positions correction change. + */ + void signalWindowPositionsCorrectionChange(); + + /** + * @brief signalWindowPositionsCorrectionTypeChange. Signal a window positions correction type change. + */ + void signalWindowPositionsCorrectionTypeChange(); + /** * @brief signalRestoreWindowPositionsChange. Signal a restore window positions state change. */ @@ -890,6 +937,16 @@ class Preferences : public QObject */ MinimizeIconType m_minimize_icon_type; + /** + * @brief m_window_positions_correction + */ + bool m_window_positions_correction; + + /** + * @brief m_window_positions_correction_type + */ + WindowPositionsCorrectionType m_window_positions_correction_type; + /** * @brief m_startup_type. Startup TB preference. */ diff --git a/app/SysTray-X/SysTray-X-app/preferences.ui b/app/SysTray-X/SysTray-X-app/preferences.ui index 7bea8d1..1434b67 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.ui +++ b/app/SysTray-X/SysTray-X-app/preferences.ui @@ -6,8 +6,8 @@ 0 0 - 608 - 468 + 663 + 519 @@ -25,315 +25,352 @@ - - - 0 - - - - Windows - - - - - - - - Close - - - - - - Default close - - - closeTypeGroup - - - - - - - Minimize main to tray, close children - - - true - - - closeTypeGroup - - - - - - - Minimize all windows to tray - - - false - - - closeTypeGroup - - - - - - - Minimize main, close children - - - false - - - closeTypeGroup - - - - - - - Minimize all windows - - - false - - - closeTypeGroup - - - - - - - - - - Startup - - - - - - Default startup - - - true - - - startupTypeGroup - - - - - - - Start application minimized - - - startupTypeGroup - - - - - - - Start application in tray - - - false - - - startupTypeGroup - - - - - - - - - - Restore startup positions - - - - - + + + + + 0 + + + + Windows + + + + - Qt::Vertical + Qt::Horizontal - 20 - 40 + 2 + 20 - - - - - - Qt::Horizontal - - - - 2 - 20 - - - - - - - - - - Minimize - - - - - - Default minimize - - - false - - - minimizeTypeGroup - - - - - - - Minimize to tray - - - true - - - minimizeTypeGroup - - - - - - - Minimize to tray, method 2 - - - minimizeTypeGroup - - - - - + + + + + + Minimize + + + + + + Default minimize + + + false + + + minimizeTypeGroup + + + + + + + Minimize to tray + + + true + + + minimizeTypeGroup + + + + + + + Minimize to tray, method 2 + + + minimizeTypeGroup + + + + + + + + + + Icon + + + + + + Default minimize + + + false + + + minimizeIconTypeGroup + + + + + + + Minimize to tray + + + true + + + minimizeIconTypeGroup + + + + + + + + + + Position + + + + + + + + Correct window positions + + + + + + + + + No titlebar correction + + + true + + + positionGroup + + + + + + + Add titlebar size + + + positionGroup + + + + + + + Subtract titlebar size + + + positionGroup + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 17 + + + + + - - - - Icon - - - - - - Default minimize - - - false - - - minimizeIconTypeGroup - - - - - - - Minimize to tray - - - true - - - minimizeIconTypeGroup - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - + + + + + + Close + + + + + + Default close + + + closeTypeGroup + + + + + + + Minimize main to tray, close children + + + true + + + closeTypeGroup + + + + + + + Minimize all windows to tray + + + false + + + closeTypeGroup + + + + + + + Minimize main, close children + + + false + + + closeTypeGroup + + + + + + + Minimize all windows + + + false + + + closeTypeGroup + + + + + + + + + + Startup + + + + + + Default startup + + + true + + + startupTypeGroup + + + + + + + Start application minimized + + + startupTypeGroup + + + + + + + Start application in tray + + + false + + + startupTypeGroup + + + + + + + + + + Restore startup positions + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + - - - - - - Icon - - - - - - Default icon - - - - - - Icon - - - - + + + + Icon + + + + + + Default icon + + + + + + Icon + + - - - Default Thunderbird - - - true - - - defaultIconTypeGroup - - - - - - - Lookthrough icon - - - defaultIconTypeGroup - - - - - + - + - Custom icon + Default Thunderbird + + + true defaultIconTypeGroup @@ -341,14 +378,163 @@ - + + + Lookthrough icon + + + defaultIconTypeGroup + + + + + + + + + Custom icon + + + defaultIconTypeGroup + + + + + + + + + + + + + + Choose + + + false + + + + + + + + + + + + + + KDE integration (Hide) + + + false + + + + + + + + + + Mail notification icon + + + + + + Icon + + + + + + QLayout::SetFixedSize + + + + + Blank icon + + + true + + + iconTypeGroup + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + QLayout::SetFixedSize + + + + + New mail icon + + + iconTypeGroup + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + QLayout::SetMaximumSize + + + + + Custom icon + + + iconTypeGroup + + + + + - + Choose @@ -359,671 +545,413 @@ - - - - - - - - - KDE integration (Hide) - - - false - - - - - - - - - - Mail notification icon - - - - - - Icon - - - - - - QLayout::SetFixedSize - - - - Blank icon - - - true - - - iconTypeGroup - - + + + + + No icon + + + iconTypeGroup + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + Default Thunderbird + + + iconTypeGroup + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - - QLayout::SetFixedSize - - - - - New mail icon - - - iconTypeGroup - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - QLayout::SetMaximumSize - - - - - Custom icon - - - iconTypeGroup - - - - - - - - - - - - - - Choose - - - false - - - - - - - - - - - No icon - - - iconTypeGroup - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Default Thunderbird - - - iconTypeGroup - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - Invert icon - - - - - - - - - - Qt::Horizontal - - - - 6 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 80 - - - - - - - - Qt::Vertical - - - - 20 - 80 - - - - - - - - - Count - - - - - - - - Show message count - - - true - + + + + + + Invert icon + + + + - - - - Show new indicator + + + + Qt::Horizontal - + + + 6 + 20 + + + - - + + + + Qt::Vertical + + + + 20 + 80 + + + + + + + + Qt::Vertical + + + + 20 + 80 + + + + + + + + + Count + + + + - + - Startup delay + Show message count + + + true - - - 0 - - - 99 - - - 5 + + + Show new indicator + + + + + + Startup delay + + + + + + + 0 + + + 99 + + + 5 + + + + + - - - - - - Count type - - - - - - - - Unread - - - true - - - countTypeGroup - - - - - - - New - - - countTypeGroup - - - - - - - - - - - - Number properties - - - - - - - - Margins (left, top, right, bottom): - - - - - + + + + Count type + + + + - - - 999 - - - - - - - 999 - - - - - - - 999 - - - - - - - 999 - - - - - - - - - - - - - + - Number color - - - - - - - Qt::NoFocus - - - - - - - - - - - - - - Number size - - - - - - - 1 - - - 999 - - - 10 - - - - - - - - - - - Alignment - - - - - - - 4 - - - - Top left - - - - - Top centre - - - - - Top right - - - - - Middle left - - - - - Middle centre - - - - - Middle right - - - - - Bottom left - - - - - Bottom centre - - - - - Bottom right - - - - - - - - - - - - - - - New indicator - - - - - - - - Icon round - - - newIndicatorTypeGroup - - - - - - - Icon star - - - newIndicatorTypeGroup - - - - - - - - - Shade + Unread true + + countTypeGroup + + + + + + + New + + + countTypeGroup + + + + + + + + + + + + Number properties + + + + + + + + Margins (left, top, right, bottom): + + + + + + + + + 999 + + + + + + + 999 + + + + + + + 999 + + + + + + + 999 + + + + + + + + + + + + + + + Number color + + + + + + + Qt::NoFocus + + + + + + + + + + + + + + Number size + + + + + + + 1 + + + 999 + + + 10 + + + + + + + + + + + Alignment + + + + + + + 4 + + + + Top left + + + + + Top centre + + + + + Top right + + + + + Middle left + + + + + Middle centre + + + + + Middle right + + + + + Bottom left + + + + + Bottom centre + + + + + Bottom right + + + + + + + + + + + + + + + New indicator + + + + + + + + Icon round + newIndicatorTypeGroup - + - + Icon star + + newIndicatorTypeGroup + - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 104 - - - - - - - - Qt::Vertical - - - - 20 - 64 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Special options - - - - - - API count method - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Apps - - - - - - - - Close application - - - - - + - - - - + - Browse... + Shade - - - - - - - - - - Arguments: + + true + + newIndicatorTypeGroup + - + + + + + @@ -1032,259 +960,392 @@ - - - - Start application + + + + Qt::Horizontal - - - - - - - - - - - - Browse... - - - - - - - - - - - Arguments: - - - - - - - - - - - - + + + 40 + 20 + + + - - + + Qt::Vertical 20 - 40 + 104 + + + + Qt::Vertical + + + + 20 + 64 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Special options + + + + + + API count method + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + - - - - - - Mail - - - - - - Use the preferences dialog in Thunderbird to select the accounts and folders - - - true - - - - - - - Qt::Horizontal - - - - 265 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 464 - - - - - - - - - Shortcuts - - - - - - - - - - - - Current show / hide shortcut: - - - - - - - + + + + Apps + + + + + + + + Close application + + + + + + + + + + + + + Browse... + + + + + + + + + + + Arguments: + + + + + + + + + + + + - - + + + + Start application + + + + + + + + + + + + + Browse... + + + + + + + + + + + Arguments: + + + + + + + + + + + + + + + - Qt::Horizontal + Qt::Vertical - 40 - 20 + 20 + 40 - - + + + + + Mail + + + + + + Use the preferences dialog in Thunderbird to select the accounts and folders + + + true + + + + + + + Qt::Horizontal + + + + 265 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 464 + + + + + + + + + Shortcuts + + + + - - - New show / hide shortcut: - - + + + + + + + Current show / hide shortcut: + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - - - - - - - Clear - - + + + + + New show / hide shortcut: + + + + + + + + + + + + + + Clear + + + + + + + + Qt::Vertical + + + + 20 + 297 + + + + - - - - - Qt::Vertical - - - - 20 - 297 - - - - - - - - - Debug - - - - - - Display debug window - - - - - + + + + Debug + + + + + + Display debug window + + + + + + + Qt::Horizontal + + + + 358 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 485 + + + + + + + + + + + + Qt::Horizontal - 358 + 369 20 - - - - Qt::Vertical - - - - 20 - 485 - - - - - - - - - - - - - - Qt::Horizontal - - - - 369 - 20 - - - - - - - - - Cancel - - - - - - - Save - - + + + + + Cancel + + + + + + + Save + + + + @@ -1297,13 +1358,14 @@ + + - - + - - + + diff --git a/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp b/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp index 80b7602..85bc75c 100644 --- a/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp +++ b/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp @@ -27,7 +27,7 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi m_ui->setupUi( this ); /* - * Store link adn preferences + * Store link and preferences */ m_link = link; m_pref = pref; @@ -56,7 +56,7 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi m_ui->minimizeMethod2RadioButton->hide(); /* - * Set minimize type button Ids + * Set minimize icon type button Ids */ m_ui->minimizeIconTypeGroup->setId( m_ui->defaultMinimizeIconRadioButton, Preferences::PREF_DEFAULT_MINIMIZE_ICON); m_ui->minimizeIconTypeGroup->setId( m_ui->minimizeTrayIconRadioButton, Preferences::PREF_MINIMIZE_TRAY_ICON ); @@ -68,9 +68,17 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi m_ui->startupTypeGroup->setId( m_ui->startMinimizedRadioButton, Preferences::PREF_START_MINIMIZED); m_ui->startupTypeGroup->setId( m_ui->startDockedRadioButton, Preferences::PREF_START_DOCKED ); + /* + * Set position button Ids + */ + m_ui->positionGroup->setId( m_ui->noTitlebarCorrectionRadioButton, Preferences::PREF_NO_CORRECTION); + m_ui->positionGroup->setId( m_ui->addTitlebarCorrectionRadioButton, Preferences::PREF_ADD_CORRECTION ); + m_ui->positionGroup->setId( m_ui->subtractTitlebarCorrectionRadioButton, Preferences::PREF_SUBTRACT_CORRECTION ); + #ifdef Q_OS_WIN m_ui->hideDefaultIconCheckBox->hide(); + m_ui->positionGroupBox->hide(); m_ui->restorePositionscheckBox->hide(); #endif @@ -82,18 +90,16 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi #endif #if defined( Q_OS_UNIX ) && defined( NO_SHORTCUTS ) -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) - int index = m_ui->tabWidget->indexOf( m_ui->tabShortcuts ); - m_ui->tabWidget->setTabVisible( index, false ); + hideShortcutsTab(); #else - int index = m_ui->tabWidget->indexOf( m_ui->tabShortcuts ); - m_ui->tabWidget->setTabEnabled( index, false ); - m_ui->tabWidget->setStyleSheet( "QTabBar::tab::disabled { width: 0; height: 0; margin: 0; padding: 0; border: none; }" ); + if( !m_pref->getShortcutsOption() ) + { + hideShortcutsTab(); + } -#endif #endif /* @@ -217,6 +223,26 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi } +/* + * Hide the shortcuts tab + */ +void PreferencesDialog::hideShortcutsTab() +{ +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) + + int index = m_ui->tabWidget->indexOf( m_ui->tabShortcuts ); + m_ui->tabWidget->setTabVisible( index, false ); + +#else + + int index = m_ui->tabWidget->indexOf( m_ui->tabShortcuts ); + m_ui->tabWidget->setTabEnabled( index, false ); + m_ui->tabWidget->setStyleSheet( "QTabBar::tab::disabled { width: 0; height: 0; margin: 0; padding: 0; border: none; }" ); + +#endif +} + + /* * Handle the language change event */ @@ -290,6 +316,24 @@ void PreferencesDialog::setStartupType( Preferences::StartupType startup_typ } +/* + * Set the positions correction state + */ +void PreferencesDialog::setWindowPositionsCorrection( bool state ) +{ + m_ui->correctWinPosCheckBox->setChecked( state ); +} + + +/* + * Set the position correction + */ +void PreferencesDialog::setWindowPositionsCorrectionType( Preferences::WindowPositionsCorrectionType position_correction ) +{ + ( m_ui->positionGroup->button( position_correction ) )->setChecked( true ); +} + + /* * Set the restore window positions state */ @@ -613,9 +657,11 @@ void PreferencesDialog::slotAccept() m_pref->setMinimizeType( static_cast< Preferences::MinimizeType >( m_ui->minimizeTypeGroup->checkedId() ) ); m_pref->setMinimizeIconType( static_cast< Preferences::MinimizeIconType >( m_ui->minimizeIconTypeGroup->checkedId() ) ); - m_pref->setStartupType( static_cast< Preferences::StartupType >( m_ui->startupTypeGroup->checkedId() ) ); - m_pref->setRestoreWindowPositions( m_ui->restorePositionscheckBox->isChecked() ); m_pref->setCloseType( static_cast< Preferences::CloseType >( m_ui->closeTypeGroup->checkedId() ) ); + m_pref->setStartupType( static_cast< Preferences::StartupType >( m_ui->startupTypeGroup->checkedId() ) ); + m_pref->setWindowPositionsCorrection( m_ui->correctWinPosCheckBox->isChecked() ); + m_pref->setWindowPositionsCorrectionType( static_cast< Preferences::WindowPositionsCorrectionType >( m_ui->positionGroup->checkedId() ) ); + m_pref->setRestoreWindowPositions( m_ui->restorePositionscheckBox->isChecked() ); m_pref->setInvertIcon( m_ui->invertIconCheckBox->isChecked() ); m_pref->setShowNumber( m_ui->showNumberCheckBox->isChecked() ); @@ -681,9 +727,11 @@ void PreferencesDialog::slotReject() setMinimizeType( m_pref->getMinimizeType() ); setMinimizeIconType( m_pref->getMinimizeIconType() ); - setStartupType( m_pref->getStartupType() ); - setRestoreWindowPositions( m_pref->getRestoreWindowPositions() ); setCloseType( m_pref->getCloseType() ); + setStartupType( m_pref->getStartupType() ); + setWindowPositionsCorrection( m_pref->getWindowPositionsCorrection() ); + setWindowPositionsCorrectionType( m_pref->getWindowPositionsCorrectionType() ); + setRestoreWindowPositions( m_pref->getRestoreWindowPositions() ); setInvertIcon( m_pref->getInvertIcon() ); setShowNumber( m_pref->getShowNumber() ); @@ -825,24 +873,6 @@ void PreferencesDialog::slotDebugChange() } -/* - * Handle the startup type change signal - */ -void PreferencesDialog::slotStartupTypeChange() -{ - setStartupType( m_pref->getStartupType() ); -} - - -/* - * Handle the restore window positions change signal - */ -void PreferencesDialog::slotRestoreWindowPositionsChange() -{ - setRestoreWindowPositions( m_pref->getRestoreWindowPositions() ); -} - - /* * Handle the minimize type change signal */ @@ -870,6 +900,42 @@ void PreferencesDialog::slotCloseTypeChange() } +/* + * Handle the startup type change signal + */ +void PreferencesDialog::slotStartupTypeChange() +{ + setStartupType( m_pref->getStartupType() ); +} + + +/* + * Handle the window positions correction change signal + */ +void PreferencesDialog::slotWindowPositionsCorrectionChange() +{ + setWindowPositionsCorrection( m_pref->getWindowPositionsCorrection() ); +} + + +/* + * Handle the window positions correction type change signal + */ +void PreferencesDialog::slotWindowPositionsCorrectionTypeChange() +{ + setWindowPositionsCorrectionType( m_pref->getWindowPositionsCorrectionType() ); +} + + +/* + * Handle the restore window positions change signal + */ +void PreferencesDialog::slotRestoreWindowPositionsChange() +{ + setRestoreWindowPositions( m_pref->getRestoreWindowPositions() ); +} + + /* * Handle the icon type change signal */ @@ -1087,6 +1153,7 @@ void PreferencesDialog::slotTruncateShowHideShortcut() { QKeySequence key_seq = m_ui->showHideKeySequenceEdit->keySequence(); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) /* * Workaround for a Qt5 bug in QKeySequenceEdit object, Meta/Win key is not handled correctly. */ @@ -1101,6 +1168,13 @@ void PreferencesDialog::slotTruncateShowHideShortcut() } QKeySequence shortcut( value ); + +#else + + QKeySequence shortcut( key_seq[ 0 ] ); + +#endif + m_ui->showHideKeySequenceEdit->setKeySequence( shortcut ); } diff --git a/app/SysTray-X/SysTray-X-app/preferencesdialog.h b/app/SysTray-X/SysTray-X-app/preferencesdialog.h index 0ac2929..5c1c832 100644 --- a/app/SysTray-X/SysTray-X-app/preferencesdialog.h +++ b/app/SysTray-X/SysTray-X-app/preferencesdialog.h @@ -57,6 +57,11 @@ class PreferencesDialog : public QDialog private: + /** + * @brief hideShortcutsTab. Hide the shortcuts tab. + */ + void hideShortcutsTab(); + /** * @brief setDebug. Set the debug state. * @@ -85,6 +90,20 @@ class PreferencesDialog : public QDialog */ void setStartupType( Preferences::StartupType startup_type ); + /** + * @brief setWindowPositionsCorrection. Set the window postions correction state. + * + * @param state The state. + */ + void setWindowPositionsCorrection( bool state ); + + /** + * @brief setWindowPositionsCorrectionType. Set the window positions correction type. + * + * @param position_correction The correction type. + */ + void setWindowPositionsCorrectionType( Preferences::WindowPositionsCorrectionType position_correction ); + /** * @brief setRestoreWindowPositions. Set the restore window positions state. * @@ -318,6 +337,16 @@ class PreferencesDialog : public QDialog */ void slotStartupTypeChange(); + /** + * @brief slotWindowPositionsCorrectionChange. Slot for handling window positions correction change signals. + */ + void slotWindowPositionsCorrectionChange(); + + /** + * @brief slotWindowPositionsCorrectionTypeChange. Slot for handling window positions correction type change signals. + */ + void slotWindowPositionsCorrectionTypeChange(); + /** * @brief slotRestoreWindowPositionsChange. Slot for handling restore window positions change signals. */ diff --git a/app/SysTray-X/SysTray-X-app/shortcut.cpp b/app/SysTray-X/SysTray-X-app/shortcut.cpp index 87f021b..8d90da5 100644 --- a/app/SysTray-X/SysTray-X-app/shortcut.cpp +++ b/app/SysTray-X/SysTray-X-app/shortcut.cpp @@ -49,9 +49,13 @@ Shortcut::~Shortcut() */ bool Shortcut::setShortcut( QKeySequence key_seq ) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) Qt::Key key_code = Qt::Key( key_seq[ 0 ] & ~Qt::KeyboardModifierMask ); Qt::KeyboardModifiers key_modifiers = Qt::KeyboardModifiers( key_seq[ 0 ] & Qt::KeyboardModifierMask); - +#else + Qt::Key key_code = Qt::Key( key_seq[ 0 ].toCombined() & ~Qt::KeyboardModifierMask ); + Qt::KeyboardModifiers key_modifiers = Qt::KeyboardModifiers( key_seq[ 0 ].toCombined() & Qt::KeyboardModifierMask); +#endif return setShortcut( key_code, key_modifiers ); } diff --git a/app/SysTray-X/SysTray-X-app/systrayx.cpp b/app/SysTray-X/SysTray-X-app/systrayx.cpp index a99caa8..3de05ed 100644 --- a/app/SysTray-X/SysTray-X-app/systrayx.cpp +++ b/app/SysTray-X/SysTray-X-app/systrayx.cpp @@ -122,6 +122,8 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) connect( m_preferences, &Preferences::signalIconDataChange, m_pref_dialog, &PreferencesDialog::slotIconDataChange ); connect( m_preferences, &Preferences::signalMinimizeTypeChange, m_pref_dialog, &PreferencesDialog::slotMinimizeTypeChange ); connect( m_preferences, &Preferences::signalMinimizeIconTypeChange, m_pref_dialog, &PreferencesDialog::slotMinimizeIconTypeChange ); + connect( m_preferences, &Preferences::signalWindowPositionsCorrectionChange, m_pref_dialog, &PreferencesDialog::slotWindowPositionsCorrectionChange ); + connect( m_preferences, &Preferences::signalWindowPositionsCorrectionTypeChange, m_pref_dialog, &PreferencesDialog::slotWindowPositionsCorrectionTypeChange ); connect( m_preferences, &Preferences::signalStartupTypeChange, m_pref_dialog, &PreferencesDialog::slotStartupTypeChange ); connect( m_preferences, &Preferences::signalRestoreWindowPositionsChange, m_pref_dialog, &PreferencesDialog::slotRestoreWindowPositionsChange ); connect( m_preferences, &Preferences::signalCloseTypeChange, m_pref_dialog, &PreferencesDialog::slotCloseTypeChange ); @@ -151,7 +153,12 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) connect( m_preferences, &Preferences::signalDebugChange, m_debug, &DebugWidget::slotDebugChange ); #if defined( SHORTCUTS ) - connect( m_preferences, &Preferences::signalShowHideShortcutChange, this, &SysTrayX::slotShowHideShortcutChange ); + + if( m_preferences->getShortcutsOption() ) + { + connect( m_preferences, &Preferences::signalShowHideShortcutChange, this, &SysTrayX::slotShowHideShortcutChange ); + } + #endif /* @@ -192,7 +199,11 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) /* m_preferences->setBrowserVersion( "115.1.0" ); // m_preferences->setBrowserVersion( "102.2.3" ); - m_preferences->setShowHideShortcut( QKeySequence( Qt::CTRL | Qt::Key_P ) ); + + if( m_preferences->getShortcutsOption() ) + { + m_preferences->setShowHideShortcut( QKeySequence( Qt::CTRL | Qt::Key_P ) ); + } slotLoadLanguage( "en-US" ); //slotLoadLanguage( "it" ); @@ -726,7 +737,7 @@ void SysTrayX::slotLoadLanguage( QString locale ) } QString locale_path = "SysTray-X."+ locale; - m_translator.load( locale_path, ":/languages/" ); + (void)m_translator.load( locale_path, ":/languages/" ); // bool status = m_translator.load( locale_path, ":/languages/" ); // emit signalConsole( QString( "Language loaded %1").arg(status)); qApp->installTranslator( &m_translator ); diff --git a/app/SysTray-X/SysTray-X-app/systrayxlink.cpp b/app/SysTray-X/SysTray-X-app/systrayxlink.cpp index 8a254c7..9c3adbb 100644 --- a/app/SysTray-X/SysTray-X-app/systrayxlink.cpp +++ b/app/SysTray-X/SysTray-X-app/systrayxlink.cpp @@ -696,6 +696,26 @@ void SysTrayXLink::DecodePreferences( const QJsonObject& pref ) m_pref->setStartupType( startup_type ); } + if( pref.contains( "windowPosCor" ) && pref[ "windowPosCor" ].isString() ) + { + bool window_positions_correction = pref[ "windowPosCor" ].toString() == "true"; + + /* + * Store the new window positions correction + */ + m_pref->setWindowPositionsCorrection( window_positions_correction ); + } + + if( pref.contains( "windowPosCorType" ) && pref[ "windowPosCorType" ].isString() ) + { + Preferences::WindowPositionsCorrectionType window_positions_correction_type = static_cast< Preferences::WindowPositionsCorrectionType >( pref[ "windowPosCorType" ].toString().toInt() ); + + /* + * Store the window positions correction type + */ + m_pref->setWindowPositionsCorrectionType( window_positions_correction_type ); + } + if( pref.contains( "restorePositions" ) && pref[ "restorePositions" ].isString() ) { bool resore_window_positions = pref[ "restorePositions" ].toString() == "true"; @@ -994,6 +1014,8 @@ void SysTrayXLink::EncodePreferences( const Preferences& pref ) prefObject.insert( "minimizeType", QJsonValue::fromVariant( QString::number( pref.getMinimizeType() ) ) ); prefObject.insert( "minimizeIconType", QJsonValue::fromVariant( QString::number( pref.getMinimizeIconType() ) ) ); prefObject.insert( "startupType", QJsonValue::fromVariant( QString::number( pref.getStartupType() ) ) ); + prefObject.insert( "windowPosCor", QJsonValue::fromVariant( QString( pref.getWindowPositionsCorrection() ? "true" : "false" ) ) ); + prefObject.insert( "windowPosCorType", QJsonValue::fromVariant( QString::number( pref.getWindowPositionsCorrectionType() ) ) ); prefObject.insert( "restorePositions", QJsonValue::fromVariant( QString( pref.getRestoreWindowPositions() ? "true" : "false" ) ) ); prefObject.insert( "closeType", QJsonValue::fromVariant( QString::number( pref.getCloseType() ) ) ); prefObject.insert( "defaultIconType", QJsonValue::fromVariant( QString::number( pref.getDefaultIconType() ) ) ); diff --git a/app/SysTray-X/SysTray-X-app/windowctrl-unix.cpp b/app/SysTray-X/SysTray-X-app/windowctrl-unix.cpp index 1d7cd76..02bcd72 100644 --- a/app/SysTray-X/SysTray-X-app/windowctrl-unix.cpp +++ b/app/SysTray-X/SysTray-X-app/windowctrl-unix.cpp @@ -186,6 +186,10 @@ void WindowCtrlUnix::findWindows( qint64 pid ) { point = old_positions[ win.window ]; } + else + { + emit signalConsole( "Position not found" ); + } m_tb_window_positions[ win.window ] = point; @@ -391,11 +395,34 @@ void WindowCtrlUnix::updatePositions() int y; GetWindowPosition( m_display, window, &x, &y ); + /* + * Apply the requested correction + */ + QPoint point; + switch( m_pref->getWindowPositionsCorrectionType() ) + { + case Preferences::PREF_NO_CORRECTION: + { + point = QPoint( x, y ); + break; + } + + case Preferences::PREF_ADD_CORRECTION: + { + point = QPoint( x + left, y + top ); + break; + } + + case Preferences::PREF_SUBTRACT_CORRECTION: + { + point = QPoint( x - left, y - top ); + break; + } + } + /* * Update the list? */ - QPoint point = QPoint( x - left, y - top ); - if( m_tb_window_positions[ window ] != point ) { m_tb_window_positions[ window ] = point; @@ -407,7 +434,8 @@ void WindowCtrlUnix::updatePositions() } #ifdef DEBUG_DISPLAY_ACTIONS_DETAILS - emit signalConsole( QString( "Update pos: %1, %2" ).arg( x - left ).arg( y - top ) ); + emit signalConsole( QString( "Update pos: %1, %2" ).arg( x ).arg( y ) ); + emit signalConsole( QString( "Update pos corrected: %1, %2" ).arg( point.x() ).arg( point.y() ) ); #endif } } @@ -432,6 +460,11 @@ void WindowCtrlUnix::minimizeWindowToTaskbar( quint64 window ) emit signalConsole( "Minimize to taskbar" ); #endif + /* + * Store the current window positions + */ + updatePositions(); + /* * Save the hints */ @@ -477,6 +510,11 @@ void WindowCtrlUnix::minimizeWindowToTray( quint64 window ) emit signalConsole( "Minimize to system tray" ); #endif + /* + * Store the current window positions + */ + updatePositions(); + /* * Save the hints */ @@ -611,6 +649,19 @@ void WindowCtrlUnix::normalizeWindow( quint64 window ) */ Sync( m_display ); + /* + * Force the window to the last known position? + */ + if( m_pref->getWindowPositionsCorrection() ) + { + /* + * Move the window to the last recorded position + */ + QPoint pos = m_tb_window_positions[ window ]; + MoveWindow( m_display, window, pos.x(), pos.y() ); + Flush( m_display ); + } + /* * Let us wait a bit, maybe this helps... */ @@ -682,7 +733,10 @@ void WindowCtrlUnix::setPositions( QList< QPoint > window_positions ) #endif if( i < window_positions.length() ) { - MoveWindow( m_display, window, window_positions.at( i ).x(), window_positions.at( i ).y() ); + QPoint pos = window_positions.at( i ); + + m_tb_window_positions[ window ] = pos; + MoveWindow( m_display, window, pos.x(), pos.y() ); } } diff --git a/app/SysTray-X/SysTray-X-app/windowctrl-unix.h b/app/SysTray-X/SysTray-X-app/windowctrl-unix.h index bb24e33..1fbdfd7 100644 --- a/app/SysTray-X/SysTray-X-app/windowctrl-unix.h +++ b/app/SysTray-X/SysTray-X-app/windowctrl-unix.h @@ -341,6 +341,13 @@ class WindowCtrlUnix : public QObject */ void signalPositions( QList< QPoint > positions ); + protected: + + /** + * @brief m_pref. Pointer to the preferences storage. + */ + Preferences* m_pref; + private: /** diff --git a/app/SysTray-X/SysTray-X-app/windowctrl-win.h b/app/SysTray-X/SysTray-X-app/windowctrl-win.h index 1525adc..28450df 100644 --- a/app/SysTray-X/SysTray-X-app/windowctrl-win.h +++ b/app/SysTray-X/SysTray-X-app/windowctrl-win.h @@ -272,6 +272,13 @@ class WindowCtrlWin : public QObject */ void signalConsole( QString message ); + protected: + + /** + * @brief m_pref. Pointer to the preferences storage. + */ + Preferences* m_pref; + private: /** diff --git a/app/SysTray-X/SysTray-X-app/windowctrl.cpp b/app/SysTray-X/SysTray-X-app/windowctrl.cpp index ae7f632..e715fe8 100644 --- a/app/SysTray-X/SysTray-X-app/windowctrl.cpp +++ b/app/SysTray-X/SysTray-X-app/windowctrl.cpp @@ -174,15 +174,6 @@ void WindowCtrl::slotWindowState( Preferences::WindowState state, int id ) QList< quint64 > win_ids = getWinIds(); -#ifdef Q_OS_UNIX - - /* - * Update window positions - */ - updatePositions(); - -#endif - /* * Minimize/dock all */ @@ -253,15 +244,6 @@ void WindowCtrl::slotShowHide() */ normalizeWindowsHidden(); -#endif - -#ifdef Q_OS_UNIX - - /* - * Update the positions - */ - updatePositions(); - #endif TargetType target_type = TargetType::TYPE_WINDOW_TO_SYSTEMTRAY; diff --git a/app/SysTray-X/SysTray-X-app/windowctrl.h b/app/SysTray-X/SysTray-X-app/windowctrl.h index 6aeda44..60f4993 100644 --- a/app/SysTray-X/SysTray-X-app/windowctrl.h +++ b/app/SysTray-X/SysTray-X-app/windowctrl.h @@ -5,7 +5,8 @@ * Qt includes */ #include - +#include +#include /* * Local includes @@ -23,7 +24,6 @@ * Predefines */ class QWindow; -class Preferences; /** * @brief The WindowCtrl class. @@ -56,9 +56,6 @@ class WindowCtrl : public QObject signals: -// void signalShow(); -// void signalHide(); - void signalHideDefaultIconChange(bool hide ); public slots: @@ -138,11 +135,6 @@ class WindowCtrl : public QObject private: - /** - * @brief m_pref. Pointer to the preferences storage. - */ - Preferences* m_pref; - /** * @brief m_show_hide_active */ diff --git a/app/SysTray-X/SysTray-X-lib-x11/systray-x-lib-x11.cpp b/app/SysTray-X/SysTray-X-lib-x11/systray-x-lib-x11.cpp index f381cdd..5371e4e 100644 --- a/app/SysTray-X/SysTray-X-lib-x11/systray-x-lib-x11.cpp +++ b/app/SysTray-X/SysTray-X-lib-x11/systray-x-lib-x11.cpp @@ -464,10 +464,36 @@ void GetWindowPosition( void* display, quint64 window, int* pos_x, int* pos_y { Display* dsp = (Display*)display; - int x, y; + /* + * Get position, method 1 + */ + int x1, y1; Window child; XWindowAttributes xwa; - XTranslateCoordinates( dsp, window, XDefaultRootWindow( dsp ), 0, 0, &x, &y, &child ); + XTranslateCoordinates( dsp, window, XDefaultRootWindow( dsp ), 0, 0, &x1, &y1, &child ); + + /* + * Get position, method 2 + */ + int x2, y2; + Window root; + uint width, height; + uint border; + uint depth; + XGetGeometry( dsp, window, &root, &x2, &y2, &width, &height, &border, &depth ); + + int x = x1; + int y = y1; + + if( x == 0 && y == 0 ) + { + x = x2; + y = y2; + } + + /* + * Correct the position + */ XGetWindowAttributes( dsp, window, &xwa ); *pos_x = x - xwa.x; diff --git a/create_linux_gnome_installers.sh b/create_linux_gnome_installers.sh deleted file mode 100755 index a29fd2e..0000000 --- a/create_linux_gnome_installers.sh +++ /dev/null @@ -1,711 +0,0 @@ -#!/bin/bash - -VERSION=`git describe --long | sed "s/-.*//"` - -OBS_REPO_BASE="https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons" -TARGET_DIR="bin" - -GNOME_APPINDICATOR="https://github.com/ubuntu/gnome-shell-extension-appindicator.git" - -OBS_PACKAGE="systray-x-gnome" - -ENABLE_RPM=true -ENABLE_DEB=true -ENABLE_PAC=true - -OBS_RPM_ARCHS="" -OBS_RPM_PKS="" -OBS_RPM_GNOME_EXT="" -OBS_RPM_ARCHS+="openSUSE_Leap_15.4/x86_64 " -OBS_RPM_PKS+="_ " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/i586 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_GNOME_EXT+="master " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/x86_64 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_GNOME_EXT+="master " -OBS_RPM_ARCHS+="15.4/x86_64 " -OBS_RPM_PKS+="lp154 " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="15.5/x86_64 " -OBS_RPM_PKS+="lp155 " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="Fedora_37/x86_64 " -OBS_RPM_PKS+="fed37 " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="Fedora_38/x86_64 " -OBS_RPM_PKS+="fed38 " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="Fedora_39/x86_64 " -OBS_RPM_PKS+="fed39 " -OBS_RPM_GNOME_EXT+="master " -OBS_RPM_ARCHS+="Fedora_Rawhide/x86_64 " -OBS_RPM_PKS+="fedraw " -OBS_RPM_GNOME_EXT+="master " - - -OBS_DEB_ARCHS="" -OBS_DEB_PKS="" -OBS_DEB_GNOME_EXT="" -OBS_DEB_ARCHS+="Debian_10/i386 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_GNOME_EXT+="v26 " -OBS_DEB_ARCHS+="Debian_10/amd64 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_GNOME_EXT+="v26 " -OBS_DEB_ARCHS+="Debian_11/i386 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_GNOME_EXT+="v34 " -OBS_DEB_ARCHS+="Debian_11/amd64 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_GNOME_EXT+="v34 " -OBS_DEB_ARCHS+="Debian_12/i386 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_GNOME_EXT+="v46 " -OBS_DEB_ARCHS+="Debian_12/amd64 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_GNOME_EXT+="v46 " -OBS_DEB_ARCHS+="Debian_Unstable/amd64 " -OBS_DEB_PKS+="debunstable " -OBS_DEB_GNOME_EXT+="v46 " -OBS_DEB_ARCHS+="Debian_Testing/amd64 " -OBS_DEB_PKS+="debtest " -OBS_DEB_GNOME_EXT+="v46 " -OBS_DEB_ARCHS+="xUbuntu_18.04/i386 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_GNOME_EXT+="v26 " -OBS_DEB_ARCHS+="xUbuntu_18.04/amd64 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_GNOME_EXT+="v26 " -OBS_DEB_ARCHS+="xUbuntu_20.04/amd64 " -OBS_DEB_PKS+="focal2004 " -OBS_DEB_GNOME_EXT+="0 " -OBS_DEB_ARCHS+="xUbuntu_22.04/amd64 " -OBS_DEB_PKS+="jammy2022 " -OBS_DEB_GNOME_EXT+="0 " -OBS_DEB_ARCHS+="xUbuntu_23.04/amd64 " -OBS_DEB_PKS+="lunar2023 " -OBS_DEB_GNOME_EXT+="0 " -OBS_DEB_ARCHS+="xUbuntu_23.10/amd64 " -OBS_DEB_PKS+="mantic2023 " -OBS_DEB_GNOME_EXT+="0 " - - -OBS_PAC_ARCHS="" -OBS_PAC_PKS="" -OBS_PAC_ARCHS+="Arch/x86_64 " -OBS_PAC_PKS+="arch " -OBS_PAC_GNOME_EXT+="master " - - -create_gnome_extension_tar() { - - local GIT_BASE=$1 - local GNOME_EXT=$2 - - ########################################## - # - # Create user installable - # gnome-shell-extension-appindicator - # - ########################################## - - if [ -f gnome-shell-extension-${GNOME_EXT}.tar.xz ] ; then - return - fi - - if [ ${GNOME_EXT} != "v26" ] && - [ ${GNOME_EXT} != "v34" ] && - [ ${GNOME_EXT} != "v46" ] && - [ ${GNOME_EXT} != "v53" ] && - [ ${GNOME_EXT} != "master" ] ; then - return - fi - - git clone -q ${GIT_BASE} - pushd gnome-shell-extension-appindicator > /dev/null 2>&1 - git checkout -q ${GNOME_EXT} - popd > /dev/null 2>&1 - - # - # Create tar - # - mv -f gnome-shell-extension-appindicator appindicatorsupport@rgcjonas.gmail.com - tar -cJf gnome-shell-extension-${GNOME_EXT}.tar.xz appindicatorsupport@rgcjonas.gmail.com - - # - # Cleanup - # - rm -rf appindicatorsupport@rgcjonas.gmail.com -} - - -create_rpm_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local RPM_NAME_EXT=$4 - local GNOME_EXT=$5 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find rpm - # - local RPM_FILE=$(grep ">${OBS_PACKAGE}-${VERSION}.*rpm<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*rpm\)<.*/\1/") - rm -f index.html - - echo "Found: "${RPM_FILE} - - FOUND_VERSION=$(echo ${RPM_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Add the gnome extension to the tar - # - if [ "${GNOME_EXT}" == "v26" ] && [ -f gnome-shell-extension-v26.tar.xz ] ; then - cp -f gnome-shell-extension-v26.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v34" ] && [ -f gnome-shell-extension-v34.tar.xz ] ; then - cp -f gnome-shell-extension-v34.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v46" ] && [ -f gnome-shell-extension-v46.tar.xz ] ; then - cp -f gnome-shell-extension-v46.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "master" ] && [ -f gnome-shell-extension-master.tar.xz ] ; then - cp -f gnome-shell-extension-master.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - - # - # Get the SysTray-X rpm - # - if [ ! -f ${RPM_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${RPM_FILE}" - fi - - # - # Get compression type - # - COMPRESSION=$(rpm -qp --qf '%{PAYLOADCOMPRESSOR}\n' ${RPM_FILE}) -# echo ${COMPRESSION} - - case ${COMPRESSION} in -# zstd) - # - # Extract - # -# rpm2cpio ${RPM_FILE} | zstd -d | cpio --quiet -idm - - # - # Get files - # -# cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X -# chmod 755 ./${TAR_DIR}/SysTray-X -# cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi -# ;; - *) - # - # Extract - # - rpm2cpio ${RPM_FILE} | cpio --quiet -idm - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - if [ -d ./usr/share/doc/packages ] ; then - cp -f ./usr/share/doc/packages/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - if [ -d ./usr/share/doc/${OBS_PACKAGE} ] ; then - cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - cp -f ./usr/share/doc/${OBS_PACKAGE}*/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - fi - fi - ;; - esac - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the RPM - # - if [ "${RPM_NAME_EXT}" != "_" ] ; then - NEW_RPM_FILE=`echo ${RPM_FILE} | sed -s "s/\(systray-x-gnome-${FOUND_VERSION}-\)\(.*\)/\1${RPM_NAME_EXT}\.\2/"` - mv -f ${RPM_FILE} $NEW_RPM_FILE - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_deb_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local DEB_NAME_EXT=$4 - local GNOME_EXT=$5 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find deb - # - local DEB_FILE=$(grep ">${OBS_PACKAGE}_${VERSION}.*\.deb<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*deb\)<.*/\1/") - rm -f index.html - - echo "Found: "${DEB_FILE} - - FOUND_VERSION=$(echo ${DEB_FILE} | sed -e "s/${OBS_PACKAGE}_\(.*\)_.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Add the gnome extension to the tar - # - if [ "${GNOME_EXT}" == "v26" ] && [ -f gnome-shell-extension-v26.tar.xz ] ; then - cp -f gnome-shell-extension-v26.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v34" ] && [ -f gnome-shell-extension-v34.tar.xz ] ; then - cp -f gnome-shell-extension-v34.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v46" ] && [ -f gnome-shell-extension-v46.tar.xz ] ; then - cp -f gnome-shell-extension-v46.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "master" ] && [ -f gnome-shell-extension-master.tar.xz ] ; then - cp -f gnome-shell-extension-master.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - - # - # Get the SysTray-X deb - # - if [ ! -f ${DEB_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${DEB_FILE}" - fi - - # - # Extract - # - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/bin/SysTray-X > ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi > ./${TAR_DIR}/systray-x@Ximi1970.xpi - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the DEB - # - if [ "${DEB_NAME_EXT}" != "_" ] ; then - NEW_DEB_FILE=`echo ${DEB_FILE} | sed -s "s/\(${OBS_PACKAGE}\_${FOUND_VERSION}\_\)\(.*\)/\1${DEB_NAME_EXT}\_\2/"` - mv -f ${DEB_FILE} ${NEW_DEB_FILE} - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_pac_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local PAC_NAME_EXT=$4 - local GNOME_EXT=$5 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - curl -s "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" > index.html - - # - # Find rpm - # - local PAC_FILE=$(grep ">${OBS_PACKAGE}-[^dgm].*${VERSION}.*\.zst<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}-[^d].*zst\)<.*/\1/") - rm -f index.html - - echo "Found: "${PAC_FILE} - - FOUND_VERSION=$(echo ${PAC_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Add the gnome extension to the tar - # - if [ "${GNOME_EXT}" == "v26" ] && [ -f gnome-shell-extension-v26.tar.xz ] ; then - cp -f gnome-shell-extension-v26.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v34" ] && [ -f gnome-shell-extension-v34.tar.xz ] ; then - cp -f gnome-shell-extension-v34.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v46" ] && [ -f gnome-shell-extension-v46.tar.xz ] ; then - cp -f gnome-shell-extension-v46.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "master" ] && [ -f gnome-shell-extension-master.tar.xz ] ; then - cp -f gnome-shell-extension-master.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - - # - # Get the SysTray-X rpm - # - if [ ! -f ${PAC_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${PAC_FILE}" - fi - - if [ ! -f systray-x.tar.zst ] ; then - cp -f ${PAC_FILE} systray-x.tar.zst - fi - - tar -I zstd -xf systray-x.tar.zst - - rm -f systray-x.tar.zst - rm -f .BUILDINFO - rm -f .INSTALL - rm -f .MTREE - rm -f .PKGINFO - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - cp -f ./usr/lib/thunderbird/distribution/extensions/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # -# tar -C "./${TAR_DIR}" -cJf "${TAR_DIR}.tar.xz" . - tar -C "./${TAR_DIR}" -cJf systray-x.tar.xz . - mv -f systray-x.tar.xz ${TAR_DIR}.tar.xz - - # - # Rename the PAC - # - if [ "${PAC_NAME_EXT}" != "_" ] ; then - NEW_PAC_FILE=`echo ${PAC_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${PAC_NAME_EXT}\.\2/"` - mv -f "${PAC_FILE}" "$NEW_PAC_FILE" - fi - - # - # Cleanup - # - rm -rf "${TAR_DIR}" -} - -################################################################################# -# -# -# Main -# -# -################################################################################# - -mkdir -p $TARGET_DIR -pushd $TARGET_DIR > /dev/null 2>&1 - -if [ "$ENABLE_RPM" = true ] ; then - # - # Create bash installers for RPM based distributions - # - INDEX=1 - for rpmdir in $OBS_RPM_ARCHS ; do - - echo - echo - echo "Generating installer: "${rpmdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${rpmdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${rpmdir} | cut -d'/' -f2) - - RPM_NAME_EXT=$(echo ${OBS_RPM_PKS} | cut -d' ' -f${INDEX}) - GNOME_EXT=$(echo ${OBS_RPM_GNOME_EXT} | cut -d' ' -f${INDEX}) - - # - # Generate the gnome tar file - # - create_gnome_extension_tar ${GNOME_APPINDICATOR} ${GNOME_EXT} - - # - # Generate the SysTray-X tar file - # - create_rpm_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${RPM_NAME_EXT} ${GNOME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Gnome setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Gnome.sh" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_DEB" = true ] ; then - # - # Cleanup - # - rm -f gnome-shell-extension.tar.xz - - # - # Create bash installers for DEB based distributions - # - INDEX=1 - for debdir in $OBS_DEB_ARCHS ; do - - echo - echo - echo "Generating installer: "${debdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${debdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${debdir} | cut -d'/' -f2) - - DEB_NAME_EXT=$(echo ${OBS_DEB_PKS} | cut -d' ' -f${INDEX}) - GNOME_EXT=$(echo ${OBS_DEB_GNOME_EXT} | cut -d' ' -f${INDEX}) - - # - # Generate the gnome tar file - # - create_gnome_extension_tar ${GNOME_APPINDICATOR} ${GNOME_EXT} - - # - # Generate the SysTray-X tar file - # - create_deb_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${DEB_NAME_EXT} ${GNOME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Gnome setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Gnome.sh" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_PAC" = true ] ; then - # - # Create bash installers for PAC based distributions - # - INDEX=1 - for pacdir in $OBS_PAC_ARCHS ; do - - echo - echo - echo "Generating installer: "${pacdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${pacdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${pacdir} | cut -d'/' -f2) - - PAC_NAME_EXT=$(echo ${OBS_PAC_PKS} | cut -d' ' -f${INDEX}) - GNOME_EXT=$(echo ${OBS_DEB_GNOME_EXT} | cut -d' ' -f${INDEX}) - - # - # Generate the gnome tar file - # - create_gnome_extension_tar ${GNOME_APPINDICATOR} ${GNOME_EXT} - - # - # Generate the SysTray-X tar file - # - create_pac_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${PAC_NAME_EXT} ${GNOME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Gnome setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Gnome.sh" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -# -# Cleanup -# -rm -f gnome-shell-extension-*.tar.xz - -popd > /dev/null 2>&1 diff --git a/create_linux_kde_installers.sh b/create_linux_kde_installers.sh deleted file mode 100755 index ed72de6..0000000 --- a/create_linux_kde_installers.sh +++ /dev/null @@ -1,572 +0,0 @@ -#!/bin/bash - -VERSION=`git describe --long | sed "s/-.*//"` - -OBS_REPO_BASE="https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons" -TARGET_DIR="bin" - -OBS_PACKAGE="systray-x" - -ENABLE_RPM=true -ENABLE_DEB=true -ENABLE_PAC=true - -OBS_RPM_ARCHS="" -OBS_RPM_PKS="" -OBS_RPM_ARCHS+="openSUSE_Leap_15.4/x86_64 " -OBS_RPM_PKS+="_ " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/i586 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/x86_64 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_ARCHS+="15.4/x86_64 " -OBS_RPM_PKS+="lp154 " -OBS_RPM_ARCHS+="15.5/x86_64 " -OBS_RPM_PKS+="lp155 " -OBS_RPM_ARCHS+="Fedora_37/x86_64 " -OBS_RPM_PKS+="fed37 " -OBS_RPM_ARCHS+="Fedora_38/x86_64 " -OBS_RPM_PKS+="fed38 " -OBS_RPM_ARCHS+="Fedora_39/x86_64 " -OBS_RPM_PKS+="fed39 " -OBS_RPM_ARCHS+="Fedora_Rawhide/x86_64 " -OBS_RPM_PKS+="fedraw " - - -OBS_DEB_ARCHS="" -OBS_DEB_PKS="" -OBS_DEB_ARCHS+="Debian_10/i386 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_ARCHS+="Debian_10/amd64 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_ARCHS+="Debian_11/i386 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_ARCHS+="Debian_11/amd64 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_ARCHS+="Debian_12/i386 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_ARCHS+="Debian_12/amd64 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_ARCHS+="Debian_Unstable/amd64 " -OBS_DEB_PKS+="debunstable " -OBS_DEB_ARCHS+="Debian_Testing/amd64 " -OBS_DEB_PKS+="debtest " -OBS_DEB_ARCHS+="xUbuntu_18.04/i386 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_ARCHS+="xUbuntu_18.04/amd64 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_ARCHS+="xUbuntu_20.04/amd64 " -OBS_DEB_PKS+="focal2004 " -OBS_DEB_ARCHS+="xUbuntu_22.04/amd64 " -OBS_DEB_PKS+="jammy2022 " -OBS_DEB_ARCHS+="xUbuntu_23.04/amd64 " -OBS_DEB_PKS+="lunar2023 " -OBS_DEB_ARCHS+="xUbuntu_23.10/amd64 " -OBS_DEB_PKS+="mantic2023 " - - -OBS_PAC_ARCHS="" -OBS_PAC_PKS="" -OBS_PAC_ARCHS+="Arch/x86_64 " -OBS_PAC_PKS+="arch " - - -create_rpm_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local RPM_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find rpm - # - local RPM_FILE=$(grep ">${OBS_PACKAGE}-${VERSION}.*rpm<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*rpm\)<.*/\1/") - rm -f index.html - - echo "Found: "${RPM_FILE} - - FOUND_VERSION=$(echo ${RPM_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X rpm - # - if [ ! -f ${RPM_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${RPM_FILE}" - fi - - # - # Get compression type - # - COMPRESSION=$(rpm -qp --qf '%{PAYLOADCOMPRESSOR}\n' ${RPM_FILE}) -# echo ${COMPRESSION} - - case ${COMPRESSION} in -# zstd) - # - # Extract - # -# rpm2cpio ${RPM_FILE} | zstd -d | cpio --quiet -idm - - # - # Get files - # -# cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X -# chmod 755 ./${TAR_DIR}/SysTray-X -# cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi -# ;; - *) - # - # Extract - # - rpm2cpio ${RPM_FILE} | cpio --quiet -idm - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - if [ -d ./usr/share/doc/packages ] ; then - cp -f ./usr/share/doc/packages/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - if [ -d ./usr/share/doc/${OBS_PACKAGE} ] ; then - cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - cp -f ./usr/share/doc/${OBS_PACKAGE}*/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - fi - fi - ;; - esac - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the RPM - # - if [ "${RPM_NAME_EXT}" != "_" ] ; then - NEW_RPM_FILE=`echo ${RPM_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${RPM_NAME_EXT}\.\2/"` - mv -f ${RPM_FILE} $NEW_RPM_FILE - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_deb_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local DEB_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find deb - # - local DEB_FILE=$(grep ">${OBS_PACKAGE}_${VERSION}.*\.deb<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*deb\)<.*/\1/") - rm -f index.html - - echo "Found: "${DEB_FILE} - - FOUND_VERSION=$(echo ${DEB_FILE} | sed -e "s/${OBS_PACKAGE}_\(.*\)_.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X deb - # - if [ ! -f ${DEB_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${DEB_FILE}" - fi - - # - # Extract - # - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/bin/SysTray-X > ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi > ./${TAR_DIR}/systray-x@Ximi1970.xpi - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the DEB - # - if [ "${DEB_NAME_EXT}" != "_" ] ; then - NEW_DEB_FILE=`echo ${DEB_FILE} | sed -s "s/\(${OBS_PACKAGE}\_${FOUND_VERSION}\_\)\(.*\)/\1${DEB_NAME_EXT}\_\2/"` - mv -f ${DEB_FILE} ${NEW_DEB_FILE} - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_pac_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local PAC_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - curl -s "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" > index.html - - # - # Find rpm - # - local PAC_FILE=$(grep ">${OBS_PACKAGE}-[^dgm].*${VERSION}.*\.zst<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}-[^d].*zst\)<.*/\1/") - rm -f index.html - - echo "Found: "${PAC_FILE} - - FOUND_VERSION=$(echo ${PAC_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X rpm - # - if [ ! -f ${PAC_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${PAC_FILE}" - fi - - if [ ! -f systray-x.tar.zst ] ; then - cp -f ${PAC_FILE} systray-x.tar.zst - fi - - tar -I zstd -xf systray-x.tar.zst - - rm -f systray-x.tar.zst - rm -f .BUILDINFO - rm -f .INSTALL - rm -f .MTREE - rm -f .PKGINFO - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - cp -f ./usr/lib/thunderbird/distribution/extensions/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # -# tar -C "./${TAR_DIR}" -cJf "${TAR_DIR}.tar.xz" . - tar -C "./${TAR_DIR}" -cJf systray-x.tar.xz . - mv -f systray-x.tar.xz ${TAR_DIR}.tar.xz - - # - # Rename the PAC - # - if [ "${PAC_NAME_EXT}" != "_" ] ; then - NEW_PAC_FILE=`echo ${PAC_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${PAC_NAME_EXT}\.\2/"` - mv -f "${PAC_FILE}" "$NEW_PAC_FILE" - fi - - # - # Cleanup - # - rm -rf "${TAR_DIR}" -} - -################################################################################# -# -# -# Main -# -# -################################################################################# - -mkdir -p $TARGET_DIR -pushd $TARGET_DIR > /dev/null 2>&1 - -if [ "$ENABLE_RPM" = true ] ; then - # - # Create bash installers for RPM based distributions - # - INDEX=1 - for rpmdir in $OBS_RPM_ARCHS ; do - - echo - echo - echo "Generating installer: "${rpmdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${rpmdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${rpmdir} | cut -d'/' -f2) - - RPM_NAME_EXT=$(echo ${OBS_RPM_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_rpm_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${RPM_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Kde setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Kde.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_DEB" = true ] ; then - # - # Cleanup - # - rm -f gnome-shell-extension.tar.xz - - # - # Create bash installers for DEB based distributions - # - INDEX=1 - for debdir in $OBS_DEB_ARCHS ; do - - echo - echo - echo "Generating installer: "${debdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${debdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${debdir} | cut -d'/' -f2) - - DEB_NAME_EXT=$(echo ${OBS_DEB_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_deb_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${DEB_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Kde setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Kde.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_PAC" = true ] ; then - # - # Create bash installers for PAC based distributions - # - INDEX=1 - for pacdir in $OBS_PAC_ARCHS ; do - - echo - echo - echo "Generating installer: "${pacdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${pacdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${pacdir} | cut -d'/' -f2) - - PAC_NAME_EXT=$(echo ${OBS_PAC_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_pac_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${PAC_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Kde setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Kde.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -# -# Cleanup -# -rm -f gnome-shell-extension-*.tar.xz - -popd > /dev/null 2>&1 diff --git a/create_linux_minimal_installers.sh b/create_linux_minimal_installers.sh deleted file mode 100755 index 10f37d6..0000000 --- a/create_linux_minimal_installers.sh +++ /dev/null @@ -1,564 +0,0 @@ -#!/bin/bash - -VERSION=`git describe --long | sed "s/-.*//"` - -OBS_REPO_BASE="https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons" -TARGET_DIR="bin" - -OBS_PACKAGE="systray-x-minimal" - -ENABLE_RPM=true -ENABLE_DEB=true -ENABLE_PAC=true - -OBS_RPM_ARCHS="" -OBS_RPM_PKS="" -OBS_RPM_ARCHS+="openSUSE_Leap_15.4/x86_64 " -OBS_RPM_PKS+="_ " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/i586 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/x86_64 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_ARCHS+="15.4/x86_64 " -OBS_RPM_PKS+="lp154 " -OBS_RPM_ARCHS+="15.5/x86_64 " -OBS_RPM_PKS+="lp155 " -OBS_RPM_ARCHS+="Fedora_37/x86_64 " -OBS_RPM_PKS+="fed37 " -OBS_RPM_ARCHS+="Fedora_38/x86_64 " -OBS_RPM_PKS+="fed38 " -OBS_RPM_ARCHS+="Fedora_39/x86_64 " -OBS_RPM_PKS+="fed39 " -OBS_RPM_ARCHS+="Fedora_Rawhide/x86_64 " -OBS_RPM_PKS+="fedraw " - - -OBS_DEB_ARCHS="" -OBS_DEB_PKS="" -OBS_DEB_ARCHS+="Debian_10/i386 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_ARCHS+="Debian_10/amd64 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_ARCHS+="Debian_11/i386 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_ARCHS+="Debian_11/amd64 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_ARCHS+="Debian_12/i386 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_ARCHS+="Debian_12/amd64 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_ARCHS+="Debian_Unstable/amd64 " -OBS_DEB_PKS+="debunstable " -OBS_DEB_ARCHS+="Debian_Testing/amd64 " -OBS_DEB_PKS+="debtest " -OBS_DEB_ARCHS+="xUbuntu_18.04/i386 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_ARCHS+="xUbuntu_18.04/amd64 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_ARCHS+="xUbuntu_20.04/amd64 " -OBS_DEB_PKS+="focal2004 " -OBS_DEB_ARCHS+="xUbuntu_22.04/amd64 " -OBS_DEB_PKS+="jammy2022 " -OBS_DEB_ARCHS+="xUbuntu_23.04/amd64 " -OBS_DEB_PKS+="lunar2023 " -OBS_DEB_ARCHS+="xUbuntu_23.10/amd64 " -OBS_DEB_PKS+="mantic2023 " - - -OBS_PAC_ARCHS="" -OBS_PAC_PKS="" -OBS_PAC_ARCHS+="Arch/x86_64 " -OBS_PAC_PKS+="arch " - - -create_rpm_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local RPM_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find rpm - # - local RPM_FILE=$(grep ">${OBS_PACKAGE}-.*${VERSION}.*rpm<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}-.*rpm\)<.*/\1/") - - rm -f index.html - - echo "Found: "${RPM_FILE} - - FOUND_VERSION=$(echo ${RPM_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X rpm - # - if [ ! -f ${RPM_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${RPM_FILE}" - fi - - # - # Get compression type - # - COMPRESSION=$(rpm -qp --qf '%{PAYLOADCOMPRESSOR}\n' ${RPM_FILE}) -# echo ${COMPRESSION} - - case ${COMPRESSION} in -# zstd) - # - # Extract - # -# rpm2cpio ${RPM_FILE} | zstd -d | cpio --quiet -idm - - # - # Get files - # -# cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X -# chmod 755 ./${TAR_DIR}/SysTray-X -# cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi -# ;; - *) - # - # Extract - # - rpm2cpio ${RPM_FILE} | cpio --quiet -idm - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - if [ -d ./usr/share/doc/packages ] ; then - cp -f ./usr/share/doc/packages/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - if [ -d ./usr/share/doc/${OBS_PACKAGE} ] ; then - cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - cp -f ./usr/share/doc/${OBS_PACKAGE}*/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - fi - fi - ;; - esac - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the RPM - # - if [ "${RPM_NAME_EXT}" != "_" ] ; then - NEW_RPM_FILE=`echo ${RPM_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${RPM_NAME_EXT}\.\2/"` - mv -f ${RPM_FILE} $NEW_RPM_FILE - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_deb_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local DEB_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find deb - # - local DEB_FILE=$(grep ">${OBS_PACKAGE}_${VERSION}.*\.deb<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*deb\)<.*/\1/") - rm -f index.html - - echo "Found: "${DEB_FILE} - - FOUND_VERSION=$(echo ${DEB_FILE} | sed -e "s/${OBS_PACKAGE}_\(.*\)_.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X deb - # - if [ ! -f ${DEB_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${DEB_FILE}" - fi - - # - # Extract - # - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/bin/SysTray-X > ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi > ./${TAR_DIR}/systray-x@Ximi1970.xpi - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the DEB - # - if [ "${DEB_NAME_EXT}" != "_" ] ; then - NEW_DEB_FILE=`echo ${DEB_FILE} | sed -s "s/\(${OBS_PACKAGE}\_${FOUND_VERSION}\_\)\(.*\)/\1${DEB_NAME_EXT}\_\2/"` - mv -f ${DEB_FILE} ${NEW_DEB_FILE} - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_pac_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local PAC_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - curl -s "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" > index.html - - # - # Find rpm - # - local PAC_FILE=$(grep ">${OBS_PACKAGE}-[^d].*${VERSION}.*\.zst<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}-[^d].*zst\)<.*/\1/") - rm -f index.html - - echo "Found: "${PAC_FILE} - - FOUND_VERSION=$(echo ${PAC_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X rpm - # - if [ ! -f ${PAC_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${PAC_FILE}" - fi - - if [ ! -f systray-x.tar.zst ] ; then - cp -f ${PAC_FILE} systray-x.tar.zst - fi - - tar -I zstd -xf systray-x.tar.zst - - rm -f systray-x.tar.zst - rm -f .BUILDINFO - rm -f .INSTALL - rm -f .MTREE - rm -f .PKGINFO - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - cp -f ./usr/lib/thunderbird/distribution/extensions/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # -# tar -C "./${TAR_DIR}" -cJf "${TAR_DIR}.tar.xz" . - tar -C "./${TAR_DIR}" -cJf systray-x.tar.xz . - mv -f systray-x.tar.xz ${TAR_DIR}.tar.xz - - # - # Rename the PAC - # - if [ "${PAC_NAME_EXT}" != "_" ] ; then - NEW_PAC_FILE=`echo ${PAC_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${PAC_NAME_EXT}\.\2/"` - mv -f "${PAC_FILE}" "$NEW_PAC_FILE" - fi - - # - # Cleanup - # - rm -rf "${TAR_DIR}" -} - - -################################################################################# -# -# -# Main -# -# -################################################################################# - -mkdir -p $TARGET_DIR -pushd $TARGET_DIR > /dev/null 2>&1 - -if [ "$ENABLE_RPM" = true ] ; then - # - # Create bash installers for RPM based distributions - # - INDEX=1 - for rpmdir in $OBS_RPM_ARCHS ; do - - echo - echo - echo "Generating installer: "${rpmdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${rpmdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${rpmdir} | cut -d'/' -f2) - - RPM_NAME_EXT=$(echo ${OBS_RPM_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_rpm_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${RPM_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Minimal setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_DEB" = true ] ; then - # - # Create bash installers for DEB based distributions - # - INDEX=1 - for debdir in $OBS_DEB_ARCHS ; do - - echo - echo - echo "Generating installer: "${debdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${debdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${debdir} | cut -d'/' -f2) - - DEB_NAME_EXT=$(echo ${OBS_DEB_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_deb_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${DEB_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Minimal setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_PAC" = true ] ; then - # - # Create bash installers for PAC based distributions - # - INDEX=1 - for pacdir in $OBS_PAC_ARCHS ; do - - echo - echo - echo "Generating installer: "${pacdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${pacdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${pacdir} | cut -d'/' -f2) - - PAC_NAME_EXT=$(echo ${OBS_PAC_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_pac_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${PAC_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Minimal setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -popd > /dev/null 2>&1 diff --git a/create_linux_staging_gnome_installers.sh b/create_linux_staging_gnome_installers.sh deleted file mode 100755 index df703b3..0000000 --- a/create_linux_staging_gnome_installers.sh +++ /dev/null @@ -1,711 +0,0 @@ -#!/bin/bash - -VERSION=`git describe --long | sed "s/-.*//"` - -OBS_REPO_BASE="https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons:/Staging" -TARGET_DIR="bin-staging" - -GNOME_APPINDICATOR="https://github.com/ubuntu/gnome-shell-extension-appindicator.git" - -OBS_PACKAGE="systray-x-gnome" - -ENABLE_RPM=true -ENABLE_DEB=true -ENABLE_PAC=true - -OBS_RPM_ARCHS="" -OBS_RPM_PKS="" -OBS_RPM_GNOME_EXT="" -OBS_RPM_ARCHS+="openSUSE_Leap_15.4/x86_64 " -OBS_RPM_PKS+="_ " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/i586 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_GNOME_EXT+="master " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/x86_64 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_GNOME_EXT+="master " -OBS_RPM_ARCHS+="15.4/x86_64 " -OBS_RPM_PKS+="lp154 " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="15.5/x86_64 " -OBS_RPM_PKS+="lp155 " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="Fedora_37/x86_64 " -OBS_RPM_PKS+="fed37 " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="Fedora_38/x86_64 " -OBS_RPM_PKS+="fed38 " -OBS_RPM_GNOME_EXT+="v53 " -OBS_RPM_ARCHS+="Fedora_39/x86_64 " -OBS_RPM_PKS+="fed39 " -OBS_RPM_GNOME_EXT+="master " -OBS_RPM_ARCHS+="Fedora_Rawhide/x86_64 " -OBS_RPM_PKS+="fedraw " -OBS_RPM_GNOME_EXT+="master " - - -OBS_DEB_ARCHS="" -OBS_DEB_PKS="" -OBS_DEB_GNOME_EXT="" -OBS_DEB_ARCHS+="Debian_10/i386 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_GNOME_EXT+="v26 " -OBS_DEB_ARCHS+="Debian_10/amd64 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_GNOME_EXT+="v26 " -OBS_DEB_ARCHS+="Debian_11/i386 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_GNOME_EXT+="v34 " -OBS_DEB_ARCHS+="Debian_11/amd64 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_GNOME_EXT+="v34 " -OBS_DEB_ARCHS+="Debian_12/i386 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_GNOME_EXT+="v46 " -OBS_DEB_ARCHS+="Debian_12/amd64 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_GNOME_EXT+="v46 " -OBS_DEB_ARCHS+="Debian_Unstable/amd64 " -OBS_DEB_PKS+="debunstable " -OBS_DEB_GNOME_EXT+="v46 " -OBS_DEB_ARCHS+="Debian_Testing/amd64 " -OBS_DEB_PKS+="debtest " -OBS_DEB_GNOME_EXT+="v46 " -OBS_DEB_ARCHS+="xUbuntu_18.04/i386 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_GNOME_EXT+="v26 " -OBS_DEB_ARCHS+="xUbuntu_18.04/amd64 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_GNOME_EXT+="v26 " -OBS_DEB_ARCHS+="xUbuntu_20.04/amd64 " -OBS_DEB_PKS+="focal2004 " -OBS_DEB_GNOME_EXT+="0 " -OBS_DEB_ARCHS+="xUbuntu_22.04/amd64 " -OBS_DEB_PKS+="jammy2022 " -OBS_DEB_GNOME_EXT+="0 " -OBS_DEB_ARCHS+="xUbuntu_23.04/amd64 " -OBS_DEB_PKS+="lunar2023 " -OBS_DEB_GNOME_EXT+="0 " -OBS_DEB_ARCHS+="xUbuntu_23.10/amd64 " -OBS_DEB_PKS+="mantic2023 " -OBS_DEB_GNOME_EXT+="0 " - - -OBS_PAC_ARCHS="" -OBS_PAC_PKS="" -OBS_PAC_ARCHS+="Arch/x86_64 " -OBS_PAC_PKS+="arch " -OBS_PAC_GNOME_EXT+="master " - - -create_gnome_extension_tar() { - - local GIT_BASE=$1 - local GNOME_EXT=$2 - - ########################################## - # - # Create user installable - # gnome-shell-extension-appindicator - # - ########################################## - - if [ -f gnome-shell-extension-${GNOME_EXT}.tar.xz ] ; then - return - fi - - if [ "${GNOME_EXT}" != "v26" ] && - [ "${GNOME_EXT}" != "v34" ] && - [ "${GNOME_EXT}" != "v46" ] && - [ "${GNOME_EXT}" != "v53" ] && - [ "${GNOME_EXT}" != "master" ] ; then - return - fi - - git clone -q ${GIT_BASE} - pushd gnome-shell-extension-appindicator > /dev/null 2>&1 - git checkout -q ${GNOME_EXT} - popd > /dev/null 2>&1 - - # - # Create tar - # - mv -f gnome-shell-extension-appindicator appindicatorsupport@rgcjonas.gmail.com - tar -cJf gnome-shell-extension-${GNOME_EXT}.tar.xz appindicatorsupport@rgcjonas.gmail.com - - # - # Cleanup - # - rm -rf appindicatorsupport@rgcjonas.gmail.com -} - - -create_rpm_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local RPM_NAME_EXT=$4 - local GNOME_EXT=$5 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find rpm - # - local RPM_FILE=$(grep ">${OBS_PACKAGE}-${VERSION}.*rpm<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*rpm\)<.*/\1/") - rm -f index.html - - echo "Found: "${RPM_FILE} - - FOUND_VERSION=$(echo ${RPM_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Add the gnome extension to the tar - # - if [ "${GNOME_EXT}" == "v26" ] && [ -f gnome-shell-extension-v26.tar.xz ] ; then - cp -f gnome-shell-extension-v26.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v34" ] && [ -f gnome-shell-extension-v34.tar.xz ] ; then - cp -f gnome-shell-extension-v34.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v46" ] && [ -f gnome-shell-extension-v46.tar.xz ] ; then - cp -f gnome-shell-extension-v46.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "master" ] && [ -f gnome-shell-extension-master.tar.xz ] ; then - cp -f gnome-shell-extension-master.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - - # - # Get the SysTray-X rpm - # - if [ ! -f ${RPM_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${RPM_FILE}" - fi - - # - # Get compression type - # - COMPRESSION=$(rpm -qp --qf '%{PAYLOADCOMPRESSOR}\n' ${RPM_FILE}) -# echo ${COMPRESSION} - - case ${COMPRESSION} in -# zstd) - # - # Extract - # -# rpm2cpio ${RPM_FILE} | zstd -d | cpio --quiet -idm - - # - # Get files - # -# cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X -# chmod 755 ./${TAR_DIR}/SysTray-X -# cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi -# ;; - *) - # - # Extract - # - rpm2cpio ${RPM_FILE} | cpio --quiet -idm - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - if [ -d ./usr/share/doc/packages ] ; then - cp -f ./usr/share/doc/packages/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - if [ -d ./usr/share/doc/${OBS_PACKAGE} ] ; then - cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - cp -f ./usr/share/doc/${OBS_PACKAGE}*/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - fi - fi - ;; - esac - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the RPM - # - if [ "${RPM_NAME_EXT}" != "_" ] ; then - NEW_RPM_FILE=`echo ${RPM_FILE} | sed -s "s/\(systray-x-gnome-${FOUND_VERSION}-\)\(.*\)/\1${RPM_NAME_EXT}\.\2/"` - mv -f ${RPM_FILE} $NEW_RPM_FILE - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_deb_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local DEB_NAME_EXT=$4 - local GNOME_EXT=$5 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find deb - # - local DEB_FILE=$(grep ">${OBS_PACKAGE}_${VERSION}.*\.deb<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*deb\)<.*/\1/") - rm -f index.html - - echo "Found: "${DEB_FILE} - - FOUND_VERSION=$(echo ${DEB_FILE} | sed -e "s/${OBS_PACKAGE}_\(.*\)_.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Add the gnome extension to the tar - # - if [ "${GNOME_EXT}" == "v26" ] && [ -f gnome-shell-extension-v26.tar.xz ] ; then - cp -f gnome-shell-extension-v26.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v34" ] && [ -f gnome-shell-extension-v34.tar.xz ] ; then - cp -f gnome-shell-extension-v34.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v46" ] && [ -f gnome-shell-extension-v46.tar.xz ] ; then - cp -f gnome-shell-extension-v46.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "master" ] && [ -f gnome-shell-extension-master.tar.xz ] ; then - cp -f gnome-shell-extension-master.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - - # - # Get the SysTray-X deb - # - if [ ! -f ${DEB_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${DEB_FILE}" - fi - - # - # Extract - # - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/bin/SysTray-X > ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi > ./${TAR_DIR}/systray-x@Ximi1970.xpi - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the DEB - # - if [ "${DEB_NAME_EXT}" != "_" ] ; then - NEW_DEB_FILE=`echo ${DEB_FILE} | sed -s "s/\(${OBS_PACKAGE}\_${FOUND_VERSION}\_\)\(.*\)/\1${DEB_NAME_EXT}\_\2/"` - mv -f ${DEB_FILE} ${NEW_DEB_FILE} - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_pac_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local PAC_NAME_EXT=$4 - local GNOME_EXT=$5 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - curl -s "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" > index.html - - # - # Find rpm - # - local PAC_FILE=$(grep ">${OBS_PACKAGE}-[^dgm].*${VERSION}.*\.zst<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}-[^d].*zst\)<.*/\1/") - rm -f index.html - - echo "Found: "${PAC_FILE} - - FOUND_VERSION=$(echo ${PAC_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Add the gnome extension to the tar - # - if [ "${GNOME_EXT}" == "v26" ] && [ -f gnome-shell-extension-v26.tar.xz ] ; then - cp -f gnome-shell-extension-v26.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v34" ] && [ -f gnome-shell-extension-v34.tar.xz ] ; then - cp -f gnome-shell-extension-v34.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "v46" ] && [ -f gnome-shell-extension-v46.tar.xz ] ; then - cp -f gnome-shell-extension-v46.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - if [ "${GNOME_EXT}" == "master" ] && [ -f gnome-shell-extension-master.tar.xz ] ; then - cp -f gnome-shell-extension-master.tar.xz ${TAR_DIR}/gnome-shell-extension.tar.xz - fi - - # - # Get the SysTray-X rpm - # - if [ ! -f ${PAC_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${PAC_FILE}" - fi - - if [ ! -f systray-x.tar.zst ] ; then - cp -f ${PAC_FILE} systray-x.tar.zst - fi - - tar -I zstd -xf systray-x.tar.zst - - rm -f systray-x.tar.zst - rm -f .BUILDINFO - rm -f .INSTALL - rm -f .MTREE - rm -f .PKGINFO - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - cp -f ./usr/lib/thunderbird/distribution/extensions/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # -# tar -C "./${TAR_DIR}" -cJf "${TAR_DIR}.tar.xz" . - tar -C "./${TAR_DIR}" -cJf systray-x.tar.xz . - mv -f systray-x.tar.xz ${TAR_DIR}.tar.xz - - # - # Rename the PAC - # - if [ "${PAC_NAME_EXT}" != "_" ] ; then - NEW_PAC_FILE=`echo ${PAC_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${PAC_NAME_EXT}\.\2/"` - mv -f "${PAC_FILE}" "$NEW_PAC_FILE" - fi - - # - # Cleanup - # - rm -rf "${TAR_DIR}" -} - -################################################################################# -# -# -# Main -# -# -################################################################################# - -mkdir -p $TARGET_DIR -pushd $TARGET_DIR > /dev/null 2>&1 - -if [ "$ENABLE_RPM" = true ] ; then - # - # Create bash installers for RPM based distributions - # - INDEX=1 - for rpmdir in $OBS_RPM_ARCHS ; do - - echo - echo - echo "Generating installer: "${rpmdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${rpmdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${rpmdir} | cut -d'/' -f2) - - RPM_NAME_EXT=$(echo ${OBS_RPM_PKS} | cut -d' ' -f${INDEX}) - GNOME_EXT=$(echo ${OBS_RPM_GNOME_EXT} | cut -d' ' -f${INDEX}) - - # - # Generate the gnome tar file - # - create_gnome_extension_tar ${GNOME_APPINDICATOR} ${GNOME_EXT} - - # - # Generate the SysTray-X tar file - # - create_rpm_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${RPM_NAME_EXT} ${GNOME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Gnome setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Gnome.sh" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_DEB" = true ] ; then - # - # Cleanup - # - rm -f gnome-shell-extension.tar.xz - - # - # Create bash installers for DEB based distributions - # - INDEX=1 - for debdir in $OBS_DEB_ARCHS ; do - - echo - echo - echo "Generating installer: "${debdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${debdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${debdir} | cut -d'/' -f2) - - DEB_NAME_EXT=$(echo ${OBS_DEB_PKS} | cut -d' ' -f${INDEX}) - GNOME_EXT=$(echo ${OBS_DEB_GNOME_EXT} | cut -d' ' -f${INDEX}) - - # - # Generate the gnome tar file - # - create_gnome_extension_tar ${GNOME_APPINDICATOR} ${GNOME_EXT} - - # - # Generate the SysTray-X tar file - # - create_deb_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${DEB_NAME_EXT} ${GNOME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Gnome setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Gnome.sh" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_PAC" = true ] ; then - # - # Create bash installers for PAC based distributions - # - INDEX=1 - for pacdir in $OBS_PAC_ARCHS ; do - - echo - echo - echo "Generating installer: "${pacdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${pacdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${pacdir} | cut -d'/' -f2) - - PAC_NAME_EXT=$(echo ${OBS_PAC_PKS} | cut -d' ' -f${INDEX}) - GNOME_EXT=$(echo ${OBS_DEB_GNOME_EXT} | cut -d' ' -f${INDEX}) - - # - # Generate the gnome tar file - # - create_gnome_extension_tar ${GNOME_APPINDICATOR} ${GNOME_EXT} - - # - # Generate the SysTray-X tar file - # - create_pac_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${PAC_NAME_EXT} ${GNOME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Gnome setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Gnome.sh" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -# -# Cleanup -# -rm -f gnome-shell-extension-*.tar.xz - -popd > /dev/null 2>&1 diff --git a/create_linux_staging_kde_installers.sh b/create_linux_staging_kde_installers.sh deleted file mode 100755 index 3d95324..0000000 --- a/create_linux_staging_kde_installers.sh +++ /dev/null @@ -1,572 +0,0 @@ -#!/bin/bash - -VERSION=`git describe --long | sed "s/-.*//"` - -OBS_REPO_BASE="https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons:/Staging" -TARGET_DIR="bin-staging" - -OBS_PACKAGE="systray-x" - -ENABLE_RPM=true -ENABLE_DEB=true -ENABLE_PAC=true - -OBS_RPM_ARCHS="" -OBS_RPM_PKS="" -OBS_RPM_ARCHS+="openSUSE_Leap_15.4/x86_64 " -OBS_RPM_PKS+="_ " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/i586 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/x86_64 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_ARCHS+="15.4/x86_64 " -OBS_RPM_PKS+="lp154 " -OBS_RPM_ARCHS+="15.5/x86_64 " -OBS_RPM_PKS+="lp155 " -OBS_RPM_ARCHS+="Fedora_37/x86_64 " -OBS_RPM_PKS+="fed37 " -OBS_RPM_ARCHS+="Fedora_38/x86_64 " -OBS_RPM_PKS+="fed38 " -OBS_RPM_ARCHS+="Fedora_39/x86_64 " -OBS_RPM_PKS+="fed39 " -OBS_RPM_ARCHS+="Fedora_Rawhide/x86_64 " -OBS_RPM_PKS+="fedraw " - - -OBS_DEB_ARCHS="" -OBS_DEB_PKS="" -OBS_DEB_ARCHS+="Debian_10/i386 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_ARCHS+="Debian_10/amd64 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_ARCHS+="Debian_11/i386 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_ARCHS+="Debian_11/amd64 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_ARCHS+="Debian_12/i386 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_ARCHS+="Debian_12/amd64 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_ARCHS+="Debian_Unstable/amd64 " -OBS_DEB_PKS+="debunstable " -OBS_DEB_ARCHS+="Debian_Testing/amd64 " -OBS_DEB_PKS+="debtest " -OBS_DEB_ARCHS+="xUbuntu_18.04/i386 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_ARCHS+="xUbuntu_18.04/amd64 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_ARCHS+="xUbuntu_20.04/amd64 " -OBS_DEB_PKS+="focal2004 " -OBS_DEB_ARCHS+="xUbuntu_22.04/amd64 " -OBS_DEB_PKS+="jammy2022 " -OBS_DEB_ARCHS+="xUbuntu_23.04/amd64 " -OBS_DEB_PKS+="lunar2023 " -OBS_DEB_ARCHS+="xUbuntu_23.10/amd64 " -OBS_DEB_PKS+="mantic2023 " - - -OBS_PAC_ARCHS="" -OBS_PAC_PKS="" -OBS_PAC_ARCHS+="Arch/x86_64 " -OBS_PAC_PKS+="arch " - - -create_rpm_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local RPM_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find rpm - # - local RPM_FILE=$(grep ">${OBS_PACKAGE}-${VERSION}.*rpm<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*rpm\)<.*/\1/") - rm -f index.html - - echo "Found: "${RPM_FILE} - - FOUND_VERSION=$(echo ${RPM_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X rpm - # - if [ ! -f ${RPM_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${RPM_FILE}" - fi - - # - # Get compression type - # - COMPRESSION=$(rpm -qp --qf '%{PAYLOADCOMPRESSOR}\n' ${RPM_FILE}) -# echo ${COMPRESSION} - - case ${COMPRESSION} in -# zstd) - # - # Extract - # -# rpm2cpio ${RPM_FILE} | zstd -d | cpio --quiet -idm - - # - # Get files - # -# cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X -# chmod 755 ./${TAR_DIR}/SysTray-X -# cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi -# ;; - *) - # - # Extract - # - rpm2cpio ${RPM_FILE} | cpio --quiet -idm - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - if [ -d ./usr/share/doc/packages ] ; then - cp -f ./usr/share/doc/packages/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - if [ -d ./usr/share/doc/${OBS_PACKAGE} ] ; then - cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - cp -f ./usr/share/doc/${OBS_PACKAGE}*/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - fi - fi - ;; - esac - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the RPM - # - if [ "${RPM_NAME_EXT}" != "_" ] ; then - NEW_RPM_FILE=`echo ${RPM_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${RPM_NAME_EXT}\.\2/"` - mv -f ${RPM_FILE} $NEW_RPM_FILE - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_deb_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local DEB_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find deb - # - local DEB_FILE=$(grep ">${OBS_PACKAGE}_${VERSION}.*\.deb<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*deb\)<.*/\1/") - rm -f index.html - - echo "Found: "${DEB_FILE} - - FOUND_VERSION=$(echo ${DEB_FILE} | sed -e "s/${OBS_PACKAGE}_\(.*\)_.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X deb - # - if [ ! -f ${DEB_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${DEB_FILE}" - fi - - # - # Extract - # - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/bin/SysTray-X > ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi > ./${TAR_DIR}/systray-x@Ximi1970.xpi - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the DEB - # - if [ "${DEB_NAME_EXT}" != "_" ] ; then - NEW_DEB_FILE=`echo ${DEB_FILE} | sed -s "s/\(${OBS_PACKAGE}\_${FOUND_VERSION}\_\)\(.*\)/\1${DEB_NAME_EXT}\_\2/"` - mv -f ${DEB_FILE} ${NEW_DEB_FILE} - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_pac_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local PAC_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - curl -s "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" > index.html - - # - # Find rpm - # - local PAC_FILE=$(grep ">${OBS_PACKAGE}-[^dgm].*${VERSION}.*\.zst<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}-[^d].*zst\)<.*/\1/") - rm -f index.html - - echo "Found: "${PAC_FILE} - - FOUND_VERSION=$(echo ${PAC_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X rpm - # - if [ ! -f ${PAC_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${PAC_FILE}" - fi - - if [ ! -f systray-x.tar.zst ] ; then - cp -f ${PAC_FILE} systray-x.tar.zst - fi - - tar -I zstd -xf systray-x.tar.zst - - rm -f systray-x.tar.zst - rm -f .BUILDINFO - rm -f .INSTALL - rm -f .MTREE - rm -f .PKGINFO - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - cp -f ./usr/lib/thunderbird/distribution/extensions/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # -# tar -C "./${TAR_DIR}" -cJf "${TAR_DIR}.tar.xz" . - tar -C "./${TAR_DIR}" -cJf systray-x.tar.xz . - mv -f systray-x.tar.xz ${TAR_DIR}.tar.xz - - # - # Rename the PAC - # - if [ "${PAC_NAME_EXT}" != "_" ] ; then - NEW_PAC_FILE=`echo ${PAC_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${PAC_NAME_EXT}\.\2/"` - mv -f "${PAC_FILE}" "$NEW_PAC_FILE" - fi - - # - # Cleanup - # - rm -rf "${TAR_DIR}" -} - -################################################################################# -# -# -# Main -# -# -################################################################################# - -mkdir -p $TARGET_DIR -pushd $TARGET_DIR > /dev/null 2>&1 - -if [ "$ENABLE_RPM" = true ] ; then - # - # Create bash installers for RPM based distributions - # - INDEX=1 - for rpmdir in $OBS_RPM_ARCHS ; do - - echo - echo - echo "Generating installer: "${rpmdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${rpmdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${rpmdir} | cut -d'/' -f2) - - RPM_NAME_EXT=$(echo ${OBS_RPM_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_rpm_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${RPM_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Kde setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Kde.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_DEB" = true ] ; then - # - # Cleanup - # - rm -f gnome-shell-extension.tar.xz - - # - # Create bash installers for DEB based distributions - # - INDEX=1 - for debdir in $OBS_DEB_ARCHS ; do - - echo - echo - echo "Generating installer: "${debdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${debdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${debdir} | cut -d'/' -f2) - - DEB_NAME_EXT=$(echo ${OBS_DEB_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_deb_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${DEB_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Kde setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Kde.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_PAC" = true ] ; then - # - # Create bash installers for PAC based distributions - # - INDEX=1 - for pacdir in $OBS_PAC_ARCHS ; do - - echo - echo - echo "Generating installer: "${pacdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${pacdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${pacdir} | cut -d'/' -f2) - - PAC_NAME_EXT=$(echo ${OBS_PAC_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_pac_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${PAC_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Kde setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}-Kde.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__MINIMAL_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -# -# Cleanup -# -rm -f gnome-shell-extension-*.tar.xz - -popd > /dev/null 2>&1 diff --git a/create_linux_staging_minimal_installers.sh b/create_linux_staging_minimal_installers.sh deleted file mode 100755 index 1e27d07..0000000 --- a/create_linux_staging_minimal_installers.sh +++ /dev/null @@ -1,563 +0,0 @@ -#!/bin/bash - -VERSION=`git describe --long | sed "s/-.*//"` - -OBS_REPO_BASE="https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Add-ons:/Staging" -TARGET_DIR="bin-staging" - -OBS_PACKAGE="systray-x-minimal" - -ENABLE_RPM=true -ENABLE_DEB=true -ENABLE_PAC=true - -OBS_RPM_ARCHS="" -OBS_RPM_PKS="" -OBS_RPM_ARCHS+="openSUSE_Leap_15.4/x86_64 " -OBS_RPM_PKS+="_ " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/i586 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_ARCHS+="openSUSE_Tumbleweed/x86_64 " -OBS_RPM_PKS+="tmblwd " -OBS_RPM_ARCHS+="15.4/x86_64 " -OBS_RPM_PKS+="lp154 " -OBS_RPM_ARCHS+="15.5/x86_64 " -OBS_RPM_PKS+="lp155 " -OBS_RPM_ARCHS+="Fedora_37/x86_64 " -OBS_RPM_PKS+="fed37 " -OBS_RPM_ARCHS+="Fedora_38/x86_64 " -OBS_RPM_PKS+="fed38 " -OBS_RPM_ARCHS+="Fedora_39/x86_64 " -OBS_RPM_PKS+="fed39 " -OBS_RPM_ARCHS+="Fedora_Rawhide/x86_64 " -OBS_RPM_PKS+="fedraw " - - -OBS_DEB_ARCHS="" -OBS_DEB_PKS="" -OBS_DEB_ARCHS+="Debian_10/i386 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_ARCHS+="Debian_10/amd64 " -OBS_DEB_PKS+="deb10 " -OBS_DEB_ARCHS+="Debian_11/i386 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_ARCHS+="Debian_11/amd64 " -OBS_DEB_PKS+="deb11 " -OBS_DEB_ARCHS+="Debian_12/i386 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_ARCHS+="Debian_12/amd64 " -OBS_DEB_PKS+="deb12 " -OBS_DEB_ARCHS+="Debian_Unstable/amd64 " -OBS_DEB_PKS+="debunstable " -OBS_DEB_ARCHS+="Debian_Testing/amd64 " -OBS_DEB_PKS+="debtest " -OBS_DEB_ARCHS+="xUbuntu_18.04/i386 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_ARCHS+="xUbuntu_18.04/amd64 " -OBS_DEB_PKS+="bionic1804 " -OBS_DEB_ARCHS+="xUbuntu_20.04/amd64 " -OBS_DEB_PKS+="focal2004 " -OBS_DEB_ARCHS+="xUbuntu_22.04/amd64 " -OBS_DEB_PKS+="jammy2022 " -OBS_DEB_ARCHS+="xUbuntu_23.04/amd64 " -OBS_DEB_PKS+="lunar2023 " -OBS_DEB_ARCHS+="xUbuntu_23.10/amd64 " -OBS_DEB_PKS+="mantic2023 " - - -OBS_PAC_ARCHS="" -OBS_PAC_PKS="" -OBS_PAC_ARCHS+="Arch/x86_64 " -OBS_PAC_PKS+="arch " - - -create_rpm_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local RPM_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find rpm - # - local RPM_FILE=$(grep ">${OBS_PACKAGE}-.*${VERSION}.*rpm<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}-.*rpm\)<.*/\1/") - - rm -f index.html - - echo "Found: "${RPM_FILE} - - FOUND_VERSION=$(echo ${RPM_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X rpm - # - if [ ! -f ${RPM_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${RPM_FILE}" - fi - - # - # Get compression type - # - COMPRESSION=$(rpm -qp --qf '%{PAYLOADCOMPRESSOR}\n' ${RPM_FILE}) -# echo ${COMPRESSION} - - case ${COMPRESSION} in -# zstd) - # - # Extract - # -# rpm2cpio ${RPM_FILE} | zstd -d | cpio --quiet -idm - - # - # Get files - # -# cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X -# chmod 755 ./${TAR_DIR}/SysTray-X -# cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi -# ;; - *) - # - # Extract - # - rpm2cpio ${RPM_FILE} | cpio --quiet -idm - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - if [ -d ./usr/share/doc/packages ] ; then - cp -f ./usr/share/doc/packages/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - if [ -d ./usr/share/doc/${OBS_PACKAGE} ] ; then - cp -f ./usr/share/doc/${OBS_PACKAGE}/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - else - cp -f ./usr/share/doc/${OBS_PACKAGE}*/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - fi - fi - ;; - esac - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the RPM - # - if [ "${RPM_NAME_EXT}" != "_" ] ; then - NEW_RPM_FILE=`echo ${RPM_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${RPM_NAME_EXT}\.\2/"` - mv -f ${RPM_FILE} $NEW_RPM_FILE - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_deb_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local DEB_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" - - # - # Find deb - # - local DEB_FILE=$(grep ">${OBS_PACKAGE}_${VERSION}.*\.deb<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}.*deb\)<.*/\1/") - rm -f index.html - - echo "Found: "${DEB_FILE} - - FOUND_VERSION=$(echo ${DEB_FILE} | sed -e "s/${OBS_PACKAGE}_\(.*\)_.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X deb - # - if [ ! -f ${DEB_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${DEB_FILE}" - fi - - # - # Extract - # - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/bin/SysTray-X > ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - - dpkg-deb --fsys-tarfile ${DEB_FILE} | tar xOf - ./usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi > ./${TAR_DIR}/systray-x@Ximi1970.xpi - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # - tar -C ./${TAR_DIR} -cJf ${TAR_DIR}.tar.xz . - - # - # Rename the DEB - # - if [ "${DEB_NAME_EXT}" != "_" ] ; then - NEW_DEB_FILE=`echo ${DEB_FILE} | sed -s "s/\(${OBS_PACKAGE}\_${FOUND_VERSION}\_\)\(.*\)/\1${DEB_NAME_EXT}\_\2/"` - mv -f ${DEB_FILE} ${NEW_DEB_FILE} - fi - - # - # Cleanup - # - rm -rf ${TAR_DIR} -} - - -create_pac_tar() { - - local REPO_BASE=$1 - local REPO_DISTR=$2 - local REPO_ARCH=$3 - local PAC_NAME_EXT=$4 - - ########################################## - # - # Create the SysTray-X tar - # - ########################################## - - # - # Get index.html - # - rm -f index.html - curl -s "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/" > index.html - - # - # Find rpm - # - local PAC_FILE=$(grep ">${OBS_PACKAGE}-[^d].*${VERSION}.*\.zst<" index.html | sed -e "s/.*>\(${OBS_PACKAGE}-[^d].*zst\)<.*/\1/") - rm -f index.html - - echo "Found: "${PAC_FILE} - - FOUND_VERSION=$(echo ${PAC_FILE} | sed -e "s/${OBS_PACKAGE}-\(.*\)-.*/\1/") - - echo "Version: "${FOUND_VERSION} - - # - # Create tar dir - # - local TAR_DIR=SysTray-X-${FOUND_VERSION}-${REPO_DISTR} - - rm -rf ${TAR_DIR} - mkdir -p ${TAR_DIR} - - # - # Get the SysTray-X rpm - # - if [ ! -f ${PAC_FILE} ] ; then - wget -q "${REPO_BASE}/${REPO_DISTR}/${REPO_ARCH}/${PAC_FILE}" - fi - - if [ ! -f systray-x.tar.zst ] ; then - cp -f ${PAC_FILE} systray-x.tar.zst - fi - - tar -I zstd -xf systray-x.tar.zst - - rm -f systray-x.tar.zst - rm -f .BUILDINFO - rm -f .INSTALL - rm -f .MTREE - rm -f .PKGINFO - - # - # Get files - # - cp -f ./usr/bin/SysTray-X ./${TAR_DIR}/SysTray-X - chmod 755 ./${TAR_DIR}/SysTray-X - cp -f ./usr/lib/thunderbird/distribution/extensions/systray-x@Ximi1970.xpi ./${TAR_DIR}/systray-x@Ximi1970.xpi - - # - # Cleanup - # - rm -rf ./usr - - if [ ! -f systray-x@Ximi1970.xpi ] ; then - cp -f ./${TAR_DIR}/systray-x@Ximi1970.xpi . - fi - - # - # Get JSON - # - cp -f ../app/config/linux/SysTray_X.json.template ./${TAR_DIR}/SysTray_X.json.template - - # - # Create tar - # -# tar -C "./${TAR_DIR}" -cJf "${TAR_DIR}.tar.xz" . - tar -C "./${TAR_DIR}" -cJf systray-x.tar.xz . - mv -f systray-x.tar.xz ${TAR_DIR}.tar.xz - - # - # Rename the PAC - # - if [ "${PAC_NAME_EXT}" != "_" ] ; then - NEW_PAC_FILE=`echo ${PAC_FILE} | sed -s "s/\(${OBS_PACKAGE}-${FOUND_VERSION}-\)\(.*\)/\1${PAC_NAME_EXT}\.\2/"` - mv -f "${PAC_FILE}" "$NEW_PAC_FILE" - fi - - # - # Cleanup - # - rm -rf "${TAR_DIR}" -} - -################################################################################# -# -# -# Main -# -# -################################################################################# - -mkdir -p $TARGET_DIR -pushd $TARGET_DIR > /dev/null 2>&1 - -if [ "$ENABLE_RPM" = true ] ; then - # - # Create bash installers for RPM based distributions - # - INDEX=1 - for rpmdir in $OBS_RPM_ARCHS ; do - - echo - echo - echo "Generating installer: "${rpmdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${rpmdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${rpmdir} | cut -d'/' -f2) - - RPM_NAME_EXT=$(echo ${OBS_RPM_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_rpm_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${RPM_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Minimal setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_DEB" = true ] ; then - # - # Create bash installers for DEB based distributions - # - INDEX=1 - for debdir in $OBS_DEB_ARCHS ; do - - echo - echo - echo "Generating installer: "${debdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${debdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${debdir} | cut -d'/' -f2) - - DEB_NAME_EXT=$(echo ${OBS_DEB_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_deb_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${DEB_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Minimal setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -if [ "$ENABLE_PAC" = true ] ; then - # - # Create bash installers for PAC based distributions - # - INDEX=1 - for pacdir in $OBS_PAC_ARCHS ; do - - echo - echo - echo "Generating installer: "${pacdir} - echo - - # - # Get base of the repo - # - REPO_DISTR=$(echo ${pacdir} | cut -d'/' -f1) - REPO_ARCH=$(echo ${pacdir} | cut -d'/' -f2) - - PAC_NAME_EXT=$(echo ${OBS_PAC_PKS} | cut -d' ' -f${INDEX}) - - # - # Generate the SysTray-X tar file - # - create_pac_tar ${OBS_REPO_BASE} ${REPO_DISTR} ${REPO_ARCH} ${PAC_NAME_EXT} - - # - # Create installer - # - INSTALLER=SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-Minimal-install.sh - cp -f ../dist/install.sh ${INSTALLER} - - # - # Insert Minimal setup - # - sed -i -e "/__XXXX_SETUP__/r../dist/install.${REPO_DISTR}.sh" ${INSTALLER} - sed -i -e "s/__GNOME_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-GNOME-install.sh/" ${INSTALLER} - sed -i -e "s/__KDE_INSTALLER__/SysTray-X-${FOUND_VERSION}-${REPO_DISTR}-${REPO_ARCH}-KDE-install.sh/" ${INSTALLER} - sed -i -e "s/__XXXX_SETUP__//" ${INSTALLER} - - # - # Insert install tar - # - cat SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz >> ${INSTALLER} - chmod 755 ${INSTALLER} - - # - # Cleanup - # - rm -f SysTray-X-${FOUND_VERSION}-${REPO_DISTR}.tar.xz - - # - # Update index - # - INDEX=$((INDEX+1)) - done -fi - -popd > /dev/null 2>&1 diff --git a/create_win_installers.sh b/create_win_installers.sh deleted file mode 100755 index 2903792..0000000 --- a/create_win_installers.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -UPLOAD_SERVER="upload.server.com" -UPLOAD_USER="user" -UPLOAD_PASSWORD="password" -UPLOAD_DIR="src/systray-x/bin" - -BUILD_FARM="build.farm.com" -BUILD_FARM_USER="farmuser" - -BUILD_WORKER="worker.build.farm.com" -BUILD_WORKER_USER="BuildUser" -BUILD_WORKER_VMNAME="Virtual Machine Name" - -VERSION=`git describe --long | sed "s/-.*//"` - -# -# Start the worker on the farm -# -ssh ${BUILD_FARM_USER}@${BUILD_FARM} <<-ENDSSH - VBoxHeadless -startvm "${BUILD_WORKER_VMNAME}" > /dev/null 2>&1 & -ENDSSH - -# -# Wait for the worker to become active -# -timeout=30 -t=0 -while [ $t -lt $timeout ] ; do - ping -c1 ${BUILD_WORKER} - - if [ $? -eq 0 ] ; then - break; - fi - - sleep 10 - - t=$((t+1)) -done - -if [ $t -eq $timeout ] ; then - echo "Cannot find server" - exit 1 -fi - -# -# Start build -# -ssh ${BUILD_WORKER_USER}@${BUILD_WORKER} -T <<-ENDSSH - cd /cygdrive/c/Users/${BUILD_WORKER_USER}/Documents - mkdir -p Projects/Github/Ximi1970 - cd Projects/Github/Ximi1970 - rm -rf systray-x - git clone https://github.com/Ximi1970/systray-x.git - cd systray-x - make - cd dist - /cygdrive/c/Program\ Files\ \(x86\)/NSIS/Bin/makensis.exe SysTray-X-32bit.nsi - /cygdrive/c/Program\ Files\ \(x86\)/NSIS/Bin/makensis.exe SysTray-X-64bit.nsi - mv -f SysTray-X-setup32.exe SysTray-X-setup32-${VERSION}.exe - mv -f SysTray-X-setup64.exe SysTray-X-setup64-${VERSION}.exe - lftp -u ${UPLOAD_USER},${UPLOAD_PASSWORD} ${UPLOAD_SERVER}/${UPLOAD_DIR} <<-ENDFTP - mput SysTray-X-setup*.exe - close - quit -ENDFTP - exit -ENDSSH - -# -# Shutdown worker -# -ssh ${BUILD_FARM_USER}@${BUILD_FARM} <<-ENDSSH - VBoxManage controlvm "${BUILD_WORKER_VMNAME}" acpipowerbutton -ENDSSH diff --git a/dist/SysTray-X-32bit.nsi b/dist/SysTray-X-32bit.nsi index b8284b5..0c19944 100644 --- a/dist/SysTray-X-32bit.nsi +++ b/dist/SysTray-X-32bit.nsi @@ -11,7 +11,7 @@ Name "${Name}" !define PRODUCT_ID "systray-x@Ximi1970" !define VERSIONMAJOR 0 !define VERSIONMINOR 9 -!define VERSIONBUILD 8 +!define VERSIONBUILD 9 !define VERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}" CRCCheck On diff --git a/dist/SysTray-X-64bit.nsi b/dist/SysTray-X-64bit.nsi index bde2f75..0cfb9fa 100644 --- a/dist/SysTray-X-64bit.nsi +++ b/dist/SysTray-X-64bit.nsi @@ -11,7 +11,7 @@ Name "${Name}" !define PRODUCT_ID "systray-x@Ximi1970" !define VERSIONMAJOR 0 !define VERSIONMINOR 9 -!define VERSIONBUILD 8 +!define VERSIONBUILD 9 !define VERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}" CRCCheck On diff --git a/dist/arch/gnome/PKGBUILD b/dist/arch/gnome/PKGBUILD index cb540ad..e657f12 100644 --- a/dist/arch/gnome/PKGBUILD +++ b/dist/arch/gnome/PKGBUILD @@ -1,26 +1,26 @@ # Maintainer: Maxime Rijnders pkgname=systray-x-gnome -pkgver=0 -pkgrel=0 +pkgver=0.9.9 +pkgrel=3 epoch=1 pkgdesc='A system tray extension for Thunderbird (GNOME)' arch=(x86_64) url=https://github.com/Ximi1970/systray-x license=(MPL-2.0) depends=( - 'qt5-base' + 'qt6-base' + 'qt6-wayland' 'gnome-shell-extension-appindicator' 'thunderbird>=91' - 'thunderbird<121' + 'thunderbird<129' ) makedepends=( 'git' 'unzip' 'zip' 'libx11' - 'qt5-base' - 'qt5-x11extras' + 'qt6-base' ) provides=( 'systray-x' diff --git a/dist/arch/kde/PKGBUILD b/dist/arch/kde/PKGBUILD index fefb022..b209248 100644 --- a/dist/arch/kde/PKGBUILD +++ b/dist/arch/kde/PKGBUILD @@ -1,27 +1,27 @@ # Maintainer: Maxime Rijnders pkgname=systray-x -pkgver=0 -pkgrel=0 +pkgver=0.9.9 +pkgrel=3 epoch=1 pkgdesc='A system tray extension for Thunderbird (KDE)' arch=(x86_64) url=https://github.com/Ximi1970/systray-x license=(MPL-2.0) depends=( - 'qt5-base' - 'knotifications5' + 'qt6-base' + 'qt6-wayland' + 'kstatusnotifieritem' 'thunderbird>=91' - 'thunderbird<121' + 'thunderbird<129' ) makedepends=( 'git' 'unzip' 'zip' 'libx11' - 'qt5-base' - 'qt5-x11extras' - 'knotifications5' + 'qt6-base' + 'kstatusnotifieritem' ) provides=( 'systray-x' diff --git a/dist/arch/minimal/PKGBUILD b/dist/arch/minimal/PKGBUILD index 8b35ab5..ffe0436 100644 --- a/dist/arch/minimal/PKGBUILD +++ b/dist/arch/minimal/PKGBUILD @@ -1,25 +1,25 @@ # Maintainer: Maxime Rijnders pkgname=systray-x-minimal -pkgver=0 -pkgrel=0 +pkgver=0.9.9 +pkgrel=3 epoch=1 pkgdesc='A system tray extension for Thunderbird (Unity/XFCE/other)' arch=(x86_64) url=https://github.com/Ximi1970/systray-x license=(MPL-2.0) depends=( - 'qt5-base' + 'qt6-base' + 'qt6-wayland' 'thunderbird>=91' - 'thunderbird<121' + 'thunderbird<129' ) makedepends=( 'git' 'unzip' 'zip' 'libx11' - 'qt5-base' - 'qt5-x11extras' + 'qt6-base' ) provides=( 'systray-x' diff --git a/dist/deb-qt6/gnome/debian.changelog b/dist/deb-qt6/gnome/debian.changelog new file mode 100644 index 0000000..2afa477 --- /dev/null +++ b/dist/deb-qt6/gnome/debian.changelog @@ -0,0 +1,100 @@ +systray-x-gnome (0.9.9-1) unstable; urgency=low + + * Update to 0.9.9 + + - Qt 6 fixes + +systray-x-gnome (0.9.8-1) unstable; urgency=low + + * Update to 0.9.8 + + - Fixed / refactored multi window handling + - Added an option to add a shortcut key for show / hide + - Bugfixes + +systray-x-gnome (0.9.7-0) unstable; urgency=low + + * Update to 0.9.7 + + - Added option for new TB115 mail counting (slow with new mails enabled) + - Bugfixes + +systray-x-gnome (0.9.6-0) unstable; urgency=low + + * Update to 0.9.6 + + - Added option to show a new mail indicator or icon shading + - Added option to launch an app on start and close + - Refactored windows state handling + - Refactored mail counting + - Bugfixes + +systray-x-gnome (0.9.5-0) unstable; urgency=low + + * Update to 0.9.5 + + - Bugfixes + +systray-x-gnome (0.9.4-0) unstable; urgency=low + + * Update to 0.9.4 + + - Separate minimize, close and icon action + - Use new icon for new TB version + +systray-x-gnome (0.9.3-0) unstable; urgency=low + + * Update to 0.9.3 + + - New TB version + +systray-x-gnome (0.9.2-0) unstable; urgency=low + + * Update to 0.9.2 + + - Bug fixes + +systray-x-gnome (0.9.1-0) unstable; urgency=low + + * Update to 0.9.1 + + - Bug fixes + +systray-x-gnome (0.9.0-0) unstable; urgency=low + + * Update to 0.9.0 + + - Update for TB 102 + - Bug fixes + +systray-x-gnome (0.8.0-0) unstable; urgency=low + + * Update to 0.8.0 + + - Refactor for TB 91 + +systray-x-gnome (0.5.0-0) unstable; urgency=low + + * Update to 0.5.0 + + - Added translations logic + - Languages: + - de + - en_US + - nl + - pt_BR (by PutinVladimir) + - ru_RU (by fabianski7) + + -- Maxime Rijnders Maxime Rijnders Sat, 07 Nov 2020 23:37:00 +0100 + +systray-x-gnome (0.4.0-0) unstable; urgency=low + + * Update to 0.4.0 + + -- Maxime Rijnders Maxime Rijnders Sat, 10 Oct 2020 14:10:00 +0100 + +systray-x-gnome (0.0.1-0) unstable; urgency=low + + * Initial Release + + -- Maxime Rijnders Maxime Rijnders Tue, 11 Feb 2020 19:05:19 +0100 diff --git a/dist/deb-qt6/gnome/debian.compat b/dist/deb-qt6/gnome/debian.compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/dist/deb-qt6/gnome/debian.compat @@ -0,0 +1 @@ +10 diff --git a/dist/deb-qt6/gnome/debian.control b/dist/deb-qt6/gnome/debian.control new file mode 100644 index 0000000..d5723dc --- /dev/null +++ b/dist/deb-qt6/gnome/debian.control @@ -0,0 +1,22 @@ +Source: systray-x-gnome +Section: misc +Priority: optional +Maintainer: Maxime Rijnders +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qmake6, qt6-base-dev, thunderbird + +Package: systray-x-gnome +Architecture: any +Depends: ${shlibs:Depends}, gnome-shell-extension-appindicator, thunderbird (>= 1:91), thunderbird (< 1:121) +Description: SysTray-X is a system tray extension for Thunderbird (GNOME). + This version is optimized for the GNOME desktop. + The add-on uses the WebExtension API's to control an external system + dependent system tray application. + The add-on and system tray application can do: + * custom new mail icon + * display number of unread /new mails + * optional new mail indicator (icon or shading) + * run app on start or close + * show / hide Thunderbird (minimize) + * minimizing hides to tray + * minimize on startup + * minimize on close diff --git a/dist/deb-qt6/gnome/debian.postinst b/dist/deb-qt6/gnome/debian.postinst new file mode 100644 index 0000000..6718d73 --- /dev/null +++ b/dist/deb-qt6/gnome/debian.postinst @@ -0,0 +1,86 @@ +#!/bin/sh + +# Source debconf library. +. /usr/share/debconf/confmodule + +# Fetching configuration from debconf +#db_get packagename/question1 +#ANSWER1=$RET + +PROF_DIR=/etc/dconf/profile +PROF_FILE=user + +if [ -f $PROF_DIR/$PROF_FILE ] ; then + # + # Edit user file + # + grep -q "user-db:user" $PROF_DIR/$PROF_FILE + if [ "$?" = "1" ] ; then + echo "user-db:user" >> $PROF_DIR/$PROF_FILE + fi + + grep -q "system-db:local" $PROF_DIR/$PROF_FILE + if [ "$?" = "1" ] ; then + echo "system-db:local" >> $PROF_DIR/$PROF_FILE + fi +else + # + # Generate user file + # + mkdir -p $PROF_DIR + cat >$PROF_DIR/$PROF_FILE < $CONF_DIR/$CONF_FILE + echo "# List all extensions that you want to have enabled for all users" >> $CONF_DIR/$CONF_FILE + echo "enabled-extensions=['${EXTENSION}']" >> $CONF_DIR/$CONF_FILE +fi + +which dconf > /dev/null 2>&1 +if [ "$?" = "0" ] ; then + dconf update +fi diff --git a/dist/deb-qt6/gnome/debian.rules b/dist/deb-qt6/gnome/debian.rules new file mode 100644 index 0000000..da0efd6 --- /dev/null +++ b/dist/deb-qt6/gnome/debian.rules @@ -0,0 +1,117 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +#export DH_COMPAT=4 + +CFLAGS = -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +DEB_VENDOR := $(shell dpkg-vendor --query vendor) + +VERSION := $(shell cat dist/rpm/VERSION | grep VERSION | sed -e "s/VERSION=\(.*\)/\1/") + +VERSION_MAJOR := $(shell echo $(VERSION) | cut -d'.' -f1) +VERSION_MINOR := $(shell echo $(VERSION) | cut -d'.' -f2) +VERSION_PATCH := $(shell echo $(VERSION) | cut -d'.' -f3) + +BUILD_NUMBER := $(shell cat dist/rpm/VERSION | grep BUILD_NUMBER | sed -e "s/BUILD_NUMBER=\(.*\)/\1/") +GIT_HASH := $(shell cat dist/rpm/VERSION | grep GIT_HASH | sed -e "s/GIT_HASH=\(.*\)/\1/") +GIT_BRANCH := $(shell cat dist/rpm/VERSION | grep GIT_BRANCH | sed -e "s/GIT_BRANCH=\(.*\)/\1/") + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + sed < app/config/linux/SysTray_X.json.template -e 's|SYSTRAY_X_PATH|/usr/bin/SysTray-X|' > SysTray_X.json + + QT_SELECT=5 make OPTIONS="DEFINES+=NO_KDE_INTEGRATION DEFINES+=NO_SHORTCUTS" EXT_VERSION="DEFINES+=EXT_VERSION DEFINES+=APP_VERSION_MAJOR=\\\\\\\\\\\\\\\"$(VERSION_MAJOR)\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_MINOR=\\\\\\\\\\\\\\\"$(VERSION_MINOR)\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_PATCH=\\\\\\\\\\\\\\\"$(VERSION_PATCH)\\\\\\\\\\\\\\\" DEFINES+=APP_BUILD=\\\\\\\\\\\\\\\"$(BUILD_NUMBER)\\\\\\\\\\\\\\\" DEFINES+=APP_GITHASH=\\\\\\\\\\\\\\\"$(GIT_HASH)\\\\\\\\\\\\\\\" DEFINES+=APP_GITBRANCH=\\\\\\\\\\\\\\\"$(GIT_BRANCH)\\\\\\\\\\\\\\\"" + + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + make clean || true + # --- end custom part for cleaning up + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package + # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/ + + mkdir -p /usr/src/packages/BUILD/debian/systray-x-gnome/usr/bin + cp -f SysTray-X /usr/src/packages/BUILD/debian/systray-x-gnome/usr/bin/SysTray-X + + mkdir -p /usr/src/packages/BUILD/debian/systray-x-gnome/usr/lib/mozilla/native-messaging-hosts + cp -f SysTray_X.json /usr/src/packages/BUILD/debian/systray-x-gnome/usr/lib/mozilla/native-messaging-hosts/SysTray_X.json + +ifeq (Debian,$(DEB_VENDOR)) + mkdir -p /usr/src/packages/BUILD/debian/systray-x-gnome/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x-gnome/usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi + mkdir -p /usr/src/packages/BUILD/debian/systray-x-gnome/usr/lib/thunderbird/extensions + cd /usr/src/packages/BUILD/debian/systray-x-gnome/usr/lib/thunderbird/extensions ;\ + ln -sf ../../thunderbird-addons/extensions/systray-x@Ximi1970.xpi systray-x@Ximi1970.xpi +else + mkdir -p /usr/src/packages/BUILD/debian/systray-x-gnome/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x-gnome/usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi +endif + + # --- end custom part for installing + +# Build architecture-independent files here. +binary-indep: build install + # We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary installing diff --git a/dist/deb-qt6/gnome/systray-x-gnome.dsc b/dist/deb-qt6/gnome/systray-x-gnome.dsc new file mode 100644 index 0000000..fac2071 --- /dev/null +++ b/dist/deb-qt6/gnome/systray-x-gnome.dsc @@ -0,0 +1,7 @@ +Format: 1.0 +Source: systray-x-gnome +Version: 0.9.9-1 +Binary: systray-x-gnome +Maintainer: Maxime Rijnders +Architecture: any +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qmake6, qt6-base-dev, thunderbird diff --git a/dist/deb-qt6/kde/debian.changelog b/dist/deb-qt6/kde/debian.changelog new file mode 100644 index 0000000..6e4de3c --- /dev/null +++ b/dist/deb-qt6/kde/debian.changelog @@ -0,0 +1,100 @@ +systray-x (0.9.9-1) unstable; urgency=low + + * Update to 0.9.9 + + - Qt 6 fixes + +systray-x (0.9.8-1) unstable; urgency=low + + * Update to 0.9.8 + + - Fixed / refactored multi window handling + - Added an option to add a shortcut key for show / hide + - Bugfixes + +systray-x (0.9.7-0) unstable; urgency=low + + * Update to 0.9.7 + + - Added option for new TB115 mail counting (slow with new mails enabled) + - Bugfixes + +systray-x (0.9.6-0) unstable; urgency=low + + * Update to 0.9.6 + + - Added option to show a new mail indicator or icon shading + - Added option to launch an app on start and close + - Refactored windows state handling + - Refactored mail counting + - Bugfixes + +systray-x (0.9.5-0) unstable; urgency=low + + * Update to 0.9.5 + + - Bugfixes + +systray-x (0.9.4-0) unstable; urgency=low + + * Update to 0.9.4 + + - Separate minimize, close and icon action + - Use new icon for new TB version + +systray-x (0.9.3-0) unstable; urgency=low + + * Update to 0.9.3 + + - New TB version + +systray-x (0.9.2-0) unstable; urgency=low + + * Update to 0.9.2 + + - Bug fixes + +systray-x (0.9.1-0) unstable; urgency=low + + * Update to 0.9.1 + + - Bug fixes + +systray-x (0.9.0-0) unstable; urgency=low + + * Update to 0.9.0 + + - Update for TB 102 + - Bug fixes + +systray-x (0.8.0-0) unstable; urgency=low + + * Update to 0.8.0 + + - Refactor for TB 91 + +systray-x (0.5.0-0) unstable; urgency=low + + * Update to 0.5.0 + + - Added translations logic + - Languages: + - de + - en_US + - nl + - pt_BR (by PutinVladimir) + - ru_RU (by fabianski7) + + -- Maxime Rijnders Maxime Rijnders Sat, 07 Nov 2020 23:37:00 +0100 + +systray-x (0.4.0-0) unstable; urgency=low + + * Update to 0.4.0 + + -- Maxime Rijnders Maxime Rijnders Sat, 10 Oct 2020 14:10:00 +0100 + +systray-x (0.0.1-0) unstable; urgency=low + + * Initial Release + + -- Maxime Rijnders Maxime Rijnders Tue, 11 Feb 2020 19:05:19 +0100 diff --git a/dist/deb-qt6/kde/debian.compat b/dist/deb-qt6/kde/debian.compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/dist/deb-qt6/kde/debian.compat @@ -0,0 +1 @@ +10 diff --git a/dist/deb-qt6/kde/debian.control b/dist/deb-qt6/kde/debian.control new file mode 100644 index 0000000..75b4510 --- /dev/null +++ b/dist/deb-qt6/kde/debian.control @@ -0,0 +1,22 @@ +Source: systray-x +Section: misc +Priority: optional +Maintainer: Maxime Rijnders +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qmake6, qt6-base-dev, libkf6notifications-dev, thunderbird + +Package: systray-x +Architecture: any +Depends: ${shlibs:Depends}, thunderbird (>= 1:91), thunderbird (< 1:121) +Description: SysTray-X is a system tray extension for Thunderbird (KDE). + This version is optimized for the KDE desktop. + The add-on uses the WebExtension API's to control an external system + dependent system tray application. + The add-on and system tray application can do: + * custom new mail icon + * display number of unread /new mails + * optional new mail indicator (icon or shading) + * run app on start or close + * show / hide Thunderbird (minimize) + * minimizing hides to tray + * minimize on startup + * minimize on close diff --git a/dist/deb-qt6/kde/debian.rules b/dist/deb-qt6/kde/debian.rules new file mode 100644 index 0000000..ba3a3e3 --- /dev/null +++ b/dist/deb-qt6/kde/debian.rules @@ -0,0 +1,117 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +#export DH_COMPAT=4 + +CFLAGS = -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +DEB_VENDOR := $(shell dpkg-vendor --query vendor) + +VERSION := $(shell cat dist/rpm/VERSION | grep VERSION | sed -e "s/VERSION=\(.*\)/\1/") + +VERSION_MAJOR := $(shell echo $(VERSION) | cut -d'.' -f1) +VERSION_MINOR := $(shell echo $(VERSION) | cut -d'.' -f2) +VERSION_PATCH := $(shell echo $(VERSION) | cut -d'.' -f3) + +BUILD_NUMBER := $(shell cat dist/rpm/VERSION | grep BUILD_NUMBER | sed -e "s/BUILD_NUMBER=\(.*\)/\1/") +GIT_HASH := $(shell cat dist/rpm/VERSION | grep GIT_HASH | sed -e "s/GIT_HASH=\(.*\)/\1/") +GIT_BRANCH := $(shell cat dist/rpm/VERSION | grep GIT_BRANCH | sed -e "s/GIT_BRANCH=\(.*\)/\1/") + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + sed < app/config/linux/SysTray_X.json.template -e 's|SYSTRAY_X_PATH|/usr/bin/SysTray-X|' > SysTray_X.json + + QT_SELECT=5 make EXT_VERSION="DEFINES+=EXT_VERSION DEFINES+=APP_VERSION_MAJOR=\\\\\\\\\\\\\\\"$(VERSION_MAJOR)\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_MINOR=\\\\\\\\\\\\\\\"$(VERSION_MINOR)\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_PATCH=\\\\\\\\\\\\\\\"$(VERSION_PATCH)\\\\\\\\\\\\\\\" DEFINES+=APP_BUILD=\\\\\\\\\\\\\\\"$(BUILD_NUMBER)\\\\\\\\\\\\\\\" DEFINES+=APP_GITHASH=\\\\\\\\\\\\\\\"$(GIT_HASH)\\\\\\\\\\\\\\\" DEFINES+=APP_GITBRANCH=\\\\\\\\\\\\\\\"$(GIT_BRANCH)\\\\\\\\\\\\\\\"" + + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + make clean || true + # --- end custom part for cleaning up + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package + # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/ + + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/bin + cp -f SysTray-X /usr/src/packages/BUILD/debian/systray-x/usr/bin/SysTray-X + + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/lib/mozilla/native-messaging-hosts + cp -f SysTray_X.json /usr/src/packages/BUILD/debian/systray-x/usr/lib/mozilla/native-messaging-hosts/SysTray_X.json + +ifeq (Debian,$(DEB_VENDOR)) + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird/extensions + cd /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird/extensions ;\ + ln -sf ../../thunderbird-addons/extensions/systray-x@Ximi1970.xpi systray-x@Ximi1970.xpi +else + mkdir -p /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x/usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi +endif + + # --- end custom part for installing + +# Build architecture-independent files here. +binary-indep: build install + # We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary installing diff --git a/dist/deb-qt6/kde/systray-x.dsc b/dist/deb-qt6/kde/systray-x.dsc new file mode 100644 index 0000000..3b1a603 --- /dev/null +++ b/dist/deb-qt6/kde/systray-x.dsc @@ -0,0 +1,7 @@ +Format: 1.0 +Source: systray-x +Version: 0.9.9-1 +Binary: SysTray-X +Maintainer: Maxime Rijnders +Architecture: any +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qmake6, qt6-base-dev, libkf6notifications-dev, thunderbird diff --git a/dist/deb-qt6/minimal/debian.changelog b/dist/deb-qt6/minimal/debian.changelog new file mode 100644 index 0000000..90ccf3f --- /dev/null +++ b/dist/deb-qt6/minimal/debian.changelog @@ -0,0 +1,100 @@ +systray-x-minimal (0.9.9-1) unstable; urgency=low + + * Update to 0.9.9 + + - Qt 6 fixes + +systray-x-minimal (0.9.8-1) unstable; urgency=low + + * Update to 0.9.8 + + - Fixed / refactored multi window handling + - Added an option to add a shortcut key for show / hide + - Bugfixes + +systray-x-minimal (0.9.7-0) unstable; urgency=low + + * Update to 0.9.7 + + - Added option for new TB115 mail counting (slow with new mails enabled) + - Bugfixes + +systray-x-minimal (0.9.6-0) unstable; urgency=low + + * Update to 0.9.6 + + - Added option to show a new mail indicator or icon shading + - Added option to launch an app on start and close + - Refactored windows state handling + - Refactored mail counting + - Bugfixes + +systray-x-minimal (0.9.5-0) unstable; urgency=low + + * Update to 0.9.5 + + - Bugfixes + +systray-x-minimal (0.9.4-0) unstable; urgency=low + + * Update to 0.9.4 + + - Separate minimize, close and icon action + - Use new icon for new TB version + +systray-x-minimal (0.9.3-0) unstable; urgency=low + + * Update to 0.9.3 + + - New TB version + +systray-x-minimal (0.9.2-0) unstable; urgency=low + + * Update to 0.9.2 + + - Bug fixes + +systray-x-minimal (0.9.1-0) unstable; urgency=low + + * Update to 0.9.1 + + - Bug fixes + +systray-x-minimal (0.9.0-0) unstable; urgency=low + + * Update to 0.9.0 + + - Update for TB 102 + - Bug fixes + +systray-x-minimal (0.8.0-0) unstable; urgency=low + + * Update to 0.8.0 + + - Refactor for TB 91 + +systray-x-minimal (0.5.0-0) unstable; urgency=low + + * Update to 0.5.0 + + - Added translations logic + - Languages: + - de + - en_US + - nl + - pt_BR (by PutinVladimir) + - ru_RU (by fabianski7) + + -- Maxime Rijnders Maxime Rijnders Sat, 07 Nov 2020 23:37:00 +0100 + +systray-x-minimal (0.4.0-0) unstable; urgency=low + + * Update to 0.4.0 + + -- Maxime Rijnders Maxime Rijnders Sat, 10 Oct 2020 14:10:00 +0100 + +systray-x-minimal (0.0.1-0) unstable; urgency=low + + * Initial Release + + -- Maxime Rijnders Maxime Rijnders Tue, 11 Feb 2020 19:05:19 +0100 diff --git a/dist/deb-qt6/minimal/debian.compat b/dist/deb-qt6/minimal/debian.compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/dist/deb-qt6/minimal/debian.compat @@ -0,0 +1 @@ +10 diff --git a/dist/deb-qt6/minimal/debian.control b/dist/deb-qt6/minimal/debian.control new file mode 100644 index 0000000..e40da13 --- /dev/null +++ b/dist/deb-qt6/minimal/debian.control @@ -0,0 +1,22 @@ +Source: systray-x-minimal +Section: misc +Priority: optional +Maintainer: Maxime Rijnders +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qmake6, qt6-base-dev, thunderbird + +Package: systray-x-minimal +Architecture: any +Depends: ${shlibs:Depends}, thunderbird (>= 1:91), thunderbird (< 1:121) +Description: SysTray-X is a system tray extension for Thunderbird (non-GNOME,non-KDE). + This version is for non-KDE and non-GNOME desktops. + The add-on uses the WebExtension API's to control an external system + dependent system tray application. + The add-on and system tray application can do: + * custom new mail icon + * display number of unread /new mails + * optional new mail indicator (icon or shading) + * run app on start or close + * show / hide Thunderbird (minimize) + * minimizing hides to tray + * minimize on startup + * minimize on close diff --git a/dist/deb-qt6/minimal/debian.rules b/dist/deb-qt6/minimal/debian.rules new file mode 100644 index 0000000..999aabf --- /dev/null +++ b/dist/deb-qt6/minimal/debian.rules @@ -0,0 +1,117 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +#export DH_COMPAT=4 + +CFLAGS = -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +DEB_VENDOR := $(shell dpkg-vendor --query vendor) + +VERSION := $(shell cat dist/rpm/VERSION | grep VERSION | sed -e "s/VERSION=\(.*\)/\1/") + +VERSION_MAJOR := $(shell echo $(VERSION) | cut -d'.' -f1) +VERSION_MINOR := $(shell echo $(VERSION) | cut -d'.' -f2) +VERSION_PATCH := $(shell echo $(VERSION) | cut -d'.' -f3) + +BUILD_NUMBER := $(shell cat dist/rpm/VERSION | grep BUILD_NUMBER | sed -e "s/BUILD_NUMBER=\(.*\)/\1/") +GIT_HASH := $(shell cat dist/rpm/VERSION | grep GIT_HASH | sed -e "s/GIT_HASH=\(.*\)/\1/") +GIT_BRANCH := $(shell cat dist/rpm/VERSION | grep GIT_BRANCH | sed -e "s/GIT_BRANCH=\(.*\)/\1/") + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + sed < app/config/linux/SysTray_X.json.template -e 's|SYSTRAY_X_PATH|/usr/bin/SysTray-X|' > SysTray_X.json + + QT_SELECT=5 make OPTIONS="DEFINES+=NO_KDE_INTEGRATION" EXT_VERSION="DEFINES+=EXT_VERSION DEFINES+=APP_VERSION_MAJOR=\\\\\\\\\\\\\\\"$(VERSION_MAJOR)\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_MINOR=\\\\\\\\\\\\\\\"$(VERSION_MINOR)\\\\\\\\\\\\\\\" DEFINES+=APP_VERSION_PATCH=\\\\\\\\\\\\\\\"$(VERSION_PATCH)\\\\\\\\\\\\\\\" DEFINES+=APP_BUILD=\\\\\\\\\\\\\\\"$(BUILD_NUMBER)\\\\\\\\\\\\\\\" DEFINES+=APP_GITHASH=\\\\\\\\\\\\\\\"$(GIT_HASH)\\\\\\\\\\\\\\\" DEFINES+=APP_GITBRANCH=\\\\\\\\\\\\\\\"$(GIT_BRANCH)\\\\\\\\\\\\\\\"" + + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + make clean || true + # --- end custom part for cleaning up + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package + # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/ + + mkdir -p /usr/src/packages/BUILD/debian/systray-x-minimal/usr/bin + cp -f SysTray-X /usr/src/packages/BUILD/debian/systray-x-minimal/usr/bin/SysTray-X + + mkdir -p /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/mozilla/native-messaging-hosts + cp -f SysTray_X.json /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/mozilla/native-messaging-hosts/SysTray_X.json + +ifeq (Debian,$(DEB_VENDOR)) + mkdir -p /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi + mkdir -p /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/thunderbird/extensions + cd /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/thunderbird/extensions ;\ + ln -sf ../../thunderbird-addons/extensions/systray-x@Ximi1970.xpi systray-x@Ximi1970.xpi +else + mkdir -p /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/thunderbird-addons/extensions + cp -f systray-x@Ximi1970.xpi /usr/src/packages/BUILD/debian/systray-x-minimal/usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi +endif + + # --- end custom part for installing + +# Build architecture-independent files here. +binary-indep: build install + # We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary installing diff --git a/dist/deb-qt6/minimal/systray-x-minimal.dsc b/dist/deb-qt6/minimal/systray-x-minimal.dsc new file mode 100644 index 0000000..07c2d61 --- /dev/null +++ b/dist/deb-qt6/minimal/systray-x-minimal.dsc @@ -0,0 +1,7 @@ +Format: 1.0 +Source: systray-x-minimal +Version: 0.9.9-1 +Binary: systray-x-minimal +Maintainer: Maxime Rijnders +Architecture: any +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qmake6, qt6-base-dev, thunderbird diff --git a/dist/deb/gnome/debian.changelog b/dist/deb/gnome/debian.changelog index bbe041e..9d9efac 100644 --- a/dist/deb/gnome/debian.changelog +++ b/dist/deb/gnome/debian.changelog @@ -1,4 +1,13 @@ -systray-x-gnome (0.9.8-0) unstable; urgency=low +systray-x-gnome (0.9.9-1) unstable; urgency=low + + * Update to 0.9.9 + + - Qt 6 fixes + - TB 121+ fixes + - Added window positions correction option + - Bugfixes + +systray-x-gnome (0.9.8-1) unstable; urgency=low * Update to 0.9.8 diff --git a/dist/deb/gnome/debian.control b/dist/deb/gnome/debian.control index b78ee24..76d4211 100644 --- a/dist/deb/gnome/debian.control +++ b/dist/deb/gnome/debian.control @@ -2,11 +2,11 @@ Source: systray-x-gnome Section: misc Priority: optional Maintainer: Maxime Rijnders -Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qdbus-qt5, libqt5x11extras5-dev, thunderbird +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qtwayland5, qdbus-qt5, libqt5x11extras5-dev, thunderbird Package: systray-x-gnome Architecture: any -Depends: ${shlibs:Depends}, gnome-shell-extension-appindicator, thunderbird (>= 1:91), thunderbird (< 1:121) +Depends: ${shlibs:Depends}, gnome-shell-extension-appindicator, thunderbird (>= 1:91), thunderbird (< 1:129) Description: SysTray-X is a system tray extension for Thunderbird (GNOME). This version is optimized for the GNOME desktop. The add-on uses the WebExtension API's to control an external system diff --git a/dist/deb/gnome/systray-x-gnome.dsc b/dist/deb/gnome/systray-x-gnome.dsc index be2642e..c9e1a12 100644 --- a/dist/deb/gnome/systray-x-gnome.dsc +++ b/dist/deb/gnome/systray-x-gnome.dsc @@ -1,7 +1,7 @@ Format: 1.0 Source: systray-x-gnome -Version: 0-0 +Version: 0.9.9-3 Binary: systray-x-gnome Maintainer: Maxime Rijnders Architecture: any -Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qdbus-qt5, libqt5x11extras5-dev, thunderbird +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qtwayland5, qdbus-qt5, libqt5x11extras5-dev, thunderbird diff --git a/dist/deb/kde/debian.changelog b/dist/deb/kde/debian.changelog index 7649218..b17fc95 100644 --- a/dist/deb/kde/debian.changelog +++ b/dist/deb/kde/debian.changelog @@ -1,4 +1,13 @@ -systray-x (0.9.8-0) unstable; urgency=low +systray-x (0.9.9-1) unstable; urgency=low + + * Update to 0.9.9 + + - Qt 6 fixes + - TB 121+ fixes + - Added window positions correction option + - Bugfixes + +systray-x (0.9.8-1) unstable; urgency=low * Update to 0.9.8 diff --git a/dist/deb/kde/debian.control b/dist/deb/kde/debian.control index 76bc5ba..e0aa427 100644 --- a/dist/deb/kde/debian.control +++ b/dist/deb/kde/debian.control @@ -2,11 +2,11 @@ Source: systray-x Section: misc Priority: optional Maintainer: Maxime Rijnders -Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qdbus-qt5, libqt5x11extras5-dev, libkf5notifications-dev, thunderbird +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qtwayland5, qdbus-qt5, libqt5x11extras5-dev, libkf5notifications-dev, thunderbird Package: systray-x Architecture: any -Depends: ${shlibs:Depends}, thunderbird (>= 1:91), thunderbird (< 1:121) +Depends: ${shlibs:Depends}, thunderbird (>= 1:91), thunderbird (< 1:129) Description: SysTray-X is a system tray extension for Thunderbird (KDE). This version is optimized for the KDE desktop. The add-on uses the WebExtension API's to control an external system diff --git a/dist/deb/kde/systray-x.dsc b/dist/deb/kde/systray-x.dsc index 820f28a..db4abf4 100644 --- a/dist/deb/kde/systray-x.dsc +++ b/dist/deb/kde/systray-x.dsc @@ -1,7 +1,7 @@ Format: 1.0 Source: systray-x -Version: 0-0 +Version: 0.9.9-3 Binary: SysTray-X Maintainer: Maxime Rijnders Architecture: any -Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qdbus-qt5, libqt5x11extras5-dev, libkf5notifications-dev, thunderbird +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qtwayland5, qdbus-qt5, libqt5x11extras5-dev, libkf5notifications-dev, thunderbird diff --git a/dist/deb/minimal/debian.changelog b/dist/deb/minimal/debian.changelog index 45d72af..c069bcc 100644 --- a/dist/deb/minimal/debian.changelog +++ b/dist/deb/minimal/debian.changelog @@ -1,4 +1,13 @@ -systray-x-minimal (0.9.8-0) unstable; urgency=low +systray-x-minimal (0.9.9-1) unstable; urgency=low + + * Update to 0.9.9 + + - Qt 6 fixes + - TB 121+ fixes + - Added window positions correction option + - Bugfixes + +systray-x-minimal (0.9.8-1) unstable; urgency=low * Update to 0.9.8 diff --git a/dist/deb/minimal/debian.control b/dist/deb/minimal/debian.control index 659a2c6..986180e 100644 --- a/dist/deb/minimal/debian.control +++ b/dist/deb/minimal/debian.control @@ -2,11 +2,11 @@ Source: systray-x-minimal Section: misc Priority: optional Maintainer: Maxime Rijnders -Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qdbus-qt5, libqt5x11extras5-dev, thunderbird +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qtwayland5, qdbus-qt5, libqt5x11extras5-dev, thunderbird Package: systray-x-minimal Architecture: any -Depends: ${shlibs:Depends}, thunderbird (>= 1:91), thunderbird (< 1:121) +Depends: ${shlibs:Depends}, thunderbird (>= 1:91), thunderbird (< 1:129) Description: SysTray-X is a system tray extension for Thunderbird (non-GNOME,non-KDE). This version is for non-KDE and non-GNOME desktops. The add-on uses the WebExtension API's to control an external system diff --git a/dist/deb/minimal/systray-x-minimal.dsc b/dist/deb/minimal/systray-x-minimal.dsc index a4f58c8..96068c7 100644 --- a/dist/deb/minimal/systray-x-minimal.dsc +++ b/dist/deb/minimal/systray-x-minimal.dsc @@ -1,7 +1,7 @@ Format: 1.0 Source: systray-x-minimal -Version: 0-0 +Version: 0.9.9-3 Binary: systray-x-minimal Maintainer: Maxime Rijnders Architecture: any -Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qdbus-qt5, libqt5x11extras5-dev, thunderbird +Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-dev, qtwayland5, qdbus-qt5, libqt5x11extras5-dev, thunderbird diff --git a/dist/rpm/VERSION b/dist/rpm/VERSION index 326a83b..8eb0ab5 100644 --- a/dist/rpm/VERSION +++ b/dist/rpm/VERSION @@ -1,4 +1,4 @@ -VERSION=0.9.8 -BUILD_NUMBER=1064 -GIT_HASH=ac868b317d5348124db1a506b0a32a1c30ba7ea6 +VERSION=0.9.9 +BUILD_NUMBER=1144 +GIT_HASH=4cc230a117e13f3bca1d63bfa1f9de857ffa99aa GIT_BRANCH=develop diff --git a/dist/rpm/gnome/_service b/dist/rpm/gnome/_service index 92d4fd8..e4f986b 100644 --- a/dist/rpm/gnome/_service +++ b/dist/rpm/gnome/_service @@ -2,8 +2,8 @@ https://github.com/Ximi1970/systray-x.git git - 0.9.8 - 0.9.8 + release-0.9.9 + 0.9.9 systray-x-gnome dist/rpm/gnome/systray-x-gnome.changes dist/rpm/gnome/systray-x-gnome.spec @@ -22,5 +22,7 @@ *.tar xz - + + systray-x-gnome.spec + diff --git a/dist/rpm/gnome/systray-x-gnome.changes b/dist/rpm/gnome/systray-x-gnome.changes index 6e7bd78..8127db6 100644 --- a/dist/rpm/gnome/systray-x-gnome.changes +++ b/dist/rpm/gnome/systray-x-gnome.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Apr 27 16:00:00 UTC 2024 - Maxime Rijnders + + * Update to 0.9.9 + + - Qt 6 fixes + - TB 121+ fixes + - Added window positions correction option + - Bugfixes + ------------------------------------------------------------------- Sun Dec 10 13:24:00 UTC 2023 - Maxime Rijnders diff --git a/dist/rpm/gnome/systray-x-gnome.spec b/dist/rpm/gnome/systray-x-gnome.spec index 179b936..b50457c 100644 --- a/dist/rpm/gnome/systray-x-gnome.spec +++ b/dist/rpm/gnome/systray-x-gnome.spec @@ -26,21 +26,42 @@ Source0: %{name}-%{version}.tar.xz Source1: VERSION BuildRequires: unzip BuildRequires: zip +%if 0%{?suse_version} > 1600 || 0%{?fedora_version} > 39 +BuildRequires: pkgconfig(Qt6Core) +BuildRequires: pkgconfig(Qt6Widgets) +%else BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5X11Extras) -BuildRequires: pkgconfig(x11) -Requires: gnome-shell-extension-appindicator -%if 0%{?fedora_version} || 0%{?centos_version} +%if 0%{?fedora_version} BuildRequires: qt5-qtx11extras-devel -Requires: thunderbird >= 91 -Requires: thunderbird < 121 %else BuildRequires: libqt5-qtx11extras-devel -Requires: MozillaThunderbird >= 91 -Requires: MozillaThunderbird < 121 %endif +%endif +BuildRequires: pkgconfig(x11) +%if 0%{?fedora_version} +Requires: thunderbird >= 91 +Requires: thunderbird < 129 +%else +Requires: MozillaThunderbird >= 91 +Requires: MozillaThunderbird < 129 +%endif +%if 0%{?suse_version} > 1600 || 0%{?fedora_version} > 39 +%if 0%{?fedora_version} +Requires: qt6-qtwayland +%else +Requires: qt6-wayland +%endif +%else +%if 0%{?fedora_version} +Requires: qt5-qtwayland +%else +Requires: libqt5-qtwayland +%endif +%endif +Requires: gnome-shell-extension-appindicator %description SysTray-X is a system tray extension for Thunderbird. diff --git a/dist/rpm/kde/_service b/dist/rpm/kde/_service index d046639..026e73e 100644 --- a/dist/rpm/kde/_service +++ b/dist/rpm/kde/_service @@ -2,8 +2,8 @@ https://github.com/Ximi1970/systray-x.git git - 0.9.8 - 0.9.8 + release-0.9.9 + 0.9.9 dist/rpm/kde/systray-x.changes dist/rpm/kde/systray-x.spec dist/rpm/VERSION @@ -19,5 +19,7 @@ *.tar xz - + + systray-x.spec + diff --git a/dist/rpm/kde/systray-x.changes b/dist/rpm/kde/systray-x.changes index 6e7bd78..8127db6 100644 --- a/dist/rpm/kde/systray-x.changes +++ b/dist/rpm/kde/systray-x.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Apr 27 16:00:00 UTC 2024 - Maxime Rijnders + + * Update to 0.9.9 + + - Qt 6 fixes + - TB 121+ fixes + - Added window positions correction option + - Bugfixes + ------------------------------------------------------------------- Sun Dec 10 13:24:00 UTC 2023 - Maxime Rijnders diff --git a/dist/rpm/kde/systray-x.spec b/dist/rpm/kde/systray-x.spec index c903683..cdab400 100644 --- a/dist/rpm/kde/systray-x.spec +++ b/dist/rpm/kde/systray-x.spec @@ -26,23 +26,51 @@ Source0: %{name}-%{version}.tar.xz Source1: VERSION BuildRequires: unzip BuildRequires: zip +%if 0%{?suse_version} > 1600 || 0%{?fedora_version} > 39 +BuildRequires: pkgconfig(Qt6Core) +BuildRequires: pkgconfig(Qt6Widgets) +BuildRequires: kf6-kstatusnotifieritem-devel +%if 0%{?fedora_version} +Requires: kf6-knotifications +%else +Requires: kf6-knotifications +Requires: libKF6Notifications6 +%endif +%else BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5X11Extras) -BuildRequires: pkgconfig(x11) -%if 0%{?fedora_version} || 0%{?centos_version} +%if 0%{?fedora_version} BuildRequires: qt5-qtx11extras-devel BuildRequires: kf5-knotifications-devel Requires: kf5-knotifications -Requires: thunderbird >= 91 -Requires: thunderbird < 121 %else BuildRequires: libqt5-qtx11extras-devel BuildRequires: knotifications-devel Requires: libKF5Notifications5 +%endif +%endif +BuildRequires: pkgconfig(x11) +%if 0%{?fedora_version} +Requires: thunderbird >= 91 +Requires: thunderbird < 129 +%else Requires: MozillaThunderbird >= 91 -Requires: MozillaThunderbird < 121 +Requires: MozillaThunderbird < 129 +%endif +%if 0%{?suse_version} > 1600 || 0%{?fedora_version} > 39 +%if 0%{?fedora_version} +Requires: qt6-qtwayland +%else +Requires: qt6-wayland +%endif +%else +%if 0%{?fedora_version} +Requires: qt5-qtwayland +%else +Requires: libqt5-qtwayland +%endif %endif %description diff --git a/dist/rpm/minimal/_service b/dist/rpm/minimal/_service index 88d3ed4..02aca0d 100644 --- a/dist/rpm/minimal/_service +++ b/dist/rpm/minimal/_service @@ -2,8 +2,8 @@ https://github.com/Ximi1970/systray-x.git git - 0.9.8 - 0.9.8 + release-0.9.9 + 0.9.9 systray-x-minimal dist/rpm/minimal/systray-x-minimal.changes dist/rpm/minimal/systray-x-minimal.spec @@ -12,7 +12,6 @@ dist/deb/minimal/debian.compat dist/deb/minimal/debian.control dist/deb/minimal/debian.rules - dist/deb/minimal/debian.postinst dist/deb/minimal/systray-x-minimal.dsc dist/arch/minimal/PKGBUILD @@ -21,5 +20,7 @@ *.tar xz - + + systray-x-minimal.spec + diff --git a/dist/rpm/minimal/systray-x-minimal.changes b/dist/rpm/minimal/systray-x-minimal.changes index 6e7bd78..8127db6 100644 --- a/dist/rpm/minimal/systray-x-minimal.changes +++ b/dist/rpm/minimal/systray-x-minimal.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Apr 27 16:00:00 UTC 2024 - Maxime Rijnders + + * Update to 0.9.9 + + - Qt 6 fixes + - TB 121+ fixes + - Added window positions correction option + - Bugfixes + ------------------------------------------------------------------- Sun Dec 10 13:24:00 UTC 2023 - Maxime Rijnders diff --git a/dist/rpm/minimal/systray-x-minimal.spec b/dist/rpm/minimal/systray-x-minimal.spec index bbc1fac..6a741cf 100644 --- a/dist/rpm/minimal/systray-x-minimal.spec +++ b/dist/rpm/minimal/systray-x-minimal.spec @@ -26,19 +26,40 @@ Source0: %{name}-%{version}.tar.xz Source1: VERSION BuildRequires: unzip BuildRequires: zip +%if 0%{?suse_version} > 1600 || 0%{?fedora_version} > 39 +BuildRequires: pkgconfig(Qt6Core) +BuildRequires: pkgconfig(Qt6Widgets) +%else BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5X11Extras) -BuildRequires: pkgconfig(x11) %if 0%{?fedora_version} || 0%{?centos_version} BuildRequires: qt5-qtx11extras-devel -Requires: thunderbird >= 91 -Requires: thunderbird < 121 %else BuildRequires: libqt5-qtx11extras-devel +%endif +%endif +BuildRequires: pkgconfig(x11) +%if 0%{?fedora_version} || 0%{?centos_version} +Requires: thunderbird >= 91 +Requires: thunderbird < 129 +%else Requires: MozillaThunderbird >= 91 -Requires: MozillaThunderbird < 121 +Requires: MozillaThunderbird < 129 +%endif +%if 0%{?suse_version} > 1600 || 0%{?fedora_version} > 39 +%if 0%{?fedora_version} +Requires: qt6-qtwayland +%else +Requires: qt6-wayland +%endif +%else +%if 0%{?fedora_version} +Requires: qt5-qtwayland +%else +Requires: libqt5-qtwayland +%endif %endif %description diff --git a/update_version.sh b/update_version.sh index a542ad5..dcbbea1 100755 --- a/update_version.sh +++ b/update_version.sh @@ -1,24 +1,62 @@ #!/bin/bash +if [[ -z $2 ]] ; then + RELEASE=1 +else + RELEASE=$2 +fi + VERSION=$1 +echo $VERSION-$RELEASE + VERSION_AR=(${VERSION//./ }) VERSION_MAJOR=${VERSION_AR[0]} VERSION_MINOR=${VERSION_AR[1]} VERSION_BUILD=${VERSION_AR[2]} SERVICE_FILE="./dist/rpm/kde/_service" -sed -i -e "s?\(^.*\"revision\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE +sed -i -e "s?\(^.*\"revision\">\).*\(\)?\1release-$VERSION\2?" $SERVICE_FILE sed -i -e "s?\(^.*\"versionformat\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE SERVICE_FILE="./dist/rpm/gnome/_service" -sed -i -e "s?\(^.*\"revision\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE +sed -i -e "s?\(^.*\"revision\">\).*\(\)?\1release-$VERSION\2?" $SERVICE_FILE sed -i -e "s?\(^.*\"versionformat\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE SERVICE_FILE="./dist/rpm/minimal/_service" -sed -i -e "s?\(^.*\"revision\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE +sed -i -e "s?\(^.*\"revision\">\).*\(\)?\1release-$VERSION\2?" $SERVICE_FILE sed -i -e "s?\(^.*\"versionformat\">\).*\(\)?\1$VERSION\2?" $SERVICE_FILE + +SERVICE_FILE="./dist/deb/kde/debian.changelog" +sed -i -e "0,/systray-x/{s?\(^systray-x \).*\( unstable.*\)?\1($VERSION-$RELEASE)\2?}" $SERVICE_FILE +SERVICE_FILE="./dist/deb/kde/systray-x.dsc" +sed -i -e "s?\(^Version: \).*?\1$VERSION-$RELEASE?" $SERVICE_FILE + +SERVICE_FILE="./dist/deb/gnome/debian.changelog" +sed -i -e "0,/systray-x/{s?\(^systray-x-gnome \).*\( unstable.*\)?\1($VERSION-$RELEASE)\2?}" $SERVICE_FILE +SERVICE_FILE="./dist/deb/gnome/systray-x-gnome.dsc" +sed -i -e "s?\(^Version: \).*?\1$VERSION-$RELEASE?" $SERVICE_FILE + +SERVICE_FILE="./dist/deb/minimal/debian.changelog" +sed -i -e "0,/systray-x/{s?\(^systray-x-minimal \).*\( unstable.*\)?\1($VERSION-$RELEASE)\2?}" $SERVICE_FILE +SERVICE_FILE="./dist/deb/minimal/systray-x-minimal.dsc" +sed -i -e "s?\(^Version: \).*?\1$VERSION-$RELEASE?" $SERVICE_FILE + + +SERVICE_FILE="./dist/arch/kde/PKGBUILD" +sed -i -e "s?\(^pkgver=\).*?\1$VERSION?" $SERVICE_FILE +sed -i -e "s?\(^pkgrel=\).*?\1$RELEASE?" $SERVICE_FILE + +SERVICE_FILE="./dist/arch/gnome/PKGBUILD" +sed -i -e "s?\(^pkgver=\).*?\1$VERSION?" $SERVICE_FILE +sed -i -e "s?\(^pkgrel=\).*?\1$RELEASE?" $SERVICE_FILE + +SERVICE_FILE="./dist/arch/minimal/PKGBUILD" +sed -i -e "s?\(^pkgver=\).*?\1$VERSION?" $SERVICE_FILE +sed -i -e "s?\(^pkgrel=\).*?\1$RELEASE?" $SERVICE_FILE + + MANIFEST_FILE="./webext/manifest.json" sed -i -e "s?\(^.*\"version\": \"\).*\(\",\)?\1$VERSION\2?" $MANIFEST_FILE diff --git a/webext/_locales/de/messages.json b/webext/_locales/de/messages.json index 6c628e1..4f28721 100644 --- a/webext/_locales/de/messages.json +++ b/webext/_locales/de/messages.json @@ -154,6 +154,31 @@ "description": "Start application in tray" }, + "windows_positions_correction_options": { + "message": "Position", + "description": "Position" + }, + + "windows_positions_correction": { + "message": "Corriegere fensterpositionen", + "description": "Correct window positions" + }, + + "windows_no_correction": { + "message": "Keine Korrektur mit Titelleiste", + "description": "No titlebar correction" + }, + + "windows_add_titlebar_size": { + "message": "Größe der Titelleiste hinzufügen", + "description": "Add titlebar size" + }, + + "windows_subtract_titlebar_size": { + "message": "Größe der Titelleiste hinzufügen subtrahieren", + "description": "Subtract titlebar size" + }, + "restore_positions_on_startup": { "message": "Fensterpositionen wiederherstellen beim Start", "description": "Restore the window positions on startup" diff --git a/webext/_locales/el/messages.json b/webext/_locales/el/messages.json index 7879664..cddda6d 100644 --- a/webext/_locales/el/messages.json +++ b/webext/_locales/el/messages.json @@ -154,6 +154,31 @@ "description": "Start application in tray" }, + "windows_positions_correction_options": { + "message": "Τοποθεσία", + "description": "Position" + }, + + "windows_positions_correction": { + "message": "Προσαρμόστε τις θέσεις των παραθύρων", + "description": "Correct window positions" + }, + + "windows_no_correction": { + "message": "Καμία διόρθωση γραμμής τίτλου", + "description": "No titlebar correction" + }, + + "windows_add_titlebar_size": { + "message": "Προσθήκη μεγέθους γραμμής τίτλου", + "description": "Add titlebar size" + }, + + "windows_subtract_titlebar_size": { + "message": "Αφαιρέστε το μέγεθος της γραμμής τίτλου", + "description": "Subtract titlebar size" + }, + "restore_positions_on_startup": { "message": "Επαναφορά θέσεων παραθύρου κατά την εκκίνηση", "description": "Restore the window positions on startup" diff --git a/webext/_locales/en-US/messages.json b/webext/_locales/en-US/messages.json index f4621ec..64d8458 100644 --- a/webext/_locales/en-US/messages.json +++ b/webext/_locales/en-US/messages.json @@ -154,6 +154,31 @@ "description": "Start application in tray" }, + "windows_positions_correction_options": { + "message": "Position", + "description": "Position" + }, + + "windows_positions_correction": { + "message": "Correct window positions", + "description": "Correct window positions" + }, + + "windows_no_correction": { + "message": "No titlebar correction", + "description": "No titlebar correction" + }, + + "windows_add_titlebar_size": { + "message": "Add titlebar size", + "description": "Add titlebar size" + }, + + "windows_subtract_titlebar_size": { + "message": "Subtract titlebar size", + "description": "Subtract titlebar size" + }, + "restore_positions_on_startup": { "message": "Restore window positions on startup", "description": "Restore the window positions on startup" diff --git a/webext/_locales/it/messages.json b/webext/_locales/it/messages.json index 15cab54..9875c2a 100644 --- a/webext/_locales/it/messages.json +++ b/webext/_locales/it/messages.json @@ -154,6 +154,31 @@ "description": "Start application in tray" }, + "windows_positions_correction_options": { + "message": "Posizione", + "description": "Position" + }, + + "windows_positions_correction": { + "message": "Posizioni corrette delle finestre", + "description": "Correct window positions" + }, + + "windows_no_correction": { + "message": "Nessuna correzione della barra del titolo", + "description": "No titlebar correction" + }, + + "windows_add_titlebar_size": { + "message": "Aggiungi la dimensione della barra del titolo", + "description": "Add titlebar size" + }, + + "windows_subtract_titlebar_size": { + "message": "Sottrai la dimensione della barra del titolo", + "description": "Subtract titlebar size" + }, + "restore_positions_on_startup": { "message": "Ripristina le posizioni della finestra all'avvio", "description": "Restore the window positions on startup" diff --git a/webext/_locales/nl/messages.json b/webext/_locales/nl/messages.json index 4af130b..6b644c3 100644 --- a/webext/_locales/nl/messages.json +++ b/webext/_locales/nl/messages.json @@ -154,6 +154,31 @@ "description": "Start application in tray" }, + "windows_positions_correction_options": { + "message": "Positie", + "description": "Position" + }, + + "windows_positions_correction": { + "message": "Corrigeer vensterposities", + "description": "Correct window positions" + }, + + "windows_no_correction": { + "message": "Geen titelbalk correctie", + "description": "No titlebar correction" + }, + + "windows_add_titlebar_size": { + "message": "Titlebalk grootte toevoegen", + "description": "Add titlebar size" + }, + + "windows_subtract_titlebar_size": { + "message": "Titlebalk grootte aftrekken", + "description": "Subtract titlebar size" + }, + "restore_positions_on_startup": { "message": "Herstel vensterposities bij opstarten", "description": "Restore the window positions on startup" diff --git a/webext/_locales/pt-BR/messages.json b/webext/_locales/pt-BR/messages.json index 357f23c..35127b5 100644 --- a/webext/_locales/pt-BR/messages.json +++ b/webext/_locales/pt-BR/messages.json @@ -154,6 +154,31 @@ "description": "Start application in tray" }, + "windows_positions_correction_options": { + "message": "Posição", + "description": "Position" + }, + + "windows_positions_correction": { + "message": "Posições corretas da janela", + "description": "Correct window positions" + }, + + "windows_no_correction": { + "message": "Nenhuma correção na barra de título", + "description": "No titlebar correction" + }, + + "windows_add_titlebar_size": { + "message": "Adicionar tamanho da barra de título", + "description": "Add titlebar size" + }, + + "windows_subtract_titlebar_size": { + "message": "Subtraia o tamanho da barra de título", + "description": "Subtract titlebar size" + }, + "restore_positions_on_startup": { "message": "Restaurar posições da janela na inicialização", "description": "Restore the window positions on startup" diff --git a/webext/_locales/ru/messages.json b/webext/_locales/ru/messages.json index 57f0e5a..8b6d68a 100644 --- a/webext/_locales/ru/messages.json +++ b/webext/_locales/ru/messages.json @@ -154,6 +154,31 @@ "description": "Start application in tray" }, + "windows_positions_correction_options": { + "message": "Позиция", + "description": "Position" + }, + + "windows_positions_correction": { + "message": "Правильное расположение окон", + "description": "Correct window positions" + }, + + "windows_no_correction": { + "message": "No titlebar correction", + "description": "Без исправления названия" + }, + + "windows_add_titlebar_size": { + "message": "Добавить размер заголовка", + "description": "Add titlebar size" + }, + + "windows_subtract_titlebar_size": { + "message": "Вычтите размер строки заголовка", + "description": "Subtract titlebar size" + }, + "restore_positions_on_startup": { "message": "Восстановить положение окон при запуске", "description": "Restore the window positions on startup" diff --git a/webext/_locales/zh-CN/messages.json b/webext/_locales/zh-CN/messages.json new file mode 100644 index 0000000..7543550 --- /dev/null +++ b/webext/_locales/zh-CN/messages.json @@ -0,0 +1,581 @@ +{ + "extension_name": { + "message": "SysTray-X", + "description": "Name of the webextension" + }, + + "extension_description": { + "message": "系统托盘控制插件,请下载安装配套应用。", + "description": "Webextension descriptions" + }, + + "preferences": { + "message": "SysTray-X 首选项", + "description": "Title of preferences page" + }, + + "intro_line_1": { + "message": "该插件需要和外部应用配合工作,请在这里获取:", + "description": "Introduction line 1" + }, + + "intro_link": { + "message": "下载 SysTray-X 配套应用", + "description": "Link description" + }, + + "tab_windows": { + "message": "窗口", + "description": "Tab for Window options" + }, + + "tab_icon": { + "message": "图标", + "description": "Tab for Icon options" + }, + + "tab_count": { + "message": "计数", + "description": "Tab for Count options" + }, + + "tab_apps": { + "message": "应用", + "description": "Tab for Apps options" + }, + + "tab_mail": { + "message": "邮件", + "description": "Tab for Mail options" + }, + + "tab_shortcuts": { + "message": "快捷键", + "description": "Tab for Shortcuts options" + }, + + "tab_debug": { + "message": "调试", + "description": "Tab for Debug options" + }, + + "windows": { + "message": "窗口", + "description": "Title for Windows options" + }, + + "windows_min_options": { + "message": "最小化按钮", + "description": "Caption for Minimize options" + }, + + "windows_min_default": { + "message": "最小化", + "description": "Minimize option 0" + }, + + "windows_min_to_tray": { + "message": "收回托盘", + "description": "Minimize to tray" + }, + + "windows_min_icon_options": { + "message": "托盘图标", + "description": "Caption for Icon options" + }, + + "windows_min_default_icon": { + "message": "最小化", + "description": "Minimize option 0" + }, + + "windows_min_to_tray_icon": { + "message": "收回托盘", + "description": "Minimize to tray" + }, + + "windows_min_to_tray_1": { + "message": "收回托盘,方法 1", + "description": "Minimize option 1" + }, + + "windows_min_to_tray_2": { + "message": "收回托盘,方法 2", + "description": "Minimize option 2" + }, + + "windows_close_options": { + "message": "关闭按钮", + "description": "Caption for Close options" + }, + + "windows_close_default": { + "message": "普通关闭", + "description": "Close option 0" + }, + + "windows_close_1": { + "message": "主窗口最小化,子窗口关闭", + "description": "Close option 1" + }, + + "windows_close_2": { + "message": "所有窗口最小化", + "description": "Close option 2" + }, + + "windows_close_tray_1": { + "message": "主窗口收回托盘,子窗口关闭", + "description": "Close option 3" + }, + + "windows_close_tray_2": { + "message": "所有窗口收回托盘", + "description": "Close option 4" + }, + + "windows_startup_options": { + "message": "启动方式", + "description": "Startup" + }, + + "windows_default_startup": { + "message": "普通启动", + "description": "Default startup" + }, + + "windows_minimized_startup": { + "message": "最小化启动", + "description": "Start application minimized" + }, + + "windows_docked_startup": { + "message": "启动至托盘", + "description": "Start application in tray" + }, + + "windows_positions_correction_options": { + "message": "位置", + "description": "Position" + }, + + "windows_positions_correction": { + "message": "正确的窗口位置", + "description": "Correct window positions" + }, + + "windows_no_correction": { + "message": "没有标题栏修正", + "description": "No titlebar correction" + }, + + "windows_add_titlebar_size": { + "message": "添加标题栏大小", + "description": "Add titlebar size" + }, + + "windows_subtract_titlebar_size": { + "message": "减去标题栏大小", + "description": "Subtract titlebar size" + }, + + "restore_positions_on_startup": { + "message": "启动时恢复窗口位置", + "description": "Restore the window positions on startup" + }, + + "icons": { + "message": "图标", + "description": "Title for Icons options" + }, + + "icons_default_options": { + "message": "默认", + "description": "Caption for Default Icon options" + }, + + "icons_default_tb": { + "message": "Thunderbird 默认", + "description": "Default icon option 1" + }, + + "icons_default_lookthrough": { + "message": "透明", + "description": "Default icon option 2" + }, + + "icons_default_custom": { + "message": "自定义", + "description": "Default icon option 3" + }, + + "icons_default_custom_choose": { + "message": "选择图标...", + "description": "Default icon option 3 button" + }, + + "icons_default_kde_integration": { + "message": "KDE 集成(隐藏)", + "description": "Default icon KDE integration" + }, + + "icons_unread_options": { + "message": "有未读邮件时", + "description": "Caption for Unread Icon options" + }, + + "icons_unread_blank": { + "message": "空白", + "description": "Unread Icon option 1" + }, + + "icons_unread_new": { + "message": "新邮件", + "description": "Unread Icon option 2" + }, + + "icons_unread_custom": { + "message": "自定义", + "description": "Unread Icon option 3" + }, + + "icons_unread_custom_choose": { + "message": "选择图标...", + "description": "Unread Icon option 3 button" + }, + + "icons_unread_no": { + "message": "无", + "description": "Unread Icon option 4" + }, + + "icons_invert_icon": { + "message": "反色", + "description": "Invert icon" + }, + + "count": { + "message": "计数", + "description": "Title for Count options" + }, + + "count_number_display": { + "message": "显示消息计数", + "description": "Show message count" + }, + + "count_new_indicator_display": { + "message": "显示新消息提示", + "description": "Show the new message indicator" + }, + + "count_startup_delay": { + "message": "启动延迟秒数", + "description": "Startup delay" + }, + + "count_number_count_type": { + "message": "计数类型", + "description": "Count type options" + }, + + "count_number_count_unread": { + "message": "未读消息", + "description": "Count unread mails" + }, + + "count_number_count_new": { + "message": "新消息", + "description": "Count new mails" + }, + + "count_api_count_method": { + "message": "由 API 提供计数方法", + "description": "API count method" + }, + + "count_number_options": { + "message": "数字", + "description": "Caption for Number options" + }, + + "count_number_color": { + "message": "颜色:", + "description": "Color of the number" + }, + + "count_number_size": { + "message": "字号:", + "description": "Size of the number" + }, + + "count_number_alignment": { + "message": "位置:", + "description": "Number alignment" + }, + + "count_number_top_left": { + "message": "左上", + "description": "Number alignment top left" + }, + + "count_number_top_center": { + "message": "中上", + "description": "Number alignment top center" + }, + + "count_number_top_right": { + "message": "右上", + "description": "Number alignment top right" + }, + + "count_number_middle_left": { + "message": "左中", + "description": "Number alignment middle left" + }, + + "count_number_middle_center": { + "message": "正中", + "description": "Number alignment middle center" + }, + + "count_number_middle_right": { + "message": "右中", + "description": "Number alignment middle right" + }, + + "count_number_bottom_left": { + "message": "左下", + "description": "Number alignment bottom left" + }, + + "count_number_bottom_center": { + "message": "中下", + "description": "Number alignment bottom center" + }, + + "count_number_bottom_right": { + "message": "右下", + "description": "Number alignment bottom right" + }, + + "count_number_margins": { + "message": "边距(左,上,中,下)", + "description": "Number margins (left, top, right, bottom)" + }, + + "count_new_indicator": { + "message": "新消息提示", + "description": "New indicator type" + }, + + "count_new_indicator_round": { + "message": "圆点", + "description": "Round indicator" + }, + + "count_new_indicator_star": { + "message": "星形", + "description": "Star indicator" + }, + + "count_new_shade_color": { + "message": "背景色:", + "description": "Shade the icon" + }, + + "apps": { + "message": "应用", + "description": "Title for Apps options" + }, + + "apps_start_application": { + "message": "启动应用时", + "description": "The start application parameters" + }, + + "apps_start_app": { + "message": "应用:", + "description": "The start application" + }, + + "apps_start_app_args": { + "message": "参数:", + "description": "Arguments for a start application" + }, + + "apps_close_application": { + "message": "关闭应用时", + "description": "The close application parameters" + }, + + "apps_close_app": { + "message": "应用:", + "description": "The close application" + }, + + "apps_close_app_args": { + "message": "参数:", + "description": "Arguments for a close application" + }, + + "accounts": { + "message": "账户", + "description": "Title for Accounts options" + }, + + "shortcuts": { + "message": "快捷键", + "description": "Title for Shortcuts options" + }, + + "shortcuts_showhide_shortcut": { + "message": "显示 / 隐藏 Thunderbird:", + "description": "Label for the show / hide shortcut edit box" + }, + + "shortcuts_clear_button": { + "message": "清空", + "description": "Clear" + }, + + "debug": { + "message": "调试", + "description": "Title for Debug options" + }, + + "debug_display": { + "message": "显示调试窗口", + "description": "Display the debug window" + }, + + "save_preferences": { + "message": "保存首选项", + "description": "Save preferences" + }, + + "save_preferences_button": { + "message": "保存", + "description": "Save preferences button" + }, + + "reset_preferences": { + "message": "重置首选项", + "description": "Reset preferences" + }, + + "reset_preferences_button": { + "message": "重置", + "description": "Reset preferences button" + }, + + "about_title": { + "message": "关于 SysTray-X", + "description": "About box title" + }, + + "about_line_1": { + "message": "SysTray-X 配套应用,作者 Ximi1970", + "description": "Line 1" + }, + + "about_version": { + "message": "版本:", + "description": "Version" + }, + + "about_build": { + "message": "构建:", + "description": "Build" + }, + + "about_hash": { + "message": "Hash:", + "description": "Hash" + }, + + "about_branch": { + "message": "分支:", + "description": "Branch" + }, + + "debug_title": { + "message": "SysTray-X 调试", + "description": "Debug window title" + }, + + "debug_test_1": { + "message": "测试 1", + "description": "Button 1" + }, + + "debug_test_2": { + "message": "测试 2", + "description": "Button 2" + }, + + "debug_test_3": { + "message": "测试 3", + "description": "Button 3" + }, + + "debug_unread": { + "message": "未读邮件:", + "description": "Unread label" + }, + + "menu_showhide": { + "message": "显示 / 隐藏(&S)", + "description": "Show Hide menu entry" + }, + + "menu_preferences": { + "message": "首选项(&P)", + "description": "Preferences menu entry" + }, + + "menu_about": { + "message": "关于(&A)", + "description": "About menu entry" + }, + + "menu_quit": { + "message": "退出(&Q)", + "description": "Quit menu entry" + }, + + "menu_close": { + "message": "关闭", + "description": "Close button" + }, + + "mail_notification_icon": { + "message": "邮件提示图标", + "description": "Mail icon selection title" + }, + + "number_properties": { + "message": "数字属性", + "description": "Number properties title" + }, + + "image_open": { + "message": "打开图片", + "description": "File image dialog" + }, + + "image_files": { + "message": "图片文件(*.png *.jpg *.bmp)", + "description": "File image selection" + }, + + "image_save": { + "message": "保存", + "description": "File image save" + }, + + "image_cancel": { + "message": "取消", + "description": "File image cancel" + } +} diff --git a/webext/background.html b/webext/background.html index 4c357a7..caf8b87 100644 --- a/webext/background.html +++ b/webext/background.html @@ -8,7 +8,6 @@ -

Background

Background HTML

diff --git a/webext/background.js b/webext/background.js index e35fc3a..1299447 100644 --- a/webext/background.js +++ b/webext/background.js @@ -34,7 +34,6 @@ SysTrayX.Info = { SysTrayX.Messaging = { startupDelayFinished: false, accounts: [], - folderTree: {}, countType: "0", showNewIndicator: "false", closeType: "1", @@ -102,17 +101,8 @@ SysTrayX.Messaging = { browser.accounts.onDeleted.addListener(SysTrayX.Messaging.accountDeleted); } - // Get all accounts - SysTrayX.Messaging.accounts = await browser.accounts.list(false); - - // Fill the sub folders using the folders API, they are not same... - for (let i = 0; i < SysTrayX.Messaging.accounts.length; ++i) { - const subFolders = await browser.folders.getSubFolders( - SysTrayX.Messaging.accounts[i], - true - ); - SysTrayX.Messaging.accounts[i].folders = subFolders; - } + // Get the accounts and subfolders + SysTrayX.Messaging.accounts = await browser.accounts.list(); console.debug("Accounts: " + JSON.stringify(SysTrayX.Messaging.accounts)); @@ -318,26 +308,46 @@ SysTrayX.Messaging = { // Count the initial unread messages for (const filter of SysTrayX.Messaging.filters) { - for (const path of filter.folders) { - const folder = { - accountId: filter.accountId, - path: path, - }; - + const accountId = filter.accountId; + for (const storedFolder of filter.folders) { + let path; + let folderParam; + if (typeof(storedFolder) === "string") { + // Filters pre TB 121 + path = storedFolder; + folderParam = { + accountId: accountId, + path: storedFolder, + }; + } else { + // Filters TB 121 + if (storedFolder.mailFolderId === undefined) { + // TB 121 filter setup but older TB + path = storedFolder.path; + folderParam = { + accountId: accountId, + path: path, + }; + } else { + path = storedFolder.path; + folderParam = storedFolder.mailFolderId; + } + } + let mailFolderInfo = {}; try { - mailFolderInfo = await browser.folders.getFolderInfo(folder); + mailFolderInfo = await browser.folders.getFolderInfo(folderParam); } catch (err) { console.debug("Filter error: " + err); console.debug("Filter error: " + JSON.stringify(folder)); } - + if (mailFolderInfo.unreadMessageCount !== undefined) { - if (SysTrayX.Messaging.unread[folder.accountId] === undefined) { - SysTrayX.Messaging.unread[folder.accountId] = {}; + if (SysTrayX.Messaging.unread[accountId] === undefined) { + SysTrayX.Messaging.unread[accountId] = {}; } - SysTrayX.Messaging.unread[folder.accountId][folder.path] = + SysTrayX.Messaging.unread[accountId][path] = mailFolderInfo.unreadMessageCount; } } @@ -472,110 +482,6 @@ SysTrayX.Messaging = { } }, - // - // Callback for folder changes - // - updateFilters: function (rootFolder, parentFolder, folder, added) { - const oldFolders = SysTrayX.Messaging.folderTree[rootFolder]; - const oldPaths = getFolderPaths(oldFolders); - - browser.accounts.list().then( - (accounts) => { - this.updateFiltersCallback( - rootFolder, - parentFolder, - folder, - added, - oldFolders, - oldPaths, - accounts - ); - }, - () => console.log("Failed to get the accounts") - ); - }, - - updateFiltersCallback: async function ( - rootFolder, - parentFolder, - folder, - added, - oldFolders, - oldPaths, - accounts - ) { - // Get new folder tree - const folderTree = getFolderTree(accounts, SysTrayX.Info.browserInfo); - const newFolders = folderTree[rootFolder]; - const newPaths = getFolderPaths(newFolders); - const changes = findFolderPathsDiff(oldPaths, newPaths).filter((change) => - change.endsWith(parentFolder + "/" + folder) - ); - - if (changes.length === 1 && added) { - // Folder has beeen added - - const addedFolder = changes[0]; - - // Is parent selected? - const parentAddedFolder = addedFolder.substring( - 0, - addedFolder.lastIndexOf("/") - ); - - const parentSelected = findFolderPath( - SysTrayX.Messaging.filters, - parentAddedFolder - ); - - if (parentSelected) { - // Add the new folder to the filters - - const newFilter = { - ...parentSelected, - folder: { - ...parentSelected.folder, - path: changes[0], - name: changes[0].substring(changes[0].lastIndexOf("/") + 1), - }, - }; - - if ( - SysTrayX.Messaging.filters.filter( - (filter) => filter.folder.path === newFilter.folder.path - ).length === 0 - ) { - SysTrayX.Messaging.filters.push(newFilter); - - // Store the new filters - await storage().set({ - filters: SysTrayX.Messaging.filters, - }); - } - } - } else if (changes.length === 1 && !added) { - // Folder has been removed, remove also all children - - const filters = SysTrayX.Messaging.filters.filter( - (filter) => !filter.folder.path.startsWith(changes[0]) - ); - - if (filters.length !== SysTrayX.Messaging.filters.length) { - // Remove found filters (and children) from the filters - SysTrayX.Messaging.filters = filters; - - // Store the new filters - await storage().set({ - filters: SysTrayX.Messaging.filters, - }); - } - } - - // Store the new accounts and folder tree - SysTrayX.Messaging.accounts = accounts; - SysTrayX.Messaging.folderTree = folderTree; - }, - requestOptions: function () { SysTrayX.Link.postSysTrayXMessage({ optionsRequest: true }); }, @@ -629,6 +535,8 @@ SysTrayX.Messaging = { "minimizeIconType", "closeType", "startupType", + "windowPosCor", + "windowPosCorType", "restorePositions", "defaultIconType", "defaultIconMime", @@ -667,6 +575,8 @@ SysTrayX.Messaging = { const minimizeIconType = result.minimizeIconType || "1"; const closeType = result.closeType || "1"; const startupType = result.startupType || "0"; + const windowPosCor = result.windowPosCor || "false"; + const windowPosCorType = result.windowPosCorType || "0"; const restorePositions = result.restorePositions || "false"; const defaultIconType = result.defaultIconType || "0"; const defaultIconMime = result.defaultIconMime || "image/png"; @@ -706,6 +616,8 @@ SysTrayX.Messaging = { minimizeIconType, closeType, startupType, + windowPosCor, + windowPosCorType, restorePositions, defaultIconType, defaultIconMime, @@ -825,6 +737,20 @@ SysTrayX.Link = { }); } + const windowPosCor = response["preferences"].windowPosCor; + if (windowPosCor) { + await storage().set({ + windowPosCor: windowPosCor, + }); + } + + const windowPosCorType = response["preferences"].windowPosCorType; + if (windowPosCorType) { + await storage().set({ + windowPosCorType: windowPosCorType, + }); + } + const restorePositions = response["preferences"].restorePositions; if (restorePositions) { await storage().set({ diff --git a/webext/css/options.css b/webext/css/options.css index 85a78eb..c15c723 100644 --- a/webext/css/options.css +++ b/webext/css/options.css @@ -78,6 +78,7 @@ body { #minimizeiconselect, #closeselect, #startupselect, +#positionscorrectionselect, #defaulticonselect, #iconselect, #numberprops, diff --git a/webext/js/defaults.js b/webext/js/defaults.js index 7f0c3b0..263c884 100644 --- a/webext/js/defaults.js +++ b/webext/js/defaults.js @@ -219,11 +219,44 @@ async function getIcon() { } } + +// +// Find a path in the account folder tree +// +function findFolder(rootFolder, path) { + function traverse(folder) { + if (folder === undefined) { + return undefined; + } + + if (folder.path === path) { + return folder; + } + + if (folder.subFolders === undefined) { + return undefined; + } + + for (let sub of folder.subFolders) { + const found = traverse(sub); + if( found !== undefined ) { + return found; + } + } + + return undefined; + } + + const found = traverse(rootFolder); + + return found; +} + // // Get filters // async function getFilters() { - function resolve(result) { + async function resolve(result) { let filters = result.filters || undefined; if (filters === undefined || filters.length === 0) { @@ -234,19 +267,22 @@ async function getFilters() { filters = []; for (const account of SysTrayX.Messaging.accounts) { - const inbox = account.folders.filter( - (folder) => folder.type === "inbox" - ); + let inbox; + if (account.rootFolder !== undefined) { + inbox = account.rootFolder.subFolders.filter( + (folder) => folder.type === "inbox" + ); + } else { + inbox = account.folders.filter( + (folder) => folder.type === "inbox" + ); + } if (inbox.length > 0) { - let folder = {}; - - // console.debug("Folder 91+: " + JSON.stringify(inbox[0])); - filters.push({ accountId: inbox[0].accountId, version: SysTrayX.Info.version, - folders: [inbox[0].path], + folders: [{mailFolderId: inbox[0].id, path: inbox[0].path}], }); } } @@ -254,6 +290,109 @@ async function getFilters() { console.debug("Force new filters: " + JSON.stringify(filters)); } else { console.debug("Stored filters: " + JSON.stringify(filters)); + + if (filters[0].folders.length > 0) { + if (typeof(filters[0].folders[0]) === "string") { + + console.debug("Conversion needed"); + + // Convert the filter folder path list to an object + // containing at least the path and if available the mail folder id (TB 121 and newer) + + const newFilters = []; + for (const account of SysTrayX.Messaging.accounts) { + let rootFolder = account.rootFolder + if( rootFolder === undefined ) { + rootFolder = { + path: "", + subFolders: account.folders + }; + } + + const filter = filters.filter( + (filter) => filter.accountId === account.id + ); + + console.debug("Found filters: " + filter.length); + console.debug("Found filter: " + JSON.stringify(filter)); + + if (filter.length === 1) { + let newFilter = { + accountId: filter[0].accountId, + version: SysTrayX.Info.version, + folders: [] + }; + + for (const path of filter[0].folders) { + const accountFolder = findFolder(rootFolder, path); + + if (accountFolder !== undefined) + { + newFilter.folders.push({mailFolderId: accountFolder.id, path: accountFolder.path}); + } + } + + newFilters.push(newFilter); + } + } + + filters = newFilters; + + console.debug("Force new filters: " + JSON.stringify(filters)); + + // Save the new filters + await storage().set({ + filters: filters, + }); + } else { + if (filters[0].folders[0].mailFolderId === undefined && + SysTrayX.Info.browserInfo.majorVersion >= 121) { + + console.debug("Update needed"); + + // Update filter folder object + // with the the mail folder id + + const newFilters = []; + for (const account of SysTrayX.Messaging.accounts) { + const filter = filters.filter( + (filter) => filter.accountId === account.id + ); + + console.debug("Found filters: " + filter.length); + console.debug("Found filter: " + JSON.stringify(filter)); + + if (filter.length === 1) { + let newFilter = { + accountId: filter[0].accountId, + version: SysTrayX.Info.version, + folders: [] + }; + + for (const folder of filter[0].folders) { + const accountFolder = findFolder(account.rootFolder, folder.path) + + if (accountFolder !== undefined) + { + newFilter.folders.push({mailFolderId: accountFolder.id, path: accountFolder.path}); + } + } + + newFilters.push(newFilter); + } + } + + filters = newFilters; + + console.debug("Force new filters: " + JSON.stringify(filters)); + + // Save the new filters + await storage().set({ + filters: filters, + }); + } + } + } } return filters; @@ -328,11 +467,23 @@ function isFolderInFilters(folder) { ); if (accountIndex !== -1) { - return ( - SysTrayX.Messaging.filters[accountIndex].folders.filter( - (path) => path === folder.path - ).length > 0 - ); + const folders = SysTrayX.Messaging.filters[accountIndex].folders; + + if (folders[0] === "string") { + // Filters pre TB 121 + return ( + folders.filter( + (path) => path === folder.path + ).length > 0 + ); + } else { + // Filters TB 121 + return ( + folders.map(f => f.path).filter( + (path) => path === folder.path + ).length > 0 + ); + } } else { return false; } @@ -347,11 +498,23 @@ function isParentFolderInFilters(folder) { ); if (accountIndex !== -1) { - return ( - SysTrayX.Messaging.filters[accountIndex].folders.filter( - (path) => path === parentPath - ).length > 0 - ); + const folders = SysTrayX.Messaging.filters[accountIndex].folders; + + if (folders[0] === "string") { + // Filters pre TB 121 + return ( + folders.filter( + (path) => path === parentPath + ).length > 0 + ); + } else { + // Filters TB 121 + return ( + folders.map(f => f.path).filter( + (path) => path === parentPath + ).length > 0 + ); + } } else { return false; } @@ -365,7 +528,14 @@ async function deleteFolderFromFilters(folder) { if (accountIndex !== -1) { const account = SysTrayX.Messaging.filters[accountIndex]; - account.folders = account.folders.filter((path) => path !== folder.path); + + if (account.folders[0] === "string" ) { + // Filters pre TB 121 + account.folders = account.folders.filter((path) => path !== folder.path); + } else { + // Filters TB 121 + account.folders = account.folders.filter((f) => f.path !== folder.path); + } // Store the new filters await storage().set({ @@ -391,7 +561,12 @@ async function addFolderToFilters(newFolder) { if (accountIndex !== -1) { const account = SysTrayX.Messaging.filters[accountIndex]; - account.folders.push(newFolder.path); + + if (account.folders[0] === "string" ) { + account.folders.push(newFolder.path); + } else { + account.folders.push({mailFolderId: newFolder.id, path: newFolder.path}); + } // Store the new filter await storage().set({ @@ -403,42 +578,65 @@ async function addFolderToFilters(newFolder) { // Collect unread mail const collectUnreadMail = async () => { for (const filter of SysTrayX.Messaging.filters) { - for (const path of filter.folders) { - const folder = { - accountId: filter.accountId, - path: path, - }; - + + const accountId = filter.accountId; + for (const storedFolder of filter.folders) { let mailFolderInfo = {}; - try { - mailFolderInfo = await browser.folders.getFolderInfo(folder); - } catch (err) { - //console.debug("Filter error: " + err); - //console.debug("Filter error: " + JSON.stringify(folder)); - // Get all accounts - SysTrayX.Messaging.accounts = await browser.accounts.list(false); + let path; + if (typeof(storedFolder) === "string") { + // Filters pre TB 121 + path = storedFolder; - // Check the filters for the accounts - SysTrayX.Messaging.accountFilterCheck(); + try { + mailFolderInfo = await browser.folders.getFolderInfo({ + accountId: accountId, + path: storedFolder, + }); + } catch (err) { + //console.debug("Filter error: " + err); + //console.debug("Filter error: " + JSON.stringify(folder)); + + // Get all accounts + SysTrayX.Messaging.accounts = await browser.accounts.list(); + + // Check the filters for the accounts + SysTrayX.Messaging.accountFilterCheck(); + } + } else { + // Filters TB 121 + path = storedFolder.path; + + try { + mailFolderInfo = await browser.folders.getFolderInfo(storedFolder.mailFolderId); + } catch (err) { + //console.debug("Filter error: " + err); + //console.debug("Filter error: " + JSON.stringify(folder)); + + // Get all accounts + SysTrayX.Messaging.accounts = await browser.accounts.list(); + + // Check the filters for the accounts + SysTrayX.Messaging.accountFilterCheck(); + } } if (mailFolderInfo.unreadMessageCount !== undefined) { - if (SysTrayX.Messaging.unread[folder.accountId] === undefined) { - SysTrayX.Messaging.unread[folder.accountId] = {}; + if (SysTrayX.Messaging.unread[accountId] === undefined) { + SysTrayX.Messaging.unread[accountId] = {}; } - if (SysTrayX.Messaging.new[folder.accountId] === undefined) { - SysTrayX.Messaging.new[folder.accountId] = {}; + if (SysTrayX.Messaging.new[accountId] === undefined) { + SysTrayX.Messaging.new[accountId] = {}; } if ( - SysTrayX.Messaging.new[folder.accountId][folder.path] === undefined + SysTrayX.Messaging.new[accountId][path] === undefined ) { - SysTrayX.Messaging.new[folder.accountId][folder.path] = []; + SysTrayX.Messaging.new[accountId][path] = []; } - SysTrayX.Messaging.unread[folder.accountId][folder.path] = + SysTrayX.Messaging.unread[accountId][path] = mailFolderInfo.unreadMessageCount; } } @@ -457,7 +655,16 @@ const sendMailCountPre115 = () => { let newCount = 0; SysTrayX.Messaging.filters.forEach((filter) => { const accountId = filter.accountId; - filter.folders.forEach((path) => { + filter.folders.forEach((storedFolder) => { + let path; + if (typeof(storedFolder) === "string") { + // Filters pre TB 121 + path = storedFolder; + } else { + // Filters TB 121 + path = storedFolder.path; + } + if (SysTrayX.Messaging.unread[accountId] !== undefined) { if (SysTrayX.Messaging.unread[accountId][path] !== undefined) { unreadCount = unreadCount + SysTrayX.Messaging.unread[accountId][path]; @@ -495,37 +702,78 @@ const sendMailCount = async () => { // Get both unread and new message count - for (const filter of SysTrayX.Messaging.filters) { - for (const path of filter.folders) { - const folder = { - accountId: filter.accountId, - path: path, - }; - - async function* listMessages(folder) { - let page = await messenger.messages.list(folder); - for (let message of page.messages) { - yield message; + if (SysTrayX.Info.browserInfo.majorVersion < 121) { + for (const filter of SysTrayX.Messaging.filters) { + for (const storedFolder of filter.folders) { + let listParam; + if (typeof(storedFolder) === "string") { + // Filters pre TB 121 + listParam = { + accountId: filter.accountId, + path: storedFolder, + }; + } else { + // Filters TB 121 + listParam = { + accountId: filter.accountId, + path: storedFolder.path, + }; } - - while (page.id) { - page = await messenger.messages.continueList(page.id); + + async function* listMessages(listParam) { + let page = await messenger.messages.list(listParam); for (let message of page.messages) { yield message; } + + while (page.id) { + page = await messenger.messages.continueList(page.id); + for (let message of page.messages) { + yield message; + } + } + } + + let messages = listMessages(listParam); + for await (let message of messages) { + if( message.new ) + { + newCount = newCount + 1; + } + + if( !message.read ) + { + unreadCount = unreadCount + 1; + } } } - - let messages = listMessages(folder); - for await (let message of messages) { - if( message.new ) - { - newCount = newCount + 1; + } + } else { + + // Unread and new count TB 121 and newer + + for (const filter of SysTrayX.Messaging.filters) { + for (const folder of filter.folders) { + let mailFolderInfo = {}; + try { + mailFolderInfo = await browser.folders.getFolderInfo(folder.mailFolderId); + } catch (err) { + //console.debug("Filter error: " + err); + //console.debug("Filter error: " + JSON.stringify(folder)); + + // Get all accounts + SysTrayX.Messaging.accounts = await browser.accounts.list(); + + // Check the filters for the accounts + SysTrayX.Messaging.accountFilterCheck(); } - if( !message.read ) - { - unreadCount = unreadCount + 1; + if (mailFolderInfo.unreadMessageCount !== undefined) { + unreadCount = unreadCount + mailFolderInfo.unreadMessageCount; + } + + if (mailFolderInfo.newMessageCount !== undefined) { + newCount = newCount + mailFolderInfo.newMessageCount; } } } @@ -535,11 +783,18 @@ const sendMailCount = async () => { // Only unread count for (const filter of SysTrayX.Messaging.filters) { - for (const path of filter.folders) { - const folder = { - accountId: filter.accountId, - path: path, - }; + for (const storedFolder of filter.folders) { + let folderParam; + if (typeof(storedFolder) === "string") { + // Filters pre TB 121 + folderParam = { + accountId: filter.accountId, + path: storedFolder, + }; + } else { + // Filters TB 121 + folderParam = storedFolder.mailFolderId; + } let mailFolderInfo = {}; try { @@ -549,7 +804,7 @@ const sendMailCount = async () => { //console.debug("Filter error: " + JSON.stringify(folder)); // Get all accounts - SysTrayX.Messaging.accounts = await browser.accounts.list(false); + SysTrayX.Messaging.accounts = await browser.accounts.list(); // Check the filters for the accounts SysTrayX.Messaging.accountFilterCheck(); diff --git a/webext/js/folderTree.js b/webext/js/folderTree.js deleted file mode 100644 index 676795a..0000000 --- a/webext/js/folderTree.js +++ /dev/null @@ -1,124 +0,0 @@ -// -// Create folder tree from accounts -// -function getFolderTree(mailAccounts, browserInfo) { - function traverse(accountName, path, folders) { - if (!folders) { - return; - } - for (let f of folders) { - f.accountName = accountName; - f.path = path + "/" + f.name; - traverse(accountName, path + "/" + f.name, f.subFolders); - } - } - - function createFolderTree(accountName, folders) { - traverse(accountName, "", folders); - return folders; - } - - let accounts = new Object(); - - for (let i = 0; i < mailAccounts.length; i++) { - if (false) { - console.debug("Accounts id: " + mailAccounts[i].id); - console.debug("Accounts name: " + mailAccounts[i].name); - console.debug("Accounts type: " + mailAccounts[i].type); - for (let j = 0; j < mailAccounts[i].folders.length; j++) { - console.debug( - "Accounts folder path: " + mailAccounts[i].folders[j].path - ); - console.debug( - "Accounts folder name: " + mailAccounts[i].folders[j].name - ); - console.debug( - "Accounts folder type: " + mailAccounts[i].folders[j].type - ); - } - } - - if (!accounts[mailAccounts[i].type]) { - accounts[mailAccounts[i].type] = []; - } - accounts[mailAccounts[i].type].push({ - id: mailAccounts[i].id, - name: mailAccounts[i].name, - folders: mailAccounts[i].folders, - }); - } - - /* - * Build tree - */ - let folderTree = {}; - for (let prop in accounts) { - if (accounts[prop]) { - for (let i = 0; i < accounts[prop].length; ++i) { - // Create a usable folder tree - const folders = createFolderTree( - accounts[prop][i].name, - accounts[prop][i].folders - ); - - // Store the tree - folderTree[accounts[prop][i].name] = folders; - } - } - } - - return folderTree; -} - -// -// Create a paths array from the folder tree -// -function getFolderPaths(folders) { - function traverse(folders) { - if (!folders) { - return; - } - for (let f of folders) { - paths.push(f.path); - traverse(f.subFolders); - } - } - - let paths = []; - traverse(folders); - - return paths; -} - -// -// Find the difference between two path arrays -// -function findFolderPathsDiff(paths1, paths2) { - let diff = []; - - paths1.forEach((path) => { - if (paths2.includes(path) === false) { - diff.push(path); - } - }); - - paths2.forEach((path) => { - if (paths1.includes(path) === false) { - diff.push(path); - } - }); - - return diff; -} - -// -// Is the path in the filter folder list? -// -function findFolderPath(filters, path) { - for (const filter of filters) { - if (filter.folder.path === path) { - return filter; - } - } - return undefined; -} diff --git a/webext/js/options_accounts.js b/webext/js/options_accounts.js index 818fa48..ee55539 100644 --- a/webext/js/options_accounts.js +++ b/webext/js/options_accounts.js @@ -8,20 +8,34 @@ SysTrayX.Accounts = { }, getAccounts: async function () { - let accounts; + if (SysTrayX.Info.browserInfo.majorVersion < 121) { + let accounts; - accounts = await browser.accounts.list(false); + accounts = await browser.accounts.list(false); - // Fill the sub folders using the folders API, they are not same... - for (let i = 0; i < accounts.length; ++i) { - const subFolders = await browser.folders.getSubFolders( - accounts[i], - true - ); - accounts[i].folders = subFolders; + // Fill the sub folders using the folders API, they are not same... + for (let i = 0; i < accounts.length; ++i) { + const subFolders = await browser.folders.getSubFolders( + accounts[i], + true + ); + accounts[i].folders = subFolders; + } + + return accounts; + } else { + let accounts = await browser.accounts.list(); + + for (let i = 0; i < accounts.length; ++i) { + const subFolders = await browser.folders.getSubFolders( + accounts[i].id, + true + ); + accounts[i].folders = subFolders; + } + + return accounts; } - - return accounts; }, buildTree: function (mailAccount) { @@ -36,7 +50,7 @@ SysTrayX.Accounts = { } } - traverse("", folders); + traverse(folders); return folders; } @@ -150,6 +164,7 @@ SysTrayX.Accounts = { JSON.stringify({ accountName: element.accountName, accountId: element.accountId, + mailFolderId: element.id, type: element.type !== undefined ? element.type : "", path: element.path, name: element.originalName diff --git a/webext/js/windowEvent.js b/webext/js/windowEvent.js index 47c3de7..e2393a2 100644 --- a/webext/js/windowEvent.js +++ b/webext/js/windowEvent.js @@ -9,11 +9,12 @@ var { ExtensionCommon } = ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm"); // You probably already know what this does. - var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); +// var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); // A helpful class for listening to windows opening and closing. var { ExtensionSupport } = ChromeUtils.import("resource:///modules/ExtensionSupport.jsm"); + /** * This object is just what we're using to listen for toolbar clicks. The implementation * isn't what this example is about, but you might be interested as it's a common pattern. diff --git a/webext/manifest.json b/webext/manifest.json index dfe72f3..35fa08a 100644 --- a/webext/manifest.json +++ b/webext/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "__MSG_extension_name__", "description": "__MSG_extension_description__", - "version": "0.9.8", + "version": "0.9.9", "author": "Maxime Rijnders", "homepage_url": "https://github.com/Ximi1970/systray-x", @@ -10,7 +10,7 @@ "gecko": { "id": "systray-x@Ximi1970", "strict_min_version": "91.0", - "strict_max_version": "120.*" + "strict_max_version": "128.*" } }, diff --git a/webext/options.html b/webext/options.html index 4b620f0..6b51149 100644 --- a/webext/options.html +++ b/webext/options.html @@ -188,6 +188,63 @@ + + + + + + + + + + + + + + +
+ __MSG_windows_positions_correction_options__ +
+ + +
+ + +
+ + +
+ + +
+
{ const mailFolderExt = JSON.parse(folder.value); - filters[filters.length - 1].folders.push(mailFolderExt.path); + filters[filters.length - 1].folders.push({ + mailFolderId: mailFolderExt.mailFolderId, path: mailFolderExt.path}); }); } } @@ -106,6 +107,26 @@ SysTrayX.SaveOptions = { startupType: startupType, }); + // + // Save window positions correction state + // + const windowPosCor = document.querySelector( + 'input[name="positionsCorrection"]' + ).checked; + await storage().set({ + windowPosCor: `${windowPosCor}`, + }); + + // + // Save window positions correction preferences + // + const windowPosCorType = document.querySelector( + 'input[name="positionsCorrectionType"]:checked' + ).value; + await storage().set({ + windowPosCorType: windowPosCorType, + }); + // // Save restore window positions state // @@ -415,6 +436,26 @@ SysTrayX.RestoreOptions = { SysTrayX.RestoreOptions.onStartupTypeError ); + // + // Restore window positions correction state + // + await storage() + .get("windowPosCor") + .then( + SysTrayX.RestoreOptions.setWindowPosCor, + SysTrayX.RestoreOptions.onWindowPosCorError + ); + + // + // Restore window positions correction type + // + await storage() + .get("windowPosCorType") + .then( + SysTrayX.RestoreOptions.setWindowPosCorType, + SysTrayX.RestoreOptions.onWindowPosCorTypeError + ); + // // Restore restore position state // @@ -741,7 +782,37 @@ SysTrayX.RestoreOptions = { }, onStartupTypeError: function (error) { - console.log(`startupType Error: ${error}`); + console.log(`StartupType Error: ${error}`); + }, + + // + // Restore window positions correction state callbacks + // + setWindowPosCor: function (result) { + const windowPosCor = result.windowPosCor || "false"; + + const checkbox = document.querySelector(`input[name="positionsCorrection"]`); + checkbox.checked = windowPosCor === "true"; + }, + + onWindowPosCorError: function (error) { + console.log(`WindowPosCor Error: ${error}`); + }, + + // + // Restore start minimized callbacks + // + setWindowPosCorType: function (result) { + const windowPosCorType = result.windowPosCorType || "0"; + + const radioButton = document.querySelector( + `input[name="positionsCorrectionType"][value="${windowPosCorType}"]` + ); + radioButton.checked = true; + }, + + onWindowPosCorTypeError: function (error) { + console.log(`WindowPosCorType Error: ${error}`); }, // @@ -1232,7 +1303,16 @@ SysTrayX.RestoreOptions = { ) ); - filter.folders.forEach((path) => { + filter.folders.forEach((storedFolder) => { + + if (typeof(storedFolder) === "string") { + // Filters pre TB 121 + path = storedFolder; + } else { + // Filters TB 121 + path = storedFolder.path; + } + checkboxes.forEach((checkbox) => { const value = JSON.parse(checkbox.value); if (value.path === path) { @@ -1305,6 +1385,16 @@ SysTrayX.StorageChanged = { startupType: changes[item].newValue, }); } + if (item === "windowPosCor") { + SysTrayX.RestoreOptions.setWindowPosCor({ + windowPosCor: changes[item].newValue, + }); + } + if (item === "windowPosCorType") { + SysTrayX.RestoreOptions.setWindowPosCorType({ + windowPosCorType: changes[item].newValue, + }); + } if (item === "restorePositions") { SysTrayX.RestoreOptions.setRestorePositions({ restorePositions: changes[item].newValue, @@ -1525,6 +1615,10 @@ async function start() { document.getElementById("kdeintegration").style.display = "none"; } + if ( SysTrayX.Info.platformInfo.os !== "linux" ) { + document.getElementById("positionscorrectionselect").style.display = "none"; + } + // Enable save button document .querySelector('[name="saveform"]') @@ -1538,8 +1632,8 @@ async function start() { browser.storage.onChanged.addListener(SysTrayX.StorageChanged.changed); document.addEventListener("visibilitychange", function () { - if (document.visibilityState === "hidden") { - browser.storage.onChanged.removeListener(SysTrayX.StorageChanged.changed); + if ( browser.storage.onChanged.hasListener(SysTrayX.StorageChanged.changed) ) { + browser.storage.onChanged.removeListener(SysTrayX.StorageChanged.changed); } }); }