Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c940b200c1 | ||
|
|
5ba5928210 | ||
|
|
5343ba9dae | ||
|
|
3d1e962107 | ||
|
|
c14d7a7791 | ||
|
|
4f3745f8ec | ||
|
|
dadfd60ed3 | ||
|
|
6c8fea7309 | ||
|
|
9d9e3b1a4d | ||
|
|
54425a306a | ||
|
|
be601f514d | ||
|
|
a7c7c8190c | ||
|
|
44948de7d0 | ||
|
|
e2efde2d1a | ||
|
|
6630116ba1 | ||
|
|
1f7c2b6a92 | ||
|
|
10ad6b74eb | ||
|
|
f62de567df | ||
|
|
d96dc79943 | ||
|
|
e35c301605 | ||
|
|
7af8dba9f3 | ||
|
|
caa80a30d1 | ||
|
|
db4928e78f | ||
|
|
af96fa2cda | ||
|
|
c08ef9070b | ||
|
|
6fe5b43bc1 | ||
|
|
b3056aedd0 | ||
|
|
b2912950c9 | ||
|
|
af2e47308c | ||
|
|
37be3a413a | ||
|
|
a7281b7b1e | ||
|
|
23d06c4bc7 | ||
|
|
b5f522d8bc | ||
|
|
283792715c | ||
|
|
d7032eb351 | ||
|
|
589c280bdc | ||
|
|
9f85d09736 | ||
|
|
d45e5360cc | ||
|
|
58d2a8b58f | ||
|
|
d51820476b | ||
|
|
bfce801cc5 | ||
|
|
63f32e4d8b | ||
|
|
0fc5d208bb | ||
|
|
8b3b500034 | ||
|
|
a5fddf1bb2 | ||
|
|
f3dc0274c3 | ||
|
|
515bf11c3d | ||
|
|
a254c17fcb | ||
|
|
7e9959c455 | ||
|
|
a57e543701 | ||
|
|
43d4b86943 | ||
|
|
81cdd0db81 | ||
|
|
b76bb1002e | ||
|
|
dea940222e | ||
|
|
4a075cc187 | ||
|
|
e17c10c965 | ||
|
|
8c96c02468 | ||
|
|
4260f94ce7 | ||
|
|
21f73e4eae | ||
|
|
743173df81 | ||
|
|
17b6ea23b4 | ||
|
|
840398c073 | ||
|
|
93384e4c37 | ||
|
|
566b11026e | ||
|
|
8fd2986a92 | ||
|
|
e7dd2cf434 | ||
|
|
cdfbf8795a | ||
|
|
d110ddad10 | ||
|
|
36cecf3acc | ||
|
|
066eaec993 | ||
|
|
746ebf9b02 | ||
|
|
1deffe6a98 | ||
|
|
7ac61f1cac | ||
|
|
e386c86316 | ||
|
|
da84eb027f | ||
|
|
1d9f2a2744 | ||
|
|
c1d0f46366 | ||
|
|
99bf00d27c | ||
|
|
7fd43bba2c | ||
|
|
48f14267e5 | ||
|
|
b785a4fbec | ||
|
|
3aa5ddfc32 | ||
|
|
c2277edb56 | ||
|
|
d82ec219f6 | ||
|
|
dc007c84ab | ||
|
|
ccd04b86d3 | ||
|
|
0531a37133 | ||
|
|
566cff8ded | ||
|
|
74c5e92d4b | ||
|
|
aaa374c8ed | ||
|
|
2a6902dbb5 | ||
|
|
02206a8967 | ||
|
|
af2a5a18b3 | ||
|
|
1d0e325813 | ||
|
|
f4e22a5c96 | ||
|
|
fb468f8594 | ||
|
|
4ff0aaad9c | ||
|
|
c0eb5e2087 | ||
|
|
c795635469 | ||
|
|
e844b9949d | ||
|
|
5c807e1859 | ||
|
|
b2edaf69c1 | ||
|
|
dfa6d043b3 | ||
|
|
5e3f01f350 | ||
|
|
f9a098d67b | ||
|
|
3324e27dee | ||
|
|
25f1c62d2c | ||
|
|
afd6ce0a1f | ||
|
|
fb62473b0b | ||
|
|
9b1bc82353 | ||
|
|
d1f0b517e4 | ||
|
|
ec50159a15 | ||
|
|
a7f513fd7c | ||
|
|
698024d47d | ||
|
|
eb8d91470b | ||
|
|
780f22818e | ||
|
|
fdcf9f7099 | ||
|
|
ec0445ec54 | ||
|
|
75f50cd5bb | ||
|
|
4d1af3ce9c | ||
|
|
7b6aa046f4 | ||
|
|
844f6ed86f | ||
|
|
7a8cbe202e | ||
|
|
ec2a4648e1 | ||
|
|
186682b6d4 | ||
|
|
db6811450e | ||
|
|
1c19b51fda | ||
|
|
28cad446b7 | ||
|
|
84867cc474 | ||
|
|
13c644efdc | ||
|
|
5085c35269 | ||
|
|
7682f1285e | ||
|
|
74a0cf012b | ||
|
|
d356e2e79f | ||
|
|
fe027b7fc7 | ||
|
|
501134c2fd | ||
|
|
debe2e63cb | ||
|
|
4452ec50fb | ||
|
|
f034f45b93 | ||
|
|
5160486dcd | ||
|
|
876c586620 | ||
|
|
85ef6faf7d | ||
|
|
6004a76884 | ||
|
|
944829a6be | ||
|
|
9b75a426c5 | ||
|
|
d6d63b7f88 | ||
|
|
d9adde161c | ||
|
|
3d45bbe12a | ||
|
|
90be761780 | ||
|
|
22c5cfdffd | ||
|
|
7834f61662 | ||
|
|
cafb1ef28d | ||
|
|
4211374126 | ||
|
|
cfa50198ee | ||
|
|
f4c1cebfd0 | ||
|
|
7cef499e67 | ||
|
|
e40da83827 | ||
|
|
d916dc4a9d | ||
|
|
791cc93f5f | ||
|
|
1df72dc2e0 | ||
|
|
cf3a9f6ae3 | ||
|
|
946f4b4339 | ||
|
|
e88a0b5ca3 | ||
|
|
6d23e01a82 | ||
|
|
0f8c6039ce | ||
|
|
2abae1c673 | ||
|
|
1e16d7b521 | ||
|
|
55dade8b51 | ||
|
|
2e53d3e4c9 | ||
|
|
4a0ce23184 | ||
|
|
02535eeeb2 | ||
|
|
6d49968a59 | ||
|
|
84ae416c2c | ||
|
|
dd4fd4d187 | ||
|
|
ade001359b | ||
|
|
ac2d3d6b33 | ||
|
|
537ea258ca | ||
|
|
32302c6a80 | ||
|
|
5ba969c561 | ||
|
|
5a4e60f645 | ||
|
|
456feb645a | ||
|
|
556a82e42b | ||
|
|
57f7b6d000 | ||
|
|
67a0b128f7 | ||
|
|
f60f08327c | ||
|
|
72c01bebba | ||
|
|
dede4695e9 | ||
|
|
5efefd3576 | ||
|
|
516eaa2086 | ||
|
|
c3a6f0b624 | ||
|
|
6594cddb65 | ||
|
|
bf2343015e | ||
|
|
228bcf5014 | ||
|
|
589263e902 | ||
|
|
02bdf755a3 | ||
|
|
61fe92e201 | ||
|
|
1b7264793e | ||
|
|
13fc56c24a | ||
|
|
18a6628d0e | ||
|
|
5746ab5ed9 | ||
|
|
ac90991a27 | ||
|
|
531d39d888 | ||
|
|
68576e9a95 | ||
|
|
f7d9956665 | ||
|
|
aa0c2e520f | ||
|
|
9ea48c7298 | ||
|
|
c065e55ca1 | ||
|
|
2c163503d9 | ||
|
|
212b6bfe4f | ||
|
|
ea6998dcad | ||
|
|
d6ec442945 | ||
|
|
6da27f7e86 | ||
|
|
50d605b5b4 | ||
|
|
b147a3db3e | ||
|
|
6018f35598 | ||
|
|
fccf448b3a | ||
|
|
0cd846728c | ||
|
|
876e29973c | ||
|
|
351f5edaa9 | ||
|
|
6edcf19694 | ||
|
|
73463e5c23 | ||
|
|
21267acb8c | ||
|
|
9889f8792f | ||
|
|
ae5a327116 | ||
|
|
8b12bb45c3 | ||
|
|
a32b9fb8a9 | ||
|
|
eb44ed1bc5 | ||
|
|
5fe252934c | ||
|
|
3c4a740759 | ||
|
|
29555ed584 | ||
|
|
f454b9df2d | ||
|
|
6266ce3c6c | ||
|
|
d0cfd73fab | ||
|
|
985700c79d | ||
|
|
e650fa4d8b | ||
|
|
72b2173dfc | ||
|
|
7f688e0fa4 | ||
|
|
c8f79c36b4 | ||
|
|
396ea3daf3 | ||
|
|
c4b2c1d760 | ||
|
|
0bf4ef711e | ||
|
|
affdd497ec | ||
|
|
6b6bd2e369 | ||
|
|
466b4f9a0f | ||
|
|
e90aad5994 | ||
|
|
338c8a8eee | ||
|
|
a390c3daa6 | ||
|
|
9e0dbe67e6 | ||
|
|
6b02bf5df0 | ||
|
|
029f519005 | ||
|
|
b6248459be | ||
|
|
51e3b2a1f7 | ||
|
|
b2504e9477 | ||
|
|
ec6ddd1c5c | ||
|
|
60705fe93b | ||
|
|
cf407da41b | ||
|
|
5435feb932 | ||
|
|
02e4f8e536 | ||
|
|
db090f9164 | ||
|
|
70967beebf | ||
|
|
5b7c2f6dbb | ||
|
|
2d7a3a4dd9 | ||
|
|
01d699fc74 | ||
|
|
6ed82f821f | ||
|
|
c59fa32efe | ||
|
|
dbdb0e4686 | ||
|
|
fc0df14992 | ||
|
|
a5771f1af9 | ||
|
|
4db097b0b0 | ||
|
|
65e4c4f7ac | ||
|
|
d1df4b2fad | ||
|
|
5009fbfbe4 | ||
|
|
cbfcf2bb3c | ||
|
|
63e16d0bac | ||
|
|
cd58c6ce90 | ||
|
|
6787b3c1fe | ||
|
|
980ff6f150 | ||
|
|
ef5f97ad88 | ||
|
|
9ad97c8390 | ||
|
|
8256ea2115 | ||
|
|
b6f97ba0a4 | ||
|
|
88a36c6f57 | ||
|
|
8932460b8c | ||
|
|
7e570cea45 | ||
|
|
1d781d3d54 | ||
|
|
c1070e375f | ||
|
|
582d4ad5cd | ||
|
|
907c9ac423 | ||
|
|
f9c805648a | ||
|
|
94e3e864bc | ||
|
|
53acbd9594 | ||
|
|
085f066958 | ||
|
|
594f177160 | ||
|
|
c53166f630 | ||
|
|
64f4a8077e | ||
|
|
a4bfdcefa8 | ||
|
|
e6b83c7473 | ||
|
|
107292a328 | ||
|
|
9f31c845ee | ||
|
|
3acee26d05 | ||
|
|
1b260fd745 | ||
|
|
02dd6176d7 | ||
|
|
d19c6acadd | ||
|
|
911ec96207 | ||
|
|
1cefc9d9ba | ||
|
|
da1b73feee | ||
|
|
8ce7d781a4 | ||
|
|
3db5941757 | ||
|
|
8b925ae0c4 | ||
|
|
ea7f65725e | ||
|
|
137736d6eb | ||
|
|
d0136e6a71 | ||
|
|
9abb0ff3a9 | ||
|
|
b706b114b3 | ||
|
|
3085c037ba | ||
|
|
c34ddd32a5 | ||
|
|
3c10a1e12a | ||
|
|
a154a813ad | ||
|
|
3b5c7365a1 | ||
|
|
0f78b7e91c | ||
|
|
cf93bf008f | ||
|
|
2bbe7788f1 | ||
|
|
025348bfe3 | ||
|
|
4cf809b579 | ||
|
|
9e1d92a7bc | ||
|
|
ef94137edc | ||
|
|
910f71ec9e | ||
|
|
f4973cdb4b | ||
|
|
4dcc8e23e7 | ||
|
|
044193c7ed | ||
|
|
29b2bb6635 | ||
|
|
d9f0314655 | ||
|
|
af6c230edc | ||
|
|
01746ab16d | ||
|
|
5865134b29 | ||
|
|
39d033c50d | ||
|
|
f64b3bc82d | ||
|
|
3f2353cc57 | ||
|
|
bc20a790da | ||
|
|
a238770418 | ||
|
|
90eb339a05 | ||
|
|
fa16ff964e | ||
|
|
ebb864f234 | ||
|
|
01a33b97a7 | ||
|
|
8b05464444 | ||
|
|
977396e852 | ||
|
|
84b6e84c49 | ||
|
|
33b96b459e | ||
|
|
a095f9f6bd | ||
|
|
828558bfcc | ||
|
|
e49b0cbf8c | ||
|
|
39fc4b2997 | ||
|
|
5d2925fd94 | ||
|
|
f6a2a1cab5 | ||
|
|
661bcfe56e | ||
|
|
821da2ce29 | ||
|
|
38ee3fabd9 | ||
|
|
ac54d29f66 | ||
|
|
b27b04ebf0 | ||
|
|
055438e740 | ||
|
|
5f11e9a7ce | ||
|
|
f128de2b30 | ||
|
|
88e9e8c2f7 | ||
|
|
235fba8a04 | ||
|
|
0183626c73 | ||
|
|
bcc36f260d | ||
|
|
ad796dad9e | ||
|
|
0ca482bc5d | ||
|
|
c72b746d0a | ||
|
|
b4b6980a0c | ||
|
|
534dcd129e | ||
|
|
3e4cefb04f | ||
|
|
dd392845a6 | ||
|
|
7f2fb32735 | ||
|
|
f3247ec13b | ||
|
|
ad014517b9 | ||
|
|
e3de5aa3fe | ||
|
|
6adac797d3 | ||
|
|
99c9d393c2 | ||
|
|
17f54a8848 | ||
|
|
f9c5ad470c | ||
|
|
da539e57a4 | ||
|
|
37d86b2914 | ||
|
|
acc84385b5 | ||
|
|
701ce81aab | ||
|
|
71bcfe80e3 | ||
|
|
b53bbe5a97 | ||
|
|
ccc9cd1a32 | ||
|
|
b78f8573b5 | ||
|
|
3b7576d95c | ||
|
|
cdb9a4c603 | ||
|
|
9a2606d96f | ||
|
|
b1ebc88a3c | ||
|
|
a33d4109d1 | ||
|
|
15ab09063b | ||
|
|
3f0b7c1681 | ||
|
|
b1150d8e86 | ||
|
|
b84f3d9218 | ||
|
|
9db25f3907 | ||
|
|
812bd2191e | ||
|
|
788a4760b8 | ||
|
|
d74da816a1 | ||
|
|
cfc11bef6e | ||
|
|
bedd8f362b | ||
|
|
7855ce9dfb | ||
|
|
81d6656f13 | ||
|
|
6fad220e7e | ||
|
|
2a0f32b2c7 | ||
|
|
212bdb80f8 | ||
|
|
6039667556 | ||
|
|
4960be8cd1 | ||
|
|
89b1a5a6bd | ||
|
|
173f379111 | ||
|
|
14288cbd1a | ||
|
|
4b72bd3824 | ||
|
|
902e06b893 | ||
|
|
ca9e83ce9b | ||
|
|
58919f3dae | ||
|
|
b042e8ad19 | ||
|
|
b188fab4df | ||
|
|
5f9801328f | ||
|
|
d7978e759d | ||
|
|
2d83424510 | ||
|
|
78391d236b | ||
|
|
7934433100 | ||
|
|
692fb1c7ca | ||
|
|
a6fa512e46 | ||
|
|
4809173feb | ||
|
|
2e49c6b7ed | ||
|
|
72064d2324 | ||
|
|
ce309529c5 | ||
|
|
cb1abab75f | ||
|
|
9c97f463c9 | ||
|
|
c6d910ec21 | ||
|
|
9574a6df20 | ||
|
|
39c57564a6 | ||
|
|
c0686dd234 | ||
|
|
134633e7ac | ||
|
|
c1a1aca7ec | ||
|
|
57f9605f70 | ||
|
|
4a658d8f43 | ||
|
|
e4e438b579 | ||
|
|
3080aa7f87 | ||
|
|
3e19e3e5cb | ||
|
|
09e9e7d380 | ||
|
|
cbd45a27fb | ||
|
|
b0b9c4169e | ||
|
|
8d6b75057e | ||
|
|
1ddcbc224e | ||
|
|
8dd21e2b82 | ||
|
|
2de5360ac8 | ||
|
|
28bc0fc826 | ||
|
|
98b96cdeb2 | ||
|
|
98798a3e57 | ||
|
|
4d04cd5089 | ||
|
|
0b8c94bf6f | ||
|
|
2f900bf3a2 | ||
|
|
71a34549ab | ||
|
|
a1c7855a63 | ||
|
|
d101a92750 | ||
|
|
fce77dc7d7 | ||
|
|
14a7e26e09 | ||
|
|
700ada0b5b | ||
|
|
740b544615 | ||
|
|
ad64427126 | ||
|
|
4463726d51 | ||
|
|
95cb1abab8 | ||
|
|
10af1ab1f2 | ||
|
|
824827ff26 | ||
|
|
60d9bf1922 | ||
|
|
cb42040a8d | ||
|
|
d9d681db5e | ||
|
|
1d5e8822e6 | ||
|
|
53a3f73156 | ||
|
|
28dacf4d74 | ||
|
|
2859666708 | ||
|
|
f861918789 | ||
|
|
8e2cf08be1 | ||
|
|
4f6f0ce9f6 | ||
|
|
3032bbc4e7 | ||
|
|
6f1dd37818 | ||
|
|
f8369fe436 | ||
|
|
ff3b07a086 | ||
|
|
e329946213 | ||
|
|
5572421eca | ||
|
|
ef0803cb4d | ||
|
|
60ba6078c2 | ||
|
|
8d66596995 | ||
|
|
07b6a27dc0 | ||
|
|
6e93516a4b | ||
|
|
5ce4a3aeb8 | ||
|
|
2e3d8e72b6 | ||
|
|
0be08399a0 | ||
|
|
0cd5202e74 | ||
|
|
1479256575 | ||
|
|
306fbd503b | ||
|
|
a5aff22d34 | ||
|
|
3a8d75fbf0 | ||
|
|
1d0762e756 | ||
|
|
d017f425d0 | ||
|
|
56dec521c5 | ||
|
|
fdce91471e | ||
|
|
2986bb4893 | ||
|
|
8f82cd5c8a | ||
|
|
11bbbe1155 | ||
|
|
80cc4c9515 | ||
|
|
c6f506781b | ||
|
|
be22e3b999 | ||
|
|
8cc7fb1e17 | ||
|
|
28c86de4c9 | ||
|
|
dac585c01b | ||
|
|
357207c6a8 | ||
|
|
4e1db889c0 | ||
|
|
8d4f4d26f7 | ||
|
|
6e4766149f | ||
|
|
d4bc3f01bf | ||
|
|
d5785606a0 | ||
|
|
d760a3d0f2 | ||
|
|
b013cbd65c | ||
|
|
698500fd3e | ||
|
|
f0dfeaf8c0 | ||
|
|
fed79c7de0 | ||
|
|
8eaef139e9 | ||
|
|
c6ebf9feb1 | ||
|
|
9ec1e52b5a | ||
|
|
d0db433bc8 | ||
|
|
b7be12c7aa | ||
|
|
7b1217100b | ||
|
|
b24e0ef6f2 | ||
|
|
dc6bd27d22 | ||
|
|
0f6ff2a4cb | ||
|
|
7075a4f4d5 | ||
|
|
f4ed97d5ea | ||
|
|
6d3a097f20 | ||
|
|
5265ebb939 | ||
|
|
9e783a5afc | ||
|
|
0feb3b4aaa | ||
|
|
6c624de79c | ||
|
|
b48bd99f70 | ||
|
|
cbd0d94d90 | ||
|
|
ee3adb70d4 | ||
|
|
d8af6a9af1 | ||
|
|
e20b4326a8 | ||
|
|
77e0278f93 | ||
|
|
32623afb9b | ||
|
|
e83abacffd | ||
|
|
52eb101aeb | ||
|
|
59b3a8a8e4 | ||
|
|
f87003b192 | ||
|
|
89fb954223 | ||
|
|
ecea03b271 | ||
|
|
f127fb9afd | ||
|
|
c77d23be7a | ||
|
|
72343e1067 | ||
|
|
0902345808 | ||
|
|
2ae1a561d7 | ||
|
|
d4c06f61d6 | ||
|
|
02cfa33907 | ||
|
|
6e8628b1df | ||
|
|
2b19afe66d | ||
|
|
7236841d64 | ||
|
|
49fb65ce71 | ||
|
|
ad87baee70 | ||
|
|
5e8fef98ec | ||
|
|
83baafa615 | ||
|
|
9f39db9517 | ||
|
|
19f2bcf286 | ||
|
|
02e8876acc | ||
|
|
4f78e3dd90 | ||
|
|
6888d0862d | ||
|
|
a95be84eac | ||
|
|
b76b5f2227 | ||
|
|
7a12c0880f | ||
|
|
58b0b1fab2 | ||
|
|
16b5c322d5 | ||
|
|
16d5b82ac8 | ||
|
|
be66a8749c | ||
|
|
5192a9d447 | ||
|
|
b9160ec173 | ||
|
|
675fad3fc1 | ||
|
|
f7c01d6c7b | ||
|
|
5bc6318dcd | ||
|
|
3d8b0c94df | ||
|
|
73fec7fa3f | ||
|
|
22971e8567 | ||
|
|
3df4cdae56 | ||
|
|
062096a0b4 | ||
|
|
978e7d41b7 | ||
|
|
33028f81d9 | ||
|
|
4cb12c5e0c | ||
|
|
b01acfeef3 | ||
|
|
b7676aaba8 | ||
|
|
e0a13c6867 | ||
|
|
9f5db6d034 | ||
|
|
5c3bfe8db0 | ||
|
|
5926e43bc5 | ||
|
|
f21f076386 | ||
|
|
da403b28c9 | ||
|
|
faba9270a0 | ||
|
|
9ca87eb296 | ||
|
|
b2b97f2c9a | ||
|
|
8494880943 | ||
|
|
0f8f38f0e1 | ||
|
|
8544163c46 | ||
|
|
fdcd190592 | ||
|
|
40e08796d1 | ||
|
|
1e72729056 | ||
|
|
731122e891 | ||
|
|
ebb3ab6017 | ||
|
|
3d2fe7fd50 | ||
|
|
9a70345f4a | ||
|
|
897a4efa96 | ||
|
|
6ab53c5436 | ||
|
|
6b5110e0b9 | ||
|
|
687c0bfe08 | ||
|
|
48b069fef4 | ||
|
|
ab48307235 | ||
|
|
93c43d8612 | ||
|
|
bf9889cb0c | ||
|
|
6e7d67aa61 | ||
|
|
16f60c678b | ||
|
|
1b8f7bd886 | ||
|
|
31278654a0 | ||
|
|
80e87d7868 | ||
|
|
e21ccb9671 | ||
|
|
e6cdcc9ee2 | ||
|
|
4a579b5141 | ||
|
|
dc166364de | ||
|
|
4564fd2948 | ||
|
|
c591823c3e | ||
|
|
7a1904c1ef | ||
|
|
5c5466d6b2 | ||
|
|
6aaf467950 | ||
|
|
428abcb3e7 | ||
|
|
9dea31e3d7 | ||
|
|
154b609576 | ||
|
|
7bfb502aa0 | ||
|
|
ded7d3bc86 | ||
|
|
526c1f6a69 | ||
|
|
6fd501d553 | ||
|
|
11aa08354e | ||
|
|
0bfbebeb8b | ||
|
|
413ba1c1a9 | ||
|
|
fdec3e8151 | ||
|
|
0012f831a8 | ||
|
|
c8962a4e67 | ||
|
|
74d09cf879 | ||
|
|
afdb516386 | ||
|
|
9a1f28fe9a | ||
|
|
b4583a7cc6 | ||
|
|
9918b13214 | ||
|
|
3f9d830294 | ||
|
|
7b2627b236 | ||
|
|
c40d87b3ae | ||
|
|
99f707b6c6 | ||
|
|
a561d5fef6 | ||
|
|
1d305e7626 | ||
|
|
194fb51f75 | ||
|
|
e2dc39bff2 | ||
|
|
836aa73430 | ||
|
|
63f5b885a3 | ||
|
|
c68d017475 | ||
|
|
bbe3bac923 | ||
|
|
2293e357f4 | ||
|
|
85dbceb14d | ||
|
|
45cba39be7 | ||
|
|
a0b235dd8a | ||
|
|
7e3db9ec30 | ||
|
|
6cc8770599 | ||
|
|
462d465f3a | ||
|
|
6ac62cd0de | ||
|
|
1174b62b8f | ||
|
|
ef713900a0 | ||
|
|
c60f6815fa | ||
|
|
7ca709fcbb | ||
|
|
c3ce878376 | ||
|
|
a06ac42eff | ||
|
|
444eb6c211 | ||
|
|
eb6cbe1ee0 | ||
|
|
bcae9a2c37 | ||
|
|
d411b34dae | ||
|
|
a0fad4375a | ||
|
|
ffb02984fe | ||
|
|
b400df2565 | ||
|
|
b06607cc37 | ||
|
|
8881f42470 | ||
|
|
6558d31680 | ||
|
|
6e949677ec | ||
|
|
72f2d166b6 | ||
|
|
7b13cdf7b3 | ||
|
|
c7bdaad30a | ||
|
|
fd9fce25fc | ||
|
|
5ba7add5b5 | ||
|
|
68889d3804 | ||
|
|
8ab18d433a | ||
|
|
13d83949c4 | ||
|
|
daf98009d4 | ||
|
|
0cf5848772 | ||
|
|
0ecc4bd8d3 | ||
|
|
388a195794 | ||
|
|
0f89010225 | ||
|
|
42da49c5c1 | ||
|
|
0ffba26b1f | ||
|
|
b19b094aaa | ||
|
|
5cc1e898b9 | ||
|
|
a4aa68a085 | ||
|
|
c954101bd9 | ||
|
|
d20aeb4121 | ||
|
|
9440de5ca9 | ||
|
|
c2955b508c | ||
|
|
fbf70814f0 | ||
|
|
a823790926 | ||
|
|
14838b82ae | ||
|
|
e11347c005 | ||
|
|
98842f238e | ||
|
|
5ffc87ad9b | ||
|
|
fb5d139443 | ||
|
|
9d6ee05660 | ||
|
|
1ee97606aa | ||
|
|
b6f721c167 | ||
|
|
ede4933819 | ||
|
|
70ce4a6d06 | ||
|
|
213c26db3f | ||
|
|
8ae3c42100 | ||
|
|
ff466a1d2d | ||
|
|
5e46ed7cb6 | ||
|
|
c197ba76fa | ||
|
|
fa2b10f3ce | ||
|
|
7b523aa075 | ||
|
|
0ca9971460 | ||
|
|
b3f23abec0 | ||
|
|
a2d735fee5 | ||
|
|
fb801d8ebb | ||
|
|
9a92bfec45 | ||
|
|
6d50abb3cf | ||
|
|
778872363a | ||
|
|
6c404d57c9 | ||
|
|
449b645278 | ||
|
|
02428a26c0 | ||
|
|
90bbc19923 | ||
|
|
4f5690c89b | ||
|
|
4000fa1a2e | ||
|
|
ba7ffafa7f | ||
|
|
33b59d5723 | ||
|
|
28551a9666 | ||
|
|
c5478d6a0e | ||
|
|
2ca8174054 | ||
|
|
10e4496bb7 | ||
|
|
880d876ccf | ||
|
|
2ffec89ed8 | ||
|
|
5c257ffdc4 | ||
|
|
dc6297b0c9 | ||
|
|
3a181b6880 | ||
|
|
9677b33f54 | ||
|
|
0503d97e62 |
@@ -0,0 +1,109 @@
|
||||
---
|
||||
|
||||
# Exceptions:
|
||||
# bugprone-branch-clone is too noisy in parsing code.
|
||||
# bugprone-easily-swappable-parameters is too noisy.
|
||||
# cert-dcl50-cpp is triggered by hz::string_sprintf()'s C style.
|
||||
# clang-analyzer-deadcode.DeadStores is too noisy.
|
||||
# clang-analyzer-cplusplus.NewDeleteLeaks doesn't understand Gtkmm memory management.
|
||||
# cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers is triggered by attribute database.
|
||||
# cppcoreguidelines-avoid-do-while is triggered in DBG macros.
|
||||
# cppcoreguidelines-owning-memory doesn't support deleting Gtkmm objects.
|
||||
# cppcoreguidelines-pro-type-cstyle-cast needed by GTK C casts.
|
||||
# cppcoreguidelines-pro-type-reinterpret-cast is needed by WinAPI-facing functions
|
||||
# cppcoreguidelines-pro-type-vararg is triggered by hz::string_sprintf().
|
||||
# cppcoreguidelines-pro-bounds-array-to-pointer-decay is triggered by va_start in hz::string_sprintf().
|
||||
# cppcoreguidelines-pro-bounds-pointer-arithmetic is useless (triggered by argv) until we have std::span.
|
||||
# misc-include-cleaner does not really work.
|
||||
# misc-no-recursion is too noisy.
|
||||
# modernize-raw-string-literal is very noisy.
|
||||
# modernize-use-trailing-return-type is contrary to our style.
|
||||
# performance-enum-size is too noisy.
|
||||
# readability-avoid-unconditional-preprocessor-if is triggered on platform-specific code
|
||||
# readability-convert-member-functions-to-static is triggered for many callbacks.
|
||||
# readability-function-cognitive-complexity needed by UI constructors.
|
||||
# readability-isolate-declaration is noisy.
|
||||
# readability-identifier-length is too noisy.
|
||||
|
||||
|
||||
Checks: >
|
||||
-abseil-*,
|
||||
-altera-*,
|
||||
-android-*,
|
||||
-boost-*,
|
||||
bugprone-*,
|
||||
-bugprone-branch-clone,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
cert-*,
|
||||
-cert-dcl50-cpp,
|
||||
clang-analyzer-*,
|
||||
-clang-analyzer-deadcode.DeadStores,
|
||||
-clang-analyzer-cplusplus.NewDeleteLeaks,
|
||||
concurrency-*,
|
||||
cppcoreguidelines-*,
|
||||
-cppcoreguidelines-avoid-magic-numbers,
|
||||
-cppcoreguidelines-avoid-do-while,
|
||||
-cppcoreguidelines-owning-memory,
|
||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
-cppcoreguidelines-pro-type-cstyle-cast,
|
||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||
-cppcoreguidelines-pro-type-vararg,
|
||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
||||
-darwin-*,
|
||||
-fuchsia-*,
|
||||
google-*
|
||||
hicpp-*,
|
||||
-linuxkernel-*,
|
||||
-llvm-*,
|
||||
-llvmlibc-*,
|
||||
misc-*,
|
||||
-misc-include-cleaner,
|
||||
-misc-no-recursion,
|
||||
modernize-*,
|
||||
-modernize-use-trailing-return-type,
|
||||
-modernize-raw-string-literal,
|
||||
-mpi-*,
|
||||
-objc-*,
|
||||
openmp-*,
|
||||
performance-*,
|
||||
-performance-enum-size,
|
||||
portability-*,
|
||||
readability-*,
|
||||
-readability-avoid-unconditional-preprocessor-if,
|
||||
-readability-convert-member-functions-to-static,
|
||||
-readability-function-cognitive-complexity,
|
||||
-readability-isolate-declaration,
|
||||
-readability-magic-numbers,
|
||||
-readability-identifier-length,
|
||||
-zircon-*
|
||||
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
FormatStyle: none
|
||||
|
||||
CheckOptions:
|
||||
- key: bugprone-exception-escape.CheckCapsOnly
|
||||
value: '1'
|
||||
- key: cppcoreguidelines-macro-usage.CheckCapsOnly
|
||||
value: '1'
|
||||
- key: cppcoreguidelines-owning-memory.LegacyResourceConsumers
|
||||
value: '::free;::realloc;::freopen;::fclose;Gtk::manage'
|
||||
- key: misc-assert-side-effect.AssertMacros
|
||||
value: assert,DBG_ASSERT
|
||||
- key: misc-assert-side-effect.CheckFunctionCalls
|
||||
value: '0'
|
||||
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||
value: '1'
|
||||
- key: misc-include-cleaner.IgnoreHeaders
|
||||
value: 'libdebug/*;local_glibmm.h;glib/*;gtk/*;gtkmm/*;glibmm/*'
|
||||
- key: performance-unnecessary-value-param.AllowedTypes
|
||||
value: 'RefPtr;Ptr$'
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
value: '2'
|
||||
- key: readability-implicit-bool-conversion.AllowPointerConditions
|
||||
value: '1'
|
||||
- key: readability-implicit-bool-cast.AllowConditionalPointerCasts
|
||||
value: '1'
|
||||
|
||||
...
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
# Make sure github recognizes header files as C++, not C.
|
||||
*.h linguist-language=C++
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug, enhancement
|
||||
assignees: ashaduri
|
||||
|
||||
---
|
||||
|
||||
**Version and Environment**
|
||||
- GSmartControl version: [Are you using the latest released version or git?]
|
||||
- OS: [e.g. openSUSE Linux 15.5]
|
||||
|
||||
**Describe the Bug**
|
||||
[A clear and concise description of what the bug is].
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Screenshots**
|
||||
[If applicable, add screenshots to help explain your problem].
|
||||
|
||||
**Additional Context**
|
||||
[Add any other context about the problem here (GTK+ version, etc.)]
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ashaduri
|
||||
|
||||
---
|
||||
|
||||
**Version and Environment**
|
||||
- GSmartControl version: [Are you using the latest released version or git?]
|
||||
- OS: [e.g. openSUSE Linux 15.5]
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
name: Other issue
|
||||
about: Issues other than bugs and enhancements
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ashaduri
|
||||
|
||||
---
|
||||
|
||||
**Version and Environment**
|
||||
- GSmartControl version: [Are you using the latest released version or git?]
|
||||
- OS: [e.g. openSUSE Linux 15.5]
|
||||
|
||||
**Describe the Issue**
|
||||
[A clear and concise description of what the issue is].
|
||||
@@ -0,0 +1,124 @@
|
||||
# GSmartControl – Copilot Instructions
|
||||
|
||||
GSmartControl is a C++20 GTK3/Gtkmm GUI for inspecting hard-drive and SSD health via SMART data
|
||||
(wrapping `smartctl` from smartmontools). It supports Linux, Windows (MSYS2/MinGW), macOS, and BSDs.
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
mkdir build && cd build
|
||||
|
||||
# Standard Linux build (uses dev toolchain with warnings enabled)
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../toolchains/linux-dev.cmake
|
||||
|
||||
# Windows (MSYS2/MinGW64)
|
||||
cmake .. -G "MSYS Makefiles" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../toolchains/win64-mingw-msys2.cmake
|
||||
|
||||
# Build on MSYS2/MinGW64 (from build dir)
|
||||
cmake --build . --target all -j 18
|
||||
```
|
||||
|
||||
The `configure-dev` script is a convenience wrapper: `./configure-dev -t <toolchain> -c <compiler> -b <build_type>`.
|
||||
|
||||
Key CMake options:
|
||||
- `-DAPP_BUILD_TESTS=ON` – enable test targets
|
||||
- `-DAPP_BUILD_EXAMPLES=ON` – enable example targets
|
||||
- `-DAPP_COMPILER_ENABLE_WARNINGS=ON` – strict compiler warnings (set automatically by `linux-dev.cmake`)
|
||||
|
||||
## Tests
|
||||
|
||||
Tests use **Catch2** (vendored in `dependencies/catch2/`). They are only built when `-DAPP_BUILD_TESTS=ON` is passed.
|
||||
|
||||
```bash
|
||||
# Build and run all tests
|
||||
cmake .. -DAPP_BUILD_TESTS=ON
|
||||
cmake --build .
|
||||
ctest -C RelWithDebInfo --rerun-failed --output-on-failure
|
||||
|
||||
# Run a single test executable directly (from build dir)
|
||||
./test_all "[smartctl_parser]" # Catch2 tag filter
|
||||
./test_all "test name substring" # substring match
|
||||
```
|
||||
|
||||
Test sources live in `src/applib/tests/` and `src/hz/tests/`; they are linked into `src/test_all/`.
|
||||
|
||||
## Linting
|
||||
|
||||
Clang-tidy config is at `.clang-tidy` in the repo root. Run it via CMake or directly:
|
||||
|
||||
```bash
|
||||
clang-tidy src/applib/storage_device.cpp -- -std=c++20 $(pkg-config --cflags gtkmm-3.0)
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
The codebase is split into libraries and one GUI executable:
|
||||
|
||||
| Component | Location | Purpose |
|
||||
|---|---|---|
|
||||
| `applib` | `src/applib/` | Core logic: SMART parsing, device detection, command execution |
|
||||
| `hz` | `src/hz/` | General-purpose C++ utilities (strings, filesystem, error types) |
|
||||
| `rconfig` | `src/rconfig/` | Runtime config load/save with auto-save support |
|
||||
| `libdebug` | `src/libdebug/` | Debug logging with named channels |
|
||||
| `gui` | `src/gui/` | GTK/Gtkmm UI (windows, dialogs, Glade `.ui` files) |
|
||||
|
||||
### Parsing pipeline
|
||||
|
||||
`smartctl` output is parsed through a strategy pattern:
|
||||
- JSON parsers (`smartctl_json_ata_parser`, `smartctl_json_nvme_parser`, `smartctl_json_basic_parser`) target smartctl ≥ 7.3.
|
||||
- Text parsers (`smartctl_text_ata_parser`, `smartctl_text_basic_parser`) handle legacy output.
|
||||
- Parsed results are stored as `StorageProperty` objects in a `StoragePropertyRepository` on `StorageDevice`.
|
||||
|
||||
### Device detection
|
||||
|
||||
`StorageDetector` is an abstract interface; platform implementations are:
|
||||
- `storage_detector_linux.cpp` – scans `/dev/sd*`, `/dev/nvme*`, etc.
|
||||
- `storage_detector_win32.cpp` – WMI/registry enumeration
|
||||
- `storage_detector_other.cpp` – generic `/dev` scanning (BSD/macOS)
|
||||
|
||||
### Async execution
|
||||
|
||||
`AsyncCommandExecutor` wraps `CommandExecutor` (which shells out to `smartctl`) in a background thread.
|
||||
Completion is signalled via **libsigc++** signals back to the GTK main loop. Never call GTK APIs from the worker thread;
|
||||
queue them through signals or `Glib::signal_idle()`.
|
||||
|
||||
### Error handling
|
||||
|
||||
Use `hz::ExpectedValue<T, E>` (wrapping `tl::expected`) for recoverable errors instead of exceptions.
|
||||
Enum-based error types (`StorageDeviceError`, `SmartctlParserError`) are preferred over string errors.
|
||||
|
||||
## Key Conventions
|
||||
|
||||
**Naming:**
|
||||
- Classes: `PascalCase` (e.g., `StorageDevice`, `SmartctlParser`)
|
||||
- Methods and members: `snake_case`; private/member fields have a trailing `_` (e.g., `device_list_`)
|
||||
- GUI classes in `src/gui/` are prefixed `Gsc` (e.g., `GscMainWindow`)
|
||||
- Filenames: `snake_case.cpp` / `snake_case.h`
|
||||
|
||||
**Headers:**
|
||||
- Use `#ifndef FILENAME_H` / `#define FILENAME_H` guards (not `#pragma once`)
|
||||
- Include order: standard library → third-party (GTK/Gtkmm) → project headers
|
||||
- All project headers are included relative to `src/` (the include root)
|
||||
|
||||
**Modern C++20/23 patterns used throughout:**
|
||||
- `std::optional<T>` for nullable values
|
||||
- `hz::ExpectedValue<T, E>` for error-returning functions
|
||||
- `std::string_view` for non-owning string parameters
|
||||
- `fmt::format()` (vendored `fmt` library) for string formatting
|
||||
- Smart pointers exclusively; no raw owning pointers
|
||||
|
||||
**Vendored dependencies** are in `dependencies/` and added via `add_subdirectory`.
|
||||
Do not modify them; prefer upgrading the whole vendored copy.
|
||||
|
||||
**Translations:** UI strings are wrapped with `_()` (gettext). `.po` files live in `po/`.
|
||||
Translations are not yet supported.
|
||||
|
||||
**Platform guards:** Use `#ifdef CONFIG_KERNEL_FAMILY_WINDOWS`,
|
||||
`#ifdef CONFIG_KERNEL_LINUX`, etc.
|
||||
|
||||
## Agentic Development
|
||||
|
||||
Place all plans and temporary files in `agent_workspace/`. This directory is ignored by Git.
|
||||
@@ -0,0 +1,249 @@
|
||||
name: Build (Tier 1 platforms)
|
||||
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the main branch
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
SMARTMONTOOLS_INSTALLER: smartmontools-7.4-1.win32-setup.exe
|
||||
SMARTMONTOOLS_URL: https://downloads.sourceforge.net/project/smartmontools/smartmontools/7.4/smartmontools-7.4-1.win32-setup.exe
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
linux-ubuntu-24_04:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Update Package Database
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get install libgtkmm-3.0-dev gettext
|
||||
|
||||
- name: Create Build Directory
|
||||
run: cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
env:
|
||||
CC: gcc-14
|
||||
CXX: g++-14
|
||||
run: >
|
||||
cmake $GITHUB_WORKSPACE
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/linux-dev.cmake"
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
|
||||
|
||||
- name: Pack (cmake install and make binary package)
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cpack -G TBZ2
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Linux Packages
|
||||
path: ${{github.workspace}}/build/gsmartcontrol-*-Linux*.*
|
||||
|
||||
|
||||
linux-ubuntu-22_04:
|
||||
# GCC 11
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Update Package Database
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get install libgtkmm-3.0-dev gettext
|
||||
|
||||
- name: Create Build Directory
|
||||
run: cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
env:
|
||||
CC: gcc-11
|
||||
CXX: g++-11
|
||||
run: >
|
||||
cmake $GITHUB_WORKSPACE
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/linux-dev.cmake"
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
|
||||
|
||||
- name: Pack (cmake install and make binary package)
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cpack -G TBZ2
|
||||
|
||||
# - name: Upload artifacts
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: Linux Packages
|
||||
# path: ${{github.workspace}}/build/gsmartcontrol-*-Linux*.*
|
||||
|
||||
|
||||
windows-msys2:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include: [
|
||||
{ msystem: MINGW64, arch: x86_64, platform: win64, urlpath: mingw64 },
|
||||
# MSYS2 no longer supports for 32-bit Windows.
|
||||
# { msystem: MINGW32, arch: i686, platform: win32, urlpath: mingw32 }
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: msys2/setup-msys2@v2
|
||||
# p7zip is needed to extract smartmontools
|
||||
# fontconfig owns /etc/fonts
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
update: true
|
||||
install: >-
|
||||
mingw-w64-${{ matrix.arch }}-gtkmm3
|
||||
mingw-w64-${{ matrix.arch }}-pkg-config
|
||||
mingw-w64-${{ matrix.arch }}-cmake
|
||||
mingw-w64-${{ matrix.arch }}-gcc
|
||||
mingw-w64-${{ matrix.arch }}-fontconfig
|
||||
mingw-w64-${{ matrix.arch }}-nsis
|
||||
make
|
||||
p7zip
|
||||
|
||||
- name: Downgrade Packages to support Windows 7
|
||||
# librsvg 2.59 requires Windows 8.1 or later (confirmed by dependency walker).
|
||||
# We need to downgrade to 2.58.
|
||||
# This contains gdk_pixbuf loader as well, and re-runs the loader cache update.
|
||||
# https://repo.msys2.org/mingw/mingw32/mingw-w64-i686-librsvg-2.58.0-1-any.pkg.tar.zst
|
||||
# https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-librsvg-2.58.0-1-any.pkg.tar.zst
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
wget https://repo.msys2.org/mingw/${{ matrix.urlpath }}/mingw-w64-${{ matrix.arch }}-librsvg-2.58.0-1-any.pkg.tar.zst
|
||||
pacman -U --noconfirm mingw-w64-${{ matrix.arch }}-librsvg-2.58.0-1-any.pkg.tar.zst
|
||||
|
||||
- name: Download Package Requirements
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
mkdir -p build/smartmontools
|
||||
cd build/smartmontools
|
||||
wget $SMARTMONTOOLS_URL
|
||||
|
||||
- name: Extract Package Requirements (64-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW64' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build/smartmontools
|
||||
run: >
|
||||
7z -bb1 e $SMARTMONTOOLS_INSTALLER
|
||||
bin/smartctl.exe
|
||||
bin/smartctl-nc.exe
|
||||
bin/update-smart-drivedb.ps1
|
||||
bin/drivedb.h
|
||||
|
||||
- name: Extract Package Requirements (32-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW32' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build/smartmontools
|
||||
run: >
|
||||
7z -bb1 e $SMARTMONTOOLS_INSTALLER
|
||||
bin32/smartctl.exe
|
||||
bin32/smartctl-nc.exe
|
||||
bin/update-smart-drivedb.ps1
|
||||
bin/drivedb.h
|
||||
|
||||
- name: List installed files
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
ls -1R /mingw64
|
||||
ls -1R /mingw32
|
||||
|
||||
- name: List Files in Workspace
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}
|
||||
run: ls -1R .
|
||||
|
||||
- name: Configure CMake
|
||||
shell: msys2 {0}
|
||||
run: >
|
||||
cmake -B build -S "$GITHUB_WORKSPACE"
|
||||
-G "MSYS Makefiles"
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/${{ matrix.platform }}-mingw-msys2.cmake"
|
||||
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: msys2 {0}
|
||||
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
|
||||
|
||||
- name: Package ZIP
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cpack -G ZIP
|
||||
|
||||
- name: Package NSIS (64-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW64' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cpack -G NSIS64
|
||||
|
||||
- name: Package NSIS (32-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW32' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cpack -G NSIS
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ matrix.msystem == 'MINGW64' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Windows 64-Bit Packages
|
||||
path: ${{github.workspace}}/build/gsmartcontrol-*-win*.*
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ matrix.msystem == 'MINGW32' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Windows 32-Bit Packages
|
||||
path: ${{github.workspace}}/build/gsmartcontrol-*-win*.*
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
name: Build (Tier 2 platforms with flaky builds)
|
||||
|
||||
# FreeBSD build via vmactions/freebsd-vm is known to fail randomly,
|
||||
# so we don't want it to be triggered on every commit.
|
||||
|
||||
# Manually triggered
|
||||
on: [workflow_dispatch]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
CXX: clang++-17
|
||||
|
||||
jobs:
|
||||
|
||||
freebsd:
|
||||
runs-on: ubuntu-latest
|
||||
# env:
|
||||
# variables to pass to VM
|
||||
# MYTOKEN : ${{ secrets.MYTOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build and test in FreeBSD
|
||||
id: test
|
||||
uses: vmactions/freebsd-vm@v1
|
||||
with:
|
||||
envs: 'BUILD_TYPE CXX'
|
||||
usesh: true
|
||||
sync: rsync
|
||||
# release: "14.0"
|
||||
prepare: >
|
||||
pkg install -y cmake pkgconf gtkmm30 gettext libiconv llvm17
|
||||
|
||||
run: >
|
||||
mkdir build && cd build
|
||||
|
||||
cmake ..
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
-DAPP_BUILD_EXAMPLES=ON
|
||||
-DAPP_BUILD_TESTS=ON
|
||||
-DAPP_COMPILER_ENABLE_WARNINGS=ON
|
||||
|
||||
cmake --build . --config $BUILD_TYPE
|
||||
|
||||
ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
|
||||
@@ -0,0 +1,75 @@
|
||||
name: Build (Tier 2 platforms)
|
||||
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the main branch
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
macos-homebrew:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include: [
|
||||
# We need AppleClang 16, but GitHub only has 14 for now.
|
||||
# { compiler: apple-clang },
|
||||
{ compiler: clang }
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Dependencies
|
||||
run: brew install pkg-config gtkmm3 cmake
|
||||
|
||||
- name: Install Clang Compiler
|
||||
if: ${{ matrix.compiler == 'clang' }}
|
||||
run: brew install llvm@17
|
||||
|
||||
- name: Create Build Directory
|
||||
run: cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake (Apple Clang)
|
||||
if: ${{ matrix.compiler == 'apple-clang' }}
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: >
|
||||
cmake $GITHUB_WORKSPACE
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
-DAPP_BUILD_EXAMPLES=ON
|
||||
-DAPP_BUILD_TESTS=ON
|
||||
-DAPP_COMPILER_ENABLE_WARNINGS=ON
|
||||
|
||||
- name: Configure CMake
|
||||
if: ${{ matrix.compiler == 'clang' }}
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: >
|
||||
cmake $GITHUB_WORKSPACE
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
-DAPP_BUILD_EXAMPLES=ON
|
||||
-DAPP_BUILD_TESTS=ON
|
||||
-DAPP_COMPILER_ENABLE_WARNINGS=ON
|
||||
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm@17)/bin/clang++
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
# This workflow checks out code, performs a Codacy security scan
|
||||
# and integrates the results with the
|
||||
# GitHub Advanced Security code scanning feature. For more information on
|
||||
# the Codacy security scan action usage and parameters, see
|
||||
# https://github.com/codacy/codacy-analysis-cli-action.
|
||||
# For more information on Codacy Analysis CLI in general, see
|
||||
# https://github.com/codacy/codacy-analysis-cli.
|
||||
|
||||
name: Codacy Security Scan
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '27 22 * * 1'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
codacy-security-scan:
|
||||
permissions:
|
||||
contents: read # for actions/checkout to fetch code
|
||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||
name: Codacy Security Scan
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
# Checkout the repository to the GitHub Actions runner
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
||||
- name: Run Codacy Analysis CLI
|
||||
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
|
||||
with:
|
||||
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
|
||||
# You can also omit the token and run the tools that support default configurations
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
verbose: true
|
||||
output: results.sarif
|
||||
format: sarif
|
||||
# Adjust severity of non-security issues
|
||||
gh-code-scanning-compat: true
|
||||
# Force 0 exit code to allow SARIF file generation
|
||||
# This will handover control about PR rejection to the GitHub side
|
||||
max-allowed-issues: 2147483647
|
||||
|
||||
# Upload the SARIF file generated in the previous step
|
||||
- name: Upload SARIF results file
|
||||
uses: github/codeql-action/upload-sarif@v4
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -0,0 +1,85 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '24 10 * * 6'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
#packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
#actions: read
|
||||
#contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Update Package Database
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get install libgtkmm-3.0-dev gettext
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
env:
|
||||
CC: gcc-13
|
||||
CXX: g++-13
|
||||
uses: github/codeql-action/autobuild@v4
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v4
|
||||
@@ -0,0 +1,36 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
name: DevSkim
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '25 22 * * 0'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: DevSkim
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run DevSkim scanner
|
||||
uses: microsoft/DevSkim-Action@v1
|
||||
with:
|
||||
ignore-globs: dummy_to_avoid_action_error,**/.git/**,*.txt,**/dependencies/**,env_tools.h,app_gtkmm_tools.cpp
|
||||
|
||||
- name: Upload DevSkim scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: devskim-results.sarif
|
||||
@@ -0,0 +1,140 @@
|
||||
name: Windows Release
|
||||
|
||||
on:
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
SMARTMONTOOLS_INSTALLER: smartmontools-7.4-1.win32-setup.exe
|
||||
SMARTMONTOOLS_URL: https://downloads.sourceforge.net/project/smartmontools/smartmontools/7.4/smartmontools-7.4-1.win32-setup.exe
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
windows-msys2:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include: [
|
||||
{ msystem: MINGW64, arch: x86_64, platform: win64, urlpath: mingw64 },
|
||||
{ msystem: MINGW32, arch: i686, platform: win32, urlpath: mingw32 }
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: msys2/setup-msys2@v2
|
||||
# p7zip is needed to extract smartmontools
|
||||
# fontconfig owns /etc/fonts
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
update: true
|
||||
install: >-
|
||||
mingw-w64-${{ matrix.arch }}-gtkmm3
|
||||
mingw-w64-${{ matrix.arch }}-pkg-config
|
||||
mingw-w64-${{ matrix.arch }}-cmake
|
||||
mingw-w64-${{ matrix.arch }}-gcc
|
||||
mingw-w64-${{ matrix.arch }}-fontconfig
|
||||
make
|
||||
p7zip
|
||||
|
||||
- name: Downgrade Packages to support Windows 7
|
||||
# librsvg 2.59 requires Windows 8.1 or later (confirmed by dependency walker).
|
||||
# We need to downgrade to 2.58.
|
||||
# This contains gdk_pixbuf loader as well, and re-runs the loader cache update.
|
||||
# https://repo.msys2.org/mingw/mingw32/mingw-w64-i686-librsvg-2.58.0-1-any.pkg.tar.zst
|
||||
# https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-librsvg-2.58.0-1-any.pkg.tar.zst
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
wget https://repo.msys2.org/mingw/${{ matrix.urlpath }}/mingw-w64-${{ matrix.arch }}-librsvg-2.58.0-1-any.pkg.tar.zst
|
||||
pacman -U --noconfirm mingw-w64-${{ matrix.arch }}-librsvg-2.58.0-1-any.pkg.tar.zst
|
||||
|
||||
- name: Download Package Requirements
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
mkdir -p build/smartmontools
|
||||
cd build/smartmontools
|
||||
wget $SMARTMONTOOLS_URL
|
||||
|
||||
- name: Extract Package Requirements (64-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW64' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build/smartmontools
|
||||
run: >
|
||||
7z -bb1 e $SMARTMONTOOLS_INSTALLER
|
||||
bin/smartctl.exe
|
||||
bin/smartctl-nc.exe
|
||||
bin/update-smart-drivedb.ps1
|
||||
bin/drivedb.h
|
||||
|
||||
- name: Extract Package Requirements (32-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW32' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build/smartmontools
|
||||
run: >
|
||||
7z -bb1 e $SMARTMONTOOLS_INSTALLER
|
||||
bin32/smartctl.exe
|
||||
bin32/smartctl-nc.exe
|
||||
bin/update-smart-drivedb.ps1
|
||||
bin/drivedb.h
|
||||
|
||||
- name: List installed files
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
ls -1R /mingw64
|
||||
ls -1R /mingw32
|
||||
|
||||
- name: Configure CMake
|
||||
shell: msys2 {0}
|
||||
run: >
|
||||
cmake -B build -S "$GITHUB_WORKSPACE"
|
||||
-G "MSYS Makefiles"
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/${{ matrix.platform }}-mingw-msys2.cmake"
|
||||
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: msys2 {0}
|
||||
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
|
||||
|
||||
- name: Package ZIP
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cpack -G ZIP
|
||||
|
||||
- name: Package NSIS (64-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW64' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cpack -G NSIS64
|
||||
|
||||
- name: Package NSIS (32-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW32' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cpack -G NSIS
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ matrix.msystem == 'MINGW64' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Windows 64-Bit Packages
|
||||
path: ${{github.workspace}}/build/gsmartcontrol-*-win*.*
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ matrix.msystem == 'MINGW32' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Windows 32-Bit Packages
|
||||
path: ${{github.workspace}}/build/gsmartcontrol-*-win*.*
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
# Builds
|
||||
/0*
|
||||
/win32*
|
||||
/win64*
|
||||
/cmake-build-*
|
||||
/build*
|
||||
/_codeql_build_dir
|
||||
|
||||
# Non-project files
|
||||
/TODO
|
||||
|
||||
# Doxygen generated
|
||||
/doxygen_doc
|
||||
|
||||
# OS-generated files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
Icon?
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# IDE
|
||||
/.vs
|
||||
/*.pcs
|
||||
/.idea
|
||||
/CMakeLists.txt.user
|
||||
|
||||
# Agents
|
||||
/.codebuddy
|
||||
|
||||
# Translations
|
||||
/po/boldquot.sed
|
||||
/po/en@boldquot.header
|
||||
/po/en@quot.header
|
||||
/po/insert-header.sin
|
||||
/po/Makevars.template
|
||||
/po/quot.sed
|
||||
/po/remove-potcdate.sin
|
||||
/po/Rules-quot
|
||||
/po/gsmartcontrol.pot
|
||||
/po/*.gmo
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
|
||||
# This file describes OBS workflows:
|
||||
# https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.scm_ci_workflow_integration.html
|
||||
|
||||
# Workflow for pull requests
|
||||
#build_pull_request_workflow:
|
||||
# steps:
|
||||
# - branch_package:
|
||||
# source_project: home:alex_sh:gsmartcontrol:github_ci:main
|
||||
# source_package: gsmartcontrol
|
||||
# target_project: home:alex_sh:gsmartcontrol:github_ci:main
|
||||
#
|
||||
# - configure_repositories:
|
||||
# project: home:alex_sh:gsmartcontrol:github_ci:main
|
||||
# repositories:
|
||||
# - name: openSUSE_Tumbleweed
|
||||
# paths:
|
||||
# - target_project: openSUSE:Factory
|
||||
# target_repository: snapshot
|
||||
# architectures:
|
||||
# - x86_64
|
||||
# - i586
|
||||
#
|
||||
# - set_flags:
|
||||
# flags:
|
||||
# - type: publish
|
||||
# status: disable
|
||||
# project: home:alex_sh:gsmartcontrol:github_ci:main
|
||||
#
|
||||
# filters:
|
||||
# event: pull_request
|
||||
# branches:
|
||||
# only:
|
||||
# - main
|
||||
|
||||
|
||||
# Workflow for pushes
|
||||
|
||||
# Note: This adds new repositories to the project if they do not exist.
|
||||
build_main_workflow:
|
||||
steps:
|
||||
- configure_repositories:
|
||||
project: home:alex_sh:gsmartcontrol:github_ci:main
|
||||
repositories:
|
||||
|
||||
- name: openSUSE_Tumbleweed
|
||||
paths:
|
||||
- target_project: openSUSE:Factory
|
||||
target_repository: snapshot
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: openSUSE_Slowroll
|
||||
paths:
|
||||
- target_project: openSUSE:Slowroll
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: openSUSE_Leap_15.6
|
||||
paths:
|
||||
- target_project: openSUSE:Leap:15.6
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: openSUSE_Leap_15.5
|
||||
paths:
|
||||
- target_project: devel:gcc
|
||||
target_repository: openSUSE_Leap_15.5
|
||||
- target_project: openSUSE:Leap:15.5
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: openSUSE_Factory_ARM
|
||||
paths:
|
||||
- target_project: openSUSE:Factory:ARM
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- aarch64
|
||||
- armv7l
|
||||
|
||||
- name: SUSE_SLE-15-SP6
|
||||
paths:
|
||||
- target_project: devel:gcc
|
||||
target_repository: SLE-15
|
||||
- target_project: SUSE:SLE-15-SP6:GA
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: Ubuntu_24.04
|
||||
paths:
|
||||
- target_project: openSUSE:Tools
|
||||
target_repository: xUbuntu_24.04
|
||||
- target_project: Ubuntu:24.04
|
||||
target_repository: universe
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: Ubuntu_23.10
|
||||
paths:
|
||||
- target_project: openSUSE:Tools
|
||||
target_repository: xUbuntu_23.10
|
||||
- target_project: Ubuntu:23.10
|
||||
target_repository: universe
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: Ubuntu_22.04
|
||||
paths:
|
||||
- target_project: openSUSE:Tools
|
||||
target_repository: xUbuntu_22.04
|
||||
- target_project: Ubuntu:22.04
|
||||
target_repository: universe
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: Fedora_Rawhide
|
||||
paths:
|
||||
- target_project: openSUSE:Tools
|
||||
target_repository: Fedora_Rawhide
|
||||
- target_project: Fedora:Rawhide
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: Fedora_41
|
||||
paths:
|
||||
- target_project: openSUSE:Tools
|
||||
target_repository: Fedora_41
|
||||
- target_project: Fedora:41
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- x86_64
|
||||
- aarch64
|
||||
|
||||
- name: Fedora_40
|
||||
paths:
|
||||
- target_project: openSUSE:Tools
|
||||
target_repository: Fedora_40
|
||||
- target_project: Fedora:40
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- x86_64
|
||||
- aarch64
|
||||
|
||||
- name: Fedora_39
|
||||
paths:
|
||||
- target_project: openSUSE:Tools
|
||||
target_repository: Fedora_39
|
||||
- target_project: Fedora:39
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- x86_64
|
||||
- aarch64
|
||||
|
||||
- name: Debian_Unstable
|
||||
paths:
|
||||
- target_project: openSUSE:Tools
|
||||
target_repository: Debian_Unstable
|
||||
- target_project: Debian:Next
|
||||
target_repository: standard
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: Debian_Testing
|
||||
paths:
|
||||
- target_project: openSUSE:Tools
|
||||
target_repository: Debian_Testing
|
||||
- target_project: Debian:Testing
|
||||
target_repository: update
|
||||
architectures:
|
||||
- x86_64
|
||||
- i586
|
||||
|
||||
- set_flags:
|
||||
flags:
|
||||
- type: publish
|
||||
status: enable
|
||||
project: home:alex_sh:gsmartcontrol:github_ci:main
|
||||
- type: debuginfo
|
||||
status: enable
|
||||
project: home:alex_sh:gsmartcontrol:github_ci:main
|
||||
|
||||
- rebuild_package:
|
||||
project: home:alex_sh:gsmartcontrol:github_ci:main
|
||||
package: gsmartcontrol
|
||||
|
||||
filters:
|
||||
event: push
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
0*
|
||||
*.pcs
|
||||
autom4te.cache
|
||||
Makefile.in
|
||||
configure
|
||||
depcomp
|
||||
config.guess
|
||||
config.sub
|
||||
aclocal.m4
|
||||
config.h.in
|
||||
missing
|
||||
install-sh
|
||||
@@ -1 +0,0 @@
|
||||
Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
@@ -0,0 +1,81 @@
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2021 - 2024 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
# 3.14 for proper object library support (wrt linking)
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
# Use new policy for option() to supress warnings.
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/version.txt)
|
||||
|
||||
project(gsmartcontrol
|
||||
VERSION ${CMAKE_PROJECT_VERSION}
|
||||
DESCRIPTION "Hard Disk Drive and SSD Health Inspection Tool"
|
||||
HOMEPAGE_URL "https://gsmartcontrol.shaduri.dev"
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
||||
# Provide DATADIR, etc.
|
||||
include(GNUInstallDirs)
|
||||
|
||||
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
|
||||
|
||||
include(src/build_config/compiler_options.cmake)
|
||||
|
||||
|
||||
# Disable RPATH manipulation, we don't have shared libraries
|
||||
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
|
||||
|
||||
# Write the binaries to project root (avoids conflicts with manifests, also it's more convenient this way)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
|
||||
|
||||
|
||||
# User-controlled build options
|
||||
option(APP_BUILD_EXAMPLES "Build examples" OFF)
|
||||
option(APP_BUILD_TESTS "Build tests" OFF)
|
||||
|
||||
|
||||
# Install documentation
|
||||
set(DOC_FILES
|
||||
LICENSE.LGPL3.txt
|
||||
LICENSE.txt
|
||||
NEWS.txt
|
||||
README.md
|
||||
)
|
||||
if (WIN32)
|
||||
install(FILES ${DOC_FILES} DESTINATION doc/)
|
||||
install(DIRECTORY docs DESTINATION doc/
|
||||
PATTERN "*.yml" EXCLUDE
|
||||
PATTERN "CNAME" EXCLUDE
|
||||
)
|
||||
else()
|
||||
install(FILES ${DOC_FILES} TYPE DOC)
|
||||
install(DIRECTORY docs TYPE DOC
|
||||
PATTERN "*.yml" EXCLUDE
|
||||
PATTERN "CNAME" EXCLUDE
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
# CTest support
|
||||
include(CTest)
|
||||
#include(${CMAKE_SOURCE_DIR}/dependencies/catch2/Catch2/extras/Catch.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/dependencies/catch2/Catch2/contrib/Catch.cmake)
|
||||
|
||||
|
||||
add_subdirectory(contrib)
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(dependencies)
|
||||
add_subdirectory(packaging)
|
||||
add_subdirectory(src)
|
||||
|
||||
|
||||
# Packaging support
|
||||
include(packaging/cpack_options.cmake)
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
ashaduri@gmail.com.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
@@ -1 +0,0 @@
|
||||
See LICENSE.gsmartcontrol.txt file for copyright and license information.
|
||||
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -1,26 +0,0 @@
|
||||
Copyright (c) 1987, 1989, 1990, 1991, 1992, 1993, 1994
|
||||
The Regents of the University of California. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -1,31 +0,0 @@
|
||||
|
||||
GSmartControl License
|
||||
|
||||
This product is multi-licensed under GNU GPL versions 2 and 3.
|
||||
You are free to choose which one you use.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of either version 2 or (at your option) version 3 of the GNU General
|
||||
Public License as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public Licenses for more details.
|
||||
|
||||
You should have received copies of these licenses along with this program.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
See LICENSE_gpl2.txt and LICENSE_gpl3.txt for details.
|
||||
|
||||
|
||||
Portions of this software are copyright Google Inc. See LICENSE_pcrecpp.txt
|
||||
for details.
|
||||
|
||||
This product includes the HZ library (or portions of it). See LICENSE_hz.txt
|
||||
for details.
|
||||
|
||||
This product includes icons from Crystal Project,
|
||||
copyright 2006-2007 Everaldo Coelho.
|
||||
http://www.everaldo.com/crystal, http://www.yellowicon.com .
|
||||
Crystal Project icons are licensed under GNU LGPL. See
|
||||
http://www.everaldo.com/crystal/?action=license for details.
|
||||
@@ -1,24 +0,0 @@
|
||||
|
||||
HZ Library License
|
||||
|
||||
The HZ library contains software licensed under several different licenses.
|
||||
This is due to HZ including portions of other software.
|
||||
|
||||
All original code is licensed under the Zlib License. See LICENSE_zlib.txt for
|
||||
details.
|
||||
|
||||
Portions of this software are copyright Regents of the University of California,
|
||||
see LICENSE_bsd-ucb.txt for details.
|
||||
|
||||
Portions of this software are licensed under Boost Software License, see
|
||||
LICENSE_boost_1_0.txt and individual source files for copyright information.
|
||||
|
||||
Each source file contains its copyright information.
|
||||
|
||||
If you intend to use HZ in your product, please note that you MUST include
|
||||
these licenses somewhere in your distribution (simply redistributing the
|
||||
license files or reproducing their texts in documentation and/or other supplied
|
||||
materials is OK):
|
||||
* LICENSE_zlib.txt (source distributions only);
|
||||
* LICENSE_bsd-ucb.txt (source and binary distributions);
|
||||
* LICENSE_boost_1_0.txt (source distributions only).
|
||||
@@ -1,28 +0,0 @@
|
||||
Copyright (c) 2005, Google Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,17 +0,0 @@
|
||||
Zlib License
|
||||
|
||||
THIS SOFTWARE IS PROVIDED 'AS-IS', WITHOUT ANY EXPRESS OR IMPLIED
|
||||
WARRANTY. IN NO EVENT WILL THE AUTHORS BE HELD LIABLE FOR ANY DAMAGES
|
||||
ARISING FROM THE USE OF THIS SOFTWARE.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
@@ -1,61 +0,0 @@
|
||||
|
||||
# Add autoconf.m4 directory to local macro search path
|
||||
ACLOCAL_AMFLAGS = -I autoconf.m4
|
||||
|
||||
SUBDIRS = src data
|
||||
|
||||
|
||||
# These files are actually needed for compilation.
|
||||
noinst_DATA = AUTHORS.txt LICENSE_gsmartcontrol.txt README.txt
|
||||
|
||||
|
||||
# For the files to be bundled with the distribution, specify them in
|
||||
# one of the following.
|
||||
|
||||
# These will be installed into docdir.
|
||||
# Some of these files are actually needed for compilation (see src/res/Makefile.am).
|
||||
dist_doc_DATA = AUTHORS.txt ChangeLog NEWS README.txt \
|
||||
LICENSE_boost_1_0.txt \
|
||||
LICENSE_bsd-ucb.txt \
|
||||
LICENSE_gpl2.txt \
|
||||
LICENSE_gpl3.txt \
|
||||
LICENSE_gsmartcontrol.txt \
|
||||
LICENSE_hz.txt \
|
||||
LICENSE_pcrecpp.txt \
|
||||
LICENSE_zlib.txt
|
||||
|
||||
|
||||
# Extra files bundled with distribution.
|
||||
# file2csource.sh is needed for building but not installed.
|
||||
EXTRA_DIST = COPYING TODO INSTALL configure autogen.sh \
|
||||
baqup gsmartcontrol.kdevelop \
|
||||
templates \
|
||||
file2csource.sh \
|
||||
gsmartcontrol.spec
|
||||
|
||||
|
||||
|
||||
# PCH support
|
||||
|
||||
global_macros.h.gch: $(top_srcdir)/src/global_macros.h
|
||||
$(CXX) $(CXXFLAGS) $(DEFS) -x "c++-header" $(top_srcdir)/src/global_macros.h -o global_macros.h.gch
|
||||
|
||||
gch: global_macros.h.gch
|
||||
|
||||
gch-clean:
|
||||
rm -f global_macros.h.gch
|
||||
|
||||
distclean-local: gch-clean
|
||||
|
||||
|
||||
# rpm support
|
||||
|
||||
src-rpm: dist
|
||||
rpmbuild -ts $(distdir).tar.bz2
|
||||
|
||||
|
||||
# Don't use this - it does something weird, and gcc errors out with "long long long" errors, etc...
|
||||
#rpm: dist
|
||||
# rpmbuild -ta $(distdir).tar.bz2
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
Version 0.8.0rc2
|
||||
Fix for compilation under gcc 4.3.
|
||||
Removed test data (there's a lot of it and it's unnecessary).
|
||||
|
||||
Version 0.8.0rc1
|
||||
Initial release.
|
||||
@@ -0,0 +1,296 @@
|
||||
Version 2.0.2, released on 2025-02-24
|
||||
Support GCC 11 (and Ubuntu 22.04) by using and vendoring fmt library
|
||||
(#77).
|
||||
Support an option of saving smartctl output to text instead of JSON (#76).
|
||||
Restored pre-2.0.0 runtime support for smartctl < 7.3 (based on Text
|
||||
parser); this is an unsupported, old method without NVMe, provided
|
||||
for compatibility only (#77).
|
||||
Restored pre-2.0.0 support for standard (non-extended) self-test log found
|
||||
in very old ATA drives; the new JSON parser did not support this
|
||||
previously (#79).
|
||||
Better support for temperature values in JSON parser; this fixes
|
||||
unreasonably large temperature values (#78).
|
||||
Add a tooltip explaining self-test "lifetime hours" wrapping behavior
|
||||
(#73).
|
||||
Windows: Fixed a crash on Windows 7 when opening drive information
|
||||
by using Windows 7-compatible librsvg (#71).
|
||||
Windows: Avoid using non-integer font sizes.
|
||||
|
||||
Version 2.0.1, released on 2024-11-26
|
||||
Windows: Fixed a crash when opening a native file dialog (#67).
|
||||
|
||||
Version 2.0.0, released on 2024-11-07
|
||||
New JSON-based parser for smartctl output (requires smartctl 7.3+) (#4).
|
||||
Support for NVMe drives (self-tests require smartctl 7.4+) (#4).
|
||||
New "Basic" JSON parser for SCSI, flash, and other non-ATA/NVMe drives.
|
||||
PCRE library is no longer required (the code has been ported to
|
||||
std::regex) (#40).
|
||||
A lot of code has been refactored and modernized using C++17 and C++20
|
||||
features, removing much of the custom library code.
|
||||
The build process requires a C++20-compliant compiler now (GCC 13+,
|
||||
Clang 17+, Apple Clang 15+).
|
||||
CMake (3.14+) is now used as a build system instead of autotools.
|
||||
GSmartControl is now licensed under GNU GPL 3 only.
|
||||
Icons come from Oxygen project now (LGPL 3+) instead of Crystal project.
|
||||
Documentation in md format comes with the source code ("docs" directory).
|
||||
Support new versions and prereleases of smartctl (#46, #42).
|
||||
Better detection of drive types thanks to the JSON parser.
|
||||
Removed ATA AODC feature, it has been deprecated for a while now.
|
||||
Information window: Some values are aligned and monospaced to improve
|
||||
readability.
|
||||
Fixed command execution popup dialog being on top of all windows (#17).
|
||||
Other minor UI improvements and fixes.
|
||||
Windows: Better support for HiDPI (including fractional scaling).
|
||||
Windows: NSIS package is generated by CPack now.
|
||||
Windows: Packages are built using GitHub CI now.
|
||||
|
||||
Version 1.1.4, released on 2022-02-04
|
||||
Fixed a crash when trying to render main window icons which have
|
||||
incomplete data; this fixes a rare crash when scanning devices (#13).
|
||||
Fixed rendering compatibility issues with newer GTK3 versions.
|
||||
Fixed build system conflict with C++20 version header (#14).
|
||||
Fixed "Running command ..." dialog floating above windows of other
|
||||
applications (#17).
|
||||
Fixed a crash when system locale is set to invalid locale.
|
||||
Support Finnish decimal separator (backported from the Debian package)
|
||||
(#23).
|
||||
Set LC_NUMERIC=C for smartctl process to avoid locale-dependent number
|
||||
formatting (#23).
|
||||
Fixed printing all GTK messages as warnings; the messages are sorted by
|
||||
severity now.
|
||||
Add current time to default filename in Save Output dialog.
|
||||
Support macos stat command in file2csource.sh.
|
||||
Fixed a few typos (backported from the Debian package).
|
||||
Windows port now uses Adwaita theme due to issues with win32 theme.
|
||||
Windows port is dpi-aware now.
|
||||
|
||||
Version 1.1.3, released on 2017-11-12
|
||||
Fixed gsmartcontrol-root not launching if GDK_* variables are not set.
|
||||
|
||||
Version 1.1.2, released on 2017-11-11
|
||||
Fixed gsmartcontrol-root not passing GDK_SCALE and GDK_DPI_SCALE variables
|
||||
to gsmartcontrol when using PolKit.
|
||||
Fixed blurriness of icons in the main window with GDK_SCALE=2.
|
||||
Tweaked the main window interface.
|
||||
Windows: Show volume labels beside drive letters in icon tooltips.
|
||||
|
||||
Version 1.1.1, released on 2017-09-25
|
||||
Windows: Use Adwaita GTK+ theme for systems which support Classic Windows
|
||||
theme, since the default win32 GTK+ theme is broken in it; this
|
||||
includes Windows 7 and Windows Server.
|
||||
Statistics entry values are formatted with commas for readability.
|
||||
Moved help information to website.
|
||||
|
||||
Version 1.1.0, released on 2017-09-07
|
||||
New Statistics, Temperature Log, Error Recovery, Physical and Directory
|
||||
tabs.
|
||||
General tab shows non-SMART device settings as well.
|
||||
Attributes tab shows entries in "brief" format.
|
||||
Error Log tab shows Extended error log by default (if supported).
|
||||
Self-Test Log tab now shows Extended self-test log by default (if
|
||||
supported).
|
||||
GSmartControl now uses "-x" equivalent for retrieving data (as upposed to
|
||||
"-a"); loading "-x" outputs as virtual drives is also supported.
|
||||
Implemented ability to copy rows in CSV format from Attribute, Statistics
|
||||
and Self-Test Log tables.
|
||||
Implemented "Update Drive Database" functionality.
|
||||
Windows: Drive letters are shown for each drive.
|
||||
Scan time is shown under virtual drive icons.
|
||||
Polkit is supported with gsmartcontrol-root script now.
|
||||
Pcrecpp is no longer bundled, use system-installed one instead.
|
||||
Smartmontools version 5.43 is required at runtime.
|
||||
Other minor improvements and fixes.
|
||||
|
||||
Version 1.0.2, released on 2017-07-21
|
||||
Fixed incomplete capturing of smartctl output under Windows.
|
||||
Added missing icons under Windows.
|
||||
Fixed being able to turn on AODC even if unsupported.
|
||||
|
||||
Version 1.0.1, released on 2017-06-19
|
||||
Fixed compilation under macOS.
|
||||
Fixed compilation under Fedora Rawhide.
|
||||
Don't use -mtune=generic for all targets.
|
||||
|
||||
Version 1.0.0, released on 2017-06-16
|
||||
Ported to GTK+ 3.
|
||||
Tweaked the user interface a bit.
|
||||
Dropped support for Windows XP, 2000 and 2003 (they are no longer
|
||||
supported by GTK+).
|
||||
Fixed detection of newer system-installed smartmontools under Windows.
|
||||
|
||||
Version 0.9.0, released on 2017-05-11
|
||||
Implemented (untested) support for Linux-based Areca controllers with
|
||||
enclosures.
|
||||
Implemented (untested) support for Windows-based Areca controllers (thanks
|
||||
to Richard Kagerer).
|
||||
Implemented (untested) support for Linux-based HP controllers with cciss
|
||||
and hpsa/hpahcisr drivers (thanks to Fabrice Bacchella).
|
||||
Changes in Preferences no longer fail silently until rescan/restart.
|
||||
Better drive detection under Windows after removable drives are detached.
|
||||
Windows version is no longer marked as "dpi aware" since it's not
|
||||
supported that well.
|
||||
Drive attribute descriptions have been updated (including clarifications
|
||||
for SSDs).
|
||||
Added support for SSD-only and HDD-only vendor attributes.
|
||||
Devices having only basic info can be displayed now in the info window.
|
||||
Fixed BDRW drive detection (it was detected as a HDD).
|
||||
Other minor improvements.
|
||||
A number of issues have been fixed (including a crash).
|
||||
|
||||
Version 0.8.7, released on 2012-08-11
|
||||
Implemented support for Adaptec RAID 5805 controller and possibly other
|
||||
Adaptec models as well (Linux).
|
||||
Implemented support for Areca RAID controller detection under Linux
|
||||
(untested).
|
||||
Implemented support for 3ware 3w-sas-supported (twl) RAID controller
|
||||
detection under Linux (untested).
|
||||
Implemented support for systems with several different 3ware controllers
|
||||
(twa/twe/twl).
|
||||
Fixed invalid parsing of tw_cli output which caused non-detection of
|
||||
drives and controllers with controller or port numbers greater than 9
|
||||
if tw_cli was found (3ware linux, windows).
|
||||
The duplicate drives are no longer shown for some Intel matrix controllers
|
||||
under Windows; Intel RAID controllers are fully supported under
|
||||
Windows now.
|
||||
Added options to show device name and serial number under drive icons.
|
||||
Updated SMART attribute definitions and added warnings for SSD lifetime
|
||||
attributes.
|
||||
gsmartcontrol-root has a new argument "--desktop=..." which replaces the
|
||||
old positional argument; compatibility with the old invocation syntax
|
||||
has been retained.
|
||||
Completely documented the source using doxygen tags.
|
||||
Added support for Fedora's consolehelper.
|
||||
Made GSmartControl DPI-aware under Windows.
|
||||
Fixed compilation issues with clang and gcc 4.7, as well as glib 2.31.x
|
||||
and newer.
|
||||
Fixed minor issues in NSIS installer.
|
||||
Fixed other minor bugs and made minor improvements.
|
||||
|
||||
Version 0.8.6, released on 2011-06-12
|
||||
Support detecting drives behind 3ware controllers (Linux, Windows),
|
||||
including tw_cli/cx/px mode in Windows. Having tw_cli is recommended
|
||||
but not required.
|
||||
Added support for specifying -d option and extra parameters via command
|
||||
line, "Add Device" and "Preferences" dialogs. This change effectively
|
||||
adds full support for multiple drives behind a single device name.
|
||||
Beesu and su-to-root are supported by gsmartcontrol-root script now.
|
||||
Completely revamped the attribute database and its handling, should be a
|
||||
lot more usable and forward-compatible now; SSD attributes are also
|
||||
included.
|
||||
In-program help has been expanded considerably.
|
||||
General improvements to user interface have been implemented (better GNOME
|
||||
HIG compliance, better tooltips, dialogs, etc.).
|
||||
Added ability to show smartctl output for devices whose info could not be
|
||||
parsed fully.
|
||||
Attributes in "brief" format are supported now.
|
||||
The parser has been updated to reflect the recent changes in smartctl.
|
||||
Quit and rescan operations are no longer denied without confirmation when
|
||||
tests are running.
|
||||
The Windows NSIS installer has been vastly improved.
|
||||
Better support for Windows Vista and 7.
|
||||
Changed copyright notices for files with Whatever License to use Unlicense.
|
||||
Added other minor features and fixed quite a few bugs.
|
||||
|
||||
Version 0.8.5, released on 2009-09-05
|
||||
GSmartControl now uses XDG config directory for per-user configuration on
|
||||
UNIX and CSIDL_PROFILE directory on Windows. Existing configuration is
|
||||
migrated automatically.
|
||||
The names are shown correctly for unsupported devices even with the latest
|
||||
smartctl snapshots now.
|
||||
Smartctl SVN revision is shown (if available).
|
||||
The progress bars update properly when parallel tests are run.
|
||||
Windows: GSmartControl should be able to operate on any valid filesystem
|
||||
path (not just locale-representable ones).
|
||||
Windows: GSmartControl is now officially compilable on x86_64 via mingw64.
|
||||
Fixed compilation under very old gtkmm/libglademm, and with gcc 4.4.
|
||||
Fixed parsing of multiple error types in SMART error log.
|
||||
Added minor features and fixed miscellaneous bugs.
|
||||
|
||||
Version 0.8.4, released on 2009-03-23
|
||||
Linux Software RAID devices are blacklisted now. (backported from Debian).
|
||||
Attributes tab is before the capabilities tab now.
|
||||
A man page has been generously contributed by Giuseppe Iuculano
|
||||
<giuseppe@iuculano.it>.
|
||||
Smartctl version now includes the CVS snapshot date (if available).
|
||||
Windows: Look for "smartctl-nc.exe" instead of "smartctl.exe" by default.
|
||||
Windows: Use smartmontools-supplied smartctl-nc.exe by default (if found).
|
||||
Other minor changes (mainly Debian backports).
|
||||
|
||||
Version 0.8.3, released on 2008-12-27
|
||||
A random "Smartctl returned an empty output" error on Windows was fixed.
|
||||
Thanks to Zurab Khetsuriani for testing.
|
||||
Fixed a parser issue which prevented running self-tests in Windows.
|
||||
The supplied icon (hopefully) shows correctly in Windows 2000 now.
|
||||
This release adds an official support for Windows 2000 SP4.
|
||||
Added scripts to allow GSmartControl to read smartctl data from
|
||||
cron-generated files. This allows users to read somewhat recent
|
||||
smartctl information without having to run GSmartControl as root.
|
||||
Generously contributed by Alex Butcher <alex dot butcher 'at'
|
||||
assursys.co.uk>.
|
||||
Configure script correctly aborts instead of printing a warning if gtkmm
|
||||
or libglademm (if needed) is not found.
|
||||
Configure script now accepts --enable-windows-console,
|
||||
--disable-abort-if-no-gtkmm, --disable-abort-if-no-glade-reader,
|
||||
as well as Windows-supporting "auto" for --enable-nsis-wine and
|
||||
--with-nsis.
|
||||
Configure's --with-win32-env has been renamed to --with-windows-dlls.
|
||||
The "About" dialog shows version information now.
|
||||
Minor bugs were fixed.
|
||||
|
||||
Version 0.8.2, released on 2008-12-10
|
||||
Fixed gsmartcontrol_root.sh script to support distributions with no
|
||||
/usr/sbin in their users' paths (thanks to Erwan Velu).
|
||||
Added desktop auto-detection to gsmartcontrol_root.sh script. This allows
|
||||
us to use only one desktop file (thanks to Erwan Velu).
|
||||
Added Debian package directory (named "debian.dist" for now to avoid
|
||||
control file conflicts with Build Service).
|
||||
Renamed gsmartcontrol_root.sh to gsmartcontrol-root, to make Debian happy.
|
||||
Added make targets for Windows packages (zip and NSIS).
|
||||
Fixed Windows-related issues (Vista is fully supported now).
|
||||
Fixed minor bugs:
|
||||
Smartctl parser is win32-locale-aware now.
|
||||
No more unnecessary parsing.
|
||||
No segfault on exit under Windows and Solaris.
|
||||
A friendlier message is displayed if smartctl was not found.
|
||||
No highlighted labels when switching tabs in Information window.
|
||||
|
||||
Version 0.8.1, released on 2008-11-11
|
||||
Disabled Linux "by-id" drive detection - it's unreliable on some broken
|
||||
systems.
|
||||
Added some more attribute descriptions.
|
||||
Our names for attributes override smartctls' now.
|
||||
Added a proper "Add Device" dialog for Windows.
|
||||
Added an icon and resource file for Windows.
|
||||
Fixed minor bugs.
|
||||
|
||||
Version 0.8.0rc4, released on 2008-10-20
|
||||
FreeBSD support (tested with DesktopBSD 1.6 (FreeBSD 6.3) / x86).
|
||||
NetBSD support (tested with NetBSD 4.0.1 / x86).
|
||||
OpenBSD support (tested with OpenBSD 4.3 / x86-64 / gcc-3.3.5).
|
||||
Solaris/gcc support (tested with Solaris 10 / x86 / gcc-3.4.3 / blastwave).
|
||||
Solaris/sunstudio support (tested with Solaris 10 / x86 / sunstudio12 /
|
||||
sunfreeware).
|
||||
Code to support Windows, Mac OS X, QNX.
|
||||
Support of older pcre versions (at least 4.5, maybe older too).
|
||||
Added gsmartcontrol_root.sh script to easily run gsmartcontrol as root.
|
||||
Improved .desktop files.
|
||||
License for tests and examples is legally more correct now.
|
||||
Minor bugfixes.
|
||||
|
||||
Version 0.8.0rc3, released on 2008-10-08
|
||||
Added support for udevless Linux distributions by providing a fallback
|
||||
/proc/partitions-based drive detection method. The new method adds
|
||||
support for Linux 2.4 and older systems. Thanks to Paul Marwick for
|
||||
reporting and testing.
|
||||
Fixed invalid error messages with directory-related operations.
|
||||
Fixed invalid verbosity levels of console output of debug messages in
|
||||
non-debug builds.
|
||||
Improved rpm spec file - now supports building on OpenSUSE build
|
||||
service with various distributions as targets.
|
||||
|
||||
Version 0.8.0rc2, released on 2008-10-05
|
||||
Fixed compilation under gcc 4.3. Thanks to Peter Linnell for reporting.
|
||||
Removed test data (there's a lot of it and it's unnecessary).
|
||||
|
||||
Version 0.8.0rc1, released on 2008-10-01
|
||||
Initial public release.
|
||||
@@ -0,0 +1,76 @@
|
||||
|
||||
# GSmartControl
|
||||
|
||||
***Hard disk drive and SSD health inspection tool***
|
||||
|
||||
[](https://gsmartcontrol.shaduri.dev)
|
||||
[](https://gsmartcontrol.shaduri.dev/downloads)
|
||||
[](https://www.gnu.org/licenses/gpl-3.0)
|
||||
[](https://gsmartcontrol.shaduri.dev/software-requirements)
|
||||
[](https://repology.org/project/gsmartcontrol/versions)
|
||||
[](https://app.codacy.com/gh/ashaduri/gsmartcontrol?utm_source=github.com&utm_medium=referral&utm_content=ashaduri/gsmartcontrol&utm_campaign=Badge_Grade_Settings)
|
||||
|
||||
---
|
||||
|
||||
[GSmartControl](https://gsmartcontrol.shaduri.dev)
|
||||
is a graphical user interface for smartctl (from [smartmontools](https://www.smartmontools.org/)
|
||||
package), which is a tool for
|
||||
querying and controlling [SMART](https://en.wikipedia.org/wiki/Self-Monitoring,_Analysis_and_Reporting_Technology)
|
||||
(Self-Monitoring, Analysis, and Reporting
|
||||
Technology) data on modern hard disk and solid-state drives. It allows you to
|
||||
inspect the drive's SMART data to determine its health, as well as run various
|
||||
tests on it.
|
||||
|
||||
|
||||
## Downloads
|
||||
|
||||
The [Downloads](https://gsmartcontrol.shaduri.dev/downloads) page contains
|
||||
all the available packages of GSmartControl.
|
||||
|
||||
|
||||
## Features
|
||||
- automatically reports and highlights any anomalies;
|
||||
- allows enabling/disabling SMART;
|
||||
- supports configuration of global and per-drive options for smartctl;
|
||||
- performs SMART self-tests;
|
||||
- displays drive identity information, capabilities, attributes, device statistics, etc.;
|
||||
- can read in smartctl output from a saved file, interpreting it as a read-only virtual device;
|
||||
- works on most smartctl-supported operating systems;
|
||||
- has extensive help information.
|
||||
|
||||
|
||||
### Supported Hardware
|
||||
|
||||
GSmartControl supports SATA, PATA, and NVMe drives, as well as drives
|
||||
behind some USB bridges and RAID controllers.
|
||||
Please see the
|
||||
[Supported Hardware](https://gsmartcontrol.shaduri.dev/supported-hardware) page
|
||||
for more information.
|
||||
|
||||
|
||||
### Supported Platforms
|
||||
|
||||
GSmartControl supports all major desktop operating systems, including
|
||||
Linux, Windows, macOS, FreeBSD, and other BSD-style operating systems.
|
||||
Please see the
|
||||
[Software Requirements](https://gsmartcontrol.shaduri.dev/software-requirements) page
|
||||
for more information.
|
||||
|
||||
|
||||
## Copyright and Licensing
|
||||
|
||||
GSmartControl is Copyright (C) 2008 - 2025 Alexander Shaduri [ashaduri@gmail.com](mailto:ashaduri@gmail.com) and contributors.
|
||||
|
||||
GSmartControl is licensed under the terms of
|
||||
[GNU General Public License Version 3](https://www.gnu.org/licenses/gpl-3.0.en.html).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of version 3 of the GNU General Public License as published by the
|
||||
Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public Licenses for more details.
|
||||
|
||||
This product includes icons from Oxygen Icons copyright [KDE](https://kde.org)
|
||||
and licensed under the [GNU LGPL version 3](https://www.gnu.org/licenses/lgpl-3.0.en.html) or later.
|
||||
@@ -1,302 +0,0 @@
|
||||
|
||||
About GSmartControl
|
||||
|
||||
GSmartControl - Hard disk drive health inspection tool.
|
||||
|
||||
GSmartControl is a graphical user interface for smartctl (from smartmontools
|
||||
package, see http://smartmontools.sourceforge.net), which is a tool for
|
||||
querying and controlling SMART (Self-Monitoring, Analysis, and Reporting
|
||||
Technology) data on modern hard disk drives. It allows you to inspect the
|
||||
drive's SMART data to determine its health, as well as run various tests on
|
||||
it.
|
||||
|
||||
Note: Only ATA drives (both PATA and SATA) are supported for now.
|
||||
|
||||
|
||||
|
||||
Features
|
||||
|
||||
Automatically report and hilight any abnormal SMART information.
|
||||
|
||||
Ability to enable / disable SMART.
|
||||
|
||||
Ability to enable / disable Automatic Offline Data Collection - A short
|
||||
self-check that the drive will perform automatically every four hours with no
|
||||
impact on performance.
|
||||
|
||||
Ability to set global and per-drive options for smartctl.
|
||||
|
||||
Display drive identity, capabilities, attributes, error and self-test logs.
|
||||
|
||||
Perform SMART self-tests.
|
||||
|
||||
Ability to load smartctl output as a "virtual" device, which acts just like a
|
||||
real (read-only) device.
|
||||
|
||||
Extensive help information.
|
||||
|
||||
|
||||
|
||||
What is SMART?
|
||||
|
||||
Short answer: SMART is a technology which provides hard disk drives with
|
||||
methods to predict certain kinds of failures with certain chance of success.
|
||||
|
||||
Long answer: read below.
|
||||
|
||||
Self-Monitoring, Analysis, and Reporting Technology, or SMART, is a
|
||||
monitoring system for hard drives to detect and report various indicators of
|
||||
reliability, in the hope of anticipating failures. It is implemented inside
|
||||
the drives SMART provides several ways of monitoring hard drive health. It
|
||||
may provide information about general health, various drive attributes (for
|
||||
example, number of unreadable sectors), error logs, and so on. It may also
|
||||
provide ways to instruct the drive to run various self-tests, which may report
|
||||
valuable information. It may even automatically scan the disk surface in when
|
||||
the drive is idle, and repair the defects, reallocating the data to more safe
|
||||
areas.
|
||||
|
||||
While having SMART sounds really good, there are some nuances to consider. One
|
||||
of the commond pitfalls is that it may create a false sense of security. That
|
||||
is, a perfectly good SMART data is NOT an indication that the drive won't fail
|
||||
the next minute. The reverse is also true - some drives may function perfectly
|
||||
even with not-so-good-looking SMART data. However, as studies indicate, given
|
||||
a large population of drives, some SMART attributes may reliably predict
|
||||
drive failures within up to two months.
|
||||
|
||||
Another common mistake is to assume that the attribute values are the real
|
||||
physical values, as experienced by the drive. As manufacturers do not
|
||||
necessarily agree on precise attribute definitions and measurement units, the
|
||||
exact meaning of the attributes may vary greatly across different drive
|
||||
models.
|
||||
|
||||
At present SMART is implemented individually by manufacturers, and while some
|
||||
aspects are standardized for compatibility, others are not. In fact, most
|
||||
manufacturers refer the users to their own health monitoring utilities, and
|
||||
advice against taking SMART data seriously. Nevertheless, SMART may prove an
|
||||
effective measure against data loss.
|
||||
|
||||
Yet another issue is that quite often the drives have bugs which prevent
|
||||
correct SMART usage. This is usually due to buggy firmware, or the
|
||||
manufacturer ignoring the standard. Luckily, smartmontools usually detects
|
||||
these bugs and works around them.
|
||||
|
||||
|
||||
|
||||
Software Requirements
|
||||
|
||||
So far, only Linux 2.6 systems are supported.
|
||||
|
||||
You need to have the following software installed:
|
||||
|
||||
* pcre - http://www.pcre.org .
|
||||
|
||||
* smartmontools - see http://smartmontools.sourceforge.net .
|
||||
|
||||
* GTK+, version 2.6 or higher - see http://www.gtk.org .
|
||||
|
||||
* Gtkmm, version 2.6 or higher - see http://www.gtkmm.org .
|
||||
|
||||
* libglademm, version 2.4 or higher - see http://www.gtkmm.org .
|
||||
libglademm is not needed when using GTK 2.12 and Gtkmm 2.12.
|
||||
|
||||
Note that GTK+ 2.12 and Gtkmm 2.12 are HIGHLY recommended. While earlier
|
||||
versions may work, they may produce ugly results and buggy behaviour.
|
||||
Libglademm is not needed when using GTK / Gtkmm 2.12.
|
||||
|
||||
Most of these packages are probably already provided by your distribution. For
|
||||
example, to build this program on OpenSUSE, you just need to install
|
||||
smartmontools, gtkmm2-devel and pcre-devel - the rest is installed
|
||||
automatically by the package manager's dependency resolver.
|
||||
|
||||
|
||||
|
||||
Installation
|
||||
|
||||
Short answer: ./configure; make; make install
|
||||
|
||||
Long answer: read below.
|
||||
|
||||
First, check if you can find a pre-built package for your distribution or
|
||||
operating system - they usually provide the best integration and the easiest
|
||||
installation procedure.
|
||||
|
||||
If you want to compile from source, check that you have all the required
|
||||
dependencies (see Software Requirements section). Then the usual
|
||||
|
||||
./configure; make; make install
|
||||
|
||||
will build and install it. Installation usually requires root privileges, but
|
||||
you don't need to install the program in order to run it directly from the
|
||||
compilation directory.
|
||||
|
||||
|
||||
|
||||
Permission Problems
|
||||
|
||||
Short answer: you need to be root. In X11, use kdesu, gnomesu, sux or similar.
|
||||
|
||||
Long answer: read below.
|
||||
|
||||
Most operating systems prohibit direct access to hardware to users with
|
||||
non-administrative privileges. Unfortunately, to access SMART data, smartctl
|
||||
needs to directly access the hard drive.
|
||||
|
||||
The provided desktop and menu icons should show the "Please enter the root
|
||||
password" dialog boxes, and, after correct information is entered, should run
|
||||
this program with root privileges. The dialogs should be available in most
|
||||
commonly used X11 desktop environments.
|
||||
|
||||
However, in case the described method is somehow inaccessible, you need to
|
||||
manually invoke the program with kdesu, gnomesu, sux or similar programs. For
|
||||
example,
|
||||
|
||||
kdesu -u root -c gsmartcontrol
|
||||
|
||||
will ask for root password and run gsmartcontrol with root privileges. Replace
|
||||
"kdesu" with "gnomesu" if using Gnome. The "sux" command may also help, if
|
||||
neither KDE or GNOME are available.
|
||||
|
||||
Another method would be to set the "setuid" flag on smartctl binary, for
|
||||
example (run as root):
|
||||
|
||||
chmod 4755 `which smartctl`
|
||||
|
||||
This method is not recommended, however, and is considered a security risk.
|
||||
Also, some systems may reset the change automatically, unless explicitly
|
||||
instructed otherwise.
|
||||
|
||||
|
||||
|
||||
Enable SMART Permanently
|
||||
|
||||
Specifications say that once you set a SMART-related property, it will be
|
||||
preserved across reboots. So, when you, say, enable SMART and Automatic
|
||||
Offline Data Collection, both will stay enabled until you disable them.
|
||||
|
||||
However, BIOS, your operating system, your other operating systems (if
|
||||
present), and various startup programs may affect that. For example, BIOS may
|
||||
enable SMART each time you start your computer, so if you disabled SMART
|
||||
previously, it will be re-enabled on reboot.
|
||||
|
||||
The easiest way to work around this is to set the desired settings on system
|
||||
startup. You may use smartctl or smartd to do that. For example, to enable
|
||||
both SMART and Automatic Offline Data Collection on /dev/sda, one would write
|
||||
the following to his/her boot.local, rc.local or similar:
|
||||
|
||||
smartctl --smart=on --offlineauto=on /dev/sda
|
||||
|
||||
For more information, see smartctl and smartd documentation.
|
||||
|
||||
|
||||
|
||||
Known Issues
|
||||
|
||||
Only ATA (both PATA and SATA) disks are supported for now. The main reasons
|
||||
are:
|
||||
|
||||
* We can't support drives which don't work with smartmontools. This affects
|
||||
drives which don't support SMART or don't export SMART data correctly (e.g.
|
||||
USB enclosures, RAIDs, etc...).
|
||||
|
||||
* Smartctl's output for SCSI drives is completely different compared to ATA.
|
||||
Also, SCSI drives are rarely found in desktop systems and the servers rarely
|
||||
have X11 / Gtkmm running, so this is a low priority task.
|
||||
|
||||
* I only have ATA drives, so testing would be almost impossible.
|
||||
|
||||
Immediate Offline Tests are not supported. I haven't found a way to reliably
|
||||
monitor them.
|
||||
|
||||
You may run several tests on different drives in parallel, but you will only
|
||||
see the progress information of the last executing test. So, if you run tests
|
||||
on drives A, B and C (in that order), you won't be able to monitor the tests
|
||||
on A and B until C completes. And you won't be able to see any progress on A
|
||||
until both B and C complete their tests.
|
||||
|
||||
Testing is only supported on drives which correctly report their progress
|
||||
information in capabilities.
|
||||
|
||||
Not all drives support disabling Automatic Offline Data Collection, even if
|
||||
they report otherwise.
|
||||
|
||||
Running on GTK+ / Gtkmm versions earlier than 2.12 may cause visual artifacts,
|
||||
usability issues (especially with tooltips and icons), instability, etc...
|
||||
|
||||
The texts probably contain a lot of grammatical errors, English being my third
|
||||
language and all.
|
||||
|
||||
|
||||
|
||||
Reporting Bugs
|
||||
|
||||
First, please collect the following information about your system. Without it
|
||||
it may be very hard or impossible to fix the bug.
|
||||
|
||||
* Which operating system you use (for example, OpenSUSE Linux 11.0).
|
||||
|
||||
* What version of GTK and Gtkmm you have installed. Finding this out is very
|
||||
distribution-specific. For example, on OpenSUSE it would be
|
||||
"rpm -q gtk2 gtkmm2". Some distributions have gtkmm24 instead. You may also
|
||||
search them in your distribution's graphical package manager, if there is one.
|
||||
|
||||
* Execution log from the program, if possible. To obtain it, perform the steps
|
||||
needed to reproduce the bug, then go to "Options -> View Execution Log", and
|
||||
press "Save All".
|
||||
|
||||
* Detailed description of steps you performed when the bug occurred.
|
||||
|
||||
Once you have this information, send an email to me, Alexander Shaduri
|
||||
<ashaduri 'at' gmail.com>. Note that I may refer you to smartmontools support
|
||||
if it's a bug in smartmontools and not GSmartControl. Normally, I won't
|
||||
redirect your support request to them myself, because they may ask questions
|
||||
which only you have the answers to.
|
||||
|
||||
Please read the "License and Copyright" and "Patch Licensing" sections before
|
||||
sending any patches.
|
||||
|
||||
|
||||
|
||||
License and Copyright
|
||||
|
||||
For license information, see LICENSE_gsmartcontrol.txt file.
|
||||
|
||||
You may notice that GSmartControl is not licensed under "GNU GPL version X or
|
||||
later", but under "GNU GPL version X and Y". I firmly believe that it's unwise
|
||||
to license a piece of code under non-existant licenses, whatever anyone else
|
||||
might say. The reason for this is that one simply CANNOT know that, say, in 20
|
||||
years FSF won't be bought by some corporation who will release GPL version Z
|
||||
which will completely reverse the reasons GPL was created for.
|
||||
|
||||
The removal of "or later" clause somewhat imposes responsibility on the
|
||||
copyright holders to review every future version of the license once it's
|
||||
released, and, if deemed acceptable, re-license the code under the new license
|
||||
(possibly retaining the old licenses). Unfortunately, this is a necessary
|
||||
inconvenience we will have to deal with.
|
||||
|
||||
|
||||
|
||||
Patch Licensing
|
||||
|
||||
Due to reasons described in "License and Copyright" section, to make it
|
||||
possible to re-license the code without tracking down all the people who ever
|
||||
wrote a patch, the copyrights of all minor patches must be assigned to the
|
||||
central copyright holder of the project. If the patch is major enough (that
|
||||
is, it forms a significant part of the program source code), the author may
|
||||
retain the copyright, if he or she chooses to do so. However, unless the
|
||||
author plans to maintain his part of the source code, he / she is humbly asked
|
||||
to consider assigning away his / her copyright. A simple "I disclaim all
|
||||
copyright to this patch" by the author is sufficient. All credits will be
|
||||
mentioned in product documentation, whatever the size of the patch is.
|
||||
|
||||
Please note that centralization of copyright is needed to maintain a
|
||||
reasonably healthy legal status of the project. Also note that this method is
|
||||
not unique - FSF and many other organizations require exactly the same thing.
|
||||
|
||||
Some contributors may have reasonable doubts about the future status of this
|
||||
project. Let me assure you that this project will never have more restrictive
|
||||
license than GPLv2. If, some time in the future, the GPL is somehow
|
||||
invalidated in court, the project will be re-licensed under similar (in
|
||||
spirit) license, if possible, or a license less restrictive than GPL (for
|
||||
example, the three-clause BSD license).
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
The following versions are supported with security updates:
|
||||
|
||||
| Version | Supported |
|
||||
|----------| ------------------ |
|
||||
| git main | :white_check_mark: |
|
||||
| 2.0.x | :white_check_mark: |
|
||||
| < 2.0.0 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please report security vulnerabilities privately to
|
||||
Alexander Shaduri [ashaduri@gmail.com](mailto:ashaduri@gmail.com).
|
||||
@@ -1,138 +0,0 @@
|
||||
|
||||
|
||||
GTKMM Notes:
|
||||
|
||||
To transfer an ownership from your local code to a container, use
|
||||
Gtk::Button* pButton = Gtk::manage(new Gtk::Button("Test"));
|
||||
container->add(*pButton);
|
||||
(add() takes an object by reference).
|
||||
otherwise, you will need to delete() it.
|
||||
|
||||
local scope destruction also works if using stack variables.
|
||||
{
|
||||
Gtk::Button aButton;
|
||||
// destroyed here
|
||||
}
|
||||
|
||||
|
||||
A treeview (also iconview, combobox) from glade comes
|
||||
with existing model, which should be unset
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
|
||||
GTKMM problems:
|
||||
|
||||
no pango_parse_markup:
|
||||
gchar* no_markup = 0;
|
||||
if (pango_parse_markup(markup_string, -1, 0, NULL, &no_markup, NULL, NULL)) {
|
||||
// use no_markup
|
||||
g_free(no_markup);
|
||||
}
|
||||
|
||||
|
||||
Lots of gtk_, GTK_, g_ in documentation.
|
||||
|
||||
|
||||
no unset_model() on combobox and iconview.
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
|
||||
TODO:
|
||||
if -q is passed, Execution log doesn't contain libdebug log. fix.
|
||||
|
||||
|
||||
Drive detection - any cross-platform way to do it?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------- Feature List ----------
|
||||
|
||||
+Autodetect available devices (through /proc / /sys ?).
|
||||
win32 support for autodetection (what about different smartctl drivers?).
|
||||
|
||||
+Select current device (from autodetected list; manually whitelist devices).
|
||||
|
||||
+Smartctl binary (text entries in Options - binary, default command line options).
|
||||
+ Global command-line options for smartctl.
|
||||
+ Command-line options per-device in settings (e.g. -d ata).
|
||||
+ Search smartctl binary on startup (try to execute it with --version). If it's not there, alert the user.
|
||||
|
||||
+Indicate which of the devices has SMART supported / enabled.
|
||||
+ Enable / disable smart on devices.
|
||||
+ Indicate that this is until shutdown (but may be preserved on reboot).
|
||||
+ Direct them to smartd / smartctl documentation for permanent enabling.
|
||||
+ NOTE: SMART is sometimes preserved across power cycles.
|
||||
|
||||
+Enable / disable Automatic Offline Data Collection for devices. (-o on)
|
||||
+ Show its status in the main window.
|
||||
|
||||
+Show identity information for device (aka short info), --info.
|
||||
|
||||
+Show all SMART information for device (--all), includes:
|
||||
+ * Short info (--info)
|
||||
+ * SMART DATA
|
||||
+ * overall-health (-H, --health) - may check this automatically as well.
|
||||
+ * General SMART Values, aka Capabilities (-c, --capabilities)
|
||||
+ * Attributes (-A, --attributes). These need decoding.
|
||||
+ * Error Log (-l error)
|
||||
+ * Self-test log (-l selftest)
|
||||
+ * Selective self-test log and settings
|
||||
* SCT status and other stuff
|
||||
Display temperature somewhere (use SCT or Attr 194 for this).
|
||||
Which one is updated more frequently, SCT or attr 194?
|
||||
+ * Ability to save this information to a file.
|
||||
+ * On info window show: Ask to turn SMART on if it's disabled
|
||||
|
||||
+Program error reporting:
|
||||
+ invalid smartmontools version.
|
||||
+ cannot parse output - show log.
|
||||
+ smartctl exited with error - look it up in error map.
|
||||
|
||||
|
||||
SCT Temperatures (do we use these?)
|
||||
-l scttemp prints temperature and history.
|
||||
-t scttempint,N[,p] (N - count, p - preserve across reset or not).
|
||||
This configures temperature logging interval (1 min by default) and clears the history.
|
||||
|
||||
|
||||
Tests:
|
||||
Ability to detect a testing drive on boot, show its info with testing tab.
|
||||
|
||||
Run one-time Immediate Offline test (-t offline).
|
||||
Offline tests only update Attributes, and if errors are found they will
|
||||
appear in SMART error log. Self-test logs are unaffected.
|
||||
Abort (-X). Abort works with Offline only if there's
|
||||
"Abort Offline collection upon new command" capability.
|
||||
If the drive has "Suspend Offline collection upon new command" capability,
|
||||
immediate offline test may be tracked through --capabilities (not on mine!).
|
||||
If it's "Abort Offline collection upon new command", then the test
|
||||
will abort on --capabilities or --abort.
|
||||
|
||||
|
||||
Polling time
|
||||
The self-test routine recommended polling time shall be equal to the number of minutes that is the minimum
|
||||
recommended time before which the host should first poll for test completion status. Actual test time could
|
||||
be several times this value. Polling before this time could extend the self-test execution time or abort the test
|
||||
depending on the state of bit 2 of the off-line data capability bits.
|
||||
|
||||
Autosave
|
||||
This command enables and disables the optional attribute autosave feature of the device. This command
|
||||
may either allow the device, after some vendor specified event, to save the device updated attribute values
|
||||
to non-volatile memory; or this command may cause the autosave feature to be disabled. The state of the
|
||||
attribute autosave feature (either enabled or disabled) shall be preserved by the device across power cycles.
|
||||
A value of zero written by the host into the device’s Sector Count register before issuing this command shall
|
||||
cause this feature to be disabled. Disabling this feature does not preclude the device from saving SMART
|
||||
data to non-volatile memory during some other normal operation such as during a power-on or power-off
|
||||
sequence or during an error recovery sequence.
|
||||
A value of F1h written by the host into the device’s Sector Count register before issuing this command shall
|
||||
cause this feature to be enabled. Any other meaning of this value or any other non-zero value written by the
|
||||
host into this register before issuing this command may differ from device to device. The meaning of any
|
||||
non-zero value written to this register at this time shall be preserved by the device across power cycles.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*
|
||||
@@ -1,37 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://autoconf-archive.cryp.to/ac_cxx_exceptions.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AC_CXX_EXCEPTIONS
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# If the C++ compiler supports exceptions handling (try, throw and catch),
|
||||
# define HAVE_EXCEPTIONS.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2008-04-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2008 Todd Veldhuizen
|
||||
# Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved.
|
||||
|
||||
AC_DEFUN([AC_CXX_EXCEPTIONS],
|
||||
[AC_CACHE_CHECK(whether the compiler supports exceptions,
|
||||
ac_cv_cxx_exceptions,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[try { throw 1; } catch (int i) { return i; }]])],[ac_cv_cxx_exceptions=yes],[ac_cv_cxx_exceptions=no])
|
||||
AC_LANG_POP([])
|
||||
])
|
||||
if test "$ac_cv_cxx_exceptions" = yes; then
|
||||
AC_DEFINE(HAVE_EXCEPTIONS,,[define if the compiler supports exceptions])
|
||||
fi
|
||||
])
|
||||
@@ -1,37 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://autoconf-archive.cryp.to/ac_cxx_namespaces.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AC_CXX_NAMESPACES
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# If the compiler can prevent names clashes using namespaces, define
|
||||
# HAVE_NAMESPACES.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2008-04-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2008 Todd Veldhuizen
|
||||
# Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved.
|
||||
|
||||
AC_DEFUN([AC_CXX_NAMESPACES],
|
||||
[AC_CACHE_CHECK(whether the compiler implements namespaces,
|
||||
ac_cv_cxx_namespaces,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[namespace Outer { namespace Inner { int i = 0; }}]], [[using namespace Outer::Inner; return i;]])],[ac_cv_cxx_namespaces=yes],[ac_cv_cxx_namespaces=no])
|
||||
AC_LANG_POP([])
|
||||
])
|
||||
if test "$ac_cv_cxx_namespaces" = yes; then
|
||||
AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
|
||||
fi
|
||||
])
|
||||
@@ -1,50 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://autoconf-archive.cryp.to/ac_cxx_rtti.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AC_CXX_RTTI
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# If the compiler supports Run-Time Type Identification (typeinfo header
|
||||
# and typeid keyword), define HAVE_RTTI.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2008-04-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2008 Todd Veldhuizen
|
||||
# Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved.
|
||||
|
||||
AC_DEFUN([AC_CXX_RTTI],
|
||||
[AC_CACHE_CHECK(whether the compiler supports Run-Time Type Identification,
|
||||
ac_cv_cxx_rtti,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <typeinfo>
|
||||
class Base { public :
|
||||
Base () {}
|
||||
virtual int f () { return 0; }
|
||||
};
|
||||
class Derived : public Base { public :
|
||||
Derived () {}
|
||||
virtual int f () { return 1; }
|
||||
};
|
||||
]], [[Derived d;
|
||||
Base *ptr = &d;
|
||||
return typeid (*ptr) == typeid (Derived);
|
||||
]])],[ac_cv_cxx_rtti=yes],[ac_cv_cxx_rtti=no])
|
||||
AC_LANG_POP([])
|
||||
])
|
||||
if test "$ac_cv_cxx_rtti" = yes; then
|
||||
AC_DEFINE(HAVE_RTTI,,
|
||||
[define if the compiler supports Run-Time Type Identification])
|
||||
fi
|
||||
])
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
|
||||
|
||||
AC_DEFUN([AC_CXX_VAR_FUNC],
|
||||
[AC_CACHE_CHECK(whether $CXX recognizes __func__,
|
||||
ac_cv_cxx_var_func,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[const char* s = __func__;]])],[ac_cv_cxx_var_func=yes],[ac_cv_cxx_var_func=no])
|
||||
AC_LANG_POP([])
|
||||
])
|
||||
if test "$ac_cv_cxx_var_func" = yes; then
|
||||
AC_DEFINE(HAVE_CXX__FUNC,,[Define if the C++ complier supports __func__])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://autoconf-archive.cryp.to/ac_cxx_verbose_terminate_handler.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AC_CXX_VERBOSE_TERMINATE_HANDLER
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# If the compiler does have the verbose terminate handler, define
|
||||
# HAVE_VERBOSE_TERMINATE_HANDLER.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2008-04-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2008 Lapo Luchini <lapo@lapo.it>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved.
|
||||
|
||||
AC_DEFUN([AC_CXX_VERBOSE_TERMINATE_HANDLER],
|
||||
[AC_CACHE_CHECK(whether the compiler has __gnu_cxx::__verbose_terminate_handler,
|
||||
ac_cv_verbose_terminate_handler,
|
||||
[
|
||||
AC_REQUIRE([AC_CXX_EXCEPTIONS])
|
||||
AC_REQUIRE([AC_CXX_NAMESPACES])
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <exception>]], [[std::set_terminate(__gnu_cxx::__verbose_terminate_handler);]])],[ac_cv_verbose_terminate_handler=yes],[ac_cv_verbose_terminate_handler=no
|
||||
])
|
||||
AC_LANG_POP([])
|
||||
])
|
||||
if test "$ac_cv_verbose_terminate_handler" = yes; then
|
||||
AC_DEFINE(HAVE_VERBOSE_TERMINATE_HANDLER, , [define if the compiler has __gnu_cxx::__verbose_terminate_handler])
|
||||
fi
|
||||
])
|
||||
@@ -1,65 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://autoconf-archive.cryp.to/ax_compiler_vendor.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_COMPILER_VENDOR
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
|
||||
# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
|
||||
# watcom, etc. The vendor is returned in the cache variable
|
||||
# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2008-04-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||
# Copyright (c) 2008 Matteo Frigo
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Macro Archive. When you make and
|
||||
# distribute a modified version of the Autoconf Macro, you may extend this
|
||||
# special exception to the GPL to apply to your modified version as well.
|
||||
|
||||
AC_DEFUN([AX_COMPILER_VENDOR],
|
||||
[
|
||||
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
|
||||
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
|
||||
# note: don't check for gcc first since some other compilers define __GNUC__
|
||||
for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
|
||||
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
|
||||
#if !($vencpp)
|
||||
thisisanerror;
|
||||
#endif
|
||||
])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
|
||||
done
|
||||
])
|
||||
])
|
||||
@@ -1,56 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://autoconf-archive.cryp.to/ax_cxx_gcc_abi_demangle.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_GCC_ABI_DEMANGLE
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# If the compiler supports GCC C++ ABI name demangling (has header
|
||||
# cxxabi.h and abi::__cxa_demangle() function), define
|
||||
# HAVE_GCC_ABI_DEMANGLE
|
||||
#
|
||||
# Adapted from AC_CXX_RTTI by Luc Maisonobe
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2008-04-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2008 Neil Ferguson <nferguso@eso.org>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved.
|
||||
|
||||
AC_DEFUN([AX_CXX_GCC_ABI_DEMANGLE],
|
||||
[AC_CACHE_CHECK(whether the compiler supports GCC C++ ABI name demangling,
|
||||
ac_cv_cxx_gcc_abi_demangle,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <typeinfo>
|
||||
#include <cxxabi.h>
|
||||
#include <string>
|
||||
|
||||
template<typename TYPE>
|
||||
class A {};
|
||||
]], [[A<int> instance;
|
||||
int status = 0;
|
||||
char* c_name = 0;
|
||||
|
||||
c_name = abi::__cxa_demangle(typeid(instance).name(), 0, 0, &status);
|
||||
|
||||
std::string name(c_name);
|
||||
free(c_name);
|
||||
|
||||
return name == "A<int>";
|
||||
]])],[ac_cv_cxx_gcc_abi_demangle=yes],[ac_cv_cxx_gcc_abi_demangle=no])
|
||||
AC_LANG_POP([])
|
||||
])
|
||||
if test "$ac_cv_cxx_gcc_abi_demangle" = yes; then
|
||||
AC_DEFINE(HAVE_GCC_ABI_DEMANGLE,1,
|
||||
[define if the compiler supports GCC C++ ABI name demangling])
|
||||
fi
|
||||
])
|
||||
@@ -1,27 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
#echo "Adding libtools..."
|
||||
#libtoolize --automake --copy
|
||||
|
||||
# echo "Running aclocal (builds aclocal.m4)..."
|
||||
# aclocal -I ./autoconf_m4
|
||||
|
||||
# echo "Running autoheader (generates config.h.in)..."
|
||||
# autoheader
|
||||
|
||||
# echo "Running automake..."
|
||||
# automake --add-missing --copy --foreign
|
||||
|
||||
# echo "Running autoconf..."
|
||||
# autoconf
|
||||
|
||||
|
||||
autoreconf --verbose --install -W all
|
||||
|
||||
|
||||
rm -f config.cache
|
||||
|
||||
echo
|
||||
echo 'run "./configure ; make ; make install"'
|
||||
echo
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
stamp="../gsmartcontrol-`date +%F`"
|
||||
echo $stamp
|
||||
|
||||
mkdir $stamp
|
||||
cp -dp * $stamp/
|
||||
|
||||
rm -f $stamp/*pcs # kdevelop persistent store files
|
||||
|
||||
cp -a autoconf.m4/ $stamp/
|
||||
cp -a data/ $stamp/
|
||||
cp -a src/ $stamp/
|
||||
cp -a templates/ $stamp/
|
||||
# cp -a test-data/ $stamp/
|
||||
|
||||
tar cvf $stamp.tar $stamp
|
||||
bzip2 -9 $stamp.tar
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INSTALL = @INSTALL@
|
||||
host_triplet = @host@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
install_sh = @install_sh@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
target_alias = @target_alias@
|
||||
@@ -0,0 +1,160 @@
|
||||
#!/bin/bash
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2012 - 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
# Configure a build directory for development
|
||||
|
||||
|
||||
function print_usage() {
|
||||
echo -e "Usage:"
|
||||
echo -e " ${0} [-t <toolchain_name>] [-c <compiler>] [-b <build_type>]"
|
||||
echo -e " [-s <source_dir>] [-g <generator>] [-o <cmake_options>]"
|
||||
echo -e "\nDetails:"
|
||||
echo -e "-t <toolchain_name> - toolchain_name can be e.g. \"win32-mingw64\"."
|
||||
echo -e " A toolchain file \"toolchains/<toolchain_name>.cmake\" will be used."
|
||||
echo -e "-c <compiler> - compiler is one of:"
|
||||
echo -e " gcc, gcc-<version>, clang, intel."
|
||||
echo -e " The gcc version is the suffix of gcc and g++ executables, e.g. \"4.8\" in"
|
||||
echo -e " \"gcc-4.8\"."
|
||||
echo -e " If unspecified, CC and CXX environment variables are used."
|
||||
echo -e "-b <build_type> - build_type is one of:"
|
||||
echo -e " Debug, Release, RelWithDebInfo, MinSizeRel, none. The default is Debug."
|
||||
echo -e "-s <source_dir> - source_dir is \"..\" by default."
|
||||
echo -e "-g <cmake_generator> - cmake uses \"Unix Makefiles\" by default."
|
||||
echo -e "-o <cmake_options> - options to pass directly to cmake."
|
||||
}
|
||||
|
||||
compiler=""
|
||||
build_type="";
|
||||
source_dir=".."
|
||||
toolchain_name=""
|
||||
generator=""
|
||||
cmake_options=""
|
||||
|
||||
while getopts "t:c:b:s:g:o:h:" opt; do
|
||||
case $opt in
|
||||
t)
|
||||
echo "Requested toolchain: $OPTARG"
|
||||
toolchain_name="$OPTARG";
|
||||
;;
|
||||
c)
|
||||
echo "Requested compiler: $OPTARG"
|
||||
compiler="$OPTARG";
|
||||
;;
|
||||
b)
|
||||
echo "Requested build type: $OPTARG"
|
||||
build_type="$OPTARG";
|
||||
;;
|
||||
s)
|
||||
echo "Requested source directory type: $OPTARG"
|
||||
source_dir="$OPTARG";
|
||||
;;
|
||||
g)
|
||||
echo "Requested generator: $OPTARG"
|
||||
generator="$OPTARG";
|
||||
;;
|
||||
o)
|
||||
echo "Requested cmake options: $OPTARG"
|
||||
cmake_options="$OPTARG";
|
||||
;;
|
||||
h)
|
||||
print_usage;
|
||||
exit 1;
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: $opt";
|
||||
print_usage;
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
if [ "$compiler" != "" ] && [ "$toolchain_name" != "" ]; then
|
||||
echo "Error: Conflicting options -c and -t specified."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
cmake_flags="-Wdev";
|
||||
|
||||
if [ "$build_type" = "none" ]; then
|
||||
build_type="";
|
||||
fi
|
||||
if [ "$build_type" != "" ]; then
|
||||
cmake_flags="$cmake_flags -DCMAKE_BUILD_TYPE=$build_type";
|
||||
fi
|
||||
|
||||
if [ "$generator" != "" ]; then
|
||||
cmake_flags="$cmake_flags -G${generator}";
|
||||
fi
|
||||
|
||||
|
||||
status=1
|
||||
|
||||
|
||||
# Toolchain mode
|
||||
if [ "$toolchain_name" != "" ]; then
|
||||
cmake_flags="$cmake_flags -DCMAKE_TOOLCHAIN_FILE='${source_dir}/data/cmake/toolchains/${toolchain_name}.cmake'"
|
||||
|
||||
echo "Running:"
|
||||
echo "cmake $cmake_flags $source_dir";
|
||||
|
||||
cmake $cmake_flags $cmake_options $source_dir
|
||||
status=$?
|
||||
|
||||
else # Compiler mode
|
||||
c_compiler="";
|
||||
cxx_compiler="";
|
||||
|
||||
# Detect gcc suffix like "-4.7"
|
||||
if [ "${compiler:0:4}" = "gcc-" ]; then
|
||||
suffix=${compiler:4};
|
||||
c_compiler="gcc-${suffix}";
|
||||
cxx_compiler="g++-${suffix}";
|
||||
compiler="gcc";
|
||||
fi
|
||||
|
||||
case $compiler in
|
||||
gcc)
|
||||
if [ "$c_compiler" = "" ]; then
|
||||
c_compiler="gcc${machine_bits_switch}";
|
||||
cxx_compiler="g++${machine_bits_switch}";
|
||||
fi
|
||||
;;
|
||||
intel)
|
||||
if [ $machine_bits_precise = "64" ]; then
|
||||
c_compiler="icc64";
|
||||
cxx_compiler="icpc64";
|
||||
else
|
||||
c_compiler="icc32";
|
||||
cxx_compiler="icpc32";
|
||||
fi
|
||||
;;
|
||||
clang)
|
||||
c_compiler="clang${machine_bits_switch}";
|
||||
cxx_compiler="clang++${machine_bits_switch}";
|
||||
;;
|
||||
"")
|
||||
c_compiler="$CC"
|
||||
cxx_compiler="$CXX"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported compiler given; use CC and CXX instead."
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Running:"
|
||||
echo "CC=\"$c_compiler\" CXX=\"$cxx_compiler\" cmake $cmake_flags $source_dir";
|
||||
|
||||
CC="$c_compiler" CXX="$cxx_compiler" cmake $cmake_flags $cmake_options $source_dir
|
||||
status=$?
|
||||
fi
|
||||
|
||||
|
||||
exit $status
|
||||
|
||||
@@ -1,584 +0,0 @@
|
||||
|
||||
AC_INIT([GSmartControl], [0.8.0rc2], [], [gsmartcontrol])
|
||||
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
# disable portability warnings because of pattern rules in src/res.
|
||||
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 -Wall,no-portability])
|
||||
|
||||
# C compiler, C preprocessor
|
||||
AC_PROG_CC
|
||||
#AM_PROG_CC_STDC
|
||||
#AC_PROG_CPP
|
||||
|
||||
# C++ compiler
|
||||
AC_PROG_CXX
|
||||
#AC_PROG_CXXCPP
|
||||
|
||||
#AM_PROG_LIBTOOL
|
||||
|
||||
# C++ support in checks
|
||||
#AC_LANG([C])
|
||||
AC_LANG([C++])
|
||||
|
||||
# to be able to generate static libs
|
||||
AC_CHECK_TOOL(RANLIB, ranlib)
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Various compiler features
|
||||
|
||||
# detect compiler vendor (sets $ax_cv_cxx_compiler_vendor)
|
||||
AX_COMPILER_VENDOR
|
||||
|
||||
# detect RTTI (defines HAVE_RTTI)
|
||||
AC_CXX_RTTI
|
||||
|
||||
# detect exception support (defines HAVE_EXCEPTIONS)
|
||||
AC_CXX_EXCEPTIONS
|
||||
|
||||
# detect abi::__cxa_demangle (defines HAVE_GCC_ABI_DEMANGLE)
|
||||
AX_CXX_GCC_ABI_DEMANGLE
|
||||
|
||||
# detect __gnu_cxx::__verbose_terminate_handler (defines HAVE_VERBOSE_TERMINATE_HANDLER.)
|
||||
AC_CXX_VERBOSE_TERMINATE_HANDLER
|
||||
|
||||
# detect __func__ support (defines HAVE_CXX__FUNC)
|
||||
AC_CXX_VAR_FUNC
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Portability stuff
|
||||
|
||||
# arrange large file support (define _FILE_OFFSET_BITS 64, etc...)
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
# define int8_t and friends if the standard doesn't have them
|
||||
AC_TYPE_INT8_T
|
||||
AC_TYPE_UINT8_T
|
||||
AC_TYPE_INT16_T
|
||||
AC_TYPE_UINT16_T
|
||||
AC_TYPE_INT32_T
|
||||
AC_TYPE_UINT32_T
|
||||
AC_TYPE_INT64_T
|
||||
AC_TYPE_UINT64_T
|
||||
AC_TYPE_INTMAX_T
|
||||
AC_TYPE_UINTMAX_T
|
||||
|
||||
AC_TYPE_LONG_LONG_INT
|
||||
AC_TYPE_UNSIGNED_LONG_LONG_INT
|
||||
|
||||
# This may be needed for pch support
|
||||
AC_CHECK_HEADERS([stdc++.h])
|
||||
|
||||
# pcrecpp needs this (break on first function found)
|
||||
AC_CHECK_FUNCS([strtoll _strtoi64], [break])
|
||||
|
||||
# Non-C99 systems don't have strtof and strtold. some have strtodf for strtof,
|
||||
# but let's ignore it. Note: They may be supported by system libc,
|
||||
# but unsupported by headers (e.g. sun studio on linux). In that case,
|
||||
# defining them still leads to undefined symbols at link time, so we don't do it.
|
||||
# header / link check:
|
||||
AC_CHECK_DECLS([strtof, strtold], [], [], [[#include <stdlib.h>]])
|
||||
# link check only:
|
||||
# AC_CHECK_FUNCS([strtof strtold])
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# "build" - the type of system on which the package is being configured and compiled.
|
||||
ac_windows_build="no"
|
||||
ac_linux_build="no"
|
||||
case "${host}" in
|
||||
*mingw*)
|
||||
ac_windows_build="yes"
|
||||
;;
|
||||
*linux*)
|
||||
ac_linux_build="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
# export to Makefile.am-s
|
||||
AM_CONDITIONAL([WINDOWS_BUILD], [test "$ac_windows_build" = "yes"])
|
||||
AM_CONDITIONAL([LINUX_BUILD], [test "$ac_linux_build" = "yes"])
|
||||
|
||||
|
||||
# "host" - the type of system on which the package runs. Specifying it enables the
|
||||
# cross-compilation mode. "target" defaults to this too.
|
||||
ac_windows_target="no"
|
||||
ac_linux_target="no"
|
||||
case "${target}" in
|
||||
*mingw*)
|
||||
ac_windows_target="yes"
|
||||
;;
|
||||
*linux*)
|
||||
ac_linux_target="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
# export to Makefile.am-s
|
||||
AM_CONDITIONAL([WINDOWS_TARGET], [test "$ac_windows_target" = "yes"])
|
||||
AM_CONDITIONAL([LINUX_TARGET], [test "$ac_linux_target" = "yes"])
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
COMPILER_CXXFLAGS=""
|
||||
COMPILER_LDFLAGS=""
|
||||
# reset original user-supplied *FLAGS
|
||||
RESET_ORIGINAL="no"
|
||||
|
||||
|
||||
AC_ARG_ENABLE(default-gcc-options,
|
||||
AS_HELP_STRING([--enable-default-gcc-options],[enable default compilation options (warnings, mostly) (GCC only) (default: disabled)]),
|
||||
[default_gcc_options=${enableval}], [default_gcc_options=no])
|
||||
|
||||
if test "$default_gcc_options" = "yes"; then
|
||||
if test "$ac_windows_target" = "yes"; then
|
||||
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -mms-bitfields -mwindows"
|
||||
COMPILER_LDFLAGS="$COMPILER_CXXFLAGS -mms-bitfields"
|
||||
fi
|
||||
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS \
|
||||
-Wall -Wcast-align -Wcast-qual -Wconversion \
|
||||
-Wctor-dtor-privacy -Wfloat-equal -Wnon-virtual-dtor -Woverloaded-virtual \
|
||||
-Wpointer-arith -Wshadow -Wsign-compare -Wsign-promo -Wundef -Wwrite-strings"
|
||||
RESET_ORIGINAL="yes";
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE(gcc-debug,
|
||||
AS_HELP_STRING([--enable-gcc-debug],[enable debug build (GCC only) (default: disabled)]),
|
||||
[gcc_debug=${enableval}], [gcc_debug=no])
|
||||
|
||||
if test "$gcc_debug" = "yes"; then
|
||||
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -g3 -O0 -DDEBUG -DDEBUG_BUILD"
|
||||
COMPILER_LDFLAGS="$COMPILER_LDFLAGS -g3 -O0"
|
||||
RESET_ORIGINAL="yes";
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE(gcc-optimize,
|
||||
AS_HELP_STRING([--enable-gcc-optimize],[enable optimized build (GCC only) (default: disabled)]),
|
||||
[gcc_optimize=${enableval}], [gcc_optimize=no])
|
||||
|
||||
if test "$gcc_optimize" = "yes"; then
|
||||
# Note: Do NOT put CPU flags here - they make the program non-portable.
|
||||
if test "$ac_windows_target" = "yes"; then
|
||||
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -g0 -O3 -s"
|
||||
COMPILER_LDFLAGS="$COMPILER_LDFLAGS -s"
|
||||
else
|
||||
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -g0 -O3 -s -mtune=generic"
|
||||
COMPILER_LDFLAGS="$COMPILER_LDFLAGS -s -mtune=generic"
|
||||
fi
|
||||
RESET_ORIGINAL="yes";
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE(gcc_pch,
|
||||
AS_HELP_STRING([--enable-gcc-pch],[enable precompiled header support (pch make target) (GCC only) (default: disabled)
|
||||
(use "make gch" to speed up the compilation)]),
|
||||
[gcc_pch=${enableval}], [gcc_pch=no])
|
||||
|
||||
if test "$gcc_pch" = "yes"; then
|
||||
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -Winvalid-pch -DENABLE_PCH"
|
||||
fi
|
||||
|
||||
|
||||
# define LINUX for linux target
|
||||
if test "$ac_linux_target" = "yes"; then
|
||||
COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -DLINUX"
|
||||
fi
|
||||
|
||||
|
||||
# Reset user-supplied flags if one of the above options is present.
|
||||
# We append COMPILER_* counterparts in the end, to override any
|
||||
# previous options.
|
||||
if test "$RESET_ORIGINAL" = "yes"; then
|
||||
CFLAGS=""
|
||||
CXXFLAGS=""
|
||||
LIBS=""
|
||||
LDFLAGS=""
|
||||
fi
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Enable compiler thread switches for known platforms.
|
||||
|
||||
AC_MSG_NOTICE([checking thread support flags...])
|
||||
|
||||
THREAD_CFLAGS=""
|
||||
THREAD_LIBS=""
|
||||
THREAD_FOUND="no"
|
||||
|
||||
if test "$ac_windows_target" = "yes"; then
|
||||
if test "$ax_cv_cxx_compiler_vendor" = "gnu"; then
|
||||
THREAD_CFLAGS="-mthreads -D_THREAD_SAFE"
|
||||
THREAD_LIBS="-mthreads"
|
||||
THREAD_FOUND="yes"
|
||||
fi
|
||||
|
||||
elif test "$ac_linux_target" = "yes"; then
|
||||
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "intel"; then
|
||||
THREAD_CFLAGS="-pthread -D_MT -D_THREAD_SAFE"
|
||||
THREAD_LIBS="-pthread"
|
||||
THREAD_FOUND="yes"
|
||||
elif test "$ax_cv_cxx_compiler_vendor" = "sun"; then
|
||||
THREAD_CFLAGS="-mt"
|
||||
THREAD_LIBS="-mt"
|
||||
THREAD_FOUND="yes"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$THREAD_FOUND" = "no"; then
|
||||
AC_MSG_NOTICE([Cannot detect compiler thread support. Set CXXFLAGS and LDFLAGS manually.])
|
||||
|
||||
else
|
||||
AC_MSG_NOTICE([CFLAGS: $THREAD_CFLAGS; LIBS: $THREAD_LIBS])
|
||||
CXXFLAGS="$CXXFLAGS $THREAD_CFLAGS"
|
||||
LIBS="$LIBS $THREAD_LIBS"
|
||||
fi
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# iconview is available since 2.6.0. gthread is not enabled by default.
|
||||
pkg_modules="gtkmm-2.4 >= 2.6.0 gthread-2.0 >= 2.0"
|
||||
|
||||
# define ENABLE_GLIB and friends if it's found.
|
||||
gtkmm_found="no"
|
||||
|
||||
PKG_CHECK_MODULES([GTKMM], [$pkg_modules], [
|
||||
AC_DEFINE([ENABLE_GLIB], [], [Whether GLib is installed])
|
||||
AC_DEFINE([ENABLE_GLIBMM], [], [Whether GLibmm is installed])
|
||||
gtkmm_found="yes"
|
||||
], [
|
||||
AC_MSG_WARN([$GTKMM_PKG_ERRORS])
|
||||
AC_MSG_WARN([The program will be unable to compile fully.])
|
||||
])
|
||||
|
||||
# use this instead of the above one to enable abort-on-not-found behaviour.
|
||||
# PKG_CHECK_MODULES([GTKMM], [$pkg_modules])
|
||||
|
||||
# GTK flags must be prepended, or glib_config.h conflict between
|
||||
# gtk 2.x and 1.2 may occur.
|
||||
|
||||
#CFLAGS="$GTKMM_CFLAGS $CFLAGS"
|
||||
CXXFLAGS="$GTKMM_CFLAGS $CXXFLAGS"
|
||||
LIBS="$GTKMM_LIBS $LIBS"
|
||||
|
||||
# needed for in-code checks (AC_DEFINE() takes care of these above, no need of them here)
|
||||
# CXXFLAGS="$CXXFLAGS -DENABLE_GLIB -DENABLE_GLIBMM"
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
gld_found=no; # equals to "gtkbuilder" or "libglademm" after tests
|
||||
|
||||
#if test "gtkmm_found" = "yes"; then
|
||||
|
||||
# Check whether we should use Gtk::Builder (gtkmm >= 2.12) or libglademm.
|
||||
AC_ARG_ENABLE(libglademm, AS_HELP_STRING([--enable-libglademm],
|
||||
[use libglademm instead of GtkBuilder (default: auto)]), [with_libglademm=${enableval}], [with_libglademm=auto])
|
||||
|
||||
|
||||
# try gtkbuilder first
|
||||
if test "$with_libglademm" = "no" || test "$with_libglademm" = "auto"; then
|
||||
PKG_CHECK_EXISTS([gtkmm-2.4 >= 2.12.0], [gld_found=gtkbuilder])
|
||||
fi
|
||||
if test "$with_libglademm" = "no" && test "$gld_found" = "no"; then
|
||||
AC_MSG_ERROR([GtkBuilder support not found (you need gtkmm version 2.12 or higher). Try using libglademm instead.])
|
||||
fi
|
||||
|
||||
# libglade specified, or auto and no gtkbuilder. gtkmm2.4-compatible libglade is >= 2.4.0.
|
||||
if test "$gld_found" = "no"; then
|
||||
PKG_CHECK_MODULES([LIBGLADEMM], [libglademm-2.4 >= 2.4.0], [gld_found="libglademm"],
|
||||
[AC_MSG_WARN([$LIBGLADEMM_PKG_ERRORS])])
|
||||
fi
|
||||
if test "$with_libglademm" = "yes" && test "$gld_found" = "no"; then
|
||||
AC_MSG_ERROR([Libglademm not found. Try building with GtkBuilder support (you need gtkmm version 2.12 or higher).])
|
||||
fi
|
||||
|
||||
# still not found.
|
||||
if test "$gld_found" = "no"; then
|
||||
AC_MSG_WARN([Neither GtkBuilder nor libglademm found. The program will be unable to compile fully.])
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_NOTICE([Glade file support through: $gld_found])
|
||||
|
||||
# merge libglademm flags
|
||||
if test "$gld_found" = "libglademm"; then
|
||||
CXXFLAGS="$LIBGLADEMM_CFLAGS $CXXFLAGS"
|
||||
LIBS="$LIBGLADEMM_LIBS $LIBS"
|
||||
fi
|
||||
|
||||
#fi
|
||||
|
||||
|
||||
# export to automake.am-s
|
||||
AM_CONDITIONAL([ENABLE_LIBGLADEMM], [test "$gld_found" = "libglademm"])
|
||||
AM_CONDITIONAL([ENABLE_GTKBUILDER], [test "$gld_found" = "gtkbuilder"])
|
||||
|
||||
# export to config.h
|
||||
if test "$gld_found" = "libglademm"; then
|
||||
AC_DEFINE(ENABLE_LIBGLADEMM, 1, [Use libglademm instead of GtkBuilder])
|
||||
fi
|
||||
if test "$gld_found" = "gtkbuilder"; then
|
||||
AC_DEFINE(ENABLE_GTKBUILDER, 1, [Use GtkBuilder instead of libglademm])
|
||||
fi
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
pkg_modules="libpcre"
|
||||
|
||||
PKG_CHECK_MODULES(PCRE, [$pkg_modules])
|
||||
|
||||
#CFLAGS="$PCRE_CFLAGS $CFLAGS"
|
||||
CXXFLAGS="$PCRE_CFLAGS $CXXFLAGS"
|
||||
LIBS="$PCRE_LIBS $LIBS"
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# enable / disable compilation of tests
|
||||
AC_ARG_ENABLE([tests], AS_HELP_STRING([--enable-tests],
|
||||
[enable compilation of test programs (default: no)]), [with_tests=${enableval}], [with_tests=no])
|
||||
# export to automake.am-s
|
||||
AM_CONDITIONAL([ENABLE_TESTS], [test "$with_tests" = "yes"])
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
RES_FILES="src/res/gsc_about_dialog.glade \
|
||||
src/res/gsc_executor_log_window.glade \
|
||||
src/res/gsc_help_window.glade \
|
||||
src/res/gsc_info_window.glade \
|
||||
src/res/gsc_main_window.glade \
|
||||
src/res/gsc_preferences_window.glade \
|
||||
src/res/gsc_text_window.glade \
|
||||
AUTHORS.txt LICENSE_gsmartcontrol.txt README.txt"
|
||||
|
||||
# Unfortunately, _SOURCES can't contain substitutions, so we use LIBADD.
|
||||
RES_LIBADD="" # .o file to put into .a, libres_a_LIBADD, libres_a_DEPENDENCIES.
|
||||
RES_DIST="" # only files in "res" directory, EXTRA_DIST
|
||||
RES_TARGETS="" # entry for each file in makefile
|
||||
|
||||
RES_GLD_EXT="glade"
|
||||
if test "$gld_found" = "gtkbuilder"; then
|
||||
RES_GLD_EXT="ui"
|
||||
fi
|
||||
|
||||
for RES_FILE in $RES_FILES;
|
||||
do # on separate line for portability
|
||||
RES_BASE=`echo "$RES_FILE" | sed 's/.*\///'` # "a/b/c" -> "c", "c" -> "c"
|
||||
RES_DIR=`AS_DIRNAME(["$RES_FILE"])` # "a/b/c" -> "a/b"
|
||||
RES_BASE_NOEXT=`expr "$RES_BASE" : '\(.*\)\..*'` # "a.b.c" -> "a.b"
|
||||
RES_BASE_EXT=`expr "$RES_BASE" : '.*\.\(.*\)'` # "a.b.c" -> "c"
|
||||
|
||||
# Add to EXTRA_DIST only if it's in the same directory. Other files should
|
||||
# be added in their own directories.
|
||||
RES_FILE_CANON="\$(top_srcdir)/$RES_FILE"
|
||||
if test "$RES_DIR" = "src/res"; then
|
||||
RES_DIST="$RES_DIST $RES_BASE"
|
||||
RES_FILE_CANON="\$(srcdir)/$RES_BASE" # shorter path, better make behaviour
|
||||
fi
|
||||
|
||||
# We use separate source files for gtkbuilder and libglademm, because
|
||||
# make dist should be able to bundle both of them separately.
|
||||
|
||||
if test "$RES_BASE_EXT" = "glade"; then
|
||||
|
||||
RES_LIBADD="$RES_LIBADD $RES_BASE_NOEXT.$RES_GLD_EXT.$ac_objext" # file.ui.o or file.glade.o
|
||||
|
||||
# Output both glade and ui rules. This way make dist will be able
|
||||
# to build cpp files of both of them.
|
||||
|
||||
RES_TARGETS="$RES_TARGETS
|
||||
$RES_BASE_NOEXT.ui.cpp: $RES_FILE_CANON
|
||||
gtk-builder-convert \"$RES_FILE_CANON\" \"$RES_BASE_NOEXT\".tmp_ui
|
||||
\"\$(top_srcdir)/file2csource.sh\" \"$RES_BASE_NOEXT\".tmp_ui \"$RES_BASE_NOEXT.ui.cpp\" \"$RES_BASE_NOEXT\"_ui
|
||||
"
|
||||
RES_TARGETS="$RES_TARGETS
|
||||
$RES_BASE_NOEXT.glade.cpp: $RES_FILE_CANON
|
||||
\"\$(top_srcdir)/file2csource.sh\" \"$RES_FILE_CANON\" \"$RES_BASE_NOEXT.glade.cpp\" \"$RES_BASE_NOEXT\"_ui
|
||||
"
|
||||
|
||||
else # txt, etc...
|
||||
|
||||
SRC_FILE="$RES_BASE.cpp"
|
||||
RES_LIBADD="$RES_LIBADD $RES_BASE.$ac_objext" # file.txt.o
|
||||
|
||||
RES_TARGETS="$RES_TARGETS
|
||||
$SRC_FILE: $RES_FILE_CANON
|
||||
\"\$(top_srcdir)/file2csource.sh\" \"$RES_FILE_CANON\" \"$SRC_FILE\" \"$RES_BASE_NOEXT\"_$RES_BASE_EXT
|
||||
"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
# export to makefile.am
|
||||
AC_SUBST(RES_LIBADD)
|
||||
AC_SUBST(RES_DIST)
|
||||
AC_SUBST(RES_TARGETS)
|
||||
|
||||
# Don't put this one into Makefile.in by default - it's multiline and causes havoc.
|
||||
_AM_SUBST_NOTMAKE([RES_TARGETS])
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Export some configure variables as defines for the source code
|
||||
|
||||
ADDITIONAL_FLAGS="-DPACKAGE_PKGDATA_DIR=\"\\\"\$(pkgdatadir)\\\"\" \
|
||||
-DPACKAGE_SYSCONF_DIR=\"\\\"\$(sysconfdir)\\\"\" \
|
||||
-DTOP_SRC_DIR=\"\\\"\$(top_srcdir)\\\"\""
|
||||
|
||||
#CFLAGS="$CFLAGS $ADDITIONAL_FLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $ADDITIONAL_FLAGS"
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Top src dir should always be in include path, before other includes.
|
||||
# Add global configuration file. Note: It must be searched in top_builddir
|
||||
# first (that's why -I is the first flag), for precompiled headers to work.
|
||||
|
||||
# Add pcrecpp too, because its files use #<file> on each other.
|
||||
ADDITIONAL_INCLUDES="-I\$(top_builddir) -I\$(top_srcdir)/src -I\$(top_srcdir)/src/pcrecpp"
|
||||
|
||||
# -include doesn't work with sun and pgi, but works with intel and gcc.
|
||||
# we don't whitelist intel/gcc, because there are some gcc-frontend-based
|
||||
# compilers we don't want to break (pathscale, gccfss (gcc frontend / sun backend), etc...).
|
||||
if test "$ax_cv_cxx_compiler_vendor" != "sun" && test "$ax_cv_cxx_compiler_vendor" != "portland"; then
|
||||
ADDITIONAL_INCLUDES="$ADDITIONAL_INCLUDES -include global_macros.h"
|
||||
fi
|
||||
|
||||
#CFLAGS="$ADDITIONAL_INCLUDES $CFLAGS"
|
||||
# our flags must be before all the others
|
||||
CXXFLAGS="$ADDITIONAL_INCLUDES $CXXFLAGS"
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Append compiler flags to CXXFLAGS, so that they override
|
||||
# whatever the user has set.
|
||||
CXXFLAGS="$CXXFLAGS $COMPILER_CXXFLAGS"
|
||||
LIBS="$LIBS $COMPILER_LDFLAGS"
|
||||
|
||||
# This macro should be defined by ./configure automatically.
|
||||
# However, sometimes it's not (e.g. win32, why?), so we define it manually.
|
||||
CXXFLAGS="$CXXFLAGS -DHAVE_CONFIG_H"
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# final setup
|
||||
|
||||
#CFLAGS="$CFLAGS $USER_INCLUDES"
|
||||
#CXXFLAGS="$CXXFLAGS $USER_INCLUDES"
|
||||
#LIBS="$LIBS $USER_LDFLAGS"
|
||||
|
||||
|
||||
# make them available in Makefile.am
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CXXFLAGS)
|
||||
AC_SUBST(LIBS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# all_includes="$all_includes $ALL_CXXFLAGS"
|
||||
# all_libraries="$all_libraries $ALL_LIBS"
|
||||
#all_includes="$all_includes $USER_INCLUDES"
|
||||
#all_libraries="$all_libraries $LIBS"
|
||||
|
||||
|
||||
# substitude them in makefile.am-s
|
||||
|
||||
#AC_SUBST(all_includes)
|
||||
#AC_SUBST(all_libraries)
|
||||
|
||||
|
||||
|
||||
# print'em out for debug purposes
|
||||
|
||||
AC_MSG_NOTICE([
|
||||
CXXFLAGS:
|
||||
$CXXFLAGS
|
||||
LIBS:
|
||||
$LIBS
|
||||
])
|
||||
|
||||
|
||||
# substitude autotools' predefined dir names in makefile.am-s
|
||||
|
||||
AC_SUBST(AUTODIRS)
|
||||
|
||||
|
||||
# ----------------------------------------------------
|
||||
|
||||
AC_CONFIG_FILES([ data/gsmartcontrol_gnome.desktop data/gsmartcontrol_kde.desktop \
|
||||
data/gsmartcontrol_other.desktop \
|
||||
gsmartcontrol.spec version compilation_flags ])
|
||||
|
||||
|
||||
# these are all the makefiles to generate
|
||||
|
||||
AC_CONFIG_FILES([Makefile src/Makefile src/applib/Makefile src/res/Makefile src/hz/Makefile \
|
||||
src/libdebug/Makefile src/pcrecpp/Makefile src/rconfig/Makefile src/rmn/Makefile \
|
||||
data/Makefile data/16/Makefile data/22/Makefile data/24/Makefile data/32/Makefile \
|
||||
data/48/Makefile data/64/Makefile data/128/Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
if (NOT WIN32)
|
||||
install(DIRECTORY "${CMAKE_SOURCE_DIR}/contrib" TYPE DOC
|
||||
PATTERN "CMakeLists.txt" EXCLUDE)
|
||||
endif()
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
This directory contains scripts and an example crontab to allow GSmartControl
|
||||
to read smartctl data from cron-generated files. This allows users to read
|
||||
somewhat recent smartctl information without having to run GSmartControl as
|
||||
root.
|
||||
|
||||
Put the scripts into /usr/local/bin, run GSmartControl and set smartctl path
|
||||
to "/usr/local/bin/smartctl_subst.sh" (without quotes). An example crontab
|
||||
runs cron_gather_smart.sh script every 10 minutes, storing its output to
|
||||
"/var/run/smart-$devname". The smartctl_subst.sh script prints the contents of
|
||||
this file instead of running smartctl, thus eliminating the need to run
|
||||
GSmartControl as root when reading SMART values.
|
||||
|
||||
Note: These scripts provide read-only capabilities only, they don't allow
|
||||
changing SMART settings or running self-tests.
|
||||
|
||||
Contributed by Alex Butcher <alex dot butcher 'at' assursys.co.uk>.
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2008 - 2024 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
|
||||
# (C) 2008 - 2024 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
device="$1";
|
||||
|
||||
if [ "$device" = "" ]; then
|
||||
echo "Usage: $0 <device>"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
dev_base=$(basename "$device")
|
||||
out_file=/var/run/smart-"$dev_base"
|
||||
|
||||
# Change the path to smartctl if necessary.
|
||||
smartctl -x --json=o "$device" > "$out_file" 2>&1
|
||||
|
||||
chmod 644 "$out_file"
|
||||
@@ -0,0 +1,9 @@
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2008 - 2021 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
|
||||
# (C) 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
*/10 * * * * root /usr/local/bin/cron-smart.sh /dev/sda
|
||||
*/10 * * * * root /usr/local/bin/cron-smart.sh /dev/sdb
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2008 - 2022 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
|
||||
# (C) 2008 - 2022 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
if [ "$1" = "-V" ]; then
|
||||
smartctl -V 2>&1
|
||||
exit
|
||||
fi
|
||||
|
||||
while [ $# -ge 1 ]; do
|
||||
device="$1"
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "$device" = "" ]; then
|
||||
echo "Usage: $0 <device>"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
dev_base=$(basename "$device")
|
||||
out_file=/var/run/smart-"$dev_base"
|
||||
|
||||
cat "$out_file"
|
||||
@@ -1,4 +0,0 @@
|
||||
appicondir = $(datadir)/icons/hicolor/128x128/apps
|
||||
appicon_DATA = gsmartcontrol.png
|
||||
|
||||
EXTRA_DIST = $(appicon_DATA)
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 7.5 KiB |
@@ -1,4 +0,0 @@
|
||||
appicondir = $(datadir)/icons/hicolor/16x16/apps
|
||||
appicon_DATA = gsmartcontrol.png
|
||||
|
||||
EXTRA_DIST = $(appicon_DATA)
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 632 B |
@@ -1,4 +0,0 @@
|
||||
appicondir = $(datadir)/icons/hicolor/22x22/apps
|
||||
appicon_DATA = gsmartcontrol.png
|
||||
|
||||
EXTRA_DIST = $(appicon_DATA)
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -1,4 +0,0 @@
|
||||
appicondir = $(datadir)/icons/hicolor/24x24/apps
|
||||
appicon_DATA = gsmartcontrol.png
|
||||
|
||||
EXTRA_DIST = $(appicon_DATA)
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 24 KiB |
@@ -1,4 +0,0 @@
|
||||
appicondir = $(datadir)/icons/hicolor/32x32/apps
|
||||
appicon_DATA = gsmartcontrol.png
|
||||
|
||||
EXTRA_DIST = $(appicon_DATA)
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -1,4 +0,0 @@
|
||||
appicondir = $(datadir)/icons/hicolor/48x48/apps
|
||||
appicon_DATA = gsmartcontrol.png
|
||||
|
||||
EXTRA_DIST = $(appicon_DATA)
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -1,4 +0,0 @@
|
||||
appicondir = $(datadir)/icons/hicolor/64x64/apps
|
||||
appicon_DATA = gsmartcontrol.png
|
||||
|
||||
EXTRA_DIST = $(appicon_DATA)
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,63 @@
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
|
||||
# Generate files
|
||||
configure_file("gsmartcontrol.appdata.in.xml" "gsmartcontrol.appdata.xml" ESCAPE_QUOTES @ONLY)
|
||||
configure_file("gsmartcontrol.in.desktop" "gsmartcontrol.desktop" ESCAPE_QUOTES @ONLY)
|
||||
configure_file("gsmartcontrol-root.in.sh" "gsmartcontrol-root.sh" ESCAPE_QUOTES @ONLY)
|
||||
configure_file("org.gsmartcontrol.in.policy" "org.gsmartcontrol.policy" ESCAPE_QUOTES @ONLY)
|
||||
|
||||
# Install app icons
|
||||
if (NOT WIN32)
|
||||
foreach(dir 16 22 24 32 48 64 128 256)
|
||||
install(FILES "${dir}/gsmartcontrol.png"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${dir}x${dir}/apps/")
|
||||
endforeach()
|
||||
# Don't run update-icon-cache, cpack is mostly for packaging.
|
||||
# install(CODE "execute_process (COMMAND gtk-update-icon-cache-3.0 -t -f \"@CMAKE_INSTALL_DATADIR@/icons/hicolor\")")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
# .ico file
|
||||
install(FILES gsmartcontrol.ico DESTINATION .)
|
||||
endif()
|
||||
|
||||
set (DATA_ICONS
|
||||
icons/drive-optical.png
|
||||
icons/drive-harddisk.png
|
||||
icons/drive-removable-media-usb.png
|
||||
)
|
||||
|
||||
# Install internal icons
|
||||
if (WIN32)
|
||||
install(FILES ${DATA_ICONS} DESTINATION icons)
|
||||
else()
|
||||
install(FILES ${DATA_ICONS}
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/gsmartcontrol/icons")
|
||||
endif()
|
||||
|
||||
# Desktop file
|
||||
if (NOT WIN32)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/")
|
||||
|
||||
# Appdata file
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.appdata.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo/")
|
||||
|
||||
# PolKit file
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.gsmartcontrol.policy"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/polkit-1/actions/")
|
||||
|
||||
# Man pages
|
||||
install(FILES "man1/gsmartcontrol.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
|
||||
install(FILES "man1/gsmartcontrol.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" RENAME "gsmartcontrol-root.1")
|
||||
|
||||
# Scripts (this goes to bin, not sbin, as it doesn't require root privileges before running)
|
||||
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol-root.sh" TYPE BIN RENAME "gsmartcontrol-root")
|
||||
endif()
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
SUBDIRS = 16 22 24 32 48 64 128
|
||||
|
||||
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||
|
||||
install-data-hook: update-icon-cache
|
||||
uninstall-hook: update-icon-cache
|
||||
update-icon-cache:
|
||||
@-if test -z "$(DESTDIR)"; then \
|
||||
echo "Updating GTK icon cache."; \
|
||||
$(gtk_update_icon_cache); \
|
||||
else \
|
||||
echo "*** Icon cache not updated. After (un)install, run this:"; \
|
||||
echo "*** $(gtk_update_icon_cache)"; \
|
||||
fi
|
||||
|
||||
|
||||
# installs to /usr/share/appname
|
||||
appdatadir = $(pkgdatadir)
|
||||
appdata_DATA = icon_cddvd.png icon_hdd.png
|
||||
|
||||
|
||||
# pkgdatadir = $(datadir)/gsmartcontrol
|
||||
# pkgdata_DATA =
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
desktop_DATA = gsmartcontrol_gnome.desktop gsmartcontrol_kde.desktop \
|
||||
gsmartcontrol_other.desktop
|
||||
|
||||
|
||||
# Same as 48/gsmartcontrol.png
|
||||
pixmapsdir = $(datadir)/pixmaps
|
||||
pixmaps_DATA = 48/gsmartcontrol.png
|
||||
|
||||
|
||||
EXTRA_DIST = $(appdata_DATA) $(pixmaps_DATA)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
png_name="gsmartcontrol.png"
|
||||
|
||||
# needs imagemagick
|
||||
convert 16/$png_name 22/$png_name 24/$png_name 32/$png_name \
|
||||
48/$png_name 64/$png_name 128/$png_name 256/$png_name gsmartcontrol.ico
|
||||
@@ -0,0 +1,33 @@
|
||||
/******************************************************************************
|
||||
License: GNU General Public License v3.0 only
|
||||
Copyright:
|
||||
(C) 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
******************************************************************************/
|
||||
|
||||
// This file is for generating documentation only. Do NOT include it.
|
||||
/// \file
|
||||
/// \author Alexander Shaduri
|
||||
|
||||
/**
|
||||
\mainpage GSmartControl Index
|
||||
|
||||
|
||||
\section intro_section Introduction
|
||||
This is GSmartControl internal documentation.
|
||||
*/
|
||||
|
||||
// Group definitions and titles.
|
||||
|
||||
/**
|
||||
\addtogroup applib Application-Specific Components
|
||||
\addtogroup applib_examples Examples of Application-Specific Components
|
||||
\addtogroup hz HZ Common System Components
|
||||
\addtogroup hz_examples Examples for HZ Common System Components
|
||||
\addtogroup libdebug LibDebug Flexible Debug Logging
|
||||
\addtogroup libdebug_examples Examples for LibDebug Flexible Debug Logging
|
||||
\addtogroup rconfig Resource Manager-Based Configuration
|
||||
\addtogroup rconfig_examples Examples for Resource Manager-Based Configuration
|
||||
\addtogroup gsc GSmartControl Application
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
#!/bin/bash
|
||||
###############################################################################
|
||||
# License: Zlib
|
||||
# Copyright:
|
||||
# (C) 2008 - 2022 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
# Run gsmartcontrol with root, asking for root password first.
|
||||
# export GSMARTCONTROL_SU to override a su command (e.g. "kdesu -c").
|
||||
|
||||
EXEC_BIN="@CMAKE_INSTALL_FULL_SBINDIR@/gsmartcontrol";
|
||||
program_name="gsmartcontrol"
|
||||
|
||||
|
||||
# Preserve quotes in arguments
|
||||
final_args_quoted="";
|
||||
for i in "$@";do
|
||||
final_args_quoted="$final_args_quoted \"${i//\"/\\\"}\"";
|
||||
done;
|
||||
|
||||
|
||||
DESKTOP="auto";
|
||||
|
||||
# Compatibility with old syntax:
|
||||
# gsmartcontrol-root [<desktop> [program_options]]
|
||||
if [ "$1" == "auto" ] || [ "$1" == "kde" ] || [ "$1" == "gnome" ] || [ "$1" == "other" ]; then
|
||||
DESKTOP="$1";
|
||||
shift; # remove $1
|
||||
else
|
||||
# New syntax:
|
||||
# gsmartcontrol-root [--desktop=<auto|kde|gnome|other>] [program_options]
|
||||
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
--desktop=*)
|
||||
DESKTOP="${arg#*=}";
|
||||
final_args_quoted="${final_args_quoted/\"$arg\"/}";
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$DESKTOP" != "auto" ] && [ "$DESKTOP" != "kde" ] && \
|
||||
[ "$DESKTOP" != "gnome" ] && [ "$DESKTOP" != "other" ]; then
|
||||
echo "Usage: $0 [--desktop=<auto|kde|gnome|other>] [<${program_name}_options>]";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
# Auto-detect current desktop if auto was specified.
|
||||
if [ "$DESKTOP" = "auto" ]; then
|
||||
# KDE_SESSION_UID is present on kde3 and kde4.
|
||||
# Note that it may be empty (but still set)
|
||||
if [ "${KDE_SESSION_UID+set}" = "set" ]; then
|
||||
DESKTOP="kde";
|
||||
# same with gnome
|
||||
elif [ "${GNOME_DESKTOP_SESSION_ID+set}" = "set" ]; then
|
||||
DESKTOP="gnome";
|
||||
else
|
||||
DESKTOP="other";
|
||||
fi
|
||||
fi
|
||||
|
||||
# echo $DESKTOP;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# They're basically the same, only the order is different.
|
||||
# pkexec is for PolKit.
|
||||
# sux requires xterm to ask for the password.
|
||||
# xdg-su is basically like this script, except worse :)
|
||||
# su-to-root is a debian/ubuntu official method (although gksu is available).
|
||||
gnome_sus="pkexec su-to-root gnomesu gksu kdesu beesu xdg-su sux";
|
||||
kde_sus="pkexec su-to-root kdesu gnomesu gksu beesu xdg-su sux";
|
||||
other_sus="$gnome_sus";
|
||||
|
||||
|
||||
candidates="";
|
||||
found_su=""
|
||||
|
||||
if [ "$DESKTOP" = "gnome" ]; then
|
||||
candidates="$gnome_sus";
|
||||
elif [ "$DESKTOP" = "kde" ]; then
|
||||
candidates="$kde_sus";
|
||||
elif [ "$DESKTOP" = "other" ]; then
|
||||
candidates="$other_sus";
|
||||
fi
|
||||
|
||||
if [ "$GSMARTCONTROL_SU" = "" ]; then
|
||||
for subin in $candidates; do
|
||||
which "$subin" &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
found_su="$subin";
|
||||
break;
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$found_su" = "" ]; then
|
||||
xmessage "Error launching ${program_name}: No suitable su mechanism found.
|
||||
Try installing PolKit, kdesu, gnomesu, gksu, beesu or sux first.";
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# gnomesu and gksu (but not kdesu, not sure about others) fail to adopt
|
||||
# root's PATH. Since the user's PATH may not contain /usr/sbin (with smartctl)
|
||||
# on some distributions (e.g. mandriva), add it manually. We also add
|
||||
# /usr/local/sbin, since that's the default location of custom-compiled smartctl.
|
||||
# Add these directories _before_ existing PATH, so that the user is not
|
||||
# tricked into running it from some other path (we're running as root with
|
||||
# the user's env after all).
|
||||
# Add sbindir as well (freebsd seems to require it).
|
||||
# Note that beesu won't show a GUI login box if /usr/sbin is before /usr/bin,
|
||||
# so add it first as well.
|
||||
EXTRA_PATHS="/usr/bin:/usr/sbin:/usr/local/sbin:@CMAKE_INSTALL_FULL_SBINDIR@";
|
||||
export PATH="$EXTRA_PATHS:$PATH"
|
||||
|
||||
|
||||
# echo $found_su;
|
||||
|
||||
# Examples:
|
||||
# gnomesu -c 'gsmartcontrol --no-scan'
|
||||
# kdesu -c 'gsmartcontrol --no-scan'
|
||||
# beesu -P 'gsmartcontrol --no-scan'
|
||||
# su-to-root -X -c 'gsmartcontrol --no-scan'
|
||||
# xterm -e sux -c 'gsmartcontrol --no-scan' # sux asks for password in a terminal
|
||||
|
||||
|
||||
full_cmd="";
|
||||
|
||||
if [ "$GSMARTCONTROL_SU" != "" ]; then
|
||||
full_cmd="$GSMARTCONTROL_SU '$EXEC_BIN $final_args_quoted'";
|
||||
|
||||
elif [ "$found_su" = "pkexec" ]; then
|
||||
if [ "$GDK_SCALE" != "" ]; then
|
||||
final_args_quoted="$final_args_quoted --gdk-scale='$GDK_SCALE'"
|
||||
fi
|
||||
if [ "$GDK_DPI_SCALE" != "" ]; then
|
||||
final_args_quoted="$final_args_quoted --gdk-dpi-scale='$GDK_DPI_SCALE'"
|
||||
fi
|
||||
full_cmd="pkexec --disable-internal-agent $EXEC_BIN $final_args_quoted";
|
||||
|
||||
elif [ "$found_su" = "sux" ]; then
|
||||
full_cmd="xterm -e sux -c '$EXEC_BIN $final_args_quoted'";
|
||||
|
||||
elif [ "$found_su" = "gksu" ]; then
|
||||
full_cmd="$found_su '$EXEC_BIN $final_args_quoted'";
|
||||
|
||||
elif [ "$found_su" = "beesu" ]; then
|
||||
full_cmd="$found_su -P '$EXEC_BIN $final_args_quoted'";
|
||||
|
||||
elif [ "$found_su" = "su-to-root" ]; then
|
||||
full_cmd="$found_su -X -c '$EXEC_BIN $final_args_quoted'";
|
||||
|
||||
else # gnomesu, kdesu, xdg-su
|
||||
full_cmd="$found_su -c '$EXEC_BIN $final_args_quoted'";
|
||||
fi
|
||||
|
||||
|
||||
# echo $full_cmd
|
||||
eval "$full_cmd"
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>gsmartcontrol</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0</project_license>
|
||||
<name>GSmartControl</name>
|
||||
<summary>Hard Disk and SSD Health Inspection</summary>
|
||||
<description>
|
||||
<p>
|
||||
GSmartControl is a graphical user interface for smartctl, which is a tool for
|
||||
querying and controlling SMART (Self-Monitoring, Analysis, and Reporting
|
||||
Technology) data in hard disk and solid-state drives. It allows you to inspect
|
||||
the drive's SMART data to determine its health, as well as run various tests
|
||||
on it.
|
||||
</p>
|
||||
</description>
|
||||
<launchable type="desktop-id">gsmartcontrol.desktop</launchable>
|
||||
<url type="homepage">https://gsmartcontrol.shaduri.dev</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>Main window</caption>
|
||||
<image>https://gsmartcontrol.shaduri.dev/screenshots/main_ok.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<caption>Drive identity information</caption>
|
||||
<image>https://gsmartcontrol.shaduri.dev/screenshots/info_identity.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<caption>Attribute list of a failing drive</caption>
|
||||
<image>https://gsmartcontrol.shaduri.dev/screenshots/info_failing.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
</component>
|
||||
|
After Width: | Height: | Size: 130 KiB |
@@ -0,0 +1,66 @@
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
[Desktop Entry]
|
||||
|
||||
# desktop file version
|
||||
Version=1.0
|
||||
Type=Application
|
||||
|
||||
Categories=System;Monitor;
|
||||
|
||||
Name=GSmartControl
|
||||
Name[ca]=GSControlIntel
|
||||
Name[cs]=GSmartControl
|
||||
Name[es]=GSmartControl
|
||||
Name[id]=GSmartControl
|
||||
Name[it]=GSmartControl
|
||||
Name[ja]=GSmartControl
|
||||
Name[pt_BR]=GSmartControl
|
||||
Name[ru]=GSmartControl
|
||||
Name[sk]=GSmartControl
|
||||
Name[sv]=GSmartControl
|
||||
Name[zh_CN]=GSmartControl
|
||||
# short description, usually shown in parentheses after Name
|
||||
GenericName=Hard Disk and SSD Health Inspection
|
||||
GenericName[ca]=Inspecció de salut del disc dur i de l'SSD
|
||||
GenericName[cs]=Prohlídka zdraví pevných a SSD disků
|
||||
GenericName[es]=Inspección de la salud de discos duros y SSD
|
||||
GenericName[fr]=Inspecteur de santé de disque dur et de SSD
|
||||
GenericName[id]=Pemeriksaan Kesehatan Cakram Keras dan SSD
|
||||
GenericName[it]=Ispezione della salute del disco rigido e dell'SSD
|
||||
GenericName[ja]=ハードディスクと SSD の健全状態の調査
|
||||
GenericName[pt_BR]=Inspeção da integridade de disco rígido e SSD
|
||||
GenericName[ru]=Проверка состояния жёстких и твердотельных дисков
|
||||
GenericName[sk]=Zdravotná inšpekcia pevného disku a SSD
|
||||
GenericName[zh_CN]=机械及固态硬盘健康检测
|
||||
|
||||
# tooltip
|
||||
Comment=Monitor and control SMART data on hard disk and solid-state drives
|
||||
Comment[ca]=Monitoreu i controleu les dades SMART dels discs durs i dels discs sòlids.
|
||||
Comment[cs]=Sleduje a nastavuje SMART data na pevném disku a na polovodičových discích
|
||||
Comment[es]=Monitorice y controle datos de SMART sobre discos duros y unidades de estado sólido
|
||||
Comment[fr]=Surveille et contrôle les données SMART des disques durs et des SSD
|
||||
Comment[id]=Pantau dan kendalikan data cerdas pada cakram keras dan SSD
|
||||
Comment[it]=Monitora e controlla i dati SMART sui dischi rigidi e a stato solido
|
||||
Comment[ja]=ハードディスクや SSD 内の SMART データの監視と制御
|
||||
Comment[pt_BR]=Monitorar e controlar dados do SMART em discos rígidos e unidades de estado sólido
|
||||
Comment[ru]=Мониторинг и контроль данных SMART на жёстких и твердотельных дисках
|
||||
Comment[sk]=Monitorovanie a kontrola údajov SMART na pevných diskoch a diskoch SSD
|
||||
Comment[zh_CN]=监测及控制机械硬盘和固态硬盘上的SMART数据
|
||||
|
||||
# If it's a name only, it looks for "name.[png|xpm]" file in
|
||||
# $XDG_DATA_DIRS/icons.
|
||||
# An absolute file path is also supported.
|
||||
Icon=gsmartcontrol
|
||||
|
||||
# Run with root permissions. This should work with newer GNOME too.
|
||||
# It _should_ work with kde, but it hangs on mine, so use plain kdesu.
|
||||
#X-KDE-SubstituteUID=true
|
||||
#X-KDE-RootOnly=true
|
||||
|
||||
# Run with root permissions.
|
||||
Exec="@CMAKE_INSTALL_FULL_BINDIR@/gsmartcontrol-root"
|
||||
@@ -1,26 +0,0 @@
|
||||
[Desktop Entry]
|
||||
|
||||
# Desktop file for gnome only.
|
||||
OnlyShowIn=GNOME;
|
||||
|
||||
# desktop file version
|
||||
Version=1.0
|
||||
Type=Application
|
||||
|
||||
Categories=System;GTK;
|
||||
# Categories=Settings;HardwareSettings;
|
||||
|
||||
Name=GSmartControl
|
||||
# short description, usually shown in parentheses after Name
|
||||
GenericName=Hard Disk Health Inspection
|
||||
# tooltip
|
||||
Comment=Monitor and control SMART data on hard disks
|
||||
|
||||
# If it's a name only, it looks for "name.[png|xpm]" file in
|
||||
# $XDG_DATA_DIRS/icons and /usr/share/pixmaps.
|
||||
# An absolute file path is also supported.
|
||||
Icon=gsmartcontrol
|
||||
|
||||
# Run with root permissions. Some desktop files used gksu,
|
||||
# but it doesn't seem available on my system.
|
||||
Exec=gnomesu -c "@prefix@/bin/gsmartcontrol"
|
||||
@@ -1,29 +0,0 @@
|
||||
[Desktop Entry]
|
||||
|
||||
# Desktop file for kde only.
|
||||
OnlyShowIn=KDE;
|
||||
|
||||
# desktop file version
|
||||
Version=1.0
|
||||
Type=Application
|
||||
|
||||
Categories=System;GTK;
|
||||
# Categories=Settings;HardwareSettings;
|
||||
|
||||
Name=GSmartControl
|
||||
# short description, usually shown in parentheses after Name
|
||||
GenericName=Hard Disk Health Inspection
|
||||
# tooltip
|
||||
Comment=Monitor and control SMART data on hard disks
|
||||
|
||||
# If it's a name only, it looks for "name.[png|xpm]" file in
|
||||
# $XDG_DATA_DIRS/icons and /usr/share/pixmaps.
|
||||
# An absolute file path is also supported.
|
||||
Icon=gsmartcontrol
|
||||
|
||||
# Run with root permissions. This should work with newer GNOME too.
|
||||
# It _should_ work with kde, but it hangs on mine, so use plain kdesu.
|
||||
#X-KDE-SubstituteUID=true
|
||||
#X-KDE-RootOnly=true
|
||||
|
||||
Exec=kdesu "@prefix@/bin/gsmartcontrol"
|
||||
@@ -1,28 +0,0 @@
|
||||
[Desktop Entry]
|
||||
|
||||
# Desktop file for non-gnome and non-kde only.
|
||||
NotShowIn=GNOME;KDE;
|
||||
|
||||
# desktop file version
|
||||
Version=1.0
|
||||
Type=Application
|
||||
|
||||
Categories=System;GTK;
|
||||
# Categories=Settings;HardwareSettings;
|
||||
|
||||
Name=GSmartControl
|
||||
# short description, usually shown in parentheses after Name
|
||||
GenericName=Hard Disk Health Inspection
|
||||
# tooltip
|
||||
Comment=Monitor and control SMART data on hard disks
|
||||
|
||||
# If it's a name only, it looks for "name.[png|xpm]" file in
|
||||
# $XDG_DATA_DIRS/icons and /usr/share/pixmaps.
|
||||
# An absolute file path is also supported.
|
||||
Icon=gsmartcontrol
|
||||
|
||||
# Run with root permissions using gnomesu (from libgnomesu).
|
||||
# There is also kdesu (kdebase3-runtime, kdebase4-runtime), in different paths.
|
||||
# There is also xdg-su, which doesn't work at all on my machine.
|
||||
Exec=gnomesu -c "@prefix@/bin/gsmartcontrol"
|
||||
# Exec=kdesu -u root "@prefix@/bin/gsmartcontrol"
|
||||
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,81 @@
|
||||
.TH GSmartControl "1" "" "gsmartcontrol " "User Commands"
|
||||
.SH NAME
|
||||
GSmartControl \- Hard disk drive and SSD health inspection tool
|
||||
.SH SYNOPSIS
|
||||
\fBgsmartcontrol\fP [OPTIONS]
|
||||
|
||||
\fBgsmartcontrol\-root\fP [--desktop=\fI<desktop>\fP] [OPTIONS]
|
||||
.SH DESCRIPTION
|
||||
\fBGSmartControl\fP is a graphical user interface for smartctl (from
|
||||
smartmontools), which is a tool for querying and controlling SMART
|
||||
(Self-Monitoring, Analysis, and Reporting Technology) data on modern hard disk
|
||||
and solid-state drives. It allows you to inspect the drive's SMART data to
|
||||
determine its health, as well as run various tests on it.
|
||||
.PP
|
||||
This manual page documents briefly the \fBgsmartcontrol\fP and
|
||||
\fBgsmartcontrol\-root\fP commands.
|
||||
.PP
|
||||
\fBgsmartcontrol\-root\fP command launches \fBgsmartcontrol\fP with
|
||||
administrative privileges. The \fIdesktop\fP argument specifies which desktop
|
||||
is currently running, for automatic selection of native su mechanism. Valid
|
||||
values for \fIdesktop\fP are \fBauto\fP, \fBkde\fP, \fBgnome\fP, \fBother\fP.
|
||||
|
||||
.SH OPTIONS
|
||||
.SS "Help Options:"
|
||||
.TP
|
||||
\fB\-?\fP, \fB\-\-help\fP
|
||||
Show help options
|
||||
.TP
|
||||
\fB\-\-help\-all\fP
|
||||
Show all help options
|
||||
.TP
|
||||
\fB\-\-help\-gtk\fP
|
||||
Show GTK+ options
|
||||
.TP
|
||||
\fB\-\-help\-debug\fR
|
||||
Show logging options
|
||||
.SS "Application Options:"
|
||||
.TP
|
||||
\fB\-l\fP, \fB\-\-no\-locale\fP
|
||||
Don't use system locale
|
||||
.TP
|
||||
\fB\-V\fP, \fB\-\-version\fP
|
||||
Display version information
|
||||
.TP
|
||||
\fB\-\-no\-scan\fP
|
||||
Don't scan devices on startup
|
||||
.TP
|
||||
\fB\-\-add\-virtual\fP
|
||||
Load smartctl data from file, creating a virtual drive. You
|
||||
can specify this option multiple times.
|
||||
.TP
|
||||
\fB\-\-add\-device\fP
|
||||
Add this device to device list. The format of the device is
|
||||
\fI<device>::<type>::<extra_args>\fP, where type and extra_args are optional.
|
||||
This option is useful with \fB\-\-no\-scan\fP to list certain drives only. You
|
||||
can specify this option multiple times. Example:\fR
|
||||
.nf
|
||||
\-\-add\-device /dev/sda \-\-add\-device /dev/twa0::3ware,2 \-\-add\-device '/dev/sdb::::-T permissive'
|
||||
.fi
|
||||
.TP
|
||||
\fB\-\-forget\-devices\fP
|
||||
Forget all previously manually added devices
|
||||
.TP
|
||||
\fB\-\-display\fP=\fIDISPLAY\fP
|
||||
X display to use
|
||||
.TP
|
||||
\fB\-v\fP, \fB\-\-verbose\fP
|
||||
Enable verbose logging; same as \fB\-\-verbosity\-level\fP 5
|
||||
.TP
|
||||
\fB\-q\fP, \fB\-\-quiet\fP
|
||||
Disable logging; same as \fB\-\-verbosity\-level\fP 0
|
||||
.TP
|
||||
\fB\-b\fP, \fB\-\-verbosity\-level\fP
|
||||
Set verbosity level [0\-5]
|
||||
.PP
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2008 \- 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
This manual page was originally written by Giuseppe Iuculano
|
||||
<giuseppe@iuculano.it> for the Debian project.
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
|
||||
<!--
|
||||
License: BSD Zero Clause License file
|
||||
Copyright:
|
||||
(C) 2008 - 2021 GSmartControl developers
|
||||
-->
|
||||
|
||||
<policyconfig>
|
||||
|
||||
<action id="org.gsmartcontrol">
|
||||
<message>Authentication is required to run GSmartControl</message>
|
||||
<icon_name>gsmartcontrol</icon_name>
|
||||
<defaults>
|
||||
<allow_any>auth_admin</allow_any>
|
||||
<allow_inactive>auth_admin</allow_inactive>
|
||||
<allow_active>auth_admin</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">@CMAKE_INSTALL_FULL_SBINDIR@/gsmartcontrol</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
||||
@@ -0,0 +1,74 @@
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2021 - 2024 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
# Disable all warnings
|
||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang
|
||||
OR ${CMAKE_CXX_COMPILER_ID} STREQUAL GNU
|
||||
OR ${CMAKE_CXX_COMPILER_ID} STREQUAL AppleClang)
|
||||
add_compile_options(-w)
|
||||
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
|
||||
add_compile_options(/w)
|
||||
endif()
|
||||
|
||||
|
||||
find_package(PkgConfig REQUIRED) # pkg_check_modules()
|
||||
|
||||
|
||||
# Gtkmm.
|
||||
# Don't make it REQUIRED, we may want to build only the parsers
|
||||
pkg_check_modules(Gtkmm REQUIRED IMPORTED_TARGET GLOBAL "gtkmm-3.0>=3.0")
|
||||
add_library(app_gtkmm_interface INTERFACE)
|
||||
target_link_libraries(app_gtkmm_interface
|
||||
INTERFACE
|
||||
PkgConfig::Gtkmm
|
||||
)
|
||||
target_compile_definitions(app_gtkmm_interface
|
||||
INTERFACE
|
||||
ENABLE_GLIB=1
|
||||
ENABLE_GLIBMM=1
|
||||
# For porting to GTK4
|
||||
# GTK_DISABLE_DEPRECATED=1
|
||||
# GDK_DISABLE_DEPRECATED=1
|
||||
# GTKMM_DISABLE_DEPRECATED=1
|
||||
# GDKMM_DISABLE_DEPRECATED=1
|
||||
# GLIBMM_DISABLE_DEPRECATED=1
|
||||
# GIOMM_DISABLE_DEPRECATED=1
|
||||
)
|
||||
|
||||
# Support pre-C++17 glibmm with throw(...) exception specifications
|
||||
pkg_check_modules(Glibmm "glibmm-2.4")
|
||||
if ("${Glibmm_VERSION}" VERSION_LESS "2.50.1")
|
||||
target_compile_definitions(app_gtkmm_interface INTERFACE "APP_GLIBMM_USES_THROW")
|
||||
message(STATUS "Enabling old glibmm throw(...) workaround")
|
||||
endif()
|
||||
|
||||
|
||||
# Gettext libintl
|
||||
find_package(Intl REQUIRED)
|
||||
add_library(app_gettext_interface INTERFACE)
|
||||
if (Intl_INCLUDE_DIRS)
|
||||
target_include_directories(app_gettext_interface
|
||||
SYSTEM INTERFACE
|
||||
${Intl_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
if (Intl_LIBRARIES)
|
||||
target_link_libraries(app_gettext_interface
|
||||
INTERFACE
|
||||
${Intl_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Gettext binaries and macros.
|
||||
# See https://cmake.org/cmake/help/v3.15/module/FindGettext.html
|
||||
# find_package(Gettext REQUIRED)
|
||||
|
||||
|
||||
add_subdirectory(catch2)
|
||||
add_subdirectory(fmt)
|
||||
add_subdirectory(nlohmann_json)
|
||||
add_subdirectory(whereami)
|
||||
add_subdirectory(tl_expected)
|
||||
@@ -0,0 +1,22 @@
|
||||
###############################################################################
|
||||
# License: BSD Zero Clause License file
|
||||
# Copyright:
|
||||
# (C) 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
###############################################################################
|
||||
|
||||
#add_subdirectory(Catch2)
|
||||
|
||||
|
||||
add_library(Catch2 INTERFACE)
|
||||
|
||||
# Relative sources are allowed only since cmake 3.13.
|
||||
target_sources(Catch2 INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Catch2/single_include/catch2/catch.hpp
|
||||
)
|
||||
|
||||
target_include_directories(Catch2
|
||||
SYSTEM INTERFACE
|
||||
"${CMAKE_SOURCE_DIR}/dependencies/catch2/Catch2/single_include"
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
AccessModifierOffset: '-4'
|
||||
AlignEscapedNewlines: Left
|
||||
AllowAllConstructorInitializersOnNextLine: 'true'
|
||||
BinPackArguments: 'false'
|
||||
BinPackParameters: 'false'
|
||||
BreakConstructorInitializers: AfterColon
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
|
||||
DerivePointerAlignment: 'false'
|
||||
FixNamespaceComments: 'true'
|
||||
IncludeBlocks: Regroup
|
||||
IndentCaseLabels: 'false'
|
||||
IndentPPDirectives: AfterHash
|
||||
IndentWidth: '4'
|
||||
Language: Cpp
|
||||
NamespaceIndentation: All
|
||||
PointerAlignment: Left
|
||||
SpaceBeforeCtorInitializerColon: 'false'
|
||||
SpaceInEmptyParentheses: 'false'
|
||||
SpacesInParentheses: 'true'
|
||||
Standard: Cpp11
|
||||
TabWidth: '4'
|
||||
UseTab: Never
|
||||
|
||||
...
|
||||
@@ -0,0 +1,22 @@
|
||||
# This sets the default behaviour, overriding core.autocrlf
|
||||
* text=auto
|
||||
|
||||
# All source files should have unix line-endings in the repository,
|
||||
# but convert to native line-endings on checkout
|
||||
*.cpp text
|
||||
*.h text
|
||||
*.hpp text
|
||||
|
||||
# Windows specific files should retain windows line-endings
|
||||
*.sln text eol=crlf
|
||||
|
||||
# Keep executable scripts with LFs so they can be run after being
|
||||
# checked out on Windows
|
||||
*.py text eol=lf
|
||||
|
||||
|
||||
# Keep the single include header with LFs to make sure it is uploaded,
|
||||
# hashed etc with LF
|
||||
single_include/**/*.hpp eol=lf
|
||||
# Also keep the LICENCE file with LFs for the same reason
|
||||
LICENCE.txt eol=lf
|
||||
@@ -0,0 +1,31 @@
|
||||
*.build
|
||||
*.pbxuser
|
||||
*.mode1v3
|
||||
*.ncb
|
||||
*.suo
|
||||
Debug
|
||||
Release
|
||||
*.user
|
||||
*.xcuserstate
|
||||
.DS_Store
|
||||
xcuserdata
|
||||
CatchSelfTest.xcscheme
|
||||
Breakpoints.xcbkptlist
|
||||
projects/VS2010/TestCatch/_UpgradeReport_Files/
|
||||
projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj.filters
|
||||
projects/VisualStudio/TestCatch/UpgradeLog.XML
|
||||
projects/CMake/.idea
|
||||
projects/CMake/cmake-build-debug
|
||||
UpgradeLog.XML
|
||||
Resources/DWARF
|
||||
projects/Generated
|
||||
*.pyc
|
||||
DerivedData
|
||||
*.xccheckout
|
||||
Build
|
||||
.idea
|
||||
.vs
|
||||
cmake-build-*
|
||||
benchmark-dir
|
||||
.conan/test_package/build
|
||||
bazel-*
|
||||
@@ -0,0 +1,37 @@
|
||||
<a id="top"></a>
|
||||

|
||||
|
||||
[](https://github.com/catchorg/catch2/releases)
|
||||
[](https://travis-ci.org/catchorg/Catch2)
|
||||
[](https://ci.appveyor.com/project/catchorg/catch2)
|
||||
[](https://codecov.io/gh/catchorg/Catch2)
|
||||
[](https://wandbox.org/permlink/6JUH8Eybx4CtvkJS)
|
||||
[](https://discord.gg/4CWS9zD)
|
||||
|
||||
|
||||
<a href="https://github.com/catchorg/Catch2/releases/download/v2.13.10/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>
|
||||
|
||||
## Catch2 is released!
|
||||
|
||||
If you've been using an earlier version of Catch, please see the
|
||||
Breaking Changes section of [the release notes](https://github.com/catchorg/Catch2/releases/tag/v2.0.1)
|
||||
before moving to Catch2. You might also like to read [this blog post](https://levelofindirection.com/blog/catch2-released.html) for more details.
|
||||
|
||||
## What's the Catch?
|
||||
|
||||
Catch2 is a multi-paradigm test framework for C++. which also supports
|
||||
Objective-C (and maybe C).
|
||||
It is primarily distributed as a single header file, although certain
|
||||
extensions may require additional headers.
|
||||
|
||||
## How to use it
|
||||
This documentation comprises these three parts:
|
||||
|
||||
* [Why do we need yet another C++ Test Framework?](docs/why-catch.md#top)
|
||||
* [Tutorial](docs/tutorial.md#top) - getting started
|
||||
* [Reference section](docs/Readme.md#top) - all the details
|
||||
|
||||
## More
|
||||
* Issues and bugs can be raised on the [Issue tracker on GitHub](https://github.com/catchorg/Catch2/issues)
|
||||
* For discussion or questions please use [the dedicated Google Groups forum](https://groups.google.com/forum/?fromgroups#!forum/catch-forum) or our [Discord](https://discord.gg/4CWS9zD)
|
||||
* See [who else is using Catch2](docs/opensource-users.md#top)
|
||||
@@ -0,0 +1,206 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
Catch
|
||||
-----
|
||||
|
||||
This module defines a function to help use the Catch test framework.
|
||||
|
||||
The :command:`catch_discover_tests` discovers tests by asking the compiled test
|
||||
executable to enumerate its tests. This does not require CMake to be re-run
|
||||
when tests change. However, it may not work in a cross-compiling environment,
|
||||
and setting test properties is less convenient.
|
||||
|
||||
This command is intended to replace use of :command:`add_test` to register
|
||||
tests, and will create a separate CTest test for each Catch test case. Note
|
||||
that this is in some cases less efficient, as common set-up and tear-down logic
|
||||
cannot be shared by multiple test cases executing in the same instance.
|
||||
However, it provides more fine-grained pass/fail information to CTest, which is
|
||||
usually considered as more beneficial. By default, the CTest test name is the
|
||||
same as the Catch name; see also ``TEST_PREFIX`` and ``TEST_SUFFIX``.
|
||||
|
||||
.. command:: catch_discover_tests
|
||||
|
||||
Automatically add tests with CTest by querying the compiled test executable
|
||||
for available tests::
|
||||
|
||||
catch_discover_tests(target
|
||||
[TEST_SPEC arg1...]
|
||||
[EXTRA_ARGS arg1...]
|
||||
[WORKING_DIRECTORY dir]
|
||||
[TEST_PREFIX prefix]
|
||||
[TEST_SUFFIX suffix]
|
||||
[PROPERTIES name1 value1...]
|
||||
[TEST_LIST var]
|
||||
[REPORTER reporter]
|
||||
[OUTPUT_DIR dir]
|
||||
[OUTPUT_PREFIX prefix}
|
||||
[OUTPUT_SUFFIX suffix]
|
||||
)
|
||||
|
||||
``catch_discover_tests`` sets up a post-build command on the test executable
|
||||
that generates the list of tests by parsing the output from running the test
|
||||
with the ``--list-test-names-only`` argument. This ensures that the full
|
||||
list of tests is obtained. Since test discovery occurs at build time, it is
|
||||
not necessary to re-run CMake when the list of tests changes.
|
||||
However, it requires that :prop_tgt:`CROSSCOMPILING_EMULATOR` is properly set
|
||||
in order to function in a cross-compiling environment.
|
||||
|
||||
Additionally, setting properties on tests is somewhat less convenient, since
|
||||
the tests are not available at CMake time. Additional test properties may be
|
||||
assigned to the set of tests as a whole using the ``PROPERTIES`` option. If
|
||||
more fine-grained test control is needed, custom content may be provided
|
||||
through an external CTest script using the :prop_dir:`TEST_INCLUDE_FILES`
|
||||
directory property. The set of discovered tests is made accessible to such a
|
||||
script via the ``<target>_TESTS`` variable.
|
||||
|
||||
The options are:
|
||||
|
||||
``target``
|
||||
Specifies the Catch executable, which must be a known CMake executable
|
||||
target. CMake will substitute the location of the built executable when
|
||||
running the test.
|
||||
|
||||
``TEST_SPEC arg1...``
|
||||
Specifies test cases, wildcarded test cases, tags and tag expressions to
|
||||
pass to the Catch executable with the ``--list-test-names-only`` argument.
|
||||
|
||||
``EXTRA_ARGS arg1...``
|
||||
Any extra arguments to pass on the command line to each test case.
|
||||
|
||||
``WORKING_DIRECTORY dir``
|
||||
Specifies the directory in which to run the discovered test cases. If this
|
||||
option is not provided, the current binary directory is used.
|
||||
|
||||
``TEST_PREFIX prefix``
|
||||
Specifies a ``prefix`` to be prepended to the name of each discovered test
|
||||
case. This can be useful when the same test executable is being used in
|
||||
multiple calls to ``catch_discover_tests()`` but with different
|
||||
``TEST_SPEC`` or ``EXTRA_ARGS``.
|
||||
|
||||
``TEST_SUFFIX suffix``
|
||||
Similar to ``TEST_PREFIX`` except the ``suffix`` is appended to the name of
|
||||
every discovered test case. Both ``TEST_PREFIX`` and ``TEST_SUFFIX`` may
|
||||
be specified.
|
||||
|
||||
``PROPERTIES name1 value1...``
|
||||
Specifies additional properties to be set on all tests discovered by this
|
||||
invocation of ``catch_discover_tests``.
|
||||
|
||||
``TEST_LIST var``
|
||||
Make the list of tests available in the variable ``var``, rather than the
|
||||
default ``<target>_TESTS``. This can be useful when the same test
|
||||
executable is being used in multiple calls to ``catch_discover_tests()``.
|
||||
Note that this variable is only available in CTest.
|
||||
|
||||
``REPORTER reporter``
|
||||
Use the specified reporter when running the test case. The reporter will
|
||||
be passed to the Catch executable as ``--reporter reporter``.
|
||||
|
||||
``OUTPUT_DIR dir``
|
||||
If specified, the parameter is passed along as
|
||||
``--out dir/<test_name>`` to Catch executable. The actual file name is the
|
||||
same as the test name. This should be used instead of
|
||||
``EXTRA_ARGS --out foo`` to avoid race conditions writing the result output
|
||||
when using parallel test execution.
|
||||
|
||||
``OUTPUT_PREFIX prefix``
|
||||
May be used in conjunction with ``OUTPUT_DIR``.
|
||||
If specified, ``prefix`` is added to each output file name, like so
|
||||
``--out dir/prefix<test_name>``.
|
||||
|
||||
``OUTPUT_SUFFIX suffix``
|
||||
May be used in conjunction with ``OUTPUT_DIR``.
|
||||
If specified, ``suffix`` is added to each output file name, like so
|
||||
``--out dir/<test_name>suffix``. This can be used to add a file extension to
|
||||
the output e.g. ".xml".
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
function(catch_discover_tests TARGET)
|
||||
cmake_parse_arguments(
|
||||
""
|
||||
""
|
||||
"TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST;REPORTER;OUTPUT_DIR;OUTPUT_PREFIX;OUTPUT_SUFFIX"
|
||||
"TEST_SPEC;EXTRA_ARGS;PROPERTIES"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if(NOT _WORKING_DIRECTORY)
|
||||
set(_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
if(NOT _TEST_LIST)
|
||||
set(_TEST_LIST ${TARGET}_TESTS)
|
||||
endif()
|
||||
|
||||
## Generate a unique name based on the extra arguments
|
||||
string(SHA1 args_hash "${_TEST_SPEC} ${_EXTRA_ARGS} ${_REPORTER} ${_OUTPUT_DIR} ${_OUTPUT_PREFIX} ${_OUTPUT_SUFFIX}")
|
||||
string(SUBSTRING ${args_hash} 0 7 args_hash)
|
||||
|
||||
# Define rule to generate test list for aforementioned test executable
|
||||
set(ctest_include_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_include-${args_hash}.cmake")
|
||||
set(ctest_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_tests-${args_hash}.cmake")
|
||||
get_property(crosscompiling_emulator
|
||||
TARGET ${TARGET}
|
||||
PROPERTY CROSSCOMPILING_EMULATOR
|
||||
)
|
||||
add_custom_command(
|
||||
TARGET ${TARGET} POST_BUILD
|
||||
BYPRODUCTS "${ctest_tests_file}"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_TARGET=${TARGET}"
|
||||
-D "TEST_EXECUTABLE=$<TARGET_FILE:${TARGET}>"
|
||||
-D "TEST_EXECUTOR=${crosscompiling_emulator}"
|
||||
-D "TEST_WORKING_DIR=${_WORKING_DIRECTORY}"
|
||||
-D "TEST_SPEC=${_TEST_SPEC}"
|
||||
-D "TEST_EXTRA_ARGS=${_EXTRA_ARGS}"
|
||||
-D "TEST_PROPERTIES=${_PROPERTIES}"
|
||||
-D "TEST_PREFIX=${_TEST_PREFIX}"
|
||||
-D "TEST_SUFFIX=${_TEST_SUFFIX}"
|
||||
-D "TEST_LIST=${_TEST_LIST}"
|
||||
-D "TEST_REPORTER=${_REPORTER}"
|
||||
-D "TEST_OUTPUT_DIR=${_OUTPUT_DIR}"
|
||||
-D "TEST_OUTPUT_PREFIX=${_OUTPUT_PREFIX}"
|
||||
-D "TEST_OUTPUT_SUFFIX=${_OUTPUT_SUFFIX}"
|
||||
-D "CTEST_FILE=${ctest_tests_file}"
|
||||
-P "${_CATCH_DISCOVER_TESTS_SCRIPT}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
file(WRITE "${ctest_include_file}"
|
||||
"if(EXISTS \"${ctest_tests_file}\")\n"
|
||||
" include(\"${ctest_tests_file}\")\n"
|
||||
"else()\n"
|
||||
" add_test(${TARGET}_NOT_BUILT-${args_hash} ${TARGET}_NOT_BUILT-${args_hash})\n"
|
||||
"endif()\n"
|
||||
)
|
||||
|
||||
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0")
|
||||
# Add discovered tests to directory TEST_INCLUDE_FILES
|
||||
set_property(DIRECTORY
|
||||
APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}"
|
||||
)
|
||||
else()
|
||||
# Add discovered tests as directory TEST_INCLUDE_FILE if possible
|
||||
get_property(test_include_file_set DIRECTORY PROPERTY TEST_INCLUDE_FILE SET)
|
||||
if (NOT ${test_include_file_set})
|
||||
set_property(DIRECTORY
|
||||
PROPERTY TEST_INCLUDE_FILE "${ctest_include_file}"
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR
|
||||
"Cannot set more than one TEST_INCLUDE_FILE"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endfunction()
|
||||
|
||||
###############################################################################
|
||||
|
||||
set(_CATCH_DISCOVER_TESTS_SCRIPT
|
||||
${CMAKE_CURRENT_LIST_DIR}/CatchAddTests.cmake
|
||||
CACHE INTERNAL "Catch2 full path to CatchAddTests.cmake helper file"
|
||||
)
|
||||
@@ -0,0 +1,135 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
set(prefix "${TEST_PREFIX}")
|
||||
set(suffix "${TEST_SUFFIX}")
|
||||
set(spec ${TEST_SPEC})
|
||||
set(extra_args ${TEST_EXTRA_ARGS})
|
||||
set(properties ${TEST_PROPERTIES})
|
||||
set(reporter ${TEST_REPORTER})
|
||||
set(output_dir ${TEST_OUTPUT_DIR})
|
||||
set(output_prefix ${TEST_OUTPUT_PREFIX})
|
||||
set(output_suffix ${TEST_OUTPUT_SUFFIX})
|
||||
set(script)
|
||||
set(suite)
|
||||
set(tests)
|
||||
|
||||
function(add_command NAME)
|
||||
set(_args "")
|
||||
# use ARGV* instead of ARGN, because ARGN splits arrays into multiple arguments
|
||||
math(EXPR _last_arg ${ARGC}-1)
|
||||
foreach(_n RANGE 1 ${_last_arg})
|
||||
set(_arg "${ARGV${_n}}")
|
||||
if(_arg MATCHES "[^-./:a-zA-Z0-9_]")
|
||||
set(_args "${_args} [==[${_arg}]==]") # form a bracket_argument
|
||||
else()
|
||||
set(_args "${_args} ${_arg}")
|
||||
endif()
|
||||
endforeach()
|
||||
set(script "${script}${NAME}(${_args})\n" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Run test executable to get list of available tests
|
||||
if(NOT EXISTS "${TEST_EXECUTABLE}")
|
||||
message(FATAL_ERROR
|
||||
"Specified test executable '${TEST_EXECUTABLE}' does not exist"
|
||||
)
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-test-names-only
|
||||
OUTPUT_VARIABLE output
|
||||
RESULT_VARIABLE result
|
||||
WORKING_DIRECTORY "${TEST_WORKING_DIR}"
|
||||
)
|
||||
# Catch --list-test-names-only reports the number of tests, so 0 is... surprising
|
||||
if(${result} EQUAL 0)
|
||||
message(WARNING
|
||||
"Test executable '${TEST_EXECUTABLE}' contains no tests!\n"
|
||||
)
|
||||
elseif(${result} LESS 0)
|
||||
message(FATAL_ERROR
|
||||
"Error running test executable '${TEST_EXECUTABLE}':\n"
|
||||
" Result: ${result}\n"
|
||||
" Output: ${output}\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
string(REPLACE "\n" ";" output "${output}")
|
||||
|
||||
# Run test executable to get list of available reporters
|
||||
execute_process(
|
||||
COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-reporters
|
||||
OUTPUT_VARIABLE reporters_output
|
||||
RESULT_VARIABLE reporters_result
|
||||
WORKING_DIRECTORY "${TEST_WORKING_DIR}"
|
||||
)
|
||||
if(${reporters_result} EQUAL 0)
|
||||
message(WARNING
|
||||
"Test executable '${TEST_EXECUTABLE}' contains no reporters!\n"
|
||||
)
|
||||
elseif(${reporters_result} LESS 0)
|
||||
message(FATAL_ERROR
|
||||
"Error running test executable '${TEST_EXECUTABLE}':\n"
|
||||
" Result: ${reporters_result}\n"
|
||||
" Output: ${reporters_output}\n"
|
||||
)
|
||||
endif()
|
||||
string(FIND "${reporters_output}" "${reporter}" reporter_is_valid)
|
||||
if(reporter AND ${reporter_is_valid} EQUAL -1)
|
||||
message(FATAL_ERROR
|
||||
"\"${reporter}\" is not a valid reporter!\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Prepare reporter
|
||||
if(reporter)
|
||||
set(reporter_arg "--reporter ${reporter}")
|
||||
endif()
|
||||
|
||||
# Prepare output dir
|
||||
if(output_dir AND NOT IS_ABSOLUTE ${output_dir})
|
||||
set(output_dir "${TEST_WORKING_DIR}/${output_dir}")
|
||||
if(NOT EXISTS ${output_dir})
|
||||
file(MAKE_DIRECTORY ${output_dir})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Parse output
|
||||
foreach(line ${output})
|
||||
set(test ${line})
|
||||
# Escape characters in test case names that would be parsed by Catch2
|
||||
set(test_name ${test})
|
||||
foreach(char , [ ])
|
||||
string(REPLACE ${char} "\\${char}" test_name ${test_name})
|
||||
endforeach(char)
|
||||
# ...add output dir
|
||||
if(output_dir)
|
||||
string(REGEX REPLACE "[^A-Za-z0-9_]" "_" test_name_clean ${test_name})
|
||||
set(output_dir_arg "--out ${output_dir}/${output_prefix}${test_name_clean}${output_suffix}")
|
||||
endif()
|
||||
|
||||
# ...and add to script
|
||||
add_command(add_test
|
||||
"${prefix}${test}${suffix}"
|
||||
${TEST_EXECUTOR}
|
||||
"${TEST_EXECUTABLE}"
|
||||
"${test_name}"
|
||||
${extra_args}
|
||||
"${reporter_arg}"
|
||||
"${output_dir_arg}"
|
||||
)
|
||||
add_command(set_tests_properties
|
||||
"${prefix}${test}${suffix}"
|
||||
PROPERTIES
|
||||
WORKING_DIRECTORY "${TEST_WORKING_DIR}"
|
||||
${properties}
|
||||
)
|
||||
list(APPEND tests "${prefix}${test}${suffix}")
|
||||
endforeach()
|
||||
|
||||
# Create a list of all discovered tests, which users may use to e.g. set
|
||||
# properties on the tests
|
||||
add_command(set ${TEST_LIST} ${tests})
|
||||
|
||||
# Write CTest script
|
||||
file(WRITE "${CTEST_FILE}" "${script}")
|
||||
@@ -0,0 +1,252 @@
|
||||
#==================================================================================================#
|
||||
# supported macros #
|
||||
# - TEST_CASE, #
|
||||
# - TEMPLATE_TEST_CASE #
|
||||
# - SCENARIO, #
|
||||
# - TEST_CASE_METHOD, #
|
||||
# - CATCH_TEST_CASE, #
|
||||
# - CATCH_TEMPLATE_TEST_CASE #
|
||||
# - CATCH_SCENARIO, #
|
||||
# - CATCH_TEST_CASE_METHOD. #
|
||||
# #
|
||||
# Usage #
|
||||
# 1. make sure this module is in the path or add this otherwise: #
|
||||
# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake.modules/") #
|
||||
# 2. make sure that you've enabled testing option for the project by the call: #
|
||||
# enable_testing() #
|
||||
# 3. add the lines to the script for testing target (sample CMakeLists.txt): #
|
||||
# project(testing_target) #
|
||||
# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake.modules/") #
|
||||
# enable_testing() #
|
||||
# #
|
||||
# find_path(CATCH_INCLUDE_DIR "catch.hpp") #
|
||||
# include_directories(${INCLUDE_DIRECTORIES} ${CATCH_INCLUDE_DIR}) #
|
||||
# #
|
||||
# file(GLOB SOURCE_FILES "*.cpp") #
|
||||
# add_executable(${PROJECT_NAME} ${SOURCE_FILES}) #
|
||||
# #
|
||||
# include(ParseAndAddCatchTests) #
|
||||
# ParseAndAddCatchTests(${PROJECT_NAME}) #
|
||||
# #
|
||||
# The following variables affect the behavior of the script: #
|
||||
# #
|
||||
# PARSE_CATCH_TESTS_VERBOSE (Default OFF) #
|
||||
# -- enables debug messages #
|
||||
# PARSE_CATCH_TESTS_NO_HIDDEN_TESTS (Default OFF) #
|
||||
# -- excludes tests marked with [!hide], [.] or [.foo] tags #
|
||||
# PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME (Default ON) #
|
||||
# -- adds fixture class name to the test name #
|
||||
# PARSE_CATCH_TESTS_ADD_TARGET_IN_TEST_NAME (Default ON) #
|
||||
# -- adds cmake target name to the test name #
|
||||
# PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS (Default OFF) #
|
||||
# -- causes CMake to rerun when file with tests changes so that new tests will be discovered #
|
||||
# #
|
||||
# One can also set (locally) the optional variable OptionalCatchTestLauncher to precise the way #
|
||||
# a test should be run. For instance to use test MPI, one can write #
|
||||
# set(OptionalCatchTestLauncher ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${NUMPROC}) #
|
||||
# just before calling this ParseAndAddCatchTests function #
|
||||
# #
|
||||
# The AdditionalCatchParameters optional variable can be used to pass extra argument to the test #
|
||||
# command. For example, to include successful tests in the output, one can write #
|
||||
# set(AdditionalCatchParameters --success) #
|
||||
# #
|
||||
# After the script, the ParseAndAddCatchTests_TESTS property for the target, and for each source #
|
||||
# file in the target is set, and contains the list of the tests extracted from that target, or #
|
||||
# from that file. This is useful, for example to add further labels or properties to the tests. #
|
||||
# #
|
||||
#==================================================================================================#
|
||||
|
||||
if (CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.8)
|
||||
message(FATAL_ERROR "ParseAndAddCatchTests requires CMake 2.8.8 or newer")
|
||||
endif()
|
||||
|
||||
option(PARSE_CATCH_TESTS_VERBOSE "Print Catch to CTest parser debug messages" OFF)
|
||||
option(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS "Exclude tests with [!hide], [.] or [.foo] tags" OFF)
|
||||
option(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME "Add fixture class name to the test name" ON)
|
||||
option(PARSE_CATCH_TESTS_ADD_TARGET_IN_TEST_NAME "Add target name to the test name" ON)
|
||||
option(PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS "Add test file to CMAKE_CONFIGURE_DEPENDS property" OFF)
|
||||
|
||||
function(ParseAndAddCatchTests_PrintDebugMessage)
|
||||
if(PARSE_CATCH_TESTS_VERBOSE)
|
||||
message(STATUS "ParseAndAddCatchTests: ${ARGV}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# This removes the contents between
|
||||
# - block comments (i.e. /* ... */)
|
||||
# - full line comments (i.e. // ... )
|
||||
# contents have been read into '${CppCode}'.
|
||||
# !keep partial line comments
|
||||
function(ParseAndAddCatchTests_RemoveComments CppCode)
|
||||
string(ASCII 2 CMakeBeginBlockComment)
|
||||
string(ASCII 3 CMakeEndBlockComment)
|
||||
string(REGEX REPLACE "/\\*" "${CMakeBeginBlockComment}" ${CppCode} "${${CppCode}}")
|
||||
string(REGEX REPLACE "\\*/" "${CMakeEndBlockComment}" ${CppCode} "${${CppCode}}")
|
||||
string(REGEX REPLACE "${CMakeBeginBlockComment}[^${CMakeEndBlockComment}]*${CMakeEndBlockComment}" "" ${CppCode} "${${CppCode}}")
|
||||
string(REGEX REPLACE "\n[ \t]*//+[^\n]+" "\n" ${CppCode} "${${CppCode}}")
|
||||
|
||||
set(${CppCode} "${${CppCode}}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Worker function
|
||||
function(ParseAndAddCatchTests_ParseFile SourceFile TestTarget)
|
||||
# If SourceFile is an object library, do not scan it (as it is not a file). Exit without giving a warning about a missing file.
|
||||
if(SourceFile MATCHES "\\\$<TARGET_OBJECTS:.+>")
|
||||
ParseAndAddCatchTests_PrintDebugMessage("Detected OBJECT library: ${SourceFile} this will not be scanned for tests.")
|
||||
return()
|
||||
endif()
|
||||
# According to CMake docs EXISTS behavior is well-defined only for full paths.
|
||||
get_filename_component(SourceFile ${SourceFile} ABSOLUTE)
|
||||
if(NOT EXISTS ${SourceFile})
|
||||
message(WARNING "Cannot find source file: ${SourceFile}")
|
||||
return()
|
||||
endif()
|
||||
ParseAndAddCatchTests_PrintDebugMessage("parsing ${SourceFile}")
|
||||
file(STRINGS ${SourceFile} Contents NEWLINE_CONSUME)
|
||||
|
||||
# Remove block and fullline comments
|
||||
ParseAndAddCatchTests_RemoveComments(Contents)
|
||||
|
||||
# Find definition of test names
|
||||
# https://regex101.com/r/JygOND/1
|
||||
string(REGEX MATCHALL "[ \t]*(CATCH_)?(TEMPLATE_)?(TEST_CASE_METHOD|SCENARIO|TEST_CASE)[ \t]*\\([ \t\n]*\"[^\"]*\"[ \t\n]*(,[ \t\n]*\"[^\"]*\")?(,[ \t\n]*[^\,\)]*)*\\)[ \t\n]*\{+[ \t]*(//[^\n]*[Tt][Ii][Mm][Ee][Oo][Uu][Tt][ \t]*[0-9]+)*" Tests "${Contents}")
|
||||
|
||||
if(PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS AND Tests)
|
||||
ParseAndAddCatchTests_PrintDebugMessage("Adding ${SourceFile} to CMAKE_CONFIGURE_DEPENDS property")
|
||||
set_property(
|
||||
DIRECTORY
|
||||
APPEND
|
||||
PROPERTY CMAKE_CONFIGURE_DEPENDS ${SourceFile}
|
||||
)
|
||||
endif()
|
||||
|
||||
# check CMP0110 policy for new add_test() behavior
|
||||
if(POLICY CMP0110)
|
||||
cmake_policy(GET CMP0110 _cmp0110_value) # new add_test() behavior
|
||||
else()
|
||||
# just to be thorough explicitly set the variable
|
||||
set(_cmp0110_value)
|
||||
endif()
|
||||
|
||||
foreach(TestName ${Tests})
|
||||
# Strip newlines
|
||||
string(REGEX REPLACE "\\\\\n|\n" "" TestName "${TestName}")
|
||||
|
||||
# Get test type and fixture if applicable
|
||||
string(REGEX MATCH "(CATCH_)?(TEMPLATE_)?(TEST_CASE_METHOD|SCENARIO|TEST_CASE)[ \t]*\\([^,^\"]*" TestTypeAndFixture "${TestName}")
|
||||
string(REGEX MATCH "(CATCH_)?(TEMPLATE_)?(TEST_CASE_METHOD|SCENARIO|TEST_CASE)" TestType "${TestTypeAndFixture}")
|
||||
string(REGEX REPLACE "${TestType}\\([ \t]*" "" TestFixture "${TestTypeAndFixture}")
|
||||
|
||||
# Get string parts of test definition
|
||||
string(REGEX MATCHALL "\"+([^\\^\"]|\\\\\")+\"+" TestStrings "${TestName}")
|
||||
|
||||
# Strip wrapping quotation marks
|
||||
string(REGEX REPLACE "^\"(.*)\"$" "\\1" TestStrings "${TestStrings}")
|
||||
string(REPLACE "\";\"" ";" TestStrings "${TestStrings}")
|
||||
|
||||
# Validate that a test name and tags have been provided
|
||||
list(LENGTH TestStrings TestStringsLength)
|
||||
if(TestStringsLength GREATER 2 OR TestStringsLength LESS 1)
|
||||
message(FATAL_ERROR "You must provide a valid test name and tags for all tests in ${SourceFile}")
|
||||
endif()
|
||||
|
||||
# Assign name and tags
|
||||
list(GET TestStrings 0 Name)
|
||||
if("${TestType}" STREQUAL "SCENARIO")
|
||||
set(Name "Scenario: ${Name}")
|
||||
endif()
|
||||
if(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME AND "${TestType}" MATCHES "(CATCH_)?TEST_CASE_METHOD" AND TestFixture )
|
||||
set(CTestName "${TestFixture}:${Name}")
|
||||
else()
|
||||
set(CTestName "${Name}")
|
||||
endif()
|
||||
if(PARSE_CATCH_TESTS_ADD_TARGET_IN_TEST_NAME)
|
||||
set(CTestName "${TestTarget}:${CTestName}")
|
||||
endif()
|
||||
# add target to labels to enable running all tests added from this target
|
||||
set(Labels ${TestTarget})
|
||||
if(TestStringsLength EQUAL 2)
|
||||
list(GET TestStrings 1 Tags)
|
||||
string(TOLOWER "${Tags}" Tags)
|
||||
# remove target from labels if the test is hidden
|
||||
if("${Tags}" MATCHES ".*\\[!?(hide|\\.)\\].*")
|
||||
list(REMOVE_ITEM Labels ${TestTarget})
|
||||
endif()
|
||||
string(REPLACE "]" ";" Tags "${Tags}")
|
||||
string(REPLACE "[" "" Tags "${Tags}")
|
||||
else()
|
||||
# unset tags variable from previous loop
|
||||
unset(Tags)
|
||||
endif()
|
||||
|
||||
list(APPEND Labels ${Tags})
|
||||
|
||||
set(HiddenTagFound OFF)
|
||||
foreach(label ${Labels})
|
||||
string(REGEX MATCH "^!hide|^\\." result ${label})
|
||||
if(result)
|
||||
set(HiddenTagFound ON)
|
||||
break()
|
||||
endif(result)
|
||||
endforeach(label)
|
||||
if(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS AND ${HiddenTagFound} AND ${CMAKE_VERSION} VERSION_LESS "3.9")
|
||||
ParseAndAddCatchTests_PrintDebugMessage("Skipping test \"${CTestName}\" as it has [!hide], [.] or [.foo] label")
|
||||
else()
|
||||
ParseAndAddCatchTests_PrintDebugMessage("Adding test \"${CTestName}\"")
|
||||
if(Labels)
|
||||
ParseAndAddCatchTests_PrintDebugMessage("Setting labels to ${Labels}")
|
||||
endif()
|
||||
|
||||
# Escape commas in the test spec
|
||||
string(REPLACE "," "\\," Name ${Name})
|
||||
|
||||
# Work around CMake 3.18.0 change in `add_test()`, before the escaped quotes were necessary,
|
||||
# only with CMake 3.18.0 the escaped double quotes confuse the call. This change is reverted in 3.18.1
|
||||
# And properly introduced in 3.19 with the CMP0110 policy
|
||||
if(_cmp0110_value STREQUAL "NEW" OR ${CMAKE_VERSION} VERSION_EQUAL "3.18")
|
||||
ParseAndAddCatchTests_PrintDebugMessage("CMP0110 set to NEW, no need for add_test(\"\") workaround")
|
||||
else()
|
||||
ParseAndAddCatchTests_PrintDebugMessage("CMP0110 set to OLD adding \"\" for add_test() workaround")
|
||||
set(CTestName "\"${CTestName}\"")
|
||||
endif()
|
||||
|
||||
# Handle template test cases
|
||||
if("${TestTypeAndFixture}" MATCHES ".*TEMPLATE_.*")
|
||||
set(Name "${Name} - *")
|
||||
endif()
|
||||
|
||||
# Add the test and set its properties
|
||||
add_test(NAME "${CTestName}" COMMAND ${OptionalCatchTestLauncher} $<TARGET_FILE:${TestTarget}> ${Name} ${AdditionalCatchParameters})
|
||||
# Old CMake versions do not document VERSION_GREATER_EQUAL, so we use VERSION_GREATER with 3.8 instead
|
||||
if(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS AND ${HiddenTagFound} AND ${CMAKE_VERSION} VERSION_GREATER "3.8")
|
||||
ParseAndAddCatchTests_PrintDebugMessage("Setting DISABLED test property")
|
||||
set_tests_properties("${CTestName}" PROPERTIES DISABLED ON)
|
||||
else()
|
||||
set_tests_properties("${CTestName}" PROPERTIES FAIL_REGULAR_EXPRESSION "No tests ran"
|
||||
LABELS "${Labels}")
|
||||
endif()
|
||||
set_property(
|
||||
TARGET ${TestTarget}
|
||||
APPEND
|
||||
PROPERTY ParseAndAddCatchTests_TESTS "${CTestName}")
|
||||
set_property(
|
||||
SOURCE ${SourceFile}
|
||||
APPEND
|
||||
PROPERTY ParseAndAddCatchTests_TESTS "${CTestName}")
|
||||
endif()
|
||||
|
||||
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# entry point
|
||||
function(ParseAndAddCatchTests TestTarget)
|
||||
message(DEPRECATION "ParseAndAddCatchTest: function deprecated because of possibility of missed test cases. Consider using 'catch_discover_tests' from 'Catch.cmake'")
|
||||
ParseAndAddCatchTests_PrintDebugMessage("Started parsing ${TestTarget}")
|
||||
get_target_property(SourceFiles ${TestTarget} SOURCES)
|
||||
ParseAndAddCatchTests_PrintDebugMessage("Found the following sources: ${SourceFiles}")
|
||||
foreach(SourceFile ${SourceFiles})
|
||||
ParseAndAddCatchTests_ParseFile(${SourceFile} ${TestTarget})
|
||||
endforeach()
|
||||
ParseAndAddCatchTests_PrintDebugMessage("Finished parsing ${TestTarget}")
|
||||
endfunction()
|
||||