Compare commits
487 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6466b3604f | ||
|
|
93726ee571 | ||
|
|
0146c29419 | ||
|
|
e54977c340 | ||
|
|
5b3bc51990 | ||
|
|
7b365a1f14 | ||
|
|
e4fdedaf33 | ||
|
|
848239572d | ||
|
|
e1d9e85945 | ||
|
|
42a7c320d9 | ||
|
|
d03b5a84d0 | ||
|
|
1e6b2db303 | ||
|
|
a6785e9b7c | ||
|
|
c25ed66c0c | ||
|
|
4df0d961e6 | ||
|
|
aea5e70748 | ||
|
|
e9136182c9 | ||
|
|
86288068fa | ||
|
|
331bec30c8 | ||
|
|
7cae2d7586 | ||
|
|
1b202a25f8 | ||
|
|
fae056ec81 | ||
|
|
9dcf3ed14d | ||
|
|
f19e55220e | ||
|
|
6938c1f833 | ||
|
|
7208096fdc | ||
|
|
c4a9677667 | ||
|
|
0993cda3a0 | ||
|
|
8bed4c0e46 | ||
|
|
9fdd1a5e89 | ||
|
|
1cb421c284 | ||
|
|
20c2472aa1 | ||
|
|
dcb99d28ec | ||
|
|
d7e103388a | ||
|
|
1ec036202b | ||
|
|
a783507d60 | ||
|
|
b2c82af9f4 | ||
|
|
aaf1e5f6d6 | ||
|
|
197398e3bc | ||
|
|
38308ac0d0 | ||
|
|
e0e97795f3 | ||
|
|
0b02c78704 | ||
|
|
c7f101f67f | ||
|
|
ee70dc46a2 | ||
|
|
aafa8522ea | ||
|
|
b9b4913bbc | ||
|
|
cdc2013cbb | ||
|
|
04adf88088 | ||
|
|
a1d064fbe0 | ||
|
|
150763f0e3 | ||
|
|
c3afa378d1 | ||
|
|
70b8bc97ae | ||
|
|
256e862382 | ||
|
|
569e5fe133 | ||
|
|
0d7dd83354 | ||
|
|
241ae97423 | ||
|
|
11867b1ee6 | ||
|
|
603c477ef0 | ||
|
|
be52ee78a7 | ||
|
|
840aef9bb9 | ||
|
|
dfeb189940 | ||
|
|
07161db266 | ||
|
|
77f6ea88aa | ||
|
|
139950ab25 | ||
|
|
c22834118c | ||
|
|
e156b543f5 | ||
|
|
4d3278567b | ||
|
|
ce66ccbf03 | ||
|
|
f83f596ce8 | ||
|
|
9c047a024c | ||
|
|
d4a32751f3 | ||
|
|
ab9f709dc2 | ||
|
|
bcb2217f49 | ||
|
|
dce264509f | ||
|
|
927f208f78 | ||
|
|
93b42b40d4 | ||
|
|
3184a4b17e | ||
|
|
18b4d36f85 | ||
|
|
4c7f7e2b09 | ||
|
|
faa80775a5 | ||
|
|
7ab4e7fce5 | ||
|
|
cc105bf2e1 | ||
|
|
367e8ad750 | ||
|
|
6892f5f3c1 | ||
|
|
b23353a1f5 | ||
|
|
9986b1a2cb | ||
|
|
4d67fa44e4 | ||
|
|
993b95420f | ||
|
|
f4462b9379 | ||
|
|
c43d148dd7 | ||
|
|
a508fb7b11 | ||
|
|
6590909116 | ||
|
|
44df329672 | ||
|
|
96896f8a87 | ||
|
|
448c620c8a | ||
|
|
2ec8dbde08 | ||
|
|
48fc54d24b | ||
|
|
79dd707276 | ||
|
|
b1a6fb069c | ||
|
|
fb46f9acaa | ||
|
|
c86d07aac7 | ||
|
|
c1f24851ea | ||
|
|
771b7894ba | ||
|
|
aed9f6e27c | ||
|
|
f481213f69 | ||
|
|
ab61b62e6d | ||
|
|
dfb20233f8 | ||
|
|
9c7ed8cfaf | ||
|
|
3f25b41b31 | ||
|
|
3283bec5a5 | ||
|
|
ec61b6d688 | ||
|
|
b61d4601e2 | ||
|
|
938c2403e0 | ||
|
|
8f13832c20 | ||
|
|
2f2709faf1 | ||
|
|
c3fd32dc41 | ||
|
|
72287b3b88 | ||
|
|
4efd887252 | ||
|
|
ab08faaa5b | ||
|
|
6ca2083e03 | ||
|
|
2fb3fdc98f | ||
|
|
3853ca6ebd | ||
|
|
da166f3f12 | ||
|
|
caec196c2e | ||
|
|
190a7212eb | ||
|
|
3d14a55613 | ||
|
|
944b792fb6 | ||
|
|
35e7f07dda | ||
|
|
011e7f0ab3 | ||
|
|
0619e7abef | ||
|
|
5afd387086 | ||
|
|
9f8ca68053 | ||
|
|
6ef685235e | ||
|
|
71451bc6b2 | ||
|
|
981c27d5db | ||
|
|
d98b35416f | ||
|
|
036ad9fa9e | ||
|
|
742c0c9450 | ||
|
|
5e2bc3d28d | ||
|
|
aa79b18143 | ||
|
|
8b42b92441 | ||
|
|
ea20c392fe | ||
|
|
4fe3873793 | ||
|
|
d984e110cb | ||
|
|
307d00c930 | ||
|
|
ded9985f1d | ||
|
|
1737c189d6 | ||
|
|
fef6647228 | ||
|
|
22d8dbeb7b | ||
|
|
11f0244c14 | ||
|
|
e92ae9e2ad | ||
|
|
da22dd0494 | ||
|
|
da78109d95 | ||
|
|
cb75753731 | ||
|
|
a2ef33a2c9 | ||
|
|
9e78ec4399 | ||
|
|
9fd06ba0a6 | ||
|
|
ef303c9cbe | ||
|
|
5b95de1dc8 | ||
|
|
7ea04ad750 | ||
|
|
886b111b78 | ||
|
|
bbd78805bf | ||
|
|
a09e782ead | ||
|
|
10b51b1416 | ||
|
|
429bd605d4 | ||
|
|
a12054032a | ||
|
|
dcc00671ee | ||
|
|
49555c98ba | ||
|
|
94f489a0b1 | ||
|
|
91e00c84d2 | ||
|
|
1e3b31cc1c | ||
|
|
483064a956 | ||
|
|
8a3731b072 | ||
|
|
ebf4ad9df9 | ||
|
|
8aa2abe5ff | ||
|
|
ddd97fd5ba | ||
|
|
fe5df3e8a2 | ||
|
|
5bb8de6b6e | ||
|
|
3408bebc0c | ||
|
|
56641548d9 | ||
|
|
973fb2a473 | ||
|
|
fe4c704892 | ||
|
|
cb7b571dcc | ||
|
|
4afdd15784 | ||
|
|
53ea9fc062 | ||
|
|
e3d37d6f3d | ||
|
|
db9d26f858 | ||
|
|
e9c98087bc | ||
|
|
dff5d0ea9f | ||
|
|
6e7e3c6f4c | ||
|
|
bc44fa3d78 | ||
|
|
5cb760d1dc | ||
|
|
1ff9761e13 | ||
|
|
5d08cb59d6 | ||
|
|
33bdea2850 | ||
|
|
9887f40a08 | ||
|
|
8751898bd0 | ||
|
5af7cd8abc
|
|||
|
|
1dbebc4ccc | ||
|
|
cf0122f936 | ||
|
|
05a1d28850 | ||
|
|
99bc556cf3 | ||
|
|
8c508c91c8 | ||
|
|
e0708b73b6 | ||
|
|
aad8ac342e | ||
|
|
435f0281e5 | ||
|
|
a081ac2bfd | ||
|
|
d0fbc89b9e | ||
|
|
eebfa41342 | ||
|
|
a974769a4c | ||
|
|
69e85dddd2 | ||
|
|
4f6101f1af | ||
|
|
644c5a3d78 | ||
|
|
cd32995a81 | ||
|
|
64e72f06c9 | ||
|
|
9037688da5 | ||
|
|
8f9647e58f | ||
|
|
039824122b | ||
|
|
59c785f364 | ||
|
|
f79da34b3e | ||
|
|
b2e6dfc8a2 | ||
|
|
3397776586 | ||
|
|
d308c470eb | ||
|
|
a07a3a9b38 | ||
|
|
71759c8f7e | ||
|
|
b4301d72cc | ||
|
|
27f5df6aef | ||
|
|
0cddcd876d | ||
|
|
8a9465738d | ||
|
|
1416d16f49 | ||
|
|
d99839e7e9 | ||
|
|
2521696214 | ||
|
|
24a1423de0 | ||
|
|
6d97331ff2 | ||
|
|
f60d7d971e | ||
|
|
d8a1722d2a | ||
|
|
9085b6ca56 | ||
|
|
bebc5d1276 | ||
|
|
bbccd59fed | ||
|
|
1335406977 | ||
|
|
e7f783cc52 | ||
|
|
a4d718b8b7 | ||
|
|
1fa610f194 | ||
|
|
f59315cd60 | ||
|
|
712a43f39e | ||
|
|
7e3c26adbf | ||
|
|
030efb79b5 | ||
|
|
43b7e86f84 | ||
|
|
f403fd7f9a | ||
|
|
dfb0062aa0 | ||
|
|
455ae4853f | ||
|
|
8d7e4eac39 | ||
|
|
71dcb5fdcb | ||
|
|
7fdabbe9ef | ||
|
|
630f4efd17 | ||
|
|
4b12c8b06f | ||
|
|
c5f1e9694d | ||
|
|
cbd43ab731 | ||
|
|
1166691c37 | ||
|
|
e98fec0fb9 | ||
|
|
d0a30a9eca | ||
|
|
a92868cbb3 | ||
|
|
db36d56be9 | ||
|
|
2db10e3b4b | ||
|
|
3e3acfde39 | ||
|
|
a994beb935 | ||
|
|
144a8ca86e | ||
|
|
462bfec623 | ||
|
|
0a47127c71 | ||
|
|
ba9a934c7c | ||
|
|
d726e53976 | ||
|
|
06c42e047e | ||
|
|
5abd25ff76 | ||
|
|
15f33ee87c | ||
|
|
8b4db5bbd3 | ||
|
|
a4687d1a95 | ||
|
|
1a44290006 | ||
|
|
d16f189c72 | ||
|
|
3ce25e63c5 | ||
|
|
029ecfbedf | ||
|
|
1b8d9aca43 | ||
|
|
00b40f1a87 | ||
|
|
fd0307f033 | ||
|
|
0e9e3be096 | ||
|
|
18ed4434b0 | ||
|
|
3b03f26086 | ||
|
|
f73ff0c5ea | ||
|
|
b2507b5b74 | ||
|
|
31d1fd5896 | ||
|
|
96c29a1304 | ||
|
|
849bd94007 | ||
|
|
8ae9a89e88 | ||
|
|
4fd04ad81c | ||
|
|
8e9fe4a3c7 | ||
|
|
27d35b4ff3 | ||
|
|
242d1eae2f | ||
|
|
7ff4a64039 | ||
|
|
62127f516f | ||
|
|
2b7eead911 | ||
|
|
45edde8688 | ||
|
|
e238e4cdd0 | ||
|
|
aa86dff054 | ||
|
|
e5c7c85c81 | ||
|
|
040730e9a4 | ||
|
|
76a4ac7874 | ||
|
|
44a14d8eb1 | ||
|
|
d6db207676 | ||
|
|
6dd83e5e53 | ||
|
|
f0ee8c6e03 | ||
|
|
91eff99690 | ||
|
|
7cd3f9b96a | ||
|
|
ce98289abd | ||
|
|
d3a6e85c68 | ||
|
|
74b4a79974 | ||
|
|
79f5d61972 | ||
|
|
b974aff871 | ||
|
|
31980010af | ||
|
|
6fd963066f | ||
|
|
f5b16db539 | ||
|
|
cc27dcadec | ||
|
|
5170d1658c | ||
|
|
d2ea008331 | ||
|
|
06cbf74d32 | ||
|
|
d7330ed2f0 | ||
|
|
29525448bc | ||
|
|
52ba603816 | ||
|
|
173d7f08ef | ||
|
|
733b4abdb5 | ||
|
|
7572eb55f2 | ||
|
|
97d9f23d5a | ||
|
|
c4feb158a8 | ||
|
|
539b708460 | ||
|
|
6e0ba4db3b | ||
|
|
a8628f05d8 | ||
|
|
05eda76963 | ||
|
|
0df51acc45 | ||
|
|
0d8fbdfa18 | ||
|
|
09e654469f | ||
|
|
b24e82c0ca | ||
|
|
fbc98fcf92 | ||
|
|
7bd9c32887 | ||
|
|
d8ce53ef5c | ||
|
|
0fe112410c | ||
|
|
7bb69677ab | ||
|
|
33b937e082 | ||
|
|
25de491e20 | ||
|
|
22a0fcbb90 | ||
|
|
f063177f2c | ||
|
|
794c27c4c9 | ||
|
|
f5b9270bbd | ||
|
|
7c35dfd845 | ||
|
|
c87555e0be | ||
|
|
f483aa60f7 | ||
|
|
fe6dee7723 | ||
|
|
bfc98aebdb | ||
|
|
baa7259340 | ||
|
|
1c59c599c7 | ||
|
|
8f1ca44eb2 | ||
|
|
1dffe7e231 | ||
|
|
1998da1cf0 | ||
|
|
085e9be8ae | ||
|
|
c0ffbf1422 | ||
|
|
900d49c227 | ||
|
|
8bb9ebc512 | ||
|
|
3f47c2127c | ||
|
|
f0a7fef072 | ||
|
|
16fd585d2e | ||
|
|
5469925a40 | ||
|
|
c9f21b2d5c | ||
|
|
d6a6ecc504 | ||
|
|
c900d85241 | ||
|
|
80508a3df4 | ||
|
|
f98f74447b | ||
|
|
2909208e97 | ||
|
|
30b938cc17 | ||
|
|
a63d970ae3 | ||
|
|
622c041e3b | ||
|
|
a96ad4190b | ||
|
|
c503c6cce0 | ||
|
|
1234d31bc6 | ||
|
|
46ac37fc4a | ||
|
|
c4739bd5c9 | ||
|
|
ac0ee5df2f | ||
|
|
3f5594e143 | ||
|
|
224665bf29 | ||
|
|
ac2990ab15 | ||
|
|
84ebf2d239 | ||
|
|
d4289dc66b | ||
|
|
d0bed2979a | ||
|
|
d128b0e8ac | ||
|
|
698423dba9 | ||
|
|
2ee7414b0e | ||
|
|
b49b52a26a | ||
|
|
f147678491 | ||
|
|
5b8dfb0388 | ||
|
|
50e1c6bb85 | ||
|
|
4805a95ff8 | ||
|
|
c5688495c0 | ||
|
|
400c4750fd | ||
|
|
ab8af8bc6e | ||
|
|
bb06f38da9 | ||
|
|
7f15a34bc9 | ||
|
|
8e9e0d05e9 | ||
|
|
a85d8af58f | ||
|
|
241f9e7241 | ||
|
|
b5fda06f3e | ||
|
|
ded5f7313a | ||
|
|
cda6193af7 | ||
|
|
d23117a714 | ||
|
|
226d0425c4 | ||
|
|
70d6220f4e | ||
|
|
a6349334a1 | ||
|
|
9f228d393a | ||
|
|
8599400779 | ||
|
|
eef29fb556 | ||
|
|
773caf0e0c | ||
|
|
70f1445df5 | ||
|
|
d35f3759a9 | ||
|
|
590c4143e1 | ||
|
|
42e8e4ed2b | ||
|
|
6563139418 | ||
|
|
6209e80e4c | ||
|
|
5e1e70666e | ||
|
|
4c93c474ff | ||
|
|
e5ef5085e5 | ||
|
|
3b94072502 | ||
|
|
535c70e695 | ||
|
|
0d1a835f66 | ||
|
|
36f5c818d1 | ||
|
|
e8794007d6 | ||
|
|
033b327ee6 | ||
|
|
9258b3a252 | ||
|
|
beb8d45dac | ||
|
|
34d38280ff | ||
|
|
e553367f22 | ||
|
|
a7cf805cda | ||
|
|
fd1b3516f4 | ||
|
|
6e05037eb9 | ||
|
|
5845f49b79 | ||
|
|
d7c2d23dfa | ||
|
|
6bebce8693 | ||
|
|
483bdf85e1 | ||
|
|
4ae0c6f436 | ||
|
|
3da5a4eac5 | ||
|
|
83087072c2 | ||
|
|
268dea6272 | ||
|
|
b966faa0dd | ||
|
|
2f96f12386 | ||
|
|
3e50690e0c | ||
|
|
c53774609b | ||
|
|
e3f626da8f | ||
|
|
ce1821f8dd | ||
|
|
ecc737d336 | ||
|
|
e553a4f045 | ||
|
|
cfb04970a8 | ||
|
|
bd7d92d18b | ||
|
|
cc9811b6de | ||
|
|
746bb9d7da | ||
|
|
a3f84b1573 | ||
|
|
7a63e3fc2f | ||
|
|
885ec83b23 | ||
|
|
91fdfc8c47 | ||
|
|
aa71f64d95 | ||
|
|
188f71b46b | ||
|
|
9825be81b4 | ||
|
|
20f4eb2810 | ||
|
|
79a7f4f698 | ||
|
|
039f98130d | ||
|
|
c780060214 | ||
|
|
a34ba69c24 | ||
|
|
af881e7912 | ||
|
|
93f3c74a59 | ||
|
|
db058e35f5 | ||
|
|
d1347b1820 | ||
|
|
33ceb0178f | ||
|
|
baeb542b38 | ||
|
|
fd787a74fc | ||
|
|
e60c516177 | ||
|
|
b32e94e0ce | ||
|
|
67f6692a48 | ||
|
|
0ad770c83e | ||
|
|
05a891b2a6 | ||
|
|
a1ed637f31 | ||
|
|
8ae7a0fd8f | ||
|
|
42064d75df | ||
|
|
064cb3ded3 | ||
|
|
5d36b8a957 |
12
.gitignore
vendored
@@ -1,17 +1,28 @@
|
||||
*.user
|
||||
.qmake.stash
|
||||
.qtc_clangd/**
|
||||
Makefile
|
||||
bin/**
|
||||
build/**
|
||||
build_dir/**
|
||||
helper/*.o
|
||||
helper/.qtc_clangd/**
|
||||
helper/moc*.*
|
||||
helper/octphelper
|
||||
cachecleaner/bin/**
|
||||
cachecleaner/build/**
|
||||
cachecleaner/.qtc_clangd/**
|
||||
notifier/bin/**
|
||||
notifier/build/**
|
||||
notifier/.qtc_clangd/**
|
||||
notifier/.qtc/**
|
||||
notifier/.cmake/**
|
||||
notifier/CMakeCache*
|
||||
notifier/CMakeFiles*
|
||||
notifier/qtcsettings.cmake
|
||||
octopi.pro.user
|
||||
qrc_resources.cpp
|
||||
repoeditor/.qtc_clangd/**
|
||||
repoeditor/bin/**
|
||||
repoeditor/build/**
|
||||
sudo/*.o
|
||||
@@ -19,3 +30,4 @@ sudo/moc*.*
|
||||
sudo/octopi-sudo
|
||||
sudo/qrc*.cpp
|
||||
sudo/ui_pass*.h
|
||||
sudo/.qtc_clangd
|
||||
|
||||
12
.tx/config
@@ -1,9 +1,11 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[octopi.octopi]
|
||||
file_filter = resources/translations/octopi_<lang>.ts
|
||||
source_file = resources/translations/octopi_en.ts
|
||||
source_lang = en
|
||||
type = QT
|
||||
[o:arnt:p:octopi:r:octopi]
|
||||
file_filter = resources/translations/octopi_<lang>.ts
|
||||
source_file = resources/translations/octopi_en.ts
|
||||
source_lang = en
|
||||
type = QT
|
||||
replace_edited_strings = false
|
||||
keep_translations = false
|
||||
|
||||
|
||||
222
CHANGELOG
@@ -1,4 +1,164 @@
|
||||
0.10.0
|
||||
0.18.0 (2025-09-20)
|
||||
BugFix: The act of moving the mouse over the package list was triggering many
|
||||
"pacman -Si" executions (thanks to RAZUMNO).
|
||||
BugFix: Notifier did not fetch updates for the first time when using "once a day".
|
||||
BugFix: qt-sudo now respects user locale settings (thanks to D10RUS).
|
||||
BugFix: Use better way to detect if user is running the tools from the right place.
|
||||
BugFix: Select Help tab when Octopi runs for the first time.
|
||||
BugFix: Make Actions tab visible when a package is selected for insertion/removal.
|
||||
BugFix: Use system theme folder icon in Files tab.
|
||||
BugFix: Package list refresh was not running after a group install/removal.
|
||||
BugFix: ILoveCandy option was not working 100% in parser.
|
||||
Search option selected by the user is saved on close.
|
||||
Added support for garuda-update command when running in Garuda Linux.
|
||||
Added support for a user specified backup shell script that needs to be placed at
|
||||
"/usr/lib/octopi/pre-system-upgrade.sh" and executes before the system upgrades.
|
||||
Added support for pacman.conf's IgnorePkg option through "Add to Ignored" and
|
||||
"Remove from Ignored" actions from the context menu in the package list.
|
||||
Added View/Ignored menu option.
|
||||
Added support for Plus and Minus keys to add and remove packages from the system.
|
||||
Added "Get Latest distro news" menu item to the News tab context menu.
|
||||
Added Apply and Cancel buttons also in the Actions tab.
|
||||
Added "Enable package tooltips" option, so users can disable the feature when needed.
|
||||
Added "Force use of BASH shell" option to ensure compatibility when the user
|
||||
uses another SHELL.
|
||||
Added Tools/pacman-key option to refresh pacman gpg keys.
|
||||
Modernization of Options dialog.
|
||||
Updated translations.
|
||||
|
||||
0.17.0 (2025-02-18)
|
||||
BugFix: Code for EndeavourOS news was incomplete (thanks to LegitGreenBoi).
|
||||
BugFix: Help msg for newer packages was wrong because they're not installed.
|
||||
Prefer Bash shell (/usr/bin/bash) when executing package commands.
|
||||
Added "--editmenu" checkbox on Options dialog if you are using Yay tool.
|
||||
Added option to always use the terminal when executing pacman actions.
|
||||
Play a bell sound when the Terminal tab is asking for the user password.
|
||||
Improvement: Let user choose which domain is pinged when checking for internet access
|
||||
(if ping.archlinux.org is down).
|
||||
Improvement: Show a "Collecting transaction data..." msg before presenting the transaction
|
||||
dialog, as it can be quite slow on some systems (thanks to Valdir).
|
||||
Updated translations.
|
||||
|
||||
0.16.2 (2024-06-17)
|
||||
BugFix: Increased width of Terminal tab labels on Options dialog.
|
||||
BugFix: Removed a debug msg when octopi was not being executed with "-d".
|
||||
Updated translations.
|
||||
|
||||
0.16.1 (2024-06-09)
|
||||
BugFix: Updated some LANG environment variables to C.UTF-8.
|
||||
BugFix: Info/Files tabs were always empty if they were selected at octopi's start.
|
||||
BugFix: Do not install notifier's desktop file in /etc/xdg/autostart.
|
||||
BugFix: Could not remove packages when internet connection was down (thanks to Theluga).
|
||||
Added shortcut key "Ctrl+Shift+U" to upgrade outdated AUR packages.
|
||||
Arrow keys navegation refresh Info and Files tabs again.
|
||||
Updated translations.
|
||||
|
||||
0.16.0 (2024-05-19)
|
||||
BugFix: '--noeditmenu' is deprecated. Use '--editmenu=false' instead (thanks to rbaruccojr).
|
||||
BugFix: Fixed silent error when pacman's database is locked (thanks to SloppyPuppy).
|
||||
BugFix: Files tab expand all items by default.
|
||||
BugFix: Updated translations.
|
||||
Now using the unified qt-sudo project (https://github.com/aarnt/qt-sudo) for privilege escalation.
|
||||
Default to Qt6 lib build (including qtermwidget6)
|
||||
|
||||
0.15.0 (2023-09-10)
|
||||
BugFix: Invalidate Info/Files tabs when user is navigating packages using the keyboard.
|
||||
BugFix: Better handle dependencies while staging packages for deletion.
|
||||
BugFix: First yay-bin download now works again.
|
||||
BugFix: Polished navigation on Info tab dependencies
|
||||
BugFix: AUR passwords that contained a "+" char failed to login at aur.archlinux.org.
|
||||
BugFix: When using the pacman backend, call "pacman -Qm" to fetch ALL foreign packages.
|
||||
BugFix: Change install reason did not work with pacman backend.
|
||||
Made the code Qt5/Qt6 compatible.
|
||||
Using "pacman -Fl" to view contents of non installed packages (thanks to Zesko).
|
||||
Added a Terminal tab to options dialog to config its colors and fonts.
|
||||
Octopi-sudo code was synced to match project "lxqt-sudo" version 1.3.0.
|
||||
|
||||
0.14.0 (2022-10-05)
|
||||
Added --overwrite="*" checkbox in AUR tab (Tools/Options) when using yay.
|
||||
Octopi-sudo code was synced to match project "lxqt-sudo" version 1.1.0.
|
||||
BugFix: Package search did not work correctly when query string contained a "+" sign.
|
||||
BugFix: Info/Files tab refresh was duplicated.
|
||||
BugFix: Disable (another try) Info/Files tab refresh while typing in Filter/Search
|
||||
line edit.
|
||||
|
||||
0.13.0 (2022-03-30)
|
||||
BugFix: editFile() caused a crash while in Mate desktop. Both "Open PKGBUILD"
|
||||
and "Show PKGBUILD diff" options were affected.
|
||||
BugFix: removed stylesheet from treeviews. It makes dark themes look better
|
||||
(thanks to buckmelanoma).
|
||||
BugFix: Pressing ENTER over an installed AUR pkg no longer sends it to the
|
||||
install action treeview.
|
||||
BugFix: Made Octopi compatible with aurweb 6.x version (view PKGBUILD,
|
||||
diff PKGBUILD, vote, unvote and list voted AUR).
|
||||
Added "Outdated" filter/option on menu "View".
|
||||
Added a "-checkupdates" parameter to Notifier, so users can update the status
|
||||
of an already running Octopi Notifier.
|
||||
Added option to update selected outdated AUR pkgs directly from the main list.
|
||||
|
||||
0.12.0 (2021-11-06)
|
||||
Added support for pacman 6.0 (thanks to class101)
|
||||
Added support for Paru AUR tool.
|
||||
Added support for opendoas tool (default).
|
||||
Added support for Archcraft OS.
|
||||
Added support for Garuda Linux distro.
|
||||
Added support for Obarun Linux distro.
|
||||
Actions tab shows a counter feedback for inserts (with a plus signal) and
|
||||
removals (with a minus signal) and does not steal focus anymore.
|
||||
Octopi-sudo code was synced to match project "lxqt-sudo" version 1.0.0.
|
||||
BugFix: Initial database searches are executed after main interface is shown.
|
||||
This improves UI feedback on older cpus.
|
||||
BugFix: If there was only 1 result in AUR search, the pkg could not enter
|
||||
the transaction with the right name.
|
||||
BugFix: IgnorePkg pkgs are shown as outdated when using ALPM backend.
|
||||
BugFix: If user went from AUR to normal search with a not found pkg the statusbar
|
||||
counters would become invisible.
|
||||
BugFix: If options dialog was called while both notifier and octopi were running,
|
||||
Updates tab was not shown.
|
||||
|
||||
0.11.0 (2021-01-11)
|
||||
Added support for CMake build system (thanks to Tereius).
|
||||
Added support to build multiple foreign packages at once (they are first copied
|
||||
to the Actions' tree view just like official packages).
|
||||
Added "Open PKGBUILD" option to open the AUR PKGBUILD file in a text editor.
|
||||
Added "Show PKGBUILD diff" option to show the differences between latest and previous
|
||||
PKGBUILD files of the selected AUR package in a text editor.
|
||||
Added "Install Date" at Info tab.
|
||||
Added "Licenses", "Maintainer", "Depends On", "Make Deps", "Last Modified" and "Out-of-date"
|
||||
fields at Info tab while in AUR mode.
|
||||
Added option to display "Licenses", "Installed Size", "Build Date", "Install Date" and
|
||||
"Install Reason" columns in the package list.
|
||||
Added option to "Change Install Reason" of selected packages (Explicitly <-> As Dependency).
|
||||
Added a faster refresh package list code after checking for updates.
|
||||
Added "Build directory" option in AUR tab on options dialog, so users can change where
|
||||
makepkg builds the source code.
|
||||
Added support for '^' and '$' chars in AUR search
|
||||
Added "Open news in a browser" option on right clicking the News tab.
|
||||
Optional package dependencies are now installed with "--asdeps" parameter.
|
||||
Octopi-sudo code was synced to match project "lxqt-sudo" version 0.16.0.
|
||||
Updated PKGBUILD file following MatMoul's suggestion.
|
||||
Removed unused speedup service.
|
||||
Prevent users from running Octopi, Notifier and Cache Cleaner outside "/usr/bin" dir.
|
||||
BugFix: Disable Info/Files tab refresh while typing in filter/search line edit.
|
||||
BugFix: unset TMPDIR environment variable on every Octo tool startup
|
||||
(to avoid "octopi-helper[aborted]: Couldn't attach to memory" errors).
|
||||
BugFix: "total download size" showed the value 0 in Notifier if the database was not synched.
|
||||
BugFix: Pressing ESC in repoeditor could ask if you wanted to save your changes even
|
||||
if there were no changes made.
|
||||
BugFix: Running Notifier within a DE session could lead to a "Suspicious execution method" error.
|
||||
BugFix: If you tried to execute octopi after upgrading your system with notifier you got a
|
||||
notifier crash and an octopi freeze (thanks to linuxer for pointing that out).
|
||||
BugFix: Prevent icon changes in notifier when there were transaction errors.
|
||||
BugFix: The list of targets to install were not showing ok in the transaction dialog.
|
||||
BugFix: Restored support for command line parameters like "-sysupgrade-noconfirm" and "-style".
|
||||
BugFix: Updated "-help" output text.
|
||||
BugFix: Tab navigation improvements.
|
||||
BugFix: Statusbar showed a number of packages when the list was empty (the previous value).
|
||||
BugFix: Clicking on printed outdated packages in Output tab did not send to corresponding
|
||||
package in the main list after a 'Check updates'.
|
||||
BugFix: WM detection now uses "ps -aux".
|
||||
|
||||
0.10.0 (2020-07-19)
|
||||
Added a built-in default priviledge escalation tool: "octopi-sudo" as a slightly modified version
|
||||
of "lxqt-sudo" project (version 0.15.0). It's the only escalation tool supported!
|
||||
Added option to vote/unvote for AUR packages using aur.archlinux.org login.
|
||||
@@ -8,7 +168,7 @@
|
||||
Added option to download a temporary yay-bin to enable AUR.
|
||||
Updated some UI icons and added an specific one for foreign non installed pkg.
|
||||
Dropped support for external terminal applications. QTermWidget is mandatory now!
|
||||
Print .pacnew list summary after upgrade (if any).
|
||||
Print ".pacnew" file list summary after upgrade (if any).
|
||||
Added Lumina desktop support.
|
||||
RepoEditor now saves window size and position.
|
||||
Added "copy" command to octopi's embedded terminal context menu.
|
||||
@@ -56,7 +216,7 @@
|
||||
BugFix: Enable a more complete UI lockdown during transactions.
|
||||
BugFix: Enable "Find a file" context menu option on a non installed pkg.
|
||||
|
||||
0.9.0
|
||||
0.9.0 (2018-06-08)
|
||||
Parser changes: added counter for processed packages.
|
||||
Group pane now spans all window's height.
|
||||
SysInfo now uses ptpb site and does not block interface.
|
||||
@@ -112,7 +272,7 @@
|
||||
BugFix: Disable alien icon while in transaction.
|
||||
BugFix: Do not ask twice for password if a pacman lck file exists.
|
||||
|
||||
0.8.1
|
||||
0.8.1 (2016-03-27)
|
||||
BugFix: Updated CHAKRA RSS site (thanks to s8321414).
|
||||
BugFix: Distro news now works with https KaOS site.
|
||||
BugFix: Files tab was not refreshing when enabling KCP mode in KaOS.
|
||||
@@ -135,7 +295,7 @@
|
||||
Added support for lxqt-sudo tool (thanks to Manjaro team).
|
||||
Added "pkgfile -u" (if available) in sync db transaction.
|
||||
|
||||
0.8.0
|
||||
0.8.0 (2015-11-08)
|
||||
This is a Qt5 only version (with the exception of 'octopi-notifier').
|
||||
BugFix: Speed optimizations in startup code (AUR outdated list).
|
||||
BugFix: Octopi now honors the $SHELL variable (thanks to LAC1213).
|
||||
@@ -166,7 +326,7 @@
|
||||
Help/About dialog now shows Pacman information.
|
||||
StatusBar msg got updated with number of selected packages more visible.
|
||||
|
||||
0.7.0
|
||||
0.7.0 (2015-04-27)
|
||||
Major speed fix: Faster pkg list building.
|
||||
Reverted to showing ALL packages at startup.
|
||||
Added a systemd service to speed up the very first octopi startup time.
|
||||
@@ -196,7 +356,7 @@
|
||||
BugFix: If user had no gksu/kdesu/root when clicking "clean" button in
|
||||
cachecleaner, cursor would remain waiting (thanks to imperator-).
|
||||
|
||||
0.6.0
|
||||
0.6.0 (2015-02-27)
|
||||
BugFix: Pkg list was being refreshed twice sometimes.
|
||||
BugFix: Removed some buggy strings from Output tab while in KF5.
|
||||
BugFix: ArrowUp/Down, PageUp/Down and Home/End keys now refresh Package Info tab.
|
||||
@@ -224,7 +384,7 @@
|
||||
Refactorings in SearchLineEdit.
|
||||
BugFixes in RepoEditor translation support (repoeditor is now in Transifex too).
|
||||
|
||||
0.5.0
|
||||
0.5.0 (2014-11-08)
|
||||
BugFix: RepoEditor would not compile with Qt5 lib (thanks to Philm).
|
||||
BugFix: Suppress GConf error strings in output.
|
||||
BugFix: mate-terminal is returning code 255 even when execution of
|
||||
@@ -250,14 +410,14 @@
|
||||
Added support for KStatusNotifier while in KDE (thanks to brcha).
|
||||
Updated translations.
|
||||
|
||||
0.4.2
|
||||
0.4.2 (2014-07-26)
|
||||
BugFix: when searching AUR pkgs, given search string was not being matched
|
||||
by package descriptions.
|
||||
BugFix: Sometimes got a gconf bug string at sync db.
|
||||
Updated a bunch of translations.
|
||||
Added support for the new kcp tool (Go version).
|
||||
|
||||
0.4.1
|
||||
0.4.1 (2014-07-12)
|
||||
Added basque translation (thanks to tarteka).
|
||||
Added es_AR translation (thanks to javier).
|
||||
Added japanese translation (thanks to UTUMI Hirosi - utuhiro78).
|
||||
@@ -285,7 +445,7 @@
|
||||
Added Search by file feature (pacman -Qo).
|
||||
Added a string validator in the search edit widget.
|
||||
|
||||
0.4.0
|
||||
0.4.0 (2014-05-24)
|
||||
Huge refactorings in model/view that brings consistent memory and
|
||||
speed improvements - a single model and a central data storage (thanks to
|
||||
Thomas Binkau - tbinkau).
|
||||
@@ -339,7 +499,7 @@
|
||||
Fixed getBuildDate code to always convert dates to english format.
|
||||
Updated some translations.
|
||||
|
||||
0.3.2
|
||||
0.3.2 (2014-02-14)
|
||||
Cleaned unused code.
|
||||
Added icon for mirror-check while in KaOS.
|
||||
Does a mirror-check at startup while in KaOS.
|
||||
@@ -354,7 +514,7 @@
|
||||
BugFix: When the user had no yaourt in the system, there were a zombie
|
||||
octopi process 'left running'.
|
||||
|
||||
0.3.1
|
||||
0.3.1 (2014-01-14)
|
||||
Added support for Qt5.
|
||||
Added chinese (Taiwan), malay, slovak and ukrainian translations.
|
||||
Added support to KaOS, a lean KDE centric Linux distro.
|
||||
@@ -365,7 +525,7 @@
|
||||
first searches into transaction queue for them.
|
||||
BugFix: Prevent header resizing in File and Transaction tabs.
|
||||
|
||||
0.3
|
||||
0.3.0 (2013-11-03)
|
||||
Code cleanings.
|
||||
BugFix: No need to refresh package list after a cache clean.
|
||||
BugFix: Konsole was not working with yaourt package installation.
|
||||
@@ -412,7 +572,7 @@
|
||||
Added an About Dialog to Octopi Notifier.
|
||||
Updated translations.
|
||||
|
||||
0.2
|
||||
0.2.0 (2013-08-24)
|
||||
Splitted the project in "octopi" and "octopi-notifier".
|
||||
Yaourt no longer runs with root permissions.
|
||||
Added support for package multi selection in Yaourt mode.
|
||||
@@ -433,23 +593,23 @@
|
||||
IgnorePkg option is now used to build outdated package list.
|
||||
BugFix: Empty pkg descriptions are now shown as empty.
|
||||
|
||||
0.1.9.1
|
||||
0.1.9.1 (2013-07-14)
|
||||
Important bugfixes to deal with multithreaded code.
|
||||
Added a "globals.h/.cpp" file to group QFutureWatcher globals.
|
||||
Updated style changing code in main.cpp.
|
||||
BugFix: when user cancelled a sysupgrade transaction inside a
|
||||
terminal, the package actions remained disabled.
|
||||
|
||||
0.1.9
|
||||
0.1.9 (2013-07-09)
|
||||
Added yaourt support.
|
||||
Updated most of the translations.
|
||||
|
||||
0.1.8
|
||||
0.1.8 (2013-06-16)
|
||||
Added czech translation.
|
||||
Added support to ArchBang Linux.
|
||||
Added a systemtray icon notifier feature using DBus technology.
|
||||
|
||||
0.1.7.3
|
||||
0.1.7.3 (2013-05-26)
|
||||
Added a TRANSLATIONS file.
|
||||
Added danish translation.
|
||||
Added indonesian translation.
|
||||
@@ -459,14 +619,14 @@ terminal, the package actions remained disabled.
|
||||
Bugfix: sysupgrade must refresh packagelist after syncdatabase.
|
||||
Bugfix: if sysupgrade uses SyncFirst, makes it automatically start a second upgrade.
|
||||
|
||||
0.1.7.2
|
||||
0.1.7.2 (2013-05-17)
|
||||
Added catalan translation.
|
||||
Bugfix: updated new binary translation files to the resources.
|
||||
|
||||
0.1.7.1
|
||||
0.1.7.1 (2013-05-11)
|
||||
Bugfix: menu icons were not being shown while in Xfce.
|
||||
|
||||
0.1.7
|
||||
0.1.7 (2013-05-11)
|
||||
Added "-sysupgrade" command line option.
|
||||
Added "-removecmd" command line option.
|
||||
Added lots of translations.
|
||||
@@ -474,11 +634,11 @@ terminal, the package actions remained disabled.
|
||||
Added an About dialog.
|
||||
Changed the old About tab to Usage tab.
|
||||
|
||||
0.1.6.1
|
||||
0.1.6.1 (2013-04-25)
|
||||
Added pt_BR translation.
|
||||
Added "Open root terminal" option in File menu.
|
||||
|
||||
0.1.6
|
||||
0.1.6 (2013-04-12)
|
||||
Added a new Transaction Dialog.
|
||||
Added a Firefox-like search inside Files, News and About tabs.
|
||||
Added support for Chakra.
|
||||
@@ -486,33 +646,33 @@ terminal, the package actions remained disabled.
|
||||
Added option to execute any transaction inside a terminal.
|
||||
Changed ProgressDialog to a progressBar at the screen bottom.
|
||||
|
||||
0.1.5
|
||||
0.1.5 (2013-04-06)
|
||||
Added option to search packages by description and name.
|
||||
Added support for pacman version 4.1.
|
||||
Transactions with conflict errors can be re-executed inside a terminal.
|
||||
Reworked Manjaro Linux theme.
|
||||
|
||||
0.1.4.1
|
||||
0.1.4.1 (2013-03-30)
|
||||
Bugfix release
|
||||
Added total download size information in transaction dialog.
|
||||
|
||||
0.1.4
|
||||
0.1.4 (2013-03-28)
|
||||
Added a Manjaro Linux theme.
|
||||
Changed position of filter line edit to the toolbar.
|
||||
|
||||
0.1.3
|
||||
0.1.3 (2013-03-19)
|
||||
Added better support to Qt dark themes.
|
||||
Added context menu support inside Files tab.
|
||||
Made URLs clickable inside Output tab.
|
||||
Fixed the annoying Packager information display bug.
|
||||
|
||||
0.1.2
|
||||
0.1.2 (2013-03-18)
|
||||
Tons of refactorings and bugfixes.
|
||||
Small changes in UI.
|
||||
|
||||
0.1.1
|
||||
0.1.1 (2013-03-17)
|
||||
Added all six tabs.
|
||||
Added support for groups of packages.
|
||||
|
||||
0.1.0
|
||||
0.1.0 (2013-03-11)
|
||||
Initial Proof of Concept release.
|
||||
|
||||
130
CMakeLists.txt
Normal file
@@ -0,0 +1,130 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(octopi VERSION 0.18.0 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD True)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
option(USE_QTERMWIDGET6 "Build with qtermwidget6 instead of qtermwidget5" ON)
|
||||
|
||||
add_subdirectory(helper)
|
||||
add_subdirectory(notifier)
|
||||
add_subdirectory(cachecleaner)
|
||||
add_subdirectory(repoeditor)
|
||||
|
||||
if (USE_QTERMWIDGET6)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat Gui Network Xml Widgets LinguistTools Multimedia)
|
||||
find_package(qtermwidget6 REQUIRED)
|
||||
else()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Gui Network Xml Widgets LinguistTools Multimedia)
|
||||
find_package(qtermwidget5 REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(alpm_octopi_utils REQUIRED)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
file(GLOB TS_FILES LIST_DIRECTORIES false "${CMAKE_CURRENT_LIST_DIR}/resources/translations/*.ts")
|
||||
qt_add_translation(qmFiles ${TS_FILES})
|
||||
|
||||
set(src
|
||||
src/QtSolutions/qtsingleapplication.cpp
|
||||
src/QtSolutions/qtlocalpeer.cpp
|
||||
repoeditor/repoentry.cpp
|
||||
src/aurvote.cpp
|
||||
src/propertiestabwidget.cpp
|
||||
src/qaesencryption.cpp
|
||||
src/repoconf.cpp
|
||||
src/main.cpp
|
||||
src/mainwindow.cpp
|
||||
src/strconstants.cpp
|
||||
src/searchlineedit.cpp
|
||||
src/argumentlist.cpp
|
||||
src/settingsmanager.cpp
|
||||
src/package.cpp
|
||||
src/unixcommand.cpp
|
||||
src/wmhelper.cpp
|
||||
src/treeviewpackagesitemdelegate.cpp
|
||||
src/mainwindow_init.cpp
|
||||
src/mainwindow_transaction.cpp
|
||||
src/mainwindow_events.cpp
|
||||
src/mainwindow_help.cpp
|
||||
src/searchbar.cpp
|
||||
src/mainwindow_searchbar.cpp
|
||||
src/transactiondialog.cpp
|
||||
src/mainwindow_news.cpp
|
||||
src/mainwindow_refresh.cpp
|
||||
src/globals.cpp
|
||||
src/multiselectiondialog.cpp
|
||||
src/packagerepository.cpp
|
||||
src/model/packagemodel.cpp
|
||||
src/ui/octopitabinfo.cpp
|
||||
src/utils.cpp
|
||||
src/terminal.cpp
|
||||
src/pacmanexec.cpp
|
||||
src/optionsdialog.cpp
|
||||
src/packagetreeview.cpp
|
||||
src/termwidget.cpp
|
||||
src/alpmbackend.cpp)
|
||||
|
||||
set(header
|
||||
src/QtSolutions/qtsingleapplication.h
|
||||
src/QtSolutions/qtlocalpeer.h
|
||||
repoeditor/repoentry.h
|
||||
src/aurvote.h
|
||||
src/propertiestabwidget.h
|
||||
src/qaesencryption.h
|
||||
src/repoconf.h
|
||||
src/mainwindow.h
|
||||
src/strconstants.h
|
||||
src/searchlineedit.h
|
||||
src/argumentlist.h
|
||||
src/settingsmanager.h
|
||||
src/uihelper.h
|
||||
src/package.h
|
||||
src/unixcommand.h
|
||||
src/wmhelper.h
|
||||
src/treeviewpackagesitemdelegate.h
|
||||
src/searchbar.h
|
||||
src/transactiondialog.h
|
||||
src/globals.h
|
||||
src/multiselectiondialog.h
|
||||
src/packagerepository.h
|
||||
src/model/packagemodel.h
|
||||
src/ui/octopitabinfo.h
|
||||
src/utils.h
|
||||
src/terminal.h
|
||||
src/pacmanexec.h
|
||||
src/constants.h
|
||||
src/optionsdialog.h
|
||||
src/packagetreeview.h
|
||||
src/termwidget.h
|
||||
src/alpmbackend.h)
|
||||
|
||||
set(ui ui/mainwindow.ui ui/transactiondialog.ui ui/multiselectiondialog.ui ui/optionsdialog.ui)
|
||||
|
||||
set(qrc resources.qrc)
|
||||
|
||||
qt_wrap_ui(src ${ui})
|
||||
qt_add_resources(src ${qrc})
|
||||
|
||||
add_executable(octopi ${src} ${header} ${qmFiles})
|
||||
target_compile_definitions(octopi PRIVATE OCTOPI_EXTENSIONS ALPM_BACKEND QT_DEPRECATED_WARNINGS QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY)
|
||||
|
||||
if (USE_QTERMWIDGET6)
|
||||
target_include_directories(octopi PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${Qt6Core_INCLUDE_DIRS} ${Qt6Gui_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS} ${Qt6Xml_INCLUDE_DIRS} ${Qt6Widgets_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi PRIVATE Qt6::Core Qt6::Gui Qt6::Network Qt6::Xml Qt6::Widgets Qt6::Multimedia qtermwidget6 alpm_octopi_utils)
|
||||
else()
|
||||
target_include_directories(octopi PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi PRIVATE Qt5::Core Qt5::Gui Qt5::Network Qt5::Xml Qt5::Widgets Qt5::Multimedia qtermwidget5 alpm_octopi_utils)
|
||||
endif()
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_green.png" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
file(RENAME "${CMAKE_CURRENT_BINARY_DIR}/octopi_green.png" "${CMAKE_CURRENT_BINARY_DIR}/octopi.png")
|
||||
install(TARGETS octopi RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi.desktop" DESTINATION share/applications)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/octopi.png" "${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_green.png" DESTINATION share/icons/hicolor/48x48/apps)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/octopi.png" "${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_green.png"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_red.png" "${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_yellow.png" DESTINATION share/icons/hicolor/48x48/apps)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION share/licenses/octopi)
|
||||
88
PKGBUILD
@@ -1,77 +1,53 @@
|
||||
pkgname=octopi
|
||||
pkgver=0.10.0
|
||||
_pkgname=octopi
|
||||
pkgname=octopi-git
|
||||
pkgver=0.18.0.latest
|
||||
pkgrel=1
|
||||
pkgdesc="This is Octopi, a powerful Pacman frontend using Qt libs"
|
||||
pkgdesc="This is Octopi, a powerful Pacman frontend using Qt libs (git checkout)"
|
||||
url="https://tintaescura.com/projects/octopi/"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL2')
|
||||
depends=('alpm_octopi_utils' 'pkgfile' 'qtermwidget' 'sudo')
|
||||
depends=('alpm_octopi_utils' 'qtermwidget' 'sudo')
|
||||
makedepends=('git')
|
||||
groups=('system')
|
||||
install=octopi.install
|
||||
source=("git+https://github.com/aarnt/octopi.git")
|
||||
md5sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}"
|
||||
|
||||
# enable the kstatus switch, disable if you wish to build without Plasma/knotifications support
|
||||
sed -e "s|DEFINES += ALPM_BACKEND #KSTATUS|DEFINES += ALPM_BACKEND KSTATUS|" -i notifier/octopi-notifier.pro
|
||||
|
||||
cd "${_pkgname}"
|
||||
cp resources/images/octopi_green.png resources/images/octopi.png
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}"
|
||||
|
||||
qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi.pro
|
||||
make
|
||||
|
||||
cd helper
|
||||
qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi-helper.pro
|
||||
make
|
||||
cd ..
|
||||
|
||||
cd notifier
|
||||
qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi-notifier.pro
|
||||
make
|
||||
cd ..
|
||||
|
||||
cd repoeditor
|
||||
qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi-repoeditor.pro
|
||||
make
|
||||
cd ..
|
||||
|
||||
cd cachecleaner
|
||||
qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi-cachecleaner.pro
|
||||
make
|
||||
cd ..
|
||||
|
||||
cd sudo
|
||||
qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi-sudo.pro
|
||||
#pkgver() {
|
||||
# cd "${_pkgname}"
|
||||
# git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
|
||||
#}
|
||||
|
||||
build() {
|
||||
cd "${_pkgname}"
|
||||
echo "Starting build..."
|
||||
qmake6 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi.pro
|
||||
make
|
||||
|
||||
_subdirs="cachecleaner helper notifier repoeditor"
|
||||
|
||||
for _subdir in $_subdirs; do
|
||||
pushd $_subdir
|
||||
echo "Building octopi-$_subdir..."
|
||||
qmake6 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" "octopi-$_subdir.pro"
|
||||
make
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${pkgname}"
|
||||
cd "${_pkgname}"
|
||||
make INSTALL_ROOT="${pkgdir}" install
|
||||
|
||||
cd helper
|
||||
make INSTALL_ROOT="${pkgdir}" install
|
||||
cd ..
|
||||
|
||||
cd notifier
|
||||
make INSTALL_ROOT="${pkgdir}" install
|
||||
cd ..
|
||||
|
||||
cd repoeditor
|
||||
make INSTALL_ROOT="${pkgdir}" install
|
||||
cd ..
|
||||
|
||||
cd cachecleaner
|
||||
make INSTALL_ROOT="${pkgdir}" install
|
||||
cd ..
|
||||
_subdirs="cachecleaner helper notifier repoeditor"
|
||||
|
||||
cd sudo
|
||||
make INSTALL_ROOT="${pkgdir}" install
|
||||
for _subdir in $_subdirs; do
|
||||
pushd $_subdir
|
||||
make INSTALL_ROOT="${pkgdir}" install
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
110
README.md
@@ -1,30 +1,33 @@
|
||||
## This is Octopi, a powerful Pacman/AUR front end using Qt libs.
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
The project site is hosted on https://tintaescura.com/projects/octopi
|
||||
|
||||
Currently, 10 Linux distros are compatible with it
|
||||
Currently, 11 Linux distros are compatible with it
|
||||
|
||||
* [ArchBang](http://archbang.org/)
|
||||
* [Archcraft](https://archcraft.io/)
|
||||
* [Arch Linux](https://www.archlinux.org/)
|
||||
* [ArcoLinux](https://arcolinux.info/)
|
||||
* [Artix Linux](https://artixlinux.org)
|
||||
* [Chakra](https://chakralinux.org/)
|
||||
* [CondresOS](https://condresos.codelinsoft.it/)
|
||||
* [CachyOS](https://cachyos.org/)
|
||||
* [EndeavourOS](https://endeavouros.com/)
|
||||
* [Garuda Linux](https://garudalinux.org/)
|
||||
* [KaOS](https://kaosx.us/)
|
||||
* [Manjaro](https://manjaro.org/)
|
||||
* [Parabola GNU/Linux-libre](https://www.parabola.nu/)
|
||||
* [Obarun Linux](https://web.obarun.org/index.php?id=1)
|
||||
|
||||
### What you must install in order to have Octopi fully functional
|
||||
|
||||
You'll need:
|
||||
* [Alpm_octopi_utils](https://github.com/aarnt/alpm_octopi_utils/) library
|
||||
* A helper to execute pacman commands called "octphelper", available on "./helper" dir
|
||||
* A priviledge escalation tool called "octopi-sudo", available on "./sudo" dir
|
||||
* qtermwidget >= 0.14.1 in order to build Octopi with embedded terminal support
|
||||
|
||||
* A privilege escalation tool called [qt-sudo](https://github.com/aarnt/qt-sudo/)
|
||||
* qtermwidget package, in order to build Octopi with embedded terminal support
|
||||
|
||||
### To install Octopi using pacman
|
||||
|
||||
If Octopi package is available in your distro's repository, you can just type:
|
||||
@@ -33,9 +36,9 @@ If Octopi package is available in your distro's repository, you can just type:
|
||||
# pacman -S octopi
|
||||
```
|
||||
|
||||
### Steps to build Octopi source code
|
||||
### Steps to build Octopi source code (qmake)
|
||||
|
||||
Assuming you have vala compiler and Qt5 libs properly installed, follow these steps:
|
||||
Assuming you have vala compiler and Qt6 libs properly installed, follow these steps:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/aarnt/alpm_octopi_utils
|
||||
@@ -43,40 +46,70 @@ $ cd alpm_octopi_utils
|
||||
$ make
|
||||
# make install
|
||||
$ cd ..
|
||||
$ git clone https://github.com/aarnt/octopi
|
||||
$ cd octopi/sudo
|
||||
$ qmake-qt5
|
||||
$ make
|
||||
# make install
|
||||
$ cd ../helper
|
||||
$ qmake-qt5
|
||||
$ make
|
||||
# make install
|
||||
$ cd ../notifier
|
||||
$ qmake-qt5
|
||||
$ make
|
||||
# make install
|
||||
$ cd ../cachecleaner
|
||||
$ qmake-qt5
|
||||
$ make
|
||||
# make install
|
||||
$ cd ../repoeditor
|
||||
$ qmake-qt5
|
||||
$ git clone https://github.com/aarnt/qt-sudo
|
||||
$ cd qt-sudo
|
||||
$ qmake6
|
||||
$ make
|
||||
# make install
|
||||
$ cd ..
|
||||
$ qmake-qt5
|
||||
$ git clone https://github.com/aarnt/octopi
|
||||
$ cd octopi/helper
|
||||
$ qmake6
|
||||
$ make
|
||||
# make install
|
||||
$ cd ../notifier
|
||||
$ qmake6
|
||||
$ make
|
||||
# make install
|
||||
$ cd ../cachecleaner
|
||||
$ qmake6
|
||||
$ make
|
||||
# make install
|
||||
$ cd ../repoeditor
|
||||
$ qmake6
|
||||
$ make
|
||||
# make install
|
||||
$ cd ..
|
||||
$ qmake6
|
||||
$ make
|
||||
# make install
|
||||
```
|
||||
|
||||
You can also use the available PKGBUILD script that helps you build Octopi with all its tools:
|
||||
You can also use the available PKGBUILD script that helps you build latest Octopi development version with all its tools(*):
|
||||
|
||||
```
|
||||
$ cd OCTOPI_PATH (where you git cloned the source code)
|
||||
$ makepkg -f
|
||||
```
|
||||
|
||||
(*) It may contain bugs. You have been warned.
|
||||
|
||||
### Steps to build Octopi source code (CMake)
|
||||
|
||||
As an alternative to qmake, Octopi can also be built with CMake. Make sure that at least CMake 3.5 is installed.
|
||||
|
||||
First, build and install alpm_octopi_utils:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/aarnt/alpm_octopi_utils
|
||||
$ cd alpm_octopi_utils
|
||||
$ mkdir build_dir && cd build_dir
|
||||
$ cmake -G "Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
|
||||
$ make
|
||||
$ sudo make install
|
||||
```
|
||||
|
||||
Next, build and install Octopi:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/aarnt/octopi
|
||||
$ cd octopi
|
||||
$ mkdir build_dir && cd build_dir
|
||||
$ cmake -G "Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
|
||||
$ make
|
||||
$ sudo make install
|
||||
```
|
||||
|
||||
### To run Octopi
|
||||
|
||||
```
|
||||
@@ -91,23 +124,24 @@ $ /usr/bin/octopi-notifier
|
||||
|
||||
### To enable AUR support (that "green alien" icon on toolbar)
|
||||
|
||||
You'll need to install [pacaur](https://github.com/rmarquis/pacaur),
|
||||
[pikaur](https://github.com/actionless/pikaur), [trizen](https://github.com/trizen/trizen) or
|
||||
[yay](https://github.com/Jguer/yay) in your system.
|
||||
You'll need to install [pacaur](https://github.com/rmarquis/pacaur), [paru](https://github.com/morganamilo/paru),
|
||||
[pikaur](https://github.com/actionless/pikaur), [trizen](https://github.com/trizen/trizen) or
|
||||
[yay](https://github.com/Jguer/yay) in your system.
|
||||
If neither of the previous tools are found Octopi will download latest "yay-bin" github binary.
|
||||
In Chakra, [chaser](https://github.com/ccr-tools/chaser) will be supported out of the box.
|
||||
In KaOS, [kcp](https://github.com/bvaudour/kcp) will be supported out of the box.
|
||||
In KaOS, [kcp](https://codeberg.org/bvaudour/kcp) will be supported out of the box.
|
||||
|
||||
### Ways to help/support Octopi
|
||||
|
||||
* You can "Star" it on the Github page - https://github.com/aarnt/octopi/
|
||||
* You can vote in the AUR package available on https://aur.archlinux.org/packages/octopi/
|
||||
* You can translate it to your mother language on https://www.transifex.com/projects/p/octopi/
|
||||
* You can translate it to your mother language on https://explore.transifex.com/arnt/octopi/
|
||||
* You can follow author's twitter account on https://twitter.com/aaarnt
|
||||
* You can buy author's technical book (currently in portuguese) about Octopi and Qt5 on
|
||||
* You can buy author's technical book (currently in portuguese) about Octopi and Qt5 on
|
||||
http://www.amazon.com.br/Aprendendo-Qt-com-projeto-Octopi-ebook/dp/B015ICHKV6
|
||||
* You can buy author's poem book (currently in portuguese) on meditation, Buddhism, cosmology and other subjects on
|
||||
https://www.amazon.com.br/Avidya-Alexandre-Arnt-ebook/dp/B0965LVWR3
|
||||
* You can write a review about it (text / video)
|
||||
* You can donate money to the project Paypal - http://sourceforge.net/donate/index.php?group_id=186459
|
||||
* You can donate money to the author's Paypal - http://sourceforge.net/donate/index.php?group_id=186459
|
||||
* You can join the project ;-)
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[octopi.cachecleaner]
|
||||
file_filter = resources/translations/octopi_cachecleaner_<lang>.ts
|
||||
source_file = resources/translations/octopi_cachecleaner_en.ts
|
||||
source_lang = en
|
||||
type = QT
|
||||
[o:arnt:p:octopi:r:cachecleaner]
|
||||
file_filter = resources/translations/octopi_cachecleaner_<lang>.ts
|
||||
source_file = resources/translations/octopi_cachecleaner_en.ts
|
||||
source_lang = en
|
||||
type = QT
|
||||
replace_edited_strings = false
|
||||
keep_translations = false
|
||||
|
||||
|
||||
66
cachecleaner/CMakeLists.txt
Normal file
@@ -0,0 +1,66 @@
|
||||
if (USE_QTERMWIDGET6)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Network Xml Widgets LinguistTools)
|
||||
else()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Network Xml Widgets LinguistTools)
|
||||
endif()
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
file(GLOB TS_FILES LIST_DIRECTORIES false "${CMAKE_CURRENT_LIST_DIR}/resources/translations/*.ts")
|
||||
qt_add_translation(qmFiles ${TS_FILES})
|
||||
|
||||
set(src
|
||||
main.cpp
|
||||
cachecleaner.cpp
|
||||
packagegroupmodel.cpp
|
||||
../src/strconstants.cpp
|
||||
../src/qaesencryption.cpp
|
||||
../src/unixcommand.cpp
|
||||
../src/wmhelper.cpp
|
||||
../src/terminal.cpp
|
||||
../src/settingsmanager.cpp
|
||||
../src/searchlineedit.cpp
|
||||
../src/utils.cpp
|
||||
../src/package.cpp
|
||||
../src/QtSolutions/qtsingleapplication.cpp
|
||||
../src/QtSolutions/qtlocalpeer.cpp
|
||||
#../src/QtSolutions/qtlockedfile.cpp
|
||||
../src/QtSolutions/qtsinglecoreapplication.cpp)
|
||||
|
||||
set(header
|
||||
cachecleaner.h
|
||||
packagegroupmodel.h
|
||||
../src/strconstants.h
|
||||
../src/qaesencryption.h
|
||||
../src/unixcommand.h
|
||||
../src/wmhelper.h
|
||||
../src/terminal.h
|
||||
../src/settingsmanager.h
|
||||
../src/searchlineedit.h
|
||||
../src/utils.h
|
||||
../src/package.h
|
||||
../src/QtSolutions/qtsingleapplication.h
|
||||
../src/QtSolutions/qtlocalpeer.h
|
||||
#../src/QtSolutions/qtlockedfile.h
|
||||
../src/QtSolutions/qtsinglecoreapplication.h)
|
||||
|
||||
set(ui ui/cachecleaner.ui)
|
||||
|
||||
set(qrc resources.qrc)
|
||||
|
||||
qt_wrap_ui(src ${ui})
|
||||
qt_add_resources(src ${qrc})
|
||||
|
||||
add_executable(octopi-cachecleaner ${src} ${header} ${qmFiles})
|
||||
target_compile_definitions(octopi-cachecleaner PRIVATE QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY)
|
||||
|
||||
if (USE_QTERMWIDGET6)
|
||||
target_include_directories(octopi-cachecleaner PRIVATE ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/src/QtSolutions" ${Qt6Core_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS} ${Qt6Xml_INCLUDE_DIRS} ${Qt6Widgets_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi-cachecleaner PRIVATE Qt6::Core Qt6::Network Qt6::Xml Qt6::Widgets)
|
||||
else()
|
||||
target_include_directories(octopi-cachecleaner PRIVATE ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/src/QtSolutions" ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi-cachecleaner PRIVATE Qt5::Core Qt5::Network Qt5::Xml Qt5::Widgets)
|
||||
endif()
|
||||
|
||||
install(TARGETS octopi-cachecleaner RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-cachecleaner.desktop" DESTINATION share/applications)
|
||||
@@ -98,7 +98,7 @@ void CacheCleaner::onSendInfoToOctopiHelper()
|
||||
QString msg;
|
||||
QByteArray block;
|
||||
QDataStream out(&block, QIODevice::WriteOnly);
|
||||
out.setVersion(QDataStream::Qt_5_10);
|
||||
out.setVersion(QDataStream::Qt_5_15);
|
||||
|
||||
//Is octopi-helper running?
|
||||
bool isHelperExecuting=UnixCommand::isOctopiHelperRunning();
|
||||
|
||||
@@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "cachecleaner.h"
|
||||
#include "../../src/strconstants.h"
|
||||
#include "../src/strconstants.h"
|
||||
#include "../src/QtSolutions/qtsingleapplication.h"
|
||||
|
||||
#include <QApplication>
|
||||
@@ -31,6 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
unsetenv("TMPDIR");
|
||||
QtSingleApplication app( QStringLiteral("Cache Cleaner - Octopi"), argc, argv );
|
||||
|
||||
//If there is already an instance running...
|
||||
@@ -43,18 +44,23 @@ int main( int argc, char *argv[] )
|
||||
app.sendMessage(QStringLiteral("RAISE"));
|
||||
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load(QLatin1String(":/resources/translations/octopi_cachecleaner_") +
|
||||
QLocale::system().name());
|
||||
bool success = appTranslator.load(QLatin1String(":/resources/translations/octopi_cachecleaner_") +
|
||||
QLocale::system().name());
|
||||
if (!success)
|
||||
{
|
||||
success = appTranslator.load(QStringLiteral(":/resources/translations/octopi_cachecleaner_en.qm"));
|
||||
}
|
||||
|
||||
app.installTranslator(&appTranslator);
|
||||
|
||||
if (UnixCommand::isRootRunning()){
|
||||
QMessageBox::critical( 0, StrConstants::getApplicationName(), StrConstants::getErrorRunningWithRoot());
|
||||
QMessageBox::critical( nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunningWithRoot());
|
||||
return (-2);
|
||||
}
|
||||
|
||||
if (!UnixCommand::hasTheExecutable(QStringLiteral("paccache")))
|
||||
{
|
||||
QMessageBox::critical( 0, StrConstants::getApplicationName(), StrConstants::getExecutableCouldNotBeFound().arg(QStringLiteral("\"paccache\"")));
|
||||
QMessageBox::critical( nullptr, StrConstants::getApplicationName(), StrConstants::getExecutableCouldNotBeFound().arg(QStringLiteral("\"paccache\"")));
|
||||
return (-3);
|
||||
}
|
||||
|
||||
@@ -70,6 +76,12 @@ int main( int argc, char *argv[] )
|
||||
return (-5);
|
||||
}
|
||||
|
||||
if (!UnixCommand::isOctoToolRunning(QStringLiteral("octopi-cachecleaner")))
|
||||
{
|
||||
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunOctopiCacheCleanerAsUsrBin());
|
||||
return (-6);
|
||||
}
|
||||
|
||||
CacheCleaner w;
|
||||
if (w.startServer())
|
||||
{
|
||||
|
||||
@@ -7,3 +7,5 @@ Type=Application
|
||||
Categories=GNOME;GTK;System;
|
||||
#NotShowIn=GNOME;XFCE;LXDE;KDE;
|
||||
StartupNotify=true
|
||||
Version=1.5
|
||||
SingleMainWindow=true
|
||||
|
||||
@@ -106,7 +106,8 @@ TRANSLATIONS += resources/translations/octopi_cachecleaner_pt_BR.ts \
|
||||
resources/translations/octopi_cachecleaner_hr.ts \
|
||||
resources/translations/octopi_cachecleaner_zh-Hans.ts \
|
||||
resources/translations/octopi_cachecleaner_zh_CN.ts \
|
||||
resources/translations/octopi_cachecleaner_ko.ts
|
||||
resources/translations/octopi_cachecleaner_ko.ts \
|
||||
resources/translations/octopi_cachecleaner_ko_KR.ts \
|
||||
|
||||
# install
|
||||
isEmpty(PREFIX) {
|
||||
|
||||
@@ -38,7 +38,7 @@ PackageGroupModel::PackageGroupModel(QString optionsString,
|
||||
QSpinBox *spinner,
|
||||
QPushButton *refreshBtn,
|
||||
QPushButton *cleanBtn)
|
||||
: QObject(NULL),
|
||||
: QObject(nullptr),
|
||||
m_optionsString(optionsString),
|
||||
m_listView(listView),
|
||||
m_spinner(spinner),
|
||||
@@ -100,7 +100,7 @@ void PackageGroupModel::keepArchivesChanged()
|
||||
*/
|
||||
QString PackageGroupModel::getOptions()
|
||||
{
|
||||
return m_optionsString + QLatin1String("-k ") + QString::number(m_spinner->value());
|
||||
return QStringLiteral("%1-k %2").arg(m_optionsString).arg(m_spinner->value());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -144,7 +144,7 @@ bool PackageGroupModel::isSUAvailable()
|
||||
return true;
|
||||
}
|
||||
else if (WMHelper::getSUCommand() == ctn_NO_SU_COMMAND){
|
||||
QMessageBox::critical( 0, StrConstants::getApplicationName(),
|
||||
QMessageBox::critical( nullptr, StrConstants::getApplicationName(),
|
||||
StrConstants::getErrorNoSuCommand() +
|
||||
QLatin1String("\n") + StrConstants::getYoullNeedSuFrontend());
|
||||
return false;
|
||||
@@ -158,7 +158,11 @@ bool PackageGroupModel::isSUAvailable()
|
||||
*/
|
||||
void PackageGroupModel::cleanCache()
|
||||
{
|
||||
if (isExecutingCommand || UnixCommand::isPacmanDbLocked()) return;
|
||||
if (isExecutingCommand || UnixCommand::isPacmanDbLocked()){
|
||||
QMessageBox::critical( nullptr, StrConstants::getApplicationName(),
|
||||
StrConstants::getErrorDbLock());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isSUAvailable())
|
||||
return;
|
||||
@@ -195,7 +199,7 @@ void PackageGroupModel::finishedDryrun(int exitCode, QProcess::ExitStatus)
|
||||
if(exitCode > 1)
|
||||
{
|
||||
//process failed, provide info on errors
|
||||
QMessageBox::critical(m_listView, QStringLiteral("Error whith the underlying process"), m_acc->getErrors());
|
||||
QMessageBox::critical(m_listView, QStringLiteral("Error with the underlying process"), m_acc->getErrors());
|
||||
}
|
||||
else if (exitCode == 0)
|
||||
{
|
||||
@@ -251,7 +255,7 @@ void PackageGroupModel::processDryrunResult(QString output) {
|
||||
//process package list
|
||||
for(int i = 0; i < lines.length(); i++)
|
||||
{
|
||||
QString line = lines.at(i);
|
||||
const QString& line = lines.at(i);
|
||||
|
||||
if(i == 0)
|
||||
//skip the first line ("==> Candidate packages:")
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>Чистач на кеш памет - Octopi</translation>
|
||||
<translation>Почистване на кеша - „Octopi“</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
<source>Uninstalled packages</source>
|
||||
<translation>Деинсталирани пакети</translation>
|
||||
<translation>Премахнати пакети</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>Cache säubern - Octopi</translation>
|
||||
<translation>Zwischenspeicher säubern - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>キャッシュクリーナ - Octopi</translation>
|
||||
<translation>キャッシュクリーナー - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>캐시 클리너 - Octopi</translation>
|
||||
<translation>캐시 청소도구 - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
|
||||
BIN
cachecleaner/resources/translations/octopi_cachecleaner_ko_KR.qm
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ko_KR" version="2.0">
|
||||
<context>
|
||||
<name>CacheCleaner</name>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>캐시 클리너 - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
<source>Uninstalled packages</source>
|
||||
<translation>제거된 패키지</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="150"/>
|
||||
<source>Keep :</source>
|
||||
<translation>보관 :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="157"/>
|
||||
<source>Number of old versions to keep</source>
|
||||
<translation>보관할 이전 버전 수</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="183"/>
|
||||
<source>Refresh</source>
|
||||
<translation>새로 고침</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
|
||||
<source>Installed packages</source>
|
||||
<translation>설치된 패키지</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PackageGroupModel</name>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
|
||||
<source>Clean</source>
|
||||
<translation>청소하기</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
|
||||
<source>Clean %1</source>
|
||||
<translation>%1 청소하기</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -4,12 +4,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>Limpar Cache - Octopi</translation>
|
||||
<translation>Limpeza de Cache - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
<source>Uninstalled packages</source>
|
||||
<translation>Pacotes não instalados</translation>
|
||||
<translation>Pacotes desinstalados</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="183"/>
|
||||
<source>Refresh</source>
|
||||
<translation>Actualizar</translation>
|
||||
<translation>Atualizar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
|
||||
|
||||
24
helper/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
if (USE_QTERMWIDGET6)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Network)
|
||||
else()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Network)
|
||||
endif()
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
set(src main.cpp octopihelper.cpp ../src/argumentlist.cpp)
|
||||
|
||||
set(header octopihelper.h ../src/argumentlist.h)
|
||||
|
||||
add_executable(octphelper ${src} ${header})
|
||||
target_compile_definitions(octphelper PRIVATE QT_DEPRECATED_WARNINGS QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY QT_NO_FOREACH)
|
||||
|
||||
if (USE_QTERMWIDGET6)
|
||||
target_include_directories(octphelper PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt6Core_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS})
|
||||
target_link_libraries(octphelper PRIVATE Qt6::Core Qt6::Network)
|
||||
else()
|
||||
target_include_directories(octphelper PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
|
||||
target_link_libraries(octphelper PRIVATE Qt5::Core Qt5::Network)
|
||||
endif()
|
||||
|
||||
install(TARGETS octphelper RUNTIME DESTINATION lib/octopi LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
This is a simple helper to execute octopi transactions. It aims to ease integration with sudo NOPASSWD switch.
|
||||
|
||||
NOPASSWD mode will *ONLY* work with integrated ["octopi-sudo"](https://github.com/aarnt/octopi/tree/master/sudo) root escalation tool.
|
||||
NOPASSWD mode will *ONLY* work with integrated ["qt-sudo"](https://github.com/aarnt/qt-sudo) root escalation tool.
|
||||
|
||||
@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
|
||||
if (argList->getSwitch(QStringLiteral("-version")))
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << "octopi-helper: version " << ctn_OCTOPI_HELPER_VERSION << Qt::endl;
|
||||
qout << "octopi-helper: version " << ctn_APPLICATION_VERSION << Qt::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -50,12 +50,18 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
QCoreApplication a(argc, argv);
|
||||
unsetenv("TMPDIR");
|
||||
|
||||
OctopiHelper helper;
|
||||
|
||||
if (argList->getSwitch(QStringLiteral("-ts")))
|
||||
{
|
||||
return helper.executePkgTransactionWithSharedMem();
|
||||
}
|
||||
else if (argList->getSwitch(QStringLiteral("-test-pre-system-upgrade-script")))
|
||||
{
|
||||
helper.validatePreUpgradeScript();
|
||||
}
|
||||
else
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
#include "../src/constants.h"
|
||||
#include "octopihelper.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <QProcess>
|
||||
#include <QDir>
|
||||
#include <QObject>
|
||||
@@ -32,6 +37,7 @@
|
||||
#include <QDataStream>
|
||||
#include <QFile>
|
||||
#include <QSettings>
|
||||
#include <QDateTime>
|
||||
|
||||
QFile *OctopiHelper::m_temporaryFile = nullptr;
|
||||
|
||||
@@ -97,17 +103,11 @@ bool isAppRunning(const QString &appName, bool justOneInstance)
|
||||
|
||||
if (justOneInstance)
|
||||
{
|
||||
if (out.count(appName)>0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return out.count(appName)>0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (out.count(appName)>1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return out.count(appName)>1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,10 @@ OctopiHelper::OctopiHelper()
|
||||
//These settings enable all "pacman" output go thru QProcess output methods
|
||||
m_process->setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
m_process->setInputChannelMode(QProcess::ForwardedInputChannel);
|
||||
|
||||
QString fname = QStringLiteral("/usr/lib/octopi/octphelper.log");
|
||||
m_logFile.setFileName(fname);
|
||||
m_logFile.open(QIODevice::WriteOnly | /*QIODevice::Append |*/ QIODevice::Text);
|
||||
}
|
||||
|
||||
OctopiHelper::~OctopiHelper()
|
||||
@@ -133,23 +137,23 @@ OctopiHelper::~OctopiHelper()
|
||||
if (m_temporaryFile != nullptr)
|
||||
QFile::remove(m_temporaryFile->fileName());
|
||||
removeTemporaryFiles();
|
||||
|
||||
if (m_logFile.isOpen())
|
||||
m_logFile.close();
|
||||
}
|
||||
|
||||
/*
|
||||
* Logs passed str in a file called "octphelper.log" (for debugging purposes)
|
||||
* Logs received str in a file called "octphelper.log" (for debugging purposes)
|
||||
*/
|
||||
void OctopiHelper::log(const QString &str)
|
||||
{
|
||||
QString fname = QStringLiteral("/usr/lib/octopi/octphelper.log");
|
||||
QFile file(fname);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
return;
|
||||
QString dateTimeFormat = QLocale().dateTimeFormat(QLocale::ShortFormat);
|
||||
QDateTime bdt = QDateTime::currentDateTime();
|
||||
|
||||
QTextStream out(&file);
|
||||
out << str << Qt::endl;
|
||||
QTextStream out(&m_logFile);
|
||||
out << bdt.toString(dateTimeFormat) << QLatin1String(": ") << str << Qt::endl;
|
||||
|
||||
file.flush();
|
||||
file.close();
|
||||
m_logFile.flush();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -160,8 +164,8 @@ QProcessEnvironment OctopiHelper::getProcessEnvironment()
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.remove(QStringLiteral("LANG"));
|
||||
env.remove(QStringLiteral("LC_MESSAGES"));
|
||||
env.insert(QStringLiteral("LANG"), QStringLiteral("C"));
|
||||
env.insert(QStringLiteral("LC_MESSAGES"), QStringLiteral("C"));
|
||||
env.insert(QStringLiteral("LANG"), QStringLiteral("C.UTF-8"));
|
||||
env.insert(QStringLiteral("LC_MESSAGES"), QStringLiteral("C.UTF-8"));
|
||||
env.remove(QStringLiteral("COLUMNS"));
|
||||
env.insert(QStringLiteral("COLUMNS"), QStringLiteral("132"));
|
||||
return env;
|
||||
@@ -176,42 +180,74 @@ QString OctopiHelper::getProxySettings()
|
||||
return (settings.value(ctn_KEY_PROXY_SETTINGS, QLatin1String("")).toString());
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieves the PID of the given process
|
||||
*/
|
||||
pid_t OctopiHelper::findPidByName(const QString &processName)
|
||||
{
|
||||
DIR *dir = opendir("/proc");
|
||||
if (!dir) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct dirent *entry;
|
||||
while ((entry = readdir(dir)) != nullptr) {
|
||||
if (entry->d_type != DT_DIR)
|
||||
continue;
|
||||
|
||||
bool ok;
|
||||
pid_t pid = QLatin1String(entry->d_name).toInt(&ok);
|
||||
if (!ok)
|
||||
continue;
|
||||
|
||||
QString cmdPath = QStringLiteral("/proc/%1/comm").arg(pid);
|
||||
QFile cmdFile(cmdPath);
|
||||
if (cmdFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QString name = QLatin1String(cmdFile.readLine()).trimmed();
|
||||
if (name == processName) {
|
||||
closedir(dir);
|
||||
|
||||
log(QStringLiteral("Found PID %1 for process %2").arg(pid).arg(processName));
|
||||
return pid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Tests if the given process is running from the expected file path (/usr/bin)
|
||||
*/
|
||||
bool OctopiHelper::isProcessRunningFromPath(pid_t pid)
|
||||
{
|
||||
QString exeLink = QStringLiteral("/proc/%1/exe").arg(pid);
|
||||
char actualPath[PATH_MAX];
|
||||
ssize_t len = readlink(exeLink.toLocal8Bit().constData(), actualPath, sizeof(actualPath) - 1);
|
||||
if (len == -1) {
|
||||
//perror("readlink");
|
||||
return false;
|
||||
}
|
||||
|
||||
actualPath[len] = '\0';
|
||||
QString realPath = QFileInfo(QString::fromLocal8Bit(actualPath)).canonicalFilePath();
|
||||
|
||||
log(QStringLiteral("Path of PID %1 is %2").arg(pid).arg(realPath));
|
||||
return realPath.startsWith(QStringLiteral("/usr/bin"));
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if Octopi/Octopi-notifier, cache-cleaner, etc is being executed
|
||||
*/
|
||||
bool OctopiHelper::isOctoToolRunning(const QString &octoToolName)
|
||||
{
|
||||
bool res=false;
|
||||
|
||||
QProcess proc;
|
||||
proc.setProcessEnvironment(getProcessEnvironment());
|
||||
QStringList sl;
|
||||
sl << QStringLiteral("-C");
|
||||
sl << octoToolName;
|
||||
sl << QStringLiteral("-o");
|
||||
sl << QStringLiteral("command");
|
||||
proc.start(QStringLiteral("/usr/bin/ps"), sl);
|
||||
proc.waitForFinished();
|
||||
|
||||
QString out = QString::fromUtf8(proc.readAll().trimmed());
|
||||
if (out.contains(QLatin1String("|"))) return false;
|
||||
out=out.remove(QStringLiteral("\n"));
|
||||
out=out.remove(QStringLiteral("COMMAND"));
|
||||
|
||||
if (octoToolName==QLatin1String("octopi-cachecle"))
|
||||
{
|
||||
if (out == QLatin1String("/usr/bin/octopi-cachecleaner")) res=true;
|
||||
pid_t pid = findPidByName(octoToolName);
|
||||
if (pid == -1) {
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
QStringList options;
|
||||
options << QStringLiteral("/usr/bin/octopi-notifier -d");
|
||||
options << QStringLiteral("/usr/bin/octopi -d");
|
||||
options << QStringLiteral("/usr/bin/octopi -sysupgrade");
|
||||
|
||||
if (out == QLatin1String("/usr/bin/") + octoToolName || (options.indexOf(out)!=-1)) res=true;
|
||||
}
|
||||
return res;
|
||||
return isProcessRunningFromPath(pid);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -219,16 +255,14 @@ bool OctopiHelper::isOctoToolRunning(const QString &octoToolName)
|
||||
*/
|
||||
int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
{
|
||||
bool systemUpgradeCommand = false;
|
||||
bool isOctopiRunning=isOctoToolRunning(QStringLiteral("octopi"));
|
||||
bool isNotifierRunning=isOctoToolRunning(QStringLiteral("octopi-notifier"));
|
||||
bool isCacheCleanerRunning=isOctoToolRunning(QStringLiteral("octopi-cachecle"));
|
||||
|
||||
if(!isOctopiRunning &&
|
||||
!isNotifierRunning &&
|
||||
!isCacheCleanerRunning)
|
||||
if (!isOctopiRunning && !isNotifierRunning && !isCacheCleanerRunning)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious execution method - NO [/usr/bin/octopi-cachecleaner] OR [/usr/bin/octopi-notifier] OR [/usr/bin/octopi] is running..."));
|
||||
return ctn_SUSPICIOUS_EXECUTION_METHOD;
|
||||
}
|
||||
|
||||
@@ -236,8 +270,7 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
QSharedMemory *sharedMem = new QSharedMemory(QStringLiteral("org.arnt.octopi"), this);
|
||||
if (!sharedMem->attach(QSharedMemory::ReadOnly))
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Couldn't attach to memory" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Couldn't attach to memory"));
|
||||
return ctn_COULD_NOT_ATTACH_TO_MEM;
|
||||
}
|
||||
|
||||
@@ -256,8 +289,7 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
|
||||
if (suspicious)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Suspicious transaction detected -> \"" << contents << "\"" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious transaction detected -> \"") + contents + QLatin1String("\""));
|
||||
return ctn_SUSPICIOUS_ACTIONS_FILE;
|
||||
}
|
||||
|
||||
@@ -273,27 +305,34 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
if ((line == QLatin1String("killall pacman")) ||
|
||||
(line == QLatin1String("rm ") + ctn_PACMAN_DATABASE_LOCK_FILE) ||
|
||||
(line == QLatin1String("echo -e")) ||
|
||||
(line == QLatin1String("echo \"Press any key to continue...\"")) ||
|
||||
(line == QLatin1String("read -n 1 -p \"Press any key to continue...\"")) ||
|
||||
(line == QLatin1String("echo \"PAKtC\"")) ||
|
||||
(line == QLatin1String("read -n 1 -p \"PAKtC\"")) ||
|
||||
(line == QLatin1String("garuda-update")) ||
|
||||
(line == QLatin1String("pkgfile -u")) ||
|
||||
(line == QLatin1String("paccache -r -k 0")) ||
|
||||
(line == QLatin1String("paccache -r -k 1")) ||
|
||||
(line == QLatin1String("paccache -r -k 2")) ||
|
||||
(line == QLatin1String("paccache -r -k 3")) ||
|
||||
(line == QLatin1String("pacman -Fy")) ||
|
||||
(line == QLatin1String("pacman -Syu")) ||
|
||||
(line == QLatin1String("pacman -Syu --noconfirm")) ||
|
||||
(line.startsWith(QLatin1String("pacman -D --asexplicit "))) ||
|
||||
(line.startsWith(QLatin1String("pacman -D --asdeps "))) ||
|
||||
(line.startsWith(QLatin1String("pacman -S "))) ||
|
||||
(line.startsWith(QLatin1String("pacman -R "))))
|
||||
{
|
||||
if (line.startsWith(QLatin1String("pacman -S ")) ||
|
||||
if (line.startsWith(QLatin1String("pacman -D --asexplicit ")) ||
|
||||
line.startsWith(QLatin1String("pacman -D --asdeps ")) ||
|
||||
line.startsWith(QLatin1String("pacman -S ")) ||
|
||||
line.startsWith(QLatin1String("pacman -R ")))
|
||||
{
|
||||
testCommandFromOctopi=true;
|
||||
}
|
||||
else if (line.startsWith(QLatin1String("pacman -Syu")))
|
||||
else if (line.startsWith(QLatin1String("pacman -Syu")) || line == QLatin1String("garuda-update"))
|
||||
{
|
||||
testCommandFromOctopi=true;
|
||||
testCommandFromNotifier=true;
|
||||
systemUpgradeCommand=true;
|
||||
}
|
||||
else if (line.startsWith(QLatin1String("paccache -r -k")))
|
||||
{
|
||||
@@ -307,9 +346,7 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
|
||||
if (suspicious)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Suspicious transaction detected -> \"" << line << "\"" << Qt::endl;
|
||||
//log(QStringLiteral("Offending line: ") + line);
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious transaction detected -> \"") + line + QLatin1String("\""));
|
||||
return ctn_SUSPICIOUS_ACTIONS_FILE;
|
||||
}
|
||||
}
|
||||
@@ -318,16 +355,18 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
contents = contents.replace(QLatin1String("killall pacman"), QLatin1String("/usr/bin/killall pacman"));
|
||||
contents = contents.replace(QLatin1String("rm ") + ctn_PACMAN_DATABASE_LOCK_FILE, QLatin1String("/usr/bin/rm ") + ctn_PACMAN_DATABASE_LOCK_FILE);
|
||||
contents = contents.replace(QLatin1String("pkgfile -u"), QLatin1String("/usr/bin/pkgfile -u"));
|
||||
contents = contents.replace(QLatin1String("garuda-update"), QLatin1String("/usr/bin/garuda-update"));
|
||||
contents = contents.replace(QLatin1String("paccache -r"), QLatin1String("/usr/bin/paccache -r"));
|
||||
contents = contents.replace(QLatin1String("pacman -Fy"), QLatin1String("/usr/bin/pacman -Fy"));
|
||||
contents = contents.replace(QLatin1String("pacman -Syu"), QLatin1String("/usr/bin/pacman -Syu"));
|
||||
contents = contents.replace(QLatin1String("pacman -D "), QLatin1String("/usr/bin/pacman -D "));
|
||||
contents = contents.replace(QLatin1String("pacman -S "), QLatin1String("/usr/bin/pacman -S "));
|
||||
contents = contents.replace(QLatin1String("pacman -R "), QLatin1String("/usr/bin/pacman -R "));
|
||||
|
||||
//If there is a "pacman" process executing elsewhere, let's abort octopi-helper!
|
||||
if (contents != QLatin1String("/usr/bin/killall pacman\n/usr/bin/rm ") + ctn_PACMAN_DATABASE_LOCK_FILE +QLatin1Char('\n') && isAppRunning(QStringLiteral("pacman"), true))
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Pacman process already running" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Pacman process already running"));
|
||||
return ctn_PACMAN_PROCESS_EXECUTING;
|
||||
}
|
||||
|
||||
@@ -335,8 +374,7 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
{
|
||||
if (!isOctopiRunning && !testCommandFromNotifier)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious execution method -> Octopi not running"));
|
||||
return ctn_SUSPICIOUS_EXECUTION_METHOD;
|
||||
}
|
||||
|
||||
@@ -348,23 +386,21 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
{
|
||||
if (!testCommandFromNotifier)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Timeout connecting to Octopi" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout connecting to Octopi"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
else goto testNotifierConnection;
|
||||
}
|
||||
|
||||
QDataStream in(&socket);
|
||||
in.setVersion(QDataStream::Qt_5_10);
|
||||
in.setVersion(QDataStream::Qt_5_15);
|
||||
QString octopiResponse;
|
||||
|
||||
do
|
||||
{
|
||||
if (!socket.waitForReadyRead() && !testCommandFromNotifier)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Timeout contacting Octopi" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout contacting Octopi"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
@@ -378,8 +414,7 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
}
|
||||
else if (octopiResponse != QLatin1String("Octopi est occupatus") && !testCommandFromNotifier)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: No transaction being executed" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: No transaction being executed"));
|
||||
return ctn_NO_TRANSACTION_EXECUTING;
|
||||
}
|
||||
}
|
||||
@@ -389,8 +424,7 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
{
|
||||
if (!isNotifierRunning)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious execution method -> Notifier is not running"));
|
||||
return ctn_SUSPICIOUS_EXECUTION_METHOD;
|
||||
}
|
||||
|
||||
@@ -400,21 +434,19 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
|
||||
if (!socket.waitForConnected(5000))
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Timeout connecting to Octopi-Notifier" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout connecting to Octopi-Notifier"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
QDataStream in(&socket);
|
||||
in.setVersion(QDataStream::Qt_5_10);
|
||||
in.setVersion(QDataStream::Qt_5_15);
|
||||
QString octopiResponse;
|
||||
|
||||
do
|
||||
{
|
||||
if (!socket.waitForReadyRead())
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Timeout contacting Octopi-Notifier" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout contacting Octopi-Notifier"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
@@ -424,8 +456,7 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
|
||||
if (octopiResponse != QLatin1String("Octopi est occupatus"))
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: No transaction being executed" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: No transaction being executed"));
|
||||
return ctn_NO_TRANSACTION_EXECUTING;
|
||||
}
|
||||
}
|
||||
@@ -434,8 +465,7 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
{
|
||||
if (!isCacheCleanerRunning)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious execution method -> CacheCleaner is not running"));
|
||||
return ctn_SUSPICIOUS_EXECUTION_METHOD;
|
||||
}
|
||||
|
||||
@@ -445,21 +475,19 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
|
||||
if (!socket.waitForConnected(5000))
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Timeout connecting to Octopi-CacheCleaner" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout connecting to Octopi-CacheCleaner"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
QDataStream in(&socket);
|
||||
in.setVersion(QDataStream::Qt_5_10);
|
||||
in.setVersion(QDataStream::Qt_5_15);
|
||||
QString octopiResponse;
|
||||
|
||||
do
|
||||
{
|
||||
if (!socket.waitForReadyRead())
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Timeout contacting Octopi-CacheCleaner" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout contacting Octopi-CacheCleaner"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
@@ -469,8 +497,7 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
|
||||
if (octopiResponse != QLatin1String("Octopi est occupatus"))
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: No transaction being executed" << Qt::endl;
|
||||
log(QLatin1String("octopi-helper[aborted]: No transaction being executed"));
|
||||
return ctn_NO_TRANSACTION_EXECUTING;
|
||||
}
|
||||
}
|
||||
@@ -479,6 +506,19 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
QFile *ftemp = generateTemporaryFile();
|
||||
QTextStream out(ftemp);
|
||||
|
||||
out << QLatin1String("unalias -a\n");
|
||||
|
||||
// If we are going to upgrade the system, let's check if we find /usr/lib/octopi/pre-system-upgrade.sh file
|
||||
if (systemUpgradeCommand)
|
||||
{
|
||||
// If the file exists and is valid...
|
||||
if (validatePreUpgradeScript())
|
||||
{
|
||||
// Let's put it inside the command list
|
||||
out << ctn_PRE_SYSTEM_UPGRADE_SCRIPT + QLatin1Char('\n');
|
||||
}
|
||||
}
|
||||
|
||||
QString proxySettings = getProxySettings();
|
||||
if (!proxySettings.isEmpty())
|
||||
{
|
||||
@@ -488,9 +528,12 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
out << QLatin1String("export http_proxy=") + proxySettings + QLatin1Char('\n');
|
||||
else if (proxySettings.contains(QLatin1String("https://")))
|
||||
out << QLatin1String("export https_proxy=") + proxySettings + QLatin1Char('\n');
|
||||
}
|
||||
}
|
||||
|
||||
out << contents;
|
||||
|
||||
log(QLatin1String("Exec as root: ") + contents.trimmed());
|
||||
|
||||
out << QLatin1String("unalias -a\n") << contents;
|
||||
out.flush();
|
||||
ftemp->close();
|
||||
|
||||
@@ -501,3 +544,106 @@ int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
|
||||
return m_process->exitCode();
|
||||
}
|
||||
|
||||
bool OctopiHelper::isShellScript(const QString &filePath)
|
||||
{
|
||||
QFile file(filePath);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
return false;
|
||||
|
||||
QTextStream in(&file);
|
||||
QString firstLine = in.readLine().trimmed();
|
||||
|
||||
return firstLine.startsWith(QStringLiteral("#!")) && firstLine.contains(QStringLiteral("sh"));
|
||||
}
|
||||
|
||||
bool OctopiHelper::onlyAllowedCommands(const QString &filePath)
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
QSet<QString> allowedCommands = {
|
||||
QStringLiteral("echo"), QStringLiteral("checkupdates"), QStringLiteral("sudo"),
|
||||
QStringLiteral("timeshift"), QStringLiteral("if"), QStringLiteral("fi"),
|
||||
QStringLiteral("then"), QStringLiteral("grep"), QStringLiteral("awk"),
|
||||
QStringLiteral("exit"), QStringLiteral("|"), QStringLiteral(">"),
|
||||
QStringLiteral("/dev/null"), QStringLiteral("["), QStringLiteral("]"),
|
||||
QStringLiteral("rsync"), QStringLiteral("snapper"), QStringLiteral("cp")
|
||||
};
|
||||
|
||||
QFile file(filePath);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
return false;
|
||||
|
||||
QTextStream in(&file);
|
||||
while (!in.atEnd())
|
||||
{
|
||||
QString line = in.readLine().trimmed();
|
||||
|
||||
// Skip comments and empty lines
|
||||
if (line.isEmpty() || line.startsWith(QLatin1Char('#')))
|
||||
continue;
|
||||
|
||||
// Remove quoted strings (both "..." and '...')
|
||||
QRegularExpression quoted(QStringLiteral("\"[^\"]*\"|'[^']*'"));
|
||||
line.replace(quoted, QStringLiteral("")); // Remove strings inside quotes
|
||||
|
||||
// Remove parentheses/braces/quotes to simplify parsing
|
||||
line.replace(QRegularExpression(QStringLiteral("[`(){}]")), QStringLiteral(" "));
|
||||
|
||||
// Split into tokens
|
||||
QStringList tokens = line.split(QRegularExpression(QStringLiteral("\\s+")), Qt::SkipEmptyParts);
|
||||
|
||||
for (const QString &token : tokens)
|
||||
{
|
||||
if (token == QStringLiteral("|"))
|
||||
continue;
|
||||
|
||||
// Skip arguments and variables
|
||||
if (token.startsWith(QLatin1Char('-')) || token.startsWith(QLatin1Char('$')) || token[0].isDigit() || token.endsWith(QLatin1Char('=')))
|
||||
continue;
|
||||
|
||||
if (!allowedCommands.contains(token))
|
||||
{
|
||||
qout << "Forbidden command found: " << token << Qt::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OctopiHelper::validatePreUpgradeScript()
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
QString path = ctn_PRE_SYSTEM_UPGRADE_SCRIPT;
|
||||
QFileInfo fileInfo(path);
|
||||
|
||||
if (!fileInfo.exists())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Is this a symbolic link?
|
||||
if (fileInfo.isSymLink())
|
||||
fileInfo = QFileInfo(fileInfo.symLinkTarget());
|
||||
|
||||
QString realPath = fileInfo.absoluteFilePath();
|
||||
|
||||
if (!fileInfo.isFile() || !fileInfo.isReadable())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isShellScript(realPath)) {
|
||||
qout << "File is not a shell script." << Qt::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!onlyAllowedCommands(realPath))
|
||||
{
|
||||
qout << ctn_PRE_SYSTEM_UPGRADE_SCRIPT << " has forbidden commands." << Qt::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include <QString>
|
||||
#include <QProcess>
|
||||
#include <QObject>
|
||||
#include <QFile>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
@@ -35,13 +34,21 @@ Q_OBJECT
|
||||
|
||||
private:
|
||||
int m_exitCode;
|
||||
|
||||
const QString ctn_PRE_SYSTEM_UPGRADE_SCRIPT = QStringLiteral("/usr/lib/octopi/pre-system-upgrade.sh");
|
||||
QProcess *m_process;
|
||||
QProcessEnvironment getProcessEnvironment();
|
||||
QString m_suspiciousChars;
|
||||
QFile m_logFile;
|
||||
|
||||
static QFile *m_temporaryFile;
|
||||
|
||||
static QString getProxySettings();
|
||||
|
||||
pid_t findPidByName(const QString &processName);
|
||||
|
||||
bool isProcessRunningFromPath(pid_t pid);
|
||||
|
||||
static QFile* generateTemporaryFile(){
|
||||
quint32 gen = QRandomGenerator::global()->generate();
|
||||
m_temporaryFile = new QFile(ctn_TEMP_ACTIONS_FILE + QString::number(gen));
|
||||
@@ -51,6 +58,9 @@ private:
|
||||
return m_temporaryFile;
|
||||
}
|
||||
|
||||
bool isShellScript(const QString &filePath);
|
||||
bool onlyAllowedCommands(const QString &filePath);
|
||||
|
||||
public:
|
||||
OctopiHelper();
|
||||
virtual ~OctopiHelper();
|
||||
@@ -59,6 +69,8 @@ public:
|
||||
int executePkgTransactionWithSharedMem();
|
||||
inline int getExitCode() { return m_exitCode; }
|
||||
bool isOctoToolRunning(const QString &octoToolName);
|
||||
|
||||
bool validatePreUpgradeScript();
|
||||
};
|
||||
|
||||
#endif // OCTOPIHELPER_H
|
||||
|
||||
114
notifier/CMakeLists.txt
Normal file
@@ -0,0 +1,114 @@
|
||||
option(USE_QTERMWIDGET6 "Build with qtermwidget6 instead of qtermwidget5" OFF)
|
||||
option(USE_KF5NOTIFICATIONS "Build with KF5Notifications support" OFF)
|
||||
option(USE_KF6NOTIFICATIONS "Build with KF6StatusNotifierItem support" OFF)
|
||||
|
||||
if (USE_QTERMWIDGET6)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat Xml Gui Widgets Network Multimedia)
|
||||
find_package(qtermwidget6 REQUIRED)
|
||||
else()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Xml Gui Widgets Network Multimedia)
|
||||
find_package(qtermwidget5 REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(alpm_octopi_utils REQUIRED)
|
||||
|
||||
if (USE_KF5NOTIFICATIONS)
|
||||
find_package(KF5Notifications QUIET)
|
||||
endif()
|
||||
|
||||
if (USE_KF6NOTIFICATIONS)
|
||||
find_package(KF6StatusNotifierItem QUIET)
|
||||
endif()
|
||||
|
||||
if(USE_KF5NOTIFICATIONS AND NOT KF5Notifications_FOUND)
|
||||
message(WARNING "KNotifications not found. Skipping")
|
||||
endif()
|
||||
|
||||
if(USE_KF6NOTIFICATIONS AND NOT KF6StatusNotifierItem_FOUND)
|
||||
message(WARNING "KF6StatusNotifierItem not found. Skipping")
|
||||
endif()
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
set(src
|
||||
main.cpp
|
||||
mainwindow.cpp
|
||||
outputdialog.cpp
|
||||
../src/QtSolutions/qtsingleapplication.cpp
|
||||
../src/QtSolutions/qtlocalpeer.cpp
|
||||
../src/terminal.cpp
|
||||
../src/unixcommand.cpp
|
||||
../src/package.cpp
|
||||
../src/wmhelper.cpp
|
||||
../src/strconstants.cpp
|
||||
../src/settingsmanager.cpp
|
||||
../src/utils.cpp
|
||||
../src/transactiondialog.cpp
|
||||
../src/argumentlist.cpp
|
||||
../src/pacmanexec.cpp
|
||||
../src/searchlineedit.cpp
|
||||
../src/searchbar.cpp
|
||||
../src/optionsdialog.cpp
|
||||
../src/termwidget.cpp
|
||||
../src/aurvote.cpp
|
||||
../src/qaesencryption.cpp
|
||||
../src/alpmbackend.cpp)
|
||||
|
||||
set(header
|
||||
mainwindow.h
|
||||
outputdialog.h
|
||||
../src/QtSolutions/qtsingleapplication.h
|
||||
../src/QtSolutions/qtlocalpeer.h
|
||||
../src/uihelper.h
|
||||
../src/terminal.h
|
||||
../src/unixcommand.h
|
||||
../src/wmhelper.h
|
||||
../src/strconstants.h
|
||||
../src/package.h
|
||||
../src/utils.h
|
||||
../src/transactiondialog.h
|
||||
../src/argumentlist.h
|
||||
../src/pacmanexec.h
|
||||
../src/searchlineedit.h
|
||||
../src/searchbar.h
|
||||
../src/optionsdialog.h
|
||||
../src/termwidget.h
|
||||
../src/aurvote.h
|
||||
../src/qaesencryption.h
|
||||
../src/alpmbackend.h)
|
||||
|
||||
set(ui ../ui/transactiondialog.ui ../ui/optionsdialog.ui)
|
||||
|
||||
set(qrc ../resources.qrc)
|
||||
|
||||
qt_wrap_ui(src ${ui})
|
||||
qt_add_resources(src ${qrc})
|
||||
|
||||
add_executable(octopi-notifier ${src} ${header})
|
||||
target_compile_definitions(octopi-notifier PRIVATE OCTOPI_EXTENSIONS ALPM_BACKEND QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY)
|
||||
|
||||
if (USE_QTERMWIDGET6)
|
||||
target_include_directories(octopi-notifier PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt6Core_INCLUDE_DIRS} ${Qt6Xml_INCLUDE_DIRS} ${Qt6Gui_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi-notifier PRIVATE Qt6::Core Qt6::Xml Qt6::Gui Qt6::Widgets Qt6::Network Qt6::Multimedia qtermwidget6 alpm_octopi_utils)
|
||||
|
||||
if(USE_KF6NOTIFICATIONS AND KF6StatusNotifierItem_FOUND)
|
||||
target_compile_definitions(octopi-notifier PRIVATE KSTATUS)
|
||||
find_package(Qt6 REQUIRED COMPONENTS DBus)
|
||||
target_include_directories(octopi-notifier PRIVATE ${Qt6DBus_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi-notifier PRIVATE Qt6::DBus KF6::StatusNotifierItem)
|
||||
endif()
|
||||
else()
|
||||
target_include_directories(octopi-notifier PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi-notifier PRIVATE Qt5::Core Qt5::Xml Qt5::Gui Qt5::Widgets Qt5::Network Qt5::Multimedia qtermwidget5 alpm_octopi_utils)
|
||||
|
||||
if(USE_KF5NOTIFICATIONS AND KF5Notifications_FOUND)
|
||||
target_compile_definitions(octopi-notifier PRIVATE KSTATUS)
|
||||
find_package(Qt5 REQUIRED COMPONENTS DBus)
|
||||
target_include_directories(octopi-notifier PRIVATE ${Qt5DBus_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi-notifier PRIVATE Qt5::DBus KF5::Notifications)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS octopi-notifier RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-notifier.desktop" DESTINATION share/applications)
|
||||
#install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-notifier.desktop" DESTINATION /etc/xdg/autostart)
|
||||
@@ -24,8 +24,10 @@
|
||||
#include "../src/argumentlist.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include "../src/QtSolutions/qtsingleapplication.h"
|
||||
//#include <QApplication>
|
||||
#include <QtGui>
|
||||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
|
||||
#define NO_GTK_STYLE
|
||||
@@ -42,14 +44,14 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (debugInfo)
|
||||
qDebug() << QString(QLatin1String("Octopi Notifier - ") + StrConstants::getApplicationVersion() +
|
||||
QLatin1String(" (") + StrConstants::getQtVersion() + QLatin1String(")"));
|
||||
qDebug() << QLatin1String("Octopi Notifier - ") + ctn_APPLICATION_VERSION +
|
||||
QLatin1String(" (") + StrConstants::getQtVersion() + QLatin1String(")");
|
||||
|
||||
if (UnixCommand::isAppRunning(QStringLiteral("octopi-notifier")))
|
||||
/*if (UnixCommand::isAppRunning(QStringLiteral("octopi-notifier")))
|
||||
{
|
||||
qDebug() << "Aborting notifier as another instance is already running!";
|
||||
return (-1);
|
||||
}
|
||||
}*/
|
||||
|
||||
if (!QFile::exists(ctn_CHECKUPDATES_BINARY))
|
||||
{
|
||||
@@ -65,26 +67,67 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!QFile::exists(ctn_OCTOPISUDO))
|
||||
{
|
||||
qDebug() << "Aborting notifier as 'octopi-sudo' binary could not be found! [" << ctn_OCTOPISUDO << "]";
|
||||
qDebug() << "Aborting notifier as 'qt-sudo' binary could not be found! [" << ctn_OCTOPISUDO << "]";
|
||||
return (-4);
|
||||
}
|
||||
|
||||
//QApplication a(argc, argv);
|
||||
QtSingleApplication a(QLatin1String("NotifierOcto"), argc, argv);
|
||||
|
||||
if (a.isRunning())
|
||||
{
|
||||
if (argList->getSwitch(QStringLiteral("-checkupdates")))
|
||||
{
|
||||
a.sendMessage(QStringLiteral("NOTIFIER_CHECKUPDATES"));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
else if (argList->getSwitch(QStringLiteral("-checkupdates")))
|
||||
{
|
||||
return -7; //We are not running, so nothing to check...
|
||||
}
|
||||
|
||||
QTranslator appTranslator;
|
||||
bool success = appTranslator.load(QLatin1String(":/resources/translations/octopi_") +
|
||||
QLocale::system().name());
|
||||
if (!success)
|
||||
{
|
||||
success = appTranslator.load(QStringLiteral(":/resources/translations/octopi_en.qm"));
|
||||
}
|
||||
|
||||
a.installTranslator(&appTranslator);
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
|
||||
if (!UnixCommand::isOctoToolRunning(QStringLiteral("octopi-notifier")))
|
||||
{
|
||||
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunOctopiNotifierAsUsrBin());
|
||||
return (-6);
|
||||
}
|
||||
|
||||
if (UnixCommand::isRootRunning()){
|
||||
qDebug() << StrConstants::getErrorRunningWithRoot();
|
||||
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunningWithRoot());
|
||||
return (-5);
|
||||
}
|
||||
|
||||
QApplication a(argc, argv);
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load(QLatin1String(":/resources/translations/octopi_") +
|
||||
QLocale::system().name());
|
||||
a.installTranslator(&appTranslator);
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
unsetenv("TMPDIR");
|
||||
|
||||
setenv("COLORTERM", "truecolor", 1);
|
||||
setenv("TERM", "xterm-256color", 1);
|
||||
|
||||
QString buildDir=SettingsManager::getAURBuildDir();
|
||||
if (!buildDir.isEmpty())
|
||||
{
|
||||
setenv("BUILDDIR", buildDir.toLatin1().data(), 1);
|
||||
}
|
||||
|
||||
MainWindow w;
|
||||
|
||||
QObject::connect(&a, SIGNAL(notifierCheckUpdates()), &w, SLOT(doCheckUpdates()));
|
||||
|
||||
a.setActivationWindow(&w);
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
|
||||
if (w.startServer())
|
||||
{
|
||||
QResource::registerResource(QStringLiteral("./resources.qrc"));
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "../src/package.h"
|
||||
#include "../src/transactiondialog.h"
|
||||
#include "../src/optionsdialog.h"
|
||||
#include "../src/utils.h"
|
||||
|
||||
#include <QTimer>
|
||||
#include <QSystemTrayIcon>
|
||||
@@ -36,7 +37,7 @@
|
||||
#include <QScreen>
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
#include <QThreadPool>
|
||||
|
||||
#ifdef KSTATUS
|
||||
#include <kstatusnotifieritem.h>
|
||||
@@ -85,6 +86,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
UnixCommand::removeTemporaryNotifierFiles();
|
||||
|
||||
#ifdef KSTATUS
|
||||
delete m_systemTrayIcon;
|
||||
#endif
|
||||
@@ -102,14 +105,13 @@ bool MainWindow::isOctopiBusy()
|
||||
|
||||
QTcpSocket socket;
|
||||
socket.connectToHost(QStringLiteral("127.0.0.1"), 12701);
|
||||
|
||||
if (!socket.waitForConnected(5000))
|
||||
{
|
||||
res=false;
|
||||
}
|
||||
|
||||
QDataStream in(&socket);
|
||||
in.setVersion(QDataStream::Qt_5_10);
|
||||
in.setVersion(QDataStream::Qt_5_15);
|
||||
QString octopiResponse;
|
||||
|
||||
do
|
||||
@@ -123,16 +125,7 @@ bool MainWindow::isOctopiBusy()
|
||||
in >> octopiResponse;
|
||||
} while (!in.commitTransaction());
|
||||
|
||||
if (octopiResponse != QLatin1String("Octopi est occupatus"))
|
||||
{
|
||||
res=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
res=true; //Octopi is executing an action!
|
||||
}
|
||||
|
||||
return res;
|
||||
return octopiResponse == QLatin1String("Octopi est occupatus");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -154,7 +147,7 @@ bool MainWindow::canOctopiUpgrade()
|
||||
}
|
||||
|
||||
QDataStream in(&socket);
|
||||
in.setVersion(QDataStream::Qt_5_10);
|
||||
in.setVersion(QDataStream::Qt_5_15);
|
||||
QString octopiResponse;
|
||||
|
||||
do
|
||||
@@ -168,16 +161,7 @@ bool MainWindow::canOctopiUpgrade()
|
||||
in >> octopiResponse;
|
||||
} while (!in.commitTransaction());
|
||||
|
||||
if (octopiResponse != QLatin1String("Renovatio potest"))
|
||||
{
|
||||
res=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
res=true; //Octopi has outdated packages!
|
||||
}
|
||||
|
||||
return res;
|
||||
return octopiResponse == QLatin1String("Renovatio potest");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -208,7 +192,7 @@ void MainWindow::initActions()
|
||||
m_actionCheckUpdates->setIconVisibleInMenu(true);
|
||||
m_actionCheckUpdates->setText(StrConstants::getCheckUpdates());
|
||||
m_actionCheckUpdates->setIcon(IconHelper::getIconCheckUpdates());
|
||||
connect(m_actionCheckUpdates, SIGNAL(triggered()), this, SLOT(checkUpdates()));
|
||||
connect(m_actionCheckUpdates, SIGNAL(triggered()), this, SLOT(runOctopiCheckUpdates()));
|
||||
|
||||
m_actionSystemUpgrade = new QAction(this);
|
||||
m_actionSystemUpgrade->setIconVisibleInMenu(true);
|
||||
@@ -246,7 +230,7 @@ void MainWindow::onSendInfoToOctopiHelper()
|
||||
QString msg;
|
||||
QByteArray block;
|
||||
QDataStream out(&block, QIODevice::WriteOnly);
|
||||
out.setVersion(QDataStream::Qt_5_10);
|
||||
out.setVersion(QDataStream::Qt_5_15);
|
||||
|
||||
//Is octopi-helper running?
|
||||
bool isHelperExecuting=UnixCommand::isOctopiHelperRunning();
|
||||
@@ -268,6 +252,7 @@ void MainWindow::onSendInfoToOctopiHelper()
|
||||
}
|
||||
|
||||
QTcpSocket *clientConnection = m_tcpServer->nextPendingConnection();
|
||||
|
||||
if (clientConnection->isOpen())
|
||||
{
|
||||
if (m_outputDialog != nullptr)
|
||||
@@ -294,7 +279,7 @@ void MainWindow::initSystemTrayIcon()
|
||||
m_outdatedStringList = new QStringList();
|
||||
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon = new KStatusNotifierItem(0);
|
||||
m_systemTrayIcon = new KStatusNotifierItem(nullptr);
|
||||
#else
|
||||
m_systemTrayIcon = new QSystemTrayIcon(this);
|
||||
#endif
|
||||
@@ -319,6 +304,8 @@ void MainWindow::initSystemTrayIcon()
|
||||
m_systemTrayIconMenu->addAction(m_actionSystemUpgrade);
|
||||
m_systemTrayIconMenu->addSeparator();
|
||||
m_systemTrayIconMenu->addAction(m_actionOptions);
|
||||
m_actionOptions->setText(m_actionOptions->text().remove(QLatin1String("&")));
|
||||
|
||||
m_systemTrayIconMenu->addSeparator();
|
||||
m_systemTrayIconMenu->addAction(m_actionAbout);
|
||||
m_systemTrayIconMenu->addAction(m_actionExit);
|
||||
@@ -330,8 +317,8 @@ void MainWindow::initSystemTrayIcon()
|
||||
connect (m_systemTrayIcon, SIGNAL(activateRequested(bool,QPoint)),
|
||||
this, SLOT(execSystemTrayKF5()) );
|
||||
#else
|
||||
connect ( m_systemTrayIcon , SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ),
|
||||
this, SLOT( execSystemTrayActivated ( QSystemTrayIcon::ActivationReason ) ) );
|
||||
connect ( m_systemTrayIcon , SIGNAL( activated(QSystemTrayIcon::ActivationReason) ),
|
||||
this, SLOT( execSystemTrayActivated (QSystemTrayIcon::ActivationReason) ) );
|
||||
#endif
|
||||
|
||||
m_pacmanHelperTimer = new QTimer();
|
||||
@@ -396,7 +383,7 @@ void MainWindow::pacmanHelperTimerTimeout()
|
||||
lastCheckTime.isNull() ||
|
||||
lastCheckTime.daysTo(now) >= 1)) || (checkUpdatesTime))
|
||||
{
|
||||
checkUpdates(ectn_AUTO_CHECK);
|
||||
doCheckUpdates(ectn_AUTO_CHECK);
|
||||
//Then we set new LastCheckTime...
|
||||
SettingsManager::setLastCheckUpdatesTime(now);
|
||||
}
|
||||
@@ -405,7 +392,7 @@ void MainWindow::pacmanHelperTimerTimeout()
|
||||
{
|
||||
if (lastCheckTime.isNull() || now.addSecs(-(checkUpdatesInterval * 60)) >= lastCheckTime)
|
||||
{
|
||||
checkUpdates(ectn_AUTO_CHECK);
|
||||
doCheckUpdates(ectn_AUTO_CHECK);
|
||||
//Then we set new LastCheckTime...
|
||||
SettingsManager::setLastCheckUpdatesTime(now);
|
||||
}
|
||||
@@ -452,16 +439,21 @@ void MainWindow::aboutOctopiNotifier()
|
||||
fake->setGeometry(sc->geometry());
|
||||
|
||||
QString aboutText = QStringLiteral("<b>Octopi Notifier</b><br>");
|
||||
aboutText += StrConstants::getVersion() + QLatin1String(": ") + StrConstants::getApplicationVersion() + QLatin1String("</b>") + QLatin1String(" - ") + StrConstants::getQtVersion() + QLatin1String("<br>");
|
||||
aboutText += StrConstants::getURL() + QLatin1String(": ") + QLatin1String("<a href=\"https://tintaescura.com/projects/octopi/\">https://tintaescura.com/projects/octopi</a><br>");
|
||||
aboutText += StrConstants::getLicenses() + QLatin1String(": ") + QLatin1String("<a href=\"http://www.gnu.org/licenses/gpl-2.0.html\">GPL v2</a><br>");
|
||||
aboutText += StrConstants::getVersion() + QLatin1String(": ") +
|
||||
ctn_APPLICATION_VERSION /*StrConstants::getApplicationVersion()*/ + QLatin1String("</b>") +
|
||||
QLatin1String(" - ") + StrConstants::getQtVersion() + QLatin1String("<br>");
|
||||
aboutText += StrConstants::getURL() + QLatin1String(": ") +
|
||||
QLatin1String("<a href=\"https://tintaescura.com/projects/octopi/\">https://tintaescura.com/projects/octopi</a><br>");
|
||||
aboutText += StrConstants::getLicenses() + QLatin1String(": ") +
|
||||
QLatin1String("<a href=\"http://www.gnu.org/licenses/gpl-2.0.html\">GPL v2</a><br>");
|
||||
aboutText += QLatin1String("© Alexandre Albuquerque Arnt<br><br>");
|
||||
|
||||
aboutText += QLatin1String("<b>Pacman</b><br>");
|
||||
QString pacmanV = UnixCommand::getPacmanVersion();
|
||||
if (pacmanV.at(0) == QLatin1Char('v')) pacmanV.remove(0, 1);
|
||||
aboutText += StrConstants::getVersion() + QLatin1String(": ") + pacmanV + QLatin1String("<br>");
|
||||
aboutText += StrConstants::getURL() + QLatin1String(": ") + QLatin1String("<a href=\"https://www.archlinux.org/pacman/\">https://www.archlinux.org/pacman</a><br>");
|
||||
aboutText += StrConstants::getURL() + QLatin1String(": ") +
|
||||
QLatin1String("<a href=\"https://www.archlinux.org/pacman/\">https://www.archlinux.org/pacman</a><br>");
|
||||
QDate d = QDate::currentDate();
|
||||
aboutText += QLatin1String("© 2006-%1 Pacman Development Team<br>");
|
||||
aboutText += QLatin1String("© 2002-2006 Judd Vinet");
|
||||
@@ -476,8 +468,8 @@ void MainWindow::aboutOctopiNotifier()
|
||||
* Hides Octopi
|
||||
*/
|
||||
void MainWindow::hideOctopi()
|
||||
{
|
||||
QProcess::startDetached(QStringLiteral("octopi"), QStringList() << QStringLiteral("-hide"));
|
||||
{
|
||||
QProcess::startDetached(QStringLiteral("/usr/bin/octopi"), QStringList() << QStringLiteral("-hide"));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -485,7 +477,7 @@ void MainWindow::hideOctopi()
|
||||
*/
|
||||
void MainWindow::showOctopi()
|
||||
{
|
||||
QProcess::startDetached(QStringLiteral("octopi"), QStringList() << QStringLiteral("-show"));
|
||||
QProcess::startDetached(QStringLiteral("/usr/bin/octopi"), QStringList() << QStringLiteral("-show"));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -524,9 +516,11 @@ void MainWindow::doSystemUpgrade()
|
||||
|
||||
if (isOctopiBusy()) return;
|
||||
|
||||
if(!SettingsManager::getEnableConfirmationDialogInSysUpgrade())
|
||||
bool isGarudaLinux = UnixCommand::getLinuxDistro() == ectn_GARUDALINUX;
|
||||
|
||||
if(isGarudaLinux || SettingsManager::getAlwaysUseTheTerminal() || !SettingsManager::getEnableConfirmationDialogInSysUpgrade())
|
||||
{
|
||||
if( (m_checkUpdatesStringList.count() != 0 && m_checkUpdatesStringList.contains(QStringLiteral("pacman"))) ||
|
||||
if(isGarudaLinux || SettingsManager::getAlwaysUseTheTerminal() || (m_checkUpdatesStringList.count() != 0 && m_checkUpdatesStringList.contains(QStringLiteral("pacman"))) ||
|
||||
(m_outdatedStringList->count() != 0 && m_outdatedStringList->contains(QStringLiteral("pacman"))) )
|
||||
{
|
||||
m_systemUpgradeDialog = false;
|
||||
@@ -538,7 +532,7 @@ void MainWindow::doSystemUpgrade()
|
||||
m_outputDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_outputDialog->setViewAsTextBrowser(false);
|
||||
QObject::connect(m_outputDialog, SIGNAL( finished(int)),
|
||||
this, SLOT( doSystemUpgradeFinished() ));
|
||||
this, SLOT( doSystemUpgradeFinished(int) ));
|
||||
|
||||
m_commandExecuting = ectn_RUN_SYSTEM_UPGRADE_IN_TERMINAL;
|
||||
toggleEnableInterface(false);
|
||||
@@ -562,7 +556,7 @@ void MainWindow::doSystemUpgrade()
|
||||
m_outputDialog->setDebugMode(true);
|
||||
|
||||
QObject::connect(m_outputDialog, SIGNAL( finished(int)),
|
||||
this, SLOT( doSystemUpgradeFinished() ));
|
||||
this, SLOT( doSystemUpgradeFinished(int) ));
|
||||
setUpgradingTooltip();
|
||||
m_outputDialog->show();
|
||||
m_outputDialog->doSystemUpgrade();
|
||||
@@ -600,7 +594,7 @@ void MainWindow::doSystemUpgrade()
|
||||
if (m_checkUpdatesStringList.count() > m_outdatedStringList->count())
|
||||
{
|
||||
targets->clear();
|
||||
for(const auto &name : qAsConst(m_checkUpdatesStringList))
|
||||
for(const auto &name : std::as_const(m_checkUpdatesStringList))
|
||||
{
|
||||
PackageListData aux;
|
||||
aux = PackageListData(name, m_checkUpdatesNameNewVersion->value(name), QStringLiteral("0"));
|
||||
@@ -608,13 +602,15 @@ void MainWindow::doSystemUpgrade()
|
||||
}
|
||||
}
|
||||
|
||||
for(const auto &target : qAsConst(*targets))
|
||||
for(const auto &target : std::as_const(*targets))
|
||||
{
|
||||
totalDownloadSize += target.downloadSize;
|
||||
list = list + target.name + QLatin1Char('-') + target.version + QLatin1Char('\n');
|
||||
}
|
||||
list.remove(list.size()-1, 1);
|
||||
|
||||
if (totalDownloadSize == 0) totalDownloadSize = UnixCommand::getCheckUpdatesSize();
|
||||
|
||||
QString ds = Package::kbytesToSize(totalDownloadSize);
|
||||
m_transactionDialog = new TransactionDialog(this);
|
||||
m_transactionDialog->setWindowFlags(m_transactionDialog->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
@@ -648,7 +644,7 @@ void MainWindow::doSystemUpgrade()
|
||||
m_outputDialog->setDebugMode(true);
|
||||
|
||||
QObject::connect(m_outputDialog, SIGNAL( finished(int)),
|
||||
this, SLOT( doSystemUpgradeFinished() ));
|
||||
this, SLOT( doSystemUpgradeFinished(int) ));
|
||||
setUpgradingTooltip();
|
||||
m_outputDialog->show();
|
||||
m_outputDialog->doSystemUpgrade();
|
||||
@@ -664,7 +660,7 @@ void MainWindow::doSystemUpgrade()
|
||||
m_outputDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_outputDialog->setViewAsTextBrowser(false);
|
||||
QObject::connect(m_outputDialog, SIGNAL( finished(int)),
|
||||
this, SLOT( doSystemUpgradeFinished() ));
|
||||
this, SLOT( doSystemUpgradeFinished(int) ));
|
||||
|
||||
m_commandExecuting = ectn_RUN_SYSTEM_UPGRADE_IN_TERMINAL;
|
||||
toggleEnableInterface(false);
|
||||
@@ -692,7 +688,7 @@ void MainWindow::doAURUpgrade()
|
||||
QString listOfTargets;
|
||||
QString auxPkg;
|
||||
|
||||
for(const QString &pkg : qAsConst(*m_outdatedAURStringList))
|
||||
for(const QString &pkg : std::as_const(*m_outdatedAURStringList))
|
||||
{
|
||||
auxPkg = pkg;
|
||||
auxPkg.remove(QStringLiteral("[1;39m"));
|
||||
@@ -710,7 +706,7 @@ void MainWindow::doAURUpgrade()
|
||||
m_outputDialog->setListOfAURPackagesToUpgrade(listOfTargets);
|
||||
|
||||
QObject::connect(m_outputDialog, SIGNAL( finished(int)),
|
||||
this, SLOT( doSystemUpgradeFinished() ));
|
||||
this, SLOT( doSystemUpgradeFinished(int) ));
|
||||
m_outputDialog->show();
|
||||
m_outputDialog->doAURUpgrade();
|
||||
}
|
||||
@@ -718,16 +714,27 @@ void MainWindow::doAURUpgrade()
|
||||
/*
|
||||
* When system upgrade process has finished...
|
||||
*/
|
||||
void MainWindow::doSystemUpgradeFinished()
|
||||
void MainWindow::doSystemUpgradeFinished(int exitCode)
|
||||
{
|
||||
m_commandExecuting = ectn_NONE;
|
||||
m_checkUpdatesStringList.clear();
|
||||
m_checkUpdatesNameNewVersion->clear();
|
||||
m_numberOfCheckUpdatesPackages=0;
|
||||
QObject::disconnect(m_outputDialog, SIGNAL( finished(int)),
|
||||
this, SLOT( doSystemUpgradeFinished(int) ));
|
||||
|
||||
m_callRefreshAppIcon->start();
|
||||
/*refreshAppIcon();
|
||||
toggleEnableInterface(true);*/
|
||||
//qDebug() << "doSystemUpgradeFinished(): " << exitCode << Qt::endl;
|
||||
m_outputDialog = nullptr;
|
||||
m_commandExecuting = ectn_NONE;
|
||||
|
||||
if (exitCode == 0)
|
||||
{
|
||||
m_checkUpdatesStringList.clear();
|
||||
m_checkUpdatesNameNewVersion->clear();
|
||||
m_numberOfCheckUpdatesPackages=0;
|
||||
m_callRefreshAppIcon->start();
|
||||
}
|
||||
else
|
||||
{
|
||||
toggleEnableInterface(true);
|
||||
refreshOutdatedPkgsTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -750,6 +757,7 @@ void MainWindow::toggleEnableInterface(bool state)
|
||||
m_actionOptions->setEnabled(state);
|
||||
m_actionSystemUpgrade->setEnabled(state);
|
||||
m_actionAURUpgrade->setEnabled(state);
|
||||
m_actionAbout->setEnabled(state);
|
||||
m_actionExit->setEnabled(state);
|
||||
}
|
||||
|
||||
@@ -777,7 +785,7 @@ void MainWindow::afterCheckUpdates(int exitCode, QProcess::ExitStatus)
|
||||
|
||||
m_commandExecuting = ectn_NONE;
|
||||
|
||||
for(const QString &line : qAsConst(checkUpdatesList))
|
||||
for(const QString &line : std::as_const(checkUpdatesList))
|
||||
{
|
||||
QStringList aux = line.split(QStringLiteral(" "), Qt::SkipEmptyParts);
|
||||
|
||||
@@ -881,8 +889,10 @@ bool MainWindow::isInternetAvailable()
|
||||
/*
|
||||
* Called every time user selects "Check updates..." menu option
|
||||
*/
|
||||
void MainWindow::checkUpdates(CheckUpdate check)
|
||||
void MainWindow::doCheckUpdates(CheckUpdate check)
|
||||
{
|
||||
if (m_commandExecuting != ectn_NONE) return;
|
||||
|
||||
if (check == ectn_AUTO_CHECK)
|
||||
{
|
||||
if (SettingsManager::getEnableInternetChecking() && !UnixCommand::hasInternetConnection()) return;
|
||||
@@ -892,8 +902,8 @@ void MainWindow::checkUpdates(CheckUpdate check)
|
||||
if (SettingsManager::getEnableInternetChecking() && !isInternetAvailable()) return;
|
||||
}
|
||||
|
||||
disconnect(m_pacmanDatabaseSystemWatcher,
|
||||
SIGNAL(directoryChanged(QString)), this, SLOT(refreshAppIcon()));
|
||||
//disconnect(m_pacmanDatabaseSystemWatcher,
|
||||
// SIGNAL(directoryChanged(QString)), this, SLOT(refreshAppIcon()));
|
||||
|
||||
QTime now;
|
||||
if (m_debugInfo)
|
||||
@@ -931,7 +941,66 @@ void MainWindow::checkUpdates(CheckUpdate check)
|
||||
m_pacmanExec = new PacmanExec(this);
|
||||
m_commandExecuting = ectn_CHECK_UPDATES;
|
||||
m_pacmanExec->doCheckUpdates();
|
||||
connect(m_pacmanExec, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(afterCheckUpdates(int, QProcess::ExitStatus)));
|
||||
connect(m_pacmanExec, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(afterCheckUpdates(int,QProcess::ExitStatus)));
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks the number of outdated packages (pacman/AUR) to refresh notifier's tooltip
|
||||
*/
|
||||
void MainWindow::refreshOutdatedPkgsTooltip()
|
||||
{
|
||||
if (m_numberOfOutdatedPackages == 0 && m_numberOfOutdatedAURPackages == 0)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(QLatin1String("Octopi Notifier"));
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(QStringLiteral("Octopi Notifier"));
|
||||
#endif
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 0)
|
||||
{
|
||||
if (m_numberOfOutdatedPackages == 1)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(StrConstants::getOneNewUpdate());
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate());
|
||||
#endif
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 1)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(
|
||||
StrConstants::getNewUpdates(m_numberOfOutdatedPackages));
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates(m_numberOfOutdatedPackages));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (m_numberOfOutdatedAURPackages > 0)
|
||||
{
|
||||
if (m_numberOfOutdatedAURPackages == 1)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(StrConstants::getOneNewUpdate() +
|
||||
QLatin1String(" (") + StrConstants::getForeignRepositoryName() + QLatin1Char(')'));
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate() +
|
||||
QLatin1String(" (") + StrConstants::getForeignRepositoryName() + QLatin1Char(')'));
|
||||
#endif
|
||||
}
|
||||
else if (m_numberOfOutdatedAURPackages > 1)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(
|
||||
StrConstants::getNewUpdates(m_numberOfOutdatedAURPackages) +
|
||||
QLatin1String(" (") + StrConstants::getForeignRepositoryName() + QLatin1Char(')'));
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates(m_numberOfOutdatedAURPackages) +
|
||||
QLatin1String(" (") + StrConstants::getForeignRepositoryName() + QLatin1Char(')'));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -941,6 +1010,8 @@ void MainWindow::refreshAppIcon()
|
||||
{
|
||||
if (m_commandExecuting != ectn_NONE) return;
|
||||
|
||||
if (isOctopiBusy()) return;
|
||||
|
||||
if (m_pacmanExec != nullptr)
|
||||
{
|
||||
delete m_pacmanExec;
|
||||
@@ -988,58 +1059,7 @@ void MainWindow::refreshAppIcon()
|
||||
if (m_numberOfOutdatedPackages < m_numberOfCheckUpdatesPackages)
|
||||
m_numberOfOutdatedPackages=m_numberOfCheckUpdatesPackages;
|
||||
|
||||
if (m_numberOfOutdatedPackages == 0 && m_numberOfOutdatedAURPackages == 0)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(QLatin1String("Octopi Notifier"));
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(QStringLiteral("Octopi Notifier"));
|
||||
#endif
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 0)
|
||||
{
|
||||
if (m_numberOfOutdatedPackages == 1)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(StrConstants::getOneNewUpdate());
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate());
|
||||
#endif
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 1)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(
|
||||
StrConstants::getNewUpdates(m_numberOfOutdatedPackages));
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates(m_numberOfOutdatedPackages));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (m_numberOfOutdatedAURPackages > 0)
|
||||
{
|
||||
if (m_numberOfOutdatedAURPackages == 1)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(StrConstants::getOneNewUpdate() +
|
||||
QLatin1String(" (") + StrConstants::getForeignRepositoryName() + QLatin1Char(')'));
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate() +
|
||||
QLatin1String(" (") + StrConstants::getForeignRepositoryName() + QLatin1Char(')'));
|
||||
#endif
|
||||
}
|
||||
else if (m_numberOfOutdatedAURPackages > 1)
|
||||
{
|
||||
#ifdef KSTATUS
|
||||
m_systemTrayIcon->setToolTipSubTitle(
|
||||
StrConstants::getNewUpdates(m_numberOfOutdatedAURPackages) +
|
||||
QLatin1String(" (") + StrConstants::getForeignRepositoryName() + QLatin1Char(')'));
|
||||
#else
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates(m_numberOfOutdatedAURPackages) +
|
||||
QLatin1String(" (") + StrConstants::getForeignRepositoryName() + QLatin1Char(')'));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
refreshOutdatedPkgsTooltip();
|
||||
|
||||
if(m_numberOfOutdatedPackages > 0) //RED ICON!
|
||||
{
|
||||
@@ -1101,7 +1121,7 @@ void MainWindow::refreshAppIcon()
|
||||
SIGNAL(directoryChanged(QString)), this, SLOT(refreshAppIcon()));
|
||||
|
||||
if (m_outdatedStringList->count() > 0)
|
||||
QtConcurrent::run(UnixCommand::execCommandAsNormalUserExt, ctn_PACMAN_SUP_COMMAND);
|
||||
QThreadPool::globalInstance()->start(new ExecCommandAsNormalUserExtTask());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1219,17 +1239,30 @@ void MainWindow::runOctopi(ExecOpt execOptions)
|
||||
{
|
||||
if (execOptions == ectn_SYSUPGRADE_NOCONFIRM_EXEC_OPT && canOctopiUpgrade())
|
||||
{
|
||||
QProcess::startDetached(QStringLiteral("octopi"), QStringList() << QStringLiteral("-sysupgrade-noconfirm"));
|
||||
QProcess::startDetached(QStringLiteral("/usr/bin/octopi"), QStringList() << QStringLiteral("-sysupgrade-noconfirm"));
|
||||
}
|
||||
else if (execOptions == ectn_CHECKUPDATES_EXEC_OPT) //&&
|
||||
//!UnixCommand::isAppRunning(QStringLiteral("octopi"), true))
|
||||
{
|
||||
doCheckUpdates();
|
||||
}
|
||||
/*else if (execOptions == ectn_CHECKUPDATES_EXEC_OPT &&
|
||||
UnixCommand::isAppRunning(QStringLiteral("octopi"), true))
|
||||
{
|
||||
QProcess::startDetached(QStringLiteral("/usr/bin/octopi"), QStringList() << QStringLiteral("-checkupdates"));
|
||||
}*/
|
||||
else if (execOptions == ectn_SYSUPGRADE_EXEC_OPT &&
|
||||
(!UnixCommand::isAppRunning(QStringLiteral("octopi"), true) || !canOctopiUpgrade()) && (m_outdatedStringList->count() > 0 || m_checkUpdatesStringList.count() > 0))
|
||||
(!UnixCommand::isAppRunning(QStringLiteral("octopi"), true) ||
|
||||
!canOctopiUpgrade()) && (m_outdatedStringList->count() > 0 ||
|
||||
m_checkUpdatesStringList.count() > 0))
|
||||
{
|
||||
doSystemUpgrade();
|
||||
}
|
||||
else if (execOptions == ectn_SYSUPGRADE_EXEC_OPT && canOctopiUpgrade() &&
|
||||
UnixCommand::isAppRunning(QStringLiteral("octopi"), true) && (m_outdatedStringList->count() > 0 || m_checkUpdatesStringList.count() > 0))
|
||||
UnixCommand::isAppRunning(QStringLiteral("octopi"), true) &&
|
||||
(m_outdatedStringList->count() > 0 || m_checkUpdatesStringList.count() > 0))
|
||||
{
|
||||
QProcess::startDetached(QStringLiteral("octopi"), QStringList() << QStringLiteral("-sysupgrade"));
|
||||
QProcess::startDetached(QStringLiteral("/usr/bin/octopi"), QStringList() << QStringLiteral("-sysupgrade"));
|
||||
}
|
||||
else if (execOptions == ectn_AUR_UPGRADE_EXEC_OPT &&
|
||||
(!UnixCommand::isAppRunning(QStringLiteral("octopi"), true) || !canOctopiUpgrade()) && m_outdatedAURStringList->count() > 0)
|
||||
@@ -1239,14 +1272,22 @@ void MainWindow::runOctopi(ExecOpt execOptions)
|
||||
else if (execOptions == ectn_AUR_UPGRADE_EXEC_OPT && canOctopiUpgrade() &&
|
||||
UnixCommand::isAppRunning(QStringLiteral("octopi"), true) && m_outdatedAURStringList->count() > 0)
|
||||
{
|
||||
QProcess::startDetached(QStringLiteral("octopi"), QStringList() << QStringLiteral("-aurupgrade"));
|
||||
QProcess::startDetached(QStringLiteral("/usr/bin/octopi"), QStringList() << QStringLiteral("-aurupgrade"));
|
||||
}
|
||||
else if (execOptions == ectn_NORMAL_EXEC_OPT)
|
||||
{
|
||||
QProcess::startDetached(QStringLiteral("octopi"), QStringList());
|
||||
QProcess::startDetached(QStringLiteral("/usr/bin/octopi"), QStringList());
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Whenever user selects "Check updates" menu option
|
||||
*/
|
||||
void MainWindow::runOctopiCheckUpdates()
|
||||
{
|
||||
runOctopi(ectn_CHECKUPDATES_EXEC_OPT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Calls the QDialog to set notifier interval
|
||||
*/
|
||||
@@ -1254,7 +1295,7 @@ void MainWindow::showOptionsDialog()
|
||||
{
|
||||
if (m_optionsDialog == nullptr && UnixCommand::isAppRunning(QStringLiteral("octopi"), true))
|
||||
{
|
||||
QProcess::startDetached(QStringLiteral("octopi"), QStringList() << QStringLiteral("-options"));
|
||||
QProcess::startDetached(QStringLiteral("/usr/bin/octopi"), QStringList() << QStringLiteral("-options"));
|
||||
}
|
||||
else if (m_optionsDialog == nullptr)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <QString>
|
||||
#include <QMainWindow>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QRunnable>
|
||||
|
||||
class QIcon;
|
||||
class QMenu;
|
||||
@@ -39,6 +40,14 @@ class TransactionDialog;
|
||||
class QTcpServer;
|
||||
class OutputDialog;
|
||||
|
||||
class ExecCommandAsNormalUserExtTask : public QRunnable
|
||||
{
|
||||
void run() override
|
||||
{
|
||||
UnixCommand::execCommandAsNormalUserExt(ctn_PACMAN_SUP_COMMAND);
|
||||
}
|
||||
};
|
||||
|
||||
enum CheckUpdate { ectn_AUTO_CHECK, ectn_USER_CHECK};
|
||||
|
||||
#ifdef KSTATUS
|
||||
@@ -52,9 +61,13 @@ class MainWindow : public QMainWindow
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
virtual ~MainWindow();
|
||||
|
||||
inline void turnDebugInfoOn() { m_debugInfo = true;}
|
||||
bool startServer();
|
||||
|
||||
public slots:
|
||||
void doCheckUpdates(CheckUpdate check = ectn_USER_CHECK);
|
||||
|
||||
private slots:
|
||||
void pacmanHelperTimerTimeout();
|
||||
void afterCheckUpdates(int exitCode, QProcess::ExitStatus);
|
||||
@@ -62,10 +75,11 @@ private slots:
|
||||
void execSystemTrayActivated(QSystemTrayIcon::ActivationReason);
|
||||
void execSystemTrayKF5();
|
||||
|
||||
void checkUpdates(CheckUpdate check = ectn_USER_CHECK);
|
||||
void refreshOutdatedPkgsTooltip();
|
||||
void refreshAppIcon();
|
||||
void runOctopi(ExecOpt execOptions = ectn_SYSUPGRADE_EXEC_OPT);
|
||||
void runOctopiSysUpgrade();
|
||||
void runOctopiCheckUpdates();
|
||||
void runOctopiSysUpgrade();
|
||||
void runOctopiAURUpgrade();
|
||||
|
||||
inline void startOctopi() { runOctopi(ectn_NORMAL_EXEC_OPT); }
|
||||
@@ -75,7 +89,7 @@ private slots:
|
||||
void exitNotifier();
|
||||
void doSystemUpgrade();
|
||||
void doAURUpgrade();
|
||||
void doSystemUpgradeFinished();
|
||||
void doSystemUpgradeFinished(int exitCode);
|
||||
void toggleEnableInterface(bool state);
|
||||
void showOptionsDialog();
|
||||
void onSendInfoToOctopiHelper();
|
||||
@@ -112,7 +126,6 @@ private:
|
||||
QTimer *m_callRefreshAppIcon;
|
||||
QMenu *m_systemTrayIconMenu;
|
||||
QFileSystemWatcher *m_pacmanDatabaseSystemWatcher;
|
||||
|
||||
OutputDialog *m_outputDialog;
|
||||
|
||||
#ifdef KSTATUS
|
||||
|
||||
@@ -8,3 +8,5 @@ Categories=GNOME;GTK;System;
|
||||
#NotShowIn=GNOME;XFCE;LXDE;KDE;
|
||||
StartupNotify=true
|
||||
X-LXQt-Need-Tray=true
|
||||
Version=1.5
|
||||
SingleMainWindow=true
|
||||
|
||||
@@ -4,11 +4,9 @@
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core xml gui network
|
||||
QT += core xml gui network multimedia
|
||||
|
||||
# This controls whether octopi-notifier uses KStatusNotifier lib
|
||||
# You SHOULD REALLY enable KSTATUS define in plasma 5 desktops!
|
||||
DEFINES += ALPM_BACKEND #KSTATUS
|
||||
DEFINES += OCTOPI_EXTENSIONS ALPM_BACKEND
|
||||
|
||||
# Disable automatic string conversions
|
||||
DEFINES += QT_USE_QSTRINGBUILDER \
|
||||
@@ -17,26 +15,31 @@ DEFINES += QT_USE_QSTRINGBUILDER \
|
||||
QT_NO_URL_CAST_FROM_STRING \
|
||||
QT_NO_CAST_FROM_BYTEARRAY
|
||||
|
||||
CONFIG += qt warn_on debug link_pkgconfig ALPM_BACKEND
|
||||
CONFIG += qt warn_on debug link_pkgconfig ALPM_BACKEND USE_QTERMWIDGET6
|
||||
|
||||
ALPM_BACKEND {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
QMAKE_CXXFLAGS += -std=c++17
|
||||
PKGCONFIG += glib-2.0 libalpm
|
||||
LIBS += -lalpm_octopi_utils
|
||||
} else {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
QMAKE_CXXFLAGS += -std=c++17
|
||||
}
|
||||
|
||||
LIBS += -lqtermwidget5
|
||||
|
||||
contains(DEFINES, KSTATUS){
|
||||
QT += dbus KNotifications
|
||||
USE_QTERMWIDGET6 {
|
||||
LIBS += -lqtermwidget6
|
||||
QT += core5compat
|
||||
} else {
|
||||
LIBS += -lqtermwidget5
|
||||
}
|
||||
|
||||
#contains(DEFINES, KSTATUS){
|
||||
# QT += dbus
|
||||
#}
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += qt console warn_on debug
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
QMAKE_CXXFLAGS += -std=c++17
|
||||
TARGET = octopi-notifier
|
||||
TEMPLATE = app
|
||||
DESTDIR += ./bin
|
||||
@@ -47,6 +50,8 @@ UI_DIR += ./build
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
outputdialog.h \
|
||||
../src/QtSolutions/qtsingleapplication.h \
|
||||
../src/QtSolutions/qtlocalpeer.h \
|
||||
../src/uihelper.h \
|
||||
../src/terminal.h \
|
||||
../src/unixcommand.h \
|
||||
@@ -71,6 +76,8 @@ ALPM_BACKEND{
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp \
|
||||
outputdialog.cpp \
|
||||
../src/QtSolutions/qtsingleapplication.cpp \
|
||||
../src/QtSolutions/qtlocalpeer.cpp \
|
||||
../src/terminal.cpp \
|
||||
../src/unixcommand.cpp \
|
||||
../src/package.cpp \
|
||||
@@ -119,10 +126,11 @@ target.path = $$BINDIR
|
||||
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
|
||||
sources.path = .
|
||||
|
||||
autostart.path = $$ETCDIR/xdg/autostart
|
||||
autostart.files += octopi-notifier.desktop
|
||||
#autostart.path = $$ETCDIR/xdg/autostart
|
||||
#autostart.files += octopi-notifier.desktop
|
||||
|
||||
desktop.path = $$DATADIR/applications
|
||||
desktop.files += octopi-notifier.desktop
|
||||
|
||||
INSTALLS += target autostart desktop
|
||||
#INSTALLS += target autostart desktop
|
||||
INSTALLS += target desktop
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "../src/pacmanexec.h"
|
||||
#include "../src/searchbar.h"
|
||||
#include "../src/uihelper.h"
|
||||
#include "../src/utils.h"
|
||||
#include "../src/strconstants.h"
|
||||
#include "../src/termwidget.h"
|
||||
|
||||
@@ -42,6 +43,7 @@
|
||||
*/
|
||||
OutputDialog::OutputDialog(QWidget *parent): QDialog(parent)
|
||||
{
|
||||
m_exitCode = 0;
|
||||
m_upgradeRunning = false;
|
||||
m_debugInfo = false;
|
||||
m_AURUpgradeExecuting = false;
|
||||
@@ -196,7 +198,7 @@ void OutputDialog::onPressAnyKeyToContinue()
|
||||
m_console->setFocus();
|
||||
|
||||
if (!m_upgradeRunning) return;
|
||||
if (m_pacmanExec != nullptr)
|
||||
|
||||
delete m_pacmanExec;
|
||||
|
||||
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
|
||||
@@ -210,7 +212,7 @@ void OutputDialog::onCancelControlKey()
|
||||
{
|
||||
if (m_upgradeRunning)
|
||||
{
|
||||
if (m_pacmanExec != nullptr)
|
||||
|
||||
delete m_pacmanExec;
|
||||
|
||||
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
|
||||
@@ -279,6 +281,8 @@ void OutputDialog::reject()
|
||||
//Let's save the dialog size value before closing it.
|
||||
QByteArray windowSize=saveGeometry();
|
||||
SettingsManager::setOutputDialogWindowSize(windowSize);
|
||||
|
||||
emit finished(m_exitCode);
|
||||
QDialog::reject();
|
||||
}
|
||||
}
|
||||
@@ -339,6 +343,8 @@ bool OutputDialog::textInTabOutput(const QString& findText)
|
||||
*/
|
||||
void OutputDialog::pacmanProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
m_exitCode = exitCode;
|
||||
|
||||
m_progressBar->close();
|
||||
if (SettingsManager::getShowStopTransaction()) m_toolButtonStopTransaction->close();
|
||||
|
||||
@@ -378,7 +384,7 @@ void OutputDialog::pacmanProcessFinished(int exitCode, QProcess::ExitStatus exit
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pacmanExec != nullptr) delete m_pacmanExec;
|
||||
delete m_pacmanExec;
|
||||
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
|
||||
m_upgradeRunning = false;
|
||||
}
|
||||
@@ -388,14 +394,14 @@ void OutputDialog::pacmanProcessFinished(int exitCode, QProcess::ExitStatus exit
|
||||
*/
|
||||
void OutputDialog::onCanStopTransaction(bool yesNo)
|
||||
{
|
||||
if (yesNo == true && m_progressBar->isHidden()) return;
|
||||
if (yesNo && m_progressBar->isHidden()) return;
|
||||
if (SettingsManager::getShowStopTransaction()) m_toolButtonStopTransaction->setVisible(yesNo);
|
||||
}
|
||||
|
||||
/*
|
||||
* Kills all pacman processes
|
||||
*
|
||||
* Returns octopi-sudo exit code
|
||||
* Returns qt-sudo exit code
|
||||
*/
|
||||
int OutputDialog::stopTransaction()
|
||||
{
|
||||
@@ -482,8 +488,10 @@ void OutputDialog::closeEvent(QCloseEvent *event)
|
||||
}
|
||||
else
|
||||
{
|
||||
emit finished(0);
|
||||
emit finished(m_exitCode);
|
||||
event->accept();
|
||||
//Let's save window size...
|
||||
reject();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@ private:
|
||||
SearchBar *m_searchBar;
|
||||
TermWidget *m_console;
|
||||
QString m_listOfAURPackagesToUpgrade;
|
||||
|
||||
int m_exitCode;
|
||||
bool m_upgradeRunning;
|
||||
bool m_debugInfo;
|
||||
bool m_viewAsTextBrowser;
|
||||
|
||||
BIN
octopi-mainwindow-with-qss.png
Normal file
|
After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 165 KiB |
BIN
octopi-optionsdialog.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
@@ -147,3 +147,5 @@ X-DBUS-ServiceName=
|
||||
X-DBUS-StartupType=
|
||||
X-KDE-SubstituteUID=false
|
||||
X-KDE-Username=
|
||||
Version=1.5
|
||||
SingleMainWindow=true
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
post_install() {
|
||||
|
||||
systemctl enable octopi.service &> /dev/null
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
|
||||
post_install $1
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
|
||||
systemctl disable octopi.service &> /dev/null
|
||||
}
|
||||
42
octopi.pro
@@ -4,8 +4,7 @@
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui network xml widgets
|
||||
#QT += core gui network xml dbus widgets
|
||||
QT += core gui network xml widgets multimedia
|
||||
DEFINES += OCTOPI_EXTENSIONS ALPM_BACKEND
|
||||
|
||||
# Disable automatic string conversions
|
||||
@@ -15,17 +14,22 @@ DEFINES += QT_USE_QSTRINGBUILDER \
|
||||
QT_NO_URL_CAST_FROM_STRING \
|
||||
QT_NO_CAST_FROM_BYTEARRAY
|
||||
|
||||
CONFIG += qt warn_on debug link_pkgconfig ALPM_BACKEND
|
||||
CONFIG += qt warn_on debug link_pkgconfig ALPM_BACKEND USE_QTERMWIDGET6
|
||||
|
||||
ALPM_BACKEND {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
QMAKE_CXXFLAGS += -std=c++17
|
||||
PKGCONFIG += glib-2.0 libalpm
|
||||
LIBS += -lalpm_octopi_utils
|
||||
} else {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
QMAKE_CXXFLAGS += -std=c++17
|
||||
}
|
||||
|
||||
LIBS += -lqtermwidget5
|
||||
USE_QTERMWIDGET6 {
|
||||
LIBS += -lqtermwidget6
|
||||
QT += core5compat
|
||||
} else {
|
||||
LIBS += -lqtermwidget5
|
||||
}
|
||||
|
||||
TEMPLATE = app
|
||||
DESTDIR += bin
|
||||
@@ -37,6 +41,7 @@ HEADERS += src/QtSolutions/qtsingleapplication.h \
|
||||
src/QtSolutions/qtlocalpeer.h \
|
||||
repoeditor/repoentry.h \
|
||||
src/aurvote.h \
|
||||
src/propertiestabwidget.h \
|
||||
src/qaesencryption.h \
|
||||
src/repoconf.h \
|
||||
src/mainwindow.h \
|
||||
@@ -72,6 +77,7 @@ SOURCES += src/QtSolutions/qtsingleapplication.cpp \
|
||||
src/QtSolutions/qtlocalpeer.cpp \
|
||||
repoeditor/repoentry.cpp \
|
||||
src/aurvote.cpp \
|
||||
src/propertiestabwidget.cpp \
|
||||
src/qaesencryption.cpp \
|
||||
src/repoconf.cpp \
|
||||
src/main.cpp\
|
||||
@@ -164,7 +170,8 @@ TRANSLATIONS += resources/translations/octopi_pt_BR.ts \
|
||||
resources/translations/octopi_hr.ts \
|
||||
resources/translations/octopi_zh-Hans.ts \
|
||||
resources/translations/octopi_zh_CN.ts \
|
||||
resources/translations/octopi_ko.ts
|
||||
resources/translations/octopi_ko.ts \
|
||||
resources/translations/octopi_ko_KR.ts
|
||||
|
||||
# install
|
||||
isEmpty(PREFIX) {
|
||||
@@ -192,10 +199,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
|
||||
sources.path = .
|
||||
|
||||
bin.path = $$BINDIR
|
||||
bin.files += speedup/speedup-octopi.sh
|
||||
|
||||
#dbus.path = $$ETCDIR/dbus-1/system.d
|
||||
#dbus.files += notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf
|
||||
|
||||
desktop.path = $$DATADIR/applications
|
||||
desktop.files += octopi.desktop
|
||||
@@ -205,26 +208,13 @@ gnome.path = $$DATADIR/icons/gnome/32x32/apps
|
||||
gnome.files += resources/images/octopi_green.png
|
||||
gnome.files += resources/images/octopi.png
|
||||
|
||||
icon.path = $$DATADIR/icons
|
||||
icon.path = $$DATADIR/icons/hicolor/48x48/apps
|
||||
icon.files += resources/images/octopi.png
|
||||
icon.files += resources/images/octopi_green.png
|
||||
icon.files += resources/images/octopi_red.png
|
||||
icon.files += resources/images/octopi_yellow.png
|
||||
|
||||
#interfaces.path = $$DATADIR/dbus-1/interfaces
|
||||
#interfaces.files += notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml
|
||||
|
||||
license.path = $$DATADIR/licenses/octopi
|
||||
license.files += LICENSE
|
||||
|
||||
#polkit.path = $$DATADIR/polkit-1/actions
|
||||
#polkit.files += notifier/pacmanhelper/polkit/org.octopi.pacman.policy
|
||||
|
||||
service.path = $$LIBDIR/systemd/system
|
||||
service.files += speedup/octopi.service
|
||||
|
||||
#sys_service.path = $$DATADIR/dbus-1/system-services
|
||||
#sys_service.files += notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.service
|
||||
|
||||
#INSTALLS += target bin dbus desktop gnome icon interfaces license polkit service sys_service
|
||||
INSTALLS += target bin desktop gnome icon license service
|
||||
INSTALLS += target bin desktop gnome icon license
|
||||
|
||||
24
pre-system-upgrade.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script creates a new snapshot of the system using TimeShift and removes the last one (if there are only 2 available)
|
||||
# It must be located in /usr/lib/octopi for Octopi and Notifier to call it before a System Upgrade
|
||||
|
||||
echo -e "Creating a restore point...\n"
|
||||
|
||||
# Create a new snap
|
||||
timeshift --create
|
||||
|
||||
nsnaps=`timeshift --list-snapshots | grep ">" -c`
|
||||
|
||||
if [ $nsnaps -eq 2 ]
|
||||
then
|
||||
echo "Retrieving the name of older snapshot..."
|
||||
# Get the name of the older snap
|
||||
oldersnap=`timeshift --list-snapshots | grep ">" | grep "^0" | awk '{ print $3 }'`
|
||||
|
||||
# Remove older snap
|
||||
echo "Removing snapshot $oldersnap..."
|
||||
timeshift --delete --snapshot $oldersnap
|
||||
fi
|
||||
|
||||
echo -e "\nRestore point has been created!\n"
|
||||
@@ -9,7 +9,7 @@ TRANSLATIONS="./resources/translations/*"
|
||||
|
||||
for f in $TRANSLATIONS
|
||||
do
|
||||
lrelease-qt5 "$f"
|
||||
lrelease "$f"
|
||||
done
|
||||
|
||||
# Repeat for Cachecleaner
|
||||
@@ -19,7 +19,7 @@ tx pull
|
||||
# And release each of them
|
||||
for f in $TRANSLATIONS
|
||||
do
|
||||
lrelease-qt5 "$f"
|
||||
lrelease "$f"
|
||||
done
|
||||
|
||||
# Repeat for Repoeditor
|
||||
@@ -29,6 +29,6 @@ tx pull
|
||||
# And release each of them
|
||||
for f in $TRANSLATIONS
|
||||
do
|
||||
lrelease-qt5 "$f"
|
||||
lrelease "$f"
|
||||
done
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[octopi.repoeditor]
|
||||
file_filter = resources/translations/octopi_repoeditor_<lang>.ts
|
||||
source_file = resources/translations/octopi_repoeditor_en.ts
|
||||
source_lang = en
|
||||
type = QT
|
||||
[o:arnt:p:octopi:r:repoeditor]
|
||||
file_filter = resources/translations/octopi_repoeditor_<lang>.ts
|
||||
source_file = resources/translations/octopi_repoeditor_en.ts
|
||||
source_lang = en
|
||||
type = QT
|
||||
replace_edited_strings = false
|
||||
keep_translations = false
|
||||
|
||||
|
||||
77
repoeditor/CMakeLists.txt
Normal file
@@ -0,0 +1,77 @@
|
||||
if (USE_QTERMWIDGET6)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Xml Widgets LinguistTools)
|
||||
else()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Gui Network Xml Widgets LinguistTools)
|
||||
endif()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
find_library(UTIL_LIBRARY NAMES util)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
file(GLOB TS_FILES LIST_DIRECTORIES false "${CMAKE_CURRENT_LIST_DIR}/resources/translations/*.ts")
|
||||
qt_add_translation(qmFiles ${TS_FILES})
|
||||
|
||||
set(src
|
||||
addrepo.cpp
|
||||
checkboxdelegate.cpp
|
||||
main.cpp
|
||||
optionsdelegate.cpp
|
||||
repoconf.cpp
|
||||
repoeditor.cpp
|
||||
repoentry.cpp
|
||||
../src/qaesencryption.cpp
|
||||
../src/unixcommand.cpp
|
||||
../src/strconstants.cpp
|
||||
../src/wmhelper.cpp
|
||||
../src/terminal.cpp
|
||||
../src/settingsmanager.cpp
|
||||
../src/searchlineedit.cpp
|
||||
../src/utils.cpp
|
||||
../src/package.cpp
|
||||
../src/QtSolutions/qtsingleapplication.cpp
|
||||
../src/QtSolutions/qtlocalpeer.cpp
|
||||
#../src/QtSolutions/qtlockedfile.cpp
|
||||
../src/QtSolutions/qtsinglecoreapplication.cpp)
|
||||
|
||||
set(header
|
||||
addrepo.h
|
||||
checkboxdelegate.h
|
||||
optionsdelegate.h
|
||||
repoconf.h
|
||||
repoeditor.h
|
||||
repoentry.h
|
||||
../src/qaesencryption.h
|
||||
../src/unixcommand.h
|
||||
../src/strconstants.h
|
||||
../src/wmhelper.h
|
||||
../src/terminal.h
|
||||
../src/settingsmanager.h
|
||||
../src/searchlineedit.h
|
||||
../src/utils.h
|
||||
../src/package.h
|
||||
../src/QtSolutions/qtsingleapplication.h
|
||||
../src/QtSolutions/qtlocalpeer.h
|
||||
#../src/QtSolutions/qtlockedfile.h
|
||||
../src/QtSolutions/qtsinglecoreapplication.h)
|
||||
|
||||
set(ui addrepo.ui repoeditor.ui)
|
||||
|
||||
set(qrc resources.qrc)
|
||||
|
||||
qt_wrap_ui(src ${ui})
|
||||
qt_add_resources(src ${qrc})
|
||||
|
||||
add_executable(octopi-repoeditor ${src} ${header} ${qmFiles})
|
||||
target_compile_definitions(octopi-repoeditor PRIVATE QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY)
|
||||
|
||||
if (USE_QTERMWIDGET6)
|
||||
target_include_directories(octopi-repoeditor PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt6Core_INCLUDE_DIRS} ${Qt6Gui_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS} ${Qt6Xml_INCLUDE_DIRS} ${Qt6Widgets_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi-repoeditor PRIVATE Threads::Threads Qt6::Core Qt6::Gui Qt6::Network Qt6::Xml Qt6::Widgets ${UTIL_LIBRARY})
|
||||
else()
|
||||
target_include_directories(octopi-repoeditor PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
||||
target_link_libraries(octopi-repoeditor PRIVATE Threads::Threads Qt5::Core Qt5::Gui Qt5::Network Qt5::Xml Qt5::Widgets ${UTIL_LIBRARY})
|
||||
endif()
|
||||
|
||||
install(TARGETS octopi-repoeditor RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-repoeditor.desktop" DESTINATION share/applications)
|
||||
@@ -56,5 +56,5 @@ bool CheckBoxDelegate::editorEvent( QEvent *event,
|
||||
|
||||
model->setData( index, !index.data().toBool() );
|
||||
|
||||
return event->type() == QEvent::MouseButtonDblClick ? true : false;
|
||||
return event->type() == QEvent::MouseButtonDblClick;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
unsetenv("TMPDIR");
|
||||
QtSingleApplication app( QStringLiteral("Repository Editor - Octopi"), argc, argv );
|
||||
|
||||
//If there is already an instance running...
|
||||
@@ -45,12 +46,18 @@ int main( int argc, char *argv[] )
|
||||
app.sendMessage(QStringLiteral("RAISE"));
|
||||
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load(QLatin1String(":/resources/translations/octopi_repoeditor_") +
|
||||
|
||||
bool success = appTranslator.load(QLatin1String(":/resources/translations/octopi_repoeditor_") +
|
||||
QLocale::system().name());
|
||||
if (!success)
|
||||
{
|
||||
success = appTranslator.load(QStringLiteral(":/resources/translations/octopi_repoeditor_en.qm"));
|
||||
}
|
||||
|
||||
app.installTranslator(&appTranslator);
|
||||
|
||||
if (UnixCommand::isRootRunning()){
|
||||
QMessageBox::critical( 0, QStringLiteral("Repository Editor - Octopi"),
|
||||
QMessageBox::critical( nullptr, QStringLiteral("Repository Editor - Octopi"),
|
||||
QObject::tr("You can not run Repository Editor with administrator's credentials."));
|
||||
return (-2);
|
||||
}
|
||||
@@ -61,6 +68,12 @@ int main( int argc, char *argv[] )
|
||||
return (-3);
|
||||
}
|
||||
|
||||
if (!UnixCommand::isOctoToolRunning(QStringLiteral("octopi-repoeditor")))
|
||||
{
|
||||
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunOctopiRepoEditorAsUsrBin());
|
||||
return (-6);
|
||||
}
|
||||
|
||||
RepoEditor w;
|
||||
app.setActivationWindow(&w);
|
||||
w.show();
|
||||
|
||||
11
repoeditor/octopi-repoeditor.desktop
Normal file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=Octopi Repository Editor
|
||||
Icon=octopi
|
||||
Exec=/usr/bin/octopi-repoeditor
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GNOME;GTK;System;
|
||||
#NotShowIn=GNOME;XFCE;LXDE;KDE;
|
||||
StartupNotify=true
|
||||
Version=1.5
|
||||
SingleMainWindow=true
|
||||
@@ -114,7 +114,8 @@ TRANSLATIONS += resources/translations/octopi_repoeditor_pt_BR.ts \
|
||||
resources/translations/octopi_repoeditor_hr.ts \
|
||||
resources/translations/octopi_repoeditor_zh-Hans.ts \
|
||||
resources/translations/octopi_repoeditor_zh_CN.ts \
|
||||
resources/translations/octopi_repoeditor_ko.ts
|
||||
resources/translations/octopi_repoeditor_ko.ts \
|
||||
resources/translations/octopi_repoeditor_ko_KR.ts
|
||||
|
||||
# install
|
||||
isEmpty(PREFIX) {
|
||||
@@ -129,4 +130,7 @@ target.path = $$BINDIR
|
||||
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
|
||||
sources.path = .
|
||||
|
||||
desktop.path = $$DATADIR/applications
|
||||
desktop.files += repoeditor/octopi-repoeditor.desktop
|
||||
|
||||
INSTALLS += target
|
||||
|
||||
@@ -98,7 +98,14 @@ bool RepoConf::hasAnyChanges()
|
||||
else
|
||||
{
|
||||
QString contents = QString::fromUtf8(confFile.readAll().trimmed());
|
||||
res=(contents.toLatin1() != toString().toLatin1());
|
||||
QByteArray file=contents.toLatin1();
|
||||
QByteArray repoeditor=toString().toLatin1();
|
||||
if (file != repoeditor)
|
||||
{
|
||||
int cFile=file.count('\n');
|
||||
int cRepoeditor=repoeditor.count('\n');
|
||||
if (file.size() != (repoeditor.size() - (cRepoeditor-cFile))) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -98,7 +98,7 @@ RepoEditor::~RepoEditor()
|
||||
|
||||
void RepoEditor::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
if (repoConf->hasAnyChanges())
|
||||
/*if (repoConf->hasAnyChanges())
|
||||
{
|
||||
int res = QMessageBox::question(this, tr("Confirmation"),
|
||||
tr("There are unsaved changes.") + QLatin1Char('\n') +
|
||||
@@ -109,7 +109,7 @@ void RepoEditor::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
apply();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
event->accept();
|
||||
qApp->quit();
|
||||
@@ -120,7 +120,7 @@ void RepoEditor::closeEvent(QCloseEvent *event)
|
||||
*/
|
||||
void RepoEditor::reject()
|
||||
{
|
||||
if (repoConf->hasAnyChanges())
|
||||
/*if (repoConf->hasAnyChanges())
|
||||
{
|
||||
int res = QMessageBox::question(this, tr("Confirmation"),
|
||||
tr("There are unsaved changes.") + QLatin1Char('\n') +
|
||||
@@ -131,7 +131,7 @@ void RepoEditor::reject()
|
||||
{
|
||||
apply();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
QDialog::reject();
|
||||
}
|
||||
@@ -188,13 +188,14 @@ void RepoEditor::editEntry()
|
||||
QString location = ui->tableView->model()->data(locationMI).toString();
|
||||
|
||||
// take the type and address
|
||||
QRegExp locationMatch(QLatin1String("^(Server|Include)\\s*=\\s*(.+)"));
|
||||
locationMatch.indexIn(location);
|
||||
location = locationMatch.cap(2);
|
||||
QRegularExpression locationMatch(QLatin1String("^(Server|Include)\\s*=\\s*(.+)"));
|
||||
//locationMatch.indexIn(location);
|
||||
QRegularExpressionMatch rem = locationMatch.match(location);
|
||||
location = rem.captured(2);
|
||||
|
||||
// fill remaining fields
|
||||
addRepoDialog->setRepoLocation(location);
|
||||
addRepoDialog->setLocationType(locationMatch.cap(1) == QLatin1String("Server") ? 1 : 0);
|
||||
addRepoDialog->setLocationType(rem.captured(1) == QLatin1String("Server") ? 1 : 0);
|
||||
|
||||
if( addRepoDialog->exec() == QDialog::Accepted ) {
|
||||
ui->tableView->model()->setData( repoMI, addRepoDialog->getRepoName() );
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>لا يمكنك تشغيل محرر المستودعات باستخدام بيانات اعتماد المسؤول.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -169,19 +169,19 @@
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="103"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="125"/>
|
||||
<source>Confirmation</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>تأكيد</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="104"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="126"/>
|
||||
<source>There are unsaved changes.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>هناك تغييرات غير محفوظة.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="105"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="127"/>
|
||||
<source>Do you want to save them?</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>هل تريد حفظها؟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="160"/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="14"/>
|
||||
<source>Add Repository - Octopi</source>
|
||||
<translation>Добави хранилище - Octopi</translation>
|
||||
<translation>Добавяне на хранилище - „Octopi“</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="22"/>
|
||||
@@ -14,7 +14,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="32"/>
|
||||
<source>Repository name</source>
|
||||
<translation>Име на хранилище</translation>
|
||||
<translation>Име на хранилището</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="39"/>
|
||||
@@ -24,17 +24,17 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="86"/>
|
||||
<source>The repository name field can't be blank.</source>
|
||||
<translation>Не може без име на хранилище.</translation>
|
||||
<translation>Хранилището трябва да има име.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="101"/>
|
||||
<source>The repository location field is not valid.</source>
|
||||
<translation>Полето за място не е валидно.</translation>
|
||||
<translation>Полето за място не е правилно.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="104"/>
|
||||
<source>The repository name field is not valid.</source>
|
||||
<translation>Името на хранилището не е валидно.</translation>
|
||||
<translation>Името на хранилището не е правилно.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="111"/>
|
||||
@@ -44,7 +44,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="115"/>
|
||||
<source>Path to mirrors list file</source>
|
||||
<translation>Път до файла с огледалата</translation>
|
||||
<translation>Местоположение на файла със списъка на огледалата</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="124"/>
|
||||
@@ -54,17 +54,17 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="125"/>
|
||||
<source>Can't add repository.</source>
|
||||
<translation>Не може да се добави хранилище.</translation>
|
||||
<translation>Хранилището не може да бъде добавено.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="136"/>
|
||||
<source>Select local repository</source>
|
||||
<translation>Избери локално хранилище</translation>
|
||||
<translation>Избиране на локално хранилище</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="149"/>
|
||||
<source>Select mirrors list</source>
|
||||
<translation>Избор на списък с огледала</translation>
|
||||
<translation>Избиране на списък с огледала</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -72,7 +72,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation>Не може да стартирате Редактора за източниците с администраторски права.</translation>
|
||||
<translation>Не може да стартирате Редактора на хранилищата с администраторски права.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -80,7 +80,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="208"/>
|
||||
<source>Backup error</source>
|
||||
<translation>Грешка при създаване на резервно копие</translation>
|
||||
<translation>Грешка при създаване на резервното копие</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="209"/>
|
||||
@@ -95,7 +95,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="282"/>
|
||||
<source>Active</source>
|
||||
<translation>Активен</translation>
|
||||
<translation>Активно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="282"/>
|
||||
@@ -113,17 +113,17 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="14"/>
|
||||
<source>Repository Editor - Octopi</source>
|
||||
<translation>Редактор на хранилища - Octopi</translation>
|
||||
<translation>Редактор на хранилища - „Octopi“</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="27"/>
|
||||
<source>Available Repositories</source>
|
||||
<translation>Достъпни хранилища</translation>
|
||||
<translation>Налични хранилища</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="75"/>
|
||||
<source>Edit</source>
|
||||
<translation>Редакция</translation>
|
||||
<translation>Редактиране</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="89"/>
|
||||
@@ -138,27 +138,27 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="130"/>
|
||||
<source>Move Up</source>
|
||||
<translation>Нагоре</translation>
|
||||
<translation>Преместване нагоре</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="144"/>
|
||||
<source>Move Down</source>
|
||||
<translation>Надолу</translation>
|
||||
<translation>Преместване надолу</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="160"/>
|
||||
<source>Backup</source>
|
||||
<translation>Резервирай</translation>
|
||||
<translation>Резервно копие</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="168"/>
|
||||
<source>Create backup on save</source>
|
||||
<translation>Направи резерва при запис</translation>
|
||||
<translation>Създаване на резервно копие при запазване</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="191"/>
|
||||
<source>Load a backup file</source>
|
||||
<translation>Зареди резервен файл</translation>
|
||||
<translation>Зареждане на резервен файл</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="206"/>
|
||||
@@ -181,27 +181,27 @@
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="105"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="127"/>
|
||||
<source>Do you want to save them?</source>
|
||||
<translation>Искате ли да ги запазим?</translation>
|
||||
<translation>Искате ли да ги запазите?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="160"/>
|
||||
<source>Can't load backup file</source>
|
||||
<translation>Резервния файл не може да се зареди</translation>
|
||||
<translation>Резервният файл не може да се зареди</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="161"/>
|
||||
<source>Selected file is not valid</source>
|
||||
<translation>Избраният файл не е валиден</translation>
|
||||
<translation>Избраният файл не е правилен</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="209"/>
|
||||
<source>Success</source>
|
||||
<translation>Успех</translation>
|
||||
<translation>Успешно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="210"/>
|
||||
<source>Repositories configuration successfully saved.</source>
|
||||
<translation>Настройките за хранилищата са запазени.</translation>
|
||||
<translation>Настройките на хранилищата са запазени успешно.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="215"/>
|
||||
@@ -211,7 +211,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="216"/>
|
||||
<source>Repositories configuration not saved.</source>
|
||||
<translation>Настройките за хранилищата не са запазени.</translation>
|
||||
<translation>Настройките на хранилищата не са запазени.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -72,7 +72,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Editor úložiště nemůžete spustit s oprávněními správce.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -169,19 +169,19 @@
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="103"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="125"/>
|
||||
<source>Confirmation</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Potvrzení</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="104"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="126"/>
|
||||
<source>There are unsaved changes.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Změny nejsou uložené.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="105"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="127"/>
|
||||
<source>Do you want to save them?</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Chcete je uložit?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="160"/>
|
||||
|
||||
@@ -4,47 +4,47 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="14"/>
|
||||
<source>Add Repository - Octopi</source>
|
||||
<translation>Repository hinzufügen - Octopi</translation>
|
||||
<translation>Paketquelle hinzufügen - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="22"/>
|
||||
<source>Repository:</source>
|
||||
<translation>Repository:</translation>
|
||||
<translation>Paketquelle:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="32"/>
|
||||
<source>Repository name</source>
|
||||
<translation>Repository-Name</translation>
|
||||
<translation>Name der Paketquelle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="39"/>
|
||||
<source>Location:</source>
|
||||
<translation>Lokation:</translation>
|
||||
<translation>Standort:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="86"/>
|
||||
<source>The repository name field can't be blank.</source>
|
||||
<translation>Das Repository-Namens-Feld kann nicht leer bleiben.</translation>
|
||||
<translation>Das Feld "Namen" der Paketquelle darf nicht leer sein</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="101"/>
|
||||
<source>The repository location field is not valid.</source>
|
||||
<translation>Das Lokalisations-Feld ist nicht gültig.</translation>
|
||||
<translation>Das Feld "Lokalisation" der Paketquelle ist nicht gültig.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="104"/>
|
||||
<source>The repository name field is not valid.</source>
|
||||
<translation>Das Namens-Feld ist nicht gültig.</translation>
|
||||
<translation>Das Feld "Namen" der Paketquelle ist nicht gültig.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="111"/>
|
||||
<source>Address of remote or local packages repository</source>
|
||||
<translation>Addresse des Servers oder der lokalen Repository</translation>
|
||||
<translation>Addresse der entfernten oder der lokalen Paketquelle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="115"/>
|
||||
<source>Path to mirrors list file</source>
|
||||
<translation>Pfad der Mirrorlisten-Datei</translation>
|
||||
<translation>Pfad zur Liste der Spiegelserver</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="124"/>
|
||||
@@ -54,17 +54,17 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="125"/>
|
||||
<source>Can't add repository.</source>
|
||||
<translation>Kann Repository nicht hinzufügen.</translation>
|
||||
<translation>Paketquelle kann nicht hinzugefügt werden.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="136"/>
|
||||
<source>Select local repository</source>
|
||||
<translation>Lokale Repository auswählen</translation>
|
||||
<translation>Lokale Paketquelle auswählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="149"/>
|
||||
<source>Select mirrors list</source>
|
||||
<translation>Mirrorliste auswählen</translation>
|
||||
<translation>Liste der Spiegelserver auswählen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -72,7 +72,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation>Der Editor für Softwarequellen darf nicht mit Administratorrechten ausgeführt werden.</translation>
|
||||
<translation>Der Editor für Paketquellen darf nicht mit Administratorrechten ausgeführt werden.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -80,12 +80,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="208"/>
|
||||
<source>Backup error</source>
|
||||
<translation>Backup-Fehler</translation>
|
||||
<translation>Fehler beim Backup</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="209"/>
|
||||
<source>Backup file already exists.</source>
|
||||
<translation>Backup-Datei existiert bereits.</translation>
|
||||
<translation>Die Datei für das Backup existiert bereits.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="209"/>
|
||||
@@ -100,7 +100,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="282"/>
|
||||
<source>Repository</source>
|
||||
<translation>Repository</translation>
|
||||
<translation>Paketquelle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="282"/>
|
||||
@@ -113,12 +113,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="14"/>
|
||||
<source>Repository Editor - Octopi</source>
|
||||
<translation>Repository Editor - Octopi</translation>
|
||||
<translation>Paketquellen-Editor - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="27"/>
|
||||
<source>Available Repositories</source>
|
||||
<translation>Verfügbare Repositorien</translation>
|
||||
<translation>Verfügbare Paketquellen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="75"/>
|
||||
@@ -148,22 +148,22 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="160"/>
|
||||
<source>Backup</source>
|
||||
<translation>Backup</translation>
|
||||
<translation>Sicherung</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="168"/>
|
||||
<source>Create backup on save</source>
|
||||
<translation>Erstelle Backup beim Speichern</translation>
|
||||
<translation>Erstelle Sicherung beim Speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="191"/>
|
||||
<source>Load a backup file</source>
|
||||
<translation>Lade Backup-Datei</translation>
|
||||
<translation>Lade Sicherungsdatei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="206"/>
|
||||
<source>Backup file:</source>
|
||||
<translation>Backup-Datei:</translation>
|
||||
<translation>Sicherungsdatei:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="103"/>
|
||||
@@ -186,22 +186,22 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="160"/>
|
||||
<source>Can't load backup file</source>
|
||||
<translation>Kann Backup-Datei nicht laden</translation>
|
||||
<translation>Sicherungsdatei kann nicht geladen werden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="161"/>
|
||||
<source>Selected file is not valid</source>
|
||||
<translation>Ausgewählte Datei ist ungültig</translation>
|
||||
<translation>Die ausgewählte Datei ist ungültig</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="209"/>
|
||||
<source>Success</source>
|
||||
<translation>Erfolg</translation>
|
||||
<translation>Erfolgreich</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="210"/>
|
||||
<source>Repositories configuration successfully saved.</source>
|
||||
<translation>Konfiguration der Repositorien erfolgreich gespeichert.</translation>
|
||||
<translation>Konfiguration der Paketquellen erfolgreich gespeichert.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="215"/>
|
||||
@@ -211,7 +211,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="216"/>
|
||||
<source>Repositories configuration not saved.</source>
|
||||
<translation>Repositorien konnten nicht gespeichert werden.</translation>
|
||||
<translation>Konfiguration der Paketquellen wurde nicht gespeichert.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -72,7 +72,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation>관리자 자격 증명으로 저장소 편집기를 실행할 수 없습니다.</translation>
|
||||
<translation>관리자 자격 증명으로 저장소 편집도구를 실행할 수 없습니다.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -113,7 +113,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="14"/>
|
||||
<source>Repository Editor - Octopi</source>
|
||||
<translation>저장소 편집기 - Octopi</translation>
|
||||
<translation>저장소 편집도구 - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="27"/>
|
||||
|
||||
BIN
repoeditor/resources/translations/octopi_repoeditor_ko_KR.qm
Normal file
217
repoeditor/resources/translations/octopi_repoeditor_ko_KR.ts
Normal file
@@ -0,0 +1,217 @@
|
||||
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ko_KR" version="2.1">
|
||||
<context>
|
||||
<name>AddRepo</name>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="14"/>
|
||||
<source>Add Repository - Octopi</source>
|
||||
<translation>저장소 추가 - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="22"/>
|
||||
<source>Repository:</source>
|
||||
<translation>저장소 :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="32"/>
|
||||
<source>Repository name</source>
|
||||
<translation>저장소 이름 :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.ui" line="39"/>
|
||||
<source>Location:</source>
|
||||
<translation>위치 :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="86"/>
|
||||
<source>The repository name field can't be blank.</source>
|
||||
<translation>저장소 이름 입력란은 비워 둘 수 없습니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="101"/>
|
||||
<source>The repository location field is not valid.</source>
|
||||
<translation>저장소 위치 입력란이 잘못되었습니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="104"/>
|
||||
<source>The repository name field is not valid.</source>
|
||||
<translation>저장소 이름 입력란이 잘못되었습니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="111"/>
|
||||
<source>Address of remote or local packages repository</source>
|
||||
<translation>원격 또는 로컬 패키지 저장소의 주소</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="115"/>
|
||||
<source>Path to mirrors list file</source>
|
||||
<translation>미러 목록 파일 경로</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="124"/>
|
||||
<source>Error</source>
|
||||
<translation>오류</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="125"/>
|
||||
<source>Can't add repository.</source>
|
||||
<translation>저장소를 추가 할 수 없습니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="136"/>
|
||||
<source>Select local repository</source>
|
||||
<translation>로컬 저장소 선택</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="149"/>
|
||||
<source>Select mirrors list</source>
|
||||
<translation>미러 목록 선택</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation>관리자 자격 증명으로는 저장소 편집기를 실행할 수 없습니다.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RepoConf</name>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="208"/>
|
||||
<source>Backup error</source>
|
||||
<translation>백업 오류</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="209"/>
|
||||
<source>Backup file already exists.</source>
|
||||
<translation>백업 파일이 이미 있습니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="209"/>
|
||||
<source>Do you want to overwrite it?</source>
|
||||
<translation>덮어 쓰시겠습니까?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="282"/>
|
||||
<source>Active</source>
|
||||
<translation>활성화</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="282"/>
|
||||
<source>Repository</source>
|
||||
<translation>저장소</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="282"/>
|
||||
<source>Options</source>
|
||||
<translation>옵션</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RepoEditor</name>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="14"/>
|
||||
<source>Repository Editor - Octopi</source>
|
||||
<translation>저장소 편집기 - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="27"/>
|
||||
<source>Available Repositories</source>
|
||||
<translation>사용 가능한 저장소</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="75"/>
|
||||
<source>Edit</source>
|
||||
<translation>편집</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="89"/>
|
||||
<source>Add</source>
|
||||
<translation>추가</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="103"/>
|
||||
<source>Remove</source>
|
||||
<translation>제거</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="130"/>
|
||||
<source>Move Up</source>
|
||||
<translation>위로 이동</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="144"/>
|
||||
<source>Move Down</source>
|
||||
<translation>아래로 이동</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="160"/>
|
||||
<source>Backup</source>
|
||||
<translation>백업</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="168"/>
|
||||
<source>Create backup on save</source>
|
||||
<translation>저장시 백업 만들기</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="191"/>
|
||||
<source>Load a backup file</source>
|
||||
<translation>백업 파일 불러오기</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="206"/>
|
||||
<source>Backup file:</source>
|
||||
<translation>백업 파일 :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="103"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="125"/>
|
||||
<source>Confirmation</source>
|
||||
<translation>확인</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="104"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="126"/>
|
||||
<source>There are unsaved changes.</source>
|
||||
<translation>저장되지 않은 변경 사항이 있습니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="105"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="127"/>
|
||||
<source>Do you want to save them?</source>
|
||||
<translation>저장하시겠습니까?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="160"/>
|
||||
<source>Can't load backup file</source>
|
||||
<translation>백업 파일을 불러올 수 없습니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="161"/>
|
||||
<source>Selected file is not valid</source>
|
||||
<translation>선택한 파일이 잘못되었습니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="209"/>
|
||||
<source>Success</source>
|
||||
<translation>성공</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="210"/>
|
||||
<source>Repositories configuration successfully saved.</source>
|
||||
<translation>저장소 구성이 성공적으로 저장되었습니다.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="215"/>
|
||||
<source>Error</source>
|
||||
<translation>오류</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="216"/>
|
||||
<source>Repositories configuration not saved.</source>
|
||||
<translation>저장소 구성이 저장되지 않았습니다.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -72,7 +72,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Nie można uruchomić Edytora repozytorium z poświadczeniami administratora.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="86"/>
|
||||
<source>The repository name field can't be blank.</source>
|
||||
<translation>O campo do nome do repositório não pode estar vazio.</translation>
|
||||
<translation>O campo do nome do repositório não pode estar em branco.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="101"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="104"/>
|
||||
<source>The repository name field is not valid.</source>
|
||||
<translation>Campo de nome de repositório inválido.</translation>
|
||||
<translation>O campo do nome do repositório não é válido.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="111"/>
|
||||
@@ -44,7 +44,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="115"/>
|
||||
<source>Path to mirrors list file</source>
|
||||
<translation>Caminho para o ficheiro da lista de mirrors</translation>
|
||||
<translation>Caminho para o ficheiro da lista de espelhos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="124"/>
|
||||
@@ -54,17 +54,17 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="125"/>
|
||||
<source>Can't add repository.</source>
|
||||
<translation>Não posso adicionar repositório.</translation>
|
||||
<translation>Não é possível adicionar repositório.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="136"/>
|
||||
<source>Select local repository</source>
|
||||
<translation>Seleccionar repositório local</translation>
|
||||
<translation>Selecionar repositório local</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/addrepo.cpp" line="149"/>
|
||||
<source>Select mirrors list</source>
|
||||
<translation>Seleccionar lista de mirrors</translation>
|
||||
<translation>Selecionar lista de espelhos</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -72,7 +72,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation>Não pode executar o Editor de Repositórios com credenciais de administrador.</translation>
|
||||
<translation>Não pode executar o Editor de Repositórios como 'root'.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -85,17 +85,17 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="209"/>
|
||||
<source>Backup file already exists.</source>
|
||||
<translation>Ficheiro de salvaguarda já existe.</translation>
|
||||
<translation>O ficheiro de salvaguarda já existe.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="209"/>
|
||||
<source>Do you want to overwrite it?</source>
|
||||
<translation>Deseja sobrepô-lo?</translation>
|
||||
<translation>Deseja substituí-lo?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="282"/>
|
||||
<source>Active</source>
|
||||
<translation>Activo</translation>
|
||||
<translation>Ativo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoconf.cpp" line="282"/>
|
||||
@@ -113,7 +113,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="14"/>
|
||||
<source>Repository Editor - Octopi</source>
|
||||
<translation>Editor de repositórios - Octopi</translation>
|
||||
<translation>Editor de Repositórios - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.ui" line="27"/>
|
||||
@@ -186,7 +186,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="160"/>
|
||||
<source>Can't load backup file</source>
|
||||
<translation>Não consigo carregar ficheiro de salvaguarda</translation>
|
||||
<translation>Não é possível carregar o ficheiro de salvaguarda</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="161"/>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Ви не можете запустити Редактор сховищ з обліковими даними адміністратора.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -169,19 +169,19 @@
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="103"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="125"/>
|
||||
<source>Confirmation</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Підтвердження</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="104"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="126"/>
|
||||
<source>There are unsaved changes.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Є незбережені зміни.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="105"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="127"/>
|
||||
<source>Do you want to save them?</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Хочете їх зберегти?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="160"/>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/main.cpp" line="54"/>
|
||||
<source>You can not run Repository Editor with administrator's credentials.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>你不能以管理员权限运行软件源编辑器。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -169,19 +169,19 @@
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="103"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="125"/>
|
||||
<source>Confirmation</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>确认</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="104"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="126"/>
|
||||
<source>There are unsaved changes.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>还有未保存的变更。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="105"/>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="127"/>
|
||||
<source>Do you want to save them?</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>您想要保存它们吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/repoeditor/repoeditor.cpp" line="160"/>
|
||||
|
||||
@@ -98,5 +98,13 @@
|
||||
<file>resources/translations/octopi_zh-Hans.qm</file>
|
||||
<file>resources/translations/octopi_zh_CN.qm</file>
|
||||
<file>resources/translations/octopi_ko.qm</file>
|
||||
<file>resources/sounds/bell.wav</file>
|
||||
<file>resources/images/window.png</file>
|
||||
<file>resources/images/pacman.png</file>
|
||||
<file>resources/images/menu.png</file>
|
||||
<file>resources/images/terminal2.png</file>
|
||||
<file>resources/images/keys.png</file>
|
||||
<file>resources/images/group.png</file>
|
||||
<file>resources/images/ignored.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
BIN
resources/images/group.png
Normal file
|
After Width: | Height: | Size: 832 B |
BIN
resources/images/ignored.png
Normal file
|
After Width: | Height: | Size: 693 B |
BIN
resources/images/ignored2.png
Normal file
|
After Width: | Height: | Size: 693 B |
BIN
resources/images/keys.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/images/menu.png
Normal file
|
After Width: | Height: | Size: 574 B |
BIN
resources/images/octopi.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
resources/images/pacman.png
Normal file
|
After Width: | Height: | Size: 733 B |
BIN
resources/images/terminal2.png
Normal file
|
After Width: | Height: | Size: 607 B |
BIN
resources/images/window.png
Normal file
|
After Width: | Height: | Size: 342 B |