Compare commits
774 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9a58b9072d | ||
|
b4e0674e2b | ||
|
aeedf286eb | ||
|
c52e7e4cdb | ||
|
b356798229 | ||
|
615b2ff5cb | ||
|
7176b7f0a9 | ||
|
5cd9e49629 | ||
|
30323c2d8a | ||
|
2aab17ba8e | ||
|
9236da101e | ||
|
d71bdb2fef | ||
|
76aa0461ad | ||
|
af2553294f | ||
|
873fe1297a | ||
|
f5749a5db2 | ||
|
07cb94b1bc | ||
|
f2952f783e | ||
|
eef99c9e39 | ||
|
8dbdf728b1 | ||
|
423e4df7b0 | ||
|
9d92201c0c | ||
|
635c490924 | ||
|
c24e90c978 | ||
|
efa3708e79 | ||
|
ee8a0d6691 | ||
|
75cea47cfa | ||
|
dcef395273 | ||
|
a9b792f603 | ||
|
d61f38a206 | ||
|
f03e74c777 | ||
|
12ac4079b1 | ||
|
9f087b7da3 | ||
|
fb06624821 | ||
|
5c11841cec | ||
|
ee583f20da | ||
|
ba3ce4bdb9 | ||
|
106bf6c08b | ||
|
8f9c03b3ad | ||
|
fca66bcf39 | ||
|
2be3e93d39 | ||
|
39549f776b | ||
|
b0c0667bde | ||
|
e7bdc077d2 | ||
|
f4cef4fff0 | ||
|
0172515a86 | ||
|
fd29a966eb | ||
|
d5df5f7676 | ||
|
6e19a85d73 | ||
|
f9a6775126 | ||
|
f6756682f1 | ||
|
e3e90744bf | ||
|
f27d3b9fe9 | ||
|
5f2791f2b3 | ||
|
d1b8b2851d | ||
|
03f6b416b6 | ||
|
af0fe52cd1 | ||
|
c59747e1e1 | ||
|
f878e47575 | ||
|
bc7aa1ebbd | ||
|
a16274ec43 | ||
|
e29b6ed2db | ||
|
3a9f0e9f86 | ||
|
b2c9028b54 | ||
|
caa8878b25 | ||
|
20ad274dae | ||
|
1370756e0a | ||
|
86cc828378 | ||
|
95f5d214c5 | ||
|
d546cc6156 | ||
|
e2698fecce | ||
|
8ca392464e | ||
|
7b9c3b8bb9 | ||
|
39b9086d17 | ||
|
456e57cf20 | ||
|
0b80cd65bd | ||
|
8ae2525ef4 | ||
|
85c1227b7f | ||
|
aafec62d45 | ||
|
597e459db1 | ||
|
9b4c826e10 | ||
|
31b8ca4cb6 | ||
|
2f5dd43e5b | ||
|
03c7c0e35f | ||
|
0e92d6913c | ||
|
da0385dfc6 | ||
|
1e6091189d | ||
|
428828426c | ||
|
f70183a0e9 | ||
|
864dc8d096 | ||
|
8dc7bca9dd | ||
|
f9442372d9 | ||
|
5bf79e1686 | ||
|
d1ee642c12 | ||
|
6b877e3364 | ||
|
6714865384 | ||
|
b2f2e063de | ||
|
2590ae4ece | ||
|
a564d53ff3 | ||
|
f3406e18b6 | ||
|
cd29484d52 | ||
|
cd0cb9efab | ||
|
303c32ba6f | ||
|
c07ab346f4 | ||
|
2cf8cd8b40 | ||
|
83b7de2d0b | ||
|
c5d7cbf2ef | ||
|
10f636e6ea | ||
|
5b9ab4b478 | ||
|
b2b836ff01 | ||
|
2f11b397dd | ||
|
0fab2a9836 | ||
|
bf765dfc2e | ||
|
8c29aeecfe | ||
|
43c4cebe12 | ||
|
3ede2ea281 | ||
|
e9b991e4c0 | ||
|
b37127858f | ||
|
d0e50a73f0 | ||
|
234fdf07ba | ||
|
0253f0c1d4 | ||
|
6cc864e669 | ||
|
d7e3272613 | ||
|
3fdbfbd670 | ||
|
b53c052cfb | ||
|
c47970f6c7 | ||
|
191dd48c87 | ||
|
ab221b2344 | ||
|
03451c9197 | ||
|
c2982e7312 | ||
|
9bac08deda | ||
|
c919455d3f | ||
|
9f1778a519 | ||
|
f5bf6279bb | ||
|
ad62bf87dc | ||
|
273eb9654f | ||
|
4c4af2658b | ||
|
5a64fc1361 | ||
|
0d23934200 | ||
|
7b154fbc12 | ||
|
7b773f4972 | ||
|
f16451196b | ||
|
73ffa506c7 | ||
|
18708f7c28 | ||
|
da1089bbd9 | ||
|
0a26584b98 | ||
|
3cee48dc15 | ||
|
917f904cbf | ||
|
1812477809 | ||
|
98c9ddf2b1 | ||
|
6f37e942ce | ||
|
ef5f96c104 | ||
|
0006acb408 | ||
|
451695faab | ||
|
925485d916 | ||
|
43194e777a | ||
|
08d268a961 | ||
|
1f7257e061 | ||
|
4b801849d3 | ||
|
ade334dec1 | ||
|
12d0dec63c | ||
|
aedc1b362d | ||
|
dc8f52076d | ||
|
f8d30b5d24 | ||
|
2fb1c0a817 | ||
|
dee9c14579 | ||
|
d0ccbf4416 | ||
|
04cbc78ff7 | ||
|
853c0a0170 | ||
|
0da5a958bb | ||
|
5566eddd05 | ||
|
968971a3cf | ||
|
2862b01691 | ||
|
b453c387cd | ||
|
efb8d14ec9 | ||
|
4401fe15ac | ||
|
06e00a83c8 | ||
|
44585933dc | ||
|
1f7f360d36 | ||
|
986bc1119a | ||
|
fac969d39b | ||
|
bcd90a81be | ||
|
e2fac74d1d | ||
|
4634651d52 | ||
|
272a67b703 | ||
|
15c02540d6 | ||
|
7ac7925ec6 | ||
|
350be106c6 | ||
|
bc9befa8a6 | ||
|
aeef7345af | ||
|
66c6cd56a8 | ||
|
d2631cf775 | ||
|
1d6153044c | ||
|
f171c8901b | ||
|
eade3c5f26 | ||
|
06f33c5d81 | ||
|
2e69f91671 | ||
|
9c30600793 | ||
|
9cd07349dc | ||
|
733e06b372 | ||
|
7ba8581ac3 | ||
|
7b4c425ec5 | ||
|
f2eb8a7a75 | ||
|
48d029468d | ||
|
47158465d9 | ||
|
012b72d4fd | ||
|
12462ead58 | ||
|
6118432dd7 | ||
|
6c8252cefb | ||
|
5c732098f7 | ||
|
cdcc6516df | ||
|
1987b4c378 | ||
|
942e5f892b | ||
|
2c08d2d186 | ||
|
e8430e0501 | ||
|
7adb08f701 | ||
|
7258f05070 | ||
|
5294922a02 | ||
|
9944534581 | ||
|
1b74430ea2 | ||
|
b8f6192014 | ||
|
0c5536bf78 | ||
|
d657c43d72 | ||
|
84f6fa9b33 | ||
|
e36037a45e | ||
|
f982689443 | ||
|
e1cdc4820a | ||
|
8b2ade25de | ||
|
8c3745896c | ||
|
3a6abc3f5e | ||
|
aaebdc6a4b | ||
|
b4eda751e0 | ||
|
81c85b3fd5 | ||
|
5f67b3453b | ||
|
31c3c50292 | ||
|
6e06e36573 | ||
|
d7d883cd3c | ||
|
8b3e1dc372 | ||
|
fcb9eb33e4 | ||
|
5a9425a930 | ||
|
7b43376e61 | ||
|
08c78dbd97 | ||
|
fa18cf9ced | ||
|
8d039cdc91 | ||
|
f751c1559b | ||
|
18101c32b0 | ||
|
2c8eaef8ff | ||
|
4638b7c21a | ||
|
40c3196a4f | ||
|
ebd78c06b0 | ||
|
3bc05bc73b | ||
|
59b64bfdd9 | ||
|
3dc317377f | ||
|
231c2569f6 | ||
|
948631846e | ||
|
e2890c1e93 | ||
|
d8023b285f | ||
|
607ebf1c24 | ||
|
188b14de39 | ||
|
5d098438c0 | ||
|
b7d2d129c8 | ||
|
d96061bd0d | ||
|
f774ae4731 | ||
|
c854a090e6 | ||
|
aa9a3124ef | ||
|
8b229dd4e3 | ||
|
a2a2f036a2 | ||
|
20045b2e14 | ||
|
f4508fc79a | ||
|
255b251230 | ||
|
af0ac5a848 | ||
|
208bbb49b7 | ||
|
a81bca6ce1 | ||
|
bcfea87607 | ||
|
1a1c9a68ed | ||
|
7d1067dafa | ||
|
ea5cefd2d4 | ||
|
81fe1c8061 | ||
|
33530084b0 | ||
|
7be0cdb714 | ||
|
3b734df57e | ||
|
eb31702711 | ||
|
811ac70fa6 | ||
|
7f26f34fdd | ||
|
63738b58c0 | ||
|
de28596438 | ||
|
97ca55fd53 | ||
|
52c2fd2a5a | ||
|
c72f6cf508 | ||
|
dd4d268c11 | ||
|
ea7e8f6ede | ||
|
e1aee9b299 | ||
|
6531c9f1e4 | ||
|
ec4961394a | ||
|
b8bb29161f | ||
|
a8ad8cd774 | ||
|
e802201341 | ||
|
fe478a0759 | ||
|
7a595aaa76 | ||
|
e001c6a197 | ||
|
b42e36a240 | ||
|
48246e9ec1 | ||
|
3b84824f11 | ||
|
93212251b6 | ||
|
e615362672 | ||
|
d4109d8575 | ||
|
8b2ce768d1 | ||
|
e6819d48a8 | ||
|
44173808cb | ||
|
6239f90cf0 | ||
|
117bff483d | ||
|
5b961e1a58 | ||
|
2772e69a40 | ||
|
99563bfde6 | ||
|
137c608fa2 | ||
|
7330c9364d | ||
|
bbfd4c91e7 | ||
|
085e6f11bd | ||
|
5b0ed433f5 | ||
|
bc1ce656ae | ||
|
8b95f7330b | ||
|
0f47027c9c | ||
|
aec8c97eac | ||
|
aff34374cb | ||
|
1bb69c0fc9 | ||
|
bbbd1a48bb | ||
|
1bde1fe1bb | ||
|
40d3b87af5 | ||
|
59d72df046 | ||
|
58692f424d | ||
|
81065243f4 | ||
|
92f23bc20b | ||
|
9ed8caf277 | ||
|
68a3df17c4 | ||
|
55be3010e5 | ||
|
e8be8e95b5 | ||
|
819fc4881e | ||
|
0d43d54c3b | ||
|
6340b82921 | ||
|
d6c73e44e0 | ||
|
ea159cb2f4 | ||
|
a8441ffb4c | ||
|
26d383eeab | ||
|
eba947854b | ||
|
e863324c40 | ||
|
2b408744d7 | ||
|
24f58b45d3 | ||
|
d5c182c151 | ||
|
7f7c55a293 | ||
|
e8f2eedcb9 | ||
|
4c3f5b0399 | ||
|
5379d35084 | ||
|
82a5058e4c | ||
|
af49afac35 | ||
|
032e6f8d6f | ||
|
2a4b0b2956 | ||
|
c2b7ea9411 | ||
|
ab2e91fdd6 | ||
|
683d4a4529 | ||
|
3f3a2798c7 | ||
|
4768f9acd7 | ||
|
2a39355fb6 | ||
|
eec9283aff | ||
|
9dae7ded86 | ||
|
fca9da24cf | ||
|
dfc518cedc | ||
|
5b6317b282 | ||
|
1ce8c7dc3e | ||
|
37b9dea002 | ||
|
a9eb684a8b | ||
|
8004eb08c3 | ||
|
1b656fe874 | ||
|
750331d920 | ||
|
63b1f4eae7 | ||
|
4fb41ff417 | ||
|
2d2426732c | ||
|
3d0d61524f | ||
|
5b633a25ee | ||
|
a765937c9b | ||
|
c724205531 | ||
|
6be3027be5 | ||
|
cfff4a91cb | ||
|
2af7c9f18e | ||
|
bba33f0bf8 | ||
|
48f1745614 | ||
|
e2f0bc6c17 | ||
|
b2a0e41eab | ||
|
bf0b58fe60 | ||
|
eb8a4f6711 | ||
|
2380838347 | ||
|
e673c01d3c | ||
|
33e940f708 | ||
|
8d777ff6a9 | ||
|
3f740ce4a0 | ||
|
6945b503cf | ||
|
033987eedb | ||
|
2507f8306c | ||
|
dd685d600d | ||
|
41f1ac9713 | ||
|
056efe2cd9 | ||
|
519e1bb71e | ||
|
632889b590 | ||
|
062cf35324 | ||
|
8cdc9931b1 | ||
|
e6c7a73110 | ||
|
6a323832a9 | ||
|
02272c0f87 | ||
|
7239d3fdfd | ||
|
e3aa497b62 | ||
|
4ffe635486 | ||
|
695e029709 | ||
|
89606c49d4 | ||
|
a8253c4abd | ||
|
dd5c7b0af4 | ||
|
15014f137b | ||
|
7b10f99b53 | ||
|
48265c8262 | ||
|
34ac2b6b86 | ||
|
a8d8a485e5 | ||
|
ae36ce956a | ||
|
1640872bd9 | ||
|
127548e3a2 | ||
|
61bf30de57 | ||
|
d727f3a319 | ||
|
3e20fd1f6a | ||
|
990e160a2e | ||
|
74b310eb00 | ||
|
3182a294d7 | ||
|
84019e5d11 | ||
|
26be5c954d | ||
|
d9a4b71414 | ||
|
ddb7e012df | ||
|
47fd7b8285 | ||
|
def3e3d868 | ||
|
e36b6bd41e | ||
|
439521424b | ||
|
af9d2d388c | ||
|
2e80475a9d | ||
|
cbd5196080 | ||
|
d87398c47a | ||
|
248e3e7a4a | ||
|
edaabc0ae6 | ||
|
9310755e92 | ||
|
66358d2103 | ||
|
b916125756 | ||
|
d391b9bd66 | ||
|
b9f80edea9 | ||
|
43834a17bc | ||
|
af0b7f9a74 | ||
|
ed93084315 | ||
|
04b4c69ab3 | ||
|
01980ab6d1 | ||
|
35d51a2cd2 | ||
|
309024a467 | ||
|
8bafe8bb9a | ||
|
5b01ae5268 | ||
|
b52b87f818 | ||
|
22de39b96a | ||
|
4eaff359f0 | ||
|
9ee970489c | ||
|
2f7167037a | ||
|
ed27dcdeec | ||
|
4f5948db71 | ||
|
3378b1ef82 | ||
|
e13bd93a58 | ||
|
cadc72da2e | ||
|
5610abfcde | ||
|
3254e602e3 | ||
|
7f570c325d | ||
|
f7c440ed4f | ||
|
5334dbf037 | ||
|
9202113a43 | ||
|
cdd3684dba | ||
|
ed2c1513a8 | ||
|
fe08bf2175 | ||
|
ab72ee2302 | ||
|
dca94f864d | ||
|
1ecb799694 | ||
|
e503f74db1 | ||
|
3671f35928 | ||
|
dde278a1cc | ||
|
db4fc8bd03 | ||
|
71a3f223c2 | ||
|
aad9dd4d75 | ||
|
5e38fc5725 | ||
|
abd5c3c567 | ||
|
66e3d07aee | ||
|
9af6ff7911 | ||
|
04d30913f9 | ||
|
df8a333aee | ||
|
f16277ac5f | ||
|
ab964957d2 | ||
|
ef1ded8636 | ||
|
fe43c1dd01 | ||
|
714c306032 | ||
|
4b13467e4c | ||
|
3ce41c50bc | ||
|
8231127a3b | ||
|
3e05151008 | ||
|
f5219525b4 | ||
|
e3c90784e1 | ||
|
9f4c3bb461 | ||
|
43a08b7957 | ||
|
d4745e1e40 | ||
|
f2308beb18 | ||
|
1c409e40f2 | ||
|
34fe17a3e6 | ||
|
9b5be063bd | ||
|
9d28c11089 | ||
|
e76ca1fdef | ||
|
aca94b1b55 | ||
|
b214dd01f8 | ||
|
800c06e678 | ||
|
d3ca52cba3 | ||
|
5455ee0f21 | ||
|
e2a3c48e6e | ||
|
4a6bc942fa | ||
|
0c3ec4a6cf | ||
|
3b873dfeda | ||
|
0d6c335e45 | ||
|
f5f16b6b26 | ||
|
79542e60e6 | ||
|
24d9cce3a8 | ||
|
b3eaa1a761 | ||
|
1cb3516dc6 | ||
|
c24a95e49f | ||
|
4095f4b5aa | ||
|
5235cc9093 | ||
|
41c553fac7 | ||
|
a9a9ffa40f | ||
|
252a48196c | ||
|
5ae0a7138c | ||
|
c0994e3c24 | ||
|
7639d8da9e | ||
|
a13388f2c4 | ||
|
bf744ac8bb | ||
|
db6a93e55c | ||
|
196397f210 | ||
|
80c8e61cf8 | ||
|
c6442e4dfd | ||
|
3b3ff063dc | ||
|
87c554c6f0 | ||
|
83909e53f9 | ||
|
8690a76df7 | ||
|
0c52b37bb2 | ||
|
621770eada | ||
|
17c1cdc2c1 | ||
|
d5f21dc9f2 | ||
|
01befb0955 | ||
|
495621b715 | ||
|
51a3eb39be | ||
|
60142eb92d | ||
|
c1385761b6 | ||
|
ab2443792a | ||
|
dc43452bfc | ||
|
17733fea1d | ||
|
69011e3f90 | ||
|
3d93a82d08 | ||
|
a1848f46bd | ||
|
1ef9b7c241 | ||
|
47fb4f3b50 | ||
|
73d88dcf7b | ||
|
394f3ee383 | ||
|
a52ecfb5b8 | ||
|
db8088b30f | ||
|
baa039bbf6 | ||
|
da7a45950a | ||
|
b87732e9c6 | ||
|
f8619d4aa5 | ||
|
f8452b4fdc | ||
|
9d95644b9f | ||
|
e944293d02 | ||
|
8881fab205 | ||
|
806b3a3281 | ||
|
4cb2532fab | ||
|
3a0874bcdd | ||
|
0cfb98b0af | ||
|
16eb50e02d | ||
|
e7ddedef5a | ||
|
b6d12701e7 | ||
|
9cc74abccc | ||
|
63d7fc0b38 | ||
|
87e813e215 | ||
|
fdc2f5d3e9 | ||
|
f2c74f4ddb | ||
|
b08f4f1daf | ||
|
92bc03ee3e | ||
|
60b9d48d73 | ||
|
5e2d196ba0 | ||
|
16fd65667f | ||
|
74fd092355 | ||
|
f66a062796 | ||
|
8729c91c95 | ||
|
680b204d11 | ||
|
2b85beb704 | ||
|
1da0a34d89 | ||
|
daa822cd14 | ||
|
c3df88d0f8 | ||
|
743575b91a | ||
|
a848561e60 | ||
|
d2e867b9ee | ||
|
ea744456c9 | ||
|
5255fd2a78 | ||
|
0a593aeb05 | ||
|
6af30bfd2f | ||
|
01f2fe6adc | ||
|
2214b750be | ||
|
569c23a30e | ||
|
3bc496eaaf | ||
|
d818a7f697 | ||
|
06f0dd8768 | ||
|
de92b0b726 | ||
|
47451e4fba | ||
|
0c4e304ee5 | ||
|
14f5508140 | ||
|
59391e3841 | ||
|
a55124ed75 | ||
|
543c3125ac | ||
|
f5ba469b0a | ||
|
56deed391e | ||
|
a05795bf6b | ||
|
b6d6969281 | ||
|
492c2acf18 | ||
|
ff0d5613bb | ||
|
8fbcf0cec9 | ||
|
6386611871 | ||
|
f52205d2cc | ||
|
35c2fccd6c | ||
|
c61813915d | ||
|
77e37bb325 | ||
|
52fcc7b53f | ||
|
3657579c32 | ||
|
b8721ad75a | ||
|
f767818966 | ||
|
a09167050f | ||
|
3d25e6aefe | ||
|
de4df0060e | ||
|
b59399aecb | ||
|
0a0e27c717 | ||
|
7c8b65a1d3 | ||
|
b70491cc63 | ||
|
e968298d7d | ||
|
6a605789e1 | ||
|
942cc89a22 | ||
|
8d7f4a193b | ||
|
40b202df74 | ||
|
81141e4d50 | ||
|
e4fefe0600 | ||
|
896d6ad9f4 | ||
|
ae5fa0c33a | ||
|
4f0322ec2f | ||
|
1dd0f26fff | ||
|
1e3fe13a5b | ||
|
dd61f4a3cc | ||
|
9b71d1df0a | ||
|
f198cf51cc | ||
|
b6442ae76c | ||
|
7b714f1735 | ||
|
b9d218b823 | ||
|
1cd969af7f | ||
|
e590aa7739 | ||
|
ecd8b302c4 | ||
|
db4f514181 | ||
|
21eea9f0de | ||
|
8d471ae1f1 | ||
|
96b4fbccc6 | ||
|
250202a095 | ||
|
cedcfdb714 | ||
|
2d5f8307d4 | ||
|
a54d38ed68 | ||
|
5167891846 | ||
|
d687219055 | ||
|
dffcd89c7c | ||
|
cb405cde15 | ||
|
1697b27aca | ||
|
f16812143f | ||
|
8faa782650 | ||
|
3182df93dd | ||
|
575ee1548a | ||
|
5c09fd2360 | ||
|
0530faf15c | ||
|
74ea476ad6 | ||
|
6b7300c1b3 | ||
|
376d543fd1 | ||
|
c90a875de7 | ||
|
247c65fbcc | ||
|
f6d4e0c63a | ||
|
db7b2d2523 | ||
|
ed0574f6b7 | ||
|
6b1bb4da61 | ||
|
81f4ec2337 | ||
|
8568245355 | ||
|
e824fcc7b3 | ||
|
efaf180b80 | ||
|
9e20674b84 | ||
|
89c3f266a7 | ||
|
3ba36fc38e | ||
|
f78df2c087 | ||
|
b252418074 | ||
|
5e9ea36228 | ||
|
1ac61194cf | ||
|
cffa96a81f | ||
|
d4569b1d38 | ||
|
8791a6dbdc | ||
|
84f6886e8d | ||
|
b625b9a265 | ||
|
40d4636352 | ||
|
37f29966a8 | ||
|
a080323e2e | ||
|
727d8c83ef | ||
|
5cde25cefe | ||
|
70ddc32e42 | ||
|
48f69c3180 | ||
|
85be5653e5 | ||
|
811c7b8754 | ||
|
b7a1cb8d99 | ||
|
254aacdf76 | ||
|
d4fbbc92d3 | ||
|
c0dbd7678e | ||
|
286dc813dd | ||
|
e2bad14bee | ||
|
ca25beddbc | ||
|
0c3ddf8e84 | ||
|
df4c7afad2 | ||
|
dc277a82f7 | ||
|
26c6e9f5b3 | ||
|
eb95158ee3 | ||
|
f710d6d48f | ||
|
5e82beb51b | ||
|
dd7a527277 | ||
|
eeef965aec | ||
|
393b860a3d | ||
|
7a4e196b79 | ||
|
671cbc627c | ||
|
bbebc8b0fb | ||
|
0b9326a9d4 | ||
|
a91d0b3ea7 | ||
|
d79db494ef | ||
|
d745bd5d56 | ||
|
4c46055e88 | ||
|
49e59e7ac9 | ||
|
3fb7d07a32 | ||
|
fbee3325be | ||
|
86cd01cc04 | ||
|
f0563d1e0f | ||
|
ef23f5bee1 | ||
|
d573b3bf9e | ||
|
fd70ca0a1b | ||
|
6e0c84a944 | ||
|
02a6adb22b | ||
|
2e0f72650a | ||
|
23e6670edf | ||
|
c6d3599e47 | ||
|
1073b7e194 | ||
|
ad3e9a0304 | ||
|
be268933e5 | ||
|
c94c232c53 | ||
|
0e6bd91ba8 | ||
|
92348266c2 | ||
|
06d56aaa33 | ||
|
a61ee6433b | ||
|
0de2211dde | ||
|
82b8892b99 | ||
|
11caacb96c | ||
|
c50f0626db | ||
|
755c091a56 | ||
|
7163b33af7 | ||
|
f1d9c5c8ee | ||
|
413c3ed36e | ||
|
f82f98785f | ||
|
876e3333de | ||
|
876a11a1e4 | ||
|
41512c4b61 | ||
|
b3d0a577bb |
2
.gitignore
vendored
@@ -10,3 +10,5 @@ moc_*
|
||||
*~
|
||||
/tomahawk
|
||||
thirdparty/qtweetlib/WARNING-twitter-api-keys
|
||||
.kdev4
|
||||
tomahawk.kdev4
|
||||
|
5
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "thirdparty/jreen"]
|
||||
path = thirdparty/jreen
|
||||
url = git://gitorious.org/jreen/jreen.git
|
||||
url = git://github.com/euroelessar/jreen.git
|
||||
[submodule "thirdparty/qtweetlib/QTweetLib"]
|
||||
path = thirdparty/qtweetlib/QTweetLib
|
||||
url = git://github.com/minimoog/QTweetLib.git
|
||||
|
111
CMakeLists.txt
@@ -1,18 +1,25 @@
|
||||
PROJECT( tomahawk )
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
|
||||
|
||||
IF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
|
||||
CMAKE_POLICY(SET CMP0017 NEW)
|
||||
ENDIF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
|
||||
|
||||
###
|
||||
### Tomahawk application info
|
||||
###
|
||||
SET( ORGANIZATION_NAME "Tomahawk" )
|
||||
SET( ORGANIZATION_DOMAIN "tomahawk-player.org" )
|
||||
SET( APPLICATION_NAME "Tomahawk" )
|
||||
SET( VERSION "0.0.2" )
|
||||
SET( TOMAHAWK_ORGANIZATION_NAME "Tomahawk" )
|
||||
SET( TOMAHAWK_ORGANIZATION_DOMAIN "tomahawk-player.org" )
|
||||
SET( TOMAHAWK_APPLICATION_NAME "Tomahawk" )
|
||||
SET( TOMAHAWK_VERSION "0.1.0" )
|
||||
|
||||
|
||||
# set paths
|
||||
SET( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/CMakeModules" )
|
||||
SET( THIRDPARTY_DIR ${CMAKE_SOURCE_DIR}/thirdparty )
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
|
||||
# Check if we need qtgui:
|
||||
IF( "${gui}" STREQUAL "no" )
|
||||
@@ -29,11 +36,20 @@ INCLUDE( MacroOptionalFindPackage )
|
||||
INCLUDE( MacroLogFeature )
|
||||
|
||||
# required
|
||||
macro_optional_find_package(LibLastFm 0.3.3)
|
||||
macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||
#While we distribute our own liblastfm2, don't need to look for it
|
||||
#macro_optional_find_package(LibLastFm 0.3.3)
|
||||
#macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||
set(LIBLASTFM_FOUND true)
|
||||
|
||||
macro_optional_find_package(LibEchonest 1.1.1)
|
||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest is needed for dynamic playlists and the infosystem")
|
||||
find_package(Phonon REQUIRED)
|
||||
if(PHONON_VERSION STRLESS "4.5.0")
|
||||
message(FATAL_ERROR "Phonon version 4.5.0 or higher is required, you have version ${PHONON_VERSION}")
|
||||
else()
|
||||
message(STATUS "Phonon found; ensure that phonon-vlc is at least 0.4")
|
||||
endif()
|
||||
|
||||
macro_optional_find_package(LibEchonest 1.1.7)
|
||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 1.1.8 is needed for dynamic playlists and the infosystem")
|
||||
|
||||
macro_optional_find_package(CLucene 0.9.23)
|
||||
macro_log_feature(CLucene_FOUND "CLucene" "The open-source, C++ search engine" "http://clucene.sf.net" TRUE "" "CLucene is used for indexing the collection")
|
||||
@@ -44,45 +60,62 @@ macro_log_feature(QJSON_FOUND "QJson" "Qt library that maps JSON data to QVarian
|
||||
macro_optional_find_package(Taglib 1.6.0)
|
||||
macro_log_feature(TAGLIB_FOUND "TagLib" "Audio Meta-Data Library" "http://developer.kde.org/~wheeler/taglib.html" TRUE "" "taglib is needed for reading meta data from audio files")
|
||||
|
||||
# this installs headers and such and should really be handled in a separate package by packagers
|
||||
IF( INTERNAL_JREEN )
|
||||
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/jreen )
|
||||
SET( LIBJREEN_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/include )
|
||||
SET( LIBJREEN_LIBRARY jreen )
|
||||
SET( LIBJREEN_LIBRARIES ${LIBJREEN_LIBRARY} )
|
||||
SET( LIBJREEN_FOUND true )
|
||||
MESSAGE(STATUS "INTERNAL libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
|
||||
ELSE( INTERNAL_JREEN )
|
||||
macro_optional_find_package(Jreen)
|
||||
ENDIF( INTERNAL_JREEN )
|
||||
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "http://gitorious.org/jreen/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin. \n\n Use -DINTERNAL_JREEN=ON to build the git submodule inside Tomahawk \n Be aware this installs a full jreen with headers and everything!\n")
|
||||
|
||||
# this installs headers and such and should really be handled in a separate package by packagers
|
||||
IF( INTERNAL_QTWEETLIB )
|
||||
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/qtweetlib )
|
||||
# copy headers to build/QTweetLib so we can use proper includes inside the code
|
||||
FILE( COPY ${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/QTweetLib/src/ DESTINATION ${CMAKE_BINARY_DIR}/QTweetLib )
|
||||
SET( QTWEETLIB_INCLUDE_DIR ${CMAKE_BINARY_DIR} )
|
||||
SET( QTWEETLIB_LIBRARY tomahawk_qtweetlib )
|
||||
SET( QTWEETLIB_LIBRARIES ${QTWEETLIB_LIBRARY} )
|
||||
SET( QTWEETLIB_FOUND true )
|
||||
MESSAGE(STATUS "INTERNAL libQTweetLib: ${QTWEETLIB_INCLUDE_DIR}, ${QTWEETLIB_LIBRARY}")
|
||||
ELSE( INTERNAL_QTWEETLIB )
|
||||
macro_optional_find_package(QTweetLib)
|
||||
ENDIF( INTERNAL_QTWEETLIB )
|
||||
macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://github.com/minimoog/QTweetLib" FALSE "" "QTweetLib is needed for the Twitter SIP plugin. \n\n Use -DINTERNAL_QTWEETLIB=ON to build the git submodule inside Tomahawk \n")
|
||||
|
||||
### libportfwd
|
||||
SET( LIBPORTFWD_INCLUDE_DIR ${THIRDPARTY_DIR}/libportfwd/include )
|
||||
SET( LIBPORTFWD_LIBRARY tomahawk_portfwd )
|
||||
SET( LIBPORTFWD_LIBRARIES ${LIBPORTFWD_LIBRARY} )
|
||||
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/libportfwd )
|
||||
|
||||
# we need pthreads too
|
||||
find_package(Threads)
|
||||
|
||||
find_package(KDE4Installed)
|
||||
find_package(KDE4)
|
||||
IF(KDE4_FOUND)
|
||||
#KDE4 adds and removes some compiler flags that we don't like
|
||||
STRING( REPLACE "-std=iso9899:1990" "" CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
|
||||
ELSE()
|
||||
SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
ENDIF()
|
||||
|
||||
include( CheckTagLibFileName )
|
||||
check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
|
||||
|
||||
# optional
|
||||
macro_optional_find_package(Jreen)
|
||||
IF( ENABLE_JREEN AND NOT LIBJREEN_FOUND )
|
||||
ADD_SUBDIRECTORY( thirdparty/jreen )
|
||||
SET( LIBJREEN_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/include )
|
||||
IF( UNIX AND NOT APPLE )
|
||||
SET( LIBJREEN_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/libjreen.so )
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
IF( WIN32 )
|
||||
SET( LIBJREEN_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/libjreen.dll )
|
||||
ENDIF( WIN32 )
|
||||
SET( LIBJREEN_FOUND true )
|
||||
MESSAGE(STATUS "Internal libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
|
||||
ENDIF( ENABLE_JREEN AND NOT LIBJREEN_FOUND )
|
||||
|
||||
IF( WIN32 )
|
||||
find_library(QTSPARKLE_LIBRARIES qtsparkle)
|
||||
ENDIF( WIN32 )
|
||||
|
||||
macro_log_feature(JREEN_FOUND "Jreen" "Qt XMPP library" "http://gitorious.org/jreen" FALSE "" "Jreen is needed for the alternative/new Jabber SIP plugin. Built automatically inside Tomahawk, if not installed systemwide and ENABLE_JREEN is true")
|
||||
|
||||
macro_optional_find_package(Gloox 1.0)
|
||||
IF( ENABLE_JREEN )
|
||||
set( GLOOX_FOUND false )
|
||||
ENDIF( ENABLE_JREEN)
|
||||
macro_log_feature(GLOOX_FOUND "Gloox" "A portable high-level Jabber/XMPP library for C++" "http://camaya.net/gloox" FALSE "" "Gloox is needed for the Jabber SIP plugin and the XMPP-Bot")
|
||||
#show dep log
|
||||
macro_display_feature_log()
|
||||
MESSAGE("WARNING!")
|
||||
MESSAGE("Phonon is going to replace our own audio abstraction layer soon so we didn't")
|
||||
MESSAGE("add checks for libmad, libvorbis and libflac. Make sure they are installed!")
|
||||
MESSAGE("")
|
||||
MESSAGE("-----------------------------------------------------------------------------")
|
||||
|
||||
SET( INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
|
||||
|
||||
@@ -92,9 +125,10 @@ CONFIGURE_FILE(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
ADD_CUSTOM_TARGET(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
# KDE4 defines an uninstall target for us automatically
|
||||
IF( NOT KDE4_FOUND )
|
||||
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
ENDIF()
|
||||
|
||||
IF( NOT APPLE )
|
||||
# Make linking as strict on linux as it is on osx. Then we don't break linking on mac so often
|
||||
@@ -103,5 +137,6 @@ ENDIF( NOT APPLE )
|
||||
|
||||
ADD_SUBDIRECTORY( thirdparty )
|
||||
ADD_SUBDIRECTORY( src/libtomahawk )
|
||||
SET( TOMAHAWK_LIBRARIES tomahawklib )
|
||||
ADD_SUBDIRECTORY( src )
|
||||
ADD_SUBDIRECTORY( admin )
|
||||
|
@@ -6,15 +6,15 @@
|
||||
# LIBJREEN_FOUND, whether libjreen was found
|
||||
|
||||
|
||||
find_path(LIBJREEN_INCLUDE_DIR NAMES jreen.h
|
||||
find_path(LIBJREEN_INCLUDE_DIR NAMES jreen/jreen.h
|
||||
HINTS
|
||||
~/usr/include
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/kde4/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES jreen
|
||||
)
|
||||
|
||||
find_library( LIBJREEN_LIBRARY NAMES jreen
|
||||
@@ -25,6 +25,8 @@ find_library( LIBJREEN_LIBRARY NAMES jreen
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/opt/kde4/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
@@ -33,7 +35,7 @@ if(LIBJREEN_INCLUDE_DIR AND LIBJREEN_LIBRARY)
|
||||
set(LIBJREEN_FOUND TRUE)
|
||||
message(STATUS "Found libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
|
||||
else(LIBJREEN_INCLUDE_DIR AND LIBJREEN_LIBRARY)
|
||||
set(LIBJREEN_FOUND FALSE)
|
||||
set(LIBJREEN_FOUND FALSE)
|
||||
if (LIBJREEN_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find required package libjreen")
|
||||
endif(LIBJREEN_FIND_REQUIRED)
|
||||
|
20
CMakeModules/FindKDE4Installed.cmake
Normal file
@@ -0,0 +1,20 @@
|
||||
# Simple hack to detect wether KDE4 is *installed* -- not anything about the development environment!
|
||||
|
||||
FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
|
||||
|
||||
# For KDE4 kde-config has been renamed to kde4-config
|
||||
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
|
||||
# the suffix must be used since KDEDIRS can be a list of directories which don't have bin/ appended
|
||||
PATH_SUFFIXES bin
|
||||
HINTS
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
${_KDEDIRS}
|
||||
/opt/kde4
|
||||
ONLY_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
|
||||
IF (KDE4_KDECONFIG_EXECUTABLE)
|
||||
SET (KDE4_INSTALLED TRUE)
|
||||
message(STATUS "KDE4 is installed, will install protocol file")
|
||||
ENDIF (KDE4_KDECONFIG_EXECUTABLE)
|
||||
|
71
CMakeModules/FindPhonon.cmake
Normal file
@@ -0,0 +1,71 @@
|
||||
# Find libphonon
|
||||
# Once done this will define
|
||||
#
|
||||
# PHONON_FOUND - system has Phonon Library
|
||||
# PHONON_INCLUDES - the Phonon include directory
|
||||
# PHONON_LIBS - link these to use Phonon
|
||||
# PHONON_VERSION - the version of the Phonon Library
|
||||
|
||||
# Copyright (c) 2008, Matthias Kretz <kretz@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
macro(_phonon_find_version)
|
||||
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h")
|
||||
if (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
|
||||
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
|
||||
endif (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
|
||||
file(READ ${_phonon_namespace_header_file} _phonon_header LIMIT 5000 OFFSET 1000)
|
||||
string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}")
|
||||
set(PHONON_VERSION "${CMAKE_MATCH_1}")
|
||||
message(STATUS "Phonon Version: ${PHONON_VERSION}")
|
||||
endmacro(_phonon_find_version)
|
||||
|
||||
if(PHONON_FOUND)
|
||||
# Already found, nothing more to do except figuring out the version
|
||||
_phonon_find_version()
|
||||
else(PHONON_FOUND)
|
||||
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
||||
set(PHONON_FIND_QUIETLY TRUE)
|
||||
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
||||
|
||||
# As discussed on kde-buildsystem: first look at CMAKE_PREFIX_PATH, then at the suggested PATHS (kde4 install dir)
|
||||
find_library(PHONON_LIBRARY NAMES phonon phonon4 PATHS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR})
|
||||
# then at the default system locations (CMAKE_SYSTEM_PREFIX_PATH, i.e. /usr etc.)
|
||||
find_library(PHONON_LIBRARY NAMES phonon phonon4)
|
||||
|
||||
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATHS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR})
|
||||
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h)
|
||||
|
||||
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
||||
set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
|
||||
set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
|
||||
set(PHONON_FOUND TRUE)
|
||||
_phonon_find_version()
|
||||
else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
||||
set(PHONON_FOUND FALSE)
|
||||
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
||||
|
||||
if(PHONON_FOUND)
|
||||
if(NOT PHONON_FIND_QUIETLY)
|
||||
message(STATUS "Found Phonon: ${PHONON_LIBRARY}")
|
||||
message(STATUS "Found Phonon Includes: ${PHONON_INCLUDES}")
|
||||
endif(NOT PHONON_FIND_QUIETLY)
|
||||
else(PHONON_FOUND)
|
||||
if(Phonon_FIND_REQUIRED)
|
||||
if(NOT PHONON_INCLUDE_DIR)
|
||||
message(STATUS "Phonon includes NOT found!")
|
||||
endif(NOT PHONON_INCLUDE_DIR)
|
||||
if(NOT PHONON_LIBRARY)
|
||||
message(STATUS "Phonon library NOT found!")
|
||||
endif(NOT PHONON_LIBRARY)
|
||||
message(FATAL_ERROR "Phonon library or includes NOT found!")
|
||||
else(Phonon_FIND_REQUIRED)
|
||||
message(STATUS "Unable to find Phonon")
|
||||
endif(Phonon_FIND_REQUIRED)
|
||||
endif(PHONON_FOUND)
|
||||
|
||||
|
||||
mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY PHONON_INCLUDES)
|
||||
endif(PHONON_FOUND)
|
@@ -43,4 +43,8 @@ else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)
|
||||
|
||||
if ( UNIX AND NOT APPLE )
|
||||
set ( QJSON_LIBRARIES "${QJSON_LIBRARIES} ${QJSON_LDFLAGS}" CACHE INTERNAL "")
|
||||
endif ()
|
||||
|
||||
endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
|
||||
|
31
CMakeModules/FindQTweetLib.cmake
Normal file
@@ -0,0 +1,31 @@
|
||||
# - Try to find QTweetLib
|
||||
#
|
||||
# QTWEETLIB_FOUND - system has QTweetLib
|
||||
# QTWEETLIB_INCLUDE_DIRS - the QTweetLib include directories
|
||||
# QTWEETLIB_LIBRARIES - link these to use QTweetLib
|
||||
#
|
||||
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
#
|
||||
|
||||
# Dependencies
|
||||
find_package(Qt4 REQUIRED)
|
||||
|
||||
# Include dir
|
||||
find_path(QTWEETLIB_INCLUDE_DIR
|
||||
NAMES QTweetLib/qtweetlib_global.h
|
||||
PATHS ${KDE4_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
# Finally the library itself
|
||||
find_library(QTWEETLIB_LIBRARY
|
||||
NAMES QTweetLib
|
||||
PATHS ${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
SET( QTWEETLIB_LIBRARIES ${QTWEETLIB_LIBRARY} ${QJSON_LIBRARIES} )
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QTweetLib DEFAULT_MSG QTWEETLIB_LIBRARY QTWEETLIB_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(QTWEETLIB_LIBRARIES QTWEETLIB_INCLUDE_DIR)
|
||||
|
63
ChangeLog
@@ -1,3 +1,65 @@
|
||||
Version 0.1.0:
|
||||
* Fixed stations so they resolve against all available sources instead of
|
||||
only local and friend's collections.
|
||||
* Add a Song seed for stations and automatic playlists, and allow dragging of
|
||||
any tracks to the New Stations entry to create a pre-seeded station.
|
||||
* Added auto-completion for artists while filling in a station or automatic
|
||||
playlist.
|
||||
* SOCKS5 proxy support. Noproxy hosts are also supported but no wildcard
|
||||
support (yet).
|
||||
* Support loading of - and exporting to - .xspf playlists
|
||||
* Added Tomahawk:// protocol support and share links for many things including
|
||||
tracks, playlists, and stations.
|
||||
* Autoload automatically detected resolvers on startup.
|
||||
* Fix issue where track resolving spinner never stopped if tracks were
|
||||
removed from playlist while resolving.
|
||||
* Twitter & Jabber profile pictures are shown.
|
||||
* Fix issues with stations where multiple tracks could be added at once.
|
||||
* Allow multiple accounts of the same type.
|
||||
* Add new Google account type that is a thin wrapper around a Jabber plugin.
|
||||
* Overhaul the settings dialog interface.
|
||||
* Resolvers can now be enabled and disabled, and some can be configured
|
||||
directly in Tomahawk, for example the new Spotify resolver.
|
||||
* Split playlists and stations in sources sidebar. Show Recently Played
|
||||
as a node under the Super Collection.
|
||||
* Fix massive speed bottleneck on startup in the case of many recently
|
||||
played playlists.
|
||||
* Removed filter and song view from Super Collection, coming back in the next
|
||||
release.
|
||||
* Browse and play collections in our snappy tree-mode, which also shows
|
||||
images for artists and albums.
|
||||
* Fixed crash that could occur when playing a track from a browser.
|
||||
* Fixed a crash caused by sources going on or offline.
|
||||
* Huge optimizations in the resolving pipeline.
|
||||
* Improved the handling of automatic status messages for Google Talk
|
||||
* Switch to Phonon sound system, allowing us to support a wide variety
|
||||
of audio formats.
|
||||
* UI tweaks and cleanup.
|
||||
* (OS X) Open configuration dialogs as sliding sheets.
|
||||
* (OS X) Increase our available file watches to the maximum that the system
|
||||
reports.
|
||||
* (OS X) Added 'Window' menu with zoom/minimize actions
|
||||
|
||||
Version 0.0.3:
|
||||
* Show spinner while resolving playlists.
|
||||
* Go back to previous page visible when deleting a playlist.
|
||||
* Fixed issue where automatic playlists and station summaries were not
|
||||
updated in the playlist header.
|
||||
* Fixed an issue which caused duplicate items when rescanning.
|
||||
* Revert change introduced in 0.0.2 causing Twitter protocol to not try
|
||||
to reconnect to a peer if it couldn't connect the first time the plugin
|
||||
was connected. This caused confusing (and for most unwanted) behavior.
|
||||
* Fix crashes in Twitter authentication.
|
||||
* Properly honor the chosen port number if a static host and port are
|
||||
marked as preferred.
|
||||
* Don't automatically try to resolve all incoming playback logs. This
|
||||
speeds up importing sources a lot.
|
||||
* Faster painting of playlists with lots of unresolved tracks.
|
||||
* Prefer local results when results' score is equal.
|
||||
* (Windows) The tomahawk:// protocol handler works on Windows now.
|
||||
* (Windows) Fixed launching Tomahawk from Windows installer with admin privileges.
|
||||
* (Windows) Prevent launching a second instance on Windows.
|
||||
|
||||
Version 0.0.2:
|
||||
* Don't reconnect to Jabber if the settings dialog is closed successfully
|
||||
but the Jabber settings haven't changed.
|
||||
@@ -12,7 +74,6 @@ Version 0.0.2:
|
||||
the Tomahawk XMPP presence.
|
||||
* Incompatible change: Twitter SIP protocol has changed slightly. 0.0.1
|
||||
clients will not be able to talk to newer clients.
|
||||
* Hopefully fixed crashes during Twitter authentication.
|
||||
* Don't let long playlist or summary names force a large Tomahawk window.
|
||||
* Tomahawk now asks you to authorize new contacts.
|
||||
|
||||
|
116
README
@@ -1,82 +1,23 @@
|
||||
Quickstart on Ubuntu
|
||||
--------------------
|
||||
|
||||
$ sudo apt-get install build-essential cmake libtag1c2a libtag1-dev liblastfm-dev libqt4-dev \
|
||||
libqt4-sql-sqlite libvorbis-dev libmad0-dev libflac++-dev libasound2-dev \
|
||||
libboost-dev zlib1g-dev libgnutls-dev pkg-config
|
||||
|
||||
|
||||
Gloox 1.0 (XMPP library)
|
||||
------------------------
|
||||
On Ubuntu 10.10 (and higher):
|
||||
$ sudo apt-get install libgloox-dev
|
||||
|
||||
Otherwise see: http://camaya.net/glooxdownload
|
||||
You need to build gloox 1.0 from source, Ubuntu 10.04 only packages version 0.9.
|
||||
|
||||
Download and unpack tarball:
|
||||
$ ./configure --without-openssl --with-gnutls --without-libidn --with-zlib --without-examples --without-tests
|
||||
$ CXXFLAGS=-fPIC make
|
||||
$ sudo make install
|
||||
|
||||
QJson (Qt JSON library)
|
||||
-----------------------
|
||||
On Ubuntu 10.04 (and higher):
|
||||
$ sudo apt-get install libqjson-dev
|
||||
|
||||
Otherwise see: http://sourceforge.net/projects/qjson/files/ (developed using version 0.7.1)
|
||||
|
||||
Download and unpack tarball:
|
||||
$ ./configure && make
|
||||
$ sudo make install
|
||||
|
||||
libEchonest 1.1.4
|
||||
---------------
|
||||
See: http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
|
||||
Download and unpack tarball:
|
||||
$ mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
CLucene 0.9.23
|
||||
---------------
|
||||
See: http://clucene.sourceforge.net/download.shtml
|
||||
|
||||
Clone from git and build CLucene:
|
||||
$ git clone git://clucene.git.sourceforge.net/gitroot/clucene/clucene
|
||||
$ cd clucene && mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
|
||||
Quickstart on OS X
|
||||
Compiling Tomahawk
|
||||
------------------
|
||||
|
||||
Install homebrew
|
||||
$ ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
|
||||
$ brew install cmake qt qjson gloox libmad libvorbis flac taglib boost liblastfm
|
||||
|
||||
Install libEchnoest & CLucene as per the above instructions.
|
||||
|
||||
If liblastfm gives problems, do the below:
|
||||
$ brew edit liblastfm
|
||||
Change the url to https://github.com/davidsansome/liblastfm/tarball/0.3.1
|
||||
$ brew install liblastfm
|
||||
Copy the md5 hash it returns.
|
||||
$ brew edit liblastfm
|
||||
Replace the md5 hash with the new one you copied.
|
||||
$ brew install liblastfm
|
||||
|
||||
|
||||
Now compile Tomahawk
|
||||
--------------------
|
||||
$ mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
|
||||
Start the application on Linux:
|
||||
$ ./tomahawk
|
||||
Start the application on OS X:
|
||||
$ open tomahawk.app
|
||||
|
||||
|
||||
Detailed building instructions for Ubuntu
|
||||
-----------------------------------------
|
||||
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_Ubuntu_Binary_on_Maverick_(10.10)
|
||||
|
||||
Detailed building instructions for OS X
|
||||
---------------------------------------
|
||||
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_OS_X_Application_Bundle_on_Snow_Leopard_(10.6)
|
||||
|
||||
|
||||
Dependencies
|
||||
@@ -85,40 +26,15 @@ Dependencies
|
||||
CMake 2.8.0 http://www.cmake.org/
|
||||
Qt 4.7.0 http://qt.nokia.com/
|
||||
QJson 0.7.1 http://qjson.sourceforge.net/
|
||||
Gloox 1.0 (0.9.x will fail) http://camaya.net/gloox/
|
||||
SQLite 3.6.22 http://www.sqlite.org/
|
||||
TagLib 1.6.2 http://developer.kde.org/~wheeler/taglib.html
|
||||
Boost 1.3x http://www.boost.org/
|
||||
CLucene 0.9.23 (0.9.21 will fail) http://clucene.sourceforge.net/download.shtml
|
||||
libmad 0.15.1b http://www.underbit.com/products/mad/
|
||||
libvorbis 1.2.3 http://xiph.org/vorbis/
|
||||
libogg 1.1.4 http://xiph.org/ogg/
|
||||
libflac++ 1.2.0 http://flac.sourceforge.net/
|
||||
liblastfm 0.3.3 http://github.com/mxcl/liblastfm/
|
||||
libechonest 1.1.4 http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
libechonest 1.1.8 http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
|
||||
Third party libraries that we ship with our source:
|
||||
|
||||
RtAudio 4.0.7 http://www.music.mcgill.ca/~gary/rtaudio/
|
||||
MiniUPnP http://miniupnp.free.fr/
|
||||
|
||||
|
||||
To build the app:
|
||||
-----------------
|
||||
$ mkdir build && cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
|
||||
To run the app:
|
||||
---------------
|
||||
Only run the next two commands if you installed any of the dependencies from source on Linux.
|
||||
$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
$ sudo ldconfig -v
|
||||
|
||||
Start the application on Linux:
|
||||
$ ./tomahawk
|
||||
|
||||
Start the application on OS X:
|
||||
$ open tomahawk.app
|
||||
liblastfm 0.4.0 http://github.com/jonocole/liblastfm/
|
||||
|
||||
Enjoy!
|
||||
|
@@ -13,9 +13,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.0.2.0</string>
|
||||
<string>TOMAHAWK_VERSION</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0.2</string>
|
||||
<string>TOMAHAWK_VERSION</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>tomahawk</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
|
@@ -46,10 +46,18 @@ shift
|
||||
mkdir -p Contents/MacOS
|
||||
mkdir -p Contents/MacOS/sqldrivers
|
||||
mkdir -p Contents/MacOS/imageformats
|
||||
mkdir -p Contents/MacOS/phonon_backend
|
||||
mkdir -p Contents/MacOS/crypto
|
||||
|
||||
cp -R $QT_PLUGINS_DIR/sqldrivers/libqsqlite.dylib Contents/MacOS/sqldrivers/
|
||||
cp -R $QT_PLUGINS_DIR/imageformats/libqgif.dylib Contents/MacOS/imageformats/
|
||||
cp -R $QT_PLUGINS_DIR/imageformats/libqjpeg.dylib Contents/MacOS/imageformats/
|
||||
cp -R $QT_PLUGINS_DIR/imageformats/libqico.dylib Contents/MacOS/imageformats/
|
||||
cp -R $QT_PLUGINS_DIR/imageformats/libqmng.dylib Contents/MacOS/imageformats/
|
||||
cp -R $QT_PLUGINS_DIR/imageformats/libqsvg.dylib Contents/MacOS/imageformats/
|
||||
cp -R $QT_PLUGINS_DIR/imageformats/libqtiff.dylib Contents/MacOS/imageformats/
|
||||
cp -R $QT_PLUGINS_DIR/crypto/libqca-ossl.dylib Contents/MacOS/crypto/
|
||||
cp -R $QT_PLUGINS_DIR/phonon_backend/phonon_vlc.so Contents/MacOS/phonon_backend/
|
||||
|
||||
#cleanup
|
||||
find Contents/Frameworks -name Headers -o -name \*.prl -o -name \*_debug | xargs rm -rf
|
||||
|
16
admin/mac/add-spotify.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# author: lfranchi@kde.org
|
||||
# usage: Run from inside the bundle root directory, eg. Tomahawk.app
|
||||
# The first parameter should be the spotify resolver binary to copy.
|
||||
# eg: add-spotify.sh /path/to/spotify_tomahawkresolver
|
||||
################################################################################
|
||||
|
||||
mkdir -p Contents/Frameworks
|
||||
cp -R /Library/Frameworks/libspotify.framework Contents/Frameworks
|
||||
|
||||
install_name_tool -change /usr/local/Cellar/qt/4.7.3/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore $1
|
||||
install_name_tool -change /usr/local/Cellar/qt/4.7.3/lib/QtNetwork.framework/Versions/4/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork $1
|
||||
install_name_tool -change libqjson.0.dylib @executable_path/libqjson.0.7.1.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/qjson/0.7.1/lib/libqjson.0.7.1.dylib @executable_path/libqjson.0.7.1.dylib $1
|
||||
mkdir -p Contents/MacOS
|
||||
cp $1 Contents/MacOS/
|
@@ -36,7 +36,7 @@ echo "Goes here: $QTDIR"
|
||||
export QMAKESPEC='macx-g++'
|
||||
export QTDIR
|
||||
export VERSION
|
||||
export QTVERSION='4.7.2'
|
||||
export QTVERSION='4.7.3'
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -50,20 +50,35 @@ VERSION=$1
|
||||
cd tomahawk.app
|
||||
$ROOT/../admin/mac/add-Qt-to-bundle.sh \
|
||||
'QtCore QtGui QtXml QtNetwork QtSql QtXmlPatterns QtWebKit phonon'
|
||||
|
||||
header "Running install_name_tool"
|
||||
$ROOT/../admin/mac/deposx.sh
|
||||
# 'QtCore QtGui QtXml QtNetwork QtSql QtXmlPatterns QtWebKit QtDbus phonon'
|
||||
|
||||
header "Renaming files"
|
||||
mv Contents/Resources/tomahawkSources.icns Contents/Resources/Tomahawk.icns
|
||||
mv Contents/MacOS/tomahawk Contents/MacOS/Tomahawk
|
||||
# cp $ROOT/../admin/mac/Info.plist Contents/Info.plist
|
||||
|
||||
header "Copying VLC plugins into bundle"
|
||||
mkdir -p Contents/plugins
|
||||
cp -R /usr/local/Cellar/vlc-git/HEAD/lib/vlc/plugins/ Contents/plugins
|
||||
rm -rf Contents/plugins/video_* Contents/plugins/gui Contents/plugins/*/libold* Contents/plugins/*/libvcd* Contents/plugins/*/libdvd* \
|
||||
Contents/plugins/*/liblibass* Contents/plugins/*/libx264* Contents/plugins/*/libschroe* Contents/plugins/*/liblibmpeg2* \
|
||||
Contents/plugins/*/libstream_out_* Contents/plugins/*/libmjpeg_plugin* Contents/plugins/*/libh264_plugin* Contents/plugins/*/libzvbi_plugin* Contents/plugins/*/lib*sub*
|
||||
|
||||
header "Running install_name_tool"
|
||||
$ROOT/../admin/mac/deposx.sh
|
||||
|
||||
header "Copying Sparkle pubkey & framework, and qt.conf"
|
||||
cp $ROOT/../admin/mac/sparkle_pub.pem Contents/Resources
|
||||
cp -R /Library/Frameworks/Sparkle.framework Contents/Frameworks
|
||||
cp $ROOT/../admin/mac/qt.conf Contents/Resources
|
||||
|
||||
header "Adding spotify resolver to bundle if spotify_tomahawkresolver found in $ROOT"
|
||||
if [ -e $ROOT/spotify_tomahawkresolver ]
|
||||
then
|
||||
header "Found, so adding spotify resolver."ac
|
||||
$ROOT/../admin/mac/add-spotify.sh $ROOT/spotify_tomahawkresolver
|
||||
fi
|
||||
|
||||
header "Creating DMG"
|
||||
cd ..
|
||||
mv tomahawk.app Tomahawk.app
|
||||
|
@@ -23,6 +23,8 @@ cd Contents
|
||||
|
||||
QTLIBS=`ls Frameworks | cut -d. -f1`
|
||||
LIBS=`cd MacOS && ls -fR1 | grep dylib`
|
||||
PLUGINFOLDERS=`ls plugins | cut -d. -f1`
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -61,30 +63,39 @@ function deposx_change
|
||||
|
||||
function deplib_change
|
||||
{
|
||||
install_name_tool -change /usr/local/Cellar/liblastfm/0.3.3/lib/liblastfm.0.dylib @executable_path/liblastfm.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/qjson/0.7.1/lib/libqjson.0.7.1.dylib @executable_path/libqjson.0.7.1.dylib $1
|
||||
install_name_tool -change /usr/local/lib/libechonest.1.1.dylib @executable_path/libechonest.1.1.dylib $1
|
||||
install_name_tool -change /usr/local/lib/libclucene-core.0.9.23.dylib @executable_path/libclucene-core.0.9.23.dylib $1
|
||||
install_name_tool -change /usr/local/lib/libclucene-shared.0.9.23.dylib @executable_path/libclucene-shared.0.9.23.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/taglib/1.6.3/lib/libtag.1.dylib @executable_path/libtag.1.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib @executable_path/libogg.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib @executable_path/libvorbis.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib @executable_path/libvorbisfile.3.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib @executable_path/libmad.0.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib @executable_path/libFLAC++.6.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib @executable_path/libFLAC.8.dylib $1
|
||||
install_name_tool -change $ORIGROOT/src/libtomahawk/libtomahawklib.dylib @executable_path/libtomahawklib.dylib $1
|
||||
install_name_tool -change /usr/local/lib/libclucene-core.1.dylib @executable_path/libclucene-core.1.dylib $1
|
||||
install_name_tool -change /usr/local/lib/libclucene-shared.1.dylib @executable_path/libclucene-shared.1.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/taglib/1.7/lib/libtag.1.7.0.dylib @executable_path/libtag.1.7.0.dylib $1
|
||||
# install_name_tool -change /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $1
|
||||
# install_name_tool -change /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib @executable_path/libogg.0.dylib $1
|
||||
# install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib @executable_path/libvorbis.0.dylib $1
|
||||
# install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib @executable_path/libvorbisfile.3.dylib $1
|
||||
# install_name_tool -change /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib @executable_path/libmad.0.dylib $1
|
||||
# install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib @executable_path/libFLAC++.6.dylib $1
|
||||
# install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib @executable_path/libFLAC.8.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/kde-phonon/4.5.0/lib/libphonon.4.dylib @executable_path/libphonon.4.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/kde-phonon/4.5.0/lib/libphonon.4.5.0.dylib @executable_path/libphonon.4.dylib $1
|
||||
|
||||
install_name_tool -change $ORIGROOT/libtomahawklib.dylib @executable_path/libtomahawklib.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libtomahawk_sipjabber.dylib @executable_path/libtomahawk_sipjabber.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libtomahawk_sipgoogle.dylib @executable_path/libtomahawk_sipgoogle.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libtomahawk_siptwitter.dylib @executable_path/libtomahawk_siptwitter.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libtomahawk_sipzeroconf.dylib @executable_path/libtomahawk_sipzeroconf.dylib $1
|
||||
install_name_tool -change $ORIGROOT/thirdparty/jdns/libtomahawk_jdns.dylib @executable_path/libtomahawk_jdns.dylib $1
|
||||
install_name_tool -change $ORIGROOT/thirdparty/qtweetlib/libtomahawk_qtweetlib.dylib @executable_path/libtomahawk_qtweetlib.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libtomahawk_qtweetlib.dylib @executable_path/libtomahawk_qtweetlib.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libtomahawk_portfwd.dylib @executable_path/libtomahawk_portfwd.dylib $1
|
||||
install_name_tool -change $ORIGROOT/libjreen.dylib @executable_path/libjreen.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/jreen/HEAD/lib/libjreen.dylib @executable_path/libjreen.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/qca/2.0.2/lib/qca.framework/Versions/2/qca @executable_path/../Frameworks/qca.framework/Versions/2/qca $1
|
||||
install_name_tool -change /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.8.dylib @executable_path/libintl.8.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/vlc-git/HEAD/lib/libvlc.5.dylib @executable_path/libvlc.5.dylib $1
|
||||
install_name_tool -change /usr/local/Cellar/vlc-git/HEAD/lib/libvlccore.4.dylib @executable_path/libvlccore.4.dylib $1
|
||||
|
||||
install_name_tool -change libqjson.0.7.1.dylib @executable_path/libqjson.0.7.1.dylib $1
|
||||
install_name_tool -change libqjson.0.dylib @executable_path/libqjson.0.7.1.dylib $1
|
||||
install_name_tool -change libechonest.1.1.dylib @executable_path/libechonest.1.1.dylib $1
|
||||
install_name_tool -change libclucene-core.0.9.23.dylib @executable_path/libclucene-core.0.9.23.dylib $1
|
||||
install_name_tool -change libclucene-shared.0.9.23.dylib @executable_path/libclucene-shared.0.9.23.dylib $1
|
||||
install_name_tool -change libclucene-core.1.dylib @executable_path/libclucene-core.1.dylib $1
|
||||
install_name_tool -change libclucene-shared.1.dylib @executable_path/libclucene-shared.1.dylib $1
|
||||
}
|
||||
|
||||
################################################################################
|
||||
@@ -100,25 +111,35 @@ do
|
||||
done
|
||||
|
||||
import_lib /usr/local/Cellar/qjson/0.7.1/lib/libqjson.0.7.1.dylib
|
||||
import_lib /usr/local/Cellar/liblastfm/0.3.3/lib/liblastfm.0.dylib
|
||||
import_lib /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib
|
||||
import_lib /usr/local/Cellar/taglib/1.6.3/lib/libtag.1.dylib
|
||||
import_lib /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib
|
||||
import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib
|
||||
import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib
|
||||
import_lib /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib
|
||||
import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib
|
||||
import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib
|
||||
import_lib /usr/local/Cellar/taglib/1.7/lib/libtag.1.7.0.dylib
|
||||
#import_lib /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib
|
||||
#import_lib /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib
|
||||
#import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib
|
||||
#import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib
|
||||
#import_lib /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib
|
||||
#import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib
|
||||
#import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib
|
||||
import_lib /usr/local/lib/libechonest.1.1.dylib
|
||||
import_lib /usr/local/lib/libclucene-core.0.9.23.dylib
|
||||
import_lib /usr/local/lib/libclucene-shared.0.9.23.dylib
|
||||
import_lib /usr/local/lib/libclucene-core.1.dylib
|
||||
import_lib /usr/local/lib/libclucene-shared.1.dylib
|
||||
import_lib /usr/local/Cellar/kde-phonon/4.5.0/lib/libphonon.4.dylib
|
||||
import_lib /usr/local/Cellar/vlc-git/HEAD/lib/libvlc.5.dylib
|
||||
import_lib /usr/local/Cellar/vlc-git/HEAD/lib/libvlccore.4.dylib
|
||||
import_lib /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.8.dylib
|
||||
|
||||
import_lib ../../libtomahawk_sipjabber.dylib
|
||||
import_lib ../../libtomahawk_siptwitter.dylib
|
||||
import_lib ../../libtomahawk_sipzeroconf.dylib
|
||||
import_lib ../../src/libtomahawk/libtomahawklib.dylib
|
||||
import_lib ../../thirdparty/jdns/libtomahawk_jdns.dylib
|
||||
import_lib ../../thirdparty/qtweetlib/libtomahawk_qtweetlib.dylib
|
||||
import_lib $ORIGROOT/libjreen.dylib
|
||||
import_lib $ORIGROOT/libtomahawklib.dylib
|
||||
import_lib $ORIGROOT/libtomahawk_sipjabber.dylib
|
||||
import_lib $ORIGROOT/libtomahawk_sipgoogle.dylib
|
||||
import_lib $ORIGROOT/libtomahawk_siptwitter.dylib
|
||||
import_lib $ORIGROOT/libtomahawk_sipzeroconf.dylib
|
||||
import_lib $ORIGROOT/libtomahawk_qtweetlib.dylib
|
||||
import_lib $ORIGROOT/libtomahawk_portfwd.dylib
|
||||
|
||||
cp -R /usr/local/Cellar/qca/2.0.2/lib/qca.framework Frameworks/
|
||||
chmod 644 Frameworks/qca.framework/Versions/2/qca
|
||||
deplib_change Frameworks/qca.framework/Versions/2/qca
|
||||
deposx_change Frameworks/qca.framework/Versions/2/qca
|
||||
|
||||
# now Qt
|
||||
for x in $QTLIBS
|
||||
@@ -128,4 +149,16 @@ do
|
||||
deposx_change Frameworks/$x.framework/Versions/4/$x
|
||||
install_name_tool -id @executable_path/../Frameworks/$x.framework/Versions/4/$x \
|
||||
Frameworks/$x.framework/Versions/4/$x
|
||||
deplib_change "Frameworks/$x.framework/Versions/4/$x"
|
||||
done
|
||||
|
||||
# now VLC plugins
|
||||
for x in plugins/$PLUGINFOLDERS
|
||||
do
|
||||
for plugin in `ls plugins/$x | cut -f1`
|
||||
do
|
||||
echo "Fixing VLC plugin: $plugin"
|
||||
chmod 644 plugins/$x/$plugin
|
||||
deplib_change plugins/$x/$plugin
|
||||
done
|
||||
done
|
||||
|
@@ -1,2 +1,2 @@
|
||||
[Paths]
|
||||
Plugins = PlugIns
|
||||
Plugins = plugins
|
||||
|
@@ -16,10 +16,10 @@
|
||||
<item>
|
||||
<title>Version 0.0.2 (Tomahawk Player Beta - It Lives?)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/stable/ChangeLog
|
||||
https://github.com/tomahawk-player/tomahawk/raw/0.0.2/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Mon, 28 Mar 2011 06:13:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19835237" type="application/octet-stream" sparkle:dsaSignature="MCwCFGb6yhKUO3+lH3eNaURvwtctLVMUAhQM8mp8yEwcU3ZoaJMTqb387dYccA==" />
|
||||
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19831287" type="application/octet-stream" sparkle:dsaSignature="MC0CFC0Hwq9x9BWMF/8sA+c5KfzKoBzFAhUAk9r0IJlxQf9qEJk4IL6bbTWTiuI=" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
@@ -16,10 +16,10 @@
|
||||
<item>
|
||||
<title>Version 0.0.2 (Tomahawk Player - It Lives!)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/stable/ChangeLog
|
||||
https://github.com/tomahawk-player/tomahawk/raw/0.0.2/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Mon, 28 Mar 2011 06:13:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19835237" type="application/octet-stream" sparkle:dsaSignature="MCwCFGb6yhKUO3+lH3eNaURvwtctLVMUAhQM8mp8yEwcU3ZoaJMTqb387dYccA==" />
|
||||
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19831287" type="application/octet-stream" sparkle:dsaSignature="MC0CFC0Hwq9x9BWMF/8sA+c5KfzKoBzFAhUAk9r0IJlxQf9qEJk4IL6bbTWTiuI=" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
11
admin/unix/tomahawk.desktop
Normal file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Tomahawk
|
||||
GenericName=Music Player
|
||||
TryExec=tomahawk
|
||||
Exec=tomahawk
|
||||
Comment=Tomahawk - Social Music Player
|
||||
Icon=tomahawk
|
||||
Terminal=false
|
||||
Categories=Qt;AudioVideo;Audio;Player;
|
@@ -1,5 +1,5 @@
|
||||
[Protocol]
|
||||
exec=/home/leo/kde/tomahawk/build/tomahawk "%u"
|
||||
exec=/path/to/binary "%u"
|
||||
protocol=tomahawk
|
||||
input=none
|
||||
output=none
|
||||
|
0
admin/win/nsi/RELEASE_NOTES.txt
Executable file → Normal file
0
admin/win/nsi/installer.ico
Executable file → Normal file
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
admin/win/nsi/nsis_processes/bin/Processes.dll
Executable file
35
admin/win/nsi/nsis_processes/license.rtf
Executable file
@@ -0,0 +1,35 @@
|
||||
{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}
|
||||
{\f172\froman\fcharset238\fprq2 Times New Roman CE;}{\f173\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f175\froman\fcharset161\fprq2 Times New Roman Greek;}{\f176\froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||
{\f177\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f178\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f179\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f180\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
|
||||
{\f562\fswiss\fcharset238\fprq2 Verdana CE;}{\f563\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f565\fswiss\fcharset161\fprq2 Verdana Greek;}{\f566\fswiss\fcharset162\fprq2 Verdana Tur;}{\f569\fswiss\fcharset186\fprq2 Verdana Baltic;}
|
||||
{\f570\fswiss\fcharset163\fprq2 Verdana (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
|
||||
\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
|
||||
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
|
||||
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
|
||||
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\*\cs15 \additive \ul\cf2 \sbasedon10 \styrsid7485074 Hyperlink;}}
|
||||
{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid6712196\rsid7485074\rsid11352300\rsid15940516}{\*\generator Microsoft Word 11.0.5604;}{\info{\title Processes v1}{\author Hardwired}{\operator Hardwired}{\creatim\yr2004\mo12\dy12\hr23\min42}
|
||||
{\revtim\yr2004\mo12\dy12\hr23\min51}{\version2}{\edmins9}{\nofpages1}{\nofwords80}{\nofchars458}{\nofcharsws537}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180
|
||||
\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1
|
||||
\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
|
||||
\asianbrkrule\rsidroot7485074\newtblstyruls\nogrowautofit \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}
|
||||
{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}
|
||||
{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain
|
||||
\qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7485074 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f39\insrsid7485074\charrsid7485074 Processes v1.0}{\f39\insrsid7485074\charrsid7485074 .0.1
|
||||
\par }{\f39\fs20\insrsid7485074
|
||||
\par }\pard \qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid15940516 {\f39\fs20\insrsid15940516 This software binaries and source-code are free for any kind of use, including commercial use. }{
|
||||
\f39\fs20\insrsid7485074\charrsid7485074 There is no restriction and no guaranty for using}{\f39\fs20\insrsid7485074\charrsid7485074 t}{\f39\fs20\insrsid7485074\charrsid7485074 his software}{\f39\fs20\insrsid7485074\charrsid7485074 and/or it
|
||||
s source-code. }{\f39\fs20\insrsid15940516
|
||||
\par I}{\f39\fs20\insrsid7485074\charrsid7485074 f you use the plug}{\f39\fs20\insrsid7485074\charrsid7485074 -}{\f39\fs20\insrsid7485074\charrsid7485074 in }{\f39\fs20\insrsid7485074\charrsid7485074 and/}{\f39\fs20\insrsid7485074\charrsid7485074 or it}{
|
||||
\f39\fs20\insrsid7485074\charrsid7485074 s}{\f39\fs20\insrsid7485074\charrsid7485074 source-code, I would }{\f39\fs20\insrsid7485074\charrsid7485074 appreciate }{\f39\fs20\insrsid7485074\charrsid7485074 if my name is mentioned.}{
|
||||
\f39\fs20\insrsid7485074\charrsid7485074
|
||||
\par }\pard \qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7485074 {\f39\fs20\insrsid7485074\charrsid7485074
|
||||
\par }{\b\f39\fs20\insrsid7485074\charrsid7485074 Andrei Ciubotaru [Hardwired]
|
||||
\par }{\f39\fs20\insrsid7485074\charrsid7485074 Lead Developer ICode&Ideas SRL (}{\field\flddirty{\*\fldinst {\f39\fs20\insrsid7485074\charrsid7485074 HYPERLINK "http://www.icode.ro/" }{\f39\fs20\insrsid7485074\charrsid7485074 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b02000000170000001500000068007400740070003a002f002f007700770077002e00690063006f00640065002e0072006f002f000000e0c9ea79f9bace118c8200aa004ba90b2a00000068007400740070003a002f002f007700770077002e00690063006f00640065002e007200
|
||||
6f002f000000}}}{\fldrslt {\cs15\f39\fs20\ul\cf2\insrsid7485074\charrsid7485074 http://www.icode.ro/}}}{\f39\fs20\insrsid7485074\charrsid7485074 )
|
||||
\par }{\field{\*\fldinst {\f39\fs20\insrsid7485074 HYPERLINK "hardwiredteks@gmail.com" }{\f39\fs20\insrsid15940516\charrsid7485074 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b02000000010000000303000000000000c00000000000004600001800000068617264776972656474656b7340676d61696c2e636f6d00ffffadde000000000000000000000000000000000000000000000000}}}{\fldrslt {
|
||||
\cs15\f39\fs20\ul\cf2\insrsid7485074\charrsid7485074 hardwiredteks@gmail.com}}}{\f39\fs20\insrsid7485074\charrsid7485074 , }{\field{\*\fldinst {\f39\fs20\insrsid7485074 HYPERLINK "hardwired@icode.ro" }{\f39\fs20\insrsid15940516\charrsid7485074
|
||||
{\*\datafield 00d0c9ea79f9bace118c8200aa004ba90b02000000010000000303000000000000c0000000000000460000130000006861726477697265644069636f64652e726f00ffffadde000000000000000000000000000000000000000000000000}}}{\fldrslt {
|
||||
\cs15\f39\fs20\ul\cf2\insrsid7485074\charrsid7485074 hardwired@icode.ro}}}{\f39\fs20\insrsid7485074\charrsid7485074
|
||||
\par }}
|
122
admin/win/nsi/nsis_processes/readme.txt
Executable file
@@ -0,0 +1,122 @@
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
Processes (Processes.dll)
|
||||
Version: 1.0.1.0
|
||||
Release: 24.february.2005
|
||||
Description: Nullsoft Installer (NSIS) plug-in for managing?!
|
||||
Windows processes.
|
||||
|
||||
Copyright: <09> 2004-2005 Hardwired. No rights reserved.
|
||||
There is no restriction and no guaranty for using
|
||||
this software.
|
||||
|
||||
Author: Andrei Ciubotaru [Hardwired]
|
||||
Lead Developer ICode&Ideas SRL (http://www.icode.ro/)
|
||||
hardwiredteks@gmail.com, hardwired@icode.ro
|
||||
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
INTRODUCTION
|
||||
|
||||
The Need For Plug-in - I need it for the one of my installers.
|
||||
|
||||
Briefly: Use it when you need to find\kill a process when
|
||||
installing\uninstalling some application. Also, use it when you
|
||||
need to test the presence of a device driver.
|
||||
|
||||
|
||||
SUPPORT
|
||||
|
||||
Supported platforms are: WinNT,Win2K,WinXP and Win2003 Server.
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
Processes::FindProcess <process_name> ;without ".exe"
|
||||
|
||||
Searches the currently running processes for the given
|
||||
process name.
|
||||
|
||||
return: 1 - the process was found
|
||||
0 - the process was not found
|
||||
|
||||
Processes::KillProcess <process_name> ; without ".exe"
|
||||
|
||||
Searches the currently running processes for the given
|
||||
process name. If the process is found then the it gets
|
||||
killed.
|
||||
|
||||
return: 1 - the process was found and killed
|
||||
0 - the process was not found or the process
|
||||
cannot be killed (insuficient rights)
|
||||
|
||||
Processes::FindDevice <device_base_name>
|
||||
|
||||
Searches the installed devices drivers for the given
|
||||
device base name.
|
||||
(important: I said BASE NAME not FILENAME)
|
||||
|
||||
return: 1 - the device driver was found
|
||||
0 - the device driver was not found
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
First of all, does not matter where you use it. Ofcourse, the
|
||||
routines must be called inside of a Section/Function scope.
|
||||
|
||||
Processes::FindProcess "process_name"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" make_my_day noooooo
|
||||
|
||||
make_my_day:
|
||||
...
|
||||
|
||||
noooooo:
|
||||
...
|
||||
|
||||
|
||||
Processes::KillProcess "process_name"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" dead_meat why_wont_you_die
|
||||
|
||||
dead_meat:
|
||||
...
|
||||
|
||||
why_wont_you_die:
|
||||
...
|
||||
|
||||
|
||||
Processes::FindDevice "device_base_name"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" blabla more_blabla
|
||||
|
||||
blabla:
|
||||
...
|
||||
|
||||
more_blabla:
|
||||
...
|
||||
|
||||
|
||||
THANKS
|
||||
|
||||
Sunil Kamath for inspiring me. I wanted to use its FindProcDLL
|
||||
but my requirements made it imposible.
|
||||
|
||||
Nullsoft for creating this very powerfull installer. One big,
|
||||
free and full-featured (hmmm... and guiless for the moment) mean
|
||||
install machine!:)
|
||||
|
||||
ME for being such a great coder...
|
||||
... HAHAHAHAHAHAHA!
|
||||
|
||||
ONE MORE THING
|
||||
|
||||
If you use the plugin or it's source-code, I would apreciate
|
||||
if my name is mentioned.
|
||||
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
8
admin/win/nsi/nsis_processes/src/StdAfx.cpp
Executable file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// KillProcDLL.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
34
admin/win/nsi/nsis_processes/src/StdAfx.h
Executable file
@@ -0,0 +1,34 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__780690DC_E128_403D_BC07_780D1B2CC101__INCLUDED_)
|
||||
#define AFX_STDAFX_H__780690DC_E128_403D_BC07_780D1B2CC101__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <string> // String management...
|
||||
|
||||
//From exam28.cpp
|
||||
#include <tlhelp32.h>
|
||||
//#include <iostream.h>
|
||||
|
||||
#ifdef BORLANDC
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
//To make it a NSIS Plug-In
|
||||
#include "exdll.h"
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__780690DC_E128_403D_BC07_780D1B2CC101__INCLUDED_)
|
37
admin/win/nsi/nsis_processes/src/exdll.c
Executable file
@@ -0,0 +1,37 @@
|
||||
#include <windows.h>
|
||||
#include "exdll.h"
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
|
||||
HWND g_hwndParent;
|
||||
|
||||
void __declspec(dllexport) myFunction(HWND hwndParent, int string_size,
|
||||
char *variables, stack_t **stacktop)
|
||||
{
|
||||
g_hwndParent=hwndParent;
|
||||
|
||||
EXDLL_INIT();
|
||||
|
||||
|
||||
// note if you want parameters from the stack, pop them off in order.
|
||||
// i.e. if you are called via exdll::myFunction file.dat poop.dat
|
||||
// calling popstring() the first time would give you file.dat,
|
||||
// and the second time would give you poop.dat.
|
||||
// you should empty the stack of your parameters, and ONLY your
|
||||
// parameters.
|
||||
|
||||
// do your stuff here
|
||||
{
|
||||
char buf[1024];
|
||||
wsprintf(buf,"$0=%s\n",getuservariable(INST_0));
|
||||
MessageBox(g_hwndParent,buf,0,MB_OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
g_hInstance=hInst;
|
||||
return TRUE;
|
||||
}
|
136
admin/win/nsi/nsis_processes/src/exdll.h
Executable file
@@ -0,0 +1,136 @@
|
||||
#ifndef _EXDLL_H_
|
||||
#define _EXDLL_H_
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// only include this file from one place in your DLL.
|
||||
// (it is all static, if you use it in two places it will fail)
|
||||
//
|
||||
#define EXDLL_INIT() { \
|
||||
g_stringsize = string_size; \
|
||||
g_stacktop = stacktop; \
|
||||
g_variables = variables; }
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// For page showing plug-ins
|
||||
//
|
||||
#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
|
||||
#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
|
||||
#define NOTIFY_BYE_BYE 'x'
|
||||
|
||||
typedef struct _stack_t
|
||||
{
|
||||
struct _stack_t *next;
|
||||
char text[1]; // this should be the length of string_size
|
||||
} stack_t;
|
||||
|
||||
|
||||
static unsigned int g_stringsize;
|
||||
static stack_t **g_stacktop;
|
||||
static char *g_variables;
|
||||
|
||||
enum
|
||||
{
|
||||
INST_0, // $0
|
||||
INST_1, // $1
|
||||
INST_2, // $2
|
||||
INST_3, // $3
|
||||
INST_4, // $4
|
||||
INST_5, // $5
|
||||
INST_6, // $6
|
||||
INST_7, // $7
|
||||
INST_8, // $8
|
||||
INST_9, // $9
|
||||
INST_R0, // $R0
|
||||
INST_R1, // $R1
|
||||
INST_R2, // $R2
|
||||
INST_R3, // $R3
|
||||
INST_R4, // $R4
|
||||
INST_R5, // $R5
|
||||
INST_R6, // $R6
|
||||
INST_R7, // $R7
|
||||
INST_R8, // $R8
|
||||
INST_R9, // $R9
|
||||
INST_CMDLINE, // $CMDLINE
|
||||
INST_INSTDIR, // $INSTDIR
|
||||
INST_OUTDIR, // $OUTDIR
|
||||
INST_EXEDIR, // $EXEDIR
|
||||
INST_LANG, // $LANGUAGE
|
||||
__INST_LAST
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// utility functions (not required but often useful)
|
||||
//
|
||||
static int popstring( char *str )
|
||||
{
|
||||
stack_t *th;
|
||||
|
||||
|
||||
if( !g_stacktop ||
|
||||
!*g_stacktop )
|
||||
return 1;
|
||||
|
||||
th = (*g_stacktop);
|
||||
lstrcpy( str, th->text );
|
||||
*g_stacktop = th->next;
|
||||
GlobalFree( (HGLOBAL)th );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void pushstring( char *str )
|
||||
{
|
||||
stack_t *th;
|
||||
|
||||
|
||||
if( !g_stacktop )
|
||||
return;
|
||||
|
||||
th = (stack_t*)GlobalAlloc( GPTR, sizeof(stack_t) + g_stringsize );
|
||||
lstrcpyn( th->text, str, g_stringsize );
|
||||
th->next = *g_stacktop;
|
||||
*g_stacktop = th;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static char *getuservariable( int varnum )
|
||||
{
|
||||
if( varnum < 0 ||
|
||||
varnum >= __INST_LAST )
|
||||
return NULL;
|
||||
|
||||
return (g_variables + varnum*g_stringsize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void setuservariable( int varnum, char *var )
|
||||
{
|
||||
if( var != NULL &&
|
||||
varnum >= 0 &&
|
||||
varnum < __INST_LAST )
|
||||
lstrcpy( g_variables + varnum*g_stringsize, var );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif//_EXDLL_H_
|
411
admin/win/nsi/nsis_processes/src/processes.cpp
Executable file
@@ -0,0 +1,411 @@
|
||||
#include "stdafx.h"
|
||||
#include "processes.h"
|
||||
#include "string.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// global variables
|
||||
lpfEnumProcesses EnumProcesses;
|
||||
lpfEnumProcessModules EnumProcessModules;
|
||||
lpfGetModuleBaseName GetModuleBaseName;
|
||||
lpfEnumDeviceDrivers EnumDeviceDrivers;
|
||||
lpfGetDeviceDriverBaseName GetDeviceDriverBaseName;
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
HWND g_hwndParent;
|
||||
HINSTANCE g_hInstLib;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// main DLL entry
|
||||
BOOL WINAPI _DllMainCRTStartup( HANDLE hInst,
|
||||
ULONG ul_reason_for_call,
|
||||
LPVOID lpReserved )
|
||||
{
|
||||
g_hInstance = (struct HINSTANCE__ *)hInst;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// loads the psapi routines
|
||||
bool LoadPSAPIRoutines( void )
|
||||
{
|
||||
if( NULL == (g_hInstLib = LoadLibraryA( "PSAPI.DLL" )) )
|
||||
return false;
|
||||
|
||||
EnumProcesses = (lpfEnumProcesses) GetProcAddress( g_hInstLib, "EnumProcesses" );
|
||||
EnumProcessModules = (lpfEnumProcessModules) GetProcAddress( g_hInstLib, "EnumProcessModules" );
|
||||
GetModuleBaseName = (lpfGetModuleBaseName) GetProcAddress( g_hInstLib, "GetModuleBaseNameA" );
|
||||
EnumDeviceDrivers = (lpfEnumDeviceDrivers) GetProcAddress( g_hInstLib, "EnumDeviceDrivers" );
|
||||
GetDeviceDriverBaseName = (lpfGetDeviceDriverBaseName) GetProcAddress( g_hInstLib, "GetDeviceDriverBaseNameA" );
|
||||
|
||||
if( ( NULL == EnumProcesses ) ||
|
||||
( NULL == EnumProcessModules ) ||
|
||||
( NULL == EnumDeviceDrivers ) ||
|
||||
( NULL == GetModuleBaseName ) ||
|
||||
( NULL == GetDeviceDriverBaseName ) )
|
||||
{
|
||||
FreeLibrary( g_hInstLib );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// free the psapi routines
|
||||
bool FreePSAPIRoutines( void )
|
||||
{
|
||||
EnumProcesses = NULL;
|
||||
EnumProcessModules = NULL;
|
||||
GetModuleBaseName = NULL;
|
||||
EnumDeviceDrivers = NULL;
|
||||
|
||||
if( FALSE == FreeLibrary( g_hInstLib ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// find a process by name
|
||||
// return value: true - process was found
|
||||
// false - process not found
|
||||
bool FindProc( char *szProcess )
|
||||
{
|
||||
char szProcessName[ 1024 ];
|
||||
char szCurrentProcessName[ 1024 ];
|
||||
DWORD dPID[ 1024 ];
|
||||
DWORD dPIDSize( 1024 );
|
||||
DWORD dSize( 1024 );
|
||||
HANDLE hProcess;
|
||||
HMODULE phModule[ 1024 ];
|
||||
|
||||
|
||||
//
|
||||
// make the name lower case
|
||||
//
|
||||
memset( szProcessName, 0, 1024*sizeof(char) );
|
||||
sprintf( szProcessName, "%s", szProcess );
|
||||
strlwr( szProcessName );
|
||||
|
||||
//
|
||||
// load PSAPI routines
|
||||
//
|
||||
if( false == LoadPSAPIRoutines() )
|
||||
return false;
|
||||
|
||||
//
|
||||
// enumerate processes names
|
||||
//
|
||||
if( FALSE == EnumProcesses( dPID, dSize, &dPIDSize ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// walk trough and compare see if the process is running
|
||||
//
|
||||
for( int k( dPIDSize / sizeof( DWORD ) ); k >= 0; k-- )
|
||||
{
|
||||
memset( szCurrentProcessName, 0, 1024*sizeof(char) );
|
||||
|
||||
if( NULL != ( hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, dPID[ k ] ) ) )
|
||||
{
|
||||
if( TRUE == EnumProcessModules( hProcess, phModule, sizeof(HMODULE)*1024, &dPIDSize ) )
|
||||
if( GetModuleBaseName( hProcess, phModule[ 0 ], szCurrentProcessName, 1024 ) > 0 )
|
||||
{
|
||||
strlwr( szCurrentProcessName );
|
||||
|
||||
if( NULL != strstr( szCurrentProcessName, szProcessName ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
CloseHandle( hProcess );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
CloseHandle( hProcess );
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// free PSAPI routines
|
||||
//
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// kills a process by name
|
||||
// return value: true - process was found
|
||||
// false - process not found
|
||||
bool KillProc( char *szProcess )
|
||||
{
|
||||
char szProcessName[ 1024 ];
|
||||
char szCurrentProcessName[ 1024 ];
|
||||
DWORD dPID[ 1024 ];
|
||||
DWORD dPIDSize( 1024 );
|
||||
DWORD dSize( 1024 );
|
||||
HANDLE hProcess;
|
||||
HMODULE phModule[ 1024 ];
|
||||
|
||||
|
||||
//
|
||||
// make the name lower case
|
||||
//
|
||||
memset( szProcessName, 0, 1024*sizeof(char) );
|
||||
sprintf( szProcessName, "%s", szProcess );
|
||||
strlwr( szProcessName );
|
||||
|
||||
//
|
||||
// load PSAPI routines
|
||||
//
|
||||
if( false == LoadPSAPIRoutines() )
|
||||
return false;
|
||||
|
||||
//
|
||||
// enumerate processes names
|
||||
//
|
||||
if( FALSE == EnumProcesses( dPID, dSize, &dPIDSize ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// walk trough and compare see if the process is running
|
||||
//
|
||||
for( int k( dPIDSize / sizeof( DWORD ) ); k >= 0; k-- )
|
||||
{
|
||||
memset( szCurrentProcessName, 0, 1024*sizeof(char) );
|
||||
|
||||
if( NULL != ( hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, dPID[ k ] ) ) )
|
||||
{
|
||||
if( TRUE == EnumProcessModules( hProcess, phModule, sizeof(HMODULE)*1024, &dPIDSize ) )
|
||||
if( GetModuleBaseName( hProcess, phModule[ 0 ], szCurrentProcessName, 1024 ) > 0 )
|
||||
{
|
||||
strlwr( szCurrentProcessName );
|
||||
|
||||
if( NULL != strstr( szCurrentProcessName, szProcessName ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
//
|
||||
// kill process
|
||||
//
|
||||
if( false == TerminateProcess( hProcess, 0 ) )
|
||||
{
|
||||
CloseHandle( hProcess );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// refresh systray
|
||||
//
|
||||
UpdateWindow( FindWindow( NULL, "Shell_TrayWnd" ) );
|
||||
|
||||
//
|
||||
// refresh desktop window
|
||||
//
|
||||
UpdateWindow( GetDesktopWindow() );
|
||||
|
||||
CloseHandle( hProcess );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
CloseHandle( hProcess );
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// free PSAPI routines
|
||||
//
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
bool FindDev( char *szDriverName )
|
||||
{
|
||||
char szDeviceName[ 1024 ];
|
||||
char szCurrentDeviceName[ 1024 ];
|
||||
LPVOID lpDevices[ 1024 ];
|
||||
DWORD dDevicesSize( 1024 );
|
||||
DWORD dSize( 1024 );
|
||||
TCHAR tszCurrentDeviceName[ 1024 ];
|
||||
DWORD dNameSize( 1024 );
|
||||
|
||||
|
||||
//
|
||||
// make the name lower case
|
||||
//
|
||||
memset( szDeviceName, 0, 1024*sizeof(char) );
|
||||
sprintf( szDeviceName, "%s", strlwr( szDriverName ) );
|
||||
|
||||
//
|
||||
// load PSAPI routines
|
||||
//
|
||||
if( false == LoadPSAPIRoutines() )
|
||||
return false;
|
||||
|
||||
//
|
||||
// enumerate devices
|
||||
//
|
||||
if( FALSE == EnumDeviceDrivers( lpDevices, dSize, &dDevicesSize ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// walk trough and compare see if the device driver exists
|
||||
//
|
||||
for( int k( dDevicesSize / sizeof( LPVOID ) ); k >= 0; k-- )
|
||||
{
|
||||
memset( szCurrentDeviceName, 0, 1024*sizeof(char) );
|
||||
memset( tszCurrentDeviceName, 0, 1024*sizeof(TCHAR) );
|
||||
|
||||
if( 0 != GetDeviceDriverBaseName( lpDevices[ k ], tszCurrentDeviceName, dNameSize ) )
|
||||
{
|
||||
sprintf( szCurrentDeviceName, "%S", tszCurrentDeviceName );
|
||||
|
||||
if( 0 == strcmp( strlwr( szCurrentDeviceName ), szDeviceName ) )
|
||||
{
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// free PSAPI routines
|
||||
//
|
||||
FreePSAPIRoutines();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
extern "C" __declspec(dllexport) void FindProcess( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop )
|
||||
{
|
||||
char szParameter[ 1024 ];
|
||||
|
||||
|
||||
g_hwndParent = hwndParent;
|
||||
|
||||
EXDLL_INIT();
|
||||
{
|
||||
popstring( szParameter );
|
||||
|
||||
if( true == FindProc( szParameter ) )
|
||||
wsprintf( szParameter, "1" );
|
||||
else
|
||||
wsprintf( szParameter, "0" );
|
||||
|
||||
setuservariable( INST_R0, szParameter );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
extern "C" __declspec(dllexport) void KillProcess( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop )
|
||||
{
|
||||
char szParameter[ 1024 ];
|
||||
|
||||
|
||||
g_hwndParent = hwndParent;
|
||||
|
||||
EXDLL_INIT();
|
||||
{
|
||||
popstring( szParameter );
|
||||
|
||||
if( true == KillProc( szParameter ) )
|
||||
wsprintf( szParameter, "1" );
|
||||
else
|
||||
wsprintf( szParameter, "0" );
|
||||
|
||||
setuservariable( INST_R0, szParameter );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
extern "C" __declspec(dllexport) void FindDevice( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop )
|
||||
{
|
||||
char szParameter[ 1024 ];
|
||||
|
||||
|
||||
g_hwndParent = hwndParent;
|
||||
|
||||
EXDLL_INIT();
|
||||
{
|
||||
popstring( szParameter );
|
||||
|
||||
if( true == FindDev( szParameter ) )
|
||||
wsprintf( szParameter, "1" );
|
||||
else
|
||||
wsprintf( szParameter, "0" );
|
||||
|
||||
setuservariable( INST_R0, szParameter );
|
||||
}
|
||||
}
|
49
admin/win/nsi/nsis_processes/src/processes.h
Executable file
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// PSAPI function pointers
|
||||
typedef BOOL (WINAPI *lpfEnumProcesses) ( DWORD *, DWORD, DWORD * );
|
||||
typedef BOOL (WINAPI *lpfEnumProcessModules) ( HANDLE, HMODULE *, DWORD, LPDWORD );
|
||||
typedef DWORD (WINAPI *lpfGetModuleBaseName) ( HANDLE, HMODULE, LPTSTR, DWORD );
|
||||
typedef BOOL (WINAPI *lpfEnumDeviceDrivers) ( LPVOID *, DWORD, LPDWORD );
|
||||
typedef BOOL (WINAPI *lpfGetDeviceDriverBaseName)( LPVOID, LPTSTR, DWORD );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// Internal use routines
|
||||
bool LoadPSAPIRoutines( void );
|
||||
bool FreePSAPIRoutines( void );
|
||||
|
||||
bool FindProc( char *szProcess );
|
||||
bool KillProc( char *szProcess );
|
||||
|
||||
bool FindDev( char *szDriverName );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
// Exported routines
|
||||
extern "C" __declspec(dllexport) void FindProcess( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop );
|
||||
|
||||
extern "C" __declspec(dllexport) void KillProcess( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop );
|
||||
|
||||
extern "C" __declspec(dllexport) void FindDevice( HWND hwndParent,
|
||||
int string_size,
|
||||
char *variables,
|
||||
stack_t **stacktop );
|
BIN
admin/win/nsi/nsis_processes/src/processes.ncb
Executable file
103
admin/win/nsi/nsis_processes/src/processes.rc
Executable file
@@ -0,0 +1,103 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "NSIS Plug-in for Windows process management. Only WinNT, Win2K, WinXP and Win2003 Server supported."
|
||||
VALUE "CompanyName", "Andrei Ciubotaru [Hardwired]"
|
||||
VALUE "FileDescription", "Windows Processes Management"
|
||||
VALUE "FileVersion", "1, 0, 0, 1"
|
||||
VALUE "InternalName", "Processes"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2004 Hardwired. No rights reserved."
|
||||
VALUE "OriginalFilename", "Processes.dll"
|
||||
VALUE "ProductName", "Processes"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
21
admin/win/nsi/nsis_processes/src/processes.sln
Executable file
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "processes", "processes.vcproj", "{3438467F-A719-46DC-93E5-137A8B691727}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{3438467F-A719-46DC-93E5-137A8B691727}.Debug.ActiveCfg = Debug|Win32
|
||||
{3438467F-A719-46DC-93E5-137A8B691727}.Debug.Build.0 = Debug|Win32
|
||||
{3438467F-A719-46DC-93E5-137A8B691727}.Release.ActiveCfg = Release|Win32
|
||||
{3438467F-A719-46DC-93E5-137A8B691727}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
122
admin/win/nsi/nsis_processes/src/processes.txt
Executable file
@@ -0,0 +1,122 @@
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
Processes (Processes.dll)
|
||||
Version: 1.0.0.1
|
||||
Release: 12.december.2004
|
||||
Description:Nullsoft Installer (NSIS) plug-in for managing?!
|
||||
Windows processes.
|
||||
|
||||
Copyright: <09> 2004 Hardwired. No rights reserved.
|
||||
There is no restriction and no guaranty for using
|
||||
this software.
|
||||
|
||||
Author: Andrei Ciubotaru [Hardwired]
|
||||
Lead Developer ICode&Ideas SRL (http://www.icode.ro)
|
||||
hardwiredteks@gmail.com, hardwired@icode.ro
|
||||
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
INTRODUCTION
|
||||
|
||||
The Need For Plug-in - I need it for the one of my installers.
|
||||
|
||||
Briefly: Use it when you need to find\kill a process when
|
||||
installing\uninstalling some application. Also, use it when you
|
||||
need to test the presence of a device driver.
|
||||
|
||||
|
||||
SUPPORT
|
||||
|
||||
Supported platforms are: WinNT,Win2K,WinXP and Win2003 Server.
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
Processes::FindProcess <process_name.exe>
|
||||
|
||||
Searches the currently running processes for the given
|
||||
process name.
|
||||
|
||||
return: 1 - the process was found
|
||||
0 - the process was not found
|
||||
|
||||
Processes::KillProcess <process_name.exe>
|
||||
|
||||
Searches the currently running processes for the given
|
||||
process name. If the process is found then the it gets
|
||||
killed.
|
||||
|
||||
return: 1 - the process was found and killed
|
||||
0 - the process was not found or the process
|
||||
cannot be killed (insuficient rights)
|
||||
|
||||
Processes::FindDevice <device_base_name>
|
||||
|
||||
Searches the installed devices drivers for the given
|
||||
device base name.
|
||||
(important: I said BASE NAME not FILENAME)
|
||||
|
||||
return: 1 - the device driver was found
|
||||
0 - the device driver was not found
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
First of all, does not matter where you use it. Ofcourse, the
|
||||
routines must be called inside of a Section/Function scope.
|
||||
|
||||
Processes::FindProcess "process_name.exe"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" make_my_day noooooo
|
||||
|
||||
make_my_day:
|
||||
...
|
||||
|
||||
noooooo:
|
||||
...
|
||||
|
||||
|
||||
Processes::KillProcess "process_name.exe"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" dead_meat why_wont_you_die
|
||||
|
||||
dead_meat:
|
||||
...
|
||||
|
||||
why_wont_you_die:
|
||||
...
|
||||
|
||||
|
||||
Processes::FindDevice "device_base_name"
|
||||
Pop $R0
|
||||
|
||||
StrCmp $R0 "1" blabla more_blabla
|
||||
|
||||
blabla:
|
||||
...
|
||||
|
||||
more_blabla:
|
||||
...
|
||||
|
||||
|
||||
THANKS
|
||||
|
||||
Sunil Kamath for inspiring me. I wanted to use its FindProcDLL
|
||||
but my requirements made it imposible.
|
||||
|
||||
Nullsoft for creating this very powerfull installer. One big,
|
||||
free and full-featured (hmmm... and guiless for the moment) mean
|
||||
install machine!:)
|
||||
|
||||
ME for being such a great coder...
|
||||
... HAHAHAHAHAHAHA!
|
||||
|
||||
ONE MORE THING
|
||||
|
||||
If you use the plugin or it's source-code, I would apreciate
|
||||
if my name is mentioned.
|
||||
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
222
admin/win/nsi/nsis_processes/src/processes.vcproj
Executable file
@@ -0,0 +1,222 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="processes"
|
||||
SccProjectName="processes"
|
||||
SccLocalPath=".">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FINDPROCDLL_EXPORTS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Debug/processes.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile=".\Debug/processes.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\Debug/processes.pdb"
|
||||
ImportLibrary=".\Debug/processes.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/processes.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1034"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="..\bin"
|
||||
IntermediateDirectory="..\bin\processes"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
GlobalOptimizations="TRUE"
|
||||
InlineFunctionExpansion="1"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;FINDPROCDLL_EXPORTS"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
StructMemberAlignment="1"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile="..\bin\processes/processes.pch"
|
||||
AssemblerListingLocation="..\bin\processes/"
|
||||
ObjectFile="..\bin\processes/"
|
||||
ProgramDataBaseFileName="..\bin\processes/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libc.lib"
|
||||
OutputFile="..\bin/Processes.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
IgnoreAllDefaultLibraries="FALSE"
|
||||
ProgramDatabaseFile="..\bin/processes.pdb"
|
||||
OptimizeForWindows98="1"
|
||||
ImportLibrary="..\bin/processes.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/processes.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="processes.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="NDEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\processes.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
PreprocessorDefinitions="NDEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="exdll.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\processes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="processes.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
15
admin/win/nsi/nsis_processes/src/resource.h
Executable file
@@ -0,0 +1,15 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by processes.rc
|
||||
//
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
0
admin/win/nsi/page_header.bmp
Executable file → Normal file
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@@ -1 +1 @@
|
||||
96
|
||||
105
|
0
admin/win/nsi/tomahawk.ini
Executable file → Normal file
311
admin/win/nsi/tomahawk.nsi
Executable file → Normal file
@@ -4,7 +4,7 @@
|
||||
; Some installer script options (comment-out options not required)
|
||||
;-----------------------------------------------------------------------------
|
||||
;!define OPTION_LICENSE_AGREEMENT
|
||||
;!define OPTION_UAC_PLUGIN_ENHANCED
|
||||
!define OPTION_UAC_PLUGIN_ENHANCED
|
||||
!define OPTION_SECTION_SC_START_MENU
|
||||
!define OPTION_SECTION_SC_DESKTOP
|
||||
!define OPTION_SECTION_SC_QUICK_LAUNCH
|
||||
@@ -15,15 +15,18 @@
|
||||
;-----------------------------------------------------------------------------
|
||||
; Some paths.
|
||||
;-----------------------------------------------------------------------------
|
||||
!define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
|
||||
!ifndef MING_PATH
|
||||
!define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
|
||||
!endif
|
||||
!define MING_BIN "${MING_PATH}/bin"
|
||||
!define MING_DLL_PATH "${MING_BIN}"
|
||||
!define MING_LIB "${MING_PATH}/lib"
|
||||
!define ROOT_PATH "..\..\.." ; assuming the script is in ROOT/admin/win/nsi
|
||||
!define BUILD_PATH "${ROOT_PATH}\build"
|
||||
!define QT_DLL_PATH "${MING_BIN}"
|
||||
!define SQLITE_DLL_PATH "${MING_LIB}/qt4/plugins/sqldrivers"
|
||||
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt4/plugins/imageformats"
|
||||
!define VLC_PATH "${ROOT_PATH}\..\vlc"
|
||||
!define VLC_PLUGIN_PATH "${VLC_PATH}\plugins"
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Increment installer revision number as part of this script.
|
||||
@@ -33,9 +36,11 @@
|
||||
!delfile revision.txt
|
||||
!appendfile revision.txt ${REVISION}
|
||||
|
||||
!define VER_MAJOR "0"
|
||||
!define VER_MINOR "0"
|
||||
!define VER_BUILD "2"
|
||||
!ifndef VER_MAJOR && VER_MINOR && VER_BUILD
|
||||
!define VER_MAJOR "0"
|
||||
!define VER_MINOR "1"
|
||||
!define VER_BUILD "0rc2"
|
||||
!endif
|
||||
|
||||
!define VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_BUILD}"
|
||||
|
||||
@@ -58,17 +63,10 @@ InstType Full
|
||||
InstType Minimal
|
||||
CRCCheck On
|
||||
SetCompressor /SOLID lzma
|
||||
RequestExecutionLevel user ;Now using the UAC plugin.
|
||||
ReserveFile tomahawk.ini
|
||||
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
||||
|
||||
;The UAC plugin provides an elevated user.
|
||||
;Otherwise request admin level here.
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
RequestExecutionLevel user
|
||||
!else
|
||||
RequestExecutionLevel admin
|
||||
!endif
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Include some required header files.
|
||||
;-----------------------------------------------------------------------------
|
||||
@@ -79,16 +77,14 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
||||
!include Memento.nsh ;Remember user selections.
|
||||
!include WinVer.nsh ;Windows version detection.
|
||||
!include WordFunc.nsh ;Used by VersionCompare macro function.
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
|
||||
!endif
|
||||
!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Memento selections stored in registry.
|
||||
;-----------------------------------------------------------------------------
|
||||
!define MEMENTO_REGISTRY_ROOT HKLM
|
||||
!define MEMENTO_REGISTRY_KEY Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk
|
||||
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Modern User Interface (MUI) defintions and setup.
|
||||
;-----------------------------------------------------------------------------
|
||||
@@ -146,18 +142,46 @@ UninstPage custom un.UnPageUserAppData un.UnPageUserAppDataLeave
|
||||
##############################################################################
|
||||
|
||||
Function LaunchTomahawk
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
${UAC.CallFunctionAsUser} LaunchTomahawkAsUser
|
||||
!else
|
||||
Exec "$INSTDIR\tomahawk.exe"
|
||||
!endif
|
||||
${UAC.CallFunctionAsUser} LaunchTomahawkAsUser
|
||||
FunctionEnd
|
||||
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
Function LaunchTomahawkAsUser
|
||||
Exec "$INSTDIR\tomahawk.exe"
|
||||
FunctionEnd
|
||||
!endif
|
||||
|
||||
##############################################################################
|
||||
# #
|
||||
# PROCESS HANDLING FUNCTIONS AND MACROS #
|
||||
# #
|
||||
##############################################################################
|
||||
|
||||
!macro CheckForProcess processName gotoWhenFound gotoWhenNotFound
|
||||
Processes::FindProcess ${processName}
|
||||
StrCmp $R0 "0" ${gotoWhenNotFound} ${gotoWhenFound}
|
||||
!macroend
|
||||
|
||||
!macro ConfirmEndProcess processName
|
||||
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
||||
"Found ${processName} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?" \
|
||||
IDYES process_${processName}_kill IDNO process_${processName}_ended
|
||||
process_${processName}_kill:
|
||||
DetailPrint "Killing ${processName} processes."
|
||||
Processes::KillProcess ${processName}
|
||||
Sleep 1500
|
||||
StrCmp $R0 "1" process_${processName}_ended
|
||||
DetailPrint "Process to kill not found!"
|
||||
process_${processName}_ended:
|
||||
!macroend
|
||||
|
||||
!macro CheckAndConfirmEndProcess processName
|
||||
!insertmacro CheckForProcess ${processName} 0 no_process_${processName}_to_end
|
||||
!insertmacro ConfirmEndProcess ${processName}
|
||||
no_process_${processName}_to_end:
|
||||
!macroend
|
||||
|
||||
Function EnsureTomahawkShutdown
|
||||
!insertmacro CheckAndConfirmEndProcess "tomahawk.exe"
|
||||
FunctionEnd
|
||||
|
||||
##############################################################################
|
||||
# #
|
||||
@@ -226,12 +250,10 @@ Function PageLeaveReinstall
|
||||
Delete $R1
|
||||
RMDir $INSTDIR
|
||||
no_remove_uninstaller:
|
||||
StrCmp $R0 "2" +2 0
|
||||
StrCmp $R0 "2" 0 +3
|
||||
UAC::Unload
|
||||
Quit
|
||||
BringToFront
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
UAC::Unload
|
||||
Quit
|
||||
!endif
|
||||
reinst_done:
|
||||
FunctionEnd
|
||||
|
||||
@@ -244,7 +266,7 @@ FunctionEnd
|
||||
Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
SectionIn 1 2 3 RO
|
||||
SetDetailsPrint listonly
|
||||
|
||||
|
||||
SetDetailsPrint textonly
|
||||
DetailPrint "Installing Tomahawk Player essentials."
|
||||
SetDetailsPrint listonly
|
||||
@@ -254,34 +276,28 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
;Main executable.
|
||||
File "${INSTALL_PATH}\bin\tomahawk.exe"
|
||||
|
||||
File "${INSTALL_PATH}\lib\librtaudio.dll"
|
||||
File "${INSTALL_PATH}\lib\libqxtweb-standalone.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_jdns.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_qtweetlib.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawklib.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_sipjabber.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_siptwitter.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_sipzeroconf.dll"
|
||||
File "${INSTALL_PATH}\bin\libqxtweb-standalone.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawk_portfwd.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawk_lastfm2.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawklib.dll"
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_sip*.dll"
|
||||
!endif
|
||||
!ifndef INSTALL_PATH
|
||||
;Main executable.
|
||||
File "${BUILD_PATH}\tomahawk.exe"
|
||||
|
||||
File "${BUILD_PATH}\thirdparty\rtaudio\librtaudio.dll"
|
||||
File "${BUILD_PATH}\thirdparty\qxt\qxtweb-standalone\libqxtweb-standalone.dll"
|
||||
File "${BUILD_PATH}\thirdparty\jdns\libtomahawk_jdns.dll"
|
||||
File "${BUILD_PATH}\thirdparty\qtweetlib\libtomahawk_qtweetlib.dll"
|
||||
File "${BUILD_PATH}\src\libtomahawk\libtomahawklib.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_sipjabber.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_siptwitter.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_sipzeroconf.dll"
|
||||
File "${BUILD_PATH}\libtomahawklib.dll"
|
||||
File "${BUILD_PATH}\libqxtweb-standalone.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_portfwd.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_lastfm2.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_sip*.dll"
|
||||
!endif
|
||||
|
||||
;License & release notes.
|
||||
File "${ROOT_PATH}\LICENSE.txt"
|
||||
File /oname=NOTES.txt RELEASE_NOTES.txt
|
||||
|
||||
;QT stuff:
|
||||
|
||||
;QT stuff:
|
||||
File "${QT_DLL_PATH}\QtCore4.dll"
|
||||
File "${QT_DLL_PATH}\QtGui4.dll"
|
||||
File "${QT_DLL_PATH}\QtNetwork4.dll"
|
||||
@@ -299,32 +315,59 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qgif4.dll"
|
||||
File "${IMAGEFORMATS_DLL_PATH}\qjpeg4.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;Cygwin/c++ stuff
|
||||
;File "${MING_DLL_PATH}\cygmad-0.dll"
|
||||
;File "${MING_DLL_PATH}\libgcc_s_dw2-1.dll"
|
||||
;File "${MING_DLL_PATH}\mingwm10.dll"
|
||||
File "${MING_DLL_PATH}\libgcc_s_sjlj-1.dll"
|
||||
File "${MING_DLL_PATH}\libstdc++-6.dll"
|
||||
|
||||
;Audio stuff
|
||||
File "${MING_DLL_PATH}\libmad-0.dll"
|
||||
File "${MING_DLL_PATH}\libogg-0.dll"
|
||||
File "${MING_DLL_PATH}\libvorbisfile-3.dll"
|
||||
File "${MING_DLL_PATH}\libvorbis-0.dll"
|
||||
File "${MING_DLL_PATH}\libFLAC-8.dll"
|
||||
File "${MING_DLL_PATH}\libFLAC++-6.dll"
|
||||
|
||||
;Other
|
||||
File "${MING_DLL_PATH}\libqjson.dll"
|
||||
File "${MING_DLL_PATH}\libtag.dll"
|
||||
File "${MING_DLL_PATH}\libgloox-8.dll"
|
||||
File "${MING_DLL_PATH}\libpng15-15.dll"
|
||||
File "${MING_DLL_PATH}\libjpeg-8.dll"
|
||||
File "${MING_DLL_PATH}\zlib1.dll"
|
||||
|
||||
File "${MING_DLL_PATH}\libechonest.dll"
|
||||
File "${MING_DLL_PATH}\liblastfm.dll"
|
||||
;Cygwin/c++ stuff
|
||||
;File "${MING_BIN}\cygmad-0.dll"
|
||||
;File "${MING_BIN}\libgcc_s_dw2-1.dll"
|
||||
;File "${MING_BIN}\mingwm10.dll"
|
||||
File "${MING_BIN}\libgcc_s_sjlj-1.dll"
|
||||
File "${MING_BIN}\libstdc++-6.dll"
|
||||
|
||||
;Phonon stuff
|
||||
|
||||
;Fix the phonon build to not use Dbus
|
||||
File "${QT_DLL_PATH}\QtDbus4.dll"
|
||||
File "${MING_BIN}\libdbus-1-3.dll"
|
||||
File "${MING_BIN}\dbus-daemon.exe"
|
||||
|
||||
File "${MING_BIN}\libphonon.dll"
|
||||
SetOutPath "$INSTDIR\phonon_backend"
|
||||
File "${MING_BIN}\phonon_backend\phonon_vlc.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;VLC
|
||||
;SetOutPath "$INSTDIR\phonon_backend"
|
||||
File "${VLC_PATH}\libvlc.dll"
|
||||
File "${VLC_PATH}\libvlccore.dll"
|
||||
SetOutPath "$INSTDIR\plugins"
|
||||
File /r "${VLC_PLUGIN_PATH}\*.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${MING_BIN}\libmad-0.dll" ; MP3
|
||||
File "${MING_BIN}\libFLAC-8.dll" ; FLAC
|
||||
File "${MING_BIN}\libogg-0.dll" ; OGG, FLAC
|
||||
File "${MING_BIN}\libvorbis-0.dll" ; OGG
|
||||
File "${MING_BIN}\libvorbisenc-2.dll" ; OGG
|
||||
|
||||
|
||||
|
||||
; Other
|
||||
File "${MING_BIN}\libqjson.dll"
|
||||
File "${MING_BIN}\libtag.dll"
|
||||
File "${MING_BIN}\libpng15-15.dll"
|
||||
File "${MING_BIN}\libjpeg-8.dll"
|
||||
File "${MING_BIN}\zlib1.dll"
|
||||
|
||||
File "${MING_BIN}\libechonest.dll"
|
||||
File "${MING_BIN}\libQTweetLib.dll"
|
||||
|
||||
; Jabber
|
||||
File "${MING_BIN}\libjreen.dll"
|
||||
File "${MING_BIN}\libqca.dll"
|
||||
SetOutPath "$INSTDIR\crypto"
|
||||
File "${MING_LIB}\qt4\plugins\crypto\libqca-ossl.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${MING_BIN}\libssl-8.dll"
|
||||
File "${MING_BIN}\libcrypto-8.dll"
|
||||
|
||||
File "${MING_LIB}\libclucene-core.dll"
|
||||
File "${MING_LIB}\libclucene-shared.dll"
|
||||
@@ -346,7 +389,7 @@ SectionGroup "Shortcuts"
|
||||
CreateShortCut "$SMPROGRAMS\Tomahawk\LICENSE.lnk" "$INSTDIR\LICENSE.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tomahawk\Tomahawk.lnk" "$INSTDIR\tomahawk.exe"
|
||||
CreateShortCut "$SMPROGRAMS\Tomahawk\Release notes.lnk" "$INSTDIR\NOTES.txt"
|
||||
CreateShortCut "$SMPROGRAMS\Tomahawk\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
CreateShortCut "$SMPROGRAMS\Tomahawk\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
||||
SetShellVarContext current
|
||||
${MementoSectionEnd}
|
||||
!endif
|
||||
@@ -390,7 +433,7 @@ Section -post
|
||||
SetDetailsPrint textonly
|
||||
DetailPrint "Writing Uninstaller"
|
||||
SetDetailsPrint listonly
|
||||
WriteUninstaller $INSTDIR\Uninstall.exe
|
||||
WriteUninstaller $INSTDIR\uninstall.exe
|
||||
|
||||
;Registry keys required for installer version handling and uninstaller.
|
||||
SetDetailsPrint textonly
|
||||
@@ -418,6 +461,12 @@ Section -post
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "NoModify" "1"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "NoRepair" "1"
|
||||
|
||||
; Register tomahawk:// protocol handler
|
||||
WriteRegStr HKCR "tomahawk" "" "URL: Tomahawk Protocol"
|
||||
WriteRegStr HKCR "tomahawk\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
||||
WriteRegStr HKCR "tomahawk\shell" "" "open"
|
||||
WriteRegStr HKCR "tomahawk\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
||||
|
||||
SetDetailsPrint textonly
|
||||
DetailPrint "Finsihed."
|
||||
SectionEnd
|
||||
@@ -477,6 +526,8 @@ Section Uninstall
|
||||
DeleteRegValue HKLM "Software\Tomahawk" ""
|
||||
DeleteRegKey HKLM "Software\Tomahawk"
|
||||
|
||||
DeleteRegKey HKCR "tomahawk"
|
||||
|
||||
;Start menu shortcuts.
|
||||
!ifdef OPTION_SECTION_SC_START_MENU
|
||||
SetShellVarContext all
|
||||
@@ -498,7 +549,7 @@ Section Uninstall
|
||||
|
||||
;Remove all the Program Files.
|
||||
RMDir /r $INSTDIR
|
||||
|
||||
|
||||
;Uninstall User Data if option is checked, otherwise skip.
|
||||
${If} $UnPageUserAppDataCheckbox_State == ${BST_CHECKED}
|
||||
RMDir /r "$LOCALAPPDATA\Tomahawk"
|
||||
@@ -514,7 +565,7 @@ SectionEnd
|
||||
# #
|
||||
##############################################################################
|
||||
|
||||
Function .onInit
|
||||
Function .onInit
|
||||
!insertmacro INSTALLOPTIONS_EXTRACT "tomahawk.ini"
|
||||
|
||||
;Remove Quick Launch option from Windows 7, as no longer applicable - usually.
|
||||
@@ -526,27 +577,25 @@ Function .onInit
|
||||
|
||||
${MementoSectionRestore}
|
||||
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
UAC_Elevate:
|
||||
UAC::RunElevated
|
||||
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
|
||||
StrCmp 0 $0 0 UAC_Err ; Error?
|
||||
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
|
||||
Quit
|
||||
|
||||
UAC_Err:
|
||||
MessageBox MB_ICONSTOP "Unable to elevate, error $0"
|
||||
Abort
|
||||
|
||||
UAC_ElevationAborted:
|
||||
Abort
|
||||
|
||||
UAC_Success:
|
||||
StrCmp 1 $3 +4 ;Admin?
|
||||
StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
|
||||
MessageBox MB_ICONSTOP "This installer requires admin access, try again"
|
||||
goto UAC_Elevate
|
||||
!endif
|
||||
UAC_Elevate:
|
||||
UAC::RunElevated
|
||||
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
|
||||
StrCmp 0 $0 0 UAC_Err ; Error?
|
||||
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
|
||||
Quit
|
||||
|
||||
UAC_Err:
|
||||
MessageBox MB_ICONSTOP "Unable to elevate, error $0"
|
||||
Abort
|
||||
|
||||
UAC_ElevationAborted:
|
||||
Abort
|
||||
|
||||
UAC_Success:
|
||||
StrCmp 1 $3 +4 ;Admin?
|
||||
StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
|
||||
MessageBox MB_ICONSTOP "This installer requires admin access, try again"
|
||||
goto UAC_Elevate
|
||||
|
||||
;Prevent multiple instances.
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "tomahawkInstaller") i .r1 ?e'
|
||||
@@ -554,19 +603,25 @@ Function .onInit
|
||||
StrCmp $R0 0 +3
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
|
||||
Abort
|
||||
|
||||
;Use available InstallLocation when possible. This is useful in the uninstaller
|
||||
;via re-install, which would otherwise use a default location - a bug.
|
||||
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "InstallLocation"
|
||||
StrCmp $R0 "" SkipSetInstDir
|
||||
StrCpy $INSTDIR $R0
|
||||
SkipSetInstDir:
|
||||
|
||||
;Shutdown Tomahawk in case Add/Remove re-installer option used.
|
||||
Call EnsureTomahawkShutdown
|
||||
FunctionEnd
|
||||
|
||||
Function .onInstSuccess
|
||||
${MementoSectionSave}
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
UAC::Unload ;Must call unload!
|
||||
!endif
|
||||
UAC::Unload ;Must call unload!
|
||||
FunctionEnd
|
||||
|
||||
Function .onInstFailed
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
UAC::Unload ;Must call unload!
|
||||
!endif
|
||||
UAC::Unload ;Must call unload!
|
||||
FunctionEnd
|
||||
|
||||
##############################################################################
|
||||
@@ -576,27 +631,25 @@ FunctionEnd
|
||||
##############################################################################
|
||||
|
||||
Function un.onInit
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
UAC_Elevate:
|
||||
UAC::RunElevated
|
||||
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
|
||||
StrCmp 0 $0 0 UAC_Err ; Error?
|
||||
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
|
||||
Quit
|
||||
UAC_Elevate:
|
||||
UAC::RunElevated
|
||||
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
|
||||
StrCmp 0 $0 0 UAC_Err ; Error?
|
||||
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
|
||||
Quit
|
||||
|
||||
UAC_Err:
|
||||
MessageBox MB_ICONSTOP "Unable to elevate, error $0"
|
||||
Abort
|
||||
|
||||
UAC_ElevationAborted:
|
||||
Abort
|
||||
|
||||
UAC_Success:
|
||||
StrCmp 1 $3 +4 ;Admin?
|
||||
StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
|
||||
MessageBox MB_ICONSTOP "This uninstaller requires admin access, try again"
|
||||
goto UAC_Elevate
|
||||
!endif
|
||||
UAC_Err:
|
||||
MessageBox MB_ICONSTOP "Unable to elevate, error $0"
|
||||
Abort
|
||||
|
||||
UAC_ElevationAborted:
|
||||
Abort
|
||||
|
||||
UAC_Success:
|
||||
StrCmp 1 $3 +4 ;Admin?
|
||||
StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
|
||||
MessageBox MB_ICONSTOP "This uninstaller requires admin access, try again"
|
||||
goto UAC_Elevate
|
||||
|
||||
;Prevent multiple instances.
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "tomahawkUninstaller") i .r1 ?e'
|
||||
@@ -607,13 +660,9 @@ Function un.onInit
|
||||
FunctionEnd
|
||||
|
||||
Function un.onUnInstSuccess
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
UAC::Unload ;Must call unload!
|
||||
!endif
|
||||
UAC::Unload ;Must call unload!
|
||||
FunctionEnd
|
||||
|
||||
Function un.onUnInstFailed
|
||||
!ifdef OPTION_UAC_PLUGIN_ENHANCED
|
||||
UAC::Unload ;Must call unload!
|
||||
!endif
|
||||
UAC::Unload ;Must call unload!
|
||||
FunctionEnd
|
||||
|
0
admin/win/nsi/welcome.bmp
Executable file → Normal file
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
@@ -8,10 +8,18 @@
|
||||
<item>
|
||||
<title>Version 0.0.1 (Tomahawk Player Beta - It Lives?)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/stable/ChangeLog
|
||||
https://github.com/tomahawk-player/tomahawk/raw/0.0.1/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Fri, 25 Mar 2011 00:00:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/tomahawk-beta-0.0.1.exe" sparkle:version="0.0.1" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 0.0.2 (Tomahawk Player Beta - It Lives?)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/0.0.2/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Mon, 28 Mar 2011 05:00:02 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/tomahawk-0.0.2.exe" sparkle:version="0.0.2" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
@@ -11,7 +11,15 @@
|
||||
https://github.com/tomahawk-player/tomahawk/raw/0.0.1/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Fri, 25 Mar 2011 00:00:01 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/tomahawk-0.0.1.exe" sparkle:version="0.0.1" />
|
||||
<enclosure url="http://download.tomahawk-player.org/tomahawk-beta-0.0.1.exe" sparkle:version="0.0.1" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 0.0.2 (Tomahawk Player - It Lives!)</title>
|
||||
<sparkle:releaseNotesLink>
|
||||
https://github.com/tomahawk-player/tomahawk/raw/0.0.2/ChangeLog
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>Mon, 28 Mar 2011 05:00:02 +0100</pubDate>
|
||||
<enclosure url="http://download.tomahawk-player.org/tomahawk-0.0.2.exe" sparkle:version="0.0.2" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
20
admin/win/update-vlc.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
echo "Remove old vlc dir..."
|
||||
#rm -vf vlc-*.7z
|
||||
rm -rf vlc/
|
||||
|
||||
echo "Download specified binary..."
|
||||
#wget -c "http://downloads.sourceforge.net/project/vlc/1.1.9/win32/vlc-1.1.9-win32.7z?r=http%3A%2F%2Fwww.videolan.org%2Fvlc%2Fdownload-windows.html&ts=1306272584&use_mirror=leaseweb"
|
||||
wget -c "http://nightlies.videolan.org/build/win32/trunk-20110524-1321/vlc-1.2.0-git-20110524-1321-win32.7z"
|
||||
|
||||
echo "Extract binary..."
|
||||
7z x vlc-*.7z
|
||||
mv -v vlc-*/ vlc/
|
||||
|
||||
echo "Strip unneeded plugins from vlc/plugins..."
|
||||
cd vlc/plugins/
|
||||
rm -rvf video_*/ gui/ */libold* */libvcd* */libdvd* */liblibass* */libx264* */libschroe* */liblibmpeg2* \
|
||||
*/libstream_out_* */libmjpeg_plugin* */libh264_plugin* */libzvbi_plugin* */lib*sub*
|
||||
|
||||
echo "Downloaded and stripped VLC"
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.9 KiB |
BIN
data/images/account-settings.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
data/images/add.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
data/images/advanced-settings.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
data/images/configure.png
Normal file
After Width: | Height: | Size: 717 B |
BIN
data/images/create-playlist.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/lastfm-settings.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
data/images/music-settings.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
data/images/recently-played.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
data/images/resolvers-settings.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
data/images/sipplugin-add.png
Normal file
After Width: | Height: | Size: 771 B |
BIN
data/images/sipplugin-offline.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
data/images/sipplugin-online.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
data/images/sipplugin-remove.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
data/images/supercollection.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
11
data/sql/dbmigrate-22_to_23.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Script to migate from db version 22 to 23.
|
||||
-- Only change in this version is that playlists gained a createdOn date.
|
||||
-- Set all playlists to created to now.
|
||||
--
|
||||
-- Separate each command with %%
|
||||
|
||||
ALTER TABLE playlist ADD COLUMN createdOn INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
UPDATE playlist SET createdOn = strftime( '%s','now' );
|
||||
|
||||
UPDATE settings SET v = '23' WHERE k == 'schema_version';
|
@@ -18,28 +18,28 @@ QRadioButton::indicator {
|
||||
}
|
||||
|
||||
QRadioButton::indicator::unchecked {
|
||||
background-image: url(:/data/images/view-toggle-inactive-centre.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-inactive.png);
|
||||
background-image: url(:/data/images/view-toggle-inactive-right.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-inactive.png);
|
||||
}
|
||||
QRadioButton::indicator::checked {
|
||||
background-image: url(:/data/images/view-toggle-active-centre.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-active.png);
|
||||
background-image: url(:/data/images/view-toggle-active-right.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-active.png);
|
||||
}
|
||||
QRadioButton::indicator::pressed {
|
||||
background-image: url(:/data/images/view-toggle-pressed-centre.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-active.png);
|
||||
background-image: url(:/data/images/view-toggle-pressed-right.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-active.png);
|
||||
}
|
||||
QRadioButton#radioNormal::indicator::unchecked {
|
||||
background-image: url(:/data/images/view-toggle-inactive-left.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-inactive.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-inactive.png);
|
||||
}
|
||||
QRadioButton#radioNormal::indicator::checked {
|
||||
background-image: url(:/data/images/view-toggle-active-left.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-active.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-active.png);
|
||||
}
|
||||
QRadioButton#radioNormal::indicator::pressed {
|
||||
background-image: url(:/data/images/view-toggle-pressed-left.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-active.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-active.png);
|
||||
}
|
||||
QRadioButton#radioCloud::indicator::unchecked {
|
||||
background-image: url(:/data/images/view-toggle-inactive-right.png);
|
@@ -1,166 +0,0 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk 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.
|
||||
*
|
||||
* Tomahawk 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 Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TOMAHAWK_INFOSYSTEM_H
|
||||
#define TOMAHAWK_INFOSYSTEM_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/qmap.h>
|
||||
#include <QtCore/qsharedpointer.h>
|
||||
#include <QtCore/qset.h>
|
||||
#include <QtCore/qlinkedlist.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
|
||||
|
||||
namespace Tomahawk {
|
||||
|
||||
namespace InfoSystem {
|
||||
|
||||
enum InfoType {
|
||||
InfoTrackID,
|
||||
InfoTrackArtist,
|
||||
InfoTrackAlbum,
|
||||
InfoTrackGenre,
|
||||
InfoTrackComposer,
|
||||
InfoTrackDate,
|
||||
InfoTrackNumber,
|
||||
InfoTrackDiscNumber,
|
||||
InfoTrackBitRate,
|
||||
InfoTrackLength,
|
||||
InfoTrackSampleRate,
|
||||
InfoTrackFileSize,
|
||||
InfoTrackBPM,
|
||||
InfoTrackReplayGain,
|
||||
InfoTrackReplayPeakGain,
|
||||
InfoTrackLyrics,
|
||||
InfoTrackLocation,
|
||||
InfoTrackProfile,
|
||||
InfoTrackEnergy,
|
||||
InfoTrackDanceability,
|
||||
InfoTrackTempo,
|
||||
InfoTrackLoudness,
|
||||
|
||||
InfoArtistID,
|
||||
InfoArtistName,
|
||||
InfoArtistBiography,
|
||||
InfoArtistBlog,
|
||||
InfoArtistFamiliarity,
|
||||
InfoArtistHotttness,
|
||||
InfoArtistImages,
|
||||
InfoArtistNews,
|
||||
InfoArtistProfile,
|
||||
InfoArtistReviews,
|
||||
InfoArtistSongs,
|
||||
InfoArtistSimilars,
|
||||
InfoArtistTerms,
|
||||
InfoArtistLinks,
|
||||
InfoArtistVideos,
|
||||
|
||||
InfoAlbumID,
|
||||
InfoAlbumName,
|
||||
InfoAlbumArtist,
|
||||
InfoAlbumDate,
|
||||
InfoAlbumGenre,
|
||||
InfoAlbumComposer,
|
||||
InfoMiscTopHotttness,
|
||||
InfoMiscTopTerms,
|
||||
|
||||
InfoNoInfo
|
||||
};
|
||||
|
||||
typedef QMap< InfoType, QVariant > InfoMap;
|
||||
typedef QMap< QString, QMap< QString, QString > > InfoGenericMap;
|
||||
typedef QHash<QString, QVariant> InfoCustomDataHash;
|
||||
typedef QHash<QString, QString> MusixMatchHash;
|
||||
|
||||
class InfoPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InfoPlugin(QObject *parent)
|
||||
:QObject(parent)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
~InfoPlugin()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void getInfo(const QString &caller, const InfoType type, const QVariant &data, Tomahawk::InfoSystem::InfoCustomDataHash customData) = 0;
|
||||
|
||||
signals:
|
||||
void info(QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData);
|
||||
void finished(QString, Tomahawk::InfoSystem::InfoType);
|
||||
|
||||
protected:
|
||||
InfoType m_type;
|
||||
};
|
||||
|
||||
typedef QWeakPointer< InfoPlugin > InfoPluginPtr;
|
||||
|
||||
class InfoSystem : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
|
||||
InfoSystem(QObject *parent);
|
||||
~InfoSystem()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
void registerInfoTypes(const InfoPluginPtr &plugin, const QSet< InfoType > &types);
|
||||
|
||||
void getInfo(const QString &caller, const InfoType type, const QVariant &data, InfoCustomDataHash customData);
|
||||
void getInfo(const QString &caller, const InfoMap &input, InfoCustomDataHash customData);
|
||||
|
||||
signals:
|
||||
void info(QString caller, Tomahawk::InfoSystem::InfoType, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData);
|
||||
void finished(QString target);
|
||||
|
||||
public slots:
|
||||
void infoSlot(QString target, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData);
|
||||
void finishedSlot(QString target,Tomahawk::InfoSystem::InfoType type);
|
||||
|
||||
private:
|
||||
|
||||
QLinkedList< InfoPluginPtr > determineOrderedMatches(const InfoType type) const;
|
||||
|
||||
QMap< InfoType, QLinkedList<InfoPluginPtr> > m_infoMap;
|
||||
|
||||
// For now, statically instantiate plugins; this is just somewhere to keep them
|
||||
QLinkedList<InfoPluginPtr> m_plugins;
|
||||
|
||||
QHash< QString, QHash< Tomahawk::InfoSystem::InfoType, int > > m_dataTracker;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(Tomahawk::InfoSystem::InfoGenericMap)
|
||||
Q_DECLARE_METATYPE(Tomahawk::InfoSystem::InfoCustomDataHash);
|
||||
Q_DECLARE_METATYPE(Tomahawk::InfoSystem::MusixMatchHash)
|
||||
|
||||
#endif // TOMAHAWK_INFOSYSTEM_H
|
1484
lang/tomahawk_de.ts
Normal file
5
lang/tomahawk_i18n.qrc
Normal file
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/lang">
|
||||
<file>tomahawk_de.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
25
lang/translations.cmake
Normal file
@@ -0,0 +1,25 @@
|
||||
FILE (GLOB TS_FILES ${CMAKE_SOURCE_DIR}/lang/*.ts)
|
||||
QT4_ADD_TRANSLATION(QM_FILES ${TS_FILES})
|
||||
|
||||
## HACK HACK HACK - around rcc limitations to allow out of source-tree building
|
||||
SET( trans_file tomahawk_i18n )
|
||||
SET( trans_srcfile ${CMAKE_SOURCE_DIR}/lang/${trans_file}.qrc)
|
||||
SET( trans_infile ${CMAKE_CURRENT_BINARY_DIR}/${trans_file}.qrc)
|
||||
SET( trans_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${trans_file}.cxx)
|
||||
|
||||
# Copy the QRC file to the output directory
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${trans_infile}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${trans_srcfile} ${trans_infile}
|
||||
MAIN_DEPENDENCY ${trans_srcfile}
|
||||
)
|
||||
|
||||
# Run the resource compiler (rcc_options should already be set)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${trans_outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile}
|
||||
MAIN_DEPENDENCY ${trans_infile}
|
||||
DEPENDS ${QM_FILES}
|
||||
)
|
||||
|
195
resources.qrc
@@ -1,91 +1,106 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>./data/images/add-friend-button-pressed.png</file>
|
||||
<file>./data/images/add-friend-button-rest.png</file>
|
||||
<file>./data/images/avatar-dude-plus.png</file>
|
||||
<file>./data/images/avatar-dude.png</file>
|
||||
<file>./data/images/back-pressed.png</file>
|
||||
<file>./data/images/back-rest.png</file>
|
||||
<file>./data/images/cover-shadow.png</file>
|
||||
<file>./data/images/magnifying-glass.png</file>
|
||||
<file>./data/images/no-album-art-placeholder.png</file>
|
||||
<file>./data/images/now-playing-panel.png</file>
|
||||
<file>./data/images/now-playing-speaker.png</file>
|
||||
<file>./data/images/pause-pressed.png</file>
|
||||
<file>./data/images/pause-rest.png</file>
|
||||
<file>./data/images/play-pressed.png</file>
|
||||
<file>./data/images/play-rest.png</file>
|
||||
<file>./data/images/playlist-icon.png</file>
|
||||
<file>./data/images/repeat-1-on-pressed.png</file>
|
||||
<file>./data/images/repeat-1-on-rest.png</file>
|
||||
<file>./data/images/repeat-all-on-pressed.png</file>
|
||||
<file>./data/images/repeat-all-on-rest.png</file>
|
||||
<file>./data/images/repeat-off-pressed.png</file>
|
||||
<file>./data/images/repeat-off-rest.png</file>
|
||||
<file>./data/images/search-box-dismiss-x.png</file>
|
||||
<file>./data/images/search-box.png</file>
|
||||
<file>./data/images/seek-and-volume-knob-pressed.png</file>
|
||||
<file>./data/images/seek-and-volume-knob-rest.png</file>
|
||||
<file>./data/images/seek-slider-bkg.png</file>
|
||||
<file>./data/images/seek-slider-level.png</file>
|
||||
<file>./data/images/shuffle-off-pressed.png</file>
|
||||
<file>./data/images/shuffle-off-rest.png</file>
|
||||
<file>./data/images/shuffle-on-pressed.png</file>
|
||||
<file>./data/images/shuffle-on-rest.png</file>
|
||||
<file>./data/images/skip-pressed.png</file>
|
||||
<file>./data/images/skip-rest.png</file>
|
||||
<file>./data/images/source-info.png</file>
|
||||
<file>./data/images/source-off-pressed.png</file>
|
||||
<file>./data/images/source-off-rest.png</file>
|
||||
<file>./data/images/source-on-pressed.png</file>
|
||||
<file>./data/images/source-on-rest.png</file>
|
||||
<file>./data/images/status-alert-icon.png</file>
|
||||
<file>./data/images/status-bar-bkg.png</file>
|
||||
<file>./data/images/status-dismiss-x.png</file>
|
||||
<file>./data/images/user-avatar.png</file>
|
||||
<file>./data/images/view-toggle-active-centre.png</file>
|
||||
<file>./data/images/view-toggle-active-left.png</file>
|
||||
<file>./data/images/view-toggle-active-right.png</file>
|
||||
<file>./data/images/view-toggle-icon-artist-active.png</file>
|
||||
<file>./data/images/view-toggle-icon-artist-inactive.png</file>
|
||||
<file>./data/images/view-toggle-icon-cloud-active.png</file>
|
||||
<file>./data/images/view-toggle-icon-cloud-inactive.png</file>
|
||||
<file>./data/images/view-toggle-icon-list-active.png</file>
|
||||
<file>./data/images/view-toggle-icon-list-inactive.png</file>
|
||||
<file>./data/images/view-toggle-inactive-centre.png</file>
|
||||
<file>./data/images/view-toggle-inactive-left.png</file>
|
||||
<file>./data/images/view-toggle-inactive-right.png</file>
|
||||
<file>./data/images/view-toggle-pressed-centre.png</file>
|
||||
<file>./data/images/view-toggle-pressed-left.png</file>
|
||||
<file>./data/images/view-toggle-pressed-right.png</file>
|
||||
<file>./data/images/list-add.png</file>
|
||||
<file>./data/images/list-remove.png</file>
|
||||
<file>./data/images/arrow-up-double.png</file>
|
||||
<file>./data/images/arrow-down-double.png</file>
|
||||
<file>./data/images/volume-icon-full.png</file>
|
||||
<file>./data/images/arrow-right-double.png</file>
|
||||
<file>./data/images/view-refresh.png</file>
|
||||
<file>./data/images/volume-icon-muted.png</file>
|
||||
<file>./data/images/volume-slider-bkg.png</file>
|
||||
<file>./data/images/volume-slider-level.png</file>
|
||||
<file>./data/images/echonest_logo.png</file>
|
||||
<file>./data/images/loading-animation.gif</file>
|
||||
<file>./data/images/home.png</file>
|
||||
<file>./data/images/back.png</file>
|
||||
<file>./data/images/forward.png</file>
|
||||
<file>./data/images/music-icon.png</file>
|
||||
<file>./data/topbar-radiobuttons.css</file>
|
||||
<file>./data/icons/tomahawk-icon-16x16.png</file>
|
||||
<file>./data/icons/tomahawk-icon-32x32.png</file>
|
||||
<file>./data/icons/tomahawk-icon-64x64.png</file>
|
||||
<file>./data/icons/tomahawk-icon-128x128.png</file>
|
||||
<file>./data/icons/tomahawk-icon-256x256.png</file>
|
||||
<file>./data/icons/tomahawk-icon-512x512.png</file>
|
||||
<file>./data/icons/audio-x-generic-22x22.png</file>
|
||||
<file>./data/icons/audio-x-generic-32x32.png</file>
|
||||
<file>./data/icons/audio-x-generic-16x16.png</file>
|
||||
<file>./data/www/auth.html</file>
|
||||
<file>./data/www/auth.na.html</file>
|
||||
<file>./data/www/tomahawk_banner_small.png</file>
|
||||
</qresource>
|
||||
<RCC>
|
||||
<qresource>
|
||||
<file>./data/images/add-friend-button-pressed.png</file>
|
||||
<file>./data/images/add-friend-button-rest.png</file>
|
||||
<file>./data/images/avatar-dude-plus.png</file>
|
||||
<file>./data/images/avatar-dude.png</file>
|
||||
<file>./data/images/back-pressed.png</file>
|
||||
<file>./data/images/back-rest.png</file>
|
||||
<file>./data/images/cover-shadow.png</file>
|
||||
<file>./data/images/magnifying-glass.png</file>
|
||||
<file>./data/images/no-album-art-placeholder.png</file>
|
||||
<file>./data/images/now-playing-panel.png</file>
|
||||
<file>./data/images/now-playing-speaker.png</file>
|
||||
<file>./data/images/pause-pressed.png</file>
|
||||
<file>./data/images/pause-rest.png</file>
|
||||
<file>./data/images/play-pressed.png</file>
|
||||
<file>./data/images/play-rest.png</file>
|
||||
<file>./data/images/sipplugin-add.png</file>
|
||||
<file>./data/images/sipplugin-remove.png</file>
|
||||
<file>./data/images/playlist-icon.png</file>
|
||||
<file>./data/images/repeat-1-on-pressed.png</file>
|
||||
<file>./data/images/repeat-1-on-rest.png</file>
|
||||
<file>./data/images/repeat-all-on-pressed.png</file>
|
||||
<file>./data/images/repeat-all-on-rest.png</file>
|
||||
<file>./data/images/repeat-off-pressed.png</file>
|
||||
<file>./data/images/repeat-off-rest.png</file>
|
||||
<file>./data/images/search-box-dismiss-x.png</file>
|
||||
<file>./data/images/search-box.png</file>
|
||||
<file>./data/images/seek-and-volume-knob-pressed.png</file>
|
||||
<file>./data/images/seek-and-volume-knob-rest.png</file>
|
||||
<file>./data/images/seek-slider-bkg.png</file>
|
||||
<file>./data/images/seek-slider-level.png</file>
|
||||
<file>./data/images/shuffle-off-pressed.png</file>
|
||||
<file>./data/images/shuffle-off-rest.png</file>
|
||||
<file>./data/images/shuffle-on-pressed.png</file>
|
||||
<file>./data/images/shuffle-on-rest.png</file>
|
||||
<file>./data/images/skip-pressed.png</file>
|
||||
<file>./data/images/skip-rest.png</file>
|
||||
<file>./data/images/source-info.png</file>
|
||||
<file>./data/images/source-off-pressed.png</file>
|
||||
<file>./data/images/source-off-rest.png</file>
|
||||
<file>./data/images/source-on-pressed.png</file>
|
||||
<file>./data/images/source-on-rest.png</file>
|
||||
<file>./data/images/status-alert-icon.png</file>
|
||||
<file>./data/images/status-bar-bkg.png</file>
|
||||
<file>./data/images/status-dismiss-x.png</file>
|
||||
<file>./data/images/user-avatar.png</file>
|
||||
<file>./data/images/view-toggle-active-centre.png</file>
|
||||
<file>./data/images/view-toggle-active-left.png</file>
|
||||
<file>./data/images/view-toggle-active-right.png</file>
|
||||
<file>./data/images/view-toggle-icon-artist-active.png</file>
|
||||
<file>./data/images/view-toggle-icon-artist-inactive.png</file>
|
||||
<file>./data/images/view-toggle-icon-cloud-active.png</file>
|
||||
<file>./data/images/view-toggle-icon-cloud-inactive.png</file>
|
||||
<file>./data/images/view-toggle-icon-list-active.png</file>
|
||||
<file>./data/images/view-toggle-icon-list-inactive.png</file>
|
||||
<file>./data/images/view-toggle-inactive-centre.png</file>
|
||||
<file>./data/images/view-toggle-inactive-left.png</file>
|
||||
<file>./data/images/view-toggle-inactive-right.png</file>
|
||||
<file>./data/images/view-toggle-pressed-centre.png</file>
|
||||
<file>./data/images/view-toggle-pressed-left.png</file>
|
||||
<file>./data/images/view-toggle-pressed-right.png</file>
|
||||
<file>./data/images/list-add.png</file>
|
||||
<file>./data/images/list-remove.png</file>
|
||||
<file>./data/images/arrow-up-double.png</file>
|
||||
<file>./data/images/arrow-down-double.png</file>
|
||||
<file>./data/images/volume-icon-full.png</file>
|
||||
<file>./data/images/arrow-right-double.png</file>
|
||||
<file>./data/images/view-refresh.png</file>
|
||||
<file>./data/images/volume-icon-muted.png</file>
|
||||
<file>./data/images/volume-slider-bkg.png</file>
|
||||
<file>./data/images/volume-slider-level.png</file>
|
||||
<file>./data/images/echonest_logo.png</file>
|
||||
<file>./data/images/loading-animation.gif</file>
|
||||
<file>./data/images/home.png</file>
|
||||
<file>./data/images/back.png</file>
|
||||
<file>./data/images/forward.png</file>
|
||||
<file>./data/images/music-icon.png</file>
|
||||
<file>./data/images/configure.png</file>
|
||||
<file>./data/images/create-playlist.png</file>
|
||||
<file>./data/images/add.png</file>
|
||||
<file>./data/images/recently-played.png</file>
|
||||
<file>./data/images/supercollection.png</file>
|
||||
<file>./data/images/sipplugin-online.png</file>
|
||||
<file>./data/images/sipplugin-offline.png</file>
|
||||
<file>./data/images/advanced-settings.png</file>
|
||||
<file>./data/images/account-settings.png</file>
|
||||
<file>./data/images/music-settings.png</file>
|
||||
<file>./data/images/resolvers-settings.png</file>
|
||||
<file>./data/images/lastfm-settings.png</file>
|
||||
<file>./data/stylesheets/topbar-radiobuttons.css</file>
|
||||
<file>./data/icons/tomahawk-icon-16x16.png</file>
|
||||
<file>./data/icons/tomahawk-icon-32x32.png</file>
|
||||
<file>./data/icons/tomahawk-icon-64x64.png</file>
|
||||
<file>./data/icons/tomahawk-icon-128x128.png</file>
|
||||
<file>./data/icons/tomahawk-icon-256x256.png</file>
|
||||
<file>./data/icons/tomahawk-icon-512x512.png</file>
|
||||
<file>./data/icons/audio-x-generic-22x22.png</file>
|
||||
<file>./data/icons/audio-x-generic-32x32.png</file>
|
||||
<file>./data/icons/audio-x-generic-16x16.png</file>
|
||||
<file>./data/www/auth.html</file>
|
||||
<file>./data/www/auth.na.html</file>
|
||||
<file>./data/www/tomahawk_banner_small.png</file>
|
||||
<file>./data/sql/dbmigrate-22_to_23.sql</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -1,13 +1,15 @@
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
alsaplayback
|
||||
tomahawklib
|
||||
)
|
||||
|
||||
IF( "${gui}" STREQUAL "no" )
|
||||
ELSE()
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
gnutls
|
||||
)
|
||||
ENDIF()
|
||||
FILE( GLOB _icons "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
|
||||
FOREACH( _file ${_icons} )
|
||||
STRING( REPLACE "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-" "" _res ${_file} )
|
||||
STRING( REPLACE ".png" "" _res ${_res} )
|
||||
INSTALL( FILES ${_file} RENAME tomahawk.png DESTINATION share/icons/hicolor/${_res}/apps )
|
||||
ENDFOREACH( _file )
|
||||
|
||||
INSTALL( FILES ${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon.svg RENAME tomahawk.svg DESTINATION share/icons/hicolor/scalable )
|
||||
|
||||
INSTALL( FILES ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.desktop DESTINATION share/applications )
|
||||
|
@@ -5,13 +5,13 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${COREAUDIO_LIBRARY}
|
||||
${COREFOUNDATION_LIBRARY}
|
||||
|
||||
SPMediaKeyTap
|
||||
|
||||
/System/Library/Frameworks/AppKit.framework
|
||||
/System/Library/Frameworks/Carbon.framework
|
||||
/System/Library/Frameworks/DiskArbitration.framework
|
||||
/System/Library/Frameworks/Foundation.framework
|
||||
/System/Library/Frameworks/IOKit.framework
|
||||
|
||||
rtaudio
|
||||
)
|
||||
|
||||
|
||||
@@ -35,15 +35,18 @@ if (APPLE)
|
||||
|
||||
# Use two different sparkle update tracks for debug and release
|
||||
# We have to change the URL in the Info.plist file :-/
|
||||
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
|
||||
FILE(READ ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist plist)
|
||||
STRING( REPLACE "http://download.tomahawk-player.org/sparkle" # match this
|
||||
"http://download.tomahawk-player.org/sparkle-debug" #replace with debug url
|
||||
FILE(READ ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist plist)
|
||||
STRING( REPLACE "TOMAHAWK_VERSION"
|
||||
${TOMAHAWK_VERSION}
|
||||
edited_plist # save in this variable
|
||||
"${plist}" # from the contents of this var
|
||||
)
|
||||
FILE( WRITE ${CMAKE_BINARY_DIR}/Info.plist "${edited_plist}" )
|
||||
ELSE() # Just copy the release one
|
||||
FILE( COPY ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist DESTINATION ${CMAKE_BINARY_DIR} )
|
||||
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
|
||||
STRING( REPLACE "http://download.tomahawk-player.org/sparkle" # match this
|
||||
"http://download.tomahawk-player.org/sparkle-debug" #replace with debug url
|
||||
edited_plist # save in this variable
|
||||
"${edited_plist}" # from the contents of this var
|
||||
)
|
||||
ENDIF()
|
||||
FILE( WRITE ${CMAKE_BINARY_DIR}/Info.plist "${edited_plist}" )
|
||||
endif (APPLE)
|
||||
|
@@ -17,7 +17,6 @@ SET( CMAKE_VERBOSE_MAKEFILE ON )
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( TOMAHAWK_INC_DIR "${CMAKE_SOURCE_DIR}/include/" )
|
||||
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
|
||||
MESSAGE( "Building in debug mode, enabling all debug updates" )
|
||||
SET( DEBUG_BUILD ON )
|
||||
@@ -32,12 +31,6 @@ ENDIF()
|
||||
#ENDFOREACH( moddir )
|
||||
|
||||
SET( tomahawkSources ${tomahawkSources}
|
||||
sip/SipHandler.cpp
|
||||
|
||||
infosystem/infosystem.cpp
|
||||
infosystem/infoplugins/echonestplugin.cpp
|
||||
infosystem/infoplugins/musixmatchplugin.cpp
|
||||
|
||||
web/api_v1.cpp
|
||||
|
||||
resolvers/scriptresolver.cpp
|
||||
@@ -59,25 +52,30 @@ ENDIF(LIBLASTFM_FOUND)
|
||||
SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
||||
sourcetree/sourcesmodel.cpp
|
||||
sourcetree/sourcesproxymodel.cpp
|
||||
sourcetree/sourcetreeitem.cpp
|
||||
sourcetree/sourcetreeitemwidget.cpp
|
||||
sourcetree/sourcetreeview.cpp
|
||||
sourcetree/items/sourcetreeitem.cpp
|
||||
sourcetree/items/collectionitem.cpp
|
||||
sourcetree/items/playlistitems.cpp
|
||||
sourcetree/items/categoryitems.cpp
|
||||
sourcetree/items/genericpageitems.cpp
|
||||
|
||||
transferview.cpp
|
||||
PipelineStatusView.cpp
|
||||
tomahawktrayicon.cpp
|
||||
audiocontrols.cpp
|
||||
settingsdialog.cpp
|
||||
diagnosticsdialog.cpp
|
||||
configdelegatebase.cpp
|
||||
sipconfigdelegate.cpp
|
||||
resolverconfigdelegate.cpp
|
||||
resolversmodel.cpp
|
||||
tomahawkwindow.cpp
|
||||
|
||||
win/qtwin.cpp
|
||||
)
|
||||
|
||||
SET( tomahawkHeaders ${tomahawkHeaders}
|
||||
"${TOMAHAWK_INC_DIR}/tomahawk/tomahawkapp.h"
|
||||
"${TOMAHAWK_INC_DIR}/tomahawk/infosystem.h"
|
||||
|
||||
sip/SipHandler.h
|
||||
|
||||
infosystem/infoplugins/echonestplugin.h
|
||||
infosystem/infoplugins/musixmatchplugin.h
|
||||
tomahawkapp.h
|
||||
|
||||
web/api_v1.h
|
||||
|
||||
@@ -99,30 +97,44 @@ ENDIF(LIBLASTFM_FOUND)
|
||||
SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
||||
sourcetree/sourcesmodel.h
|
||||
sourcetree/sourcesproxymodel.h
|
||||
sourcetree/sourcetreeitem.h
|
||||
sourcetree/sourcetreeitemwidget.h
|
||||
sourcetree/sourcetreeview.h
|
||||
sourcetree/items/sourcetreeitem.h
|
||||
sourcetree/items/collectionitem.h
|
||||
sourcetree/items/playlistitems.h
|
||||
sourcetree/items/categoryitems.h
|
||||
sourcetree/items/genericpageitems.h
|
||||
|
||||
transferview.h
|
||||
PipelineStatusView.h
|
||||
tomahawktrayicon.h
|
||||
audiocontrols.h
|
||||
settingsdialog.h
|
||||
diagnosticsdialog.h
|
||||
configdelegatebase.h
|
||||
resolverconfigdelegate.h
|
||||
sipconfigdelegate.h
|
||||
resolversmodel.h
|
||||
delegateconfigwrapper.h
|
||||
tomahawkwindow.h
|
||||
|
||||
|
||||
win/qtwin.h
|
||||
)
|
||||
|
||||
SET( tomahawkUI ${tomahawkUI}
|
||||
tomahawkwindow.ui
|
||||
settingsdialog.ui
|
||||
diagnosticsdialog.ui
|
||||
stackedsettingsdialog.ui
|
||||
proxydialog.ui
|
||||
|
||||
audiocontrols.ui
|
||||
sourcetree/sourcetreeitemwidget.ui
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
.
|
||||
${TOMAHAWK_INC_DIR}
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
|
||||
|
||||
audio
|
||||
database
|
||||
@@ -132,16 +144,14 @@ INCLUDE_DIRECTORIES(
|
||||
topbar
|
||||
utils
|
||||
libtomahawk
|
||||
libtomahawk/utils
|
||||
mac
|
||||
|
||||
${THIRDPARTY_DIR}/alsa-playback
|
||||
${THIRDPARTY_DIR}/rtaudio
|
||||
${THIRDPARTY_DIR}/qxt/qxtweb-standalone/qxtweb
|
||||
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
|
||||
${THIRDPARTY_DIR}/qtweetlib/tomahawk-custom
|
||||
|
||||
${TAGLIB_INCLUDES}
|
||||
${PHONON_INCLUDES}
|
||||
${QJSON_INCLUDE_DIR}
|
||||
${LIBECHONEST_INCLUDE_DIR}
|
||||
${LIBECHONEST_INCLUDE_DIR}/..
|
||||
@@ -157,6 +167,8 @@ IF( UNIX )
|
||||
ENDIF( UNIX )
|
||||
|
||||
IF( APPLE )
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/thirdparty/SPMediaKeyTap )
|
||||
|
||||
SET( tomahawkHeaders ${tomahawkHeaders} mac/tomahawkapp_mac.h mac/macshortcuthandler.h )
|
||||
SET( tomahawkSources ${tomahawkSources} mac/tomahawkapp_mac.mm mac/macshortcuthandler.cpp )
|
||||
|
||||
@@ -180,7 +192,9 @@ qt4_wrap_cpp( tomahawkMoc ${tomahawkHeaders} )
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${tomahawkHeaders} )
|
||||
include( ${CMAKE_SOURCE_DIR}/lang/translations.cmake )
|
||||
|
||||
SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${tomahawkHeaders} ${trans_outfile})
|
||||
|
||||
IF( "${gui}" STREQUAL "no" )
|
||||
ELSE()
|
||||
@@ -205,7 +219,7 @@ MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
||||
|
||||
SET(LINK_LIBRARIES "")
|
||||
IF(LIBLASTFM_FOUND)
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${LIBLASTFM_LIBRARY} )
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_lastfm2 )
|
||||
ENDIF(LIBLASTFM_FOUND)
|
||||
IF(GLOOX_FOUND)
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${GLOOX_LIBRARIES} )
|
||||
@@ -214,15 +228,14 @@ ENDIF(GLOOX_FOUND)
|
||||
TARGET_LINK_LIBRARIES( tomahawk
|
||||
${LINK_LIBRARIES}
|
||||
${TOMAHAWK_LIBRARIES}
|
||||
${PHONON_LIBS}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${MAC_EXTRA_LIBS}
|
||||
${LIBECHONEST_LIBRARY}
|
||||
${QXTWEB_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${QJSON_LIBRARIES}
|
||||
${TAGLIB_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${CLUCENE_LIBRARIES}
|
||||
)
|
||||
|
||||
@@ -237,4 +250,19 @@ ENDIF( APPLE )
|
||||
|
||||
INSTALL( TARGETS tomahawk BUNDLE DESTINATION . RUNTIME DESTINATION bin )
|
||||
|
||||
IF( UNIX AND NOT APPLE AND KDE4_INSTALLED ) #install protocol file
|
||||
FILE( READ ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.protocol protocol )
|
||||
STRING( REPLACE "/path/to/binary" # match this
|
||||
"${CMAKE_INSTALL_PREFIX}/bin/tomahawk" # this is linux (kde) so pretty safe I think
|
||||
edited_protocol # save in this variable
|
||||
"${protocol}" # from the contents of this var
|
||||
)
|
||||
FILE( WRITE ${CMAKE_BINARY_DIR}/tomahawk.protocol "${edited_protocol}" )
|
||||
IF( ${SERVICES_INSTALL_DIR} )
|
||||
SET( PROTOCOL_INSTALL_DIR ${SERVICES_INSTALL_DIR} )
|
||||
ELSE()
|
||||
SET( PROTOCOL_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/kde4/services" )
|
||||
ENDIF()
|
||||
INSTALL( FILES ${CMAKE_BINARY_DIR}/tomahawk.protocol DESTINATION ${PROTOCOL_INSTALL_DIR} )
|
||||
ENDIF()
|
||||
#INCLUDE( "CPack.txt" )
|
||||
|
@@ -4,10 +4,8 @@ ADD_DEFINITIONS( /DNOMINMAX )
|
||||
ADD_DEFINITIONS( /DWIN32_LEAN_AND_MEAN )
|
||||
ADD_DEFINITIONS( -static-libgcc )
|
||||
|
||||
SET( QXTWEB_LIBRARIES qxtweb-standalone )
|
||||
|
||||
SET( TOMAHAWK_LIBRARIES ${CMAKE_BINARY_DIR}/src/libtomahawk/libtomahawklib.dll )
|
||||
SET( QTWEETLIB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qtweetlib/libtomahawk_qtweetlib.dll )
|
||||
SET( QXTWEB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qxt/qxtweb-standalone/libqxtweb-standalone.dll )
|
||||
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
@@ -15,7 +13,6 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${QTSPARKLE_LIBRARIES}
|
||||
|
||||
# third party shipped with tomahawk
|
||||
${CMAKE_BINARY_DIR}/thirdparty/rtaudio/librtaudio.dll
|
||||
|
||||
# system libs
|
||||
"secur32.dll"
|
||||
|
104
src/PipelineStatusView.cpp
Normal file
@@ -0,0 +1,104 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk 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.
|
||||
*
|
||||
* Tomahawk 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 Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PipelineStatusView.h"
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "libtomahawk/pipeline.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
PipelineStatusView::PipelineStatusView( AnimatedSplitter* parent )
|
||||
: AnimatedWidget( parent )
|
||||
, m_parent( parent )
|
||||
{
|
||||
setHiddenSize( QSize( 0, 0 ) );
|
||||
setLayout( new QVBoxLayout() );
|
||||
m_tree = new QTreeWidget( this );
|
||||
|
||||
layout()->setMargin( 0 );
|
||||
layout()->addWidget( m_tree );
|
||||
|
||||
QStringList headers;
|
||||
headers << tr( "Searching For" ) << tr( "Pending" );
|
||||
m_tree->setHeaderLabels( headers );
|
||||
|
||||
m_tree->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );
|
||||
m_tree->setColumnCount( 2 );
|
||||
m_tree->setColumnWidth( 0, 200 );
|
||||
m_tree->setColumnWidth( 1, 50 );
|
||||
|
||||
m_tree->header()->setStretchLastSection( true );
|
||||
m_tree->setRootIsDecorated( false );
|
||||
|
||||
m_tree->setFrameShape( QFrame::NoFrame );
|
||||
m_tree->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||
|
||||
new QTreeWidgetItem( m_tree );
|
||||
|
||||
connect( Pipeline::instance(), SIGNAL( resolving( Tomahawk::query_ptr ) ), SLOT( onPipelineUpdate( Tomahawk::query_ptr ) ) );
|
||||
connect( Pipeline::instance(), SIGNAL( idle() ), SLOT( onPipelineUpdate() ) );
|
||||
|
||||
onPipelineUpdate();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PipelineStatusView::onPipelineUpdate( const query_ptr& query )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
QTreeWidgetItem* ti = m_tree->invisibleRootItem()->child( 0 );
|
||||
|
||||
if ( Pipeline::instance()->activeQueryCount() && !query.isNull() )
|
||||
{
|
||||
ti->setText( 0, QString( "%1 - %2" ).arg( query->artist() ).arg( query->track() ) );
|
||||
ti->setText( 1, QString( "%1" ).arg( Pipeline::instance()->activeQueryCount() + Pipeline::instance()->pendingQueryCount() ) );
|
||||
|
||||
if ( isHidden() )
|
||||
emit showWidget();
|
||||
}
|
||||
else
|
||||
{
|
||||
ti->setText( 0, tr( "Idle" ) );
|
||||
ti->setText( 1, QString( "None" ) );
|
||||
|
||||
if ( !isHidden() )
|
||||
emit hideWidget();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QSize
|
||||
PipelineStatusView::sizeHint() const
|
||||
{
|
||||
unsigned int y = 0;
|
||||
y += m_tree->header()->height();
|
||||
y += m_tree->contentsMargins().top() + m_tree->contentsMargins().bottom();
|
||||
|
||||
if ( m_tree->invisibleRootItem()->childCount() )
|
||||
{
|
||||
unsigned int rowheight = m_tree->sizeHintForRow( 0 );
|
||||
y += rowheight * m_tree->invisibleRootItem()->childCount() + 2;
|
||||
}
|
||||
|
||||
return QSize( 0, y );
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
@@ -16,41 +16,36 @@
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef MUSIXMATCHPLUGIN_H
|
||||
#define MUSIXMATCHPLUGIN_H
|
||||
#include "tomahawk/infosystem.h"
|
||||
#ifndef PIPELINESTATUSVIEW_H
|
||||
#define PIPELINESTATUSVIEW_H
|
||||
|
||||
class QNetworkReply;
|
||||
#include <QDebug>
|
||||
#include <QTreeWidget>
|
||||
|
||||
namespace Tomahawk
|
||||
#include "typedefs.h"
|
||||
#include "utils/animatedsplitter.h"
|
||||
|
||||
class StreamConnection;
|
||||
|
||||
class PipelineStatusView : public AnimatedWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
namespace InfoSystem
|
||||
{
|
||||
|
||||
class MusixMatchPlugin : public InfoPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MusixMatchPlugin(QObject *parent);
|
||||
virtual ~MusixMatchPlugin();
|
||||
|
||||
void getInfo(const QString &caller, const InfoType type, const QVariant &data, InfoCustomDataHash customData);
|
||||
|
||||
private:
|
||||
bool isValidTrackData( const QString &caller, const QVariant& data, InfoCustomDataHash &customData );
|
||||
|
||||
public slots:
|
||||
void trackSearchSlot();
|
||||
void trackLyricsSlot();
|
||||
explicit PipelineStatusView( AnimatedSplitter* parent );
|
||||
virtual ~PipelineStatusView()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
QSize sizeHint() const;
|
||||
|
||||
private slots:
|
||||
void onPipelineUpdate( const Tomahawk::query_ptr& query = Tomahawk::query_ptr() );
|
||||
|
||||
private:
|
||||
QString m_apiKey;
|
||||
QTreeWidget* m_tree;
|
||||
AnimatedSplitter* m_parent;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // MUSIXMATCHPLUGIN_H
|
||||
#endif // TRANSFERVIEW_H
|
@@ -21,15 +21,14 @@
|
||||
|
||||
#include <QNetworkReply>
|
||||
|
||||
#include "tomahawk/tomahawkapp.h"
|
||||
#include "audio/audioengine.h"
|
||||
#include "playlist/playlistmanager.h"
|
||||
#include "viewmanager.h"
|
||||
#include "utils/imagebutton.h"
|
||||
#include "utils/tomahawkutils.h"
|
||||
|
||||
#include "album.h"
|
||||
|
||||
#define LASTFM_DEFAULT_COVER "http://cdn.last.fm/flatness/catalogue/noimage"
|
||||
static QString s_acInfoIdentifier = QString( "AUDIOCONTROLS" );
|
||||
|
||||
|
||||
AudioControls::AudioControls( QWidget* parent )
|
||||
@@ -44,11 +43,11 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
|
||||
QFont font( ui->artistTrackLabel->font() );
|
||||
font.setPixelSize( 12 );
|
||||
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
font.setPointSize( font.pointSize() - 2 );
|
||||
#endif
|
||||
|
||||
|
||||
ui->artistTrackLabel->setFont( font );
|
||||
ui->artistTrackLabel->setElideMode( Qt::ElideMiddle );
|
||||
ui->artistTrackLabel->setType( QueryLabel::ArtistAndTrack );
|
||||
@@ -81,27 +80,23 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
ui->metaDataArea->setStyleSheet( "QWidget#metaDataArea {\nborder-width: 4px;\nborder-image: url(" RESPATH "images/now-playing-panel.png) 4 4 4 4 stretch stretch; }" );
|
||||
|
||||
ui->seekSlider->setFixedHeight( 20 );
|
||||
ui->seekSlider->setEnabled( false );
|
||||
ui->seekSlider->setEnabled( true );
|
||||
ui->seekSlider->setStyleSheet( "QSlider::groove::horizontal {"
|
||||
"margin: 5px; border-width: 3px;"
|
||||
"border-image: url(" RESPATH "images/seek-slider-bkg.png) 3 3 3 3 stretch stretch;"
|
||||
"}"
|
||||
|
||||
"QSlider::handle::horizontal {"
|
||||
"margin-left: 5px; margin-right: -5px; "
|
||||
"width: 0px;"
|
||||
|
||||
//"margin-bottom: -7px; margin-top: -7px;"
|
||||
//"height: 17px; width: 16px;"
|
||||
//"background-image: url(" RESPATH "images/seek-and-volume-knob-rest.png);"
|
||||
//"background-repeat: no-repeat;"
|
||||
"}"
|
||||
|
||||
"QSlider::sub-page:horizontal {"
|
||||
"margin: 5px; border-width: 3px;"
|
||||
"border-image: url(" RESPATH "images/seek-slider-level.png) 3 3 3 3 stretch stretch;"
|
||||
"}"
|
||||
);
|
||||
|
||||
"QSlider::handle::horizontal {"
|
||||
"margin-bottom: -7px; margin-top: -7px;"
|
||||
"height: 17px; width: 16px;"
|
||||
"background-image: url(" RESPATH "images/seek-and-volume-knob-rest.png);"
|
||||
"background-repeat: no-repeat;"
|
||||
"}" );
|
||||
|
||||
ui->volumeSlider->setFixedHeight( 20 );
|
||||
ui->volumeSlider->setRange( 0, 100 );
|
||||
@@ -121,9 +116,7 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
"height: 17px; width: 16px;"
|
||||
"background-image: url(" RESPATH "images/seek-and-volume-knob-rest.png);"
|
||||
"background-repeat: no-repeat;"
|
||||
"}"
|
||||
|
||||
);
|
||||
"}" );
|
||||
|
||||
/* m_playAction = new QAction( this );
|
||||
m_pauseAction = new QAction( this );
|
||||
@@ -135,6 +128,7 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
connect( m_prevAction, SIGNAL( triggered() ), (QObject*)APP->audioEngine(), SLOT( previous() ) );
|
||||
connect( m_nextAction, SIGNAL( triggered() ), (QObject*)APP->audioEngine(), SLOT( next() ) ); */
|
||||
|
||||
connect( ui->seekSlider, SIGNAL( valueChanged( int ) ), AudioEngine::instance(), SLOT( seek( int ) ) );
|
||||
connect( ui->volumeSlider, SIGNAL( valueChanged( int ) ), AudioEngine::instance(), SLOT( setVolume( int ) ) );
|
||||
connect( ui->prevButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( previous() ) );
|
||||
connect( ui->playPauseButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( play() ) );
|
||||
@@ -143,10 +137,10 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
connect( ui->volumeLowButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( lowerVolume() ) );
|
||||
connect( ui->volumeHighButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( raiseVolume() ) );
|
||||
|
||||
|
||||
|
||||
connect( ui->playPauseButton, SIGNAL( clicked() ), this, SIGNAL( playPressed() ) );
|
||||
connect( ui->pauseButton, SIGNAL( clicked() ), this, SIGNAL( pausePressed() ) );
|
||||
|
||||
|
||||
connect( ui->repeatButton, SIGNAL( clicked() ), SLOT( onRepeatClicked() ) );
|
||||
connect( ui->shuffleButton, SIGNAL( clicked() ), SLOT( onShuffleClicked() ) );
|
||||
|
||||
@@ -160,12 +154,18 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
connect( AudioEngine::instance(), SIGNAL( paused() ), SLOT( onPlaybackPaused() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( resumed() ), SLOT( onPlaybackResumed() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( timerSeconds( unsigned int ) ), SLOT( onPlaybackTimer( unsigned int ) ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( timerMilliSeconds( qint64 ) ), SLOT( onPlaybackTimer( qint64 ) ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( volumeChanged( int ) ), SLOT( onVolumeChanged( int ) ) );
|
||||
|
||||
m_defaultCover = QPixmap( RESPATH "images/no-album-art-placeholder.png" )
|
||||
.scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||
SIGNAL( info( QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomData ) ),
|
||||
SLOT( infoSystemInfo( QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomData ) ) );
|
||||
|
||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
|
||||
|
||||
onPlaybackStopped(); // initial state
|
||||
}
|
||||
|
||||
@@ -201,40 +201,6 @@ AudioControls::onVolumeChanged( int volume )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onCoverArtDownloaded()
|
||||
{
|
||||
if ( m_currentTrack.isNull() )
|
||||
return;
|
||||
|
||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||
QUrl redir = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
|
||||
if ( redir.isEmpty() )
|
||||
{
|
||||
const QByteArray ba = reply->readAll();
|
||||
if ( ba.length() )
|
||||
{
|
||||
QPixmap pm;
|
||||
pm.loadFromData( ba );
|
||||
|
||||
if ( pm.isNull() || reply->url().toString().startsWith( LASTFM_DEFAULT_COVER ) )
|
||||
ui->coverImage->setPixmap( m_defaultCover );
|
||||
else
|
||||
ui->coverImage->setPixmap( pm.scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Follow HTTP redirect
|
||||
QNetworkRequest req( redir );
|
||||
QNetworkReply* reply = TomahawkUtils::nam()->get( req );
|
||||
connect( reply, SIGNAL( finished() ), SLOT( onCoverArtDownloaded() ) );
|
||||
}
|
||||
|
||||
reply->deleteLater();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
{
|
||||
@@ -242,10 +208,61 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
|
||||
onPlaybackLoading( result );
|
||||
|
||||
QString imgurl = "http://ws.audioscrobbler.com/2.0/?method=album.imageredirect&artist=%1&album=%2&size=medium&api_key=7a90f6672a04b809ee309af169f34b8b";
|
||||
QNetworkRequest req( imgurl.arg( result->artist()->name() ).arg( result->album()->name() ) );
|
||||
QNetworkReply* reply = TomahawkUtils::nam()->get( req );
|
||||
connect( reply, SIGNAL( finished() ), SLOT( onCoverArtDownloaded() ) );
|
||||
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
|
||||
trackInfo["artist"] = result->artist()->name();
|
||||
trackInfo["album"] = result->album()->name();
|
||||
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo(
|
||||
s_acInfoIdentifier, Tomahawk::InfoSystem::InfoAlbumCoverArt,
|
||||
QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo ), Tomahawk::InfoSystem::InfoCustomData() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::infoSystemInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData )
|
||||
{
|
||||
Q_UNUSED( input );
|
||||
Q_UNUSED( customData );
|
||||
|
||||
qDebug() << Q_FUNC_INFO << caller << type << s_acInfoIdentifier << Tomahawk::InfoSystem::InfoAlbumCoverArt;
|
||||
if ( caller != s_acInfoIdentifier || type != Tomahawk::InfoSystem::InfoAlbumCoverArt )
|
||||
{
|
||||
qDebug() << "Info of wrong type or not with our identifier";
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_currentTrack.isNull() )
|
||||
{
|
||||
qDebug() << "Current track is null when trying to apply fetched cover art";
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !output.canConvert< Tomahawk::InfoSystem::InfoCustomData >() )
|
||||
{
|
||||
qDebug() << "Cannot convert fetched art from a QByteArray";
|
||||
return;
|
||||
}
|
||||
|
||||
Tomahawk::InfoSystem::InfoCustomData returnedData = output.value< Tomahawk::InfoSystem::InfoCustomData >();
|
||||
const QByteArray ba = returnedData["imgbytes"].toByteArray();
|
||||
if ( ba.length() )
|
||||
{
|
||||
QPixmap pm;
|
||||
pm.loadFromData( ba );
|
||||
|
||||
if ( pm.isNull() )
|
||||
ui->coverImage->setPixmap( m_defaultCover );
|
||||
else
|
||||
ui->coverImage->setPixmap( pm.scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::infoSystemFinished( QString target )
|
||||
{
|
||||
Q_UNUSED( target );
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
|
||||
@@ -261,13 +278,11 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
||||
ui->ownerLabel->setText( result->friendlySource() );
|
||||
ui->coverImage->setPixmap( m_defaultCover );
|
||||
|
||||
if ( ui->timeLabel->text().isEmpty() )
|
||||
ui->timeLabel->setText( TomahawkUtils::timeToString( 0 ) );
|
||||
ui->timeLabel->setText( TomahawkUtils::timeToString( 0 ) );
|
||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( result->duration() ) );
|
||||
|
||||
if ( ui->timeLeftLabel->text().isEmpty() )
|
||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( result->duration() ) );
|
||||
|
||||
ui->seekSlider->setRange( 0, m_currentTrack->duration() );
|
||||
ui->seekSlider->setRange( 0, m_currentTrack->duration() * 1000 );
|
||||
ui->seekSlider->setValue( 0 );
|
||||
ui->seekSlider->setVisible( true );
|
||||
|
||||
/* m_playAction->setEnabled( false );
|
||||
@@ -302,7 +317,7 @@ AudioControls::onPlaybackResumed()
|
||||
ui->pauseButton->setVisible( true );
|
||||
ui->pauseButton->setEnabled( true );
|
||||
ui->playPauseButton->setVisible( false );
|
||||
ui->playPauseButton->setEnabled( false );
|
||||
ui->playPauseButton->setEnabled( false );
|
||||
}
|
||||
|
||||
|
||||
@@ -330,14 +345,19 @@ AudioControls::onPlaybackStopped()
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onPlaybackTimer( unsigned int seconds )
|
||||
AudioControls::onPlaybackTimer( qint64 msElapsed )
|
||||
{
|
||||
if ( m_currentTrack.isNull() )
|
||||
return;
|
||||
|
||||
ui->seekSlider->blockSignals( true );
|
||||
|
||||
const int seconds = msElapsed / 1000;
|
||||
ui->timeLabel->setText( TomahawkUtils::timeToString( seconds ) );
|
||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( m_currentTrack->duration() - seconds ) );
|
||||
ui->seekSlider->setValue( seconds );
|
||||
ui->seekSlider->setValue( msElapsed );
|
||||
|
||||
ui->seekSlider->blockSignals( false );
|
||||
}
|
||||
|
||||
|
||||
@@ -386,21 +406,21 @@ AudioControls::onRepeatClicked()
|
||||
case PlaylistInterface::NoRepeat:
|
||||
{
|
||||
// switch to RepeatOne
|
||||
PlaylistManager::instance()->setRepeatMode( PlaylistInterface::RepeatOne );
|
||||
ViewManager::instance()->setRepeatMode( PlaylistInterface::RepeatOne );
|
||||
}
|
||||
break;
|
||||
|
||||
case PlaylistInterface::RepeatOne:
|
||||
{
|
||||
// switch to RepeatAll
|
||||
PlaylistManager::instance()->setRepeatMode( PlaylistInterface::RepeatAll );
|
||||
ViewManager::instance()->setRepeatMode( PlaylistInterface::RepeatAll );
|
||||
}
|
||||
break;
|
||||
|
||||
case PlaylistInterface::RepeatAll:
|
||||
{
|
||||
// switch to NoRepeat
|
||||
PlaylistManager::instance()->setRepeatMode( PlaylistInterface::NoRepeat );
|
||||
ViewManager::instance()->setRepeatMode( PlaylistInterface::NoRepeat );
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -435,26 +455,26 @@ AudioControls::onShuffleModeChanged( bool enabled )
|
||||
void
|
||||
AudioControls::onShuffleClicked()
|
||||
{
|
||||
PlaylistManager::instance()->setShuffled( m_shuffled ^ true );
|
||||
ViewManager::instance()->setShuffled( m_shuffled ^ true );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onArtistClicked()
|
||||
{
|
||||
PlaylistManager::instance()->show( m_currentTrack->artist() );
|
||||
ViewManager::instance()->show( m_currentTrack->artist() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onAlbumClicked()
|
||||
{
|
||||
PlaylistManager::instance()->show( m_currentTrack->album() );
|
||||
ViewManager::instance()->show( m_currentTrack->album() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onTrackClicked()
|
||||
{
|
||||
PlaylistManager::instance()->showCurrentTrack();
|
||||
ViewManager::instance()->showCurrentTrack();
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "result.h"
|
||||
#include "playlistinterface.h"
|
||||
#include "infosystem/infosystem.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@@ -40,7 +41,7 @@ public:
|
||||
signals:
|
||||
void playPressed();
|
||||
void pausePressed();
|
||||
|
||||
|
||||
public slots:
|
||||
void onRepeatModeChanged( PlaylistInterface::RepeatMode mode );
|
||||
void onShuffleModeChanged( bool enabled );
|
||||
@@ -55,7 +56,7 @@ private slots:
|
||||
void onPlaybackResumed();
|
||||
void onPlaybackStopped();
|
||||
|
||||
void onPlaybackTimer( unsigned int seconds );
|
||||
void onPlaybackTimer( qint64 msElapsed );
|
||||
void onVolumeChanged( int volume );
|
||||
|
||||
void onRepeatClicked();
|
||||
@@ -65,7 +66,8 @@ private slots:
|
||||
void onAlbumClicked();
|
||||
void onTrackClicked();
|
||||
|
||||
void onCoverArtDownloaded();
|
||||
void infoSystemInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData );
|
||||
void infoSystemFinished( QString target );
|
||||
|
||||
private:
|
||||
Ui::AudioControls *ui;
|
||||
|
@@ -1,14 +1,15 @@
|
||||
#ifndef CONFIG_H_IN
|
||||
#define CONFIG_H_IN
|
||||
|
||||
#cmakedefine ORGANIZATION_NAME "${ORGANIZATION_NAME}"
|
||||
#cmakedefine ORGANIZATION_DOMAIN "${ORGANIZATION_DOMAIN}"
|
||||
#cmakedefine APPLICATION_NAME "${APPLICATION_NAME}"
|
||||
#cmakedefine VERSION "${VERSION}"
|
||||
#cmakedefine TOMAHAWK_ORGANIZATION_NAME "${TOMAHAWK_ORGANIZATION_NAME}"
|
||||
#cmakedefine TOMAHAWK_ORGANIZATION_DOMAIN "${TOMAHAWK_ORGANIZATION_DOMAIN}"
|
||||
#cmakedefine TOMAHAWK_APPLICATION_NAME "${TOMAHAWK_APPLICATION_NAME}"
|
||||
#cmakedefine TOMAHAWK_VERSION "${TOMAHAWK_VERSION}"
|
||||
|
||||
#cmakedefine DEBUG_BUILD
|
||||
|
||||
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
|
||||
#define CMAKE_SYSTEM "${CMAKE_SYSTEM}"
|
||||
|
||||
#cmakedefine SNOW_LEOPARD
|
||||
#cmakedefine LEOPARD
|
||||
|
119
src/configdelegatebase.cpp
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
Copyright (C) 2011 Leo Franchi <leo.franchi@kdab.com>
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "configdelegatebase.h"
|
||||
|
||||
#include "utils/tomahawkutils.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QApplication>
|
||||
#include <QMouseEvent>
|
||||
|
||||
ConfigDelegateBase::ConfigDelegateBase ( QObject* parent )
|
||||
: QStyledItemDelegate ( parent )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
QSize
|
||||
ConfigDelegateBase::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||
{
|
||||
int width = QStyledItemDelegate::sizeHint( option, index ).width();
|
||||
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
initStyleOption( &opt, index );
|
||||
|
||||
|
||||
QFont name = opt.font;
|
||||
name.setPointSize( name.pointSize() + 2 );
|
||||
name.setBold( true );
|
||||
|
||||
QFont path = opt.font;
|
||||
path.setItalic( true );
|
||||
path.setPointSize( path.pointSize() - 1 );
|
||||
|
||||
|
||||
QFontMetrics bfm( name );
|
||||
QFontMetrics sfm( path );
|
||||
return QSize( width, 2 * PADDING + bfm.height() + sfm.height() );
|
||||
}
|
||||
|
||||
void
|
||||
ConfigDelegateBase::drawCheckBox( QStyleOptionViewItemV4& opt, QPainter* p, const QWidget* w ) const
|
||||
{
|
||||
QStyle* style = w ? w->style() : QApplication::style();
|
||||
opt.checkState == Qt::Checked ? opt.state |= QStyle::State_On : opt.state |= QStyle::State_Off;
|
||||
style->drawPrimitive( QStyle::PE_IndicatorViewItemCheck, &opt, p, w );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ConfigDelegateBase::drawConfigWrench ( QPainter* painter, QStyleOptionViewItemV4& opt, QStyleOptionToolButton& topt ) const
|
||||
{
|
||||
const QWidget* w = opt.widget;
|
||||
QStyle* style = w ? w->style() : QApplication::style();
|
||||
|
||||
// draw it the same size as the check belox
|
||||
topt.font = opt.font;
|
||||
topt.icon = QIcon( RESPATH "images/configure.png" );
|
||||
topt.iconSize = QSize( 16, 16 );
|
||||
topt.subControls = QStyle::SC_ToolButton;
|
||||
topt.activeSubControls = QStyle::SC_None;
|
||||
topt.features = QStyleOptionToolButton::None;
|
||||
bool pressed = ( m_configPressed == opt.index );
|
||||
topt.state = pressed ? QStyle::State_On : QStyle::State_Raised;
|
||||
if( opt.state & QStyle::State_MouseOver || pressed )
|
||||
topt.state |= QStyle::State_HasFocus;
|
||||
style->drawComplexControl( QStyle::CC_ToolButton, &topt, painter, w );
|
||||
}
|
||||
|
||||
bool
|
||||
ConfigDelegateBase::editorEvent ( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index )
|
||||
{
|
||||
QStyleOptionViewItemV4 viewOpt( option );
|
||||
initStyleOption( &viewOpt, index );
|
||||
|
||||
if( event->type() == QEvent::MouseButtonRelease || event->type() == QEvent::MouseButtonDblClick ) {
|
||||
m_configPressed = QModelIndex();
|
||||
|
||||
QMouseEvent* me = static_cast< QMouseEvent* >( event );
|
||||
if( me->button() != Qt::LeftButton || !checkRectForIndex( option, index ).contains( me->pos() ) )
|
||||
return false;
|
||||
|
||||
// eat the double click events inside the check rect
|
||||
if( event->type() == QEvent::MouseButtonDblClick ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Qt::CheckState curState = static_cast< Qt::CheckState >( index.data( Qt::CheckStateRole ).toInt() );
|
||||
Qt::CheckState newState = curState == Qt::Checked ? Qt::Unchecked : Qt::Checked;
|
||||
return model->setData( index, newState, Qt::CheckStateRole );
|
||||
|
||||
} else if( event->type() == QEvent::MouseButtonPress ) {
|
||||
QMouseEvent* me = static_cast< QMouseEvent* >( event );
|
||||
if( me->button() == Qt::LeftButton && configRectForIndex( option, index ).contains( me->pos() ) ) {
|
||||
m_configPressed = index;
|
||||
|
||||
emit configPressed( index );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return QStyledItemDelegate::editorEvent( event, model, option, index );
|
||||
}
|
54
src/configdelegatebase.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
Copyright (C) 2011 Leo Franchi <leo.franchi@kdab.com>
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CONFIGDELEGATEBASE_H
|
||||
#define CONFIGDELEGATEBASE_H
|
||||
|
||||
#include "dllmacro.h"
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
#define PADDING 4
|
||||
|
||||
class QPainter;
|
||||
class Q_DECL_EXPORT ConfigDelegateBase : public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ConfigDelegateBase( QObject* parent = 0 );
|
||||
virtual QSize sizeHint ( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
||||
|
||||
virtual bool editorEvent ( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index );
|
||||
|
||||
// if you want to use a checkbox, you need to have this say where to paint it
|
||||
virtual QRect checkRectForIndex( const QStyleOptionViewItem& option, const QModelIndex& idx ) const = 0;
|
||||
// if you want to use a config wrench, you need to have this say where to paint it
|
||||
virtual QRect configRectForIndex( const QStyleOptionViewItem& option, const QModelIndex& idx ) const = 0;
|
||||
|
||||
signals:
|
||||
void configPressed( const QModelIndex& idx );
|
||||
|
||||
protected:
|
||||
void drawCheckBox( QStyleOptionViewItemV4& opt, QPainter* p, const QWidget* w ) const;
|
||||
void drawConfigWrench( QPainter* painter, QStyleOptionViewItemV4& option, QStyleOptionToolButton& topt ) const;
|
||||
|
||||
private:
|
||||
QModelIndex m_configPressed;
|
||||
};
|
||||
|
||||
#endif // CONFIGDELEGATEBASE_H
|
79
src/delegateconfigwrapper.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk 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.
|
||||
*
|
||||
* Tomahawk 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 Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef RESOLVER_CONFIG_WRAPPER
|
||||
#define RESOLVER_CONFIG_WRAPPER
|
||||
|
||||
#include <QDialog>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
class DelegateConfigWrapper : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DelegateConfigWrapper( QWidget* conf, const QString& title, QWidget* parent, Qt::WindowFlags flags = 0 ) : QDialog( parent, flags ), m_widget( conf )
|
||||
{
|
||||
m_widget->setVisible( true );
|
||||
m_widget->setWindowFlags( Qt::Sheet );
|
||||
|
||||
setWindowTitle( title );
|
||||
QVBoxLayout* v = new QVBoxLayout( this );
|
||||
v->setContentsMargins( 0, 0, 0, 0 );
|
||||
v->addWidget( m_widget );
|
||||
|
||||
QDialogButtonBox* buttons = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this );
|
||||
connect( buttons, SIGNAL( clicked( QAbstractButton*) ), this, SLOT( closed( QAbstractButton* ) ) );
|
||||
connect( this, SIGNAL( rejected() ), this, SLOT( rejected() ) );
|
||||
v->addWidget( buttons );
|
||||
|
||||
setLayout( v );
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
setSizeGripEnabled( false );
|
||||
setMinimumSize( sizeHint() );
|
||||
setMaximumSize( sizeHint() ); // to remove the resize grip on osx this is the only way
|
||||
#endif
|
||||
}
|
||||
public slots:
|
||||
void closed( QAbstractButton* b )
|
||||
{
|
||||
// let the config widget live to see another day
|
||||
layout()->removeWidget( m_widget );
|
||||
m_widget->setParent( 0 );
|
||||
m_widget->setVisible( false );
|
||||
|
||||
QDialogButtonBox* buttons = qobject_cast< QDialogButtonBox* >( sender() );
|
||||
if( buttons->standardButton( b ) == QDialogButtonBox::Ok )
|
||||
done( QDialog::Accepted );
|
||||
else
|
||||
done( QDialog::Rejected );
|
||||
}
|
||||
|
||||
// we get a rejected() signal emitted if the user presses escape (and no clicked() signal )
|
||||
void rejected()
|
||||
{
|
||||
layout()->removeWidget( m_widget );
|
||||
m_widget->setParent( 0 );
|
||||
m_widget->setVisible( false );
|
||||
}
|
||||
|
||||
private:
|
||||
QWidget* m_widget;
|
||||
};
|
||||
|
||||
#endif
|
164
src/diagnosticsdialog.cpp
Normal file
@@ -0,0 +1,164 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2011, Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
*
|
||||
* Tomahawk 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.
|
||||
*
|
||||
* Tomahawk 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 Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "diagnosticsdialog.h"
|
||||
#include "ui_diagnosticsdialog.h"
|
||||
|
||||
#include <sip/SipHandler.h>
|
||||
#include <network/servent.h>
|
||||
#include <sourcelist.h>
|
||||
|
||||
#include <QTextEdit>
|
||||
#include <QDebug>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QPushButton>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
|
||||
DiagnosticsDialog::DiagnosticsDialog( QWidget *parent )
|
||||
: QDialog( parent )
|
||||
, ui( new Ui::DiagnosticsDialog )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
|
||||
connect( ui->updateButton, SIGNAL( clicked() ), this, SLOT( updateLogView() ) );
|
||||
connect( ui->clipboardButton, SIGNAL( clicked() ), this, SLOT( copyToClipboard() ) );
|
||||
connect( ui->buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
|
||||
updateLogView();
|
||||
}
|
||||
|
||||
void DiagnosticsDialog::updateLogView()
|
||||
{
|
||||
QString log;
|
||||
|
||||
log.append(
|
||||
QString("TOMAHAWK DIAGNOSTICS LOG -%1 \n\n")
|
||||
.arg( QDateTime::currentDateTime().toString() )
|
||||
);
|
||||
|
||||
// network
|
||||
log.append(
|
||||
"NETWORK:\n"
|
||||
" General:\n"
|
||||
);
|
||||
if( Servent::instance()->visibleExternally() )
|
||||
{
|
||||
log.append(
|
||||
QString(
|
||||
" visible: true\n"
|
||||
" host: %1\n"
|
||||
" port: %2\n"
|
||||
"\n"
|
||||
).arg( Servent::instance()->externalAddress() )
|
||||
.arg( Servent::instance()->externalPort() )
|
||||
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.append(
|
||||
QString(
|
||||
" visible: false"
|
||||
)
|
||||
);
|
||||
}
|
||||
log.append("\n\n");
|
||||
|
||||
|
||||
// Peers
|
||||
log.append("SIP PLUGINS:\n");
|
||||
QList< Tomahawk::source_ptr > sources = SourceList::instance()->sources( true );
|
||||
Q_FOREACH(SipPlugin *sip, SipHandler::instance()->allPlugins())
|
||||
{
|
||||
Q_ASSERT(sip);
|
||||
QString stateString;
|
||||
switch( sip->connectionState() )
|
||||
{
|
||||
case SipPlugin::Connecting:
|
||||
stateString = "Connecting";
|
||||
break;
|
||||
|
||||
case SipPlugin::Connected:
|
||||
stateString = "Connected";
|
||||
break;
|
||||
|
||||
case SipPlugin::Disconnected:
|
||||
stateString = "Disconnected";
|
||||
break;
|
||||
case SipPlugin::Disconnecting:
|
||||
stateString = "Disconnecting";
|
||||
}
|
||||
log.append(
|
||||
QString(" %2 (%1): %3 (%4)\n")
|
||||
.arg(sip->name())
|
||||
.arg(sip->friendlyName())
|
||||
.arg(sip->accountName())
|
||||
.arg(stateString)
|
||||
);
|
||||
|
||||
Q_FOREACH( const QString &peerId, sip->peersOnline() )
|
||||
{
|
||||
bool connected = false;
|
||||
Q_FOREACH( const Tomahawk::source_ptr &source, sources )
|
||||
{
|
||||
if( source->controlConnection() )
|
||||
{
|
||||
connected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QString versionString = SipHandler::instance()->versionString( peerId );
|
||||
SipInfo sipInfo = SipHandler::instance()->sipInfo( peerId );
|
||||
if( !sipInfo.isValid() )
|
||||
log.append(
|
||||
QString(" %1: %2 (%3) %4\n")
|
||||
.arg( peerId )
|
||||
.arg( "sipinfo invalid" )
|
||||
.arg( connected ? "connected" : "not connected")
|
||||
.arg( versionString )
|
||||
);
|
||||
else if( sipInfo.isVisible() )
|
||||
log.append(
|
||||
QString(" %1: %2:%3 (%4) %5\n")
|
||||
.arg( peerId )
|
||||
.arg( sipInfo.host().hostName() )
|
||||
.arg( sipInfo.port() )
|
||||
.arg( connected ? "connected" : "not connected")
|
||||
.arg( versionString )
|
||||
);
|
||||
else
|
||||
log.append(
|
||||
QString(" %1: visible: false (%2) %3\n")
|
||||
.arg( peerId )
|
||||
.arg( connected ? "connected" : "not connected")
|
||||
.arg( versionString )
|
||||
);
|
||||
}
|
||||
log.append("\n");
|
||||
}
|
||||
|
||||
ui->logView->setPlainText(log);
|
||||
}
|
||||
|
||||
void DiagnosticsDialog::copyToClipboard()
|
||||
{
|
||||
QApplication::clipboard()->setText( ui->logView->toPlainText() );
|
||||
}
|
||||
|
46
src/diagnosticsdialog.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2011, Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
*
|
||||
* Tomahawk 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.
|
||||
*
|
||||
* Tomahawk 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 Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DIGANOSTICSDIALOG_H
|
||||
#define DIAGNOSTICSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QDebug>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class DiagnosticsDialog;
|
||||
}
|
||||
|
||||
class DiagnosticsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DiagnosticsDialog( QWidget* parent = 0 );
|
||||
~DiagnosticsDialog() {};
|
||||
|
||||
private slots:
|
||||
void updateLogView();
|
||||
void copyToClipboard();
|
||||
|
||||
private:
|
||||
Ui::DiagnosticsDialog* ui;
|
||||
};
|
||||
|
||||
#endif // DIAGNOSTICSDIALOG_H
|
64
src/diagnosticsdialog.ui
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DiagnosticsDialog</class>
|
||||
<widget class="QDialog" name="DiagnosticsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>621</width>
|
||||
<height>434</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>353</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Tomahawk Diagnostics</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="logView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="updateButton">
|
||||
<property name="text">
|
||||
<string>Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clipboardButton">
|
||||
<property name="text">
|
||||
<string>Copy to Clipboard</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
@@ -21,14 +21,14 @@
|
||||
|
||||
#ifdef ENABLE_HEADLESS
|
||||
|
||||
#define TOMAHAWK_APPLICATION QtSingleCoreApplication
|
||||
#define TOMAHAWK_APPLICATION QCoreApplication
|
||||
#define TOMAHAWK_HEADLESS
|
||||
#include "qtsingleapp/qtsingleapplication.h"
|
||||
#include <QApplication>>
|
||||
|
||||
#else
|
||||
|
||||
#define TOMAHAWK_APPLICATION QtSingleApplication
|
||||
#include "qtsingleapp/qtsingleapplication.h"
|
||||
#define TOMAHAWK_APPLICATION QApplication
|
||||
#include <QApplication>
|
||||
#include "tomahawkwindow.h"
|
||||
|
||||
#endif
|
||||
|
@@ -1,114 +0,0 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk 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.
|
||||
*
|
||||
* Tomahawk 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 Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "tomahawk/infosystem.h"
|
||||
#include "infoplugins/echonestplugin.h"
|
||||
#include "infoplugins/musixmatchplugin.h"
|
||||
|
||||
using namespace Tomahawk::InfoSystem;
|
||||
|
||||
InfoSystem::InfoSystem(QObject *parent)
|
||||
: QObject( parent )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
qRegisterMetaType<QMap< QString, QMap< QString, QString > > >("Tomahawk::InfoSystem::InfoGenericMap");
|
||||
qRegisterMetaType<QHash<QString, QVariant > >("Tomahawk::InfoSystem::InfoCustomDataHash");
|
||||
qRegisterMetaType<QHash<QString, QString > >("Tomahawk::InfoSystem::MusixMatchHash");
|
||||
InfoPluginPtr enptr(new EchoNestPlugin(this));
|
||||
m_plugins.append(enptr);
|
||||
InfoPluginPtr mmptr(new MusixMatchPlugin(this));
|
||||
m_plugins.append(mmptr);
|
||||
}
|
||||
|
||||
void InfoSystem::registerInfoTypes(const InfoPluginPtr &plugin, const QSet< InfoType >& types)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
Q_FOREACH(InfoType type, types)
|
||||
m_infoMap[type].append(plugin);
|
||||
}
|
||||
|
||||
QLinkedList< InfoPluginPtr > InfoSystem::determineOrderedMatches(const InfoType type) const
|
||||
{
|
||||
//Dummy function for now that returns the various items in the QSet; at some point this will
|
||||
//probably need to support ordering based on the data source
|
||||
QLinkedList< InfoPluginPtr > providers;
|
||||
Q_FOREACH(InfoPluginPtr ptr, m_infoMap[type])
|
||||
providers << ptr;
|
||||
return providers;
|
||||
}
|
||||
|
||||
void InfoSystem::getInfo(const QString &caller, const InfoType type, const QVariant& data, InfoCustomDataHash customData)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
QLinkedList< InfoPluginPtr > providers = determineOrderedMatches(type);
|
||||
if (providers.isEmpty())
|
||||
{
|
||||
emit info(QString(), Tomahawk::InfoSystem::InfoNoInfo, QVariant(), QVariant(), customData);
|
||||
return;
|
||||
}
|
||||
|
||||
InfoPluginPtr ptr = providers.first();
|
||||
if (!ptr)
|
||||
{
|
||||
emit info(QString(), Tomahawk::InfoSystem::InfoNoInfo, QVariant(), QVariant(), customData);
|
||||
return;
|
||||
}
|
||||
|
||||
m_dataTracker[caller][type] = m_dataTracker[caller][type] + 1;
|
||||
qDebug() << "current count in dataTracker for type" << type << "is" << m_dataTracker[caller][type];
|
||||
connect(ptr.data(), SIGNAL(info(QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomDataHash)),
|
||||
this, SLOT(infoSlot(QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomDataHash)), Qt::UniqueConnection);
|
||||
connect(ptr.data(), SIGNAL(finished(QString, Tomahawk::InfoSystem::InfoType)),
|
||||
this, SLOT(finishedSlot(QString, Tomahawk::InfoSystem::InfoType)), Qt::UniqueConnection);
|
||||
ptr.data()->getInfo(caller, type, data, customData);
|
||||
}
|
||||
|
||||
void InfoSystem::getInfo(const QString &caller, const InfoMap &input, InfoCustomDataHash customData)
|
||||
{
|
||||
Q_FOREACH( InfoType type, input.keys() )
|
||||
getInfo(caller, type, input[type], customData);
|
||||
}
|
||||
|
||||
void InfoSystem::infoSlot(QString target, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
qDebug() << "current count in dataTracker is " << m_dataTracker[target][type];
|
||||
if (m_dataTracker[target][type] == 0)
|
||||
{
|
||||
qDebug() << "Caller was not waiting for that type of data!";
|
||||
return;
|
||||
}
|
||||
emit info(target, type, input, output, customData);
|
||||
}
|
||||
|
||||
void InfoSystem::finishedSlot(QString target, Tomahawk::InfoSystem::InfoType type)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
m_dataTracker[target][type] = m_dataTracker[target][type] - 1;
|
||||
qDebug() << "current count in dataTracker is " << m_dataTracker[target][type];
|
||||
Q_FOREACH(Tomahawk::InfoSystem::InfoType testtype, m_dataTracker[target].keys())
|
||||
{
|
||||
if (m_dataTracker[target][testtype] != 0)
|
||||
{
|
||||
qDebug() << "found outstanding request of type" << testtype;
|
||||
return;
|
||||
}
|
||||
}
|
||||
qDebug() << "emitting finished with target" << target;
|
||||
emit finished(target);
|
||||
}
|
@@ -4,6 +4,7 @@ SET( QT_USE_QTGUI TRUE )
|
||||
SET( QT_USE_QTSQL TRUE )
|
||||
SET( QT_USE_QTNETWORK TRUE )
|
||||
SET( QT_USE_QTXML TRUE )
|
||||
SET( QT_USE_QTUITOOLS TRUE )
|
||||
|
||||
include( ${QT_USE_FILE} )
|
||||
|
||||
@@ -16,31 +17,38 @@ set( libSources
|
||||
sourcelist.cpp
|
||||
pipeline.cpp
|
||||
|
||||
aclsystem.cpp
|
||||
artist.cpp
|
||||
album.cpp
|
||||
collection.cpp
|
||||
webcollection.cpp
|
||||
playlist.cpp
|
||||
resolver.cpp
|
||||
query.cpp
|
||||
result.cpp
|
||||
source.cpp
|
||||
viewpage.cpp
|
||||
viewmanager.cpp
|
||||
globalactionmanager.cpp
|
||||
|
||||
sip/SipPlugin.cpp
|
||||
sip/SipHandler.cpp
|
||||
sip/SipModel.cpp
|
||||
sip/sipinfo.cpp
|
||||
|
||||
audio/madtranscode.cpp
|
||||
audio/vorbistranscode.cpp
|
||||
audio/flactranscode.cpp
|
||||
audio/audioengine.cpp
|
||||
|
||||
database/database.cpp
|
||||
database/fuzzyindex.cpp
|
||||
database/databasecollection.cpp
|
||||
database/localcollection.cpp
|
||||
database/databaseworker.cpp
|
||||
database/databaseimpl.cpp
|
||||
database/databaseresolver.cpp
|
||||
database/databasecommand.cpp
|
||||
database/databasecommandloggable.cpp
|
||||
database/databasecommand_resolve.cpp
|
||||
database/databasecommand_allartists.cpp
|
||||
database/databasecommand_allalbums.cpp
|
||||
database/databasecommand_alltracks.cpp
|
||||
database/databasecommand_addfiles.cpp
|
||||
@@ -62,22 +70,30 @@ set( libSources
|
||||
database/databasecommand_renameplaylist.cpp
|
||||
database/databasecommand_loadops.cpp
|
||||
database/databasecommand_updatesearchindex.cpp
|
||||
database/databasecollection.cpp
|
||||
database/databasecommand_setdynamicplaylistrevision.cpp
|
||||
database/databasecommand_createdynamicplaylist.cpp
|
||||
database/databasecommand_loaddynamicplaylist.cpp
|
||||
database/databasecommand_loadalldynamicplaylists.cpp
|
||||
database/databasecommand_loadallautoplaylists.cpp
|
||||
database/databasecommand_loadallstations.cpp
|
||||
database/databasecommand_deletedynamicplaylist.cpp
|
||||
database/databasecommand_addclientauth.cpp
|
||||
database/databasecommand_clientauthvalid.cpp
|
||||
database/database.cpp
|
||||
|
||||
playlist/collectionmodel.cpp
|
||||
infosystem/infosystemcache.cpp
|
||||
infosystem/infosystem.cpp
|
||||
infosystem/infosystemworker.cpp
|
||||
infosystem/infoplugins/echonestplugin.cpp
|
||||
infosystem/infoplugins/lastfmplugin.cpp
|
||||
infosystem/infoplugins/musixmatchplugin.cpp
|
||||
|
||||
playlist/treemodel.cpp
|
||||
playlist/treeproxymodel.cpp
|
||||
playlist/treeheader.cpp
|
||||
playlist/treeitemdelegate.cpp
|
||||
playlist/collectionproxymodel.cpp
|
||||
playlist/collectionflatmodel.cpp
|
||||
playlist/collectionview.cpp
|
||||
playlist/playlistmanager.cpp
|
||||
playlist/plitem.cpp
|
||||
playlist/playlistmodel.cpp
|
||||
playlist/playlistproxymodel.cpp
|
||||
playlist/playlistview.cpp
|
||||
@@ -85,18 +101,21 @@ set( libSources
|
||||
playlist/queueproxymodel.cpp
|
||||
playlist/queueview.cpp
|
||||
playlist/trackmodel.cpp
|
||||
playlist/trackmodelitem.cpp
|
||||
playlist/trackproxymodel.cpp
|
||||
playlist/trackview.cpp
|
||||
playlist/trackheader.cpp
|
||||
playlist/treemodelitem.cpp
|
||||
playlist/albumitem.cpp
|
||||
playlist/albummodel.cpp
|
||||
playlist/albumproxymodel.cpp
|
||||
playlist/albumitemdelegate.cpp
|
||||
playlist/albumview.cpp
|
||||
playlist/artistview.cpp
|
||||
|
||||
playlist/topbar/topbar.cpp
|
||||
playlist/topbar/clearbutton.cpp
|
||||
playlist/topbar/searchlineedit.cpp
|
||||
playlist/topbar/clearbutton.cpp
|
||||
playlist/topbar/searchlineedit.cpp
|
||||
playlist/topbar/lineedit.cpp
|
||||
playlist/topbar/searchbutton.cpp
|
||||
|
||||
@@ -122,7 +141,7 @@ set( libSources
|
||||
|
||||
network/bufferiodevice.cpp
|
||||
network/msgprocessor.cpp
|
||||
network/filetransferconnection.cpp
|
||||
network/streamconnection.cpp
|
||||
network/dbsyncconnection.cpp
|
||||
network/remotecollection.cpp
|
||||
network/portfwdthread.cpp
|
||||
@@ -139,14 +158,19 @@ set( libSources
|
||||
utils/widgetdragfilter.cpp
|
||||
utils/animatedsplitter.cpp
|
||||
utils/xspfloader.cpp
|
||||
utils/xspfgenerator.cpp
|
||||
|
||||
widgets/newplaylistwidget.cpp
|
||||
widgets/playlisttypeselectordlg.cpp
|
||||
widgets/welcomewidget.cpp
|
||||
widgets/welcomeplaylistmodel.cpp
|
||||
widgets/overlaywidget.cpp
|
||||
widgets/infowidgets/sourceinfowidget.cpp
|
||||
|
||||
qtsingleapp/qtlocalpeer.cpp
|
||||
qtsingleapp/qtsingleapplication.cpp
|
||||
kdsingleapplicationguard/kdsingleapplicationguard.cpp
|
||||
kdsingleapplicationguard/kdsharedmemorylocker.cpp
|
||||
kdsingleapplicationguard/kdtoolsglobal.cpp
|
||||
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
|
||||
)
|
||||
|
||||
set( libHeaders
|
||||
@@ -155,12 +179,16 @@ set( libHeaders
|
||||
pipeline.h
|
||||
functimeout.h
|
||||
|
||||
aclsystem.h
|
||||
collection.h
|
||||
webcollection.h
|
||||
query.h
|
||||
resolver.h
|
||||
result.h
|
||||
source.h
|
||||
viewpage.h
|
||||
viewmanager.h
|
||||
globalactionmanager.h
|
||||
|
||||
artist.h
|
||||
album.h
|
||||
@@ -168,11 +196,10 @@ set( libHeaders
|
||||
playlist.h
|
||||
|
||||
sip/SipPlugin.h
|
||||
sip/SipHandler.h
|
||||
sip/SipModel.h
|
||||
sip/sipinfo.h
|
||||
|
||||
audio/transcodeinterface.h
|
||||
audio/madtranscode.h
|
||||
audio/vorbistranscode.h
|
||||
audio/flactranscode.h
|
||||
audio/audioengine.h
|
||||
|
||||
database/database.h
|
||||
@@ -183,6 +210,7 @@ set( libHeaders
|
||||
database/databasecommand.h
|
||||
database/databasecommandloggable.h
|
||||
database/databasecommand_resolve.h
|
||||
database/databasecommand_allartists.h
|
||||
database/databasecommand_allalbums.h
|
||||
database/databasecommand_alltracks.h
|
||||
database/databasecommand_addfiles.h
|
||||
@@ -205,30 +233,40 @@ set( libHeaders
|
||||
database/databasecommand_loadops.h
|
||||
database/databasecommand_updatesearchindex.h
|
||||
database/databasecollection.h
|
||||
database/localcollection.h
|
||||
database/databasecommand_setdynamicplaylistrevision.h
|
||||
database/databasecommand_createdynamicplaylist.h
|
||||
database/databasecommand_loaddynamicplaylist.h
|
||||
database/databasecommand_deletedynamicplaylist.h
|
||||
database/databasecommand_loadalldynamicplaylists.h
|
||||
database/databasecommand_loadallautoplaylists.h
|
||||
database/databasecommand_loadallstations.h
|
||||
database/databasecommand_addclientauth.h
|
||||
database/databasecommand_clientauthvalid.h
|
||||
|
||||
infosystem/infosystem.h
|
||||
infosystem/infosystemworker.h
|
||||
infosystem/infosystemcache.h
|
||||
infosystem/infoplugins/echonestplugin.h
|
||||
infosystem/infoplugins/lastfmplugin.h
|
||||
infosystem/infoplugins/musixmatchplugin.h
|
||||
|
||||
network/bufferiodevice.h
|
||||
network/msgprocessor.h
|
||||
network/remotecollection.h
|
||||
network/filetransferconnection.h
|
||||
network/streamconnection.h
|
||||
network/dbsyncconnection.h
|
||||
network/servent.h
|
||||
network/connection.h
|
||||
network/controlconnection.h
|
||||
network/portfwdthread.h
|
||||
|
||||
playlist/collectionmodel.h
|
||||
playlist/treemodel.h
|
||||
playlist/treeproxymodel.h
|
||||
playlist/treeheader.h
|
||||
playlist/treeitemdelegate.h
|
||||
playlist/collectionproxymodel.h
|
||||
playlist/collectionflatmodel.h
|
||||
playlist/collectionview.h
|
||||
playlist/playlistmanager.h
|
||||
playlist/plitem.h
|
||||
playlist/playlistmodel.h
|
||||
playlist/playlistproxymodel.h
|
||||
playlist/playlistview.h
|
||||
@@ -236,18 +274,21 @@ set( libHeaders
|
||||
playlist/queueproxymodel.h
|
||||
playlist/queueview.h
|
||||
playlist/trackmodel.h
|
||||
playlist/trackmodelitem.h
|
||||
playlist/trackproxymodel.h
|
||||
playlist/trackview.h
|
||||
playlist/trackheader.h
|
||||
playlist/treemodelitem.h
|
||||
playlist/albumitem.h
|
||||
playlist/albummodel.h
|
||||
playlist/albumproxymodel.h
|
||||
playlist/albumitemdelegate.h
|
||||
playlist/albumview.h
|
||||
playlist/artistview.h
|
||||
|
||||
playlist/topbar/topbar.h
|
||||
playlist/topbar/clearbutton.h
|
||||
playlist/topbar/searchlineedit.h
|
||||
playlist/topbar/searchlineedit.h
|
||||
playlist/topbar/lineedit.h
|
||||
playlist/topbar/lineedit_p.h
|
||||
playlist/topbar/searchbutton.h
|
||||
@@ -281,20 +322,26 @@ set( libHeaders
|
||||
utils/widgetdragfilter.h
|
||||
utils/animatedsplitter.h
|
||||
utils/xspfloader.h
|
||||
utils/xspfgenerator.h
|
||||
|
||||
widgets/newplaylistwidget.h
|
||||
widgets/playlisttypeselectordlg.h
|
||||
widgets/welcomewidget.h
|
||||
widgets/welcomeplaylistmodel.h
|
||||
widgets/overlaywidget.h
|
||||
widgets/infowidgets/sourceinfowidget.h
|
||||
|
||||
qtsingleapp/qtlocalpeer.h
|
||||
qtsingleapp/qtsingleapplication.h
|
||||
kdsingleapplicationguard/kdsingleapplicationguard.h
|
||||
kdsingleapplicationguard/kdsharedmemorylocker.h
|
||||
kdsingleapplicationguard/kdtoolsglobal.h
|
||||
kdsingleapplicationguard/kdlockedsharedmemorypointer.h
|
||||
)
|
||||
|
||||
set( libHeaders_NoMOC
|
||||
playlist/dynamic/GeneratorInterface.h
|
||||
set( libHeaders_NoMOC
|
||||
playlist/dynamic/GeneratorInterface.h
|
||||
)
|
||||
set( libUI ${libUI}
|
||||
widgets/playlisttypeselectordlg.ui
|
||||
widgets/newplaylistwidget.ui
|
||||
widgets/welcomewidget.ui
|
||||
widgets/infowidgets/sourceinfowidget.ui
|
||||
@@ -310,31 +357,20 @@ include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.
|
||||
${LIBECHONEST_INCLUDE_DIR}/..
|
||||
${CLUCENE_INCLUDE_DIR}
|
||||
${CLUCENE_LIBRARY_DIR}
|
||||
${PHONON_INCLUDES}
|
||||
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
|
||||
|
||||
../../include
|
||||
../network
|
||||
playlist
|
||||
|
||||
${THIRDPARTY_DIR}/libportfwd/include
|
||||
${LIBPORTFWD_INCLUDE_DIR}
|
||||
${THIRDPARTY_DIR}/qxt/qxtweb-standalone/qxtweb
|
||||
${THIRDPARTY_DIR}/rtaudio
|
||||
${THIRDPARTY_DIR}/alsa-playback
|
||||
${THIRDPARTY_DIR}/jdns
|
||||
${THIRDPARTY_DIR}/jdns/jdns
|
||||
${THIRDPARTY_DIR}/jdns/jdnsshared
|
||||
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
|
||||
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
|
||||
)
|
||||
|
||||
|
||||
IF( WIN32 )
|
||||
SET( libSources ${libSources} audio/rtaudiooutput.cpp )
|
||||
SET( libHeaders ${libHeaders} audio/rtaudiooutput.h )
|
||||
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
# Thirdparty
|
||||
${CMAKE_BINARY_DIR}/thirdparty/rtaudio/librtaudio.dll
|
||||
${QJSON_LDFLAGS}
|
||||
# System
|
||||
"iphlpapi.a"
|
||||
"ws2_32.dll"
|
||||
@@ -350,28 +386,17 @@ IF( APPLE )
|
||||
FIND_LIBRARY( COREFOUNDATION_LIBRARY CoreFoundation )
|
||||
MARK_AS_ADVANCED( COREAUDIO_LIBRARY COREFOUNDATION_LIBRARY )
|
||||
|
||||
SET( libSources ${libSources} audio/rtaudiooutput.cpp )
|
||||
SET( libHeaders ${libHeaders} audio/rtaudiooutput.h )
|
||||
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
# Thirdparty
|
||||
${QJSON_LIBRARIES}
|
||||
rtaudio
|
||||
# System
|
||||
${COREAUDIO_LIBRARY}
|
||||
${COREFOUNDATION_LIBRARY}
|
||||
)
|
||||
ENDIF( APPLE )
|
||||
|
||||
IF( UNIX AND NOT APPLE )
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
# Thirdparty
|
||||
alsaplayback
|
||||
${QJSON_LDFLAGS}
|
||||
)
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
IF(LIBLASTFM_FOUND)
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_lastfm2 )
|
||||
ENDIF(LIBLASTFM_FOUND)
|
||||
|
||||
qt4_wrap_ui( libUI_H ${libUI} )
|
||||
qt4_wrap_cpp( libMoc ${libHeaders} )
|
||||
@@ -381,26 +406,23 @@ SET( libSources ${libSources} ${libUI_H} ${libHeaders_NoMOC} )
|
||||
add_library( tomahawklib SHARED ${libSources} ${libMoc} )
|
||||
|
||||
target_link_libraries( tomahawklib
|
||||
# Internal
|
||||
tomahawk_jdns
|
||||
tomahawk_qtweetlib
|
||||
|
||||
# Thirdparty shipped with tomahawk
|
||||
portfwd
|
||||
|
||||
# soon to be removed by phonon-dependency
|
||||
FLAC++
|
||||
ogg
|
||||
vorbisfile
|
||||
mad
|
||||
${LIBPORTFWD_LIBRARIES}
|
||||
|
||||
# External deps
|
||||
${QJSON_LIBRARIES}
|
||||
${PHONON_LIBS}
|
||||
${TAGLIB_LIBRARIES}
|
||||
${CLUCENE_LIBRARIES}
|
||||
${LIBECHONEST_LIBRARY}
|
||||
${QT_LIBRARIES}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
INSTALL( TARGETS tomahawklib DESTINATION lib${LIB_SUFFIX} )
|
||||
INSTALL( TARGETS tomahawklib
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
)
|
||||
|
150
src/libtomahawk/aclsystem.cpp
Normal file
@@ -0,0 +1,150 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk 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.
|
||||
*
|
||||
* Tomahawk 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 Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "aclsystem.h"
|
||||
|
||||
#include <QtDebug>
|
||||
#include <QMutexLocker>
|
||||
#include <QVariant>
|
||||
|
||||
#include <tomahawksettings.h>
|
||||
|
||||
ACLSystem* ACLSystem::s_instance = 0;
|
||||
|
||||
ACLSystem*
|
||||
ACLSystem::instance()
|
||||
{
|
||||
if( !s_instance )
|
||||
new ACLSystem();
|
||||
return s_instance;
|
||||
}
|
||||
|
||||
|
||||
ACLSystem::ACLSystem( QObject* parent )
|
||||
: QObject( parent ),
|
||||
m_saveTimer( this )
|
||||
{
|
||||
s_instance = this;
|
||||
//qRegisterMetaType< QHash< QString, QHash< QString, ACL > > >("ACLSystem::ACLCacheHash");
|
||||
|
||||
QStringList savedEntries = TomahawkSettings::instance()->aclEntries();
|
||||
if( !savedEntries.empty() && savedEntries.size() % 3 == 0 )
|
||||
{
|
||||
int index = 0;
|
||||
while( index < savedEntries.length() )
|
||||
{
|
||||
if( !m_cache.contains( savedEntries.at( index ) ) )
|
||||
m_cache[savedEntries.at( index ) ] = QHash< QString, ACL >();
|
||||
m_cache[savedEntries.at( index )][savedEntries.at( index + 1 )] = (ACL)(savedEntries.at( index + 2 ).toInt() );
|
||||
index += 3;
|
||||
}
|
||||
}
|
||||
|
||||
m_saveTimer.setSingleShot( false );
|
||||
m_saveTimer.setInterval( 60000 );
|
||||
connect( &m_saveTimer, SIGNAL( timeout() ), this, SLOT( saveTimerFired() ) );
|
||||
m_saveTimer.start();
|
||||
}
|
||||
|
||||
ACLSystem::~ACLSystem()
|
||||
{
|
||||
m_saveTimer.stop();
|
||||
saveTimerFired();
|
||||
}
|
||||
|
||||
ACLSystem::ACL
|
||||
ACLSystem::isAuthorizedUser( const QString& dbid )
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
QMutexLocker locker( &m_cacheMutex );
|
||||
qDebug() << "Current cache keys =" << m_cache.keys();
|
||||
// qDebug() << "Looking up dbid";
|
||||
if( !m_cache.contains( dbid ) )
|
||||
return ACLSystem::NotFound;
|
||||
else
|
||||
{
|
||||
QHash< QString, ACL > peerHash = m_cache[dbid];
|
||||
if( peerHash.contains( "global" ) )
|
||||
return peerHash["global"];
|
||||
return ACLSystem::NotFound;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ACLSystem::authorizeUser( const QString& dbid, ACLSystem::ACL globalType )
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
if( globalType == ACLSystem::NotFound )
|
||||
return;
|
||||
|
||||
QMutexLocker locker( &m_cacheMutex );
|
||||
|
||||
QHash< QString, ACL > peerHash;
|
||||
if( m_cache.contains( dbid ) )
|
||||
peerHash = m_cache[dbid];
|
||||
peerHash["global"] = globalType;
|
||||
m_cache[dbid] = peerHash;
|
||||
}
|
||||
|
||||
ACLSystem::ACL
|
||||
ACLSystem::isAuthorizedPath( const QString& dbid, const QString& path )
|
||||
{
|
||||
QMutexLocker locker( &m_cacheMutex );
|
||||
|
||||
if( !m_cache.contains( dbid ) )
|
||||
return ACLSystem::NotFound;
|
||||
|
||||
QHash< QString, ACL > peerHash = m_cache[dbid];
|
||||
if( !peerHash.contains( path ) )
|
||||
{
|
||||
if( peerHash.contains( "global" ) )
|
||||
return peerHash["global"];
|
||||
else
|
||||
return ACLSystem::Deny;
|
||||
}
|
||||
return peerHash[path];
|
||||
}
|
||||
|
||||
void
|
||||
ACLSystem::authorizePath( const QString& dbid, const QString& path, ACLSystem::ACL type )
|
||||
{
|
||||
TomahawkSettings *s = TomahawkSettings::instance();
|
||||
if( !s->scannerPaths().contains( path ) )
|
||||
{
|
||||
qDebug() << "path selected is not in our scanner path!";
|
||||
return;
|
||||
}
|
||||
QMutexLocker locker( &m_cacheMutex );
|
||||
QHash< QString, ACLSystem::ACL > peerHash;
|
||||
if ( m_cache.contains( dbid ) )
|
||||
peerHash = m_cache[dbid];
|
||||
peerHash[path] = type;
|
||||
m_cache[dbid] = peerHash;
|
||||
}
|
||||
|
||||
void
|
||||
ACLSystem::saveTimerFired()
|
||||
{
|
||||
QStringList saveCache;
|
||||
foreach( QString dbid, m_cache.keys() )
|
||||
{
|
||||
foreach( QString path, m_cache[dbid].keys() )
|
||||
saveCache << dbid << path << QString::number( (int)(m_cache[dbid][path]) );
|
||||
}
|
||||
TomahawkSettings::instance()->setAclEntries( saveCache );
|
||||
}
|
64
src/libtomahawk/aclsystem.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk 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.
|
||||
*
|
||||
* Tomahawk 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 Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TOMAHAWK_ACLSYSTEM_H
|
||||
#define TOMAHAWK_ACLSYSTEM_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QHash>
|
||||
#include <QTimer>
|
||||
#include <QMutex>
|
||||
|
||||
#include "dllmacro.h"
|
||||
|
||||
class DLLEXPORT ACLSystem : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
static ACLSystem* instance();
|
||||
|
||||
enum ACL {
|
||||
Allow = 0,
|
||||
Deny = 1,
|
||||
NotFound = 2
|
||||
};
|
||||
|
||||
ACLSystem( QObject *parent = 0 );
|
||||
~ACLSystem();
|
||||
|
||||
ACL isAuthorizedUser( const QString &dbid );
|
||||
void authorizeUser( const QString &dbid, ACL globalType );
|
||||
|
||||
ACL isAuthorizedPath( const QString &dbid, const QString &path );
|
||||
void authorizePath( const QString &dbid, const QString &path, ACL type );
|
||||
|
||||
private slots:
|
||||
void saveTimerFired();
|
||||
|
||||
private:
|
||||
QHash< QString, QHash< QString, ACL > > m_cache;
|
||||
QTimer m_saveTimer;
|
||||
QMutex m_cacheMutex;
|
||||
|
||||
static ACLSystem* s_instance;
|
||||
};
|
||||
|
||||
#endif // TOMAHAWK_ACLSYSTEM_H
|
@@ -1,5 +1,5 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
@@ -93,7 +93,7 @@ Album::tracks()
|
||||
cmd->setAlbum( this );
|
||||
cmd->setSortOrder( DatabaseCommand_AllTracks::AlbumPosition );
|
||||
|
||||
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ),
|
||||
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr>, QVariant ) ),
|
||||
SLOT( onTracksAdded( QList<Tomahawk::query_ptr> ) ) );
|
||||
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
virtual void setRepeatMode( PlaylistInterface::RepeatMode ) {}
|
||||
virtual void setShuffled( bool ) {}
|
||||
|
||||
virtual void setFilter( const QString& pattern ) {}
|
||||
virtual void setFilter( const QString& /*pattern*/ ) {}
|
||||
|
||||
signals:
|
||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
@@ -95,7 +95,7 @@ Artist::tracks()
|
||||
cmd->setArtist( this );
|
||||
cmd->setSortOrder( DatabaseCommand_AllTracks::Album );
|
||||
|
||||
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ),
|
||||
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr>, QVariant ) ),
|
||||
SLOT( onTracksAdded( QList<Tomahawk::query_ptr> ) ) );
|
||||
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
virtual void setRepeatMode( PlaylistInterface::RepeatMode ) {}
|
||||
virtual void setShuffled( bool ) {}
|
||||
|
||||
virtual void setFilter( const QString& pattern ) {}
|
||||
virtual void setFilter( const QString& /*pattern*/ ) {}
|
||||
|
||||
signals:
|
||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "audioengine.h"
|
||||
|
||||
#include <QUrl>
|
||||
#include <QMutexLocker>
|
||||
|
||||
#include "playlistinterface.h"
|
||||
|
||||
@@ -27,14 +26,6 @@
|
||||
#include "database/databasecommand_logplayback.h"
|
||||
#include "network/servent.h"
|
||||
|
||||
#include "madtranscode.h"
|
||||
#ifndef NO_OGG
|
||||
#include "vorbistranscode.h"
|
||||
#endif
|
||||
#ifndef NO_FLAC
|
||||
#include "flactranscode.h"
|
||||
#endif
|
||||
|
||||
AudioEngine* AudioEngine::s_instance = 0;
|
||||
|
||||
|
||||
@@ -46,49 +37,48 @@ AudioEngine::instance()
|
||||
|
||||
|
||||
AudioEngine::AudioEngine()
|
||||
: QThread()
|
||||
: QObject()
|
||||
, m_isPlayingHttp( false )
|
||||
, m_playlist( 0 )
|
||||
, m_currentTrackPlaylist( 0 )
|
||||
, m_queue( 0 )
|
||||
, m_timeElapsed( 0 )
|
||||
, m_i( 0 )
|
||||
, m_expectStop( false )
|
||||
{
|
||||
s_instance = this;
|
||||
qDebug() << "Init AudioEngine";
|
||||
|
||||
moveToThread( this );
|
||||
qRegisterMetaType< AudioErrorCode >("AudioErrorCode");
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
m_audio = new AlsaPlayback();
|
||||
#else
|
||||
m_audio = new RTAudioOutput();
|
||||
#endif
|
||||
connect( m_audio, SIGNAL( timeElapsed( unsigned int ) ), SLOT( timerTriggered( unsigned int ) ), Qt::DirectConnection );
|
||||
m_mediaObject = new Phonon::MediaObject( this );
|
||||
m_audioOutput = new Phonon::AudioOutput( Phonon::MusicCategory, this );
|
||||
Phonon::createPath( m_mediaObject, m_audioOutput );
|
||||
|
||||
start();
|
||||
m_mediaObject->setTickInterval( 150 );
|
||||
connect( m_mediaObject, SIGNAL( stateChanged( Phonon::State, Phonon::State ) ), SLOT( onStateChanged( Phonon::State, Phonon::State ) ) );
|
||||
connect( m_mediaObject, SIGNAL( tick( qint64 ) ), SLOT( timerTriggered( qint64 ) ) );
|
||||
}
|
||||
|
||||
|
||||
AudioEngine::~AudioEngine()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "waiting for event loop to finish...";
|
||||
quit();
|
||||
wait( 1000 );
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
m_input.clear();
|
||||
delete m_audio;
|
||||
m_mediaObject->stop();
|
||||
// stop();
|
||||
|
||||
delete m_audioOutput;
|
||||
delete m_mediaObject;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::playPause()
|
||||
{
|
||||
if( m_audio->isPlaying() )
|
||||
if ( isPlaying() )
|
||||
pause();
|
||||
else
|
||||
play();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -97,10 +87,9 @@ AudioEngine::play()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if ( m_audio->isPaused() )
|
||||
if ( isPaused() )
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
m_audio->resume();
|
||||
m_mediaObject->play();
|
||||
emit resumed();
|
||||
}
|
||||
else
|
||||
@@ -112,9 +101,8 @@ void
|
||||
AudioEngine::pause()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
m_audio->pause();
|
||||
m_mediaObject->pause();
|
||||
emit paused();
|
||||
}
|
||||
|
||||
@@ -123,18 +111,9 @@ void
|
||||
AudioEngine::stop()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
if ( !m_input.isNull() )
|
||||
{
|
||||
m_input->close();
|
||||
m_input.clear();
|
||||
}
|
||||
|
||||
if ( !m_transcode.isNull() )
|
||||
m_transcode->clearBuffers();
|
||||
|
||||
m_audio->stopPlayback();
|
||||
m_expectStop = true;
|
||||
m_mediaObject->stop();
|
||||
|
||||
setCurrentTrack( Tomahawk::result_ptr() );
|
||||
emit stopped();
|
||||
@@ -145,7 +124,6 @@ void
|
||||
AudioEngine::previous()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
clearBuffers();
|
||||
loadPreviousTrack();
|
||||
}
|
||||
|
||||
@@ -154,19 +132,28 @@ void
|
||||
AudioEngine::next()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
clearBuffers();
|
||||
loadNextTrack();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::seek( int ms )
|
||||
{
|
||||
if ( isPlaying() || isPaused() )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << ms;
|
||||
m_mediaObject->seek( ms );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::setVolume( int percentage )
|
||||
{
|
||||
//qDebug() << Q_FUNC_INFO;
|
||||
|
||||
percentage = qBound( 0, percentage, 100 );
|
||||
|
||||
m_audio->setVolume( percentage );
|
||||
m_audioOutput->setVolume( (qreal)percentage / 100.0 );
|
||||
emit volumeChanged( percentage );
|
||||
}
|
||||
|
||||
@@ -179,13 +166,9 @@ AudioEngine::mute()
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::onTrackAboutToClose()
|
||||
AudioEngine::onTrackAboutToFinish()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// the only way the iodev we are reading from closes itself, is if
|
||||
// there was a failure, usually network went away.
|
||||
// but we might as well play the remaining data we received
|
||||
// stop();
|
||||
}
|
||||
|
||||
|
||||
@@ -195,9 +178,7 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
||||
qDebug() << Q_FUNC_INFO << thread() << result;
|
||||
bool err = false;
|
||||
|
||||
// in a separate scope due to the QMutexLocker!
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
QSharedPointer<QIODevice> io;
|
||||
|
||||
if ( result.isNull() )
|
||||
@@ -205,22 +186,17 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
||||
else
|
||||
{
|
||||
setCurrentTrack( result );
|
||||
io = Servent::instance()->getIODeviceForUrl( m_currentTrack );
|
||||
if ( m_currentTrack->url().startsWith( "http://" ) )
|
||||
{
|
||||
m_readReady = false;
|
||||
connect( io.data(), SIGNAL( downloadProgress( qint64, qint64 ) ), SLOT( onDownloadProgress( qint64, qint64 ) ) );
|
||||
}
|
||||
else
|
||||
m_readReady = true;
|
||||
|
||||
if ( !io || io.isNull() )
|
||||
if ( !isHttpResult( m_currentTrack->url() ) && !isLocalResult( m_currentTrack->url() ) )
|
||||
{
|
||||
qDebug() << "Error getting iodevice for item";
|
||||
err = true;
|
||||
io = Servent::instance()->getIODeviceForUrl( m_currentTrack );
|
||||
|
||||
if ( !io || io.isNull() )
|
||||
{
|
||||
qDebug() << "Error getting iodevice for item";
|
||||
err = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
connect( io.data(), SIGNAL( aboutToClose() ), SLOT( onTrackAboutToClose() ), Qt::DirectConnection );
|
||||
}
|
||||
|
||||
if ( !err )
|
||||
@@ -228,50 +204,42 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
||||
qDebug() << "Starting new song from url:" << m_currentTrack->url();
|
||||
emit loading( m_currentTrack );
|
||||
|
||||
if ( !m_input.isNull() )
|
||||
if ( !m_input.isNull() || m_isPlayingHttp )
|
||||
{
|
||||
m_input->close();
|
||||
m_input.clear();
|
||||
if ( !m_input.isNull() )
|
||||
{
|
||||
m_input->close();
|
||||
m_input.clear();
|
||||
}
|
||||
|
||||
m_expectStop = true;
|
||||
}
|
||||
|
||||
if ( m_lastTrack.isNull() || ( m_currentTrack->mimetype() != m_lastTrack->mimetype() ) )
|
||||
if ( !isHttpResult( m_currentTrack->url() ) && !isLocalResult( m_currentTrack->url() ) )
|
||||
{
|
||||
if ( !m_transcode.isNull() )
|
||||
m_mediaObject->setCurrentSource( io.data() );
|
||||
m_mediaObject->currentSource().setAutoDelete( false );
|
||||
m_isPlayingHttp = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
QUrl furl = m_currentTrack->url();
|
||||
if ( m_currentTrack->url().contains( "?" ) )
|
||||
{
|
||||
m_transcode.clear();
|
||||
furl = QUrl( m_currentTrack->url().left( m_currentTrack->url().indexOf( '?' ) ) );
|
||||
furl.setEncodedQuery( QString( m_currentTrack->url().mid( m_currentTrack->url().indexOf( '?' ) + 1 ) ).toLocal8Bit() );
|
||||
}
|
||||
|
||||
if ( m_currentTrack->mimetype() == "audio/mpeg" )
|
||||
{
|
||||
m_transcode = QSharedPointer<TranscodeInterface>(new MADTranscode());
|
||||
}
|
||||
#ifndef NO_OGG
|
||||
else if ( m_currentTrack->mimetype() == "application/ogg" )
|
||||
{
|
||||
m_transcode = QSharedPointer<TranscodeInterface>(new VorbisTranscode());
|
||||
}
|
||||
#endif
|
||||
#ifndef NO_FLAC
|
||||
else if ( m_currentTrack->mimetype() == "audio/flac" )
|
||||
{
|
||||
m_transcode = QSharedPointer<TranscodeInterface>(new FLACTranscode());
|
||||
}
|
||||
#endif
|
||||
else
|
||||
qDebug() << "Could NOT find suitable transcoder! Stopping audio.";
|
||||
|
||||
if ( !m_transcode.isNull() )
|
||||
connect( m_transcode.data(), SIGNAL( streamInitialized( long, int ) ), SLOT( setStreamData( long, int ) ), Qt::DirectConnection );
|
||||
m_mediaObject->setCurrentSource( furl );
|
||||
m_mediaObject->currentSource().setAutoDelete( true );
|
||||
m_isPlayingHttp = true;
|
||||
}
|
||||
|
||||
if ( !m_transcode.isNull() )
|
||||
{
|
||||
m_transcode->clearBuffers();
|
||||
m_input = io;
|
||||
m_input = io;
|
||||
m_mediaObject->play();
|
||||
emit started( m_currentTrack );
|
||||
|
||||
if ( m_audio->isPaused() )
|
||||
m_audio->resume();
|
||||
}
|
||||
DatabaseCommand_LogPlayback* cmd = new DatabaseCommand_LogPlayback( m_currentTrack, DatabaseCommand_LogPlayback::Started );
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,17 +249,9 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
||||
return false;
|
||||
}
|
||||
|
||||
// needs to be out of the mutexlocker scope
|
||||
if ( m_transcode.isNull() )
|
||||
{
|
||||
stop();
|
||||
emit error( AudioEngine::DecodeError );
|
||||
}
|
||||
|
||||
return !m_transcode.isNull();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::loadPreviousTrack()
|
||||
{
|
||||
@@ -340,8 +300,6 @@ AudioEngine::playItem( PlaylistInterface* playlist, const Tomahawk::result_ptr&
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
clearBuffers();
|
||||
|
||||
setPlaylist( playlist );
|
||||
m_currentTrackPlaylist = playlist;
|
||||
|
||||
@@ -350,54 +308,58 @@ AudioEngine::playItem( PlaylistInterface* playlist, const Tomahawk::result_ptr&
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::setStreamData( long sampleRate, int channels )
|
||||
AudioEngine::onStateChanged( Phonon::State newState, Phonon::State oldState )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << sampleRate << channels << thread();
|
||||
qDebug() << Q_FUNC_INFO << oldState << newState;
|
||||
|
||||
if ( sampleRate < 44100 )
|
||||
sampleRate = 44100;
|
||||
|
||||
m_audio->initAudio( sampleRate, channels );
|
||||
if ( m_audio->startPlayback() )
|
||||
if ( newState == Phonon::ErrorState )
|
||||
{
|
||||
emit started( m_currentTrack );
|
||||
|
||||
DatabaseCommand_LogPlayback* cmd = new DatabaseCommand_LogPlayback( m_currentTrack, DatabaseCommand_LogPlayback::Started );
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
||||
qDebug() << "Phonon Error:" << m_mediaObject->errorString() << m_mediaObject->errorType();
|
||||
}
|
||||
else
|
||||
if ( oldState == Phonon::PlayingState && newState == Phonon::StoppedState )
|
||||
{
|
||||
qDebug() << "Can't open device for audio output!";
|
||||
stop();
|
||||
emit error( AudioEngine::AudioDeviceError );
|
||||
qDebug() << "Expecting stop?" << m_expectStop;
|
||||
if ( !m_expectStop )
|
||||
{
|
||||
qDebug() << "Loading next track.";
|
||||
m_expectStop = false;
|
||||
loadNextTrack();
|
||||
}
|
||||
}
|
||||
else if ( oldState == Phonon::PlayingState && newState == Phonon::PausedState )
|
||||
{
|
||||
qDebug() << m_mediaObject->currentTime() << m_mediaObject->totalTime();
|
||||
if ( m_mediaObject->currentTime() == m_mediaObject->totalTime() )
|
||||
{
|
||||
qDebug() << "Loading next track.";
|
||||
m_expectStop = false;
|
||||
loadNextTrack();
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << Q_FUNC_INFO << sampleRate << channels << "done";
|
||||
m_expectStop = false;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::timerTriggered( unsigned int seconds )
|
||||
AudioEngine::timerTriggered( qint64 time )
|
||||
{
|
||||
m_timeElapsed = seconds;
|
||||
emit timerSeconds( seconds );
|
||||
|
||||
if ( m_currentTrack->duration() == 0 )
|
||||
if ( m_timeElapsed != time / 1000 )
|
||||
{
|
||||
emit timerPercentage( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
emit timerPercentage( (unsigned int)( seconds / m_currentTrack->duration() ) );
|
||||
}
|
||||
}
|
||||
m_timeElapsed = time / 1000;
|
||||
emit timerSeconds( m_timeElapsed );
|
||||
|
||||
if ( m_currentTrack->duration() == 0 )
|
||||
{
|
||||
emit timerPercentage( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
emit timerPercentage( ( (double)m_timeElapsed / (double)m_currentTrack->duration() ) * 100.0 );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioEngine::clearBuffers()
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
m_audio->clearBuffers();
|
||||
emit timerMilliSeconds( time );
|
||||
}
|
||||
|
||||
|
||||
@@ -425,95 +387,15 @@ AudioEngine::setCurrentTrack( const Tomahawk::result_ptr& result )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::onDownloadProgress( qint64 recv, qint64 total )
|
||||
bool
|
||||
AudioEngine::isHttpResult( const QString& url ) const
|
||||
{
|
||||
if ( ( recv > 1024 * 32 ) || recv > total )
|
||||
m_readReady = true;
|
||||
return url.startsWith( "http://" );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::run()
|
||||
bool
|
||||
AudioEngine::isLocalResult( const QString& url ) const
|
||||
{
|
||||
QTimer::singleShot( 0, this, SLOT( engineLoop() ) );
|
||||
exec();
|
||||
qDebug() << "AudioEngine event loop stopped";
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::engineLoop()
|
||||
{
|
||||
qDebug() << "AudioEngine thread:" << this->thread();
|
||||
loop();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::loop()
|
||||
{
|
||||
m_i++;
|
||||
//if( m_i % 500 == 0 ) qDebug() << Q_FUNC_INFO << thread();
|
||||
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
/* if ( m_i % 200 == 0 )
|
||||
{
|
||||
if ( !m_input.isNull() )
|
||||
qDebug() << "Outer audio loop" << m_input->bytesAvailable() << m_audio->needData();
|
||||
}*/
|
||||
|
||||
if ( m_i % 10 == 0 && m_audio->isPlaying() )
|
||||
m_audio->triggerTimers();
|
||||
|
||||
if( !m_transcode.isNull() &&
|
||||
!m_input.isNull() &&
|
||||
m_input->bytesAvailable() &&
|
||||
m_audio->needData() &&
|
||||
!m_audio->isPaused() )
|
||||
{
|
||||
//if ( m_i % 50 == 0 )
|
||||
// qDebug() << "Inner audio loop";
|
||||
|
||||
if ( m_transcode->needData() > 0 )
|
||||
{
|
||||
QByteArray encdata = m_input->read( m_transcode->preferredDataSize() );
|
||||
m_transcode->processData( encdata, m_input->atEnd() );
|
||||
}
|
||||
|
||||
if ( m_transcode->haveData() )
|
||||
{
|
||||
QByteArray rawdata = m_transcode->data();
|
||||
m_audio->processData( rawdata );
|
||||
}
|
||||
|
||||
QTimer::singleShot( 0, this, SLOT( loop() ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int nextdelay = 50;
|
||||
// are we cleanly at the end of a track, and ready for the next one?
|
||||
if ( !m_input.isNull() &&
|
||||
m_input->atEnd() &&
|
||||
m_readReady &&
|
||||
!m_input->bytesAvailable() &&
|
||||
!m_audio->haveData() &&
|
||||
!m_audio->isPaused() )
|
||||
{
|
||||
qDebug() << "Starting next track then";
|
||||
loadNextTrack();
|
||||
// will need data immediately:
|
||||
nextdelay = 0;
|
||||
}
|
||||
else if ( !m_input.isNull() && !m_input->isOpen() )
|
||||
{
|
||||
qDebug() << "AudioEngine IODev closed. errorString:" << m_input->errorString();
|
||||
loadNextTrack();
|
||||
nextdelay = 0;
|
||||
}
|
||||
|
||||
QTimer::singleShot( nextdelay, this, SLOT( loop() ) );
|
||||
return url.startsWith( "file://" );
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
@@ -19,24 +19,21 @@
|
||||
#ifndef AUDIOENGINE_H
|
||||
#define AUDIOENGINE_H
|
||||
|
||||
#include <QThread>
|
||||
#include <QMutex>
|
||||
#include <QBuffer>
|
||||
#include <QObject>
|
||||
|
||||
#include <phonon/MediaObject>
|
||||
#include <phonon/AudioOutput>
|
||||
|
||||
#include "result.h"
|
||||
#include "typedefs.h"
|
||||
|
||||
#include "rtaudiooutput.h"
|
||||
#include "alsaplayback.h"
|
||||
#include "transcodeinterface.h"
|
||||
|
||||
#include "dllmacro.h"
|
||||
|
||||
#define AUDIO_VOLUME_STEP 5
|
||||
|
||||
class PlaylistInterface;
|
||||
|
||||
class DLLEXPORT AudioEngine : public QThread
|
||||
class DLLEXPORT AudioEngine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -48,10 +45,10 @@ public:
|
||||
explicit AudioEngine();
|
||||
~AudioEngine();
|
||||
|
||||
unsigned int volume() const { if ( m_audio ) return m_audio->volume() * 100.0; else return 0; }; // in percent
|
||||
bool isPaused() const { return m_audio->isPaused(); }
|
||||
bool isPlaying() const { return m_audio->isPlaying(); }
|
||||
|
||||
unsigned int volume() const { return m_audioOutput->volume() * 100.0; } // in percent
|
||||
bool isPlaying() const { return m_mediaObject->state() == Phonon::PlayingState; }
|
||||
bool isPaused() const { return m_mediaObject->state() == Phonon::PausedState; }
|
||||
|
||||
/* Returns the PlaylistInterface of the currently playing track. Note: This might be different to the current playlist! */
|
||||
PlaylistInterface* currentTrackPlaylist() const { return m_currentTrackPlaylist; }
|
||||
|
||||
@@ -67,6 +64,7 @@ public slots:
|
||||
void previous();
|
||||
void next();
|
||||
|
||||
void seek( int ms );
|
||||
void setVolume( int percentage );
|
||||
void lowerVolume() { setVolume( volume() - AUDIO_VOLUME_STEP ); }
|
||||
void raiseVolume() { setVolume( volume() + AUDIO_VOLUME_STEP ); }
|
||||
@@ -77,7 +75,7 @@ public slots:
|
||||
void setPlaylist( PlaylistInterface* playlist );
|
||||
void setQueue( PlaylistInterface* queue ) { m_queue = queue; }
|
||||
|
||||
void onTrackAboutToClose();
|
||||
void onTrackAboutToFinish();
|
||||
|
||||
signals:
|
||||
void loading( const Tomahawk::result_ptr& track );
|
||||
@@ -89,6 +87,7 @@ signals:
|
||||
|
||||
void volumeChanged( int volume /* in percent */ );
|
||||
|
||||
void timerMilliSeconds( qint64 msElapsed );
|
||||
void timerSeconds( unsigned int secondsElapsed );
|
||||
void timerPercentage( unsigned int percentage );
|
||||
|
||||
@@ -101,39 +100,29 @@ private slots:
|
||||
void loadPreviousTrack();
|
||||
void loadNextTrack();
|
||||
|
||||
void onDownloadProgress( qint64 recv, qint64 total );
|
||||
|
||||
void setStreamData( long sampleRate, int channels );
|
||||
void timerTriggered( unsigned int seconds );
|
||||
|
||||
void engineLoop();
|
||||
void loop();
|
||||
void onStateChanged( Phonon::State newState, Phonon::State oldState );
|
||||
void timerTriggered( qint64 time );
|
||||
|
||||
void setCurrentTrack( const Tomahawk::result_ptr& result );
|
||||
|
||||
private:
|
||||
void run();
|
||||
void clearBuffers();
|
||||
bool isHttpResult( const QString& ) const;
|
||||
bool isLocalResult( const QString& ) const;
|
||||
|
||||
bool m_isPlayingHttp;
|
||||
QSharedPointer<QIODevice> m_input;
|
||||
QSharedPointer<TranscodeInterface> m_transcode;
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
AlsaPlayback* m_audio;
|
||||
#else
|
||||
RTAudioOutput* m_audio;
|
||||
#endif
|
||||
|
||||
Tomahawk::result_ptr m_currentTrack;
|
||||
Tomahawk::result_ptr m_lastTrack;
|
||||
PlaylistInterface* m_playlist;
|
||||
PlaylistInterface* m_currentTrackPlaylist;
|
||||
PlaylistInterface* m_queue;
|
||||
QMutex m_mutex;
|
||||
|
||||
bool m_readReady;
|
||||
Phonon::MediaObject* m_mediaObject;
|
||||
Phonon::AudioOutput* m_audioOutput;
|
||||
|
||||
unsigned int m_timeElapsed;
|
||||
int m_i;
|
||||
bool m_expectStop;
|
||||
|
||||
static AudioEngine* s_instance;
|
||||
};
|
||||
|