Compare commits
690 commits
Author | SHA1 | Date | |
---|---|---|---|
|
fcdf00fedf | ||
|
7491f568e8 | ||
|
d05a714e39 | ||
|
c4b62e3731 | ||
|
0f37dd2347 | ||
|
4437f3bf65 | ||
|
3f83bd0044 | ||
|
42bf0f1587 | ||
|
7a3f413ec4 | ||
|
77c2b4e307 | ||
|
8ea40616d1 | ||
|
fdb359250e | ||
|
aa81c94b41 | ||
|
ab22f8da62 | ||
|
eb32a735b1 | ||
|
1136333b0d | ||
|
14c5c0fdeb | ||
|
dba5e6db69 | ||
|
79b2ab6b5e | ||
|
ca51708af6 | ||
|
040ff6a173 | ||
|
f6150041d7 | ||
|
7c78536025 | ||
|
42ad0865d7 | ||
|
7e05344e58 | ||
|
f06269330f | ||
|
82ba84aee9 | ||
|
32d67055d3 | ||
|
cc371941aa | ||
|
98621a361a | ||
|
5092fe07ae | ||
|
1f746909c1 | ||
|
2876017b7d | ||
|
305ccfb2b8 | ||
|
d4a4c2d39c | ||
|
5188f4e555 | ||
|
1af4a3ebbc | ||
|
043dd8a799 | ||
|
0e2e05b69c | ||
|
9182a891c9 | ||
|
3c3425438d | ||
|
9724f3fe49 | ||
|
e28f44e5ec | ||
|
5c8a50ecd3 | ||
|
7fedbaf588 | ||
|
04ce9f62f9 | ||
|
88a7219ea9 | ||
|
b9bfc08e9b | ||
|
45f5cb0c28 | ||
|
3f18c75cb5 | ||
|
d124142bc1 | ||
|
ce4cf6d2ff | ||
|
4f9f84ff43 | ||
|
241e038eb2 | ||
|
1b6278f053 | ||
|
852cf02143 | ||
|
9374dd3b00 | ||
|
89616448fa | ||
|
d874f59d85 | ||
|
7f6caa7ac0 | ||
|
91fb4ee395 | ||
|
697e62b8fb | ||
|
3f0bd8b978 | ||
|
92787f2c30 | ||
|
7ba9dfd2f4 | ||
|
57b93c6939 | ||
|
26a783518d | ||
|
a9f7fea510 | ||
|
cdb41e277c | ||
|
8ec8122cd9 | ||
|
a83510fb39 | ||
|
ae3bac9337 | ||
|
ce38172b72 | ||
|
06f967c19d | ||
|
44ae82c91c | ||
|
a633c1e8f0 | ||
|
5225b5ae9d | ||
|
b684ef9cff | ||
|
51607568ac | ||
|
9378a8dfe6 | ||
|
6ca46aca62 | ||
|
e1ff375b4d | ||
|
672e81e8de | ||
|
ae25d2d731 | ||
|
1226f0f21c | ||
|
4a4208a15f | ||
|
0c6402841f | ||
|
0a20cf448a | ||
|
a9b2a48ada | ||
|
29b5f2f886 | ||
|
d1d98760d6 | ||
|
9ebaef6911 | ||
|
e4e8579a60 | ||
|
e16e1851b2 | ||
|
beeb0c3469 | ||
|
523a87c81d | ||
|
d7e0392c96 | ||
|
3284ab32a8 | ||
|
e4df12bd13 | ||
|
c9be8ce1fb | ||
|
d2708b5792 | ||
|
2b22068c48 | ||
|
9e7c471e0f | ||
|
2b503e035e | ||
|
6698e036cf | ||
|
9a1a830347 | ||
|
e5d0aab7b9 | ||
|
ddc84e873a | ||
|
9aa884eaa4 | ||
|
6ab1b48c28 | ||
|
7a1816ba1d | ||
|
df837c6f3e | ||
|
08b42c5990 | ||
|
682abe3cc5 | ||
|
8464f2b4dd | ||
|
1212e047e2 | ||
|
2bb5613ce7 | ||
|
c29b950a82 | ||
|
69b4b7ebbe | ||
|
64386a81b7 | ||
|
09caba4858 | ||
|
488f06791c | ||
|
222f4cd465 | ||
|
4d87132872 | ||
|
36f9925357 | ||
|
f7ba9ec0a6 | ||
|
4235aa8b3a | ||
|
0d1c09e918 | ||
|
90fa311a18 | ||
|
33a70d17ce | ||
|
70c654989e | ||
|
9796253960 | ||
|
c1c0c7789c | ||
|
b186b23a30 | ||
|
4d1025dd9d | ||
|
2e2232c4c1 | ||
|
007dc8a332 | ||
|
b53e0b13c8 | ||
|
7d0b2e7ab3 | ||
|
6c2b35ce6c | ||
|
966751b26a | ||
|
0695ed0716 | ||
|
1de80bfdae | ||
|
ee9d84478d | ||
|
0923f6a52e | ||
|
5699020a6b | ||
|
74b06d022b | ||
|
47ba463536 | ||
|
5cc3771b5b | ||
|
e5ec51628a | ||
|
05d00d134f | ||
|
2c10c89964 | ||
|
4e7163f444 | ||
|
bc0590fa75 | ||
|
497e7a9157 | ||
|
f8dd2b8b8b | ||
|
9c326d33ce | ||
|
85f26eb2ab | ||
|
b5e55b4a30 | ||
|
05ae34eff1 | ||
|
10b63de30e | ||
|
b75ac5e39e | ||
|
a78355e88a | ||
|
c2ee0a33e3 | ||
|
94fb6842ee | ||
|
a4afc108ad | ||
|
abe0cf8f2c | ||
|
7f90cc251b | ||
|
dc3d64e668 | ||
|
517bc3a5e6 | ||
|
c142e0063a | ||
|
39a391cded | ||
|
4c6f55d98d | ||
|
d232c3117f | ||
|
3a09bec191 | ||
|
2f60147fff | ||
|
408c3ce907 | ||
|
3edbffb955 | ||
|
95ab5faccf | ||
|
8b333d0fd9 | ||
|
9e0a01455d | ||
|
dcd4ffb509 | ||
|
77ea946864 | ||
|
5c59124205 | ||
|
f37309e2a8 | ||
|
1454cdd256 | ||
|
5608370ad9 | ||
|
601798c108 | ||
|
77570d08c0 | ||
|
a0b67d1328 | ||
|
5b033ffac2 | ||
|
9ae0fceac2 | ||
|
c1529fc6a0 | ||
|
7c6be2ee50 | ||
|
b331c9f1c9 | ||
|
71f1d2ced8 | ||
|
c057e4b9e1 | ||
|
7a5741dbdf | ||
|
d5b7a51c99 | ||
|
ccad33bfdb | ||
|
424ab7c97d | ||
|
1824ce6dd2 | ||
|
0ae55c11c2 | ||
|
9ee4009660 | ||
|
8da1718e0b | ||
|
d5ea411b9a | ||
|
b5771e760d | ||
|
9b621b4d11 | ||
|
2bbeabaeba | ||
|
69da5ab2bf | ||
|
3b46205114 | ||
|
38c78a5a1c | ||
|
9606689639 | ||
|
a1a4d483c9 | ||
|
bb0202c638 | ||
|
577ccf75ab | ||
|
50c481dacb | ||
|
b78af39d26 | ||
|
d55cb60630 | ||
|
61be2e63b6 | ||
|
026751e2cf | ||
|
e2fb7975c0 | ||
|
30f085c71f | ||
|
fa61eba0d0 | ||
|
860eb4c48e | ||
|
fe075e8a14 | ||
|
cd17f6ab7d | ||
|
b0ca992f00 | ||
|
ecb27e735a | ||
|
a4c4b03394 | ||
|
4578376717 | ||
|
af3d0b5bdc | ||
|
edb67aa81d | ||
|
ffdbd53a4f | ||
|
217d55cfb7 | ||
|
dbf4ad5ec6 | ||
|
2d7e3ad65a | ||
|
5d3b663f60 | ||
|
34d4e02557 | ||
|
13e7031a70 | ||
|
2f5da2232f | ||
|
3d047578ce | ||
|
8b8425b177 | ||
|
83b996be76 | ||
|
1963732161 | ||
|
126bfb3aa8 | ||
|
a8b7114300 | ||
|
37447f04b7 | ||
|
cdf08d3185 | ||
|
126d6146c4 | ||
|
f00959c024 | ||
|
178e4d8fc8 | ||
|
dc3aac1666 | ||
|
542865a0ab | ||
|
326a076e48 | ||
|
f89d6937fd | ||
|
b8a59f76d9 | ||
|
0a5d4d8889 | ||
|
9c043d372d | ||
|
a8b9059c59 | ||
|
d33dc46cfb | ||
|
5a72bdc7be | ||
|
c13f76d95a | ||
|
9026bff9bb | ||
|
f9b6c58709 | ||
|
16f27e75ab | ||
|
62566ddec9 | ||
|
260313ed16 | ||
|
eb8a2754f8 | ||
|
e257a781a2 | ||
|
4d6dbff78e | ||
|
0f6a62080a | ||
|
511a0cfd5c | ||
|
e94d8a94bf | ||
|
ae8ceede03 | ||
|
5a9ce9cce4 | ||
|
fb29dce9a4 | ||
|
a19df85e2c | ||
|
72778c7ece | ||
|
a2b80dc74e | ||
|
6c63a455e7 | ||
|
e759c4e7a8 | ||
|
bbb2264de5 | ||
|
6870226159 | ||
|
71afce3904 | ||
|
379a8d76b7 | ||
|
e2b354387d | ||
|
049b029a95 | ||
|
13ac03d753 | ||
|
e0cd3f7894 | ||
|
67a511cc3e | ||
|
269334c9de | ||
|
699bdd42e3 | ||
|
48291318e4 | ||
|
e05b18269e | ||
|
a521a8bb4f | ||
|
3f892f03c2 | ||
|
4ca4e6b971 | ||
|
846c4dc5a6 | ||
|
dee1d78a72 | ||
|
e7b81495dd | ||
|
427047a248 | ||
|
27d31a22d9 | ||
|
84bcf69fad | ||
|
3dfc1c97fa | ||
|
f0ad3fae24 | ||
|
8c2c82a162 | ||
|
cc496b2fbd | ||
|
3464cb38b8 | ||
|
fb48daa92a | ||
|
a9f8ad46cb | ||
|
c52e1836e7 | ||
|
9783e19537 | ||
|
131bb8dd04 | ||
|
4c056aab0f | ||
|
24041be4de | ||
|
845e659100 | ||
|
44cb120a8d | ||
|
21402786df | ||
|
b460835af8 | ||
|
24b92311a0 | ||
|
daee1995f9 | ||
|
6f3cd20c47 | ||
|
3fe54ca634 | ||
|
39ef8d5791 | ||
|
6cbf39f611 | ||
|
44d6c78ebf | ||
|
d7d6a192d9 | ||
|
09bb7569f4 | ||
|
f1ea7d0c09 | ||
|
8bb8607897 | ||
|
ae481691c7 | ||
|
e0ba035357 | ||
|
603657f3e2 | ||
|
a23f4e284c | ||
|
89aa3ad327 | ||
|
795964d877 | ||
|
159e078bbf | ||
|
afed6da48b | ||
|
5bdf3f4971 | ||
|
d0dd295734 | ||
|
b245f6c6c9 | ||
|
1e6dc02155 | ||
|
33af5ee94f | ||
|
f876fc8c7b | ||
|
afd72200d2 | ||
|
5aab53f8c7 | ||
|
0d9747a1ad | ||
|
49cffbae75 | ||
|
34d5d3e4fb | ||
|
1fa987f473 | ||
|
b2803cf020 | ||
|
e1eab3f7a8 | ||
|
2b91ebf697 | ||
|
661b3a13a3 | ||
|
ffaa8e45cd | ||
|
4987e41cad | ||
|
b63b4756e4 | ||
|
58c6d6cb4e | ||
|
f336183eb6 | ||
|
9763715f70 | ||
|
b12ebbacd4 | ||
|
96d017284f | ||
|
1e36d4995d | ||
|
09d012360b | ||
|
b9beb3b495 | ||
|
cd394c6905 | ||
|
e1dee887df | ||
|
77c209318f | ||
|
42e3a6680b | ||
|
78516e1db3 | ||
|
8fd10d01dc | ||
|
fc82715c61 | ||
|
f828993102 | ||
|
01499ccd5b | ||
|
de866c1ba5 | ||
|
ca6acfd419 | ||
|
ae761897a0 | ||
|
6c29c0edc0 | ||
|
6436e2fe9b | ||
|
81b8dcd879 | ||
|
134448e67a | ||
|
dbef3aa172 | ||
|
ae7f41a2b8 | ||
|
3400a2a3ee | ||
|
ceb67ed09a | ||
|
48807fdbfb | ||
|
81c35b65f0 | ||
|
179c547459 | ||
|
3a95a5dda4 | ||
|
0a57d3f700 | ||
|
bb5b6a94ba | ||
|
38ae37fb5b | ||
|
d5ec921422 | ||
|
1505fc5238 | ||
|
c68aff0a1a | ||
|
bc74c5b602 | ||
|
2639fa9578 | ||
|
295f9d481a | ||
|
23b7a5de56 | ||
|
c99de23626 | ||
|
a42ec6f6ab | ||
|
d906975dfc | ||
|
505633aba0 | ||
|
8102febfd3 | ||
|
c036a43bd3 | ||
|
214861038b | ||
|
cc393bb543 | ||
|
315f45ce4f | ||
|
94dc3e627f | ||
|
2461e895e7 | ||
|
3f1b18ed7f | ||
|
cbca36ac7d | ||
|
0b98e4fafa | ||
|
c0b126379c | ||
|
9b6f38028f | ||
|
4d20b91580 | ||
|
7fa9f0430a | ||
|
3914288b05 | ||
|
a8901d9edc | ||
|
788b167ddd | ||
|
9385d027a2 | ||
|
1303e41913 | ||
|
72a3d92e5c | ||
|
b2ceee18e7 | ||
|
c0f2c3968e | ||
|
ddb665a543 | ||
|
ebfb1b97fe | ||
|
597f394d46 | ||
|
a1f80f108f | ||
|
6f9294d198 | ||
|
d1ac041bf5 | ||
|
534da8445a | ||
|
4908e192dd | ||
|
3ce35b1a83 | ||
|
92b8f9fea6 | ||
|
9cd2ef2b4b | ||
|
ce56cf1619 | ||
|
9e3ba4e31a | ||
|
a5c1a8ed1e | ||
|
fc3080f447 | ||
|
33b4b61c95 | ||
|
0cb70c3264 | ||
|
5a455db8e2 | ||
|
664923370d | ||
|
7ba2bfab8b | ||
|
1aa1ecab6a | ||
|
28752e8bd8 | ||
|
e45f503d2f | ||
|
b907b28f51 | ||
|
cfb327493d | ||
|
5a788bf6ce | ||
|
6fdca215fc | ||
|
a8bd7f2f0f | ||
|
f2ddd3c6f5 | ||
|
e477de2052 | ||
|
a18107407f | ||
|
4844c0c989 | ||
|
c0db97afd6 | ||
|
9948a600fc | ||
|
8be043e97e | ||
|
973141b193 | ||
|
18c6de18da | ||
|
5f65085527 | ||
|
b21db674c9 | ||
|
6262ec0f01 | ||
|
7c8f939bc1 | ||
|
39f58d3c9f | ||
|
a717515e7a | ||
|
2bda96bbc4 | ||
|
8ea6bfe401 | ||
|
4cf7bb0cb2 | ||
|
0e7941a774 | ||
|
73ec155553 | ||
|
b17bbe7a2f | ||
|
c99246bcf4 | ||
|
5d279da11f | ||
|
289272945a | ||
|
11e2b9fd94 | ||
|
38f36b28ee | ||
|
200ec3b48d | ||
|
db3c77558d | ||
|
de13ce5351 | ||
|
4b61afde1b | ||
|
1ee46e84ea | ||
|
9d126f9cc8 | ||
|
40d3b09edb | ||
|
96e1b8ef01 | ||
|
b5aca7a9cd | ||
|
caf4b212ff | ||
|
3d51d15182 | ||
|
1c22743786 | ||
|
fa9cf3a329 | ||
|
534206717a | ||
|
1ae129e8f9 | ||
|
4e0f62daef | ||
|
5542dbd7d7 | ||
|
01e9483bb4 | ||
|
c4ea37bde7 | ||
|
3422fb3990 | ||
|
f57a8c4a55 | ||
|
863c0cdcd0 | ||
|
a8fbd54e2b | ||
|
08bd745c42 | ||
|
0274999f1a | ||
|
dce287825e | ||
|
c9c78623b2 | ||
|
224fed7598 | ||
|
f19ca1afa2 | ||
|
7e7a371d45 | ||
|
d656e16493 | ||
|
bd08cc8d78 | ||
|
2660145b37 | ||
|
b645515eee | ||
|
cac1d19a11 | ||
|
d4085f218e | ||
|
4472050fb8 | ||
|
0110ccd7a7 | ||
|
177c482c7e | ||
|
6ebdee268f | ||
|
df840e101c | ||
|
ed37d44001 | ||
|
03b1c5e35c | ||
|
638ab9e402 | ||
|
b171e72586 | ||
|
61d3be9470 | ||
|
0ef8c1990f | ||
|
b586b8e60d | ||
|
21adb496b7 | ||
|
5a1e471e8b | ||
|
ae45207b29 | ||
|
98f7165e21 | ||
|
5f9d7d6b9e | ||
|
d1c2be66ae | ||
|
e299aadee0 | ||
|
a27a181e52 | ||
|
52d112644b | ||
|
eea783b1a0 | ||
|
85965c7804 | ||
|
9a5be8f445 | ||
|
095cdee275 | ||
|
aee1deec82 | ||
|
4fb5e7617d | ||
|
5bfea3a1ea | ||
|
3560aa1bd6 | ||
|
8c446098f7 | ||
|
6f788b393c | ||
|
c742aeec3f | ||
|
72be079079 | ||
|
c35b876e4d | ||
|
f2c97b23ab | ||
|
1a97ed5c1f | ||
|
f26ee365ee | ||
|
f206be7af1 | ||
|
316f14808c | ||
|
9d1085b343 | ||
|
af44d9afdc | ||
|
b9c500f11a | ||
|
6511cb9e02 | ||
|
cc099ac1b0 | ||
|
7aabe19c8a | ||
|
16271f6488 | ||
|
67a08a0671 | ||
|
aeb08c5eb6 | ||
|
be0e98089a | ||
|
0738110702 | ||
|
0f8b242914 | ||
|
cc440af5ee | ||
|
47de763487 | ||
|
f343d5152b | ||
|
7fea5f9d54 | ||
|
592227bf0f | ||
|
d4c35f5dbc | ||
|
8bda8e3b49 | ||
|
a1617bdb6a | ||
|
262d9ba9fd | ||
|
f3a6863290 | ||
|
441fd71bcf | ||
|
b74f81c905 | ||
|
7aacc75acd | ||
|
72d3b6cd8e | ||
|
e7a62d3f7d | ||
|
c13851adef | ||
|
a069abf63d | ||
|
01b179d7e1 | ||
|
1a28831d98 | ||
|
3532ba199b | ||
|
760a98a70b | ||
|
11d67dbb87 | ||
|
5013aac4c4 | ||
|
0fb418ef15 | ||
|
c3994f023d | ||
|
ee7ba4034b | ||
|
ae2d0e4359 | ||
|
19fbaa5c51 | ||
|
fd904b23d1 | ||
|
de7ddf5300 | ||
|
f2a7d0b2ea | ||
|
dc80998cc3 | ||
|
df4e082f93 | ||
|
5122177a00 | ||
|
66768a796b | ||
|
fcf7256b03 | ||
|
9375de8283 | ||
|
8af97e7ad8 | ||
|
5e8dfbd977 | ||
|
4c36a6ad25 | ||
|
7397168f01 | ||
|
efa98d3885 | ||
|
10c542a784 | ||
|
954dcd131a | ||
|
451718a6b8 | ||
|
1bcf7879d4 | ||
|
cf388ca0a4 | ||
|
7878a6fec3 | ||
|
eb7e80d35d | ||
|
8d9b37b9d5 | ||
|
3b3c385b02 | ||
|
16d8cc2d6b | ||
|
0825dd6c18 | ||
|
fac1e9328d | ||
|
91204db81a | ||
|
c2f5732611 | ||
|
f3c2efdebd | ||
|
44e5267940 | ||
|
8b17eefadf | ||
|
129ce9ba39 | ||
|
3af4f2a7e1 | ||
|
8b3ed987ec | ||
|
dd71f21784 | ||
|
23f03d6060 | ||
|
93c385ff2b | ||
|
ab60ca6506 | ||
|
1fe87515ab | ||
|
245c871d44 | ||
|
e9d63f2678 | ||
|
c75cbc5c63 | ||
|
a13a545725 | ||
|
80a832a2fd | ||
|
9450bf8290 | ||
|
8480f814fa | ||
|
9ffaedef17 | ||
|
87b236a57e | ||
|
62978dd7d8 | ||
|
c25a1dab67 | ||
|
f0f136ae02 | ||
|
470b7fa9d0 | ||
|
6c50351e27 | ||
|
bb54fecd39 | ||
|
5f171df203 | ||
|
0c6738fe89 | ||
|
9b2e7fda4e | ||
|
1f1076c8ae | ||
|
e1eb3623f5 | ||
|
f190b8ad8c | ||
|
93a98acafc | ||
|
a9f5eaa1fe | ||
|
a03d8d5eec | ||
|
0033abc78a | ||
|
cbb50cc6d4 | ||
|
aab2863a95 | ||
|
b820892ad7 | ||
|
2055b028de | ||
|
d714272723 | ||
|
4a742f53b7 | ||
|
6f1e8d11e2 | ||
|
a7ea686415 | ||
|
efde8d7cb4 | ||
|
c75095f888 | ||
|
72fe92d673 | ||
|
d577663b24 | ||
|
669c8380c8 | ||
|
76214a86c9 | ||
|
a880c8855f | ||
|
e4ced26bde | ||
|
2687585099 | ||
|
a3c629afb2 | ||
|
7a1d947495 | ||
|
a839c6c761 | ||
|
eb3155768a | ||
|
57137cb6fa | ||
|
1201654296 | ||
|
7f4e00dcbb | ||
|
f63627e336 | ||
|
c5decc0cd7 | ||
|
598ceaa0ff | ||
|
687a143e79 | ||
|
eec258be3a | ||
|
4edebfc9dd | ||
|
a1ca1e273d |
386 changed files with 40640 additions and 24015 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1 +0,0 @@
|
|||
termsofservice.txt eol=crlf
|
69
.github/workflows/codeql-analysis.yml
vendored
Normal file
69
.github/workflows/codeql-analysis.yml
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "develop" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master", "develop" ]
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['cpp']
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
################################################################################
|
||||
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
|
||||
################################################################################
|
||||
|
||||
/zlib
|
||||
/cmake/Modules
|
||||
/build
|
||||
/lua5.1
|
||||
/.vs
|
||||
/CMakeSettings.json
|
32
.travis.yml
32
.travis.yml
|
@ -1,20 +1,32 @@
|
|||
os: linux
|
||||
dist: focal
|
||||
arch: amd64
|
||||
|
||||
language: cpp
|
||||
compiler:
|
||||
- gcc
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
|
||||
language: cpp
|
||||
|
||||
os:
|
||||
- linux
|
||||
|
||||
before_install:
|
||||
- sudo apt-get update --fix-missing
|
||||
- sudo apt-get install build-essential zlib1g-dev libmysqlclient-dev liblua5.1-0-dev
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- zlib1g-dev
|
||||
- build-essential
|
||||
- libmysqlclient-dev
|
||||
- liblua5.1-0-dev
|
||||
|
||||
before_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
|
||||
script:
|
||||
- cmake -D WITH_MYSQL=true -D WITH_LUA=true ../
|
||||
|
||||
script:
|
||||
- make
|
||||
|
||||
after_script:
|
||||
- sudo make install
|
||||
- sudo make uninstall
|
||||
|
|
34
BUGS
34
BUGS
|
@ -1,34 +0,0 @@
|
|||
|
||||
You think you have found a bug ? Good, now read the list below and check if
|
||||
its already known. If you dont find it in the list then follow the bug report
|
||||
instructions.
|
||||
|
||||
Known Bugs:
|
||||
- tournament support has only first round and it doesnt show the map after
|
||||
25 minutes nor it stops the game after 30 minutes
|
||||
- there are some reported issues with PG/quickgame (network errors plus people
|
||||
getting lost game results when they shouldnt be, unfortunetly we havent been
|
||||
able to reproduce those)
|
||||
|
||||
Bug report instructions:
|
||||
- first read this webpage and only after you have read it come back:
|
||||
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
|
||||
- logon to forums.pvpgn.org (create an account if necesarry)
|
||||
- search the support forums (official support or open tech support) if your
|
||||
problem was already reported, if it was reported then just add some comments
|
||||
to the already opened forum thread if you feel its necesary
|
||||
- if you got a new/unknown problem, open a new thread in the open tech support
|
||||
forum
|
||||
- give a usefull title to the thread, not like "it doesnt work" or "pvpgn sucks"
|
||||
couse this messages will just get ignored; you need to describe your problem in
|
||||
the tile in few words like "client disconnects in profile view" or "players get
|
||||
loss in playgame disconnects" or something like that
|
||||
- in the body of the post start with first saying which pvpgn version, on which
|
||||
OS (operating system) you run pvpgn, configure command line you used if you
|
||||
compiled your source on Unix/Linux
|
||||
- after that describe in detail your problem; what exactly did you tried to do,
|
||||
what did you expected from PvPGN and what happened wrong; also try before
|
||||
reporting the problem to find a way to reproduce the problem, that is to find
|
||||
the steps which if someone from the PvPGN team will do then they will get the
|
||||
problem too, and describe exactly the reproduction steps
|
||||
- thank you for the bug report!
|
|
@ -1,9 +1,5 @@
|
|||
# Required cmake version
|
||||
cmake_minimum_required(VERSION 2.4.3)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
cmake_minimum_required(VERSION 3.1.0)
|
||||
|
||||
# Put the include dirs which are in the source or build tree
|
||||
# before all other include dirs, so the headers in the sources
|
||||
|
@ -11,57 +7,85 @@ endif(COMMAND cmake_policy)
|
|||
# since cmake 2.4.1
|
||||
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
||||
|
||||
project(pvpgn)
|
||||
project(pvpgn CXX)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
option(WITH_BNETD "compile the bnetd target" ON)
|
||||
option(WITH_D2CS "compile the d2cs target" ON)
|
||||
option(WITH_D2DBS "compile the d2dbs target" ON)
|
||||
option(WITH_ANSI "enforce strict ISO C++ conforming" ON)
|
||||
if(WIN32)
|
||||
option(WITH_WIN32_GUI "enable GUI building (default on)" ON)
|
||||
endif(WIN32)
|
||||
|
||||
option(WITH_LUA "enable Lua support" OFF)
|
||||
if(WIN32)
|
||||
option(WITH_WIN32_GUI "enable GUI building (default on)" ON)
|
||||
endif(WIN32)
|
||||
|
||||
#storage backends flags
|
||||
option(WITH_MYSQL "include MySQL user accounts support" OFF)
|
||||
option(WITH_SQLITE3 "include SQLite3 user accounts support" OFF)
|
||||
option(WITH_PGSQL "include PostgreSQL user accounts support" OFF)
|
||||
option(WITH_ODBC "include ODBC user accounts support" OFF)
|
||||
|
||||
|
||||
include(ConfigureChecks.cmake)
|
||||
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
# Determine GCC version.
|
||||
message("Determining GCC version.")
|
||||
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
|
||||
ARGS --version
|
||||
OUTPUT_VARIABLE _GCC_VERSION)
|
||||
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]) .*" "\\1\\2\\3"
|
||||
_GCC_VERSION ${_GCC_VERSION})
|
||||
message(" GCC version is ${_GCC_VERSION}")
|
||||
|
||||
# Add -Wno-longlong if the GCC version is < 4.0.0. Add -pedantic flag
|
||||
# but disable warnings for variadic macros with GCC >= 4.0.0. Earlier
|
||||
# versions warn because of anonymous variadic macros in pedantic mode
|
||||
# but do not have a flag to disable these warnings.
|
||||
if (400 GREATER _GCC_VERSION)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long")
|
||||
else (400 GREATER _GCC_VERSION)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-variadic-macros")
|
||||
endif (400 GREATER _GCC_VERSION)
|
||||
|
||||
# Pass CXX flags to flags.
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSEQAN_CXX_FLAGS_=\"${CMAKE_CXX_FLAGS}\"")
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# using Clang
|
||||
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-idiomatic-parentheses -pedantic")
|
||||
|
||||
subdirs(src conf man files)
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
# using G++
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
|
||||
message(FATAL_ERROR "G++ 5.1 or higher required")
|
||||
endif()
|
||||
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-variadic-macros" )
|
||||
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# using Visual Studio
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
|
||||
message(FATAL_ERROR "Visual Studio 2015 or higher required")
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_CRT_NONSTDC_NO_DEPRECATE
|
||||
-DUNICODE
|
||||
-D_UNICODE
|
||||
)
|
||||
|
||||
# DEBUG compiler flags:
|
||||
# /Zi create debugging information PDB file
|
||||
# /Od disable optimizations
|
||||
# /Oy- do not suppress frame pointers (recommended for debugging)
|
||||
# /MTd use statically linked, thread-safe, debug CRT libs (Magic Builder set this flag when build)
|
||||
#
|
||||
# RELEASE compiler flags:
|
||||
# /MT use statically linked, thread-safe CRT libs (Magic Builder set this flag when build)
|
||||
# /GS- no Buffer Security Check
|
||||
#
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Zi /Od /Oy-")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
|
||||
# Explaining of linker flags and why enable pdb with debug info for Release build is on:
|
||||
# https://www.wintellect.com/correctly-creating-native-c-release-build-pdbs
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
|
||||
endif()
|
||||
|
||||
add_subdirectory(conf)
|
||||
add_subdirectory(files)
|
||||
add_subdirectory(lib/fmt)
|
||||
add_subdirectory(man)
|
||||
add_subdirectory(src)
|
||||
if(WITH_LUA)
|
||||
add_subdirectory(lua)
|
||||
endif(WITH_LUA)
|
||||
|
||||
ENABLE_TESTING()
|
||||
enable_testing()
|
||||
|
||||
# uninstall target
|
||||
configure_file(
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
# put in this file everything that needs to be setup depending
|
||||
# on the target architecture
|
||||
|
||||
# our own modules
|
||||
set(CMAKE_MODULE_PATH
|
||||
${CMAKE_SOURCE_DIR}/cmake/Modules
|
||||
)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
|
||||
# include used modules
|
||||
include(DefineInstallationPaths)
|
||||
include(CheckIncludeFileCXX)
|
||||
include(CheckIncludeFilesCXX)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckTypeSizeCXX)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CheckMkdirArgs)
|
||||
include(CheckIncludeFiles)
|
||||
|
||||
# setup short variable path names
|
||||
set(BINDIR ${BIN_INSTALL_DIR})
|
||||
|
@ -35,12 +29,9 @@ else(WIN32)
|
|||
endif(WIN32)
|
||||
|
||||
# library checks
|
||||
find_package(ZLIB REQUIRED)
|
||||
check_library_exists(pcap pcap_open_offline "" HAVE_LIBPCAP)
|
||||
check_library_exists(nsl gethostbyname "" HAVE_LIBNSL)
|
||||
check_library_exists(socket socket "" HAVE_LIBSOCKET)
|
||||
check_library_exists(resolv inet_aton "" HAVE_LIBRESOLV)
|
||||
check_library_exists(bind __inet_aton "" HAVE_LIBBIND)
|
||||
if(WITH_BNETD)
|
||||
find_package(ZLIB REQUIRED)
|
||||
endif(WITH_BNETD)
|
||||
|
||||
if(WITH_LUA)
|
||||
find_package(Lua REQUIRED)
|
||||
|
@ -52,9 +43,6 @@ if(WITH_ODBC)
|
|||
endif(WITH_ODBC)
|
||||
if(WITH_MYSQL)
|
||||
find_package(MySQL REQUIRED)
|
||||
# disable strict ANSI checking when using MySQL headers
|
||||
# which contain invalid "long long" type
|
||||
set(WITH_ANSI OFF)
|
||||
endif(WITH_MYSQL)
|
||||
if(WITH_SQLITE3)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
|
@ -63,8 +51,12 @@ if(WITH_PGSQL)
|
|||
find_package(PostgreSQL REQUIRED)
|
||||
endif(WITH_PGSQL)
|
||||
|
||||
# if any of nsl or socket exists we need to make sure the following tests
|
||||
# use them otherwise some functions may not be found
|
||||
|
||||
check_library_exists(nsl gethostbyname "" HAVE_LIBNSL)
|
||||
check_library_exists(socket socket "" HAVE_LIBSOCKET)
|
||||
check_library_exists(resolv inet_aton "" HAVE_LIBRESOLV)
|
||||
check_library_exists(bind __inet_aton "" HAVE_LIBBIND)
|
||||
|
||||
if(HAVE_LIBNSL)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} nsl)
|
||||
SET(NETWORK_LIBRARIES ${NETWORK_LIBRARIES} nsl)
|
||||
|
@ -83,123 +75,103 @@ if(HAVE_LIBBIND)
|
|||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} bind)
|
||||
SET(NETWORK_LIBRARIES ${NETWORK_LIBRARIES} bind)
|
||||
endif(HAVE_LIBBIND)
|
||||
|
||||
# for win32 unconditionally add network library linking to "ws2_32"
|
||||
if(WIN32)
|
||||
SET(NETWORK_LIBRARIES ${NETWORK_LIBRARIES} ws2_32)
|
||||
endif(WIN32)
|
||||
|
||||
check_include_files_cxx("cassert;cctype;cerrno;cmath;climits;csignal;cstdarg;cstddef;cstdio;cstdlib;cstring;ctime;deque;exception;fstream;iomanip;iostream;limits;list;map;memory;sstream;stdexcept;string;utility;vector" HAVE_STD_HEADERS)
|
||||
if(NOT HAVE_STD_HEADERS)
|
||||
MESSAGE(FATAL_ERROR "Standard C90/C++98 header missing, you need a fully standard compliant compiler/enviroment.")
|
||||
endif(NOT HAVE_STD_HEADERS)
|
||||
|
||||
check_include_file_cxx(fcntl.h HAVE_FCNTL_H)
|
||||
check_include_file_cxx(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file_cxx(sys/select.h HAVE_SYS_SELECT_H)
|
||||
check_include_file_cxx(unistd.h HAVE_UNISTD_H)
|
||||
check_include_file_cxx(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_file_cxx(sys/timeb.h HAVE_SYS_TIMEB_H)
|
||||
check_include_file_cxx(sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
check_include_file_cxx(sys/param.h HAVE_SYS_PARAM_H)
|
||||
check_include_file_cxx(netinet/in.h HAVE_NETINET_IN_H)
|
||||
message(STATUS "Checking POSIX headers")
|
||||
check_include_file_cxx(arpa/inet.h HAVE_ARPA_INET_H)
|
||||
check_include_file_cxx(netdb.h HAVE_NETDB_H)
|
||||
check_include_file_cxx(termios.h HAVE_TERMIOS_H)
|
||||
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file_cxx(sys/wait.h HAVE_SYS_WAIT_H)
|
||||
check_include_file_cxx(sys/ioctl.h HAVE_SYS_IOCTL_H)
|
||||
check_include_file_cxx(stdint.h HAVE_STDINT_H)
|
||||
check_include_file_cxx(sys/file.h HAVE_SYS_FILE_H)
|
||||
check_include_file_cxx(poll.h HAVE_POLL_H)
|
||||
check_include_file_cxx(sys/poll.h HAVE_SYS_POLL_H)
|
||||
check_include_file_cxx(sys/stropts.h HAVE_SYS_STROPTS_H)
|
||||
check_include_file_cxx(sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_file_cxx(pwd.h HAVE_PWD_H)
|
||||
check_include_file_cxx(grp.h HAVE_GRP_H)
|
||||
check_include_file_cxx(dir.h HAVE_DIR_H)
|
||||
check_include_file_cxx(dirent.h HAVE_DIRENT_H)
|
||||
check_include_file_cxx(ndir.h HAVE_NDIR_H)
|
||||
check_include_file_cxx(sys/ndir.h HAVE_SYS_NDIR_H)
|
||||
check_include_file_cxx(sys/dir.h HAVE_SYS_DIR_H)
|
||||
check_include_file_cxx(direct.h HAVE_DIRECT_H)
|
||||
check_include_file_cxx(grp.h HAVE_GRP_H)
|
||||
check_include_file_cxx(fcntl.h HAVE_FCNTL_H)
|
||||
check_include_file_cxx(netdb.h HAVE_NETDB_H)
|
||||
check_include_file_cxx(netinet/in.h HAVE_NETINET_IN_H)
|
||||
check_include_file_cxx(poll.h HAVE_POLL_H)
|
||||
check_include_file_cxx(pwd.h HAVE_PWD_H)
|
||||
check_include_file_cxx(sys/mman.h HAVE_SYS_MMAN_H)
|
||||
check_include_files_cxx("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
|
||||
check_include_file_cxx(sys/epoll.h HAVE_SYS_EPOLL_H)
|
||||
check_include_file_cxx(sys/resource.h HAVE_SYS_RESOURCE_H)
|
||||
check_include_file_cxx(pcap.h HAVE_PCAP_H)
|
||||
check_include_file_cxx(sys/select.h HAVE_SYS_SELECT_H)
|
||||
check_include_file_cxx(sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
check_include_file_cxx(sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_file_cxx(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file_cxx(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_file_cxx(sys/wait.h HAVE_SYS_WAIT_H)
|
||||
check_include_file_cxx(termios.h HAVE_TERMIOS_H)
|
||||
check_include_file_cxx(unistd.h HAVE_UNISTD_H)
|
||||
|
||||
message(STATUS "Checking optional POSIX/required SUS headers")
|
||||
check_include_file_cxx(sys/timeb.h HAVE_SYS_TIMEB_H)
|
||||
|
||||
message(STATUS "Checking FreeBSD-based headers")
|
||||
check_include_file_cxx(sys/event.h HAVE_SYS_EVENT_H)
|
||||
check_include_file_cxx(sys/param.h HAVE_SYS_PARAM_H)
|
||||
|
||||
message(STATUS "Checking BSD headers")
|
||||
check_include_file_cxx(sys/file.h HAVE_SYS_FILE_H)
|
||||
|
||||
message(STATUS "Checking Linux headers")
|
||||
check_include_file_cxx(sys/epoll.h HAVE_SYS_EPOLL_H)
|
||||
|
||||
message(STATUS "Checking Win32 headers")
|
||||
check_include_file_cxx(windows.h HAVE_WINDOWS_H)
|
||||
check_include_file_cxx(winsock2.h HAVE_WINSOCK2_H)
|
||||
check_include_file_cxx(ws2tcpip.h HAVE_WS2TCPIP_H)
|
||||
check_include_file_cxx(process.h HAVE_PROCESS_H)
|
||||
|
||||
check_type_size_cxx("unsigned char" SIZEOF_UNSIGNED_CHAR)
|
||||
check_type_size_cxx("unsigned short" SIZEOF_UNSIGNED_SHORT)
|
||||
check_type_size_cxx("unsigned int" SIZEOF_UNSIGNED_INT)
|
||||
check_type_size_cxx("unsigned long" SIZEOF_UNSIGNED_LONG)
|
||||
check_type_size_cxx("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
|
||||
check_type_size_cxx("signed char" SIZEOF_SIGNED_CHAR)
|
||||
check_type_size_cxx("signed short" SIZEOF_SIGNED_SHORT)
|
||||
check_type_size_cxx("signed int" SIZEOF_SIGNED_INT)
|
||||
check_type_size_cxx("signed long" SIZEOF_SIGNED_LONG)
|
||||
check_type_size_cxx("signed long long" SIZEOF_SIGNED_LONG_LONG)
|
||||
message(STATUS "Checking other headers")
|
||||
check_include_file_cxx(dir.h HAVE_DIR_H)
|
||||
check_include_file_cxx(direct.h HAVE_DIRECT_H)
|
||||
check_include_file_cxx(ndir.h HAVE_NDIR_H)
|
||||
check_include_file_cxx(sys/dir.h HAVE_SYS_DIR_H)
|
||||
check_include_file_cxx(sys/ndir.h HAVE_SYS_NDIR_H)
|
||||
check_include_file_cxx(sys/poll.h HAVE_SYS_POLL_H)
|
||||
|
||||
check_function_exists(mmap HAVE_MMAP)
|
||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
check_function_exists(strdup HAVE_STRDUP)
|
||||
check_function_exists(strtoul HAVE_STRTOUL)
|
||||
check_function_exists(uname HAVE_UNAME)
|
||||
check_function_exists(uname HAVE_UNAME)
|
||||
check_function_exists(fork HAVE_FORK)
|
||||
check_function_exists(getpid HAVE_GETPID)
|
||||
check_function_exists(sigaction HAVE_SIGACTION)
|
||||
check_function_exists(sigprocmask HAVE_SIGPROCMASK)
|
||||
check_function_exists(sigaddset HAVE_SIGADDSET)
|
||||
check_function_exists(setpgid HAVE_SETPGID)
|
||||
check_function_exists(ftime HAVE_FTIME)
|
||||
check_function_exists(strcasecmp HAVE_STRCASECMP)
|
||||
check_function_exists(strncasecmp HAVE_STRNCASECMP)
|
||||
check_function_exists(stricmp HAVE_STRICMP)
|
||||
check_function_exists(strnicmp HAVE_STRNICMP)
|
||||
check_function_exists(chdir HAVE_CHDIR)
|
||||
check_function_exists(difftime HAVE_DIFFTIME)
|
||||
check_function_exists(strchr HAVE_STRCHR)
|
||||
check_function_exists(strrchr HAVE_STRRCHR)
|
||||
check_function_exists(index HAVE_INDEX)
|
||||
check_function_exists(rindex HAVE_RINDEX)
|
||||
check_function_exists(epoll_create HAVE_EPOLL_CREATE)
|
||||
check_function_exists(fork HAVE_FORK)
|
||||
check_function_exists(ftime HAVE_FTIME)
|
||||
check_function_exists(getgid HAVE_GETGID)
|
||||
check_function_exists(getgrnam HAVE_GETGRNAM)
|
||||
check_function_exists(getlogin HAVE_GETLOGIN)
|
||||
check_function_exists(getopt HAVE_GETOPT)
|
||||
check_function_exists(getpid HAVE_GETPID)
|
||||
check_function_exists(getpwnam HAVE_GETPWNAME)
|
||||
check_function_exists(getrlimit HAVE_GETRLIMIT)
|
||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
check_function_exists(getuid HAVE_GETUID)
|
||||
check_function_exists(ioctl HAVE_IOCTL)
|
||||
check_function_exists(kqueue HAVE_KQUEUE)
|
||||
check_function_exists(_mkdir HAVE__MKDIR)
|
||||
check_function_exists(mkdir HAVE_MKDIR)
|
||||
check_function_exists(mmap HAVE_MMAP)
|
||||
check_function_exists(pipe HAVE_PIPE)
|
||||
check_function_exists(poll HAVE_POLL)
|
||||
check_function_exists(setitimer HAVE_SETITIMER)
|
||||
check_function_exists(setpgid HAVE_SETPGID)
|
||||
check_function_exists(setpgrp HAVE_SETPGRP)
|
||||
check_function_exists(setsid HAVE_SETSID)
|
||||
check_function_exists(setuid HAVE_SETUID)
|
||||
check_function_exists(sigaction HAVE_SIGACTION)
|
||||
check_function_exists(sigaddset HAVE_SIGADDSET)
|
||||
check_function_exists(sigprocmask HAVE_SIGPROCMASK)
|
||||
check_function_exists(strcasecmp HAVE_STRCASECMP)
|
||||
check_function_exists(strdup HAVE_STRDUP)
|
||||
check_function_exists(stricmp HAVE_STRICMP)
|
||||
check_function_exists(strncasecmp HAVE_STRNCASECMP)
|
||||
check_function_exists(strnicmp HAVE_STRNICMP)
|
||||
check_function_exists(strsep HAVE_STRSEP)
|
||||
check_function_exists(uname HAVE_UNAME)
|
||||
check_function_exists(wait HAVE_WAIT)
|
||||
check_function_exists(waitpid HAVE_WAITPID)
|
||||
check_function_exists(pipe HAVE_PIPE)
|
||||
check_function_exists(getenv HAVE_GETENV)
|
||||
check_function_exists(ioctl HAVE_IOCTL)
|
||||
check_function_exists(setsid HAVE_SETSID)
|
||||
check_function_exists(poll HAVE_POLL)
|
||||
check_function_exists(getlogin HAVE_GETLOGIN)
|
||||
check_function_exists(getpwnam HAVE_GETPWNAME)
|
||||
check_function_exists(getgrnam HAVE_GETGRNAM)
|
||||
check_function_exists(getuid HAVE_GETUID)
|
||||
check_function_exists(getgid HAVE_GETGID)
|
||||
check_function_exists(setuid HAVE_SETUID)
|
||||
check_function_exists(mkdir HAVE_MKDIR)
|
||||
check_function_exists(_mkdir HAVE__MKDIR)
|
||||
check_function_exists(strsep HAVE_STRSEP)
|
||||
check_function_exists(getopt HAVE_GETOPT)
|
||||
check_function_exists(kqueue HAVE_KQUEUE)
|
||||
check_function_exists(setitimer HAVE_SETITIMER)
|
||||
check_function_exists(epoll_create HAVE_EPOLL_CREATE)
|
||||
check_function_exists(getrlimit HAVE_GETRLIMIT)
|
||||
check_function_exists(vsnprintf HAVE_VSNPRINTF)
|
||||
check_function_exists(_vsnprintf HAVE__VSNPRINTF)
|
||||
check_function_exists(snprintf HAVE_SNPRINTF)
|
||||
check_function_exists(_snprintf HAVE__SNPRINTF)
|
||||
check_function_exists(setpgrp HAVE_SETPGRP)
|
||||
check_function_exists(inet_aton HAVE_INET_ATON)
|
||||
|
||||
# winsock2.h and ws2_32 should provide these
|
||||
|
||||
if(HAVE_WINSOCK2_H)
|
||||
set(HAVE_GETHOSTNAME ON)
|
||||
set(HAVE_SELECT ON)
|
||||
set(HAVE_SOCKET ON)
|
||||
set(HAVE_INET_NTOA ON)
|
||||
set(HAVE_RECV ON)
|
||||
set(HAVE_SEND ON)
|
||||
set(HAVE_RECVFROM ON)
|
||||
|
@ -210,7 +182,6 @@ else(HAVE_WINSOCK2_H)
|
|||
check_function_exists(gethostname HAVE_GETHOSTNAME)
|
||||
check_function_exists(select HAVE_SELECT)
|
||||
check_function_exists(socket HAVE_SOCKET)
|
||||
check_function_exists(inet_ntoa HAVE_INET_NTOA)
|
||||
check_function_exists(recv HAVE_RECV)
|
||||
check_function_exists(send HAVE_SEND)
|
||||
check_function_exists(recvfrom HAVE_RECVFROM)
|
||||
|
@ -221,21 +192,4 @@ endif(HAVE_WINSOCK2_H)
|
|||
|
||||
check_mkdir_args(MKDIR_TAKES_ONE_ARG)
|
||||
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
#check_cxx_compiler_flag("-Wall" WITH_FLAG_WALL)
|
||||
|
||||
if(WITH_ANSI)
|
||||
# on MINGW non-standard library features are conditioned on __STRICT_ANSI__ not being defined
|
||||
# (which is stupid since a program using specific system functions can still be standard
|
||||
# conformant, -ansi doesn't mean to not use non ANSI features it just means to respect
|
||||
# the standard text)
|
||||
if(NOT MINGW AND NOT MSVC)
|
||||
check_cxx_compiler_flag("-pedantic -ansi" WITH_FLAG_ANSIPEDANTIC)
|
||||
endif(NOT MINGW AND NOT MSVC)
|
||||
endif(WITH_ANSI)
|
||||
|
||||
# new VS.Net deprecates with warnings most of ISO C functions without this
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif(MSVC)
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
71
IGNOREME
71
IGNOREME
|
@ -1,71 +0,0 @@
|
|||
NOTE: we believe that most people are more likely to read IGNOREME file than
|
||||
the README file so we moved the actual contents of README into this file. We
|
||||
hope that this will improve the quality of questions on support channels.
|
||||
|
||||
>>>>> IMPORTANT: THIS IS A BETA QUALITY RELEASE <<<<<<
|
||||
|
||||
Readme for Player vs. Player Gaming Network
|
||||
---------------------------------------------
|
||||
|
||||
PvPGN is a BNETD mod which aims to provide support for all Blizzard
|
||||
clients (thus it supports all BNETD supported clients plus the most recent
|
||||
ones).
|
||||
|
||||
The list of supported clients and their minimum verion required is:
|
||||
|
||||
Battle.net games:
|
||||
------------------------
|
||||
- Diablo 1 v1.09
|
||||
- Starcraft v1.08
|
||||
- BroodWar v1.08
|
||||
- Warcraft II Battle.Net Edition v2.02
|
||||
- Diablo 2 v1.10
|
||||
- Diablo 2 LOD v1.10
|
||||
- Warcraft III Reign Of Chaos v1.13
|
||||
- Warcraft III Frozen Throne v1.13
|
||||
|
||||
Westwood Online games:
|
||||
----------------------
|
||||
- Westwood Chat client v4.221
|
||||
- Command & Conquer Win95 v1.04a (under the Westwood Chat)
|
||||
- Red Alert Win95 v2.00 (under the Westwood Chat)
|
||||
- Red Alert Win95 v3.03
|
||||
- Dune 2000 v1.06
|
||||
- Tiberian Sun v2.03 ST-10
|
||||
- Tiberian Sun Firestorm v2.03 ST-10
|
||||
- Red Alert 2 v1.006
|
||||
- Yuri's Revenge v1.001
|
||||
- Nox v1.02b
|
||||
- Nox Quest v1.02b
|
||||
- Emperor: Battle for Dune v1.09
|
||||
- Renegade v1.037
|
||||
- Lands of Lore 3 (autoupdate only)
|
||||
|
||||
-----
|
||||
|
||||
The documentation is located in the docs directory. Please read docs/INDEX
|
||||
for a list of files and what they contain.
|
||||
If you are updating from a previous PvPGN version check the file UPDATE
|
||||
first.
|
||||
|
||||
|
||||
-----
|
||||
|
||||
We're always looking for coders (C++ coders) or
|
||||
anyone who can contribute to our project in any way.
|
||||
|
||||
Project homepages/distribution sites:
|
||||
- project home and main distribution site: http://pvpgn.berlios.de
|
||||
- alternate project home: http://www.pvpgn.org
|
||||
|
||||
Support channels:
|
||||
|
||||
1. BugTracker (preffered support method):
|
||||
http://developer.berlios.de/bugs/?group_id=2291
|
||||
|
||||
2. Mailing List: pvpgn-users@lists.berlios.de ( to subscribe go here
|
||||
https://lists.berlios.de/mailman/listinfo/pvpgn-users )
|
||||
|
||||
3. Forums: http://forums.pvpgn.org
|
||||
|
||||
4. IRC live support: #pvpgn on irc.pvpgn.org
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
ALPHA releases ONLY README
|
||||
|
||||
|
||||
This release is only intended for profesionals and PvPGN team members. This
|
||||
release has not beeing had any testing (it may not even compile). You are on
|
||||
your own with this release.
|
|
@ -339,6 +339,11 @@ valgrind cannot find (yes, valgrind is superb but there is a class of bugs,
|
|||
especially overflows which valgrind can't help you with) you should then try
|
||||
the next debugging tool.
|
||||
|
||||
2. Deleaker (http://deleaker.com)
|
||||
|
||||
For developers on Windows and uses Visual Studio, Deleaker is an extension for Visual Studio that helps you detect and localize resource leaks in memory, GDI and USER objects, handles. It integrates into Visual Studio's debugging functionality and displays useful information to trace leaks back to their source code.
|
||||
Deleaker also comes with a standalone program for developers using other compilers.
|
||||
|
||||
Appendix C. How to generate and use "core" files
|
||||
=================================================
|
||||
|
||||
|
|
122
README.cmake
122
README.cmake
|
@ -1,122 +0,0 @@
|
|||
PvPGN CMake Build Instructions
|
||||
===================================
|
||||
|
||||
|
||||
|
||||
0. Getting "cmake"
|
||||
|
||||
Before anything you need to make sure you have a cmake (at least version
|
||||
2.4.3) installed on the system you wish to compile PvPGN. On Linux/*BSD systems
|
||||
this sould probably be provided by your package system one way or another or
|
||||
you could try to build cmake from source. Follow the "Readme.txt" from cmake
|
||||
sources if you are going over that path.
|
||||
|
||||
Another source of "cmake" may be the binary packages provided by the
|
||||
cmake people on www.cmake.org. This is usually the way to get it on
|
||||
Windows or exotic Unices. For BeOS you could get it from bebits.com.
|
||||
|
||||
Please note that "cmake" is not a build system by itself but rather a
|
||||
"meta" build system. Parsing the cmake input files, cmake will generate
|
||||
the build system files to use with your build system (which may be a
|
||||
classic Unix style "make" or an IDE such as Visual Studio). cmake calls
|
||||
the part of it that generates the project files a "generator" (and is
|
||||
configurable).
|
||||
|
||||
|
||||
1. Running "cmake"
|
||||
|
||||
Now that you have cmake (and also you have the pvpgn sources with the
|
||||
cmake support) you should try to run cmake to generate the project files
|
||||
(or makefiles, depending on your generator used with cmake). It is
|
||||
recommended that you do an "out of source" build, this means you should
|
||||
not try to build pvpgn inside the source directory but in a directory
|
||||
specially made for building pvpgn.
|
||||
|
||||
Note: the instructions generally follow how to use the cmake command
|
||||
line version which is more portable (available everywhere cmake is
|
||||
available). For using various cmake GUIs one has to find out himself how
|
||||
they work.
|
||||
|
||||
Create a build directory (preferably have it empty), change current
|
||||
directory there, run cmake as "cmake /path/to/pvpgn-src" where
|
||||
"/path/to/pvpgn-src" is obvioulsy the path to the pvpgn source
|
||||
directory. This will have cmake generate the type of project files that
|
||||
is default for your platform (which is "Unix Makefiles" on Unix/Linux
|
||||
systems or "Visual Studio Project files" on Windows) without any
|
||||
additional storage types (ie. no SQL support) and will install pvpgn on
|
||||
"make install" in the default location (which is "/usr/local" for Unix
|
||||
systems or "<System-Drive>:\\Program Files\\pvpgn" on Windows).
|
||||
|
||||
All these defaults are probably not what you wanted so cmake offers a
|
||||
way to customize this by command line flags setting variables or
|
||||
selecting the project files generator. Here are some useful options:
|
||||
|
||||
-G "Project Type" : tells cmake to use the "Project Type" project
|
||||
files generator; on Unix systems this is by default "Unix Makefiles" and
|
||||
on Windows "Visual Studio project files"; other useful values are
|
||||
"KDevelop3", "MinGW Makefiles" or "MSYS Makefiles" (the last 2 are
|
||||
obviously valid only on Windows)
|
||||
|
||||
-D CMAKE_INSTALL_PREFIX="/path/to" : it will tell cmake to set
|
||||
accordingly values so that on "make install" it will install relative to
|
||||
"/path/to"
|
||||
|
||||
-D WITH_MYSQL=true : it will tell cmake to check for MySQL
|
||||
headers/libraries and if present prepare project files able to compile
|
||||
PvPGN with MySQL
|
||||
|
||||
-D WITH_PGSQL=true or -D WITH_SQLITE3=true are similar to WITH_MYSQL
|
||||
but for PostgreSQL/SQLite3 storage support
|
||||
|
||||
-D CMAKE_BUILD_TYPE=Debug : build in debug mode (to get meaningfull
|
||||
stack traces)
|
||||
|
||||
WARNING: in between 2 cmake runs make sure you remove all build files
|
||||
or at least remove the CMakeCache.txt file otherwise you may experience
|
||||
strange problems.
|
||||
|
||||
2. Building PvPGN
|
||||
|
||||
After successfully running cmake you are ready to build pvpgn.
|
||||
Depending on your project files generator used with cmake you do this in
|
||||
various ways. Example: when using "Unix Makefiles" you should just issue
|
||||
"make" and it should build your pvpgn binaries. When using some IDE
|
||||
project file types such as KDevelop3 or Visual Studio you should run the
|
||||
"Build" command of that IDE.
|
||||
|
||||
3. Installing PvPGN
|
||||
|
||||
|
||||
Again, depending on the type of project files generator you used you
|
||||
can install pvpgn to the CMAKE_INSTALL_DIR prefixed location. When using
|
||||
the "Unix Makefiles" generator you can use "make install" to do so.
|
||||
|
||||
|
||||
4. Full examples usage
|
||||
|
||||
4.1 Using cmake on a Unix/Linux system installing pvpgn under "~pvpgn"
|
||||
with MySQL support
|
||||
|
||||
$ cd pvpgn-build
|
||||
$ cmake -D CMAKE_INSTALL_PREFIX=/home/pvpgn -D WITH_MYSQL ../pvpgn-src
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
4.2 Using cmake on a Windows (command line prompt) system with mingw32
|
||||
> cd pvpgn-build
|
||||
> cmake ..\pvpgn-src
|
||||
> mingw32-make
|
||||
> mingw32-make install
|
||||
|
||||
5. Problems
|
||||
|
||||
|
||||
cmake building in PvPGN is a young feature as such many issues may
|
||||
still arise. If you have problems with cmake please contact us at
|
||||
pvpgn-dev@berlios.de (after you subscribe to the mailing list at
|
||||
https://lists.berlios.de/mailman/listinfo/pvpgn-dev) or use the bug
|
||||
tracker at http://developer.berlios.de/bugs/?group_id=2291 .
|
||||
|
||||
When reporting problems please provide all information such as pvpgn
|
||||
version, your platform name/version, exactly what you tried to do (the
|
||||
commands used) and exactly the errors you get.
|
205
README.md
205
README.md
|
@ -1,68 +1,165 @@
|
|||
[![Build Status](https://travis-ci.org/HarpyWar/pvpgn.svg?branch=master)](https://travis-ci.org/HarpyWar/pvpgn) [![Build status](https://ci.appveyor.com/api/projects/status/dqoj9lkvhfwthmn6)](https://ci.appveyor.com/project/HarpyWar/pvpgn)
|
||||
Player versus Player Gaming Network
|
||||
Player vs Player Gaming Network - PRO
|
||||
=====
|
||||
![](http://harpywar.com/images/items/pvpgn.gif)
|
||||
![](http://i.imgur.com/LfI3hXo.png)
|
||||
|
||||
Original PvPGN 1.99 source code with tweaks.
|
||||
PvPGN is a free and open source cross-platform server software that supports Battle.net and and Westwood Online game clients. PvPGN-PRO is a fork of the official PvPGN project, whose development stopped in 2011, and aims to provide continued maintenance and additional features for PvPGN.
|
||||
|
||||
[![License (GPL version 2)](https://img.shields.io/badge/license-GNU%20GPL%20version%202-blue.svg?style=flat-square)](http://opensource.org/licenses/GPL-2.0)
|
||||
![Language (C++)](https://img.shields.io/badge/powered_by-C++-brightgreen.svg?style=flat-square)
|
||||
[![Language (Lua)](https://img.shields.io/badge/powered_by-Lua-red.svg?style=flat-square)](https://lua.org)
|
||||
[![Github Releases (by Release)](https://img.shields.io/github/downloads/pvpgn/pvpgn-server/1.99.7.2.1/total.svg?maxAge=2592000)]()
|
||||
|
||||
Source Code changes
|
||||
--
|
||||
* Lua scripting support (WITH_LUA cmake directive)
|
||||
* Add display custom icons depends on a user rating, custom output for command `/stats`; works with Warcraft and Starcraft (see [icons.conf](https://github.com/HarpyWar/pvpgn/blob/master/conf/icons.conf.in)) <sup>commits [1](https://github.com/HarpyWar/pvpgn/commit/c11af352603e18acc52102ba8574776425248331), [2](https://github.com/HarpyWar/pvpgn/commit/368c4b9296d18a515af746b65fe69054ab6f4236), [3](https://github.com/HarpyWar/pvpgn/commit/f1a96c392055a777b48dc4d77631c5e906161e28)</sup>
|
||||
* fix command send flooding <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/74f9e4faafe24699597e4be5bfda83bf255ba72e)</sup>
|
||||
* fix compile error when pointer size is larger than int <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/1ea116434ce009bad4903ff72bd69bbb8987ce06)</sup>
|
||||
* fix Warcraft 3 ICON SWITCH hack <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/84811bcfe875d6c42cd8271bbdae757f0b5d445b)</sup>
|
||||
* fix saving sql fields with custom characters in the name <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/18713ffe35cbe9a12193e5c1f1caf5031d4c4731)</sup>
|
||||
* add game id field in status.xml output <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/b989d26e1182a3ee8cf62f3ee79dfb231fd66e23)</sup>
|
||||
* add game id field and user game version in status.dat output (the same as status.xml) <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/39d0b2be71c7ddd808a20f97fe6ac17078ce013f)</sup>
|
||||
* welcome text for Warcraft 3 is moved from the code into a new file `bnmotd_w3.txt` ([example](http://img21.imageshack.us/img21/1808/j2py.png) with colored text is included)
|
||||
<sup>[commit](https://github.com/HarpyWar/pvpgn/commit/ff8ca941cd7942bab201607fbc31382837a35617)</sup>
|
||||
* Feature to use d2s character as a template for a new character in newbie.save; each character class can have it's own template <sup>[issue](https://github.com/HarpyWar/pvpgn/issues/20)</sup>
|
||||
[![Compiler (Microsoft Visual C++)](https://img.shields.io/badge/compiled_with-Microsoft%20Visual%20C++-yellow.svg?style=flat-square)](https://msdn.microsoft.com/en-us/vstudio/hh386302.aspx)
|
||||
[![Compiler (LLVM/Clang)](https://img.shields.io/badge/compiled_with-LLVM/Clang-lightgrey.svg?style=flat-square)](http://clang.llvm.org/)
|
||||
[![Compiler (GCC)](https://img.shields.io/badge/compiled_with-GCC-yellowgreen.svg?style=flat-square)](https://gcc.gnu.org/)
|
||||
|
||||
|
||||
New commands
|
||||
--
|
||||
* `/save` immediately save changes of accounts and clans from the cache to a storage (useful for testing) <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/be8d65d16f910b2090b0db9e7eb2c043b816dae7)</sup>
|
||||
* `/icon <add|del|list>` icon stash implementation - each user has it's own stash with icons, admin/operator can add icon to user's stash, you can set aliases for icons in config; works with Warcraft and Starcraft <sup>commits [1](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7), [2](https://github.com/HarpyWar/pvpgn/commit/36deb1179bca931bd6585c2b6dbf7d8ade08bc8e)</sup>
|
||||
* `/find <substr of username>` search account by part of the name - [patch #1526](http://developer.berlios.de/patch/?func=detailpatch&patch_id=1526&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/c229c6693b3dd55f02fe3a81403870044c0786b2)</sup>
|
||||
* `/quiz` Trivia Quiz Game (implemented in Lua) <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/ee04fdd23dfef90f0b852a6e90df23c7f5edc08e)</sup>
|
||||
[![Build Status](https://travis-ci.org/pvpgn/pvpgn-server.svg?branch=master)](https://travis-ci.org/pvpgn/pvpgn-server)
|
||||
[![Build status](https://ci.appveyor.com/api/projects/status/dqoj9lkvhfwthmn6)](https://ci.appveyor.com/project/HarpyWar/pvpgn)
|
||||
|
||||
Modified commands
|
||||
--
|
||||
* `/set` exclusion to get/set a password hash and user id; feature to empty key with "null" value; more info in output of the command and examples <sup>commits [1](https://github.com/HarpyWar/pvpgn/commit/d96e1029478d92f67000761983e83ccfde2abbdf), [2](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7#diff-ef576b6b7e90128c3718523eaaf1b894R4716)</sup>
|
||||
* `/finger` more info in the command output - [patch #2859](http://developer.berlios.de/patch/?func=detailpatch&patch_id=2859&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/bdb450084704da1f33e28c9edd3d2d16b720a946)</sup>
|
||||
* `/games lobby` show games in lobby only - [patch #3235](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3235&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/5d27cece2c24b5fe779f1560162a31442bf02617)</sup>
|
||||
* `/friends online` show online friends only - [patch #3236](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3236&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/8762667276b535d3385d51941d41d780089a7049)</sup>
|
||||
* `/topic` feature to set text on a new line <sup>[issue](https://github.com/HarpyWar/pvpgn/issues/6)</sup>
|
||||
* `/alert <message>` like /announce but message box shows instead of a text <sup>[issue](https://github.com/HarpyWar/pvpgn/issues/15)</sup>
|
||||
* `/rehash <mode>` feature to rehash configs separately <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/ee04fdd23dfef90f0b852a6e90df23c7f5edc08e)</sup>
|
||||
[Deleaker](http://www.deleaker.com/) helps us find memory leaks.
|
||||
|
||||
## Tracking
|
||||
By default, tracking is enabled and is only used for the purpose of sending informational data (e.g. server description, homepage, uptime, amount of users) to tracking servers. To disable tracking, set ````track = 0```` in ````conf/bnetd.conf````.
|
||||
|
||||
Minor changes
|
||||
--
|
||||
* add original MOTD files with UTF-8 encoding
|
||||
* add support files v1.2, there are no need to download it separately after install
|
||||
* add ODBC support for CMake
|
||||
* add latest versioncheck.conf
|
||||
* skip_versioncheck, allow_bad_version are enabled by default in bnetd.conf - for easy start
|
||||
* source code is formatted for better reading
|
||||
* unused files are removed, only pvpgn source here
|
||||
* unknown udp packets are logged with enabled debug mode only (it always chokes a log file before) <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/c39f9f03159b2edc8d2457d8134d84486378f9b1)
|
||||
* add a file location for all the text files like MOTD (often a server admin doesn't know where a file is located)
|
||||
* add option ignore-version for programs **bnchat** and **bnstat** - [patch #3184](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3184&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/a1fb914c30d9d69d062e8f698f7d0e9bacf41367)
|
||||
* help for all commands is displayed from bnhelp.conf and format changed for better reading, updated more help messages <sup>[issue](https://github.com/HarpyWar/pvpgn/issues/5)</sup>
|
||||
* fix error in log when user sends a message with text length of 255 symbols <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/af2baccdb8a2b624627caa94eac5595ac8f76e07)</sup>
|
||||
* update default tracker servers in config, track is enabled by default <sup>issues [1](https://github.com/HarpyWar/pvpgn/issues/7), [2](https://github.com/HarpyWar/pvpgn/issues/18)</sup>
|
||||
## Supported Clients
|
||||
- **WarCraft 2: Battle.net Edition**: 2.02a, 2.02b
|
||||
- **WarCraft 3: Reign of Chaos**\*: 1.13a, 1.13b, 1.14a, 1.14b, 1.15a, 1.16a, 1.17a, 1.18a, 1.19a, 1.19b, 1.20a, 1.20b, 1.20c, 1.20d, 1.20e, 1.21a, 1.21b, 1.22a, 1.23a, 1.24a, 1.24b, 1.24c, 1.24d, 1.24e, 1.25b, 1.26a, 1.27a, 1.27b, 1.28, 1.28.1, 1.28.2, 1.28.4, 1.28.5
|
||||
- **WarCraft 3: The Frozen Throne**\*: 1.13a, 1.13b, 1.14a, 1.14b, 1.15a, 1.16a, 1.17a, 1.18a, 1.19a, 1.19b, 1.20a, 1.20b, 1.20c, 1.20d, 1.20e, 1.21a, 1.21b, 1.22a, 1.23a, 1.24a, 1.24b, 1.24c, 1.24d, 1.24e, 1.25b, 1.26a, 1.27a, 1.27b, 1.28, 1.28.1, 1.28.2, 1.28.4, 1.28.5
|
||||
- **StarCraft**: 1.08, 1.08b, 1.09, 1.09b, 1.10, 1.11, 1.11b, 1.12, 1.12b, 1.13, 1.13b, 1.13c, 1.13d, 1.13e, 1.13f, 1.14, 1.15, 1.15.1, 1.15.2, 1.15.3, 1.16, 1.16.1, 1.17.0, 1.18.0
|
||||
- **StarCraft: Brood War**: 1.08, 1.08b, 1.09, 1.09b, 1.10, 1.11, 1.11b, 1.12, 1.12b, 1.13, 1.13b, 1.13c, 1.13d, 1.13e, 1.13f, 1.14, 1.15, 1.15.1, 1.15.2, 1.15.3, 1.16, 1.16.1, 1.17.0, 1.18.0
|
||||
- **Diablo**: 1.09, 1.09b
|
||||
- **Diablo 2**: 1.10, 1.11, 1.11b, 1.12a, 1.13c, 1.14a, 1.14b, 1.14c, 1.14d
|
||||
- **Diablo 2: Lord of Destruction**: 1.10, 1.11, 1.11b, 1.12a, 1.13c, 1.14a, 1.14b, 1.14c, 1.14d
|
||||
- **Westwood Chat Client**: 4.221
|
||||
- **Command & Conquer**: Win95 1.04a (using Westwood Chat)
|
||||
- **Command & Conquer: Red Alert**: Win95 2.00 (using Westwood Chat), Win95 3.03
|
||||
- **Command & Conquer: Red Alert 2**: 1.006
|
||||
- **Command & Conquer: Tiberian Sun**: 2.03 ST-10
|
||||
- **Command & Conquer: Tiberian Sun Firestorm**: 2.03 ST-10
|
||||
- **Command & Conquer: Yuri's Revenge**: 1.001
|
||||
- **Command & Conquer: Renegade**: 1.037
|
||||
- **Nox**: 1.02b
|
||||
- **Nox Quest**: 1.02b
|
||||
- **Dune 2000**: 1.06
|
||||
- **Emperor: Battle for Dune**: 1.09
|
||||
|
||||
\* WarCraft 3 clients are unable to connect to PvPGN servers without a client-side modification, through tools such as [W3L](https://github.com/w3lh/w3l), to disable server signature verification.
|
||||
\* StarCraft clients beginning with patch 1.18 will not be supported by PvPGN-PRO due to protocol changes. A 1.18.0 versioncheck entry is included for compatibility with bot software.
|
||||
|
||||
Build source code
|
||||
--
|
||||
## Support
|
||||
[Create an issue](https://github.com/pvpgn/pvpgn-server/issues) if you have any questions, suggestions, or anything else to say about PvPGN-PRO. Please note that D2GS is not part of the PvPGN project and is therefore unsupported here.
|
||||
Set `loglevels = fatal,error,warn,info,debug,trace` in `bnetd.conf` before obtaining logs and posting them.
|
||||
|
||||
## Development
|
||||
Submit pull requests to contribute to this project. Utilize C++11 features and adhere to the [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md) whenever possible.
|
||||
|
||||
## Building
|
||||
See [docs/ports.md](https://github.com/pvpgn/pvpgn-server/blob/master/docs/ports.md) for operating systems and compilers that have been confirmed to work with PvPGN. Any operating system that supports WinAPI or POSIX, and any C++11 compliant compiler should be able to build PvPGN. The CMake files have been hardcoded to reject compilers older than Visual Studio 2015 and GCC 5.1.
|
||||
|
||||
#### Windows
|
||||
Use [Magic Builder](https://github.com/HarpyWar/pvpgn-magic-builder).
|
||||
Use [Magic Builder](https://github.com/pvpgn/pvpgn-magic-builder).
|
||||
|
||||
#### Linux
|
||||
[Русский](http://harpywar.com/?a=articles&b=2&c=1&d=74) | [English](http://harpywar.com/?a=articles&b=2&c=1&d=74&lang=en)
|
||||
Alternatively, use cmake to generate the .sln project and build it from Visual Studio.
|
||||
```
|
||||
cmake -g "Visual Studio 14 2015" -H./ -B./build
|
||||
```
|
||||
This will generate .sln in `build` directory.
|
||||
|
||||
[![Vimeo](http://habrastorage.org/storage3/48c/5a9/4b1/48c5a94b1173242e311f8376be80a585.png)](https://vimeo.com/83763862)
|
||||
#### Linux in general
|
||||
Do not blindly run these commands. The main problem with older distributions is installing CMake 3.2.x and GCC 5, so external repositories are used in the examples.
|
||||
|
||||
```
|
||||
apt-get install git install cmake make build-essential zlib1g-dev
|
||||
apt-get install liblua5.1-0-dev #Lua support
|
||||
apt-get install mysql-server mysql-client libmysqlclient-dev #MySQL support
|
||||
cd /home
|
||||
git clone https://github.com/pvpgn/pvpgn-server.git
|
||||
cmake -D CMAKE_INSTALL_PREFIX=/usr/local/pvpgn -D WITH_MYSQL=true -D WITH_LUA=true ../
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
#### Ubuntu 16.04, 18.04
|
||||
```
|
||||
sudo apt-get -y install build-essential git cmake zlib1g-dev
|
||||
git clone https://github.com/pvpgn/pvpgn-server.git
|
||||
cd pvpgn-server && cmake -G "Unix Makefiles" -H./ -B./build
|
||||
cd build && make
|
||||
```
|
||||
|
||||
#### Ubuntu 14.04
|
||||
```
|
||||
sudo apt-get -y install build-essential zlib1g-dev git
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install gcc-5 g++-5
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
|
||||
sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install cmake
|
||||
git clone https://github.com/pvpgn/pvpgn-server.git
|
||||
cd pvpgn-server && cmake -G "Unix Makefiles" -H./ -B./build
|
||||
cd build && make
|
||||
```
|
||||
|
||||
#### Debian 8 with clang compiler
|
||||
```
|
||||
sudo apt-get -y install build-essential zlib1g-dev clang libc++-dev git
|
||||
wget https://cmake.org/files/v3.7/cmake-3.7.1-Linux-x86_64.tar.gz
|
||||
tar xvfz cmake-3.7.1-Linux-x86_64.tar.gz
|
||||
git clone https://github.com/pvpgn/pvpgn-server.git
|
||||
cd pvpgn-server && CC=/usr/bin/clang CXX=/usr/bin/clang++ ../cmake-3.7.1-Linux-x86_64/bin/cmake -G "Unix Makefiles" -H./ -B./build
|
||||
cd build && make
|
||||
```
|
||||
|
||||
#### CentOS 7
|
||||
```
|
||||
sudo yum -y install epel-release centos-release-scl
|
||||
sudo yum -y install git zlib-devel cmake3 devtoolset-4-gcc*
|
||||
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
|
||||
git clone https://github.com/pvpgn/pvpgn-server.git
|
||||
cd pvpgn-server
|
||||
CC=/opt/rh/devtoolset-4/root/usr/bin/gcc CXX=/opt/rh/devtoolset-4/root/usr/bin/g++ cmake -G "Unix Makefiles" -H./ -B./build
|
||||
cd build && make
|
||||
```
|
||||
|
||||
#### Fedora 25
|
||||
```
|
||||
sudo dnf -y install gcc-c++ gcc make zlib-devel cmake git
|
||||
git clone https://github.com/pvpgn/pvpgn-server.git
|
||||
cd pvpgn-server
|
||||
cmake -G "Unix Makefiles" -H./ -B./build
|
||||
cd build && make
|
||||
```
|
||||
|
||||
#### FreeBSD 11
|
||||
```
|
||||
sudo pkg install -y git cmake
|
||||
git clone https://github.com/pvpgn/pvpgn-server.git
|
||||
cd pvpgn-server
|
||||
cmake -G "Unix Makefiles" -H./ -B./build
|
||||
cd build && make
|
||||
```
|
||||
|
||||
Full instructions: [Русский](http://harpywar.com/?a=articles&b=2&c=1&d=74) | [English](http://harpywar.com/?a=articles&b=2&c=1&d=74&lang=en)
|
||||
|
||||
## Hosting on LAN or VPS with private IP address
|
||||
Some VPS providers do not assign your server a direct public IP. If that is the case or you host at home behind NAT you need to setup the route translation in `address_translation.conf`. The public address is pushed as the route server address to game clients when seeking games. Failure to push the correct address to game clients results in players not being able to match and join games (long game search and error).
|
||||
|
||||
If your network interface is directly bound to public IP, PvPGN can figure it out on it's own and this step is not necessary.
|
||||
|
||||
## License
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
40
TODO
40
TODO
|
@ -1,40 +0,0 @@
|
|||
PvPGN TODO LIST AND WHATS BEING WORKED ON:
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Release v2.0-PRO ROADMAP:
|
||||
1. DOCUMENTATION (client and server documentation; a FAQ, HOWTO and a file
|
||||
describing all configuration options). Site http://pvpgn.pro
|
||||
2. i18n or some sort to support different language messages to users
|
||||
3. Connectivity with Ghost++ to support DotA
|
||||
|
||||
|
||||
Stuff not programmed for any specific version release:
|
||||
|
||||
* admin protocol (design an admin protocol and implement the server side and
|
||||
a client lib)
|
||||
|
||||
* w3route server and serverside game packets
|
||||
|
||||
* extend/redesign storage to be used by both bnetd and d2cs/d2dbs
|
||||
|
||||
* complete tournament support with crash recovery option
|
||||
|
||||
* anonagame stuff
|
||||
a. the new W3 AMM introduced with 1.15 patch
|
||||
c. move w3route functions to its own .c/.h file (for w3route server)
|
||||
e. tournament stuff
|
||||
1. determine how games are limited to 30 minutes & map reveled at 25
|
||||
2. complete the process for finals selection
|
||||
3. make struct to hold / match / advance / eleminate finals players
|
||||
and functions to acomplish this task
|
||||
4. add stats recording for tournament games (did race wins)
|
||||
|
||||
* changing data references from accountnames to UIDs ....
|
||||
|
||||
* design a plugins support and move in time all the code in plugins (except
|
||||
the core code of course)
|
||||
|
||||
* add some way to be able to read/write specific "runtime changable" bnetd.conf
|
||||
entries (like while server is online doing /config "allow_unknown_version" "false")
|
||||
|
||||
* optimize PvPGN using "inline" functions in all "small" functions
|
73
appveyor.yml
73
appveyor.yml
|
@ -1,9 +1,34 @@
|
|||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
|
||||
os: Windows Server 2012
|
||||
image: Visual Studio 2019
|
||||
|
||||
platform:
|
||||
- x86
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- db: plain
|
||||
db_id: 1
|
||||
- db: mysql
|
||||
db_id: 2
|
||||
- db: pgsql
|
||||
db_id: 3
|
||||
- db: sqlite
|
||||
db_id: 4
|
||||
- db: odbc
|
||||
db_id: 5
|
||||
|
||||
configuration:
|
||||
# - Debug
|
||||
- Release
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
|
||||
clone_folder: c:\pvpgn
|
||||
|
||||
install:
|
||||
|
@ -13,17 +38,47 @@ install:
|
|||
- cmd: ren pvpgn-magic-builder-master builder
|
||||
- cmd: mkdir c:\builder\source\
|
||||
- cmd: xcopy /E /R /K /Y /Q "c:\pvpgn" "c:\builder\source\"
|
||||
- cmd: cd c:\builder\
|
||||
- cmd: mkdir bin
|
||||
- cmd: mkdir pdb
|
||||
|
||||
build:
|
||||
project: c:\builder\build\pvpgn.sln
|
||||
before_build:
|
||||
- cmd: set APPVEYOR_REPO_COMMIT_SHORT=%APPVEYOR_REPO_COMMIT:~0,7%
|
||||
# read version string from version.h to %PVPGN_VERSION% and append commit string inside that file
|
||||
- cmd: module\tools\pvpgn_version.bat %APPVEYOR_REPO_COMMIT_SHORT%
|
||||
- cmd: set COMPLETE_BUILD_VERSION=pvpgn-%APPVEYOR_REPO_BRANCH%-%PVPGN_VERSION%-%APPVEYOR_REPO_COMMIT_SHORT%
|
||||
- ps: $env:PVPGN_ZIP=$env:COMPLETE_BUILD_VERSION + "_" + $env:DB + $(If ($env:CONFIGURATION -ne "Release") {"_" + ($env:CONFIGURATION).ToLower()} Else {""}) + ".zip"
|
||||
- ps: $env:PVPGN_PDB_ZIP=$env:COMPLETE_BUILD_VERSION + "_" + $env:DB + $(If ($env:CONFIGURATION -ne "Release") {"_" + ($env:CONFIGURATION).ToLower()} Else {".pdb"}) + ".zip"
|
||||
|
||||
build_script:
|
||||
- cmd: cd c:\builder\
|
||||
- cmd: build_pvpgn.bat cmake_only 6 2 1 y
|
||||
- cmd: call "%VS120COMNTOOLS%vsvars32.bat"
|
||||
- cmd: set INCLUDE=c:\builder\module\include\atlmfc\;%INCLUDE%
|
||||
- cmd: call "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount
|
||||
|
||||
# build gui and console for each storage type
|
||||
# build_pvpgn.bat params:
|
||||
# 1. automatic build flag
|
||||
# 2. visual studio version
|
||||
# 3. console or gui
|
||||
# 4. storage type
|
||||
# 5. with or without lua
|
||||
# 6. Release or Debug
|
||||
|
||||
# gui
|
||||
- cmd: build_pvpgn.bat auto auto 2 %DB_ID% y %CONFIGURATION%
|
||||
- cmd: move /Y %CONFIGURATION%\*.pdb pdb\ # move pdb files
|
||||
- cmd: copy /Y %CONFIGURATION%\* bin\ # backup binary files
|
||||
# console
|
||||
- cmd: build_pvpgn.bat auto auto 1 %DB_ID% y %CONFIGURATION%
|
||||
- cmd: move /Y %CONFIGURATION%\*.pdb pdb\ # move pdb files
|
||||
- cmd: move /Y bin\* %CONFIGURATION% # move back binaries after build console version
|
||||
# create zip artifacts
|
||||
- cmd: 7z.exe a %PVPGN_ZIP% .\%CONFIGURATION%\*
|
||||
- cmd: 7z.exe a %PVPGN_PDB_ZIP% .\pdb\*
|
||||
|
||||
deploy_script:
|
||||
- ps: |
|
||||
Push-AppveyorArtifact $env:PVPGN_ZIP
|
||||
Push-AppveyorArtifact $env:PVPGN_PDB_ZIP
|
||||
|
||||
# check the latest build executable for exists
|
||||
test:
|
||||
assemblies:
|
||||
- '**\src\bnetd\Release\bnetd.exe'
|
||||
- '**\src\bnetd\%CONFIGURATION%\bnetd.exe'
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
# - Check if the files can be included
|
||||
#
|
||||
# CHECK_INCLUDE_FILES_CXX(INCLUDE VARIABLE)
|
||||
#
|
||||
# INCLUDE - list of files to include
|
||||
# VARIABLE - variable to return result
|
||||
#
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
|
||||
MACRO(CHECK_INCLUDE_FILES_CXX INCLUDE VARIABLE)
|
||||
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
||||
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
|
||||
IF(CMAKE_REQUIRED_INCLUDES)
|
||||
SET(CHECK_INCLUDE_FILES_CXX_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
|
||||
ELSE(CMAKE_REQUIRED_INCLUDES)
|
||||
SET(CHECK_INCLUDE_FILES_CXX_INCLUDE_DIRS)
|
||||
ENDIF(CMAKE_REQUIRED_INCLUDES)
|
||||
SET(CHECK_INCLUDE_FILES_CXX_CONTENT "/* */\n")
|
||||
SET(MACRO_CHECK_INCLUDE_FILES_CXX_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
FOREACH(FILE ${INCLUDE})
|
||||
SET(CMAKE_CONFIGURABLE_FILE_CONTENT
|
||||
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
|
||||
ENDFOREACH(FILE)
|
||||
SET(CMAKE_CONFIGURABLE_FILE_CONTENT
|
||||
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n")
|
||||
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.cxx" @ONLY IMMEDIATE)
|
||||
|
||||
MESSAGE(STATUS "Looking for include files ${VARIABLE}")
|
||||
TRY_COMPILE(${VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.cxx
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS
|
||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_CXX_FLAGS}
|
||||
"${CHECK_INCLUDE_FILES_CXX_INCLUDE_DIRS}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
IF(${VARIABLE})
|
||||
MESSAGE(STATUS "Looking for include files ${VARIABLE} - found")
|
||||
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${VARIABLE}")
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining if files ${INCLUDE} "
|
||||
"exist passed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
ELSE(${VARIABLE})
|
||||
MESSAGE(STATUS "Looking for include files ${VARIABLE} - not found.")
|
||||
SET(${VARIABLE} "" CACHE INTERNAL "Have includes ${VARIABLE}")
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining if files ${INCLUDE} "
|
||||
"exist failed with the following output:\n"
|
||||
"${OUTPUT}\nSource:\n${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
|
||||
ENDIF(${VARIABLE})
|
||||
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
||||
ENDMACRO(CHECK_INCLUDE_FILES_CXX)
|
|
@ -1,68 +0,0 @@
|
|||
# - Check sizeof a type
|
||||
# CHECK_TYPE_SIZE_CXX(TYPE VARIABLE)
|
||||
# Check if the type exists and determine size of type. if the type
|
||||
# exists, the size will be stored to the variable.
|
||||
# VARIABLE - variable to store size if the type exists.
|
||||
# HAVE_${VARIABLE} - does the variable exists or not
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
MACRO(CHECK_TYPE_SIZE_CXX TYPE VARIABLE)
|
||||
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
|
||||
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||
SET(CHECK_TYPE_SIZE_CXX_TYPE "${TYPE}")
|
||||
SET(MACRO_CHECK_TYPE_CXX_SIZE_FLAGS
|
||||
"${CMAKE_REQUIRED_FLAGS}")
|
||||
FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
|
||||
IF("${def}")
|
||||
SET(MACRO_CHECK_TYPE_SIZE_CXX_FLAGS
|
||||
"${MACRO_CHECK_TYPE_SIZE_CXX_FLAGS} -D${def}")
|
||||
ENDIF("${def}")
|
||||
ENDFOREACH(def)
|
||||
SET(CHECK_TYPE_SIZE_CXX_PREINCLUDE)
|
||||
SET(CHECK_TYPE_SIZE_CXX_PREMAIN)
|
||||
FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
||||
SET(CHECK_TYPE_SIZE_CXX_PREMAIN "${CHECK_TYPE_SIZE_CXX_PREMAIN}#include \"${def}\"\n")
|
||||
ENDFOREACH(def)
|
||||
CONFIGURE_FILE("${CMAKE_MODULE_PATH}/CheckTypeSizeCXX.cxx.in"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeCXX.cxx" IMMEDIATE @ONLY)
|
||||
FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeCXX.cxx"
|
||||
CHECK_TYPE_SIZE_CXX_FILE_CONTENT)
|
||||
MESSAGE(STATUS "Check size of ${TYPE}")
|
||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||
SET(CHECK_TYPE_SIZE_CXX_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
ELSE(CMAKE_REQUIRED_LIBRARIES)
|
||||
SET(CHECK_TYPE_SIZE_CXX_ADD_LIBRARIES)
|
||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
||||
IF(CMAKE_REQUIRED_INCLUDES)
|
||||
SET(CHECK_TYPE_SIZE_CXX_ADD_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
ELSE(CMAKE_REQUIRED_INCLUDES)
|
||||
SET(CHECK_TYPE_SIZE_CXX_ADD_INCLUDES)
|
||||
ENDIF(CMAKE_REQUIRED_INCLUDES)
|
||||
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeCXX.cxx"
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_CXX_FLAGS}
|
||||
"${CHECK_TYPE_SIZE_CXX_ADD_LIBRARIES}"
|
||||
"${CHECK_TYPE_SIZE_CXX_ADD_INCLUDES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
IF(HAVE_${VARIABLE})
|
||||
MESSAGE(STATUS "Check size of ${TYPE} - done")
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
|
||||
ELSE(HAVE_${VARIABLE})
|
||||
MESSAGE(STATUS "Check size of ${TYPE} - failed")
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSizeCXX.cxx:\n${CHECK_TYPE_SIZE_CXX_FILE_CONTENT}\n\n")
|
||||
ENDIF(HAVE_${VARIABLE})
|
||||
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
|
||||
ENDMACRO(CHECK_TYPE_SIZE_CXX)
|
|
@ -1,28 +0,0 @@
|
|||
#cmakedefine CHECK_TYPE_SIZE_CXX_TYPE @CHECK_TYPE_SIZE_CXX_TYPE@
|
||||
#ifdef CHECK_TYPE_SIZE_CXX_TYPE
|
||||
|
||||
@CHECK_TYPE_SIZE_CXX_PREINCLUDE@
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif /* HAVE_SYS_TYPES_H */
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif /* HAVE_STDINT_H */
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
# include <stddef.h>
|
||||
#endif /* HAVE_STDDEF_H */
|
||||
|
||||
@CHECK_TYPE_SIZE_CXX_PREMAIN@
|
||||
|
||||
int main(int ac, char*av[]){
|
||||
if(ac > 1000){return *av[0];}
|
||||
return sizeof(CHECK_TYPE_SIZE_CXX_TYPE);
|
||||
}
|
||||
|
||||
#else /* CHECK_TYPE_SIZE_CXX_TYPE */
|
||||
|
||||
# error "CHECK_TYPE_SIZE_CXX_TYPE has to specify the type"
|
||||
|
||||
#endif /* CHECK_TYPE_SIZE_CXX_TYPE */
|
|
@ -3,116 +3,31 @@ IF (NOT APPLICATION_NAME)
|
|||
SET(APPLICATION_NAME ${PROJECT_NAME})
|
||||
ENDIF (NOT APPLICATION_NAME)
|
||||
|
||||
# Suffix for Linux
|
||||
SET(LIB_SUFFIX
|
||||
CACHE STRING "Define suffix of directory name (32/64)"
|
||||
)
|
||||
|
||||
SET(EXEC_INSTALL_PREFIX
|
||||
"${CMAKE_INSTALL_PREFIX}"
|
||||
CACHE PATH "Base directory for executables and libraries"
|
||||
FORCE
|
||||
)
|
||||
|
||||
SET(SHARE_INSTALL_PREFIX
|
||||
"${CMAKE_INSTALL_PREFIX}/share"
|
||||
CACHE PATH "Base directory for files which go to share/"
|
||||
FORCE
|
||||
)
|
||||
|
||||
SET(DATA_INSTALL_PREFIX
|
||||
"${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}"
|
||||
CACHE PATH "The parent directory where applications can install their data" FORCE)
|
||||
# The following are directories where stuff will be installed to
|
||||
CACHE PATH "The parent directory where applications can install their data"
|
||||
FORCE
|
||||
)
|
||||
|
||||
SET(BIN_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/bin"
|
||||
CACHE PATH "The ${APPLICATION_NAME} binary install dir (default prefix/bin)"
|
||||
FORCE
|
||||
)
|
||||
if(WIN32)
|
||||
SET(SBIN_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}"
|
||||
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
|
||||
FORCE
|
||||
)
|
||||
else(WIN32)
|
||||
SET(SBIN_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/sbin"
|
||||
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
|
||||
FORCE
|
||||
)
|
||||
endif(WIN32)
|
||||
SET(LIB_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
|
||||
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/lib)"
|
||||
FORCE
|
||||
)
|
||||
SET(LIBEXEC_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/libexec"
|
||||
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/libexec)"
|
||||
FORCE
|
||||
)
|
||||
SET(PLUGIN_INSTALL_DIR
|
||||
"${LIB_INSTALL_DIR}/${APPLICATION_NAME}"
|
||||
CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is prefix/lib/${APPLICATION_NAME})"
|
||||
FORCE
|
||||
)
|
||||
SET(INCLUDE_INSTALL_DIR
|
||||
"${CMAKE_INSTALL_PREFIX}/include"
|
||||
CACHE PATH "The subdirectory to the header prefix (default prefix/include)"
|
||||
FORCE
|
||||
)
|
||||
|
||||
SET(DATA_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}"
|
||||
CACHE PATH "The parent directory where applications can install their data (default prefix/share/${APPLICATION_NAME})"
|
||||
FORCE
|
||||
)
|
||||
SET(HTML_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}/doc/HTML"
|
||||
CACHE PATH "The HTML install dir for documentation (default data/doc/html)"
|
||||
FORCE
|
||||
)
|
||||
SET(ICON_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}/icons"
|
||||
CACHE PATH "The icon install dir (default data/icons/)"
|
||||
FORCE
|
||||
)
|
||||
SET(SOUND_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}/sounds"
|
||||
CACHE PATH "The install dir for sound files (default data/sounds)"
|
||||
FORCE
|
||||
)
|
||||
|
||||
SET(LOCALE_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/locale"
|
||||
CACHE PATH "The install dir for translations (default prefix/share/locale)"
|
||||
FORCE
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
SET(SYSCONF_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/conf"
|
||||
CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default conf)"
|
||||
FORCE
|
||||
)
|
||||
else(WIN32)
|
||||
SET(SYSCONF_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/etc/${APPLICATION_NAME}"
|
||||
CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default prefix/etc)"
|
||||
FORCE
|
||||
)
|
||||
endif(WIN32)
|
||||
|
||||
SET(MAN_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/man"
|
||||
CACHE PATH "The ${APPLICATION_NAME} man install dir (default prefix/man)"
|
||||
FORCE
|
||||
)
|
||||
SET(INFO_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/info"
|
||||
CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)"
|
||||
FORCE
|
||||
)
|
||||
#***********************************#
|
||||
|
||||
if(WIN32)
|
||||
SET(LOCALSTATE_INSTALL_DIR
|
||||
|
@ -120,11 +35,44 @@ if(WIN32)
|
|||
CACHE PATH "The ${APPLICATION_NAME} local state install dir (default prefix/var)"
|
||||
FORCE
|
||||
)
|
||||
else(WIN32)
|
||||
else()
|
||||
SET(LOCALSTATE_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/var/${APPLICATION_NAME}"
|
||||
CACHE PATH "The ${APPLICATION_NAME} local state install dir (default prefix/var)"
|
||||
FORCE
|
||||
)
|
||||
endif(WIN32)
|
||||
endif()
|
||||
|
||||
SET(MAN_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/man"
|
||||
CACHE PATH "The ${APPLICATION_NAME} man install dir (default prefix/man)"
|
||||
FORCE
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
SET(SBIN_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}"
|
||||
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
|
||||
FORCE
|
||||
)
|
||||
else()
|
||||
SET(SBIN_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/sbin"
|
||||
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
|
||||
FORCE
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
SET(SYSCONF_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/conf"
|
||||
CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default conf)"
|
||||
FORCE
|
||||
)
|
||||
else()
|
||||
SET(SYSCONF_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/etc/${APPLICATION_NAME}"
|
||||
CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default prefix/etc)"
|
||||
FORCE
|
||||
)
|
||||
endif()
|
|
@ -1,72 +0,0 @@
|
|||
# Copyright (c) 2013 Martin Felis <martin@fysx.org>
|
||||
# License: Public Domain (Unlicense: http://unlicense.org/)
|
||||
# Modified by Edvin "Lego3" Linge for the CorsixTH project.
|
||||
#
|
||||
# Try to find Lua or LuaJIT depending on the variable WITH_LUAJIT.
|
||||
# Sets the following variables:
|
||||
# LUA_FOUND
|
||||
# LUA_INCLUDE_DIR
|
||||
# LUA_LIBRARY
|
||||
#
|
||||
# Use it in a CMakeLists.txt script as:
|
||||
#
|
||||
# OPTION (WITH_LUAJIT "Use LuaJIT instead of default Lua" OFF)
|
||||
# UNSET(LUA_FOUND CACHE)
|
||||
# UNSET(LUA_INCLUDE_DIR CACHE)
|
||||
# UNSET(LUA_LIBRARY CACHE)
|
||||
# FIND_PACKAGE (Lua REQUIRED)
|
||||
|
||||
SET (LUA_FOUND FALSE)
|
||||
SET (LUA_LIBRARIES)
|
||||
|
||||
SET (LUA_INTERPRETER_TYPE "Lua5.1")
|
||||
SET (LUA_LIBRARY_NAME lua5.1 lua51 lua lua-5.1)
|
||||
SET (LUA_INCLUDE_DIRS include/lua5.1 include/lua51 include/lua include/lua-5.1 include)
|
||||
|
||||
|
||||
FIND_PATH (LUA_INCLUDE_DIR lua.h
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES ${LUA_INCLUDE_DIRS}
|
||||
PATHS
|
||||
/opt/local
|
||||
/usr/local
|
||||
/usr
|
||||
/opt
|
||||
/sw
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
)
|
||||
FIND_LIBRARY (LUA_LIBRARY NAMES ${LUA_LIBRARY_NAME}
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES lib
|
||||
PATHS
|
||||
/usr
|
||||
/usr/local
|
||||
/opt/local
|
||||
/opt
|
||||
/sw
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
)
|
||||
|
||||
IF (LUA_INCLUDE_DIR AND LUA_LIBRARY)
|
||||
SET (LUA_FOUND TRUE)
|
||||
SET (LUA_LIBRARIES ${LUA_LIBRARY})
|
||||
ENDIF (LUA_INCLUDE_DIR AND LUA_LIBRARY)
|
||||
|
||||
IF (LUA_FOUND)
|
||||
IF (NOT Lua_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found ${LUA_INTERPRETER_TYPE} library: ${LUA_LIBRARY}")
|
||||
ENDIF (NOT Lua_FIND_QUIETLY)
|
||||
ELSE (LUA_FOUND)
|
||||
IF (Lua_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find ${LUA_INTERPRETER_TYPE}")
|
||||
ENDIF (Lua_FIND_REQUIRED)
|
||||
ENDIF (LUA_FOUND)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua DEFAULT_MSG LUA_LIBRARY LUA_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED ( LUA_INCLUDE_DIR LUA_LIBRARY)
|
|
@ -1,46 +1,61 @@
|
|||
# - Find mysqlclient
|
||||
# Find the native MySQL includes and library
|
||||
# - Try to find MySQL.
|
||||
# Once done this will define:
|
||||
# MYSQL_FOUND - If false, do not try to use MySQL.
|
||||
# MYSQL_INCLUDE_DIRS - Where to find mysql.h, etc.
|
||||
# MYSQL_LIBRARIES - The libraries to link against.
|
||||
# MYSQL_VERSION_STRING - Version in a string of MySQL.
|
||||
#
|
||||
# MYSQL_INCLUDE_DIR - where to find mysql.h, etc.
|
||||
# MYSQL_LIBRARIES - List of libraries when using MySQL.
|
||||
# MYSQL_FOUND - True if MySQL found.
|
||||
# Created by RenatoUtsch based on eAthena implementation.
|
||||
#
|
||||
# Please note that this module only supports Windows and Linux officially, but
|
||||
# should work on all UNIX-like operational systems too.
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2012 RenatoUtsch
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
if( WIN32 )
|
||||
set(MYENV "PROGRAMFILES(X86)")
|
||||
find_path( MYSQL_INCLUDE_DIR
|
||||
NAMES "mysql.h"
|
||||
PATHS "$ENV{PROGRAMFILES}/MySQL/*/include"
|
||||
"$ENV{${MYENV}}/MySQL/*/include"
|
||||
"$ENV{SYSTEMDRIVE}/MySQL/*/include" )
|
||||
|
||||
find_library( MYSQL_LIBRARY
|
||||
NAMES "mysqlclient" "mysqlclient_r" "libmysql"
|
||||
PATHS "$ENV{PROGRAMFILES}/MySQL/*/lib"
|
||||
"$ENV{${MYENV}}/MySQL/*/lib"
|
||||
"$ENV{SYSTEMDRIVE}/MySQL/*/lib" )
|
||||
else()
|
||||
find_path( MYSQL_INCLUDE_DIR
|
||||
NAMES "mysql.h"
|
||||
PATHS "/usr/include/mysql"
|
||||
"/usr/local/include/mysql"
|
||||
"/usr/mysql/include/mysql" )
|
||||
|
||||
find_library( MYSQL_LIBRARY
|
||||
NAMES "mysqlclient" "mysqlclient_r"
|
||||
PATHS "/lib/mysql"
|
||||
"/lib64/mysql"
|
||||
"/usr/lib/mysql"
|
||||
"/usr/lib64/mysql"
|
||||
"/usr/local/lib/mysql"
|
||||
"/usr/local/lib64/mysql"
|
||||
"/usr/mysql/lib/mysql"
|
||||
"/usr/mysql/lib64/mysql" )
|
||||
endif()
|
||||
|
||||
IF (MYSQL_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
SET(MySQL_FIND_QUIETLY TRUE)
|
||||
ENDIF (MYSQL_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(MYSQL_INCLUDE_DIR mysql.h
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 4.1;Location]/include"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 4.0;Location]/include"
|
||||
/usr/local/mysql/include
|
||||
/usr/local/include/mysql
|
||||
/usr/local/include
|
||||
/usr/include/mysql
|
||||
/usr/include
|
||||
/usr/mysql/include
|
||||
)
|
||||
|
||||
IF(MSVC)
|
||||
SET(MYSQL_NAMES libmysql)
|
||||
ELSE(MSVC)
|
||||
SET(MYSQL_NAMES mysqlclient mysqlclient_r)
|
||||
ENDIF(MSVC)
|
||||
SET(MYSQL_SEARCH_LIB_PATHS
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 4.1;Location]/lib/opt"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 4.0;Location]/lib/opt"
|
||||
/usr/local/mysql/lib
|
||||
/usr/local/lib/mysql
|
||||
/usr/local/lib
|
||||
/usr/lib/mysql
|
||||
/usr/lib
|
||||
)
|
||||
FIND_LIBRARY(MYSQL_LIBRARY
|
||||
NAMES ${MYSQL_NAMES}
|
||||
PATHS ${MYSQL_SEARCH_LIB_PATHS}
|
||||
)
|
||||
|
||||
IF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)
|
||||
SET(MYSQL_FOUND TRUE)
|
||||
|
@ -51,9 +66,7 @@ ELSE (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)
|
|||
ENDIF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)
|
||||
|
||||
IF (MYSQL_FOUND)
|
||||
IF (NOT MySQL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found MySQL: ${MYSQL_LIBRARY}")
|
||||
ENDIF (NOT MySQL_FIND_QUIETLY)
|
||||
ELSE (MYSQL_FOUND)
|
||||
IF (MySQL_FIND_REQUIRED)
|
||||
MESSAGE(STATUS "Looked for MySQL libraries named ${MYSQL_NAMES}.")
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
# - Find zlib
|
||||
# Find the native ZLIB includes and library
|
||||
#
|
||||
# ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
|
||||
# ZLIB_LIBRARIES - List of libraries when using zlib.
|
||||
# ZLIB_FOUND - True if zlib found.
|
||||
|
||||
|
||||
IF (ZLIB_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
SET(ZLIB_FIND_QUIETLY TRUE)
|
||||
ENDIF (ZLIB_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/include"
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
${CMAKE_SOURCE_DIR}/zlib
|
||||
)
|
||||
|
||||
SET(ZLIB_NAMES z zlib zdll zlibwapi)
|
||||
FIND_LIBRARY(ZLIB_LIBRARY
|
||||
NAMES ${ZLIB_NAMES}
|
||||
PATHS
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/lib"
|
||||
/usr/lib /usr/local/lib ${CMAKE_SOURCE_DIR}/zlib
|
||||
)
|
||||
|
||||
IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
|
||||
SET(ZLIB_FOUND TRUE)
|
||||
SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
|
||||
ELSE (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
|
||||
SET(ZLIB_FOUND FALSE)
|
||||
SET( ZLIB_LIBRARIES )
|
||||
ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
|
||||
|
||||
IF (ZLIB_FOUND)
|
||||
IF (NOT ZLIB_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found ZLIB: ${ZLIB_LIBRARY}")
|
||||
ENDIF (NOT ZLIB_FIND_QUIETLY)
|
||||
ELSE (ZLIB_FOUND)
|
||||
IF (ZLIB_FIND_REQUIRED)
|
||||
MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.")
|
||||
MESSAGE(FATAL_ERROR "Could NOT find z library")
|
||||
ENDIF (ZLIB_FIND_REQUIRED)
|
||||
ENDIF (ZLIB_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
ZLIB_LIBRARY
|
||||
ZLIB_INCLUDE_DIR
|
||||
)
|
|
@ -1,10 +1,10 @@
|
|||
# generate the configs with proper line endings
|
||||
set(OUTPUT_CONFS ad.conf anongame_infos.conf address_translation.conf
|
||||
set(OUTPUT_CONFS ad.json anongame_infos.conf address_translation.conf
|
||||
autoupdate.conf bnalias.conf bnban.conf bnetd_default_user.plain
|
||||
bnissue.txt bnmaps.conf bnxpcalc.conf
|
||||
bnxplevel.conf channel.conf command_groups.conf realm.conf
|
||||
sql_DB_layout.conf supportfile.conf topics.conf
|
||||
tournament.conf versioncheck.conf icons.conf)
|
||||
tournament.conf versioncheck.json icons.conf)
|
||||
foreach(CONF ${OUTPUT_CONFS})
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${CONF}.in ${CMAKE_CURRENT_BINARY_DIR}/${CONF} @ONLY)
|
||||
endforeach(CONF)
|
||||
|
@ -15,15 +15,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/d2cs.conf.in ${CMAKE_CURRENT_BINARY_D
|
|||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/d2dbs.conf.in ${CMAKE_CURRENT_BINARY_DIR}/d2dbs.conf)
|
||||
|
||||
if(WITH_BNETD)
|
||||
set(BNETD_CONFS bnetd.conf ad.conf anongame_infos.conf address_translation.conf
|
||||
set(BNETD_CONFS bnetd.conf ad.json anongame_infos.conf address_translation.conf
|
||||
autoupdate.conf bnalias.conf bnban.conf
|
||||
bnetd_default_user.plain bnissue.txt bnmaps.conf
|
||||
bnxpcalc.conf bnxplevel.conf channel.conf command_groups.conf
|
||||
realm.conf sql_DB_layout.conf supportfile.conf topics.conf
|
||||
tournament.conf versioncheck.conf icons.conf)
|
||||
|
||||
# special treatment for non .in files
|
||||
install(FILES bnetd_default_user.cdb DESTINATION ${SYSCONFDIR})
|
||||
tournament.conf versioncheck.json icons.conf)
|
||||
endif(WITH_BNETD)
|
||||
|
||||
if(WITH_D2CS)
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
##############################################################################
|
||||
# ad.list - Configuration for bnetd ad banners #
|
||||
#----------------------------------------------------------------------------#
|
||||
# #
|
||||
# Quotes (") are required around the strings, but they are not allowed #
|
||||
# inside them. #
|
||||
# #
|
||||
# The "file name" indicates the name of the file containing the actual ad. #
|
||||
# The files must be in the files/ directory and no path components should be #
|
||||
# listed here, only the filename portion. #
|
||||
# #
|
||||
# ID uniquely identifies the ad when referring to it from the "next" field #
|
||||
# (must be higher than 0). #
|
||||
# #
|
||||
# The "when" field determines which ad banners should be picked to start a #
|
||||
# sequence. These can be used to make the server avoid picking an "answer" #
|
||||
# banner before its corresponding "question" banner by setting it to "start" #
|
||||
# or "init". The first banner that is chosen when the user logs in is an #
|
||||
# "init" banner. These banners are not reused, so you may want to double #
|
||||
# list them as "start" banners. #
|
||||
# #
|
||||
# The "time" field is the number of seconds that the banner should be #
|
||||
# displayed on the client. If it is zero, the ad will be displayed forever. #
|
||||
# #
|
||||
# The "URL" field is the location that the user will be sent to if (s)he #
|
||||
# clicks on the ad. #
|
||||
# #
|
||||
# The "next" field determines which banner will be displayed next. If it is #
|
||||
# zero, then a start banner may be chosen randomly. #
|
||||
# #
|
||||
# The "client" field determines which banner will be displayed to which #
|
||||
# client. Starting with Warcraft III banners are .mng files which are not #
|
||||
# visible by all clients (and .pcx files dont show on Warcraft III). If this #
|
||||
# field is NULL than it will be shown to all clients _except_ those who have #
|
||||
# a specific clienttag line. #
|
||||
# #
|
||||
# The "lang" field allows to limit display of certain banners to clients #
|
||||
# that identified with a specific language tag. A value of "any" means #
|
||||
# this banner will be chosen if no banner is defined for a given language. #
|
||||
#
|
||||
# --file name-- -ID- -when- time ---------------URL--------------- --next-- --client-- --lang--#
|
||||
"ad000001.mng" 1 init 30 "http://pvpgn.berlios.de" 0x000000 "WAR3" "any"
|
||||
"ad000001.mng" 2 start 30 "http://pvpgn.berlios.de" 0x000000 "WAR3" "any"
|
||||
|
||||
"ad000004.mng" 3 init 30 "http://pvpgn.berlios.de" 0x000000 "WAR3" "any"
|
||||
"ad000004.mng" 4 start 30 "http://pvpgn.berlios.de" 0x000000 "WAR3" "any"
|
||||
|
||||
|
||||
"ad000001.mng" 5 init 30 "http://pvpgn.berlios.de" 0x000000 "W3XP" "any"
|
||||
"ad000001.mng" 6 start 30 "http://pvpgn.berlios.de" 0x000000 "W3XP" "any"
|
||||
|
||||
"ad000004.mng" 7 init 30 "http://pvpgn.berlios.de" 0x000000 "W3XP" "any"
|
||||
"ad000004.mng" 8 start 30 "http://pvpgn.berlios.de" 0x000000 "W3XP" "any"
|
||||
|
||||
|
||||
"ad000001.smk" 9 init 30 "http://pvpgn.berlios.de" 0x000000 "NULL" "any"
|
||||
"ad000001.smk" 10 start 30 "http://pvpgn.berlios.de" 0x000000 "NULL" "any"
|
||||
|
||||
# "ad000001.smk" 100 init 30 "http://en.wikipedia.org/wiki/Earth" 0x000000 "NULL" "any"
|
||||
# "ad000001.smk" 101 start 30 "http://en.wikipedia.org/wiki/Earth" 0x00006E "NULL" "any"
|
||||
# "ad000001.smk" 102 init 30 "http://en.wikipedia.org/wiki/Germany" 0x000000 "NULL" "deDE"
|
||||
# "ad000001.smk" 103 start 30 "http://en.wikipedia.org/wiki/Germany" 0x00006E "NULL" "deDE"
|
||||
# "ad000001.smk" 104 init 30 "http://en.wikipedia.org/wiki/USA" 0x000000 "NULL" "enUS"
|
||||
# "ad000001.smk" 105 start 30 "http://en.wikipedia.org/wiki/USA" 0x00006E "NULL" "enUS"
|
||||
# "ad000001.smk" 106 init 30 "http://en.wikipedia.org/wiki/France" 0x000000 "NULL" "frFR"
|
||||
# "ad000001.smk" 107 start 30 "http://en.wikipedia.org/wiki/France" 0x00006E "NULL" "frFR"
|
||||
# "ad000001.smk" 108 init 30 "http://en.wikipedia.org/wiki/Italy" 0x000000 "NULL" "itIT"
|
||||
# "ad000001.smk" 109 start 30 "http://en.wikipedia.org/wiki/Italy" 0x00006E "NULL" "itIT"
|
||||
# "ad000001.smk" 110 norm 30 "http://pvpgn.berlios.de" 0x000000 "NULL" "any"
|
||||
|
||||
#
|
||||
# #
|
||||
##############################################################################
|
9
conf/ad.json.in
Normal file
9
conf/ad.json.in
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ads":
|
||||
[
|
||||
{"filename": "ad000001.png", "url": "http://pvpgn.pro", "client": "W3XP", "lang": "NULL"},
|
||||
{"filename": "ad000002.mng", "url": "http://pvpgn.pro", "client": "W3XP", "lang": "NULL"},
|
||||
{"filename": "ad000001.smk", "url": "http://pvpgn.pro", "client": "NULL", "lang": "NULL"},
|
||||
{"filename": "ad000002.smk", "url": "http://pvpgn.pro", "client": "NULL", "lang": "NULL"}
|
||||
]
|
||||
}
|
|
@ -35,24 +35,44 @@
|
|||
# ${-19} - substitute arguments 0-19 here #
|
||||
# ${2-} - substitue all arguments from 2 until the end here #
|
||||
# #
|
||||
@
|
||||
//doubt //dt //d
|
||||
[0]/me looks with doubt
|
||||
[1+]/me looks at ${1-} with doubt
|
||||
@
|
||||
//numusers //nu
|
||||
[0]%IThere are %u users online.
|
||||
[0]%IThere are %g games online.
|
||||
[0]%IThere are %c channels online.
|
||||
[1+]%EThat command does not take any arguments.
|
||||
@
|
||||
//askban //ab
|
||||
[2+]/w $1 Please ban ${2-}.
|
||||
@
|
||||
//statsme //sm
|
||||
[0]/stats %u
|
||||
@
|
||||
//pvpgn
|
||||
[*]/announce PVPGN rulez!
|
||||
# %a - Number of registered accounts #
|
||||
# %c - Number of existing channels #
|
||||
# %g - Number of running games #
|
||||
# %G - Number of games with the same clienttag #
|
||||
# %h - Hostname of the server #
|
||||
# %H - Contact name (as set in bnetd.conf) #
|
||||
# %i - The userid of the user #
|
||||
# %I - The username of the user #
|
||||
# %N - Name of the game the user has connected with #
|
||||
# %m - Check the user's mail #
|
||||
# %r - IP address of the user #
|
||||
# %s - Servername #
|
||||
# %t - The clienttag of the user #
|
||||
# %u - Number of users currently logged in #
|
||||
# %U - Number of users logged in with the same clienttag #
|
||||
# %v - Server version #
|
||||
# #
|
||||
# Examples #
|
||||
#@
|
||||
#//doubt //dt //d
|
||||
#[0]/me looks with doubt
|
||||
#[1+]/me looks at ${1-} with doubt
|
||||
#@
|
||||
#//numusers //nu
|
||||
#[0]%IThere are %u users online.
|
||||
#[0]%IThere are %g games online.
|
||||
#[0]%IThere are %c channels online.
|
||||
#[1+]%EThat command does not take any arguments.
|
||||
#@
|
||||
#//askban //ab
|
||||
#[2+]/w $1 Please ban ${2-}.
|
||||
#@
|
||||
#//statsme //sm
|
||||
#[0]/stats %u
|
||||
#@
|
||||
#//pvpgn
|
||||
#[*]/announce PVPGN rulez!
|
||||
#
|
||||
|
||||
# #
|
||||
##############################################################################
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
# Syntax: #
|
||||
# * for plain file driver: #
|
||||
# storage_path = file:mode=plain;dir=<path_to_user_files>;clan=<path_to_clan_files>;default=/path/to/default/account #
|
||||
# * for cdb file driver: #
|
||||
# storage_path = file:mode=cdb;dir=<path_to_cdb_files>;clan=<path_to_clan_files>;default=/path/to/default/account #
|
||||
# * for sql driver: #
|
||||
# storage_path = sql:variable=value;...;default=0 (0 is the default uid) #
|
||||
# #
|
||||
|
@ -52,7 +50,6 @@
|
|||
# #
|
||||
# Examples: #
|
||||
# storage_path = "file:mode=plain;dir=${LOCALSTATEDIR}/users;clan=${LOCALSTATEDIR}/clans;team=${LOCALSTATEDIR}/teams;default=${SYSCONFDIR}/bnetd_default_user.plain"
|
||||
# storage_path = "file:mode=cdb;dir=${LOCALSTATEDIR}/userscdb;clan=${LOCALSTATEDIR}/clans;team=${LOCALSTATEDIR}/teams;default=${SYSCONFDIR}/bnetd_default_user.cdb"
|
||||
# storage_path = "sql:mode=mysql;host=127.0.0.1;name=PVPGN;user=pvpgn;pass=pvpgnrocks;default=0;prefix=pvpgn_"
|
||||
# storage_path = "sql:mode=pgsql;host=127.0.0.1;name=pvpgn;user=pvpgn;pass=pvpgnrocks;default=0;prefix=pvpgn_"
|
||||
# storage_path = "sql:mode=sqlite3;name=${LOCALSTATEDIR}/users.db;default=0;prefix=pvpgn_"
|
||||
|
@ -78,14 +75,14 @@ userlogdir = "${LOCALSTATEDIR}/userlogs"
|
|||
i18ndir = "${SYSCONFDIR}/i18n"
|
||||
issuefile = "${SYSCONFDIR}/bnissue.txt"
|
||||
channelfile = "${SYSCONFDIR}/channel.conf"
|
||||
adfile = "${SYSCONFDIR}/ad.conf"
|
||||
adfile = "${SYSCONFDIR}/ad.json"
|
||||
topicfile = "${SYSCONFDIR}/topics.conf"
|
||||
ipbanfile = "${SYSCONFDIR}/bnban.conf"
|
||||
mpqfile = "${SYSCONFDIR}/autoupdate.conf"
|
||||
logfile = "${LOCALSTATEDIR}/bnetd.log"
|
||||
realmfile = "${SYSCONFDIR}/realm.conf"
|
||||
maildir = "${LOCALSTATEDIR}/bnmail"
|
||||
versioncheck_file = "${SYSCONFDIR}/versioncheck.conf"
|
||||
versioncheck_file = "${SYSCONFDIR}/versioncheck.json"
|
||||
mapsfile = "${SYSCONFDIR}/bnmaps.conf"
|
||||
xplevelfile = "${SYSCONFDIR}/bnxplevel.conf"
|
||||
xpcalcfile = "${SYSCONFDIR}/bnxpcalc.conf"
|
||||
|
@ -169,6 +166,7 @@ allow_d2cs_setname = true
|
|||
# the "filedir" directory specified above.
|
||||
iconfile = "icons.bni"
|
||||
war3_iconfile = "icons-WAR3.bni"
|
||||
star_iconfile = "icons_STAR.bni"
|
||||
|
||||
# #
|
||||
##############################################################################
|
||||
|
@ -208,19 +206,6 @@ war3_iconfile = "icons-WAR3.bni"
|
|||
# Example: allowed_clients = war3,w3xp
|
||||
allowed_clients = all
|
||||
|
||||
# If this option is enabled, the verification step is skipped if possible.
|
||||
# This only works with clients < 109. It is useful because you no longer
|
||||
# need any of the IX86AUTH?.MPQ and PMACAUTH?.MPQ files. Note that it will
|
||||
# also skip over all the autoupdate checks effectively disabling it.
|
||||
#
|
||||
# If you disable this you must have one or more of the MPQ files. Otherwise
|
||||
# clients will hang when they first connect because they are attempting to
|
||||
# download them. The versioncheck can only be skipped for clients older
|
||||
# than 109. Starting with version 109 the clients will always do version
|
||||
# checking since they do not function properly if the server does not
|
||||
# request it.
|
||||
skip_versioncheck = true
|
||||
|
||||
# If you enable the version checks but want to allow clients that don't pass
|
||||
# the checksum test then enable this.
|
||||
allow_bad_version = true
|
||||
|
@ -231,19 +216,6 @@ allow_bad_version = true
|
|||
# is a good idea.
|
||||
allow_unknown_version = true
|
||||
|
||||
# This defines how the exeinfo field in the versioncheck file is being
|
||||
# checked. You can choose between no match at all [none] (default),
|
||||
# exact match [exact], exact case-sensitive match [exactcase], dumb wildcard
|
||||
# match [wildcard], and parsed value comparison [parse].
|
||||
# NOTE: [parse] needs the mktime() function and might therefore not work on
|
||||
# every system.
|
||||
version_exeinfo_match = none
|
||||
|
||||
# If you have choosen [parse] above, this is the tolerance with which
|
||||
# the time can differ. The value must be given in seconds. If it's 0 this
|
||||
# check is disabled.
|
||||
version_exeinfo_maxdiff = 0
|
||||
|
||||
# #
|
||||
##############################################################################
|
||||
|
||||
|
@ -295,7 +267,7 @@ new_accounts = true
|
|||
|
||||
# Set this to the maximum number of accounts you want to allow to be
|
||||
# created on your server. A value of 0 means infinite and is the default.
|
||||
#max_accounts = 0
|
||||
max_accounts = 0
|
||||
|
||||
# If someone attempts to log in more than once, should it kick off the old
|
||||
# login, or deny the new one?
|
||||
|
@ -445,20 +417,19 @@ max_friends = 20
|
|||
#----------------------------------------------------------------------------#
|
||||
|
||||
# Set track=0 to disable tracking. Any other number will set number
|
||||
# of seconds between sending tracking packets. This is OFF by default.
|
||||
# of seconds between sending tracking packets. This is ON by default.
|
||||
#track = 0
|
||||
track = 60
|
||||
|
||||
# Tracking server(s)
|
||||
# Use a comma delimited list of hostnames with optional UDP port numbers
|
||||
# after colons. (port 6114 is the default for the newer tracking protocol)
|
||||
#trackaddrs = "track.pvpgn.org,localhost:9999"
|
||||
trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net,bnet.mivabe.nl"
|
||||
trackaddrs = "track.pvpgn.pro,track.pvpgn.org,bntrack.darkwings.org,bnet.mivabe.nl,track.eurobattle.net"
|
||||
|
||||
# Change these to match your system, for example:
|
||||
location = "unknown"
|
||||
description = "unknown"
|
||||
url = "unknown"
|
||||
url = "https://github.com/pvpgn/pvpgn-server"
|
||||
contact_name = "a PvPGN user"
|
||||
contact_email = "unknown"
|
||||
|
||||
|
@ -478,6 +449,11 @@ contact_email = "unknown"
|
|||
# limit, NOT the concurrent user limit (for that see next option)
|
||||
max_connections = 1000
|
||||
|
||||
# Set maximum amount of packets in client packet queue
|
||||
# If limit is reached, client connection will be dropped
|
||||
# Set to 0 to disable
|
||||
packet_limit = 1000
|
||||
|
||||
# Maximum number of concurrent users (0 means unlimited).
|
||||
max_concurrent_logins = 0
|
||||
|
||||
|
|
|
@ -61,14 +61,14 @@ userlogdir = var\userlogs
|
|||
i18ndir = conf\i18n
|
||||
issuefile = conf\bnissue.txt
|
||||
channelfile = conf\channel.conf
|
||||
adfile = conf\ad.conf
|
||||
adfile = conf\ad.json
|
||||
topicfile = conf\topics.conf
|
||||
ipbanfile = conf\bnban.conf
|
||||
transfile = conf\address_translation.conf
|
||||
mpqfile = conf\autoupdate.conf
|
||||
logfile = var\bnetd.log
|
||||
realmfile = conf\realm.conf
|
||||
versioncheck_file = conf\versioncheck.conf
|
||||
versioncheck_file = conf\versioncheck.json
|
||||
mapsfile = conf\bnmaps.conf
|
||||
xplevelfile = conf\bnxplevel.conf
|
||||
xpcalcfile = conf\bnxpcalc.conf
|
||||
|
@ -150,6 +150,7 @@ allow_d2cs_setname = true
|
|||
# the "filedir" directory specified above.
|
||||
iconfile = "icons.bni"
|
||||
war3_iconfile = "icons-WAR3.bni"
|
||||
star_iconfile = "icons_STAR.bni"
|
||||
|
||||
# #
|
||||
##############################################################################
|
||||
|
@ -188,19 +189,6 @@ war3_iconfile = "icons-WAR3.bni"
|
|||
# Example: allowed_clients = war3,w3xp
|
||||
allowed_clients = all
|
||||
|
||||
# If this option is enabled, the verification step is skipped if possible.
|
||||
# This only works with clients < 109. It is useful because you no longer
|
||||
# need any of the IX86AUTH?.MPQ and PMACAUTH?.MPQ files. Note that it will
|
||||
# also skip over all the autoupdate checks effectively disabling it.
|
||||
#
|
||||
# If you disable this you must have one or more of the MPQ files. Otherwise
|
||||
# clients will hang when they first connect because they are attempting to
|
||||
# download them. The versioncheck can only be skipped for clients older
|
||||
# than 109. Starting with version 109 the clients will always do version
|
||||
# checking since they do not function properly if the server does not
|
||||
# request it.
|
||||
skip_versioncheck = true
|
||||
|
||||
# If you enable the version checks but want to allow clients that don't pass
|
||||
# the checksum test then enable this.
|
||||
allow_bad_version = true
|
||||
|
@ -211,19 +199,6 @@ allow_bad_version = true
|
|||
# is a good idea.
|
||||
allow_unknown_version = true
|
||||
|
||||
# This defines how the exeinfo field in the versioncheck file is being
|
||||
# checked. You can choose between no match at all [none] (default),
|
||||
# exact match [exact], exact case-sensitive match [exactcase], dumb wildcard
|
||||
# match [wildcard], and parsed value comparison [parse].
|
||||
# NOTE: [parse] needs the mktime() function and might therefore not work on
|
||||
# every system.
|
||||
version_exeinfo_match = none
|
||||
|
||||
# If you have choosen [parse] above, this is the tolerance with which
|
||||
# the time can differ. The value must be given in seconds. If it's 0 this
|
||||
# check is disabled.
|
||||
version_exeinfo_maxdiff = 0
|
||||
|
||||
# #
|
||||
##############################################################################
|
||||
|
||||
|
@ -425,20 +400,19 @@ max_friends = 20
|
|||
#----------------------------------------------------------------------------#
|
||||
|
||||
# Set track=0 to disable tracking. Any other number will set number
|
||||
# of seconds between sending tracking packets. This is OFF by default.
|
||||
# of seconds between sending tracking packets. This is ON by default.
|
||||
#track = 0
|
||||
track = 60
|
||||
|
||||
# Tracking server(s)
|
||||
# Use a comma delimited list of hostnames with optional UDP port numbers
|
||||
# after colons. (port 6114 is the default for the newer tracking protocol)
|
||||
#trackaddrs = "track.pvpgn.org,localhost:9999"
|
||||
trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net,bnet.mivabe.nl"
|
||||
trackaddrs = "track.pvpgn.pro,track.pvpgn.org,bntrack.darkwings.org,bnet.mivabe.nl,track.eurobattle.net"
|
||||
|
||||
# Change these to match your system, for example:
|
||||
location = "unknown"
|
||||
description = "unknown"
|
||||
url = "unknown"
|
||||
url = "https://github.com/pvpgn/pvpgn-server"
|
||||
contact_name = "a PvPGN user"
|
||||
contact_email = "unknown"
|
||||
|
||||
|
@ -458,6 +432,11 @@ contact_email = "unknown"
|
|||
# limit, NOT the concurrent user limit (for that see next option)
|
||||
max_connections = 1000
|
||||
|
||||
# Set maximum amount of packets in client packet queue
|
||||
# If limit is reached, client connection will be dropped
|
||||
# Set to 0 to disable
|
||||
packet_limit = 1000
|
||||
|
||||
# Maximum number of concurrent users (0 means unlimited).
|
||||
max_concurrent_logins = 0
|
||||
|
||||
|
|
Binary file not shown.
9
conf/i18n/bgBG/common.xml
Normal file
9
conf/i18n/bgBG/common.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="bgBG">Bulgarian</language>
|
||||
<countries>
|
||||
<country>BGR</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
|
@ -2,6 +2,7 @@
|
|||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="enUS">English</language>
|
||||
<countries></countries>
|
||||
<authors>
|
||||
<author name="nomad" email="nomad@example.com" />
|
||||
</authors>
|
||||
|
|
9
conf/i18n/csCZ/common.xml
Normal file
9
conf/i18n/csCZ/common.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="csCZ">Czech</language>
|
||||
<countries>
|
||||
<country>CZE</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
621
conf/i18n/deDE/bnhelp.conf
Normal file
621
conf/i18n/deDE/bnhelp.conf
Normal file
|
@ -0,0 +1,621 @@
|
|||
##############################################################################
|
||||
# bnhelp - This Help File is used for describing the commands to the user #
|
||||
#----------------------------------------------------------------------------#
|
||||
# Entries are separated by a percent sign (%) at the beginning of the line. #
|
||||
# The commands that correspond with the entry should follow the % on the #
|
||||
# same line. #
|
||||
# #
|
||||
# You can enter comments by starting a line with #. Comments extend to the #
|
||||
# end of the line. #
|
||||
# Tabs replaces with 3 spaces. #
|
||||
# Empty lines are ignored. #
|
||||
# #
|
||||
##############################################################################
|
||||
|
||||
%whois whereis where
|
||||
--------------------------------------------------------
|
||||
/whois <Spieler> (oder auch: /where /whereis)
|
||||
Zeigt an wo ein <Spieler> sich gerade auf dem Server befindet.
|
||||
|
||||
Beispiel: /whois nomad
|
||||
|
||||
%msg whisper m w
|
||||
--------------------------------------------------------
|
||||
/whisper <Spieler> <Nachricht> (oder auch: /w /m /msg)
|
||||
Sendet eine private <Nachricht> an <Spieler>
|
||||
|
||||
Beispiel: /whisper nomad Wie geht es dir?
|
||||
|
||||
%ignore squelch
|
||||
--------------------------------------------------------
|
||||
/squelch <Benutzername> (oder auch: ignore, siehe aauch: /unsquelch)
|
||||
Blockiert weitere Nachrichten von <Benutzername>
|
||||
|
||||
Beispiel: /squelch nomad
|
||||
|
||||
%unignore unsquelch
|
||||
--------------------------------------------------------
|
||||
/unsquelch <Spieler> (oder auch: /unignore)
|
||||
Erlaubt einem vorher geblocktem <Spieler>, normal mit dir zu reden.
|
||||
|
||||
Beispiel: /unsquelch nomad
|
||||
|
||||
%away
|
||||
--------------------------------------------------------
|
||||
/away [Nachricht]
|
||||
Zeigt den Benutzern, die dich anflüstern eine [Nachricht] an. Nutze den /away Befehl nochmals ohne [Nachricht], um diese Funktion abzuschalten.
|
||||
|
||||
Beispiel: /away beim Abendessen
|
||||
|
||||
%dnd
|
||||
--------------------------------------------------------
|
||||
/dnd [Nachricht]
|
||||
Bei dir wird kein Chat mehr auf dem Bildschirm gezeigt. Benutze den Befehl nochmals ohne [Nachricht], um ihn aufzuheben.
|
||||
|
||||
Beispiel: /dnd Ich bin im Spiel und möchte keinen Chat bekommen.
|
||||
|
||||
%who
|
||||
--------------------------------------------------------
|
||||
/who <Kanal>
|
||||
Zeigt eine Liste der Nutzer in <Kanal>
|
||||
|
||||
Beispiel: /who Moderated Support
|
||||
|
||||
%stats astat
|
||||
--------------------------------------------------------
|
||||
/stats [Spieler] [client] (oder auch: /astat)
|
||||
Zeigt die Gewinn/Verlust Statisitk eines [Spielers].
|
||||
|
||||
Example: /stats nomad
|
||||
|
||||
%status users
|
||||
--------------------------------------------------------
|
||||
/users [Spieletag] (oder auch: /status)
|
||||
Zeigt die Anzahl der User, die mit dem Server verbunden sind.
|
||||
Beispiel: /users W3XP
|
||||
|
||||
%time
|
||||
--------------------------------------------------------
|
||||
/time
|
||||
Zeigt den aktuellen Server und deine lokale Zeit an.
|
||||
|
||||
%channel join j
|
||||
--------------------------------------------------------
|
||||
/channel <Kanal> (oder auch: /join /j)
|
||||
Du betrittst den <Kanall>
|
||||
|
||||
Beispiel: /channel Moderated Support
|
||||
|
||||
%rejoin
|
||||
--------------------------------------------------------
|
||||
/rejoin (oder auch: /resign)
|
||||
Entfernt deinen Status als Kanal Operator.
|
||||
|
||||
%me emote
|
||||
--------------------------------------------------------
|
||||
/me <Nachricht> (oder auch: /emote)
|
||||
Zeigt deinen Namen und eine <Nachricht> in einer anderen Farbe.
|
||||
|
||||
Example: /emote will ein Spiel spielen.
|
||||
|
||||
%kick
|
||||
--------------------------------------------------------
|
||||
/kick <Spieler>
|
||||
kickt <Spieler> aus dem Kanal.
|
||||
|
||||
Beispiel: /kick nomad
|
||||
|
||||
%ban
|
||||
--------------------------------------------------------
|
||||
/ban <Spieler> (siehe auch: /unban)
|
||||
Bannt <Spieler> aus dem Kana und hindert ihn daran, zurückzukommen.
|
||||
|
||||
Beispiel: /ban nomad
|
||||
|
||||
%unban
|
||||
--------------------------------------------------------
|
||||
/unban <Spieler>
|
||||
Erlaubt einem gebannten <Spieler>, in den Kanal zurückzukehren.
|
||||
|
||||
Beispiel: /unban nomad
|
||||
|
||||
%serverban
|
||||
--------------------------------------------------------
|
||||
/serverban <Spieler> (siehe auch: /unban)
|
||||
Bannt die IP eines <Spielers> und sperrt seinen Zugang.
|
||||
|
||||
Beispiel: /serverban nomad
|
||||
|
||||
%ipscan
|
||||
--------------------------------------------------------
|
||||
/ipscan <Name or IP-Addresse>
|
||||
Findet alle zur Zeit eingeloggten Benutzer mit dem gesuchten <Namen> oder <IP-Addresse>.
|
||||
|
||||
Beispiel: /ipscan 127.0.0.1
|
||||
Beispiel: /ipscan nomad
|
||||
|
||||
%whoami
|
||||
--------------------------------------------------------
|
||||
/whoami
|
||||
Zeigt an, wo du dich auf dem Server befindest.
|
||||
|
||||
%uptime
|
||||
--------------------------------------------------------
|
||||
/uptime
|
||||
Zeigt an, seit wann der Server laeuft.
|
||||
|
||||
%version
|
||||
--------------------------------------------------------
|
||||
/version
|
||||
Zeigt die Serverversion an.
|
||||
|
||||
%lusers
|
||||
--------------------------------------------------------
|
||||
/lusers
|
||||
Zeigt die Lister der Spieler, die vom Server gebannt wurden.
|
||||
|
||||
%games
|
||||
--------------------------------------------------------
|
||||
/games [Spieletag] [Schwierigkeit]
|
||||
Zeigt eine Liste der Onlinespiele.
|
||||
Setze die [Schwierigkeit] nur für for Diablo Spiele(norm|night|hell)
|
||||
--------------------------------------------------------
|
||||
/games all
|
||||
Zeigt eine Liste aller Spiele.
|
||||
/games l[obby]
|
||||
Zeigt eine Liste der Spiele in der Lobby.
|
||||
|
||||
%channels chs
|
||||
--------------------------------------------------------
|
||||
/channels [Spieletag] (oder auch: /chs)
|
||||
Zeigt eine Liste aller Kanäle für diesen [Spieletag].
|
||||
--------------------------------------------------------
|
||||
/channels all
|
||||
Zeigt eine Liste aller Kanäle.
|
||||
|
||||
%connections con
|
||||
--------------------------------------------------------
|
||||
/connections (oder auch: /con)
|
||||
Zeigt eine Liste der Verbindungen an.
|
||||
|
||||
%finger
|
||||
--------------------------------------------------------
|
||||
/finger <Spieler>
|
||||
Zeigt genaue Informationen über <Spieler> an.
|
||||
|
||||
Beispiel: /finger nomad
|
||||
|
||||
%admins
|
||||
--------------------------------------------------------
|
||||
/admins
|
||||
Zeigt eine Liste der zur Zeit eingeloggten Admins an.
|
||||
|
||||
%reply r
|
||||
--------------------------------------------------------
|
||||
/reply <message> (alias: /r)
|
||||
Antwortet dem letzten Spieler, der dich mit einer <Nachricht> angeflüstert hat.
|
||||
|
||||
Beispiel: /r Hi Kumpel!
|
||||
|
||||
%announce ann
|
||||
--------------------------------------------------------
|
||||
/announce <Nachricht> (oder auch: /ann)
|
||||
Schickt eine <Nachricht> an alle.
|
||||
|
||||
Beispiel: /ann Hallo zusammen!
|
||||
|
||||
%realmann
|
||||
--------------------------------------------------------
|
||||
/realmann <Nachricht>
|
||||
Schickt eine <Nachicht> an alle in der aktuellen Diablo2 Instanz.
|
||||
|
||||
Beispiel: /realmann Hallo zusammen!
|
||||
|
||||
%alert
|
||||
--------------------------------------------------------
|
||||
/alert <Nachricht>
|
||||
Zeigt eine Textbox mit deiner <Nachricht> an alle. Nutze \n um einen Absatz zu setzen.
|
||||
|
||||
Beispiel: /alert Hallo\nzusammen!
|
||||
|
||||
%news
|
||||
--------------------------------------------------------
|
||||
/news
|
||||
Zeigt die Neuigkeiten an.
|
||||
|
||||
%logout quit exit
|
||||
--------------------------------------------------------
|
||||
/logout (alias: /quit /exit)
|
||||
Trennt dich vom Server.
|
||||
|
||||
%kill
|
||||
--------------------------------------------------------
|
||||
/kill {<Benutzername>|#<socket>} [min]
|
||||
Trennt <Spieler> vom Server und bannt die IP des Spielers für [min] Minuten.
|
||||
|
||||
Beispiel: /kill nomad 5
|
||||
|
||||
%killsession
|
||||
--------------------------------------------------------
|
||||
/killsession <SitzungsID> [min]
|
||||
Trennt die Sitzung vom Server und bannt die zugehörige IP-Adresse für [min] Minuten.
|
||||
Beispiel: /killsession 1 5
|
||||
|
||||
%watch
|
||||
--------------------------------------------------------
|
||||
/watch <Spieler>
|
||||
Du wirst über <Spieler> benachrichtigt.
|
||||
|
||||
Beispiel: /watch nomad
|
||||
|
||||
%unwatch
|
||||
--------------------------------------------------------
|
||||
/unwatch <Spieler>
|
||||
Du wirst nicht mehr über <Spieler> benachrichtigt.
|
||||
|
||||
Beispiel: /unwatch nomad
|
||||
|
||||
%watchall
|
||||
--------------------------------------------------------
|
||||
/watchall [Spieletag]
|
||||
Du wirst über die Aktionen von allen benachrichtigt.
|
||||
|
||||
Beispiel: /watchall SEXP
|
||||
|
||||
%unwatchall
|
||||
--------------------------------------------------------
|
||||
/unwatchall [gametag]
|
||||
Du wirst nicht mehr über die Aktionen von allen benachrichtigt.
|
||||
|
||||
Example: /unwatchall SEXP
|
||||
|
||||
%gameinfo
|
||||
--------------------------------------------------------
|
||||
/gameinfo <Spielename>
|
||||
Zeigt Informationen über <Spielename>.
|
||||
|
||||
Beispiel: /gameinfo FS 1v1!!!
|
||||
|
||||
%ladderactivate
|
||||
--------------------------------------------------------
|
||||
/ladderactivate
|
||||
Kopiert aktuelle ladder Statistiken zu aktiven Ladder Statistiken
|
||||
|
||||
%ladderinfo
|
||||
--------------------------------------------------------
|
||||
/ladderinfo <Rang> [Spieletag]
|
||||
Displays ladder information for <rank> of [gametag]
|
||||
Zeigt Ladderinformationen für den <Rang> mi [Spieletag]
|
||||
|
||||
Beispiel: /ladderinfo 1000 SEXP
|
||||
|
||||
%timer
|
||||
--------------------------------------------------------
|
||||
/timer <Dauer> [Nachricht]
|
||||
Zeigt [Nachricht] nach <Dauer> Sekunden.
|
||||
|
||||
Beispiel: /timer 60 eine Minute ist vergangen.
|
||||
|
||||
%netinfo
|
||||
--------------------------------------------------------
|
||||
/netinfo [Spieler]
|
||||
Zeigt die Netzwerkinformationen von [Spieler].
|
||||
|
||||
Beispiel: /netinfo nomad
|
||||
|
||||
%addacct
|
||||
--------------------------------------------------------
|
||||
/addacct <Spieler> <Passwort>
|
||||
Erschafft einen neuen account mit Namen <Spieler> mit dem gewählten <Passwort>.
|
||||
|
||||
Beispiel: /addacct nomad password
|
||||
|
||||
%chpass
|
||||
--------------------------------------------------------
|
||||
/chpass [<Spieler>] <Passwort> - ändert das Passwort von <Spieler>
|
||||
Ändert [<Spieler>]s Passwort zu <Passwort>.
|
||||
Wenn du [<Spieler>] leer lässt, wird das Passwort zu deinem account geändert.
|
||||
|
||||
Beispiel: /chpass nomad password
|
||||
|
||||
%quota
|
||||
--------------------------------------------------------
|
||||
/quota
|
||||
Zeigt, wieviel du geschrieben hast.
|
||||
|
||||
%shutdown
|
||||
--------------------------------------------------------
|
||||
/shutdown [Dauer]
|
||||
Stellt die Shutdown Sequenz auf [Dauer] Sekunden, oder hebt sie auf, wenn du die [Dauer] auf 0 setzt.
|
||||
|
||||
Beispiel: /shutdown 300
|
||||
|
||||
%lock lockacct
|
||||
--------------------------------------------------------
|
||||
/lock <Spieler> [Stunden] [Grund] (oder auch: /lockacct)
|
||||
Sperrt <Spieler>s account, damit er sich nicht einloggen kann.
|
||||
Setze [Stunden] = 0 um dauerhaft zu bannen.
|
||||
|
||||
Beispiel: /lock nomad 0 bye noob!
|
||||
|
||||
%unlock unlockacct
|
||||
--------------------------------------------------------
|
||||
/unlock <Spieler> (oder auch: /unlockacct)
|
||||
Entsperrt <Spieler>s account, damit er sich wieder einloggen kann.
|
||||
|
||||
Beispiel: /unlock nomad
|
||||
|
||||
%mute muteacct
|
||||
--------------------------------------------------------
|
||||
/mute <Spieler> [Stunden] [Grund] (oder auch: /muteacct)
|
||||
Schaltet <Spieler>s account auf stumm, so dass er in Kanälen nichts schreiben kann.
|
||||
Setze [Stunden] = 0 um den Account dauerhaft auf stumm zu schalten.
|
||||
|
||||
Beispiel: /mute nomad 6 lass den spam!
|
||||
|
||||
%unmute unmuteacct
|
||||
--------------------------------------------------------
|
||||
/unmute <Spieler> (oder auch: /unmuteacct)
|
||||
Hebt die Stummschaltung von <Spieler>s account auf, damit er wieder in Kanälen schreiben kann.
|
||||
Beispiel: /unmute nomad
|
||||
|
||||
%friends f
|
||||
--------------------------------------------------------
|
||||
/friends <Befehl> [Optionen] (oder auch: /f)
|
||||
--------------------------------------------------------
|
||||
/friends add <Nutzername>
|
||||
Fügt <Nutzername> deiner Freundesliste hinzu.
|
||||
/friends del <Nutzername>
|
||||
Entfernt <Nutzername> von deiner Freundesliste.
|
||||
/friends promote <Nutzername>
|
||||
Befördert <Nutzername> eine Zeile in deiner Freundesliste.
|
||||
/friends demote <Nutzername>
|
||||
Stuft <Nutzername> eine Zeile in deiner Freundesliste herab.
|
||||
/friends list
|
||||
Zeigt deine Freundesliste.
|
||||
/friends online
|
||||
Zeigt die Liste deiner Freunde, die online sind.
|
||||
/friends msg <Text>
|
||||
Flüstert <Text> an alle deine Freunde, die online sind.
|
||||
|
||||
%mail
|
||||
--------------------------------------------------------
|
||||
/mail <Befehl> [Optionen]
|
||||
--------------------------------------------------------
|
||||
/mail s[end] <Empfaenger> <Nachricht>
|
||||
Sendet einen Brief an <Empfänger> mit der <Nachricht>.
|
||||
/mail r[ead] [index]
|
||||
Liesst den Brief [index]
|
||||
/mail del[ete] {all|<index>}
|
||||
Löscht Briefe im <index> oder [all]e Briefe.
|
||||
|
||||
%flag
|
||||
--------------------------------------------------------
|
||||
/flag <Nummer>
|
||||
Ein Reperaturwerkzeug für Symboltags.
|
||||
|
||||
%tag
|
||||
--------------------------------------------------------
|
||||
/tag <gamename>
|
||||
Ein Reperaturwerkzeug für Klienttags.
|
||||
|
||||
%help
|
||||
--------------------------------------------------------
|
||||
/help [Befehl]
|
||||
Zeigt die Hilfe zu [Befehl].
|
||||
|
||||
Beispiel: /help whisper
|
||||
|
||||
%ipban
|
||||
--------------------------------------------------------
|
||||
/ipban <Befehl> [Option] [Zeit]
|
||||
--------------------------------------------------------
|
||||
/ipban l[ist]
|
||||
Zeigt eine Liste der gebannten IP-Adressen.
|
||||
/ipban c[heck] <IP>
|
||||
Überprüft ob die IP-Adresse <IP> gebannt ist.
|
||||
/ipban d[el] <IP|index>
|
||||
Loescht den Ban der IP Adresse <IP> oder den <index> dazu.
|
||||
/ipban a[dd] <IP> [time]
|
||||
Bannt IP Addresse <IP> für [Zeit] Minuten. [Zeit] = 0 - dauerhafter Bann.
|
||||
|
||||
%set
|
||||
--------------------------------------------------------
|
||||
/set <account> <Schlüssel> [Wert]
|
||||
Setzt oder den Wert von <Schlüssel> für den account <account>, oder setzt ihn zurück.
|
||||
Setze [Wert] = null um den Wert zurückzusetzen.
|
||||
|
||||
Beispiel: /set nomad BNET\auth\botlogin true
|
||||
Beispiel: /set nomad Record\SEXP\0_wins 999
|
||||
|
||||
%motd
|
||||
--------------------------------------------------------
|
||||
/motd
|
||||
Zeigt die MOTD.
|
||||
|
||||
%tos
|
||||
--------------------------------------------------------
|
||||
/tos /warranty /license
|
||||
Zeigt die Endbenutzerbedingungen.
|
||||
|
||||
%admin
|
||||
--------------------------------------------------------
|
||||
/admin [+|-]<Spieler>
|
||||
Befördert/degradiert <Spieler> zum/als Server Administrator.
|
||||
|
||||
Beispiel: /admin +nomad
|
||||
|
||||
%rehash
|
||||
--------------------------------------------------------
|
||||
/rehash <Modus>
|
||||
Zwingt den Server, eine spezifische Konfig. zu laden. Setze auf "alle" um alle Konfigs neu zu laden.
|
||||
<Modus> = alle | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua
|
||||
|
||||
%clan
|
||||
--------------------------------------------------------
|
||||
/clan <Befehl> [Option]
|
||||
--------------------------------------------------------
|
||||
/clan create <Clantag> <Clanname>
|
||||
Erschafft einen neuen Clan (max <Clantag> Länge = 4; Freizeichen sind erlaubt im <Clanname>n)
|
||||
|
||||
Befehle für clan Mitglieder:
|
||||
/clan m[sg] <Nachricht> (oder auch: [w]hisper)
|
||||
Fluestert eine Nachricht an alle deine Clan Mitglieder
|
||||
/clan inv[ite] <Nutzername>
|
||||
Laed <Nutzername> in deinen Clan ein.
|
||||
/clan inv[ite] get
|
||||
Zeigt, in welchen Clan du eingeladen wurdest.
|
||||
/clan inv[ite] accept
|
||||
Akzeptiert eine Clan Einladung.
|
||||
/clan inv[ite] decline
|
||||
Lehnt eine Clan Einladung ab.
|
||||
|
||||
Befehle für Clanleader:
|
||||
/clan motd <Nachricht>
|
||||
Updated die Clan "Nachricht des Tages".
|
||||
/clan pub[lic] (oder auch: pub)
|
||||
Öffnet den Clan Kanal für andere.
|
||||
/clan priv[ate] (oder auch: priv)
|
||||
Schliesst den Clan Kanal,nur Mitglieder haben zutritt.
|
||||
/clan dis[band]
|
||||
Löst den Clan Kanal auf.
|
||||
|
||||
%ping p latency
|
||||
--------------------------------------------------------
|
||||
/ping (oder auch: /p /latency)
|
||||
Zeigt deinen Ping zum Server.
|
||||
|
||||
%command_groups cg
|
||||
--------------------------------------------------------
|
||||
/command_groups <Befehl> <Nutzer> [Gruppen] (oder auch: /cg)
|
||||
--------------------------------------------------------
|
||||
/cg list <user>
|
||||
Zeigt die Befehlgruppe zu <Nutzer>.
|
||||
/cg add <Nutzer> <Gruppe(n)>
|
||||
Fügt eine Befehlgruppe(n) zu <Nutzer> hinzu.
|
||||
/cg del <Nutzer> <Gruppe(n)>
|
||||
Löscht Befehlgruppe(n) von <Nutzer>.
|
||||
|
||||
%operator
|
||||
--------------------------------------------------------
|
||||
/operator [+|-]<Spieler> (oder auch: /op)
|
||||
Befoerdert/degradiert <Spieler> zum/vom Server Operator.
|
||||
|
||||
Beispiel: /operator +nomad
|
||||
|
||||
%aop
|
||||
--------------------------------------------------------
|
||||
/aop <Nutzername>
|
||||
Befördert <Nutzername> zum Kanal Administrator.
|
||||
|
||||
Beispiel: /aop nomad
|
||||
|
||||
%op
|
||||
--------------------------------------------------------
|
||||
/op <Nutzername>
|
||||
Befördert <Nutzername> zum Kanal Operator.
|
||||
|
||||
Beispiel: /op nomad
|
||||
%deop
|
||||
--------------------------------------------------------
|
||||
/deop <Nutzername>
|
||||
Degradiert <Nutzername> als Kanal Administrator oder Operator.
|
||||
|
||||
Beispiel: /deop nomad
|
||||
|
||||
%tmpop
|
||||
--------------------------------------------------------
|
||||
/tmpop <Nutzername>
|
||||
Befördert <Nutzername> zum vorübergehenden Kanal Operator.
|
||||
|
||||
Beispiel: /tmpop <username>
|
||||
|
||||
%vop
|
||||
--------------------------------------------------------
|
||||
/vop <Nutzername>
|
||||
Fügt <Nutzername> der VOP Liste hinzu.
|
||||
|
||||
Beispiel: /vop nomad
|
||||
|
||||
%voice
|
||||
--------------------------------------------------------
|
||||
/voice <Nutzername>
|
||||
Gibt vorübergehend Voice Rechte an <Nutzername>.
|
||||
Beispiel: /voice nomad
|
||||
|
||||
%devoice
|
||||
--------------------------------------------------------
|
||||
/devoice <username>
|
||||
Entfernt <Nutzername> von der VOP Liste und vorübergehende Voice Rechte.
|
||||
|
||||
Beispiel: /devoice nomad
|
||||
|
||||
%topic
|
||||
--------------------------------------------------------
|
||||
/topic [Nachricht]
|
||||
Setzt oder zeigt die aktuelle Kanal Überschrift.
|
||||
|
||||
Beispiel: /topic Supported is given in this channel...\n(some text on a new line)
|
||||
|
||||
%moderate
|
||||
--------------------------------------------------------
|
||||
/moderate
|
||||
schaltet den aktuellen Moderationsstatus des Kanals um.
|
||||
|
||||
%clearstats
|
||||
--------------------------------------------------------
|
||||
/clearstats <Spieler> <Klienttag>
|
||||
Löscht die Statistik von <Spieler>s <Klienttag> , dabei kann <Klienttag> jeder zulässige Klient oder JEDER Klient sein.
|
||||
Unterstützte Klienten: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP
|
||||
|
||||
Beispiel: /clearstats nomad SEXP
|
||||
|
||||
%find
|
||||
--------------------------------------------------------
|
||||
/find <Unterbegriff>
|
||||
Findet einen Nutzer mit dem <Teilbegriff> in seinem Nutzernamen. Der <Teilbegriff> MUSS in Kleinbuchstaben stehen!
|
||||
|
||||
%save
|
||||
--------------------------------------------------------
|
||||
/save
|
||||
Zwingt den Server, Änderungen am Account und Clan Änderungen in der Datenbank zu speichern.
|
||||
|
||||
|
||||
|
||||
%icon
|
||||
--------------------------------------------------------
|
||||
/icon [Name]
|
||||
Setzt ein spezifisches Icon für normale Nutzer.
|
||||
Nutze /icon ohne [Name] um die Liste der verfügbaren Icons in deinem Vorrat anzuzeigen.
|
||||
--------------------------------------------------------
|
||||
Syntax fuer Operatoren/Admins:
|
||||
/icon a[dd] <Nutzername> <icon>
|
||||
Fügt ein Icon dem Vorrat eines Nutzers hinzu.
|
||||
/icon d[el] <Nutzername> <icon>
|
||||
Entfernt ein Icon aus dem Vorrat eines Nutzers
|
||||
/icon s[et] <Nutzername> <icon>
|
||||
Setzt ein spezifisches Icon für den Nutzer, ohne es seinem Vorrat hinzuzufügen.
|
||||
/icon l[ist] <Nutzername>
|
||||
Zeigt die Icons im Vorrat des Nutzers an.
|
||||
/icon l[ist]
|
||||
Zeigt die auf dem Server vorrätigen Icons an, die Nutzern zugewiesen werden können.
|
||||
|
||||
%language /lang
|
||||
--------------------------------------------------------
|
||||
/lang [code]
|
||||
Stellt deine Sprache auf eine andere Übersetzung um:
|
||||
|
||||
%quiz
|
||||
--------------------------------------------------------
|
||||
/quiz <Befehl> [Option]
|
||||
Trivia Quiz Spiel
|
||||
--------------------------------------------------------
|
||||
/quiz start <Name>
|
||||
Startet ein Spiel mit der Datenbak <Name> im aktuellen Kanal
|
||||
/quiz stop
|
||||
Beendet das Quiz erzwungen.
|
||||
/quiz stats [Nutzername]
|
||||
Zeigt die Quiz Statistik für [Nutzername]
|
||||
/quiz stats
|
||||
Zeigt die Bestenliste des Quiz
|
||||
Nutzername
|
|
@ -2,11 +2,11 @@
|
|||
%ILaufende Version %v auf %h.
|
||||
%IDer Server ist von %H gehostet
|
||||
%I
|
||||
%IEs sind %a Benutzerprofile auf dem server.
|
||||
%IEs sind %a Benutzerprofile auf dem Server.
|
||||
%IAktuell sind %U Spieler in %G Spielen von %N,
|
||||
%Iund %u Spieler spielen %g Spiele und chatten in %c Channels.
|
||||
%IEin Problem mit den Kommandos? Schreibe /help und
|
||||
%Ilerne mehr über die Kommandos.
|
||||
%Iund %u Spieler spielen %g Spiele und chatten in %c Kanälen.
|
||||
%IEin Problem mit den Befehlen? Schreibe /help und
|
||||
%Ilerne mehr über die Befehle.
|
||||
%IType /language to switch translation.
|
||||
%I
|
||||
%M%m
|
||||
%M%m
|
||||
|
|
15
conf/i18n/deDE/chathelp-war3.txt
Normal file
15
conf/i18n/deDE/chathelp-war3.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
PvPGN Bnet Emulation Chat Hilfe Befehle
|
||||
|
||||
Neue Befehle:
|
||||
|
||||
nutze /f help für Hilfe mit der Freundesliste.
|
||||
nutze /users um zu sehen, welche Nutzer online sind.
|
||||
nutze /w or /msg <Nutzername> um Nutzer anzuflüstern.
|
||||
nutze /join <Kanal> um einem Kanal beizutreten
|
||||
|
||||
Fuerr Chan Ops:
|
||||
|
||||
nutze /ban <Nutzername> um einen Nutzer aus dem Kanal zu bannen.
|
||||
nutze /kick <Nutzername> um einen Nutzer aus dem Kanal zu kicken.
|
||||
|
||||
Für eine genauere Hilfe schreibe: /help
|
2078
conf/i18n/deDE/common.xml
Normal file
2078
conf/i18n/deDE/common.xml
Normal file
File diff suppressed because it is too large
Load diff
20
conf/i18n/deDE/newaccount.txt
Normal file
20
conf/i18n/deDE/newaccount.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
Sie sind zur Zeit mit einem PvPGN Server (Player -vs- Player Gaming Network) verbunden.
|
||||
|
||||
PvPGN Allgemeine Geschaeftsbedingungen:
|
||||
|
||||
PvPGN ist ein Battle.net(R) Emulationsserver und ist auf keine Weise verbunden mit bnetd, warforge, oder Blizzard Entertainment(R).
|
||||
PvPGN wird zur Verfügung gestellt "wie er ist" ohne Gewährleistungen jedweder Art.
|
||||
Wir unterstützen Softwarepiraterie nicht und halten Sie an, eine legale Kopie der Spiele zu erwerben, die Sie auf unserem Server spielen möchten.
|
||||
|
||||
1. Inhalte, die auf PvPGN gefunden werden.
|
||||
PvPGN unterstützt oder garantiert nicht für die Genauigkeit, den Wahrheitsgehalt oder die Zuverlässigkeit jedweder Informationen, darunter auch Meinungen und Ratschläge, die auf oder über PvPGN vermittelt werden. Jede und alle Aussagen, die in Foren, Chatverläufen oder in Spielen gemacht werden, geben nur die Meinung ihrer Urheber wieder.
|
||||
|
||||
2. Ausschluss von Gewährleistung.
|
||||
PvPGN wird gestellt "wie er ist" ohne Gewährleistungen irgendeiner Art. PvPGN gewährleistet nicht, dass ihr Programm ungestört und fehlerfrei läuft.
|
||||
|
||||
3. begrenzte Haftbarkeit
|
||||
PvPGN ist in keiner Weise haftbar für Verlust oder Schaden jedweder Art, der aus der Benutzung von PvPGN resultiert. Das schliesst ein, ist aber nicht begrenzt auf, Verlust von Geschäftswerten, Computerfehlern oder -Versagen und jedwede Art von Schaden, Verlust, sei er kommerziell oder privat.
|
||||
Battle.net(R) und Blizzard Entertainment(R) sind Warenzeichen oder eingetragene Warenzeichen von Blizzard Entertainment in den Vereinigten Staaten von Amerika und oder anderen Staaten.
|
||||
|
||||
Davon abgesehen... Viel Spaß...
|
||||
PvPGN Projekt Seite: http://pvpgn.berlios.de/
|
21
conf/i18n/deDE/termsofservice.txt
Normal file
21
conf/i18n/deDE/termsofservice.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
Sie sind zur Zeit mit einem PvPGN Server (Player -vs- Player Gaming Network) verbunden.
|
||||
|
||||
PvPGN Allgemeine Geschaeftsbedingungen:
|
||||
|
||||
PvPGN ist ein Battle.net(R) Emulationsserver und ist auf keine Weise verbunden mit bnetd, warforge, oder Blizzard Entertainment(R).
|
||||
PvPGN wird zur Verfügung gestellt "wie er ist" ohne Gewährleistungen jedweder Art.
|
||||
Wir unterstützen Softwarepiraterie nicht und halten Sie an, eine legale Kopie der Spiele zu erwerben, die Sie auf unserem Server spielen möchten.
|
||||
|
||||
11. Inhalte, die auf PvPGN gefunden werden.
|
||||
PvPGN unterstützt oder garantiert nicht für die Genauigkeit, den Wahrheitsgehalt oder die Zuverlässigkeit jedweder Informationen, darunter auch Meinungen und Ratschläge, die durch oder über PvPGN vermittelt werden. Jede und alle Aussagen, die in Foren, Chatverläufen oder in Spielen gemacht werden, geben nur die Meinung ihrer Urheber wieder.
|
||||
|
||||
2. Ausschluss von Gewaehrleistung.
|
||||
PvPGN wird gestellt "wie er ist" ohne Gewährleistungen irgendeiner Art. PvPGN gewährleistet nicht, dass ihr Programm ungestört und fehlerfrei läuft.
|
||||
|
||||
3. begrenzte Haftbarkeit
|
||||
PvPGN ist in keiner Weise haftbar für Verlust oder Schaden jedweder Art, der aus der Benutzung von PvPGN resultiert. Das schliesst ein, ist aber nicht begrenzt auf, Verlust von Geschäftswerten, Computerfehlern oder -Versagen und jedwede Art von Schaden, Verlust, sei er kommerziell oder privat.
|
||||
Battle.net(R) und Blizzard Entertainment(R) sind Warenzeichen oder eingetragene Warenzeichen von Blizzard Entertainment in den Vereinigten Staaten von Amerika und oder anderen Staaten.
|
||||
|
||||
|
||||
Davon abgesehen... Viel Spaß...
|
||||
PvPGN Projekt Seite: http://pvpgn.berlios.de/
|
11
conf/i18n/deDE/w3motd.txt
Normal file
11
conf/i18n/deDE/w3motd.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF
|
||||
|
||||
Es sind zur Zeit %U Nutzer in %G Spielen von %N und %u Nutzer spielen %g Spiele and chatten in %c Kanälen.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dieser Text ist nicht sichtbar wegen der 11 Zeilen Begrenzung!
|
|
@ -2,6 +2,27 @@
|
|||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="esES">Spanish</language>
|
||||
<countries>
|
||||
<country>ESP</country>
|
||||
<country>ARG</country>
|
||||
<country>BOL</country>
|
||||
<country>CHL</country>
|
||||
<country>COL</country>
|
||||
<country>CRI</country>
|
||||
<country>DOM</country>
|
||||
<country>ECU</country>
|
||||
<country>SLV</country>
|
||||
<country>GTM</country>
|
||||
<country>HND</country>
|
||||
<country>MEX</country>
|
||||
<country>NIC</country>
|
||||
<country>PAN</country>
|
||||
<country>PRY</country>
|
||||
<country>PER</country>
|
||||
<country>PRI</country>
|
||||
<country>URY</country>
|
||||
<country>VEN</country>
|
||||
</countries>
|
||||
<authors>
|
||||
<author name="plissken2097" email="formato_ahorro@hotmail.com" />
|
||||
</authors>
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
Actualmente está conectado al Servidor PvPGN ( Player -vs- Player Gaming Network)
|
||||
|
||||
TÉRMINOS DE USO del PvPGN:
|
||||
|
||||
PVPGN es una emulación del servidor de Battle.net(r) y de ninguna manera afiliado con bnetd, warforge o Blizzard Entertainment (R).
|
||||
PVPGN está disponible al público "tal y como es" sin ningún tipo de garantias.
|
||||
No apoyamos la idea de software Pirata y incitamos a todos a obtener una copia legal de cualquiera de los juegos disponibles en nuestros servidores.
|
||||
|
||||
1. Información sobre PvPGN.
|
||||
PvPGN no aprueba ni se apela a la precisión, veracidad o fiabilidad de cualquier información ( incluídas declaraciones sobre opinión o consejos) dada en o por cualquier medio de PvPGN. Cualquiera y todas las declaraciones hechas en foros, chat o durante juegos reflejan solamente el parecer de su autor.
|
||||
|
||||
2. Exclusión de Garantía.
|
||||
PvPGN está disponible al público "tal y como es" sin ningún tipo de garantias. PvPGN no garantiza que su programa sea ininterrumpido o libre de errores.
|
||||
|
||||
3. Limitaciones de Responsabilidad.
|
||||
PvPGN es de ninguna manera responsable por pérdidas o daños de cualquier tipo al usar PvPGN, incluyendo pero no limitándose a, pérdida de libre voluntad, paro laboral, fallos o defectos en los ordenadores, o cualquier y todos otros tipos de daños o perdidas, comerciales o de cualquier otro tipo.
|
||||
|
||||
Battle.net(R) y Blizzard Entertainment(R) son marcas registrada de Blizzard Entertainment en los E.U. y/o otros países.
|
||||
|
||||
Aparte de todo esto... Disfrutar jugando..
|
||||
PvPGN Project Page: http://pvpgn.berlios.de/
|
||||
Actualmente está conectado al Servidor PvPGN ( Player -vs- Player Gaming Network)
|
||||
|
||||
TÉRMINOS DE USO del PvPGN:
|
||||
|
||||
PVPGN es una emulación del servidor de Battle.net(r) y de ninguna manera afiliado con bnetd, warforge o Blizzard Entertainment (R).
|
||||
PVPGN está disponible al público "tal y como es" sin ningún tipo de garantias.
|
||||
No apoyamos la idea de software Pirata y incitamos a todos a obtener una copia legal de cualquiera de los juegos disponibles en nuestros servidores.
|
||||
|
||||
1. Información sobre PvPGN.
|
||||
PvPGN no aprueba ni se apela a la precisión, veracidad o fiabilidad de cualquier información ( incluídas declaraciones sobre opinión o consejos) dada en o por cualquier medio de PvPGN. Cualquiera y todas las declaraciones hechas en foros, chat o durante juegos reflejan solamente el parecer de su autor.
|
||||
|
||||
2. Exclusión de Garantía.
|
||||
PvPGN está disponible al público "tal y como es" sin ningún tipo de garantias. PvPGN no garantiza que su programa sea ininterrumpido o libre de errores.
|
||||
|
||||
3. Limitaciones de Responsabilidad.
|
||||
PvPGN es de ninguna manera responsable por pérdidas o daños de cualquier tipo al usar PvPGN, incluyendo pero no limitándose a, pérdida de libre voluntad, paro laboral, fallos o defectos en los ordenadores, o cualquier y todos otros tipos de daños o perdidas, comerciales o de cualquier otro tipo.
|
||||
|
||||
Battle.net(R) y Blizzard Entertainment(R) son marcas registrada de Blizzard Entertainment en los E.U. y/o otros países.
|
||||
|
||||
Aparte de todo esto... Disfrutar jugando..
|
||||
PvPGN Project Page: http://pvpgn.berlios.de/
|
||||
|
|
15
conf/i18n/frFR/common.xml
Normal file
15
conf/i18n/frFR/common.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="frFR">French</language>
|
||||
<countries>
|
||||
<country>FRA</country>
|
||||
<country>BEL</country>
|
||||
<country>CAN</country>
|
||||
<country>FRA</country>
|
||||
<country>LUX</country>
|
||||
<country>MCO</country>
|
||||
<country>CHE</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
10
conf/i18n/itIT/common.xml
Normal file
10
conf/i18n/itIT/common.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="itIT">Italian</language>
|
||||
<countries>
|
||||
<country>ITA</country>
|
||||
<country>CHE</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
9
conf/i18n/jpJA/common.xml
Normal file
9
conf/i18n/jpJA/common.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="jpJA">Japanese</language>
|
||||
<countries>
|
||||
<country>JPN</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
9
conf/i18n/koKR/common.xml
Normal file
9
conf/i18n/koKR/common.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="koKR">Korean</language>
|
||||
<countries>
|
||||
<country>KOR</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
21
conf/i18n/koKR/termsofservice.txt
Normal file
21
conf/i18n/koKR/termsofservice.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
현재 PvPGN 서버를 연걸했습니다. (플레이어 대 플레이어 게임잉 네트워크)
|
||||
|
||||
PvPGN 조건:
|
||||
|
||||
PvPGN은 배틀넷 (Battle.net®) 에물레이션 서버 라고 bnetd, warforge, Blizzard Entertainment과 제휴하고 있지 않다.
|
||||
PvPGN이 그대로 제공하고 보증서를 없다.
|
||||
불법 복제된 소프트웨어의 사용을 지지하지 않다. 우리의 서버들에서 게임을 하려고 합법적인 버전을 구입하세요.
|
||||
|
||||
1. Information found on PvPGN.
|
||||
PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author.
|
||||
|
||||
2. Disclaimer of Warrenty.
|
||||
PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free.
|
||||
|
||||
3. Limitations of Liability
|
||||
PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise.
|
||||
|
||||
Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries.
|
||||
|
||||
Besides all this... Happy gaming..
|
||||
PvPGN Project Page: http://pvpgn.berlios.de/
|
10
conf/i18n/nlNL/common.xml
Normal file
10
conf/i18n/nlNL/common.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="nlNL">Dutch</language>
|
||||
<countries>
|
||||
<country>NLD</country>
|
||||
<country>BEL</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
9
conf/i18n/plPL/common.xml
Normal file
9
conf/i18n/plPL/common.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="plPL">Polish</language>
|
||||
<countries>
|
||||
<country>POL</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
10
conf/i18n/ptBR/common.xml
Normal file
10
conf/i18n/ptBR/common.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="ptBR">Portuguese</language>
|
||||
<countries>
|
||||
<country>BRA</country>
|
||||
<country>PRT</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
|
@ -1,12 +1,12 @@
|
|||
%EПривет %l, добро пожаловать на %s!
|
||||
%IВерсия сервера %v.
|
||||
%IСервер расположен у %H (%h)
|
||||
%IСервер версии %v на %h.
|
||||
%IСервер расположен на %H (%h)
|
||||
%I
|
||||
%IНа сервере зарегистрировано %a аккаунтов.
|
||||
%IСейчас %G игр и %U игроков в %N
|
||||
%Iиз них %u находятся в %g играх и общаются на %c каналах.
|
||||
%IПроблемы с использованием команды? Введите /help, чтобы
|
||||
%Iузнать больше о командах чата.
|
||||
%IНаберите /language, чтобы переключить язык перевода.
|
||||
%I
|
||||
%IВведите /help для получения помощи по командам чата
|
||||
%IType /language to switch translation.
|
||||
%I
|
||||
%M%m
|
||||
%M%m
|
||||
|
|
|
@ -2,14 +2,14 @@ PvPGN Bnet Emulation Chat Help Commands
|
|||
|
||||
Новые команды:
|
||||
|
||||
наберите /f help для вызова справки списке друзей
|
||||
наберите /f help для вызова справки по списку друзей
|
||||
наберите /users для просмотра пользоватей в онлайне
|
||||
наберите /w или /msg <имяпользователя> для личного сообщения
|
||||
наберите /w или /msg <имя_пользователя> для личного сообщения
|
||||
наберите /join <канал> для присоединения к каналу
|
||||
|
||||
Для операторов каналов:
|
||||
|
||||
наберите /ban <имяпользователя> чтобы забанить игрока на данном канале
|
||||
наберите /kick <имяпользователя> чтобы выкинуть пользователя с этого канала
|
||||
наберите /ban <имя_пользователя>, чтобы забанить игрока на данном канале
|
||||
наберите /kick <имя_пользователя>, чтобы кикнуть пользователя с этого канала
|
||||
|
||||
Для дальнейшей помощи наберите: /help
|
||||
Для более подробной справки наберите: /help
|
||||
|
|
14
conf/i18n/ruRU/common.xml
Normal file
14
conf/i18n/ruRU/common.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="ruRU">Russian</language>
|
||||
<countries>
|
||||
<country>RUS</country>
|
||||
<country>UZB</country>
|
||||
<country>TTT</country>
|
||||
<country>UKR</country>
|
||||
<country>AZE</country>
|
||||
<country>ARM</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
10
conf/i18n/svSE/common.xml
Normal file
10
conf/i18n/svSE/common.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="svSE">Swedish</language>
|
||||
<countries>
|
||||
<country>SWE</country>
|
||||
<country>FIN</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
|
@ -1,21 +1,21 @@
|
|||
You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network)
|
||||
|
||||
PvPGN TERMS OF USE:
|
||||
|
||||
PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R).
|
||||
PvPGN is provided "as is" without warrenties of any kind.
|
||||
We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers.
|
||||
|
||||
1. Information found on PvPGN.
|
||||
PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author.
|
||||
|
||||
2. Disclaimer of Warrenty.
|
||||
PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free.
|
||||
|
||||
3. Limitations of Liability
|
||||
PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise.
|
||||
|
||||
Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries.
|
||||
|
||||
Besides all this... Happy gaming..
|
||||
PvPGN Project Page: http://pvpgn.berlios.de/
|
||||
You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network)
|
||||
|
||||
PvPGN TERMS OF USE:
|
||||
|
||||
PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R).
|
||||
PvPGN is provided "as is" without warrenties of any kind.
|
||||
We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers.
|
||||
|
||||
1. Information found on PvPGN.
|
||||
PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author.
|
||||
|
||||
2. Disclaimer of Warrenty.
|
||||
PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free.
|
||||
|
||||
3. Limitations of Liability
|
||||
PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise.
|
||||
|
||||
Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries.
|
||||
|
||||
Besides all this... Happy gaming..
|
||||
PvPGN Project Page: http://pvpgn.berlios.de/
|
||||
|
|
10
conf/i18n/zhCN/common.xml
Normal file
10
conf/i18n/zhCN/common.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="zhCN">Chinese Simplified</language>
|
||||
<countries>
|
||||
<country>CHN</country>
|
||||
<country>SGP</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
11
conf/i18n/zhTW/common.xml
Normal file
11
conf/i18n/zhTW/common.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<meta>
|
||||
<language tag="zhTW">Chinese Traditional</language>
|
||||
<countries>
|
||||
<country>TWN</country>
|
||||
<country>MCO</country>
|
||||
<country>HKG</country>
|
||||
</countries>
|
||||
</meta>
|
||||
</root>
|
|
@ -30,6 +30,8 @@
|
|||
# Enable icon sets below
|
||||
custom_icons = true
|
||||
|
||||
# Command groups for master users who can manage icons of other users (allowed: 12345678)
|
||||
master_commandgroups = 678
|
||||
|
||||
|
||||
##############################################################################
|
||||
|
@ -38,18 +40,18 @@ custom_icons = true
|
|||
#----------------------------------------------------------------------------#
|
||||
|
||||
[W3XP]
|
||||
solo_level = "Record\W3XP\solo_level"
|
||||
solo_xp = "Record\W3XP\solo_xp"
|
||||
solo_wins = "Record\W3XP\solo_wins"
|
||||
solo_losses = "Record\W3XP\solo_losses"
|
||||
team_level = "Record\W3XP\team_level"
|
||||
team_xp = "Record\W3XP\team_xp"
|
||||
team_wins = "Record\W3XP\team_wins"
|
||||
team_losses = "Record\W3XP\team_losses"
|
||||
ffa_level = "Record\W3XP\ffa_level"
|
||||
ffa_xp = "Record\W3XP\ffa_xp"
|
||||
ffa_wins = "Record\W3XP\ffa_wins"
|
||||
ffa_losses = "Record\W3XP\ffa_losses"
|
||||
solo_level = "Record\W3XP\solo\level"
|
||||
solo_xp = "Record\W3XP\solo\xp"
|
||||
solo_wins = "Record\W3XP\solo\wins"
|
||||
solo_losses = "Record\W3XP\solo\losses"
|
||||
team_level = "Record\W3XP\team\level"
|
||||
team_xp = "Record\W3XP\team\xp"
|
||||
team_wins = "Record\W3XP\team\wins"
|
||||
team_losses = "Record\W3XP\team\losses"
|
||||
ffa_level = "Record\W3XP\ffa\level"
|
||||
ffa_xp = "Record\W3XP\ffa\xp"
|
||||
ffa_wins = "Record\W3XP\ffa\wins"
|
||||
ffa_losses = "Record\W3XP\ffa\losses"
|
||||
username = "BNET\acct\username"
|
||||
|
||||
[icons]
|
||||
|
@ -80,18 +82,18 @@ diablo DRTL
|
|||
##############################################################################
|
||||
# Starcraft icon set #
|
||||
# Use Bni Icon Builder to edit icons.bni #
|
||||
# https://github.com/HarpyWar/bni-icon-builder #
|
||||
# https://github.com/pvpgn/bni-icon-builder #
|
||||
#----------------------------------------------------------------------------#
|
||||
|
||||
[SEXP]
|
||||
rating1 = "Record\SEXP\1_rating"
|
||||
wins1 = "Record\SEXP\1_wins"
|
||||
losses1 = "Record\SEXP\1_losses"
|
||||
disconnects1 = "Record\SEXP\1_disconnects"
|
||||
rating0 = "Record\SEXP\0_rating"
|
||||
wins0 = "Record\SEXP\0_wins"
|
||||
losses0 = "Record\SEXP\0_losses"
|
||||
disconnects0 = "Record\SEXP\0_disconnects"
|
||||
ladder_rating = "Record\SEXP\1\rating"
|
||||
ladder_wins = "Record\SEXP\1\wins"
|
||||
ladder_losses = "Record\SEXP\1\losses"
|
||||
ladder_disconnects = "Record\SEXP\1\disconnects"
|
||||
normal_rating = "Record\SEXP\0\rating"
|
||||
normal_wins = "Record\SEXP\0\wins"
|
||||
normal_losses = "Record\SEXP\0\losses"
|
||||
normal_disconnects = "Record\SEXP\0\disconnects"
|
||||
username = "BNET\acct\username"
|
||||
|
||||
[icons]
|
||||
|
@ -111,8 +113,8 @@ username = "BNET\acct\username"
|
|||
|
||||
[stats]
|
||||
{{username}}'s record:
|
||||
Ladder games: [{{rating1->rank}}] {{rating1}} pts ({{wins1}}/{{losses1}}/{{disconnects1}})
|
||||
Normal games: [{{rating0->rank}}] {{rating0}} pts ({{wins0}}/{{losses0}}/{{disconnects0}})
|
||||
Ladder games: [{{ladder_rating->rank}}] {{ladder_rating}} pts ({{ladder_wins}}/{{ladder_losses}}/{{ladder_disconnects}})
|
||||
Normal games: [{{normal_rating->rank}}] {{normal_rating}} pts ({{normal_wins}}/{{normal_losses}}/{{normal_disconnects}})
|
||||
[/stats]
|
||||
|
||||
[iconstash]
|
||||
|
@ -120,3 +122,88 @@ demon EYES
|
|||
warcraft WAR3
|
||||
diablo DRTL
|
||||
[/iconstash]
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Warcraft II icon set #
|
||||
# Use Bni Icon Builder to edit icons.bni #
|
||||
# https://github.com/pvpgn/bni-icon-builder #
|
||||
#----------------------------------------------------------------------------#
|
||||
|
||||
[W2BN]
|
||||
ironman_rating = "Record\W2BN\3\rating"
|
||||
ironman_wins = "Record\W2BN\3\wins"
|
||||
ironman_losses = "Record\W2BN\3\losses"
|
||||
ironman_disconnects = "Record\W2BN\3\disconnects"
|
||||
ladder_rating = "Record\W2BN\1\rating"
|
||||
ladder_wins = "Record\W2BN\1\wins"
|
||||
ladder_losses = "Record\W2BN\1\losses"
|
||||
ladder_disconnects = "Record\W2BN\1\disconnects"
|
||||
normal_rating = "Record\W2BN\0\rating"
|
||||
normal_wins = "Record\W2BN\0\wins"
|
||||
normal_losses = "Record\W2BN\0\losses"
|
||||
normal_disconnects = "Record\W2BN\0\disconnects"
|
||||
username = "BNET\acct\username"
|
||||
|
||||
[icons]
|
||||
1000 n00b NOOB
|
||||
1250 Chobo+ CHO1
|
||||
1500 Chobo++ CHO2
|
||||
1750 Chobo+++ CHO3
|
||||
2000 Hasu+ HAS1
|
||||
2300 Hasu++ HAS2
|
||||
2650 Hasu+++ HAS3
|
||||
3000 Gosu+ GOS1
|
||||
3300 Gosu++ GOS2
|
||||
3650 Gosu+++ GOS3
|
||||
4000 Mega Gosu GOSU
|
||||
5500 Father MEGA
|
||||
[/icons]
|
||||
|
||||
[stats]
|
||||
{{username}}'s record:
|
||||
Ladder games: [{{ladder_rating->rank}}] {{ladder_rating}} pts ({{ladder_wins}}/{{ladder_losses}}/{{ladder_disconnects}})
|
||||
Normal games: [{{normal_rating->rank}}] {{normal_rating}} pts ({{normal_wins}}/{{normal_losses}}/{{normal_disconnects}})
|
||||
IronMan games: [{{ironman_rating->rank}}] {{ironman_rating}} pts ({{ironman_wins}}/{{ironman_losses}}/{{ironman_disconnects}})
|
||||
[/stats]
|
||||
|
||||
[iconstash]
|
||||
demon EYES
|
||||
diablo DRTL
|
||||
[/iconstash]
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Diablo: Retail icon set #
|
||||
# Use Bni Icon Builder to edit icons.bni #
|
||||
# https://github.com/pvpgn/bni-icon-builder #
|
||||
#----------------------------------------------------------------------------#
|
||||
|
||||
[DRTL]
|
||||
class = "Record\DRTL\0\class"
|
||||
level = "Record\DRTL\0\level"
|
||||
dexterity = "Record\DRTL\0\dexterity"
|
||||
magic = "Record\DRTL\0\magic"
|
||||
vitality = "Record\DRTL\0\vitality"
|
||||
strength = "Record\DRTL\0\strength"
|
||||
gold = "Record\DRTL\0\gold"
|
||||
diablo_kills = "Record\DRTL\0\diablo kills"
|
||||
username = "BNET\acct\username"
|
||||
|
||||
[icons]
|
||||
0 warrior DRTL
|
||||
1 rogue DRTL
|
||||
2 sorcerer DRTL
|
||||
[/icons]
|
||||
|
||||
[stats]
|
||||
{{username}}'s record:
|
||||
level: {{level}}
|
||||
class: {{class->rank}}
|
||||
stats: {{strength}} str / {{magic}} mag / {{dexterity}} dex / {{vitality}} vit / {{gold}} gold
|
||||
Diablo kills: {{diablo_kills}}
|
||||
[/stats]
|
||||
|
||||
[iconstash]
|
||||
demon EYES
|
||||
[/iconstash]
|
||||
|
|
|
@ -26,15 +26,15 @@
|
|||
"auth_botlogin varchar(6)","'false'"
|
||||
"auth_operator varchar(6)","'false'"
|
||||
"new_at_team_flag int","'0'"
|
||||
"auth_lock varchar(1)","'0'"
|
||||
"auth_lock_time int","'0'"
|
||||
"auth_lock_reason varchar(128)","NULL"
|
||||
"auth_mute varchar(1)","'0'"
|
||||
"auth_mute_time int","'0'"
|
||||
"auth_mute_reason varchar(128)","NULL"
|
||||
"auth_lock varchar(6)","'false'"
|
||||
"auth_locktime int","'0'"
|
||||
"auth_lockreason varchar(128)","NULL"
|
||||
"auth_mute varchar(6)","'false'"
|
||||
"auth_mutetime int","'0'"
|
||||
"auth_mutereason varchar(128)","NULL"
|
||||
"auth_command_groups varchar(16)","'1'"
|
||||
"acct_lastlogin_time int","'0'"
|
||||
"acct_lastlogin_owner varchar(16)","NULL"
|
||||
"acct_lastlogin_owner varchar(128)","NULL"
|
||||
"acct_lastlogin_clienttag varchar(4)","NULL"
|
||||
"acct_lastlogin_ip varchar(16)","NULL"
|
||||
:"DROP INDEX username"
|
||||
|
@ -107,7 +107,7 @@
|
|||
"W3XP_random_losses int","'0'"
|
||||
"W3XP_teamcount int","'0'"
|
||||
"W3XP_userselected_icon varchar(4)","NULL"
|
||||
"W3XP_iconstash varchar(256)","NULL"
|
||||
"W3XP_iconstash varchar(1024)","NULL"
|
||||
"STAR_0_wins int","'0'"
|
||||
"STAR_0_losses int","'0'"
|
||||
"STAR_0_disconnects int","'0'"
|
||||
|
@ -137,7 +137,7 @@
|
|||
"SEXP_1_rank int","'0'"
|
||||
"SEXP_1_high_rank int","'0'"
|
||||
"SEXP_userselected_icon varchar(4)","NULL"
|
||||
"SEXP_iconstash varchar(256)","NULL"
|
||||
"SEXP_iconstash varchar(1024)","NULL"
|
||||
"TSUN_solo_rank int","'0'"
|
||||
"TSUN_solo_points int","'0'"
|
||||
"TSUN_solo_wins int","'0'"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# some lines are commented out, cause they weren't installed by default in older versions
|
||||
|
||||
IX86ver1.mpq
|
||||
ver-ix86-1.mpq
|
||||
ver-IX86-1.mpq
|
||||
PMACver1.mpq
|
||||
XMACver1.mpq
|
||||
bnserver-D2DV.ini
|
||||
|
@ -10,4 +10,5 @@ bnserver-D2XP.ini
|
|||
bnserver-WAR3.ini
|
||||
bnserver.ini
|
||||
icons-WAR3.bni
|
||||
icons_STAR.bni
|
||||
icons.bni
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
"Chat","This is the public chat channel. Feel free to chat..."
|
||||
"Moderated Support","Support is provided in this channel..."
|
||||
Chat This is the public chat channel. Feel free to chat...
|
||||
Moderated Support Support is provided in this channel...
|
File diff suppressed because it is too large
Load diff
1987
conf/versioncheck.json.in
Normal file
1987
conf/versioncheck.json.in
Normal file
File diff suppressed because it is too large
Load diff
118
config.h.cmake
118
config.h.cmake
|
@ -15,12 +15,9 @@
|
|||
#cmakedefine HAVE_TERMIOS_H
|
||||
#cmakedefine HAVE_SYS_TYPES_H
|
||||
#cmakedefine HAVE_SYS_WAIT_H
|
||||
#cmakedefine HAVE_SYS_IOCTL_H
|
||||
#cmakedefine HAVE_STDINT_H
|
||||
#cmakedefine HAVE_SYS_FILE_H
|
||||
#cmakedefine HAVE_POLL_H
|
||||
#cmakedefine HAVE_SYS_POLL_H
|
||||
#cmakedefine HAVE_SYS_STROPTS_H
|
||||
#cmakedefine HAVE_SYS_STAT_H
|
||||
#cmakedefine HAVE_PWD_H
|
||||
#cmakedefine HAVE_GRP_H
|
||||
|
@ -34,83 +31,58 @@
|
|||
#cmakedefine HAVE_SYS_EVENT_H
|
||||
#cmakedefine HAVE_SYS_EPOLL_H
|
||||
#cmakedefine HAVE_SYS_RESOURCE_H
|
||||
#cmakedefine HAVE_PCAP_H
|
||||
#cmakedefine HAVE_WINDOWS_H
|
||||
#cmakedefine HAVE_WINSOCK2_H
|
||||
#cmakedefine HAVE_WS2TCPIP_H
|
||||
#cmakedefine HAVE_PROCESS_H
|
||||
|
||||
#cmakedefine SIZEOF_UNSIGNED_CHAR ${SIZEOF_UNSIGNED_CHAR}
|
||||
#cmakedefine SIZEOF_UNSIGNED_SHORT ${SIZEOF_UNSIGNED_SHORT}
|
||||
#cmakedefine SIZEOF_UNSIGNED_INT ${SIZEOF_UNSIGNED_INT}
|
||||
#cmakedefine SIZEOF_UNSIGNED_LONG ${SIZEOF_UNSIGNED_LONG}
|
||||
#cmakedefine SIZEOF_UNSIGNED_LONG_LONG ${SIZEOF_UNSIGNED_LONG_LONG}
|
||||
#cmakedefine SIZEOF_SIGNED_CHAR ${SIZEOF_SIGNED_CHAR}
|
||||
#cmakedefine SIZEOF_SIGNED_SHORT ${SIZEOF_SIGNED_SHORT}
|
||||
#cmakedefine SIZEOF_SIGNED_INT ${SIZEOF_SIGNED_INT}
|
||||
#cmakedefine SIZEOF_SIGNED_LONG ${SIZEOF_SIGNED_LONG}
|
||||
#cmakedefine SIZEOF_SIGNED_LONG_LONG ${SIZEOF_SIGNED_LONG_LONG}
|
||||
|
||||
#cmakedefine HAVE_MMAP
|
||||
#cmakedefine HAVE_GETHOSTNAME
|
||||
#cmakedefine HAVE_GETTIMEOFDAY
|
||||
#cmakedefine HAVE_SELECT
|
||||
#cmakedefine HAVE_SOCKET
|
||||
#cmakedefine HAVE_STRDUP
|
||||
#cmakedefine HAVE_STRTOUL
|
||||
#cmakedefine HAVE_INET_ATON
|
||||
#cmakedefine HAVE_INET_NTOA
|
||||
#cmakedefine HAVE_UNAME
|
||||
#cmakedefine HAVE_RECV
|
||||
#cmakedefine HAVE_SEND
|
||||
#cmakedefine HAVE_RECVFROM
|
||||
#cmakedefine HAVE_SENDTO
|
||||
#cmakedefine HAVE_UNAME
|
||||
#cmakedefine HAVE_FORK
|
||||
#cmakedefine HAVE_GETPID
|
||||
#cmakedefine HAVE_SIGACTION
|
||||
#cmakedefine HAVE_SIGPROCMASK
|
||||
#cmakedefine HAVE_SIGADDSET
|
||||
#cmakedefine HAVE_SETPGID
|
||||
#cmakedefine HAVE_FTIME
|
||||
#cmakedefine HAVE_STRCASECMP
|
||||
#cmakedefine HAVE_STRNCASECMP
|
||||
#cmakedefine HAVE_STRICMP
|
||||
#cmakedefine HAVE_STRNICMP
|
||||
#cmakedefine HAVE_CHDIR
|
||||
#cmakedefine HAVE_DIFFTIME
|
||||
#cmakedefine HAVE_STRCHR
|
||||
#cmakedefine HAVE_STRRCHR
|
||||
#cmakedefine HAVE_INDEX
|
||||
#cmakedefine HAVE_RINDEX
|
||||
#cmakedefine HAVE_EPOLL_CREATE
|
||||
#cmakedefine HAVE_FORK
|
||||
#cmakedefine HAVE_FTIME
|
||||
#cmakedefine HAVE_GETGID
|
||||
#cmakedefine HAVE_GETGRNAM
|
||||
#cmakedefine HAVE_GETHOSTBYNAME
|
||||
#cmakedefine HAVE_GETHOSTNAME
|
||||
#cmakedefine HAVE_GETLOGIN
|
||||
#cmakedefine HAVE_GETOPT
|
||||
#cmakedefine HAVE_GETPID
|
||||
#cmakedefine HAVE_GETPWNAME
|
||||
#cmakedefine HAVE_GETRLIMIT
|
||||
#cmakedefine HAVE_GETSERVBYNAME
|
||||
#cmakedefine HAVE_GETTIMEOFDAY
|
||||
#cmakedefine HAVE_GETUID
|
||||
#cmakedefine HAVE_IOCTL
|
||||
#cmakedefine HAVE_KQUEUE
|
||||
#cmakedefine HAVE__MKDIR
|
||||
#cmakedefine HAVE_MKDIR
|
||||
#cmakedefine HAVE_MMAP
|
||||
#cmakedefine HAVE_PIPE
|
||||
#cmakedefine HAVE_POLL
|
||||
#cmakedefine HAVE_RECV
|
||||
#cmakedefine HAVE_RECVFROM
|
||||
#cmakedefine HAVE_SELECT
|
||||
#cmakedefine HAVE_SEND
|
||||
#cmakedefine HAVE_SENDTO
|
||||
#cmakedefine HAVE_SETITIMER
|
||||
#cmakedefine HAVE_SETPGID
|
||||
#cmakedefine HAVE_SETPGRP
|
||||
#cmakedefine HAVE_SETSID
|
||||
#cmakedefine HAVE_SETUID
|
||||
#cmakedefine HAVE_SIGACTION
|
||||
#cmakedefine HAVE_SIGADDSET
|
||||
#cmakedefine HAVE_SIGPROCMASK
|
||||
#cmakedefine HAVE_SOCKET
|
||||
#cmakedefine HAVE_STRCASECMP
|
||||
#cmakedefine HAVE_STRDUP
|
||||
#cmakedefine HAVE_STRICMP
|
||||
#cmakedefine HAVE_STRNCASECMP
|
||||
#cmakedefine HAVE_STRNICMP
|
||||
#cmakedefine HAVE_STRSEP
|
||||
#cmakedefine HAVE_UNAME
|
||||
#cmakedefine HAVE_WAIT
|
||||
#cmakedefine HAVE_WAITPID
|
||||
#cmakedefine HAVE_PIPE
|
||||
#cmakedefine HAVE_GETENV
|
||||
#cmakedefine HAVE_IOCTL
|
||||
#cmakedefine HAVE_SETSID
|
||||
#cmakedefine HAVE_POLL
|
||||
#cmakedefine HAVE_GETHOSTBYNAME
|
||||
#cmakedefine HAVE_GETSERVBYNAME
|
||||
#cmakedefine HAVE_GETLOGIN
|
||||
#cmakedefine HAVE_GETPWNAME
|
||||
#cmakedefine HAVE_GETGRNAM
|
||||
#cmakedefine HAVE_GETUID
|
||||
#cmakedefine HAVE_GETGID
|
||||
#cmakedefine HAVE_SETUID
|
||||
#cmakedefine HAVE_MKDIR
|
||||
#cmakedefine HAVE__MKDIR
|
||||
#cmakedefine MKDIR_TAKES_ONE_ARG
|
||||
#cmakedefine HAVE_STRSEP
|
||||
#cmakedefine HAVE_GETOPT
|
||||
#cmakedefine HAVE_KQUEUE
|
||||
#cmakedefine HAVE_SETITIMER
|
||||
#cmakedefine HAVE_EPOLL_CREATE
|
||||
#cmakedefine HAVE_GETRLIMIT
|
||||
#cmakedefine HAVE_VSNPRINTF
|
||||
#cmakedefine HAVE__VSNPRINTF
|
||||
#cmakedefine HAVE_SNPRINTF
|
||||
#cmakedefine HAVE__SNPRINTF
|
||||
#cmakedefine HAVE_SETPGRP
|
||||
#cmakedefine MKDIR_TAKES_ONE_ARG
|
||||
|
||||
#cmakedefine BNETD_DEFAULT_CONF_FILE "${BNETD_DEFAULT_CONF_FILE}"
|
||||
#cmakedefine D2CS_DEFAULT_CONF_FILE "${D2CS_DEFAULT_CONF_FILE}"
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
PvPGN C++ conversion changelog
|
||||
================================
|
||||
|
||||
What is this file all about?
|
||||
----------------------------
|
||||
As some of you might have noticed PvPGN is currently undergoing lots of changes
|
||||
while the code is being converted from C to C++. This file is ment to keep
|
||||
track of the changes made - and possible implications to users/admins.
|
||||
|
||||
Changes:
|
||||
--------
|
||||
|
||||
bnetd/handle_irc*, bnetd_handle_wol*, bnetd/irc.*:
|
||||
- merged WOL specific patch (better WOL support, cleaner code seperation)
|
||||
|
||||
bnetd/ladder*:
|
||||
- no longer supports output of xml ladder files (at least so far)
|
||||
|
||||
bnetd/mail
|
||||
|
||||
bnetd/adbanner:
|
||||
- requires changes in conf/ad.conf (unique id)
|
||||
- requires changes in conf/ad.conf (language tag)
|
||||
|
||||
common/fdwatch*:
|
||||
- no functional changes
|
||||
|
||||
compat/pdir
|
||||
- converted to "Directory" class
|
|
@ -1,32 +0,0 @@
|
|||
PvPGN Win32 Dev-C++ Compile Instructions
|
||||
This file explains how to compile PvPGN for Win32 using Dev-C++ ( 5.0 beta 9 (4.9.9.0) )
|
||||
|
||||
1) Download Dev-C++ 5.0 beta 9 (4.9.9.0) with Mingw/GCC 3.3.1 from the folling sites:
|
||||
http://prdownloads.sourceforge.net/dev-cpp/devcpp4990setup.exe
|
||||
|
||||
2) Install Dev-C++ in a folder without any spaces in the path
|
||||
|
||||
3) From within Dev-C++ install the zlib-DevPak from the DevPacks.org community server (Tools->Check for Updates/Packages)
|
||||
|
||||
4) Go into the Win32-Projects folder of the PvPGN sources
|
||||
Simply double-click on any of the *.dev files to fire up Dev-C++ and use Execute->Compile to build the binary
|
||||
|
||||
5) The resulting exe file will be in the bin directory and you can use it with the other files from the latest PvPGN release.
|
||||
|
||||
Notes for MYSQL/PGSQL/SQLITE3/ODBC Support:
|
||||
support with Dev-C++ still unsupported/untested
|
||||
|
||||
|
||||
Common problems and Solutions:
|
||||
==============================
|
||||
|
||||
Fatal: 'all-before' does not exist - don't know how to make it:
|
||||
----------------------------------------------------------------
|
||||
That happens when the wrong make.exe is invoked, usually the Borland one. It will usually leave a copyright notice in your compile log.
|
||||
How to fix it? add the bin folder of your Dev-C++ (or MinGW) installation to the PATH environment variable, before any Borland path that might be there
|
||||
For more details check: http://www14.brinkster.com/aditsu/dev-cpp-faq.html#allbefore
|
||||
|
||||
Complains about not being able to create Makefile or 'no rule to make target all':
|
||||
-----------------------------------------------------------------------------------
|
||||
Check size of pvpgn\src\win32\Makefile.win
|
||||
If it's 0 bytes quit Dev-C++, delete the file and try to compile again
|
|
@ -1,56 +0,0 @@
|
|||
A step-by-step guide for building the SVN version of PvPGN using Visual Studio Professional
|
||||
===========================================================================================
|
||||
|
||||
Requirements:
|
||||
- CMake 2.4.7 ( http://www.cmake.org/files/v2.4/cmake-2.4.7-win32-x86.exe )
|
||||
- Visual Studio 2005 Professional
|
||||
(you can also use Visual C++ Express - but this will need additional
|
||||
tweaking that is beyond the scope of this guide.)
|
||||
- zlib ( http://www.winimage.com/zLibDll/zlib123dll.zip AND http://www.winimage.com/zLibDll/zlib123.zip )
|
||||
- latest PvPGN sources from SVN (in this example I have them extracted under D:/svn/pvpgn/ )
|
||||
|
||||
Optional:
|
||||
- MySQL ( http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.45-win32.zip/from/pick#mirrors )
|
||||
(using the installer version will make thinks alot easier for you - trust me on this)
|
||||
- PostgreSQL ( http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fbinary%2Fv8.2.5%2Fwin32%2Fpostgresql-8.2.5-1.zip )
|
||||
(same applies here - using this installer will make things alot easier for you)
|
||||
- SQLite ( http://www.sqlite.org/sqlitedll-3_4_2.zip )
|
||||
(needs some extra tweaking - but we'll leave that for later)
|
||||
|
||||
Step-by-step guide:
|
||||
- install Visual Studio Professional (obviously not required when allread done)
|
||||
- install CMake (same applies here)
|
||||
- extract PvPGN sources from zip/tarball or get them via SVN
|
||||
- create a folder called "zlib" inside you PvPGN base folder ( i.e. D:/svn/pvpgn/zlib/ )
|
||||
- extract the following files from zlib123.zip into the "zlib" folder:
|
||||
zconf.h, zlib.h
|
||||
- extract the following file from zlib123dll.zip (from with dll32 folder) into the "zlib" folder:
|
||||
zlibwapi.lib
|
||||
- install MySQL if you intend to use it as a storage backend
|
||||
- install PostgreSQL if you intend to use it as a storage backend
|
||||
- SQLite stub - need some extra tweaking to be explained later (in version 2.0 of this guide)
|
||||
- create a folder called "build" inside you PvPGN base folder ( i.e. D:/svn/pvpgn/build/ )
|
||||
- fire up CMake (I'll use the GUI version for this guide - so you should use it, too)
|
||||
- Where is the source code: D:\svn\pvpgn
|
||||
- Where to build the binaries: D:\svn\pvpgn\build
|
||||
- Now press the "Configure" button, select "Visual Studio 2005" as the build environment and wait a few seconds
|
||||
- all the components should be found without any problems
|
||||
- now enable optinal components if required ( WITH_MYSQL, WITH_PGSQL, WITH_SQLITE3 ) and "Configure" again
|
||||
- again all the components should be found without any problems
|
||||
- Press "OK"
|
||||
- double-click on D:/svn/pvpgn/build/pvpgn.sln to fire up Visual Studio 2005
|
||||
- build the "ALL_BUILD" target
|
||||
- build the "INSTALL" target
|
||||
- now you should find all the stuff (almost) ready under c:/Program Files/pvpgn/
|
||||
- extract the following files from zlib123dll.zip (from with dll32 folder) into the "sbin" folder:
|
||||
zlibwapi.lib
|
||||
- optionally get the following files from C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\ and copy them into the "sbin" folder
|
||||
libmysql.dll
|
||||
- optionally get the following files from C:\Program Files\PostgreSQL\8.2\bin\ and copy them into the "sbin" folder
|
||||
libpq.dll, libintl-2.dll, libiconv-2.dll, krb5_32.dll, comerr32.dll
|
||||
- optionally extract the following files from sqlitedll-3_4_2.zip into the "sbin" folder:
|
||||
sqlite3.dll
|
||||
- drink a beer and congratulate yourself for what you accomplished today
|
||||
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
- README.storage : how to use PvPGN with the various storage drivers (MySQL,
|
||||
PGSQL, cdb, files etc..)
|
||||
- INSTALL.unix : how to compile and install on Unix/POSIX operating systems
|
||||
- FAQ : frequently asked questions
|
||||
- Compile.Instructions.Win32.Borland.txt : as the filename says
|
||||
- Compile.Instructions.Win32.VS.Net.txt : same for this one
|
||||
- PORTS : PvPGN porting status file, check to see if your platform/operating
|
||||
system is supported
|
|
@ -1,64 +0,0 @@
|
|||
PvPGN Install instructions for the Linux/Unix version
|
||||
-------------------------------------------------------
|
||||
|
||||
1. First get your hands on a PvPGN source tarball or a binary package (RPM/etc).
|
||||
If you got the source follow instructions bellow, if you got a binary package
|
||||
jump to step 4. If you get the source you will also need to fetch the support
|
||||
files package.
|
||||
|
||||
2. Unpack the source tarball, change current directory (ex. pvpgn-<version>)
|
||||
and run configure. You will need to provide configure with your custom options,
|
||||
ex:
|
||||
|
||||
./configure --prefix=<path>
|
||||
|
||||
It will configure the source distribution to compile and install in the <path>
|
||||
location.
|
||||
|
||||
./configure --with-mysql
|
||||
|
||||
It will configure the source distribution to compile with MySQL support (in
|
||||
it just tells configure to try to find mysql libs/includes, if it doesnt it
|
||||
WONT compiled MySQL support; read README.MySQL for more details).
|
||||
|
||||
Check using ./configure --help for all available options.
|
||||
|
||||
3. Compile and install PvPGN using
|
||||
|
||||
*** NOTE ***
|
||||
you need to use GNU make to compile PvPGN (ie under linux this is
|
||||
just "make" but under *BSD it is usually named "gmake")
|
||||
************
|
||||
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
WARNING !! make install it will also overwrite the configuration files. Make a
|
||||
backup of them before doing "make install" (read more about this in the UPDATE
|
||||
file).
|
||||
|
||||
Next thing to do is to unpack the support files package in the "files"
|
||||
directory of your installed pvpgn (look where pvpgn has installed and search
|
||||
for a "files" directory, you need to unpack there the support files).
|
||||
|
||||
Now you just need to edit the config files and adjust them acording to your
|
||||
system. Have fun!
|
||||
|
||||
4. (only for binary PvPGN distributions)
|
||||
Depending on the type of package you have obtained (ex RPM, deb, tgz) you will
|
||||
have to install the package using the right package tool.
|
||||
|
||||
Examples:
|
||||
|
||||
$ rpm -ivh pvpgn-<ver>.rpm
|
||||
|
||||
or
|
||||
|
||||
$ installpkg pvpgn-<ver>.tgz
|
||||
|
||||
or
|
||||
|
||||
$ dpkg -i pvpgn-<ver>.deb
|
||||
|
||||
After you install the binary package you will need to adjust PvPGN configuration
|
||||
files (usually installed in /etc/pvpgn dir). Have fun!
|
16
docs/PORTS
16
docs/PORTS
|
@ -1,16 +0,0 @@
|
|||
|
||||
PvPGN porting status file
|
||||
===========================
|
||||
|
||||
Arch. | Operating System | Status | Compilers | Comments
|
||||
------------------------------------------------------------------
|
||||
x86 | Linux 2.6.x | OK | g++ >=3.3.x | main dev. platform
|
||||
x86_64 | Linux 2.6.x | OK | g++ >=3.4.x | sec dev. platform
|
||||
x86 | WIN32 | OK | mingw | using Dev-C++ IDE
|
||||
|
||||
Notes:
|
||||
- clearly x86 is the most tested version
|
||||
- the platforms/operating systems not listed have not been tested or they did
|
||||
not came to our attention however, any POSIX system with a ISO C++98 compiler
|
||||
should work just fine
|
||||
- please report to us any platform/OS you use pvpgn on and not listed here
|
17
docs/ad.txt
17
docs/ad.txt
|
@ -1,17 +0,0 @@
|
|||
The only graphic formats that Blizzard clients support are: PCX, SMK, and MNG
|
||||
These are old and therefore uncommon formats that requires specific software to create and modify. PCX allows still images while SMK and MNG formats allow animated images.
|
||||
The dimensions for ad banners are 468 x 60 pixels
|
||||
|
||||
It is not known how to create PCX files that will display properly in PvPGN so your options are down to SMK and MNG however MNG is specific to WarCraft III so SMK is highly recommended.
|
||||
|
||||
To begin creating your SMK ad banner, you must download and install the Old Smacker Tools.
|
||||
Download: http://www.broodwarai.com/downloads/tools/OldSmackerTools.exe
|
||||
Note: The latest versions of Smacker Tools(now integrated into RAD Video Tools) reportedly only displays for Mac clients. The Old Smacker Tools unfortunately only works on Windows XP
|
||||
|
||||
Instructions for converting still images to SMK format.
|
||||
=========================================================
|
||||
1. Run smackerw.exe and then click on the "Smack (compress) a graphics file."
|
||||
2. On the left side, navigate to the folder where your ad banner is stored and select it.
|
||||
3. Under Options, click on the Palette tab. Check "Total palette colors to use:", set it to 64 and check "Starting palette index to use:", set it to 32. Set "8-bit input palettes" to "Create new."
|
||||
4. Click on the Frame tab and check "Create ring?"
|
||||
5. Smack!
|
32
docs/adbanners.md
Normal file
32
docs/adbanners.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Ad Banners
|
||||
---
|
||||
|
||||
### Configuration File
|
||||
The configuration file consists of a single array named ````ads```` which can contain an unlimited number of elements. Each element contains 4 pairs in the following order: ````filename````, ````url````, ````client````, and ````lang````.
|
||||
- ````filename````: A string containing the filename of the ad banner, should not include a path.
|
||||
- ````url````: A string containing the URL that users should be directed to when clicking on the ad banner.
|
||||
- ````client````: A string containing the 4 character client tag that the ad banner should be shown to, a string of "NULL" will cause the ad banner to be shown to any client.
|
||||
- ````lang````: A string containing a 4 character language code that will be displayed to users who have enabled that particular language, a string of "NULL" will cause the ad banner to be shown to any user.
|
||||
- Valid ````lang```` tags: ````enUS````, ````deDE````, ````csCZ````, ````esES````, ````frFR````, ````itIT````, ````jaJA````, ````koKR````, ````plPL````, ````ruRU````, ````zhCN````, ````zhTW````, ````NULL````.
|
||||
|
||||
### File Formats
|
||||
| Client | Banner Format |
|
||||
|------------|---------------|
|
||||
| StarCraft, Warcraft 2, Diablo | PCX, SMK |
|
||||
| Diablo 2 | SMK |
|
||||
| WarCraft 3 | MNG, PNG |
|
||||
|
||||
### Banner Dimensions
|
||||
- The dimensions for ad banners are **468 x 60** pixels
|
||||
|
||||
### How To Create SMK Files
|
||||
1. Download the [Old Smacker Tools](http://files.campaigncreations.org/resources/sc/programs/RADTools.zip)
|
||||
2. Run *smackerw.exe* and then click on the *Smack (compress) a graphics file.*
|
||||
3. On the left side, navigate to the folder where your ad banner is stored and select it.
|
||||
4. Under *Options*, click on the *Palette* tab. Check *Total palette colors to use:*, set it to *64* and check *Starting palette index to use:*, set it to *32*.
|
||||
5. Set *8-bit input palettes* to *Create new.*
|
||||
5. Click on the *Frame* tab and check *Create ring?*
|
||||
6. *Smack!*
|
||||
|
||||
### Notes
|
||||
- It is not known how to create PCX files that will display properly in PvPGN
|
24
docs/bnmotd.md
Normal file
24
docs/bnmotd.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
# PvPGN Message Of The Day
|
||||
---
|
||||
### Notes
|
||||
- All lines must begin with **%I**
|
||||
|
||||
### Parameters
|
||||
Parameter | Description
|
||||
----------- | -------------
|
||||
%a | Number of registered accounts
|
||||
%c | Number of existing channels
|
||||
%g | Number of running games
|
||||
%G | Number of games with the same clienttag.
|
||||
%h | Hostname of the server
|
||||
%H | Contact name (as set in bnetd.conf)
|
||||
%i | The userid of the user
|
||||
%l | The username of the user
|
||||
%N | Name of the game the user has connected with
|
||||
%m | Check the user's mail
|
||||
%r | IP address of the user
|
||||
%s | Servername
|
||||
%t | The clienttag of the user
|
||||
%u | Number of users currently logged in
|
||||
%U | Number of users logged in with the same clienttag
|
||||
%v | Server version
|
|
@ -1,21 +0,0 @@
|
|||
Here is a short note of how to use and configure the conf/bnmotd.txt
|
||||
|
||||
- all lines have to start with %I
|
||||
- possible parameters that can be used:
|
||||
-- %a = number of registered accounts on the server
|
||||
-- %c = number of currently existant channels
|
||||
-- %g = total number of currently running games
|
||||
-- %G = games of users with same clienttag.
|
||||
-- %h = hostname of the server
|
||||
-- %H = contact name (as set in bnetd.conf)
|
||||
-- %i = userid of the user
|
||||
-- %l = username
|
||||
-- %N = name of the game the user has connected with.
|
||||
-- %m = check users mail when they login
|
||||
-- %r = IP of the user
|
||||
-- %s = the servername
|
||||
-- %t = clienttag of the user
|
||||
-- %u = number of users currently logged in
|
||||
-- %U = users logged in with the same clienttag
|
||||
-- %v = server version
|
||||
--
|
1
docs/compile.g++.md
Normal file
1
docs/compile.g++.md
Normal file
|
@ -0,0 +1 @@
|
|||
REFER TO http://harpywar.com/?a=articles&b=2&c=1&d=74&lang=en
|
53
docs/compile.visualstudio2015.md
Normal file
53
docs/compile.visualstudio2015.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
# A step-by-step guide for building PvPGN using Visual Studio 2015
|
||||
---
|
||||
|
||||
##### Requirements
|
||||
- [Visual Studio 2015 Community](https://www.visualstudio.com/products/visual-studio-community-vs)
|
||||
- [CMake](https://cmake.org/download/)
|
||||
- [zlib](http://zlib.net/)
|
||||
- [PvPGN](https://github.com/pvpgn/pvpgn-server)
|
||||
|
||||
##### Optional
|
||||
- [MySQL](http://dev.mysql.com/downloads/mysql/)
|
||||
- [PostgreSQL](http://www.postgresql.org/download/windows/)
|
||||
- [SQLite](https://sqlite.org/download.html)
|
||||
---
|
||||
|
||||
##### Instructions
|
||||
- Install *Visual Studio 2015*
|
||||
- Install *CMake*
|
||||
- Download zlib
|
||||
- Download PvPGN source
|
||||
- Extract PvPGN source to C:\pvpgn\
|
||||
- Create a folder called *zlib* inside your PvPGN base folder ( i.e. C:\pvpgn\zlib\ )
|
||||
- Extract the following files from *zlib128-dll.zip\include* into the *zlib* folder:
|
||||
- zconf.h, zlib.h
|
||||
- Extract the following files from the *zlib128-dll.zip\lib* into the *zlib* folder:
|
||||
- zdll.lib
|
||||
- Install *MySQL* if you intend to use it as a storage backend
|
||||
- Install *PostgreSQL* if you intend to use it as a storage backend
|
||||
- Install *SQLite* if you intend to use it as a storage backend
|
||||
- Create a folder called *build* inside your PvPGN base folder ( i.e. C:\pvpgn\build\ )
|
||||
- Run *cmake-gui.exe*
|
||||
- *Where is the source code*: C:\pvpgn
|
||||
- *Where to build the binaries*: C:\pvpgn\build
|
||||
- Click the *Configure* button
|
||||
- Select *Visual Studio 14 2015* as the generator
|
||||
- Select *Use default native compilers*
|
||||
- Click the *Finish* button
|
||||
- Enable optional components if required ( *WITH_MYSQL*, *WITH_PGSQL*, *WITH_SQLITE3*, *WITH_LUA*, *WITH_WIN32_GUI* )
|
||||
- Click the *Configure* button again
|
||||
- Click the *Generate* button
|
||||
- Close *CMake*
|
||||
- Open *C:\pvpgn\build\pvpgn.sln* with Visual Studio
|
||||
- Build the *ALL_BUILD* project
|
||||
- Build the *INSTALL* project
|
||||
- Open C:\Program Files (x86)\pvpgn
|
||||
- Extract the following files from *zlib128-dll.zip* into the *pvpgn* folder:
|
||||
- zlib1.dll
|
||||
- If required, extract the following files from C:\Program Files\MySQL\MySQL Server 5.6.23\lib\opt\ into the *pvpgn* folder:
|
||||
- libmysql.dll
|
||||
- If required, extract the following files from C:\Program Files\PostgreSQL\9.4.1\bin\ into the "pvpgn" folder:
|
||||
- libpq.dll, libintl-2.dll, libiconv-2.dll, krb5_32.dll, comerr32.dll
|
||||
- If required, extract the following files from sqlite-dll-win32-x86-3080803.zip into the "pvpgn" folder:
|
||||
- sqlite3.dll
|
18
docs/ports.md
Normal file
18
docs/ports.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# PvPGN Porting Status
|
||||
Arch | Operating System | Status | Compiler | CMake
|
||||
----- | ------------------------- | --------- | ----------------------------------- | ---------
|
||||
x86_64 | Arch Linux 2015.09.29 | OK | G++ 5.2.0 | 3.3.2
|
||||
x86_64 | Arch Linux 2015.09.29 | OK | Clang 3.7.0 | 3.3.2
|
||||
x86_64 | Arch Linux 2015.09.29 | NO | MinGW 5.2.0 | 3.3.2
|
||||
x86_64 | Ubuntu Server 15.04 | OK | G++ 5.1.1 | 3.3.2
|
||||
x86_64 | Ubuntu Server 15.04 | OK | G++ 5.1.0 | 3.4.0-rc1
|
||||
x86_64 | Ubuntu Server 14.04 | OK | G++ 5.1.0 | 3.4.0-rc1
|
||||
x86_64 | CentOS 7.3.1611 | OK | G++ 5.3.1 | 3.6.1
|
||||
x86_64 | Fedora 25 | OK | G++ 6.2.1 | 3.6.2
|
||||
x86_64 | Windows 10.0.10240 | OK | VC++ 14 | 3.3.1
|
||||
x86_64 | Windows 10.0.10240 | OK | Clang r249555 | 3.3.1
|
||||
x86_64 | OS X 10.11.6 | OK | Apple LLVM 7.3.0 (clang-703.0.31) | 3.6.1
|
||||
|
||||
# Notes
|
||||
- Any POSIX/WIN32 OS with a C++11 compliant compiler should work
|
||||
- The minimum required compiler version for G++ and Visual Studio is hardcoded
|
12
docs/readme.md
Normal file
12
docs/readme.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Index
|
||||
---
|
||||
File | Description
|
||||
--------------- | -------------
|
||||
adbanners.md | Instructions on creating SMK ad banners for PvPGN
|
||||
bnmotd.md | Documentation of parameters for bnmotd.txt
|
||||
compile.g++.md | Instructions for compiling with G++
|
||||
compile.visualstudio2015.md | Instructions for compiling with Visual Studio 2015
|
||||
fdwatch.txt | Documentation of the fdwatch API
|
||||
ports.md | Documentation on tested operating systems, compilers, and tools for compiling PvPGN
|
||||
readme.md | This file
|
||||
storage.txt | Documentation of PvPGN's storage systems
|
16
docs/versioncheck.md
Normal file
16
docs/versioncheck.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# VersionCheck
|
||||
|
||||
### Configuration File
|
||||
The configuration file is in standard JSON format and consists of arrays for each Battle.net game client whose names are a four-letter string.
|
||||
|
||||
Within the game client arrays are arrays for platform whose names are also a four-letter string (i.e. `IX86`, `PMAC`, `XMAC`).
|
||||
|
||||
Within the platform arrays are arrays for the game client's version ID, traditionally known as a "version byte". The version ID is traditionally written in hex format, as indicated with a preceding "0x" or "0X", but can also be in decimal format. The version ID array consists of two pairs, `checkRevisionFile` and `equation`, and an array, `entries`.
|
||||
|
||||
The `entries` array consists of five pairs: `title`, `version`, `hash`, `fileMetadata`, `versionTag`.
|
||||
- `title`: This is to assist the reader of the configuration file, it does not affect the entry in any way.
|
||||
- `version`: The version number returned by CheckRevision which is obtained from the [VERSIONINFO](https://msdn.microsoft.com/en-us/library/aa381058) resource of the game file. See sample implementation: https://github.com/pvpgn/CheckRevision
|
||||
- `hash`: The hash returned by CheckRevision which uses up to three files from the game to produce the hash. See sample implementation: https://github.com/pvpgn/CheckRevision
|
||||
- `fileMetadata`: The string returned by CheckRevision which consists of the game's filename, last modified date, last modified time, and filesize, all separated by one space (e.g. `war3.exe 08/16/09 19:21:59 471040`). See sample implementation: https://github.com/pvpgn/CheckRevision
|
||||
- Note: This pair is currently unused by PvPGN, but may be used in the future.
|
||||
- `versionTag`: An arbitrary string that must be unique from all other version tags. It is traditionally in the form of the four-letter game string, followed by an underscore and the version (e.g. `WAR3_1282` is used for WarCraft 3: Reign of Chaos 1.28.2).
|
|
@ -17,9 +17,21 @@ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/var/status")
|
|||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/var/ DESTINATION ${LOCALSTATEDIR})
|
||||
|
||||
install(FILES ad000001.mng ad000001.smk ad000002.mng ad000003.mng
|
||||
ad000004.mng ad000075.mng newbie.save
|
||||
bnserver.ini bnserver-D2DV.ini bnserver-D2XP.ini bnserver-WAR3.ini
|
||||
ver-ix86-1.mpq IX86ver1.mpq PMACver1.mpq XMACver1.mpq IX86ExtraWork.mpq
|
||||
icons.bni icons-WAR3.bni
|
||||
DESTINATION ${LOCALSTATEDIR}/files)
|
||||
install(FILES ad000001.png
|
||||
ad000001.smk
|
||||
ad000002.mng
|
||||
ad000002.smk
|
||||
bnserver.ini
|
||||
bnserver-D2DV.ini
|
||||
bnserver-D2XP.ini
|
||||
bnserver-WAR3.ini
|
||||
icons.bni
|
||||
icons_STAR.bni
|
||||
icons-WAR3.bni
|
||||
IX86ExtraWork.mpq
|
||||
IX86ver1.mpq
|
||||
newbie.save
|
||||
PMACver1.mpq
|
||||
ver-IX86-1.mpq
|
||||
XMACver1.mpq
|
||||
DESTINATION ${LOCALSTATEDIR}/files)
|
||||
|
|
Binary file not shown.
BIN
files/ad000001.png
Normal file
BIN
files/ad000001.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
Binary file not shown.
BIN
files/ad000002.smk
Normal file
BIN
files/ad000002.smk
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
files/icons_STAR.bni
Normal file
BIN
files/icons_STAR.bni
Normal file
Binary file not shown.
BIN
files/ver-IX86-1.mpq
Normal file
BIN
files/ver-IX86-1.mpq
Normal file
Binary file not shown.
Binary file not shown.
20
lib/fmt/CMakeLists.txt
Normal file
20
lib/fmt/CMakeLists.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
set(FMT_SOURCES ${FMT_SOURCES}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/core.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/format.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/format.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/format-inl.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ostream.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/posix.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/posix.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/printf.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ranges.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/time.h
|
||||
)
|
||||
|
||||
add_library(fmt ${FMT_SOURCES})
|
||||
|
||||
target_include_directories(fmt
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:lib>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/lib>
|
||||
)
|
1331
lib/fmt/core.h
Normal file
1331
lib/fmt/core.h
Normal file
File diff suppressed because it is too large
Load diff
564
lib/fmt/format-inl.h
Normal file
564
lib/fmt/format-inl.h
Normal file
|
@ -0,0 +1,564 @@
|
|||
// Formatting library for C++
|
||||
//
|
||||
// Copyright (c) 2012 - 2016, Victor Zverovich
|
||||
// All rights reserved.
|
||||
//
|
||||
// For the license information refer to format.h.
|
||||
|
||||
#ifndef FMT_FORMAT_INL_H_
|
||||
#define FMT_FORMAT_INL_H_
|
||||
|
||||
#include "format.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <climits>
|
||||
#include <cmath>
|
||||
#include <cstdarg>
|
||||
#include <cstddef> // for std::ptrdiff_t
|
||||
#include <locale>
|
||||
|
||||
#if defined(_WIN32) && defined(__MINGW32__)
|
||||
# include <cstring>
|
||||
#endif
|
||||
|
||||
#if FMT_USE_WINDOWS_H
|
||||
# if !defined(FMT_HEADER_ONLY) && !defined(WIN32_LEAN_AND_MEAN)
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# if defined(NOMINMAX) || defined(FMT_WIN_MINMAX)
|
||||
# include <windows.h>
|
||||
# else
|
||||
# define NOMINMAX
|
||||
# include <windows.h>
|
||||
# undef NOMINMAX
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if FMT_EXCEPTIONS
|
||||
# define FMT_TRY try
|
||||
# define FMT_CATCH(x) catch (x)
|
||||
#else
|
||||
# define FMT_TRY if (true)
|
||||
# define FMT_CATCH(x) if (false)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4127) // conditional expression is constant
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
// Disable deprecation warning for strerror. The latter is not called but
|
||||
// MSVC fails to detect it.
|
||||
# pragma warning(disable: 4996)
|
||||
#endif
|
||||
|
||||
// Dummy implementations of strerror_r and strerror_s called if corresponding
|
||||
// system functions are not available.
|
||||
inline fmt::internal::null<> strerror_r(int, char *, ...) {
|
||||
return fmt::internal::null<>();
|
||||
}
|
||||
inline fmt::internal::null<> strerror_s(char *, std::size_t, ...) {
|
||||
return fmt::internal::null<>();
|
||||
}
|
||||
|
||||
FMT_BEGIN_NAMESPACE
|
||||
|
||||
namespace {
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# define FMT_SNPRINTF snprintf
|
||||
#else // _MSC_VER
|
||||
inline int fmt_snprintf(char *buffer, size_t size, const char *format, ...) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
int result = vsnprintf_s(buffer, size, _TRUNCATE, format, args);
|
||||
va_end(args);
|
||||
return result;
|
||||
}
|
||||
# define FMT_SNPRINTF fmt_snprintf
|
||||
#endif // _MSC_VER
|
||||
|
||||
#if defined(_WIN32) && defined(__MINGW32__) && !defined(__NO_ISOCEXT)
|
||||
# define FMT_SWPRINTF snwprintf
|
||||
#else
|
||||
# define FMT_SWPRINTF swprintf
|
||||
#endif // defined(_WIN32) && defined(__MINGW32__) && !defined(__NO_ISOCEXT)
|
||||
|
||||
typedef void (*FormatFunc)(internal::buffer &, int, string_view);
|
||||
|
||||
// Portable thread-safe version of strerror.
|
||||
// Sets buffer to point to a string describing the error code.
|
||||
// This can be either a pointer to a string stored in buffer,
|
||||
// or a pointer to some static immutable string.
|
||||
// Returns one of the following values:
|
||||
// 0 - success
|
||||
// ERANGE - buffer is not large enough to store the error message
|
||||
// other - failure
|
||||
// Buffer should be at least of size 1.
|
||||
int safe_strerror(
|
||||
int error_code, char *&buffer, std::size_t buffer_size) FMT_NOEXCEPT {
|
||||
FMT_ASSERT(buffer != FMT_NULL && buffer_size != 0, "invalid buffer");
|
||||
|
||||
class dispatcher {
|
||||
private:
|
||||
int error_code_;
|
||||
char *&buffer_;
|
||||
std::size_t buffer_size_;
|
||||
|
||||
// A noop assignment operator to avoid bogus warnings.
|
||||
void operator=(const dispatcher &) {}
|
||||
|
||||
// Handle the result of XSI-compliant version of strerror_r.
|
||||
int handle(int result) {
|
||||
// glibc versions before 2.13 return result in errno.
|
||||
return result == -1 ? errno : result;
|
||||
}
|
||||
|
||||
// Handle the result of GNU-specific version of strerror_r.
|
||||
int handle(char *message) {
|
||||
// If the buffer is full then the message is probably truncated.
|
||||
if (message == buffer_ && strlen(buffer_) == buffer_size_ - 1)
|
||||
return ERANGE;
|
||||
buffer_ = message;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Handle the case when strerror_r is not available.
|
||||
int handle(internal::null<>) {
|
||||
return fallback(strerror_s(buffer_, buffer_size_, error_code_));
|
||||
}
|
||||
|
||||
// Fallback to strerror_s when strerror_r is not available.
|
||||
int fallback(int result) {
|
||||
// If the buffer is full then the message is probably truncated.
|
||||
return result == 0 && strlen(buffer_) == buffer_size_ - 1 ?
|
||||
ERANGE : result;
|
||||
}
|
||||
|
||||
// Fallback to strerror if strerror_r and strerror_s are not available.
|
||||
int fallback(internal::null<>) {
|
||||
errno = 0;
|
||||
buffer_ = strerror(error_code_);
|
||||
return errno;
|
||||
}
|
||||
|
||||
public:
|
||||
dispatcher(int err_code, char *&buf, std::size_t buf_size)
|
||||
: error_code_(err_code), buffer_(buf), buffer_size_(buf_size) {}
|
||||
|
||||
int run() {
|
||||
return handle(strerror_r(error_code_, buffer_, buffer_size_));
|
||||
}
|
||||
};
|
||||
return dispatcher(error_code, buffer, buffer_size).run();
|
||||
}
|
||||
|
||||
void format_error_code(internal::buffer &out, int error_code,
|
||||
string_view message) FMT_NOEXCEPT {
|
||||
// Report error code making sure that the output fits into
|
||||
// inline_buffer_size to avoid dynamic memory allocation and potential
|
||||
// bad_alloc.
|
||||
out.resize(0);
|
||||
static const char SEP[] = ": ";
|
||||
static const char ERROR_STR[] = "error ";
|
||||
// Subtract 2 to account for terminating null characters in SEP and ERROR_STR.
|
||||
std::size_t error_code_size = sizeof(SEP) + sizeof(ERROR_STR) - 2;
|
||||
typedef internal::int_traits<int>::main_type main_type;
|
||||
main_type abs_value = static_cast<main_type>(error_code);
|
||||
if (internal::is_negative(error_code)) {
|
||||
abs_value = 0 - abs_value;
|
||||
++error_code_size;
|
||||
}
|
||||
error_code_size += internal::count_digits(abs_value);
|
||||
writer w(out);
|
||||
if (message.size() <= inline_buffer_size - error_code_size) {
|
||||
w.write(message);
|
||||
w.write(SEP);
|
||||
}
|
||||
w.write(ERROR_STR);
|
||||
w.write(error_code);
|
||||
assert(out.size() <= inline_buffer_size);
|
||||
}
|
||||
|
||||
void report_error(FormatFunc func, int error_code,
|
||||
string_view message) FMT_NOEXCEPT {
|
||||
memory_buffer full_message;
|
||||
func(full_message, error_code, message);
|
||||
// Use Writer::data instead of Writer::c_str to avoid potential memory
|
||||
// allocation.
|
||||
std::fwrite(full_message.data(), full_message.size(), 1, stderr);
|
||||
std::fputc('\n', stderr);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
class locale {
|
||||
private:
|
||||
std::locale locale_;
|
||||
|
||||
public:
|
||||
explicit locale(std::locale loc = std::locale()) : locale_(loc) {}
|
||||
std::locale get() { return locale_; }
|
||||
};
|
||||
|
||||
template <typename Char>
|
||||
FMT_FUNC Char internal::thousands_sep(locale_provider *lp) {
|
||||
std::locale loc = lp ? lp->locale().get() : std::locale();
|
||||
return std::use_facet<std::numpunct<Char>>(loc).thousands_sep();
|
||||
}
|
||||
|
||||
FMT_FUNC void system_error::init(
|
||||
int err_code, string_view format_str, format_args args) {
|
||||
error_code_ = err_code;
|
||||
memory_buffer buffer;
|
||||
format_system_error(buffer, err_code, vformat(format_str, args));
|
||||
std::runtime_error &base = *this;
|
||||
base = std::runtime_error(to_string(buffer));
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
template <typename T>
|
||||
int char_traits<char>::format_float(
|
||||
char *buffer, std::size_t size, const char *format, int precision, T value) {
|
||||
return precision < 0 ?
|
||||
FMT_SNPRINTF(buffer, size, format, value) :
|
||||
FMT_SNPRINTF(buffer, size, format, precision, value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
int char_traits<wchar_t>::format_float(
|
||||
wchar_t *buffer, std::size_t size, const wchar_t *format, int precision,
|
||||
T value) {
|
||||
return precision < 0 ?
|
||||
FMT_SWPRINTF(buffer, size, format, value) :
|
||||
FMT_SWPRINTF(buffer, size, format, precision, value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
const char basic_data<T>::DIGITS[] =
|
||||
"0001020304050607080910111213141516171819"
|
||||
"2021222324252627282930313233343536373839"
|
||||
"4041424344454647484950515253545556575859"
|
||||
"6061626364656667686970717273747576777879"
|
||||
"8081828384858687888990919293949596979899";
|
||||
|
||||
#define FMT_POWERS_OF_10(factor) \
|
||||
factor * 10, \
|
||||
factor * 100, \
|
||||
factor * 1000, \
|
||||
factor * 10000, \
|
||||
factor * 100000, \
|
||||
factor * 1000000, \
|
||||
factor * 10000000, \
|
||||
factor * 100000000, \
|
||||
factor * 1000000000
|
||||
|
||||
template <typename T>
|
||||
const uint32_t basic_data<T>::POWERS_OF_10_32[] = {
|
||||
0, FMT_POWERS_OF_10(1)
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
const uint64_t basic_data<T>::POWERS_OF_10_64[] = {
|
||||
0,
|
||||
FMT_POWERS_OF_10(1),
|
||||
FMT_POWERS_OF_10(1000000000ull),
|
||||
10000000000000000000ull
|
||||
};
|
||||
|
||||
// Normalized 64-bit significands of pow(10, k), for k = -348, -340, ..., 340.
|
||||
// These are generated by support/compute-powers.py.
|
||||
template <typename T>
|
||||
const uint64_t basic_data<T>::POW10_SIGNIFICANDS[] = {
|
||||
0xfa8fd5a0081c0288, 0xbaaee17fa23ebf76, 0x8b16fb203055ac76, 0xcf42894a5dce35ea,
|
||||
0x9a6bb0aa55653b2d, 0xe61acf033d1a45df, 0xab70fe17c79ac6ca, 0xff77b1fcbebcdc4f,
|
||||
0xbe5691ef416bd60c, 0x8dd01fad907ffc3c, 0xd3515c2831559a83, 0x9d71ac8fada6c9b5,
|
||||
0xea9c227723ee8bcb, 0xaecc49914078536d, 0x823c12795db6ce57, 0xc21094364dfb5637,
|
||||
0x9096ea6f3848984f, 0xd77485cb25823ac7, 0xa086cfcd97bf97f4, 0xef340a98172aace5,
|
||||
0xb23867fb2a35b28e, 0x84c8d4dfd2c63f3b, 0xc5dd44271ad3cdba, 0x936b9fcebb25c996,
|
||||
0xdbac6c247d62a584, 0xa3ab66580d5fdaf6, 0xf3e2f893dec3f126, 0xb5b5ada8aaff80b8,
|
||||
0x87625f056c7c4a8b, 0xc9bcff6034c13053, 0x964e858c91ba2655, 0xdff9772470297ebd,
|
||||
0xa6dfbd9fb8e5b88f, 0xf8a95fcf88747d94, 0xb94470938fa89bcf, 0x8a08f0f8bf0f156b,
|
||||
0xcdb02555653131b6, 0x993fe2c6d07b7fac, 0xe45c10c42a2b3b06, 0xaa242499697392d3,
|
||||
0xfd87b5f28300ca0e, 0xbce5086492111aeb, 0x8cbccc096f5088cc, 0xd1b71758e219652c,
|
||||
0x9c40000000000000, 0xe8d4a51000000000, 0xad78ebc5ac620000, 0x813f3978f8940984,
|
||||
0xc097ce7bc90715b3, 0x8f7e32ce7bea5c70, 0xd5d238a4abe98068, 0x9f4f2726179a2245,
|
||||
0xed63a231d4c4fb27, 0xb0de65388cc8ada8, 0x83c7088e1aab65db, 0xc45d1df942711d9a,
|
||||
0x924d692ca61be758, 0xda01ee641a708dea, 0xa26da3999aef774a, 0xf209787bb47d6b85,
|
||||
0xb454e4a179dd1877, 0x865b86925b9bc5c2, 0xc83553c5c8965d3d, 0x952ab45cfa97a0b3,
|
||||
0xde469fbd99a05fe3, 0xa59bc234db398c25, 0xf6c69a72a3989f5c, 0xb7dcbf5354e9bece,
|
||||
0x88fcf317f22241e2, 0xcc20ce9bd35c78a5, 0x98165af37b2153df, 0xe2a0b5dc971f303a,
|
||||
0xa8d9d1535ce3b396, 0xfb9b7cd9a4a7443c, 0xbb764c4ca7a44410, 0x8bab8eefb6409c1a,
|
||||
0xd01fef10a657842c, 0x9b10a4e5e9913129, 0xe7109bfba19c0c9d, 0xac2820d9623bf429,
|
||||
0x80444b5e7aa7cf85, 0xbf21e44003acdd2d, 0x8e679c2f5e44ff8f, 0xd433179d9c8cb841,
|
||||
0x9e19db92b4e31ba9, 0xeb96bf6ebadf77d9, 0xaf87023b9bf0ee6b
|
||||
};
|
||||
|
||||
// Binary exponents of pow(10, k), for k = -348, -340, ..., 340, corresponding
|
||||
// to significands above.
|
||||
template <typename T>
|
||||
const int16_t basic_data<T>::POW10_EXPONENTS[] = {
|
||||
-1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, -954,
|
||||
-927, -901, -874, -847, -821, -794, -768, -741, -715, -688, -661,
|
||||
-635, -608, -582, -555, -529, -502, -475, -449, -422, -396, -369,
|
||||
-343, -316, -289, -263, -236, -210, -183, -157, -130, -103, -77,
|
||||
-50, -24, 3, 30, 56, 83, 109, 136, 162, 189, 216,
|
||||
242, 269, 295, 322, 348, 375, 402, 428, 455, 481, 508,
|
||||
534, 561, 588, 614, 641, 667, 694, 720, 747, 774, 800,
|
||||
827, 853, 880, 907, 933, 960, 986, 1013, 1039, 1066
|
||||
};
|
||||
|
||||
template <typename T> const char basic_data<T>::RESET_COLOR[] = "\x1b[0m";
|
||||
template <typename T> const wchar_t basic_data<T>::WRESET_COLOR[] = L"\x1b[0m";
|
||||
|
||||
FMT_FUNC fp operator*(fp x, fp y) {
|
||||
// Multiply 32-bit parts of significands.
|
||||
uint64_t mask = (1ULL << 32) - 1;
|
||||
uint64_t a = x.f >> 32, b = x.f & mask;
|
||||
uint64_t c = y.f >> 32, d = y.f & mask;
|
||||
uint64_t ac = a * c, bc = b * c, ad = a * d, bd = b * d;
|
||||
// Compute mid 64-bit of result and round.
|
||||
uint64_t mid = (bd >> 32) + (ad & mask) + (bc & mask) + (1U << 31);
|
||||
return fp(ac + (ad >> 32) + (bc >> 32) + (mid >> 32), x.e + y.e + 64);
|
||||
}
|
||||
|
||||
FMT_FUNC fp get_cached_power(int min_exponent, int &pow10_exponent) {
|
||||
const double one_over_log2_10 = 0.30102999566398114; // 1 / log2(10)
|
||||
int index = static_cast<int>(std::ceil(
|
||||
(min_exponent + fp::significand_size - 1) * one_over_log2_10));
|
||||
// Decimal exponent of the first (smallest) cached power of 10.
|
||||
const int first_dec_exp = -348;
|
||||
// Difference between two consecutive decimal exponents in cached powers of 10.
|
||||
const int dec_exp_step = 8;
|
||||
index = (index - first_dec_exp - 1) / dec_exp_step + 1;
|
||||
pow10_exponent = first_dec_exp + index * dec_exp_step;
|
||||
return fp(data::POW10_SIGNIFICANDS[index], data::POW10_EXPONENTS[index]);
|
||||
}
|
||||
} // namespace internal
|
||||
|
||||
#if FMT_USE_WINDOWS_H
|
||||
|
||||
FMT_FUNC internal::utf8_to_utf16::utf8_to_utf16(string_view s) {
|
||||
static const char ERROR_MSG[] = "cannot convert string from UTF-8 to UTF-16";
|
||||
if (s.size() > INT_MAX)
|
||||
FMT_THROW(windows_error(ERROR_INVALID_PARAMETER, ERROR_MSG));
|
||||
int s_size = static_cast<int>(s.size());
|
||||
if (s_size == 0) {
|
||||
// MultiByteToWideChar does not support zero length, handle separately.
|
||||
buffer_.resize(1);
|
||||
buffer_[0] = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
int length = MultiByteToWideChar(
|
||||
CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, FMT_NULL, 0);
|
||||
if (length == 0)
|
||||
FMT_THROW(windows_error(GetLastError(), ERROR_MSG));
|
||||
buffer_.resize(length + 1);
|
||||
length = MultiByteToWideChar(
|
||||
CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, &buffer_[0], length);
|
||||
if (length == 0)
|
||||
FMT_THROW(windows_error(GetLastError(), ERROR_MSG));
|
||||
buffer_[length] = 0;
|
||||
}
|
||||
|
||||
FMT_FUNC internal::utf16_to_utf8::utf16_to_utf8(wstring_view s) {
|
||||
if (int error_code = convert(s)) {
|
||||
FMT_THROW(windows_error(error_code,
|
||||
"cannot convert string from UTF-16 to UTF-8"));
|
||||
}
|
||||
}
|
||||
|
||||
FMT_FUNC int internal::utf16_to_utf8::convert(wstring_view s) {
|
||||
if (s.size() > INT_MAX)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
int s_size = static_cast<int>(s.size());
|
||||
if (s_size == 0) {
|
||||
// WideCharToMultiByte does not support zero length, handle separately.
|
||||
buffer_.resize(1);
|
||||
buffer_[0] = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int length = WideCharToMultiByte(
|
||||
CP_UTF8, 0, s.data(), s_size, FMT_NULL, 0, FMT_NULL, FMT_NULL);
|
||||
if (length == 0)
|
||||
return GetLastError();
|
||||
buffer_.resize(length + 1);
|
||||
length = WideCharToMultiByte(
|
||||
CP_UTF8, 0, s.data(), s_size, &buffer_[0], length, FMT_NULL, FMT_NULL);
|
||||
if (length == 0)
|
||||
return GetLastError();
|
||||
buffer_[length] = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
FMT_FUNC void windows_error::init(
|
||||
int err_code, string_view format_str, format_args args) {
|
||||
error_code_ = err_code;
|
||||
memory_buffer buffer;
|
||||
internal::format_windows_error(buffer, err_code, vformat(format_str, args));
|
||||
std::runtime_error &base = *this;
|
||||
base = std::runtime_error(to_string(buffer));
|
||||
}
|
||||
|
||||
FMT_FUNC void internal::format_windows_error(
|
||||
internal::buffer &out, int error_code, string_view message) FMT_NOEXCEPT {
|
||||
FMT_TRY {
|
||||
wmemory_buffer buf;
|
||||
buf.resize(inline_buffer_size);
|
||||
for (;;) {
|
||||
wchar_t *system_message = &buf[0];
|
||||
int result = FormatMessageW(
|
||||
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
FMT_NULL, error_code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
system_message, static_cast<uint32_t>(buf.size()), FMT_NULL);
|
||||
if (result != 0) {
|
||||
utf16_to_utf8 utf8_message;
|
||||
if (utf8_message.convert(system_message) == ERROR_SUCCESS) {
|
||||
writer w(out);
|
||||
w.write(message);
|
||||
w.write(": ");
|
||||
w.write(utf8_message);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
|
||||
break; // Can't get error message, report error code instead.
|
||||
buf.resize(buf.size() * 2);
|
||||
}
|
||||
} FMT_CATCH(...) {}
|
||||
format_error_code(out, error_code, message);
|
||||
}
|
||||
|
||||
#endif // FMT_USE_WINDOWS_H
|
||||
|
||||
FMT_FUNC void format_system_error(
|
||||
internal::buffer &out, int error_code, string_view message) FMT_NOEXCEPT {
|
||||
FMT_TRY {
|
||||
memory_buffer buf;
|
||||
buf.resize(inline_buffer_size);
|
||||
for (;;) {
|
||||
char *system_message = &buf[0];
|
||||
int result = safe_strerror(error_code, system_message, buf.size());
|
||||
if (result == 0) {
|
||||
writer w(out);
|
||||
w.write(message);
|
||||
w.write(": ");
|
||||
w.write(system_message);
|
||||
return;
|
||||
}
|
||||
if (result != ERANGE)
|
||||
break; // Can't get error message, report error code instead.
|
||||
buf.resize(buf.size() * 2);
|
||||
}
|
||||
} FMT_CATCH(...) {}
|
||||
format_error_code(out, error_code, message);
|
||||
}
|
||||
|
||||
template <typename Char>
|
||||
void basic_fixed_buffer<Char>::grow(std::size_t) {
|
||||
FMT_THROW(std::runtime_error("buffer overflow"));
|
||||
}
|
||||
|
||||
FMT_FUNC void internal::error_handler::on_error(const char *message) {
|
||||
FMT_THROW(format_error(message));
|
||||
}
|
||||
|
||||
FMT_FUNC void report_system_error(
|
||||
int error_code, fmt::string_view message) FMT_NOEXCEPT {
|
||||
report_error(format_system_error, error_code, message);
|
||||
}
|
||||
|
||||
#if FMT_USE_WINDOWS_H
|
||||
FMT_FUNC void report_windows_error(
|
||||
int error_code, fmt::string_view message) FMT_NOEXCEPT {
|
||||
report_error(internal::format_windows_error, error_code, message);
|
||||
}
|
||||
#endif
|
||||
|
||||
FMT_FUNC void vprint(std::FILE *f, string_view format_str, format_args args) {
|
||||
memory_buffer buffer;
|
||||
vformat_to(buffer, format_str, args);
|
||||
std::fwrite(buffer.data(), 1, buffer.size(), f);
|
||||
}
|
||||
|
||||
FMT_FUNC void vprint(std::FILE *f, wstring_view format_str, wformat_args args) {
|
||||
wmemory_buffer buffer;
|
||||
vformat_to(buffer, format_str, args);
|
||||
std::fwrite(buffer.data(), sizeof(wchar_t), buffer.size(), f);
|
||||
}
|
||||
|
||||
FMT_FUNC void vprint(string_view format_str, format_args args) {
|
||||
vprint(stdout, format_str, args);
|
||||
}
|
||||
|
||||
FMT_FUNC void vprint(wstring_view format_str, wformat_args args) {
|
||||
vprint(stdout, format_str, args);
|
||||
}
|
||||
|
||||
#ifndef FMT_EXTENDED_COLORS
|
||||
FMT_FUNC void vprint_colored(color c, string_view format, format_args args) {
|
||||
char escape[] = "\x1b[30m";
|
||||
escape[3] = static_cast<char>('0' + c);
|
||||
std::fputs(escape, stdout);
|
||||
vprint(format, args);
|
||||
std::fputs(internal::data::RESET_COLOR, stdout);
|
||||
}
|
||||
|
||||
FMT_FUNC void vprint_colored(color c, wstring_view format, wformat_args args) {
|
||||
wchar_t escape[] = L"\x1b[30m";
|
||||
escape[3] = static_cast<wchar_t>('0' + c);
|
||||
std::fputws(escape, stdout);
|
||||
vprint(format, args);
|
||||
std::fputws(internal::data::WRESET_COLOR, stdout);
|
||||
}
|
||||
#else
|
||||
namespace internal {
|
||||
FMT_CONSTEXPR void to_esc(uint8_t c, char out[], int offset) {
|
||||
out[offset + 0] = static_cast<char>('0' + c / 100);
|
||||
out[offset + 1] = static_cast<char>('0' + c / 10 % 10);
|
||||
out[offset + 2] = static_cast<char>('0' + c % 10);
|
||||
}
|
||||
} // namespace internal
|
||||
|
||||
FMT_FUNC void vprint_rgb(rgb fd, string_view format, format_args args) {
|
||||
char escape_fd[] = "\x1b[38;2;000;000;000m";
|
||||
internal::to_esc(fd.r, escape_fd, 7);
|
||||
internal::to_esc(fd.g, escape_fd, 11);
|
||||
internal::to_esc(fd.b, escape_fd, 15);
|
||||
|
||||
std::fputs(escape_fd, stdout);
|
||||
vprint(format, args);
|
||||
std::fputs(internal::data::RESET_COLOR, stdout);
|
||||
}
|
||||
|
||||
FMT_FUNC void vprint_rgb(rgb fd, rgb bg, string_view format, format_args args) {
|
||||
char escape_fd[] = "\x1b[38;2;000;000;000m"; // foreground color
|
||||
char escape_bg[] = "\x1b[48;2;000;000;000m"; // background color
|
||||
internal::to_esc(fd.r, escape_fd, 7);
|
||||
internal::to_esc(fd.g, escape_fd, 11);
|
||||
internal::to_esc(fd.b, escape_fd, 15);
|
||||
|
||||
internal::to_esc(bg.r, escape_bg, 7);
|
||||
internal::to_esc(bg.g, escape_bg, 11);
|
||||
internal::to_esc(bg.b, escape_bg, 15);
|
||||
|
||||
std::fputs(escape_fd, stdout);
|
||||
std::fputs(escape_bg, stdout);
|
||||
vprint(format, args);
|
||||
std::fputs(internal::data::RESET_COLOR, stdout);
|
||||
}
|
||||
#endif
|
||||
|
||||
FMT_FUNC locale locale_provider::locale() { return fmt::locale(); }
|
||||
|
||||
FMT_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // FMT_FORMAT_INL_H_
|
52
lib/fmt/format.cc
Normal file
52
lib/fmt/format.cc
Normal file
|
@ -0,0 +1,52 @@
|
|||
// Formatting library for C++
|
||||
//
|
||||
// Copyright (c) 2012 - 2016, Victor Zverovich
|
||||
// All rights reserved.
|
||||
//
|
||||
// For the license information refer to format.h.
|
||||
|
||||
#include "fmt/format-inl.h"
|
||||
|
||||
FMT_BEGIN_NAMESPACE
|
||||
namespace internal {
|
||||
// Force linking of inline functions into the library.
|
||||
std::string (*vformat_ref)(string_view, format_args) = vformat;
|
||||
std::wstring (*vformat_wref)(wstring_view, wformat_args) = vformat;
|
||||
}
|
||||
|
||||
template struct internal::basic_data<void>;
|
||||
|
||||
// Explicit instantiations for char.
|
||||
|
||||
template FMT_API char internal::thousands_sep(locale_provider *lp);
|
||||
|
||||
template void basic_fixed_buffer<char>::grow(std::size_t);
|
||||
|
||||
template void internal::arg_map<format_context>::init(
|
||||
const basic_format_args<format_context> &args);
|
||||
|
||||
template FMT_API int internal::char_traits<char>::format_float(
|
||||
char *buffer, std::size_t size, const char *format, int precision,
|
||||
double value);
|
||||
|
||||
template FMT_API int internal::char_traits<char>::format_float(
|
||||
char *buffer, std::size_t size, const char *format, int precision,
|
||||
long double value);
|
||||
|
||||
// Explicit instantiations for wchar_t.
|
||||
|
||||
template FMT_API wchar_t internal::thousands_sep(locale_provider *lp);
|
||||
|
||||
template void basic_fixed_buffer<wchar_t>::grow(std::size_t);
|
||||
|
||||
template void internal::arg_map<wformat_context>::init(
|
||||
const basic_format_args<wformat_context> &args);
|
||||
|
||||
template FMT_API int internal::char_traits<wchar_t>::format_float(
|
||||
wchar_t *buffer, std::size_t size, const wchar_t *format,
|
||||
int precision, double value);
|
||||
|
||||
template FMT_API int internal::char_traits<wchar_t>::format_float(
|
||||
wchar_t *buffer, std::size_t size, const wchar_t *format,
|
||||
int precision, long double value);
|
||||
FMT_END_NAMESPACE
|
3937
lib/fmt/format.h
Normal file
3937
lib/fmt/format.h
Normal file
File diff suppressed because it is too large
Load diff
162
lib/fmt/ostream.h
Normal file
162
lib/fmt/ostream.h
Normal file
|
@ -0,0 +1,162 @@
|
|||
// Formatting library for C++ - std::ostream support
|
||||
//
|
||||
// Copyright (c) 2012 - 2016, Victor Zverovich
|
||||
// All rights reserved.
|
||||
//
|
||||
// For the license information refer to format.h.
|
||||
|
||||
#ifndef FMT_OSTREAM_H_
|
||||
#define FMT_OSTREAM_H_
|
||||
|
||||
#include "format.h"
|
||||
#include <ostream>
|
||||
|
||||
FMT_BEGIN_NAMESPACE
|
||||
namespace internal {
|
||||
|
||||
template <class Char>
|
||||
class formatbuf : public std::basic_streambuf<Char> {
|
||||
private:
|
||||
typedef typename std::basic_streambuf<Char>::int_type int_type;
|
||||
typedef typename std::basic_streambuf<Char>::traits_type traits_type;
|
||||
|
||||
basic_buffer<Char> &buffer_;
|
||||
|
||||
public:
|
||||
formatbuf(basic_buffer<Char> &buffer) : buffer_(buffer) {}
|
||||
|
||||
protected:
|
||||
// The put-area is actually always empty. This makes the implementation
|
||||
// simpler and has the advantage that the streambuf and the buffer are always
|
||||
// in sync and sputc never writes into uninitialized memory. The obvious
|
||||
// disadvantage is that each call to sputc always results in a (virtual) call
|
||||
// to overflow. There is no disadvantage here for sputn since this always
|
||||
// results in a call to xsputn.
|
||||
|
||||
int_type overflow(int_type ch = traits_type::eof()) FMT_OVERRIDE {
|
||||
if (!traits_type::eq_int_type(ch, traits_type::eof()))
|
||||
buffer_.push_back(static_cast<Char>(ch));
|
||||
return ch;
|
||||
}
|
||||
|
||||
std::streamsize xsputn(const Char *s, std::streamsize count) FMT_OVERRIDE {
|
||||
buffer_.append(s, s + count);
|
||||
return count;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Char>
|
||||
struct test_stream : std::basic_ostream<Char> {
|
||||
private:
|
||||
struct null;
|
||||
// Hide all operator<< from std::basic_ostream<Char>.
|
||||
void operator<<(null);
|
||||
};
|
||||
|
||||
// Checks if T has a user-defined operator<< (e.g. not a member of std::ostream).
|
||||
template <typename T, typename Char>
|
||||
class is_streamable {
|
||||
private:
|
||||
template <typename U>
|
||||
static decltype(
|
||||
internal::declval<test_stream<Char>&>()
|
||||
<< internal::declval<U>(), std::true_type()) test(int);
|
||||
|
||||
template <typename>
|
||||
static std::false_type test(...);
|
||||
|
||||
typedef decltype(test<T>(0)) result;
|
||||
|
||||
public:
|
||||
// std::string operator<< is not considered user-defined because we handle strings
|
||||
// specially.
|
||||
static const bool value = result::value && !std::is_same<T, std::string>::value;
|
||||
};
|
||||
|
||||
// Disable conversion to int if T has an overloaded operator<< which is a free
|
||||
// function (not a member of std::ostream).
|
||||
template <typename T, typename Char>
|
||||
class convert_to_int<T, Char, true> {
|
||||
public:
|
||||
static const bool value =
|
||||
convert_to_int<T, Char, false>::value && !is_streamable<T, Char>::value;
|
||||
};
|
||||
|
||||
// Write the content of buf to os.
|
||||
template <typename Char>
|
||||
void write(std::basic_ostream<Char> &os, basic_buffer<Char> &buf) {
|
||||
const Char *data = buf.data();
|
||||
typedef std::make_unsigned<std::streamsize>::type UnsignedStreamSize;
|
||||
UnsignedStreamSize size = buf.size();
|
||||
UnsignedStreamSize max_size =
|
||||
internal::to_unsigned((std::numeric_limits<std::streamsize>::max)());
|
||||
do {
|
||||
UnsignedStreamSize n = size <= max_size ? size : max_size;
|
||||
os.write(data, static_cast<std::streamsize>(n));
|
||||
data += n;
|
||||
size -= n;
|
||||
} while (size != 0);
|
||||
}
|
||||
|
||||
template <typename Char, typename T>
|
||||
void format_value(basic_buffer<Char> &buffer, const T &value) {
|
||||
internal::formatbuf<Char> format_buf(buffer);
|
||||
std::basic_ostream<Char> output(&format_buf);
|
||||
output.exceptions(std::ios_base::failbit | std::ios_base::badbit);
|
||||
output << value;
|
||||
buffer.resize(buffer.size());
|
||||
}
|
||||
|
||||
// Disable builtin formatting of enums and use operator<< instead.
|
||||
template <typename T>
|
||||
struct format_enum<T,
|
||||
typename std::enable_if<std::is_enum<T>::value>::type> : std::false_type {};
|
||||
} // namespace internal
|
||||
|
||||
// Formats an object of type T that has an overloaded ostream operator<<.
|
||||
template <typename T, typename Char>
|
||||
struct formatter<T, Char,
|
||||
typename std::enable_if<internal::is_streamable<T, Char>::value>::type>
|
||||
: formatter<basic_string_view<Char>, Char> {
|
||||
|
||||
template <typename Context>
|
||||
auto format(const T &value, Context &ctx) -> decltype(ctx.out()) {
|
||||
basic_memory_buffer<Char> buffer;
|
||||
internal::format_value(buffer, value);
|
||||
basic_string_view<Char> str(buffer.data(), buffer.size());
|
||||
formatter<basic_string_view<Char>, Char>::format(str, ctx);
|
||||
return ctx.out();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Char>
|
||||
inline void vprint(std::basic_ostream<Char> &os,
|
||||
basic_string_view<Char> format_str,
|
||||
basic_format_args<typename buffer_context<Char>::type> args) {
|
||||
basic_memory_buffer<Char> buffer;
|
||||
vformat_to(buffer, format_str, args);
|
||||
internal::write(os, buffer);
|
||||
}
|
||||
/**
|
||||
\rst
|
||||
Prints formatted data to the stream *os*.
|
||||
|
||||
**Example**::
|
||||
|
||||
fmt::print(cerr, "Don't {}!", "panic");
|
||||
\endrst
|
||||
*/
|
||||
template <typename... Args>
|
||||
inline void print(std::ostream &os, string_view format_str,
|
||||
const Args & ... args) {
|
||||
vprint<char>(os, format_str, make_format_args<format_context>(args...));
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
inline void print(std::wostream &os, wstring_view format_str,
|
||||
const Args & ... args) {
|
||||
vprint<wchar_t>(os, format_str, make_format_args<wformat_context>(args...));
|
||||
}
|
||||
FMT_END_NAMESPACE
|
||||
|
||||
#endif // FMT_OSTREAM_H_
|
244
lib/fmt/posix.cc
Normal file
244
lib/fmt/posix.cc
Normal file
|
@ -0,0 +1,244 @@
|
|||
// A C++ interface to POSIX functions.
|
||||
//
|
||||
// Copyright (c) 2012 - 2016, Victor Zverovich
|
||||
// All rights reserved.
|
||||
//
|
||||
// For the license information refer to format.h.
|
||||
|
||||
// Disable bogus MSVC warnings.
|
||||
#if !defined(_CRT_SECURE_NO_WARNINGS) && defined(_MSC_VER)
|
||||
# define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include "fmt/posix.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h>
|
||||
#else
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <io.h>
|
||||
|
||||
# define O_CREAT _O_CREAT
|
||||
# define O_TRUNC _O_TRUNC
|
||||
|
||||
# ifndef S_IRUSR
|
||||
# define S_IRUSR _S_IREAD
|
||||
# endif
|
||||
|
||||
# ifndef S_IWUSR
|
||||
# define S_IWUSR _S_IWRITE
|
||||
# endif
|
||||
|
||||
# ifdef __MINGW32__
|
||||
# define _SH_DENYNO 0x40
|
||||
# endif
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
#ifdef fileno
|
||||
# undef fileno
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
#ifdef _WIN32
|
||||
// Return type of read and write functions.
|
||||
typedef int RWResult;
|
||||
|
||||
// On Windows the count argument to read and write is unsigned, so convert
|
||||
// it from size_t preventing integer overflow.
|
||||
inline unsigned convert_rwcount(std::size_t count) {
|
||||
return count <= UINT_MAX ? static_cast<unsigned>(count) : UINT_MAX;
|
||||
}
|
||||
#else
|
||||
// Return type of read and write functions.
|
||||
typedef ssize_t RWResult;
|
||||
|
||||
inline std::size_t convert_rwcount(std::size_t count) { return count; }
|
||||
#endif
|
||||
}
|
||||
|
||||
FMT_BEGIN_NAMESPACE
|
||||
|
||||
buffered_file::~buffered_file() FMT_NOEXCEPT {
|
||||
if (file_ && FMT_SYSTEM(fclose(file_)) != 0)
|
||||
report_system_error(errno, "cannot close file");
|
||||
}
|
||||
|
||||
buffered_file::buffered_file(cstring_view filename, cstring_view mode) {
|
||||
FMT_RETRY_VAL(file_,
|
||||
FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), FMT_NULL);
|
||||
if (!file_)
|
||||
FMT_THROW(system_error(errno, "cannot open file {}", filename.c_str()));
|
||||
}
|
||||
|
||||
void buffered_file::close() {
|
||||
if (!file_)
|
||||
return;
|
||||
int result = FMT_SYSTEM(fclose(file_));
|
||||
file_ = FMT_NULL;
|
||||
if (result != 0)
|
||||
FMT_THROW(system_error(errno, "cannot close file"));
|
||||
}
|
||||
|
||||
// A macro used to prevent expansion of fileno on broken versions of MinGW.
|
||||
#define FMT_ARGS
|
||||
|
||||
int buffered_file::fileno() const {
|
||||
int fd = FMT_POSIX_CALL(fileno FMT_ARGS(file_));
|
||||
if (fd == -1)
|
||||
FMT_THROW(system_error(errno, "cannot get file descriptor"));
|
||||
return fd;
|
||||
}
|
||||
|
||||
file::file(cstring_view path, int oflag) {
|
||||
int mode = S_IRUSR | S_IWUSR;
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
fd_ = -1;
|
||||
FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode));
|
||||
#else
|
||||
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, mode)));
|
||||
#endif
|
||||
if (fd_ == -1)
|
||||
FMT_THROW(system_error(errno, "cannot open file {}", path.c_str()));
|
||||
}
|
||||
|
||||
file::~file() FMT_NOEXCEPT {
|
||||
// Don't retry close in case of EINTR!
|
||||
// See http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html
|
||||
if (fd_ != -1 && FMT_POSIX_CALL(close(fd_)) != 0)
|
||||
report_system_error(errno, "cannot close file");
|
||||
}
|
||||
|
||||
void file::close() {
|
||||
if (fd_ == -1)
|
||||
return;
|
||||
// Don't retry close in case of EINTR!
|
||||
// See http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html
|
||||
int result = FMT_POSIX_CALL(close(fd_));
|
||||
fd_ = -1;
|
||||
if (result != 0)
|
||||
FMT_THROW(system_error(errno, "cannot close file"));
|
||||
}
|
||||
|
||||
long long file::size() const {
|
||||
#ifdef _WIN32
|
||||
// Use GetFileSize instead of GetFileSizeEx for the case when _WIN32_WINNT
|
||||
// is less than 0x0500 as is the case with some default MinGW builds.
|
||||
// Both functions support large file sizes.
|
||||
DWORD size_upper = 0;
|
||||
HANDLE handle = reinterpret_cast<HANDLE>(_get_osfhandle(fd_));
|
||||
DWORD size_lower = FMT_SYSTEM(GetFileSize(handle, &size_upper));
|
||||
if (size_lower == INVALID_FILE_SIZE) {
|
||||
DWORD error = GetLastError();
|
||||
if (error != NO_ERROR)
|
||||
FMT_THROW(windows_error(GetLastError(), "cannot get file size"));
|
||||
}
|
||||
unsigned long long long_size = size_upper;
|
||||
return (long_size << sizeof(DWORD) * CHAR_BIT) | size_lower;
|
||||
#else
|
||||
typedef struct stat Stat;
|
||||
Stat file_stat = Stat();
|
||||
if (FMT_POSIX_CALL(fstat(fd_, &file_stat)) == -1)
|
||||
FMT_THROW(system_error(errno, "cannot get file attributes"));
|
||||
static_assert(sizeof(long long) >= sizeof(file_stat.st_size),
|
||||
"return type of file::size is not large enough");
|
||||
return file_stat.st_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
std::size_t file::read(void *buffer, std::size_t count) {
|
||||
RWResult result = 0;
|
||||
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
|
||||
if (result < 0)
|
||||
FMT_THROW(system_error(errno, "cannot read from file"));
|
||||
return internal::to_unsigned(result);
|
||||
}
|
||||
|
||||
std::size_t file::write(const void *buffer, std::size_t count) {
|
||||
RWResult result = 0;
|
||||
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
|
||||
if (result < 0)
|
||||
FMT_THROW(system_error(errno, "cannot write to file"));
|
||||
return internal::to_unsigned(result);
|
||||
}
|
||||
|
||||
file file::dup(int fd) {
|
||||
// Don't retry as dup doesn't return EINTR.
|
||||
// http://pubs.opengroup.org/onlinepubs/009695399/functions/dup.html
|
||||
int new_fd = FMT_POSIX_CALL(dup(fd));
|
||||
if (new_fd == -1)
|
||||
FMT_THROW(system_error(errno, "cannot duplicate file descriptor {}", fd));
|
||||
return file(new_fd);
|
||||
}
|
||||
|
||||
void file::dup2(int fd) {
|
||||
int result = 0;
|
||||
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
|
||||
if (result == -1) {
|
||||
FMT_THROW(system_error(errno,
|
||||
"cannot duplicate file descriptor {} to {}", fd_, fd));
|
||||
}
|
||||
}
|
||||
|
||||
void file::dup2(int fd, error_code &ec) FMT_NOEXCEPT {
|
||||
int result = 0;
|
||||
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
|
||||
if (result == -1)
|
||||
ec = error_code(errno);
|
||||
}
|
||||
|
||||
void file::pipe(file &read_end, file &write_end) {
|
||||
// Close the descriptors first to make sure that assignments don't throw
|
||||
// and there are no leaks.
|
||||
read_end.close();
|
||||
write_end.close();
|
||||
int fds[2] = {};
|
||||
#ifdef _WIN32
|
||||
// Make the default pipe capacity same as on Linux 2.6.11+.
|
||||
enum { DEFAULT_CAPACITY = 65536 };
|
||||
int result = FMT_POSIX_CALL(pipe(fds, DEFAULT_CAPACITY, _O_BINARY));
|
||||
#else
|
||||
// Don't retry as the pipe function doesn't return EINTR.
|
||||
// http://pubs.opengroup.org/onlinepubs/009696799/functions/pipe.html
|
||||
int result = FMT_POSIX_CALL(pipe(fds));
|
||||
#endif
|
||||
if (result != 0)
|
||||
FMT_THROW(system_error(errno, "cannot create pipe"));
|
||||
// The following assignments don't throw because read_fd and write_fd
|
||||
// are closed.
|
||||
read_end = file(fds[0]);
|
||||
write_end = file(fds[1]);
|
||||
}
|
||||
|
||||
buffered_file file::fdopen(const char *mode) {
|
||||
// Don't retry as fdopen doesn't return EINTR.
|
||||
FILE *f = FMT_POSIX_CALL(fdopen(fd_, mode));
|
||||
if (!f)
|
||||
FMT_THROW(system_error(errno,
|
||||
"cannot associate stream with file descriptor"));
|
||||
buffered_file bf(f);
|
||||
fd_ = -1;
|
||||
return bf;
|
||||
}
|
||||
|
||||
long getpagesize() {
|
||||
#ifdef _WIN32
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
return si.dwPageSize;
|
||||
#else
|
||||
long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE));
|
||||
if (size < 0)
|
||||
FMT_THROW(system_error(errno, "cannot get memory page size"));
|
||||
return size;
|
||||
#endif
|
||||
}
|
||||
FMT_END_NAMESPACE
|
||||
|
417
lib/fmt/posix.h
Normal file
417
lib/fmt/posix.h
Normal file
|
@ -0,0 +1,417 @@
|
|||
// A C++ interface to POSIX functions.
|
||||
//
|
||||
// Copyright (c) 2012 - 2016, Victor Zverovich
|
||||
// All rights reserved.
|
||||
//
|
||||
// For the license information refer to format.h.
|
||||
|
||||
#ifndef FMT_POSIX_H_
|
||||
#define FMT_POSIX_H_
|
||||
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
// Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/.
|
||||
# undef __STRICT_ANSI__
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h> // for O_RDONLY
|
||||
#include <locale.h> // for locale_t
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> // for strtod_l
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#if defined __APPLE__ || defined(__FreeBSD__)
|
||||
# include <xlocale.h> // for LC_NUMERIC_MASK on OS X
|
||||
#endif
|
||||
|
||||
#include "format.h"
|
||||
|
||||
#ifndef FMT_POSIX
|
||||
# if defined(_WIN32) && !defined(__MINGW32__)
|
||||
// Fix warnings about deprecated symbols.
|
||||
# define FMT_POSIX(call) _##call
|
||||
# else
|
||||
# define FMT_POSIX(call) call
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Calls to system functions are wrapped in FMT_SYSTEM for testability.
|
||||
#ifdef FMT_SYSTEM
|
||||
# define FMT_POSIX_CALL(call) FMT_SYSTEM(call)
|
||||
#else
|
||||
# define FMT_SYSTEM(call) call
|
||||
# ifdef _WIN32
|
||||
// Fix warnings about deprecated symbols.
|
||||
# define FMT_POSIX_CALL(call) ::_##call
|
||||
# else
|
||||
# define FMT_POSIX_CALL(call) ::call
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Retries the expression while it evaluates to error_result and errno
|
||||
// equals to EINTR.
|
||||
#ifndef _WIN32
|
||||
# define FMT_RETRY_VAL(result, expression, error_result) \
|
||||
do { \
|
||||
result = (expression); \
|
||||
} while (result == error_result && errno == EINTR)
|
||||
#else
|
||||
# define FMT_RETRY_VAL(result, expression, error_result) result = (expression)
|
||||
#endif
|
||||
|
||||
#define FMT_RETRY(result, expression) FMT_RETRY_VAL(result, expression, -1)
|
||||
|
||||
FMT_BEGIN_NAMESPACE
|
||||
|
||||
/**
|
||||
\rst
|
||||
A reference to a null-terminated string. It can be constructed from a C
|
||||
string or ``std::string``.
|
||||
|
||||
You can use one of the following typedefs for common character types:
|
||||
|
||||
+---------------+-----------------------------+
|
||||
| Type | Definition |
|
||||
+===============+=============================+
|
||||
| cstring_view | basic_cstring_view<char> |
|
||||
+---------------+-----------------------------+
|
||||
| wcstring_view | basic_cstring_view<wchar_t> |
|
||||
+---------------+-----------------------------+
|
||||
|
||||
This class is most useful as a parameter type to allow passing
|
||||
different types of strings to a function, for example::
|
||||
|
||||
template <typename... Args>
|
||||
std::string format(cstring_view format_str, const Args & ... args);
|
||||
|
||||
format("{}", 42);
|
||||
format(std::string("{}"), 42);
|
||||
\endrst
|
||||
*/
|
||||
template <typename Char>
|
||||
class basic_cstring_view {
|
||||
private:
|
||||
const Char *data_;
|
||||
|
||||
public:
|
||||
/** Constructs a string reference object from a C string. */
|
||||
basic_cstring_view(const Char *s) : data_(s) {}
|
||||
|
||||
/**
|
||||
\rst
|
||||
Constructs a string reference from an ``std::string`` object.
|
||||
\endrst
|
||||
*/
|
||||
basic_cstring_view(const std::basic_string<Char> &s) : data_(s.c_str()) {}
|
||||
|
||||
/** Returns the pointer to a C string. */
|
||||
const Char *c_str() const { return data_; }
|
||||
};
|
||||
|
||||
typedef basic_cstring_view<char> cstring_view;
|
||||
typedef basic_cstring_view<wchar_t> wcstring_view;
|
||||
|
||||
// An error code.
|
||||
class error_code {
|
||||
private:
|
||||
int value_;
|
||||
|
||||
public:
|
||||
explicit error_code(int value = 0) FMT_NOEXCEPT : value_(value) {}
|
||||
|
||||
int get() const FMT_NOEXCEPT { return value_; }
|
||||
};
|
||||
|
||||
// A buffered file.
|
||||
class buffered_file {
|
||||
private:
|
||||
FILE *file_;
|
||||
|
||||
friend class file;
|
||||
|
||||
explicit buffered_file(FILE *f) : file_(f) {}
|
||||
|
||||
public:
|
||||
// Constructs a buffered_file object which doesn't represent any file.
|
||||
buffered_file() FMT_NOEXCEPT : file_(FMT_NULL) {}
|
||||
|
||||
// Destroys the object closing the file it represents if any.
|
||||
FMT_API ~buffered_file() FMT_DTOR_NOEXCEPT;
|
||||
|
||||
#if !FMT_USE_RVALUE_REFERENCES
|
||||
// Emulate a move constructor and a move assignment operator if rvalue
|
||||
// references are not supported.
|
||||
|
||||
private:
|
||||
// A proxy object to emulate a move constructor.
|
||||
// It is private to make it impossible call operator Proxy directly.
|
||||
struct Proxy {
|
||||
FILE *file;
|
||||
};
|
||||
|
||||
public:
|
||||
// A "move constructor" for moving from a temporary.
|
||||
buffered_file(Proxy p) FMT_NOEXCEPT : file_(p.file) {}
|
||||
|
||||
// A "move constructor" for moving from an lvalue.
|
||||
buffered_file(buffered_file &f) FMT_NOEXCEPT : file_(f.file_) {
|
||||
f.file_ = FMT_NULL;
|
||||
}
|
||||
|
||||
// A "move assignment operator" for moving from a temporary.
|
||||
buffered_file &operator=(Proxy p) {
|
||||
close();
|
||||
file_ = p.file;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// A "move assignment operator" for moving from an lvalue.
|
||||
buffered_file &operator=(buffered_file &other) {
|
||||
close();
|
||||
file_ = other.file_;
|
||||
other.file_ = FMT_NULL;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Returns a proxy object for moving from a temporary:
|
||||
// buffered_file file = buffered_file(...);
|
||||
operator Proxy() FMT_NOEXCEPT {
|
||||
Proxy p = {file_};
|
||||
file_ = FMT_NULL;
|
||||
return p;
|
||||
}
|
||||
|
||||
#else
|
||||
private:
|
||||
FMT_DISALLOW_COPY_AND_ASSIGN(buffered_file);
|
||||
|
||||
public:
|
||||
buffered_file(buffered_file &&other) FMT_NOEXCEPT : file_(other.file_) {
|
||||
other.file_ = FMT_NULL;
|
||||
}
|
||||
|
||||
buffered_file& operator=(buffered_file &&other) {
|
||||
close();
|
||||
file_ = other.file_;
|
||||
other.file_ = FMT_NULL;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Opens a file.
|
||||
FMT_API buffered_file(cstring_view filename, cstring_view mode);
|
||||
|
||||
// Closes the file.
|
||||
FMT_API void close();
|
||||
|
||||
// Returns the pointer to a FILE object representing this file.
|
||||
FILE *get() const FMT_NOEXCEPT { return file_; }
|
||||
|
||||
// We place parentheses around fileno to workaround a bug in some versions
|
||||
// of MinGW that define fileno as a macro.
|
||||
FMT_API int (fileno)() const;
|
||||
|
||||
void vprint(string_view format_str, format_args args) {
|
||||
fmt::vprint(file_, format_str, args);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
inline void print(string_view format_str, const Args & ... args) {
|
||||
vprint(format_str, make_format_args(args...));
|
||||
}
|
||||
};
|
||||
|
||||
// A file. Closed file is represented by a file object with descriptor -1.
|
||||
// Methods that are not declared with FMT_NOEXCEPT may throw
|
||||
// fmt::system_error in case of failure. Note that some errors such as
|
||||
// closing the file multiple times will cause a crash on Windows rather
|
||||
// than an exception. You can get standard behavior by overriding the
|
||||
// invalid parameter handler with _set_invalid_parameter_handler.
|
||||
class file {
|
||||
private:
|
||||
int fd_; // File descriptor.
|
||||
|
||||
// Constructs a file object with a given descriptor.
|
||||
explicit file(int fd) : fd_(fd) {}
|
||||
|
||||
public:
|
||||
// Possible values for the oflag argument to the constructor.
|
||||
enum {
|
||||
RDONLY = FMT_POSIX(O_RDONLY), // Open for reading only.
|
||||
WRONLY = FMT_POSIX(O_WRONLY), // Open for writing only.
|
||||
RDWR = FMT_POSIX(O_RDWR) // Open for reading and writing.
|
||||
};
|
||||
|
||||
// Constructs a file object which doesn't represent any file.
|
||||
file() FMT_NOEXCEPT : fd_(-1) {}
|
||||
|
||||
// Opens a file and constructs a file object representing this file.
|
||||
FMT_API file(cstring_view path, int oflag);
|
||||
|
||||
#if !FMT_USE_RVALUE_REFERENCES
|
||||
// Emulate a move constructor and a move assignment operator if rvalue
|
||||
// references are not supported.
|
||||
|
||||
private:
|
||||
// A proxy object to emulate a move constructor.
|
||||
// It is private to make it impossible call operator Proxy directly.
|
||||
struct Proxy {
|
||||
int fd;
|
||||
};
|
||||
|
||||
public:
|
||||
// A "move constructor" for moving from a temporary.
|
||||
file(Proxy p) FMT_NOEXCEPT : fd_(p.fd) {}
|
||||
|
||||
// A "move constructor" for moving from an lvalue.
|
||||
file(file &other) FMT_NOEXCEPT : fd_(other.fd_) {
|
||||
other.fd_ = -1;
|
||||
}
|
||||
|
||||
// A "move assignment operator" for moving from a temporary.
|
||||
file &operator=(Proxy p) {
|
||||
close();
|
||||
fd_ = p.fd;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// A "move assignment operator" for moving from an lvalue.
|
||||
file &operator=(file &other) {
|
||||
close();
|
||||
fd_ = other.fd_;
|
||||
other.fd_ = -1;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Returns a proxy object for moving from a temporary:
|
||||
// file f = file(...);
|
||||
operator Proxy() FMT_NOEXCEPT {
|
||||
Proxy p = {fd_};
|
||||
fd_ = -1;
|
||||
return p;
|
||||
}
|
||||
|
||||
#else
|
||||
private:
|
||||
FMT_DISALLOW_COPY_AND_ASSIGN(file);
|
||||
|
||||
public:
|
||||
file(file &&other) FMT_NOEXCEPT : fd_(other.fd_) {
|
||||
other.fd_ = -1;
|
||||
}
|
||||
|
||||
file& operator=(file &&other) {
|
||||
close();
|
||||
fd_ = other.fd_;
|
||||
other.fd_ = -1;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Destroys the object closing the file it represents if any.
|
||||
FMT_API ~file() FMT_DTOR_NOEXCEPT;
|
||||
|
||||
// Returns the file descriptor.
|
||||
int descriptor() const FMT_NOEXCEPT { return fd_; }
|
||||
|
||||
// Closes the file.
|
||||
FMT_API void close();
|
||||
|
||||
// Returns the file size. The size has signed type for consistency with
|
||||
// stat::st_size.
|
||||
FMT_API long long size() const;
|
||||
|
||||
// Attempts to read count bytes from the file into the specified buffer.
|
||||
FMT_API std::size_t read(void *buffer, std::size_t count);
|
||||
|
||||
// Attempts to write count bytes from the specified buffer to the file.
|
||||
FMT_API std::size_t write(const void *buffer, std::size_t count);
|
||||
|
||||
// Duplicates a file descriptor with the dup function and returns
|
||||
// the duplicate as a file object.
|
||||
FMT_API static file dup(int fd);
|
||||
|
||||
// Makes fd be the copy of this file descriptor, closing fd first if
|
||||
// necessary.
|
||||
FMT_API void dup2(int fd);
|
||||
|
||||
// Makes fd be the copy of this file descriptor, closing fd first if
|
||||
// necessary.
|
||||
FMT_API void dup2(int fd, error_code &ec) FMT_NOEXCEPT;
|
||||
|
||||
// Creates a pipe setting up read_end and write_end file objects for reading
|
||||
// and writing respectively.
|
||||
FMT_API static void pipe(file &read_end, file &write_end);
|
||||
|
||||
// Creates a buffered_file object associated with this file and detaches
|
||||
// this file object from the file.
|
||||
FMT_API buffered_file fdopen(const char *mode);
|
||||
};
|
||||
|
||||
// Returns the memory page size.
|
||||
long getpagesize();
|
||||
|
||||
#if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && \
|
||||
!defined(__ANDROID__) && !defined(__CYGWIN__) && !defined(__OpenBSD__)
|
||||
# define FMT_LOCALE
|
||||
#endif
|
||||
|
||||
#ifdef FMT_LOCALE
|
||||
// A "C" numeric locale.
|
||||
class Locale {
|
||||
private:
|
||||
# ifdef _MSC_VER
|
||||
typedef _locale_t locale_t;
|
||||
|
||||
enum { LC_NUMERIC_MASK = LC_NUMERIC };
|
||||
|
||||
static locale_t newlocale(int category_mask, const char *locale, locale_t) {
|
||||
return _create_locale(category_mask, locale);
|
||||
}
|
||||
|
||||
static void freelocale(locale_t locale) {
|
||||
_free_locale(locale);
|
||||
}
|
||||
|
||||
static double strtod_l(const char *nptr, char **endptr, _locale_t locale) {
|
||||
return _strtod_l(nptr, endptr, locale);
|
||||
}
|
||||
# endif
|
||||
|
||||
locale_t locale_;
|
||||
|
||||
FMT_DISALLOW_COPY_AND_ASSIGN(Locale);
|
||||
|
||||
public:
|
||||
typedef locale_t Type;
|
||||
|
||||
Locale() : locale_(newlocale(LC_NUMERIC_MASK, "C", FMT_NULL)) {
|
||||
if (!locale_)
|
||||
FMT_THROW(system_error(errno, "cannot create locale"));
|
||||
}
|
||||
~Locale() { freelocale(locale_); }
|
||||
|
||||
Type get() const { return locale_; }
|
||||
|
||||
// Converts string to floating-point number and advances str past the end
|
||||
// of the parsed input.
|
||||
double strtod(const char *&str) const {
|
||||
char *end = FMT_NULL;
|
||||
double result = strtod_l(str, &end, locale_);
|
||||
str = end;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
#endif // FMT_LOCALE
|
||||
FMT_END_NAMESPACE
|
||||
|
||||
#if !FMT_USE_RVALUE_REFERENCES
|
||||
namespace std {
|
||||
// For compatibility with C++98.
|
||||
inline fmt::buffered_file &move(fmt::buffered_file &f) { return f; }
|
||||
inline fmt::file &move(fmt::file &f) { return f; }
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // FMT_POSIX_H_
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue