mirror of
https://github.com/aarnt/octopi.git
synced 2025-11-19 17:14:42 +01:00
Compare commits
786 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
f6961a89ca | ||
|
|
2d9c34fa18 | ||
|
|
aed6d3948a | ||
|
|
c19a324cda | ||
|
|
614e3b8bd3 | ||
|
|
a575a04981 | ||
|
|
b4899bcedc | ||
|
|
e159abaafc | ||
|
|
e55090a066 | ||
|
|
ec89b8a2bc | ||
|
|
95faab97a9 | ||
|
|
a7108f0835 | ||
|
|
48bf47fa48 | ||
|
|
2a5f9b32b6 | ||
|
|
208f689118 | ||
|
|
f7f34a6562 | ||
|
|
ad8732ef81 | ||
|
|
b432c40c26 | ||
|
|
3d1b4678bc | ||
|
|
363374f639 | ||
|
|
8141393314 | ||
|
|
76330f8b17 | ||
|
|
7da9c3edc0 | ||
|
|
f5b22fba98 | ||
|
|
8defc3bdd0 | ||
|
|
71238d3e93 | ||
|
|
121ad0d634 | ||
|
|
ad28a0678f | ||
|
|
3db8415077 | ||
|
|
6c3b63f98f | ||
|
|
f3a14edab0 | ||
|
|
043931eb2a | ||
|
|
1c578367b7 | ||
|
|
28e4c0f989 | ||
|
|
46535831d3 | ||
|
|
d1048abc9f | ||
|
|
8dcc30ca9e | ||
|
|
b87ed8345b | ||
|
|
4b3507539c | ||
|
|
6008d37c19 | ||
|
|
6b601439cc | ||
|
|
0dad821102 | ||
|
|
739397211e | ||
|
|
5bb1faa43b | ||
|
|
524f305cc2 | ||
|
|
c56d777c96 | ||
|
|
8e8decae26 | ||
|
|
e727c8e598 | ||
|
|
275d159d81 | ||
|
|
a2802044a6 | ||
|
|
218f27bce0 | ||
|
|
10c97c96c3 | ||
|
|
0066009d11 | ||
|
|
e46899b4f5 | ||
|
|
ed61820026 | ||
|
|
3db8927f28 | ||
|
|
1eff031e23 | ||
|
|
e2c87e2c50 | ||
|
|
58797754eb | ||
|
|
88590ec964 | ||
|
|
c770253981 | ||
|
|
67dc305cc9 | ||
|
|
a4454951e4 | ||
|
|
4fdcb953e8 | ||
|
|
11e437b5b5 | ||
|
|
3dc3fa73ec | ||
|
|
dad4f38804 | ||
|
|
bb0bc7b3f2 | ||
|
|
46ef3655c1 | ||
|
|
11010fbf23 | ||
|
|
af1d5829c9 | ||
|
|
abccec8324 | ||
|
|
70b36e25df | ||
|
|
94d368337f | ||
|
|
36ffdbaa86 | ||
|
|
ec48262a24 | ||
|
|
2dd6888d28 | ||
|
|
b21774789d | ||
|
|
f7f8067263 | ||
|
|
f491a77ee0 | ||
|
|
0d86bc1e2f | ||
|
|
cd2cc7045e | ||
|
|
ff65bad532 | ||
|
|
4a366da7d9 | ||
|
|
64b143b843 | ||
|
|
ff7f108e58 | ||
|
|
95d8882854 | ||
|
|
fa4451316c | ||
|
|
1ead404fac | ||
|
|
af48197cdc | ||
|
|
22c807eb00 | ||
|
|
c25660d304 | ||
|
|
292506e020 | ||
|
|
dab4844ebe | ||
|
|
cd3df70032 | ||
|
|
6817c63d83 | ||
|
|
071d489af0 | ||
|
|
a433ea673f | ||
|
|
fe0a38b7fc | ||
|
|
9e32b7846c | ||
|
|
ce8eb46a69 | ||
|
|
05f3607fb2 | ||
|
|
99f737e3cc | ||
|
|
2d0ffd8174 | ||
|
|
9f7ff44164 | ||
|
|
316a91d102 | ||
|
|
000c00b346 | ||
|
|
fae53c8d6e | ||
|
|
23c0ada511 | ||
|
|
a812cf5316 | ||
|
|
6742daf14c | ||
|
|
61b77290fe | ||
|
|
6a0a8002d9 | ||
|
|
5d49c4bd96 | ||
|
|
1072a3612f | ||
|
|
3fece6a554 | ||
|
|
d459833b44 | ||
|
|
0f217461a2 | ||
|
|
926c7ef117 | ||
|
|
9f90ed5f76 | ||
|
|
ca6826b3d7 | ||
|
|
846615374f | ||
|
|
e9e7ca3df8 | ||
|
|
cf7e52d71e | ||
|
|
1f384616c7 | ||
|
|
8b99edab3e | ||
|
|
10f7c2307c | ||
|
|
505621cc6d | ||
|
|
d9f6e6da92 | ||
|
|
a05add18cd | ||
|
|
fd5dcc07fa | ||
|
|
f67e3f27e8 | ||
|
|
b838d2fa26 | ||
|
|
e846990877 | ||
|
|
2250904a90 | ||
|
|
6500cb9e2e | ||
|
|
66311c1f4d | ||
|
|
dd261f4ed2 | ||
|
|
0d2ea072ca | ||
|
|
c6293bf567 | ||
|
|
622631bb1c | ||
|
|
5438954d7c | ||
|
|
7931b5f626 | ||
|
|
a32d8c6193 | ||
|
|
2cde060e2f | ||
|
|
64e82a2f34 | ||
|
|
0d322a718e | ||
|
|
00e3ee492f | ||
|
|
da2f616509 | ||
|
|
81fbb39c35 | ||
|
|
2334d2684e | ||
|
|
63bb50a602 | ||
|
|
e187d54d0b | ||
|
|
26029b124d | ||
|
|
4dc4a42570 | ||
|
|
69706789e2 | ||
|
|
337dc296ac | ||
|
|
fddcbc72b5 | ||
|
|
c6a5028306 | ||
|
|
791cc24d1e | ||
|
|
b741c49f2d | ||
|
|
8b83830c15 | ||
|
|
c4cec0b122 | ||
|
|
74a519472a | ||
|
|
e452f82542 | ||
|
|
c67771698a | ||
|
|
fa9f4ce1c7 | ||
|
|
c0538bd1ba | ||
|
|
6a91e57b58 | ||
|
|
4b5887b232 | ||
|
|
6046669135 | ||
|
|
aa4d30261b | ||
|
|
b8bf9495d0 | ||
|
|
4f7822b4fb | ||
|
|
2910f6ad34 | ||
|
|
f41beff873 | ||
|
|
31fb2dac94 | ||
|
|
7424ba3d60 | ||
|
|
26e5cd3514 | ||
|
|
0a7f7c782e | ||
|
|
5d6a3af63b | ||
|
|
90b237b9c8 | ||
|
|
dd71f2df80 | ||
|
|
c9be44ab2f | ||
|
|
6642916612 | ||
|
|
4dae7f8af4 | ||
|
|
894928eed3 | ||
|
|
3f8a5a6bd5 | ||
|
|
784fc6f20e | ||
|
|
f5d49c6ef6 | ||
|
|
9c8617d452 | ||
|
|
0867327d2a | ||
|
|
4df7758e82 | ||
|
|
25965581ab | ||
|
|
33b72056a9 | ||
|
|
ffc984824d | ||
|
|
5cccfce28e | ||
|
|
fe27630042 | ||
|
|
29180a1040 | ||
|
|
24789355be | ||
|
|
edb0f4b369 | ||
|
|
91b6dd48fe | ||
|
|
f667d025c5 | ||
|
|
7131a6bc84 | ||
|
|
9d60096df9 | ||
|
|
494403333b | ||
|
|
8c25a5299d | ||
|
|
c51789c892 | ||
|
|
6bdef66282 | ||
|
|
7796ad2a55 | ||
|
|
5241d0f58c | ||
|
|
f09c7753ab | ||
|
|
92a42d5c9b | ||
|
|
06b3f8c6b1 | ||
|
|
700809bc77 | ||
|
|
ca8196007c | ||
|
|
698ce813c1 | ||
|
|
6ad8d296ad | ||
|
|
b8a781e3c4 | ||
|
|
0f4d0d2cde | ||
|
|
195aca81bb | ||
|
|
162b31ef2a | ||
|
|
d076398cce | ||
|
|
abeee87c69 | ||
|
|
836cb01391 | ||
|
|
529a867a95 | ||
|
|
4b719f5106 | ||
|
|
b9cfee3163 | ||
|
|
5e9cd21f2b | ||
|
|
9eb1faa8ca | ||
|
|
a3e53728e3 | ||
|
|
c1dd1dd669 | ||
|
|
2623504bc8 | ||
|
|
6caaef4b9a | ||
|
|
7b3ccfb67d | ||
|
|
377bbc702a | ||
|
|
f388a9cc8c | ||
|
|
a3707b857d | ||
|
|
23323442f2 | ||
|
|
8f13211b8b | ||
|
|
c9a8e2156f | ||
|
|
614850f056 | ||
|
|
4fe304e5bf | ||
|
|
20e6874771 | ||
|
|
2610359c29 | ||
|
|
24099a0892 | ||
|
|
04127c4ab9 | ||
|
|
296a7848b4 | ||
|
|
041688a996 | ||
|
|
46f5efb418 | ||
|
|
abc5e76913 | ||
|
|
15899fccbd | ||
|
|
b048c1c002 | ||
|
|
a38b24afc4 | ||
|
|
8c50c14fe0 | ||
|
|
01b5e3c01b | ||
|
|
1b92868b15 | ||
|
|
0e8805e5eb | ||
|
|
661d28956b | ||
|
|
cdead9468c | ||
|
|
9aad3f97b6 | ||
|
|
002fd0180e | ||
|
|
245db0572a | ||
|
|
f913972868 | ||
|
|
db2eecd8bc | ||
|
|
3f912fe637 | ||
|
|
0e7a6c15a7 | ||
|
|
5eb575e496 | ||
|
|
b93df38efa | ||
|
|
bbe56f6f2d | ||
|
|
149517e436 | ||
|
|
907432c0b3 | ||
|
|
b5c7526cea | ||
|
|
de8019d8fc | ||
|
|
aacec874d7 | ||
|
|
b5dd3922a3 | ||
|
|
ed4a1d8f21 | ||
|
|
2a2eb93187 | ||
|
|
4eaed8dba6 | ||
|
|
4b0703ece5 | ||
|
|
b3c5378920 | ||
|
|
2b4b20b9fa | ||
|
|
3e4db580eb | ||
|
|
091f0a12b6 | ||
|
|
8ccc3016c7 | ||
|
|
0f17fb16c4 | ||
|
|
8890a7cb87 | ||
|
|
4a273bd826 | ||
|
|
f4c3222174 | ||
|
|
1d44a52981 | ||
|
|
ccabf3d4e9 | ||
|
|
ed0a6c8b82 | ||
|
|
044bf6c594 | ||
|
|
af37001a64 | ||
|
|
84810b9a97 | ||
|
|
f7e5e6ed7b | ||
|
|
95ff43b71d | ||
|
|
1ecdba57bd | ||
|
|
7c5e3f9f27 | ||
|
|
87b0a8e7af | ||
|
|
930b4c023f | ||
|
|
13848f9525 | ||
|
|
0f43222795 | ||
|
|
a88a20775d | ||
|
|
d04cf46c61 | ||
|
|
0bec405a61 | ||
|
|
99a2fb5c8f | ||
|
|
274da64555 | ||
|
|
ed43e44883 | ||
|
|
01ea313e93 | ||
|
|
ee03eb4a67 | ||
|
|
bf615b96a7 | ||
|
|
ce1374844a | ||
|
|
6f191e2dba | ||
|
|
07cd087d9e | ||
|
|
bc659f50dc | ||
|
|
98c4b4dc70 | ||
|
|
7a0ff75fba | ||
|
|
c2b1c84268 | ||
|
|
12b34017e7 | ||
|
|
d76eb8b1c8 | ||
|
|
9a679424d7 | ||
|
|
6855629524 | ||
|
|
87206bbcc8 | ||
|
|
395291481a | ||
|
|
2a5fe191b0 | ||
|
|
c5d39dae42 | ||
|
|
2f601d3650 | ||
|
|
f3128bf86d | ||
|
|
b4d38db487 | ||
|
|
f9aa8573a5 | ||
|
|
31060ae2b2 | ||
|
|
72a922a080 | ||
|
|
d23565750a | ||
|
|
841a0310cf | ||
|
|
198cc22caf | ||
|
|
bf229e28ce | ||
|
|
c780fddb47 | ||
|
|
43ed522fa8 | ||
|
|
d79b079677 | ||
|
|
b0448a4bd7 | ||
|
|
e0792d776f | ||
|
|
45941fa780 | ||
|
|
fdcb59ae4a | ||
|
|
ed2100c40f | ||
|
|
6d55356219 | ||
|
|
7b6b8d79b1 | ||
|
|
29860a0d80 | ||
|
|
954419baa3 | ||
|
|
8b05da2c3b | ||
|
|
ef3e5c6197 | ||
|
|
306b846b9d | ||
|
|
5d54c1f28f | ||
|
|
4b883b4870 | ||
|
|
2f5c563236 | ||
|
|
f94ee1a04b | ||
|
|
1060b3c800 | ||
|
|
1717ec4ceb | ||
|
|
ddb1131ea8 | ||
|
|
8fa0f1d4b8 | ||
|
|
7b81db5ce1 | ||
|
|
3d9dbfb5fa | ||
|
|
18ce8177f7 | ||
|
|
2145455c12 | ||
|
|
882f876e2b | ||
|
|
ab87f72781 | ||
|
|
b3c67e5d8f | ||
|
|
abc15557d9 | ||
|
|
8b1e670281 | ||
|
|
499cbbe9b9 | ||
|
|
31555d6bc4 | ||
|
|
7a32ba9ea2 | ||
|
|
a1775be6b0 | ||
|
|
22b89268c0 | ||
|
|
c1d60de3cc | ||
|
|
b550b4d7bf | ||
|
|
2e577dbbb2 | ||
|
|
b21ad34f77 | ||
|
|
4e9028462e | ||
|
|
24e73b68c9 | ||
|
|
c1c8d8e91a | ||
|
|
a6e171abee | ||
|
|
67ded2c136 | ||
|
|
85acca454f | ||
|
|
679477296f | ||
|
|
62a443dc31 | ||
|
|
67bfc99983 | ||
|
|
4fb2ea22f4 | ||
|
|
94d1cd3c27 | ||
|
|
178bbc1751 | ||
|
|
743f85015a | ||
|
|
ff8c2c8435 | ||
|
|
82f525c21e | ||
|
|
941e467b93 | ||
|
|
5e6be67cc9 | ||
|
|
34c446fc29 | ||
|
|
0ee7ca1a74 | ||
|
|
408cbd6446 | ||
|
|
535f2c1839 | ||
|
|
ec43d1ef12 | ||
|
|
0848e2f75e | ||
|
|
cd68e45ac4 | ||
|
|
957d4e8a03 | ||
|
|
27d053f5fb | ||
|
|
16f5d0deeb | ||
|
|
81c2232609 | ||
|
|
2f64c66b63 | ||
|
|
76ee38a2d3 | ||
|
|
fe495319e2 | ||
|
|
f33ec2cc48 | ||
|
|
3e5257cae9 | ||
|
|
c7eb428c9e | ||
|
|
63610228f2 | ||
|
|
1cc1036468 | ||
|
|
adfd514772 | ||
|
|
79731ccb69 | ||
|
|
9cb3f72a9b | ||
|
|
1dba4e4565 | ||
|
|
9600933b63 | ||
|
|
ec5a01925f | ||
|
|
d0a55bba67 | ||
|
|
df6f0467a5 | ||
|
|
3d6f0723f5 | ||
|
|
3ee20b8b76 | ||
|
|
359584ba93 | ||
|
|
fa8083599a | ||
|
|
25971985ee | ||
|
|
b0613be2a2 | ||
|
|
241169308a | ||
|
|
58757a23a2 | ||
|
|
e062b9c5f8 | ||
|
|
ead4189904 | ||
|
|
cdbaccaadd | ||
|
|
80414e2177 | ||
|
|
b7fa1be650 | ||
|
|
f46d16ca03 | ||
|
|
7d7910f934 | ||
|
|
6a5637023f | ||
|
|
78604ed1f6 | ||
|
|
ab5866427e | ||
|
|
598eff9abd | ||
|
|
73b1028fe8 | ||
|
|
abe3060ea9 | ||
|
|
2b644de025 | ||
|
|
ba802c6a7d | ||
|
|
2555fa645b | ||
|
|
96300a0491 | ||
|
|
d454c7e8f4 | ||
|
|
e1954e0821 | ||
|
|
36aff057a5 | ||
|
|
70a68fde41 | ||
|
|
6af126c47c | ||
|
|
7d5db3e3c7 | ||
|
|
3547036a00 | ||
|
|
3988003c17 | ||
|
|
1e585a9876 | ||
|
|
5a2e61ba13 | ||
|
|
3460389d2f | ||
|
|
0a599bfb0e | ||
|
|
d084dc016a | ||
|
|
66b9e7ee1f | ||
|
|
f9063cf252 | ||
|
|
f9692ddd48 | ||
|
|
5e29bc7145 | ||
|
|
c053cf21a6 |
19
.gitignore
vendored
19
.gitignore
vendored
@@ -1,9 +1,26 @@
|
||||
*.user
|
||||
.qmake.stash
|
||||
.qtc_clangd/**
|
||||
Makefile
|
||||
bin/**
|
||||
build/**
|
||||
helper/*.o
|
||||
helper/moc*.*
|
||||
helper/octphelper
|
||||
cachecleaner/bin/**
|
||||
cachecleaner/build/**
|
||||
cachecleaner/.qtc_clangd/**
|
||||
notifier/bin/**
|
||||
notifier/build/**
|
||||
qrc_resources.cpp
|
||||
notifier/.qtc_clangd/**
|
||||
octopi.pro.user
|
||||
qrc_resources.cpp
|
||||
repoeditor/.qtc_clangd/**
|
||||
repoeditor/bin/**
|
||||
repoeditor/build/**
|
||||
sudo/*.o
|
||||
sudo/moc*.*
|
||||
sudo/octopi-sudo
|
||||
sudo/qrc*.cpp
|
||||
sudo/ui_pass*.h
|
||||
sudo/.qtc_clangd
|
||||
|
||||
13
.tx/config
13
.tx/config
@@ -1,8 +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
|
||||
|
||||
|
||||
235
CHANGELOG
235
CHANGELOG
@@ -1,4 +1,181 @@
|
||||
0.9.0
|
||||
0.16.2 (2024-06-17)
|
||||
BugFix: Increased width of Terminal tab labels on optionsdialog.
|
||||
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.
|
||||
Added "pikaur" AUR tool support (thanks to ewilly).
|
||||
Added "yay" AUR tool support.
|
||||
Added option "--devel" in AUR tab to check for newer versions of dev packages.
|
||||
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" 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.
|
||||
Added option to enable/disable confirmation dialog in system upgrade.
|
||||
Added option to enable/disable internet checking.
|
||||
Renamed Transaction tab to Actions tab.
|
||||
Added left click support on package icon in package list to launch context menu.
|
||||
Added option to never check for package updates in Notifier.
|
||||
Added tooltip "Upgrading..." while Notifier is upgrading the system.
|
||||
Added "Info" option in package list context menu.
|
||||
Added ArcoLinux, Artix Linux, CondresOS and EndeavourOS distro support.
|
||||
Added support for sudo (and NOPASSWD) executing thru new octopi-helper subproject.
|
||||
Added option to exit Octopi while a transaction is already running.
|
||||
Added support for GNOME file manager/editor.
|
||||
Added option for changing use of alternating row colors in package list.
|
||||
Added a redesigned AUR tab in Options dialog.
|
||||
Added option to change terminal's color scheme, font family and font size through ~/.config/octopi/octopi.conf.
|
||||
Maximization of properties pane now hides tab bar.
|
||||
BugFix: Many clazy/manual code enhancements merged from luis-pereira (from LXQt organization).
|
||||
BugFix: AUR upgrades in notifier were not setting m_commandExecuting flag.
|
||||
BugFix: Make notifier code consistent with AUR upgrades.
|
||||
BugFix: Replaced 'Sync database' command text to 'Check updates'.
|
||||
BugFix: Always do a "pacman -Syu" in System Upgrade.
|
||||
BugFix: Notifier now uses "checkupdates" instead "pacman -Sy[y]". This means Octopi no longer can lead
|
||||
the OS to a "partial updates" state and works gracefully with other package tools.
|
||||
BugFix: Don't let user exits RepoEditor without answerig if he wants to save changes.
|
||||
BugFix: Sometimes non-outdated AUR packages did not get refreshed.
|
||||
BugFix: Now Actions tab is disable while in AUR mode.
|
||||
BugFix: Make "Open terminal here" option work with qtermwidget.
|
||||
BugFix: Added support for symbolic lynks in "open file".
|
||||
BugFix: Pkg build date obeys Locale datetime format.
|
||||
BugFix: SysInfo no longer pushes the collected logs to a remote paste service. It saves them locally.
|
||||
BugFix: "exists in filesystem" messages during transactions are shown again.
|
||||
BugFix: MultiselectionDialog did not resize pkg description automatically.
|
||||
BugFix: Some packages were not displaying Optional Deps at Info tab.
|
||||
BugFix: Huge delay when scrolling thru large package list.
|
||||
BugFix: Speed improvements in package list building.
|
||||
BugFix: OptionsDialog was not saving AUR settings if tab changed before clicking OK.
|
||||
BugFix: Changed Manjaro news url.
|
||||
BugFix: Notifier checked for available internet connection too early with an error dialog box.
|
||||
BugFix: Changed command string to Reinstall/Update when package is already installed or outdated.
|
||||
BugFix: Clear filter line edit when navigating thru package anchors at Info tab.
|
||||
BugFix: Info and Files tabs were not showing any info automaticaly when switching between
|
||||
foreign tool/pacman lists.
|
||||
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 (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.
|
||||
@@ -54,7 +231,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.
|
||||
@@ -77,7 +254,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).
|
||||
@@ -108,7 +285,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.
|
||||
@@ -138,7 +315,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.
|
||||
@@ -166,7 +343,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
|
||||
@@ -192,14 +369,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).
|
||||
@@ -227,7 +404,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).
|
||||
@@ -281,7 +458,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.
|
||||
@@ -296,7 +473,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.
|
||||
@@ -307,7 +484,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.
|
||||
@@ -354,7 +531,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.
|
||||
@@ -375,23 +552,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.
|
||||
@@ -401,14 +578,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.
|
||||
@@ -416,11 +593,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.
|
||||
@@ -428,33 +605,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
130
CMakeLists.txt
Normal file
@@ -0,0 +1,130 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(octopi VERSION 0.16.2 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)
|
||||
find_package(qtermwidget6 REQUIRED)
|
||||
else()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Gui Network Xml Widgets LinguistTools)
|
||||
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 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 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/gnome/32x32/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)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION share/licenses/octopi)
|
||||
17
INSTALL
17
INSTALL
@@ -1,6 +1,6 @@
|
||||
Installing Octopi is a pretty straightforward task.
|
||||
|
||||
Assuming you have updated Qt4(*) libs installed in your system, all
|
||||
Assuming you have updated Qt5 libs installed in your system, all
|
||||
you have to do is run:
|
||||
|
||||
makepkg -f
|
||||
@@ -8,21 +8,10 @@ you have to do is run:
|
||||
Wait for the compilation and then install the generated package (as
|
||||
root), using:
|
||||
|
||||
pacman -U [--force] <nameOfTheGeneratedOctopiPackage.tar.xz>
|
||||
pacman -U <nameOfTheGeneratedOctopiPackage.tar.[xz|zst]>
|
||||
|
||||
You can also install the generated package notifier, using:
|
||||
|
||||
pacman -U [--force] <nameOfTheGeneratedOctopiNotifierPackage.tar.xz>
|
||||
|
||||
Octopi is located at the system utilities menu of your Desktop
|
||||
Octopi is located on the system utilities menu of your Desktop
|
||||
Environment.
|
||||
|
||||
|
||||
Enjoy!
|
||||
|
||||
(*) Octopi is also Qt5 compatible, you'll only have to adjust the
|
||||
"depends" section in PKGBUILD.
|
||||
|
||||
If you are compiling Octopi in a KDE centric-distro like KaOS and Chakra, you should
|
||||
first uncomment the "#define NO_GTK_STYLE" string located at "src/main.cpp" and
|
||||
"notifier/octopi-notifier/main.cpp", otherwise it won't compile at all.
|
||||
|
||||
96
PKGBUILD
96
PKGBUILD
@@ -1,71 +1,53 @@
|
||||
pkgname=octopi
|
||||
pkgver=0.9.0
|
||||
_pkgname=octopi
|
||||
pkgname=octopi-git
|
||||
pkgver=0.16.2.latest
|
||||
pkgrel=1
|
||||
pkgdesc="This is Octopi, a powerful Pacman frontend using Qt libs"
|
||||
url="https://octopiproject.wordpress.com/"
|
||||
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=('pacman' 'pacman-contrib' 'pkgfile' 'knotifications' 'alpm_octopi_utils' 'xterm' 'qtermwidget')
|
||||
optdepends=('kdesu: for KDE'
|
||||
'gksu: for XFCE, Gnome, LXDE, Cinnamon'
|
||||
'gnome-keyring: for password management'
|
||||
'yaourt: for AUR support')
|
||||
depends=('alpm_octopi_utils' 'qtermwidget' 'sudo')
|
||||
makedepends=('git')
|
||||
groups=('system')
|
||||
install=octopi.install
|
||||
source=("https://github.com/aarnt/octopi/archive/v${pkgver}.tar.gz")
|
||||
#md5sums=('')
|
||||
source=("git+https://github.com/aarnt/octopi.git")
|
||||
md5sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
# 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/octopi-notifier.pro
|
||||
|
||||
cd "${_pkgname}"
|
||||
cp resources/images/octopi_green.png resources/images/octopi.png
|
||||
}
|
||||
|
||||
|
||||
pkgver() {
|
||||
cd "${_pkgname}"
|
||||
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
qmake-qt5 octopi.pro
|
||||
make
|
||||
|
||||
cd notifier/pacmanhelper
|
||||
qmake-qt5 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}" pacmanhelper.pro
|
||||
make
|
||||
cd ../..
|
||||
|
||||
cd notifier/octopi-notifier
|
||||
qmake-qt5 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}" octopi-notifier.pro
|
||||
make
|
||||
cd ../..
|
||||
|
||||
cd repoeditor
|
||||
qmake-qt5 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}" octopi-repoeditor.pro
|
||||
make
|
||||
cd ..
|
||||
|
||||
cd cachecleaner
|
||||
qmake-qt5 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}" octopi-cachecleaner.pro
|
||||
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}-${pkgver}
|
||||
make INSTALL_ROOT=${pkgdir} install
|
||||
|
||||
cd notifier/pacmanhelper
|
||||
make INSTALL_ROOT=${pkgdir} install
|
||||
cd ../..
|
||||
|
||||
cd notifier/octopi-notifier
|
||||
make INSTALL_ROOT=${pkgdir} install
|
||||
cd ../..
|
||||
|
||||
cd repoeditor
|
||||
make INSTALL_ROOT=${pkgdir} install
|
||||
cd ..
|
||||
|
||||
cd cachecleaner
|
||||
make INSTALL_ROOT=${pkgdir} install
|
||||
cd "${_pkgname}"
|
||||
make INSTALL_ROOT="${pkgdir}" install
|
||||
|
||||
_subdirs="cachecleaner helper notifier repoeditor"
|
||||
|
||||
for _subdir in $_subdirs; do
|
||||
pushd $_subdir
|
||||
make INSTALL_ROOT="${pkgdir}" install
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
138
README.md
138
README.md
@@ -1,60 +1,144 @@
|
||||
## This is Octopi, a powerful Pacman/AUR frontend using Qt libs.
|
||||
## This is Octopi, a powerful Pacman/AUR front end using Qt libs.
|
||||
|
||||
The project site is hosted at https://octopiproject.wordpress.com
|
||||

|
||||
|
||||
Currently, 9 Linux distros are compatible with it
|
||||
The project site is hosted on https://tintaescura.com/projects/octopi
|
||||
|
||||
Currently, 12 Linux distros are compatible with it
|
||||
|
||||
* [Antergos](https://antergos.com/)
|
||||
* [ArchBang](http://archbang.org/)
|
||||
* [Arch](https://www.archlinux.org/)
|
||||
* [Chakra](https://chakralinux.org/)
|
||||
* [Archcraft](https://archcraft.io/)
|
||||
* [Arch Linux](https://www.archlinux.org/)
|
||||
* [ArcoLinux](https://arcolinux.info/)
|
||||
* [Artix Linux](https://artixlinux.org)
|
||||
* [CachyOS](https://cachyos.org/)
|
||||
* [EndeavourOS](https://endeavouros.com/)
|
||||
* [Garuda Linux](https://garudalinux.org/)
|
||||
* [KaOS](https://kaosx.us/)
|
||||
* [Manjaro](https://manjaro.org/)
|
||||
* [mooOS](http://mooos.sourceforge.net/)
|
||||
* [Netrunner (rolling)](http://www.netrunner.com/netrunner-rolling-release/)
|
||||
* [Obarun Linux](https://web.obarun.org/index.php?id=1)
|
||||
* [Parabola GNU/Linux-libre](https://www.parabola.nu/)
|
||||
|
||||
### What you must install in your system to have Octopi fully functional
|
||||
### 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 privilege escalation tool to use it. Octopi supports gksu, kdesu and lxqt-sudo for that
|
||||
* qtermwidget >= 0.8 in order to build Octopi with embedded terminal support
|
||||
|
||||
### Simple steps to build Octopi code
|
||||
* A helper to execute pacman commands called "octphelper", available on "./helper" dir
|
||||
* A privilege escalation tool called [qt-sudo](https://github.com/aarnt/qt-sudo/)
|
||||
* qtermwidget package, in order to build Octopi with embedded terminal support
|
||||
|
||||
Assuming you have Qt5 libs properly installed, go to the directory where the code is located:
|
||||
### To install Octopi using pacman
|
||||
|
||||
If Octopi package is available in your distro's repository, you can just type:
|
||||
|
||||
```
|
||||
$ cd OCTOPI_PATH
|
||||
$ qmake-qt5
|
||||
# pacman -S octopi
|
||||
```
|
||||
|
||||
### Steps to build Octopi source code (qmake)
|
||||
|
||||
Assuming you have vala compiler and Qt6 libs properly installed, follow these steps:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/aarnt/alpm_octopi_utils
|
||||
$ cd alpm_octopi_utils
|
||||
$ make
|
||||
# make install
|
||||
$ cd ..
|
||||
$ git clone https://github.com/aarnt/qt-sudo
|
||||
$ cd qt-sudo
|
||||
$ qmake6
|
||||
$ make
|
||||
# make install
|
||||
$ cd ..
|
||||
$ 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:
|
||||
|
||||
```
|
||||
$ cd OCTOPI_PATH
|
||||
$ cd OCTOPI_PATH (where you git cloned the source code)
|
||||
$ makepkg -f
|
||||
```
|
||||
|
||||
### How to enable AUR support (that "alien" icon at toolbar)
|
||||
### Steps to build Octopi source code (CMake)
|
||||
|
||||
To enable AUR support, you'll need to install [yaourt](https://archlinux.fr/yaourt-en),
|
||||
[pacaur](https://github.com/rmarquis/pacaur) or [trizen](https://github.com/trizen/trizen) in your system.
|
||||
In Chakra, [chaser](https://github.com/ccr-tools/chaser) will be supported out of the box.
|
||||
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
|
||||
|
||||
```
|
||||
$ /usr/bin/octopi
|
||||
```
|
||||
|
||||
### To run Octopi Notifier
|
||||
|
||||
```
|
||||
$ /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), [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 KaOS, [kcp](https://github.com/bvaudour/kcp) will be supported out of the box.
|
||||
|
||||
### Ways to help/support Octopi
|
||||
|
||||
* You can "Star" it at the Github page - https://github.com/aarnt/octopi/
|
||||
* You can vote in the AUR package available at https://aur.archlinux.org/packages/octopi/
|
||||
* You can translate it to your mother language at https://www.transifex.com/projects/p/octopi/
|
||||
* You can follow author's twitter account at https://twitter.com/aaarnt
|
||||
* You can buy author's technical book (currently in portuguese) about Octopi and Qt5 at
|
||||
* 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 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
|
||||
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,8 +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
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)
|
||||
@@ -23,6 +23,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include "../src/strconstants.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
#include <QMessageBox>
|
||||
|
||||
/*
|
||||
* CacheCleaner window constructor
|
||||
@@ -40,20 +43,22 @@ CacheCleaner::CacheCleaner(QWidget *parent) :
|
||||
int keepUninstalled = SettingsManager::getKeepNumUninstalledPackages();
|
||||
ui->keepUninstalledPackagesSpinner->setValue(keepUninstalled);
|
||||
|
||||
|
||||
//create package group wrappers
|
||||
m_installed = new PackageGroupModel("",
|
||||
m_installed = new PackageGroupModel(QLatin1String(""),
|
||||
ui->installedPackagesList,
|
||||
ui->keepInstalledPackagesSpinner,
|
||||
ui->refreshInstalledButton,
|
||||
ui->cleanInstalledButton);
|
||||
|
||||
m_uninstalled = new PackageGroupModel("-u",
|
||||
m_uninstalled = new PackageGroupModel(QStringLiteral("-u"),
|
||||
ui->uninstalledPackagesList,
|
||||
ui->keepUninstalledPackagesSpinner,
|
||||
ui->refreshUninstalledButton,
|
||||
ui->cleanUninstalledButton);
|
||||
|
||||
m_tcpServer = new QTcpServer(this);
|
||||
connect(m_tcpServer, &QTcpServer::newConnection, this, &CacheCleaner::onSendInfoToOctopiHelper);
|
||||
|
||||
restoreGeometry(SettingsManager::getCacheCleanerWindowSize());
|
||||
}
|
||||
|
||||
@@ -67,6 +72,69 @@ CacheCleaner::~CacheCleaner()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/*
|
||||
* Start listening for helper connections
|
||||
*/
|
||||
bool CacheCleaner::startServer()
|
||||
{
|
||||
bool res=true;
|
||||
|
||||
if (!m_tcpServer->listen(QHostAddress::LocalHost, 12703))
|
||||
{
|
||||
QMessageBox::critical(this, StrConstants::getApplicationName(),
|
||||
QStringLiteral("Unable to start the server: %1.")
|
||||
.arg(m_tcpServer->errorString()));
|
||||
res=false;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Answers Helper if CacheCleaner is executing actions
|
||||
*/
|
||||
void CacheCleaner::onSendInfoToOctopiHelper()
|
||||
{
|
||||
QString msg;
|
||||
QByteArray block;
|
||||
QDataStream out(&block, QIODevice::WriteOnly);
|
||||
out.setVersion(QDataStream::Qt_5_15);
|
||||
|
||||
//Is octopi-helper running?
|
||||
bool isHelperExecuting=UnixCommand::isOctopiHelperRunning();
|
||||
|
||||
bool commandExecuting = (m_installed->isExecutingCommand || m_uninstalled->isExecutingCommand);
|
||||
|
||||
if (isHelperExecuting && commandExecuting)
|
||||
{
|
||||
msg=QLatin1String("Octopi est occupatus");
|
||||
out << msg;
|
||||
}
|
||||
else if (isHelperExecuting && !commandExecuting)
|
||||
{
|
||||
msg=QLatin1String("Octopi serenum est");
|
||||
out << msg;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg=QLatin1String("Atramento nigro");
|
||||
out << msg;
|
||||
}
|
||||
|
||||
QTcpSocket *clientConnection = m_tcpServer->nextPendingConnection();
|
||||
if (clientConnection->isOpen())
|
||||
{
|
||||
connect(clientConnection, &QAbstractSocket::disconnected,
|
||||
clientConnection, &QObject::deleteLater);
|
||||
|
||||
clientConnection->write(block);
|
||||
clientConnection->disconnectFromHost();
|
||||
}
|
||||
|
||||
//m_installed->isExecutingCommand=false;
|
||||
//m_uninstalled->isExecutingCommand=false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Save settings when closing window
|
||||
*/
|
||||
|
||||
@@ -25,6 +25,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include "packagegroupmodel.h"
|
||||
|
||||
class QTcpServer;
|
||||
|
||||
namespace Ui {
|
||||
class CacheCleaner;
|
||||
}
|
||||
@@ -40,10 +42,15 @@ private:
|
||||
Ui::CacheCleaner *ui;
|
||||
PackageGroupModel *m_installed;
|
||||
PackageGroupModel *m_uninstalled;
|
||||
QTcpServer *m_tcpServer;
|
||||
|
||||
private slots:
|
||||
void onSendInfoToOctopiHelper();
|
||||
|
||||
public:
|
||||
explicit CacheCleaner(QWidget *parent = 0);
|
||||
~CacheCleaner();
|
||||
bool startServer();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
|
||||
@@ -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,37 +31,59 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
QtSingleApplication app( "Cache Cleaner - Octopi", argc, argv );
|
||||
unsetenv("TMPDIR");
|
||||
QtSingleApplication app( QStringLiteral("Cache Cleaner - Octopi"), argc, argv );
|
||||
|
||||
//If there is already an instance running...
|
||||
if (app.isRunning())
|
||||
{
|
||||
app.sendMessage("RAISE");
|
||||
app.sendMessage(QStringLiteral("RAISE"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
app.sendMessage("RAISE");
|
||||
app.sendMessage(QStringLiteral("RAISE"));
|
||||
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load(":/resources/translations/octopi_cachecleaner_" +
|
||||
appTranslator.load(QLatin1String(":/resources/translations/octopi_cachecleaner_") +
|
||||
QLocale::system().name());
|
||||
app.installTranslator(&appTranslator);
|
||||
|
||||
if (UnixCommand::isRootRunning()){
|
||||
QMessageBox::critical( 0, StrConstants::getApplicationName(), StrConstants::getErrorRunningWithRoot());
|
||||
return ( -2 );
|
||||
QMessageBox::critical( nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunningWithRoot());
|
||||
return (-2);
|
||||
}
|
||||
|
||||
if (!UnixCommand::hasTheExecutable("paccache"))
|
||||
if (!UnixCommand::hasTheExecutable(QStringLiteral("paccache")))
|
||||
{
|
||||
QMessageBox::critical( 0, StrConstants::getApplicationName(), StrConstants::getExecutableCouldNotBeFound().arg("\"paccache\""));
|
||||
return ( -3 );
|
||||
QMessageBox::critical( nullptr, StrConstants::getApplicationName(), StrConstants::getExecutableCouldNotBeFound().arg(QStringLiteral("\"paccache\"")));
|
||||
return (-3);
|
||||
}
|
||||
|
||||
if (!QFile::exists(ctn_OCTOPI_HELPER_PATH))
|
||||
{
|
||||
qDebug() << "Aborting cache-cleaner as 'octphelper' binary could not be found! [" << ctn_OCTOPI_HELPER_PATH << "]";
|
||||
return (-4);
|
||||
}
|
||||
|
||||
if (!QFile::exists(ctn_OCTOPISUDO))
|
||||
{
|
||||
qDebug() << "Aborting cache-cleaner as 'octopi-sudo' binary could not be found! [" << ctn_OCTOPISUDO << "]";
|
||||
return (-5);
|
||||
}
|
||||
|
||||
if (!UnixCommand::isOctoToolRunning(QStringLiteral("octopi-cachecle")))
|
||||
{
|
||||
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunOctopiCacheCleanerAsUsrBin());
|
||||
return (-6);
|
||||
}
|
||||
|
||||
CacheCleaner w;
|
||||
app.setActivationWindow(&w);
|
||||
w.show();
|
||||
QResource::registerResource("./resources.qrc");
|
||||
if (w.startServer())
|
||||
{
|
||||
app.setActivationWindow(&w);
|
||||
w.show();
|
||||
QResource::registerResource(QStringLiteral("./resources.qrc"));
|
||||
|
||||
return app.exec();
|
||||
return app.exec();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=Octopi CacheCleaner
|
||||
Icon=octopi
|
||||
Exec=octopi-cachecleaner
|
||||
Exec=/usr/bin/octopi-cachecleaner
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GNOME;GTK;System;
|
||||
#NotShowIn=GNOME;XFCE;LXDE;KDE;
|
||||
StartupNotify=true
|
||||
Version=1.5
|
||||
SingleMainWindow=true
|
||||
|
||||
@@ -7,6 +7,14 @@
|
||||
QT += core gui network xml widgets
|
||||
|
||||
CONFIG += qt console warn_on debug
|
||||
|
||||
# Disable automatic string conversions
|
||||
DEFINES += QT_USE_QSTRINGBUILDER \
|
||||
QT_NO_CAST_FROM_ASCII \
|
||||
QT_NO_CAST_TO_ASCII \
|
||||
QT_NO_URL_CAST_FROM_STRING \
|
||||
QT_NO_CAST_FROM_BYTEARRAY
|
||||
|
||||
TEMPLATE = app
|
||||
DESTDIR += bin
|
||||
OBJECTS_DIR += build
|
||||
@@ -16,6 +24,7 @@ UI_DIR += build
|
||||
HEADERS += cachecleaner.h \
|
||||
packagegroupmodel.h \
|
||||
../src/strconstants.h \
|
||||
../src/qaesencryption.h \
|
||||
../src/unixcommand.h \
|
||||
../src/wmhelper.h \
|
||||
../src/terminal.h \
|
||||
@@ -33,6 +42,7 @@ SOURCES += main.cpp \
|
||||
cachecleaner.cpp \
|
||||
packagegroupmodel.cpp \
|
||||
../src/strconstants.cpp \
|
||||
../src/qaesencryption.cpp \
|
||||
../src/unixcommand.cpp \
|
||||
../src/wmhelper.cpp \
|
||||
../src/terminal.cpp \
|
||||
@@ -94,8 +104,10 @@ TRANSLATIONS += resources/translations/octopi_cachecleaner_pt_BR.ts \
|
||||
resources/translations/octopi_cachecleaner_gl_ES.ts \
|
||||
resources/translations/octopi_cachecleaner_ast.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_zh-Hans.ts \
|
||||
resources/translations/octopi_cachecleaner_zh_CN.ts \
|
||||
resources/translations/octopi_cachecleaner_ko.ts \
|
||||
resources/translations/octopi_cachecleaner_ko_KR.ts \
|
||||
|
||||
# install
|
||||
isEmpty(PREFIX) {
|
||||
|
||||
@@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include "packagegroupmodel.h"
|
||||
#include "../src/strconstants.h"
|
||||
|
||||
#include <QSharedMemory>
|
||||
#include <QApplication>
|
||||
#include <QMessageBox>
|
||||
|
||||
@@ -37,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),
|
||||
@@ -49,6 +50,8 @@ PackageGroupModel::PackageGroupModel(QString optionsString,
|
||||
{
|
||||
m_cleanButton->setText(tr("Clean"));
|
||||
|
||||
m_sharedMemory=new QSharedMemory(QStringLiteral("org.arnt.octopi"), this);
|
||||
|
||||
//setup UI slots
|
||||
connect( m_spinner, SIGNAL( valueChanged(int) ), SLOT( updateKeepArchives() ) );
|
||||
connect( m_spinner, SIGNAL( valueChanged(int) ), SLOT( refreshCacheView() ) );
|
||||
@@ -67,6 +70,7 @@ PackageGroupModel::PackageGroupModel(QString optionsString,
|
||||
*/
|
||||
PackageGroupModel::~PackageGroupModel()
|
||||
{
|
||||
UnixCommand::removeSharedMemFiles();
|
||||
delete m_acc;
|
||||
delete m_cmd;
|
||||
}
|
||||
@@ -96,7 +100,7 @@ void PackageGroupModel::keepArchivesChanged()
|
||||
*/
|
||||
QString PackageGroupModel::getOptions()
|
||||
{
|
||||
return m_optionsString + " -k " + QString::number(m_spinner->value());
|
||||
return m_optionsString + QLatin1String("-k ") + QString::number(m_spinner->value());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -119,7 +123,12 @@ void PackageGroupModel::refreshCacheView()
|
||||
QObject::connect(m_cmd, SIGNAL( finished ( int, QProcess::ExitStatus )),
|
||||
this, SLOT( finishedDryrun ( int, QProcess::ExitStatus )) );
|
||||
|
||||
m_cmd->executeCommandAsNormalUser("paccache -v -d " + getOptions());
|
||||
QStringList sl;
|
||||
sl << QStringLiteral("-v");
|
||||
sl << QStringLiteral("-d");
|
||||
QStringList opt = getOptions().split(QStringLiteral(" "), Qt::SkipEmptyParts);
|
||||
sl << opt;
|
||||
m_cmd->executeCommandAsNormalUser(QStringLiteral("/usr/bin/paccache"), sl);
|
||||
isExecutingCommand = true;
|
||||
}
|
||||
|
||||
@@ -135,9 +144,9 @@ 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() +
|
||||
"\n" + StrConstants::getYoullNeedSuFrontend());
|
||||
QLatin1String("\n") + StrConstants::getYoullNeedSuFrontend());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -149,7 +158,11 @@ bool PackageGroupModel::isSUAvailable()
|
||||
*/
|
||||
void PackageGroupModel::cleanCache()
|
||||
{
|
||||
if (isExecutingCommand) return;
|
||||
if (isExecutingCommand || UnixCommand::isPacmanDbLocked()){
|
||||
QMessageBox::critical( nullptr, StrConstants::getApplicationName(),
|
||||
StrConstants::getErrorDbLock());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isSUAvailable())
|
||||
return;
|
||||
@@ -164,9 +177,10 @@ void PackageGroupModel::cleanCache()
|
||||
QObject::connect(m_cmd, SIGNAL( finished ( int, QProcess::ExitStatus )),
|
||||
this, SLOT( finishedClean( int, QProcess::ExitStatus )) );
|
||||
|
||||
QByteArray tmp = "paccache -r " + getOptions().toLatin1();
|
||||
m_cmd->executeCommand(QLatin1String(tmp), ectn_LANG_USER_DEFINED);
|
||||
isExecutingCommand = true;
|
||||
const QString tmp = QLatin1String("paccache -r ") + getOptions();
|
||||
//UnixCommand::removeTemporaryFiles();
|
||||
m_cmd->executeCommandWithSharedMemHelper(tmp, m_sharedMemory);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -185,7 +199,7 @@ void PackageGroupModel::finishedDryrun(int exitCode, QProcess::ExitStatus)
|
||||
if(exitCode > 1)
|
||||
{
|
||||
//process failed, provide info on errors
|
||||
QMessageBox::critical(m_listView, "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)
|
||||
{
|
||||
@@ -229,9 +243,9 @@ void PackageGroupModel::finishedClean(int exitCode, QProcess::ExitStatus)
|
||||
* @param output The output of the dryrun process
|
||||
*/
|
||||
void PackageGroupModel::processDryrunResult(QString output) {
|
||||
QStringList lines = output.split(QRegularExpression("\\n"), QString::SkipEmptyParts);
|
||||
QStringList lines = output.split(QRegularExpression(QStringLiteral("\\n")), Qt::SkipEmptyParts);
|
||||
|
||||
if(lines.length() == 1 || output.contains("*.pkg.tar?(.+([^.]))"))
|
||||
if(lines.length() == 1 || output.contains(QLatin1String("*.pkg.tar?(.+([^.]))")))
|
||||
{
|
||||
//"==> no candidate packages found for pruning"
|
||||
m_cleanButton->setText(tr("Clean"));
|
||||
@@ -241,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:")
|
||||
@@ -250,14 +264,14 @@ void PackageGroupModel::processDryrunResult(QString output) {
|
||||
else if(i == lines.length() - 1)
|
||||
{
|
||||
//extract size from "==> finished dry run: 8 candidates (disk space saved: 19.11 MiB)")
|
||||
QStringList components = line.split(" ");
|
||||
QStringList components = line.split(QStringLiteral(" "));
|
||||
|
||||
QString unit = components.takeLast();
|
||||
unit.remove(unit.length() - 1, 1);
|
||||
|
||||
QString size = components.takeLast();
|
||||
|
||||
m_cleanButton->setText(tr("Clean %1").arg(" " + size + " " + unit));
|
||||
m_cleanButton->setText(tr("Clean %1").arg(QLatin1Char(' ') + size + QLatin1Char(' ') + unit));
|
||||
}
|
||||
else
|
||||
m_listView->addItem(line);
|
||||
|
||||
@@ -82,11 +82,12 @@ class PackageGroupModel : public QObject
|
||||
|
||||
private:
|
||||
bool isSUAvailable();
|
||||
bool isExecutingCommand;
|
||||
QSharedMemory *m_sharedMemory;
|
||||
|
||||
public:
|
||||
PackageGroupModel(QString, QListWidget *, QSpinBox *, QPushButton *, QPushButton *);
|
||||
~PackageGroupModel();
|
||||
bool isExecutingCommand;
|
||||
|
||||
protected:
|
||||
QString m_optionsString;
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<file>resources/translations/octopi_cachecleaner_sv.qm</file>
|
||||
<file>resources/translations/octopi_cachecleaner_sl.qm</file>
|
||||
<file>resources/translations/octopi_cachecleaner_tr_TR.qm</file>
|
||||
<file>resources/translations/octopi_cachecleaner_tr.qm</file>
|
||||
<file>resources/translations/octopi_cachecleaner_uk.qm</file>
|
||||
<file>resources/translations/octopi_cachecleaner_uz.qm</file>
|
||||
<file>resources/translations/octopi_cachecleaner_vi.qm</file>
|
||||
@@ -48,5 +49,6 @@
|
||||
<file>resources/translations/octopi_cachecleaner_zh-Hans.qm</file>
|
||||
<file>resources/translations/octopi_cachecleaner_zh_CN.qm</file>
|
||||
<file>resources/translations/octopi_cachecleaner_hr.qm</file>
|
||||
<file>resources/translations/octopi_cachecleaner_ko.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>Llimpiador de caché - Octopi</translation>
|
||||
<translation>Llimpiador de la caché - Octopi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
@@ -21,7 +21,7 @@
|
||||
<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>Númberu de versiones vieyes pa caltener</translation>
|
||||
<translation>Númberu de versiones vieyes a caltener</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
|
||||
|
||||
Binary file not shown.
@@ -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"/>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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"/>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -15,7 +15,7 @@
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="150"/>
|
||||
<source>Keep :</source>
|
||||
<translation>Säilytä</translation>
|
||||
<translation>Säilytä:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
|
||||
|
||||
Binary file not shown.
@@ -40,12 +40,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
|
||||
<source>Clean</source>
|
||||
<translation>Putsaa</translation>
|
||||
<translation>Tyhjennä</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
|
||||
<source>Clean %1</source>
|
||||
<translation>Putsattu 1%</translation>
|
||||
<translation>Tyhjennä %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>कैश हटाए - Octopi</translation>
|
||||
<translation>कैश हटाने हेतु साधन - ऑक्टोपी</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
@@ -21,7 +21,7 @@
|
||||
<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>
|
||||
<translation>रखने हेतु पुराने पैकेज की संस्करण संख्या</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
|
||||
@@ -40,12 +40,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
|
||||
<source>Clean</source>
|
||||
<translation>हटाए</translation>
|
||||
<translation>हटाएँ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
|
||||
<source>Clean %1</source>
|
||||
<translation>%1 हटाए</translation>
|
||||
<translation>%1 हटाएँ</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>कैश की सफाई - Octopi</translation>
|
||||
<translation>कैश हटाने हेतु साधन - ऑक्टोपी</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
@@ -21,13 +21,13 @@
|
||||
<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>
|
||||
<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>
|
||||
<translation> रिफ्रेश करें</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
|
||||
@@ -40,12 +40,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
|
||||
<source>Clean</source>
|
||||
<translation>साफ़ करें</translation>
|
||||
<translation>हटाएँ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
|
||||
<source>Clean %1</source>
|
||||
<translation>%1 साफ़ करें</translation>
|
||||
<translation>%1 हटाएँ</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cachecleaner/resources/translations/octopi_cachecleaner_ko.qm
Normal file
BIN
cachecleaner/resources/translations/octopi_cachecleaner_ko.qm
Normal file
Binary file not shown.
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ko" 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>
|
||||
BIN
cachecleaner/resources/translations/octopi_cachecleaner_ko_KR.qm
Normal file
BIN
cachecleaner/resources/translations/octopi_cachecleaner_ko_KR.qm
Normal file
Binary file not shown.
@@ -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>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,12 +4,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>Limpador de 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"/>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cachecleaner/resources/translations/octopi_cachecleaner_tr.qm
Normal file
BIN
cachecleaner/resources/translations/octopi_cachecleaner_tr.qm
Normal file
Binary file not shown.
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.0">
|
||||
<context>
|
||||
<name>CacheCleaner</name>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
|
||||
<source>Cache Cleaner - Octopi</source>
|
||||
<translation>Ön Bellek Temizleyici - Octupi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
|
||||
<source>Uninstalled packages</source>
|
||||
<translation>Kaldırılmış paketler</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>Sakla:</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>Saklanacak eski versiyonların sayısı</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>Yenile</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
|
||||
<source>Installed packages</source>
|
||||
<translation>Yüklenmiş paketler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PackageGroupModel</name>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
|
||||
<source>Clean</source>
|
||||
<translation>Temizle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
|
||||
<source>Clean %1</source>
|
||||
<translation>Temiz %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24
helper/CMakeLists.txt
Normal file
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)
|
||||
5
helper/README.md
Normal file
5
helper/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
## OCTOPI-HELPER
|
||||
|
||||
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.
|
||||
67
helper/main.cpp
Normal file
67
helper/main.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* This file is part of Octopi, an open-source GUI for pacman.
|
||||
* Copyright (C) 2019 Alexandre Albuquerque Arnt
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "octopihelper.h"
|
||||
#include "../src/argumentlist.h"
|
||||
#include <unistd.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QTextStream>
|
||||
|
||||
bool isRootRunning()
|
||||
{
|
||||
int uid = geteuid();
|
||||
return (uid == 0);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
ArgumentList *argList = new ArgumentList(argc, argv);
|
||||
|
||||
if (argList->getSwitch(QStringLiteral("-version")))
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << "octopi-helper: version " << ctn_APPLICATION_VERSION << Qt::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!isRootRunning())
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Only root can run..." << Qt::endl;
|
||||
return ctn_NO_ROOT_RUNNING;
|
||||
}
|
||||
|
||||
QCoreApplication a(argc, argv);
|
||||
unsetenv("TMPDIR");
|
||||
|
||||
OctopiHelper helper;
|
||||
|
||||
if (argList->getSwitch(QStringLiteral("-ts")))
|
||||
{
|
||||
return helper.executePkgTransactionWithSharedMem();
|
||||
}
|
||||
else
|
||||
{
|
||||
QTextStream qout(stdout);
|
||||
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
|
||||
return ctn_SUSPICIOUS_EXECUTION_METHOD;
|
||||
}
|
||||
}
|
||||
49
helper/octopi-helper.pro
Normal file
49
helper/octopi-helper.pro
Normal file
@@ -0,0 +1,49 @@
|
||||
QT -= gui
|
||||
QT += core network
|
||||
|
||||
CONFIG += c++11 console
|
||||
CONFIG -= app_bundle
|
||||
TARGET = octphelper
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any Qt feature that has been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# Disable automatic string conversions
|
||||
DEFINES += 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
|
||||
|
||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
HEADERS += \
|
||||
../src/argumentlist.h \
|
||||
octopihelper.h
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
../src/argumentlist.cpp \
|
||||
octopihelper.cpp
|
||||
|
||||
# install
|
||||
isEmpty(PREFIX) {
|
||||
PREFIX = /usr
|
||||
}
|
||||
|
||||
isEmpty(LIBDIR) {
|
||||
LIBDIR = $$PREFIX/lib
|
||||
}
|
||||
|
||||
target.path = $$LIBDIR/octopi
|
||||
sources.files = $$SOURCES $$HEADERS *.pro
|
||||
sources.path = .
|
||||
|
||||
INSTALLS += target
|
||||
505
helper/octopihelper.cpp
Normal file
505
helper/octopihelper.cpp
Normal file
@@ -0,0 +1,505 @@
|
||||
/*
|
||||
* This file is part of Octopi, an open-source GUI for pacman.
|
||||
* Copyright (C) 2019 Alexandre Albuquerque Arnt
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../src/constants.h"
|
||||
#include "octopihelper.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QDir>
|
||||
#include <QObject>
|
||||
#include <QTextStream>
|
||||
#include <QSharedMemory>
|
||||
#include <QRegularExpression>
|
||||
#include <QStringLiteral>
|
||||
#include <QTcpSocket>
|
||||
#include <QDataStream>
|
||||
#include <QFile>
|
||||
#include <QSettings>
|
||||
#include <QDateTime>
|
||||
|
||||
QFile *OctopiHelper::m_temporaryFile = nullptr;
|
||||
|
||||
/*
|
||||
* Removes temporary transaction files
|
||||
*/
|
||||
void removeTemporaryFiles()
|
||||
{
|
||||
QDir tempDir(QDir::tempPath());
|
||||
QStringList nameFilters;
|
||||
nameFilters << QStringLiteral(".qt_temp_octopi*");
|
||||
const QFileInfoList list = tempDir.entryInfoList(nameFilters, QDir::Dirs | QDir::Files | QDir::System | QDir::Hidden);
|
||||
|
||||
for(const auto &file : list){
|
||||
QFile fileAux(file.filePath());
|
||||
|
||||
if (!file.isDir()){
|
||||
fileAux.remove();
|
||||
}
|
||||
else{
|
||||
QDir dir(file.filePath());
|
||||
const QFileInfoList listd = dir.entryInfoList(QDir::Files | QDir::System);
|
||||
|
||||
for(const auto &filed : listd){
|
||||
QFile fileAuxd(filed.filePath());
|
||||
fileAuxd.remove();
|
||||
}
|
||||
|
||||
dir.rmdir(file.filePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the SHELL environment variable, if not set defaults to bash.
|
||||
*/
|
||||
QString getShell()
|
||||
{
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
QString shell = env.value(QStringLiteral("SHELL"), QStringLiteral("/usr/bin/bash"));
|
||||
QFileInfo fi(shell);
|
||||
|
||||
if (fi.fileName() == QLatin1String("fish"))
|
||||
return QStringLiteral("/usr/bin/bash");
|
||||
else
|
||||
return fi.fileName();
|
||||
}
|
||||
|
||||
/*
|
||||
* If justOneInstance = false (default), returns TRUE if one instance of the app is ALREADY running
|
||||
* Otherwise, it returns TRUE if the given app is running.
|
||||
*/
|
||||
bool isAppRunning(const QString &appName, bool justOneInstance)
|
||||
{
|
||||
QStringList slParam;
|
||||
QProcess proc;
|
||||
slParam << QStringLiteral("-C");
|
||||
slParam << appName;
|
||||
proc.start(QStringLiteral("/usr/bin/ps"), slParam);
|
||||
proc.waitForFinished();
|
||||
QString out = QString::fromUtf8(proc.readAll());
|
||||
proc.close();
|
||||
|
||||
if (justOneInstance)
|
||||
{
|
||||
return out.count(appName)>0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return out.count(appName)>1;
|
||||
}
|
||||
}
|
||||
|
||||
OctopiHelper::OctopiHelper()
|
||||
{
|
||||
//If old helper still exists, let's remove it
|
||||
if (QFileInfo::exists(QStringLiteral("/usr/lib/octopi/octopi-helper")))
|
||||
QFile::remove(QStringLiteral("/usr/lib/octopi/octopi-helper"));
|
||||
|
||||
m_exitCode = -9999;
|
||||
m_process = new QProcess();
|
||||
//m_suspiciousChars = QStringLiteral("(\\s|[][!#$&'()*,;<=+>?\\^`{}|~])");
|
||||
m_suspiciousChars = QStringLiteral("[!#$&'()*,;<=>?\\^`{}|~\\[\\]]");
|
||||
|
||||
//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()
|
||||
{
|
||||
m_process->close();
|
||||
if (m_temporaryFile != nullptr)
|
||||
QFile::remove(m_temporaryFile->fileName());
|
||||
removeTemporaryFiles();
|
||||
|
||||
if (m_logFile.isOpen())
|
||||
m_logFile.close();
|
||||
}
|
||||
|
||||
/*
|
||||
* Logs received str in a file called "octphelper.log" (for debugging purposes)
|
||||
*/
|
||||
void OctopiHelper::log(const QString &str)
|
||||
{
|
||||
QString dateTimeFormat = QLocale().dateTimeFormat(QLocale::ShortFormat);
|
||||
QDateTime bdt = QDateTime::currentDateTime();
|
||||
|
||||
QTextStream out(&m_logFile);
|
||||
out << bdt.toString(dateTimeFormat) << QLatin1String(": ") << str << Qt::endl;
|
||||
|
||||
m_logFile.flush();
|
||||
}
|
||||
|
||||
/*
|
||||
* A bit of settings to better run "pacman" commands using QProcess
|
||||
*/
|
||||
QProcessEnvironment OctopiHelper::getProcessEnvironment()
|
||||
{
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.remove(QStringLiteral("LANG"));
|
||||
env.remove(QStringLiteral("LC_MESSAGES"));
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieves Proxy_Settings config from "/root/.config/octopi/octopi.conf"
|
||||
*/
|
||||
QString OctopiHelper::getProxySettings()
|
||||
{
|
||||
QSettings settings(QSettings::UserScope, ctn_ORGANIZATION, ctn_APPLICATION);
|
||||
return (settings.value(ctn_KEY_PROXY_SETTINGS, QLatin1String("")).toString());
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
else
|
||||
{
|
||||
QStringList options;
|
||||
options << QStringLiteral("/usr/bin/octopi-notifier -d");
|
||||
options << QStringLiteral("/usr/bin/octopi -d");
|
||||
options << QStringLiteral("/usr/bin/octopi -sysupgrade");
|
||||
options << QStringLiteral("/usr/bin/octopi -sysupgrade-noconfirm");
|
||||
|
||||
//QRegularExpression re(QStringLiteral("(/usr/bin/octopi-notifier -session )[a-fA-F0-9_]+"));
|
||||
QRegularExpression re(QStringLiteral("(/usr/bin/octopi-notifier.*)"));
|
||||
QRegularExpressionMatch match = re.match(out);
|
||||
bool hasMatchInSession = match.capturedLength()==out.length();
|
||||
|
||||
re=QRegularExpression(QStringLiteral("(/usr/bin/octopi -style )\\S+"));
|
||||
match = re.match(out);
|
||||
bool hasMatchInStyle = match.capturedLength()==out.length();
|
||||
|
||||
if (out == QLatin1String("/usr/bin/") + octoToolName ||
|
||||
(options.indexOf(out)!=-1) ||
|
||||
(hasMatchInSession) ||
|
||||
(hasMatchInStyle)) res=true;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Executes all commands inside Octopi's SharedMemory - "octopi-helper -ts"
|
||||
*/
|
||||
int OctopiHelper::executePkgTransactionWithSharedMem()
|
||||
{
|
||||
bool isOctopiRunning=isOctoToolRunning(QStringLiteral("octopi"));
|
||||
bool isNotifierRunning=isOctoToolRunning(QStringLiteral("octopi-notifier"));
|
||||
bool isCacheCleanerRunning=isOctoToolRunning(QStringLiteral("octopi-cachecle"));
|
||||
|
||||
if (!isOctopiRunning && !isNotifierRunning && !isCacheCleanerRunning)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
//Let's retrieve commands from sharedmem pool
|
||||
QSharedMemory *sharedMem = new QSharedMemory(QStringLiteral("org.arnt.octopi"), this);
|
||||
if (!sharedMem->attach(QSharedMemory::ReadOnly))
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Couldn't attach to memory"));
|
||||
return ctn_COULD_NOT_ATTACH_TO_MEM;
|
||||
}
|
||||
|
||||
QByteArray sharedData(sharedMem->size(), '\0');
|
||||
sharedMem->lock();
|
||||
memcpy(sharedData.data(), sharedMem->data(), sharedMem->size());
|
||||
sharedMem->unlock();
|
||||
QString contents=QString::fromLatin1(sharedData);
|
||||
sharedMem->detach();
|
||||
delete sharedMem;
|
||||
|
||||
bool suspicious = false;
|
||||
|
||||
if (contents.isEmpty() || contents.contains(QRegularExpression(m_suspiciousChars)))
|
||||
suspicious = true;
|
||||
|
||||
if (suspicious)
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious transaction detected -> \"") + contents + QLatin1String("\""));
|
||||
return ctn_SUSPICIOUS_ACTIONS_FILE;
|
||||
}
|
||||
|
||||
const QStringList lines = contents.split(QStringLiteral("\n"), Qt::SkipEmptyParts);
|
||||
bool testCommandFromOctopi=false;
|
||||
bool testCommandFromNotifier=false;
|
||||
bool testCommandFromCacheCleaner=false;
|
||||
|
||||
for(auto line : lines)
|
||||
{
|
||||
line = line.trimmed();
|
||||
|
||||
if ((line == QLatin1String("killall pacman")) ||
|
||||
(line == QLatin1String("rm ") + ctn_PACMAN_DATABASE_LOCK_FILE) ||
|
||||
(line == QLatin1String("echo -e")) ||
|
||||
(line == QLatin1String("echo \"PAKtC\"")) ||
|
||||
(line == QLatin1String("read -n 1 -p \"PAKtC\"")) ||
|
||||
(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 -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")))
|
||||
{
|
||||
testCommandFromOctopi=true;
|
||||
testCommandFromNotifier=true;
|
||||
}
|
||||
else if (line.startsWith(QLatin1String("paccache -r -k")))
|
||||
{
|
||||
testCommandFromCacheCleaner=true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
suspicious = true;
|
||||
}
|
||||
|
||||
if (suspicious)
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious transaction detected -> \"") + line + QLatin1String("\""));
|
||||
return ctn_SUSPICIOUS_ACTIONS_FILE;
|
||||
}
|
||||
}
|
||||
|
||||
//Using full path binaries
|
||||
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("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))
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Pacman process already running"));
|
||||
return ctn_PACMAN_PROCESS_EXECUTING;
|
||||
}
|
||||
|
||||
if (testCommandFromOctopi)
|
||||
{
|
||||
if (!isOctopiRunning && !testCommandFromNotifier)
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious execution method -> Octopi not running"));
|
||||
return ctn_SUSPICIOUS_EXECUTION_METHOD;
|
||||
}
|
||||
|
||||
//Let's make a connection to Octopi server to ensure it sent this command.
|
||||
QTcpSocket socket;
|
||||
socket.connectToHost(QStringLiteral("127.0.0.1"), 12701);
|
||||
|
||||
if (!socket.waitForConnected(5000))
|
||||
{
|
||||
if (!testCommandFromNotifier)
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout connecting to Octopi"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
else goto testNotifierConnection;
|
||||
}
|
||||
|
||||
QDataStream in(&socket);
|
||||
in.setVersion(QDataStream::Qt_5_15);
|
||||
QString octopiResponse;
|
||||
|
||||
do
|
||||
{
|
||||
if (!socket.waitForReadyRead() && !testCommandFromNotifier)
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout contacting Octopi"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
in.startTransaction();
|
||||
in >> octopiResponse;
|
||||
} while (!in.commitTransaction());
|
||||
|
||||
if (octopiResponse == QLatin1String("Octopi est occupatus"))
|
||||
{
|
||||
testCommandFromNotifier=false;
|
||||
}
|
||||
else if (octopiResponse != QLatin1String("Octopi est occupatus") && !testCommandFromNotifier)
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: No transaction being executed"));
|
||||
return ctn_NO_TRANSACTION_EXECUTING;
|
||||
}
|
||||
}
|
||||
|
||||
testNotifierConnection:
|
||||
if (testCommandFromNotifier)
|
||||
{
|
||||
if (!isNotifierRunning)
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious execution method -> Notifier is not running"));
|
||||
return ctn_SUSPICIOUS_EXECUTION_METHOD;
|
||||
}
|
||||
|
||||
//Let's make a connection to Octopi-Notifier server to ensure it sent this command.
|
||||
QTcpSocket socket;
|
||||
socket.connectToHost(QStringLiteral("127.0.0.1"), 12702);
|
||||
|
||||
if (!socket.waitForConnected(5000))
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout connecting to Octopi-Notifier"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
QDataStream in(&socket);
|
||||
in.setVersion(QDataStream::Qt_5_15);
|
||||
QString octopiResponse;
|
||||
|
||||
do
|
||||
{
|
||||
if (!socket.waitForReadyRead())
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout contacting Octopi-Notifier"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
in.startTransaction();
|
||||
in >> octopiResponse;
|
||||
} while (!in.commitTransaction());
|
||||
|
||||
if (octopiResponse != QLatin1String("Octopi est occupatus"))
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: No transaction being executed"));
|
||||
return ctn_NO_TRANSACTION_EXECUTING;
|
||||
}
|
||||
}
|
||||
|
||||
if (testCommandFromCacheCleaner)
|
||||
{
|
||||
if (!isCacheCleanerRunning)
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Suspicious execution method -> CacheCleaner is not running"));
|
||||
return ctn_SUSPICIOUS_EXECUTION_METHOD;
|
||||
}
|
||||
|
||||
//Let's make a connection to Octopi-Notifier server to ensure it sent this command.
|
||||
QTcpSocket socket;
|
||||
socket.connectToHost(QStringLiteral("127.0.0.1"), 12703);
|
||||
|
||||
if (!socket.waitForConnected(5000))
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout connecting to Octopi-CacheCleaner"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
QDataStream in(&socket);
|
||||
in.setVersion(QDataStream::Qt_5_15);
|
||||
QString octopiResponse;
|
||||
|
||||
do
|
||||
{
|
||||
if (!socket.waitForReadyRead())
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: Timeout contacting Octopi-CacheCleaner"));
|
||||
return ctn_TIMEOUT_CONNECTING;
|
||||
}
|
||||
|
||||
in.startTransaction();
|
||||
in >> octopiResponse;
|
||||
} while (!in.commitTransaction());
|
||||
|
||||
if (octopiResponse != QLatin1String("Octopi est occupatus"))
|
||||
{
|
||||
log(QLatin1String("octopi-helper[aborted]: No transaction being executed"));
|
||||
return ctn_NO_TRANSACTION_EXECUTING;
|
||||
}
|
||||
}
|
||||
|
||||
//Let's construct the root owned execution file
|
||||
QFile *ftemp = generateTemporaryFile();
|
||||
QTextStream out(ftemp);
|
||||
|
||||
QString proxySettings = getProxySettings();
|
||||
if (!proxySettings.isEmpty())
|
||||
{
|
||||
if (proxySettings.contains(QLatin1String("ftp://")))
|
||||
out << QLatin1String("export ftp_proxy=") + proxySettings + QLatin1Char('\n');
|
||||
else if (proxySettings.contains(QLatin1String("http://")))
|
||||
out << QLatin1String("export http_proxy=") + proxySettings + QLatin1Char('\n');
|
||||
else if (proxySettings.contains(QLatin1String("https://")))
|
||||
out << QLatin1String("export https_proxy=") + proxySettings + QLatin1Char('\n');
|
||||
}
|
||||
|
||||
out << QLatin1String("unalias -a\n") << contents;
|
||||
|
||||
log(QLatin1String("Exec as root: ") + contents.trimmed());
|
||||
|
||||
out.flush();
|
||||
ftemp->close();
|
||||
|
||||
m_process->setProcessEnvironment(getProcessEnvironment());
|
||||
m_process->start(getShell(), QStringList() << m_temporaryFile->fileName());
|
||||
m_process->waitForStarted(-1);
|
||||
m_process->waitForFinished(-1);
|
||||
|
||||
return m_process->exitCode();
|
||||
}
|
||||
65
helper/octopihelper.h
Normal file
65
helper/octopihelper.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* This file is part of Octopi, an open-source GUI for pacman.
|
||||
* Copyright (C) 2019 Alexandre Albuquerque Arnt
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef OCTOPIHELPER_H
|
||||
#define OCTOPIHELPER_H
|
||||
|
||||
#include "../src/constants.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QProcess>
|
||||
#include <QFile>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
class OctopiHelper: QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
int m_exitCode;
|
||||
QProcess *m_process;
|
||||
QProcessEnvironment getProcessEnvironment();
|
||||
QString m_suspiciousChars;
|
||||
QFile m_logFile;
|
||||
|
||||
static QFile *m_temporaryFile;
|
||||
|
||||
static QString getProxySettings();
|
||||
|
||||
static QFile* generateTemporaryFile(){
|
||||
quint32 gen = QRandomGenerator::global()->generate();
|
||||
m_temporaryFile = new QFile(ctn_TEMP_ACTIONS_FILE + QString::number(gen));
|
||||
m_temporaryFile->open(QIODevice::ReadWrite|QIODevice::Text);
|
||||
m_temporaryFile->setPermissions(QFile::Permissions(QFile::ExeOwner|QFile::ReadOwner));
|
||||
|
||||
return m_temporaryFile;
|
||||
}
|
||||
|
||||
public:
|
||||
OctopiHelper();
|
||||
virtual ~OctopiHelper();
|
||||
|
||||
void log(const QString &str);
|
||||
int executePkgTransactionWithSharedMem();
|
||||
inline int getExitCode() { return m_exitCode; }
|
||||
bool isOctoToolRunning(const QString &octoToolName);
|
||||
};
|
||||
|
||||
#endif // OCTOPIHELPER_H
|
||||
114
notifier/CMakeLists.txt
Normal file
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)
|
||||
find_package(qtermwidget6 REQUIRED)
|
||||
else()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Xml Gui Widgets Network)
|
||||
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 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 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)
|
||||
137
notifier/main.cpp
Normal file
137
notifier/main.cpp
Normal file
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* This file is part of Octopi, an open-source GUI for pacman.
|
||||
* Copyright (C) 2013 Alexandre Albuquerque Arnt
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../src/unixcommand.h"
|
||||
#include "../src/wmhelper.h"
|
||||
#include "../src/strconstants.h"
|
||||
#include "../src/argumentlist.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "../src/QtSolutions/qtsingleapplication.h"
|
||||
//#include <QApplication>
|
||||
#include <QtGui>
|
||||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
|
||||
#define NO_GTK_STYLE
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
bool debugInfo = false;
|
||||
|
||||
ArgumentList *argList = new ArgumentList(argc, argv);
|
||||
if (argList->getSwitch(QStringLiteral("-d")))
|
||||
{
|
||||
//If user chooses to switch debug info on...
|
||||
debugInfo = true;
|
||||
}
|
||||
|
||||
if (debugInfo)
|
||||
qDebug() << QString(QLatin1String("Octopi Notifier - ") + ctn_APPLICATION_VERSION +
|
||||
QLatin1String(" (") + StrConstants::getQtVersion() + QLatin1String(")"));
|
||||
|
||||
/*if (UnixCommand::isAppRunning(QStringLiteral("octopi-notifier")))
|
||||
{
|
||||
qDebug() << "Aborting notifier as another instance is already running!";
|
||||
return (-1);
|
||||
}*/
|
||||
|
||||
if (!QFile::exists(ctn_CHECKUPDATES_BINARY))
|
||||
{
|
||||
qDebug() << "Aborting notifier as 'checkupdates' binary could not be found! [" << ctn_CHECKUPDATES_BINARY << "]";
|
||||
return (-2);
|
||||
}
|
||||
|
||||
if (!QFile::exists(ctn_OCTOPI_HELPER_PATH))
|
||||
{
|
||||
qDebug() << "Aborting notifier as 'octphelper' binary could not be found! [" << ctn_OCTOPI_HELPER_PATH << "]";
|
||||
return (-3);
|
||||
}
|
||||
|
||||
if (!QFile::exists(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;
|
||||
appTranslator.load(QLatin1String(":/resources/translations/octopi_") +
|
||||
QLocale::system().name());
|
||||
a.installTranslator(&appTranslator);
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
|
||||
if (!UnixCommand::isOctoToolRunning(QStringLiteral("octopi-notifier")))
|
||||
{
|
||||
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunOctopiNotifierAsUsrBin());
|
||||
return (-6);
|
||||
}
|
||||
|
||||
if (UnixCommand::isRootRunning()){
|
||||
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunningWithRoot());
|
||||
return (-5);
|
||||
}
|
||||
|
||||
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"));
|
||||
|
||||
QGuiApplication::setDesktopFileName(QStringLiteral("octopi-notifier"));
|
||||
|
||||
if (debugInfo)
|
||||
w.turnDebugInfoOn();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
}
|
||||
1315
notifier/mainwindow.cpp
Normal file
1315
notifier/mainwindow.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -21,8 +21,8 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include "../../src/unixcommand.h"
|
||||
#include "../../src/pacmanexec.h"
|
||||
#include "../src/unixcommand.h"
|
||||
#include "../src/pacmanexec.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QProcess>
|
||||
@@ -34,9 +34,12 @@ class QIcon;
|
||||
class QMenu;
|
||||
class QAction;
|
||||
class QFileSystemWatcher;
|
||||
class PacmanHelperClient;
|
||||
class OptionsDialog;
|
||||
class TransactionDialog;
|
||||
class QTcpServer;
|
||||
class OutputDialog;
|
||||
|
||||
enum CheckUpdate { ectn_AUTO_CHECK, ectn_USER_CHECK};
|
||||
|
||||
#ifdef KSTATUS
|
||||
class KStatusNotifierItem;
|
||||
@@ -47,23 +50,27 @@ class MainWindow : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
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 afterPacmanHelperSyncDatabase();
|
||||
void afterCheckUpdates(int exitCode, QProcess::ExitStatus);
|
||||
|
||||
void execSystemTrayActivated(QSystemTrayIcon::ActivationReason);
|
||||
void execSystemTrayKF5();
|
||||
|
||||
void syncDatabase();
|
||||
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); }
|
||||
@@ -73,35 +80,44 @@ private slots:
|
||||
void exitNotifier();
|
||||
void doSystemUpgrade();
|
||||
void doAURUpgrade();
|
||||
void doSystemUpgradeFinished();
|
||||
void doSystemUpgradeFinished(int exitCode);
|
||||
void toggleEnableInterface(bool state);
|
||||
void showOptionsDialog();
|
||||
void onSendInfoToOctopiHelper();
|
||||
void onCallRefreshAppIcon();
|
||||
|
||||
private:
|
||||
|
||||
TransactionDialog *m_transactionDialog;
|
||||
OptionsDialog *m_optionsDialog;
|
||||
bool m_debugInfo;
|
||||
int m_numberOfCheckUpdatesPackages;
|
||||
int m_numberOfOutdatedPackages;
|
||||
int m_numberOfOutdatedAURPackages;
|
||||
bool m_systemUpgradeDialog;
|
||||
bool isOctopiBusy();
|
||||
bool canOctopiUpgrade();
|
||||
|
||||
CommandExecuting m_commandExecuting;
|
||||
UnixCommand *m_unixCommand;
|
||||
|
||||
PacmanExec *m_pacmanExec;
|
||||
TransactionDialog *m_transactionDialog;
|
||||
OptionsDialog *m_optionsDialog;
|
||||
QTcpServer *m_tcpServer;
|
||||
QAction *m_actionOctopi;
|
||||
QAction *m_actionOptions;
|
||||
QAction *m_actionSyncDatabase;
|
||||
QAction *m_actionCheckUpdates;
|
||||
QAction *m_actionSystemUpgrade;
|
||||
QAction *m_actionAURUpgrade;
|
||||
QAction *m_actionAbout;
|
||||
QAction *m_actionExit;
|
||||
|
||||
PacmanExec *m_pacmanExec;
|
||||
|
||||
QIcon m_icon;
|
||||
QHash<QString, QString> *m_checkUpdatesNameNewVersion;
|
||||
QStringList m_checkUpdatesStringList;
|
||||
QStringList *m_outdatedStringList;
|
||||
QStringList *m_outdatedAURStringList;
|
||||
QTimer *m_pacmanHelperTimer;
|
||||
bool m_debugInfo;
|
||||
QTimer *m_callRefreshAppIcon;
|
||||
QMenu *m_systemTrayIconMenu;
|
||||
QFileSystemWatcher *m_pacmanDatabaseSystemWatcher;
|
||||
OutputDialog *m_outputDialog;
|
||||
|
||||
#ifdef KSTATUS
|
||||
KStatusNotifierItem * m_systemTrayIcon;
|
||||
@@ -109,15 +125,11 @@ private:
|
||||
QSystemTrayIcon *m_systemTrayIcon;
|
||||
#endif
|
||||
|
||||
QMenu *m_systemTrayIconMenu;
|
||||
QFileSystemWatcher *m_pacmanDatabaseSystemWatcher;
|
||||
PacmanHelperClient *m_pacmanHelperClient;
|
||||
|
||||
bool _isSUAvailable();
|
||||
bool isInternetAvailable();
|
||||
void initActions();
|
||||
void initSystemTrayIcon();
|
||||
void sendNotification(const QString &msg);
|
||||
void setUpgradingTooltip();
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
@@ -1,10 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Name=Octopi Notifier
|
||||
Icon=octopi
|
||||
Exec=octopi-notifier
|
||||
Exec=/usr/bin/octopi-notifier
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GNOME;GTK;System;
|
||||
#NotShowIn=GNOME;XFCE;LXDE;KDE;
|
||||
StartupNotify=true
|
||||
X-LXQt-Need-Tray=true
|
||||
Version=1.5
|
||||
SingleMainWindow=true
|
||||
136
notifier/octopi-notifier.pro
Normal file
136
notifier/octopi-notifier.pro
Normal file
@@ -0,0 +1,136 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2013-07-20T16:15:14
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core xml gui network
|
||||
|
||||
DEFINES += OCTOPI_EXTENSIONS ALPM_BACKEND
|
||||
|
||||
# Disable automatic string conversions
|
||||
DEFINES += QT_USE_QSTRINGBUILDER \
|
||||
QT_NO_CAST_FROM_ASCII \
|
||||
QT_NO_CAST_TO_ASCII \
|
||||
QT_NO_URL_CAST_FROM_STRING \
|
||||
QT_NO_CAST_FROM_BYTEARRAY
|
||||
|
||||
CONFIG += qt warn_on debug link_pkgconfig ALPM_BACKEND USE_QTERMWIDGET6
|
||||
|
||||
ALPM_BACKEND {
|
||||
QMAKE_CXXFLAGS += -std=c++17
|
||||
PKGCONFIG += glib-2.0 libalpm
|
||||
LIBS += -lalpm_octopi_utils
|
||||
} else {
|
||||
QMAKE_CXXFLAGS += -std=c++17
|
||||
}
|
||||
|
||||
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++17
|
||||
TARGET = octopi-notifier
|
||||
TEMPLATE = app
|
||||
DESTDIR += ./bin
|
||||
OBJECTS_DIR += ./build
|
||||
MOC_DIR += ./build
|
||||
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 \
|
||||
../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
|
||||
|
||||
ALPM_BACKEND{
|
||||
HEADERS += ../src/alpmbackend.h
|
||||
}
|
||||
|
||||
SOURCES += 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
|
||||
|
||||
ALPM_BACKEND{
|
||||
SOURCES += ../src/alpmbackend.cpp
|
||||
}
|
||||
|
||||
FORMS += ../ui/transactiondialog.ui \
|
||||
../ui/optionsdialog.ui
|
||||
|
||||
RESOURCES += \
|
||||
../resources.qrc
|
||||
|
||||
# install
|
||||
isEmpty(PREFIX) {
|
||||
PREFIX = /usr
|
||||
}
|
||||
|
||||
isEmpty(BINDIR) {
|
||||
BINDIR = $$PREFIX/bin
|
||||
}
|
||||
|
||||
isEmpty(DATADIR) {
|
||||
DATADIR = $$PREFIX/share
|
||||
}
|
||||
|
||||
isEmpty(ETCDIR) {
|
||||
ETCDIR = /etc
|
||||
}
|
||||
|
||||
target.path = $$BINDIR
|
||||
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
|
||||
sources.path = .
|
||||
|
||||
#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 desktop
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* This file is part of Octopi, an open-source GUI for pacman.
|
||||
* Copyright (C) 2013 Alexandre Albuquerque Arnt
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../src/unixcommand.h"
|
||||
#include "../../src/wmhelper.h"
|
||||
#include "../../src/strconstants.h"
|
||||
#include "../../src/argumentlist.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QtGui>
|
||||
#include <QDebug>
|
||||
|
||||
#define NO_GTK_STYLE
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
bool debugInfo = false;
|
||||
|
||||
ArgumentList *argList = new ArgumentList(argc, argv);
|
||||
if (argList->getSwitch("-d"))
|
||||
{
|
||||
//If user chooses to switch debug info on...
|
||||
debugInfo = true;
|
||||
}
|
||||
|
||||
if (debugInfo)
|
||||
qDebug() << QString("Octopi Notifier - " + StrConstants::getApplicationVersion() +
|
||||
" (" + StrConstants::getQtVersion() + ")");
|
||||
|
||||
if (UnixCommand::isAppRunning("octopi-notifier"))
|
||||
{
|
||||
qDebug() << "Aborting notifier as another instance is already running!";
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (!QFile::exists(ctn_PACMANHELPER_BINARY))
|
||||
{
|
||||
qDebug() << "Aborting notifier as 'pacmanhelper' binary could not be found! [" << ctn_PACMANHELPER_BINARY << "]";
|
||||
return (-2);
|
||||
}
|
||||
|
||||
if (!QFile::exists(ctn_DBUS_PACMANHELPER_SERVICE))
|
||||
{
|
||||
qDebug() << "Aborting notifier as 'pacmanhelper' DBus service could not be found! [" << ctn_DBUS_PACMANHELPER_SERVICE << "]";
|
||||
return (-3);
|
||||
}
|
||||
|
||||
QApplication a(argc, argv);
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load(":/resources/translations/octopi_" +
|
||||
QLocale::system().name());
|
||||
|
||||
a.installTranslator(&appTranslator);
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
|
||||
MainWindow w;
|
||||
QResource::registerResource("./resources.qrc");
|
||||
|
||||
if (debugInfo)
|
||||
w.turnDebugInfoOn();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,126 +0,0 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2013-07-20T16:15:14
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core xml gui network dbus
|
||||
|
||||
# This controls whether octopi-notifier uses KStatusNotifier lib
|
||||
# You SHOULD REALLY enable KSTATUS define in plasma 5 desktops!
|
||||
DEFINES += ALPM_BACKEND QTERMWIDGET #KSTATUS
|
||||
CONFIG += qt warn_on debug link_pkgconfig ALPM_BACKEND QTERMWIDGET
|
||||
|
||||
ALPM_BACKEND {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
PKGCONFIG += glib-2.0 libalpm
|
||||
LIBS += -lalpm_octopi_utils
|
||||
} else {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
}
|
||||
|
||||
QTERMWIDGET {
|
||||
LIBS += -lqtermwidget5
|
||||
}
|
||||
|
||||
contains(DEFINES, KSTATUS){
|
||||
QT += KNotifications
|
||||
}
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += qt console warn_on debug
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
TARGET = octopi-notifier
|
||||
TEMPLATE = app
|
||||
DESTDIR += ../bin
|
||||
OBJECTS_DIR += ../build-octopi-notifier
|
||||
MOC_DIR += ../build-octopi-notifier
|
||||
UI_DIR += ../build-octopi-notifier
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
outputdialog.h \
|
||||
../../src/uihelper.h \
|
||||
../../src/terminal.h \
|
||||
../../src/unixcommand.h \
|
||||
../../src/wmhelper.h \
|
||||
../../src/strconstants.h \
|
||||
../../src/package.h \
|
||||
../pacmanhelper/pacmanhelperclient.h \
|
||||
../../src/utils.h \
|
||||
../../src/transactiondialog.h \
|
||||
../../src/argumentlist.h \
|
||||
../../src/pacmanexec.h \
|
||||
../../src/searchlineedit.h \
|
||||
../../src/searchbar.h \
|
||||
../../src/optionsdialog.h
|
||||
|
||||
QTERMWIDGET{
|
||||
HEADERS += ../../src/termwidget.h
|
||||
}
|
||||
|
||||
ALPM_BACKEND{
|
||||
HEADERS += ../../src/alpmbackend.h
|
||||
}
|
||||
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp \
|
||||
outputdialog.cpp \
|
||||
../../src/terminal.cpp \
|
||||
../../src/unixcommand.cpp \
|
||||
../../src/package.cpp \
|
||||
../../src/wmhelper.cpp \
|
||||
../../src/strconstants.cpp \
|
||||
../../src/settingsmanager.cpp \
|
||||
../pacmanhelper/pacmanhelperclient.cpp \
|
||||
../../src/utils.cpp \
|
||||
../../src/transactiondialog.cpp \
|
||||
../../src/argumentlist.cpp \
|
||||
../../src/pacmanexec.cpp \
|
||||
../../src/searchlineedit.cpp \
|
||||
../../src/searchbar.cpp \
|
||||
../../src/optionsdialog.cpp
|
||||
|
||||
QTERMWIDGET{
|
||||
SOURCES += ../../src/termwidget.cpp
|
||||
}
|
||||
|
||||
ALPM_BACKEND{
|
||||
SOURCES += ../../src/alpmbackend.cpp
|
||||
}
|
||||
|
||||
FORMS += ../../ui/transactiondialog.ui \
|
||||
../../ui/optionsdialog.ui
|
||||
|
||||
RESOURCES += \
|
||||
../../resources.qrc
|
||||
|
||||
# install
|
||||
isEmpty(PREFIX) {
|
||||
PREFIX = /usr
|
||||
}
|
||||
|
||||
isEmpty(BINDIR) {
|
||||
BINDIR = $$PREFIX/bin
|
||||
}
|
||||
|
||||
isEmpty(DATADIR) {
|
||||
DATADIR = $$PREFIX/share
|
||||
}
|
||||
|
||||
isEmpty(ETCDIR) {
|
||||
ETCDIR = /etc
|
||||
}
|
||||
|
||||
target.path = $$BINDIR
|
||||
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
|
||||
sources.path = .
|
||||
|
||||
autostart.path = $$ETCDIR/xdg/autostart
|
||||
autostart.files += octopi-notifier.desktop
|
||||
|
||||
desktop.path = $$DATADIR/applications
|
||||
desktop.files += octopi-notifier.desktop
|
||||
|
||||
INSTALLS += target autostart desktop
|
||||
@@ -19,14 +19,12 @@
|
||||
*/
|
||||
|
||||
#include "outputdialog.h"
|
||||
#include "../../src/pacmanexec.h"
|
||||
#include "../../src/searchbar.h"
|
||||
#include "../../src/uihelper.h"
|
||||
#include "../../src/strconstants.h"
|
||||
|
||||
#ifdef QTERMWIDGET
|
||||
#include "../../src/termwidget.h"
|
||||
#endif
|
||||
#include "../src/pacmanexec.h"
|
||||
#include "../src/searchbar.h"
|
||||
#include "../src/uihelper.h"
|
||||
#include "../src/utils.h"
|
||||
#include "../src/strconstants.h"
|
||||
#include "../src/termwidget.h"
|
||||
|
||||
#include <QTextBrowser>
|
||||
#include <QVBoxLayout>
|
||||
@@ -45,8 +43,11 @@
|
||||
*/
|
||||
OutputDialog::OutputDialog(QWidget *parent): QDialog(parent)
|
||||
{
|
||||
m_exitCode = 0;
|
||||
m_upgradeRunning = false;
|
||||
m_debugInfo = false;
|
||||
m_AURUpgradeExecuting = false;
|
||||
m_sharedMemory = new QSharedMemory(QStringLiteral("org.arnt.octopi"), this);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -68,9 +69,9 @@ void OutputDialog::setListOfAURPackagesToUpgrade(const QString &list)
|
||||
/*
|
||||
* Controls if this dialog was called for Pacman or AUR upgrade
|
||||
*/
|
||||
void OutputDialog::setPacmanSystemUpgrade(bool value)
|
||||
void OutputDialog::setViewAsTextBrowser(bool value)
|
||||
{
|
||||
m_pacmanSystemUpgrade = value;
|
||||
m_viewAsTextBrowser = value;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -79,7 +80,6 @@ void OutputDialog::setPacmanSystemUpgrade(bool value)
|
||||
void OutputDialog::initAsTextBrowser()
|
||||
{
|
||||
this->resize(650, 500);
|
||||
|
||||
setWindowTitle(QCoreApplication::translate("MainWindow", "System upgrade"));
|
||||
setWindowIcon(IconHelper::getIconSystemUpgrade());
|
||||
|
||||
@@ -122,11 +122,8 @@ void OutputDialog::initAsTextBrowser()
|
||||
m_progressBar->setMaximum(100);
|
||||
m_progressBar->setValue(0);
|
||||
m_progressBar->close();
|
||||
//m_searchBar->show();
|
||||
}
|
||||
|
||||
#ifdef QTERMWIDGET
|
||||
|
||||
/*
|
||||
* Let's build the main widgets for AUR Upgrade...
|
||||
*/
|
||||
@@ -138,12 +135,29 @@ void OutputDialog::initAsTermWidget()
|
||||
|
||||
m_mainLayout = new QVBoxLayout(this);
|
||||
m_console = new TermWidget(this);
|
||||
//connect(m_console, SIGNAL(finished()), this, SLOT(initAsTermWidget()));
|
||||
m_mainLayout->addWidget(m_console);
|
||||
|
||||
m_mainLayout->setSpacing(0);
|
||||
m_mainLayout->setSizeConstraint(QLayout::SetMinimumSize);
|
||||
m_mainLayout->setContentsMargins(2, 2, 2, 2);
|
||||
m_console->setFocus();
|
||||
m_console->setFocus();
|
||||
//m_console->toggleShowSearchBar();
|
||||
|
||||
m_console->installEventFilter(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* When user wants to upgrade system using a terminal
|
||||
*/
|
||||
void OutputDialog::doSystemUpgradeInTerminal()
|
||||
{
|
||||
m_pacmanExec = new PacmanExec(this);
|
||||
m_pacmanExec->setSharedMemory(m_sharedMemory);
|
||||
|
||||
QObject::connect(m_pacmanExec, SIGNAL(commandToExecInQTermWidget(QString)), this,
|
||||
SLOT(onExecCommandInTabTerminal(QString)));
|
||||
m_upgradeRunning = true;
|
||||
m_pacmanExec->doSystemUpgradeInTerminal();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -151,7 +165,9 @@ void OutputDialog::initAsTermWidget()
|
||||
*/
|
||||
void OutputDialog::doAURUpgrade()
|
||||
{
|
||||
m_pacmanExec = new PacmanExec();
|
||||
m_AURUpgradeExecuting=true;
|
||||
m_pacmanExec = new PacmanExec(this);
|
||||
m_pacmanExec->setSharedMemory(m_sharedMemory);
|
||||
QObject::connect(m_pacmanExec, SIGNAL(commandToExecInQTermWidget(QString)), this,
|
||||
SLOT(onExecCommandInTabTerminal(QString)));
|
||||
m_upgradeRunning = true;
|
||||
@@ -165,11 +181,11 @@ void OutputDialog::onExecCommandInTabTerminal(QString command)
|
||||
{
|
||||
disconnect(m_console, SIGNAL(onPressAnyKeyToContinue()), this, SLOT(onPressAnyKeyToContinue()));
|
||||
disconnect(m_console, SIGNAL(onCancelControlKey()), this, SLOT(onCancelControlKey()));
|
||||
disconnect(m_console, SIGNAL(onKeyQuit()), this, SLOT(reject()));
|
||||
connect(m_console, SIGNAL(onPressAnyKeyToContinue()), this, SLOT(onPressAnyKeyToContinue()));
|
||||
connect(m_console, SIGNAL(onCancelControlKey()), this, SLOT(onCancelControlKey()));
|
||||
connect(m_console, SIGNAL(onKeyQuit()), this, SLOT(reject()));
|
||||
|
||||
m_console->enter();
|
||||
m_console->execute("clear");
|
||||
m_console->execute(command);
|
||||
m_console->setFocus();
|
||||
}
|
||||
@@ -179,16 +195,14 @@ void OutputDialog::onExecCommandInTabTerminal(QString command)
|
||||
*/
|
||||
void OutputDialog::onPressAnyKeyToContinue()
|
||||
{
|
||||
m_console->enter();
|
||||
m_console->execute("clear");
|
||||
m_console->setFocus();
|
||||
|
||||
if (!m_upgradeRunning) return;
|
||||
if (m_pacmanExec == nullptr)
|
||||
|
||||
delete m_pacmanExec;
|
||||
|
||||
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
|
||||
m_upgradeRunning = false;
|
||||
reject();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -198,23 +212,25 @@ void OutputDialog::onCancelControlKey()
|
||||
{
|
||||
if (m_upgradeRunning)
|
||||
{
|
||||
if (m_pacmanExec == nullptr)
|
||||
|
||||
delete m_pacmanExec;
|
||||
|
||||
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
|
||||
m_pacmanExec = nullptr;
|
||||
m_upgradeRunning = false;
|
||||
reject();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Calls PacmanExec to begin system upgrade
|
||||
*/
|
||||
void OutputDialog::doSystemUpgrade()
|
||||
{
|
||||
m_pacmanExec = new PacmanExec();
|
||||
//Is pacman being executed?
|
||||
if (UnixCommand::isPacmanDbLocked()) return;
|
||||
|
||||
m_pacmanExec = new PacmanExec(this);
|
||||
m_pacmanExec->setSharedMemory(m_sharedMemory);
|
||||
|
||||
if (m_debugInfo)
|
||||
m_pacmanExec->setDebugMode(true);
|
||||
@@ -230,27 +246,29 @@ void OutputDialog::doSystemUpgrade()
|
||||
m_pacmanExec->doSystemUpgrade();
|
||||
}
|
||||
|
||||
/*
|
||||
* Make the shared memory available again
|
||||
*/
|
||||
void OutputDialog::detachSharedMemory()
|
||||
{
|
||||
m_sharedMemory->detach();
|
||||
}
|
||||
|
||||
/*
|
||||
* Centers the dialog in the screen
|
||||
*/
|
||||
void OutputDialog::show()
|
||||
{
|
||||
//If we are asking for a Pacman system upgrade...
|
||||
if (m_pacmanSystemUpgrade) initAsTextBrowser();
|
||||
#ifdef QTERMWIDGET
|
||||
else initAsTermWidget();
|
||||
#endif
|
||||
if (m_viewAsTextBrowser)
|
||||
initAsTextBrowser();
|
||||
else
|
||||
initAsTermWidget();
|
||||
|
||||
//utils::positionWindowAtScreenCenter(this);
|
||||
//Let's restore the dialog size saved...
|
||||
restoreGeometry(SettingsManager::getOutputDialogWindowSize());
|
||||
|
||||
QDialog::show();
|
||||
|
||||
if (m_pacmanSystemUpgrade) doSystemUpgrade();
|
||||
#ifdef QTERMWIDGET
|
||||
else doAURUpgrade();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -263,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();
|
||||
}
|
||||
}
|
||||
@@ -323,19 +343,35 @@ 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();
|
||||
|
||||
if ((exitCode == 0) && exitStatus == QProcess::NormalExit)
|
||||
{
|
||||
writeToTabOutput("<br><b>" + StrConstants::getCommandFinishedOK() + "</b><br>");
|
||||
//If there are .pacnew files to print...
|
||||
QStringList dotPacnewFiles = m_pacmanExec->getDotPacnewFileList();
|
||||
if (dotPacnewFiles.count() > 0)
|
||||
{
|
||||
writeToTabOutput(QStringLiteral("<br>"));
|
||||
foreach(QString dotPacnewFile, dotPacnewFiles)
|
||||
{
|
||||
if (!dotPacnewFile.contains(QLatin1String("<br>")))
|
||||
writeToTabOutput( QLatin1String("<br>") + dotPacnewFile, ectn_DONT_TREAT_URL_LINK);
|
||||
else
|
||||
writeToTabOutput(dotPacnewFile, ectn_DONT_TREAT_URL_LINK);
|
||||
}
|
||||
}
|
||||
|
||||
writeToTabOutput(QLatin1String("<br><b>") + StrConstants::getCommandFinishedOK() + QLatin1String("</b><br>"));
|
||||
}
|
||||
else
|
||||
{
|
||||
writeToTabOutput("<br><b>" + StrConstants::getCommandFinishedWithErrors() + "</b><br>");
|
||||
writeToTabOutput(QLatin1String("<br><b>") + StrConstants::getCommandFinishedWithErrors() + QLatin1String("</b><br>"));
|
||||
}
|
||||
|
||||
if (exitCode != 0 && (textInTabOutput("conflict"))) //|| _textInTabOutput("could not satisfy dependencies")))
|
||||
if (exitCode != 0 && (textInTabOutput(QStringLiteral("conflict")))) //|| _textInTabOutput("could not satisfy dependencies")))
|
||||
{
|
||||
int res = QMessageBox::question(this, StrConstants::getThereHasBeenATransactionError(),
|
||||
StrConstants::getConfirmExecuteTransactionInTerminal(),
|
||||
@@ -343,12 +379,13 @@ void OutputDialog::pacmanProcessFinished(int exitCode, QProcess::ExitStatus exit
|
||||
|
||||
if (res == QMessageBox::Yes)
|
||||
{
|
||||
m_pacmanExec->runLastestCommandInTerminal();
|
||||
m_pacmanExec->runLatestCommandInTerminal();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
delete m_pacmanExec;
|
||||
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
|
||||
m_upgradeRunning = false;
|
||||
}
|
||||
|
||||
@@ -357,16 +394,30 @@ 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 qt-sudo exit code
|
||||
*/
|
||||
void OutputDialog::stopTransaction()
|
||||
int OutputDialog::stopTransaction()
|
||||
{
|
||||
m_pacmanExec->cancelProcess();
|
||||
int res=0;
|
||||
|
||||
if (!m_AURUpgradeExecuting)
|
||||
{
|
||||
res=m_pacmanExec->cancelProcess();
|
||||
}
|
||||
|
||||
if (res != 1)
|
||||
{
|
||||
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -409,12 +460,38 @@ void OutputDialog::closeEvent(QCloseEvent *event)
|
||||
//We cannot quit while there is a running transaction!
|
||||
if(m_upgradeRunning)
|
||||
{
|
||||
event->ignore();
|
||||
int res = QMessageBox::question(this, StrConstants::getConfirmation(),
|
||||
StrConstants::getThereIsARunningTransaction() + QLatin1Char('\n') +
|
||||
StrConstants::getDoYouReallyWantToQuit(),
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
if (res == QMessageBox::Yes)
|
||||
{
|
||||
if (m_viewAsTextBrowser)
|
||||
{
|
||||
int ret=stopTransaction();
|
||||
if (ret == 1)
|
||||
{
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
|
||||
m_upgradeRunning = false;
|
||||
reject();
|
||||
}
|
||||
else
|
||||
{
|
||||
event->ignore();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
emit finished(m_exitCode);
|
||||
event->accept();
|
||||
emit finished(0);
|
||||
//Let's save window size...
|
||||
reject();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +506,78 @@ void OutputDialog::keyPressEvent(QKeyEvent *ke)
|
||||
}
|
||||
else if(ke->key() == Qt::Key_Escape)
|
||||
{
|
||||
reject();
|
||||
if (m_upgradeRunning)
|
||||
{
|
||||
int res = QMessageBox::question(this, StrConstants::getConfirmation(),
|
||||
StrConstants::getThereIsARunningTransaction() + QLatin1Char('\n') +
|
||||
StrConstants::getDoYouReallyWantToQuit(),
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
if (res == QMessageBox::Yes)
|
||||
{
|
||||
if (m_viewAsTextBrowser)
|
||||
{
|
||||
int ret=stopTransaction();
|
||||
if (ret == 1)
|
||||
{
|
||||
ke->ignore();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_upgradeRunning = false;
|
||||
reject();
|
||||
}
|
||||
else
|
||||
{
|
||||
ke->ignore();
|
||||
}
|
||||
}
|
||||
else reject();
|
||||
}
|
||||
else ke->accept();
|
||||
}
|
||||
|
||||
/*
|
||||
* Filters keypressevents from Console
|
||||
*/
|
||||
bool OutputDialog::eventFilter(QObject *, QEvent *event)
|
||||
{
|
||||
if(event->type() == QKeyEvent::KeyRelease)
|
||||
{
|
||||
QKeyEvent *ke = static_cast<QKeyEvent*>(event);
|
||||
if (ke->key() == Qt::Key_Escape)
|
||||
{
|
||||
if (m_upgradeRunning)
|
||||
{
|
||||
int res = QMessageBox::question(this, StrConstants::getConfirmation(),
|
||||
StrConstants::getThereIsARunningTransaction() + QLatin1Char('\n') +
|
||||
StrConstants::getDoYouReallyWantToQuit(),
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
if (res == QMessageBox::Yes)
|
||||
{
|
||||
m_upgradeRunning = false;
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ke->ignore();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if(ke->key() == Qt::Key_F && ke->modifiers() == Qt::ControlModifier)
|
||||
{
|
||||
m_console->toggleShowSearchBar();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef OUTPUTDIALOG_H
|
||||
#define OUTPUTDIALOG_H
|
||||
|
||||
#include "../../src/constants.h"
|
||||
#include "../src/constants.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QProcess>
|
||||
@@ -39,6 +39,7 @@ class QCloseEvent;
|
||||
class QKeyEvent;
|
||||
class QToolButton;
|
||||
class TermWidget;
|
||||
class QSharedMemory;
|
||||
|
||||
class OutputDialog : public QDialog
|
||||
{
|
||||
@@ -53,35 +54,29 @@ private:
|
||||
SearchBar *m_searchBar;
|
||||
TermWidget *m_console;
|
||||
QString m_listOfAURPackagesToUpgrade;
|
||||
|
||||
int m_exitCode;
|
||||
bool m_upgradeRunning;
|
||||
bool m_debugInfo;
|
||||
bool m_pacmanSystemUpgrade;
|
||||
bool m_viewAsTextBrowser;
|
||||
|
||||
bool m_AURUpgradeExecuting;
|
||||
|
||||
QAction *m_actionStopTransaction;
|
||||
QToolButton *m_toolButtonStopTransaction;
|
||||
QSharedMemory *m_sharedMemory;
|
||||
|
||||
void initAsTextBrowser();
|
||||
void doSystemUpgrade();
|
||||
|
||||
void positionTextEditCursorAtEnd();
|
||||
bool textInTabOutput(const QString& findText);
|
||||
void writeToTabOutput(const QString &msg, TreatURLLinks treatURLLinks = ectn_TREAT_URL_LINK);
|
||||
|
||||
private slots:
|
||||
|
||||
#ifdef QTERMWIDGET
|
||||
void initAsTermWidget();
|
||||
void doAURUpgrade();
|
||||
void onExecCommandInTabTerminal(QString command);
|
||||
void onPressAnyKeyToContinue();
|
||||
void onCancelControlKey();
|
||||
#endif
|
||||
|
||||
void onPencertange(int percentage);
|
||||
void onWriteOutput(const QString &output);
|
||||
void pacmanProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void onCanStopTransaction(bool yesNo);
|
||||
void stopTransaction();
|
||||
int stopTransaction();
|
||||
|
||||
//SearchBar slots
|
||||
void onSearchBarTextChanged(QString strToSearch);
|
||||
@@ -92,16 +87,27 @@ private slots:
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent * event);
|
||||
virtual void keyPressEvent(QKeyEvent * ke);
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
|
||||
public:
|
||||
explicit OutputDialog(QWidget *parent = 0);
|
||||
explicit OutputDialog(QWidget *parent = nullptr);
|
||||
void setDebugMode(bool newValue);
|
||||
void setListOfAURPackagesToUpgrade(const QString& list);
|
||||
void setPacmanSystemUpgrade(bool value);
|
||||
void setViewAsTextBrowser(bool value);
|
||||
void doSystemUpgrade();
|
||||
void detachSharedMemory();
|
||||
|
||||
public slots:
|
||||
void show();
|
||||
void reject();
|
||||
|
||||
void initAsTermWidget();
|
||||
void doSystemUpgradeInTerminal();
|
||||
void doAURUpgrade();
|
||||
void onExecCommandInTabTerminal(QString command);
|
||||
void onPressAnyKeyToContinue();
|
||||
void onCancelControlKey();
|
||||
|
||||
};
|
||||
|
||||
#endif // OUTPUTDIALOG_H
|
||||
@@ -1,11 +0,0 @@
|
||||
Command used to generate the PacmanHelperAdaptor:
|
||||
|
||||
qdbusxml2cpp -c PacmanHelperAdaptor
|
||||
-a pacmanhelperadaptor.h:pacmanhelperadaptor.cpp
|
||||
polkit/org.octopi.pacmanhelper.xml
|
||||
|
||||
Command used to generate the PacmanHelperClient:
|
||||
|
||||
qdbusxml2cpp -v -c PacmanHelperClient
|
||||
-p pacmanhelperclient.h:pacmanhelperclient.cpp
|
||||
polkit/org.octopi.pacmanhelper.xml
|
||||
@@ -1,11 +0,0 @@
|
||||
#include "pacmanhelper.h"
|
||||
#include <QCoreApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication a(argc, argv);
|
||||
|
||||
PacmanHelper pacmanHelper;
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
#include "pacmanhelper.h"
|
||||
#include "pacmanhelperadaptor.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QDBusConnection>
|
||||
#include <QProcess>
|
||||
#include <QDebug>
|
||||
|
||||
#include <QFile>
|
||||
|
||||
PacmanHelper::PacmanHelper(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
(void) new PacmanHelperAdaptor(this);
|
||||
|
||||
if (!QDBusConnection::systemBus().registerService("org.octopi.pacmanhelper")) {
|
||||
qDebug() << "Another helper is already running!";
|
||||
QCoreApplication::instance()->quit();
|
||||
}
|
||||
|
||||
if (!QDBusConnection::systemBus().registerObject("/", this)) {
|
||||
qDebug() << "Unable to register service interface to dbus!";
|
||||
QCoreApplication::instance()->quit();
|
||||
}
|
||||
}
|
||||
|
||||
void PacmanHelper::syncdb()
|
||||
{
|
||||
QProcess pacman;
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("LANG", "us_EN");
|
||||
pacman.setProcessEnvironment(env);
|
||||
|
||||
QStringList params;
|
||||
params << "-Sy"; //-Syy or -Sy - eternal doubt!
|
||||
QString command = "/usr/bin/pacman";
|
||||
/*int code = */pacman.execute(command, params);
|
||||
|
||||
/*QString out;
|
||||
out += "Return code of pacman command: " + QString::number(code) + "\n";
|
||||
out += "Return of pacman command (stdout): " + pacman.readAllStandardOutput() + "\n";
|
||||
out += "Return of pacman command (stderr): " + pacman.readAllStandardError() + "\n\n";
|
||||
|
||||
QString filename = QDir::homePath() + QDir::separator() + "output_pacmanhelper.txt";
|
||||
QFile file( filename );
|
||||
if ( file.open(QIODevice::ReadWrite) )
|
||||
{
|
||||
QTextStream stream( &file );
|
||||
stream << out << endl;
|
||||
}*/
|
||||
|
||||
emit syncdbcompleted();
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user