mirror of
https://github.com/RetroShare/RetroShare.git
synced 2026-09-14 02:56:00 +05:00
Compare commits
1268 Commits
v0.6.7-RC1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6ed95ee2f | ||
|
|
b578bd031e | ||
|
|
e43d23f1af | ||
|
|
360da46e96 | ||
|
|
419bac9eb0 | ||
|
|
c84cbbc4cb | ||
|
|
f1db29079a | ||
|
|
3a7b465321 | ||
|
|
01bc50edb3 | ||
|
|
52cefc693e | ||
|
|
799d4c9197 | ||
|
|
03daec3e2a | ||
|
|
21c981a430 | ||
|
|
040d19c946 | ||
|
|
ea97a7437d | ||
|
|
6622cb9526 | ||
|
|
411ef267ad | ||
|
|
be884ded91 | ||
|
|
f8553d2fd9 | ||
|
|
5bbe63e4d4 | ||
|
|
5a4c943b96 | ||
|
|
fd69cff8d7 | ||
|
|
4a1799db76 | ||
|
|
f0a5a4687f | ||
|
|
61e647081c | ||
|
|
6160b39dab | ||
|
|
48c60e1cdb | ||
|
|
9119058c48 | ||
|
|
682cde9fbd | ||
|
|
1b99beebc5 | ||
|
|
ebac1481f0 | ||
|
|
dea2f28dd9 | ||
|
|
5cbcd962dd | ||
|
|
b0ca91c825 | ||
|
|
243c417bfc | ||
|
|
3860f76dc1 | ||
|
|
839293f84d | ||
|
|
78ff5d66e6 | ||
|
|
8959b45087 | ||
|
|
2816dfd9f6 | ||
|
|
e5ed16c805 | ||
|
|
f4463dd17f | ||
|
|
ec9ab70561 | ||
|
|
0e31d5fed0 | ||
|
|
28e7f791ff | ||
|
|
54d4c791aa | ||
|
|
2bf991418d | ||
|
|
2c9fcd0c57 | ||
|
|
9e92faad7c | ||
|
|
e635848438 | ||
|
|
2cd7c21aa6 | ||
|
|
086184ad21 | ||
|
|
76ba160ad1 | ||
|
|
0500db415c | ||
|
|
d57ecdeea7 | ||
|
|
941a1ec6bd | ||
|
|
70b1861e24 | ||
|
|
2759abca68 | ||
|
|
b3f137e580 | ||
|
|
6c16de174a | ||
|
|
7f15e396ac | ||
|
|
923fe3338a | ||
|
|
063fb607f9 | ||
|
|
762d4d5fd9 | ||
|
|
8af7995d7d | ||
|
|
d0fb9d749e | ||
|
|
e735aaf18c | ||
|
|
3081f530ca | ||
|
|
c11ae6b071 | ||
|
|
711589283a | ||
|
|
bb47e094b3 | ||
|
|
d7b9e03528 | ||
|
|
dd5add516e | ||
|
|
2b1fb920af | ||
|
|
6e6e1403be | ||
|
|
af44d4c0e6 | ||
|
|
6ec6de5d0f | ||
|
|
6a9c354a85 | ||
|
|
348c9e7e94 | ||
|
|
874b320ae3 | ||
|
|
a17464c316 | ||
|
|
874d204b85 | ||
|
|
460afb7824 | ||
|
|
177141a042 | ||
|
|
74b8ebd31a | ||
|
|
d20c783769 | ||
|
|
78aa3f4d14 | ||
|
|
d788d23204 | ||
|
|
07197c8bff | ||
|
|
0c0ad41f77 | ||
|
|
5ce0460ee3 | ||
|
|
4dca624abf | ||
|
|
2c8210ce29 | ||
|
|
09f8d90b12 | ||
|
|
89a1f5482c | ||
|
|
fc696f8dae | ||
|
|
b307edc5d6 | ||
|
|
431848066f | ||
|
|
5374a746e2 | ||
|
|
a06d1f0781 | ||
|
|
d0c008c375 | ||
|
|
c418d75609 | ||
|
|
1d7a5ca8b0 | ||
|
|
de1db9b083 | ||
|
|
724db9ae6a | ||
|
|
f3be330773 | ||
|
|
eff56b8d30 | ||
|
|
719d6095f4 | ||
|
|
f454639087 | ||
|
|
df4561ec81 | ||
|
|
f3e5f8541d | ||
|
|
5ced3c66a7 | ||
|
|
819433027a | ||
|
|
0f15a9eec5 | ||
|
|
f75315b0ff | ||
|
|
aa22a42d32 | ||
|
|
4683a595ef | ||
|
|
43bd9c2b1a | ||
|
|
e09c0fef5b | ||
|
|
d2ef3c9335 | ||
|
|
dd0bd44f94 | ||
|
|
0abb7888fd | ||
|
|
2a79b50b32 | ||
|
|
dd93c5a9f1 | ||
|
|
8ef5f5f6cf | ||
|
|
e41eb4884e | ||
|
|
f5c7727561 | ||
|
|
abfef2c8e7 | ||
|
|
fa1e2903e7 | ||
|
|
ee61aa58f0 | ||
|
|
912e096bda | ||
|
|
1f8dda1d99 | ||
|
|
50b8967ecc | ||
|
|
0a227baa5d | ||
|
|
6a021501e5 | ||
|
|
7771902b52 | ||
|
|
713d0fedc2 | ||
|
|
ccf5116274 | ||
|
|
ce5ea5c9eb | ||
|
|
f44fe73eb7 | ||
|
|
61a1d6a971 | ||
|
|
9a7c913ef2 | ||
|
|
a5f24fdceb | ||
|
|
0d83fd26dc | ||
|
|
a53e1e919e | ||
|
|
d4a20720ae | ||
|
|
7784a62f89 | ||
|
|
28ff5a6d33 | ||
|
|
30f38cf1b5 | ||
|
|
4955741dae | ||
|
|
d1785479c8 | ||
|
|
ac5190d90d | ||
|
|
c425487bbb | ||
|
|
d26f959551 | ||
|
|
1456679914 | ||
|
|
20f416119c | ||
|
|
0a00032aa5 | ||
|
|
90c04aa2f1 | ||
|
|
f196e47cda | ||
|
|
9822e011a5 | ||
|
|
153a2fc401 | ||
|
|
d93f07fea6 | ||
|
|
bd58953ca2 | ||
|
|
7b643c7805 | ||
|
|
e6d8909b0a | ||
|
|
72cb4eabd2 | ||
|
|
6e61ed2e77 | ||
|
|
68fe4256c6 | ||
|
|
9b03dd9c54 | ||
|
|
c290a7eadf | ||
|
|
839e838dcf | ||
|
|
1d476241e8 | ||
|
|
83b6304eea | ||
|
|
1fd71d6094 | ||
|
|
0e9c79e4a5 | ||
|
|
d59ce80ed0 | ||
|
|
98fe51ce73 | ||
|
|
a5f0e01248 | ||
|
|
7500d8f8b4 | ||
|
|
593efd723f | ||
|
|
4c4cfbb48a | ||
|
|
714c5caa36 | ||
|
|
10595b9596 | ||
|
|
4be95c236e | ||
|
|
25b79662ea | ||
|
|
ea605d4142 | ||
|
|
56ab914b1f | ||
|
|
34220b3417 | ||
|
|
9da2af5844 | ||
|
|
079967dcf7 | ||
|
|
ab561c673e | ||
|
|
d77d958231 | ||
|
|
a689fa4042 | ||
|
|
ecbc0aba54 | ||
|
|
a7608b3561 | ||
|
|
1018d6c751 | ||
|
|
4ec8bafec7 | ||
|
|
fcb56e2c5c | ||
|
|
82fabb04ee | ||
|
|
60a343c4a0 | ||
|
|
3273f40db9 | ||
|
|
7dac424db8 | ||
|
|
81e67f5103 | ||
|
|
75d916c1f1 | ||
|
|
6cab9e4fce | ||
|
|
324111e991 | ||
|
|
5341b777d3 | ||
|
|
c0a3eb38b0 | ||
|
|
01552ed04e | ||
|
|
6ce1588354 | ||
|
|
765a398659 | ||
|
|
67ff1268ed | ||
|
|
110bdfa850 | ||
|
|
04947a0a90 | ||
|
|
942e902d70 | ||
|
|
a23452eb96 | ||
|
|
31151d462e | ||
|
|
25e4b5c039 | ||
|
|
b5df468af7 | ||
|
|
fb381f9dda | ||
|
|
e3c75aed62 | ||
|
|
43614c559f | ||
|
|
48b9267f4f | ||
|
|
a969528119 | ||
|
|
a7ea0f0c70 | ||
|
|
3d81ef6eca | ||
|
|
645d841761 | ||
|
|
219931e331 | ||
|
|
70a5715556 | ||
|
|
d8f1267124 | ||
|
|
ff60b62868 | ||
|
|
a6c9695168 | ||
|
|
28d2f66ca6 | ||
|
|
4bd02cf0bb | ||
|
|
1de6e926d5 | ||
|
|
1070f39ad0 | ||
|
|
c2aa157104 | ||
|
|
65b16c30d3 | ||
|
|
d4ab2ffea0 | ||
|
|
209a482a17 | ||
|
|
c83766ad91 | ||
|
|
13a46c5d57 | ||
|
|
6b5947b73e | ||
|
|
fefc65b03e | ||
|
|
919343d232 | ||
|
|
9c8563aef1 | ||
|
|
87d0925a92 | ||
|
|
f8eac31a0c | ||
|
|
3faa35cfb0 | ||
|
|
e6e7340da6 | ||
|
|
629f5922dd | ||
|
|
ad7dd0a41a | ||
|
|
b814f841e4 | ||
|
|
3eb4e07e4f | ||
|
|
c797a72b89 | ||
|
|
206e6c1fea | ||
|
|
6e4f9b0322 | ||
|
|
94225f8cb9 | ||
|
|
d63cdcd797 | ||
|
|
6810da41f9 | ||
|
|
8e557b8a41 | ||
|
|
2d60ff30c1 | ||
|
|
cab6efd83e | ||
|
|
5d2024c2a1 | ||
|
|
35b6cc3260 | ||
|
|
7f225ac15e | ||
|
|
8dff752eb1 | ||
|
|
7d868dac5c | ||
|
|
6d1d0c83ec | ||
|
|
6eaad9ae21 | ||
|
|
470b2df20e | ||
|
|
fecce7999e | ||
|
|
c772917516 | ||
|
|
3481b262e9 | ||
|
|
4bbdedb7c5 | ||
|
|
6cd25e3277 | ||
|
|
1039a1a8a9 | ||
|
|
5ea309d032 | ||
|
|
47398f7d03 | ||
|
|
553cb42759 | ||
|
|
6392d08347 | ||
|
|
5b7d50f364 | ||
|
|
50d4e2cdd4 | ||
|
|
00c69e135e | ||
|
|
80e08cc9d9 | ||
|
|
479619d05d | ||
|
|
5daca8ff7d | ||
|
|
be145de3dd | ||
|
|
28b9228ccd | ||
|
|
046914e77f | ||
|
|
f1dfe1d22f | ||
|
|
d1d009517e | ||
|
|
47a0cbc232 | ||
|
|
bcc80890f5 | ||
|
|
b495252b13 | ||
|
|
1121d36ee2 | ||
|
|
74056803a8 | ||
|
|
09bc572084 | ||
|
|
1658f9bdce | ||
|
|
b3e4861b5f | ||
|
|
e07e6362c3 | ||
|
|
b020001906 | ||
|
|
ecf413d618 | ||
|
|
61150080d0 | ||
|
|
a554aa4fc3 | ||
|
|
be244c15e3 | ||
|
|
51c643e237 | ||
|
|
e331f19c54 | ||
|
|
19619ecb37 | ||
|
|
ebaf1a0ed7 | ||
|
|
fcc5ba410c | ||
|
|
a0808a839b | ||
|
|
8edec60290 | ||
|
|
9c01d35d06 | ||
|
|
c69b7cef0c | ||
|
|
38dc687e66 | ||
|
|
770ee67e94 | ||
|
|
fa28bf6f9c | ||
|
|
ae098607dc | ||
|
|
c686375050 | ||
|
|
92fbd85e6a | ||
|
|
16d1744b6a | ||
|
|
aa0e9f9337 | ||
|
|
67849d619b | ||
|
|
6aef07d2ea | ||
|
|
e1afeee37d | ||
|
|
9d043c78eb | ||
|
|
406e538ff3 | ||
|
|
8e5629df9c | ||
|
|
c83b4f3950 | ||
|
|
f26845ad2b | ||
|
|
4545141dda | ||
|
|
b5f3603eb2 | ||
|
|
6405061076 | ||
|
|
801924cbb2 | ||
|
|
030f37f613 | ||
|
|
939f283a92 | ||
|
|
37f4ddc3d0 | ||
|
|
ba1d213d5c | ||
|
|
df44f8b626 | ||
|
|
4103783114 | ||
|
|
af87346763 | ||
|
|
352c743be6 | ||
|
|
18afe3a182 | ||
|
|
23a1d0dd75 | ||
|
|
abe98b4ec1 | ||
|
|
4a8e164c7e | ||
|
|
560184337f | ||
|
|
b5d113d7c3 | ||
|
|
a7e648851c | ||
|
|
1ba88f0293 | ||
|
|
9f519b337c | ||
|
|
27b71097d3 | ||
|
|
2d13a729ec | ||
|
|
da0a9eab8d | ||
|
|
385ee5ad14 | ||
|
|
461d21d6c4 | ||
|
|
216d25086b | ||
|
|
d49a1fbc33 | ||
|
|
a7c6c5cb11 | ||
|
|
369840993f | ||
|
|
27fc56b8b7 | ||
|
|
816f377833 | ||
|
|
b67b040122 | ||
|
|
6cbc156c13 | ||
|
|
167bcfefa7 | ||
|
|
e04d2c2fc3 | ||
|
|
a49175996a | ||
|
|
6212dae5a3 | ||
|
|
2c02a46d4a | ||
|
|
97e840e38c | ||
|
|
1a6cc7204b | ||
|
|
737b5a2626 | ||
|
|
86f807303b | ||
|
|
e09423bf10 | ||
|
|
7acaccb581 | ||
|
|
0877e542a2 | ||
|
|
e65ae170f5 | ||
|
|
de1bb49f9b | ||
|
|
76845e50a7 | ||
|
|
04e3fce37f | ||
|
|
ff01cbc0dc | ||
|
|
303729f962 | ||
|
|
16a4063a5c | ||
|
|
356e1bab69 | ||
|
|
1a93047c8f | ||
|
|
11f3e466eb | ||
|
|
3a81cdf411 | ||
|
|
bd283e53e8 | ||
|
|
1bb55f4144 | ||
|
|
7934e8bb71 | ||
|
|
b2f5153d22 | ||
|
|
2fae419c18 | ||
|
|
3834d495be | ||
|
|
f6181a0ff6 | ||
|
|
82b62742ae | ||
|
|
2a4ac83406 | ||
|
|
99756456b6 | ||
|
|
1de556a35e | ||
|
|
60ed88691d | ||
|
|
09ba942d96 | ||
|
|
5b0053850b | ||
|
|
18ac758824 | ||
|
|
1657971444 | ||
|
|
b4f56cf4d8 | ||
|
|
35a1e53dd4 | ||
|
|
e5e35da0bb | ||
|
|
7f19f201c6 | ||
|
|
29d5ce631b | ||
|
|
384e00868e | ||
|
|
bcaca4ca2d | ||
|
|
4d1de11905 | ||
|
|
b4fbdca4e8 | ||
|
|
e129a2504b | ||
|
|
a26b5a4be5 | ||
|
|
227f0039f2 | ||
|
|
9f6d9ffe40 | ||
|
|
cac8af8b36 | ||
|
|
2c54d47ba4 | ||
|
|
492cac2ee2 | ||
|
|
4e6b941ac5 | ||
|
|
efd927dc8b | ||
|
|
478cdc4390 | ||
|
|
42e062db96 | ||
|
|
e43295c784 | ||
|
|
dea890b2f1 | ||
|
|
5997bf100c | ||
|
|
5ac0a4ac7e | ||
|
|
7e4da6b178 | ||
|
|
8da240d839 | ||
|
|
685b63cc27 | ||
|
|
baf6c9b553 | ||
|
|
f6429e60d4 | ||
|
|
7e25bf6649 | ||
|
|
42230a4b36 | ||
|
|
11cc61c6c4 | ||
|
|
b681603cb0 | ||
|
|
d8fb54b60c | ||
|
|
e2633dd7de | ||
|
|
722f2e5420 | ||
|
|
a55fe09455 | ||
|
|
a259b1c110 | ||
|
|
fabd25be22 | ||
|
|
7542ee4f8c | ||
|
|
921f8eb690 | ||
|
|
32cad564fe | ||
|
|
cef76825ee | ||
|
|
49a4af55fe | ||
|
|
830c0c3a76 | ||
|
|
e01e1a490d | ||
|
|
a6e2a122ce | ||
|
|
edff72fabc | ||
|
|
aa4463d27e | ||
|
|
24911bf6ba | ||
|
|
477a699dc9 | ||
|
|
47b4c091d0 | ||
|
|
db47c62c2b | ||
|
|
622a0063ca | ||
|
|
52c1350dbd | ||
|
|
7aca9fa527 | ||
|
|
9730b2df56 | ||
|
|
bbca5af542 | ||
|
|
d3dd908916 | ||
|
|
40036d7b52 | ||
|
|
3248176dfa | ||
|
|
77c3ece753 | ||
|
|
7beaa8bb6f | ||
|
|
b9a9ed94bc | ||
|
|
28c28afdca | ||
|
|
b5bb1c4a24 | ||
|
|
8272f36449 | ||
|
|
c49eb9c2a4 | ||
|
|
11f18f9b18 | ||
|
|
35f7aff599 | ||
|
|
bf9da4f980 | ||
|
|
c631972ee5 | ||
|
|
95df7f0c25 | ||
|
|
b65b45aa9d | ||
|
|
cd6820b753 | ||
|
|
8ef3f2bb54 | ||
|
|
e3c7f0e11b | ||
|
|
3ab4c2a76a | ||
|
|
df8d7b0f9b | ||
|
|
192c74f73b | ||
|
|
00f5f60e45 | ||
|
|
b184e7b4ca | ||
|
|
303ac670a4 | ||
|
|
8e3f8f1bb0 | ||
|
|
bedfc39d61 | ||
|
|
3f107957d4 | ||
|
|
c435d2295f | ||
|
|
4ba66b8f33 | ||
|
|
13afc743c0 | ||
|
|
32a3c860ae | ||
|
|
70bf22d6ca | ||
|
|
0bca0d3b27 | ||
|
|
c3a3a25fb9 | ||
|
|
a17699e166 | ||
|
|
8cf9610a21 | ||
|
|
4c11ae2967 | ||
|
|
92ae196d73 | ||
|
|
460bed388e | ||
|
|
9f99430254 | ||
|
|
f0c844d8ea | ||
|
|
7c68b2bcc2 | ||
|
|
3e057bf5b5 | ||
|
|
0ba2c046a8 | ||
|
|
def7f5f611 | ||
|
|
f21d1121ce | ||
|
|
aa99fa9441 | ||
|
|
6d3f44dfb2 | ||
|
|
73db13b488 | ||
|
|
8530bd486a | ||
|
|
51f84df470 | ||
|
|
8d10d45199 | ||
|
|
f9d71e9792 | ||
|
|
aa6ea508c9 | ||
|
|
ed64bfe974 | ||
|
|
692ee3face | ||
|
|
dfa9e39612 | ||
|
|
ed449abb5e | ||
|
|
d3b7ab1907 | ||
|
|
82f6eafa1d | ||
|
|
fb56978989 | ||
|
|
c8fa6c1908 | ||
|
|
d78476ae73 | ||
|
|
f44f72e3a5 | ||
|
|
c716f0d79a | ||
|
|
b7d9d40743 | ||
|
|
e85e0ad782 | ||
|
|
2487d79920 | ||
|
|
d6860b2313 | ||
|
|
4c5db53fe6 | ||
|
|
befa1e1f7e | ||
|
|
f9cda759ec | ||
|
|
ee50e0951b | ||
|
|
6a5e116725 | ||
|
|
7fff0c1894 | ||
|
|
5c3efdc866 | ||
|
|
a6faeb4ec7 | ||
|
|
ea1d13c1d9 | ||
|
|
a6ac1ded7a | ||
|
|
1ab5ad0a8e | ||
|
|
7873082d28 | ||
|
|
453173294b | ||
|
|
6f33dcc8e7 | ||
|
|
e80ad9577d | ||
|
|
9eb3d1b442 | ||
|
|
a0934e2990 | ||
|
|
d92f5408a7 | ||
|
|
a4d14005aa | ||
|
|
573b46b19d | ||
|
|
721cfb9e18 | ||
|
|
296b612965 | ||
|
|
01cdbe68d9 | ||
|
|
1e3be2b159 | ||
|
|
499860ee09 | ||
|
|
e029ff89f9 | ||
|
|
64efeae56a | ||
|
|
13c4699236 | ||
|
|
85527be02e | ||
|
|
ac79ede45b | ||
|
|
dc0b0cd4af | ||
|
|
735a1b50c9 | ||
|
|
4cddaf78cb | ||
|
|
786b90de5e | ||
|
|
350a3da359 | ||
|
|
943e597291 | ||
|
|
3baf444452 | ||
|
|
3842427fb6 | ||
|
|
943c22412f | ||
|
|
553d2e8f50 | ||
|
|
e3d05d5474 | ||
|
|
96c150caf2 | ||
|
|
28a5db7204 | ||
|
|
2eb48e0305 | ||
|
|
7c9684e331 | ||
|
|
d86c5dabd3 | ||
|
|
a94c85751e | ||
|
|
68ee14e8c0 | ||
|
|
c9c4b4c9d8 | ||
|
|
67e07b14fd | ||
|
|
784933dbd4 | ||
|
|
07f415b4c4 | ||
|
|
fa91380765 | ||
|
|
567d350e76 | ||
|
|
0629113d16 | ||
|
|
3385abfdc6 | ||
|
|
05fe8adbd1 | ||
|
|
ba4b8e7ff5 | ||
|
|
24540db6aa | ||
|
|
d3069e9b44 | ||
|
|
b8bb797171 | ||
|
|
a91a0893cf | ||
|
|
72ae5b74ac | ||
|
|
390084971a | ||
|
|
383b1e7d2b | ||
|
|
20ff1380ae | ||
|
|
ae5f91700e | ||
|
|
7babc118ff | ||
|
|
0502dba2e6 | ||
|
|
82215711c2 | ||
|
|
89cb02528c | ||
|
|
c0c9684adf | ||
|
|
6a0dda8cf7 | ||
|
|
8a23d37870 | ||
|
|
6b88c9a49e | ||
|
|
5e4249663e | ||
|
|
f8061d452c | ||
|
|
785a83f625 | ||
|
|
c8dbf34a14 | ||
|
|
c8a93d75f2 | ||
|
|
b9cd766707 | ||
|
|
c3fb087f92 | ||
|
|
ff04cd326a | ||
|
|
a08d0a62df | ||
|
|
516ccdf4bd | ||
|
|
f73b25c81a | ||
|
|
59df95f162 | ||
|
|
6097ca8b9b | ||
|
|
d14f2c9bbe | ||
|
|
03dc606ca3 | ||
|
|
e1906a9819 | ||
|
|
2eed660327 | ||
|
|
0103acb807 | ||
|
|
0dd1d1562a | ||
|
|
9dd24a6bb1 | ||
|
|
d7ff04c552 | ||
|
|
daaa7985a3 | ||
|
|
ed08009414 | ||
|
|
7621142c34 | ||
|
|
17cbf5da30 | ||
|
|
2e49aa9183 | ||
|
|
ff68c770d8 | ||
|
|
116c7f1aec | ||
|
|
dae321ef8e | ||
|
|
677b40ddbf | ||
|
|
3f21b4bf65 | ||
|
|
86b9d6da08 | ||
|
|
670475b67d | ||
|
|
5592c667ae | ||
|
|
ad481bbbc0 | ||
|
|
e2b2c1ae44 | ||
|
|
8ebd9ba21f | ||
|
|
43e0289604 | ||
|
|
228483de52 | ||
|
|
ee3afd9f40 | ||
|
|
d64e4b6e78 | ||
|
|
138b40a375 | ||
|
|
e5dc58cfd0 | ||
|
|
bb97e48db2 | ||
|
|
82931d3ce2 | ||
|
|
772069a4a6 | ||
|
|
bc34ef1ac8 | ||
|
|
483a68000a | ||
|
|
95ae8f9454 | ||
|
|
97e28d76b3 | ||
|
|
a991521cd0 | ||
|
|
96fddc9066 | ||
|
|
42f0bd41ae | ||
|
|
af36a0b6d9 | ||
|
|
bfcfa2293b | ||
|
|
798775e12b | ||
|
|
e6bd8335dc | ||
|
|
d2193812a9 | ||
|
|
c41fa0c667 | ||
|
|
dc84b7c1d6 | ||
|
|
2506bc5672 | ||
|
|
1cb21fd2ae | ||
|
|
9f34b871af | ||
|
|
361fc39f7c | ||
|
|
71a61666b7 | ||
|
|
14b758cb02 | ||
|
|
7d0aa67b97 | ||
|
|
be39fd075c | ||
|
|
4fd67b276d | ||
|
|
28653ad92c | ||
|
|
2c1a26ea3e | ||
|
|
b489f7cbb3 | ||
|
|
dae748ca2e | ||
|
|
e0087ea8ee | ||
|
|
fd48b6b1ba | ||
|
|
5f5639391a | ||
|
|
f806cb2c91 | ||
|
|
aca1c31490 | ||
|
|
4e2e806b03 | ||
|
|
4617015412 | ||
|
|
632ba09896 | ||
|
|
b3999837ed | ||
|
|
e7ece32ab0 | ||
|
|
dd7de312a1 | ||
|
|
fcefd49725 | ||
|
|
d455b3404e | ||
|
|
28b60406e5 | ||
|
|
f6f0f243ad | ||
|
|
1dc1f4fd56 | ||
|
|
f5eb458ed3 | ||
|
|
69401188ea | ||
|
|
7e8abe1aca | ||
|
|
2369f5a916 | ||
|
|
e29b907761 | ||
|
|
47c49ca534 | ||
|
|
b75a14fac5 | ||
|
|
1b239c2f2a | ||
|
|
dc1901b236 | ||
|
|
8c6d49158e | ||
|
|
a2cd31443c | ||
|
|
383fd86e68 | ||
|
|
5554e35e21 | ||
|
|
a5076d34d8 | ||
|
|
e26ed4c3c3 | ||
|
|
14fab2f6c5 | ||
|
|
d07e61d1ad | ||
|
|
ee89b41183 | ||
|
|
6266627141 | ||
|
|
27243704c1 | ||
|
|
584df9010d | ||
|
|
6899b1548c | ||
|
|
9ec24f826f | ||
|
|
a6cf325db5 | ||
|
|
52fdbd531b | ||
|
|
9a84fef2dd | ||
|
|
26088a7cbb | ||
|
|
95127592d7 | ||
|
|
15684bf8d3 | ||
|
|
96c02d94c3 | ||
|
|
c8c833b3d6 | ||
|
|
1b1cb6e176 | ||
|
|
c64cca9954 | ||
|
|
efe9ac773d | ||
|
|
21174aa5d7 | ||
|
|
9ebc4b00ed | ||
|
|
3874390de7 | ||
|
|
15437c0d2d | ||
|
|
71aaa25e69 | ||
|
|
8d497dce0a | ||
|
|
79a8b3143f | ||
|
|
ec497f0015 | ||
|
|
c00a4dccb5 | ||
|
|
d4dcaaa41a | ||
|
|
c4c2c5a0d1 | ||
|
|
ff822498a6 | ||
|
|
07e7cd023c | ||
|
|
f4960a8903 | ||
|
|
395a0b05d0 | ||
|
|
1735797d82 | ||
|
|
f97b0e9a64 | ||
|
|
a530bd9adb | ||
|
|
bdae3b35b4 | ||
|
|
990f4dbf09 | ||
|
|
5efed259e7 | ||
|
|
9052b813b9 | ||
|
|
88230fd9bd | ||
|
|
484d220b04 | ||
|
|
6652d7f4f8 | ||
|
|
47916ee8c0 | ||
|
|
9816be4b53 | ||
|
|
c9e8ac4c3c | ||
|
|
32350dfe83 | ||
|
|
fce618f2aa | ||
|
|
fad7774767 | ||
|
|
13b294838b | ||
|
|
f0286740f4 | ||
|
|
291b2f7cad | ||
|
|
6251f36e3e | ||
|
|
0d37db307c | ||
|
|
a6cf10fd1a | ||
|
|
07ee6581e1 | ||
|
|
e4672d9a57 | ||
|
|
93b232d7ae | ||
|
|
9e121480c0 | ||
|
|
37527ed89a | ||
|
|
dd8845f77e | ||
|
|
5868198181 | ||
|
|
a9109060d6 | ||
|
|
16a30dcbe3 | ||
|
|
cbc1a89505 | ||
|
|
256b188861 | ||
|
|
48ffc59522 | ||
|
|
eb4f482a4e | ||
|
|
e3202de4ef | ||
|
|
5bdcf59b5c | ||
|
|
90041fc627 | ||
|
|
33fc4308c4 | ||
|
|
04b741e70d | ||
|
|
42b3b95fd8 | ||
|
|
a00c1375e5 | ||
|
|
b93a31a33b | ||
|
|
3a8f7d5a2d | ||
|
|
a2eb40740f | ||
|
|
e2e1a431ff | ||
|
|
f38b72e7a3 | ||
|
|
b2bec12a43 | ||
|
|
fcd7a213e6 | ||
|
|
29443c4b78 | ||
|
|
8265c5ebec | ||
|
|
9f607765bc | ||
|
|
eaf2861cd0 | ||
|
|
23289c4991 | ||
|
|
23f925f81e | ||
|
|
c4d1de06d0 | ||
|
|
e5c42e63b7 | ||
|
|
f53a30a0e4 | ||
|
|
f3150e9d42 | ||
|
|
c850a30c1a | ||
|
|
6c1eb35a47 | ||
|
|
1aec263bb9 | ||
|
|
995e3fee85 | ||
|
|
e78367f12f | ||
|
|
ddb4300a60 | ||
|
|
c8cea52b39 | ||
|
|
1094e3e651 | ||
|
|
8c26fa879d | ||
|
|
42bd651fb3 | ||
|
|
d7e58a3ac0 | ||
|
|
500ab2098b | ||
|
|
5bf59b4376 | ||
|
|
d165a84b67 | ||
|
|
9b881a6214 | ||
|
|
31756be1be | ||
|
|
8ab30b639f | ||
|
|
ef25a9079d | ||
|
|
526507e44f | ||
|
|
e418cb27ce | ||
|
|
c3640306bd | ||
|
|
bfa3e557a4 | ||
|
|
06c2fd3947 | ||
|
|
557e24a5dc | ||
|
|
315838d772 | ||
|
|
63d3dd1c08 | ||
|
|
e88c45561a | ||
|
|
b556ff8fc7 | ||
|
|
ad82a94cc7 | ||
|
|
24a7c2ae39 | ||
|
|
829a1db710 | ||
|
|
432e6970c4 | ||
|
|
dc6440a72e | ||
|
|
39c5f0763c | ||
|
|
adc4bf90b5 | ||
|
|
4b9d060c81 | ||
|
|
c05f6f5e52 | ||
|
|
915bf59d2e | ||
|
|
1190e45e6b | ||
|
|
41d972b359 | ||
|
|
c70b84497a | ||
|
|
e6cacc4d34 | ||
|
|
1d4e997df2 | ||
|
|
e146706a97 | ||
|
|
751cc660a6 | ||
|
|
0ce2dd8486 | ||
|
|
df02d745d8 | ||
|
|
97304269a2 | ||
|
|
2edb3afc81 | ||
|
|
5361bed037 | ||
|
|
553761fb7c | ||
|
|
f5183bc4eb | ||
|
|
b66061d15b | ||
|
|
74c9b9493d | ||
|
|
12959c60cb | ||
|
|
d0c4827335 | ||
|
|
a0646c1b66 | ||
|
|
d6228f381d | ||
|
|
6fe7f7842b | ||
|
|
1654ed0bc6 | ||
|
|
e5273fb887 | ||
|
|
da0732b5ad | ||
|
|
3ec931716a | ||
|
|
1720a94a80 | ||
|
|
39b062fecf | ||
|
|
0b79668f73 | ||
|
|
2f02f6cd2d | ||
|
|
9810008fc1 | ||
|
|
71eba47fe7 | ||
|
|
1d1138d0cb | ||
|
|
015b33b33f | ||
|
|
0b3f4a69b9 | ||
|
|
bd7dfe957f | ||
|
|
2b13abe2a9 | ||
|
|
f2bf2f04cc | ||
|
|
42bbf785ea | ||
|
|
f26fc5ab14 | ||
|
|
06c0be19e9 | ||
|
|
a596acbcec | ||
|
|
f4364bcaa6 | ||
|
|
aa268c8745 | ||
|
|
e87566ef92 | ||
|
|
85f411463b | ||
|
|
c9d5a9ba30 | ||
|
|
59d6592855 | ||
|
|
c8f71072b0 | ||
|
|
18b14a033a | ||
|
|
973246624f | ||
|
|
93154fddc4 | ||
|
|
cab91819d6 | ||
|
|
417f80d752 | ||
|
|
8c2c3188ef | ||
|
|
92290015eb | ||
|
|
e77b4271fc | ||
|
|
60750812d9 | ||
|
|
6fde55217c | ||
|
|
7c5a45335a | ||
|
|
06d9ea2398 | ||
|
|
e369ba3504 | ||
|
|
95ea588c9f | ||
|
|
2644a0ccb7 | ||
|
|
756ded0b5d | ||
|
|
0bda8eeb8d | ||
|
|
ee27c52825 | ||
|
|
a826a8651c | ||
|
|
37c0f16a27 | ||
|
|
c61c939b2a | ||
|
|
ed6debb3c6 | ||
|
|
80b9006620 | ||
|
|
3153df1123 | ||
|
|
ac620d9077 | ||
|
|
40d6c3c973 | ||
|
|
cd338613c1 | ||
|
|
49242e185b | ||
|
|
5005c0303d | ||
|
|
435e8ce50c | ||
|
|
a5752ec4d3 | ||
|
|
6d394c9f55 | ||
|
|
43d64bf0c5 | ||
|
|
3ffa362079 | ||
|
|
b168110a58 | ||
|
|
7399c42dfb | ||
|
|
533caea81e | ||
|
|
18f4ef5574 | ||
|
|
e14fc66ca3 | ||
|
|
b99988385f | ||
|
|
85b6d18094 | ||
|
|
86d96fe60c | ||
|
|
8fcc52b304 | ||
|
|
5f3f1c9c43 | ||
|
|
e835385000 | ||
|
|
e44a216873 | ||
|
|
4b5dd51681 | ||
|
|
e18bb74a5e | ||
|
|
c9599ea817 | ||
|
|
b2d05d7d8e | ||
|
|
2c53c02319 | ||
|
|
99053597a9 | ||
|
|
e5f2ef2335 | ||
|
|
0759359e06 | ||
|
|
2ca36f5957 | ||
|
|
89ceba2f92 | ||
|
|
41bb83054c | ||
|
|
f9ca8934db | ||
|
|
01617da863 | ||
|
|
8d96bb920d | ||
|
|
b502dd71e2 | ||
|
|
359305c24f | ||
|
|
ca2f8c5bed | ||
|
|
ccd1cfbde6 | ||
|
|
32a43b1892 | ||
|
|
6cde715e66 | ||
|
|
6825c7e925 | ||
|
|
433ab6514d | ||
|
|
142049a61e | ||
|
|
8cc2cf8cd2 | ||
|
|
cbd9dfc86a | ||
|
|
675b430833 | ||
|
|
b17cb811d6 | ||
|
|
d6d2f09673 | ||
|
|
d79ce90c68 | ||
|
|
38e82adaea | ||
|
|
5d7b235941 | ||
|
|
8e94a99a53 | ||
|
|
6a77d6b7bc | ||
|
|
e6f1878f1f | ||
|
|
9a7c94314c | ||
|
|
5c9bf3bf7c | ||
|
|
d8d2243b9e | ||
|
|
00241d6252 | ||
|
|
3248a06134 | ||
|
|
ae1bd27ad1 | ||
|
|
9fefbb3b13 | ||
|
|
ed0105f44c | ||
|
|
126ce6607e | ||
|
|
e20a4c4e60 | ||
|
|
e888e89437 | ||
|
|
bb4b8f0bc5 | ||
|
|
a9c87225e2 | ||
|
|
37261761dd | ||
|
|
3361727a37 | ||
|
|
d222cfe8e0 | ||
|
|
64f4d84e74 | ||
|
|
b90e75e912 | ||
|
|
d72e46cfda | ||
|
|
874748e7da | ||
|
|
b5b2e77a7e | ||
|
|
afc4096740 | ||
|
|
2c3b0a1c44 | ||
|
|
c8975bb2e9 | ||
|
|
19d613edcc | ||
|
|
56b6b0cb5a | ||
|
|
3461da7c3a | ||
|
|
332939c3f5 | ||
|
|
2fb9b3eb46 | ||
|
|
794ec3576c | ||
|
|
1b4886715d | ||
|
|
7dfd6de15f | ||
|
|
a60f3f44f7 | ||
|
|
83b433a2e2 | ||
|
|
55c414b400 | ||
|
|
5a24fad354 | ||
|
|
16d6d4d597 | ||
|
|
d92404d047 | ||
|
|
0b75abaa04 | ||
|
|
3f9d49921d | ||
|
|
0551f4f819 | ||
|
|
8366cbca59 | ||
|
|
20f4b51bb7 | ||
|
|
a02d2e63e2 | ||
|
|
2ebd7617fc | ||
|
|
5aa80f2f68 | ||
|
|
c7fe3059a5 | ||
|
|
5f748b3131 | ||
|
|
21c2312952 | ||
|
|
a36f7221e7 | ||
|
|
27f0962654 | ||
|
|
094c80e046 | ||
|
|
0697116289 | ||
|
|
7ef81a37ff | ||
|
|
5e3434396c | ||
|
|
c1a6b8fe12 | ||
|
|
9ba4ac6362 | ||
|
|
67ff37a0d4 | ||
|
|
f375912bc5 | ||
|
|
80a5705aea | ||
|
|
c0d222dedf | ||
|
|
2a5698c9d3 | ||
|
|
be96f417b3 | ||
|
|
398db7dfe8 | ||
|
|
e106959fbd | ||
|
|
31c390aa27 | ||
|
|
2ed72a146b | ||
|
|
790c169c02 | ||
|
|
885eb640dc | ||
|
|
eae4fe86aa | ||
|
|
a163f716b0 | ||
|
|
f425f2fa23 | ||
|
|
b0b3d51571 | ||
|
|
eb0ef1e39b | ||
|
|
97309f2f9f | ||
|
|
5bc071b03c | ||
|
|
5071656209 | ||
|
|
206da93d99 | ||
|
|
258fe58547 | ||
|
|
eccfc7ba71 | ||
|
|
142a8e2503 | ||
|
|
91ed9ed894 | ||
|
|
f4f51e53eb | ||
|
|
9210e52aae | ||
|
|
c5aface2cb | ||
|
|
4f56c7dd2f | ||
|
|
8db6076ce1 | ||
|
|
ae24db1da0 | ||
|
|
b7414c078a | ||
|
|
8564a22bef | ||
|
|
9437bce60a | ||
|
|
ed13a2f47f | ||
|
|
388120956d | ||
|
|
e4da288b25 | ||
|
|
a523d654ef | ||
|
|
dc5131567f | ||
|
|
3063e74e59 | ||
|
|
d9f7e96c68 | ||
|
|
0c03e93a47 | ||
|
|
020e9e5927 | ||
|
|
d3513ffed0 | ||
|
|
15f2ea4e29 | ||
|
|
91dd22d8d3 | ||
|
|
f00e8ba18e | ||
|
|
73f1da20f0 | ||
|
|
24f13a4b88 | ||
|
|
249ff6e8c5 | ||
|
|
aac9425626 | ||
|
|
4982e4b664 | ||
|
|
267ffc99af | ||
|
|
75ef4dceb5 | ||
|
|
79977a0c37 | ||
|
|
3615ebf05e | ||
|
|
0caf8e79db | ||
|
|
b5d40f7964 | ||
|
|
17407f7ea3 | ||
|
|
5c9c7e8cf6 | ||
|
|
d1393acfa6 | ||
|
|
c0f9f14455 | ||
|
|
4af12b14e1 | ||
|
|
d395be256b | ||
|
|
eb4a5a4e4d | ||
|
|
1374d4520f | ||
|
|
081782c97c | ||
|
|
0ec569216b | ||
|
|
48510e3818 | ||
|
|
50c6b4a8aa | ||
|
|
419d3895be | ||
|
|
883d9f9b52 | ||
|
|
6f982a20ba | ||
|
|
6fb53d823e | ||
|
|
351855a5bd | ||
|
|
b9e7bb5457 | ||
|
|
74e0692f69 | ||
|
|
852ddb96d8 | ||
|
|
7decd2b7b0 | ||
|
|
d27616f28b | ||
|
|
e00e94e87f | ||
|
|
493f89643c | ||
|
|
ec35e74400 | ||
|
|
6fffb322ae | ||
|
|
31552b1119 | ||
|
|
5ee6f6a2e8 | ||
|
|
463a25a048 | ||
|
|
67762c1eb0 | ||
|
|
3f40837b1c | ||
|
|
678357ab2a | ||
|
|
ea943369a0 | ||
|
|
a1fdce2e58 | ||
|
|
331cc2e374 | ||
|
|
9ae8c7a196 | ||
|
|
c0e564517e | ||
|
|
e0873687a2 | ||
|
|
441ba17b53 | ||
|
|
951be8f9a1 | ||
|
|
737eecad9e | ||
|
|
95ad01c4db | ||
|
|
8d243b964f | ||
|
|
6c22125980 | ||
|
|
45c701c8e8 | ||
|
|
929c04edd5 | ||
|
|
69a84c94a2 | ||
|
|
6555cc5792 | ||
|
|
902f278a19 | ||
|
|
533e711d47 | ||
|
|
0e48422d1f | ||
|
|
470a104418 | ||
|
|
746bac8325 | ||
|
|
9db3208f72 | ||
|
|
48da2d195a | ||
|
|
2c8e7d2a51 | ||
|
|
bc125a75bf | ||
|
|
b30b575955 | ||
|
|
97fe92d1e7 | ||
|
|
eb7e2ec8e6 | ||
|
|
cd81d69357 | ||
|
|
befc473624 | ||
|
|
a64fda1fb8 | ||
|
|
53313670f5 | ||
|
|
adf5a41a77 | ||
|
|
62513a0d23 | ||
|
|
fb78591baf | ||
|
|
999fc143bf | ||
|
|
9f0134f32d | ||
|
|
c502b0df06 | ||
|
|
b02acfae4b | ||
|
|
ab61149cb1 | ||
|
|
55651e73d9 | ||
|
|
ab7deede57 | ||
|
|
315fb77d63 | ||
|
|
36282e750d | ||
|
|
c52e84d709 | ||
|
|
9f89ac42e7 | ||
|
|
8814cbd9f2 | ||
|
|
168f36bc21 | ||
|
|
71a096f817 | ||
|
|
d26f7db319 | ||
|
|
98c27fcf6d | ||
|
|
d84b981e9a | ||
|
|
e67abc36af | ||
|
|
9b7149f16e | ||
|
|
eab5c4bf4c | ||
|
|
9d406ba26f | ||
|
|
ededce7bd6 | ||
|
|
e9d4cacac5 | ||
|
|
5db6eb0359 | ||
|
|
7eb08c8706 | ||
|
|
d8bca5c56d | ||
|
|
d83709d519 | ||
|
|
7a873c3b53 | ||
|
|
606baf6f3e | ||
|
|
6d105680d6 | ||
|
|
96ae492bad | ||
|
|
712c7e5fb1 | ||
|
|
a99f686fd1 | ||
|
|
41069a0fa5 | ||
|
|
7c90a2365c | ||
|
|
034bddf1ef | ||
|
|
4cb36a5b69 | ||
|
|
11c07cd7c3 | ||
|
|
0e0430a222 | ||
|
|
b606b26dd3 | ||
|
|
5251427cbf | ||
|
|
5e62af44e5 | ||
|
|
7e9a5a4244 | ||
|
|
c1bf4fb27f | ||
|
|
c877a6e5c8 | ||
|
|
d5088caac6 | ||
|
|
d83f0125f3 | ||
|
|
d0b4bfdaa1 | ||
|
|
c90fab0136 | ||
|
|
43afcf3f98 | ||
|
|
313bbaaae2 | ||
|
|
8a20ab33b4 | ||
|
|
f8a38aa821 | ||
|
|
0ed32eb597 | ||
|
|
013786a7b7 | ||
|
|
d80951cd53 | ||
|
|
1efed9d436 | ||
|
|
17562e727e | ||
|
|
5433e85323 | ||
|
|
811b3b3658 | ||
|
|
1b8bee4262 | ||
|
|
3a07a268ca | ||
|
|
fd9f31987d | ||
|
|
eeacb4500d | ||
|
|
e8872c6780 | ||
|
|
4a20e1b4d2 | ||
|
|
685cc29415 | ||
|
|
f6bcfb549a | ||
|
|
234a510d6f | ||
|
|
e5b111c8bb | ||
|
|
a81caa3ac1 | ||
|
|
a382d58b68 | ||
|
|
3fa0b8f6d4 | ||
|
|
e54322521e | ||
|
|
46e8db7d6d | ||
|
|
5ca3b15188 | ||
|
|
39ae560885 | ||
|
|
24dd71d15f | ||
|
|
583431852c | ||
|
|
4867d396fe | ||
|
|
311ac03790 | ||
|
|
ade297f257 | ||
|
|
74049d1b22 | ||
|
|
1512819200 | ||
|
|
7a4558a3da | ||
|
|
5c52509e27 | ||
|
|
10feb45bce | ||
|
|
030bc46d26 | ||
|
|
13ff7f4e65 | ||
|
|
7a3c9f7efe | ||
|
|
cbe4fca9ae | ||
|
|
584dd64308 | ||
|
|
59c6eabad9 | ||
|
|
680c1942df | ||
|
|
3cc077ff38 | ||
|
|
b4d6a7b4e4 | ||
|
|
d95518d17e | ||
|
|
fe8c81e84a | ||
|
|
df68d03953 | ||
|
|
bb533eefc8 | ||
|
|
a782122742 | ||
|
|
ae855098cf | ||
|
|
afba23882e | ||
|
|
463383e25c | ||
|
|
a75133d554 | ||
|
|
c278239f97 | ||
|
|
438489fb01 | ||
|
|
7fb0fb49f1 | ||
|
|
9bbc832906 | ||
|
|
e8187dbeab | ||
|
|
2a1991fe85 | ||
|
|
0c9b086bd1 | ||
|
|
3185829219 | ||
|
|
3f8e8805a2 | ||
|
|
0f41d8bf46 | ||
|
|
47d89a6959 |
83
.github/workflows/ci-macOS.yml
vendored
Normal file
83
.github/workflows/ci-macOS.yml
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
name: macOS Build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow}}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-14
|
||||
permissions:
|
||||
actions: write
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Setup XCode
|
||||
uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: 15.0.1
|
||||
|
||||
- name: Show current version of Xcode
|
||||
run: xcodebuild -version
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Homebrew
|
||||
id: set-up-homebrew
|
||||
uses: Homebrew/actions/setup-homebrew@main
|
||||
|
||||
- name: Show OpenSSL version
|
||||
run: pkg-config --cflags libcrypto
|
||||
|
||||
- name: Install Packages
|
||||
run: brew install openssl
|
||||
miniupnpc
|
||||
rapidjson
|
||||
sqlcipher
|
||||
bzip2
|
||||
zlib
|
||||
botan@2
|
||||
libxslt
|
||||
libxml2
|
||||
qt
|
||||
|
||||
- name: Checkout submodules
|
||||
run: |
|
||||
env
|
||||
git submodule update --init --remote libbitdht/ libretroshare/ retroshare-webui/
|
||||
git submodule update --init supportlibs/librnp supportlibs/rapidjson supportlibs/restbed openpgpsdk/
|
||||
|
||||
- name: CI-Build
|
||||
run: |
|
||||
qmake6 . -r "CONFIG+=rs_macos14.0" "CONFIG+=release" "CONFIG+=rs_autologin" "CONFIG+=no_rs_sam3" "CONFIG+=no_rs_sam3_libsam3" "CONFIG+=rs_no_rnplib" \
|
||||
INCLUDEPATH+="/opt/homebrew/opt/openssl@3/include" \
|
||||
INCLUDEPATH+="/opt/homebrew/opt/rapidjson/include" \
|
||||
INCLUDEPATH+="/opt/homebrew/opt/sqlcipher/include" \
|
||||
INCLUDEPATH+="/opt/homebrew/opt/miniupnpc/include" \
|
||||
INCLUDEPATH+="/opt/homebrew/opt/libxslt/include" \
|
||||
INCLUDEPATH+="/opt/homebrew/opt/libxml2/include" \
|
||||
QMAKE_LIBDIR+="/opt/homebrew/opt/openssl@3/lib" \
|
||||
QMAKE_LIBDIR+="/opt/homebrew/opt/rapidjson/lib" \
|
||||
QMAKE_LIBDIR+="/opt/homebrew/opt/sqlcipher/lib" \
|
||||
QMAKE_LIBDIR+="/opt/homebrew/opt/miniupnpc/lib" \
|
||||
QMAKE_LIBDIR+="/opt/homebrew/opt/libxslt/lib" \
|
||||
QMAKE_LIBDIR+="/opt/homebrew/opt/libxml2/lib" \
|
||||
CONFIG+=no_retroshare_service \
|
||||
CONFIG+=no_retroshare_friendserver
|
||||
make
|
||||
76
.github/workflows/ci-mingw64-Qt6.yml
vendored
Normal file
76
.github/workflows/ci-mingw64-Qt6.yml
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
name: MINGW64 Qt6 Build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow}}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
actions: write
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@40677d36a502eb2cf0fb808cc9dec31bf6152638 # v2.28.0
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
install: >-
|
||||
base-devel
|
||||
git
|
||||
wget
|
||||
p7zip
|
||||
gcc
|
||||
perl
|
||||
ruby
|
||||
doxygen
|
||||
cmake
|
||||
mingw-w64-x86_64-toolchain
|
||||
mingw-w64-x86_64-miniupnpc
|
||||
mingw-w64-x86_64-libxslt
|
||||
mingw-w64-x86_64-xapian-core
|
||||
mingw-w64-x86_64-sqlcipher
|
||||
mingw-w64-x86_64-qt6-base
|
||||
mingw-w64-x86_64-qt6-multimedia
|
||||
mingw-w64-x86_64-qt6
|
||||
mingw-w64-x86_64-ccmake
|
||||
mingw-w64-x86_64-rapidjson
|
||||
mingw-w64-x86_64-json-c
|
||||
mingw-w64-x86_64-libbotan
|
||||
mingw-w64-x86_64-asio
|
||||
|
||||
- name: Checkout submodules
|
||||
run: |
|
||||
env
|
||||
git submodule update --init --remote libbitdht/ libretroshare/ retroshare-webui/
|
||||
git submodule update --init supportlibs/librnp supportlibs/rapidjson supportlibs/restbed
|
||||
|
||||
- name: Workaround librnp strlen build regression
|
||||
run: |
|
||||
FILE="supportlibs/librnp/src/lib/crypto/mem.cpp"
|
||||
grep -q '#include <cstring>' "$FILE" || sed -i '/#include <cstdio>/a #include <cstring>' "$FILE"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
qmake6 . -r -spec win32-g++ "CONFIG+=release" "CONFIG+=rs_autologin" "CONFIG+=no_rs_sam3" "CONFIG+=no_rs_sam3_libsam3"
|
||||
mingw32-make -j3
|
||||
75
.github/workflows/ci-mingw64.yml
vendored
Normal file
75
.github/workflows/ci-mingw64.yml
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
name: MINGW64 Qt5 Build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow}}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
actions: write
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@40677d36a502eb2cf0fb808cc9dec31bf6152638 # v2.28.0
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
install: >-
|
||||
base-devel
|
||||
git
|
||||
wget
|
||||
p7zip
|
||||
gcc
|
||||
perl
|
||||
ruby
|
||||
doxygen
|
||||
cmake
|
||||
mingw-w64-x86_64-toolchain
|
||||
mingw-w64-x86_64-miniupnpc
|
||||
mingw-w64-x86_64-libxslt
|
||||
mingw-w64-x86_64-xapian-core
|
||||
mingw-w64-x86_64-sqlcipher
|
||||
mingw-w64-x86_64-qt5-base
|
||||
mingw-w64-x86_64-qt5-multimedia
|
||||
mingw-w64-x86_64-ccmake
|
||||
mingw-w64-x86_64-rapidjson
|
||||
mingw-w64-x86_64-json-c
|
||||
mingw-w64-x86_64-libbotan
|
||||
mingw-w64-x86_64-asio
|
||||
|
||||
- name: Checkout submodules
|
||||
run: |
|
||||
env
|
||||
git submodule update --init --remote libbitdht/ libretroshare/ retroshare-webui/
|
||||
git submodule update --init supportlibs/librnp supportlibs/rapidjson supportlibs/restbed
|
||||
|
||||
- name: Workaround librnp strlen build regression
|
||||
run: |
|
||||
FILE="supportlibs/librnp/src/lib/crypto/mem.cpp"
|
||||
grep -q '#include <cstring>' "$FILE" || sed -i '/#include <cstdio>/a #include <cstring>' "$FILE"
|
||||
|
||||
- name: CI-Build
|
||||
run: |
|
||||
qmake-qt5.exe . -r -spec win32-g++ "CONFIG+=release" "CONFIG+=rs_autologin" "CONFIG+=no_rs_sam3" "CONFIG+=no_rs_sam3_libsam3"
|
||||
mingw32-make -j3
|
||||
89
.github/workflows/macos-cmake-qt6.yml
vendored
Normal file
89
.github/workflows/macos-cmake-qt6.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
# macOS CMake CI for the RetroShare super-project built against Qt6.
|
||||
#
|
||||
# Qt6 counterpart of macos-cmake.yml. Same whole-tree build and Homebrew flag
|
||||
# harvesting, but installs the `qt` formula (Qt6, which bundles qt5compat, svg,
|
||||
# multimedia and tools) instead of qt@5, and builds with plugins OFF (VOIP still
|
||||
# uses the Qt5-era QtMultimedia API; out of scope for this migration).
|
||||
#
|
||||
# Submodules are initialised WITHOUT --remote so libretroshare stays on its
|
||||
# pinned, CMake-enabled commit.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
name: macOS CMake C/C++ CI (Qt6)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: macOS 14 / Qt6 / CMake
|
||||
runs-on: macos-14
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# Same pinned-commit init as the Ubuntu CMake CI (no --remote); librnp needs
|
||||
# --recursive for its nested src/libsexpp.
|
||||
- name: Init submodules (pinned commits)
|
||||
run: |
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/
|
||||
git submodule update --init --recursive \
|
||||
supportlibs/librnp
|
||||
git submodule update --init \
|
||||
supportlibs/restbed supportlibs/libsam3 \
|
||||
supportlibs/udp-discovery-cpp supportlibs/rapidjson
|
||||
git --no-pager -C libretroshare log --max-count 1 --oneline
|
||||
|
||||
- name: Install Homebrew dependencies
|
||||
run: >
|
||||
brew install
|
||||
ninja qt openssl@3 botan@2 sqlcipher miniupnpc
|
||||
json-c asio speex speexdsp ffmpeg
|
||||
libxml2 libxslt bzip2 zlib rapidjson doxygen
|
||||
|
||||
# Mirrors the validated local macOS command: harvest every Homebrew opt/*
|
||||
# include/lib dir into the compiler/linker flags, and additionally expose them
|
||||
# to find_package() via CMAKE_PREFIX_PATH (needed for keg-only botan@2…).
|
||||
- name: CMake configure
|
||||
run: |
|
||||
HB="$(brew --prefix)"
|
||||
QT6="$(brew --prefix qt)"
|
||||
IFLAGS="-I$HB/include"; for d in "$HB"/opt/*/include; do IFLAGS="$IFLAGS -I$d"; done
|
||||
LFLAGS="-L$HB/lib"; for d in "$HB"/opt/*/lib; do LFLAGS="$LFLAGS -L$d"; done
|
||||
# qt (Qt6) first so find_package(QT NAMES Qt6 Qt5) resolves to this config.
|
||||
PREFIX="$QT6;$HB"; for d in "$HB"/opt/*; do PREFIX="$PREFIX;$d"; done
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH="$PREFIX" \
|
||||
-DQt6_DIR="$QT6/lib/cmake/Qt6" \
|
||||
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)" \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=OFF -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON \
|
||||
-DCMAKE_C_FLAGS="$IFLAGS" -DCMAKE_CXX_FLAGS="$IFLAGS" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$LFLAGS" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="$LFLAGS" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="$LFLAGS"
|
||||
|
||||
- name: CMake build
|
||||
run: cmake --build Build-cmake -j$(sysctl -n hw.ncpu)
|
||||
90
.github/workflows/macos-cmake.yml
vendored
Normal file
90
.github/workflows/macos-cmake.yml
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
# macOS CMake CI for the RetroShare super-project (root aggregate build).
|
||||
#
|
||||
# CMake counterpart of the legacy qmake ci-macOS.yml. Unlike that one (which
|
||||
# disables service/friendserver/sam3/rnp), this builds the WHOLE tree with the
|
||||
# same feature set as the Linux CMake CI, using the user's validated local macOS
|
||||
# command (Homebrew -I/-L flag harvesting).
|
||||
#
|
||||
# Submodules are initialised WITHOUT --remote (identical to ubuntu-cmake.yml) so
|
||||
# libretroshare stays on its pinned, CMake-enabled commit.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
name: macOS CMake C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: macOS 14 / Qt5 / CMake
|
||||
runs-on: macos-14
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# Same pinned-commit init as the Ubuntu CMake CI (no --remote); librnp needs
|
||||
# --recursive for its nested src/libsexpp.
|
||||
- name: Init submodules (pinned commits)
|
||||
run: |
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/
|
||||
git submodule update --init --recursive \
|
||||
supportlibs/librnp
|
||||
git submodule update --init \
|
||||
supportlibs/restbed supportlibs/libsam3 \
|
||||
supportlibs/udp-discovery-cpp supportlibs/rapidjson
|
||||
git --no-pager -C libretroshare log --max-count 1 --oneline
|
||||
|
||||
- name: Install Homebrew dependencies
|
||||
run: >
|
||||
brew install
|
||||
ninja qt@5 openssl@3 botan@2 sqlcipher miniupnpc
|
||||
json-c asio speex speexdsp ffmpeg
|
||||
libxml2 libxslt bzip2 zlib rapidjson doxygen
|
||||
|
||||
# Mirrors the validated local macOS command: harvest every Homebrew opt/*
|
||||
# include/lib dir into the compiler/linker flags, and additionally expose them
|
||||
# to find_package() via CMAKE_PREFIX_PATH (needed for keg-only qt@5, botan@2…).
|
||||
- name: CMake configure
|
||||
run: |
|
||||
HB="$(brew --prefix)"
|
||||
QT5="$(brew --prefix qt@5)"
|
||||
IFLAGS="-I$HB/include"; for d in "$HB"/opt/*/include; do IFLAGS="$IFLAGS -I$d"; done
|
||||
LFLAGS="-L$HB/lib"; for d in "$HB"/opt/*/lib; do LFLAGS="$LFLAGS -L$d"; done
|
||||
# qt@5 first so find_package(Qt5) picks the keg-only (correct) config, not a
|
||||
# broken Qt5 config that may sit directly under the Homebrew prefix.
|
||||
PREFIX="$QT5;$HB"; for d in "$HB"/opt/*; do PREFIX="$PREFIX;$d"; done
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH="$PREFIX" \
|
||||
-DQt5_DIR="$QT5/lib/cmake/Qt5" \
|
||||
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)" \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=ON -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON \
|
||||
-DCMAKE_C_FLAGS="$IFLAGS" -DCMAKE_CXX_FLAGS="$IFLAGS" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$LFLAGS" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="$LFLAGS" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="$LFLAGS"
|
||||
|
||||
- name: CMake build
|
||||
run: cmake --build Build-cmake -j$(sysctl -n hw.ncpu)
|
||||
30
.github/workflows/mirror-to-gitlab.yml
vendored
Normal file
30
.github/workflows/mirror-to-gitlab.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: Mirror to GitLab
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags:
|
||||
- '**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install GitLab deploy key
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.RETROSHARE_GITLAB_MIRROR_SSH_KEY }}
|
||||
|
||||
- name: Trust GitLab host key
|
||||
run: |
|
||||
ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Mirror repository to GitLab
|
||||
run: |
|
||||
git clone --bare "https://github.com/${GITHUB_REPOSITORY}.git" repo.git
|
||||
cd repo.git
|
||||
git remote set-url --push origin git@gitlab.com:RetroShare/RetroShare.git
|
||||
git push --prune origin 'refs/heads/*:refs/heads/*' 'refs/tags/*:refs/tags/*'
|
||||
86
.github/workflows/ubuntu-cmake-qt6.yml
vendored
Normal file
86
.github/workflows/ubuntu-cmake-qt6.yml
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
# Ubuntu CMake CI for the RetroShare super-project built against Qt6.
|
||||
#
|
||||
# This is the Qt6 counterpart of ubuntu-cmake.yml (which builds against Qt5).
|
||||
# It exercises the version-agnostic Qt detection added to
|
||||
# retroshare-gui/CMakeLists.txt (find_package(QT NAMES Qt6 Qt5 ...)).
|
||||
#
|
||||
# Scope note: plugins are built OFF here. The VOIP plugin still uses the Qt5-era
|
||||
# QtMultimedia API (QAudioInput/QAudioOutput/QCameraInfo, removed/redesigned in
|
||||
# Qt6) and FeedReader's CMake still hardcodes Qt5; both are out of scope for the
|
||||
# Qt6 GUI migration and are intentionally excluded until ported.
|
||||
#
|
||||
# As in ubuntu-cmake.yml, submodules are initialised WITHOUT --remote so the
|
||||
# pinned, CMake-enabled commits are used.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
name: Ubuntu CMake C/C++ CI (Qt6)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Ubuntu 24.04 / Qt6 / CMake
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
# NOTE: no --remote here (on purpose) so the pinned, CMake-enabled commits
|
||||
# are checked out. librnp needs --recursive for its nested src/libsexpp.
|
||||
- name: Init submodules (pinned commits)
|
||||
run: |
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/
|
||||
git submodule update --init --recursive \
|
||||
supportlibs/librnp
|
||||
git submodule update --init \
|
||||
supportlibs/restbed supportlibs/libsam3 \
|
||||
supportlibs/udp-discovery-cpp supportlibs/rapidjson
|
||||
git --no-pager -C libretroshare log --max-count 1 --oneline
|
||||
|
||||
- name: apt update
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: apt install build dependencies
|
||||
run: >
|
||||
sudo apt-get install -y
|
||||
build-essential g++ cmake ninja-build pkg-config git
|
||||
qt6-base-dev qt6-base-dev-tools qt6-multimedia-dev libqt6svg6-dev
|
||||
qt6-5compat-dev libqt6core5compat6-dev qt6-tools-dev qt6-tools-dev-tools
|
||||
libssl-dev zlib1g-dev libbz2-dev libbotan-2-dev libjson-c-dev
|
||||
libasio-dev libsqlcipher-dev
|
||||
libspeex-dev libspeexdsp-dev libminiupnpc-dev
|
||||
libavcodec-dev libavutil-dev
|
||||
libx11-dev libxss-dev
|
||||
libxml2-dev libxslt1-dev libcurl4-openssl-dev
|
||||
doxygen python3
|
||||
|
||||
- name: print working directory
|
||||
run: pwd && ls -la
|
||||
|
||||
# Mirrors ubuntu-cmake.yml but selects Qt6 (qmake6 / Qt6 cmake config are the
|
||||
# only Qt available on the runner) and keeps plugins OFF (see scope note).
|
||||
- name: CMake configure
|
||||
run: >
|
||||
cmake -G Ninja -B Build-cmake -S .
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON
|
||||
-DRS_PLUGINS=OFF -DRS_FORUM_DEEP_INDEX=OFF
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON
|
||||
|
||||
- name: CMake build
|
||||
run: cmake --build Build-cmake -j$(nproc)
|
||||
83
.github/workflows/ubuntu-cmake.yml
vendored
Normal file
83
.github/workflows/ubuntu-cmake.yml
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
# Ubuntu CMake CI for the RetroShare super-project (root aggregate build).
|
||||
#
|
||||
# This is the CMake counterpart of the legacy qmake workflows
|
||||
# (ubuntu-qt5_c-cpp.yml / ubuntu-qt6_c-cpp.yml). It builds the WHOLE tree from
|
||||
# the top-level CMakeLists.txt: libretroshare + retroshare-gui + service +
|
||||
# friendserver + plugins, with the JSON API / WebUI enabled.
|
||||
#
|
||||
# Key difference vs the qmake CI: submodules are initialised WITHOUT --remote, so
|
||||
# libretroshare stays on the commit pinned by this super-project (a CMake-enabled
|
||||
# commit that lives on master). Using --remote would move it to the latest upstream
|
||||
# tip and could pull a non-CMake state, breaking the build.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
name: Ubuntu CMake C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Ubuntu 22.04 / Qt5 / CMake
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
# NOTE: no --remote here (on purpose) so the pinned, CMake-enabled commits
|
||||
# are checked out. librnp needs --recursive for its nested src/libsexpp.
|
||||
- name: Init submodules (pinned commits)
|
||||
run: |
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/
|
||||
git submodule update --init --recursive \
|
||||
supportlibs/librnp
|
||||
git submodule update --init \
|
||||
supportlibs/restbed supportlibs/libsam3 \
|
||||
supportlibs/udp-discovery-cpp supportlibs/rapidjson
|
||||
git --no-pager -C libretroshare log --max-count 1 --oneline
|
||||
|
||||
- name: apt update
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: apt install build dependencies
|
||||
run: >
|
||||
sudo apt-get install -y
|
||||
build-essential g++ cmake ninja-build pkg-config git
|
||||
qtbase5-dev qtbase5-dev-tools qtmultimedia5-dev libqt5svg5-dev
|
||||
libqt5x11extras5-dev qttools5-dev qttools5-dev-tools
|
||||
libssl-dev zlib1g-dev libbz2-dev libbotan-2-dev libjson-c-dev
|
||||
libasio-dev libsqlcipher-dev
|
||||
libspeex-dev libspeexdsp-dev libminiupnpc-dev
|
||||
libavcodec-dev libavutil-dev
|
||||
libx11-dev libxss-dev
|
||||
libxml2-dev libxslt1-dev libcurl4-openssl-dev
|
||||
doxygen python3
|
||||
|
||||
- name: print working directory
|
||||
run: pwd && ls -la
|
||||
|
||||
# Mirrors the validated local Linux build command.
|
||||
- name: CMake configure
|
||||
run: >
|
||||
cmake -G Ninja -B Build-cmake -S .
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON
|
||||
-DRS_PLUGINS=ON -DRS_FORUM_DEEP_INDEX=OFF
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON
|
||||
|
||||
- name: CMake build
|
||||
run: cmake --build Build-cmake -j$(nproc)
|
||||
40
.github/workflows/ubuntu-qt5_c-cpp.yml
vendored
Normal file
40
.github/workflows/ubuntu-qt5_c-cpp.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: Ubuntu Qt 5 C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: git init
|
||||
run: git submodule update --init --remote libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/ && git --no-pager log --max-count 1
|
||||
- name: git submodule supportlibs
|
||||
run: git submodule update --init supportlibs/librnp supportlibs/restbed #supportlibs/rapidjson
|
||||
- name: run apt update
|
||||
run: sudo apt-get update
|
||||
- name: apt install
|
||||
run: sudo apt-get install g++ cmake qt5-qmake qtmultimedia5-dev libqt5x11extras5-dev libasio-dev libbz2-dev libjson-c-dev libssl-dev libsqlcipher-dev libupnp-dev libxss-dev rapidjson-dev libbotan-2-dev doxygen libsecret-1-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev libavcodec-dev libavutil-dev libspeex-dev libspeexdsp-dev
|
||||
- name: print working directory
|
||||
run: pwd && ls -la
|
||||
- name: qmake
|
||||
run: |
|
||||
qmake CONFIG+=debug \
|
||||
CONFIG+=rs_autologin \
|
||||
CONFIG+=rs_webui \
|
||||
CONFIG+=rs_jsonapi \
|
||||
CONFIG+=wikipoos \
|
||||
CONFIG+=gxsthewire \
|
||||
CONFIG+=retroshare_plugins
|
||||
- name: make
|
||||
run: make
|
||||
- name: make check
|
||||
run: make check
|
||||
40
.github/workflows/ubuntu-qt6_c-cpp.yml
vendored
Normal file
40
.github/workflows/ubuntu-qt6_c-cpp.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: Ubuntu Qt 6 C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: git init
|
||||
run: git submodule update --init --remote libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/ && git --no-pager log --max-count 1
|
||||
- name: git submodule supportlibs
|
||||
run: git submodule update --init supportlibs/librnp supportlibs/restbed #supportlibs/rapidjson
|
||||
- name: run apt update
|
||||
run: sudo apt-get update
|
||||
- name: apt install
|
||||
run: sudo apt-get install g++ cmake qt6-base-dev qt6-multimedia-dev libasio-dev libbz2-dev libjson-c-dev libssl-dev libsqlcipher-dev libupnp-dev libxss-dev rapidjson-dev libbotan-2-dev doxygen qt6-5compat-dev libqt6core5compat6-dev libsecret-1-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev
|
||||
- name: print working directory
|
||||
run: pwd && ls -la
|
||||
- name: qmake
|
||||
run: |
|
||||
qmake6 CONFIG+=debug \
|
||||
CONFIG+=rs_autologin \
|
||||
CONFIG+=rs_webui \
|
||||
CONFIG+=rs_jsonapi \
|
||||
CONFIG+=wikipoos \
|
||||
CONFIG+=gxsthewire \
|
||||
CONFIG+=retroshare_plugins
|
||||
- name: make
|
||||
run: make
|
||||
- name: make check
|
||||
run: make check
|
||||
109
.github/workflows/windows-cmake-qt6.yml
vendored
Normal file
109
.github/workflows/windows-cmake-qt6.yml
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
# Windows (MSYS2 / UCRT64) CMake CI for the RetroShare super-project built against Qt6.
|
||||
#
|
||||
# Qt6 counterpart of windows-cmake.yml. Same whole-tree build and flags, but the
|
||||
# UCRT64 toolchain installs the qt6-* packages (incl. qt6-5compat for the
|
||||
# Core5Compat module my version-agnostic CMake requires) and plugins are OFF
|
||||
# (VOIP still uses the Qt5-era QtMultimedia API; out of scope for this migration).
|
||||
#
|
||||
# Submodules are initialised WITHOUT --remote so libretroshare stays on its
|
||||
# pinned, CMake-enabled commit.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
name: Windows UCRT64 CMake C/C++ CI (Qt6)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Windows UCRT64 / Qt6 / CMake
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup MSYS2 (UCRT64)
|
||||
uses: msys2/setup-msys2@40677d36a502eb2cf0fb808cc9dec31bf6152638 # v2.28.0
|
||||
with:
|
||||
msystem: UCRT64
|
||||
update: true
|
||||
install: >-
|
||||
base-devel
|
||||
git
|
||||
perl
|
||||
ruby
|
||||
mingw-w64-ucrt-x86_64-toolchain
|
||||
mingw-w64-ucrt-x86_64-doxygen
|
||||
mingw-w64-ucrt-x86_64-cmake
|
||||
mingw-w64-ucrt-x86_64-ninja
|
||||
mingw-w64-ucrt-x86_64-python
|
||||
mingw-w64-ucrt-x86_64-qt6-base
|
||||
mingw-w64-ucrt-x86_64-qt6-multimedia
|
||||
mingw-w64-ucrt-x86_64-qt6-svg
|
||||
mingw-w64-ucrt-x86_64-qt6-5compat
|
||||
mingw-w64-ucrt-x86_64-qt6-tools
|
||||
mingw-w64-ucrt-x86_64-openssl
|
||||
mingw-w64-ucrt-x86_64-libbotan
|
||||
mingw-w64-ucrt-x86_64-sqlcipher
|
||||
mingw-w64-ucrt-x86_64-miniupnpc
|
||||
mingw-w64-ucrt-x86_64-json-c
|
||||
mingw-w64-ucrt-x86_64-rapidjson
|
||||
mingw-w64-ucrt-x86_64-asio
|
||||
mingw-w64-ucrt-x86_64-libxml2
|
||||
mingw-w64-ucrt-x86_64-libxslt
|
||||
mingw-w64-ucrt-x86_64-speex
|
||||
mingw-w64-ucrt-x86_64-speexdsp
|
||||
mingw-w64-ucrt-x86_64-ffmpeg
|
||||
mingw-w64-ucrt-x86_64-bzip2
|
||||
mingw-w64-ucrt-x86_64-zlib
|
||||
|
||||
# Same pinned-commit init as the Ubuntu/macOS CMake CI (no --remote); librnp
|
||||
# needs --recursive for its nested src/libsexpp.
|
||||
- name: Init submodules (pinned commits)
|
||||
run: |
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/
|
||||
git submodule update --init --recursive \
|
||||
supportlibs/librnp
|
||||
git submodule update --init \
|
||||
supportlibs/restbed supportlibs/libsam3 \
|
||||
supportlibs/udp-discovery-cpp supportlibs/rapidjson
|
||||
git --no-pager -C libretroshare log --max-count 1 --oneline
|
||||
|
||||
# Mirrors windows-cmake.yml (Ninja, shared libretroshare) but with Qt6 and
|
||||
# plugins OFF.
|
||||
- name: CMake configure
|
||||
run: >
|
||||
cmake -G Ninja -B Build-cmake -S .
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DRS_LIBRETROSHARE_STATIC=OFF -DRS_LIBRETROSHARE_SHARED=ON
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON
|
||||
-DRS_PLUGINS=OFF -DRS_FORUM_DEEP_INDEX=OFF
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON
|
||||
-DCMAKE_C_FLAGS="-include string.h -include stdint.h"
|
||||
-DCMAKE_CXX_FLAGS="-include cstring -include cstdint -Wno-template-body"
|
||||
|
||||
- name: CMake build
|
||||
run: cmake --build Build-cmake -j3
|
||||
108
.github/workflows/windows-cmake.yml
vendored
Normal file
108
.github/workflows/windows-cmake.yml
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
# Windows (MSYS2 / UCRT64) CMake CI for the RetroShare super-project.
|
||||
#
|
||||
# CMake counterpart of the legacy qmake ci-ucrt64.yml. Unlike that one (GUI-only,
|
||||
# sam3 disabled, mingw32-make), this builds the WHOLE tree with the same feature
|
||||
# set as the Linux/macOS CMake CIs, using Ninja and the user's validated local
|
||||
# Windows command (shared libretroshare).
|
||||
#
|
||||
# Submodules are initialised WITHOUT --remote (identical to ubuntu-cmake.yml) so
|
||||
# libretroshare stays on its pinned, CMake-enabled commit. On WIN32 libretroshare
|
||||
# pulls restbed via FetchContent, so the restbed submodule is unused there.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
name: Windows UCRT64 CMake C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Windows UCRT64 / Qt5 / CMake
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup MSYS2 (UCRT64)
|
||||
uses: msys2/setup-msys2@40677d36a502eb2cf0fb808cc9dec31bf6152638 # v2.28.0
|
||||
with:
|
||||
msystem: UCRT64
|
||||
update: true
|
||||
install: >-
|
||||
base-devel
|
||||
git
|
||||
perl
|
||||
ruby
|
||||
mingw-w64-ucrt-x86_64-toolchain
|
||||
mingw-w64-ucrt-x86_64-doxygen
|
||||
mingw-w64-ucrt-x86_64-cmake
|
||||
mingw-w64-ucrt-x86_64-ninja
|
||||
mingw-w64-ucrt-x86_64-python
|
||||
mingw-w64-ucrt-x86_64-qt5-base
|
||||
mingw-w64-ucrt-x86_64-qt5-multimedia
|
||||
mingw-w64-ucrt-x86_64-qt5-svg
|
||||
mingw-w64-ucrt-x86_64-qt5-tools
|
||||
mingw-w64-ucrt-x86_64-openssl
|
||||
mingw-w64-ucrt-x86_64-libbotan
|
||||
mingw-w64-ucrt-x86_64-sqlcipher
|
||||
mingw-w64-ucrt-x86_64-miniupnpc
|
||||
mingw-w64-ucrt-x86_64-json-c
|
||||
mingw-w64-ucrt-x86_64-rapidjson
|
||||
mingw-w64-ucrt-x86_64-asio
|
||||
mingw-w64-ucrt-x86_64-libxml2
|
||||
mingw-w64-ucrt-x86_64-libxslt
|
||||
mingw-w64-ucrt-x86_64-speex
|
||||
mingw-w64-ucrt-x86_64-speexdsp
|
||||
mingw-w64-ucrt-x86_64-ffmpeg
|
||||
mingw-w64-ucrt-x86_64-bzip2
|
||||
mingw-w64-ucrt-x86_64-zlib
|
||||
|
||||
# Same pinned-commit init as the Ubuntu/macOS CMake CI (no --remote); librnp
|
||||
# needs --recursive for its nested src/libsexpp.
|
||||
- name: Init submodules (pinned commits)
|
||||
run: |
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/
|
||||
git submodule update --init --recursive \
|
||||
supportlibs/librnp
|
||||
git submodule update --init \
|
||||
supportlibs/restbed supportlibs/libsam3 \
|
||||
supportlibs/udp-discovery-cpp supportlibs/rapidjson
|
||||
git --no-pager -C libretroshare log --max-count 1 --oneline
|
||||
|
||||
# Mirrors the validated local Windows command (Ninja, shared libretroshare).
|
||||
- name: CMake configure
|
||||
run: >
|
||||
cmake -G Ninja -B Build-cmake -S .
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DRS_LIBRETROSHARE_STATIC=OFF -DRS_LIBRETROSHARE_SHARED=ON
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON
|
||||
-DRS_PLUGINS=ON -DRS_FORUM_DEEP_INDEX=OFF
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON
|
||||
-DCMAKE_C_FLAGS="-include string.h -include stdint.h"
|
||||
-DCMAKE_CXX_FLAGS="-include cstring -include cstdint -Wno-template-body"
|
||||
|
||||
- name: CMake build
|
||||
run: cmake --build Build-cmake -j3
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@ -21,7 +21,7 @@ Thumbs.db
|
||||
!supportlibs/libsam3/Makefile
|
||||
|
||||
# QtCreator cruft
|
||||
*CMakeLists.txt.user
|
||||
*CMakeLists.txt.user*
|
||||
|
||||
# Build artifacts
|
||||
/jsonapi-generator/src/jsonapi-generator
|
||||
@ -35,3 +35,7 @@ Thumbs.db
|
||||
/retroshare-gui/src/temp/
|
||||
/retroshare-service/src/retroshare-service
|
||||
/*.tar.?z
|
||||
|
||||
# Build artifacts
|
||||
build/
|
||||
.vscode/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
image: docker:stable
|
||||
image: docker:latest
|
||||
|
||||
services:
|
||||
- docker:stable-dind
|
||||
- docker:dind
|
||||
|
||||
stages:
|
||||
- build
|
||||
@ -18,6 +18,7 @@ variables:
|
||||
build-ubuntu-test-image:
|
||||
stage: build
|
||||
script:
|
||||
- docker --version
|
||||
- >
|
||||
docker login "$CI_REGISTRY"
|
||||
--username "$CI_REGISTRY_USER"
|
||||
@ -35,6 +36,7 @@ build-ubuntu-test-image:
|
||||
test-ubuntu:
|
||||
stage: test
|
||||
script:
|
||||
- docker --version
|
||||
- >
|
||||
docker login "$CI_REGISTRY"
|
||||
--username "$CI_REGISTRY_USER"
|
||||
|
||||
16
.gitmodules
vendored
16
.gitmodules
vendored
@ -10,7 +10,8 @@
|
||||
[submodule "supportlibs/udp-discovery-cpp"]
|
||||
path = supportlibs/udp-discovery-cpp
|
||||
url = https://github.com/truvorskameikin/udp-discovery-cpp.git
|
||||
branch = develop
|
||||
branch = master
|
||||
# develop branch was removed we were using it at commit f3a3103a6c52e5707629e8d0a7e279a7758fe845
|
||||
[submodule "supportlibs/rapidjson"]
|
||||
path = supportlibs/rapidjson
|
||||
url = https://github.com/Tencent/rapidjson.git
|
||||
@ -22,16 +23,21 @@
|
||||
url = https://github.com/RetroShare/jni.hpp.git
|
||||
[submodule "openpgpsdk"]
|
||||
path = openpgpsdk
|
||||
url = ../OpenPGP-SDK
|
||||
url = https://github.com/RetroShare/OpenPGP-SDK.git
|
||||
branch = master
|
||||
[submodule "libbitdht"]
|
||||
path = libbitdht
|
||||
url = ../BitDHT
|
||||
url = https://github.com/RetroShare/BitDHT.git
|
||||
branch = master
|
||||
[submodule "libretroshare"]
|
||||
path = libretroshare
|
||||
url = ../libretroshare
|
||||
url = https://github.com/RetroShare/libretroshare.git
|
||||
branch = master
|
||||
[submodule "retroshare-webui"]
|
||||
path = retroshare-webui
|
||||
url = ../RSNewWebUI
|
||||
url = https://github.com/RetroShare/RSNewWebUI.git
|
||||
branch = master
|
||||
[submodule "supportlibs/librnp"]
|
||||
path = supportlibs/librnp
|
||||
url = https://github.com/rnpgp/rnp.git
|
||||
branch = main
|
||||
|
||||
469
BUILD-cmake.md
Normal file
469
BUILD-cmake.md
Normal file
@ -0,0 +1,469 @@
|
||||
# RetroShare — CMake build (Linux / macOS / Windows)
|
||||
|
||||
Build commands for the whole tree from the root of the super-project. The
|
||||
top-level `CMakeLists.txt` only *aggregates* the independent component projects
|
||||
(libretroshare + GUI + service + friendserver + plugins) — each is a standalone
|
||||
CMake project, buildable on its own. JSON API / WebUI enabled.
|
||||
|
||||
## Qt5 or Qt6
|
||||
|
||||
The build is **version-agnostic**: `retroshare-gui/CMakeLists.txt` probes Qt6
|
||||
first (`find_package(Qt6 QUIET COMPONENTS Core)`) and falls back to Qt5, so the
|
||||
same tree builds against **either** Qt5 or Qt6. When both are installed **Qt6 is
|
||||
preferred**; force Qt5 with `-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON`.
|
||||
|
||||
> Why an explicit probe and not `find_package(QT NAMES Qt6 Qt5 …)`: on
|
||||
> Debian/Ubuntu multiarch (Qt5 and Qt6 both under `/usr/lib/<arch>/cmake`) the
|
||||
> `NAMES` order is **not** honoured — CMake globs the sibling `Qt5*`/`Qt6*`
|
||||
> config dirs and stops at whichever `…Config.cmake` it reaches first, which is
|
||||
> filesystem-order dependent and routinely lands on Qt5 even with Qt6 listed
|
||||
> first. The explicit Qt6 probe makes the preference deterministic, and is also
|
||||
> what makes `-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON` actually force a Qt5 build
|
||||
> (with the versionless `QT` package name that switch had no effect).
|
||||
|
||||
Two deltas for a Qt6 build (everything else is identical):
|
||||
- different Qt `-dev` packages (see each platform below);
|
||||
- **`-DRS_PLUGINS=OFF`** — the VOIP plugin still uses the Qt5-era QtMultimedia API
|
||||
(`QAudioInput`/`QAudioOutput`/`QCameraInfo`) and isn't ported to Qt6 yet;
|
||||
FeedReader's CMake is also still Qt5-only.
|
||||
|
||||
Each configure below is prefixed with `rm -rf Build-cmake`, so the build dir is
|
||||
recreated from scratch every time. This keeps switching between Qt5 and Qt6 in the
|
||||
same `Build-cmake` clean (no stale `CMakeCache.txt` pinning the previous Qt
|
||||
version). Drop the `rm -rf` if you want an incremental rebuild instead.
|
||||
|
||||
Validated by the CMake CI:
|
||||
`.github/workflows/{ubuntu,macos,windows}-cmake.yml` (Qt5) and the matching
|
||||
`…-cmake-qt6.yml` (Qt6).
|
||||
|
||||
Other notes:
|
||||
- `RS_FORUM_DEEP_INDEX=OFF` on purpose (Xapian unused; re-enabled later via the
|
||||
ForumContentSearchFTS5 branch).
|
||||
- Ninja is used on all three platforms for consistency.
|
||||
- `RS_SERVICE_TERMINAL_WEBUI_PASSWORD=ON` is **required** for `retroshare-service`
|
||||
to expose the `-W`/`-B` flags that enable and serve the WebUI. `RS_WEBUI=ON`
|
||||
alone builds the WebUI machinery, but the service then has **no way to turn it
|
||||
on** — `enableWebUI` defaults to false and only `-W` ever sets it, so the WebUI
|
||||
never serves. It is a `cmake_dependent_option` requiring `RS_WEBUI=ON`.
|
||||
|
||||
## Submodules (init WITHOUT --remote)
|
||||
|
||||
`--remote` would move libretroshare off its pinned CMake commit and break the
|
||||
build. librnp needs `--recursive` for its nested `src/libsexpp`.
|
||||
|
||||
```bash
|
||||
git submodule update --init libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/
|
||||
git submodule update --init --recursive supportlibs/librnp
|
||||
git submodule update --init supportlibs/restbed supportlibs/libsam3 \
|
||||
supportlibs/udp-discovery-cpp supportlibs/rapidjson
|
||||
```
|
||||
|
||||
**rapidjson / GCC >= 13:** the commit pinned by the super-project (`f54b0e47`)
|
||||
has a broken `GenericStringRef::operator=` that assigns to the `const` member
|
||||
`length`, so it fails to compile on modern toolchains (e.g. Debian 13 / GCC 14)
|
||||
with *"assignment of read-only member 'length'"*. Check out the upstream fix
|
||||
commit (#719, on Tencent/rapidjson master):
|
||||
|
||||
```bash
|
||||
git -C supportlibs/rapidjson fetch origin
|
||||
git -C supportlibs/rapidjson checkout 9bd618f5
|
||||
```
|
||||
|
||||
## Version numbering
|
||||
|
||||
Versions are **not** hard-coded — CMake derives them at configure time from
|
||||
`git describe` run in each component's working tree, so what a build reports is
|
||||
exactly what your local checkout resolves to. Three independent strings are
|
||||
stamped in:
|
||||
|
||||
| String | Source command | CMake file |
|
||||
|---|---|---|
|
||||
| `RS_GUI_VERSION` — the GUI's own version (shown in *Help ▸ About*) | `git describe --tags --always --dirty` in the super-project, leading `v` stripped | `retroshare-gui/CMakeLists.txt` |
|
||||
| libRetroShare version (`RS_MAJOR`/`RS_MINOR`/`RS_MINI` + `RS_EXTRA_VERSION`) | `git describe --tags --long --match 'v*.*.*'` in `libretroshare/`, parsed into `major.minor.mini` + trailing extra | `libretroshare/CMakeLists.txt` |
|
||||
| `RS_LIB_VERSION_HASH` — engine build hash | `git describe --tags --always --dirty` in `libretroshare/`, leading `v` stripped | `libretroshare/CMakeLists.txt` |
|
||||
|
||||
The super-project's `describe` resolves to a `v0.6.7.x` tag; libretroshare's own
|
||||
tags are `v0.6.7`. So a GUI version reads like `0.6.7.3-1112-gd6047eb5a` and the
|
||||
engine like `0.6.7-548-g25845f94`, i.e. `<tag>-<commits since tag>-g<short hash>`.
|
||||
|
||||
To read the exact values a build **would** stamp, without building, run from the
|
||||
super-project root:
|
||||
|
||||
```bash
|
||||
git describe --tags --always --dirty
|
||||
git -C libretroshare describe --tags --long --match 'v*.*.*'
|
||||
```
|
||||
|
||||
The first line is `RS_GUI_VERSION` (drop the leading `v`); the second is the
|
||||
libRetroShare version.
|
||||
|
||||
Notes:
|
||||
- **`-dirty`** is appended whenever the working tree has *tracked* modifications
|
||||
at configure time. Modified **submodule pointers count as tracked changes**, so
|
||||
a tree that is otherwise clean apart from submodule drift still stamps `-dirty`
|
||||
on the GUI/engine version. Untracked files never trigger it.
|
||||
- libretroshare uses `--long`, which **always** prints the `-<N>-g<hash>` suffix —
|
||||
even on a tagged commit you get `v0.6.7-0-g…`, never a bare `0.6.7`.
|
||||
- Merging feature branches into an integration branch (e.g. `combo`) only grows
|
||||
the `-<N>-` commit count and changes the `-g<hash>`; the `v0.6.7.x` / `v0.6.7`
|
||||
tag prefix stays put. An octopus merge (one merge commit) yields a slightly
|
||||
lower `<N>` than the same branches merged one by one (one merge commit each).
|
||||
- If git metadata is unavailable (tarball / distro build, or the git call fails),
|
||||
the GUI falls back to the default in `retroshare-gui/src/rsguiversion.h`
|
||||
(`"version not available"`), and libretroshare must be given the version on the
|
||||
CMake command line: `-DRS_MAJOR_VERSION=… -DRS_MINOR_VERSION=… -DRS_MINI_VERSION=…`.
|
||||
|
||||
---
|
||||
|
||||
## Linux (Ubuntu/Debian)
|
||||
|
||||
Dependencies — **Qt5**:
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential g++ cmake ninja-build pkg-config git \
|
||||
qtbase5-dev qtbase5-dev-tools qtmultimedia5-dev libqt5svg5-dev \
|
||||
libqt5x11extras5-dev qttools5-dev qttools5-dev-tools \
|
||||
libssl-dev zlib1g-dev libbz2-dev libbotan-2-dev libjson-c-dev \
|
||||
libasio-dev libsqlcipher-dev \
|
||||
libspeex-dev libspeexdsp-dev libminiupnpc-dev \
|
||||
libavcodec-dev libavutil-dev \
|
||||
libxml2-dev libxslt1-dev libcurl4-openssl-dev \
|
||||
doxygen python3
|
||||
```
|
||||
|
||||
Dependencies — **Qt6** (self-contained; only the `qt*` packages differ from the
|
||||
Qt5 list above):
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential g++ cmake ninja-build pkg-config git \
|
||||
qt6-base-dev qt6-base-dev-tools qt6-multimedia-dev \
|
||||
qt6-5compat-dev qt6-tools-dev qt6-tools-dev-tools \
|
||||
libssl-dev zlib1g-dev libbz2-dev libbotan-2-dev libjson-c-dev \
|
||||
libasio-dev libsqlcipher-dev \
|
||||
libspeex-dev libspeexdsp-dev libminiupnpc-dev \
|
||||
libavcodec-dev libavutil-dev \
|
||||
libxml2-dev libxslt1-dev libcurl4-openssl-dev \
|
||||
doxygen python3
|
||||
```
|
||||
> On Ubuntu 24.04 the Core5Compat dev headers come from `qt6-5compat-dev` (there
|
||||
> is no `libqt6core5compat6-dev`). Svg/X11Extras dev packages aren't needed on
|
||||
> Linux for Qt6.
|
||||
|
||||
Build — **Qt5**:
|
||||
```bash
|
||||
rm -rf Build-cmake
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON -DRS_SERVICE_TERMINAL_WEBUI_PASSWORD=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=ON -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON
|
||||
cmake --build Build-cmake -j$(nproc)
|
||||
```
|
||||
|
||||
Build — **Qt6** (auto-selected once the qt6 `-dev` packages are installed):
|
||||
```bash
|
||||
rm -rf Build-cmake
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON -DRS_SERVICE_TERMINAL_WEBUI_PASSWORD=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=OFF -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON
|
||||
cmake --build Build-cmake -j$(nproc)
|
||||
```
|
||||
|
||||
### Debug build (Linux)
|
||||
|
||||
The commands above build `Release` (`-O3 -DNDEBUG`): aggressive inlining, assertions
|
||||
stripped. Fine for daily use, wrong under a debugger — backtraces land on
|
||||
misattributed lines and locals read `<optimized out>`. To step through code or
|
||||
investigate a crash with `gdb`, build `Debug` instead.
|
||||
|
||||
Two changes to the Qt5 configure above:
|
||||
- swap `-DCMAKE_BUILD_TYPE=Release` for `-DCMAKE_BUILD_TYPE=Debug` (gives `-g -O0`);
|
||||
- pin explicit debug flags so every symbol is emitted and nothing is inlined:
|
||||
`-DCMAKE_CXX_FLAGS_DEBUG` / `-DCMAKE_C_FLAGS_DEBUG` = `-g3 -O0 -fno-omit-frame-pointer`.
|
||||
|
||||
`-g3` emits full debug info **including macro definitions**; `-O0` disables inlining so
|
||||
backtrace line numbers are exact; `-fno-omit-frame-pointer` keeps stack unwinding
|
||||
reliable.
|
||||
|
||||
```bash
|
||||
rm -rf Build-cmake
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_CXX_FLAGS_DEBUG="-g3 -O0 -fno-omit-frame-pointer" \
|
||||
-DCMAKE_C_FLAGS_DEBUG="-g3 -O0 -fno-omit-frame-pointer" \
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON -DRS_SERVICE_TERMINAL_WEBUI_PASSWORD=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=ON -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON
|
||||
cmake --build Build-cmake -j$(nproc)
|
||||
```
|
||||
|
||||
> For a **Qt6** debug build, drop `-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON` and set
|
||||
> `-DRS_PLUGINS=OFF` (as in the Release Qt6 command); the debug flags are identical.
|
||||
|
||||
> A Debug build compiles slower and produces a much larger binary — expected.
|
||||
> `RelWithDebInfo` (`-O2 -g`) is a middle ground with usable symbols, but because it
|
||||
> still optimizes it gives approximate backtraces; prefer `Debug` when chasing a crash.
|
||||
|
||||
Run the GUI under gdb (the binary lands at `Build-cmake/retroshare-gui/retroshare`):
|
||||
|
||||
```bash
|
||||
gdb ./Build-cmake/retroshare-gui/retroshare
|
||||
```
|
||||
|
||||
then `run`, reproduce the issue, and `bt` at the crash for a full symbolized stack.
|
||||
|
||||
#### AddressSanitizer (use-after-free / heap bugs)
|
||||
|
||||
For memory-corruption bugs (use-after-free, heap overflow, double free), an ASan build
|
||||
reports the fault **at the moment of the bad access**, with three stacks — allocation,
|
||||
free, and the offending access — instead of a bare `SIGSEGV` after the fact. Add
|
||||
`-fsanitize=address` to both the compile and the link flags:
|
||||
|
||||
```bash
|
||||
rm -rf Build-cmake
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_CXX_FLAGS_DEBUG="-g3 -O1 -fno-omit-frame-pointer -fsanitize=address" \
|
||||
-DCMAKE_C_FLAGS_DEBUG="-g3 -O1 -fno-omit-frame-pointer -fsanitize=address" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=address" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" \
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON -DRS_SERVICE_TERMINAL_WEBUI_PASSWORD=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=ON -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON
|
||||
cmake --build Build-cmake -j$(nproc)
|
||||
```
|
||||
|
||||
> Needs the ASan runtime: `sudo apt-get install -y libasan8`. Run with leak detection
|
||||
> **off** — RetroShare allocates plenty at startup that would otherwise bury the report:
|
||||
> ```bash
|
||||
> ASAN_OPTIONS=abort_on_error=1:detect_leaks=0 ./Build-cmake/retroshare-gui/retroshare
|
||||
> ```
|
||||
> `-O1` (not `-O0`) is deliberate: ASan needs light optimization for acceptable runtime
|
||||
> and cleaner reports, and the sanitizer preserves accurate line numbers regardless.
|
||||
|
||||
---
|
||||
|
||||
## macOS (Homebrew, Apple Silicon)
|
||||
|
||||
Dependencies — **Qt5**:
|
||||
```bash
|
||||
brew install ninja qt@5 openssl@3 botan@2 sqlcipher miniupnpc \
|
||||
json-c asio speex speexdsp ffmpeg libxml2 libxslt bzip2 zlib rapidjson doxygen
|
||||
```
|
||||
Dependencies — **Qt6** (self-contained; only the Qt package differs from the Qt5
|
||||
list above). Unlike Linux's split `qt6-*` packages, Homebrew ships Qt6 as a
|
||||
**single monolithic `qt` formula** that already bundles qt5compat / svg /
|
||||
multimedia / tools — so installing `qt` is all you need:
|
||||
```bash
|
||||
brew install ninja qt openssl@3 botan@2 sqlcipher miniupnpc \
|
||||
json-c asio speex speexdsp ffmpeg libxml2 libxslt bzip2 zlib rapidjson doxygen
|
||||
```
|
||||
> `qt5compat` (bundled in `qt`) provides `Qt6::Core5Compat`, required by the GUI
|
||||
> (QRegExp / QTextCodec).
|
||||
>
|
||||
> **If `brew install qt` fails with** `Cannot install qtbase because conflicting
|
||||
> formulae are installed … qt@5: because both link conflicting binaries`, your
|
||||
> qt@5 is (force-)linked. Run `brew unlink qt@5` first, then re-run
|
||||
> `brew install qt`:
|
||||
> ```bash
|
||||
> brew unlink qt@5
|
||||
> brew install qt
|
||||
> ```
|
||||
> Both Qt versions then coexist: the Qt6 build finds Qt6 via `Qt6_DIR`, and the
|
||||
> Qt5 build still finds qt@5 via `-DQt5_DIR="$(brew --prefix qt@5)/lib/cmake/Qt5"`
|
||||
> (the keg path works whether or not qt@5 is linked).
|
||||
|
||||
> **Botan:** with several Botan versions installed (`botan`=v3, `botan@2`,
|
||||
> `botan@3`), a fresh configure can mismatch — Botan 3 headers + Botan 2 lib →
|
||||
> `Undefined symbols … Botan::…` linker errors in librnp. Both macOS commands
|
||||
> below pin it with `-DBOTAN_ROOT_DIR="$(brew --prefix botan@2)"` so headers and
|
||||
> lib come from the **same** keg ([FindBotan.cmake] searches `BOTAN_ROOT_DIR`
|
||||
> only, via `NO_DEFAULT_PATH`). To build against Botan 3 instead, point it at
|
||||
> `$(brew --prefix botan)` — RNP then detects v3 and links `libbotan-3`.
|
||||
|
||||
> The harvest loop in both macOS commands skips every `qt*` keg on purpose: Qt is
|
||||
> provided via `Qt6_DIR` / `Qt5_DIR`, and pulling a second Qt's headers off
|
||||
> `/opt/homebrew/opt/qt*` would mix Qt5/Qt6 and break the build.
|
||||
|
||||
Build — **Qt5** (harvest Homebrew include/lib dirs; point find_package(Qt5) at keg-only qt@5):
|
||||
```bash
|
||||
HB="$(brew --prefix)"; QT5="$(brew --prefix qt@5)"
|
||||
IFLAGS="-I$HB/include"; LFLAGS="-L$HB/lib"; PREFIX="$QT5;$HB"
|
||||
for d in "$HB"/opt/*; do
|
||||
case "${d##*/}" in qt*) continue;; esac
|
||||
[ -d "$d/include" ] && IFLAGS="$IFLAGS -I$d/include"
|
||||
[ -d "$d/lib" ] && LFLAGS="$LFLAGS -L$d/lib"
|
||||
PREFIX="$PREFIX;$d"
|
||||
done
|
||||
|
||||
rm -rf Build-cmake
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH="$PREFIX" -DQt5_DIR="$QT5/lib/cmake/Qt5" \
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON \
|
||||
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)" \
|
||||
-DBOTAN_ROOT_DIR="$(brew --prefix botan@2)" \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON -DRS_SERVICE_TERMINAL_WEBUI_PASSWORD=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=ON -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON \
|
||||
-DCMAKE_C_FLAGS="$IFLAGS" -DCMAKE_CXX_FLAGS="$IFLAGS" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$LFLAGS" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="$LFLAGS" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="$LFLAGS"
|
||||
cmake --build Build-cmake -j$(sysctl -n hw.ncpu)
|
||||
```
|
||||
|
||||
Build — **Qt6** (use the `qt` prefix + `Qt6_DIR`; plugins OFF):
|
||||
```bash
|
||||
HB="$(brew --prefix)"; QT6="$(brew --prefix qt)"
|
||||
IFLAGS="-I$HB/include"; LFLAGS="-L$HB/lib"; PREFIX="$QT6;$HB"
|
||||
for d in "$HB"/opt/*; do
|
||||
case "${d##*/}" in qt*) continue;; esac
|
||||
[ -d "$d/include" ] && IFLAGS="$IFLAGS -I$d/include"
|
||||
[ -d "$d/lib" ] && LFLAGS="$LFLAGS -L$d/lib"
|
||||
PREFIX="$PREFIX;$d"
|
||||
done
|
||||
|
||||
rm -rf Build-cmake
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH="$PREFIX" -DQt6_DIR="$QT6/lib/cmake/Qt6" \
|
||||
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)" \
|
||||
-DBOTAN_ROOT_DIR="$(brew --prefix botan@2)" \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON -DRS_SERVICE_TERMINAL_WEBUI_PASSWORD=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=OFF -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON \
|
||||
-DCMAKE_C_FLAGS="$IFLAGS" -DCMAKE_CXX_FLAGS="$IFLAGS" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$LFLAGS" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="$LFLAGS" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="$LFLAGS"
|
||||
cmake --build Build-cmake -j$(sysctl -n hw.ncpu)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Windows (MSYS2 — UCRT64 shell)
|
||||
|
||||
> The build commands use `-j$(nproc)` (all cores; `nproc` is available in MSYS2).
|
||||
> MinGW C++ compilation is RAM-hungry (RNP/rapidjson can use ~1.5 GB per job), so
|
||||
> on a low-memory machine lower it manually, e.g. `-j4` — that's why it used to be
|
||||
> hard-capped at `-j3`.
|
||||
|
||||
> **`RS_USE_NATIVE_DIALOGS=ON`** — Qt's own (non-native) file/directory dialogs
|
||||
> hang on Windows. Using the OS native dialogs (`RS_USE_NATIVE_DIALOGS=ON`)
|
||||
> avoids the problem. On Linux/macOS the default `OFF` works fine.
|
||||
|
||||
Dependencies — common + **Qt5** (use the UCRT64 doxygen, not the base MSYS one —
|
||||
it mishandles `D:/` paths):
|
||||
```bash
|
||||
pacman -S --needed base-devel git perl ruby \
|
||||
mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja \
|
||||
mingw-w64-ucrt-x86_64-doxygen mingw-w64-ucrt-x86_64-python \
|
||||
mingw-w64-ucrt-x86_64-qt5-base mingw-w64-ucrt-x86_64-qt5-multimedia \
|
||||
mingw-w64-ucrt-x86_64-qt5-svg mingw-w64-ucrt-x86_64-qt5-tools \
|
||||
mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-libbotan mingw-w64-ucrt-x86_64-sqlcipher \
|
||||
mingw-w64-ucrt-x86_64-miniupnpc mingw-w64-ucrt-x86_64-json-c mingw-w64-ucrt-x86_64-rapidjson \
|
||||
mingw-w64-ucrt-x86_64-asio mingw-w64-ucrt-x86_64-libxml2 mingw-w64-ucrt-x86_64-libxslt \
|
||||
mingw-w64-ucrt-x86_64-speex mingw-w64-ucrt-x86_64-speexdsp mingw-w64-ucrt-x86_64-ffmpeg \
|
||||
mingw-w64-ucrt-x86_64-bzip2 mingw-w64-ucrt-x86_64-zlib
|
||||
```
|
||||
Dependencies — **Qt6** (self-contained; only the `qt*` packages differ from the
|
||||
Qt5 list above):
|
||||
```bash
|
||||
pacman -S --needed base-devel git perl ruby \
|
||||
mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja \
|
||||
mingw-w64-ucrt-x86_64-doxygen mingw-w64-ucrt-x86_64-python \
|
||||
mingw-w64-ucrt-x86_64-qt6-base mingw-w64-ucrt-x86_64-qt6-multimedia \
|
||||
mingw-w64-ucrt-x86_64-qt6-svg mingw-w64-ucrt-x86_64-qt6-5compat mingw-w64-ucrt-x86_64-qt6-tools \
|
||||
mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-libbotan mingw-w64-ucrt-x86_64-sqlcipher \
|
||||
mingw-w64-ucrt-x86_64-miniupnpc mingw-w64-ucrt-x86_64-json-c mingw-w64-ucrt-x86_64-rapidjson \
|
||||
mingw-w64-ucrt-x86_64-asio mingw-w64-ucrt-x86_64-libxml2 mingw-w64-ucrt-x86_64-libxslt \
|
||||
mingw-w64-ucrt-x86_64-speex mingw-w64-ucrt-x86_64-speexdsp mingw-w64-ucrt-x86_64-ffmpeg \
|
||||
mingw-w64-ucrt-x86_64-bzip2 mingw-w64-ucrt-x86_64-zlib
|
||||
```
|
||||
|
||||
Build — **Qt5** (the `-include` / `-Wno-template-body` flags are only needed for
|
||||
GCC >= 16 — RNP/rapidjson; harmless on older GCC):
|
||||
```bash
|
||||
rm -rf Build-cmake
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DRS_LIBRETROSHARE_STATIC=OFF -DRS_LIBRETROSHARE_SHARED=ON \
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON \
|
||||
-DRS_USE_NATIVE_DIALOGS=ON \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON -DRS_SERVICE_TERMINAL_WEBUI_PASSWORD=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=ON -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON \
|
||||
-DCMAKE_C_FLAGS="-include string.h -include stdint.h" \
|
||||
-DCMAKE_CXX_FLAGS="-include cstring -include cstdint -Wno-template-body"
|
||||
cmake --build Build-cmake -j$(nproc)
|
||||
```
|
||||
|
||||
Build — **Qt6** (auto-selected once the qt6 packages are installed; plugins OFF):
|
||||
```bash
|
||||
rm -rf Build-cmake
|
||||
cmake -G Ninja -B Build-cmake -S . \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DRS_LIBRETROSHARE_STATIC=OFF -DRS_LIBRETROSHARE_SHARED=ON \
|
||||
-DRS_USE_NATIVE_DIALOGS=ON \
|
||||
-DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=ON -DRS_SERVICE_TERMINAL_WEBUI_PASSWORD=ON \
|
||||
-DRS_GUI=ON -DRS_SERVICE=ON -DRS_FRIENDSERVER=ON -DRS_PLUGINS=OFF -DRS_FORUM_DEEP_INDEX=OFF \
|
||||
-DRS_USE_I2P_SAM3=ON -DRS_BITDHT=ON -DRS_MINIUPNPC=ON \
|
||||
-DRS_BRODCAST_DISCOVERY=ON -DRS_SQLCIPHER=ON \
|
||||
-DCMAKE_C_FLAGS="-include string.h -include stdint.h" \
|
||||
-DCMAKE_CXX_FLAGS="-include cstring -include cstdint -Wno-template-body"
|
||||
cmake --build Build-cmake -j$(nproc)
|
||||
```
|
||||
|
||||
### Packaging & Deployment (Portable & Setup Installer)
|
||||
|
||||
Once the CMake build finishes successfully, you can bundle RetroShare and all its DLL dependencies into a standalone portable folder, a compressed archive, and a Windows Setup Installer.
|
||||
|
||||
To do this, run the deployment script from the project root:
|
||||
|
||||
```bash
|
||||
./build_scripts/Windows-msys2/deploy-windows.sh
|
||||
```
|
||||
|
||||
By default, the script looks for your build files in `Build-cmake/`. You can override this by setting the `BUILD_DIR` environment variable:
|
||||
|
||||
```bash
|
||||
BUILD_DIR=MyCustomBuildDir ./build_scripts/Windows-msys2/deploy-windows.sh
|
||||
```
|
||||
|
||||
#### Portable Archives (7z / ZIP)
|
||||
- The script automatically gathers all DLLs (Qt libraries, compiler runtime, and third-party dependencies) and places them alongside the executables.
|
||||
- It then compresses the folder into a portable package.
|
||||
- If `p7zip` is installed, it will compress using **7-Zip** for high compression ratios. Otherwise, it falls back to standard **ZIP**.
|
||||
- To install 7-Zip in MSYS2:
|
||||
```bash
|
||||
pacman -S --needed p7zip
|
||||
```
|
||||
|
||||
#### Setup Installer (NSIS)
|
||||
- If `makensis` is found, the script will automatically compile a self-extracting Windows installer (`-setup.exe`) using Nullsoft Scriptable Install System (NSIS).
|
||||
- To enable this, you must install the NSIS package for your active shell environment:
|
||||
- **UCRT64 shell**:
|
||||
```bash
|
||||
pacman -S --needed mingw-w64-ucrt-x86_64-nsis
|
||||
```
|
||||
- **MinGW64 shell**:
|
||||
```bash
|
||||
pacman -S --needed mingw-w64-x86_64-nsis
|
||||
```
|
||||
|
||||
109
CMakeLists.txt
Normal file
109
CMakeLists.txt
Normal file
@ -0,0 +1,109 @@
|
||||
# CMakeLists.txt for the RetroShare super-project (root aggregate build)
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
cmake_minimum_required(VERSION 3.5.0)
|
||||
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
|
||||
project(retroshare-superproject)
|
||||
|
||||
# Default to Release build type if not specified
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
|
||||
endif()
|
||||
# Force C++17 globally for all targets (including plugins)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if(APPLE)
|
||||
# On macOS, allow undefined symbols in shared modules/libraries at link time
|
||||
# because they will be resolved at runtime by the host executable (retroshare-gui)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -undefined dynamic_lookup")
|
||||
endif()
|
||||
|
||||
# Global setting to allow executables to export symbols for plugin/module linking
|
||||
set(CMAKE_ENABLE_EXPORTS ON)
|
||||
|
||||
# Configuration Options
|
||||
option(RS_GUI "Build RetroShare GUI" ON)
|
||||
option(RS_SERVICE "Build RetroShare Service" ON)
|
||||
option(RS_FRIENDSERVER "Build RetroShare Friendserver" ON)
|
||||
option(RS_PLUGINS "Build RetroShare Plugins" OFF)
|
||||
option(RS_USE_I2P_SAM3 "Enable I2P SAMv3 support" ON)
|
||||
|
||||
# The "sam3" target is defined once here, at the top level, because it is linked
|
||||
# by more than one subproject: libretroshare AND retroshare-gui (which uses libsam3
|
||||
# directly in gui/settings/ServerPage.cpp). Defining it once avoids a duplicate
|
||||
# target definition when the whole tree is configured together. If libretroshare is
|
||||
# reworked to export sam3 as a target, this top-level definition could be dropped.
|
||||
if(RS_USE_I2P_SAM3)
|
||||
add_definitions(-DRS_USE_I2P_SAM3 -DRS_USE_I2P_SAM3_LIBSAM3)
|
||||
|
||||
set(SAM3_DEVEL_DIR "${CMAKE_SOURCE_DIR}/supportlibs/libsam3")
|
||||
if(EXISTS "${SAM3_DEVEL_DIR}")
|
||||
message(STATUS "libsam3 found at ${SAM3_DEVEL_DIR}, defining target sam3 globally")
|
||||
add_library(sam3 STATIC
|
||||
"${SAM3_DEVEL_DIR}/src/libsam3/libsam3.c"
|
||||
"${SAM3_DEVEL_DIR}/src/libsam3a/libsam3a.c"
|
||||
)
|
||||
target_include_directories(sam3 PUBLIC
|
||||
"${SAM3_DEVEL_DIR}/src/libsam3"
|
||||
"${SAM3_DEVEL_DIR}/src/libsam3a"
|
||||
)
|
||||
if(WIN32)
|
||||
target_link_libraries(sam3 PUBLIC ws2_32)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# NOTE: Windows-specific workarounds that used to live here as global
|
||||
# add_definitions()/add_compile_options() have been moved to the specific targets
|
||||
# that need them (see the per-target block after the add_subdirectory() calls
|
||||
# below), so they no longer leak into every target in the tree.
|
||||
|
||||
# 1. First add the core library (libretroshare)
|
||||
add_subdirectory(libretroshare)
|
||||
|
||||
# 2. Then add the dependent executables
|
||||
if(RS_GUI)
|
||||
add_subdirectory(retroshare-gui)
|
||||
if(RS_PLUGINS)
|
||||
add_subdirectory(plugins)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(RS_SERVICE)
|
||||
add_subdirectory(retroshare-service)
|
||||
endif()
|
||||
|
||||
if(RS_FRIENDSERVER)
|
||||
add_subdirectory(retroshare-friendserver)
|
||||
endif()
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Per-target Windows fixups (applied to the specific targets that need them,
|
||||
# rather than globally, per review feedback). These run after the subdirectories
|
||||
# so the targets already exist.
|
||||
# ---------------------------------------------------------------------------
|
||||
if(WIN32)
|
||||
# libbitdht needs the wide-char Windows API (e.g. MoveFileExW). libretroshare
|
||||
# already sets UNICODE/_UNICODE PUBLIC for itself and its consumers, but
|
||||
# libbitdht is a dependency (not a consumer) so it needs its own definition.
|
||||
if(TARGET bitdht)
|
||||
target_compile_definitions(bitdht PRIVATE UNICODE _UNICODE)
|
||||
endif()
|
||||
|
||||
# Legacy C submodules trip strict GCC >= 15 diagnostics that are now errors by
|
||||
# default; downgrade them to warnings only for those targets. Add other legacy
|
||||
# targets here if a future toolchain flags them.
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
foreach(legacy_target sam3 bitdht miniupnpc udp-discovery)
|
||||
if(TARGET ${legacy_target})
|
||||
target_compile_options(${legacy_target} PRIVATE
|
||||
-Wno-error=incompatible-pointer-types
|
||||
-Wno-error=int-conversion
|
||||
-Wno-error=implicit-function-declaration )
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
@ -1,67 +0,0 @@
|
||||
// SPDX-FileCopyrightText: Retroshare Team <contact@retroshare.cc>
|
||||
// SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
|
||||
= RetroShare
|
||||
|
||||
RetroShare is a decentralized, private, secure, cross-platform, communication
|
||||
toolkit.
|
||||
RetroShare provides file sharing, chat, messages, forums, channels and more.
|
||||
|
||||
.Build Status
|
||||
|===============================================================================
|
||||
|GNU/Linux (via Gitlab CI) | image:https://gitlab.com/RetroShare/RetroShare/badges/master/pipeline.svg[link="https://gitlab.com/RetroShare/RetroShare/-/commits/master",title="pipeline status"]
|
||||
|Windows (via AppVeyor) | image:https://ci.appveyor.com/api/projects/status/github/RetroShare/RetroShare?svg=true[link="https://ci.appveyor.com/project/RetroShare58622/retroshare"]
|
||||
|macOS, (via Travis CI) | image:https://app.travis-ci.com/RetroShare/RetroShare.svg?branch=master[link="https://app.travis-ci.com/github/RetroShare/RetroShare"]
|
||||
|libretroshare GNU/Linux, Android (via Gitlab CI) | image:https://gitlab.com/RetroShare/libretroshare/badges/master/pipeline.svg[link="https://gitlab.com/RetroShare/libretroshare/-/commits/master",title="pipeline status"]
|
||||
|===============================================================================
|
||||
|
||||
== Get the source
|
||||
|
||||
Clone this repository, enter the directory and then get the submodules with the
|
||||
following command
|
||||
|
||||
[source,bash]
|
||||
--------
|
||||
git submodule update --init --remote --force libbitdht/ libretroshare/ openpgpsdk/
|
||||
--------
|
||||
|
||||
|
||||
== Compilation
|
||||
|
||||
Short of comprehensive and updated documentation on how to build RetroShare
|
||||
(for the many supported platforms it runs on), scripts and recipes are provided
|
||||
in the aim of creating packages for the supported platforms (and more)
|
||||
in the `build_scripts` directory of this repository.
|
||||
|
||||
Those packaging receipts together with the continuous integration files
|
||||
`.travis.yml` and `appveyor.yml` are a good source of knowledge on how to
|
||||
compile RetroShare on different platforms.
|
||||
|
||||
|
||||
== Using RetroShare on a headless computer with web UI
|
||||
|
||||
WARNING: This section is outdated need to be adapted to the new web UI
|
||||
|
||||
The web UI needs to be enabled as a parameter option to the retroshare-service:
|
||||
|
||||
[source,bash]
|
||||
--------
|
||||
./retroshare-nogui --webinterface 9090 --docroot /usr/share/retroshare/webui/
|
||||
--------
|
||||
|
||||
The web UI is only accessible on localhost:9090. It is advised to keep it that way so that your RS
|
||||
cannot be controlled using an untrusted connection.
|
||||
|
||||
To access your web UI from a distance, just open a SSH tunnel to it:
|
||||
|
||||
[source,bash]
|
||||
--------
|
||||
distant_machine:~/ > ssh rs_host -L 9090:localhost:9090 -N
|
||||
--------
|
||||
|
||||
"rs_host" is the machine running `retroshare-nogui`. Then on the distant machine, access your web UI on
|
||||
|
||||
|
||||
http://localhost:9090
|
||||
|
||||
(This can also be done from the RetroShare GUI.)
|
||||
55
README.md
Normal file
55
README.md
Normal file
@ -0,0 +1,55 @@
|
||||
## RetroShare
|
||||
|
||||
RetroShare is a decentralized, private, secure, cross-platform, communication
|
||||
toolkit.
|
||||
RetroShare provides file sharing, chat, messages, forums, channels, boards and more.
|
||||
|
||||
[](https://github.com/retroshare/retroshare/releases/latest)
|
||||
[](https://github.com/retroshare/retroshare/releases/latest)
|
||||
[](https://github.com/RetroShare/RetroShare/actions/workflows/ci-mingw64.yml)
|
||||
[](https://github.com/RetroShare/RetroShare/actions/workflows/ci-ucrt64.yml)
|
||||
[](https://github.com/RetroShare/RetroShare/actions/workflows/ci-mingw64-Qt6.yml)
|
||||
[](https://gitlab.com/RetroShare/RetroShare/-/commits/master)
|
||||
[](https://gitlab.com/RetroShare/libretroshare/-/commits/master)
|
||||
[](https://deepwiki.com/RetroShare/RetroShare)
|
||||
|
||||
## Get the source
|
||||
|
||||
Clone this repository, enter the directory and then get the submodules with the
|
||||
following command
|
||||
|
||||
git submodule update --init --remote --force libbitdht/ libretroshare/ openpgpsdk/
|
||||
|
||||
|
||||
|
||||
## Compilation
|
||||
|
||||
Short of comprehensive and updated documentation on how to build RetroShare
|
||||
(for the many supported platforms it runs on), scripts and recipes are provided
|
||||
in the aim of creating packages for the supported platforms (and more)
|
||||
in the [build_scripts](https://github.com/RetroShare/RetroShare/tree/master/build_scripts) directory of this repository.
|
||||
|
||||
## Compilation on Windows
|
||||
Follow this file : [WindowsMSys2_InstallGuide](https://github.com/RetroShare/RetroShare/blob/master/build_scripts/Windows-msys2/WindowsMSys2_InstallGuide.md)
|
||||
|
||||
With QtCreator : [Windows-QtCreator-InstallGuide](https://github.com/RetroShare/RetroShare/blob/master/build_scripts/Windows/Windows-QtCreator-InstallGuide.md)
|
||||
|
||||
## Compilation on MacOSX
|
||||
|
||||
Follow this file : [MacOS_X_InstallGuide](https://github.com/RetroShare/RetroShare/blob/master/build_scripts/OSX/MacOS_X_InstallGuide.md)
|
||||
|
||||
## Compilation on Linux
|
||||
|
||||
Follow this file : [Linux_InstallGuide](https://github.com/RetroShare/RetroShare/blob/master/build_scripts/Debian+Ubuntu/Linux_InstallGuide.md)
|
||||
|
||||
## Releases
|
||||
|
||||
Latest release [here](https://github.com/RetroShare/RetroShare/releases)
|
||||
|
||||
Other Builds [RetroShare Downloads](https://retroshare.cc/downloads.html)
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
- [RetroShare Docs](https://retrosharedocs.readthedocs.io/en/latest/)
|
||||
|
||||
@ -25,9 +25,6 @@ CONFIG += c++14
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS += openpgpsdk
|
||||
openpgpsdk.file = openpgpsdk/src/openpgpsdk.pro
|
||||
|
||||
rs_jsonapi:isEmpty(JSONAPI_GENERATOR_EXE) {
|
||||
SUBDIRS += jsonapi-generator
|
||||
jsonapi-generator.file = jsonapi-generator/src/jsonapi-generator.pro
|
||||
@ -36,7 +33,7 @@ rs_jsonapi:isEmpty(JSONAPI_GENERATOR_EXE) {
|
||||
|
||||
SUBDIRS += libbitdht
|
||||
libbitdht.file = libbitdht/src/libbitdht.pro
|
||||
libretroshare.depends += openpgpsdk libbitdht
|
||||
libretroshare.depends += libbitdht
|
||||
|
||||
SUBDIRS += libretroshare
|
||||
libretroshare.file = libretroshare/src/libretroshare.pro
|
||||
|
||||
312
appveyor.yml
312
appveyor.yml
@ -1,312 +0,0 @@
|
||||
# SPDX-FileCopyrightText: (C) 2004-2019 Retroshare Team <contact@retroshare.cc>
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
# Notes:
|
||||
# - Minimal appveyor.yml file is an empty file. All sections are optional.
|
||||
# - Indent each level of configuration with 2 spaces. Do not use tabs!
|
||||
# - All section names are case-sensitive.
|
||||
# - Section names should be unique on each level.
|
||||
# from example:
|
||||
# https://github.com/Phonations/Joker/blob/master/appveyor.yml
|
||||
# https://github.com/unicorn-engine/autobuild/blob/master/.appveyor.yml
|
||||
|
||||
#---------------------------------#
|
||||
# general configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# version format
|
||||
version: RetroShare-git-{branch}-{build}
|
||||
image: Visual Studio 2019
|
||||
|
||||
# you can use {branch} name in version format too
|
||||
# version: 1.0.{build}-{branch}
|
||||
|
||||
# branches to build
|
||||
branches:
|
||||
# whitelist
|
||||
#only:
|
||||
# - master
|
||||
|
||||
# blacklist
|
||||
except:
|
||||
- /^skipthisbranch$/
|
||||
|
||||
# Do not build on tags (GitHub only)
|
||||
skip_tags: true
|
||||
|
||||
# Skipping commits with particular message or from user
|
||||
skip_commits:
|
||||
message: /Created.*\.(png|jpg|jpeg|bmp|gif)/ # Regex for matching commit message
|
||||
#author: Anonymous # Commit author's username, name, email or regexp maching one of these.
|
||||
|
||||
#---------------------------------#
|
||||
# environment configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# Operating system (build VM template)
|
||||
#os: Windows Server 2012
|
||||
|
||||
# scripts that are called at very beginning, before repo cloning
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
#To get RDP while compiling
|
||||
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
on_finish:
|
||||
#To get RDP running after compiling
|
||||
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
# clone directory
|
||||
clone_folder: C:\projects\RetroShare
|
||||
|
||||
# fetch repository as zip archive
|
||||
#shallow_clone: true # default is "false"
|
||||
|
||||
# set clone depth
|
||||
clone_depth: 2000 # clone entire repository history if not defined
|
||||
|
||||
environment:
|
||||
global:
|
||||
## Qt: https://www.appveyor.com/docs/installed-software#qt
|
||||
# QTDIR: C:\Qt\5.10.1\mingw53_32
|
||||
MSYS2_ARCH: i686
|
||||
TARGET: i686_32-pc-msys
|
||||
MINGW_PREFIX: C:\msys64\mingw32
|
||||
RS_DEPLOY: RetroShare_deploy
|
||||
|
||||
|
||||
# build cache to preserve files/folders between builds
|
||||
#cache:
|
||||
# Disabled because it's bigger then supported by appveyor free plan
|
||||
# - C:\msys64\var\cache\pacman\pkg
|
||||
|
||||
# scripts that run after cloning repository
|
||||
#install:
|
||||
# # by default, all script lines are interpreted as batch
|
||||
# - echo This is batch
|
||||
# # to run script as a PowerShell command prepend it with ps:
|
||||
# - ps: Write-Host 'This is PowerShell'
|
||||
# # batch commands start from cmd:
|
||||
# - cmd: echo This is batch again
|
||||
# - cmd: set MY_VAR=12345
|
||||
install:
|
||||
# We cannot get OBS submodule as it use illegal folder name for windows.
|
||||
#- git submodule update --init
|
||||
# Configuring MSys2
|
||||
- set PATH=C:\msys64\usr\bin;%PATH%
|
||||
- set PATH=C:\msys64\mingw32\bin;%PATH%
|
||||
- >
|
||||
pacman --noconfirm -Sy
|
||||
mingw-w64-i686-qt5 mingw-w64-i686-miniupnpc mingw-w64-i686-rapidjson
|
||||
mingw-w64-i686-sqlcipher mingw-w64-i686-xapian-core mingw-w64-i686-cmark
|
||||
#- set PATH=C:\msys64\mingw32\qt5-static\bin\;%PATH%
|
||||
|
||||
# Configuring Qt
|
||||
# - set PATH=%QTDIR%\bin;C:\Qt\Tools\mingw491_32\bin;%PATH%
|
||||
|
||||
# Hack for new MSys2
|
||||
- copy C:\msys64\mingw32\i686-w64-mingw32\bin\ar.exe C:\msys64\mingw32\bin\i686-w64-mingw32-ar.exe
|
||||
- copy C:\msys64\mingw32\i686-w64-mingw32\bin\ranlib.exe C:\msys64\mingw32\bin\i686-w64-mingw32-ranlib.exe
|
||||
- copy C:\msys64\mingw32\bin\windres.exe C:\msys64\mingw32\bin\i686-w64-mingw32-windres.exe
|
||||
- copy C:\msys64\mingw64\x86_64-w64-mingw32\bin\ar.exe C:\msys64\mingw64\bin\x86_64-w64-mingw32-ar.exe
|
||||
- copy C:\msys64\mingw64\x86_64-w64-mingw32\bin\ranlib.exe C:\msys64\mingw64\bin\x86_64-w64-mingw32-ranlib.exe
|
||||
- copy C:\msys64\mingw64\bin\windres.exe C:\msys64\mingw64\bin\x86_64-w64-mingw32-windres.exe
|
||||
|
||||
# Work-around linker looking for Qt dll in wrong place
|
||||
- copy C:\msys64\mingw32\bin\Qt5PrintSupport.dll C:\msys64\mingw32\lib\Qt5PrintSupport.dll
|
||||
- copy C:\msys64\mingw32\bin\Qt5Widgets.dll C:\msys64\mingw32\lib\Qt5Widgets.dll
|
||||
- copy C:\msys64\mingw32\bin\Qt5Multimedia.dll C:\msys64\mingw32\lib\Qt5Multimedia.dll
|
||||
- copy C:\msys64\mingw32\bin\Qt5Gui.dll C:\msys64\mingw32\lib\Qt5Gui.dll
|
||||
- copy C:\msys64\mingw32\bin\Qt5Network.dll C:\msys64\mingw32\lib\Qt5Network.dll
|
||||
- copy C:\msys64\mingw32\bin\Qt5Xml.dll C:\msys64\mingw32\lib\Qt5Xml.dll
|
||||
- copy C:\msys64\mingw32\bin\Qt5Core.dll C:\msys64\mingw32\lib\Qt5Core.dll
|
||||
|
||||
|
||||
#---------------------------------#
|
||||
# build configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
|
||||
platform: x86
|
||||
|
||||
# to add several platforms to build matrix:
|
||||
#platform:
|
||||
# - x86
|
||||
# - Any CPU
|
||||
|
||||
# build Configuration, i.e. Debug, Release, etc.
|
||||
configuration: Release
|
||||
|
||||
# to add several configurations to build matrix:
|
||||
#configuration:
|
||||
# - Debug
|
||||
# - Release
|
||||
|
||||
# scripts to run before build
|
||||
before_build:
|
||||
- cd C:\projects\RetroShare
|
||||
- git submodule update --init
|
||||
- cd C:\projects\
|
||||
- mkdir RetroShare-build
|
||||
- cd RetroShare-build
|
||||
# - find C:\ > filelist.txt
|
||||
|
||||
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
|
||||
before_package:
|
||||
|
||||
# to run your custom scripts instead of automatic MSBuild
|
||||
build_script:
|
||||
- env
|
||||
- qmake ../RetroShare -spec win32-g++ "CONFIG+=debug"
|
||||
- mingw32-make -j3
|
||||
|
||||
# scripts to run after build
|
||||
after_build:
|
||||
- find .
|
||||
|
||||
- mkdir %RS_DEPLOY%
|
||||
- copy retroshare-gui\src\debug\retroshare.exe %RS_DEPLOY%\
|
||||
- copy retroshare-service\src\debug\retroshare-service.exe %RS_DEPLOY%\
|
||||
# - copy retroshare-service\src\retroshare-service.exe %RS_DEPLOY%\
|
||||
# - copy retroshare-gui\src\retroshare.exe %RS_DEPLOY%\
|
||||
|
||||
## In Debug build winedeplyqt forget the non debug Qt libs
|
||||
- copy C:\msys64\mingw32\bin\Qt5Svg.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\Qt5Core.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\Qt5Multimedia.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\Qt5Widgets.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\Qt5Xml.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\Qt5PrintSupport.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\Qt5Gui.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\Qt5Network.dll %RS_DEPLOY%\
|
||||
|
||||
- mkdir %RS_DEPLOY%\playlistformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\playlistformats\qtmultimedia_m3u.dll %RS_DEPLOY%\playlistformats
|
||||
|
||||
- mkdir %RS_DEPLOY%\printsupport\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\printsupport\windowsprintersupport.dll %RS_DEPLOY%\printsupport\
|
||||
|
||||
- mkdir %RS_DEPLOY%\iconengines\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\iconengines\qsvgicon.dll %RS_DEPLOY%\iconengines\
|
||||
|
||||
- mkdir %RS_DEPLOY%\bearer\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\bearer\qgenericbearer.dll %RS_DEPLOY%\bearer\
|
||||
|
||||
- mkdir %RS_DEPLOY%\mediaservice\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\mediaservice\qtmedia_audioengine.dll %RS_DEPLOY%\mediaservice\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\mediaservice\dsengine.dll %RS_DEPLOY%\mediaservice\
|
||||
|
||||
- mkdir %RS_DEPLOY%\styles\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\styles\qwindowsvistastyle.dll %RS_DEPLOY%\styles\
|
||||
|
||||
- mkdir %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qwebp.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qicns.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qjpeg.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qtiff.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qtga.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qjp2.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qico.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qwbmp.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qicns.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qgif.dll %RS_DEPLOY%\imageformats\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\imageformats\qsvg.dll %RS_DEPLOY%\imageformats\
|
||||
|
||||
- mkdir %RS_DEPLOY%\platforms\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\platforms\qwindows.dll %RS_DEPLOY%\platforms\
|
||||
|
||||
- mkdir %RS_DEPLOY%\audio\
|
||||
- copy C:\msys64\mingw32\share\qt5\plugins\audio\qtaudio_windows.dll %RS_DEPLOY%\audio\
|
||||
|
||||
- windeployqt %RS_DEPLOY%\retroshare.exe
|
||||
|
||||
- copy C:\msys64\mingw32\bin\libbz2*.dll %RS_DEPLOY%\
|
||||
#- copy C:\msys64\mingw32\bin\libeay32.dll %RS_DEPLOY%\
|
||||
- copy C:\OpenSSL-Win32\libeay32.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libminiupnpc.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libsqlcipher*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libsqlite3*.dll %RS_DEPLOY%\
|
||||
#- copy C:\msys64\mingw32\bin\ssleay32.dll %RS_DEPLOY%\
|
||||
- copy C:\OpenSSL-Win32\ssleay32.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\zlib*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libgcc_s_dw2*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libstdc*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libwinpthread*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libicu*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libpcre*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libharfbuzz*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libpng*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libfreetype*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libglib*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libgraphite2.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libintl*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libiconv*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libjasper*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libjpeg*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libtiff*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libwebp*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libwebpdemux*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\liblzma*.dll %RS_DEPLOY%\
|
||||
|
||||
## Needed for cmark
|
||||
- copy C:\msys64\mingw32\bin\libcmark*.dll %RS_DEPLOY%\
|
||||
- copy C:\msys64\mingw32\bin\libdouble-conversion*.dll %RS_DEPLOY%\
|
||||
|
||||
# to disable automatic builds
|
||||
#build: off
|
||||
|
||||
#---------------------------------#
|
||||
# artifacts configuration #
|
||||
#---------------------------------#
|
||||
|
||||
artifacts:
|
||||
- path: '**\*.exe'
|
||||
- path: filelist.txt
|
||||
- path: $(RS_DEPLOY)
|
||||
|
||||
#
|
||||
# # pushing a single file
|
||||
# - path: test.zip
|
||||
#
|
||||
# # pushing a single file with environment variable in path and "Deployment name" specified
|
||||
# - path: MyProject\bin\$(configuration)
|
||||
# name: myapp
|
||||
#
|
||||
# # pushing entire folder as a zip archive
|
||||
# - path: logs
|
||||
|
||||
|
||||
#---------------------------------#
|
||||
# deployment configuration #
|
||||
#---------------------------------#
|
||||
#No deployment under unknown computer!!!
|
||||
|
||||
#---------------------------------#
|
||||
# global handlers #
|
||||
#---------------------------------#
|
||||
|
||||
# on successful build
|
||||
#on_success:
|
||||
# - do something
|
||||
|
||||
# on build failure
|
||||
#on_failure:
|
||||
# - do something
|
||||
|
||||
# after build failure or success
|
||||
#on_finish:
|
||||
# - do something
|
||||
|
||||
|
||||
#---------------------------------#
|
||||
# notifications #
|
||||
#---------------------------------#
|
||||
|
||||
notifications:
|
||||
|
||||
# Email
|
||||
- provider: Email
|
||||
to:
|
||||
- retrosharephenom@gmail.com
|
||||
subject: 'Build {{status}}' # optional
|
||||
message: "{{message}}, {{commitId}}, ..." # optional
|
||||
on_build_status_changed: true
|
||||
170
build_scripts/Debian+Ubuntu/Linux_InstallGuide.md
Normal file
170
build_scripts/Debian+Ubuntu/Linux_InstallGuide.md
Normal file
@ -0,0 +1,170 @@
|
||||
|
||||
## Compilation on Linux
|
||||
|
||||
|
||||
### Install package dependencies:
|
||||
#### Debian / Ubuntu / Linux Mint
|
||||
```bash
|
||||
sudo apt-get install git g++ cmake libbz2-dev libjson-c-dev libssl-dev libsqlcipher-dev \
|
||||
libupnp-dev doxygen libxss-dev rapidjson-dev libbotan-2-dev libasio-dev
|
||||
```
|
||||
|
||||
To compile with Qt5:
|
||||
```bash
|
||||
sudo apt-get install qt5-qmake qtmultimedia5-dev libqt5x11extras5-dev
|
||||
```
|
||||
|
||||
To compile with Qt6:
|
||||
```bash
|
||||
sudo apt-get install qt6-base-dev qt6-multimedia-dev qt6-5compat-dev
|
||||
```
|
||||
|
||||
Additional dependencies for Feedreader plugin:
|
||||
```bash
|
||||
sudo apt-get install libxml2-dev libxslt1-dev libcurl4-openssl-dev
|
||||
```
|
||||
|
||||
Additional dependencies for Voip plugin:
|
||||
```bash
|
||||
sudo apt-get install libavcodec-dev libcurl4-openssl-dev \
|
||||
libqt5multimedia5-plugins libspeexdsp-dev
|
||||
```
|
||||
|
||||
Autologin:
|
||||
```bash
|
||||
sudo apt install libsecret-1-dev
|
||||
```
|
||||
|
||||
#### openSUSE
|
||||
```bash
|
||||
sudo zypper install git gcc-c++ cmake libqt5-qtbase-devel \
|
||||
libqt5-qtmultimedia-devel libqt5-qtx11extras-devel libbz2-devel \
|
||||
libopenssl-devel libupnp-devel libXss-devel sqlcipher-devel rapidjson-devel \
|
||||
json-c botan bzip2
|
||||
```
|
||||
|
||||
Additional packages to compile with Qt6:
|
||||
```bash
|
||||
sudo zypper install qt6-base-devel qt6-multimedia-devel qt6-qt5compat-devel
|
||||
```
|
||||
|
||||
Additional dependencies for plugins:
|
||||
```bash
|
||||
sudo zypper install ffmpeg-4-libavcodec-devel libcurl-devel libxml2-devel \
|
||||
libxslt-devel speex-devel speexdsp-devel
|
||||
```
|
||||
|
||||
#### Arch Linux / Manjaro / EndeavourOS
|
||||
```bash
|
||||
sudo pacman -S base-devel libgnome-keyring cmake qt5-tools qt5-multimedia qt5-x11extras \
|
||||
rapidjson doxygen libupnp libxslt libxss sqlcipher botan2 bzip2 json-c
|
||||
```
|
||||
|
||||
To compile with Qt6:
|
||||
```bash
|
||||
sudo pacman -S qt6-base qt6-multimedia qt6-5compat
|
||||
```
|
||||
|
||||
### Checkout the source code
|
||||
```bash
|
||||
cd ~
|
||||
git clone https://github.com/RetroShare/RetroShare.git retroshare
|
||||
```
|
||||
|
||||
### Checkout the submodules
|
||||
```bash
|
||||
cd retroshare
|
||||
git submodule update --init --remote libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/
|
||||
git submodule update --init --remote supportlibs/librnp supportlibs/restbed supportlibs/rapidjson
|
||||
```
|
||||
|
||||
### Compile
|
||||
```bash
|
||||
qmake CONFIG+=release CONFIG+=rs_jsonapi CONFIG+=rs_webui
|
||||
make
|
||||
```
|
||||
|
||||
The executable produced will be:
|
||||
```bash
|
||||
./retroshare-gui/src/retroshare
|
||||
```
|
||||
|
||||
### Install
|
||||
```bash
|
||||
sudo make install
|
||||
```
|
||||
|
||||
The executable produced will be:
|
||||
```bash
|
||||
~/usr/bin/RetroShare
|
||||
```
|
||||
|
||||
### For packagers
|
||||
|
||||
Packagers can use PREFIX and LIB\_DIR to customize the installation paths:
|
||||
```bash
|
||||
qmake PREFIX=/usr LIB_DIR=/usr/lib64 "CONFIG-=debug" "CONFIG+=release"
|
||||
make
|
||||
make INSTALL_ROOT=${PKGDIR} install
|
||||
```
|
||||
|
||||
|
||||
### libsqlcipher
|
||||
If libsqlcipher is not available as a package
|
||||
|
||||
You need to place sqlcipher so that the hierarchy is:
|
||||
|
||||
~Home
|
||||
|
|
||||
+--- retroshare
|
||||
|
|
||||
+--- lib
|
||||
|
|
||||
+---- sqlcipher
|
||||
```bash
|
||||
mkdir lib
|
||||
cd lib
|
||||
git clone https://github.com/sqlcipher/sqlcipher.git --depth=1 --branch v3.4.1
|
||||
cd sqlcipher
|
||||
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
|
||||
make
|
||||
cd ..
|
||||
```
|
||||
|
||||
### Build infos
|
||||
|
||||
Note: If you installed Qt6 you need to use `qmake6` on the command line.
|
||||
|
||||
For the `FeedReader` it is required to append the config option `CONFIG+=retroshare_plugins`.
|
||||
Make sure `plugins/plugins.pro` contains `FeedReader` in the list of plugins to compile.
|
||||
|
||||
Do not mix plugins compiled with Qt5 with those compiled with Qt6. They work only if they are compiled
|
||||
with the same Qt version as RetroShare.
|
||||
|
||||
Voip is outdated and is not compileable on the latest Debian.
|
||||
|
||||
For `Autologin` it is required to append the config option `CONFIG+=rs_autologin`.
|
||||
|
||||
|
||||
### Build options
|
||||
|
||||
* Mandatory
|
||||
* release or debug: normally you would like to use the release option
|
||||
* Extra features (optional)
|
||||
* rs_autologin: enable autologin
|
||||
* retroshare_plugins: build plugins
|
||||
* rs_webui: enable Web interface
|
||||
* rs_jsonapi: enable json api interface, required by rs_webui
|
||||
* gxsthewire: enable Wire service (experimental)
|
||||
* wikipoos: enable Wiki service
|
||||
* rs_use_native_dialogs: enable native dialogs (may cause crashes with some versions of Gtk)
|
||||
* rs_deep_channels_index: build with deep channel indexing support
|
||||
* rs_deep_files_index: build with deep file indexing support
|
||||
* "CONFIG+=..." enable other extra compile time features, you can find the almost complete list in file *<sourcefolder>\retroshare.pri*
|
||||
|
||||
### Examples:
|
||||
|
||||
```batch
|
||||
qmake CONFIG+=debug CONFIG+=release CONFIG+=rs_use_native_dialog CONFIG+=rs_gui_cmark
|
||||
qmake CONFIG+=rs_jsonapi CONFIG+=rs_webui CONFIG+=rs_autologin
|
||||
```
|
||||
@ -1,48 +0,0 @@
|
||||
ARG ANDROID_NDK_ARCH=arm
|
||||
FROM registry.gitlab.com/retroshare/retroshare:android_${ANDROID_NDK_ARCH}_base
|
||||
|
||||
ENV APT_UNAT="--assume-yes --quiet"
|
||||
|
||||
RUN apt-get update $APT_UNAT && apt-get upgrade $APT_UNAT --show-upgraded
|
||||
|
||||
ARG REPO_URL=https://gitlab.com/RetroShare/RetroShare.git
|
||||
ARG REPO_BRANCH=master
|
||||
|
||||
WORKDIR /RetroShare
|
||||
RUN git remote add testing $REPO_URL && \
|
||||
git fetch --tags testing $REPO_BRANCH && \
|
||||
git reset --hard testing/$REPO_BRANCH && \
|
||||
git --no-pager log --max-count 1
|
||||
|
||||
RUN rm -rf /jsonapi-generator-build ; mkdir /jsonapi-generator-build
|
||||
WORKDIR /jsonapi-generator-build/
|
||||
RUN qmake ../RetroShare/jsonapi-generator/src/ \
|
||||
CONFIG+=no_retroshare_plugins \
|
||||
CONFIG+=no_retroshare_service CONFIG+=no_retroshare_gui \
|
||||
CONFIG+=rs_jsonapi CONFIG+=no_rs_sam3_libsam3 && \
|
||||
make -j$(nproc)
|
||||
|
||||
RUN rm -rf /retroshare-service-android-build ; mkdir /retroshare-service-android-build
|
||||
WORKDIR /retroshare-service-android-build
|
||||
|
||||
# ARG declared before FROM get wiped after it, so we need declaring it again
|
||||
ARG ANDROID_NDK_ARCH=arm
|
||||
ARG RS_SERVICE_QMAKE_EXTRA_OPTS
|
||||
RUN $($PREPARE_TOOLCHAIN get_qt_dir | head -n 1)/bin/qmake ../RetroShare \
|
||||
-spec android-clang \
|
||||
CONFIG+=retroshare_service CONFIG+=rs_jsonapi \
|
||||
RS_UPNP_LIB=miniupnpc \
|
||||
JSONAPI_GENERATOR_EXE=/jsonapi-generator-build/jsonapi-generator \
|
||||
NATIVE_LIBS_TOOLCHAIN_PATH=$NATIVE_LIBS_TOOLCHAIN_PATH \
|
||||
CONFIG+=no_retroshare_gui CONFIG+=no_rs_service_webui_terminal_password \
|
||||
CONFIG+=no_rs_service_terminal_login \
|
||||
CONFIG+=no_rs_sam3 CONFIG+=no_rs_sam3_libsam3 \
|
||||
$RS_SERVICE_QMAKE_EXTRA_OPTS
|
||||
RUN make -j$(nproc)
|
||||
RUN make install INSTALL_ROOT=/retroshare-service-android-build/android-build/
|
||||
|
||||
ARG ANDROID_PLATFORM_VER=16
|
||||
RUN $($PREPARE_TOOLCHAIN get_qt_dir | head -n 1)/bin/androiddeployqt \
|
||||
--input retroshare-service/src/android-libretroshare-service.so-deployment-settings.json \
|
||||
--output android-build --android-platform android-$ANDROID_PLATFORM_VER \
|
||||
--jdk $JAVA_HOME --gradle
|
||||
@ -12,7 +12,7 @@
|
||||
## To run the container
|
||||
# docker run -it -p 127.0.0.1:9092:9092 "${CI_REGISTRY_IMAGE}" retroshare-service --jsonApiPort 9092 --jsonApiBindAddress 0.0.0.0
|
||||
|
||||
FROM ubuntu:22.04
|
||||
FROM ubuntu:26.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV APT_UNAT="--assume-yes --quiet"
|
||||
@ -26,7 +26,7 @@ RUN apt-get update $APT_UNAT && \
|
||||
libsqlite3-dev libsqlcipher-dev \
|
||||
pkg-config libz-dev \
|
||||
libxapian-dev doxygen rapidjson-dev \
|
||||
git cmake curl python3
|
||||
git cmake curl python3 libasio-dev libjson-c-dev libbotan-3-dev
|
||||
|
||||
## Avoid git cloning spuriously failing with
|
||||
# server certificate verification failed. CAfile: none CRLfile: none
|
||||
@ -40,18 +40,19 @@ RUN git clone --depth 1 https://github.com/aetilius/pHash.git && \
|
||||
rm -rf pHash-build pHash
|
||||
|
||||
ARG FRESHCLONE=0
|
||||
ARG REPO_URL=https://gitlab.com/RetroShare/RetroShare.git
|
||||
ARG REPO_URL=https://github.com/RetroShare/RetroShare.git
|
||||
ARG REPO_BRANCH=master
|
||||
ARG REPO_DEPTH="--depth 2000"
|
||||
RUN git clone $REPO_DEPTH $REPO_URL -b $REPO_BRANCH && cd RetroShare && \
|
||||
RUN git clone $REPO_DEPTH $REPO_URL -b $REPO_BRANCH && \
|
||||
cd RetroShare && \
|
||||
git fetch --tags && \
|
||||
git submodule update --init --remote --force \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ && \
|
||||
cd ..
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/ \
|
||||
supportlibs/restbed/
|
||||
|
||||
RUN \
|
||||
mkdir RetroShare-build && cd RetroShare-build && \
|
||||
cmake -B. -S../RetroShare/retroshare-service \
|
||||
-DRS_FORUM_DEEP_INDEX=ON -DRS_JSON_API=ON && \
|
||||
-DRS_FORUM_DEEP_INDEX=ON -DRS_JSON_API=ON -DRS_WEBUI=ON && \
|
||||
make -j$(nproc) && make install && \
|
||||
cd .. && rm -rf RetroShare-build
|
||||
|
||||
@ -1,9 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -n "$CI_MERGE_REQUEST_ID" ] &&
|
||||
echo \
|
||||
--build-arg REPO_URL="$CI_MERGE_REQUEST_SOURCE_PROJECT_URL" \
|
||||
--build-arg REPO_BRANCH="$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" ||
|
||||
echo \
|
||||
--build-arg REPO_URL="$CI_REPOSITORY_URL" \
|
||||
--build-arg REPO_BRANCH="$CI_COMMIT_BRANCH"
|
||||
# Emit --build-arg flags so gitlabCI.Dockerfile fetches the EXACT ref that
|
||||
# triggered the pipeline. REPO_REF can be a commit SHA (the CI default), a
|
||||
# branch name, or a tag. The remote URL is still chosen per-case so
|
||||
# MR-from-fork fetches from the fork.
|
||||
|
||||
if [ -n "$CI_MERGE_REQUEST_ID" ]; then
|
||||
REPO_URL="$CI_MERGE_REQUEST_SOURCE_PROJECT_URL"
|
||||
else
|
||||
REPO_URL="$CI_REPOSITORY_URL"
|
||||
fi
|
||||
|
||||
echo \
|
||||
--build-arg REPO_URL="$REPO_URL" \
|
||||
--build-arg REPO_REF="$CI_COMMIT_SHA"
|
||||
|
||||
@ -2,19 +2,21 @@ FROM registry.gitlab.com/retroshare/retroshare:base
|
||||
|
||||
RUN apt-get update -y && apt-get upgrade -y
|
||||
|
||||
ARG REPO_URL=https://gitlab.com/RetroShare/RetroShare.git
|
||||
ARG REPO_BRANCH=master
|
||||
ARG REPO_URL=https://github.com/RetroShare/RetroShare.git
|
||||
ARG REPO_REF=master
|
||||
RUN \
|
||||
cd RetroShare && git remote add testing $REPO_URL && \
|
||||
git fetch --tags testing $REPO_BRANCH && \
|
||||
git reset --hard testing/$REPO_BRANCH && \
|
||||
git submodule update --init --remote --force \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ && \
|
||||
git fetch --tags testing $REPO_REF && \
|
||||
git checkout --force FETCH_HEAD && \
|
||||
git submodule deinit -f --all && \
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/ \
|
||||
supportlibs/restbed/ && \
|
||||
git --no-pager log --max-count 1
|
||||
RUN \
|
||||
mkdir RetroShare-build && cd RetroShare-build && \
|
||||
cmake -B. -S../RetroShare/retroshare-service \
|
||||
-DRS_FORUM_DEEP_INDEX=ON -DRS_JSON_API=ON \
|
||||
-DRS_FORUM_DEEP_INDEX=ON -DRS_JSON_API=ON -DRS_WEBUI=ON \
|
||||
-DRS_WARN_DEPRECATED=OFF -DRS_WARN_LESS=ON && \
|
||||
make -j$(nproc) && make install && \
|
||||
cd .. && rm -rf RetroShare-build
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit df16cb915465d058c75277678799ce4dadeae287
|
||||
Subproject commit 042d1d5a9f65e51e1abafe527cab2f04d6fab29b
|
||||
@ -2,13 +2,15 @@
|
||||
|
||||
## Qt Installation
|
||||
|
||||
Install Qt via: [Qt Download](http://www.qt.io/download/)
|
||||
Qt 5.15 is not available as install package.
|
||||
|
||||
Use default options. And add Qt Script support.
|
||||
Download Qt 5.15.x from here: [Qt 5.15.17](https://download.qt.io/archive/qt/5.15/5.15.17/single/qt-everywhere-opensource-src-5.15.17.tar.xz)
|
||||
|
||||
Instruction howto Build Qt 5.15.x on macOS: [macOS Building](https://doc.qt.io/archives/qt-5.15/macos-building.html)
|
||||
## Set the Environment Variables
|
||||
Add to the PATH environment variable by editing your *~/.profile* file.
|
||||
|
||||
export PATH="/users/$USER/Qt/5.14.1/clang_64/bin:$PATH"
|
||||
export PATH="/users/$USER/Qt/5.15.17/clang_64/bin:$PATH"
|
||||
|
||||
Depends on which version of Qt you use.
|
||||
|
||||
@ -30,32 +32,20 @@ In GitHub Desktop -> Clone Repository -> URL
|
||||
|
||||
Add Repository URL: https://github.com/RetroShare/RetroShare.git and Clone
|
||||
|
||||
## ***Choose if you use MacPort or HomeBrew***
|
||||
## ***Get XCode & MacOSX SDK***
|
||||
|
||||
### MacPort Installation
|
||||
To identify the correct version of Xcode to install, you need to know which OS you are running. Go to the [x] menu -> "About This Mac" and read the macOS version number.
|
||||
|
||||
Install MacPort and XCode following this guide: [MacPort and XCode](http://guide.macports.org/#installing.xcode)
|
||||
If you are running macOS Ventura 13.5 or later, you can install Xcode directly from App Store using the instructions below.
|
||||
|
||||
Start XCode to get it updated and to able C compiler to create executables.
|
||||
You can find older versions of Xcode at [Apple Developer Downloads](https://developer.apple.com/downloads/). Find the appropriate .xip file for your macOS version
|
||||
|
||||
#### Install libraries
|
||||
To install from App Store:
|
||||
|
||||
$ sudo port -v selfupdate
|
||||
$ sudo port install openssl
|
||||
$ sudo port install miniupnpc
|
||||
$ sudo port install libmicrohttpd
|
||||
|
||||
For VOIP Plugin:
|
||||
Select [x] menu - > "App Store…".
|
||||
Search for Xcode. Download and install.
|
||||
|
||||
$ sudo port install speex-devel
|
||||
$ sudo port install opencv
|
||||
$ sudo port install ffmpeg
|
||||
|
||||
Get Your OSX SDK if missing: [MacOSX-SDKs](https://github.com/phracker/MacOSX-SDKs)
|
||||
|
||||
### HOMEBREW Installation
|
||||
|
||||
Install HomeBrew following this guide: [HomeBrew](http://brew.sh/)
|
||||
Once Xcode has installed, you must drag the XCode icon into your Applications folder. After you have done this, open Xcode from the Applications folder by double-clicking on the icon and then follow the remaining instructions below.
|
||||
|
||||
Install XCode command line developer tools:
|
||||
|
||||
@ -63,13 +53,33 @@ Install XCode command line developer tools:
|
||||
|
||||
Start XCode to get it updated and to able C compiler to create executables.
|
||||
|
||||
Older MacOSX SDK is available from here: [MacOSX-SDKs](https://github.com/phracker/MacOSX-SDKs)
|
||||
|
||||
### MacPort Installation
|
||||
|
||||
Install MacPort following this guide: [MacPort](http://guide.macports.org/#installing.xcode)
|
||||
|
||||
### HOMEBREW Installation
|
||||
|
||||
Install HomeBrew following this guide: [HomeBrew](http://brew.sh/)
|
||||
|
||||
#### Install libraries
|
||||
|
||||
$ brew install openssl
|
||||
$ brew install miniupnpc
|
||||
$ brew install libmicrohttpd
|
||||
$ brew install rapidjson
|
||||
$ brew install sqlcipher
|
||||
|
||||
For RNP lib:
|
||||
|
||||
$ brew install bzip2
|
||||
$ brew install zlib
|
||||
$ brew install json-c
|
||||
$ brew install botan@2
|
||||
|
||||
#### Install CMake
|
||||
|
||||
$ brew install cmake
|
||||
|
||||
If you have error in linking, run this:
|
||||
|
||||
@ -85,8 +95,7 @@ For VOIP Plugin:
|
||||
For FeedReader Plugin:
|
||||
|
||||
$ brew install libxslt
|
||||
|
||||
Get Your OSX SDK if missing: [MacOSX-SDKs](https://github.com/phracker/MacOSX-SDKs)
|
||||
$ brew install libxml2
|
||||
|
||||
## Last Settings
|
||||
|
||||
@ -104,11 +113,8 @@ In QtCreator Projects -> Build -> Build Settings -> Build Steps -> Add Additiona
|
||||
|
||||
## Set your Mac OS SDK version
|
||||
|
||||
Edit RetroShare.pro
|
||||
|
||||
CONFIG += c++14 rs_macos11.1
|
||||
|
||||
and then retroshare.pri
|
||||
Edit retroshare.pri and set your installed sdk version example for 11.1 -> rs_macos11.1 (line 135:)
|
||||
|
||||
macx:CONFIG *= rs_macos11.1
|
||||
rs_macos10.8:CONFIG -= rs_macos11.1
|
||||
@ -122,7 +128,7 @@ and then retroshare.pri
|
||||
|
||||
## Link Include & Libraries
|
||||
|
||||
Edit your retroshare.pri and add to macx-* section
|
||||
When required edit your retroshare.pri macx-* section, check if the Include and Lib path are correct (macx-* section)
|
||||
|
||||
INCLUDEPATH += "/usr/local/opt/openssl/include"
|
||||
QMAKE_LIBDIR += "/usr/local/opt/openssl/lib"
|
||||
@ -131,13 +137,21 @@ Edit your retroshare.pri and add to macx-* section
|
||||
|
||||
alternative via Terminal
|
||||
|
||||
$ qmake INCLUDEPATH+="/usr/local/opt/openssl/include" QMAKE_LIBDIR+="/usr/local/opt/openssl/lib" QMAKE_LIBDIR+="/usr/local/opt/sqlcipher/lib" QMAKE_LIBDIR+="/usr/local/opt/miniupnpc/lib"
|
||||
$ qmake
|
||||
INCLUDEPATH+="/usr/local/opt/openssl/include" \
|
||||
QMAKE_LIBDIR+="/usr/local/opt/openssl/lib" \
|
||||
QMAKE_LIBDIR+="/usr/local/opt/sqlcipher/lib" \
|
||||
QMAKE_LIBDIR+="/usr/local/opt/miniupnpc/lib" \
|
||||
CONFIG+=rs_autologin \
|
||||
CONFIG+=rs_use_native_dialogs \
|
||||
CONFIG+=release \
|
||||
..
|
||||
|
||||
For FeedReader Plugin:
|
||||
|
||||
INCLUDEPATH += "/usr/local/opt/libxml2/include/libxml2"
|
||||
|
||||
For building RetroShare with plugins:
|
||||
With plugins:
|
||||
|
||||
$ qmake \
|
||||
INCLUDEPATH+="/usr/local/opt/openssl/include" QMAKE_LIBDIR+="/usr/local/opt/openssl/lib" \
|
||||
@ -159,13 +173,30 @@ For building RetroShare with plugins:
|
||||
|
||||
You can now compile RetroShare into Qt Creator or with Terminal
|
||||
|
||||
cd retroshare
|
||||
qmake; make
|
||||
$ cd /path/to/retroshare
|
||||
$ qmake ..
|
||||
$ make
|
||||
|
||||
You can change Target and SDK in *./retroshare.pri:82* changing value of QMAKE_MACOSX_DEPLOYMENT_TARGET and QMAKE_MAC_SDK
|
||||
|
||||
You can find the compiled application at *./retroshare/retroshare-gui/src/retroshare.app*
|
||||
|
||||
## Issues
|
||||
|
||||
If you have issues with openssl (Undefined symbols for architecture x86_64) try to add to *~/.profile* file this or via Terminal
|
||||
|
||||
export PATH="/usr/local/opt/openssl/bin:$PATH"
|
||||
export LDFLAGS="-L/usr/local/opt/openssl/lib"
|
||||
export CPPFLAGS="-I/usr/local/opt/openssl/include"
|
||||
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
|
||||
|
||||
For Qt Creator -> QtCreator Projects -> Build -> Build Settings -> Build Steps -> Add Additional arguments:
|
||||
|
||||
LDFLAGS="-L/usr/local/opt/openssl/lib"
|
||||
CPPFLAGS="-I/usr/local/opt/openssl/include"
|
||||
|
||||
|
||||
|
||||
## Copy Plugins
|
||||
|
||||
$ cp \
|
||||
@ -173,3 +204,13 @@ You can find the compiled application at *./retroshare/retroshare-gui/src/retros
|
||||
./plugins/VOIP/lib/libVOIP.dylib \
|
||||
./plugins/RetroChess/lib/libRetroChess.dylib \
|
||||
./retroshare-gui/src/RetroShare.app/Contents/Resources/
|
||||
|
||||
### Compile Retroshare-Service & Webui with CMake
|
||||
before you can compile overwrite the file "asio/include/asio/detail/config.hpp" here is a fix for macos [
|
||||
asio fix](https://github.com/chriskohlhoff/asio/commit/68df16d560c68944809bb2947360fe8035e9ae0a)
|
||||
|
||||
$ cd retroshare-service
|
||||
$ mkdir build-dir
|
||||
$ cd build-dir
|
||||
$ cmake -DRS_WEBUI=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
$ make
|
||||
|
||||
224
build_scripts/OSX/deploy-macos.sh
Executable file
224
build_scripts/OSX/deploy-macos.sh
Executable file
@ -0,0 +1,224 @@
|
||||
#!/bin/bash
|
||||
# ==============================================================================
|
||||
# RetroShare macOS Portability & Deployment Packaging Script
|
||||
# Designed for macOS environment with CMake
|
||||
# ------------------------------------------------------------------------------
|
||||
# Why this is more than a one-liner: macdeployqt IS the standard tool and does the
|
||||
# heavy lifting (bundling Qt frameworks, fixing rpaths). The extra steps around it
|
||||
# handle RetroShare specifics that macdeployqt does not cover:
|
||||
# - RetroShare refuses to load plugins on macOS unless they end in ".dylib",
|
||||
# so built plugins are copied/renamed accordingly.
|
||||
# - macdeployqt skips .so plugins, so each plugin is passed via -executable=.
|
||||
# - Qt imageformats (SVG) are force-copied (macdeployqt sometimes misses them).
|
||||
# - Ad-hoc codesign is mandatory on Apple Silicon, otherwise the app won't run.
|
||||
# ==============================================================================
|
||||
set -e
|
||||
|
||||
# Always operate from the repository root, regardless of where this script lives
|
||||
# (it resides under build_scripts/OSX/). All paths below are relative to the root.
|
||||
cd "$(dirname "$0")/../.." || exit 1
|
||||
|
||||
# Build directory (override with: BUILD_DIR=mydir ./build_scripts/OSX/deploy-macos.sh)
|
||||
BUILD_DIR="${BUILD_DIR:-Build-cmake}"
|
||||
APP_NAME="RetroShare"
|
||||
|
||||
# 1. Vérifications initiales du dossier de build
|
||||
if [ ! -d "$BUILD_DIR" ]; then
|
||||
echo "ERROR: Build directory '$BUILD_DIR' not found. Please compile the project first!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# On cherche l'application compilée, mais on exclut les dossiers de déploiement précédents
|
||||
APP_BUNDLE=$(find "$BUILD_DIR" -maxdepth 3 -type d -name "retroshare-gui.app" ! -path "*/RetroShare-*" | head -n 1)
|
||||
|
||||
if [ -z "$APP_BUNDLE" ]; then
|
||||
echo "ERROR: retroshare-gui.app not found in $BUILD_DIR. Please compile the GUI first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "================================================================================"
|
||||
echo " RETROSHARE MACOS DEPLOYMENT GENERATOR"
|
||||
echo "================================================================================"
|
||||
|
||||
# 2. Détermination dynamique des variables de version
|
||||
echo ">>> Extracting versioning info from Git and environment..."
|
||||
|
||||
DATE_STR=$(date +%Y%m%d)
|
||||
GIT_DESC=$(git describe --tags --always --dirty 2>/dev/null || echo "0.6.7-unknown")
|
||||
CLEAN_DESC=${GIT_DESC#v}
|
||||
VERSION="$CLEAN_DESC"
|
||||
GIT_SUFFIX=""
|
||||
|
||||
if [[ "$CLEAN_DESC" == *-* ]]; then
|
||||
VERSION=$(echo "$CLEAN_DESC" | cut -d'-' -f1)
|
||||
COMMIT_INFO=$(echo "$CLEAN_DESC" | cut -d'-' -f2-)
|
||||
GIT_SUFFIX="-${DATE_STR}-${COMMIT_INFO}"
|
||||
else
|
||||
GIT_SUFFIX="-${DATE_STR}"
|
||||
fi
|
||||
|
||||
# Detect the Qt version for the archive name (qmake reports it). Homebrew's qt@5
|
||||
# is keg-only so its qmake is usually not in PATH; fall back to it, then to a
|
||||
# generic label if nothing is found.
|
||||
QT_VERSION=""
|
||||
if command -v qmake &> /dev/null; then
|
||||
QT_VERSION=$(qmake -query QT_VERSION 2>/dev/null)
|
||||
fi
|
||||
if [[ ! "$QT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
QT5_QMAKE="$(brew --prefix qt@5 2>/dev/null)/bin/qmake"
|
||||
[ -x "$QT5_QMAKE" ] && QT_VERSION=$("$QT5_QMAKE" -query QT_VERSION 2>/dev/null)
|
||||
fi
|
||||
if [[ ! "$QT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
QT_VERSION="UnknownQt"
|
||||
fi
|
||||
|
||||
MACVERSION=$(sw_vers -productVersion 2>/dev/null || echo "UnknownOS")
|
||||
ARCH=$(uname -m)
|
||||
|
||||
ARCHIVE_BASE="RetroShare-${VERSION}-macOS-${ARCH}${GIT_SUFFIX}-Qt-${QT_VERSION}"
|
||||
DEPLOY_DIR="${BUILD_DIR}/${ARCHIVE_BASE}"
|
||||
|
||||
echo " Target Package Name: ${ARCHIVE_BASE}"
|
||||
echo " Deploy Directory: ${DEPLOY_DIR}"
|
||||
|
||||
echo ">>> Cleaning up previous deployment directories..."
|
||||
rm -rf "${BUILD_DIR}/RetroShare-"*"-macOS-"*
|
||||
mkdir -p "$DEPLOY_DIR"
|
||||
|
||||
# 3. Copie de l'application dans notre dossier de déploiement
|
||||
echo ">>> Copying retroshare-gui.app..."
|
||||
cp -R "$APP_BUNDLE" "$DEPLOY_DIR/"
|
||||
TARGET_APP="$DEPLOY_DIR/$(basename "$APP_BUNDLE")"
|
||||
|
||||
echo ">>> Creating target directory layout..."
|
||||
APP_RESOURCES="$TARGET_APP/Contents/Resources"
|
||||
APP_MACOS="$TARGET_APP/Contents/MacOS"
|
||||
|
||||
mkdir -p "$APP_MACOS/extensions6"
|
||||
mkdir -p "$APP_RESOURCES/sounds"
|
||||
mkdir -p "$APP_RESOURCES/translations"
|
||||
mkdir -p "$APP_RESOURCES/webui"
|
||||
|
||||
# 4. Copie des exécutables annexes (service, friendserver) s'ils existent (non-bloquant)
|
||||
echo ">>> Copying additional executables if they exist..."
|
||||
for exe in retroshare-service retroshare-friendserver; do
|
||||
found_exe=$(find "$BUILD_DIR" -type f -name "$exe" -perm -0111 | grep -v "CMakeFiles" | head -n 1)
|
||||
if [ -n "$found_exe" ]; then
|
||||
echo " Found and copying: $found_exe"
|
||||
cp "$found_exe" "$APP_MACOS/"
|
||||
else
|
||||
echo " INFO: Executable '$exe' not found. Skipping."
|
||||
fi
|
||||
done
|
||||
|
||||
# Copie des plugins
|
||||
echo ">>> Copying RetroShare plugins..."
|
||||
if [ -d "$BUILD_DIR/plugins" ]; then
|
||||
mkdir -p "$APP_RESOURCES/extensions6"
|
||||
for plugin in $(find "$BUILD_DIR/plugins" -type f \( -name "*.dylib" -o -name "*.so" \)); do
|
||||
filename=$(basename "$plugin")
|
||||
# RetroShare sur macOS refuse de charger les plugins s'ils ne finissent pas par .dylib !
|
||||
newname="${filename%.*}.dylib"
|
||||
cp "$plugin" "$APP_RESOURCES/$newname"
|
||||
cp "$plugin" "$APP_RESOURCES/extensions6/$newname"
|
||||
done
|
||||
echo " Plugins copied and renamed to .dylib in $APP_RESOURCES/ and $APP_RESOURCES/extensions6/."
|
||||
else
|
||||
echo " INFO: Plugins directory not found. Skipping plugins."
|
||||
fi
|
||||
|
||||
# 5. Copie des ressources statiques
|
||||
echo ">>> Copying RetroShare static assets..."
|
||||
|
||||
if [ -d "retroshare-gui/src/sounds" ]; then
|
||||
cp -r retroshare-gui/src/sounds/* "$APP_RESOURCES/sounds/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
if [ -f "libbitdht/src/bitdht/bdboot.txt" ]; then
|
||||
cp "libbitdht/src/bitdht/bdboot.txt" "$APP_RESOURCES/"
|
||||
echo " Copied bdboot.txt"
|
||||
fi
|
||||
|
||||
if [ -d "retroshare-gui/src/translations" ]; then
|
||||
find "retroshare-gui/src/translations" -name "*.qm" -exec cp {} "$APP_RESOURCES/translations/" \; 2>/dev/null || true
|
||||
fi
|
||||
|
||||
if [ -d "retroshare-webui/src" ]; then
|
||||
cp -r retroshare-webui/src/* "$APP_RESOURCES/webui/" 2>/dev/null || true
|
||||
echo " WebUI copied to app resources."
|
||||
fi
|
||||
|
||||
# 6. Mise à jour du Info.plist
|
||||
echo ">>> Updating Info.plist..."
|
||||
PLIST_PATH="$TARGET_APP/Contents/Info.plist"
|
||||
if command -v /usr/libexec/PlistBuddy &> /dev/null; then
|
||||
/usr/libexec/PlistBuddy -c "Delete :CFBundleGetInfoString" "$PLIST_PATH" 2>/dev/null || true
|
||||
/usr/libexec/PlistBuddy -c "Delete :CFBundleVersion" "$PLIST_PATH" 2>/dev/null || true
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundleVersion string $VERSION" "$PLIST_PATH" 2>/dev/null || true
|
||||
/usr/libexec/PlistBuddy -c "Delete :CFBundleShortVersionString" "$PLIST_PATH" 2>/dev/null || true
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundleShortVersionString string $VERSION" "$PLIST_PATH" 2>/dev/null || true
|
||||
/usr/libexec/PlistBuddy -c "Delete :NSRequiresAquaSystemAppearance" "$PLIST_PATH" 2>/dev/null || true
|
||||
else
|
||||
echo " WARNING: PlistBuddy not found, skipping Info.plist update."
|
||||
fi
|
||||
|
||||
# 7. Déploiement Qt via macdeployqt
|
||||
echo ">>> Running macdeployqt..."
|
||||
if command -v macdeployqt &> /dev/null; then
|
||||
# Forcer la copie des plugins d'images (SVG, etc.) au cas où macdeployqt les oublie
|
||||
MACDEPLOY_BIN=$(command -v macdeployqt)
|
||||
QT_BASE=$(dirname "$(dirname "$MACDEPLOY_BIN")")
|
||||
QT_PLUGINS_DIR="$QT_BASE/share/qt/plugins"
|
||||
if [ ! -d "$QT_PLUGINS_DIR" ]; then
|
||||
QT_PLUGINS_DIR="$QT_BASE/plugins"
|
||||
fi
|
||||
|
||||
if [ -d "$QT_PLUGINS_DIR/imageformats" ]; then
|
||||
echo ">>> Forcing copy of Qt imageformats plugins (SVG support) from $QT_PLUGINS_DIR..."
|
||||
mkdir -p "$TARGET_APP/Contents/PlugIns/imageformats"
|
||||
cp "$QT_PLUGINS_DIR/imageformats/"*.dylib "$TARGET_APP/Contents/PlugIns/imageformats/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Par défaut macdeployqt ignore les fichiers .so, il faut le forcer avec -executable
|
||||
EXTRA_EXECS=""
|
||||
for plugin in "$TARGET_APP"/Contents/Resources/*.so "$TARGET_APP"/Contents/Resources/*.dylib "$TARGET_APP"/Contents/Resources/extensions6/*.so "$TARGET_APP"/Contents/Resources/extensions6/*.dylib "$TARGET_APP"/Contents/PlugIns/imageformats/*.dylib; do
|
||||
if [ -f "$plugin" ]; then
|
||||
EXTRA_EXECS="$EXTRA_EXECS -executable=$plugin"
|
||||
fi
|
||||
done
|
||||
|
||||
# macdeployqt copie les frameworks et ajuste les rpaths
|
||||
macdeployqt "$TARGET_APP" -always-overwrite $EXTRA_EXECS
|
||||
|
||||
echo ">>> Ad-hoc code signing (required for Apple Silicon)..."
|
||||
if command -v codesign &> /dev/null; then
|
||||
# On signe d'abord toutes les bibliothèques, plugins (.so/.dylib) et frameworks individuellement
|
||||
find "$TARGET_APP" -type f \( -name "*.dylib" -o -name "*.so" \) -exec codesign --force --sign - {} \; 2>/dev/null || true
|
||||
find "$TARGET_APP" -type d -name "*.framework" -exec codesign --force --sign - {} \; 2>/dev/null || true
|
||||
# Puis on signe l'application entière
|
||||
codesign --force --deep --sign - "$TARGET_APP"
|
||||
fi
|
||||
|
||||
echo ">>> Creating dmg archive using hdiutil..."
|
||||
DMG_FILE="${BUILD_DIR}/${ARCHIVE_BASE}.dmg"
|
||||
rm -f "$DMG_FILE"
|
||||
if command -v hdiutil &> /dev/null; then
|
||||
hdiutil create -volname "${APP_NAME}" -srcfolder "$TARGET_APP" -ov -format UDZO "$DMG_FILE"
|
||||
|
||||
if [ -f "$DMG_FILE" ]; then
|
||||
echo "================================================================================"
|
||||
echo "SUCCESS: Standalone package created at: $DMG_FILE"
|
||||
echo "================================================================================"
|
||||
else
|
||||
echo "WARNING: .dmg not generated."
|
||||
fi
|
||||
else
|
||||
echo "WARNING: hdiutil not found, cannot create .dmg."
|
||||
fi
|
||||
else
|
||||
echo " WARNING: macdeployqt tool not found in PATH! Make sure Qt is installed and its bin folder is in PATH."
|
||||
echo " Cannot bundle Qt dependencies or create DMG automatically."
|
||||
echo "================================================================================"
|
||||
echo "SUCCESS: App bundle generated at: ${TARGET_APP}"
|
||||
echo "================================================================================"
|
||||
fi
|
||||
51
build_scripts/OSX/makeOSXPackage.sh
Normal file
51
build_scripts/OSX/makeOSXPackage.sh
Normal file
@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
|
||||
APP="RetroShare"
|
||||
RSVERSION="0.6.7a"
|
||||
QTVERSION="Qt-5.15.11"
|
||||
|
||||
# Install the 7z to create dmg archives.
|
||||
#brew list p7zip || brew install p7zip
|
||||
|
||||
# Package your app
|
||||
echo "Packaging retroshare..."
|
||||
#cd ${project_dir}/build/macOS/clang/x86_64/release/
|
||||
cd retroshare-gui/src/
|
||||
|
||||
# Remove build directories that you don't want to deploy
|
||||
rm -rf moc
|
||||
rm -rf obj
|
||||
rm -rf qrc
|
||||
|
||||
# This sets the CFBundleVersion & CFBundleShortVersionString string
|
||||
/usr/libexec/PlistBuddy -c "Delete :CFBundleGetInfoString" retroshare.app/Contents/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundleVersion string $RSVERSION" retroshare.app/Contents/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundleShortVersionString string $RSVERSION" retroshare.app/Contents/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Delete :NSRequiresAquaSystemAppearance" retroshare.app/Contents/Info.plist
|
||||
|
||||
# This automatically creates retroshare.dmg
|
||||
|
||||
echo "Creating dmg archive..."
|
||||
macdeployqt retroshare.app -dmg
|
||||
|
||||
DATE=`date +"%m-%d-%Y"`
|
||||
MACVERSION=`sw_vers -productVersion`
|
||||
#RSVERSION=`git describe --abbrev=0 --tags`
|
||||
GITHEAD=`git rev-parse --short HEAD`
|
||||
|
||||
mv $APP.dmg "$APP-$RSVERSION-$GITHEAD-$DATE-MacOS-$MACVERSION-$QTVERSION.dmg"
|
||||
|
||||
# You can use the appdmg command line app to create your dmg file if
|
||||
# you want to use a custom background and icon arrangement. I'm still
|
||||
# working on this for my apps, myself. If you want to do this, you'll
|
||||
# remove the -dmg option above.
|
||||
# appdmg json-path YourApp_${TRAVIS_TAG}.dmg
|
||||
|
||||
# Copy other project files
|
||||
cp "../../libbitdht/src/bitdht/bdboot.txt" "retroshare.app/Contents/Resources/"
|
||||
cp "../../plugins/FeedReader/lib/libFeedReader.dylib" "retroshare.app/Contents/Resources/"
|
||||
cp -R "sounds" "retroshare.app/Contents/Resources/sounds"
|
||||
|
||||
# cp "${project_dir}/README.md" "README.md"
|
||||
# cp "${project_dir}/LICENSE" "LICENSE"
|
||||
# cp "${project_dir}/Qt License" "Qt License"
|
||||
129
build_scripts/RedHat+Fedora/Linux_RedHat_InstallGuide.md
Normal file
129
build_scripts/RedHat+Fedora/Linux_RedHat_InstallGuide.md
Normal file
@ -0,0 +1,129 @@
|
||||
|
||||
## Compilation on Red Hat-based Linux
|
||||
|
||||
|
||||
### Install package dependencies:
|
||||
#### RedHat/Fedora
|
||||
```bash
|
||||
sudo dnf install mesa-libGL-devel gcc cmake rapidjson-devel \
|
||||
libupnp openssl sqlcipher sqlcipher-devel \
|
||||
botan2 botan2-devel json-c-devel bzip2-devel asio-devel libsecret libXScrnSaver-devel
|
||||
```
|
||||
|
||||
To compile with Qt5:
|
||||
```bash
|
||||
sudo dnf install qt5-qtbase-devel qt5-qtmultimedia qt5-qtx11extras
|
||||
```
|
||||
|
||||
To compile with Qt6:
|
||||
```bash
|
||||
sudo dnf install qt6-qtbase-devel qt6-qtmultimedia-devel qt6-qt5compat-devel
|
||||
```
|
||||
|
||||
Additional dependencies for Feedreader plugin:
|
||||
```bash
|
||||
sudo dnf install libxml2-devel libxslt-devel libcurl-devel
|
||||
```
|
||||
|
||||
### Checkout the source code
|
||||
```bash
|
||||
cd ~
|
||||
git clone https://github.com/RetroShare/RetroShare.git retroshare
|
||||
```
|
||||
|
||||
### Checkout the submodules
|
||||
```bash
|
||||
cd retroshare
|
||||
git submodule update --init --remote libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/
|
||||
git submodule update --init --remote supportlibs/librnp supportlibs/restbed supportlibs/rapidjson
|
||||
```
|
||||
|
||||
### Compile
|
||||
```bash
|
||||
qmake CONFIG+=release CONFIG+=rs_jsonapi CONFIG+=rs_webui
|
||||
make
|
||||
```
|
||||
|
||||
The executable produced will be:
|
||||
```bash
|
||||
./retroshare-gui/src/retroshare
|
||||
```
|
||||
|
||||
### Install
|
||||
```bash
|
||||
sudo make install
|
||||
```
|
||||
|
||||
The executable produced will be:
|
||||
```bash
|
||||
~/usr/bin/RetroShare
|
||||
```
|
||||
|
||||
### For packagers
|
||||
|
||||
Packagers can use PREFIX and LIB\_DIR to customize the installation paths:
|
||||
```bash
|
||||
qmake PREFIX=/usr LIB_DIR=/usr/lib64 "CONFIG-=debug" "CONFIG+=release"
|
||||
make
|
||||
make INSTALL_ROOT=${PKGDIR} install
|
||||
```
|
||||
|
||||
### SQLCipher
|
||||
If libsqlcipher is not available as a package
|
||||
|
||||
You need to place sqlcipher so that the hierarchy is:
|
||||
|
||||
~Home
|
||||
|
|
||||
+--- retroshare
|
||||
|
|
||||
+--- lib
|
||||
|
|
||||
+---- sqlcipher
|
||||
```bash
|
||||
mkdir lib
|
||||
cd lib
|
||||
git clone https://github.com/sqlcipher/sqlcipher.git --depth=1 --branch v3.4.1
|
||||
cd sqlcipher
|
||||
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
|
||||
make
|
||||
cd ..
|
||||
```
|
||||
|
||||
### Build infos
|
||||
|
||||
Note: If you installed Qt6 you need to use `qmake6` on the command line.
|
||||
|
||||
For the `FeedReader` it is required to append the config option `CONFIG+=retroshare_plugins`.
|
||||
Make sure `plugins/plugins.pro` contains `FeedReader` in the list of plugins to compile.
|
||||
|
||||
Do not mix plugins compiled with Qt5 with those compiled with Qt6. They work only if they are compiled
|
||||
with the same Qt version as RetroShare.
|
||||
|
||||
Voip is outdated and is not compileable on the latest Debian.
|
||||
|
||||
For `Autologin` it is required to append the config option `CONFIG+=rs_autologin`.
|
||||
|
||||
|
||||
### Build options
|
||||
|
||||
* Mandatory
|
||||
* release or debug: normally you would like to use the release option
|
||||
* Extra features (optional)
|
||||
* rs_autologin: enable autologin
|
||||
* retroshare_plugins: build plugins
|
||||
* rs_webui: enable Web interface
|
||||
* rs_jsonapi: enable json api interface, required by rs_webui
|
||||
* gxsthewire: enable Wire service (experimental)
|
||||
* wikipoos: enable Wiki service
|
||||
* rs_use_native_dialogs: enable native dialogs (may cause crashes with some versions of Gtk)
|
||||
* rs_deep_channels_index: build with deep channel indexing support
|
||||
* rs_deep_files_index: build with deep file indexing support
|
||||
* "CONFIG+=..." enable other extra compile time features, you can find the almost complete list in file *<sourcefolder>\retroshare.pri*
|
||||
|
||||
Example:
|
||||
|
||||
```batch
|
||||
qmake CONFIG+=debug CONFIG+=release CONFIG+=rs_use_native_dialog CONFIG+=rs_gui_cmark
|
||||
qmake CONFIG+=rs_jsonapi CONFIG+=rs_webui CONFIG+=rs_autologin
|
||||
```
|
||||
@ -1,10 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Version=1.0
|
||||
Name=RetroShare
|
||||
Comment=Securely share files with your friends
|
||||
Comment=Securely communicate with your friends
|
||||
Exec=/usr/bin/retroshare %U
|
||||
Icon=/usr/share/pixmaps/retroshare.xpm
|
||||
Icon=retroshare.xpm
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Network;P2P;
|
||||
Categories=Network;Email;InstantMessaging;Chat;Feed;FileTransfer;P2P
|
||||
MimeType=x-scheme-handler/retroshare;
|
||||
|
||||
@ -8,7 +8,7 @@ Requirements: about 12 GB of free space
|
||||
The resulting binary is a 32-bit build of Retroshare which will also work
|
||||
fine on a 64-bit system.
|
||||
|
||||
**If you want to make complet solution without debugging it, prefer to use \build_scripts\Windows-msys2\build.bat**
|
||||
**If you want to make complete solution without debugging it, prefer to use \build_scripts\Windows-msys2\build.bat**
|
||||
|
||||
This batch will install and build all for you.
|
||||
|
||||
@ -18,8 +18,8 @@ At the end, you'll get at ..\\*-msys2\deploy\ the Portable 7zip file.
|
||||
|
||||
### MSYS2 INSTALLATION (for editing or debugging)
|
||||
|
||||
Download MSYS2 from [MSYS2](http://www.msys2.org/). Get the i686 version
|
||||
if you run a 32-bit Windows or the x86_64 if you run a 64-bit Windows.
|
||||
Download MSYS2 from [MSYS2](http://www.msys2.org/). Installing
|
||||
MSYS2 requires 64 bit Windows 10 or newer.
|
||||
|
||||
Run the installer and install MSYS2.
|
||||
|
||||
@ -40,26 +40,29 @@ Run MSYS2 MSYS again and finish updating with:
|
||||
|
||||
Install the default programs needed to build:
|
||||
|
||||
pacman -S base-devel git wget p7zip gcc perl ruby python2 doxygen cmake
|
||||
pacman -S base-devel git wget p7zip gcc perl ruby doxygen cmake
|
||||
|
||||
Install the 32-bit toolchain:
|
||||
Install the 64-bit toolchain:
|
||||
|
||||
pacman -S mingw-w64-i686-toolchain
|
||||
pacman -S mingw-w64-x86_64-toolchain
|
||||
|
||||
Install all needed dependencies:
|
||||
|
||||
pacman -S mingw-w64-i686-miniupnpc
|
||||
pacman -S mingw-w64-i686-libmicrohttpd
|
||||
pacman -S mingw-w64-i686-libxslt
|
||||
pacman -S mingw-w64-i686-xapian-core
|
||||
pacman -S mingw-w64-i686-sqlcipher
|
||||
pacman -S mingw-w64-i686-qt5
|
||||
pacman -S mingw32/mingw-w64-i686-cmake
|
||||
pacman -S mingw-w64-i686-rapidjson
|
||||
pacman -S mingw-w64-x86_64-miniupnpc
|
||||
pacman -S mingw-w64-x86_64-libxslt
|
||||
pacman -S mingw-w64-x86_64-xapian-core
|
||||
pacman -S mingw-w64-x86_64-sqlcipher
|
||||
pacman -S mingw-w64-x86_64-qt5-base
|
||||
pacman -S mingw-w64-x86_64-qt5-multimedia
|
||||
pacman -S mingw-w64-x86_64-ccmake
|
||||
pacman -S mingw-w64-x86_64-rapidjson
|
||||
pacman -S mingw-w64-x86_64-json-c
|
||||
pacman -S mingw-w64-x86_64-libbotan
|
||||
pacman -S mingw-w64-x86_64-asio
|
||||
|
||||
If you want to use QtCreator as IDE, prefer using this one publish by MSYS2 as all build Kit are already setted.
|
||||
|
||||
pacman -S mingw-w64-i686-qt-creator
|
||||
pacman -S mingw-w64-x86_64-qt-creator
|
||||
*You can start it from MSYS2 terminal.*
|
||||
|
||||
|
||||
@ -67,7 +70,7 @@ We're done installing MSYS2, close the shell terminal.
|
||||
|
||||
### BUILDING RETROSHARE
|
||||
|
||||
Now run the MSYS2 MinGW 32-bit shell terminal (it's in the start menu).
|
||||
Now run the MSYS2 MinGW 64-bit shell terminal (it's in the start menu).
|
||||
We will use it to checkout Retroshare and build it:
|
||||
|
||||
git clone https://github.com/RetroShare/RetroShare.git
|
||||
|
||||
@ -43,7 +43,9 @@ set NSIS_PARAM=%NSIS_PARAM% /DDEPLOYDIR="%RsDeployPath%"
|
||||
set NSIS_PARAM=%NSIS_PARAM% /DOUTDIR="%RsPackPath%"
|
||||
set NSIS_PARAM=%NSIS_PARAM% /DINSTALLERADD="%RsArchiveAdd%"
|
||||
set NSIS_PARAM=%NSIS_PARAM% /DARCHITECTURE="%RsArchitecture%"
|
||||
set NSIS_PARAM=%NSIS_PARAM% /DTOOLCHAIN="%RsToolchain%"
|
||||
set NSIS_PARAM=%NSIS_PARAM% /DREVISION=%RsVersion.Extra%
|
||||
set NSIS_PARAM=%NSIS_PARAM% /DQTVERSION=%QtVersion%
|
||||
|
||||
set QtMainVersion=%QtVersion:~0,1%
|
||||
|
||||
@ -53,7 +55,10 @@ rem makensis %NSIS_PARAM% "%SourcePath%\build_scripts\Windows-msys2\installer\re
|
||||
rem pushd "%SourcePath%\build_scripts\Windows-msys2\installer"
|
||||
rem %EnvMSYS2Cmd% "makensis $0 retroshare-Qt%QtMainVersion%.nsi" "%NSIS_PARAM%"
|
||||
rem popd
|
||||
"%RsMinGWPath%\bin\makensis" %NSIS_PARAM% "%SourcePath%\build_scripts\Windows-msys2\installer\retroshare-Qt%QtMainVersion%.nsi"
|
||||
|
||||
rem Currently no need for separate nsi files
|
||||
rem "%RsMinGWPath%\bin\makensis" %NSIS_PARAM% "%SourcePath%\build_scripts\Windows-msys2\installer\retroshare-Qt%QtMainVersion%.nsi"
|
||||
"%RsMinGWPath%\bin\makensis" %NSIS_PARAM% "%SourcePath%\build_scripts\Windows-msys2\installer\retroshare.nsi"
|
||||
|
||||
exit /B %ERRORLEVEL%
|
||||
|
||||
|
||||
@ -15,18 +15,22 @@ call "%~dp0env-base.bat" %*
|
||||
if errorlevel 2 exit /B 2
|
||||
if errorlevel 1 goto error_env
|
||||
|
||||
title Build - %SourceName%-%RsBuildConfig% Qt-%QtVersion% %RsToolchain% [Prerequisites]
|
||||
|
||||
if not "%ParamNoupdate%"=="1" (
|
||||
:: Install needed things
|
||||
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-cmake mingw-w64-%RsMSYS2Architecture%-rapidjson"
|
||||
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt%ParamQtVersion% mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-cmake mingw-w64-%RsMSYS2Architecture%-rapidjson"
|
||||
:: rnp
|
||||
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-json-c mingw-w64-%RsMSYS2Architecture%-libbotan"
|
||||
|
||||
:: Webui
|
||||
if "%ParamWebui%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-doxygen"
|
||||
if "%ParamWebui%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-doxygen mingw-w64-%RsMSYS2Architecture%-asio"
|
||||
|
||||
:: Plugins
|
||||
if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg"
|
||||
|
||||
:: Clang
|
||||
if "%ParamClang%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-clang"
|
||||
if "%ClangCompiler%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-clang"
|
||||
|
||||
:: Indexing
|
||||
if "%ParamIndexing%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-xapian-core mingw-w64-%RsMSYS2Architecture%-libvorbis mingw-w64-%RsMSYS2Architecture%-flac mingw-w64-%RsMSYS2Architecture%-taglib"
|
||||
@ -51,7 +55,7 @@ echo.
|
||||
echo === Version
|
||||
echo.
|
||||
|
||||
title Build - %SourceName%-%RsBuildConfig% [Version]
|
||||
title Build - %SourceName%-%RsBuildConfig% Qt-%QtVersion% %RsToolchain% [Version]
|
||||
|
||||
pushd "%SourcePath%\retroshare-gui\src\gui\images"
|
||||
:: Touch resource file
|
||||
@ -65,7 +69,7 @@ echo.
|
||||
echo === qmake
|
||||
echo.
|
||||
|
||||
title Build - %SourceName%-%RsBuildConfig% [qmake]
|
||||
title Build - %SourceName%-%RsBuildConfig% Qt-%QtVersion% %RsToolchain% [qmake]
|
||||
|
||||
set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=%RsBuildConfig%"
|
||||
if "%ParamAutologin%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=rs_autologin"
|
||||
@ -77,14 +81,13 @@ echo %RsBuildConfig% >> buildinfo.txt
|
||||
echo %RsArchitecture% >> buildinfo.txt
|
||||
echo Qt %QtVersion% >> buildinfo.txt
|
||||
echo %RsToolchain% >> buildinfo.txt
|
||||
echo %RsCompiler% >> buildinfo.txt
|
||||
|
||||
call "%ToolsPath%\msys2-path.bat" "%SourcePath%" MSYS2SourcePath
|
||||
call "%ToolsPath%\msys2-path.bat" "%EnvMSYS2Path%" MSYS2EnvMSYS2Path
|
||||
if "%ParamClang%"=="1" (
|
||||
%EnvMSYS2Cmd% "qmake "%MSYS2SourcePath%/RetroShare.pro" -r -spec win32-clang-g++ %RS_QMAKE_CONFIG%"
|
||||
if "%ClangCompiler%"=="1" (
|
||||
%EnvMSYS2Cmd% "%QMakeCmd% "%MSYS2SourcePath%/RetroShare.pro" -r -spec win32-clang-g++ %RS_QMAKE_CONFIG%"
|
||||
) else (
|
||||
%EnvMSYS2Cmd% "qmake "%MSYS2SourcePath%/RetroShare.pro" -r -spec win32-g++ %RS_QMAKE_CONFIG%"
|
||||
%EnvMSYS2Cmd% "%QMakeCmd% "%MSYS2SourcePath%/RetroShare.pro" -r -spec win32-g++ %RS_QMAKE_CONFIG%"
|
||||
)
|
||||
if errorlevel 1 goto error
|
||||
|
||||
@ -92,7 +95,7 @@ echo.
|
||||
echo === make
|
||||
echo.
|
||||
|
||||
title Build - %SourceName%-%RsBuildConfig% [make]
|
||||
title Build - %SourceName%-%RsBuildConfig% Qt-%QtVersion% %RsToolchain% [make]
|
||||
|
||||
%EnvMSYS2Cmd% "make -j %CoreCount%"
|
||||
if errorlevel 1 goto error
|
||||
|
||||
@ -5,14 +5,16 @@ set ParamAutologin=0
|
||||
set ParamPlugins=0
|
||||
set ParamTor=0
|
||||
set ParamWebui=0
|
||||
set ParamClang=0
|
||||
set ClangCompiler=0
|
||||
set ParamIndexing=0
|
||||
set ParamFriendserver=0
|
||||
set ParamNoupdate=0
|
||||
set CoreCount=%NUMBER_OF_PROCESSORS%
|
||||
set RS_QMAKE_CONFIG=
|
||||
set RsToolchain=
|
||||
set ParamQtVersion=5
|
||||
set tcc=0
|
||||
set QtVersionCount=0
|
||||
|
||||
:parameter_loop
|
||||
if "%~1" NEQ "" (
|
||||
@ -43,6 +45,12 @@ if "%~1" NEQ "" (
|
||||
set /A tcc=tcc+1
|
||||
) else if "%%~a"=="release" (
|
||||
set ParamRelease=1
|
||||
) else if "%%~a"=="qt5" (
|
||||
set ParamQtVersion=5
|
||||
set /A QtVersionCount+=1
|
||||
) else if "%%~a"=="qt6" (
|
||||
set ParamQtVersion=6
|
||||
set /A QtVersionCount+=1
|
||||
) else if "%%~a"=="debug" (
|
||||
set ParamDebug=1
|
||||
) else if "%%~a"=="autologin" (
|
||||
@ -55,8 +63,6 @@ if "%~1" NEQ "" (
|
||||
set ParamWebui=1
|
||||
) else if "%%~a"=="singlethread" (
|
||||
set CoreCount=1
|
||||
) else if "%%~a"=="clang" (
|
||||
set ParamClang=1
|
||||
) else if "%%~a"=="indexing" (
|
||||
set ParamIndexing=1
|
||||
) else if "%%~a"=="friendserver" (
|
||||
@ -80,6 +86,16 @@ if %tcc% NEQ 1 (
|
||||
goto :usage
|
||||
)
|
||||
|
||||
if %QtVersionCount% GTR 1 (
|
||||
echo Multiple Qt versions specified
|
||||
goto :usage
|
||||
)
|
||||
|
||||
if "%ParamQtVersion%" NEQ "5" if "%ParamQtVersion%" NEQ "6" (
|
||||
echo Wrong Qt version specified
|
||||
goto :usage
|
||||
)
|
||||
|
||||
if "%RsToolchain%"=="mingw32" (
|
||||
set RsArchitecture=x86
|
||||
set RsMSYS2Architecture=i686
|
||||
@ -96,24 +112,18 @@ if "%RsToolchain%"=="mingw32" (
|
||||
set RsArchitecture=x64
|
||||
set RsMSYS2Architecture=clang-x86_64
|
||||
set MSYSTEM=CLANG64
|
||||
set ParamClang=1
|
||||
set ClangCompiler=1
|
||||
) else if "%RsToolchain%"=="clang32" (
|
||||
set RsArchitecture=x86
|
||||
set RsMSYS2Architecture=clang-i686
|
||||
set MSYSTEM=CLANG32
|
||||
set ParamClang=1
|
||||
set ClangCompiler=1
|
||||
) else if "%RsToolchain%"=="clangarm64" (
|
||||
set RsArchitecture=arm64
|
||||
set RsMSYS2Architecture=clang-aarch64
|
||||
set MSYSTEM=CLANGARM64
|
||||
)
|
||||
|
||||
if "%ParamClang%"=="1" (
|
||||
set RsCompiler=Clang
|
||||
) else (
|
||||
set RsCompiler=GCC
|
||||
)
|
||||
|
||||
if "%ParamRelease%"=="1" (
|
||||
if "%ParamDebug%"=="1" (
|
||||
echo.
|
||||
@ -148,7 +158,7 @@ exit /B 0
|
||||
|
||||
:usage
|
||||
echo.
|
||||
echo Usage: 32^|64^|other release^|debug [autologin plugins webui singlethread clang indexing friendserver noupdate] ["CONFIG+=..."]
|
||||
echo Usage: 32^|64^|other release^|debug qt5^|qt6 [autologin plugins webui singlethread clang indexing friendserver noupdate] ["CONFIG+=..."]
|
||||
echo.
|
||||
echo Mandatory parameter
|
||||
echo 32^|64 32-bit or 64-bit version (same as mingw32 or mingw64)
|
||||
@ -156,13 +166,13 @@ echo Or you can specify any other toolchain supported by msys
|
||||
echo mingw32^|mingw64^|clang32^|clang64^|ucrt64^|clangarm64
|
||||
echo More info: https://www.msys2.org/docs/environments
|
||||
echo release^|debug Build release or debug version
|
||||
echo qt5^|qt6 Build with Qt 5 (default) or Qt 6
|
||||
echo.
|
||||
echo Optional parameter (need clean when changed)
|
||||
echo autologin Build with autologin
|
||||
echo plugins Build plugins
|
||||
echo webui Enable JsonAPI and pack webui files
|
||||
echo singlethread Use only 1 thread for building
|
||||
echo clang Use clang compiler instead of GCC
|
||||
echo indexing Build with deep channel and file indexing support
|
||||
echo friendserver Enable friendserver support
|
||||
echo noupdate Skip updating the libraries
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
call "%~dp0env-base.bat" %*
|
||||
if errorlevel 2 exit /B 2
|
||||
if errorlevel 1 goto error_env
|
||||
if errorlevel 1 exit /B 1
|
||||
|
||||
set BuildPath=%EnvRootPath%\builds
|
||||
set DeployPath=%EnvRootPath%\deploy
|
||||
@ -8,14 +8,20 @@ set DeployPath=%EnvRootPath%\deploy
|
||||
if not exist "%BuildPath%" mkdir "%BuildPath%"
|
||||
if not exist "%DeployPath%" mkdir "%DeployPath%"
|
||||
|
||||
set QMakeCmd=
|
||||
if "%ParamQtVersion%"=="5" set QMakeCmd=qmake-qt5
|
||||
if "%ParamQtVersion%"=="6" set QMakeCmd=qmake6
|
||||
if "%QMakeCmd%"=="" %cecho% error "Unknown Qt version %ParamQtVersion%." & exit /B 1
|
||||
|
||||
:: Get Qt version
|
||||
call "%ToolsPath%\get-qt-version.bat" QtVersion
|
||||
call "%ToolsPath%\get-qt-version.bat" QtVersion %QMakeCmd%
|
||||
if errorlevel 1 %cecho% error "Cannot get Qt version." & exit /B 1
|
||||
if "%QtVersion%"=="" %cecho% error "Cannot get Qt version." & exit /B 1
|
||||
|
||||
set RsMinGWPath=%EnvMSYS2BasePath%\%RsToolchain%
|
||||
|
||||
set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsToolchain%-%RsCompiler%-%RsBuildConfig%
|
||||
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsToolchain%-%RsCompiler%-%RsBuildConfig%
|
||||
set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsToolchain%-%RsBuildConfig%
|
||||
set RsDeployPath=%DeployPath%\Qt-%QtVersion%-%RsToolchain%%RsType%-%RsBuildConfig%
|
||||
set RsPackPath=%DeployPath%
|
||||
set RsArchiveAdd=
|
||||
set RsWebuiBuildPath=%RsBuildPath%\retroshare-webui\webui
|
||||
|
||||
@ -55,25 +55,28 @@ set RsVersion=%RsVersion.Major%.%RsVersion.Minor%.%RsVersion.Mini%
|
||||
:: Check WMIC is available
|
||||
wmic.exe alias /? >nul 2>&1 || echo WMIC is not available.&& goto error
|
||||
|
||||
:: Use WMIC to retrieve date in format YYYYMMDD
|
||||
set RsDate=
|
||||
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set RsDate=%%I
|
||||
set RsDate=%RsDate:~0,4%%RsDate:~4,2%%RsDate:~6,2%
|
||||
:: Get date
|
||||
call "%ToolsPath%\get-rs-date.bat" "%SourcePath%" RsDate
|
||||
if errorlevel 1 %cecho% error "Could not get date."& goto error
|
||||
|
||||
if "%RsDate%"=="" %cecho% error "Could not get date."& goto error
|
||||
|
||||
set QtMainVersion=%QtVersion:~0,1%
|
||||
set QtSharePath=%RsMinGWPath%\share\qt%QtMainVersion%\
|
||||
|
||||
rem Qt 4 = QtSvg4.dll
|
||||
rem Qt 5 = Qt5Svg.dll
|
||||
rem Qt 6 = Qt6Svg.dll
|
||||
set QtMainVersion1=
|
||||
set QtMainVersion2=
|
||||
if "%QtMainVersion%"=="4" set QtMainVersion2=4
|
||||
if "%QtMainVersion%"=="5" set QtMainVersion1=5
|
||||
if "%QtMainVersion%"=="6" set QtMainVersion1=6
|
||||
|
||||
if "%RsBuildConfig%" NEQ "release" (
|
||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsVersion.Extra%-%RsArchitecture%-msys2%RsType%%RsArchiveAdd%-%RsBuildConfig%.7z
|
||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsVersion.Extra%-Qt-%QtVersion%-%RsToolchain%-msys2%RsType%%RsArchiveAdd%-%RsBuildConfig%.7z
|
||||
) else (
|
||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsVersion.Extra%-%RsArchitecture%-msys2%RsType%%RsArchiveAdd%.7z
|
||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsVersion.Extra%-Qt-%QtVersion%-%RsToolchain%-msys2%RsType%%RsArchiveAdd%.7z
|
||||
)
|
||||
|
||||
if exist "%Archive%" del /Q "%Archive%"
|
||||
@ -81,7 +84,7 @@ if exist "%Archive%" del /Q "%Archive%"
|
||||
:: Create deploy path
|
||||
mkdir "%RsDeployPath%"
|
||||
|
||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% [copy files]
|
||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% Qt-%QtVersion% %RsToolchain% [copy files]
|
||||
|
||||
set ExtensionsFile=%SourcePath%\libretroshare\src\rsserver\rsinit.cc
|
||||
set Extensions=
|
||||
@ -105,6 +108,7 @@ copy "%RsBuildPath%\retroshare-nogui\src\%RsBuildConfig%\retroshare*-nogui.exe"
|
||||
copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
|
||||
copy "%RsBuildPath%\supportlibs\cmark\build\src\libcmark.dll" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" copy "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\supportlibs\librnp\Build\src\lib\librnp.dll" copy "%RsBuildPath%\supportlibs\librnp\Build\src\lib\librnp.dll" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" (
|
||||
copy "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" "%RsDeployPath%" %Quite%
|
||||
)
|
||||
@ -117,18 +121,24 @@ for /D %%D in ("%RsBuildPath%\plugins\*") do (
|
||||
echo copy Qt DLL's
|
||||
copy "%RsMinGWPath%\bin\Qt%QtMainVersion1%Svg%QtMainVersion2%.dll" "%RsDeployPath%" %Quite%
|
||||
|
||||
if "%QtMainVersion%"=="5" (
|
||||
if %QtMainVersion% GEQ 5 (
|
||||
mkdir "%RsDeployPath%\platforms"
|
||||
copy "%QtSharePath%\plugins\platforms\qwindows.dll" "%RsDeployPath%\platforms" %Quite%
|
||||
)
|
||||
|
||||
if "%QtMainVersion%"=="5" (
|
||||
mkdir "%RsDeployPath%\audio"
|
||||
copy "%QtSharePath%\plugins\audio\qtaudio_windows.dll" "%RsDeployPath%\audio" %Quite%
|
||||
)
|
||||
|
||||
if exist "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" (
|
||||
echo copy styles
|
||||
mkdir "%RsDeployPath%\styles" %Quite%
|
||||
echo copy styles
|
||||
mkdir "%RsDeployPath%\styles" %Quite%
|
||||
if "%QtMainVersion%"=="5" (
|
||||
copy "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" "%RsDeployPath%\styles" %Quite%
|
||||
)
|
||||
if "%QtMainVersion%"=="6" (
|
||||
copy "%QtSharePath%\plugins\styles\qmodernwindowsstyle.dll" "%RsDeployPath%\styles" %Quite%
|
||||
)
|
||||
|
||||
copy "%QtSharePath%\plugins\imageformats\*.dll" "%RsDeployPath%\imageformats" %Quite%
|
||||
del /Q "%RsDeployPath%\imageformats\*d?.dll" %Quite%
|
||||
@ -169,11 +179,13 @@ xcopy /S "%SourcePath%\retroshare-gui\src\license" "%RsDeployPath%\license" %Qui
|
||||
echo copy translation
|
||||
copy "%SourcePath%\retroshare-gui\src\translations\qt_tr.qm" "%RsDeployPath%\translations" %Quite%
|
||||
copy "%QtSharePath%\translations\qt_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
if "%QtMainVersion%"=="5" (
|
||||
if "%QtMainVersion%"=="6" (
|
||||
copy "%QtSharePath%\translations\qtbase_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
copy "%QtSharePath%\translations\qtscript_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
copy "%QtSharePath%\translations\qtquick1_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
copy "%QtSharePath%\translations\qtmultimedia_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
)
|
||||
if "%QtMainVersion%"=="5" (
|
||||
copy "%QtSharePath%\translations\qtscript_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
copy "%QtSharePath%\translations\qtxmlpatterns_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
)
|
||||
|
||||
@ -198,7 +210,7 @@ if "%ParamWebui%"=="1" (
|
||||
)
|
||||
|
||||
rem pack files
|
||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% [pack files]
|
||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% Qt-%QtVersion% %RsToolchain% [pack files]
|
||||
|
||||
"%EnvSevenZipExe%" a -mx=9 -t7z "%Archive%" "%RsDeployPath%\*"
|
||||
|
||||
|
||||
374
build_scripts/Windows-msys2/deploy-windows.sh
Executable file
374
build_scripts/Windows-msys2/deploy-windows.sh
Executable file
@ -0,0 +1,374 @@
|
||||
#!/bin/bash
|
||||
# ==============================================================================
|
||||
# RetroShare Windows Portability & Deployment Packaging Script
|
||||
# Designed for MSYS2 MinGW64 Shell environment
|
||||
# ------------------------------------------------------------------------------
|
||||
# Why this is more than a one-liner: windeployqt IS the standard tool and does the
|
||||
# heavy lifting (bundling Qt DLLs/plugins). The extra steps around it handle MSYS2
|
||||
# /MinGW + RetroShare specifics that windeployqt does not reliably cover:
|
||||
# - Manual fallback copy of the Qt 'platforms'/'styles'/'imageformats' plugins,
|
||||
# which windeployqt sometimes misses under MSYS2.
|
||||
# - Recursive ldd-based resolution of MinGW runtime DLLs (compiler runtime,
|
||||
# 3rd-party libs) into the portable folder.
|
||||
# - RetroShare's portable layout (Data/extensions6 for plugins, qss/stylesheets/
|
||||
# sounds/translations) and the 'portable' marker file.
|
||||
# ==============================================================================
|
||||
set -e
|
||||
|
||||
# Toujours travailler depuis la racine du dépôt (ce script vit sous
|
||||
# build_scripts/Windows-msys2/), sinon les chemins relatifs (retroshare-gui/src,
|
||||
# libbitdht, ...) sont muets et produisent un paquet incomplet sans erreur.
|
||||
cd "$(dirname "$0")/../.." || exit 1
|
||||
|
||||
# Build directory (override with: BUILD_DIR=mydir ./build_scripts/Windows-msys2/deploy-windows.sh)
|
||||
BUILD_DIR="${BUILD_DIR:-Build-cmake}"
|
||||
|
||||
# Préfixe de l'environnement MSYS2 utilisé pour la compilation
|
||||
# (mingw64 / ucrt64 / clang64). Indispensable pour retrouver le runtime
|
||||
# compilateur et les plugins Qt quel que soit l'environnement employé.
|
||||
MINGW_PREFIX="${MSYSTEM_PREFIX:-/mingw64}"
|
||||
|
||||
# 1. Vérifications initiales du dossier de build
|
||||
if [ ! -d "$BUILD_DIR" ]; then
|
||||
echo "ERROR: Build directory '$BUILD_DIR' not found. Please compile the project first!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "================================================================================"
|
||||
echo " RETROSHARE WINDOWS DEPLOYMENT GENERATOR"
|
||||
echo "================================================================================"
|
||||
|
||||
# 2. Détermination dynamique des variables de version (inspiré de qmake)
|
||||
echo ">>> Extracting versioning info from Git and environment..."
|
||||
|
||||
# Date au format YYYYMMDD
|
||||
DATE_STR=$(date +%Y%m%d)
|
||||
|
||||
# Récupération du describe de Git (ex: v0.6.7.2-892-g5341b777d-dirty)
|
||||
GIT_DESC=$(git describe --tags --always --dirty 2>/dev/null || echo "0.6.7-unknown")
|
||||
CLEAN_DESC=${GIT_DESC#v} # Enlève le 'v' initial
|
||||
|
||||
# Valeurs par défaut
|
||||
VERSION="$CLEAN_DESC"
|
||||
GIT_SUFFIX=""
|
||||
|
||||
if [[ "$CLEAN_DESC" == *-* ]]; then
|
||||
# Format: tag-commits-hash[-dirty] (ex: 0.6.7.2-892-g5341b777d-dirty)
|
||||
VERSION=$(echo "$CLEAN_DESC" | cut -d'-' -f1)
|
||||
COMMIT_INFO=$(echo "$CLEAN_DESC" | cut -d'-' -f2-)
|
||||
GIT_SUFFIX="-${DATE_STR}-${COMMIT_INFO}"
|
||||
else
|
||||
# Si on est pile sur un tag
|
||||
GIT_SUFFIX="-${DATE_STR}"
|
||||
fi
|
||||
|
||||
# Recherche de l'exécutable windeployqt adéquat
|
||||
WINDEPLOYQT_CMD=""
|
||||
for cmd in windeployqt windeployqt-qt5 windeployqt-qt6; do
|
||||
if command -v "$cmd" &> /dev/null; then
|
||||
WINDEPLOYQT_CMD="$cmd"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Détection de la version de Qt
|
||||
QT_VERSION=""
|
||||
if command -v qmake &> /dev/null; then
|
||||
QT_VERSION=$(qmake -query QT_VERSION 2>/dev/null)
|
||||
fi
|
||||
|
||||
# Si qmake n'a pas donné de version propre, on cherche avec windeployqt
|
||||
if [[ ! "$QT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [ -n "$WINDEPLOYQT_CMD" ]; then
|
||||
QT_VERSION=$("$WINDEPLOYQT_CMD" --version 2>/dev/null | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+' | head -n 1 || echo "")
|
||||
fi
|
||||
|
||||
# Valeur de secours si rien n'a été détecté ou si la version est invalide
|
||||
if [[ ! "$QT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
QT_VERSION="5.15.18"
|
||||
fi
|
||||
|
||||
# Nom de base de l'archive finale
|
||||
ARCHIVE_BASE="RetroShare-${VERSION}-Windows-Portable${GIT_SUFFIX}-Qt-${QT_VERSION}-mingw64-msys2"
|
||||
DEPLOY_DIR="${BUILD_DIR}/${ARCHIVE_BASE}"
|
||||
|
||||
echo " Target Package Name: ${ARCHIVE_BASE}"
|
||||
echo " Deploy Directory: ${DEPLOY_DIR}"
|
||||
|
||||
# Nettoyage des anciennes générations de déploiement
|
||||
echo ">>> Cleaning up previous deployment directories..."
|
||||
# Ne supprimer que les anciens RÉPERTOIRES de déploiement, pas les archives
|
||||
# .7z / .zip produites lors des runs précédents (qui matchent le même motif).
|
||||
find "$BUILD_DIR" -maxdepth 1 -type d -name "RetroShare-*-Windows-Portable*" -exec rm -rf {} + 2>/dev/null || true
|
||||
mkdir -p "$DEPLOY_DIR"
|
||||
|
||||
# 3. Création de l'arborescence complète attendue par RetroShare
|
||||
echo ">>> Creating target directory layout..."
|
||||
mkdir -p "$DEPLOY_DIR/Data/extensions6" # Répertoire pour les plugins de RetroShare
|
||||
mkdir -p "$DEPLOY_DIR/qss" # Feuilles de style de l'interface
|
||||
mkdir -p "$DEPLOY_DIR/stylesheets" # Feuilles de style de la messagerie
|
||||
mkdir -p "$DEPLOY_DIR/sounds" # Sons système de l'interface
|
||||
mkdir -p "$DEPLOY_DIR/translations" # Fichiers de traductions (RetroShare + Qt)
|
||||
mkdir -p "$DEPLOY_DIR/license" # Fichiers de licences
|
||||
mkdir -p "$DEPLOY_DIR/log" # Dossier de logs de fonctionnement
|
||||
|
||||
# 4. Création du fichier témoin 'portable'
|
||||
echo ">>> Creating 'portable' mode indicator file..."
|
||||
touch "$DEPLOY_DIR/portable"
|
||||
|
||||
# 5. Copie des exécutables et DLL générées par la compilation
|
||||
echo ">>> Copying compiled binaries..."
|
||||
for exe in retroshare-gui.exe retroshare-service.exe retroshare-friendserver.exe; do
|
||||
found_exe=$(find "$BUILD_DIR" -path "$DEPLOY_DIR" -prune -o -name "$exe" -print | head -n 1)
|
||||
if [ -n "$found_exe" ]; then
|
||||
echo " Found and copying: $found_exe"
|
||||
cp "$found_exe" "$DEPLOY_DIR/"
|
||||
else
|
||||
echo " WARNING: Executable '$exe' not found. Skipping."
|
||||
fi
|
||||
done
|
||||
|
||||
echo ">>> Copying local build libraries (DLLs)..."
|
||||
# Recherche et copie des DLL compilées en interne dans le projet (RNP, CMark, RetroShare, Restbed)
|
||||
# NB: on élague "$DEPLOY_DIR" (situé sous "$BUILD_DIR") pour éviter de re-trouver
|
||||
# les DLL déjà copiées et de déployer par erreur une variante stale.
|
||||
find "$BUILD_DIR" -path "$DEPLOY_DIR" -prune -o -name "libcmark.dll" -exec cp {} "$DEPLOY_DIR/" \; 2>/dev/null || true
|
||||
find "$BUILD_DIR" -path "$DEPLOY_DIR" -prune -o -name "*retroshare.dll" -exec cp {} "$DEPLOY_DIR/" \; 2>/dev/null || true
|
||||
find "$BUILD_DIR" -path "$DEPLOY_DIR" -prune -o -name "*restbed*.dll" -exec cp {} "$DEPLOY_DIR/" \; 2>/dev/null || true
|
||||
if [ -d "supportlibs/librnp/Build" ]; then
|
||||
find "supportlibs/librnp/Build" -name "librnp.dll" -exec cp {} "$DEPLOY_DIR/" \; 2>/dev/null || true
|
||||
fi
|
||||
find "$BUILD_DIR" -path "$DEPLOY_DIR" -prune -o -name "librnp.dll" -exec cp {} "$DEPLOY_DIR/" \; 2>/dev/null || true
|
||||
|
||||
echo ">>> Copying RetroShare plugins..."
|
||||
if [ -d "$BUILD_DIR/plugins" ]; then
|
||||
find "$BUILD_DIR/plugins" -name "*.dll" -exec cp {} "$DEPLOY_DIR/Data/extensions6/" \; 2>/dev/null || true
|
||||
echo " Plugins copied to Data/extensions6."
|
||||
else
|
||||
echo " WARNING: Plugins directory not found. Skipping plugins."
|
||||
fi
|
||||
|
||||
# 6. Copie des ressources statiques de RetroShare (QSS, sons, etc.)
|
||||
echo ">>> Copying RetroShare static assets..."
|
||||
|
||||
if [ -d "retroshare-gui/src/qss" ]; then
|
||||
cp -r retroshare-gui/src/qss/* "$DEPLOY_DIR/qss/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
if [ -d "retroshare-gui/src/gui/qss/chat" ]; then
|
||||
cp -r retroshare-gui/src/gui/qss/chat/* "$DEPLOY_DIR/stylesheets/" 2>/dev/null || true
|
||||
# Supprime les répertoires inutiles d'après le pack.bat historique
|
||||
rm -rf "$DEPLOY_DIR/stylesheets/compact" "$DEPLOY_DIR/stylesheets/standard"
|
||||
fi
|
||||
|
||||
if [ -d "retroshare-gui/src/sounds" ]; then
|
||||
cp -r retroshare-gui/src/sounds/* "$DEPLOY_DIR/sounds/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
if [ -d "retroshare-gui/src/license" ]; then
|
||||
cp -r retroshare-gui/src/license/* "$DEPLOY_DIR/license/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
if [ -f "libbitdht/src/bitdht/bdboot.txt" ]; then
|
||||
cp "libbitdht/src/bitdht/bdboot.txt" "$DEPLOY_DIR/"
|
||||
echo " Copied bdboot.txt"
|
||||
fi
|
||||
|
||||
# 7. Copie des fichiers de traduction
|
||||
echo ">>> Copying translations (RetroShare + Qt system)..."
|
||||
if [ -d "retroshare-gui/src/translations" ]; then
|
||||
find "retroshare-gui/src/translations" -name "*.qm" -exec cp {} "$DEPLOY_DIR/translations/" \; 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Copie des traductions Qt de l'environnement MSYS2 MinGW64
|
||||
QT_TRANS_DIR="$MINGW_PREFIX/share/qt5/translations"
|
||||
if [ -d "$QT_TRANS_DIR" ]; then
|
||||
cp "$QT_TRANS_DIR"/qt_*.qm "$DEPLOY_DIR/translations/" 2>/dev/null || true
|
||||
fi
|
||||
QT6_TRANS_DIR="$MINGW_PREFIX/share/qt6/translations"
|
||||
if [ -d "$QT6_TRANS_DIR" ]; then
|
||||
cp "$QT6_TRANS_DIR"/qt_*.qm "$DEPLOY_DIR/translations/" 2>/dev/null || true
|
||||
cp "$QT6_TRANS_DIR"/qtbase_*.qm "$DEPLOY_DIR/translations/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# 8. Déploiement des dépendances Qt via windeployqt
|
||||
if [ -f "$DEPLOY_DIR/retroshare-gui.exe" ]; then
|
||||
if [ -n "$WINDEPLOYQT_CMD" ]; then
|
||||
echo ">>> Running $WINDEPLOYQT_CMD on retroshare-gui.exe..."
|
||||
# Convert path to Windows-style for the native windeployqt tool if cygpath is available
|
||||
if command -v cygpath &> /dev/null; then
|
||||
WIN_EXE_PATH=$(cygpath -w "$DEPLOY_DIR/retroshare-gui.exe")
|
||||
echo " Using Windows path: $WIN_EXE_PATH"
|
||||
"$WINDEPLOYQT_CMD" --no-compiler-runtime "$WIN_EXE_PATH" || true
|
||||
else
|
||||
"$WINDEPLOYQT_CMD" --no-compiler-runtime "$DEPLOY_DIR/retroshare-gui.exe" || true
|
||||
fi
|
||||
else
|
||||
echo " WARNING: windeployqt tool not found in PATH! Make sure Qt package is installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fallback manuel pour les plugins Qt essentiels (comme 'platforms' et 'styles')
|
||||
# Indispensable si windeployqt a échoué ou n'était pas présent.
|
||||
if [ ! -d "$DEPLOY_DIR/platforms" ] || [ ! -f "$DEPLOY_DIR/platforms/qwindows.dll" ]; then
|
||||
echo ">>> Manual fallback: Copying Qt 'platforms' directory (qwindows.dll)..."
|
||||
mkdir -p "$DEPLOY_DIR/platforms"
|
||||
COPIED_PLATFORMS=false
|
||||
for path in \
|
||||
"$MINGW_PREFIX/share/qt6/plugins/platforms/qwindows.dll" \
|
||||
"$MINGW_PREFIX/share/qt5/plugins/platforms/qwindows.dll" \
|
||||
"$MINGW_PREFIX/lib/qt6/plugins/platforms/qwindows.dll" \
|
||||
"$MINGW_PREFIX/lib/qt5/plugins/platforms/qwindows.dll"; do
|
||||
if [ -f "$path" ]; then
|
||||
echo " Found platforms plugin at: $path"
|
||||
cp "$path" "$DEPLOY_DIR/platforms/"
|
||||
COPIED_PLATFORMS=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$COPIED_PLATFORMS" = false ]; then
|
||||
echo " WARNING: Could not find qwindows.dll in standard MSYS2 paths!"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d "$DEPLOY_DIR/styles" ] || [ ! -f "$DEPLOY_DIR/styles/qwindowsvistastyle.dll" ]; then
|
||||
echo ">>> Manual fallback: Copying Qt 'styles' directory (qwindowsvistastyle.dll)..."
|
||||
mkdir -p "$DEPLOY_DIR/styles"
|
||||
for path in \
|
||||
"$MINGW_PREFIX/share/qt6/plugins/styles/qwindowsvistastyle.dll" \
|
||||
"$MINGW_PREFIX/share/qt5/plugins/styles/qwindowsvistastyle.dll" \
|
||||
"$MINGW_PREFIX/lib/qt6/plugins/styles/qwindowsvistastyle.dll" \
|
||||
"$MINGW_PREFIX/lib/qt5/plugins/styles/qwindowsvistastyle.dll"; do
|
||||
if [ -f "$path" ]; then
|
||||
echo " Found styles plugin at: $path"
|
||||
cp "$path" "$DEPLOY_DIR/styles/"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo ">>> Deploying Qt 'imageformats' directory (essential for SVG/ICO icons)..."
|
||||
mkdir -p "$DEPLOY_DIR/imageformats"
|
||||
COPIED_IMAGEFORMATS=false
|
||||
for path in \
|
||||
"$MINGW_PREFIX/share/qt6/plugins/imageformats" \
|
||||
"$MINGW_PREFIX/share/qt5/plugins/imageformats" \
|
||||
"$MINGW_PREFIX/lib/qt6/plugins/imageformats" \
|
||||
"$MINGW_PREFIX/lib/qt5/plugins/imageformats"; do
|
||||
if [ -d "$path" ]; then
|
||||
echo " Found imageformats plugin directory at: $path"
|
||||
cp -r "$path"/* "$DEPLOY_DIR/imageformats/" 2>/dev/null || true
|
||||
COPIED_IMAGEFORMATS=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$COPIED_IMAGEFORMATS" = false ]; then
|
||||
echo " WARNING: Could not find imageformats directory in standard MSYS2 paths!"
|
||||
fi
|
||||
|
||||
|
||||
# 9. Résolution dynamique des dépendances MinGW (ldd)
|
||||
echo ">>> Resolving system and 3rd party DLL dependencies using ldd..."
|
||||
TEMP_DEPENDENCY_LIST=$(mktemp)
|
||||
trap 'rm -f "$TEMP_DEPENDENCY_LIST"' EXIT
|
||||
|
||||
PREV_COUNT=0
|
||||
while true; do
|
||||
# Scanner tous les exe et dll présents dans le dossier de déploiement
|
||||
find "$DEPLOY_DIR" \( -name "*.exe" -o -name "*.dll" \) -exec ldd {} \; 2>/dev/null \
|
||||
| grep -i "$MINGW_PREFIX/bin" | awk '{print $3}' | sort -u > "$TEMP_DEPENDENCY_LIST"
|
||||
|
||||
CURR_COUNT=$(wc -l < "$TEMP_DEPENDENCY_LIST")
|
||||
if [ "$CURR_COUNT" -eq "$PREV_COUNT" ]; then
|
||||
break
|
||||
fi
|
||||
PREV_COUNT=$CURR_COUNT
|
||||
|
||||
while read -r dll_path; do
|
||||
if [ -f "$dll_path" ]; then
|
||||
dll_name=$(basename "$dll_path")
|
||||
# Ne pas écraser les DLL déjà présentes (Qt ou compilées localement)
|
||||
if [ ! -f "$DEPLOY_DIR/$dll_name" ]; then
|
||||
echo " Deploying dependency: $dll_name"
|
||||
cp "$dll_path" "$DEPLOY_DIR/"
|
||||
fi
|
||||
fi
|
||||
done < "$TEMP_DEPENDENCY_LIST"
|
||||
done
|
||||
rm -f "$TEMP_DEPENDENCY_LIST"
|
||||
|
||||
# Detect if we should strip debug symbols (only in explicit Release or MinSizeRel builds)
|
||||
IS_RELEASE_BUILD=false
|
||||
if [ -f "$BUILD_DIR/CMakeCache.txt" ]; then
|
||||
if grep -q "CMAKE_BUILD_TYPE:STRING=Release" "$BUILD_DIR/CMakeCache.txt" || grep -q "CMAKE_BUILD_TYPE:STRING=MinSizeRel" "$BUILD_DIR/CMakeCache.txt"; then
|
||||
IS_RELEASE_BUILD=true
|
||||
fi
|
||||
fi
|
||||
|
||||
# 9.5 Stripping debug symbols to reduce file sizes (shrinks exe from 91MB down to ~22MB)
|
||||
if [ "$IS_RELEASE_BUILD" = false ]; then
|
||||
echo ">>> Non-Release build detected (CMakeCache.txt). Skipping stripping of debug symbols to preserve GDB compatibility!"
|
||||
else
|
||||
echo ">>> Stripping debug symbols from our compiled binaries..."
|
||||
if command -v strip &> /dev/null; then
|
||||
# Strip main executables and core DLLs
|
||||
for binary in \
|
||||
"$DEPLOY_DIR"/retroshare-gui.exe \
|
||||
"$DEPLOY_DIR"/retroshare-service.exe \
|
||||
"$DEPLOY_DIR"/retroshare-friendserver.exe \
|
||||
"$DEPLOY_DIR"/retroshare.dll \
|
||||
"$DEPLOY_DIR"/libretroshare.dll \
|
||||
"$DEPLOY_DIR"/libcmark.dll \
|
||||
"$DEPLOY_DIR"/librestbed-shared.dll \
|
||||
"$DEPLOY_DIR"/librestbed.dll \
|
||||
"$DEPLOY_DIR"/librnp.dll; do
|
||||
if [ -f "$binary" ]; then
|
||||
echo " Stripping: $(basename "$binary")"
|
||||
strip "$binary" || true
|
||||
fi
|
||||
done
|
||||
# Strip plugins
|
||||
if [ -d "$DEPLOY_DIR/Data/extensions6" ]; then
|
||||
find "$DEPLOY_DIR/Data/extensions6" -name "*.dll" | while read -r plugin; do
|
||||
echo " Stripping plugin: $(basename "$plugin")"
|
||||
strip "$plugin" || true
|
||||
done
|
||||
fi
|
||||
else
|
||||
echo " WARNING: 'strip' tool not found. Skipping stripping of debug symbols."
|
||||
fi
|
||||
fi
|
||||
|
||||
# 10. Déploiement de la WebUI (si présente)
|
||||
echo ">>> Deploying WebUI static assets..."
|
||||
if [ -d "retroshare-webui/src" ]; then
|
||||
mkdir -p "$DEPLOY_DIR/webui"
|
||||
cp -r retroshare-webui/src/* "$DEPLOY_DIR/webui/" 2>/dev/null || true
|
||||
echo " WebUI copied to deployment folder."
|
||||
else
|
||||
echo " WebUI source folder not found. Skipping WebUI packaging."
|
||||
fi
|
||||
|
||||
# 11. Création de l'archive finale (7z en priorité, zip en fallback)
|
||||
echo ">>> Packaging final compressed archive..."
|
||||
(
|
||||
cd "$BUILD_DIR" || exit 1
|
||||
|
||||
if command -v 7z &> /dev/null; then
|
||||
echo " Using 7z for ultra high compression..."
|
||||
7z a -t7z -mx=9 "${ARCHIVE_BASE}.7z" "${ARCHIVE_BASE}"
|
||||
echo "================================================================================"
|
||||
echo "SUCCESS: Standalone package created at: ${BUILD_DIR}/${ARCHIVE_BASE}.7z"
|
||||
echo "================================================================================"
|
||||
elif command -v zip &> /dev/null; then
|
||||
echo " 7z not found. Falling back to standard zip..."
|
||||
zip -r "${ARCHIVE_BASE}.zip" "${ARCHIVE_BASE}"
|
||||
echo "================================================================================"
|
||||
echo "SUCCESS: Standalone package created at: ${BUILD_DIR}/${ARCHIVE_BASE}.zip"
|
||||
echo "================================================================================"
|
||||
else
|
||||
echo "================================================================================"
|
||||
echo "SUCCESS: Folder generated at: ${DEPLOY_DIR}"
|
||||
echo "NOTE: Neither '7z' nor 'zip' commands were found. Archive creation skipped."
|
||||
echo "================================================================================"
|
||||
fi
|
||||
)
|
||||
@ -16,7 +16,13 @@ if "%~1"=="clean" (
|
||||
goto exit
|
||||
)
|
||||
|
||||
if exist "%EnvMSYS2Path%\msys%MSYS2Base%\usr\bin\pacman.exe" (
|
||||
set MSYS2Version=20250622
|
||||
|
||||
set MSYS2Install=msys2-base-x86_64-%MSYS2Version%.sfx.exe
|
||||
set MSYS2Url=https://github.com/msys2/msys2-installer/releases/download/%MSYS2Version:~0,4%-%MSYS2Version:~4,2%-%MSYS2Version:~6,2%/%MSYS2Install%
|
||||
set MSYS2UnpackPath=%EnvMSYS2Path%\msys64
|
||||
|
||||
if exist "%MSYS2UnpackPath%\usr\bin\pacman.exe" (
|
||||
if "%~1"=="reinstall" (
|
||||
choice /M "Found existing MSYS2 version. Do you want to proceed?"
|
||||
if !ERRORLEVEL!==2 goto exit
|
||||
@ -25,30 +31,26 @@ if exist "%EnvMSYS2Path%\msys%MSYS2Base%\usr\bin\pacman.exe" (
|
||||
)
|
||||
)
|
||||
|
||||
if "%MSYS2Architecture%"=="i686" set MSYS2Version=20210705
|
||||
if "%MSYS2Architecture%"=="x86_64" set MSYS2Version=20210725
|
||||
if exist "%MSYS2UnpackPath%" (
|
||||
%cecho% info "Remove previous MSYS2 version"
|
||||
call "%ToolsPath%\remove-dir.bat" "%MSYS2UnpackPath%"
|
||||
)
|
||||
|
||||
set MSYS2Install=msys2-base-%MSYS2Architecture%-%MSYS2Version%.tar.xz
|
||||
set MSYS2Url=https://repo.msys2.org/distrib/%MSYS2Architecture%/%MSYS2Install%
|
||||
|
||||
%cecho% info "Remove previous MSYS2 version"
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvMSYS2Path%"
|
||||
|
||||
%cecho% info "Download installation files"
|
||||
%cecho% info "Download MSYS2 installation files"
|
||||
if not exist "%EnvDownloadPath%\%MSYS2Install%" call "%ToolsPath%\download-file.bat" "%MSYS2Url%" "%EnvDownloadPath%\%MSYS2Install%"
|
||||
if not exist "%EnvDownloadPath%\%MSYS2Install%" %cecho% error "Cannot download MSYS" & goto error
|
||||
|
||||
%cecho% info "Unpack MSYS2"
|
||||
"%EnvSevenZipExe%" x -so "%EnvDownloadPath%\%MSYS2Install%" | "%EnvSevenZipExe%" x -y -si -ttar -o"%EnvMSYS2Path%"
|
||||
"%EnvDownloadPath%\%MSYS2Install%" -y -o"%EnvMSYS2Path%"
|
||||
|
||||
set MSYS2SH=%EnvMSYS2Path%\msys%MSYS2Base%\usr\bin\sh
|
||||
set MSYS2SH=%MSYS2UnpackPath%\usr\bin\sh
|
||||
|
||||
%cecho% info "Initialize MSYS2"
|
||||
"%MSYS2SH%" -lc "yes | pacman --noconfirm -Syuu msys2-keyring"
|
||||
"%MSYS2SH%" -lc "pacman --noconfirm -Sy"
|
||||
"%MSYS2SH%" -lc "pacman --noconfirm -Su"
|
||||
|
||||
call "%EnvMSYS2Path%\msys%MSYS2Base%\autorebase.bat"
|
||||
call "%MSYS2UnpackPath%\autorebase.bat"
|
||||
|
||||
:exit
|
||||
endlocal
|
||||
|
||||
@ -4,8 +4,8 @@ if "%EnvRootPath%"=="" exit /B 1
|
||||
|
||||
set CEchoUrl=https://github.com/lordmulder/cecho/releases/download/2015-10-10/cecho.2015-10-10.zip
|
||||
set CEchoInstall=cecho.2015-10-10.zip
|
||||
set SevenZipUrl=https://sourceforge.net/projects/sevenzip/files/7-Zip/18.05/7z1805.msi/download
|
||||
set SevenZipInstall=7z1805.msi
|
||||
set SevenZipUrl=https://www.7-zip.org/a/7z2600-x64.msi
|
||||
set SevenZipInstall=7z2600-x64.msi
|
||||
|
||||
if not exist "%EnvToolsPath%\7z.exe" (
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
@ -34,7 +34,7 @@ if not exist "%EnvToolsPath%\cecho.exe" (
|
||||
if not exist "%EnvDownloadPath%\%cCEhoInstall%" echo Cannot download cecho installation& goto error
|
||||
|
||||
echo Unpack cecho
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%CEchoInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%CEchoInstall%" -y -bso0
|
||||
copy "%EnvTempPath%\cecho.exe" "%EnvToolsPath%"
|
||||
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
|
||||
@ -2,18 +2,13 @@
|
||||
|
||||
setlocal
|
||||
|
||||
if exist "%~dp0msys2\msys32" call :update 32
|
||||
if exist "%~dp0msys2\msys64" call :update 64
|
||||
if not exist "%~dp0msys2\msys64" goto :EOF
|
||||
|
||||
goto :EOF
|
||||
set MSYS2SH=%~dp0msys2\msys64\usr\bin\sh
|
||||
|
||||
:update
|
||||
set MSYS2SH=%~dp0msys2\msys%~1\usr\bin\sh
|
||||
|
||||
echo Update MSYS2 %~1
|
||||
echo Update MSYS2
|
||||
"%MSYS2SH%" -lc "yes | pacman --noconfirm -Syuu msys2-keyring"
|
||||
"%MSYS2SH%" -lc "pacman --noconfirm -Su"
|
||||
|
||||
:exit
|
||||
endlocal
|
||||
goto :EOF
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
;!define REVISION ""
|
||||
;!define DEPLOYDIR ""
|
||||
;!define ARCHITECTURE ""
|
||||
;!define TOOLCHAIN ""
|
||||
|
||||
# Optional defines
|
||||
;!define OUTDIR ""
|
||||
@ -21,6 +22,9 @@
|
||||
!ifndef ARCHITECTURE
|
||||
!error "ARCHITECTURE is not defined"
|
||||
!endif
|
||||
!ifndef TOOLCHAIN
|
||||
!error "TOOLCHAIN is not defined"
|
||||
!endif
|
||||
|
||||
# Check optional defines
|
||||
!ifdef OUTDIR
|
||||
@ -72,7 +76,7 @@ ${!defineifexist} TOR_EXISTS "${DEPLOYDIR}\tor.exe"
|
||||
# Main Install settings
|
||||
Name "${APPNAMEANDVERSION}"
|
||||
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
||||
OutFile "${OUTDIR_}RetroShare-${VERSION}-${Date}-${REVISION}-${ARCHITECTURE}${RSTYPE}${INSTALLERADD}-setup.exe"
|
||||
OutFile "${OUTDIR_}RetroShare-${VERSION}-${Date}-${REVISION}-Qt-${QTVERSION}-${TOOLCHAIN}-msys2${RSTYPE}${INSTALLERADD}-setup.exe"
|
||||
BrandingText "${APPNAMEANDVERSION}"
|
||||
RequestExecutionlevel highest
|
||||
# Use compression
|
||||
@ -44,8 +44,9 @@ Run the scripts in this order:
|
||||
**Always delete the build artifacts folder if you enable or disable extra features after the build command: <sourcefolder>-msys2\deploy\builds**
|
||||
|
||||
* Mandatory
|
||||
* 32 or 64: 32 or 64 bit version
|
||||
* 32, 64, mingw32, mingw64, ucrt64, clang32, clang64 or clangarm64: It sets the msys2 build environment to the selected value. 32 is a shortcut for mingw32, 64 is a shortcut for mingw64. Default in build.bat and buil-tor.bat is 64.
|
||||
* release or debug: normally you would like to use the release option
|
||||
* qt5 or qt6: build with Qt 5 (default) or Qt 6
|
||||
* Extra features (optional)
|
||||
* autologin: enable autologin
|
||||
* plugins: build plugins
|
||||
@ -55,7 +56,6 @@ Run the scripts in this order:
|
||||
* "CONFIG+=..." enable other extra compile time features, you can find the almost complete list in file *<sourcefolder>\retroshare.pri*
|
||||
* For fixing compile problems (optional)
|
||||
* singlethread: use only 1 thread for building, slow but useful if you don't find the error message in the console
|
||||
* clang: use clang compiler instead of GCC
|
||||
* noupdate: skip the msys2 update step, sometimes some msys2 packages are broken, you can manually switch back to the older package, and this option will prevent updating to the broken version again
|
||||
|
||||
Example:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
:: Usage:
|
||||
:: call get-qt-version.bat variable
|
||||
:: call get-qt-version.bat variable qmake
|
||||
|
||||
setlocal
|
||||
|
||||
@ -10,9 +10,16 @@ if "%Var%"=="" (
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
set QMakeCmd=%~2
|
||||
if "%QMakeCmd%"=="" (
|
||||
echo.
|
||||
echo Parameter error.
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
set QtVersion=
|
||||
|
||||
%EnvMSYS2Cmd% "qmake -version" >"%~dp0qtversion.tmp"
|
||||
%EnvMSYS2Cmd% "%QMakeCmd% -version" >"%~dp0qtversion.tmp"
|
||||
for /F "tokens=1,2,3,4" %%A in (%~sdp0qtversion.tmp) do (
|
||||
if "%%A"=="Using" (
|
||||
set QtVersion=%%D
|
||||
|
||||
32
build_scripts/Windows-msys2/tools/get-rs-date.bat
Normal file
32
build_scripts/Windows-msys2/tools/get-rs-date.bat
Normal file
@ -0,0 +1,32 @@
|
||||
REM Usage:
|
||||
REM call get-rs-date.bat SourcePath Variable
|
||||
|
||||
setlocal
|
||||
|
||||
set SourcePath=%~1
|
||||
set Variable=%~2
|
||||
if "%Variable%"=="" (
|
||||
echo.
|
||||
echo Parameter error
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
:: Check git executable
|
||||
set GitPath=
|
||||
call "%~dp0find-in-path.bat" GitPath git.exe
|
||||
if "%GitPath%"=="" (
|
||||
echo.
|
||||
echo Git executable not found in PATH.
|
||||
exit /B 1
|
||||
)
|
||||
|
||||
set Date=
|
||||
|
||||
pushd "%SourcePath%"
|
||||
rem This doesn't work: git log -1 --date=format:"%Y%m%d" --format="%ad"
|
||||
for /F "tokens=1,2,3* delims=-" %%A in ('git log -1 --date^=short --format^="%%ad"') do set Date=%%A%%B%%C
|
||||
popd
|
||||
|
||||
:exit
|
||||
endlocal & set %Variable%=%Date%
|
||||
exit /B 0
|
||||
35
build_scripts/Windows/Windows-QtCreator-InstallGuide.md
Normal file
35
build_scripts/Windows/Windows-QtCreator-InstallGuide.md
Normal file
@ -0,0 +1,35 @@
|
||||
## Build Retroshare with QtCreator & Qt 6.9 on Windows
|
||||
|
||||
### Qt 6.9 Installation
|
||||
|
||||
Download Qt 6.9 from: https://www.qt.io/download-dev
|
||||
|
||||
Run the installer and install Qt 6.9
|
||||
|
||||
Add GCC.exe to Path
|
||||
|
||||
C:\Qt\Tools\mingw1310_64\bin
|
||||
|
||||
Compile the external libs start build-libs.bat:
|
||||
|
||||
Open Qt Command Prompt:
|
||||
|
||||
cd C:\Users\User\Documents\GitHub\RetroShare\build_scripts\Windows\build-libs
|
||||
|
||||
Type (this will take some time to build all libs):
|
||||
|
||||
build-libs.bat
|
||||
|
||||
Open Qt Creator
|
||||
|
||||
Open project -> RetroShare.pro
|
||||
|
||||
After Project loaded, go to:
|
||||
|
||||
Projects->Build->Build Steps->Additional arguments:
|
||||
|
||||
Add EXTERNAL_LIB_DIR:
|
||||
|
||||
"EXTERNAL_LIB_DIR=%{sourceDir}\..\RetroShare-env\build-libs\gcc-13.1.0\x64\libs"
|
||||
|
||||
After done, Build Project
|
||||
@ -1,24 +1,32 @@
|
||||
ZLIB_VERSION=1.2.11
|
||||
BZIP2_VERSION=1.0.8
|
||||
MINIUPNPC_VERSION=2.2.3
|
||||
OPENSSL_VERSION=1.1.1p
|
||||
SPEEX_VERSION=1.2.0
|
||||
SPEEXDSP_VERSION=1.2.0
|
||||
LIBXML2_VERSION=2.9.12
|
||||
LIBXSLT_VERSION=1.1.34
|
||||
CURL_VERSION=7.81.0
|
||||
OPENSSL_VERSION=1.1.1w
|
||||
SPEEX_VERSION=1.2.1
|
||||
SPEEXDSP_VERSION=1.2.1
|
||||
LIBXML2_MAIN_VERSION=2.14
|
||||
LIBXML2_VERSION=$(LIBXML2_MAIN_VERSION).5
|
||||
LIBXSLT_MAIN_VERSION=1.1
|
||||
LIBXSLT_VERSION=$(LIBXSLT_MAIN_VERSION).43
|
||||
CURL_VERSION=8.9.1
|
||||
TCL_VERSION=8.6.10
|
||||
SQLCIPHER_VERSION=4.5.0
|
||||
LIBMICROHTTPD_VERSION=0.9.75
|
||||
FFMPEG_VERSION=4.4
|
||||
FFMPEG_VERSION=4.4.6
|
||||
RAPIDJSON_VERSION=1.1.0
|
||||
XAPIAN_VERSION=1.4.19
|
||||
XAPIAN_VERSION=1.4.29
|
||||
ASIO_VERSION=1-34-2
|
||||
#RNP_VERSION=0.17.1
|
||||
|
||||
# libaries for rnp
|
||||
JSON_C_VERSION=0.18
|
||||
BOTAN_VERSION=2.19.5
|
||||
|
||||
DOWNLOAD_PATH?=download
|
||||
BUILD_PATH=build
|
||||
LIBS_PATH?=libs
|
||||
|
||||
all: dirs zlib bzip2 miniupnpc openssl speex speexdsp libxml2 libxslt curl sqlcipher libmicrohttpd ffmpeg rapidjson xapian copylibs
|
||||
all: dirs zlib bzip2 miniupnpc openssl speex speexdsp libxml curl sqlcipher ffmpeg rapidjson xapian jsonc botan asio copylibs
|
||||
#rnp
|
||||
|
||||
download: \
|
||||
$(DOWNLOAD_PATH)/zlib-$(ZLIB_VERSION).tar.gz \
|
||||
@ -27,13 +35,12 @@ download: \
|
||||
$(DOWNLOAD_PATH)/openssl-$(OPENSSL_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/speex-$(SPEEX_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/speexdsp-$(SPEEXDSP_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.xz \
|
||||
$(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.xz \
|
||||
$(DOWNLOAD_PATH)/curl-$(CURL_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/tcl$(TCL_VERSION)-src.tar.gz \
|
||||
$(DOWNLOAD_PATH)/sqlcipher-$(SQLCIPHER_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.xz \
|
||||
$(DOWNLOAD_PATH)/rapidjson-$(RAPIDJSON_VERSION).tar.gz \
|
||||
$(DOWNLOAD_PATH)/xapian-core-$(XAPIAN_VERSION).tar.xz
|
||||
|
||||
@ -56,8 +63,7 @@ $(BUILD_PATH)/zlib-$(ZLIB_VERSION): $(DOWNLOAD_PATH)/zlib-$(ZLIB_VERSION).tar.gz
|
||||
rm -r -f $(BUILD_PATH)/zlib-*
|
||||
tar xvf $(DOWNLOAD_PATH)/zlib-$(ZLIB_VERSION).tar.gz
|
||||
# build
|
||||
cd zlib-$(ZLIB_VERSION) && make -f win32/Makefile.gcc libz.a
|
||||
cd zlib-$(ZLIB_VERSION) && make
|
||||
cd zlib-$(ZLIB_VERSION) && make -j -f win32/Makefile.gcc libz.a
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/zlib-$(ZLIB_VERSION).tmp/include
|
||||
cp zlib-$(ZLIB_VERSION)/zlib.h $(BUILD_PATH)/zlib-$(ZLIB_VERSION).tmp/include/
|
||||
@ -79,7 +85,7 @@ $(BUILD_PATH)/bzip2-$(BZIP2_VERSION): $(DOWNLOAD_PATH)/bzip2-$(BZIP2_VERSION).ta
|
||||
tar xvf $(DOWNLOAD_PATH)/bzip2-$(BZIP2_VERSION).tar.gz
|
||||
# build
|
||||
#cd bzip2-$(BZIP2_VERSION) && make install PREFIX="`pwd`/../$(BUILD_PATH)"
|
||||
cd bzip2-$(BZIP2_VERSION) && make
|
||||
cd bzip2-$(BZIP2_VERSION) && make -j
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/bzip2-$(BZIP2_VERSION).tmp/include
|
||||
cp bzip2-$(BZIP2_VERSION)/bzlib.h $(BUILD_PATH)/bzip2-$(BZIP2_VERSION).tmp/include/
|
||||
@ -99,7 +105,7 @@ $(BUILD_PATH)/miniupnpc-$(MINIUPNPC_VERSION): $(DOWNLOAD_PATH)/miniupnpc-$(MINIU
|
||||
rm -r -f $(BUILD_PATH)/miniupnpc-*
|
||||
tar xvf $(DOWNLOAD_PATH)/miniupnpc-$(MINIUPNPC_VERSION).tar.gz
|
||||
# build
|
||||
cd miniupnpc-$(MINIUPNPC_VERSION) && export CC=gcc && export PATH=.:$$PATH && make -f Makefile.mingw libminiupnpc.a miniupnpc.dll
|
||||
cd miniupnpc-$(MINIUPNPC_VERSION) && export CC=gcc && export PATH=.:$$PATH && make -j -f Makefile.mingw libminiupnpc.a miniupnpc.dll
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/miniupnpc-$(MINIUPNPC_VERSION).tmp/include/miniupnpc
|
||||
cp miniupnpc-$(MINIUPNPC_VERSION)/include/*.h $(BUILD_PATH)/miniupnpc-$(MINIUPNPC_VERSION).tmp/include/miniupnpc/
|
||||
@ -124,7 +130,7 @@ $(BUILD_PATH)/openssl-$(OPENSSL_VERSION): $(DOWNLOAD_PATH)/openssl-$(OPENSSL_VER
|
||||
#cd openssl-$(OPENSSL_VERSION) && ./config --prefix="`pwd`/../$(BUILD_PATH)"
|
||||
#cd openssl-$(OPENSSL_VERSION) && make install
|
||||
cd openssl-$(OPENSSL_VERSION) && ./config shared
|
||||
cd openssl-$(OPENSSL_VERSION) && make
|
||||
cd openssl-$(OPENSSL_VERSION) && make -j
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/openssl-$(OPENSSL_VERSION).tmp/include/openssl
|
||||
cp openssl-$(OPENSSL_VERSION)/include/openssl/*.h $(BUILD_PATH)/openssl-$(OPENSSL_VERSION).tmp/include/openssl/
|
||||
@ -153,7 +159,7 @@ $(BUILD_PATH)/speex-$(SPEEX_VERSION): $(DOWNLOAD_PATH)/speex-$(SPEEX_VERSION).ta
|
||||
# build
|
||||
cd speex-$(SPEEX_VERSION) && ./configure
|
||||
#cd speex-$(SPEEX_VERSION) && make install exec_prefix="`pwd`/../$(BUILD_PATH)"
|
||||
cd speex-$(SPEEX_VERSION) && make
|
||||
cd speex-$(SPEEX_VERSION) && make -j
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/speex-$(SPEEX_VERSION).tmp/include/speex
|
||||
cp speex-$(SPEEX_VERSION)/include/speex/*.h $(BUILD_PATH)/speex-$(SPEEX_VERSION).tmp/include/speex/
|
||||
@ -174,7 +180,7 @@ $(BUILD_PATH)/speexdsp-$(SPEEXDSP_VERSION): $(DOWNLOAD_PATH)/speexdsp-$(SPEEXDSP
|
||||
tar xvf $(DOWNLOAD_PATH)/speexdsp-$(SPEEXDSP_VERSION).tar.gz
|
||||
# build
|
||||
cd speexdsp-$(SPEEXDSP_VERSION) && ./configure
|
||||
cd speexdsp-$(SPEEXDSP_VERSION) && make
|
||||
cd speexdsp-$(SPEEXDSP_VERSION) && make -j
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/speexdsp-$(SPEEXDSP_VERSION).tmp/include/speex
|
||||
cp speexdsp-$(SPEEXDSP_VERSION)/include/speex/*.h $(BUILD_PATH)/speexdsp-$(SPEEXDSP_VERSION).tmp/include/speex/
|
||||
@ -184,50 +190,52 @@ $(BUILD_PATH)/speexdsp-$(SPEEXDSP_VERSION): $(DOWNLOAD_PATH)/speexdsp-$(SPEEXDSP
|
||||
rm -r -f speexdsp-$(SPEEXDSP_VERSION)
|
||||
mv $(BUILD_PATH)/speexdsp-$(SPEEXDSP_VERSION).tmp $(BUILD_PATH)/speexdsp-$(SPEEXDSP_VERSION)
|
||||
|
||||
libxml2: $(BUILD_PATH)/libxml2-$(LIBXML2_VERSION)
|
||||
libxml: \
|
||||
$(BUILD_PATH)/libxml2-$(LIBXML2_VERSION) \
|
||||
$(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION)
|
||||
|
||||
$(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.gz:
|
||||
wget ftp://xmlsoft.org/libxml2/libxml2-$(LIBXML2_VERSION).tar.gz -O $(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.gz
|
||||
$(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.xz:
|
||||
wget --no-check-certificate https://download.gnome.org/sources/libxml2/$(LIBXML2_MAIN_VERSION)/libxml2-$(LIBXML2_VERSION).tar.xz -O $(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.xz
|
||||
|
||||
$(BUILD_PATH)/libxml2-$(LIBXML2_VERSION): $(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.gz
|
||||
# prepare
|
||||
$(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.xz:
|
||||
wget --no-check-certificate https://download.gnome.org/sources/libxslt/$(LIBXSLT_MAIN_VERSION)/libxslt-$(LIBXSLT_VERSION).tar.xz -O $(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.xz
|
||||
|
||||
$(BUILD_PATH)/libxml2-$(LIBXML2_VERSION) $(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION): \
|
||||
$(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.xz \
|
||||
$(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.xz
|
||||
# libxml2: prepare
|
||||
pacman --needed --noconfirm -S python3 pkg-config
|
||||
rm -r -f $(BUILD_PATH)/libxml2-*
|
||||
tar xvf $(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.gz
|
||||
# build
|
||||
tar xvf $(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.xz
|
||||
# libxslt: prepare
|
||||
rm -r -f $(BUILD_PATH)/libxslt-*
|
||||
tar xvf $(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.xz
|
||||
tar xvf $(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.xz
|
||||
# libxml2: build
|
||||
cd libxml2-$(LIBXML2_VERSION) && ./configure --without-iconv -enable-shared=no
|
||||
#cd libxml2-$(LIBXML2_VERSION) && make install exec_prefix="`pwd`/../$(BUILD_PATH)"
|
||||
cd libxml2-$(LIBXML2_VERSION) && make
|
||||
# copy files
|
||||
cd libxml2-$(LIBXML2_VERSION) && make -j libxml2.la
|
||||
# libxslt: build
|
||||
cd libxslt-$(LIBXSLT_VERSION) && ./configure --with-libxml-src=../libxml2-$(LIBXML2_VERSION) -enable-shared=no CFLAGS=-DLIBXML_STATIC
|
||||
cd libxslt-$(LIBXSLT_VERSION)/libxslt && make -j
|
||||
cd libxslt-$(LIBXSLT_VERSION)/libexslt && make -j
|
||||
# libxml2: copy files
|
||||
mkdir -p $(BUILD_PATH)/libxml2-$(LIBXML2_VERSION).tmp/include/libxml
|
||||
cp libxml2-$(LIBXML2_VERSION)/include/libxml/*.h $(BUILD_PATH)/libxml2-$(LIBXML2_VERSION).tmp/include/libxml/
|
||||
mkdir -p $(BUILD_PATH)/libxml2-$(LIBXML2_VERSION).tmp/lib
|
||||
cp libxml2-$(LIBXML2_VERSION)/.libs/libxml2.a $(BUILD_PATH)/libxml2-$(LIBXML2_VERSION).tmp/lib/
|
||||
# cleanup
|
||||
#rm -r -f libxml2-$(LIBXML2_VERSION) # see libxslt
|
||||
mv $(BUILD_PATH)/libxml2-$(LIBXML2_VERSION).tmp $(BUILD_PATH)/libxml2-$(LIBXML2_VERSION)
|
||||
|
||||
libxslt: $(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION)
|
||||
|
||||
$(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.gz:
|
||||
wget ftp://xmlsoft.org/libxml2/libxslt-$(LIBXSLT_VERSION).tar.gz -O $(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.gz
|
||||
|
||||
$(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION): $(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.gz $(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.gz
|
||||
# prepare
|
||||
rm -r -f $(BUILD_PATH)/libxslt-*
|
||||
tar xvf $(DOWNLOAD_PATH)/libxml2-$(LIBXML2_VERSION).tar.gz
|
||||
tar xvf $(DOWNLOAD_PATH)/libxslt-$(LIBXSLT_VERSION).tar.gz
|
||||
# build
|
||||
cd libxslt-$(LIBXSLT_VERSION) && ./configure --with-libxml-src=../libxml2-$(LIBXML2_VERSION) -enable-shared=no CFLAGS=-DLIBXML_STATIC
|
||||
cd libxslt-$(LIBXSLT_VERSION) && make
|
||||
# copy files
|
||||
# libxslt: copy files
|
||||
mkdir -p $(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION).tmp/include/libxslt
|
||||
cp libxslt-$(LIBXSLT_VERSION)/libxslt/*.h $(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION).tmp/include/libxslt/
|
||||
mkdir -p $(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION).tmp/lib
|
||||
cp libxslt-$(LIBXSLT_VERSION)/libxslt/.libs/libxslt.a $(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION).tmp/lib/
|
||||
cp libxslt-$(LIBXSLT_VERSION)/libexslt/.libs/libexslt.a $(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION).tmp/lib/
|
||||
# cleanup
|
||||
# libxml2: cleanup
|
||||
rm -r -f libxml2-$(LIBXML2_VERSION)
|
||||
# libxslt: cleanup
|
||||
rm -r -f libxslt-$(LIBXSLT_VERSION)
|
||||
# finish
|
||||
mv $(BUILD_PATH)/libxml2-$(LIBXML2_VERSION).tmp $(BUILD_PATH)/libxml2-$(LIBXML2_VERSION)
|
||||
mv $(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION).tmp $(BUILD_PATH)/libxslt-$(LIBXSLT_VERSION)
|
||||
|
||||
curl: $(BUILD_PATH)/curl-$(CURL_VERSION)
|
||||
@ -242,7 +250,7 @@ $(BUILD_PATH)/curl-$(CURL_VERSION): $(DOWNLOAD_PATH)/curl-$(CURL_VERSION).tar.gz
|
||||
# build
|
||||
cd curl-$(CURL_VERSION) && ./configure --disable-shared --with-ssl="`pwd`/../$(BUILD_PATH)/openssl-$(OPENSSL_VERSION)"
|
||||
#cd curl-$(CURL_VERSION) && make install exec_prefix="`pwd`/../$(BUILD_PATH)"
|
||||
cd curl-$(CURL_VERSION) && make
|
||||
cd curl-$(CURL_VERSION)/lib && make -j
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/curl-$(CURL_VERSION).tmp/include/curl
|
||||
cp curl-$(CURL_VERSION)/include/curl/*.h $(BUILD_PATH)/curl-$(CURL_VERSION).tmp/include/curl/
|
||||
@ -267,14 +275,14 @@ $(BUILD_PATH)/sqlcipher-$(SQLCIPHER_VERSION): $(DOWNLOAD_PATH)/tcl$(TCL_VERSION)
|
||||
tar xvf $(DOWNLOAD_PATH)/tcl$(TCL_VERSION)-src.tar.gz
|
||||
mkdir -p tcl$(TCL_VERSION)/build
|
||||
cd tcl$(TCL_VERSION)/build && ../win/configure
|
||||
cd tcl$(TCL_VERSION)/build && make
|
||||
cd tcl$(TCL_VERSION)/build && make -j
|
||||
#sqlcipher
|
||||
tar xvf $(DOWNLOAD_PATH)/sqlcipher-$(SQLCIPHER_VERSION).tar.gz
|
||||
cd sqlcipher-$(SQLCIPHER_VERSION) && ln -s ../tcl$(TCL_VERSION)/build/tclsh86.exe tclsh
|
||||
mkdir -p tcl$(TCL_VERSION)/lib
|
||||
ln -s `pwd`/tcl$(TCL_VERSION)/library `pwd`/tcl$(TCL_VERSION)/lib/tcl8.6
|
||||
# build
|
||||
cd sqlcipher-$(SQLCIPHER_VERSION) && PATH=.:$$PATH:`pwd`/../tcl$(TCL_VERSION)/build && export LIBS="-L`pwd`/../$(BUILD_PATH)/openssl-$(OPENSSL_VERSION)/lib -lgdi32 $$LIBS" && ./configure --disable-shared --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -I`pwd`/../$(BUILD_PATH)/openssl-$(OPENSSL_VERSION)/include -I`pwd`/../tcl$(TCL_VERSION)/generic" LDFLAGS="-L`pwd`/../$(BUILD_PATH)/openssl-$(OPENSSL_VERSION)/lib -lcrypto -lgdi32" --with-tcl="`pwd`/../tcl$(TCL_VERSION)/build" && make install prefix="`pwd`/install"
|
||||
cd sqlcipher-$(SQLCIPHER_VERSION) && PATH=.:$$PATH:`pwd`/../tcl$(TCL_VERSION)/build && export LIBS="-L`pwd`/../$(BUILD_PATH)/openssl-$(OPENSSL_VERSION)/lib -lgdi32 $$LIBS" && ./configure --disable-shared --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -I`pwd`/../$(BUILD_PATH)/openssl-$(OPENSSL_VERSION)/include -I`pwd`/../tcl$(TCL_VERSION)/generic" LDFLAGS="-L`pwd`/../$(BUILD_PATH)/openssl-$(OPENSSL_VERSION)/lib -lcrypto -lgdi32" --with-tcl="`pwd`/../tcl$(TCL_VERSION)/build" && make -j install prefix="`pwd`/install"
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/sqlcipher-$(SQLCIPHER_VERSION).tmp/include
|
||||
cp -r sqlcipher-$(SQLCIPHER_VERSION)/install/include/* $(BUILD_PATH)/sqlcipher-$(SQLCIPHER_VERSION).tmp/include/
|
||||
@ -287,34 +295,18 @@ $(BUILD_PATH)/sqlcipher-$(SQLCIPHER_VERSION): $(DOWNLOAD_PATH)/tcl$(TCL_VERSION)
|
||||
rm -r -f tcl$(TCL_VERSION)
|
||||
mv $(BUILD_PATH)/sqlcipher-$(SQLCIPHER_VERSION).tmp $(BUILD_PATH)/sqlcipher-$(SQLCIPHER_VERSION)
|
||||
|
||||
libmicrohttpd: $(BUILD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION)
|
||||
|
||||
$(DOWNLOAD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION).tar.gz:
|
||||
wget --no-check-certificate http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-$(LIBMICROHTTPD_VERSION).tar.gz -O $(DOWNLOAD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION).tar.gz
|
||||
|
||||
$(BUILD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION): $(DOWNLOAD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION).tar.gz
|
||||
# prepare
|
||||
rm -r -f $(BUILD_PATH)/libmicrohttpd-*
|
||||
tar xvf $(DOWNLOAD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION).tar.gz
|
||||
# build
|
||||
cd libmicrohttpd-$(LIBMICROHTTPD_VERSION) && ./configure --disable-shared --enable-static --prefix="`pwd`/../$(BUILD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION).tmp"
|
||||
cd libmicrohttpd-$(LIBMICROHTTPD_VERSION) && make install
|
||||
# cleanup
|
||||
rm -r -f libmicrohttpd-$(LIBMICROHTTPD_VERSION)
|
||||
mv $(BUILD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION).tmp $(BUILD_PATH)/libmicrohttpd-$(LIBMICROHTTPD_VERSION)
|
||||
|
||||
ffmpeg: $(BUILD_PATH)/ffmpeg-$(FFMPEG_VERSION)
|
||||
|
||||
$(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.gz:
|
||||
wget --no-check-certificate https://ffmpeg.org/releases/ffmpeg-$(FFMPEG_VERSION).tar.gz -O $(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.gz
|
||||
$(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.xz:
|
||||
wget --no-check-certificate https://ffmpeg.org/releases/ffmpeg-$(FFMPEG_VERSION).tar.xz -O $(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.xz
|
||||
|
||||
$(BUILD_PATH)/ffmpeg-$(FFMPEG_VERSION): $(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.gz
|
||||
$(BUILD_PATH)/ffmpeg-$(FFMPEG_VERSION): $(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.xz
|
||||
# prepare
|
||||
rm -r -f $(BUILD_PATH)/ffmpeg-*
|
||||
tar xvf $(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.gz
|
||||
tar xvf $(DOWNLOAD_PATH)/ffmpeg-$(FFMPEG_VERSION).tar.xz
|
||||
# build
|
||||
cd ffmpeg-$(FFMPEG_VERSION) && ./configure --disable-shared --enable-static --disable-programs --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-yasm --disable-everything --enable-encoder=mpeg4 --enable-decoder=mpeg4 --prefix="`pwd`/../$(BUILD_PATH)/ffmpeg-$(FFMPEG_VERSION).tmp"
|
||||
cd ffmpeg-$(FFMPEG_VERSION) && make install
|
||||
cd ffmpeg-$(FFMPEG_VERSION) && make -j install
|
||||
# cleanup
|
||||
rm -r -f ffmpeg-$(FFMPEG_VERSION)
|
||||
mv $(BUILD_PATH)/ffmpeg-$(FFMPEG_VERSION).tmp $(BUILD_PATH)/ffmpeg-$(FFMPEG_VERSION)
|
||||
@ -352,7 +344,7 @@ $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION): $(DOWNLOAD_PATH)/xapian-core-$(XAPI
|
||||
#cd xapian-core-$(XAPIAN_VERSION) && ./configure --disable-shared --enable-static --prefix="`pwd`/../$(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION).tmp"
|
||||
#cd xapian-core-$(XAPIAN_VERSION) && make install
|
||||
cd xapian-core-$(XAPIAN_VERSION) && ./configure --disable-shared --enable-static
|
||||
cd xapian-core-$(XAPIAN_VERSION) && make
|
||||
cd xapian-core-$(XAPIAN_VERSION) && make -j
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION).tmp/include
|
||||
cp -r xapian-core-$(XAPIAN_VERSION)/include/* $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION).tmp/include/
|
||||
@ -363,8 +355,73 @@ $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION): $(DOWNLOAD_PATH)/xapian-core-$(XAPI
|
||||
rm -r -f xapian-core-$(XAPIAN_VERSION)
|
||||
mv $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION).tmp $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION)
|
||||
|
||||
jsonc: $(BUILD_PATH)/json-c-$(JSON_C_VERSION)
|
||||
|
||||
$(BUILD_PATH)/json-c-$(JSON_C_VERSION):
|
||||
# prepare
|
||||
rm -r -f $(BUILD_PATH)/json-c-*
|
||||
[ -d "json-c-$(JSON_C_VERSION)" ] || git clone https://github.com/json-c/json-c.git --depth=1 --branch json-c-$(JSON_C_VERSION) "json-c-$(JSON_C_VERSION)"
|
||||
# build
|
||||
mkdir -p json-c-$(JSON_C_VERSION)/build
|
||||
cd json-c-$(JSON_C_VERSION)/build && cmake .. -G"MSYS Makefiles" -Wno-dev -DCMAKE_BUILD_TYPE="release" -DBUILD_SHARED_LIBS=off -DBUILD_STATIC_LIBS=on -DBUILD_TESTING=off -DCMAKE_CXX_FLAGS="-D__MINGW_USE_VC2005_COMPAT" -DCMAKE_INSTALL_PREFIX="`pwd`/install" -DCMAKE_INSTALL_PREFIX="`pwd`/../../$(BUILD_PATH)/json-c-$(JSON_C_VERSION).tmp"
|
||||
cd json-c-$(JSON_C_VERSION)/build && make -j install
|
||||
# cleanup
|
||||
rm -r -f json-c-$(JSON_C_VERSION)
|
||||
mv $(BUILD_PATH)/json-c-$(JSON_C_VERSION).tmp $(BUILD_PATH)/json-c-$(JSON_C_VERSION)
|
||||
|
||||
botan: $(BUILD_PATH)/botan-$(BOTAN_VERSION)
|
||||
|
||||
$(BUILD_PATH)/botan-$(BOTAN_VERSION):
|
||||
# prepare
|
||||
pacman --needed --noconfirm -S python3
|
||||
rm -r -f $(BUILD_PATH)/botan-*
|
||||
[ -d "botan-$(BOTAN_VERSION)" ] || git clone https://github.com/randombit/botan.git --depth=1 --branch $(BOTAN_VERSION) "botan-$(BOTAN_VERSION)"
|
||||
# build
|
||||
if [ $(MSYSTEM) = "MINGW32" ] ; then cd botan-$(BOTAN_VERSION) && ./configure.py --os=mingw --cpu=x86_32 --disable-shared-library --enable-static-library --extra-cxxflags="-D__MINGW_USE_VC2005_COMPAT" --prefix="`pwd`/../$(BUILD_PATH)/botan-$(BOTAN_VERSION).tmp" ; fi
|
||||
if [ $(MSYSTEM) = "MINGW64" ] ; then cd botan-$(BOTAN_VERSION) && ./configure.py --os=mingw --cpu=x86_64 --disable-shared-library --enable-static-library --prefix="`pwd`/../$(BUILD_PATH)/botan-$(BOTAN_VERSION).tmp" ; fi
|
||||
cd botan-$(BOTAN_VERSION) && make -j install
|
||||
# cleanup
|
||||
rm -r -f botan-$(BOTAN_VERSION)
|
||||
mv $(BUILD_PATH)/botan-$(BOTAN_VERSION).tmp $(BUILD_PATH)/botan-$(BOTAN_VERSION)
|
||||
|
||||
asio: $(BUILD_PATH)/asio-$(ASIO_VERSION)
|
||||
|
||||
$(BUILD_PATH)/asio-$(ASIO_VERSION):
|
||||
# prepare
|
||||
rm -r -f $(BUILD_PATH)/asio-*
|
||||
[ -d "asio-$(ASIO_VERSION)" ] || git clone https://github.com/chriskohlhoff/asio.git --depth=1 --branch asio-$(ASIO_VERSION) "asio-$(ASIO_VERSION)"
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/asio-$(ASIO_VERSION).tmp/include/asio
|
||||
cp asio-$(ASIO_VERSION)/asio/include/*.hpp $(BUILD_PATH)/asio-$(ASIO_VERSION).tmp/include/
|
||||
cp -r asio-$(ASIO_VERSION)/asio/include/asio/* $(BUILD_PATH)/asio-$(ASIO_VERSION).tmp/include/asio/
|
||||
# cleanup
|
||||
rm -r -f asio-$(ASIO_VERSION)
|
||||
mv $(BUILD_PATH)/asio-$(ASIO_VERSION).tmp $(BUILD_PATH)/asio-$(ASIO_VERSION)
|
||||
|
||||
rnp: $(BUILD_PATH)/rnp-$(RNP_VERSION)
|
||||
|
||||
$(BUILD_PATH)/rnp-$(RNP_VERSION):
|
||||
# prepare
|
||||
rm -r -f $(BUILD_PATH)/rnp-*
|
||||
[ -d "rnp-$(RNP_VERSION)" ] || git clone https://github.com/rnpgp/rnp.git --depth=1 --branch v$(RNP_VERSION) --recurse-submodules --shallow-submodules "rnp-$(RNP_VERSION)"
|
||||
# build
|
||||
mkdir -p rnp-$(RNP_VERSION)/build
|
||||
cd rnp-$(RNP_VERSION)/build && cmake .. -G"MSYS Makefiles" -Wno-dev -DCMAKE_INSTALL_PREFIX="`pwd`/install" -DBUILD_SHARED_LIBS=yes -DBUILD_TESTING=off -DCMAKE_CXX_FLAGS="-D__MINGW_USE_VC2005_COMPAT -D__STDC_FORMAT_MACROS" -DBZIP2_INCLUDE_DIR="`pwd`/../../$(BUILD_PATH)/bzip2-$(BZIP2_VERSION)/include" -DBZIP2_LIBRARY_RELEASE="`pwd`/../../$(BUILD_PATH)/bzip2-$(BZIP2_VERSION)/lib/libbz2.a" -DBZIP2_LIBRARIES="`pwd`/../../$(BUILD_PATH)/bzip2-$(BZIP2_VERSION)/lib/libbz2.a" -DZLIB_INCLUDE_DIR="`pwd`/../../$(BUILD_PATH)/zlib-$(ZLIB_VERSION)/include" -DZLIB_LIBRARY="`pwd`/../../$(BUILD_PATH)/zlib-$(ZLIB_VERSION)/lib/libz.a" -DJSON-C_INCLUDE_DIR="`pwd`/../../$(BUILD_PATH)/json-c-$(JSON_C_VERSION)/include/json-c" -DJSON-C_LIBRARY="`pwd`/../../$(BUILD_PATH)/json-c-$(JSON_C_VERSION)/lib/libjson-c.a" -DBOTAN_INCLUDE_DIR="`pwd`/../../$(BUILD_PATH)/botan-$(BOTAN_VERSION)/include/botan-`echo $(BOTAN_VERSION) | cut -c1-1`" -DBOTAN_LIBRARY="`pwd`/../../$(BUILD_PATH)/botan-$(BOTAN_VERSION)/lib/libbotan-`echo $(BOTAN_VERSION) | cut -c1-1`.a"
|
||||
cmake --build rnp-$(RNP_VERSION)/build
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/include/rnp
|
||||
cp -r rnp-$(RNP_VERSION)/include/rnp/* $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/include/rnp/
|
||||
cp -r rnp-$(RNP_VERSION)/build/src/lib/rnp/* $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/include/rnp/
|
||||
mkdir -p $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/lib
|
||||
cp -r rnp-$(RNP_VERSION)/build/src/lib/librnp.dll.a $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/lib/
|
||||
mkdir -p $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/bin
|
||||
cp -r rnp-$(RNP_VERSION)/build/src/lib/librnp.dll $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/bin/
|
||||
# cleanup
|
||||
rm -r -f rnp-$(RNP_VERSION)
|
||||
mv $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp $(BUILD_PATH)/rnp-$(RNP_VERSION)
|
||||
|
||||
copylibs:
|
||||
rm -r -f $(LIBS_PATH) ; \
|
||||
mkdir -p $(LIBS_PATH) ; \
|
||||
cp $(BUILD_PATH)/gcc-version $(LIBS_PATH) ; \
|
||||
find $(BUILD_PATH) -mindepth 1 -maxdepth 1 -type d -not -name "*.tmp" -print -exec cp -r {}/. $(LIBS_PATH) \; ; \
|
||||
cp -p $(BUILD_PATH)/gcc-version $(LIBS_PATH) ; \
|
||||
find $(BUILD_PATH) -mindepth 1 -maxdepth 1 -type d -not -name "*.tmp" -print -exec cp -r -p {}/. $(LIBS_PATH) \; ; \
|
||||
|
||||
@ -33,7 +33,7 @@ echo.
|
||||
echo === Version
|
||||
echo.
|
||||
|
||||
title Build - %SourceName%-%RsBuildConfig% [Version]
|
||||
title Build - %SourceName%-%RsBuildConfig% Qt-%QtVersion%-%GCCArchitecture% [Version]
|
||||
|
||||
pushd "%SourcePath%\retroshare-gui\src\gui\images"
|
||||
:: Touch resource file
|
||||
@ -47,7 +47,7 @@ echo.
|
||||
echo === qmake
|
||||
echo.
|
||||
|
||||
title Build - %SourceName%-%RsBuildConfig% [qmake]
|
||||
title Build - %SourceName%-%RsBuildConfig% Qt-%QtVersion%-%GCCArchitecture% [qmake]
|
||||
|
||||
set RS_QMAKE_CONFIG=%RsBuildConfig%
|
||||
if "%ParamAutologin%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_autologin
|
||||
@ -56,7 +56,7 @@ if "%ParamWebui%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_webui
|
||||
if "%ParamPlugins%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% retroshare_plugins
|
||||
if "%ParamUseNativeDialogs%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_use_native_dialogs
|
||||
if "%ParamService%" NEQ "1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% no_retroshare_service
|
||||
if "%ParamFriendServer%" NEQ "1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% no_rs_friendserver
|
||||
if "%ParamFriendServer%" NEQ "1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% no_retroshare_friendserver
|
||||
if "%ParamEmbeddedFriendServer%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_efs
|
||||
|
||||
qmake "%SourcePath%\RetroShare.pro" -r -spec win32-g++ "CONFIG+=%RS_QMAKE_CONFIG%" "EXTERNAL_LIB_DIR=%BuildLibsPath%\libs"
|
||||
@ -66,7 +66,7 @@ echo.
|
||||
echo === make
|
||||
echo.
|
||||
|
||||
title Build - %SourceName%-%RsBuildConfig% [make]
|
||||
title Build - %SourceName%-%RsBuildConfig% Qt-%QtVersion%-%GCCArchitecture% [make]
|
||||
|
||||
mingw32-make -j %CoreCount%
|
||||
if errorlevel 1 goto error
|
||||
@ -75,7 +75,7 @@ echo.
|
||||
echo === Changelog
|
||||
echo.
|
||||
|
||||
title Build - %SourceName%-%RsBuildConfig% [changelog]
|
||||
title Build - %SourceName%-%RsBuildConfig% Qt-%QtVersion%-%GCCArchitecture% [changelog]
|
||||
call "%ToolsPath%\generate-changelog.bat" "%SourcePath%" "%RsBuildPath%\changelog.txt"
|
||||
|
||||
:error
|
||||
|
||||
@ -59,10 +59,12 @@ set QtMainVersion=%QtVersion:~0,1%
|
||||
|
||||
rem Qt 4 = QtSvg4.dll
|
||||
rem Qt 5 = Qt5Svg.dll
|
||||
rem Qt 6 = Qt6Svg.dll
|
||||
set QtMainVersion1=
|
||||
set QtMainVersion2=
|
||||
if "%QtMainVersion%"=="4" set QtMainVersion2=4
|
||||
if "%QtMainVersion%"=="5" set QtMainVersion1=5
|
||||
if "%QtMainVersion%"=="6" set QtMainVersion1=6
|
||||
|
||||
if "%RsBuildConfig%" NEQ "release" (
|
||||
set Archive=%RsPackPath%\RetroShare-%RsVersion%-Windows-Portable-%RsDate%-%RsVersion.Extra%-Qt-%QtVersion%-%GCCArchitecture%%RsType%%RsArchiveAdd%-%RsBuildConfig%.7z
|
||||
@ -75,7 +77,7 @@ if exist "%Archive%" del /Q "%Archive%"
|
||||
:: Create deploy path
|
||||
mkdir "%RsDeployPath%"
|
||||
|
||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% [copy files]
|
||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% Qt-%QtVersion%-%GCCArchitecture% [copy files]
|
||||
|
||||
set ExtensionsFile=%SourcePath%\libretroshare\src\rsserver\rsinit.cc
|
||||
set Extensions=
|
||||
@ -96,6 +98,7 @@ copy nul "%RsDeployPath%\portable" %Quite%
|
||||
echo copy binaries
|
||||
copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\retroshare*.exe" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" copy "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\supportlibs\librnp\Build\src\lib\librnp.dll" copy "%RsBuildPath%\supportlibs\librnp\Build\src\lib\librnp.dll" "%RsDeployPath%" %Quite%
|
||||
|
||||
if "%ParamService%"=="1" (
|
||||
copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
|
||||
@ -130,18 +133,24 @@ if exist "%RsDeployPath%\retroshare.dll" call :copy_dependencies "%RsDeployPath%
|
||||
echo copy Qt DLL's
|
||||
copy "%QtPath%\Qt%QtMainVersion1%Svg%QtMainVersion2%.dll" "%RsDeployPath%" %Quite%
|
||||
|
||||
if "%QtMainVersion%"=="5" (
|
||||
if %QtMainVersion% GEQ 5 (
|
||||
mkdir "%RsDeployPath%\platforms"
|
||||
copy "%QtPath%\..\plugins\platforms\qwindows.dll" "%RsDeployPath%\platforms" %Quite%
|
||||
)
|
||||
|
||||
if "%QtMainVersion%"=="5" (
|
||||
mkdir "%RsDeployPath%\audio"
|
||||
copy "%QtPath%\..\plugins\audio\qtaudio_windows.dll" "%RsDeployPath%\audio" %Quite%
|
||||
)
|
||||
|
||||
if exist "%QtPath%\..\plugins\styles\qwindowsvistastyle.dll" (
|
||||
echo Copy styles
|
||||
mkdir "%RsDeployPath%\styles" %Quite%
|
||||
echo Copy styles
|
||||
mkdir "%RsDeployPath%\styles" %Quite%
|
||||
if "%QtMainVersion%"=="5" (
|
||||
copy "%QtPath%\..\plugins\styles\qwindowsvistastyle.dll" "%RsDeployPath%\styles" %Quite%
|
||||
)
|
||||
if "%QtMainVersion%"=="6" (
|
||||
copy "%QtPath%\..\plugins\styles\qmodernwindowsstyle.dll" "%RsDeployPath%\styles" %Quite%
|
||||
)
|
||||
|
||||
copy "%QtPath%\..\plugins\imageformats\*.dll" "%RsDeployPath%\imageformats" %Quite%
|
||||
del /Q "%RsDeployPath%\imageformats\*d?.dll" %Quite%
|
||||
@ -168,10 +177,12 @@ xcopy /S "%SourcePath%\retroshare-gui\src\license" "%RsDeployPath%\license" %Qui
|
||||
echo copy translation
|
||||
copy "%SourcePath%\retroshare-gui\src\translations\qt_tr.qm" "%RsDeployPath%\translations" %Quite%
|
||||
copy "%QtPath%\..\translations\qt_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
if "%QtMainVersion%"=="5" (
|
||||
if %QtMainVersion% GEQ 5 (
|
||||
copy "%QtPath%\..\translations\qtbase_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
copy "%QtPath%\..\translations\qtscript_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
copy "%QtPath%\..\translations\qtmultimedia_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
)
|
||||
if "%QtMainVersion%"=="5" (
|
||||
copy "%QtPath%\..\translations\qtscript_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
copy "%QtPath%\..\translations\qtxmlpatterns_*.qm" "%RsDeployPath%\translations" %Quite%
|
||||
)
|
||||
|
||||
@ -195,7 +206,7 @@ if "%ParamTor%"=="1" (
|
||||
)
|
||||
|
||||
rem pack files
|
||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% [pack files]
|
||||
title Pack - %SourceName%%RsType%-%RsBuildConfig% Qt-%QtVersion%-%GCCArchitecture% [pack files]
|
||||
|
||||
"%EnvSevenZipExe%" a -mx=9 -t7z "%Archive%" "%RsDeployPath%\*"
|
||||
|
||||
|
||||
3
build_scripts/Windows/env/env-msys2.bat
vendored
3
build_scripts/Windows/env/env-msys2.bat
vendored
@ -22,11 +22,12 @@ if "%GCCArchitecture%"=="x64" (
|
||||
)
|
||||
|
||||
set EnvMSYS2Path=%EnvRootPath%\msys2
|
||||
set EnvMSYS2BasePath=%EnvMSYS2Path%\msys64
|
||||
|
||||
call "%~dp0tools\prepare-msys2.bat" %1
|
||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||
|
||||
set EnvMSYS2SH=%EnvMSYS2Path%\msys64\usr\bin\sh.exe
|
||||
set EnvMSYS2SH=%EnvMSYS2BasePath%\usr\bin\sh.exe
|
||||
if not exist "%EnvMSYS2SH%" if errorlevel 1 goto error_env
|
||||
|
||||
set EnvMSYS2Cmd="%EnvMSYS2SH%" -lc
|
||||
|
||||
@ -16,15 +16,15 @@ if "%~1"=="clean" (
|
||||
goto exit
|
||||
)
|
||||
|
||||
set MSYS2Version=20230318
|
||||
set MSYS2Version=20250622
|
||||
|
||||
set MSYS2Install=msys2-base-x86_64-%MSYS2Version%.sfx.exe
|
||||
set MSYS2Url=https://github.com/msys2/msys2-installer/releases/download/%MSYS2Version:~0,4%-%MSYS2Version:~4,2%-%MSYS2Version:~6,2%/%MSYS2Install%
|
||||
set CMakeInstall=cmake-3.19.0-win32-x86.zip
|
||||
set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.19.0/%CMakeInstall%
|
||||
set CMakeUnpackPath=%EnvMSYS2Path%\msys64
|
||||
set MSYS2UnpackPath=%EnvMSYS2Path%\msys64
|
||||
set CMakeInstall=cmake-3.31.3-windows-i386.zip
|
||||
set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.31.3/%CMakeInstall%
|
||||
|
||||
if exist "%CMakeUnpackPath%\usr\bin\pacman.exe" (
|
||||
if exist "%MSYS2UnpackPath%\usr\bin\pacman.exe" (
|
||||
if "%~1"=="reinstall" (
|
||||
choice /M "Found existing MSYS2 version. Do you want to proceed?"
|
||||
if !ERRORLEVEL!==2 goto exit
|
||||
@ -33,13 +33,12 @@ if exist "%CMakeUnpackPath%\usr\bin\pacman.exe" (
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if exist "%CMakeUnpackPath%" (
|
||||
if exist "%MSYS2UnpackPath%" (
|
||||
%cecho% info "Remove previous MSYS2 version"
|
||||
call "%ToolsPath%\remove-dir.bat" "%CMakeUnpackPath%"
|
||||
call "%ToolsPath%\remove-dir.bat" "%MSYS2UnpackPath%"
|
||||
)
|
||||
|
||||
%cecho% info "Download installation files"
|
||||
%cecho% info "Download MSYS2 installation files"
|
||||
if not exist "%EnvDownloadPath%\%MSYS2Install%" call "%ToolsPath%\download-file.bat" "%MSYS2Url%" "%EnvDownloadPath%\%MSYS2Install%"
|
||||
if not exist "%EnvDownloadPath%\%MSYS2Install%" %cecho% error "Cannot download MSYS" & goto error
|
||||
|
||||
@ -50,29 +49,29 @@ if not exist "%EnvDownloadPath%\%CMakeInstall%" %cecho% error "Cannot download C
|
||||
"%EnvDownloadPath%\%MSYS2Install%" -y -o"%EnvMSYS2Path%"
|
||||
|
||||
%cecho% info "Unpack CMake"
|
||||
"%EnvSevenZipExe%" x -o"%CMakeUnpackPath%" "%EnvDownloadPath%\%CMakeInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%MSYS2UnpackPath%" "%EnvDownloadPath%\%CMakeInstall%" -y -bso0
|
||||
|
||||
%cecho% info "Install CMake"
|
||||
set CMakeVersion=
|
||||
for /D %%F in (%CMakeUnpackPath%\cmake*) do set CMakeVersion=%%~nxF
|
||||
for /D %%F in (%MSYS2UnpackPath%\cmake*) do set CMakeVersion=%%~nxF
|
||||
if "%CMakeVersion%"=="" %cecho% error "CMake version not found." & goto :exit
|
||||
%cecho% info "Found CMake version %CMakeVersion%"
|
||||
|
||||
set FoundProfile=
|
||||
for /f "tokens=3" %%F in ('find /c /i "%CMakeVersion%" "%CMakeUnpackPath%\etc\profile"') do set FoundProfile=%%F
|
||||
for /f "tokens=3" %%F in ('find /c /i "%CMakeVersion%" "%MSYS2UnpackPath%\etc\profile"') do set FoundProfile=%%F
|
||||
|
||||
if "%FoundProfile%"=="0" (
|
||||
echo export PATH="${PATH}:/%CMakeVersion%/bin">>"%CMakeUnpackPath%\etc\profile"
|
||||
echo export PATH="${PATH}:/%CMakeVersion%/bin">>"%MSYS2UnpackPath%\etc\profile"
|
||||
)
|
||||
|
||||
set MSYS2SH=%CMakeUnpackPath%\usr\bin\sh
|
||||
set MSYS2SH=%MSYS2UnpackPath%\usr\bin\sh
|
||||
|
||||
%cecho% info "Initialize MSYS2"
|
||||
"%MSYS2SH%" -lc "yes | pacman --noconfirm -Syuu msys2-keyring"
|
||||
"%MSYS2SH%" -lc "pacman --noconfirm -Sy"
|
||||
"%MSYS2SH%" -lc "pacman --noconfirm -Su"
|
||||
|
||||
call "%CMakeUnpackPath%\autorebase.bat"
|
||||
call "%MSYS2UnpackPath%\autorebase.bat"
|
||||
|
||||
:exit
|
||||
endlocal
|
||||
|
||||
@ -4,8 +4,8 @@ if "%EnvRootPath%"=="" exit /B 1
|
||||
|
||||
set CEchoUrl=https://github.com/lordmulder/cecho/releases/download/2015-10-10/cecho.2015-10-10.zip
|
||||
set CEchoInstall=cecho.2015-10-10.zip
|
||||
set SevenZipUrl=https://sourceforge.net/projects/sevenzip/files/7-Zip/19.00/7z1900.msi/download
|
||||
set SevenZipInstall=7z1900.msi
|
||||
set SevenZipUrl=https://www.7-zip.org/a/7z2600-x64.msi
|
||||
set SevenZipInstall=7z2600-x64.msi
|
||||
set DependsUrl=http://www.dependencywalker.com/depends22_x86.zip
|
||||
set DependsInstall=depends22_x86.zip
|
||||
set UnixToolsUrl=http://unxutils.sourceforge.net/UnxUpdates.zip
|
||||
@ -19,9 +19,9 @@ set MinGitInstallPath=%EnvToolsPath%\MinGit
|
||||
set DoxygenInstall=doxygen-1.9.6.windows.x64.bin.zip
|
||||
set DoxygenUrl=https://github.com/doxygen/doxygen/releases/download/Release_1_9_6/%DoxygenInstall%
|
||||
set DoxygenInstallPath=%EnvToolsPath%\doxygen
|
||||
set CMakeVersion=cmake-3.19.0-win32-x86
|
||||
set CMakeVersion=cmake-3.31.3-windows-i386
|
||||
set CMakeInstall=%CMakeVersion%.zip
|
||||
set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.19.0/%CMakeInstall%
|
||||
set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.31.3/%CMakeInstall%
|
||||
set CMakeInstallPath=%EnvToolsPath%\cmake
|
||||
set TorProjectUrl=https://www.torproject.org
|
||||
set TorDownloadIndexUrl=%TorProjectUrl%/download/tor
|
||||
@ -53,7 +53,7 @@ if not exist "%EnvToolsPath%\cecho.exe" (
|
||||
if not exist "%EnvDownloadPath%\%cCEhoInstall%" echo Cannot download cecho installation& goto error
|
||||
|
||||
echo Unpack cecho
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%CEchoInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%CEchoInstall%" -y -bso0
|
||||
copy "%EnvTempPath%\cecho.exe" "%EnvToolsPath%"
|
||||
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
@ -69,7 +69,7 @@ if not exist "%EnvToolsPath%\depends.exe" (
|
||||
if not exist "%EnvDownloadPath%\%DependsInstall%" %cecho% error "Cannot download Dependendy Walker installation" & goto error
|
||||
|
||||
%cecho% info "Unpack Dependency Walker"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%DependsInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%DependsInstall%" -y -bso0
|
||||
copy "%EnvTempPath%\*" "%EnvToolsPath%"
|
||||
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
@ -85,7 +85,7 @@ if not exist "%EnvToolsPath%\cut.exe" (
|
||||
if not exist "%EnvDownloadPath%\%UnixToolsInstall%" %cecho% error "Cannot download Unix Tools installation" & goto error
|
||||
|
||||
%cecho% info "Unpack Unix Tools"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%UnixToolsInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%UnixToolsInstall%" -y -bso0
|
||||
copy "%EnvTempPath%\cut.exe" "%EnvToolsPath%"
|
||||
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
@ -101,7 +101,7 @@ if not exist "%EnvToolsPath%\sed.exe" (
|
||||
if not exist "%EnvDownloadPath%\%UnixToolsInstall%" %cecho% error "Cannot download Unix Tools installation" & goto error
|
||||
|
||||
%cecho% info "Unpack Unix Tools"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%UnixToolsInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%UnixToolsInstall%" -y -bso0
|
||||
copy "%EnvTempPath%\sed.exe" "%EnvToolsPath%"
|
||||
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
@ -121,7 +121,7 @@ if not exist "%NSISInstallPath%\nsis.exe" (
|
||||
if not exist "%EnvDownloadPath%\%NSISInstall%" %cecho% error "Cannot download NSIS installation" & goto error
|
||||
|
||||
%cecho% info "Unpack NSIS"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%NSISInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%NSISInstall%" -y -bso0
|
||||
if not exist "%NSISInstallPath%" mkdir "%NSISInstallPath%"
|
||||
xcopy /s "%EnvTempPath%" "%NSISInstallPath%"
|
||||
|
||||
@ -135,7 +135,7 @@ if not exist "%MinGitInstallPath%\cmd\git.exe" (
|
||||
if not exist "%EnvDownloadPath%\%MinGitInstall%" %cecho% error "Cannot download MinGit installation" & goto error
|
||||
|
||||
%cecho% info "Unpack MinGit"
|
||||
"%EnvSevenZipExe%" x -o"%MinGitInstallPath%" "%EnvDownloadPath%\%MinGitInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%MinGitInstallPath%" "%EnvDownloadPath%\%MinGitInstall%" -y -bso0
|
||||
)
|
||||
|
||||
if not exist "%EnvDownloadPath%\%DoxygenInstall%" call "%ToolsPath%\remove-dir.bat" "%DoxygenInstallPath%"
|
||||
@ -148,7 +148,7 @@ if not exist "%DoxygenInstallPath%\doxygen.exe" (
|
||||
if not exist "%EnvDownloadPath%\%DoxygenInstall%" %cecho% error "Cannot download doxygen installation" & goto error
|
||||
|
||||
%cecho% info "Unpack Doxygen"
|
||||
"%EnvSevenZipExe%" x -o"%DoxygenInstallPath%" "%EnvDownloadPath%\%DoxygenInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%DoxygenInstallPath%" "%EnvDownloadPath%\%DoxygenInstall%" -y -bso0
|
||||
)
|
||||
|
||||
if not exist "%EnvDownloadPath%\%CMakeInstall%" call "%ToolsPath%\remove-dir.bat" "%CMakeInstallPath%"
|
||||
@ -163,7 +163,7 @@ if not exist "%CMakeInstallPath%\bin\cmake.exe" (
|
||||
if not exist "%EnvDownloadPath%\%CMakeInstall%" %cecho% error "Cannot download CMake installation" & goto error
|
||||
|
||||
%cecho% info "Unpack CMake"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%CMakeInstall%"
|
||||
"%EnvSevenZipExe%" x -o"%EnvTempPath%" "%EnvDownloadPath%\%CMakeInstall%" -y -bso0
|
||||
|
||||
move "%EnvTempPath%\%CMakeVersion%" "%CMakeInstallPath%"
|
||||
|
||||
@ -176,7 +176,7 @@ mkdir "%EnvTempPath%"
|
||||
call "%ToolsPath%\download-file.bat" "%TorDownloadIndexUrl%" "%EnvTempPath%\index.html"
|
||||
if not exist "%EnvTempPath%\index.html" %cecho% error "Cannot download Tor installation" & goto error
|
||||
|
||||
for /F "tokens=1,2 delims= " %%A in ('%EnvSedExe% -r -n -e"s/.*href=\"^(.*^)^(tor-.*windows-i686\.tar\.gz^)\".*/\2 \1\2/p" "%EnvTempPath%\index.html"') do set TorInstall=%%A& set TorDownloadUrl=%%B
|
||||
for /F "tokens=1,2 delims= " %%A in ('%EnvSedExe% -r -n -e"s/.*href=\"^(.*^)^(tor-.*windows-i686.*\.tar\.gz^)\".*/\2 \1\2/p" "%EnvTempPath%\index.html"') do set TorInstall=%%A& set TorDownloadUrl=%%B
|
||||
call "%ToolsPath%\remove-dir.bat" "%EnvTempPath%"
|
||||
if "%TorInstall%"=="" %cecho% error "Cannot download Tor installation" & goto error
|
||||
if "%TorDownloadUrl%"=="" %cecho% error "Cannot download Tor installation" & goto error
|
||||
@ -189,7 +189,7 @@ if not exist "%EnvTorPath%\Tor\tor.exe" (
|
||||
if not exist "%EnvDownloadPath%\%TorInstall%" %cecho% error "Cannot download Tor installation" & goto error
|
||||
|
||||
%cecho% info "Unpack Tor"
|
||||
"%EnvSevenZipExe%" x -so "%EnvDownloadPath%\%TorInstall%" | "%EnvSevenZipExe%" x -si -ttar -o"%EnvTorPath%"
|
||||
"%EnvSevenZipExe%" x -so "%EnvDownloadPath%\%TorInstall%" | "%EnvSevenZipExe%" x -si -ttar -o"%EnvTorPath%" -y -bso0
|
||||
)
|
||||
|
||||
:exit
|
||||
|
||||
@ -232,7 +232,7 @@ Section $(Section_Main) Section_Main
|
||||
|
||||
; Qt styles
|
||||
SetOutPath "$INSTDIR\styles"
|
||||
File /NONFATAL "${QTDIR}\plugins\styles\qwindowsvistastyle.dll"
|
||||
File "${QTDIR}\plugins\styles\qwindowsvistastyle.dll"
|
||||
|
||||
; MinGW binaries
|
||||
SetOutPath "$INSTDIR"
|
||||
@ -247,6 +247,7 @@ Section $(Section_Main) Section_Main
|
||||
|
||||
; External binaries
|
||||
File "${EXTERNAL_LIB_DIR}\bin\miniupnpc.dll"
|
||||
File "${RELEASEDIR}\supportlibs\librnp\Build\src\lib\librnp.dll"
|
||||
!if ${ARCHITECTURE} == "x86"
|
||||
File "${EXTERNAL_LIB_DIR}\bin\libcrypto-1_1.dll"
|
||||
File "${EXTERNAL_LIB_DIR}\bin\libssl-1_1.dll"
|
||||
@ -318,7 +319,7 @@ SectionEnd
|
||||
!ifdef TOR_EXISTS
|
||||
Section /o $(Section_Tor) Section_Tor
|
||||
SetOutPath "$INSTDIR\tor"
|
||||
File /r "${TORDIR}\*"
|
||||
File "${TORDIR}\*"
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
|
||||
622
build_scripts/Windows/installer/retroshare-Qt6.nsi
Normal file
622
build_scripts/Windows/installer/retroshare-Qt6.nsi
Normal file
@ -0,0 +1,622 @@
|
||||
; Script generated with the Venis Install Wizard & modified by defnax
|
||||
; Reworked by Thunder
|
||||
|
||||
!include ifexist.nsh
|
||||
|
||||
# Needed defines
|
||||
;!define REVISION ""
|
||||
;!define RELEASEDIR ""
|
||||
;!define QTDIR ""
|
||||
;!define MINGWDIR ""
|
||||
|
||||
# Optional defines
|
||||
;!define OUTDIR ""
|
||||
|
||||
# Check needed defines
|
||||
!ifndef RELEASEDIR
|
||||
!error "RELEASEDIR is not defined"
|
||||
!endif
|
||||
!ifndef QTDIR
|
||||
!error "QTDIR is not defined"
|
||||
!endif
|
||||
!ifndef MINGWDIR
|
||||
!error "MINGWDIR is not defined"
|
||||
!endif
|
||||
!ifndef ARCHITECTURE
|
||||
!error "Architecture is not defined"
|
||||
!endif
|
||||
|
||||
# Check optional defines
|
||||
!ifdef OUTDIR
|
||||
!define OUTDIR_ "${OUTDIR}\"
|
||||
!else
|
||||
!define OUTDIR ""
|
||||
!define OUTDIR_ ""
|
||||
!endif
|
||||
|
||||
!ifndef INSTALLERADD
|
||||
!define INSTALLERADD ""
|
||||
!endif
|
||||
|
||||
# Source directory
|
||||
!define SOURCEDIR "..\..\.."
|
||||
|
||||
# Get version from executable
|
||||
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe" VERSION_
|
||||
!define VERSION ${VERSION_1}.${VERSION_2}.${VERSION_3}
|
||||
;!define REVISION ${VERSION_4}
|
||||
|
||||
# Get version of Qt
|
||||
!GetDllVersion "${QTDIR}\bin\Qt6Core.dll" QTVERSION_
|
||||
!define QTVERSION ${QTVERSION_1}.${QTVERSION_2}.${QTVERSION_3}
|
||||
|
||||
# Check version
|
||||
!ifndef REVISION
|
||||
!error "REVISION is not defined"
|
||||
!endif
|
||||
|
||||
# Date
|
||||
!ifndef DATE
|
||||
!define /date DATE "%Y%m%d"
|
||||
!endif
|
||||
|
||||
# Service
|
||||
${!defineifexist} SERVICE_EXISTS "${RELEASEDIR}\retroshare-service\src\release\retroshare-service.exe"
|
||||
|
||||
# Tor
|
||||
!ifdef TORDIR
|
||||
${!defineifexist} TOR_EXISTS "${TORDIR}\tor.exe"
|
||||
!ifndef TOR_EXISTS
|
||||
!error "tor.exe not found"
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# WebUI
|
||||
!ifdef WEBUIDIR
|
||||
${!defineifexist} WEBUI_EXISTS "${WEBUIDIR}\index.html"
|
||||
!ifndef WEBUI_EXISTS
|
||||
!error "WebUI files not found"
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Friend Server
|
||||
!ifdef TOR_EXISTS
|
||||
# Add Friend Server with Tor only
|
||||
#${!defineifexist} FRIENDSERVER_EXISTS "${RELEASEDIR}\retroshare-friendserver\src\release\retroshare-friendserver.exe"
|
||||
!endif
|
||||
|
||||
# Application name and version
|
||||
!define APPNAME "RetroShare"
|
||||
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
||||
!define PUBLISHER "RetroShare Team"
|
||||
|
||||
# Install path
|
||||
!if ${ARCHITECTURE} == "x86"
|
||||
!define INSTDIR_NORMAL "$ProgramFiles32\${APPNAME}"
|
||||
!endif
|
||||
!if ${ARCHITECTURE} == "x64"
|
||||
!define INSTDIR_NORMAL "$ProgramFiles64\${APPNAME}"
|
||||
!endif
|
||||
!define INSTDIR_PORTABLE "$Desktop\${APPNAME}"
|
||||
|
||||
!define DATADIR_NORMAL "$APPDATA\${APPNAME}"
|
||||
!define DATADIR_PORTABLE "$INSTDIR\Data"
|
||||
|
||||
# Main Install settings
|
||||
Name "${APPNAMEANDVERSION}"
|
||||
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
||||
OutFile "${OUTDIR_}RetroShare-${VERSION}-${DATE}-${REVISION}-Qt-${QTVERSION}-${ARCHITECTURE}${INSTALLERADD}-setup.exe"
|
||||
BrandingText "${APPNAMEANDVERSION}"
|
||||
RequestExecutionlevel highest
|
||||
# Use compression
|
||||
SetCompressor /SOLID LZMA
|
||||
|
||||
# Global variables
|
||||
Var PortableMode
|
||||
Var InstDirNormal
|
||||
Var InstDirPortable
|
||||
Var DataDir
|
||||
Var StyleSheetDir
|
||||
|
||||
# Modern interface settings
|
||||
!include Sections.nsh
|
||||
!include nsDialogs.nsh
|
||||
!include "MUI.nsh"
|
||||
|
||||
# Interface Settings
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP "${SOURCEDIR}\build_scripts\Windows\installer\HeaderImage.bmp"
|
||||
;!define MUI_WELCOMEFINISHPAGE_BITMAP "...bmp"
|
||||
|
||||
# MUI defines
|
||||
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
|
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||||
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
!define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support"
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://retroshare.sourceforge.net/forum/"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\retroshare.exe"
|
||||
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
||||
;!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
|
||||
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
||||
;!define MUI_LANGDLL_REGISTRY_ROOT HKLM
|
||||
;!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY}
|
||||
;!define MUI_LANGDLL_REGISTRY_VALUENAME InstallerLanguage
|
||||
|
||||
# Defines the un-/installer logo of RetroShare
|
||||
!insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp"
|
||||
!insertmacro MUI_DEFAULT MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp"
|
||||
|
||||
# Installer pages
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "$(myLicenseData)"
|
||||
Page Custom PortableModePageCreate PortableModePageLeave
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE dir_leave
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
# Set languages (first is default language)
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
|
||||
# Installer languages
|
||||
!define MUI_LANGDLL_ALLLANGUAGES
|
||||
|
||||
# Translations
|
||||
!macro LANG_LOAD LANGUAGE LANGCODE LANGID LICENCEFILE
|
||||
!insertmacro MUI_LANGUAGE "${LANGUAGE}"
|
||||
; !verbose off
|
||||
!define LANG "${LANGUAGE}"
|
||||
!include "lang\${LANGCODE}.nsh"
|
||||
LangString LANGUAGEID "${LANG_${LANG}}" "1031"
|
||||
LicenseLangString myLicenseData ${LANGCODE} ${LICENCEFILE}
|
||||
; !verbose on
|
||||
!undef LANG
|
||||
!macroend
|
||||
|
||||
!macro LANG_STRING NAME VALUE
|
||||
LangString "${NAME}" "${LANG_${LANG}}" "${VALUE}"
|
||||
!macroend
|
||||
|
||||
!insertmacro LANG_LOAD "English" "en" "1033" "${SOURCEDIR}\retroshare-gui\src\license\license.txt"
|
||||
!insertmacro LANG_LOAD "French" "fr" "1036" "${SOURCEDIR}\retroshare-gui\src\license\license-FR.txt"
|
||||
!insertmacro LANG_LOAD "German" "de" "1031" "${SOURCEDIR}\retroshare-gui\src\license\license-GER.txt"
|
||||
!insertmacro LANG_LOAD "Turkish" "tr" "1055" "${SOURCEDIR}\retroshare-gui\src\license\license-TR.txt"
|
||||
!insertmacro LANG_LOAD "SimpChinese" "zh_CN" "2052" "${SOURCEDIR}\retroshare-gui\src\license\license.txt"
|
||||
!insertmacro LANG_LOAD "Polish" "pl" "1045" "${SOURCEDIR}\retroshare-gui\src\license\license.txt"
|
||||
!insertmacro LANG_LOAD "Spanish" "es" "1034" "${SOURCEDIR}\retroshare-gui\src\license\license.txt"
|
||||
!insertmacro LANG_LOAD "Russian" "ru" "1049" "${SOURCEDIR}\retroshare-gui\src\license\license.txt"
|
||||
!insertmacro LANG_LOAD "Catalan" "ca_ES" "1027" "${SOURCEDIR}\retroshare-gui\src\license\license.txt"
|
||||
|
||||
LicenseData $(myLicenseData)
|
||||
|
||||
# Main binaries
|
||||
Section $(Section_Main) Section_Main
|
||||
;Set Section required
|
||||
SectionIn RO
|
||||
|
||||
; Set Section properties
|
||||
SetOverwrite on
|
||||
|
||||
; Clears previous error logs
|
||||
; Delete "$INSTDIR\*.log"
|
||||
|
||||
; Main binaries
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe"
|
||||
File /nonfatal "${RELEASEDIR}\libretroshare\src\lib\retroshare.dll"
|
||||
|
||||
; Qt binaries
|
||||
File "${QTDIR}\bin\Qt6Core.dll"
|
||||
File "${QTDIR}\bin\Qt6Core5Compat.dll"
|
||||
File "${QTDIR}\bin\Qt6Gui.dll"
|
||||
File "${QTDIR}\bin\Qt6Multimedia.dll"
|
||||
File "${QTDIR}\bin\Qt6Network.dll"
|
||||
File "${QTDIR}\bin\Qt6PrintSupport.dll"
|
||||
File "${QTDIR}\bin\Qt6Svg.dll"
|
||||
File "${QTDIR}\bin\Qt6Widgets.dll"
|
||||
File "${QTDIR}\bin\Qt6Xml.dll"
|
||||
|
||||
; Qt platforms
|
||||
SetOutPath "$INSTDIR\platforms"
|
||||
File "${QTDIR}\plugins\platforms\qwindows.dll"
|
||||
|
||||
; Qt styles
|
||||
SetOutPath "$INSTDIR\styles"
|
||||
File "${QTDIR}\plugins\styles\qmodernwindowsstyle.dll"
|
||||
|
||||
; MinGW binaries
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${MINGWDIR}\bin\libstdc++-6.dll"
|
||||
!if ${ARCHITECTURE} == "x86"
|
||||
File "${MINGWDIR}\bin\libgcc_s_dw2-1.dll"
|
||||
!endif
|
||||
!if ${ARCHITECTURE} == "x64"
|
||||
File "${MINGWDIR}\bin\libgcc_s_seh-1.dll"
|
||||
!endif
|
||||
File "${MINGWDIR}\bin\libwinpthread-1.dll"
|
||||
|
||||
; External binaries
|
||||
File "${EXTERNAL_LIB_DIR}\bin\miniupnpc.dll"
|
||||
File "${RELEASEDIR}\supportlibs\librnp\Build\src\lib\librnp.dll"
|
||||
!if ${ARCHITECTURE} == "x86"
|
||||
File "${EXTERNAL_LIB_DIR}\bin\libcrypto-1_1.dll"
|
||||
File "${EXTERNAL_LIB_DIR}\bin\libssl-1_1.dll"
|
||||
!endif
|
||||
!if ${ARCHITECTURE} == "x64"
|
||||
File "${EXTERNAL_LIB_DIR}\bin\libcrypto-1_1-x64.dll"
|
||||
File "${EXTERNAL_LIB_DIR}\bin\libssl-1_1-x64.dll"
|
||||
!endif
|
||||
|
||||
; Other files
|
||||
File "${RELEASEDIR}\changelog.txt"
|
||||
File "${SOURCEDIR}\libbitdht\src\bitdht\bdboot.txt"
|
||||
|
||||
; License
|
||||
SetOutPath "$INSTDIR\license"
|
||||
File "${SOURCEDIR}\retroshare-gui\src\license\*.*"
|
||||
|
||||
; Image formats
|
||||
SetOutPath "$INSTDIR\imageformats"
|
||||
File /r "${QTDIR}\plugins\imageformats\qgif.dll"
|
||||
File /r "${QTDIR}\plugins\imageformats\qicns.dll"
|
||||
File /r "${QTDIR}\plugins\imageformats\qico.dll"
|
||||
File /r "${QTDIR}\plugins\imageformats\qjpeg.dll"
|
||||
File /r "${QTDIR}\plugins\imageformats\qsvg.dll"
|
||||
File /r "${QTDIR}\plugins\imageformats\qtga.dll"
|
||||
File /r "${QTDIR}\plugins\imageformats\qtiff.dll"
|
||||
File /r "${QTDIR}\plugins\imageformats\qwbmp.dll"
|
||||
File /r "${QTDIR}\plugins\imageformats\qwebp.dll"
|
||||
|
||||
; Sounds
|
||||
SetOutPath "$INSTDIR\sounds"
|
||||
File /r "${SOURCEDIR}\retroshare-gui\src\sounds\*.*"
|
||||
|
||||
; Translations
|
||||
SetOutPath "$INSTDIR\translations"
|
||||
File /r "${SOURCEDIR}\retroshare-gui\src\translations\*.qm"
|
||||
File /r "${QTDIR}\translations\qt_*.qm"
|
||||
File /r "${QTDIR}\translations\qtbase_*.qm"
|
||||
File /r "${QTDIR}\translations\qtmultimedia_*.qm"
|
||||
|
||||
; WebUI
|
||||
; SetOutPath "$INSTDIR\webui"
|
||||
; File /r "${SOURCEDIR}\libresapi\src\webui\*.*"
|
||||
|
||||
; License
|
||||
SetOutPath "$INSTDIR\license"
|
||||
File /r "${SOURCEDIR}\retroshare-gui\src\license\*.*"
|
||||
SectionEnd
|
||||
|
||||
# Service
|
||||
!ifdef SERVICE_EXISTS
|
||||
Section /o $(Section_Service) Section_Service
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${RELEASEDIR}\retroshare-service\src\release\retroshare-service.exe"
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
# Friend Server
|
||||
!ifdef FRIENDSERVER_EXISTS
|
||||
Section /o $(Section_FriendServer) Section_FriendServer
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${RELEASEDIR}\retroshare-friendserver\src\release\retroshare-friendserver.exe"
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
# Tor
|
||||
!ifdef TOR_EXISTS
|
||||
Section /o $(Section_Tor) Section_Tor
|
||||
SetOutPath "$INSTDIR\tor"
|
||||
File "${TORDIR}\*"
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
# WebUI
|
||||
!ifdef WEBUI_EXISTS
|
||||
Section /o $(Section_WebUI) Section_WebUI
|
||||
SetOutPath "$INSTDIR\webui"
|
||||
File /r "${WEBUIDIR}\*"
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
# Plugins
|
||||
${!defineifexist} PLUGIN_FEEDREADER_EXISTS "${RELEASEDIR}\plugins\FeedReader\lib\FeedReader.dll"
|
||||
${!defineifexist} PLUGIN_VOIP_EXISTS "${RELEASEDIR}\plugins\VOIP\lib\VOIP.dll"
|
||||
|
||||
!ifdef PLUGIN_FEEDREADER_EXISTS
|
||||
!define /ifndef PLUGIN_EXISTS
|
||||
!endif
|
||||
!ifdef PLUGIN_VOIP_EXISTS
|
||||
!define /ifndef PLUGIN_EXISTS
|
||||
!endif
|
||||
|
||||
!ifdef PLUGIN_EXISTS
|
||||
SectionGroup $(Section_Plugins) Section_Plugins
|
||||
!ifdef PLUGIN_FEEDREADER_EXISTS
|
||||
Section $(Section_Plugin_FeedReader) Section_Plugin_FeedReader
|
||||
SetOutPath "$DataDir\extensions6"
|
||||
File "${RELEASEDIR}\plugins\FeedReader\lib\FeedReader.dll"
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
!ifdef PLUGIN_VOIP_EXISTS
|
||||
Section $(Section_Plugin_VOIP) Section_Plugin_VOIP
|
||||
SetOutPath "$DataDir\extensions6"
|
||||
File "${RELEASEDIR}\plugins\VOIP\lib\VOIP.dll"
|
||||
SetOutPath "$INSTDIR\sounds"
|
||||
File /r "${SOURCEDIR}\plugins\VOIP\gui\sounds\*.*"
|
||||
SectionEnd
|
||||
!endif
|
||||
SectionGroupEnd
|
||||
!endif
|
||||
|
||||
# Data (Styles)
|
||||
Section $(Section_Data) Section_Data
|
||||
; Set Section properties
|
||||
SetOverwrite on
|
||||
|
||||
; Chat style
|
||||
SetOutPath "$StyleSheetDir\stylesheets\Bubble"
|
||||
File /r "${SOURCEDIR}\retroshare-gui\src\gui\qss\chat\Bubble\*.*"
|
||||
SetOutPath "$StyleSheetDir\stylesheets\Bubble_Compact"
|
||||
File /r "${SOURCEDIR}\retroshare-gui\src\gui\qss\chat\Bubble_Compact\*.*"
|
||||
|
||||
; Stylesheets
|
||||
SetOutPath "$INSTDIR\qss"
|
||||
File /nonfatal /r "${SOURCEDIR}\retroshare-gui\src\qss\*.*"
|
||||
SectionEnd
|
||||
|
||||
;Section $(Section_Link) Section_Link
|
||||
; Delete any existing keys
|
||||
|
||||
; Write the file association
|
||||
; WriteRegStr HKCR .pqi "" retroshare
|
||||
; WriteRegStr HKCR retroshare "" "PQI File"
|
||||
; WriteRegBin HKCR retroshare EditFlags 00000100
|
||||
; WriteRegStr HKCR "retroshare\shell" "" open
|
||||
; WriteRegStr HKCR "retroshare\shell\open\command" "" `"$INSTDIR\retroshare.exe" "%1"`
|
||||
;SectionEnd
|
||||
|
||||
# Shortcuts
|
||||
SectionGroup $(Section_Shortcuts) Section_Shortcuts
|
||||
Section $(Section_StartMenu) Section_StartMenu
|
||||
SetOutPath "$INSTDIR"
|
||||
CreateDirectory "$SMPROGRAMS\${APPNAME}"
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\$(Link_Uninstall).lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
|
||||
|
||||
!ifdef SERVICE_EXISTS
|
||||
SectionGetFlags ${Section_Service} $0
|
||||
IntOp $0 $0 & ${SF_SELECTED}
|
||||
${If} $0 == ${SF_SELECTED}
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME} Service.lnk" "$INSTDIR\retroshare-service.exe" "" "$INSTDIR\retroshare-service.exe" 0
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
!ifdef FRIENDSERVER_EXISTS
|
||||
SectionGetFlags ${Section_FriendServer} $0
|
||||
IntOp $0 $0 & ${SF_SELECTED}
|
||||
${If} $0 == ${SF_SELECTED}
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME} Friend Server.lnk" "$INSTDIR\retroshare-friendserver.exe" "" "$INSTDIR\retroshare-friendserver.exe" 0
|
||||
${EndIf}
|
||||
!endif
|
||||
SectionEnd
|
||||
|
||||
Section $(Section_Desktop) Section_Desktop
|
||||
CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
|
||||
SectionEnd
|
||||
|
||||
Section $(Section_QuickLaunch) Section_QuickLaunch
|
||||
CreateShortCut "$QUICKLAUNCH\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
Section $(Section_AutoStart) Section_AutoStart
|
||||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroShare" "$INSTDIR\retroshare.exe -m"
|
||||
SectionEnd
|
||||
|
||||
;Section $(Section_AutoStart) Section_AutoStart
|
||||
; CreateShortCut "$SMSTARTUP\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe -m" 0
|
||||
;SectionEnd
|
||||
|
||||
Section -FinishSection
|
||||
${If} $PortableMode = 0
|
||||
WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
|
||||
WriteRegStr HKLM "Software\${APPNAME}" "Version" "${VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$INSTDIR\retroshare.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "${PUBLISHER}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoModify" "1"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoRepair" "1"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
${Else}
|
||||
; Create the file the application uses to detect portable mode
|
||||
FileOpen $0 "$INSTDIR\portable" w
|
||||
FileClose $0
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
# Descriptions
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Main} $(Section_Main_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Data} $(Section_Data_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Shortcuts} $(Section_Shortcuts_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_StartMenu} $(Section_StartMenu_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Desktop} $(Section_Desktop_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_QuickLaunch} $(Section_QuickLaunch_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Plugins} $(Section_Plugins_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Plugin_FeedReader} $(Section_Plugin_FeedReader_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Plugin_VOIP} $(Section_Plugin_VOIP_Desc)
|
||||
; !insertmacro MUI_DESCRIPTION_TEXT ${Section_Link} $(Section_Link_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_AutoStart} $(Section_AutoStart_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Tor} $(Section_Tor_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_WebUI} $(Section_WebUI_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Service} $(Section_Service_Desc)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Section_FriendServer} $(Section_FriendServer_Desc)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
# Uninstall
|
||||
Section "Uninstall"
|
||||
; Remove file association registry keys
|
||||
; DeleteRegKey HKCR .pqi
|
||||
DeleteRegKey HKCR RetroShare
|
||||
|
||||
; Remove program/uninstall regsitry keys
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
|
||||
DeleteRegKey HKLM SOFTWARE\${APPNAME}
|
||||
|
||||
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroShare"
|
||||
|
||||
; Remove shortcuts, if any
|
||||
Delete "$SMPROGRAMS\${APPNAME}\*.*"
|
||||
|
||||
; Remove desktop shortcut
|
||||
Delete "$DESKTOP\${APPNAME}.lnk"
|
||||
|
||||
; Remove Quicklaunch shortcut
|
||||
Delete "$QUICKLAUNCH\${APPNAME}.lnk"
|
||||
|
||||
; Remove Autstart
|
||||
Delete "$SMSTARTUP\${APPNAME}.lnk"
|
||||
|
||||
; Remove directories used
|
||||
RMDir "$SMPROGRAMS\${APPNAME}"
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
; Don't remove the directory, otherwise
|
||||
; we lose the XPGP keys.
|
||||
; Should make this an option though...
|
||||
RMDir /r "${DATADIR_NORMAL}\extensions6"
|
||||
RMDir /r "${DATADIR_NORMAL}\stylesheets"
|
||||
SectionEnd
|
||||
|
||||
Function .onInit
|
||||
StrCpy $InstDirNormal "${INSTDIR_NORMAL}"
|
||||
StrCpy $InstDirPortable "${INSTDIR_PORTABLE}"
|
||||
|
||||
StrCpy $PortableMode 0
|
||||
StrCpy $INSTDIR "$InstDirNormal"
|
||||
StrCpy $DataDir "${DATADIR_NORMAL}"
|
||||
|
||||
InitPluginsDir
|
||||
Push $R1
|
||||
File /oname=$PLUGINSDIR\spltmp.bmp "${SOURCEDIR}\retroshare-gui\src\gui\images\logo\logo_splash.png"
|
||||
advsplash::show 1200 1000 1000 -1 $PLUGINSDIR\spltmp
|
||||
Pop $R1
|
||||
Pop $R1
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
FunctionEnd
|
||||
|
||||
!ifdef FRIENDSERVER_EXISTS
|
||||
Function .onSelChange
|
||||
SectionGetFlags ${Section_FriendServer} $0
|
||||
IntOp $0 $0 & ${SF_SELECTED}
|
||||
${If} $0 == ${SF_SELECTED}
|
||||
# Activate Tor and set readonly
|
||||
SectionGetFlags ${Section_Tor} $1
|
||||
IntOp $1 $1 | ${SF_SELECTED}
|
||||
IntOp $1 $1 | ${SF_RO}
|
||||
SectionSetFlags ${Section_Tor} $1
|
||||
${Else}
|
||||
# Remove readonly from Tor
|
||||
SectionGetFlags ${Section_Tor} $1
|
||||
IntOp $2 ${SF_RO} ~
|
||||
IntOp $1 $1 & $2
|
||||
SectionSetFlags ${Section_Tor} $1
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
!endif
|
||||
|
||||
# Installation mode
|
||||
|
||||
Function RequireAdmin
|
||||
UserInfo::GetAccountType
|
||||
Pop $8
|
||||
${If} $8 != "admin"
|
||||
MessageBox MB_ICONSTOP "You need administrator rights to install ${APPNAME}"
|
||||
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
|
||||
Abort
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function SetModeDestinationFromInstdir
|
||||
${If} $PortableMode = 0
|
||||
StrCpy $InstDirNormal $INSTDIR
|
||||
${Else}
|
||||
StrCpy $InstDirPortable $INSTDIR
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function PortableModePageCreate
|
||||
Call SetModeDestinationFromInstdir ; If the user clicks BACK on the directory page we will remember their mode specific directory
|
||||
!insertmacro MUI_HEADER_TEXT $(Page_InstallMode) $(Page_InstallMode_Desc)
|
||||
nsDialogs::Create 1018
|
||||
Pop $0
|
||||
${NSD_CreateRadioButton} 5u 25u -10u 8u $(Page_InstallMode_Standard)
|
||||
Pop $1
|
||||
${NSD_CreateLabel} 18u 40u -10u 24u $(Page_InstallMode_Standard_Desc)
|
||||
Pop $0
|
||||
${NSD_CreateRadioButton} 5u 75u -10u 8u $(Page_InstallMode_Portable)
|
||||
Pop $2
|
||||
${NSD_CreateLabel} 18u 90u -10u 24u $(Page_InstallMode_Portable_Desc)
|
||||
Pop $0
|
||||
${If} $PortableMode = 0
|
||||
SendMessage $1 ${BM_SETCHECK} ${BST_CHECKED} 0
|
||||
${Else}
|
||||
SendMessage $2 ${BM_SETCHECK} ${BST_CHECKED} 0
|
||||
${EndIf}
|
||||
nsDialogs::Show
|
||||
FunctionEnd
|
||||
|
||||
Function PortableModePageLeave
|
||||
${NSD_GetState} $1 $0
|
||||
${If} $0 <> ${BST_UNCHECKED}
|
||||
StrCpy $PortableMode 0
|
||||
StrCpy $INSTDIR $InstDirNormal
|
||||
Call RequireAdmin
|
||||
; Enable sections
|
||||
SectionSetText ${Section_Shortcuts} $(Section_Shortcuts)
|
||||
SectionSetText ${Section_StartMenu} $(Section_StartMenu)
|
||||
SectionSetText ${Section_Desktop} $(Section_Desktop)
|
||||
SectionSetText ${Section_QuickLaunch} $(Section_QuickLaunch)
|
||||
SectionSetText ${Section_AutoStart} $(Section_AutoStart)
|
||||
!insertmacro SelectSection ${Section_Shortcuts}
|
||||
!insertmacro SelectSection ${Section_AutoStart}
|
||||
!insertmacro SelectSection ${Section_StartMenu}
|
||||
!insertmacro SelectSection ${Section_Desktop}
|
||||
!insertmacro SelectSection ${Section_QuickLaunch}
|
||||
${Else}
|
||||
StrCpy $PortableMode 1
|
||||
StrCpy $INSTDIR $InstDirPortable
|
||||
; Disable sections
|
||||
!insertmacro UnselectSection ${Section_Shortcuts}
|
||||
!insertmacro UnselectSection ${Section_AutoStart}
|
||||
!insertmacro UnselectSection ${Section_StartMenu}
|
||||
!insertmacro UnselectSection ${Section_Desktop}
|
||||
!insertmacro UnselectSection ${Section_QuickLaunch}
|
||||
SectionSetText ${Section_Shortcuts} ""
|
||||
SectionSetText ${Section_StartMenu} ""
|
||||
SectionSetText ${Section_Desktop} ""
|
||||
SectionSetText ${Section_QuickLaunch} ""
|
||||
SectionSetText ${Section_AutoStart} ""
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function dir_leave
|
||||
${If} $PortableMode = 0
|
||||
StrCpy $DataDir "${DATADIR_NORMAL}"
|
||||
StrCpy $StyleSheetDir $DataDir
|
||||
${Else}
|
||||
StrCpy $DataDir "${DATADIR_PORTABLE}"
|
||||
StrCpy $StyleSheetDir $INSTDIR
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
20
build_scripts/git_tag_cleaner.sh
Executable file
20
build_scripts/git_tag_cleaner.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
function git_del_tag()
|
||||
{
|
||||
mTag=$1
|
||||
|
||||
for mRemote in $(git remote); do
|
||||
echo "Attempting tag $mTag removal from remote $mRemote"
|
||||
GIT_TERMINAL_PROMPT=0 git push $mRemote :$mTag || true
|
||||
done
|
||||
git tag --delete $mTag
|
||||
}
|
||||
|
||||
for mModule in . build_scripts/OBS/ libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/ ; do
|
||||
pushd $mModule
|
||||
git_del_tag v0.6.7a
|
||||
git tag --list | grep untagged | while read mTag; do git_del_tag $mTag ; done
|
||||
popd
|
||||
done
|
||||
|
||||
@ -4,8 +4,8 @@ Version=1.0
|
||||
Name=RetroShare
|
||||
Comment=Securely communicate with your friends
|
||||
Exec=/usr/bin/retroshare %U
|
||||
Icon=/usr/share/pixmaps/retroshare.xpm
|
||||
Icon=retroshare.xpm
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;Network;P2P;Feed;Chat;InstantMessaging
|
||||
Categories=Network;Email;InstantMessaging;Chat;Feed;FileTransfer;P2P
|
||||
MimeType=x-scheme-handler/retroshare;
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 659423769541169457c41f71c8a038e2d64ba079
|
||||
Subproject commit d1af0a357a94c47d0e486bee1e5052df660cfa1f
|
||||
@ -1 +1 @@
|
||||
Subproject commit 8c02b54e4d16e38b28e77263a0b1570c50df4c99
|
||||
Subproject commit 2f093fd7b3a013c463dacc65a1756e7643f543c0
|
||||
@ -1 +1 @@
|
||||
Subproject commit b41667912751a453e8e5d4733215a0609277a26f
|
||||
Subproject commit 178aa8ebcef47e3271d5a5ca5c07e45d3b71c81d
|
||||
7
plugins/CMakeLists.txt
Normal file
7
plugins/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
||||
# plugins/CMakeLists.txt
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
|
||||
if(RS_GUI)
|
||||
add_subdirectory(FeedReader)
|
||||
add_subdirectory(VOIP)
|
||||
endif()
|
||||
@ -21,8 +21,16 @@
|
||||
TEMPLATE = lib
|
||||
CONFIG *= plugin
|
||||
|
||||
DEPENDPATH += $$PWD/../../libretroshare/src/ $$PWD/../../retroshare-gui/src/
|
||||
INCLUDEPATH += $$PWD/../../libretroshare/src/ $$PWD/../../retroshare-gui/src/
|
||||
# TODO: Why are these not added by retroshare.pri?
|
||||
DEPENDPATH += $$PWD/../../retroshare-gui/src/
|
||||
INCLUDEPATH += $$PWD/../../retroshare-gui/src/
|
||||
|
||||
# TODO: Why can we not include use_libretroshare.pri
|
||||
DEPENDPATH += $$PWD/../../libretroshare/src/
|
||||
INCLUDEPATH += $$PWD/../../libretroshare/src/
|
||||
# rapidjson headers are required for libretroshare
|
||||
INCLUDEPATH += ../../supportlibs/rapidjson/include
|
||||
|
||||
|
||||
linux-* {
|
||||
target.path = "$${RS_PLUGIN_DIR}"
|
||||
|
||||
144
plugins/FeedReader/CMakeLists.txt
Normal file
144
plugins/FeedReader/CMakeLists.txt
Normal file
@ -0,0 +1,144 @@
|
||||
# plugins/FeedReader/CMakeLists.txt
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
project(FeedReaderPlugin)
|
||||
|
||||
find_package(Qt5 COMPONENTS Core Widgets Xml Network REQUIRED)
|
||||
|
||||
# --- Dependencies ---
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(LibXslt REQUIRED)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
# --- Sources ---
|
||||
set(FEEDREADER_SOURCES
|
||||
FeedReaderPlugin.cpp
|
||||
services/p3FeedReader.cc
|
||||
services/p3FeedReaderThread.cc
|
||||
services/rsFeedReaderItems.cc
|
||||
gui/FeedReaderDialog.cpp
|
||||
gui/FeedReaderMessageWidget.cpp
|
||||
gui/AddFeedDialog.cpp
|
||||
gui/PreviewFeedDialog.cpp
|
||||
gui/FeedReaderNotify.cpp
|
||||
gui/FeedReaderConfig.cpp
|
||||
gui/FeedReaderStringDefs.cpp
|
||||
gui/FeedReaderFeedNotify.cpp
|
||||
gui/FeedReaderUserNotify.cpp
|
||||
gui/FeedReaderFeedItem.cpp
|
||||
gui/FeedTreeWidget.cpp
|
||||
gui/ProxyWidget.cpp
|
||||
util/CURLWrapper.cpp
|
||||
util/XMLWrapper.cpp
|
||||
util/HTMLWrapper.cpp
|
||||
util/XPathWrapper.cpp
|
||||
)
|
||||
|
||||
set(FEEDREADER_FORMS
|
||||
gui/FeedReaderDialog.ui
|
||||
gui/FeedReaderMessageWidget.ui
|
||||
gui/AddFeedDialog.ui
|
||||
gui/PreviewFeedDialog.ui
|
||||
gui/FeedReaderConfig.ui
|
||||
gui/FeedReaderFeedItem.ui
|
||||
gui/ProxyWidget.ui
|
||||
)
|
||||
|
||||
set(FEEDREADER_RESOURCES
|
||||
gui/FeedReader_images.qrc
|
||||
lang/FeedReader_lang.qrc
|
||||
qss/FeedReader_qss.qrc
|
||||
)
|
||||
|
||||
# --- Translations (.ts -> .qm) ---
|
||||
file(GLOB TS_FILES "lang/*.ts")
|
||||
if(Qt5LinguistTools_FOUND)
|
||||
qt5_add_translation(QM_FILES ${TS_FILES})
|
||||
else()
|
||||
find_program(LRELEASE_EXECUTABLE NAMES lrelease-qt5 lrelease)
|
||||
foreach(ts_file ${TS_FILES})
|
||||
get_filename_component(ts_name ${ts_file} NAME_WE)
|
||||
set(qm_src_file "${CMAKE_CURRENT_SOURCE_DIR}/lang/${ts_name}.qm")
|
||||
set(qm_bin_file "${CMAKE_CURRENT_BINARY_DIR}/${ts_name}.qm")
|
||||
|
||||
if(EXISTS ${qm_src_file})
|
||||
list(APPEND QM_FILES ${qm_src_file})
|
||||
elseif(LRELEASE_EXECUTABLE)
|
||||
add_custom_command(
|
||||
OUTPUT ${qm_bin_file}
|
||||
COMMAND ${LRELEASE_EXECUTABLE} ${ts_file} -qm ${qm_bin_file}
|
||||
DEPENDS ${ts_file}
|
||||
VERBATIM
|
||||
)
|
||||
list(APPEND QM_FILES ${qm_bin_file})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# --- CTarget ---
|
||||
add_library(FeedReader MODULE
|
||||
${FEEDREADER_SOURCES}
|
||||
${FEEDREADER_FORMS}
|
||||
${FEEDREADER_RESOURCES}
|
||||
${QM_FILES}
|
||||
)
|
||||
|
||||
set_target_properties(FeedReader PROPERTIES
|
||||
PREFIX "lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins"
|
||||
AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/gui"
|
||||
)
|
||||
|
||||
# --- Links ---
|
||||
# OpenSSL is a direct dependency: services/p3FeedReaderThread.cc includes
|
||||
# <openssl/evp.h> and uses the EVP API directly (not only through libretroshare).
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
if(WIN32)
|
||||
# On Windows a shared module (plugin DLL) must resolve every symbol at link
|
||||
# time (no undefined symbols allowed in a PE/DLL), so the plugin has to link
|
||||
# explicitly against the libraries that provide them. On ELF platforms
|
||||
# (Linux) the loader resolves these symbols from the hosting retroshare-gui
|
||||
# process at load time, so this explicit link is only needed on Windows.
|
||||
target_link_libraries(FeedReader PRIVATE retroshare retroshare-gui)
|
||||
target_compile_definitions(FeedReader PRIVATE WINDOWS_SYS)
|
||||
endif()
|
||||
|
||||
target_link_libraries(FeedReader PRIVATE
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt5::Xml
|
||||
Qt5::Network
|
||||
CURL::libcurl
|
||||
LibXml2::LibXml2
|
||||
LibXslt::LibXslt
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto
|
||||
)
|
||||
|
||||
target_compile_options(FeedReader PRIVATE "-Wno-deprecated-declarations")
|
||||
target_compile_definitions(FeedReader PRIVATE RS_NO_WARN_DEPRECATED)
|
||||
|
||||
if(RS_DEVELOPMENT_BUILD)
|
||||
target_compile_options(FeedReader PRIVATE "-g" "-O0")
|
||||
endif()
|
||||
|
||||
# --- Includes ---
|
||||
target_include_directories(FeedReader PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gui
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/services
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/interface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/util
|
||||
${CMAKE_SOURCE_DIR}/libretroshare/src
|
||||
${CMAKE_SOURCE_DIR}/retroshare-gui/src
|
||||
${CMAKE_SOURCE_DIR}/retroshare-gui/src/gui
|
||||
${CMAKE_SOURCE_DIR}/supportlibs/rapidjson/include
|
||||
)
|
||||
|
||||
# --- Installation ---
|
||||
install(TARGETS FeedReader DESTINATION lib/retroshare/plugins)
|
||||
@ -28,6 +28,8 @@ greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += widgets
|
||||
}
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION,5): QT += core5compat
|
||||
|
||||
target.files = lib/libFeedReader.so
|
||||
|
||||
SOURCES = FeedReaderPlugin.cpp \
|
||||
@ -45,6 +47,7 @@ SOURCES = FeedReaderPlugin.cpp \
|
||||
gui/FeedReaderUserNotify.cpp \
|
||||
gui/FeedReaderFeedItem.cpp \
|
||||
gui/FeedTreeWidget.cpp \
|
||||
gui/ProxyWidget.cpp \
|
||||
util/CURLWrapper.cpp \
|
||||
util/XMLWrapper.cpp \
|
||||
util/HTMLWrapper.cpp \
|
||||
@ -66,6 +69,7 @@ HEADERS = FeedReaderPlugin.h \
|
||||
gui/FeedReaderUserNotify.h \
|
||||
gui/FeedReaderFeedItem.h \
|
||||
gui/FeedTreeWidget.h \
|
||||
gui/ProxyWidget.h \
|
||||
util/CURLWrapper.h \
|
||||
util/XMLWrapper.h \
|
||||
util/HTMLWrapper.h \
|
||||
@ -76,7 +80,8 @@ FORMS = gui/FeedReaderDialog.ui \
|
||||
gui/AddFeedDialog.ui \
|
||||
gui/PreviewFeedDialog.ui \
|
||||
gui/FeedReaderConfig.ui \
|
||||
gui/FeedReaderFeedItem.ui
|
||||
gui/FeedReaderFeedItem.ui \
|
||||
gui/ProxyWidget.ui
|
||||
|
||||
TARGET = FeedReader
|
||||
|
||||
@ -105,12 +110,6 @@ TRANSLATIONS += \
|
||||
lang/FeedReader_tr.ts \
|
||||
lang/FeedReader_zh_CN.ts
|
||||
|
||||
# when rapidjson is mainstream on all distribs, we will not need the sources anymore
|
||||
# in the meantime, they are part of the RS directory so that it is always possible to find them
|
||||
|
||||
INCLUDEPATH += ../../rapidjson-1.1.0
|
||||
|
||||
|
||||
linux-* {
|
||||
CONFIG += link_pkgconfig
|
||||
|
||||
@ -125,7 +124,7 @@ win32 {
|
||||
|
||||
isEmpty(QMAKE_SH) {
|
||||
# MinGW
|
||||
LIBS += -lcrypt32
|
||||
LIBS += -lcrypt32 -lbcrypt
|
||||
}
|
||||
|
||||
# Check for msys2
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
#include "FeedReaderStringDefs.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/common/UIStateHelper.h"
|
||||
#include "util/DateTime.h"
|
||||
|
||||
#include <retroshare/rsgxsforums.h>
|
||||
#include <retroshare/rsposted.h>
|
||||
@ -180,8 +181,7 @@ void AddFeedDialog::useStandardUpdateIntervalToggled()
|
||||
void AddFeedDialog::useStandardProxyToggled()
|
||||
{
|
||||
bool checked = ui->useStandardProxyCheckBox->isChecked();
|
||||
ui->proxyAddressLineEdit->setEnabled(!checked);
|
||||
ui->proxyPortSpinBox->setEnabled(!checked);
|
||||
ui->proxyWidget->setEnabled(!checked);
|
||||
}
|
||||
|
||||
void AddFeedDialog::typeForumToggled()
|
||||
@ -335,13 +335,12 @@ bool AddFeedDialog::fillFeed(uint32_t feedId)
|
||||
ui->passwordLineEdit->setText(QString::fromUtf8(feedInfo.password.c_str()));
|
||||
|
||||
ui->useStandardProxyCheckBox->setChecked(feedInfo.flag.standardProxy);
|
||||
ui->proxyAddressLineEdit->setText(QString::fromUtf8(feedInfo.proxyAddress.c_str()));
|
||||
ui->proxyPortSpinBox->setValue(feedInfo.proxyPort);
|
||||
ui->proxyWidget->setAddress(QString::fromUtf8(feedInfo.proxyAddress.c_str()));
|
||||
ui->proxyWidget->setPort(feedInfo.proxyPort);
|
||||
|
||||
ui->useStandardUpdateInterval->setChecked(feedInfo.flag.standardUpdateInterval);
|
||||
ui->updateIntervalSpinBox->setValue(feedInfo.updateInterval / 60);
|
||||
QDateTime dateTime;
|
||||
dateTime.setTime_t(feedInfo.lastUpdate);
|
||||
QDateTime dateTime = DateTime::DateTimeFromTime_t(feedInfo.lastUpdate);
|
||||
ui->lastUpdate->setText(dateTime.toString());
|
||||
|
||||
ui->useStandardStorageTimeCheckBox->setChecked(feedInfo.flag.standardStorageTime);
|
||||
@ -425,8 +424,8 @@ void AddFeedDialog::getFeedInfo(FeedInfo &feedInfo)
|
||||
feedInfo.password = ui->passwordLineEdit->text().toUtf8().constData();
|
||||
|
||||
feedInfo.flag.standardProxy = ui->useStandardProxyCheckBox->isChecked();
|
||||
feedInfo.proxyAddress = ui->proxyAddressLineEdit->text().toUtf8().constData();
|
||||
feedInfo.proxyPort = ui->proxyPortSpinBox->value();
|
||||
feedInfo.proxyAddress = ui->proxyWidget->address().toUtf8().constData();
|
||||
feedInfo.proxyPort = ui->proxyWidget->port();
|
||||
|
||||
feedInfo.flag.standardUpdateInterval = ui->useStandardUpdateInterval->isChecked();
|
||||
feedInfo.updateInterval = ui->updateIntervalSpinBox->value() * 60;
|
||||
|
||||
@ -133,37 +133,16 @@
|
||||
<property name="title">
|
||||
<string>Proxy</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useStandardProxyCheckBox">
|
||||
<property name="text">
|
||||
<string>Use standard proxy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="serverLabel">
|
||||
<property name="text">
|
||||
<string>Server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="proxyAddressLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="portLabel">
|
||||
<property name="text">
|
||||
<string>:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QSpinBox" name="proxyPortSpinBox">
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="ProxyWidget" name="proxyWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -465,6 +444,12 @@
|
||||
<extends>QComboBox</extends>
|
||||
<header>gui/common/RSComboBox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ProxyWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/ProxyWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>urlLineEdit</tabstop>
|
||||
@ -494,8 +479,7 @@
|
||||
<tabstop>useStandardUpdateInterval</tabstop>
|
||||
<tabstop>updateIntervalSpinBox</tabstop>
|
||||
<tabstop>useStandardProxyCheckBox</tabstop>
|
||||
<tabstop>proxyAddressLineEdit</tabstop>
|
||||
<tabstop>proxyPortSpinBox</tabstop>
|
||||
<tabstop>proxyWidget</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@ -31,8 +31,7 @@ FeedReaderConfig::FeedReaderConfig(QWidget *parent, Qt::WindowFlags flags)
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->proxyAddressLineEdit->setEnabled(false);
|
||||
ui->proxyPortSpinBox->setEnabled(false);
|
||||
ui->proxyWidget->setEnabled(false);
|
||||
|
||||
/* Connect signals */
|
||||
connect(ui->updateIntervalSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, [this]() {
|
||||
@ -51,8 +50,7 @@ FeedReaderConfig::FeedReaderConfig(QWidget *parent, Qt::WindowFlags flags)
|
||||
Settings->setValueToGroup("FeedReaderDialog", "OpenAllInNewTab", ui->openAllInNewTabCheckBox->isChecked());
|
||||
});
|
||||
connect(ui->useProxyCheckBox, &QCheckBox::toggled, this, &FeedReaderConfig::updateProxy);
|
||||
connect(ui->proxyAddressLineEdit, &QLineEdit::textChanged, this, &FeedReaderConfig::updateProxy);
|
||||
connect(ui->proxyPortSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, &FeedReaderConfig::updateProxy);
|
||||
connect(ui->proxyWidget, &ProxyWidget::changed, this, &FeedReaderConfig::updateProxy);
|
||||
|
||||
connect(ui->useProxyCheckBox, SIGNAL(toggled(bool)), this, SLOT(useProxyToggled()));
|
||||
}
|
||||
@ -75,8 +73,8 @@ void FeedReaderConfig::load()
|
||||
std::string proxyAddress;
|
||||
uint16_t proxyPort;
|
||||
whileBlocking(ui->useProxyCheckBox)->setChecked(rsFeedReader->getStandardProxy(proxyAddress, proxyPort));
|
||||
whileBlocking(ui->proxyAddressLineEdit)->setText(QString::fromUtf8(proxyAddress.c_str()));
|
||||
whileBlocking(ui->proxyPortSpinBox)->setValue(proxyPort);
|
||||
whileBlocking(ui->proxyWidget)->setAddress(QString::fromUtf8(proxyAddress.c_str()));
|
||||
whileBlocking(ui->proxyWidget)->setPort(proxyPort);
|
||||
|
||||
loaded = true;
|
||||
|
||||
@ -87,11 +85,10 @@ void FeedReaderConfig::useProxyToggled()
|
||||
{
|
||||
bool enabled = ui->useProxyCheckBox->isChecked();
|
||||
|
||||
ui->proxyAddressLineEdit->setEnabled(enabled);
|
||||
ui->proxyPortSpinBox->setEnabled(enabled);
|
||||
ui->proxyWidget->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void FeedReaderConfig::updateProxy()
|
||||
{
|
||||
rsFeedReader->setStandardProxy(ui->useProxyCheckBox->isChecked(), ui->proxyAddressLineEdit->text().toUtf8().constData(), ui->proxyPortSpinBox->value());
|
||||
rsFeedReader->setStandardProxy(ui->useProxyCheckBox->isChecked(), ui->proxyWidget->address().toUtf8().constData(), ui->proxyWidget->port());
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ class FeedReaderConfig : public ConfigPage
|
||||
|
||||
public:
|
||||
/** Default Constructor */
|
||||
FeedReaderConfig(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
FeedReaderConfig(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
/** Default Destructor */
|
||||
virtual ~FeedReaderConfig();
|
||||
|
||||
|
||||
@ -77,37 +77,16 @@
|
||||
<property name="title">
|
||||
<string>Proxy</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useProxyCheckBox">
|
||||
<property name="text">
|
||||
<string>Use proxy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="serverLabel">
|
||||
<property name="text">
|
||||
<string>Server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="proxyAddressLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QSpinBox" name="proxyPortSpinBox">
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="potLabel">
|
||||
<property name="text">
|
||||
<string>:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="ProxyWidget" name="proxyWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -157,12 +136,19 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ProxyWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/ProxyWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>updateIntervalSpinBox</tabstop>
|
||||
<tabstop>storageTimeSpinBox</tabstop>
|
||||
<tabstop>useProxyCheckBox</tabstop>
|
||||
<tabstop>proxyAddressLineEdit</tabstop>
|
||||
<tabstop>proxyPortSpinBox</tabstop>
|
||||
<tabstop>proxyWidget</tabstop>
|
||||
<tabstop>saveInBackgroundCheckBox</tabstop>
|
||||
<tabstop>setMsgToReadOnActivate</tabstop>
|
||||
<tabstop>openAllInNewTabCheckBox</tabstop>
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include "FeedReaderStringDefs.h"
|
||||
#include "gui/common/RSTreeWidgetItem.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/RsGUIEventManager.h"
|
||||
#include "FeedReaderUserNotify.h"
|
||||
#include "gui/Posted/PostedCreatePostDialog.h"
|
||||
#include "util/imageutil.h"
|
||||
@ -73,7 +73,7 @@ FeedReaderDialog::FeedReaderDialog(RsFeedReader *feedReader, FeedReaderNotify *n
|
||||
connect(mNotify, &FeedReaderNotify::feedChanged, this, &FeedReaderDialog::feedChanged, Qt::QueuedConnection);
|
||||
connect(mNotify, &FeedReaderNotify::optimizeImage, this, &FeedReaderDialog::optimizeImage, Qt::QueuedConnection);
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||
connect(RsGUIEventManager::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||
|
||||
/* connect signals */
|
||||
connect(ui->feedTreeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(feedTreeItemActivated(QTreeWidgetItem*)));
|
||||
@ -129,6 +129,8 @@ FeedReaderDialog::FeedReaderDialog(RsFeedReader *feedReader, FeedReaderNotify *n
|
||||
settingsChanged();
|
||||
|
||||
feedTreeItemActivated(NULL);
|
||||
|
||||
mFontSizeHandler.registerFontSize(ui->feedTreeWidget);
|
||||
}
|
||||
|
||||
FeedReaderDialog::~FeedReaderDialog()
|
||||
@ -568,7 +570,7 @@ void FeedReaderDialog::feedChanged(uint32_t feedId, int type)
|
||||
}
|
||||
|
||||
FeedInfo feedInfo;
|
||||
if (type != NOTIFY_TYPE_DEL) {
|
||||
if (type != FeedReaderNotify::NOTIFY_TYPE_DEL) {
|
||||
if (!mFeedReader->getFeedInfo(feedId, feedInfo)) {
|
||||
return;
|
||||
}
|
||||
@ -578,12 +580,12 @@ void FeedReaderDialog::feedChanged(uint32_t feedId, int type)
|
||||
}
|
||||
}
|
||||
|
||||
if (type == NOTIFY_TYPE_MOD || type == NOTIFY_TYPE_DEL) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_MOD || type == FeedReaderNotify::NOTIFY_TYPE_DEL) {
|
||||
QTreeWidgetItemIterator it(ui->feedTreeWidget);
|
||||
QTreeWidgetItem *item;
|
||||
while ((item = *it) != NULL) {
|
||||
if (item->data(COLUMN_FEED_DATA, ROLE_FEED_ID).toUInt() == feedId) {
|
||||
if (type == NOTIFY_TYPE_MOD) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_MOD) {
|
||||
updateFeedItem(item, feedInfo);
|
||||
} else {
|
||||
delete(item);
|
||||
@ -594,7 +596,7 @@ void FeedReaderDialog::feedChanged(uint32_t feedId, int type)
|
||||
}
|
||||
}
|
||||
|
||||
if (type == NOTIFY_TYPE_ADD) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_ADD) {
|
||||
QTreeWidgetItemIterator it(ui->feedTreeWidget);
|
||||
QTreeWidgetItem *itemParent;
|
||||
while ((itemParent = *it) != NULL) {
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
#include "interface/rsFeedReader.h"
|
||||
#include "util/FontSizeHandler.h"
|
||||
|
||||
namespace Ui {
|
||||
class FeedReaderDialog;
|
||||
@ -39,15 +40,15 @@ class FeedReaderDialog : public MainPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FeedReaderDialog(RsFeedReader *feedReader, FeedReaderNotify *notify, QWidget *parent = 0);
|
||||
FeedReaderDialog(RsFeedReader *feedReader, FeedReaderNotify *notify, QWidget *parent = 0);
|
||||
~FeedReaderDialog();
|
||||
|
||||
static QIcon iconFromFeed(const FeedInfo &feedInfo);
|
||||
|
||||
protected:
|
||||
virtual UserNotify *createUserNotify(QObject *parent) override;
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *ev);
|
||||
virtual void showEvent(QShowEvent *event) override;
|
||||
bool eventFilter(QObject *obj, QEvent *ev) override;
|
||||
|
||||
private slots:
|
||||
void settingsChanged();
|
||||
@ -98,6 +99,8 @@ private:
|
||||
RsFeedReader *mFeedReader;
|
||||
FeedReaderNotify *mNotify;
|
||||
|
||||
FontSizeHandler mFontSizeHandler;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::FeedReaderDialog *ui;
|
||||
};
|
||||
|
||||
@ -57,10 +57,10 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="toolBarFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="leftMargin">
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
#include "FeedReaderFeedItem.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "retroshare/rsiface.h"
|
||||
#include "util/DateTime.h"
|
||||
|
||||
FeedReaderFeedNotify::FeedReaderFeedNotify(RsFeedReader *feedReader, FeedReaderNotify *notify, QObject *parent) :
|
||||
FeedNotify(parent), mFeedReader(feedReader), mNotify(notify)
|
||||
@ -71,7 +72,7 @@ void FeedReaderFeedNotify::msgChanged(uint32_t feedId, const QString &msgId, int
|
||||
return;
|
||||
}
|
||||
|
||||
if (type != NOTIFY_TYPE_ADD) {
|
||||
if (type != FeedReaderNotify::NOTIFY_TYPE_ADD) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -135,7 +136,7 @@ FeedItem *FeedReaderFeedNotify::testFeedItem(FeedHolder */*parent*/)
|
||||
FeedMsgInfo msgInfo;
|
||||
msgInfo.title = tr("Test message").toUtf8().constData();
|
||||
msgInfo.description = tr("This is a test message.").toUtf8().constData();
|
||||
msgInfo.pubDate = QDateTime::currentDateTime().toTime_t();
|
||||
msgInfo.pubDate = DateTime::DateTimeToTime_t(QDateTime::currentDateTime());
|
||||
|
||||
//TODO: parent?
|
||||
return new FeedReaderFeedItem(mFeedReader, mNotify, feedInfo, msgInfo);
|
||||
|
||||
@ -36,11 +36,12 @@
|
||||
#include "gui/common/RSTreeWidgetItem.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "util/QtVersion.h"
|
||||
#include "util/RsQtVersion.h"
|
||||
#include "gui/Posted/PostedCreatePostDialog.h"
|
||||
#include "gui/gxsforums/CreateGxsForumMsg.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "util/imageutil.h"
|
||||
#include "util/DateTime.h"
|
||||
|
||||
#include "retroshare/rsiface.h"
|
||||
#include "retroshare/rsgxsforums.h"
|
||||
@ -154,6 +155,8 @@ FeedReaderMessageWidget::FeedReaderMessageWidget(uint32_t feedId, RsFeedReader *
|
||||
ui->msgTreeWidget->installEventFilter(this);
|
||||
|
||||
setFeedId(feedId);
|
||||
|
||||
mFontSizeHandler.registerFontSize(ui->msgTreeWidget);
|
||||
}
|
||||
|
||||
FeedReaderMessageWidget::~FeedReaderMessageWidget()
|
||||
@ -361,6 +364,9 @@ void FeedReaderMessageWidget::msgTreeCustomPopupMenu(QPoint /*point*/)
|
||||
action = contextMnu.addAction(QIcon(""), tr("Mark all as read"), this, SLOT(markAllAsReadMsg()));
|
||||
action->setEnabled(mFeedId);
|
||||
|
||||
action = contextMnu.addAction(QIcon(""), tr("Mark all as unread"), this, SLOT(markAllAsUnreadMsg()));
|
||||
action->setEnabled(mFeedId);
|
||||
|
||||
contextMnu.addSeparator();
|
||||
|
||||
action = contextMnu.addAction(QIcon(""), tr("Copy link"), this, SLOT(copySelectedLinksMsg()));
|
||||
@ -474,8 +480,7 @@ void FeedReaderMessageWidget::calculateMsgIconsAndFonts(QTreeWidgetItem *item)
|
||||
void FeedReaderMessageWidget::updateMsgItem(QTreeWidgetItem *item, FeedMsgInfo &info)
|
||||
{
|
||||
QString title = QString::fromUtf8(info.title.c_str());
|
||||
QDateTime qdatetime;
|
||||
qdatetime.setTime_t(info.pubDate);
|
||||
QDateTime qdatetime = DateTime::DateTimeFromTime_t(info.pubDate);
|
||||
|
||||
/* add string to all data */
|
||||
QString sort = QString("%1_%2_%3").arg(title, qdatetime.toString("yyyyMMdd_hhmmss")).arg(info.feedId);
|
||||
@ -513,12 +518,12 @@ void FeedReaderMessageWidget::feedChanged(uint32_t feedId, int type)
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == NOTIFY_TYPE_DEL) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_DEL) {
|
||||
setFeedId(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == NOTIFY_TYPE_MOD) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_MOD) {
|
||||
if (!mFeedReader->getFeedInfo(mFeedId, mFeedInfo)) {
|
||||
setFeedId(0);
|
||||
return;
|
||||
@ -553,18 +558,18 @@ void FeedReaderMessageWidget::msgChanged(uint32_t feedId, const QString &msgId,
|
||||
}
|
||||
|
||||
FeedMsgInfo msgInfo;
|
||||
if (type != NOTIFY_TYPE_DEL) {
|
||||
if (type != FeedReaderNotify::NOTIFY_TYPE_DEL) {
|
||||
if (!mFeedReader->getMsgInfo(feedId, msgId.toStdString(), msgInfo)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == NOTIFY_TYPE_MOD || type == NOTIFY_TYPE_DEL) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_MOD || type == FeedReaderNotify::NOTIFY_TYPE_DEL) {
|
||||
QTreeWidgetItemIterator it(ui->msgTreeWidget);
|
||||
QTreeWidgetItem *item;
|
||||
while ((item = *it) != NULL) {
|
||||
if (item->data(COLUMN_MSG_DATA, ROLE_MSG_ID).toString() == msgId) {
|
||||
if (type == NOTIFY_TYPE_MOD) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_MOD) {
|
||||
updateMsgItem(item, msgInfo);
|
||||
filterItem(item);
|
||||
} else {
|
||||
@ -576,13 +581,13 @@ void FeedReaderMessageWidget::msgChanged(uint32_t feedId, const QString &msgId,
|
||||
}
|
||||
}
|
||||
|
||||
if (type == NOTIFY_TYPE_MOD) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_MOD) {
|
||||
if (msgId.toStdString() == currentMsgId()) {
|
||||
updateCurrentMessage();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == NOTIFY_TYPE_ADD) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_ADD) {
|
||||
QTreeWidgetItem *item = new RSTreeWidgetItem(mMsgCompareRole);
|
||||
updateMsgItem(item, msgInfo);
|
||||
ui->msgTreeWidget->addTopLevelItem(item);
|
||||
@ -818,6 +823,16 @@ void FeedReaderMessageWidget::markAsUnreadMsg()
|
||||
}
|
||||
|
||||
void FeedReaderMessageWidget::markAllAsReadMsg()
|
||||
{
|
||||
setAllMsgAsReadUnread(true);
|
||||
}
|
||||
|
||||
void FeedReaderMessageWidget::markAllAsUnreadMsg()
|
||||
{
|
||||
setAllMsgAsReadUnread(false);
|
||||
}
|
||||
|
||||
void FeedReaderMessageWidget::setAllMsgAsReadUnread(bool read)
|
||||
{
|
||||
QList<QTreeWidgetItem*> items;
|
||||
|
||||
@ -829,7 +844,7 @@ void FeedReaderMessageWidget::markAllAsReadMsg()
|
||||
}
|
||||
++it;
|
||||
}
|
||||
setMsgAsReadUnread(items, true);
|
||||
setMsgAsReadUnread(items, read);
|
||||
}
|
||||
|
||||
void FeedReaderMessageWidget::copySelectedLinksMsg()
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
#include "interface/rsFeedReader.h"
|
||||
#include "util/FontSizeHandler.h"
|
||||
|
||||
namespace Ui {
|
||||
class FeedReaderMessageWidget;
|
||||
@ -67,6 +68,7 @@ private slots:
|
||||
void markAsReadMsg();
|
||||
void markAsUnreadMsg();
|
||||
void markAllAsReadMsg();
|
||||
void markAllAsUnreadMsg();
|
||||
void copySelectedLinksMsg();
|
||||
void removeMsg();
|
||||
void processFeed();
|
||||
@ -90,6 +92,7 @@ private:
|
||||
void calculateMsgIconsAndFonts(QTreeWidgetItem *item);
|
||||
void updateMsgItem(QTreeWidgetItem *item, FeedMsgInfo &info);
|
||||
void setMsgAsReadUnread(QList<QTreeWidgetItem*> &rows, bool read);
|
||||
void setAllMsgAsReadUnread(bool read);
|
||||
void filterItem(QTreeWidgetItem *item, const QString &text, int filterColumn);
|
||||
void filterItem(QTreeWidgetItem *item);
|
||||
void toggleMsgText_internal();
|
||||
@ -107,6 +110,8 @@ private:
|
||||
RsFeedReader *mFeedReader;
|
||||
FeedReaderNotify *mNotify;
|
||||
|
||||
FontSizeHandler mFontSizeHandler;
|
||||
|
||||
Ui::FeedReaderMessageWidget *ui;
|
||||
};
|
||||
|
||||
|
||||
@ -29,6 +29,13 @@ class FeedReaderNotify : public QObject, public RsFeedReaderNotify
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// These replace the variables from the old notify system. It's simpler than switching the entire
|
||||
// feedreader plugin to the new rsEvents system
|
||||
|
||||
static const int NOTIFY_TYPE_ADD = 0x01;
|
||||
static const int NOTIFY_TYPE_DEL = 0x02;
|
||||
static const int NOTIFY_TYPE_MOD = 0x03;
|
||||
|
||||
FeedReaderNotify();
|
||||
|
||||
/* RsFeedReaderNotify */
|
||||
|
||||
@ -67,7 +67,7 @@ void FeedReaderUserNotify::iconClicked()
|
||||
|
||||
void FeedReaderUserNotify::feedChanged(uint32_t /*feedId*/, int type)
|
||||
{
|
||||
if (type == NOTIFY_TYPE_DEL) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_DEL) {
|
||||
updateIcon();
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,13 +294,13 @@ void PreviewFeedDialog::feedChanged(uint32_t feedId, int type)
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == NOTIFY_TYPE_DEL) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_DEL) {
|
||||
/* feed deleted */
|
||||
mFeedId = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == NOTIFY_TYPE_ADD || type == NOTIFY_TYPE_MOD) {
|
||||
if (type == FeedReaderNotify::NOTIFY_TYPE_ADD || type == FeedReaderNotify::NOTIFY_TYPE_MOD) {
|
||||
FeedInfo feedInfo;
|
||||
if (!mFeedReader->getFeedInfo(mFeedId, feedInfo)) {
|
||||
return;
|
||||
@ -320,18 +320,18 @@ void PreviewFeedDialog::msgChanged(uint32_t feedId, const QString &msgId, int ty
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case NOTIFY_TYPE_ADD:
|
||||
case FeedReaderNotify::NOTIFY_TYPE_ADD:
|
||||
if (mMsgId.empty()) {
|
||||
mMsgId = msgId.toStdString();
|
||||
updateMsg();
|
||||
}
|
||||
break;
|
||||
case NOTIFY_TYPE_MOD:
|
||||
case FeedReaderNotify::NOTIFY_TYPE_MOD:
|
||||
if (mMsgId == msgId.toStdString()) {
|
||||
updateMsg();
|
||||
}
|
||||
break;
|
||||
case NOTIFY_TYPE_DEL:
|
||||
case FeedReaderNotify::NOTIFY_TYPE_DEL:
|
||||
if (mMsgId == msgId.toStdString()) {
|
||||
std::list<std::string>::iterator it = std::find(mMsgIds.begin(), mMsgIds.end(), mMsgId);
|
||||
if (it != mMsgIds.end()) {
|
||||
|
||||
142
plugins/FeedReader/gui/ProxyWidget.cpp
Normal file
142
plugins/FeedReader/gui/ProxyWidget.cpp
Normal file
@ -0,0 +1,142 @@
|
||||
#include "ProxyWidget.h"
|
||||
#include "ui_ProxyWidget.h"
|
||||
|
||||
ProxyWidget::ProxyWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::ProxyWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
/* Connect signals */
|
||||
connectUi(true);
|
||||
connect(ui->portSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, &ProxyWidget::changed);
|
||||
|
||||
/* Initialize types */
|
||||
ui->schemeComboBox->addItem("", "");
|
||||
ui->schemeComboBox->addItem("HTTP", "http://");
|
||||
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("HTTP Proxy."), Qt::ToolTipRole);
|
||||
ui->schemeComboBox->addItem("HTTPS", "https://");
|
||||
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("HTTPS Proxy."), Qt::ToolTipRole);
|
||||
ui->schemeComboBox->addItem("SOCKS4", "socks4://");
|
||||
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("SOCKS4 Proxy."), Qt::ToolTipRole);
|
||||
ui->schemeComboBox->addItem("SOCKS4a", "socks4a://");
|
||||
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("SOCKS4a Proxy. Proxy resolves URL hostname."), Qt::ToolTipRole);
|
||||
ui->schemeComboBox->addItem("SOCKS5", "socks5://");
|
||||
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("SOCKS5 Proxy."), Qt::ToolTipRole);
|
||||
ui->schemeComboBox->addItem("SOCKS5h", "socks5h://");
|
||||
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("SOCKS5 Proxy. Proxy resolves URL hostname."), Qt::ToolTipRole);
|
||||
}
|
||||
|
||||
ProxyWidget::~ProxyWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ProxyWidget::connectUi(bool doConnect)
|
||||
{
|
||||
if (doConnect) {
|
||||
if (!mAddressConnection) {
|
||||
mAddressConnection = connect(ui->addressLineEdit, &QLineEdit::textChanged, this, &ProxyWidget::addressChanged);
|
||||
}
|
||||
if (!mSchemeConnection) {
|
||||
mSchemeConnection = connect(ui->schemeComboBox, (void(QComboBox::*)(int))&QComboBox::currentIndexChanged, this, &ProxyWidget::changed);
|
||||
}
|
||||
} else {
|
||||
if (mAddressConnection) {
|
||||
disconnect(mAddressConnection);
|
||||
}
|
||||
if (mSchemeConnection) {
|
||||
disconnect(mSchemeConnection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString ProxyWidget::address()
|
||||
{
|
||||
QString host = ui->addressLineEdit->text();
|
||||
if (host.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
QString value;
|
||||
|
||||
QString scheme = ui->schemeComboBox->currentData().toString();
|
||||
if (!scheme.isEmpty()) {
|
||||
value = scheme;
|
||||
}
|
||||
|
||||
value += ui->addressLineEdit->text();
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
void ProxyWidget::setAddress(const QString &value)
|
||||
{
|
||||
int schemeIndex;
|
||||
QString host;
|
||||
|
||||
splitAddress(value, schemeIndex, host);
|
||||
|
||||
connectUi(false);
|
||||
ui->schemeComboBox->setCurrentIndex(schemeIndex);
|
||||
ui->addressLineEdit->setText(host);
|
||||
connectUi(true);
|
||||
}
|
||||
|
||||
int ProxyWidget::port()
|
||||
{
|
||||
return ui->portSpinBox->value();
|
||||
}
|
||||
|
||||
void ProxyWidget::setPort(int value)
|
||||
{
|
||||
ui->portSpinBox->setValue(value);
|
||||
}
|
||||
|
||||
void ProxyWidget::addressChanged(const QString &value)
|
||||
{
|
||||
int schemeIndex;
|
||||
QString host;
|
||||
|
||||
splitAddress(value, schemeIndex, host);
|
||||
|
||||
connectUi(false);
|
||||
ui->schemeComboBox->setCurrentIndex(schemeIndex);
|
||||
if (host != ui->addressLineEdit->text()) {
|
||||
ui->addressLineEdit->setText(host);
|
||||
}
|
||||
connectUi(true);
|
||||
|
||||
emit changed();
|
||||
}
|
||||
|
||||
void ProxyWidget::splitAddress(const QString &value, int &schemeIndex, QString &host)
|
||||
{
|
||||
if (value.isEmpty()) {
|
||||
schemeIndex = ui->schemeComboBox->currentIndex();
|
||||
host = value;
|
||||
return;
|
||||
}
|
||||
|
||||
QString scheme;
|
||||
int index = value.indexOf("://");
|
||||
if (index >= 0) {
|
||||
scheme = value.left(index + 3);
|
||||
host = value.mid(index + 3);
|
||||
} else {
|
||||
if (ui->schemeComboBox->currentIndex() == 0) {
|
||||
// Default to HTTP
|
||||
scheme = "http://";
|
||||
} else {
|
||||
scheme = ui->schemeComboBox->currentData().toString();
|
||||
}
|
||||
host = value;
|
||||
}
|
||||
|
||||
schemeIndex = ui->schemeComboBox->findData(scheme);
|
||||
if (schemeIndex < 0) {
|
||||
/* Unknown scheme */
|
||||
schemeIndex = 0;
|
||||
host = value;
|
||||
}
|
||||
}
|
||||
40
plugins/FeedReader/gui/ProxyWidget.h
Normal file
40
plugins/FeedReader/gui/ProxyWidget.h
Normal file
@ -0,0 +1,40 @@
|
||||
#ifndef PROXYWIDGET_H
|
||||
#define PROXYWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class ProxyWidget;
|
||||
}
|
||||
|
||||
class ProxyWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ProxyWidget(QWidget *parent = nullptr);
|
||||
~ProxyWidget();
|
||||
|
||||
QString address();
|
||||
void setAddress(const QString &value);
|
||||
|
||||
int port();
|
||||
void setPort(int value);
|
||||
|
||||
Q_SIGNALS:
|
||||
void changed();
|
||||
|
||||
private Q_SLOTS:
|
||||
void addressChanged(const QString &value);
|
||||
|
||||
private:
|
||||
void connectUi(bool doConnect);
|
||||
void splitAddress(const QString &value, int &schemeIndex, QString &host);
|
||||
|
||||
private:
|
||||
Ui::ProxyWidget *ui;
|
||||
QMetaObject::Connection mAddressConnection;
|
||||
QMetaObject::Connection mSchemeConnection;
|
||||
};
|
||||
|
||||
#endif // PROXYWIDGET_H
|
||||
53
plugins/FeedReader/gui/ProxyWidget.ui
Normal file
53
plugins/FeedReader/gui/ProxyWidget.ui
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ProxyWidget</class>
|
||||
<widget class="QWidget" name="ProxyWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="schemeComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="addressLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="portLabel">
|
||||
<property name="text">
|
||||
<string notr="true">:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="portSpinBox">
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@ -9,7 +9,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+398"/>
|
||||
<location line="+377"/>
|
||||
<source>Board</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -34,7 +34,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-391"/>
|
||||
<location line="-370"/>
|
||||
<source>Authentication (not yet supported)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -59,7 +59,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+50"/>
|
||||
<location line="+29"/>
|
||||
<source>Update interval</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -89,7 +89,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-216"/>
|
||||
<location line="-195"/>
|
||||
<source>Storage time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -114,17 +114,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+7"/>
|
||||
<source>Server</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+10"/>
|
||||
<source>:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+200"/>
|
||||
<location line="+196"/>
|
||||
<source>Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -199,7 +189,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+211"/>
|
||||
<location line="+208"/>
|
||||
<location line="+152"/>
|
||||
<location line="+15"/>
|
||||
<source>Edit feed</source>
|
||||
@ -264,17 +254,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+7"/>
|
||||
<source>Server</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+17"/>
|
||||
<source>:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+10"/>
|
||||
<location line="+13"/>
|
||||
<source>Misc</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -317,12 +297,12 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderDialog.cpp" line="+101"/>
|
||||
<location filename="../gui/FeedReaderDialog.cpp" line="+105"/>
|
||||
<source>Message Folders</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+197"/>
|
||||
<location line="+199"/>
|
||||
<source>New</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -372,7 +352,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+241"/>
|
||||
<location line="+259"/>
|
||||
<source>Add new folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -535,7 +515,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<location line="+26"/>
|
||||
<location filename="../gui/FeedReaderMessageWidget.cpp" line="+117"/>
|
||||
<location filename="../gui/FeedReaderMessageWidget.cpp" line="+126"/>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -551,6 +531,11 @@
|
||||
<source>Author</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+121"/>
|
||||
<source>Copy Link Location</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderMessageWidget.cpp" line="-2"/>
|
||||
<source>Search Title</source>
|
||||
@ -567,7 +552,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+12"/>
|
||||
<location line="+16"/>
|
||||
<source>Open link in browser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -577,7 +562,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+127"/>
|
||||
<location line="+131"/>
|
||||
<source>The messages will be added to the forum</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -637,7 +622,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+374"/>
|
||||
<location line="+412"/>
|
||||
<source>Hide</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -957,4 +942,37 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ProxyWidget</name>
|
||||
<message>
|
||||
<location filename="../gui/ProxyWidget.cpp" line="+17"/>
|
||||
<source>HTTP Proxy.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>HTTPS Proxy.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>SOCKS4 Proxy.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>SOCKS4a Proxy. Proxy resolves URL hostname.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>SOCKS5 Proxy.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>SOCKS5 Proxy. Proxy resolves URL hostname.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
|
||||
#include "rsFeedReaderItems.h"
|
||||
#include "p3FeedReader.h"
|
||||
#include "gui/FeedReaderNotify.h"
|
||||
#include "p3FeedReaderThread.h"
|
||||
#include "rsitems/rsconfigitems.h"
|
||||
#include "retroshare/rsiface.h"
|
||||
@ -415,7 +416,7 @@ RsFeedResult p3FeedReader::addFolder(uint32_t parentId, const std::string &name,
|
||||
IndicateConfigChanged(RsConfigMgr::CheckPriority::SAVE_NOW);
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_ADD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_ADD);
|
||||
}
|
||||
|
||||
return RS_FEED_RESULT_SUCCESS;
|
||||
@ -455,7 +456,7 @@ RsFeedResult p3FeedReader::setFolder(uint32_t feedId, const std::string &name)
|
||||
IndicateConfigChanged(RsConfigMgr::CheckPriority::SAVE_NOW);
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
|
||||
return RS_FEED_RESULT_SUCCESS;
|
||||
@ -502,7 +503,7 @@ RsFeedResult p3FeedReader::addFeed(const FeedInfo &feedInfo, uint32_t &feedId)
|
||||
IndicateConfigChanged(RsConfigMgr::CheckPriority::SAVE_NOW);
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_ADD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_ADD);
|
||||
}
|
||||
|
||||
return RS_FEED_RESULT_SUCCESS;
|
||||
@ -587,7 +588,7 @@ RsFeedResult p3FeedReader::setFeed(uint32_t feedId, const FeedInfo &feedInfo)
|
||||
IndicateConfigChanged(RsConfigMgr::CheckPriority::SAVE_NOW);
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
|
||||
if (!forumId.empty()) {
|
||||
@ -658,7 +659,7 @@ RsFeedResult p3FeedReader::setParent(uint32_t feedId, uint32_t parentId)
|
||||
IndicateConfigChanged(RsConfigMgr::CheckPriority::SAVE_NOW);
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -756,7 +757,7 @@ bool p3FeedReader::removeFeed(uint32_t feedId)
|
||||
/* only notify remove of feed */
|
||||
std::list<uint32_t>::iterator it;
|
||||
for (it = removedFeedIds.begin(); it != removedFeedIds.end(); ++it) {
|
||||
mNotify->notifyFeedChanged(*it, NOTIFY_TYPE_DEL);
|
||||
mNotify->notifyFeedChanged(*it, FeedReaderNotify::NOTIFY_TYPE_DEL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -803,7 +804,7 @@ bool p3FeedReader::addPreviewFeed(const FeedInfo &feedInfo, uint32_t &feedId)
|
||||
}
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_ADD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_ADD);
|
||||
}
|
||||
|
||||
{
|
||||
@ -925,8 +926,8 @@ bool p3FeedReader::removeMsg(uint32_t feedId, const std::string &msgId)
|
||||
}
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyMsgChanged(feedId, msgId, NOTIFY_TYPE_DEL);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyMsgChanged(feedId, msgId, FeedReaderNotify::NOTIFY_TYPE_DEL);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -977,11 +978,11 @@ bool p3FeedReader::removeMsgs(uint32_t feedId, const std::list<std::string> &msg
|
||||
}
|
||||
|
||||
if (mNotify && !removedMsgs.empty()) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
|
||||
std::list<std::string>::iterator it;
|
||||
for (it = removedMsgs.begin(); it != removedMsgs.end(); ++it) {
|
||||
mNotify->notifyMsgChanged(feedId, *it, NOTIFY_TYPE_DEL);
|
||||
mNotify->notifyMsgChanged(feedId, *it, FeedReaderNotify::NOTIFY_TYPE_DEL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1224,7 +1225,7 @@ bool p3FeedReader::processFeed(uint32_t feedId)
|
||||
|
||||
if (mNotify) {
|
||||
for (it = notifyIds.begin(); it != notifyIds.end(); ++it) {
|
||||
mNotify->notifyFeedChanged(*it, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(*it, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1273,8 +1274,8 @@ bool p3FeedReader::setMessageRead(uint32_t feedId, const std::string &msgId, boo
|
||||
if (changed) {
|
||||
IndicateConfigChanged(RsConfigMgr::CheckPriority::SAVE_OFTEN);
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyMsgChanged(feedId, msgId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyMsgChanged(feedId, msgId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1313,6 +1314,7 @@ bool p3FeedReader::retransformMsg(uint32_t feedId, const std::string &msgId)
|
||||
std::string errorString;
|
||||
std::string descriptionTransformed = mi->descriptionTransformed;
|
||||
if (p3FeedReaderThread::processTransformation(*fi, mi, errorString) == RS_FEED_ERRORSTATE_OK) {
|
||||
RsFeedReaderSerialiser::correctMsgSize(mi);
|
||||
if (mi->descriptionTransformed != descriptionTransformed) {
|
||||
msgChanged = true;
|
||||
}
|
||||
@ -1328,10 +1330,10 @@ bool p3FeedReader::retransformMsg(uint32_t feedId, const std::string &msgId)
|
||||
IndicateConfigChanged(RsConfigMgr::CheckPriority::SAVE_NOW);
|
||||
if (mNotify) {
|
||||
if (feedChanged) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
if (msgChanged) {
|
||||
mNotify->notifyMsgChanged(feedId, msgId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyMsgChanged(feedId, msgId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1466,7 +1468,7 @@ int p3FeedReader::tick()
|
||||
|
||||
if (mNotify) {
|
||||
for (it = notifyIds.begin(); it != notifyIds.end(); ++it) {
|
||||
mNotify->notifyFeedChanged(*it, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(*it, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
if (imageToOptimze) {
|
||||
mNotify->notifyOptimizeImage();
|
||||
@ -1526,7 +1528,7 @@ void p3FeedReader::cleanFeeds()
|
||||
if (mNotify) {
|
||||
std::list<std::pair<uint32_t, std::string> >::iterator it;
|
||||
for (it = removedMsgIds.begin(); it != removedMsgIds.end(); ++it) {
|
||||
mNotify->notifyMsgChanged(it->first, it->second, NOTIFY_TYPE_DEL);
|
||||
mNotify->notifyMsgChanged(it->first, it->second, FeedReaderNotify::NOTIFY_TYPE_DEL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1608,8 +1610,11 @@ bool p3FeedReader::saveList(bool &cleanup, std::list<RsItem *> &saveData)
|
||||
RsFeedReaderMsg *msg = it2->second;
|
||||
|
||||
if (cleanup) {
|
||||
saveData.push_back(new RsFeedReaderMsg(*msg));
|
||||
RsFeedReaderMsg *clonedMsg = new RsFeedReaderMsg(*msg);
|
||||
RsFeedReaderSerialiser::correctMsgSize(clonedMsg);
|
||||
saveData.push_back(clonedMsg);
|
||||
} else {
|
||||
RsFeedReaderSerialiser::correctMsgSize(msg);
|
||||
saveData.push_back(msg);
|
||||
}
|
||||
}
|
||||
@ -1801,7 +1806,7 @@ bool p3FeedReader::getFeedToDownload(RsFeedReaderFeed &feed, uint32_t neededFeed
|
||||
}
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -1852,7 +1857,7 @@ void p3FeedReader::onDownloadSuccess(uint32_t feedId, const std::string &content
|
||||
}
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1889,7 +1894,7 @@ void p3FeedReader::onDownloadError(uint32_t feedId, RsFeedReaderErrorState resul
|
||||
}
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1944,7 +1949,7 @@ bool p3FeedReader::getFeedToProcess(RsFeedReaderFeed &feed, uint32_t neededFeedI
|
||||
}
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -2124,6 +2129,7 @@ void p3FeedReader::onProcessSuccess_addMsgs(uint32_t feedId, std::list<RsFeedRea
|
||||
miNew->flag = RS_FEEDMSG_FLAG_NEW;
|
||||
addedMsgs.push_back(miNew->msgId);
|
||||
}
|
||||
RsFeedReaderSerialiser::correctMsgSize(miNew);
|
||||
fi->msgs[miNew->msgId] = miNew;
|
||||
newMsgIt = msgs.erase(newMsgIt);
|
||||
|
||||
@ -2323,11 +2329,11 @@ void p3FeedReader::onProcessSuccess_addMsgs(uint32_t feedId, std::list<RsFeedRea
|
||||
}
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
|
||||
std::list<std::string>::iterator it;
|
||||
for (it = addedMsgs.begin(); it != addedMsgs.end(); ++it) {
|
||||
mNotify->notifyMsgChanged(feedId, *it, NOTIFY_TYPE_ADD);
|
||||
mNotify->notifyMsgChanged(feedId, *it, FeedReaderNotify::NOTIFY_TYPE_ADD);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2365,7 +2371,7 @@ void p3FeedReader::onProcessError(uint32_t feedId, RsFeedReaderErrorState result
|
||||
}
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2433,7 +2439,7 @@ void p3FeedReader::setFeedInfo(uint32_t feedId, const std::string &name, const s
|
||||
}
|
||||
|
||||
if (mNotify) {
|
||||
mNotify->notifyFeedChanged(feedId, NOTIFY_TYPE_MOD);
|
||||
mNotify->notifyFeedChanged(feedId, FeedReaderNotify::NOTIFY_TYPE_MOD);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,9 +32,9 @@ class RsFeedReaderMsg;
|
||||
class p3FeedReaderThread;
|
||||
|
||||
class RsGxsForums;
|
||||
struct RsGxsForumGroup;
|
||||
class RsGxsForumGroup;
|
||||
class RsPosted;
|
||||
struct RsPostedGroup;
|
||||
class RsPostedGroup;
|
||||
class RsGxsIfaceHelper;
|
||||
|
||||
class p3FeedReader : public RsPQIService, public RsFeedReader
|
||||
|
||||
@ -848,6 +848,22 @@ RsFeedReaderErrorState p3FeedReaderThread::process(const RsFeedReaderFeed &feed,
|
||||
|
||||
RsFeedReaderErrorState result = RS_FEED_ERRORSTATE_OK;
|
||||
|
||||
time_t minimumPubDate = 0;
|
||||
if (feed.lastUpdate == 0) {
|
||||
// Get all items on first scan
|
||||
} else {
|
||||
// Get storage time
|
||||
uint32_t storageTime = 0;
|
||||
if (feed.flag & RS_FEED_FLAG_STANDARD_STORAGE_TIME) {
|
||||
storageTime = mFeedReader->getStandardStorageTime();
|
||||
} else {
|
||||
storageTime = feed.storageTime;
|
||||
}
|
||||
if (storageTime > 0) {
|
||||
minimumPubDate = time(NULL) - storageTime;
|
||||
}
|
||||
}
|
||||
|
||||
XMLWrapper xml;
|
||||
if (xml.readXML(feed.content.c_str())) {
|
||||
xmlNodePtr root = xml.getRootElement();
|
||||
@ -1006,6 +1022,13 @@ RsFeedReaderErrorState p3FeedReaderThread::process(const RsFeedReaderFeed &feed,
|
||||
}
|
||||
}
|
||||
|
||||
if (minimumPubDate) {
|
||||
if (item->pubDate < minimumPubDate) {
|
||||
// pubDate is less than storage time, don't add as new item
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
entries.push_back(item);
|
||||
}
|
||||
} else {
|
||||
@ -1097,7 +1120,7 @@ RsFeedReaderErrorState p3FeedReaderThread::processMsg(const RsFeedReaderFeed &fe
|
||||
std::string url;
|
||||
if (feed.flag & RS_FEED_FLAG_SAVE_COMPLETE_PAGE) {
|
||||
#ifdef FEEDREADER_DEBUG
|
||||
std::cerr << "p3FeedReaderThread::processHTML - feed " << feed.feedId << " (" << feed.name << ") download page " << msg->link << std::endl;
|
||||
std::cerr << "p3FeedReaderThread::processMsg - feed " << feed.feedId << " (" << feed.name << ") download page " << msg->link << std::endl;
|
||||
#endif
|
||||
std::string content;
|
||||
CURLWrapper CURL(proxy);
|
||||
@ -1134,7 +1157,7 @@ RsFeedReaderErrorState p3FeedReaderThread::processMsg(const RsFeedReaderFeed &fe
|
||||
|
||||
if (result != RS_FEED_ERRORSTATE_OK) {
|
||||
#ifdef FEEDREADER_DEBUG
|
||||
std::cerr << "p3FeedReaderThread::processHTML - feed " << feed.feedId << " (" << feed.name << ") cannot download page, CURLCode = " << code << ", error = " << errorString << std::endl;
|
||||
std::cerr << "p3FeedReaderThread::processMsg - feed " << feed.feedId << " (" << feed.name << ") cannot download page, CURLCode = " << code << ", error = " << errorString << std::endl;
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
@ -1151,10 +1174,10 @@ RsFeedReaderErrorState p3FeedReaderThread::processMsg(const RsFeedReaderFeed &fe
|
||||
|
||||
if (isRunning()) {
|
||||
/* process description */
|
||||
bool processPostedFirstImage = (feed.flag & RS_FEED_FLAG_POSTED_FIRST_IMAGE) ? TRUE : FALSE;
|
||||
bool processPostedFirstImage = (feed.flag & RS_FEED_FLAG_POSTED_FIRST_IMAGE) ? true : false;
|
||||
if (!msg->attachmentBinary.empty()) {
|
||||
/* use attachment as image */
|
||||
processPostedFirstImage = FALSE;
|
||||
processPostedFirstImage = false;
|
||||
}
|
||||
|
||||
//long todo; // encoding
|
||||
@ -1178,16 +1201,7 @@ RsFeedReaderErrorState p3FeedReaderThread::processMsg(const RsFeedReaderFeed &fe
|
||||
|
||||
switch (node->type) {
|
||||
case XML_ELEMENT_NODE:
|
||||
if (xmlStrcasecmp(node->name, BAD_CAST"img") == 0) {
|
||||
/* process images */
|
||||
|
||||
if ((feed.flag & RS_FEED_FLAG_EMBED_IMAGES) == 0) {
|
||||
/* remove image */
|
||||
xmlUnlinkNode(node);
|
||||
nodesToDelete.push_back(node);
|
||||
continue;
|
||||
}
|
||||
} else if (xmlStrcasecmp(node->name, BAD_CAST"script") == 0) {
|
||||
if (xmlStrcasecmp(node->name, BAD_CAST"script") == 0) {
|
||||
/* remove script */
|
||||
xmlUnlinkNode(node);
|
||||
nodesToDelete.push_back(node);
|
||||
@ -1274,13 +1288,13 @@ RsFeedReaderErrorState p3FeedReaderThread::processMsg(const RsFeedReaderFeed &fe
|
||||
if (node->type == XML_ELEMENT_NODE) {
|
||||
bool removeImage = true;
|
||||
|
||||
if (feed.flag & RS_FEED_FLAG_EMBED_IMAGES) {
|
||||
/* embed image */
|
||||
if ((feed.flag & RS_FEED_FLAG_EMBED_IMAGES) || (processPostedFirstImage && !postedFirstImageNode)) {
|
||||
/* embed image or use first image for posted */
|
||||
std::string src = html.getAttr(node, "src");
|
||||
if (!src.empty()) {
|
||||
/* download image */
|
||||
#ifdef FEEDREADER_DEBUG
|
||||
std::cerr << "p3FeedReaderThread::processHTML - feed " << feed.feedId << " (" << feed.name << ") download image " << src << std::endl;
|
||||
std::cerr << "p3FeedReaderThread::processMsg - feed " << feed.feedId << " (" << feed.name << ") download image " << src << std::endl;
|
||||
#endif
|
||||
std::vector<unsigned char> data;
|
||||
CURLWrapper CURL(proxy);
|
||||
@ -1288,23 +1302,26 @@ RsFeedReaderErrorState p3FeedReaderThread::processMsg(const RsFeedReaderFeed &fe
|
||||
if (code == CURLE_OK && CURL.responseCode() == 200) {
|
||||
std::string contentType = CURL.contentType();
|
||||
if (isContentType(contentType, "image/")) {
|
||||
std::vector<unsigned char> optimizedData;
|
||||
std::string optimizedMimeType;
|
||||
if (mFeedReader->optimizeImage(FeedReaderOptimizeImageTask::SIZE, data, contentType, optimizedData, optimizedMimeType)) {
|
||||
std::string base64;
|
||||
if (toBase64(optimizedData, base64)) {
|
||||
std::string imageBase64;
|
||||
rs_sprintf(imageBase64, "data:%s;base64,%s", optimizedMimeType.c_str(), base64.c_str());
|
||||
if (html.setAttr(node, "src", imageBase64.c_str())) {
|
||||
removeImage = false;
|
||||
if (feed.flag & RS_FEED_FLAG_EMBED_IMAGES) {
|
||||
std::vector<unsigned char> optimizedData;
|
||||
std::string optimizedMimeType;
|
||||
if (mFeedReader->optimizeImage(FeedReaderOptimizeImageTask::SIZE, data, contentType, optimizedData, optimizedMimeType)) {
|
||||
std::string base64;
|
||||
if (toBase64(optimizedData, base64)) {
|
||||
std::string imageBase64;
|
||||
rs_sprintf(imageBase64, "data:%s;base64,%s", optimizedMimeType.c_str(), base64.c_str());
|
||||
if (html.setAttr(node, "src", imageBase64.c_str())) {
|
||||
removeImage = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (processPostedFirstImage && postedFirstImageNode == NULL) {
|
||||
if (processPostedFirstImage && !postedFirstImageNode) {
|
||||
/* set first image */
|
||||
msg->postedFirstImage = data;
|
||||
msg->postedFirstImageMimeType = contentType;
|
||||
postedFirstImageNode = node;
|
||||
removeImage = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1348,7 +1365,7 @@ RsFeedReaderErrorState p3FeedReaderThread::processMsg(const RsFeedReaderFeed &fe
|
||||
if (!html.saveHTML(msg->postedDescriptionWithoutFirstImage)) {
|
||||
errorString = html.lastError();
|
||||
#ifdef FEEDREADER_DEBUG
|
||||
std::cerr << "p3FeedReaderThread::processHTML - feed " << feed.feedId << " (" << feed.name << ") cannot dump html" << std::endl;
|
||||
std::cerr << "p3FeedReaderThread::processMsg - feed " << feed.feedId << " (" << feed.name << ") cannot dump html" << std::endl;
|
||||
std::cerr << " Error: " << errorString << std::endl;
|
||||
#endif
|
||||
result = RS_FEED_ERRORSTATE_PROCESS_INTERNAL_ERROR;
|
||||
@ -1357,7 +1374,7 @@ RsFeedReaderErrorState p3FeedReaderThread::processMsg(const RsFeedReaderFeed &fe
|
||||
} else {
|
||||
errorString = html.lastError();
|
||||
#ifdef FEEDREADER_DEBUG
|
||||
std::cerr << "p3FeedReaderThread::processHTML - feed " << feed.feedId << " (" << feed.name << ") cannot dump html" << std::endl;
|
||||
std::cerr << "p3FeedReaderThread::processMsg - feed " << feed.feedId << " (" << feed.name << ") cannot dump html" << std::endl;
|
||||
std::cerr << " Error: " << errorString << std::endl;
|
||||
#endif
|
||||
result = RS_FEED_ERRORSTATE_PROCESS_INTERNAL_ERROR;
|
||||
@ -1366,14 +1383,14 @@ RsFeedReaderErrorState p3FeedReaderThread::processMsg(const RsFeedReaderFeed &fe
|
||||
}
|
||||
} else {
|
||||
#ifdef FEEDREADER_DEBUG
|
||||
std::cerr << "p3FeedReaderThread::processHTML - feed " << feed.feedId << " (" << feed.name << ") no root element" << std::endl;
|
||||
std::cerr << "p3FeedReaderThread::processMsg - feed " << feed.feedId << " (" << feed.name << ") no root element" << std::endl;
|
||||
#endif
|
||||
result = RS_FEED_ERRORSTATE_PROCESS_HTML_ERROR;
|
||||
}
|
||||
} else {
|
||||
errorString = html.lastError();
|
||||
#ifdef FEEDREADER_DEBUG
|
||||
std::cerr << "p3FeedReaderThread::processHTML - feed " << feed.feedId << " (" << feed.name << ") cannot read html" << std::endl;
|
||||
std::cerr << "p3FeedReaderThread::processMsg - feed " << feed.feedId << " (" << feed.name << ") cannot read html" << std::endl;
|
||||
std::cerr << " Error: " << errorString << std::endl;
|
||||
#endif
|
||||
result = RS_FEED_ERRORSTATE_PROCESS_HTML_ERROR;
|
||||
|
||||
@ -284,6 +284,54 @@ std::ostream &RsFeedReaderMsg::print(std::ostream &out, uint16_t /*indent*/)
|
||||
return out;
|
||||
}
|
||||
|
||||
void RsFeedReaderSerialiser::correctMsgSize(RsFeedReaderMsg *item)
|
||||
{
|
||||
if (!item) return;
|
||||
|
||||
uint32_t s = 8; /* header */
|
||||
s += 2; /* version */
|
||||
s += GetTlvStringSize(item->msgId);
|
||||
s += sizeof(uint32_t);
|
||||
s += GetTlvStringSize(item->title);
|
||||
s += GetTlvStringSize(item->link);
|
||||
s += GetTlvStringSize(item->author);
|
||||
s += GetTlvStringSize(item->description);
|
||||
s += GetTlvStringSize(item->descriptionTransformed);
|
||||
s += sizeof(uint32_t); /* pubDate */
|
||||
s += sizeof(uint32_t); /* flag */
|
||||
s += GetTlvStringSize(item->attachmentLink);
|
||||
s += GetTlvStringSize(item->attachment);
|
||||
s += GetTlvStringSize(item->attachmentMimeType);
|
||||
|
||||
uint32_t sizeLimit = RsSerialiser::MAX_SERIAL_SIZE - 2000;
|
||||
if (s > sizeLimit) {
|
||||
uint32_t baseSize = s - GetTlvStringSize(item->description) - GetTlvStringSize(item->descriptionTransformed);
|
||||
if (baseSize < sizeLimit) {
|
||||
uint32_t allowedTextSize = sizeLimit - baseSize;
|
||||
std::string warning = "<p style='color: #d9534f; font-weight: bold; font-size: 1.1em;'>[Warning: This message has been truncated by RetroShare because its size exceeded the 256 KB safety limit.]</p><br/>";
|
||||
uint32_t neededSpace = warning.size() + 100;
|
||||
if (item->descriptionTransformed.empty()) {
|
||||
if (item->description.size() > allowedTextSize) {
|
||||
if (allowedTextSize > neededSpace) {
|
||||
item->description = warning + item->description.substr(0, allowedTextSize - neededSpace) + "... [TRUNCATED]";
|
||||
} else {
|
||||
item->description = item->description.substr(0, allowedTextSize - 100) + "... [TRUNCATED]";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
item->description.clear();
|
||||
if (item->descriptionTransformed.size() > allowedTextSize) {
|
||||
if (allowedTextSize > neededSpace) {
|
||||
item->descriptionTransformed = warning + item->descriptionTransformed.substr(0, allowedTextSize - neededSpace) + "... [TRUNCATED]";
|
||||
} else {
|
||||
item->descriptionTransformed = item->descriptionTransformed.substr(0, allowedTextSize - 100) + "... [TRUNCATED]";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t RsFeedReaderSerialiser::sizeMsg(RsFeedReaderMsg *item)
|
||||
{
|
||||
uint32_t s = 8; /* header */
|
||||
@ -362,7 +410,9 @@ RsFeedReaderMsg *RsFeedReaderSerialiser::deserialiseMsg(void *data, uint32_t *pk
|
||||
}
|
||||
|
||||
if (*pktsize < rssize) /* check size */
|
||||
{
|
||||
return NULL; /* not enough data */
|
||||
}
|
||||
|
||||
/* set the packet length */
|
||||
*pktsize = rssize;
|
||||
|
||||
@ -146,6 +146,8 @@ public:
|
||||
virtual bool serialise(RsItem *item, void *data, uint32_t *size);
|
||||
virtual RsItem *deserialise(void *data, uint32_t *size);
|
||||
|
||||
static void correctMsgSize(RsFeedReaderMsg *item);
|
||||
|
||||
private:
|
||||
/* For RS_PKT_SUBTYPE_FEEDREADER_FEED */
|
||||
virtual uint32_t sizeFeed(RsFeedReaderFeed *item);
|
||||
|
||||
@ -32,7 +32,7 @@ bool HTMLWrapper::readHTML(const char *html, const char *url)
|
||||
cleanup();
|
||||
|
||||
handleError(true, mLastErrorString);
|
||||
mDocument = htmlReadMemory(html, strlen(html), url, "", /*HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING | */HTML_PARSE_COMPACT | HTML_PARSE_NONET | HTML_PARSE_NOBLANKS);
|
||||
mDocument = htmlReadMemory(html, strlen(html), url, "UTF-8", /*HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING | */HTML_PARSE_COMPACT | HTML_PARSE_NONET | HTML_PARSE_NOBLANKS);
|
||||
handleError(false, mLastErrorString);
|
||||
|
||||
if (mDocument) {
|
||||
|
||||
@ -124,42 +124,24 @@ void XMLWrapper::attach(xmlDocPtr document)
|
||||
|
||||
bool XMLWrapper::convertToString(const xmlChar *xmlText, std::string &text)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
xmlBufferPtr in = xmlBufferCreateStatic((void*) xmlText, xmlStrlen(xmlText));
|
||||
xmlBufferPtr out = xmlBufferCreate();
|
||||
int ret = xmlCharEncOutFunc(mCharEncodingHandler, out, in);
|
||||
if (ret >= 0) {
|
||||
result = true;
|
||||
text = (char*) xmlBufferContent(out);
|
||||
if (!xmlText) {
|
||||
text.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
xmlBufferFree(in);
|
||||
xmlBufferFree(out);
|
||||
|
||||
return result;
|
||||
text = (const char*) xmlText;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool XMLWrapper::convertFromString(const char *text, xmlChar *&xmlText)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
xmlBufferPtr in = xmlBufferCreateStatic((void*) text, strlen(text));
|
||||
xmlBufferPtr out = xmlBufferCreate();
|
||||
int ret = xmlCharEncInFunc(mCharEncodingHandler, out, in);
|
||||
if (ret >= 0) {
|
||||
result = true;
|
||||
#if LIBXML_VERSION >= 20800
|
||||
xmlText = xmlBufferDetach(out);
|
||||
#else
|
||||
xmlText = xmlStrdup(xmlBufferContent(out));
|
||||
#endif
|
||||
if (!text) {
|
||||
xmlText = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
xmlBufferFree(in);
|
||||
xmlBufferFree(out);
|
||||
|
||||
return result;
|
||||
xmlText = xmlStrdup(BAD_CAST text);
|
||||
return xmlText != NULL;
|
||||
}
|
||||
|
||||
xmlDocPtr XMLWrapper::getDocument() const
|
||||
@ -345,15 +327,7 @@ bool XMLWrapper::getChildText(xmlNodePtr node, const char *childName, std::strin
|
||||
return nodeDump(div, text, true);
|
||||
}
|
||||
|
||||
if (child->children->type != XML_TEXT_NODE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (child->children->content) {
|
||||
return convertToString(child->children->content, text);
|
||||
}
|
||||
|
||||
return true;
|
||||
return getContent(child, text, false);
|
||||
}
|
||||
|
||||
std::string XMLWrapper::getAttr(xmlNodePtr node, xmlAttrPtr attr)
|
||||
|
||||
146
plugins/VOIP/CMakeLists.txt
Normal file
146
plugins/VOIP/CMakeLists.txt
Normal file
@ -0,0 +1,146 @@
|
||||
# plugins/VOIP/CMakeLists.txt
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
project(VOIPPlugin)
|
||||
|
||||
# --- Dependencies ---
|
||||
find_package(Qt5 COMPONENTS Core Widgets Multimedia Xml Network REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(AVCODEC REQUIRED libavcodec)
|
||||
pkg_check_modules(AVUTIL REQUIRED libavutil)
|
||||
pkg_check_modules(SPEEX REQUIRED speex)
|
||||
pkg_check_modules(SPEEXDSP REQUIRED speexdsp)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
# --- Definitions ---
|
||||
|
||||
# --- Sources ---
|
||||
set(VOIP_SOURCES
|
||||
VOIPPlugin.cpp
|
||||
gui/VOIPConfigPanel.cpp
|
||||
services/p3VOIP.cc
|
||||
services/rsVOIPItems.cc
|
||||
gui/AudioStats.cpp
|
||||
gui/AudioWizard.cpp
|
||||
gui/SpeexProcessor.cpp
|
||||
gui/audiodevicehelper.cpp
|
||||
gui/VideoProcessor.cpp
|
||||
gui/QVideoDevice.cpp
|
||||
gui/VOIPChatWidgetHolder.cpp
|
||||
gui/VOIPGUIHandler.cpp
|
||||
gui/VOIPNotify.cpp
|
||||
gui/VOIPToasterItem.cpp
|
||||
gui/VOIPToasterNotify.cpp
|
||||
)
|
||||
|
||||
set(VOIP_FORMS
|
||||
gui/AudioStats.ui
|
||||
gui/AudioWizard.ui
|
||||
gui/VOIPConfigPanel.ui
|
||||
gui/VOIPToasterItem.ui
|
||||
)
|
||||
|
||||
set(VOIP_RESOURCES
|
||||
gui/VOIP_images.qrc
|
||||
lang/VOIP_lang.qrc
|
||||
qss/VOIP_qss.qrc
|
||||
)
|
||||
|
||||
# --- Translations (.ts -> .qm) ---
|
||||
file(GLOB TS_FILES "lang/*.ts")
|
||||
if(Qt5LinguistTools_FOUND)
|
||||
qt5_add_translation(QM_FILES ${TS_FILES})
|
||||
else()
|
||||
find_program(LRELEASE_EXECUTABLE NAMES lrelease-qt5 lrelease)
|
||||
foreach(ts_file ${TS_FILES})
|
||||
get_filename_component(ts_name ${ts_file} NAME_WE)
|
||||
set(qm_src_file "${CMAKE_CURRENT_SOURCE_DIR}/lang/${ts_name}.qm")
|
||||
set(qm_bin_file "${CMAKE_CURRENT_BINARY_DIR}/${ts_name}.qm")
|
||||
|
||||
if(EXISTS ${qm_src_file})
|
||||
list(APPEND QM_FILES ${qm_src_file})
|
||||
elseif(LRELEASE_EXECUTABLE)
|
||||
add_custom_command(
|
||||
OUTPUT ${qm_bin_file}
|
||||
COMMAND ${LRELEASE_EXECUTABLE} ${ts_file} -qm ${qm_bin_file}
|
||||
DEPENDS ${ts_file}
|
||||
VERBATIM
|
||||
)
|
||||
list(APPEND QM_FILES ${qm_bin_file})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# --- Target ---
|
||||
add_library(VOIP MODULE
|
||||
${VOIP_SOURCES}
|
||||
${VOIP_FORMS}
|
||||
${VOIP_RESOURCES}
|
||||
${QM_FILES}
|
||||
)
|
||||
|
||||
set_target_properties(VOIP PROPERTIES
|
||||
PREFIX "lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins"
|
||||
AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/gui"
|
||||
)
|
||||
|
||||
# FFmpeg/libav headers (libavcodec/libavutil, included by gui/VideoProcessor.*)
|
||||
# use the C99 fixed-width constant macros (INT64_C, UINT64_C, ...). In a C++
|
||||
# translation unit these are only exposed by <stdint.h> when
|
||||
# __STDC_CONSTANT_MACROS is defined before it is included, so it must be defined
|
||||
# for the whole target to compile the libav headers.
|
||||
target_compile_definitions(VOIP PRIVATE __STDC_CONSTANT_MACROS)
|
||||
if(WIN32)
|
||||
target_compile_definitions(VOIP PRIVATE WINDOWS_SYS)
|
||||
endif()
|
||||
|
||||
# --- Links ---
|
||||
if(WIN32)
|
||||
# See FeedReader/CMakeLists.txt: on Windows a plugin DLL must resolve every
|
||||
# symbol at link time; on Linux they are resolved from the host process.
|
||||
target_link_libraries(VOIP PRIVATE retroshare retroshare-gui)
|
||||
endif()
|
||||
|
||||
# NOTE: VOIP makes no direct use of OpenSSL (it relies on libretroshare for any
|
||||
# cryptography), so it does not find_package/link OpenSSL itself.
|
||||
target_link_libraries(VOIP PRIVATE
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt5::Multimedia
|
||||
Qt5::Xml
|
||||
Qt5::Network
|
||||
${AVCODEC_LIBRARIES}
|
||||
${AVUTIL_LIBRARIES}
|
||||
${SPEEX_LIBRARIES}
|
||||
${SPEEXDSP_LIBRARIES}
|
||||
)
|
||||
|
||||
target_compile_options(VOIP PRIVATE "-Wno-deprecated-declarations")
|
||||
target_compile_definitions(VOIP PRIVATE RS_NO_WARN_DEPRECATED)
|
||||
|
||||
if(RS_DEVELOPMENT_BUILD)
|
||||
target_compile_options(VOIP PRIVATE "-g" "-O0")
|
||||
endif()
|
||||
|
||||
# --- Includes ---
|
||||
target_include_directories(VOIP PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gui
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/services
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/interface
|
||||
${CMAKE_SOURCE_DIR}/libretroshare/src
|
||||
${CMAKE_SOURCE_DIR}/retroshare-gui/src
|
||||
${CMAKE_SOURCE_DIR}/retroshare-gui/src/gui
|
||||
${CMAKE_SOURCE_DIR}/supportlibs/rapidjson/include
|
||||
${AVCODEC_INCLUDE_DIRS}
|
||||
${AVUTIL_INCLUDE_DIRS}
|
||||
${SPEEX_INCLUDE_DIRS}
|
||||
${SPEEXDSP_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# --- Installation ---
|
||||
install(TARGETS VOIP DESTINATION lib/retroshare/plugins)
|
||||
@ -40,11 +40,6 @@ target.files = lib/libVOIP.so
|
||||
DEPENDPATH += $$PWD/../../retroshare-gui/src/temp/ui
|
||||
INCLUDEPATH += $$PWD/../../retroshare-gui/src/temp/ui
|
||||
|
||||
# when rapidjson is mainstream on all distribs, we will not need the sources anymore
|
||||
# in the meantime, they are part of the RS directory so that it is always possible to find them
|
||||
|
||||
INCLUDEPATH += ../../rapidjson-1.1.0
|
||||
|
||||
|
||||
#################################### Linux #####################################
|
||||
|
||||
|
||||
@ -56,13 +56,13 @@ extern "C" {
|
||||
return new VOIPPlugin() ;
|
||||
}
|
||||
|
||||
// This symbol contains the svn revision number grabbed from the executable.
|
||||
// This symbol contains the svn revision number grabbed from the executable.
|
||||
// It will be tested by RS to load the plugin automatically, since it is safe to load plugins
|
||||
// with same revision numbers, assuming that the revision numbers are up-to-date.
|
||||
//
|
||||
uint32_t RETROSHARE_PLUGIN_revision = 0;
|
||||
|
||||
// This symbol contains the svn revision number grabbed from the executable.
|
||||
// This symbol contains the svn revision number grabbed from the executable.
|
||||
// It will be tested by RS to load the plugin automatically, since it is safe to load plugins
|
||||
// with same revision numbers, assuming that the revision numbers are up-to-date.
|
||||
//
|
||||
@ -99,7 +99,9 @@ VOIPPlugin::VOIPPlugin()
|
||||
Q_INIT_RESOURCE(VOIP_images);
|
||||
Q_INIT_RESOURCE(VOIP_qss);
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 58
|
||||
avcodec_register_all();
|
||||
#endif
|
||||
}
|
||||
|
||||
void VOIPPlugin::setInterfaces(RsPlugInInterfaces &interfaces)
|
||||
@ -118,7 +120,7 @@ ConfigPage *VOIPPlugin::qt_config_page() const
|
||||
QDialog *VOIPPlugin::qt_about_page() const
|
||||
{
|
||||
static QMessageBox *about_dialog = NULL ;
|
||||
|
||||
|
||||
if(about_dialog == NULL)
|
||||
{
|
||||
about_dialog = new QMessageBox() ;
|
||||
|
||||
@ -37,6 +37,7 @@ QVideoInputDevice::QVideoInputDevice(QWidget *parent)
|
||||
_capture_device = NULL ;
|
||||
_video_processor = NULL ;
|
||||
_echo_output_device = NULL ;
|
||||
_image_capture = NULL;
|
||||
}
|
||||
|
||||
QVideoInputDevice::~QVideoInputDevice()
|
||||
@ -231,6 +232,6 @@ void QVideoOutputDevice::showFrame(const QImage& img)
|
||||
#ifdef DEBUG_QVIDEODEVICE
|
||||
std::cerr << "img.size = " << img.width() << " x " << img.height() << std::endl;
|
||||
#endif
|
||||
setPixmap(QPixmap::fromImage(img).scaled( QSize(height()*4/3,height()),Qt::IgnoreAspectRatio,Qt::SmoothTransformation)) ;
|
||||
setPixmap(QPixmap::fromImage(img).scaled( QSize(height()*4/3,height()),Qt::KeepAspectRatio,Qt::SmoothTransformation)) ;
|
||||
}
|
||||
|
||||
|
||||
@ -947,9 +947,9 @@ void VOIPChatWidgetHolder::sendAudioData()
|
||||
}
|
||||
}
|
||||
|
||||
void VOIPChatWidgetHolder::updateStatus(int status)
|
||||
void VOIPChatWidgetHolder::updateStatus(RsStatusValue status)
|
||||
{
|
||||
bool enabled = (status != RS_STATUS_OFFLINE);
|
||||
bool enabled = (status != RsStatusValue::RS_STATUS_OFFLINE);
|
||||
|
||||
audioListenToggleButton->setEnabled(audioCaptureToggleButton->isChecked() && enabled);
|
||||
audioListenToggleButtonFS->setEnabled(audioCaptureToggleButton->isChecked() && enabled);
|
||||
|
||||
@ -52,7 +52,7 @@ public:
|
||||
VOIPChatWidgetHolder(ChatWidget *chatWidget, VOIPNotify *notify);
|
||||
virtual ~VOIPChatWidgetHolder();
|
||||
|
||||
virtual void updateStatus(int status);
|
||||
virtual void updateStatus(RsStatusValue status);
|
||||
|
||||
void addAudioData(const RsPeerId &peer_id, QByteArray* array) ;
|
||||
void addVideoData(const RsPeerId &peer_id, QByteArray* array) ;
|
||||
|
||||
@ -33,7 +33,7 @@ void VOIPGUIHandler::ReceivedInvitation(const RsPeerId &peer_id, int flags)
|
||||
#ifdef VOIPGUIHANDLER_DEBUG
|
||||
std::cerr << "****** VOIPGUIHandler: received Invitation from peer " << peer_id.toStdString() << " with flags==" << flags << std::endl;
|
||||
#endif
|
||||
ChatDialog *di = ChatDialog::getChat(ChatId(peer_id), Settings->getChatFlags());
|
||||
ChatDialog *di = ChatDialog::getChat(ChatId(peer_id), (RsChatFlags) Settings->getChatFlags());
|
||||
if (di) {
|
||||
ChatWidget *cw = di->getChatWidget();
|
||||
if(cw) {
|
||||
@ -113,7 +113,7 @@ void VOIPGUIHandler::ReceivedVoipData(const RsPeerId &peer_id)
|
||||
return ;
|
||||
}
|
||||
|
||||
ChatDialog *di = ChatDialog::getChat(ChatId(peer_id), Settings->getChatFlags());
|
||||
ChatDialog *di = ChatDialog::getChat(ChatId(peer_id), (RsChatFlags) Settings->getChatFlags());
|
||||
if (di) {
|
||||
ChatWidget *cw = di->getChatWidget();
|
||||
if (cw) {
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
/*Retroshare-Gui*/
|
||||
#include "gui/chat/ChatDialog.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/RsGUIEventManager.h"
|
||||
#include "util/HandleRichText.h"
|
||||
|
||||
VOIPToasterItem::VOIPToasterItem(const RsPeerId &peer_id, const QString &msg, const voipToasterItem_Type type)
|
||||
|
||||
@ -131,7 +131,7 @@ void av_frame_free(AVFrame **frame)
|
||||
#endif // MINGW
|
||||
|
||||
VideoProcessor::VideoProcessor()
|
||||
:_encoded_frame_size(640,480) , vpMtx("VideoProcessor")
|
||||
: _encoded_out_queue(8), _encoded_frame_size(640,480)
|
||||
{
|
||||
//_lastTimeToShowFrame = time(NULL);
|
||||
_decoded_output_device = NULL ;
|
||||
@ -154,12 +154,10 @@ VideoProcessor::~VideoProcessor()
|
||||
{
|
||||
// clear encoding queue
|
||||
|
||||
RS_STACK_MUTEX(vpMtx) ;
|
||||
|
||||
while(!_encoded_out_queue.empty())
|
||||
{
|
||||
_encoded_out_queue.back().clear() ;
|
||||
_encoded_out_queue.pop_back() ;
|
||||
_encoded_out_queue.tail().clear();
|
||||
_encoded_out_queue.pop() ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,21 +179,12 @@ bool VideoProcessor::processImage(const QImage& img)
|
||||
|
||||
if(codec)
|
||||
{
|
||||
RsVOIPDataChunk chunk ;
|
||||
|
||||
if(codec->encodeData(img.scaled(_encoded_frame_size,Qt::IgnoreAspectRatio,Qt::SmoothTransformation),_target_bandwidth_out,chunk) && chunk.size > 0)
|
||||
{
|
||||
RS_STACK_MUTEX(vpMtx) ;
|
||||
_encoded_out_queue.push_back(chunk) ;
|
||||
_total_encoded_size_out += chunk.size ;
|
||||
}
|
||||
codec->encodeData(img.scaled(_encoded_frame_size,Qt::IgnoreAspectRatio,Qt::SmoothTransformation),_target_bandwidth_out, _encoded_out_queue);
|
||||
|
||||
time_t now = time(NULL) ;
|
||||
|
||||
if(now > _last_bw_estimate_out_TS)
|
||||
{
|
||||
RS_STACK_MUTEX(vpMtx) ;
|
||||
|
||||
_estimated_bandwidth_out = uint32_t(0.75*_estimated_bandwidth_out + 0.25 * (_total_encoded_size_out / (float)(now - _last_bw_estimate_out_TS))) ;
|
||||
|
||||
_total_encoded_size_out = 0 ;
|
||||
@ -217,14 +206,8 @@ bool VideoProcessor::processImage(const QImage& img)
|
||||
|
||||
bool VideoProcessor::nextEncodedPacket(RsVOIPDataChunk& chunk)
|
||||
{
|
||||
RS_STACK_MUTEX(vpMtx) ;
|
||||
if(_encoded_out_queue.empty())
|
||||
return false ;
|
||||
|
||||
chunk = _encoded_out_queue.front() ;
|
||||
_encoded_out_queue.pop_front() ;
|
||||
|
||||
return true ;
|
||||
return _encoded_out_queue.pop(chunk)
|
||||
&& ((_total_encoded_size_out += chunk.size), true);
|
||||
}
|
||||
|
||||
void VideoProcessor::setInternalFrameSize(QSize s)
|
||||
@ -275,7 +258,6 @@ void VideoProcessor::receiveEncodedData(const RsVOIPDataChunk& chunk)
|
||||
}
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(vpMtx) ;
|
||||
_total_encoded_size_in += chunk.size ;
|
||||
|
||||
time_t now = time(NULL) ;
|
||||
@ -368,10 +350,13 @@ bool JPEGVideo::decodeData(const RsVOIPDataChunk& chunk,QImage& image)
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool JPEGVideo::encodeData(const QImage& image,uint32_t /* size_hint */,RsVOIPDataChunk& voip_chunk)
|
||||
bool JPEGVideo::encodeData(const QImage& image,uint32_t /* size_hint */, NetQueue<RsVOIPDataChunk>& dst)
|
||||
{
|
||||
// check if we make a diff image, or if we use the full frame.
|
||||
|
||||
if(dst.full()) return false;
|
||||
RsVOIPDataChunk& voip_chunk = dst.head();
|
||||
|
||||
QImage encoded_frame ;
|
||||
bool differential_frame ;
|
||||
|
||||
@ -409,7 +394,7 @@ bool JPEGVideo::encodeData(const QImage& image,uint32_t /* size_hint */,RsVOIPDa
|
||||
encoded_frame.save(&buffer,"JPEG") ;
|
||||
|
||||
voip_chunk.data = rs_malloc(HEADER_SIZE + qb.size());
|
||||
|
||||
|
||||
if(!voip_chunk.data)
|
||||
return false ;
|
||||
|
||||
@ -426,12 +411,16 @@ bool JPEGVideo::encodeData(const QImage& image,uint32_t /* size_hint */,RsVOIPDa
|
||||
voip_chunk.size = HEADER_SIZE + qb.size() ;
|
||||
voip_chunk.type = RsVOIPDataChunk::RS_VOIP_DATA_TYPE_VIDEO ;
|
||||
|
||||
dst.push();
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
FFmpegVideo::FFmpegVideo()
|
||||
{
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 58
|
||||
avcodec_register_all();
|
||||
#endif
|
||||
// Encoding
|
||||
|
||||
encoding_codec = NULL ;
|
||||
@ -473,8 +462,10 @@ FFmpegVideo::FFmpegVideo()
|
||||
encoding_context->rc_max_rate = 0;
|
||||
encoding_context->rc_buffer_size = 0;
|
||||
#endif
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 58
|
||||
if (encoding_codec->capabilities & AV_CODEC_CAP_TRUNCATED)
|
||||
encoding_context->flags |= AV_CODEC_FLAG_TRUNCATED;
|
||||
#endif
|
||||
encoding_context->flags |= AV_CODEC_FLAG_PSNR;//Peak signal-to-noise ratio
|
||||
encoding_context->flags |= AV_CODEC_CAP_PARAM_CHANGE;
|
||||
encoding_context->i_quant_factor = 0.769f;
|
||||
@ -507,11 +498,12 @@ FFmpegVideo::FFmpegVideo()
|
||||
//encoding_context->max_b_frames = 1;
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
encoding_context->pix_fmt = PIX_FMT_YUV420P; //context->pix_fmt = PIX_FMT_RGB24;
|
||||
if (codec_id == CODEC_ID_H264) {
|
||||
if (codec_id == CODEC_ID_H264)
|
||||
#else
|
||||
encoding_context->pix_fmt = AV_PIX_FMT_YUV420P; //context->pix_fmt = AV_PIX_FMT_RGB24;
|
||||
if (codec_id == AV_CODEC_ID_H264) {
|
||||
if (codec_id == AV_CODEC_ID_H264)
|
||||
#endif
|
||||
{
|
||||
av_opt_set(encoding_context->priv_data, "preset", "slow", 0);
|
||||
}
|
||||
|
||||
@ -569,8 +561,10 @@ FFmpegVideo::FFmpegVideo()
|
||||
decoding_context->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
#endif
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 58
|
||||
if(decoding_codec->capabilities & AV_CODEC_CAP_TRUNCATED)
|
||||
decoding_context->flags |= AV_CODEC_FLAG_TRUNCATED; // we do not send complete frames
|
||||
#endif
|
||||
//we can receive truncated frames
|
||||
decoding_context->flags2 |= AV_CODEC_FLAG2_CHUNKS;
|
||||
|
||||
@ -610,12 +604,81 @@ FFmpegVideo::~FFmpegVideo()
|
||||
|
||||
#define MAX_FFMPEG_ENCODING_BITRATE 81920
|
||||
|
||||
bool FFmpegVideo::encodeData(const QImage& image, uint32_t target_encoding_bitrate, RsVOIPDataChunk& voip_chunk)
|
||||
static void imageToFrame(AVFrame *frame, const QImage& image) {
|
||||
QImage input;
|
||||
if(image.width() == frame->width && image.height() == frame->height)
|
||||
input = image;
|
||||
else
|
||||
input = image.scaled(QSize(frame->width, frame->height),
|
||||
Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
for (int y = 0; y < frame->height - 1; y += 2)
|
||||
for (int x = 0; x < frame->width - 1; x += 2) {
|
||||
QRgb pix00 = input.pixel(QPoint(x+0,y+0));
|
||||
QRgb pix10 = input.pixel(QPoint(x+1,y+0));
|
||||
QRgb pix01 = input.pixel(QPoint(x+0,y+1));
|
||||
QRgb pix11 = input.pixel(QPoint(x+1,y+1));
|
||||
|
||||
int R00 = pix00>>16 & 0xff, G00 = pix00>>8 & 0xff, B00 = pix00>>0 & 0xff;
|
||||
int R10 = pix10>>16 & 0xff, G10 = pix10>>8 & 0xff, B10 = pix10>>0 & 0xff;
|
||||
int R01 = pix01>>16 & 0xff, G01 = pix01>>8 & 0xff, B01 = pix01>>0 & 0xff;
|
||||
int R11 = pix11>>16 & 0xff, G11 = pix11>>8 & 0xff, B11 = pix11>>0 & 0xff;
|
||||
|
||||
float R = 0.25*(R00+R01+R10+R11);
|
||||
float G = 0.25*(G00+G01+G10+G11);
|
||||
float B = 0.25*(B00+B01+B10+B11);
|
||||
|
||||
int Y00 = (0.257 * R00) + (0.504 * G00) + (0.098 * B00) + 16.5;
|
||||
int Y01 = (0.257 * R01) + (0.504 * G01) + (0.098 * B01) + 16.5;
|
||||
int Y10 = (0.257 * R10) + (0.504 * G10) + (0.098 * B10) + 16.5;
|
||||
int Y11 = (0.257 * R11) + (0.504 * G11) + (0.098 * B11) + 16.5;
|
||||
|
||||
int U = (0.439 * R) - (0.368 * G) - (0.071 * B) + 128.5 ;
|
||||
int V = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128.5 ;
|
||||
|
||||
frame->data[0][(y+0) * frame->linesize[0] + x+0] = Y00; // Y
|
||||
frame->data[0][(y+0) * frame->linesize[0] + x+1] = Y01; // Y
|
||||
frame->data[0][(y+1) * frame->linesize[0] + x+0] = Y10; // Y
|
||||
frame->data[0][(y+1) * frame->linesize[0] + x+1] = Y11; // Y
|
||||
|
||||
frame->data[1][y/2 * frame->linesize[1] + x/2] = U; // Cr
|
||||
frame->data[2][y/2 * frame->linesize[2] + x/2] = V; // Cb
|
||||
}
|
||||
}
|
||||
|
||||
static void frameToImage(QImage& image, const AVFrame *frame) {
|
||||
image = QImage(QSize(frame->width,frame->height),QImage::Format_ARGB32);
|
||||
|
||||
#ifdef DEBUG_MPEG_VIDEO
|
||||
std::cerr << "Decoded frame. Size=" << image.width() << "x" << image.height() << std::endl;
|
||||
#endif
|
||||
|
||||
for (int y = 0; y < frame->height; y++)
|
||||
for (int x = 0; x < frame->width; x++) {
|
||||
int Y = frame->data[0][y * frame->linesize[0] + x];
|
||||
int U = frame->data[1][(y/2) * frame->linesize[1] + x/2];
|
||||
int V = frame->data[2][(y/2) * frame->linesize[2] + x/2];
|
||||
|
||||
int B = (int)(1.164*Y + 1.596*V - 222.421);
|
||||
int G = (int)(1.164*Y - 0.391*U - 0.813*V + 136.076);
|
||||
int R = (int)(1.164*Y + 2.018*U - 277.336);
|
||||
B = std::max(0,std::min(255,B));
|
||||
G = std::max(0,std::min(255,G));
|
||||
R = std::max(0,std::min(255,R));
|
||||
|
||||
image.setPixel(QPoint(x,y), QRgb(0xff000000 | (R << 16) | (G << 8) | B));
|
||||
}
|
||||
}
|
||||
|
||||
bool FFmpegVideo::encodeData(const QImage& image, uint32_t target_encoding_bitrate, NetQueue<RsVOIPDataChunk>& dst)
|
||||
{
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 58
|
||||
if(dst.full()) return false;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_MPEG_VIDEO
|
||||
std::cerr << "Encoding frame of size " << image.width() << "x" << image.height() << ", resized to " << encoding_frame_buffer->width << "x" << encoding_frame_buffer->height << " : ";
|
||||
#endif
|
||||
QImage input ;
|
||||
|
||||
if(target_encoding_bitrate > MAX_FFMPEG_ENCODING_BITRATE)
|
||||
{
|
||||
@ -626,54 +689,12 @@ bool FFmpegVideo::encodeData(const QImage& image, uint32_t target_encoding_bitra
|
||||
encoding_context->rc_max_rate = target_encoding_bitrate;
|
||||
//encoding_context->bit_rate_tolerance = target_encoding_bitrate;
|
||||
|
||||
if(image.width() != encoding_frame_buffer->width || image.height() != encoding_frame_buffer->height)
|
||||
input = image.scaled(QSize(encoding_frame_buffer->width,encoding_frame_buffer->height),Qt::IgnoreAspectRatio,Qt::SmoothTransformation) ;
|
||||
else
|
||||
input = image ;
|
||||
|
||||
/* prepare a dummy image */
|
||||
/* Y */
|
||||
for (int y = 0; y < encoding_context->height/2; y++)
|
||||
for (int x = 0; x < encoding_context->width/2; x++)
|
||||
{
|
||||
QRgb pix00 = input.pixel(QPoint(2*x+0,2*y+0)) ;
|
||||
QRgb pix01 = input.pixel(QPoint(2*x+0,2*y+1)) ;
|
||||
QRgb pix10 = input.pixel(QPoint(2*x+1,2*y+0)) ;
|
||||
QRgb pix11 = input.pixel(QPoint(2*x+1,2*y+1)) ;
|
||||
|
||||
int R00 = (pix00 >> 16) & 0xff ; int G00 = (pix00 >> 8) & 0xff ; int B00 = (pix00 >> 0) & 0xff ;
|
||||
int R01 = (pix01 >> 16) & 0xff ; int G01 = (pix01 >> 8) & 0xff ; int B01 = (pix01 >> 0) & 0xff ;
|
||||
int R10 = (pix10 >> 16) & 0xff ; int G10 = (pix10 >> 8) & 0xff ; int B10 = (pix10 >> 0) & 0xff ;
|
||||
int R11 = (pix11 >> 16) & 0xff ; int G11 = (pix11 >> 8) & 0xff ; int B11 = (pix11 >> 0) & 0xff ;
|
||||
|
||||
int Y00 = (0.257 * R00) + (0.504 * G00) + (0.098 * B00) + 16 ;
|
||||
int Y01 = (0.257 * R01) + (0.504 * G01) + (0.098 * B01) + 16 ;
|
||||
int Y10 = (0.257 * R10) + (0.504 * G10) + (0.098 * B10) + 16 ;
|
||||
int Y11 = (0.257 * R11) + (0.504 * G11) + (0.098 * B11) + 16 ;
|
||||
|
||||
float R = 0.25*(R00+R01+R10+R11) ;
|
||||
float G = 0.25*(G00+G01+G10+G11) ;
|
||||
float B = 0.25*(B00+B01+B10+B11) ;
|
||||
|
||||
int U = (0.439 * R) - (0.368 * G) - (0.071 * B) + 128 ;
|
||||
int V = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128 ;
|
||||
|
||||
encoding_frame_buffer->data[0][(2*y+0) * encoding_frame_buffer->linesize[0] + 2*x+0] = std::min(255,std::max(0,Y00)); // Y
|
||||
encoding_frame_buffer->data[0][(2*y+0) * encoding_frame_buffer->linesize[0] + 2*x+1] = std::min(255,std::max(0,Y01)); // Y
|
||||
encoding_frame_buffer->data[0][(2*y+1) * encoding_frame_buffer->linesize[0] + 2*x+0] = std::min(255,std::max(0,Y10)); // Y
|
||||
encoding_frame_buffer->data[0][(2*y+1) * encoding_frame_buffer->linesize[0] + 2*x+1] = std::min(255,std::max(0,Y11)); // Y
|
||||
|
||||
encoding_frame_buffer->data[1][y * encoding_frame_buffer->linesize[1] + x] = std::min(255,std::max(0,U));// Cr
|
||||
encoding_frame_buffer->data[2][y * encoding_frame_buffer->linesize[2] + x] = std::min(255,std::max(0,V));// Cb
|
||||
}
|
||||
|
||||
imageToFrame(encoding_frame_buffer, image);
|
||||
|
||||
encoding_frame_buffer->pts = encoding_frame_count++;
|
||||
|
||||
/* encode the image */
|
||||
|
||||
int got_output = 0;
|
||||
|
||||
AVPacket pkt ;
|
||||
av_init_packet(&pkt);
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 54
|
||||
@ -682,35 +703,53 @@ bool FFmpegVideo::encodeData(const QImage& image, uint32_t target_encoding_bitra
|
||||
|
||||
// do
|
||||
// {
|
||||
int got_output = 0;
|
||||
int ret = avcodec_encode_video(encoding_context, pkt.data, pkt.size, encoding_frame_buffer) ;
|
||||
if (ret > 0) {
|
||||
got_output = ret;
|
||||
}
|
||||
#else
|
||||
#elif LIBAVCODEC_VERSION_MAJOR < 58
|
||||
pkt.data = NULL; // packet data will be allocated by the encoder
|
||||
pkt.size = 0;
|
||||
|
||||
// do
|
||||
// {
|
||||
int got_output = 0;
|
||||
int ret = avcodec_encode_video2(encoding_context, &pkt, encoding_frame_buffer, &got_output) ;
|
||||
#else
|
||||
|
||||
int ret = avcodec_send_frame(encoding_context, encoding_frame_buffer);
|
||||
if(ret == AVERROR(EAGAIN))
|
||||
ret = 0;
|
||||
#endif
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
std::cerr << "Error encoding frame!" << std::endl;
|
||||
return false ;
|
||||
goto fail;
|
||||
}
|
||||
// frame = NULL ; // next attempts: do not encode anything. Do this to just flush the buffer
|
||||
//
|
||||
// } while(got_output) ;
|
||||
|
||||
if(got_output)
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 58
|
||||
while(!dst.full() && !(ret = avcodec_receive_packet(encoding_context, &pkt)))
|
||||
#else
|
||||
if(!got_output) {
|
||||
std::cerr << "No output produced." << std::endl;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
RsVOIPDataChunk& voip_chunk = dst.head();
|
||||
voip_chunk.data = rs_malloc(pkt.size + HEADER_SIZE) ;
|
||||
|
||||
if(!voip_chunk.data)
|
||||
return false ;
|
||||
|
||||
|
||||
if(!voip_chunk.data) {
|
||||
std::cerr << "error: failed to allocate RsVOIPDataChunk data"
|
||||
<< std::endl;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
uint32_t flags = 0;
|
||||
|
||||
((unsigned char *)voip_chunk.data)[0] = VideoProcessor::VIDEO_PROCESSOR_CODEC_ID_MPEG_VIDEO & 0xff ;
|
||||
@ -723,28 +762,36 @@ bool FFmpegVideo::encodeData(const QImage& image, uint32_t target_encoding_bitra
|
||||
voip_chunk.size = pkt.size + HEADER_SIZE;
|
||||
voip_chunk.type = RsVOIPDataChunk::RS_VOIP_DATA_TYPE_VIDEO ;
|
||||
|
||||
dst.push();
|
||||
|
||||
#ifdef DEBUG_MPEG_VIDEO
|
||||
std::cerr << "Output : " << pkt.size << " bytes." << std::endl;
|
||||
fwrite(pkt.data,1,pkt.size,encoding_debug_file) ;
|
||||
fflush(encoding_debug_file) ;
|
||||
#endif
|
||||
av_free_packet(&pkt);
|
||||
|
||||
return true ;
|
||||
}
|
||||
else
|
||||
{
|
||||
voip_chunk.data = NULL;
|
||||
voip_chunk.size = 0;
|
||||
voip_chunk.type = RsVOIPDataChunk::RS_VOIP_DATA_TYPE_VIDEO ;
|
||||
|
||||
std::cerr << "No output produced." << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 58
|
||||
if(ret == AVERROR(EAGAIN))
|
||||
ret = 0;
|
||||
else if(ret < 0) {
|
||||
std::cerr << "error: failed to get packet from encoder: " << ret
|
||||
<< std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
fail:
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR < 58
|
||||
av_free_packet(&pkt);
|
||||
#else
|
||||
av_packet_unref(&pkt);
|
||||
#endif
|
||||
|
||||
return ret == 0;
|
||||
}
|
||||
|
||||
bool FFmpegVideo::decodeData(const RsVOIPDataChunk& chunk,QImage& image)
|
||||
bool FFmpegVideo::decodeData(const RsVOIPDataChunk& chunk, QImage& image)
|
||||
{
|
||||
#ifdef DEBUG_MPEG_VIDEO
|
||||
std::cerr << "Decoding data of size " << chunk.size << std::endl;
|
||||
@ -752,16 +799,8 @@ bool FFmpegVideo::decodeData(const RsVOIPDataChunk& chunk,QImage& image)
|
||||
#endif
|
||||
|
||||
uint32_t s = chunk.size - HEADER_SIZE ;
|
||||
#if defined(__MINGW32__)
|
||||
unsigned char *tmp = (unsigned char*)_aligned_malloc(s + AV_INPUT_BUFFER_PADDING_SIZE, 16) ;
|
||||
#else
|
||||
#ifdef __MACH__
|
||||
//Mac OS X appears to be 16-byte mem aligned.
|
||||
unsigned char *tmp = (unsigned char*)malloc(s + AV_INPUT_BUFFER_PADDING_SIZE) ;
|
||||
#else //MAC
|
||||
unsigned char *tmp = (unsigned char*)memalign(16, s + AV_INPUT_BUFFER_PADDING_SIZE) ;
|
||||
#endif //MAC
|
||||
#endif //MINGW
|
||||
unsigned char *tmp =
|
||||
(unsigned char *)av_malloc(s + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (tmp == NULL) {
|
||||
std::cerr << "FFmpegVideo::decodeData() Unable to allocate new buffer of size " << s << std::endl;
|
||||
return false;
|
||||
@ -772,13 +811,52 @@ bool FFmpegVideo::decodeData(const RsVOIPDataChunk& chunk,QImage& image)
|
||||
/* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */
|
||||
memset(&tmp[s], 0, AV_INPUT_BUFFER_PADDING_SIZE) ;
|
||||
|
||||
decoding_buffer.size = s ;
|
||||
decoding_buffer.data = tmp;
|
||||
int got_frame = 1 ;
|
||||
av_packet_from_data(&decoding_buffer, tmp, s);
|
||||
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 58
|
||||
|
||||
int ret = avcodec_send_packet(decoding_context, &decoding_buffer);
|
||||
av_packet_unref(&decoding_buffer);
|
||||
if(ret) {
|
||||
// EAGAIN is an error here because the decoder's buffer should be empty
|
||||
std::cerr << "error: failed to send packet to decoder: " << ret
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
ret = avcodec_receive_frame(decoding_context, decoding_frame_buffer);
|
||||
if(ret == AVERROR(EAGAIN)) {
|
||||
std::cerr << "warning: "
|
||||
<< "decoder consumed a packet but didn't generate a frame" << std::endl;
|
||||
return false;
|
||||
}
|
||||
else if(ret) {
|
||||
std::cerr << "error: failed to fetch frame from decoder: " << ret
|
||||
<< std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
frameToImage(image, decoding_frame_buffer);
|
||||
|
||||
#ifdef DEBUG_MPEG_VIDEO
|
||||
std::cerr << "debug(MPEG_VIDEO): decoded frame: size="
|
||||
<< image.width() << "x" << image.height() << std::endl;
|
||||
#endif
|
||||
|
||||
// Clear out the internal buffer and drop the frames to avoid latency.
|
||||
// Video decoders typically only create one frame per packet, so this
|
||||
// shouldn't happen under normal circumstances.
|
||||
// Ideally, we would render the most recent frame and discard earlier ones,
|
||||
// but that would require copying of frames that is not worth it.
|
||||
while(!avcodec_receive_frame(decoding_context, decoding_frame_buffer)) {
|
||||
std::cerr << "warning: dropping decoded frame";
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int got_frame = 1 ;
|
||||
while (decoding_buffer.size > 0 || (!decoding_buffer.data && got_frame)) {
|
||||
int len = avcodec_decode_video2(decoding_context,decoding_frame_buffer,&got_frame,&decoding_buffer) ;
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
std::cerr << "Error decoding frame! Return=" << len << std::endl;
|
||||
@ -790,31 +868,18 @@ bool FFmpegVideo::decodeData(const RsVOIPDataChunk& chunk,QImage& image)
|
||||
|
||||
if(got_frame)
|
||||
{
|
||||
image = QImage(QSize(decoding_frame_buffer->width,decoding_frame_buffer->height),QImage::Format_ARGB32) ;
|
||||
frameToImage(image, decoding_frame_buffer);
|
||||
|
||||
#ifdef DEBUG_MPEG_VIDEO
|
||||
std::cerr << "Decoded frame. Size=" << image.width() << "x" << image.height() << std::endl;
|
||||
#endif
|
||||
|
||||
for (int y = 0; y < decoding_frame_buffer->height; y++)
|
||||
for (int x = 0; x < decoding_frame_buffer->width; x++)
|
||||
{
|
||||
int Y = decoding_frame_buffer->data[0][y * decoding_frame_buffer->linesize[0] + x] ;
|
||||
int U = decoding_frame_buffer->data[1][(y/2) * decoding_frame_buffer->linesize[1] + x/2] ;
|
||||
int V = decoding_frame_buffer->data[2][(y/2) * decoding_frame_buffer->linesize[2] + x/2] ;
|
||||
|
||||
int B = std::min(255,std::max(0,(int)(1.164*(Y - 16) + 1.596*(V - 128)))) ;
|
||||
int G = std::min(255,std::max(0,(int)(1.164*(Y - 16) - 0.813*(V - 128) - 0.391*(U - 128)))) ;
|
||||
int R = std::min(255,std::max(0,(int)(1.164*(Y - 16) + 2.018*(U - 128)))) ;
|
||||
|
||||
image.setPixel(QPoint(x,y),QRgb( 0xff000000 + (R << 16) + (G << 8) + B)) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* flush the decoder */
|
||||
decoding_buffer.data = NULL;
|
||||
decoding_buffer.size = 0;
|
||||
//avcodec_decode_video2(decoding_context,decoding_frame_buffer,&got_frame,&decoding_buffer) ;
|
||||
#endif
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
@ -30,12 +30,35 @@ extern "C" {
|
||||
|
||||
class QVideoOutputDevice ;
|
||||
|
||||
template<typename T>
|
||||
class NetQueue {
|
||||
std::vector<T> arr;
|
||||
const unsigned int mask;
|
||||
std::atomic<unsigned int> mhead;
|
||||
std::atomic<unsigned int> mtail;
|
||||
|
||||
public:
|
||||
NetQueue(unsigned int size) : arr(size), mask(size - 1), mhead(0), mtail(0) {
|
||||
if(size & mask) throw std::invalid_argument("size must be a power of 2");
|
||||
}
|
||||
|
||||
bool full() const { return mhead - mtail == arr.size(); }
|
||||
T& head() { return arr[mhead & mask]; }
|
||||
void push() { mhead++; }
|
||||
bool push(const T& e) { return !full() && ((arr[mhead++ & mask] = e), true); }
|
||||
|
||||
bool empty() const { return mhead == mtail; }
|
||||
T& tail() { return arr[mtail & mask]; }
|
||||
void pop() { mtail++; }
|
||||
bool pop(T& e) { return !empty() && ((e = arr[mtail++ & mask]), true); }
|
||||
};
|
||||
|
||||
class VideoCodec
|
||||
{
|
||||
public:
|
||||
virtual bool encodeData(const QImage& Image, uint32_t size_hint, RsVOIPDataChunk& chunk) = 0;
|
||||
virtual bool encodeData(const QImage& Image, uint32_t size_hint, NetQueue<RsVOIPDataChunk>& dst) = 0;
|
||||
virtual bool decodeData(const RsVOIPDataChunk& chunk,QImage& image) = 0;
|
||||
|
||||
|
||||
protected:
|
||||
static const uint32_t HEADER_SIZE = 0x04 ;
|
||||
};
|
||||
@ -47,10 +70,10 @@ class JPEGVideo: public VideoCodec
|
||||
{
|
||||
public:
|
||||
JPEGVideo() ;
|
||||
|
||||
|
||||
protected:
|
||||
virtual bool encodeData(const QImage& Image, uint32_t target_encoding_bitrate, RsVOIPDataChunk& chunk) ;
|
||||
virtual bool decodeData(const RsVOIPDataChunk& chunk,QImage& image) ;
|
||||
virtual bool encodeData(const QImage& Image, uint32_t target_encoding_bitrate, NetQueue<RsVOIPDataChunk>& dst) ;
|
||||
virtual bool decodeData(const RsVOIPDataChunk& chunk, QImage& image) ;
|
||||
|
||||
static const uint32_t JPEG_VIDEO_FLAGS_DIFFERENTIAL_FRAME = 0x0001 ;
|
||||
private:
|
||||
@ -73,19 +96,19 @@ public:
|
||||
~FFmpegVideo() ;
|
||||
|
||||
protected:
|
||||
virtual bool encodeData(const QImage& Image, uint32_t target_encoding_bitrate, RsVOIPDataChunk& chunk) ;
|
||||
virtual bool encodeData(const QImage& Image, uint32_t target_encoding_bitrate, NetQueue<RsVOIPDataChunk>& dst) ;
|
||||
virtual bool decodeData(const RsVOIPDataChunk& chunk,QImage& image) ;
|
||||
|
||||
|
||||
private:
|
||||
AVCodec *encoding_codec;
|
||||
AVCodec *decoding_codec;
|
||||
const AVCodec *encoding_codec;
|
||||
const AVCodec *decoding_codec;
|
||||
AVCodecContext *encoding_context;
|
||||
AVCodecContext *decoding_context;
|
||||
AVFrame *encoding_frame_buffer ;
|
||||
AVFrame *decoding_frame_buffer ;
|
||||
AVPacket decoding_buffer;
|
||||
uint64_t encoding_frame_count ;
|
||||
|
||||
|
||||
#ifdef DEBUG_MPEG_VIDEO
|
||||
FILE *encoding_debug_file ;
|
||||
#endif
|
||||
@ -106,11 +129,11 @@ class VideoProcessor
|
||||
VIDEO_PROCESSOR_CODEC_ID_DDWT_VIDEO = 0x0002,
|
||||
VIDEO_PROCESSOR_CODEC_ID_MPEG_VIDEO = 0x0003
|
||||
};
|
||||
|
||||
|
||||
// =====================================================================================
|
||||
// =------------------------------------ DECODING -------------------------------------=
|
||||
// =====================================================================================
|
||||
|
||||
|
||||
// Gets the next image to be displayed. Once returned, the image should
|
||||
// be cleared from the incoming queue.
|
||||
//
|
||||
@ -129,9 +152,9 @@ class VideoProcessor
|
||||
// =====================================================================================
|
||||
// =------------------------------------ ENCODING -------------------------------------=
|
||||
// =====================================================================================
|
||||
|
||||
|
||||
public:
|
||||
// Takes the next image to be encoded.
|
||||
// Takes the next image to be encoded.
|
||||
//
|
||||
bool processImage(const QImage& Image) ;
|
||||
bool encodedPacketReady() const { return !_encoded_out_queue.empty() ; }
|
||||
@ -141,35 +164,33 @@ class VideoProcessor
|
||||
//
|
||||
void setMaximumBandwidth(uint32_t bytes_per_second) ;
|
||||
void setInternalFrameSize(QSize) ;
|
||||
|
||||
|
||||
// returns the current encoding frame rate in bytes per second.
|
||||
//
|
||||
uint32_t currentBandwidthOut() const { return _estimated_bandwidth_out ; }
|
||||
|
||||
|
||||
protected:
|
||||
std::list<RsVOIPDataChunk> _encoded_out_queue ;
|
||||
|
||||
NetQueue<RsVOIPDataChunk> _encoded_out_queue;
|
||||
QSize _encoded_frame_size ;
|
||||
|
||||
|
||||
// =====================================================================================
|
||||
// =------------------------------------- Codecs --------------------------------------=
|
||||
// =====================================================================================
|
||||
|
||||
|
||||
JPEGVideo _jpeg_video_codec ;
|
||||
FFmpegVideo _mpeg_video_codec ;
|
||||
|
||||
|
||||
uint16_t _encoding_current_codec ;
|
||||
|
||||
|
||||
time_t _last_bw_estimate_in_TS;
|
||||
time_t _last_bw_estimate_out_TS;
|
||||
|
||||
|
||||
uint32_t _total_encoded_size_in ;
|
||||
uint32_t _total_encoded_size_out ;
|
||||
|
||||
|
||||
float _estimated_bandwidth_in ;
|
||||
float _estimated_bandwidth_out ;
|
||||
|
||||
float _target_bandwidth_out ;
|
||||
|
||||
RsMutex vpMtx ;
|
||||
};
|
||||
|
||||
float _target_bandwidth_out ;
|
||||
};
|
||||
|
||||
@ -45,9 +45,9 @@ class RsVOIPItem: public RsItem
|
||||
{
|
||||
public:
|
||||
RsVOIPItem(uint8_t voip_subtype) : RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_TYPE_VOIP_PLUGIN,voip_subtype)
|
||||
{
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_VOIP) ;
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~RsVOIPItem() {}
|
||||
virtual void clear() {}
|
||||
@ -70,7 +70,7 @@ class RsVOIPDataItem: public RsVOIPItem
|
||||
public:
|
||||
RsVOIPDataItem() :RsVOIPItem(RS_PKT_SUBTYPE_VOIP_DATA) {}
|
||||
|
||||
virtual ~RsVOIPDataItem()
|
||||
virtual ~RsVOIPDataItem()
|
||||
{
|
||||
free(voip_data) ;
|
||||
voip_data = NULL ;
|
||||
@ -78,9 +78,9 @@ class RsVOIPDataItem: public RsVOIPItem
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
uint32_t flags ;
|
||||
uint32_t data_size ;
|
||||
|
||||
void *voip_data ;
|
||||
uint32_t data_size = 0;
|
||||
|
||||
void *voip_data = nullptr;
|
||||
};
|
||||
|
||||
#ifdef TODO
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user