Compare commits
824 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da54e5eece | ||
|
|
35f20fb4f5 | ||
|
|
5bc963d645 | ||
|
|
ad11bab072 | ||
|
|
f545ed5e59 | ||
|
|
18326da1e4 | ||
|
|
d88b51d9cd | ||
|
|
9316143829 | ||
|
|
af12d9a337 | ||
|
|
20751c8635 | ||
|
|
e43f3554b6 | ||
|
|
061e9d2232 | ||
|
|
7392e0ce42 | ||
|
|
1b793d1b66 | ||
|
|
59671cc176 | ||
|
|
fdc838ebf2 | ||
|
|
2fefa34ca0 | ||
|
|
5746a62f8b | ||
|
|
d1f4c775f8 | ||
|
|
f7bd59a05e | ||
|
|
73926f2a2b | ||
|
|
e011f5282f | ||
|
|
32160adb9a | ||
|
|
349d3f88e1 | ||
|
|
03edc4066d | ||
|
|
0fffc85224 | ||
|
|
749bc3a3e1 | ||
|
|
9b9ea51ec0 | ||
|
|
81836a324c | ||
|
|
e0c8b576da | ||
|
|
0065192c81 | ||
|
|
d0eac17b42 | ||
|
|
ba44250508 | ||
|
|
4235d02a2c | ||
|
|
97c40b4be5 | ||
|
|
39cb27b011 | ||
|
|
7e9a46fe08 | ||
|
|
e496188c23 | ||
|
|
e82b3c3202 | ||
|
|
237ebe03a4 | ||
|
|
5fbb9bd782 | ||
|
|
0ec771c1ce | ||
|
|
398d2b267f | ||
|
|
8b170128d6 | ||
|
|
8b27f39f7f | ||
|
|
bb53010af6 | ||
|
|
f9642a62c4 | ||
|
|
195d98e972 | ||
|
|
5a074c8988 | ||
|
|
d58788981b | ||
|
|
e24f986321 | ||
|
|
5838db3d59 | ||
|
|
9feaea840e | ||
|
|
e163a6ac12 | ||
|
|
53d496c7b2 | ||
|
|
b24b5c34b6 | ||
|
|
55aa25c036 | ||
|
|
76989c34f7 | ||
|
|
569918a815 | ||
|
|
e78d8c2e0a | ||
|
|
5cb40a2aee | ||
|
|
29bc3fe634 | ||
|
|
de7550fdfd | ||
|
|
6d65cb2d2f | ||
|
|
513b7b06b4 | ||
|
|
840352de38 | ||
|
|
622157d6ee | ||
|
|
5701741c81 | ||
|
|
c88d191146 | ||
|
|
ceb5d4ffe8 | ||
|
|
638bdddae6 | ||
|
|
7a5950145b | ||
|
|
28afb4d91f | ||
|
|
1986bb5dbb | ||
|
|
7e497513ee | ||
|
|
86226a6ff9 | ||
|
|
9c6a3cc621 | ||
|
|
882384a67a | ||
|
|
5893b88db2 | ||
|
|
06c2847b58 | ||
|
|
836f9ff8de | ||
|
|
42d3003c39 | ||
|
|
c2df8a6f42 | ||
|
|
569c11fbde | ||
|
|
3531feb6ae | ||
|
|
933344b869 | ||
|
|
aa5289b59b | ||
|
|
5d692b95fc | ||
|
|
9592df2bbd | ||
|
|
7a17e50982 | ||
|
|
5bfb66d0e5 | ||
|
|
0eadea0b71 | ||
|
|
f4dc1bfcce | ||
|
|
1da3a2daa1 | ||
|
|
7e0935d02c | ||
|
|
d75cf8c234 | ||
|
|
40b6e5007d | ||
|
|
7020e60e99 | ||
|
|
4a0f3b2ad5 | ||
|
|
9331e48c19 | ||
|
|
fbf6db2d12 | ||
|
|
c854662766 | ||
|
|
a5e4def690 | ||
|
|
2bd8a2ed14 | ||
|
|
3531d9ad21 | ||
|
|
a2e658e709 | ||
|
|
7b43c83abb | ||
|
|
b2b3f8ef29 | ||
|
|
e65a2b2bd6 | ||
|
|
f0b34548ec | ||
|
|
0a2ed5baf4 | ||
|
|
e580c8499f | ||
|
|
7a5ddc96a5 | ||
|
|
4a0ac7b2fa | ||
|
|
ba26a08d1b | ||
|
|
3b3482491f | ||
|
|
cf5e9e97c4 | ||
|
|
e54a63bf6f | ||
|
|
b053c8dfef | ||
|
|
caa4c077a9 | ||
|
|
93bee76af4 | ||
|
|
5b8131fa78 | ||
|
|
7bf0b7347d | ||
|
|
7c6c8ab950 | ||
|
|
12b292880b | ||
|
|
5bc1b79bb3 | ||
|
|
31211c6b7f | ||
|
|
2d5504bcc6 | ||
|
|
fb30128f6c | ||
|
|
226c7927ba | ||
|
|
1852230ade | ||
|
|
67170488ef | ||
|
|
2a8dcd9455 | ||
|
|
77782d24f6 | ||
|
|
a47e303b0d | ||
|
|
acb5b6fc03 | ||
|
|
f82bb52b17 | ||
|
|
4272a97d76 | ||
|
|
903e6b8f3e | ||
|
|
27c76da336 | ||
|
|
f394552a6e | ||
|
|
733562b1ee | ||
|
|
9dd6ddf9b9 | ||
|
|
c78275eca4 | ||
|
|
65c252665a | ||
|
|
3d5c11b077 | ||
|
|
e3acb6c79f | ||
|
|
7e930cdd3b | ||
|
|
c53fa5a64e | ||
|
|
a42b2dda6f | ||
|
|
8b7b6fb165 | ||
|
|
c55572313c | ||
|
|
68af43cad8 | ||
|
|
7dba7bd77c | ||
|
|
742ac16849 | ||
|
|
5f7135fb6e | ||
|
|
222b79ccf4 | ||
|
|
1d8676ff67 | ||
|
|
37bc956ba3 | ||
|
|
95fc916d78 | ||
|
|
f13005d9cc | ||
|
|
d99817c662 | ||
|
|
156ec5c9cb | ||
|
|
eaabf670ca | ||
|
|
bc1c3e0e90 | ||
|
|
af338f3575 | ||
|
|
0afe980c17 | ||
|
|
190eb49140 | ||
|
|
b8c796c664 | ||
|
|
8eb5d15ca3 | ||
|
|
1c4c93149b | ||
|
|
2d4c78c0a2 | ||
|
|
9519cc9939 | ||
|
|
e0c0b70bde | ||
|
|
f4d9f50a32 | ||
|
|
e8ee266f3c | ||
|
|
196cf61c21 | ||
|
|
6f71c7c889 | ||
|
|
4c89a65174 | ||
|
|
f3b3738e68 | ||
|
|
e118f467eb | ||
|
|
9e6b9fbdd1 | ||
|
|
d938b7a794 | ||
|
|
a0d9273129 | ||
|
|
4bfbb94f26 | ||
|
|
e977ab388b | ||
|
|
2c56845fe8 | ||
|
|
194da52df0 | ||
|
|
a7d94ad0f8 | ||
|
|
d28811864b | ||
|
|
9bcab11129 | ||
|
|
82e824a507 | ||
|
|
044b6acfa6 | ||
|
|
bd20fe6bf8 | ||
|
|
fdd42098e3 | ||
|
|
3a63c01b7f | ||
|
|
7744377a4e | ||
|
|
d1d2136b56 | ||
|
|
34d62c1a30 | ||
|
|
25ec72ce07 | ||
|
|
ad2956dcd0 | ||
|
|
f225d0de15 | ||
|
|
2b09df816a | ||
|
|
204032ba9e | ||
|
|
557d15c61d | ||
|
|
eef2a4048f | ||
|
|
fee7a72924 | ||
|
|
6d750ee7c9 | ||
|
|
0a38deaed7 | ||
|
|
802bb992b1 | ||
|
|
02439847dc | ||
|
|
aba13a386e | ||
|
|
10f80dd9c4 | ||
|
|
d5bf793814 | ||
|
|
ae11be80d5 | ||
|
|
ae7438bddf | ||
|
|
33773ec251 | ||
|
|
1ee2edaf7b | ||
|
|
7036a6dd5c | ||
|
|
c3a6128e6a | ||
|
|
7452397e96 | ||
|
|
a63c5127b6 | ||
|
|
316abc6eaa | ||
|
|
7956f57cef | ||
|
|
68316c443e | ||
|
|
f4ddead656 | ||
|
|
b509afd4ed | ||
|
|
0eadffea33 | ||
|
|
95b5306495 | ||
|
|
ae60056968 | ||
|
|
33e49a84a1 | ||
|
|
d8523ae6be | ||
|
|
9f899914a6 | ||
|
|
7800683cf1 | ||
|
|
fb18ec935b | ||
|
|
b95227280d | ||
|
|
41aef27643 | ||
|
|
365e399036 | ||
|
|
e6def11a69 | ||
|
|
0cbef206ef | ||
|
|
09c8d9b18b | ||
|
|
26348d0f42 | ||
|
|
d61f76fa20 | ||
|
|
7f4a6b1d25 | ||
|
|
133303e1dd | ||
|
|
527fc3173a | ||
|
|
7b8265a6c9 | ||
|
|
c00f5830c8 | ||
|
|
d3db6a6f50 | ||
|
|
00090fde1a | ||
|
|
155398cf8e | ||
|
|
3d7283486a | ||
|
|
1345d6650d | ||
|
|
72b7a86e3d | ||
|
|
caa5533366 | ||
|
|
3e614dec95 | ||
|
|
a60ba41b77 | ||
|
|
e2c3492984 | ||
|
|
0182e95a78 | ||
|
|
5af6ce171c | ||
|
|
24375f3226 | ||
|
|
3ae370441d | ||
|
|
1517b28eeb | ||
|
|
d640838af5 | ||
|
|
dbd259538c | ||
|
|
50441e85a2 | ||
|
|
f3fd2c3c1b | ||
|
|
64e65b874a | ||
|
|
57a0c7513a | ||
|
|
9caee5b80a | ||
|
|
012a4a977f | ||
|
|
588ec0fa0f | ||
|
|
8308bd71ba | ||
|
|
e56648930d | ||
|
|
444d7373b3 | ||
|
|
9f2c46972b | ||
|
|
842f024830 | ||
|
|
45017535c7 | ||
|
|
1b678083d3 | ||
|
|
e3a6138fc8 | ||
|
|
84d260f0d5 | ||
|
|
dafbdd7d30 | ||
|
|
6ecf8ed375 | ||
|
|
83c2ef85aa | ||
|
|
cc4b3c0812 | ||
|
|
bd5b7baccd | ||
|
|
d1df5bc842 | ||
|
|
a2fc2044a9 | ||
|
|
f4937f2636 | ||
|
|
f00a036131 | ||
|
|
de6c9f6564 | ||
|
|
08154b1921 | ||
|
|
bbcee74e3e | ||
|
|
22cf081d00 | ||
|
|
5f0e716d6e | ||
|
|
9950e6aa50 | ||
|
|
e78f26c5f1 | ||
|
|
be4fd23dc6 | ||
|
|
96051b895d | ||
|
|
2960e7e8e9 | ||
|
|
176a1e8736 | ||
|
|
c40cb9ad13 | ||
|
|
87ae5b2c15 | ||
|
|
8c946e46db | ||
|
|
fe20aae964 | ||
|
|
d2f6820471 | ||
|
|
d621361a3c | ||
|
|
576fa0f964 | ||
|
|
a9288da6ec | ||
|
|
0ecd392e0b | ||
|
|
930896ed99 | ||
|
|
44a50d202a | ||
|
|
ee67a842b7 | ||
|
|
3d1602c517 | ||
|
|
7b2cd87d73 | ||
|
|
7c104f0630 | ||
|
|
a20e327f54 | ||
|
|
9122dc4de5 | ||
|
|
bcb8723527 | ||
|
|
e47cb3df38 | ||
|
|
1799fe5ebf | ||
|
|
1c01100db7 | ||
|
|
fd5833b8fe | ||
|
|
aee6119f00 | ||
|
|
80e0149b29 | ||
|
|
f2b5382247 | ||
|
|
a7a629cec9 | ||
|
|
d37c20f568 | ||
|
|
085167bfae | ||
|
|
9f2fc6e74c | ||
|
|
84c9f7699d | ||
|
|
888c5bb600 | ||
|
|
2b7c325ddd | ||
|
|
0c1e91e6e3 | ||
|
|
5ec7b39999 | ||
|
|
5ca85f0965 | ||
|
|
6cef99e752 | ||
|
|
057ff54445 | ||
|
|
b7df36c831 | ||
|
|
6646b2a07b | ||
|
|
ac646cd8e2 | ||
|
|
a0bcae241c | ||
|
|
591c7006eb | ||
|
|
a2ba33de7f | ||
|
|
90b9359bb2 | ||
|
|
2e27480ef5 | ||
|
|
f44b97bdee | ||
|
|
686071cdcc | ||
|
|
6f43d97ba3 | ||
|
|
a9d2cb2838 | ||
|
|
34e7761a79 | ||
|
|
f460ca231a | ||
|
|
d8f7102cea | ||
|
|
10a0285f81 | ||
|
|
4c77052002 | ||
|
|
143db7bfa8 | ||
|
|
50a77b6321 | ||
|
|
75c9d7de68 | ||
|
|
2dc6335bf5 | ||
|
|
d4bfcdf373 | ||
|
|
d82a4d10aa | ||
|
|
6e30eae31f | ||
|
|
a65a55db4f | ||
|
|
9bf22c6dea | ||
|
|
39aac370e7 | ||
|
|
3d8844c566 | ||
|
|
6bac7c3912 | ||
|
|
b081a627c0 | ||
|
|
27c05e1132 | ||
|
|
d928082e53 | ||
|
|
ec73c8ba49 | ||
|
|
75b09ab2d7 | ||
|
|
eed5d9298a | ||
|
|
9e9263b39b | ||
|
|
3a090f3401 | ||
|
|
ec3ccbd281 | ||
|
|
caab2595e9 | ||
|
|
23d66355f2 | ||
|
|
8f1e48a7c4 | ||
|
|
bef26b4580 | ||
|
|
d6e2fb319c | ||
|
|
63d7329e2c | ||
|
|
39da6e9e2e | ||
|
|
3df1947d70 | ||
|
|
76e744fa60 | ||
|
|
bf19e009ff | ||
|
|
e9685b7001 | ||
|
|
1331357d55 | ||
|
|
4311c24965 | ||
|
|
e72b6c4127 | ||
|
|
dff10cc9af | ||
|
|
0815b30fff | ||
|
|
d3c6c5cf15 | ||
|
|
9d5ec27db9 | ||
|
|
ab338a2c20 | ||
|
|
5ac04ae1cc | ||
|
|
577a5908fd | ||
|
|
d065aff2d3 | ||
|
|
33b773a1c8 | ||
|
|
77ae07db7a | ||
|
|
c468f9a531 | ||
|
|
06147d81ea | ||
|
|
d6d7e1b183 | ||
|
|
800cba545c | ||
|
|
8098e570b5 | ||
|
|
3f7b6b3aeb | ||
|
|
f3590c648e | ||
|
|
f0a935d8c6 | ||
|
|
cb699c732a | ||
|
|
a9ac29f2e4 | ||
|
|
0f9ea908b0 | ||
|
|
81994d2c3d | ||
|
|
fd3ba84544 | ||
|
|
a6fe98d0b4 | ||
|
|
4e1f4bad50 | ||
|
|
b6eed4b153 | ||
|
|
0190d52d8e | ||
|
|
74eaeba2eb | ||
|
|
97073e54a7 | ||
|
|
97cab4589b | ||
|
|
754cb0f750 | ||
|
|
bfb68fc2fc | ||
|
|
44a0632751 | ||
|
|
cd7d811720 | ||
|
|
5098a1792a | ||
|
|
eba4a4f817 | ||
|
|
7205eae5d9 | ||
|
|
19360666fe | ||
|
|
c1a7d14e1b | ||
|
|
4057d32944 | ||
|
|
97e97422cb | ||
|
|
01f8bbb827 | ||
|
|
1d5bdcc4d5 | ||
|
|
ab6e3ae096 | ||
|
|
7ada64aebb | ||
|
|
e7a4587a7b | ||
|
|
f80e23bdc5 | ||
|
|
4af8cc7525 | ||
|
|
510daf3636 | ||
|
|
452f17cd7f | ||
|
|
9d22fb6b25 | ||
|
|
1378e8ccb6 | ||
|
|
2592f107a5 | ||
|
|
a7202f5468 | ||
|
|
9716dffdf1 | ||
|
|
701faecf49 | ||
|
|
9f0ca6d5a5 | ||
|
|
9bf581fcf3 | ||
|
|
9025199225 | ||
|
|
0f42ba52ce | ||
|
|
4deb5f9ca7 | ||
|
|
497e26afb2 | ||
|
|
ebac29bf84 | ||
|
|
43863c1d30 | ||
|
|
62f69f6948 | ||
|
|
a7298a1c1b | ||
|
|
94cfd4fce4 | ||
|
|
1352e82d62 | ||
|
|
734b9d3245 | ||
|
|
ad1219a43f | ||
|
|
f7db2eeff0 | ||
|
|
779e9c504c | ||
|
|
b99ac24898 | ||
|
|
6f57125efa | ||
|
|
d5f99aa0e1 | ||
|
|
3caaa1b8ed | ||
|
|
ea50b90c69 | ||
|
|
e3a7fe220a | ||
|
|
da79f97043 | ||
|
|
16e8ca9835 | ||
|
|
4050381f03 | ||
|
|
a5ed1ac0ee | ||
|
|
400ff8f53f | ||
|
|
280fc5acf0 | ||
|
|
746006c948 | ||
|
|
777f29dc39 | ||
|
|
74756551b2 | ||
|
|
dafe06faf7 | ||
|
|
0dfe7f74bb | ||
|
|
8aaa5982b0 | ||
|
|
28d27c3bf4 | ||
|
|
bcb3b4abaf | ||
|
|
5460351510 | ||
|
|
2d9f8d1e58 | ||
|
|
331c4fb63d | ||
|
|
7060b25827 | ||
|
|
9a9c7ec31d | ||
|
|
7cfaa7856a | ||
|
|
c6bec5eff5 | ||
|
|
284034e5b6 | ||
|
|
45a9f4124a | ||
|
|
5edc845ae6 | ||
|
|
28d96969e1 | ||
|
|
d4c4a95be4 | ||
|
|
ab8e176abc | ||
|
|
7242342f61 | ||
|
|
0f04b1499e | ||
|
|
932446757e | ||
|
|
50e781b1a3 | ||
|
|
e3db432fc7 | ||
|
|
636d5a6754 | ||
|
|
b8196fb7d4 | ||
|
|
4836a0f7af | ||
|
|
c4799c733f | ||
|
|
7cc9205241 | ||
|
|
8ffd03b58f | ||
|
|
2f8297891e | ||
|
|
0442bfb646 | ||
|
|
53567db560 | ||
|
|
ead94d9982 | ||
|
|
f0c56a4d05 | ||
|
|
56763d59ef | ||
|
|
cdfdd24939 | ||
|
|
3d5a00f998 | ||
|
|
180f8070ec | ||
|
|
1ca4e4061e | ||
|
|
b23c8685a3 | ||
|
|
c2cf04dac2 | ||
|
|
ea22144426 | ||
|
|
8819d6bde6 | ||
|
|
9e43ca1299 | ||
|
|
1b030d7b71 | ||
|
|
c12ab83d22 | ||
|
|
46e79118b1 | ||
|
|
c270bfc40d | ||
|
|
5f4ec8d206 | ||
|
|
c4f35eb451 | ||
|
|
f50e78fe31 | ||
|
|
b9c8e144af | ||
|
|
22b4f963c6 | ||
|
|
05396cabbe | ||
|
|
92e11843eb | ||
|
|
11fd8c255d | ||
|
|
b5d7061da5 | ||
|
|
64e23736d5 | ||
|
|
13bd98ea19 | ||
|
|
16026cfed7 | ||
|
|
e15c36f53f | ||
|
|
fbb5e895ab | ||
|
|
5639962224 | ||
|
|
2794123deb | ||
|
|
84d442a939 | ||
|
|
b9ff5fc5a7 | ||
|
|
ab73c8c8a2 | ||
|
|
a2814e11a7 | ||
|
|
3b64b3c370 | ||
|
|
4b79c102bc | ||
|
|
f4a62db066 | ||
|
|
3acaa82fbb | ||
|
|
a58b7594ac | ||
|
|
f65cc7816c | ||
|
|
56c5125fa8 | ||
|
|
07e948f522 | ||
|
|
53c255d4fd | ||
|
|
6736b1e3a3 | ||
|
|
e3c1a90a97 | ||
|
|
5bdc9383f5 | ||
|
|
a6a1c4bc15 | ||
|
|
24124f62bf | ||
|
|
65cc670385 | ||
|
|
da426df8c7 | ||
|
|
a667eba60c | ||
|
|
0dded01c37 | ||
|
|
fa34694af4 | ||
|
|
cb69ab404f | ||
|
|
001712e6cf | ||
|
|
aeabf0a5d3 | ||
|
|
5a3d81d553 | ||
|
|
280ae53f8e | ||
|
|
9a83b0bacf | ||
|
|
7310cd7aab | ||
|
|
5b92c90f9b | ||
|
|
24408ef220 | ||
|
|
6c8bff81d3 | ||
|
|
2b5c3ef70d | ||
|
|
ab8278416a | ||
|
|
2ff35fed0c | ||
|
|
b40e492d87 | ||
|
|
f1e8f2c1a5 | ||
|
|
e6e933d844 | ||
|
|
e225f2d341 | ||
|
|
29d472b691 | ||
|
|
8baea085c6 | ||
|
|
42dba75497 | ||
|
|
c1e12e4782 | ||
|
|
3bab13d2ee | ||
|
|
19b9f99ee8 | ||
|
|
d2d273895e | ||
|
|
3327231847 | ||
|
|
b8ec2c2bc8 | ||
|
|
ff4debec77 | ||
|
|
a675ef6e4e | ||
|
|
600a96f3f4 | ||
|
|
25c31d124e | ||
|
|
6144d45457 | ||
|
|
7f9e7f9c83 | ||
|
|
ed637eb6d5 | ||
|
|
c8097fd604 | ||
|
|
5e1df90c55 | ||
|
|
3fa0046638 | ||
|
|
78234a10ac | ||
|
|
847cc76f20 | ||
|
|
e98a6de11f | ||
|
|
23b6faa17c | ||
|
|
32a2f3aeaf | ||
|
|
b6e55ad66c | ||
|
|
b152acb9e4 | ||
|
|
66a1137f51 | ||
|
|
be8e5f9d82 | ||
|
|
41c1ada166 | ||
|
|
88ef8a1aac | ||
|
|
9243041261 | ||
|
|
3ad70391c2 | ||
|
|
3aff8a0c7a | ||
|
|
d9e10b6201 | ||
|
|
abd69fe57d | ||
|
|
45c26bcfe6 | ||
|
|
6441ac4da2 | ||
|
|
4cd1bf9541 | ||
|
|
a2a1f23d6d | ||
|
|
dcbab229c6 | ||
|
|
f7a5313917 | ||
|
|
cfbade2d6b | ||
|
|
b94186a3fb | ||
|
|
37910c2e6c | ||
|
|
c62a61020b | ||
|
|
2454c10f0c | ||
|
|
2f4091b1b7 | ||
|
|
90a660d718 | ||
|
|
d60691b995 | ||
|
|
a17b894316 | ||
|
|
2aaafa44bc | ||
|
|
e4c25bc2f6 | ||
|
|
211b795326 | ||
|
|
1c5ac3b6fd | ||
|
|
a06c44a333 | ||
|
|
1f5367bd46 | ||
|
|
1ef90ace3d | ||
|
|
b800580495 | ||
|
|
12212d23e4 | ||
|
|
82a64f7de6 | ||
|
|
99e31e0e7d | ||
|
|
5e93aa14af | ||
|
|
87a7fefda7 | ||
|
|
72b1e4e9dd | ||
|
|
7e4317af8e | ||
|
|
68e41af144 | ||
|
|
68a296b408 | ||
|
|
1beeb4880e | ||
|
|
012ef6624c | ||
|
|
1522dae4cf | ||
|
|
ba84ebcc86 | ||
|
|
ec56e9d3a5 | ||
|
|
d752632b44 | ||
|
|
6bd23abdab | ||
|
|
f9e7c945ba | ||
|
|
9a113b9407 | ||
|
|
310b8fa693 | ||
|
|
ae9ab8fd5e | ||
|
|
058330b0ad | ||
|
|
9a77611237 | ||
|
|
38dbd49613 | ||
|
|
02c1cf322f | ||
|
|
1514514a76 | ||
|
|
49cd6d6200 | ||
|
|
31de8e0f8e | ||
|
|
b1caaaa344 | ||
|
|
3ca9b32849 | ||
|
|
d1d7bb21c4 | ||
|
|
d2e05710e2 | ||
|
|
3b9d1ca4d8 | ||
|
|
f85ace9dd0 | ||
|
|
1b30f641ad | ||
|
|
2227b5cbb8 | ||
|
|
87e32efc18 | ||
|
|
2745b8534c | ||
|
|
662a57a7bd | ||
|
|
7b39f455b5 | ||
|
|
cbccc87677 | ||
|
|
dad1566ffa | ||
|
|
db206e78de | ||
|
|
357e7db66b | ||
|
|
51c4622ca0 | ||
|
|
1bf93e1c77 | ||
|
|
892510b47b | ||
|
|
47f93e3f44 | ||
|
|
574f6e7d33 | ||
|
|
d3494d66b1 | ||
|
|
f993361f8b | ||
|
|
75f10648c9 | ||
|
|
5b917adff9 | ||
|
|
4db4aa5563 | ||
|
|
0a2556304f | ||
|
|
e1e3dae220 | ||
|
|
515c77b949 | ||
|
|
7279c1c019 | ||
|
|
42d6629156 | ||
|
|
ff2427cc1e | ||
|
|
5451fabcc1 | ||
|
|
9641e9bd7f | ||
|
|
365c562a17 | ||
|
|
a1a238a9cd | ||
|
|
7223f2ac05 | ||
|
|
1752fcee8c | ||
|
|
4f1132e5a6 | ||
|
|
306cece150 | ||
|
|
289d84aac0 | ||
|
|
38b93fe7a7 | ||
|
|
031e016df7 | ||
|
|
52f5fe2e92 | ||
|
|
f71e0acbbb | ||
|
|
59f63b5e17 | ||
|
|
cd4ced5456 | ||
|
|
2c6d783eb7 | ||
|
|
1ab390d115 | ||
|
|
c31a96454c | ||
|
|
5239121706 | ||
|
|
061537e773 | ||
|
|
02db2e15a4 | ||
|
|
4f4ddb938a | ||
|
|
17f9941a08 | ||
|
|
591c98e979 | ||
|
|
ca9f9d9d9c | ||
|
|
0c2af2defa | ||
|
|
8e53c29612 | ||
|
|
e6cd3fdda1 | ||
|
|
f9b074c473 | ||
|
|
3511e7079f | ||
|
|
7fb626fb08 | ||
|
|
55affd0273 | ||
|
|
c2f2ba5293 | ||
|
|
69e6707c62 | ||
|
|
9fb5893540 | ||
|
|
cdbd08a4d3 | ||
|
|
98b6cf3d19 | ||
|
|
5e3cd59eeb | ||
|
|
9f372cff41 | ||
|
|
89371f60cf | ||
|
|
c94e62878a | ||
|
|
2dbf9755c3 | ||
|
|
0e1b0daf36 | ||
|
|
e21b321323 | ||
|
|
cc4b633e43 | ||
|
|
c45f2b5f36 | ||
|
|
2b3392266f | ||
|
|
12a43fd942 | ||
|
|
b3ae7fa1ff | ||
|
|
a1bece5c51 | ||
|
|
4d3800cc89 | ||
|
|
c32e271a0c | ||
|
|
6e5315b430 | ||
|
|
9897174a03 | ||
|
|
e87dab0bc6 | ||
|
|
e5e9f20f95 | ||
|
|
b9c8985377 | ||
|
|
e8c8bda674 | ||
|
|
dee5885d9f | ||
|
|
bb183558ae | ||
|
|
ed2f4c2e22 | ||
|
|
7e5394c6fa | ||
|
|
330b41656b | ||
|
|
3adfdad66d | ||
|
|
82f85cd328 | ||
|
|
f53b3a3ac1 | ||
|
|
90094fff25 | ||
|
|
38ef9fddde | ||
|
|
6c3c2de264 | ||
|
|
7632b065c6 | ||
|
|
b43734c3e5 | ||
|
|
a5ec4587b6 | ||
|
|
1b840be127 | ||
|
|
85290e4d51 | ||
|
|
3ac213d649 | ||
|
|
2001f1302e | ||
|
|
c71e70c0f9 | ||
|
|
d37f4fbbab | ||
|
|
c5e1e2b9af | ||
|
|
c037625b65 | ||
|
|
9660ba84a0 | ||
|
|
a0414e7daf | ||
|
|
78cc2d9311 | ||
|
|
cca19dd8c6 | ||
|
|
b043c37876 | ||
|
|
508196af3a | ||
|
|
fc374a4344 | ||
|
|
0f44225d3a | ||
|
|
2994656c1f | ||
|
|
067eec8743 | ||
|
|
e78206d2aa | ||
|
|
394cc15fba | ||
|
|
54239a2534 | ||
|
|
6ac8d017b7 | ||
|
|
8216e98afd | ||
|
|
b567f844ad | ||
|
|
137928fced | ||
|
|
7c2db84fe6 | ||
|
|
65935b4466 | ||
|
|
6576ee7d05 | ||
|
|
a41c8716ec | ||
|
|
e1da26bd8b | ||
|
|
437aa69292 | ||
|
|
2bdf02d352 | ||
|
|
637244d59e | ||
|
|
3a3ffc0118 | ||
|
|
67c68634b6 | ||
|
|
b394da33c7 | ||
|
|
a0875c845c | ||
|
|
c4f369fbf8 | ||
|
|
da56dff89d | ||
|
|
1d6b7923bd | ||
|
|
7b4411bbcc | ||
|
|
2de378bef5 | ||
|
|
35222064c1 | ||
|
|
7f782832d7 | ||
|
|
c5bc92d97c | ||
|
|
19cea6f3a8 | ||
|
|
2eb96a2a88 | ||
|
|
2cf6dcacf2 | ||
|
|
b2b3306205 | ||
|
|
d6340b18db | ||
|
|
fd1ae57c16 | ||
|
|
086f231d5a | ||
|
|
c259e5275c | ||
|
|
ec3743dc9a |
640 changed files with 31885 additions and 25261 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
|||
/*.scad
|
||||
**/out*.*
|
||||
*.dmg
|
||||
*~
|
||||
*.tar*
|
||||
|
|
@ -9,13 +11,13 @@ objects
|
|||
.qmake.stash
|
||||
parser_yacc.h
|
||||
**/#*#
|
||||
testdata/scad/features/import_dxf-tests.scad
|
||||
testdata/scad/features/import_stl-tests.scad
|
||||
/.dir-locals.el
|
||||
testdata/scad/2D/features/import_dxf-tests.scad
|
||||
testdata/scad/3D/features/import_stl-tests.scad
|
||||
testdata/scad/misc/include-tests.scad
|
||||
testdata/scad/misc/use-tests.scad
|
||||
**/project.xcworkspace
|
||||
**/xcuserdata
|
||||
/*.scad
|
||||
/*.stl
|
||||
/*.dxf
|
||||
/*.off
|
||||
|
|
@ -37,6 +39,7 @@ testdata/scad/misc/use-tests.scad
|
|||
/lexer_lex.cpp
|
||||
/parser_yacc.cpp
|
||||
/OpenSCAD.app
|
||||
/openscad.appdata.xml
|
||||
/openscad.pro.user
|
||||
/openscad
|
||||
/locale/*/*/*.mo
|
||||
|
|
@ -49,3 +52,4 @@ testdata/scad/misc/use-tests.scad
|
|||
src/*.org
|
||||
src/*.old
|
||||
src/*.debug
|
||||
/Testing
|
||||
|
|
|
|||
38
.travis.yml
38
.travis.yml
|
|
@ -1,6 +1,21 @@
|
|||
language: cpp
|
||||
cache: apt
|
||||
compiler: gcc
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
dist: trusty
|
||||
env: DIST="trusty"
|
||||
sudo: required
|
||||
cache: apt
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
dist: precise
|
||||
env: DIST="precise"
|
||||
cache: apt
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: DIST="osx"
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
|
|
@ -11,16 +26,9 @@ notifications:
|
|||
skip_join: true
|
||||
|
||||
before_install:
|
||||
- echo 'yes' | sudo add-apt-repository ppa:chrysn/openscad
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq build-essential libqt4-dev libqt4-opengl-dev libxmu-dev cmake bison flex git-core libboost-all-dev libXi-dev libmpfr-dev libboost-dev libglew-dev libeigen3-dev libcgal-dev libgmp3-dev libgmp-dev curl imagemagick libfontconfig-dev
|
||||
- sudo apt-get install -qq libopencsg-dev
|
||||
- echo 'yes' | sudo add-apt-repository ppa:mapnik/nightly-trunk
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq libharfbuzz-dev
|
||||
- echo 'yes' | sudo add-apt-repository ppa:oibaf/graphics-drivers
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install --install-recommends libgl1-mesa-dev-lts-quantal
|
||||
- if [[ "$DIST" == "trusty" ]]; then wget -qO - http://files.openscad.org/OBS-Repository-Key.pub | sudo apt-key add - ; echo 'yes' | sudo add-apt-repository 'deb http://download.opensuse.org/repositories/home:/t-paul:/lib3mf/xUbuntu_14.04/ ./' ; sudo apt-get update -qq ; sudo apt-get purge -qq fglrx ; sudo apt-get install -qq build-essential libqt4-dev libqt4-opengl-dev libxmu-dev cmake bison flex git-core libboost-all-dev libXi-dev libmpfr-dev libboost-dev libglew-dev libeigen3-dev libcgal-dev libgmp3-dev libgmp-dev curl imagemagick libfontconfig-dev libopencsg-dev libharfbuzz-dev lib3mf-dev ; fi
|
||||
- if [[ "$DIST" == "precise" ]]; then echo 'yes' | sudo add-apt-repository ppa:chrysn/openscad ; sudo apt-get update -qq ; sudo apt-get purge -qq fglrx ; sudo apt-get install -qq build-essential libqt4-dev libqt4-opengl-dev libxmu-dev cmake bison flex git-core libboost-all-dev libXi-dev libmpfr-dev libboost-dev libglew-dev libeigen3-dev libcgal-dev libgmp3-dev libgmp-dev curl imagemagick libfontconfig-dev ; sudo apt-get install -qq libopencsg-dev ; echo 'yes' | sudo add-apt-repository ppa:mapnik/nightly-trunk ; sudo apt-get update -qq ; sudo apt-get install -qq libharfbuzz-dev ; echo 'yes' | sudo add-apt-repository ppa:oibaf/graphics-drivers ; sudo apt-get update -qq ; sudo apt-get install --install-recommends libgl1-mesa-dev-lts-quantal ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; ./scripts/macosx-build-homebrew.sh ; fi
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
|
@ -28,8 +36,8 @@ branches:
|
|||
|
||||
before_script:
|
||||
- echo -e "Host files.openscad.org\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
||||
- echo -n $openscad_rsa_{00..40} >> ~/.ssh/openscad_rsa_base64
|
||||
- base64 --decode --ignore-garbage ~/.ssh/openscad_rsa_base64 > ~/.ssh/id_rsa
|
||||
- for i in {0..40}; do eval $(printf "echo \$openscad_rsa_%02d\n" $i) >> ~/.ssh/openscad_rsa_base64; done
|
||||
- base64 --decode ~/.ssh/openscad_rsa_base64 > ~/.ssh/id_rsa
|
||||
- chmod 600 ~/.ssh/id_rsa
|
||||
|
||||
script: if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./scripts/travis-ci.sh ; fi
|
||||
|
|
@ -84,6 +92,6 @@ addons:
|
|||
name: "openscad/openscad"
|
||||
description: "The Programmers Solid 3D CAD Modeller"
|
||||
notification_email: dev@openscad.org
|
||||
build_command_prepend: qmake
|
||||
build_command_prepend: qmake CONFIG+=experimental CONFIG+=nogui
|
||||
build_command: make
|
||||
branch_pattern: coverity_scan
|
||||
|
|
|
|||
10
Info.plist
10
Info.plist
|
|
@ -73,6 +73,16 @@
|
|||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>svg</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>SVG file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<true/>
|
||||
|
|
|
|||
199
README.md
199
README.md
|
|
@ -1,6 +1,7 @@
|
|||
[](https://travis-ci.org/openscad/openscad)
|
||||
[](https://scan.coverity.com/projects/2510)
|
||||
[](https://bitdeli.com/free "Bitdeli Badge")
|
||||
|
||||
[](https://kiwiirc.com/client/irc.freenode.net/#openscad)
|
||||
|
||||
# What is OpenSCAD?
|
||||
[](https://flattr.com/submit/auto?user_id=openscad&url=http://openscad.org&title=OpenSCAD&language=&tags=github&category=software)
|
||||
|
|
@ -32,7 +33,7 @@ STL and OFF file formats.
|
|||
# Getting started
|
||||
|
||||
You can download the latest binaries of OpenSCAD at
|
||||
<http://www.openscad.org>. Install binaries as you would any other
|
||||
<http://www.openscad.org/downloads>. Install binaries as you would any other
|
||||
software.
|
||||
|
||||
When you open OpenSCAD, you'll see three frames within the window. The
|
||||
|
|
@ -83,18 +84,18 @@ To build OpenSCAD, you need some libraries and tools. The version
|
|||
numbers in brackets specify the versions which have been used for
|
||||
development. Other versions may or may not work as well.
|
||||
|
||||
If you're using a newer version of Ubuntu, you can install these
|
||||
libraries from aptitude. If you're using Mac, or an older Linux/BSD, there
|
||||
are build scripts that download and compile the libraries from source.
|
||||
Follow the instructions for the platform you're compiling on below.
|
||||
There are helper scripts that may be able to assist you in downloading
|
||||
and/or building these dependencies on your machine. Please follow the
|
||||
instructions for the platform you're compiling on below.
|
||||
|
||||
* [Qt4 (4.4 - 5.4)](http://www.qt.nokia.com/)
|
||||
* [QScintilla2 (2.7 - 2.8)](http://www.riverbankcomputing.co.uk/software/qscintilla/)
|
||||
* [CGAL (3.6 - 4.5)](http://www.cgal.org/)
|
||||
* A C++ compiler supporting C++11
|
||||
* [Qt (4.4 -> 5.x)](http://qt.io/)
|
||||
* [QScintilla2 (2.7 ->)](http://www.riverbankcomputing.co.uk/software/qscintilla/)
|
||||
* [CGAL (3.6 ->)](http://www.cgal.org/)
|
||||
* [GMP (5.x)](http://www.gmplib.org/)
|
||||
* [MPFR (3.x)](http://www.mpfr.org/)
|
||||
* [cmake (2.8 - 3.0, required by CGAL and the test framework)](http://www.cmake.org/)
|
||||
* [boost (1.35 - 1.57)](http://www.boost.org/)
|
||||
* [cmake (2.8 ->, required by CGAL and the test framework)](http://www.cmake.org/)
|
||||
* [boost (1.35 ->)](http://www.boost.org/)
|
||||
* [OpenCSG (1.3.2 ->)](http://www.opencsg.org/)
|
||||
* [GLEW (1.5.4 ->)](http://glew.sourceforge.net/)
|
||||
* [Eigen (3.x)](http://eigen.tuxfamily.org/)
|
||||
|
|
@ -106,15 +107,21 @@ Follow the instructions for the platform you're compiling on below.
|
|||
* [Flex (2.5.35 -> )](http://flex.sourceforge.net/)
|
||||
* [pkg-config (0.26 -> )](http://www.freedesktop.org/wiki/Software/pkg-config/)
|
||||
|
||||
Note that many of these package in turn have their own dependencies not
|
||||
listed here. These will typically be installed automatically by the
|
||||
package manager on your system when you install the packages listed above.
|
||||
|
||||
### Getting the source code
|
||||
|
||||
Install git (http://git-scm.com/) onto your system. Then run a clone:
|
||||
Install git (http://git-scm.com/) onto your system. The package may be
|
||||
called 'git-core' or 'scmgit' on some systems. Then run a clone:
|
||||
|
||||
git clone git://github.com/openscad/openscad.git
|
||||
|
||||
This will download the latest sources into a directory named 'openscad'.
|
||||
|
||||
To pull the MCAD library (http://reprap.org/wiki/MCAD), do the following:
|
||||
Now cd into the openscad directory and pull the MCAD library
|
||||
(http://reprap.org/wiki/MCAD):
|
||||
|
||||
cd openscad
|
||||
git submodule update --init
|
||||
|
|
@ -123,123 +130,117 @@ To pull the MCAD library (http://reprap.org/wiki/MCAD), do the following:
|
|||
|
||||
Prerequisites:
|
||||
|
||||
* XCode, including XCode command-line tools.
|
||||
* Xcode
|
||||
* cmake
|
||||
* pkg-config
|
||||
|
||||
Install Dependencies:
|
||||
|
||||
Run the script that sets up the environment variables:
|
||||
```source setenv_mac-qt5.sh```
|
||||
|
||||
Then run the script to compile all the dependencies:
|
||||
```./scripts/macosx-build-dependencies.sh```
|
||||
|
||||
|
||||
After building dependencies, follow the instructions in the *Compilation* section.
|
||||
|
||||
For the adventurous, it might be possible to build OpenSCAD using _MacPorts_ or _Homebrew_. The main challenge is that both these systems have partially broken libraries, but that tends to change from time to time.
|
||||
1. **From source**
|
||||
|
||||
Run the script that sets up the environment variables:
|
||||
|
||||
source setenv_mac.sh
|
||||
|
||||
Then run the script to compile all the dependencies:
|
||||
|
||||
./scripts/macosx-build-dependencies.sh
|
||||
|
||||
1. **Homebrew** (assumes [Homebrew](http://brew.sh) is already installed)
|
||||
|
||||
./scripts/macosx-build-homebrew.sh
|
||||
|
||||
1. **MacPorts** (assumes [MacPorts](http://macports.org) is already installed)
|
||||
|
||||
For the adventurous, it might be possible to build OpenSCAD using _MacPorts_. The main challenge is that MacPorts have partially broken libraries, but that tends to change from time to time.
|
||||
|
||||
NB! MacPorts currently doesn't support Qt5 very well, so using Qt4
|
||||
is the only working option at the moment. However, MacPorts' Qt4
|
||||
has a broken ```moc``` command, causing OpenSCAD compilation to
|
||||
has a broken `moc` command, causing OpenSCAD compilation to
|
||||
break. This may be fixed in MacPorts by the time you read this.
|
||||
|
||||
```sudo port install opencsg qscintilla boost cgal pkgconfig eigen3 harfbuzz fontconfig```
|
||||
sudo port install opencsg qscintilla boost cgal pkgconfig eigen3 harfbuzz fontconfig
|
||||
|
||||
1. **Homebrew** (assumes [Homebrew](http://brew.sh)) is already installed)
|
||||
### On Windows
|
||||
|
||||
NB! Homebrew's ```qscintilla2``` component doesn't support Qt5, so using Qt4 is currently necessary.
|
||||
However, Homebrew's Qt4 has a broken ```moc``` command, causing OpenSCAD compilation to
|
||||
break. This may be fixed in Homebrew by the time you read this.
|
||||
NB! Homebrew's ```harfbuzz``` package requires X11, so you may have to install an X11 server.
|
||||
NB! Homebrew doesnt have an OpenCSG package
|
||||
OpenSCAD can be built on Windows using the MSYS2 system. First, download
|
||||
and install MSYS2 from
|
||||
|
||||
```brew install cgal qscintilla2 eigen harfbuzz```
|
||||
http://msys2.github.io
|
||||
|
||||
Please make sure to carefully follow the instructions to fully update your
|
||||
MSYS2 installation. This may take several hours and GB of space. Then continue
|
||||
|
||||
### Building for Linux/BSD
|
||||
### Building on Linux, BSD, or MSYS2
|
||||
|
||||
First, make sure that you have git installed (often packaged as 'git-core'
|
||||
or 'scmgit'). Once you've cloned this git repository, download and install
|
||||
the dependency packages listed above using your system's package
|
||||
manager. A convenience script is provided that can help with this
|
||||
process on some systems:
|
||||
The basic formula is the same for all of these platforms. First, setup
|
||||
environment variables.
|
||||
|
||||
sudo ./scripts/uni-get-dependencies.sh
|
||||
source ./scripts/setenv.sh
|
||||
|
||||
After installing dependencies, check their versions. You can run this
|
||||
script to help you:
|
||||
Then get dependencies
|
||||
|
||||
./scripts/check-dependencies.sh
|
||||
sudo ./scripts/get-dependencies.sh
|
||||
|
||||
Take care that you don't have old local copies anywhere (/usr/local/).
|
||||
If all dependencies are present and of a high enough version, skip ahead
|
||||
to the Compilation instructions.
|
||||
Build the Makefile with qmake, then make the main openscad binary
|
||||
|
||||
### Building for Linux/BSD on systems with older or missing dependencies
|
||||
|
||||
If some of your system dependency libraries are missing or old, then you
|
||||
can download and build newer versions into $HOME/openscad_deps by
|
||||
following this process. First, run the script that sets up the
|
||||
environment variables.
|
||||
|
||||
source ./scripts/setenv-unibuild.sh
|
||||
|
||||
Then run the script to compile all the prerequisite libraries above:
|
||||
|
||||
./scripts/uni-build-dependencies.sh
|
||||
|
||||
Note that huge dependencies like gcc, qt, or glib2 are not included
|
||||
here, only the smaller ones (boost, CGAL, opencsg, etc). After the
|
||||
build, again check dependencies.
|
||||
|
||||
./scripts/check-dependencies.sh
|
||||
|
||||
After that, follow the Compilation instructions below.
|
||||
|
||||
### Building for Windows
|
||||
|
||||
OpenSCAD for Windows is usually cross-compiled from Linux. If you wish to
|
||||
attempt an MSVC build on Windows, please see this site:
|
||||
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows
|
||||
|
||||
To cross-build, first make sure that you have development tools
|
||||
installed to get GCC. Then after you've cloned this git repository,
|
||||
start a new clean bash shell and run the script that sets up the environment
|
||||
variables.
|
||||
|
||||
source ./scripts/setenv-mingw-xbuild.sh 32
|
||||
|
||||
Then run the script to download & compile all the prerequisite libraries above:
|
||||
|
||||
./scripts/mingw-x-build-dependencies.sh 32
|
||||
|
||||
Note that this process can take several hours, as it uses the
|
||||
http://mxe.cc system to cross-build many libraries. After it is
|
||||
complete, build OpenSCAD and package it to an installer:
|
||||
|
||||
./scripts/release-common.sh mingw32
|
||||
|
||||
If you wish you can only build the openscad.exe binary:
|
||||
|
||||
cd mingw32
|
||||
qmake ../openscad.pro CONFIG+=mingw-cross-env
|
||||
qmake
|
||||
make
|
||||
|
||||
For a 64-bit Windows cross-build, replace 32 with 64 in the above instructions.
|
||||
To build an installable package for your system, run
|
||||
|
||||
### Compilation
|
||||
./scripts/make_package.sh
|
||||
|
||||
First, run 'qmake openscad.pro' from Qt4 to generate a Makefile.
|
||||
The resulting package will be under the bin/ directory. It supports
|
||||
Debian gdebi style .deb, Windows .exe/.zip, and Mac .dmg
|
||||
|
||||
On some systems, depending on which version(s) of Qt you have installed, you may need to specify which version you want to use, e.g. by running 'qmake4', 'qmake-qt4' or something alike.
|
||||
### Linux without root
|
||||
|
||||
Then run make. Finally you might run 'make install' as root or simply copy the
|
||||
'openscad' binary (OpenSCAD.app on Mac OS X) to the bin directory of your choice.
|
||||
Use the linuxbrew setenv option. It installs dependencies into
|
||||
$HOME/.linuxbrew using the Linuxbrew / Homebrew packaging system.
|
||||
|
||||
If you had problems compiling from source, raise a new issue in the
|
||||
source ./scripts/setenv.sh homebrew
|
||||
./scripts/get-dependencies.sh
|
||||
qmake && make
|
||||
|
||||
### Cross build from linux to Windows with MXE.cc
|
||||
|
||||
This setenv option will setup a cross compiler, so that you can build
|
||||
Windows binaries on a Linux build machine. These instructions will also
|
||||
work using "Bash on Ubuntu on Windows" running under the Windows Linux
|
||||
Subsystem included with Windows 10.
|
||||
|
||||
First install MXE requirements from <http://mxe.cc/#requirements>. Then run
|
||||
|
||||
source ./scripts/setenv.sh mingw64
|
||||
./scripts/get-dependencies.sh
|
||||
qmake && make
|
||||
|
||||
Use mingw32 if you wish a 32 bit build.
|
||||
|
||||
### Test suite
|
||||
|
||||
To run the self-tests, first build the main openscad program above, then run
|
||||
|
||||
cd tests
|
||||
cmake .
|
||||
make
|
||||
ctest
|
||||
|
||||
### Problems building
|
||||
|
||||
If you had problems compiling from source, please raise a new issue in the
|
||||
[issue tracker on the github page](https://github.com/openscad/openscad/issues).
|
||||
|
||||
On some systems, depending on which version(s) of Qt you have installed,
|
||||
you may need to specify which version you want to use, e.g. by running
|
||||
'qmake4', 'qmake-qt4', 'qmake -qt=qt5', or something alike.
|
||||
|
||||
See doc/testing.txt for more information on test builds.
|
||||
|
||||
This site and it's subpages can also be helpful:
|
||||
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_OpenSCAD_from_Sources
|
||||
|
||||
Thank you for using OpenSCAD.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
|
||||
# OpenSCAD 2015.03
|
||||
|
||||
## 2015.03-3
|
||||
|
||||
**OS X only: Auto-update vulnerability fix**
|
||||
|
||||
## 2015.03-2
|
||||
|
||||
**Bugfixes**
|
||||
|
|
|
|||
45
bison.pri
45
bison.pri
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
bison.name = Bison ${QMAKE_FILE_IN}
|
||||
bison.input = BISONSOURCES
|
||||
bison.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.cpp
|
||||
bison.commands = bison -d -p ${QMAKE_FILE_BASE} -o ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.cpp ${QMAKE_FILE_IN}
|
||||
bison.commands += && if [[ -e ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.hpp ]] ; then mv ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.hpp ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.h ; fi
|
||||
bison.CONFIG += target_predeps
|
||||
bison.variable_out = GENERATED_SOURCES
|
||||
silent:bison.commands = @echo Bison ${QMAKE_FILE_IN} && $$bison.commands
|
||||
QMAKE_EXTRA_COMPILERS += bison
|
||||
bison_header.input = BISONSOURCES
|
||||
bison_header.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.h
|
||||
bison_header.commands = bison -d -p ${QMAKE_FILE_BASE} -o ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.cpp ${QMAKE_FILE_IN}
|
||||
bison_header.commands += && if [ -e ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.hpp ]; then mv ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.hpp ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}_yacc.h ; fi
|
||||
bison_header.CONFIG += target_predeps no_link
|
||||
silent:bison_header.commands = @echo Bison ${QMAKE_FILE_IN} && $$bison.commands
|
||||
QMAKE_EXTRA_COMPILERS += bison_header
|
||||
}
|
||||
|
||||
unix:linux* {
|
||||
exists(/usr/bin/bison) {
|
||||
QMAKE_YACC = /usr/bin/bison
|
||||
}
|
||||
}
|
||||
|
||||
freebsd* {
|
||||
# on some BSD, /usr/local/bin/bison is newer than
|
||||
# /usr/bin/bison, so try to prefer it.
|
||||
exists(/usr/local/bin/bison) {
|
||||
QMAKE_YACC = /usr/local/bin/bison
|
||||
} else { # look in $PATH
|
||||
QMAKE_YACC = bison
|
||||
}
|
||||
}
|
||||
|
||||
netbsd* {
|
||||
exists(/usr/pkg/bin/bison) {
|
||||
QMAKE_YACC = /usr/pkg/bin/bison
|
||||
} else { # look in $PATH
|
||||
QMAKE_YACC = bison
|
||||
}
|
||||
}
|
||||
|
||||
win32*msvc* {
|
||||
}
|
||||
|
|
@ -13,10 +13,12 @@ boost {
|
|||
macx: DEFINES += __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0
|
||||
|
||||
# MXE cross build
|
||||
CONFIG(mingw-cross-env) {
|
||||
DEFINES += BOOST_STATIC
|
||||
CONFIG(mingw-cross-env)|CONFIG(mingw-cross-env-shared) {
|
||||
DEFINES += BOOST_THREAD_USE_LIB
|
||||
DEFINES += Boost_USE_STATIC_LIBS
|
||||
!CONFIG(mingw-cross-env-shared) {
|
||||
DEFINES += BOOST_STATIC
|
||||
DEFINES += Boost_USE_STATIC_LIBS
|
||||
}
|
||||
BOOST_LINK_FLAGS = -lboost_thread_win32-mt -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt -lboost_chrono-mt
|
||||
}
|
||||
|
||||
|
|
|
|||
51
c++11.pri
Normal file
51
c++11.pri
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
macx {
|
||||
# Mac needs special care to link against the correct C++ library
|
||||
# We attempt to auto-detect it by inspecting Boost
|
||||
dirs = $${BOOSTDIR} $${QMAKE_LIBDIR}
|
||||
for(dir, dirs) {
|
||||
system(grep -q __112basic_string $${dir}/libboost_thread* >& /dev/null) {
|
||||
message("Using libc++11")
|
||||
CONFIG += libc++
|
||||
}
|
||||
else {
|
||||
message("Using libstdc++")
|
||||
CONFIG += libstdc++
|
||||
c++11 {
|
||||
# libc++ is a requirement for using C++11
|
||||
warning("Disabling C++11 since libstdc++ dependencies were found")
|
||||
CONFIG -= c++11
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libc++ {
|
||||
QMAKE_CXXFLAGS += -stdlib=libc++
|
||||
QMAKE_LFLAGS += -stdlib=libc++
|
||||
QMAKE_OBJECTIVE_CFLAGS += -stdlib=libc++
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
c++11 {
|
||||
# qmake will figure out what gcc needs
|
||||
gcc: {
|
||||
system( "gcc -v 2>&1 | grep ersion.[3-4].[0-6]" ) {
|
||||
QMAKE_CXXFLAGS += -std=c++0x
|
||||
} else {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
}
|
||||
}
|
||||
*clang*: {
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
# 3rd party libraries will probably violate this for a long time
|
||||
CXX11_SUPPRESS_WARNINGS += -Wno-inconsistent-missing-override
|
||||
# boost/algorithm/string.hpp does this
|
||||
CXX11_SUPPRESS_WARNINGS += -Wno-unused-local-typedef
|
||||
# CGAL
|
||||
CXX11_SUPPRESS_WARNINGS += -Wno-deprecated-register
|
||||
|
||||
QMAKE_CXXFLAGS_WARN_ON += $$CXX11_SUPPRESS_WARNINGS
|
||||
QMAKE_OBJECTIVE_CFLAGS_WARN_ON += $$CXX11_SUPPRESS_WARNINGS
|
||||
}
|
||||
}
|
||||
|
||||
2
cgal.pri
2
cgal.pri
|
|
@ -10,7 +10,7 @@ cgal {
|
|||
message("CGAL location: $$CGAL_DIR")
|
||||
}
|
||||
|
||||
CONFIG(mingw-cross-env) {
|
||||
CONFIG(mingw-cross-env)|CONFIG(mingw-cross-env-shared) {
|
||||
LIBS += -lgmp -lmpfr -lCGAL
|
||||
QMAKE_CXXFLAGS += -frounding-math
|
||||
} else {
|
||||
|
|
|
|||
203
cgal/data/issue1455.nef3
Normal file
203
cgal/data/issue1455.nef3
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
Selective Nef Complex
|
||||
standard
|
||||
vertices 15
|
||||
halfedges 42
|
||||
facets 18
|
||||
volumes 2
|
||||
shalfedges 84
|
||||
shalfloops 2
|
||||
sfaces 30
|
||||
0 { 0 2, 0 5, 0 1, -2 | 0 0 5 1 } 1
|
||||
1 { 3 5, 6 11, 2 3, -2 | 5 0 5 1 } 1
|
||||
2 { 6 8, 12 17, 4 5, -2 | 5 5 5 1 } 1
|
||||
3 { 9 11, 18 23, 6 7, -2 | 0 5 0 1 } 1
|
||||
4 { 12 14, 24 29, 8 9, -2 | 5 0 0 1 } 1
|
||||
5 { 15 17, 30 35, 10 11, -2 | 5 5 0 1 } 1
|
||||
6 { 18 20, 36 41, 12 13, -2 | 0 5 5 1 } 1
|
||||
7 { 21 23, 42 47, 14 15, -2 | 0 0 3 1 } 0
|
||||
8 { 24 26, 48 53, 16 17, -2 | 3 0 3 1 } 0
|
||||
9 { 27 29, 54 59, 18 19, -2 | 3 3 3 1 } 0
|
||||
10 { 30 32, 60 65, 20 21, -2 | 0 3 0 1 } 0
|
||||
11 { 33 35, 66 71, 22 23, -2 | 3 0 0 1 } 0
|
||||
12 { 36 38, 72 77, 24 25, -2 | 3 3 0 1 } 0
|
||||
13 { 39 41, 78 83, 26 27, -2 | 0 3 3 1 } 0
|
||||
14 { -2 -2, -2 -2, 28 29, 0 | 2 2 3 1 } 1
|
||||
0 { 3, 0, 0 0 | 1 0 0 1 } 1
|
||||
1 { 18, 0, 0 5 | 0 1 0 1 } 1
|
||||
2 { 21, 0, 0 4 | 0 0 -1 1 } 1
|
||||
3 { 0, 1, 0 6 | -1 0 0 1 } 1
|
||||
4 { 6, 1, 0 7 | 0 1 0 1 } 1
|
||||
5 { 13, 1, 0 10 | 0 0 -1 1 } 1
|
||||
6 { 4, 2, 0 14 | 0 -1 0 1 } 1
|
||||
7 { 19, 2, 0 13 | -1 0 0 1 } 1
|
||||
8 { 17, 2, 0 16 | 0 0 -1 1 } 1
|
||||
9 { 32, 3, 0 20 | 0 -1 0 1 } 1
|
||||
10 { 20, 3, 0 22 | 0 0 1 1 } 1
|
||||
11 { 16, 3, 0 21 | 1 0 0 1 } 1
|
||||
12 { 34, 4, 0 26 | -1 0 0 1 } 1
|
||||
13 { 5, 4, 0 28 | 0 0 1 1 } 1
|
||||
14 { 15, 4, 0 25 | 0 1 0 1 } 1
|
||||
15 { 14, 5, 0 30 | 0 -1 0 1 } 1
|
||||
16 { 11, 5, 0 34 | -1 0 0 1 } 1
|
||||
17 { 8, 5, 0 35 | 0 0 1 1 } 1
|
||||
18 { 1, 6, 0 36 | 0 -1 0 1 } 1
|
||||
19 { 7, 6, 0 40 | 1 0 0 1 } 1
|
||||
20 { 10, 6, 0 41 | 0 0 -1 1 } 1
|
||||
21 { 2, 7, 0 44 | 0 0 1 1 } 1
|
||||
22 { 24, 7, 0 46 | 1 0 0 1 } 0
|
||||
23 { 39, 7, 0 47 | 0 1 0 1 } 0
|
||||
24 { 22, 8, 0 50 | -1 0 0 1 } 0
|
||||
25 { 27, 8, 0 49 | 0 1 0 1 } 0
|
||||
26 { 33, 8, 0 52 | 0 0 -1 1 } 0
|
||||
27 { 25, 9, 0 56 | 0 -1 0 1 } 0
|
||||
28 { 40, 9, 0 55 | -1 0 0 1 } 0
|
||||
29 { 38, 9, 0 58 | 0 0 -1 1 } 0
|
||||
30 { 41, 10, 0 62 | 0 0 1 1 } 0
|
||||
31 { 37, 10, 0 64 | 1 0 0 1 } 0
|
||||
32 { 9, 10, 0 65 | 0 1 0 1 } 1
|
||||
33 { 26, 11, 0 68 | 0 0 1 1 } 0
|
||||
34 { 12, 11, 0 70 | 1 0 0 1 } 1
|
||||
35 { 36, 11, 0 71 | 0 1 0 1 } 0
|
||||
36 { 35, 12, 0 74 | 0 -1 0 1 } 0
|
||||
37 { 31, 12, 0 76 | -1 0 0 1 } 0
|
||||
38 { 29, 12, 0 77 | 0 0 1 1 } 0
|
||||
39 { 23, 13, 0 80 | 0 -1 0 1 } 0
|
||||
40 { 28, 13, 0 82 | 1 0 0 1 } 0
|
||||
41 { 30, 13, 0 79 | 0 0 -1 1 } 0
|
||||
0 { 1, 79 , , 0 | -1 0 0 0 } 1
|
||||
1 { 0, 78 , , 1 | 1 0 0 0 } 1
|
||||
2 { 3, 37 , , 0 | 0 0 1 -5 } 1
|
||||
3 { 2, 36 , , 1 | 0 0 -1 5 } 1
|
||||
4 { 5, 9 , , 0 | 1 0 0 -5 } 1
|
||||
5 { 4, 8 , , 1 | -1 0 0 5 } 1
|
||||
6 { 7, 35 , , 0 | 0 1 0 -5 } 1
|
||||
7 { 6, 34 , , 1 | 0 -1 0 5 } 1
|
||||
8 { 9, 74 , , 0 | 0 0 -1 0 } 1
|
||||
9 { 8, 75 , , 1 | 0 0 1 0 } 1
|
||||
10 { 11, 2 , , 0 | 0 -1 0 0 } 1
|
||||
11 { 10, 3 , , 1 | 0 1 0 0 } 1
|
||||
12 { 13, 81 , 1 , 1 | 0 0 1 -3 } 0
|
||||
13 { 12, 80 , 0 , 0 | 0 0 -1 3 } 0
|
||||
14 { 15, 53 , , 1 | 1 0 0 -3 } 0
|
||||
15 { 14, 52 , , 0 | -1 0 0 3 } 0
|
||||
16 { 17, 77 , , 1 | 0 1 0 -3 } 0
|
||||
17 { 16, 76 , , 0 | 0 -1 0 3 } 0
|
||||
0 { 0 } 0
|
||||
1 { 15 } 1
|
||||
0 { 1, 3, 5, 0, 0, 7, 36, 3 | 0 0 1 0 } 1
|
||||
1 { 0, 4, 2, 1, 1, 37, 6, 2 | 0 0 -1 0 } 1
|
||||
2 { 3, 1, 4, 0, 1, 10, 44, 10 | 0 1 0 0 } 1
|
||||
3 { 2, 5, 0, 2, 0, 45, 11, 11 | 0 -1 0 0 } 1
|
||||
4 { 5, 2, 1, 2, 1, 43, 38, 0 | 1 0 0 0 } 1
|
||||
5 { 4, 0, 3, 1, 0, 39, 42, 1 | -1 0 0 0 } 1
|
||||
6 { 7, 10, 9, 3, 3, 1, 12, 2 | 0 0 -1 0 } 1
|
||||
7 { 6, 8, 11, 4, 2, 13, 0, 3 | 0 0 1 0 } 1
|
||||
8 { 9, 11, 7, 5, 2, 29, 14, 5 | 1 0 0 0 } 1
|
||||
9 { 8, 6, 10, 4, 3, 15, 28, 4 | -1 0 0 0 } 1
|
||||
10 { 11, 9, 6, 5, 3, 26, 2, 10 | 0 1 0 0 } 1
|
||||
11 { 10, 7, 8, 3, 2, 3, 27, 11 | 0 -1 0 0 } 1
|
||||
12 { 13, 15, 17, 6, 5, 6, 37, 2 | 0 0 -1 0 } 1
|
||||
13 { 12, 16, 14, 7, 4, 36, 7, 3 | 0 0 1 0 } 1
|
||||
14 { 15, 13, 16, 6, 4, 8, 33, 5 | 1 0 0 0 } 1
|
||||
15 { 14, 17, 12, 8, 5, 32, 9, 4 | -1 0 0 0 } 1
|
||||
16 { 17, 14, 13, 8, 4, 34, 40, 7 | 0 1 0 0 } 1
|
||||
17 { 16, 12, 15, 7, 5, 41, 35, 6 | 0 -1 0 0 } 1
|
||||
18 { 19, 21, 22, 9, 6, 60, 39, 1 | -1 0 0 0 } 1
|
||||
19 { 18, 23, 20, 10, 7, 38, 61, 0 | 1 0 0 0 } 1
|
||||
20 { 21, 19, 23, 9, 7, 64, 31, 8 | 0 0 1 0 } 1
|
||||
21 { 20, 22, 18, 11, 6, 30, 65, 9 | 0 0 -1 0 } 1
|
||||
22 { 23, 18, 21, 10, 6, 40, 34, 7 | 0 1 0 0 } 1
|
||||
23 { 22, 20, 19, 11, 7, 35, 41, 6 | 0 -1 0 0 } 1
|
||||
24 { 25, 27, 29, 12, 8, 71, 30, 9 | 0 0 -1 0 } 1
|
||||
25 { 24, 28, 26, 14, 9, 31, 70, 8 | 0 0 1 0 } 1
|
||||
26 { 27, 25, 28, 12, 9, 68, 10, 10 | 0 1 0 0 } 1
|
||||
27 { 26, 29, 24, 13, 8, 11, 69, 11 | 0 -1 0 0 } 1
|
||||
28 { 29, 26, 25, 13, 9, 9, 32, 4 | -1 0 0 0 } 1
|
||||
29 { 28, 24, 27, 14, 8, 33, 8, 5 | 1 0 0 0 } 1
|
||||
30 { 31, 33, 34, 15, 11, 24, 21, 9 | 0 0 -1 0 } 1
|
||||
31 { 30, 35, 32, 16, 10, 20, 25, 8 | 0 0 1 0 } 1
|
||||
32 { 33, 31, 35, 15, 10, 28, 15, 4 | -1 0 0 0 } 1
|
||||
33 { 32, 34, 30, 17, 11, 14, 29, 5 | 1 0 0 0 } 1
|
||||
34 { 35, 30, 33, 16, 11, 22, 16, 7 | 0 1 0 0 } 1
|
||||
35 { 34, 32, 31, 17, 10, 17, 23, 6 | 0 -1 0 0 } 1
|
||||
36 { 37, 39, 40, 18, 12, 0, 13, 3 | 0 0 1 0 } 1
|
||||
37 { 36, 41, 38, 19, 13, 12, 1, 2 | 0 0 -1 0 } 1
|
||||
38 { 39, 37, 41, 18, 13, 4, 19, 0 | 1 0 0 0 } 1
|
||||
39 { 38, 40, 36, 20, 12, 18, 5, 1 | -1 0 0 0 } 1
|
||||
40 { 41, 36, 39, 19, 12, 16, 22, 7 | 0 1 0 0 } 1
|
||||
41 { 40, 38, 37, 20, 13, 23, 17, 6 | 0 -1 0 0 } 1
|
||||
42 { 43, 45, 47, 21, 14, 5, 78, 1 | -1 0 0 0 } 1
|
||||
43 { 42, 46, 44, 23, 15, 79, 4, 0 | 1 0 0 0 } 1
|
||||
44 { 45, 43, 46, 21, 15, 2, 50, 10 | 0 1 0 0 } 1
|
||||
45 { 44, 47, 42, 22, 14, 51, 3, 11 | 0 -1 0 0 } 1
|
||||
46 { 47, 44, 43, 22, 15, 49, 80, 13 | 0 0 1 0 } 0
|
||||
47 { 46, 42, 45, 23, 14, 81, 48, 12 | 0 0 -1 0 } 0
|
||||
48 { 49, 51, 53, 24, 16, 47, 54, 12 | 0 0 -1 0 } 0
|
||||
49 { 48, 52, 50, 25, 17, 55, 46, 13 | 0 0 1 0 } 0
|
||||
50 { 51, 49, 52, 24, 17, 44, 68, 10 | 0 1 0 0 } 1
|
||||
51 { 50, 53, 48, 26, 16, 69, 45, 11 | 0 -1 0 0 } 1
|
||||
52 { 53, 50, 49, 26, 17, 67, 56, 15 | 1 0 0 0 } 0
|
||||
53 { 52, 48, 51, 25, 16, 57, 66, 14 | -1 0 0 0 } 0
|
||||
54 { 55, 57, 59, 27, 19, 48, 81, 12 | 0 0 -1 0 } 0
|
||||
55 { 54, 58, 56, 28, 18, 80, 49, 13 | 0 0 1 0 } 0
|
||||
56 { 57, 55, 58, 27, 18, 52, 73, 15 | 1 0 0 0 } 0
|
||||
57 { 56, 59, 54, 29, 19, 72, 53, 14 | -1 0 0 0 } 0
|
||||
58 { 59, 56, 55, 29, 18, 76, 82, 17 | 0 1 0 0 } 0
|
||||
59 { 58, 54, 57, 28, 19, 83, 77, 16 | 0 -1 0 0 } 0
|
||||
60 { 61, 63, 65, 30, 20, 78, 18, 1 | -1 0 0 0 } 1
|
||||
61 { 60, 64, 62, 32, 21, 19, 79, 0 | 1 0 0 0 } 1
|
||||
62 { 63, 61, 64, 30, 21, 82, 76, 17 | 0 1 0 0 } 0
|
||||
63 { 62, 65, 60, 31, 20, 77, 83, 16 | 0 -1 0 0 } 0
|
||||
64 { 65, 62, 61, 31, 21, 74, 20, 8 | 0 0 1 0 } 1
|
||||
65 { 64, 60, 63, 32, 20, 21, 75, 9 | 0 0 -1 0 } 1
|
||||
66 { 67, 69, 71, 33, 22, 53, 72, 14 | -1 0 0 0 } 0
|
||||
67 { 66, 70, 68, 35, 23, 73, 52, 15 | 1 0 0 0 } 0
|
||||
68 { 69, 67, 70, 33, 23, 50, 26, 10 | 0 1 0 0 } 1
|
||||
69 { 68, 71, 66, 34, 22, 27, 51, 11 | 0 -1 0 0 } 1
|
||||
70 { 71, 68, 67, 34, 23, 25, 74, 8 | 0 0 1 0 } 1
|
||||
71 { 70, 66, 69, 35, 22, 75, 24, 9 | 0 0 -1 0 } 1
|
||||
72 { 73, 75, 77, 36, 24, 66, 57, 14 | -1 0 0 0 } 0
|
||||
73 { 72, 76, 74, 38, 25, 56, 67, 15 | 1 0 0 0 } 0
|
||||
74 { 75, 73, 76, 36, 25, 70, 64, 8 | 0 0 1 0 } 1
|
||||
75 { 74, 77, 72, 37, 24, 65, 71, 9 | 0 0 -1 0 } 1
|
||||
76 { 77, 74, 73, 37, 25, 62, 58, 17 | 0 1 0 0 } 0
|
||||
77 { 76, 72, 75, 38, 24, 59, 63, 16 | 0 -1 0 0 } 0
|
||||
78 { 79, 81, 83, 39, 26, 42, 60, 1 | -1 0 0 0 } 1
|
||||
79 { 78, 82, 80, 41, 27, 61, 43, 0 | 1 0 0 0 } 1
|
||||
80 { 81, 79, 82, 39, 27, 46, 55, 13 | 0 0 1 0 } 0
|
||||
81 { 80, 83, 78, 40, 26, 54, 47, 12 | 0 0 -1 0 } 0
|
||||
82 { 83, 80, 79, 40, 27, 58, 62, 17 | 0 1 0 0 } 0
|
||||
83 { 82, 78, 81, 41, 26, 63, 59, 16 | 0 -1 0 0 } 0
|
||||
0 { 1, 28, 13 | 0 0 1 0 } 0
|
||||
1 { 0, 29, 12 | 0 0 -1 0 } 0
|
||||
0 { 0, 0 , , , 0 } 0
|
||||
1 { 0, 1 , , , 1 } 1
|
||||
2 { 1, 7 , , , 0 } 0
|
||||
3 { 1, 6 , , , 1 } 1
|
||||
4 { 2, 13 , , , 0 } 0
|
||||
5 { 2, 12 , , , 1 } 1
|
||||
6 { 3, 18 , , , 0 } 0
|
||||
7 { 3, 19 , , , 1 } 1
|
||||
8 { 4, 24 , , , 0 } 0
|
||||
9 { 4, 25 , , , 1 } 1
|
||||
10 { 5, 31 , , , 1 } 1
|
||||
11 { 5, 30 , , , 0 } 0
|
||||
12 { 6, 36 , , , 0 } 0
|
||||
13 { 6, 37 , , , 1 } 1
|
||||
14 { 7, 42 , , , 0 } 0
|
||||
15 { 7, 43 , , , 1 } 1
|
||||
16 { 8, 48 , , , 0 } 0
|
||||
17 { 8, 49 , , , 1 } 1
|
||||
18 { 9, 55 , , , 1 } 1
|
||||
19 { 9, 54 , , , 0 } 0
|
||||
20 { 10, 60 , , , 0 } 0
|
||||
21 { 10, 61 , , , 1 } 1
|
||||
22 { 11, 66 , , , 0 } 0
|
||||
23 { 11, 67 , , , 1 } 1
|
||||
24 { 12, 72 , , , 0 } 0
|
||||
25 { 12, 73 , , , 1 } 1
|
||||
26 { 13, 78 , , , 0 } 0
|
||||
27 { 13, 79 , , , 1 } 1
|
||||
28 { 14, , , 0, 1 } 1
|
||||
29 { 14, , , 1, 0 } 0
|
||||
/* end Selective Nef complex */
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
#include <boost/foreach.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
|
@ -8,14 +9,17 @@
|
|||
#include "export.h"
|
||||
#include "polyset.h"
|
||||
#include "CGAL_Nef_polyhedron.h"
|
||||
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
|
||||
|
||||
using namespace CGALUtils;
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
// Nef polyhedron are using CGAL_Kernel3 (Cartesian<Gmpq>)
|
||||
// Triangulation will use Epick
|
||||
typedef CGAL::Epick K;
|
||||
typedef CGAL::Polyhedron_3<K> PolyhedronK;
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/assign/std/vector.hpp>
|
||||
#include <boost/assign/list_of.hpp>
|
||||
using namespace boost::assign; // bring 'operator+=()' into scope
|
||||
|
|
@ -629,21 +633,30 @@ int main(int argc, char *argv[])
|
|||
OpenSCAD::debug = "decompose";
|
||||
|
||||
PolySet *ps = NULL;
|
||||
CGAL_Nef_polyhedron *N = NULL;
|
||||
if (argc == 2) {
|
||||
if (!(ps = import_stl(argv[1]))) {
|
||||
std::cerr << "Error importing STL " << argv[1] << std::endl;
|
||||
exit(1);
|
||||
std::string filename(argv[1]);
|
||||
std::string suffix = filename.extension().generic_string();
|
||||
if (suffix == ".stl") {
|
||||
if (!(ps = import_stl(filename))) {
|
||||
std::cerr << "Error importing STL " << filename << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
std::cerr << "Imported " << ps->numPolygons() << " polygons" << std::endl;
|
||||
}
|
||||
else if (suffix == ".nef3") {
|
||||
N = new CGAL_Nef_polyhedron(new CGAL_Nef_polyhedron3);
|
||||
std::ifstream stream(filename.c_str());
|
||||
stream >> *N->p3;
|
||||
std::cerr << "Imported Nef polyhedron" << std::endl;
|
||||
}
|
||||
std::cerr << "Imported " << ps->numPolygons() << " polygons" << std::endl;
|
||||
}
|
||||
else {
|
||||
std::cerr << "Usage: " << argv[0] << " <file.stl> <file.stl>" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Geometry::ChildList children;
|
||||
|
||||
CGAL_Nef_polyhedron *N = createNefPolyhedronFromGeometry(*ps);
|
||||
if (ps && !N) N = createNefPolyhedronFromGeometry(*ps);
|
||||
|
||||
std::vector<PolyhedronK> result;
|
||||
decompose(N->p3.get(), std::back_inserter(result));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ debug: DEFINES += DEBUG
|
|||
|
||||
TEMPLATE = app
|
||||
|
||||
INCLUDEPATH += ../src
|
||||
INCLUDEPATH += ../src ../src/libtess2/Include
|
||||
DEPENDPATH += ../src
|
||||
|
||||
# Handle custom library location.
|
||||
|
|
@ -54,10 +54,12 @@ macx {
|
|||
}
|
||||
}
|
||||
|
||||
# See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
|
||||
*g++* {
|
||||
# See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
|
||||
QMAKE_CXXFLAGS *= -fno-strict-aliasing
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedefs # ignored before 4.8
|
||||
# use of 'auto'
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
}
|
||||
|
||||
*clang* {
|
||||
|
|
@ -80,29 +82,52 @@ CONFIG += gettext
|
|||
|
||||
mac: {
|
||||
LIBS += -framework OpenGL
|
||||
} else {
|
||||
LIBS += -lGL
|
||||
}
|
||||
|
||||
|
||||
include(../common.pri)
|
||||
|
||||
HEADERS += ../src/cgal.h \
|
||||
../src/cgalutils.h \
|
||||
../src/linalg.h \
|
||||
../src/grid.h \
|
||||
../src/polyset.h \
|
||||
../src/polyset-utils.h \
|
||||
../src/printutils.h
|
||||
../src/printutils.h \
|
||||
../src/GeometryUtils.h \
|
||||
../src/libtess2/Include/tesselator.h \
|
||||
../src/libtess2/Source/bucketalloc.h \
|
||||
../src/libtess2/Source/dict.h \
|
||||
../src/libtess2/Source/geom.h \
|
||||
../src/libtess2/Source/mesh.h \
|
||||
../src/libtess2/Source/priorityq.h \
|
||||
../src/libtess2/Source/sweep.h \
|
||||
../src/libtess2/Source/tess.h
|
||||
|
||||
SOURCES += decompose.cpp \
|
||||
../src/polygon2d.cc \
|
||||
../src/polygon2d-CGAL.cc \
|
||||
../src/CGAL_Nef_polyhedron.cc \
|
||||
../src/CGAL_Nef_polyhedron_DxfData.cc \
|
||||
../src/cgalutils.cc \
|
||||
../src/cgalutils-applyops.cc \
|
||||
../src/cgalutils-tess.cc \
|
||||
../src/cgalutils-polyhedron.cc \
|
||||
../src/polyset.cc \
|
||||
../src/polyset-gl.cc \
|
||||
../src/GeometryUtils.cc \
|
||||
../src/svg.cc \
|
||||
../src/grid.cc \
|
||||
../src/node.cc \
|
||||
../src/export.cc \
|
||||
../src/polyset-utils.cc \
|
||||
../src/progress.cc \
|
||||
../src/printutils.cc
|
||||
../src/printutils.cc \
|
||||
../src/libtess2/Source/bucketalloc.c \
|
||||
../src/libtess2/Source/dict.c \
|
||||
../src/libtess2/Source/geom.c \
|
||||
../src/libtess2/Source/mesh.c \
|
||||
../src/libtess2/Source/priorityq.c \
|
||||
../src/libtess2/Source/sweep.c \
|
||||
../src/libtess2/Source/tess.c
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include <boost/foreach.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
|
@ -9,11 +10,11 @@
|
|||
#include "export.h"
|
||||
#include "polyset.h"
|
||||
#include "CGAL_Nef_polyhedron.h"
|
||||
#include "boosty.h"
|
||||
|
||||
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
|
||||
|
||||
using namespace CGALUtils;
|
||||
namespace fs=boost::fileystem;
|
||||
|
||||
#define STL_FACET_NUMBYTES 4*3*4+2
|
||||
// as there is no 'float32_t' standard, we assume the systems 'float'
|
||||
|
|
@ -152,7 +153,7 @@ int main(int argc, char *argv[])
|
|||
PolySet *ps = NULL;
|
||||
if (argc == 2) {
|
||||
std::string filename(argv[1]);
|
||||
std::string suffix = boosty::extension_str(filename);
|
||||
std::string suffix = filename.extension().generic_string();
|
||||
boost::algorithm::to_lower(suffix);
|
||||
if (suffix == ".stl") {
|
||||
if (!(ps = import_stl(filename))) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ debug: DEFINES += DEBUG
|
|||
|
||||
TEMPLATE = app
|
||||
|
||||
INCLUDEPATH += ../src
|
||||
INCLUDEPATH += ../src ../src/libtess2/Include
|
||||
DEPENDPATH += ../src
|
||||
|
||||
# Handle custom library location.
|
||||
|
|
@ -87,23 +87,42 @@ include(../common.pri)
|
|||
HEADERS += ../src/cgal.h \
|
||||
../src/cgalutils.h \
|
||||
../src/linalg.h \
|
||||
../src/grid.h \
|
||||
../src/polyset.h \
|
||||
../src/polyset-utils.h \
|
||||
../src/printutils.h
|
||||
../src/printutils.h \
|
||||
../src/GeometryUtils.h \
|
||||
../src/libtess2/Include/tesselator.h \
|
||||
../src/libtess2/Source/bucketalloc.h \
|
||||
../src/libtess2/Source/dict.h \
|
||||
../src/libtess2/Source/geom.h \
|
||||
../src/libtess2/Source/mesh.h \
|
||||
../src/libtess2/Source/priorityq.h \
|
||||
../src/libtess2/Source/sweep.h \
|
||||
../src/libtess2/Source/tess.h
|
||||
|
||||
SOURCES += export_nef.cpp \
|
||||
../src/polygon2d.cc \
|
||||
../src/polygon2d-CGAL.cc \
|
||||
../src/CGAL_Nef_polyhedron.cc \
|
||||
../src/CGAL_Nef_polyhedron_DxfData.cc \
|
||||
../src/cgalutils.cc \
|
||||
../src/cgalutils-applyops.cc \
|
||||
../src/cgalutils-tess.cc \
|
||||
../src/cgalutils-polyhedron.cc \
|
||||
../src/polyset.cc \
|
||||
../src/polyset-gl.cc \
|
||||
../src/GeometryUtils.cc \
|
||||
../src/svg.cc \
|
||||
../src/grid.cc \
|
||||
../src/node.cc \
|
||||
../src/export.cc \
|
||||
../src/polyset-utils.cc \
|
||||
../src/progress.cc \
|
||||
../src/printutils.cc \
|
||||
../src/grid.cc
|
||||
../src/libtess2/Source/bucketalloc.c \
|
||||
../src/libtess2/Source/dict.c \
|
||||
../src/libtess2/Source/geom.c \
|
||||
../src/libtess2/Source/mesh.c \
|
||||
../src/libtess2/Source/priorityq.c \
|
||||
../src/libtess2/Source/sweep.c \
|
||||
../src/libtess2/Source/tess.c
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#333333",
|
||||
"axes-color" : "#c1c1c1",
|
||||
"opencsg-face-front" : "#cccccc",
|
||||
"opencsg-face-back" : "#5563dd",
|
||||
"cgal-face-front" : "#cccccc",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#333333",
|
||||
"axes-color" : "#c1c1c1",
|
||||
"opencsg-face-front" : "#eeeeee",
|
||||
"opencsg-face-back" : "#0babc8",
|
||||
"cgal-face-front" : "#eeeeee",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#aaaaff",
|
||||
"axes-color" : "#222233",
|
||||
"opencsg-face-front" : "#ddddff",
|
||||
"opencsg-face-back" : "#dd22dd",
|
||||
"cgal-face-front" : "#ddddff",
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#ffffe5",
|
||||
"axes-color" : "#191916",
|
||||
"opencsg-face-front" : "#f9d72c",
|
||||
"opencsg-face-back" : "#f9d72c",
|
||||
"cgal-face-front" : "#f9d72c",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#fafafa",
|
||||
"axes-color" : "#323232",
|
||||
"opencsg-face-front" : "#16a085",
|
||||
"opencsg-face-back" : "#dbf4da",
|
||||
"cgal-face-front" : "#16a085",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#fdf6e3",
|
||||
"axes-color" : "#191816",
|
||||
"opencsg-face-front" : "#b58800",
|
||||
"opencsg-face-back" : "#882233",
|
||||
"cgal-face-front" : "#b58800",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#000000",
|
||||
"axes-color" : "#e5e5e5",
|
||||
"opencsg-face-front" : "#ffffe0",
|
||||
"opencsg-face-back" : "#00ffff",
|
||||
"cgal-face-front" : "#ffffe0",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#aa4444",
|
||||
"axes-color" : "#220d0d",
|
||||
"opencsg-face-front" : "#ffaaaa",
|
||||
"opencsg-face-back" : "#882233",
|
||||
"cgal-face-front" : "#ffaaaa",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#1d1f21",
|
||||
"axes-color" : "#e8e8e8",
|
||||
"opencsg-face-front" : "#81a2be",
|
||||
"opencsg-face-back" : "#de935f",
|
||||
"cgal-face-front" : "#8abeb7",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
"colors" : {
|
||||
"background" : "#f8f8f8",
|
||||
"axes-color" : "#181818",
|
||||
"opencsg-face-front" : "#4271ae",
|
||||
"opencsg-face-back" : "#f5871f",
|
||||
"cgal-face-front" : "#3e999f",
|
||||
|
|
|
|||
20
common.pri
20
common.pri
|
|
@ -1,20 +0,0 @@
|
|||
OBJECTS_DIR = objects
|
||||
MOC_DIR = objects
|
||||
UI_DIR = objects
|
||||
RCC_DIR = objects
|
||||
|
||||
include(win.pri)
|
||||
include(flex.pri)
|
||||
include(bison.pri)
|
||||
include(cgal.pri)
|
||||
include(opencsg.pri)
|
||||
include(glew.pri)
|
||||
include(eigen.pri)
|
||||
include(boost.pri)
|
||||
include(glib-2.0.pri)
|
||||
include(gettext.pri)
|
||||
include(sparkle.pri)
|
||||
include(harfbuzz.pri)
|
||||
include(freetype.pri)
|
||||
include(fontconfig.pri)
|
||||
include(scintilla.pri)
|
||||
9
contrib/appdata.its
Normal file
9
contrib/appdata.its
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<!-- Copyright 2013 Richard Hughes <richard@hughsie.com> -->
|
||||
<its:rules
|
||||
xmlns:its="http://www.w3.org/2005/11/its"
|
||||
version="1.0">
|
||||
<its:translateRule translate="no" selector="/component"/>
|
||||
<its:translateRule translate="yes"
|
||||
selector="/component/summary |
|
||||
/component/description"/>
|
||||
</its:rules>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
;;; scad-mode.el --- Major mode for editing SCAD files
|
||||
;;; scad-mode.el --- A major mode for editing OpenSCAD code
|
||||
|
||||
;; Author: Len Trigg
|
||||
;; Author: Len Trigg, Łukasz Stelmach
|
||||
;; Maintainer: Len Trigg <lenbok@gmail.com>
|
||||
;; Created: March 2010
|
||||
;; Modified: 24 May 2014
|
||||
;; Modified: 28 Mar 2015
|
||||
;; Keywords: languages
|
||||
;; URL: https://raw.github.com/openscad/openscad/master/contrib/scad-mode.el
|
||||
;; Version: 91.0
|
||||
|
|
@ -26,11 +26,11 @@
|
|||
;;; Commentary:
|
||||
;;
|
||||
;; This is a major-mode to implement the SCAD constructs and
|
||||
;; font-locking for openscad
|
||||
;; font-locking for OpenSCAD
|
||||
;;
|
||||
;; If installing manually, insert the following into your emacs startup:
|
||||
;;
|
||||
;; (autoload 'scad-mode "scad-mode" "Major mode for editing SCAD code." t)
|
||||
;; (autoload 'scad-mode "scad-mode" "A major mode for editing OpenSCAD code." t)
|
||||
;; (add-to-list 'auto-mode-alist '("\\.scad$" . scad-mode))
|
||||
;;
|
||||
;; or
|
||||
|
|
@ -48,6 +48,8 @@
|
|||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("\\.scad$" . scad-mode))
|
||||
|
||||
(require 'cc-mode)
|
||||
|
||||
(defcustom scad-command
|
||||
'"openscad"
|
||||
"Path to openscad executable"
|
||||
|
|
@ -68,30 +70,41 @@
|
|||
"str"
|
||||
"lookup" "version" "version_num" "len" "search"
|
||||
"dxf_dim" "dxf_cross" ;;dxfdim.cc
|
||||
"norm" "cross" ;;2014.03
|
||||
"concat" "chr" ;;2015.03
|
||||
)
|
||||
"SCAD functions."
|
||||
:type 'list
|
||||
:group 'scad-font-lock)
|
||||
|
||||
(defcustom scad-modules
|
||||
'("child" "children" "echo" "assign" "for" "intersection_for" "if" "else" ;;control.cc
|
||||
'("children" "echo" "for" "intersection_for" "if" "else" ;;control.cc
|
||||
"cube" "sphere" "cylinder" "polyhedron" "square" "circle" "polygon" ;;primitives.cc
|
||||
"scale" "rotate" "translate" "mirror" "multmatrix" ;;transform.cc
|
||||
"union" "difference" "intersection" ;;csgops.cc
|
||||
"render" ;;render.cc
|
||||
"color" ;;color.cc
|
||||
"surface" ;;surface.cc
|
||||
"dxf_linear_extrude" "linear_extrude" ;;linearextrude.cc
|
||||
"dxf_rotate_extrude" "rotate_extrude" ;;rotateextrude.cc
|
||||
"import_stl" "import_off" "import_dxf" "import" ;;import.cc
|
||||
"linear_extrude" ;;linearextrude.cc
|
||||
"rotate_extrude" ;;rotateextrude.cc
|
||||
"import" ;;import.cc
|
||||
"group" ;;builtin.cc
|
||||
"projection" ;;projection.cc
|
||||
"minkowski" "glide" "subdiv" "hull" "resize" ;;cgaladv.cc
|
||||
"parent_module" ;;2014.03
|
||||
"let" "offset" "text" ;;2015.03
|
||||
)
|
||||
"SCAD modules."
|
||||
:type 'list
|
||||
:group 'scad-font-lock)
|
||||
|
||||
(defcustom scad-deprecated
|
||||
'("child" "assign" "dxf_linear_extrude" "dxf_rotate_extrude"
|
||||
"import_stl" "import_off" "import_dxf")
|
||||
"SCAD deprecated modules and functions."
|
||||
:type 'list
|
||||
:group 'scad-font-lock)
|
||||
|
||||
(defcustom scad-operators
|
||||
'("+" "-" "*" "/" "%"
|
||||
"&&" "||" "!"
|
||||
|
|
@ -103,9 +116,9 @@
|
|||
|
||||
(defvar scad-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "\t" 'scad-indent-line)
|
||||
(define-key map [(control c) (control o)] 'scad-open-current-buffer)
|
||||
(define-key map [return] 'newline-and-indent)
|
||||
(define-key map [return] 'newline-and-indent)
|
||||
;;(define-key map [(control c) (control s)] 'c-show-syntactic-information) ;; Debugging info
|
||||
map)
|
||||
"Keymap for `scad-mode'.")
|
||||
|
||||
|
|
@ -138,6 +151,7 @@
|
|||
(defvar scad-keywords-regexp (regexp-opt scad-keywords 'words))
|
||||
(defvar scad-modules-regexp (regexp-opt scad-modules 'words))
|
||||
(defvar scad-functions-regexp (regexp-opt scad-functions 'words))
|
||||
(defvar scad-deprecated-regexp (regexp-opt scad-deprecated 'words))
|
||||
(defvar scad-operators-regexp (regexp-opt scad-operators))
|
||||
|
||||
(defvar scad-font-lock-keywords
|
||||
|
|
@ -149,30 +163,41 @@
|
|||
(,scad-keywords-regexp . font-lock-keyword-face)
|
||||
(,scad-modules-regexp . font-lock-builtin-face)
|
||||
(,scad-functions-regexp . font-lock-function-name-face)
|
||||
(,scad-deprecated-regexp . font-lock-warning-face)
|
||||
;(,scad-operators-regexp . font-lock-operator-face) ;; This actually looks pretty ugly
|
||||
;("\\(\\<\\S +\\>\\)\\s *(" 1 font-lock-function-name-face t) ;; Seems to override other stuff (e.g. in comments and builtins)
|
||||
)
|
||||
"Keyword highlighting specification for `scad-mode'.")
|
||||
(defconst scad-font-lock-keywords-1 scad-font-lock-keywords)
|
||||
(defconst scad-font-lock-keywords-2 scad-font-lock-keywords)
|
||||
(defconst scad-font-lock-keywords-3 scad-font-lock-keywords)
|
||||
|
||||
;(defvar scad-imenu-generic-expression ...)
|
||||
;(defvar scad-outline-regexp ...)
|
||||
(defvar scad-indent-style nil
|
||||
"The style of indentation for scad-mode. Defaults to \"k&r\" if
|
||||
nil. If you want to set the style with file local variables use
|
||||
the `c-file-style' variable")
|
||||
|
||||
(put 'scad-mode 'c-mode-prefix "scad-")
|
||||
;;;###autoload
|
||||
(define-derived-mode scad-mode fundamental-mode "SCAD"
|
||||
"A major mode for editing SCAD files."
|
||||
:syntax-table scad-mode-syntax-table
|
||||
(set (make-local-variable 'font-lock-defaults) '(scad-font-lock-keywords))
|
||||
(set (make-local-variable 'indent-line-function) 'scad-indent-line)
|
||||
;(set (make-local-variable 'imenu-generic-expression) scad-imenu-generic-expression)
|
||||
;(set (make-local-variable 'outline-regexp) scad-outline-regexp)
|
||||
;; set comment styles for scad mode
|
||||
(set (make-local-variable 'comment-start) "//")
|
||||
(set (make-local-variable 'comment-end) "")
|
||||
(set (make-local-variable 'block-comment-start) "/*")
|
||||
(set (make-local-variable 'block-comment-end) "*/")
|
||||
|
||||
)
|
||||
(define-derived-mode scad-mode prog-mode "SCAD"
|
||||
"Major mode for editing OpenSCAD code.
|
||||
|
||||
To see what version of CC Mode you are running, enter `\\[c-version]'.
|
||||
|
||||
The hook `c-mode-common-hook' is run with no args at mode
|
||||
initialization, then `scad-mode-hook'.
|
||||
|
||||
Key bindings:
|
||||
\\{scad-mode-map}"
|
||||
(c-initialize-cc-mode)
|
||||
;; (setq local-abbrev-table scad-mode-abbrev-table
|
||||
;; abbrev-mode t)
|
||||
(use-local-map scad-mode-map)
|
||||
(c-set-offset (quote cpp-macro) 0 nil)
|
||||
(c-basic-common-init 'scad-mode (or scad-indent-style "k&r"))
|
||||
(c-font-lock-init)
|
||||
(c-run-mode-hooks 'c-mode-common-hook 'scad-mode-hook)
|
||||
(c-update-modeline))
|
||||
|
||||
;; From: http://stackoverflow.com/questions/14520073/add-words-for-dynamic-expansion-to-emacs-mode
|
||||
(defun scad-prime-dabbrev ()
|
||||
|
|
@ -181,69 +206,12 @@
|
|||
(with-current-buffer (get-buffer-create " *scad words*")
|
||||
(scad-mode)
|
||||
(insert "module function use include") ; Explicitly add these -- they're not in the below vars
|
||||
(insert (mapconcat 'identity (append scad-keywords scad-functions scad-modules) " ")))))
|
||||
(insert (mapconcat 'identity (append scad-keywords scad-functions scad-modules scad-deprecated) " ")))))
|
||||
(add-hook 'scad-mode-hook 'scad-prime-dabbrev)
|
||||
|
||||
|
||||
;;; Indentation, based on http://www.emacswiki.org/emacs/download/actionscript-mode-haas-7.0.el
|
||||
|
||||
(defun scad-indent-line ()
|
||||
"Indent current line of SCAD code."
|
||||
(interactive)
|
||||
(let ((savep (> (current-column) (current-indentation)))
|
||||
(indent (max (scad-calculate-indentation) 0)))
|
||||
(if savep
|
||||
(save-excursion (indent-line-to indent))
|
||||
(indent-line-to indent))))
|
||||
|
||||
(defun scad-calculate-indentation ()
|
||||
"Return the column to which the current line should be indented."
|
||||
(save-excursion
|
||||
(scad-maybe-skip-leading-close-delim)
|
||||
(let ((pos (point)))
|
||||
(beginning-of-line)
|
||||
(if (not (search-backward-regexp "[^\n\t\r ]" 1 0))
|
||||
0
|
||||
(progn
|
||||
(scad-maybe-skip-leading-close-delim)
|
||||
(+ (current-indentation) (* standard-indent (scad-count-scope-depth (point) pos))))))))
|
||||
|
||||
(defun scad-maybe-skip-leading-close-delim ()
|
||||
(beginning-of-line)
|
||||
(forward-to-indentation 0)
|
||||
(if (looking-at "\\s)")
|
||||
(forward-char)
|
||||
(beginning-of-line)))
|
||||
|
||||
(defun scad-face-at-point (pos)
|
||||
"Return face descriptor for char at point."
|
||||
(plist-get (text-properties-at pos) 'face))
|
||||
|
||||
(defun scad-count-scope-depth (rstart rend)
|
||||
"Return difference between open and close scope delimeters."
|
||||
(save-excursion
|
||||
(goto-char rstart)
|
||||
(let ((open-count 0)
|
||||
(close-count 0)
|
||||
opoint)
|
||||
(while (and (< (point) rend)
|
||||
(progn (setq opoint (point))
|
||||
(re-search-forward "\\s)\\|\\s(" rend t)))
|
||||
(if (= opoint (point))
|
||||
(forward-char 1)
|
||||
(cond
|
||||
;; Don't count if in string or comment.
|
||||
((scad-face-at-point (- (point) 1)))
|
||||
((looking-back "\\s)")
|
||||
(setq close-count (+ close-count 1)))
|
||||
((looking-back "\\s(")
|
||||
(setq open-count (+ open-count 1)))
|
||||
)))
|
||||
(- open-count close-count))))
|
||||
|
||||
(defun scad-open-current-buffer ()
|
||||
(interactive)
|
||||
(call-process scad-command nil 0 nil (buffer-file-name)))
|
||||
|
||||
(provide 'scad)
|
||||
(provide 'scad-mode)
|
||||
;;; scad-mode.el ends here
|
||||
|
|
|
|||
17
csgopnode.h
Normal file
17
csgopnode.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#pragma once
|
||||
|
||||
#include "node.h"
|
||||
#include "visitor.h"
|
||||
#include "enums.h"
|
||||
|
||||
class CsgNode : public AbstractNode
|
||||
{
|
||||
public:
|
||||
OpenSCADOperator type;
|
||||
CsgNode(const ModuleInstantiation *mi, OpenSCADOperator type) : AbstractNode(mi), type(type) { }
|
||||
virtual Response accept(class State &state, Visitor &visitor) const {
|
||||
return visitor.visit(state, *this);
|
||||
}
|
||||
virtual std::string toString() const;
|
||||
virtual std::string name() const;
|
||||
};
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -108,7 +108,7 @@ distance 500, with orthographic projection:
|
|||
Set the 'mode' variable in example017 so that it will render only the
|
||||
parts of the shape. Export to a .dxf file.
|
||||
.PP
|
||||
.B openscad -x example017.dxf -D'mode="parts"' examples/example017.scad
|
||||
.B openscad -o example017.dxf -D'mode="parts"' examples/example017.scad
|
||||
|
||||
.SH AUTHOR
|
||||
OpenSCAD was written by Clifford Wolf, Marius Kintel, and others.
|
||||
|
|
|
|||
|
|
@ -26,14 +26,13 @@ o scripts/makereleasenotes.sh
|
|||
|
||||
o Update version number in doc/openscad.1
|
||||
o Update copyright year in AboutDialog.html and mainwin.cc
|
||||
o Add VERSION and VERSIONDATE in openscad.pro, scripts/publish-macosx.sh, scripts/release-common.sh
|
||||
o Add VERSION and VERSIONDATE in openscad.pro, scripts/publish-macosx.sh, scripts/release-common.sh tests/CMakeLists.txt
|
||||
o Add VERSION in tests/CMakeLists.txt, scripts/publish-mingw-x.sh
|
||||
|
||||
o Tag release
|
||||
git tag "openscad-$VERSION"
|
||||
|
||||
o Revert VERSION and VERSIONDATE in
|
||||
openscad.pro, scripts/publish-macosx.sh, scripts/release-common.sh, scripts/publish-mingw-x.sh
|
||||
o Revert VERSION and VERSIONDATE in openscad.pro scripts/publish-macosx.sh scripts/release-common.sh scripts/publish-mingw-x.sh tests/CMakeLists.txt
|
||||
|
||||
o build source package
|
||||
scripts/git-archive-all.py --prefix=openscad-$VERSION/ openscad-$VERSION.src.tar.gz
|
||||
|
|
|
|||
|
|
@ -3,48 +3,43 @@ Running regression tests:
|
|||
|
||||
0) Prerequisites
|
||||
|
||||
Install the prerequisite helper programs on your system:
|
||||
For Linux, BSD, and Mac, install the prerequisite helper programs on
|
||||
your system:
|
||||
|
||||
cmake, python2 (not 3), ImageMagick 6.5.9.3 or newer, diff
|
||||
|
||||
There are binary installer packages of these tools available for Mac,
|
||||
Win, Linux, BSD, and other systems. (except maybe diff for Win)
|
||||
There are binary installer packages of these tools available on the internet.
|
||||
|
||||
Next, get a working qmake GUI build of the main openscad binary working.
|
||||
For Windows(TM) this means get a cross-build working from within linux.
|
||||
For Windows(TM) install only the MSYS2 system as per the README.md
|
||||
|
||||
1) GUI Binary
|
||||
|
||||
Get a working qmake GUI build of the main openscad binary working.
|
||||
See README.md for how to do this.
|
||||
|
||||
Then, install MCAD under openscad/libraries.
|
||||
2) MCAD
|
||||
|
||||
$ cd openscad
|
||||
$ git submodule update --init
|
||||
Install MCAD under openscad/libraries.
|
||||
|
||||
$ cd openscad
|
||||
$ git submodule update --init
|
||||
|
||||
A) Building test environment
|
||||
|
||||
Linux, Mac:
|
||||
Linux, Mac, BSD:
|
||||
|
||||
$ cd tests
|
||||
$ cmake .
|
||||
$ make
|
||||
|
||||
Windows(TM):
|
||||
Windows(TM) under MSYS2:
|
||||
|
||||
Cross-build from within linux:
|
||||
|
||||
64-bit:
|
||||
$ source ./scripts/setenv-mingw-xbuild.sh 64
|
||||
$ ./scripts/release-common.sh mingw64 tests
|
||||
$ # result is .zip file under ./mingw64/
|
||||
|
||||
32-bit:
|
||||
$ source ./scripts/setenv-mingw-xbuild.sh 32
|
||||
$ ./scripts/release-common.sh mingw32 tests
|
||||
$ # result is .zip file under ./mingw32/
|
||||
$ cd tests
|
||||
$ cmake -G "MSYS Makefiles" .
|
||||
$ make
|
||||
|
||||
B) Running tests
|
||||
|
||||
Linux, Mac:
|
||||
|
||||
$ ctest Runs tests enabled by default
|
||||
$ ctest -R <regex> Runs only matching tests, e.g. ctest -R dxf
|
||||
$ ctest -C <configs> Adds extended tests belonging to configs.
|
||||
|
|
@ -55,12 +50,6 @@ $ ctest -C <configs> Adds extended tests belonging to configs.
|
|||
Bugs - test known bugs (tests will fail)
|
||||
All - test everything
|
||||
|
||||
Win:
|
||||
|
||||
Unzip the OpenSCAD-Tests-YYYY.MM.DD file onto a Windows(TM) machine.
|
||||
There will be a script called OpenSCAD-Test-Console.py in the parent folder.
|
||||
Double-click it, and it will open a console, from which you can type the ctest
|
||||
commands listed above.
|
||||
|
||||
C) Automatically upload test results (experimental)
|
||||
|
||||
|
|
@ -97,6 +86,31 @@ This is almost the same as adding a new regression test:
|
|||
4) run the test normally and verify that it passes:
|
||||
$ ctest -C Examples -R exampleNNN
|
||||
|
||||
Building Windows(TM) redistributable:
|
||||
-------------------------------------
|
||||
|
||||
CMake hard-codes paths into ctest files. However by putting our
|
||||
current directory under C:\Program Files\OpenSCAD we can make this
|
||||
work for anyone who wants to download a prebuilt test package, install
|
||||
ctest, and run it, without having a compiler installed.
|
||||
|
||||
1) Install MSYS2
|
||||
2) Install an OpenSCAD package into C:\Program Files\OpenSCAD
|
||||
3) Clone openscad source code into $HOME (~)
|
||||
4) Open an MSYS64 shell prompt As Administrator
|
||||
This is accomplished by right-clicking MSys64 shell
|
||||
Open Folder
|
||||
Right Click Msys64 Shortcut
|
||||
Run as Administrator
|
||||
|
||||
$ cd c:/Program Files/OpenSCAD
|
||||
$ mkdir tests
|
||||
$ cd tests
|
||||
$ cmake -G "MSYS Makefiles" $HOME/openscad
|
||||
$ make
|
||||
|
||||
Users will need to have both Windows Python and Windows Ctest installed.
|
||||
|
||||
Troubleshooting:
|
||||
------------------------------
|
||||
|
||||
|
|
@ -113,7 +127,9 @@ or
|
|||
|
||||
$ xvfb-run ctest
|
||||
|
||||
Some versions of Xvfb may fail, however.
|
||||
It is required that the Xvfb / Xvnc have OpenGL support enabled. For example
|
||||
on some Fedora Linux systems, it is necessary to install the mesa-dri-drivers
|
||||
package as root to get Xvfb to enable OpenGL.
|
||||
|
||||
1. Trouble finding libraries on unix
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ files.
|
|||
$ make clean && qmake && make
|
||||
|
||||
Then run the script to scan the source files, and regenerate .pot & .po files.
|
||||
You'll need itstool (http://itstool.org/) installed.
|
||||
|
||||
$ ./scripts/translation-update.sh
|
||||
|
||||
|
|
|
|||
52
doc/win-cross-build.txt
Normal file
52
doc/win-cross-build.txt
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
OpenSCAD for Windows can be cross-compiled from Linux. In fact that is
|
||||
how the official releases are created.
|
||||
|
||||
To cross-build, first make sure that you have development tools
|
||||
installed to get GCC. You will also need to install pre-requisties for
|
||||
the mxe build system. See the following for more info:
|
||||
|
||||
http://mxe.cc
|
||||
|
||||
Once you have mxe dependencies, clone the openscad git repository.
|
||||
|
||||
Now start a new clean bash shell and run the script that sets up the
|
||||
environment variables. Set the target of your choice as well
|
||||
|
||||
source ./scripts/setenv.sh mxe 32 # 32 bit static link
|
||||
source ./scripts/setenv.sh mxe 64 # 64 bit static link
|
||||
source ./scripts/setenv.sh mxe 32 shared # 32 bit shared dlls link
|
||||
source ./scripts/setenv.sh mxe 64 shared # 64 bit shared dlls link
|
||||
|
||||
Note that to build Shared library versions, you need to first build the
|
||||
static versions. Shared depends on static (mostly due to mpfr).
|
||||
|
||||
Now, make sure you have enough RAM+swap space. At least 2 gigabytes
|
||||
total is recommended (although if you kludge around you can get way with less)
|
||||
|
||||
Now, run the script to download & compile all the prerequisite libraries
|
||||
which are listed in the README.md (cgal, opencsg, qt, etc)
|
||||
|
||||
./scripts/mingw-x-build-dependencies.sh
|
||||
|
||||
Note that this process can take dozens of hours and use tens of gigabytes
|
||||
of diskspace, depending on how many different targets you install
|
||||
and your processor number and speed, your disk system (SSD vs Rotational), etc.
|
||||
It is compiling all of the MXE dependencies from source code. QT, Glib,
|
||||
gcc, binutils, all of it.
|
||||
|
||||
Once MXE is built for your target, you can build and package OpenSCAD into an
|
||||
Windows-style installer and/or .zip archive like so:
|
||||
|
||||
./scripts/release-common.sh
|
||||
|
||||
If you wish you can only build the raw openscad.exe binary. Here are a few
|
||||
examples how to do that.
|
||||
|
||||
mkdir mxe32 && cd mxe32
|
||||
qmake ../openscad.pro CONFIG+=mingw-cross-env
|
||||
make
|
||||
|
||||
mkdir mxe64 && cd mxe64
|
||||
qmake ../openscad.pro CONFIG+=mingw-cross-env-shared
|
||||
make
|
||||
|
||||
60
eigen.pri
60
eigen.pri
|
|
@ -1,60 +0,0 @@
|
|||
# Detect eigen3
|
||||
#
|
||||
# Priority
|
||||
# 0. EIGENDIR if set
|
||||
# 1. OPENSCAD_LIBRARIES eigen3
|
||||
# 3. system's standard include paths for eigen3
|
||||
|
||||
eigen {
|
||||
|
||||
# read environment variables
|
||||
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
|
||||
EIGEN_DIR = $$(EIGENDIR)
|
||||
|
||||
# Optionally specify location of Eigen3 using the
|
||||
# OPENSCAD_LIBRARIES env. variable
|
||||
!isEmpty(OPENSCAD_LIBRARIES_DIR) {
|
||||
isEmpty(EIGEN_INCLUDEPATH) {
|
||||
exists($$OPENSCAD_LIBRARIES_DIR/include/eigen3) {
|
||||
EIGEN_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/eigen3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
!isEmpty(EIGEN_DIR) {
|
||||
EIGEN_INCLUDEPATH = $$EIGEN_DIR
|
||||
message("User set EIGEN location: $$EIGEN_INCLUDEPATH")
|
||||
}
|
||||
|
||||
isEmpty(EIGEN_INCLUDEPATH) {
|
||||
linux*|hurd*|unix: EIGEN_INCLUDEPATH = /usr/include/eigen3
|
||||
freebsd-g++: EIGEN_INCLUDEPATH = /usr/local/include/eigen3
|
||||
netbsd*: EIGEN_INCLUDEPATH = /usr/pkg/include/eigen3
|
||||
macx: EIGEN_INCLUDEPATH = /opt/local/include/eigen3
|
||||
}
|
||||
|
||||
!exists($$EIGEN_INCLUDEPATH/Eigen/Core) {
|
||||
EIGEN_CFLAGS = $$system("pkg-config --cflags eigen3")
|
||||
EIGEN_INCLUDEPATH = $$replace(EIGEN_CFLAGS,"-I","")
|
||||
}
|
||||
|
||||
# disable Eigen SIMD optimizations for platforms where it breaks compilation
|
||||
!macx {
|
||||
!freebsd-g++ {
|
||||
QMAKE_CXXFLAGS += -DEIGEN_DONT_ALIGN
|
||||
}
|
||||
}
|
||||
|
||||
# EIGEN being under 'include/eigen3' needs special prepending
|
||||
contains(QT_VERSION, ^5\\..*) {
|
||||
QMAKE_INCDIR = $$EIGEN_INCLUDEPATH $$QMAKE_INCDIR
|
||||
} else {
|
||||
QMAKE_INCDIR_QT = $$EIGEN_INCLUDEPATH $$QMAKE_INCDIR_QT
|
||||
}
|
||||
|
||||
# qmakespecs on netbsd prepend system includes, we need eigen first.
|
||||
netbsd* {
|
||||
QMAKE_CXXFLAGS = -I$$EIGEN_INCLUDEPATH $$QMAKE_CXXFLAGS
|
||||
}
|
||||
|
||||
} # eigen
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
echo(version=version());
|
||||
|
||||
// rotate_extrude() always rotates the 2D shape 360 degrees
|
||||
// around the Z axis. Note that the 2D shape must be either
|
||||
// completely on the positive or negative side of the X axis.
|
||||
// rotate_extrude() rotates a 2D shape around the Z axis.
|
||||
// Note that the 2D shape must be either completely on the
|
||||
// positive or negative side of the X axis.
|
||||
color("red")
|
||||
rotate_extrude()
|
||||
translate([10, 0])
|
||||
|
|
@ -23,6 +23,26 @@ color("green")
|
|||
polygon( points=[[0,0],[8,4],[4,8],[4,12],[12,16],[0,20]] );
|
||||
|
||||
|
||||
// By default rotate_extrude forms a full 360 degree circle,
|
||||
// but a partial rotation can be performed by using the angle parameter.
|
||||
// Positive angles create an arc starting from the X axis, going counter-clockwise.
|
||||
// Negative angles generate an arc in the clockwise direction.
|
||||
color("magenta")
|
||||
translate([40,40]){
|
||||
rotate_extrude(angle=180)
|
||||
translate([12.5,0])
|
||||
square(5);
|
||||
translate([7.5,0])
|
||||
rotate_extrude(angle=180)
|
||||
translate([5,0])
|
||||
square(5);
|
||||
translate([-7.5,0])
|
||||
rotate_extrude(angle=-180)
|
||||
translate([5,0])
|
||||
square(5);
|
||||
}
|
||||
|
||||
|
||||
// Written in 2015 by Torsten Paul <Torsten.Paul@gmx.de>
|
||||
//
|
||||
// To the extent possible under law, the author(s) have dedicated all
|
||||
|
|
|
|||
|
|
@ -11,11 +11,13 @@ y_shift=thisFont[0][1];
|
|||
hours=["one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"];
|
||||
|
||||
module clock_hour_words(word_offset=20.0,word_height=2.0) {
|
||||
for(i=[0:(len(hours)-1)]) assign( hourHandAngle=(i+1)*360/len(hours), theseIndicies=search(hours[i],thisFont[2],1,1) ) {
|
||||
for(i=[0:(len(hours)-1)]) {
|
||||
hourHandAngle=(i+1)*360/len(hours);
|
||||
theseIndicies=search(hours[i],thisFont[2],1,1);
|
||||
rotate(90-hourHandAngle) translate([word_offset,0])
|
||||
for( j=[0:(len(theseIndicies)-1)] ) translate([j*x_shift,-y_shift/2]) {
|
||||
linear_extrude(height=word_height) polygon(points=thisFont[2][theseIndicies[j]][6][0],paths=thisFont[2][theseIndicies[j]][6][1]);
|
||||
}
|
||||
for( j=[0:(len(theseIndicies)-1)] ) translate([j*x_shift,-y_shift/2]) {
|
||||
linear_extrude(height=word_height) polygon(points=thisFont[2][theseIndicies[j]][6][0],paths=thisFont[2][theseIndicies[j]][6][1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
25
flex.pri
25
flex.pri
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
flex.name = Flex ${QMAKE_FILE_IN}
|
||||
flex.input = FLEXSOURCES
|
||||
flex.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.lexer.cpp
|
||||
flex.commands = flex -P ${QMAKE_FILE_BASE} -o${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.lexer.cpp ${QMAKE_FILE_IN}
|
||||
flex.CONFIG += target_predeps
|
||||
flex.variable_out = GENERATED_SOURCES
|
||||
silent:flex.commands = @echo Lex ${QMAKE_FILE_IN} && $$flex.commands
|
||||
QMAKE_EXTRA_COMPILERS += flex
|
||||
}
|
||||
|
||||
unix:linux* {
|
||||
exists(/usr/bin/flex) {
|
||||
QMAKE_LEX = /usr/bin/flex
|
||||
}
|
||||
}
|
||||
|
||||
freebsd* {
|
||||
QMAKE_LEX = /usr/local/bin/flex
|
||||
}
|
||||
|
||||
netbsd* {
|
||||
QMAKE_LEX = /usr/pkg/bin/flex
|
||||
}
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
# Detect fontconfig, then use this priority list to determine
|
||||
# which library to use:
|
||||
#
|
||||
# Priority
|
||||
# 1. FONTCONFIG_INCLUDEPATH / FONTCONFIG_LIBPATH (qmake parameter, not checked it given on commandline)
|
||||
# 2. OPENSCAD_LIBRARIES (environment variable)
|
||||
# 3. system's standard include paths from pkg-config
|
||||
|
||||
fontconfig {
|
||||
|
||||
# read environment variables
|
||||
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
|
||||
FONTCONFIG_DIR = $$(FONTCONFIGDIR)
|
||||
|
||||
!isEmpty(OPENSCAD_LIBRARIES_DIR) {
|
||||
isEmpty(FONTCONFIG_INCLUDEPATH) {
|
||||
FONTCONFIG_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/fontconfig
|
||||
FONTCONFIG_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib
|
||||
}
|
||||
}
|
||||
|
||||
isEmpty(FONTCONFIG_INCLUDEPATH) {
|
||||
FONTCONFIG_CFLAGS = $$system("pkg-config --cflags fontconfig")
|
||||
} else {
|
||||
FONTCONFIG_CFLAGS = -I$$FONTCONFIG_INCLUDEPATH
|
||||
}
|
||||
|
||||
isEmpty(FONTCONFIG_LIBPATH) {
|
||||
FONTCONFIG_LIBS = $$system("pkg-config --libs fontconfig")
|
||||
} else {
|
||||
FONTCONFIG_LIBS = -L$$FONTCONFIG_LIBPATH -lfontconfig
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS += $$FONTCONFIG_CFLAGS
|
||||
LIBS += $$FONTCONFIG_LIBS
|
||||
}
|
||||
38
freetype.pri
38
freetype.pri
|
|
@ -1,38 +0,0 @@
|
|||
# Detect freetype2, then use this priority list to determine
|
||||
# which library to use:
|
||||
#
|
||||
# Priority
|
||||
# 1. FREETYPE_INCLUDEPATH / FREETYPE_LIBPATH (qmake parameter, not checked it given on commandline)
|
||||
# 2. OPENSCAD_LIBRARIES (environment variable)
|
||||
# 3. system's standard include paths from pkg-config
|
||||
|
||||
freetype {
|
||||
|
||||
# read environment variables
|
||||
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
|
||||
FREETYPE_DIR = $$(FREETYPEDIR)
|
||||
|
||||
!isEmpty(OPENSCAD_LIBRARIES_DIR) {
|
||||
isEmpty(FREETYPE_INCLUDEPATH) {
|
||||
exists($$OPENSCAD_LIBRARIES_DIR/include/freetype2) {
|
||||
FREETYPE_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/freetype2
|
||||
FREETYPE_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
isEmpty(FREETYPE_INCLUDEPATH) {
|
||||
FREETYPE_CFLAGS = $$system("pkg-config --cflags freetype2")
|
||||
} else {
|
||||
FREETYPE_CFLAGS = -I$$FREETYPE_INCLUDEPATH
|
||||
}
|
||||
|
||||
isEmpty(FREETYPE_LIBPATH) {
|
||||
FREETYPE_LIBS = $$system("pkg-config --libs freetype2")
|
||||
} else {
|
||||
FREETYPE_LIBS = -L$$FREETYPE_LIBPATH -lfreetype
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS += $$FREETYPE_CFLAGS
|
||||
LIBS += $$FREETYPE_LIBS
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ gettext {
|
|||
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
|
||||
GETTEXT_DIR = $$(GETTEXTDIR)
|
||||
|
||||
macx: {
|
||||
macx|freebsd*: {
|
||||
isEmpty(GETTEXT_INCLUDEPATH) {
|
||||
!isEmpty(OPENSCAD_LIBRARIES_DIR) {
|
||||
GETTEXT_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include
|
||||
|
|
|
|||
17
glew.pri
17
glew.pri
|
|
@ -1,17 +0,0 @@
|
|||
glew {
|
||||
# Optionally specify location of GLEW using the
|
||||
# GLEWDIR env. variable
|
||||
GLEW_DIR = $$(GLEWDIR)
|
||||
!isEmpty(GLEW_DIR) {
|
||||
QMAKE_INCDIR += $$GLEW_DIR/include
|
||||
QMAKE_LIBDIR += $$GLEW_DIR/lib
|
||||
QMAKE_LIBDIR += $$GLEW_DIR/lib64
|
||||
}
|
||||
|
||||
unix:LIBS += -lGLEW
|
||||
CONFIG(mingw-cross-env): {
|
||||
DEFINES += GLEW_STATIC
|
||||
} else {
|
||||
win32:LIBS += -lglew32
|
||||
}
|
||||
}
|
||||
66
glib-2.0.pri
66
glib-2.0.pri
|
|
@ -1,66 +0,0 @@
|
|||
# Detect glib-2.0, then use this priority list to determine
|
||||
# which library to use:
|
||||
#
|
||||
# Priority
|
||||
# 1. GLIB2_INCLUDEPATH / GLIB2_LIBPATH (qmake parameter, not checked it given on commandline)
|
||||
# 2. OPENSCAD_LIBRARIES (environment variable)
|
||||
# 3. system's standard include paths from pkg-config
|
||||
|
||||
glib-2.0 {
|
||||
# read environment variables
|
||||
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
|
||||
GLIB2_DIR = $$(GLIB2DIR)
|
||||
|
||||
!isEmpty(OPENSCAD_LIBRARIES_DIR) {
|
||||
isEmpty(GLIB2_INCLUDEPATH) {
|
||||
GLIB2_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/glib-2.0
|
||||
GLIB2_INCLUDEPATH_2 = $$OPENSCAD_LIBRARIES_DIR/lib/glib-2.0/include
|
||||
GLIB2_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib
|
||||
}
|
||||
}
|
||||
|
||||
!exists($$GLIB2_INCLUDEPATH/glib.h) {
|
||||
!exists($$GLIB2_INCLUDEPATH_2/glib.h) {
|
||||
GLIB2_INCLUDEPATH =
|
||||
GLIB2_INCLUDEPATH_2 =
|
||||
GLIB2_LIBPATH =
|
||||
}
|
||||
}
|
||||
|
||||
isEmpty(GLIB2_INCLUDEPATH) {
|
||||
GLIB2_CFLAGS = $$system("pkg-config --cflags glib-2.0")
|
||||
} else {
|
||||
GLIB2_CFLAGS = -I$$GLIB2_INCLUDEPATH
|
||||
GLIB2_CFLAGS += -I$$GLIB2_INCLUDEPATH_2
|
||||
}
|
||||
|
||||
isEmpty(GLIB2_LIBPATH) {
|
||||
GLIB2_LIBS = $$system("pkg-config --libs glib-2.0")
|
||||
} else {
|
||||
GLIB2_LIBS = -L$$GLIB2_LIBPATH -lglib-2.0
|
||||
}
|
||||
|
||||
CONFIG(mingw-cross-env) {
|
||||
#message("mingw")
|
||||
isEmpty(GLIB2_INCLUDEPATH) {
|
||||
MXE_TARGET_DIR=$$(MXETARGETDIR)
|
||||
#message($$MXE_TARGET_DIR)
|
||||
contains( MXE_TARGET_DIR, .*x86_64-w64-mingw32 ) {
|
||||
GLIB2_CFLAGS = $$system("x86_64-w64-mingw32-pkg-config --cflags glib-2.0")
|
||||
GLIB2_LIBS = $$system("x86_64-w64-mingw32-pkg-config --libs glib-2.0")
|
||||
}
|
||||
contains( MXE_TARGET_DIR, .*i686-w64-mingw32 ) {
|
||||
GLIB2_CFLAGS = $$system("i686-w64-mingw32-pkg-config --cflags glib-2.0")
|
||||
GLIB2_LIBS = $$system("i686-w64-mingw32-pkg-config --libs glib-2.0")
|
||||
}
|
||||
contains( MXE_TARGET_DIR, .*i686-pc-mingw32 ) {
|
||||
GLIB2_CFLAGS = $$system("i686-pc-mingw32-pkg-config --cflags glib-2.0")
|
||||
GLIB2_LIBS = $$system("i686-pc-mingw32-pkg-config --libs glib-2.0")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS += $$GLIB2_CFLAGS
|
||||
LIBS += $$GLIB2_LIBS
|
||||
}
|
||||
|
||||
38
harfbuzz.pri
38
harfbuzz.pri
|
|
@ -1,38 +0,0 @@
|
|||
# Detect harfbuzz, then use this priority list to determine
|
||||
# which library to use:
|
||||
#
|
||||
# Priority
|
||||
# 1. HARFBUZZ_INCLUDEPATH / HARFBUZZ_LIBPATH (qmake parameter, not checked it given on commandline)
|
||||
# 2. OPENSCAD_LIBRARIES (environment variable)
|
||||
# 3. system's standard include paths from pkg-config
|
||||
|
||||
harfbuzz {
|
||||
|
||||
# read environment variables
|
||||
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
|
||||
HARFBUZZ_DIR = $$(HARFBUZZDIR)
|
||||
|
||||
!isEmpty(OPENSCAD_LIBRARIES_DIR) {
|
||||
isEmpty(HARFBUZZ_INCLUDEPATH) {
|
||||
exists($$OPENSCAD_LIBRARIES_DIR/include/harfbuzz) {
|
||||
HARFBUZZ_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/harfbuzz
|
||||
HARFBUZZ_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
isEmpty(HARFBUZZ_INCLUDEPATH) {
|
||||
HARFBUZZ_CFLAGS = $$system("pkg-config --cflags harfbuzz")
|
||||
} else {
|
||||
HARFBUZZ_CFLAGS = -I$$HARFBUZZ_INCLUDEPATH
|
||||
}
|
||||
|
||||
isEmpty(HARFBUZZ_LIBPATH) {
|
||||
HARFBUZZ_LIBS = $$system("pkg-config --libs harfbuzz")
|
||||
} else {
|
||||
HARFBUZZ_LIBS = -L$$HARFBUZZ_LIBPATH -lharfbuzz
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS += $$HARFBUZZ_CFLAGS
|
||||
LIBS += $$HARFBUZZ_LIBS
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 979 B |
Binary file not shown.
|
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 991 B |
|
|
@ -1,2 +1,2 @@
|
|||
# available languages
|
||||
fr ru de cs es
|
||||
fr ru de cs es pl
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ msgstr ""
|
|||
|
||||
#: objects/ui_AboutDialog.h:103 src/AboutDialog.h:13
|
||||
msgid "About OpenSCAD"
|
||||
msgstr "O OpenSCADu"
|
||||
msgstr "O aplikaci OpenSCAD"
|
||||
|
||||
#: objects/ui_AboutDialog.h:105 objects/ui_launchingscreen.h:305
|
||||
msgid ""
|
||||
|
|
|
|||
158
locale/es.po
158
locale/es.po
|
|
@ -1,20 +1,20 @@
|
|||
# Spanish translations for OpenSCAD package.
|
||||
# This file is distributed under the same license as the OpenSCAD package.
|
||||
# bazza <bazza@riseup.net>, 2015.
|
||||
# <javialamo+github@gmail.com>, 2016.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenSCAD 2015.03\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-03-10 10:38-0400\n"
|
||||
"PO-Revision-Date: 2015-03-10 05:21-0300\n"
|
||||
"Last-Translator: Ernesto Bazzano <bazza@riseup.net>\n"
|
||||
"PO-Revision-Date: 2016-04-13 01:56-0300\n"
|
||||
"Last-Translator: Javier del Álamo <javialamo+github@gmail.com>\n"
|
||||
"Language-Team: Español\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
|
||||
|
||||
#: objects/ui_AboutDialog.h:103 src/AboutDialog.h:13
|
||||
msgid "About OpenSCAD"
|
||||
|
|
@ -39,7 +39,7 @@ msgstr ""
|
|||
"style=\"color: green;\">Open</span>SCAD</p>\n"
|
||||
"<p style=\"font-family: 'Open Sans', 'Droid Sans', 'sans-serif'; font-"
|
||||
"weight: normal; font-size: 14pt; padding-top: 0; margin-top: 0; margin-left: "
|
||||
"2em;\">Los programadores de modelado 3D CAD</p>\n"
|
||||
"2em;\">El programa de modelado 3D CAD de los programadores</p>\n"
|
||||
"</body></html>\n"
|
||||
"\n"
|
||||
"\n"
|
||||
|
|
@ -88,11 +88,11 @@ msgstr ""
|
|||
|
||||
#: objects/ui_LibraryInfoDialog.h:75
|
||||
msgid "Lib & Build Info"
|
||||
msgstr "Informacion de las librerias y compilación"
|
||||
msgstr "Información de las librerias y compilación"
|
||||
|
||||
#: objects/ui_LibraryInfoDialog.h:76
|
||||
msgid "OpenSCAD Detailed Library and Build Information"
|
||||
msgstr "Informations detalles de las librerias y compilación"
|
||||
msgstr "Información detallada de las librerias y compilación"
|
||||
|
||||
#: objects/ui_MainWindow.h:837
|
||||
msgid "&New"
|
||||
|
|
@ -112,7 +112,7 @@ msgstr "Ctrl+O"
|
|||
|
||||
#: objects/ui_MainWindow.h:841
|
||||
msgid "&Save"
|
||||
msgstr "&Salvar"
|
||||
msgstr "&Guardar"
|
||||
|
||||
#: objects/ui_MainWindow.h:842
|
||||
msgid "Ctrl+S"
|
||||
|
|
@ -120,7 +120,7 @@ msgstr "Ctrl+S"
|
|||
|
||||
#: objects/ui_MainWindow.h:843
|
||||
msgid "Save &As..."
|
||||
msgstr "S&alvar como..."
|
||||
msgstr "Guardar &como..."
|
||||
|
||||
#: objects/ui_MainWindow.h:844
|
||||
msgid "Ctrl+Shift+S"
|
||||
|
|
@ -136,7 +136,7 @@ msgstr "Ctrl+R"
|
|||
|
||||
#: objects/ui_MainWindow.h:847
|
||||
msgid "&Quit"
|
||||
msgstr "Salir"
|
||||
msgstr "&Salir"
|
||||
|
||||
#: objects/ui_MainWindow.h:848
|
||||
msgid "Ctrl+Q"
|
||||
|
|
@ -144,7 +144,7 @@ msgstr "Ctrl+Q"
|
|||
|
||||
#: objects/ui_MainWindow.h:849
|
||||
msgid "&Undo"
|
||||
msgstr "An&ular"
|
||||
msgstr "&Deshacer"
|
||||
|
||||
#: objects/ui_MainWindow.h:850
|
||||
msgid "Ctrl+Z"
|
||||
|
|
@ -184,7 +184,7 @@ msgstr "Ctrl+V"
|
|||
|
||||
#: objects/ui_MainWindow.h:859
|
||||
msgid "&Indent"
|
||||
msgstr "&Indenter"
|
||||
msgstr "&Indentar"
|
||||
|
||||
#: objects/ui_MainWindow.h:860
|
||||
msgid "Ctrl+I"
|
||||
|
|
@ -209,7 +209,7 @@ msgstr "Ctrl+Shift+D"
|
|||
#: objects/ui_MainWindow.h:865
|
||||
#, fuzzy
|
||||
msgid "P&aste viewport translation"
|
||||
msgstr "Pegar posición de la marco"
|
||||
msgstr "Pegar traslación de la ventana"
|
||||
|
||||
#: objects/ui_MainWindow.h:866
|
||||
msgid "Ctrl+T"
|
||||
|
|
@ -222,7 +222,7 @@ msgstr "Pegar rotación de la ventana"
|
|||
|
||||
#: objects/ui_MainWindow.h:868
|
||||
msgid "Increase Font &Size"
|
||||
msgstr ""
|
||||
msgstr "Aumentar el tamaño de la &fuente"
|
||||
|
||||
#: objects/ui_MainWindow.h:869
|
||||
msgid "Ctrl++"
|
||||
|
|
@ -230,7 +230,7 @@ msgstr "Ctrl++"
|
|||
|
||||
#: objects/ui_MainWindow.h:870
|
||||
msgid "Decrease Font Si&ze"
|
||||
msgstr ""
|
||||
msgstr "Disminuir el tamaño de la &fuente"
|
||||
|
||||
#: objects/ui_MainWindow.h:871
|
||||
msgid "Ctrl+-"
|
||||
|
|
@ -269,7 +269,7 @@ msgstr "F6"
|
|||
#: objects/ui_MainWindow.h:879
|
||||
#, fuzzy
|
||||
msgid "&Check Validity"
|
||||
msgstr "Chequear validez"
|
||||
msgstr "&Comprobar validez"
|
||||
|
||||
#: objects/ui_MainWindow.h:880
|
||||
#, fuzzy
|
||||
|
|
@ -278,12 +278,12 @@ msgstr "Mostrar &AST..."
|
|||
|
||||
#: objects/ui_MainWindow.h:881
|
||||
msgid "Display CSG &Tree..."
|
||||
msgstr "Mostrar CSG &Arbre"
|
||||
msgstr "Mostrar &Arbol CSG"
|
||||
|
||||
#: objects/ui_MainWindow.h:882
|
||||
#, fuzzy
|
||||
msgid "Display CSG Pr&oducts..."
|
||||
msgstr "Mostar CSG &Produits"
|
||||
msgstr "Mostar Pr&oductos CSG"
|
||||
|
||||
#: objects/ui_MainWindow.h:883
|
||||
msgid "Export as &STL..."
|
||||
|
|
@ -303,7 +303,7 @@ msgstr "F9"
|
|||
|
||||
#: objects/ui_MainWindow.h:887
|
||||
msgid "Surfaces"
|
||||
msgstr "Superficie"
|
||||
msgstr "Superficies"
|
||||
|
||||
#: objects/ui_MainWindow.h:888
|
||||
msgid "F10"
|
||||
|
|
@ -327,7 +327,7 @@ msgstr "F12"
|
|||
|
||||
#: objects/ui_MainWindow.h:893
|
||||
msgid "Show Edges"
|
||||
msgstr "Mostrar puntos"
|
||||
msgstr "Mostrar bordes"
|
||||
|
||||
#: objects/ui_MainWindow.h:894
|
||||
msgid "Ctrl+1"
|
||||
|
|
@ -351,7 +351,7 @@ msgstr "Ctrl+3"
|
|||
|
||||
#: objects/ui_MainWindow.h:899
|
||||
msgid "Show Scale Markers"
|
||||
msgstr "Mostar escala"
|
||||
msgstr "Mostar indicadores de escala"
|
||||
|
||||
#: objects/ui_MainWindow.h:900
|
||||
msgid "Animate"
|
||||
|
|
@ -359,7 +359,7 @@ msgstr "Animar"
|
|||
|
||||
#: objects/ui_MainWindow.h:901
|
||||
msgid "&Top"
|
||||
msgstr ""
|
||||
msgstr "&Arriba"
|
||||
|
||||
#: objects/ui_MainWindow.h:902
|
||||
msgid "Ctrl+4"
|
||||
|
|
@ -368,7 +368,7 @@ msgstr "Ctrl+4"
|
|||
#: objects/ui_MainWindow.h:903
|
||||
#, fuzzy
|
||||
msgid "&Bottom"
|
||||
msgstr "Abajo"
|
||||
msgstr "&Abajo"
|
||||
|
||||
#: objects/ui_MainWindow.h:904
|
||||
msgid "Ctrl+5"
|
||||
|
|
@ -377,7 +377,7 @@ msgstr "Ctrl+5"
|
|||
#: objects/ui_MainWindow.h:905
|
||||
#, fuzzy
|
||||
msgid "&Left"
|
||||
msgstr "Izquierda"
|
||||
msgstr "&Izquierda"
|
||||
|
||||
#: objects/ui_MainWindow.h:906
|
||||
msgid "Ctrl+6"
|
||||
|
|
@ -386,7 +386,7 @@ msgstr "Ctrl+6"
|
|||
#: objects/ui_MainWindow.h:907
|
||||
#, fuzzy
|
||||
msgid "&Right"
|
||||
msgstr "Derecha"
|
||||
msgstr "&Derecha"
|
||||
|
||||
#: objects/ui_MainWindow.h:908
|
||||
msgid "Ctrl+7"
|
||||
|
|
@ -395,7 +395,7 @@ msgstr "Ctrl+7"
|
|||
#: objects/ui_MainWindow.h:909
|
||||
#, fuzzy
|
||||
msgid "&Front"
|
||||
msgstr "Frente"
|
||||
msgstr "&Delante"
|
||||
|
||||
#: objects/ui_MainWindow.h:910
|
||||
msgid "Ctrl+8"
|
||||
|
|
@ -403,7 +403,7 @@ msgstr "Ctrl+8"
|
|||
|
||||
#: objects/ui_MainWindow.h:911
|
||||
msgid "Bac&k"
|
||||
msgstr ""
|
||||
msgstr "&Detrás"
|
||||
|
||||
#: objects/ui_MainWindow.h:912
|
||||
msgid "Ctrl+9"
|
||||
|
|
@ -412,7 +412,7 @@ msgstr "Ctrl+9"
|
|||
#: objects/ui_MainWindow.h:913
|
||||
#, fuzzy
|
||||
msgid "&Diagonal"
|
||||
msgstr "Diagonal"
|
||||
msgstr "&Diagonal"
|
||||
|
||||
#: objects/ui_MainWindow.h:914
|
||||
msgid "Ctrl+0"
|
||||
|
|
@ -426,12 +426,12 @@ msgstr "Centro"
|
|||
#: objects/ui_MainWindow.h:916
|
||||
#, fuzzy
|
||||
msgid "&Perspective"
|
||||
msgstr "Perspectiva"
|
||||
msgstr "&Perspectiva"
|
||||
|
||||
#: objects/ui_MainWindow.h:917
|
||||
#, fuzzy
|
||||
msgid "&Orthogonal"
|
||||
msgstr "Orthogonal"
|
||||
msgstr "Ortogonal"
|
||||
|
||||
#: objects/ui_MainWindow.h:918
|
||||
#, fuzzy
|
||||
|
|
@ -492,7 +492,7 @@ msgstr "Ctrl+Alt+F"
|
|||
#: objects/ui_MainWindow.h:930
|
||||
#, fuzzy
|
||||
msgid "Find Ne&xt"
|
||||
msgstr "Buscar próximo"
|
||||
msgstr "Buscar siguiente"
|
||||
|
||||
#: objects/ui_MainWindow.h:931
|
||||
msgid "Ctrl+G"
|
||||
|
|
@ -501,7 +501,7 @@ msgstr "Ctrl+G"
|
|||
#: objects/ui_MainWindow.h:932
|
||||
#, fuzzy
|
||||
msgid "Find Pre&vious"
|
||||
msgstr "Buscar previo"
|
||||
msgstr "Buscar anterior"
|
||||
|
||||
#: objects/ui_MainWindow.h:933
|
||||
msgid "Ctrl+Shift+G"
|
||||
|
|
@ -534,7 +534,7 @@ msgstr "Recargar y previsualizar automáticamente"
|
|||
#: objects/ui_MainWindow.h:939
|
||||
#, fuzzy
|
||||
msgid "Export as &Image..."
|
||||
msgstr "Exportar imagen..."
|
||||
msgstr "Exportar como imagen..."
|
||||
|
||||
#: objects/ui_MainWindow.h:940
|
||||
#, fuzzy
|
||||
|
|
@ -601,7 +601,7 @@ msgstr "Ocultar barra de herramientas"
|
|||
|
||||
#: objects/ui_MainWindow.h:954
|
||||
msgid "U&nindent"
|
||||
msgstr "Dési&ndenter"
|
||||
msgstr "Desindentar"
|
||||
|
||||
#: objects/ui_MainWindow.h:955
|
||||
msgid "Ctrl+Shift+I"
|
||||
|
|
@ -609,7 +609,7 @@ msgstr "Ctrl+Shift+I"
|
|||
|
||||
#: objects/ui_MainWindow.h:956
|
||||
msgid "&Cheat Sheet"
|
||||
msgstr ""
|
||||
msgstr "Hoja de referencia"
|
||||
|
||||
#: objects/ui_MainWindow.h:957
|
||||
msgid "Message"
|
||||
|
|
@ -748,7 +748,7 @@ msgstr "Vista 3D"
|
|||
|
||||
#: objects/ui_Preferences.h:1064 examples/examples.json:19
|
||||
msgid "Advanced"
|
||||
msgstr "Advertencia"
|
||||
msgstr "Avanzado"
|
||||
|
||||
#: objects/ui_Preferences.h:1065 src/mainwin.cc:2422
|
||||
msgid "Editor"
|
||||
|
|
@ -760,11 +760,11 @@ msgstr "Actualizar"
|
|||
|
||||
#: objects/ui_Preferences.h:1067 objects/ui_Preferences.h:1148
|
||||
msgid "Features"
|
||||
msgstr "Mejoras"
|
||||
msgstr "Características"
|
||||
|
||||
#: objects/ui_Preferences.h:1069
|
||||
msgid "Enable/Disable experimental features"
|
||||
msgstr "Activar/Desactivar mejoras experimentales"
|
||||
msgstr "Activar/Desactivar características experimentales"
|
||||
|
||||
#: objects/ui_Preferences.h:1071
|
||||
msgid "Color scheme:"
|
||||
|
|
@ -772,7 +772,7 @@ msgstr "Paleta de colores:"
|
|||
|
||||
#: objects/ui_Preferences.h:1072
|
||||
msgid "Show Warnings and Errors in 3D View"
|
||||
msgstr ""
|
||||
msgstr "Mostrar errores y advertencias en la vista 3D"
|
||||
|
||||
#: objects/ui_Preferences.h:1073
|
||||
msgid "Editor Type"
|
||||
|
|
@ -800,19 +800,19 @@ msgstr "Colorear sintaxis"
|
|||
|
||||
#: objects/ui_Preferences.h:1082
|
||||
msgid "Ctrl/Cmd-Mouse-wheel zooms text"
|
||||
msgstr "ctrl/cmd + la rueda del mouse para hacer zoom al texto"
|
||||
msgstr "Ctrl/Cmd + la rueda del mouse para hacer zoom al texto"
|
||||
|
||||
#: objects/ui_Preferences.h:1083
|
||||
msgid "Indentation"
|
||||
msgstr "Identificación"
|
||||
msgstr "Indentación"
|
||||
|
||||
#: objects/ui_Preferences.h:1084
|
||||
msgid "Auto Indent"
|
||||
msgstr "sangría automática"
|
||||
msgstr "Sangría automática"
|
||||
|
||||
#: objects/ui_Preferences.h:1085
|
||||
msgid "Indent using"
|
||||
msgstr "usar sangría"
|
||||
msgstr "Indentar usando"
|
||||
|
||||
#: objects/ui_Preferences.h:1088 src/settings.cc:135
|
||||
msgid "Spaces"
|
||||
|
|
@ -824,7 +824,7 @@ msgstr "Pestañas"
|
|||
|
||||
#: objects/ui_Preferences.h:1091
|
||||
msgid "Indentation width"
|
||||
msgstr "Ancho de sangría"
|
||||
msgstr "Ancho de indentado"
|
||||
|
||||
#: objects/ui_Preferences.h:1092
|
||||
msgid "Tab width"
|
||||
|
|
@ -837,7 +837,7 @@ msgstr "Atajo de pestaña"
|
|||
#: objects/ui_Preferences.h:1096 objects/ui_Preferences.h:1126
|
||||
#: src/settings.cc:136
|
||||
msgid "Indent"
|
||||
msgstr "Sangría"
|
||||
msgstr "Indentar"
|
||||
|
||||
#: objects/ui_Preferences.h:1097 src/settings.cc:136
|
||||
msgid "Insert Tab"
|
||||
|
|
@ -857,7 +857,7 @@ msgstr "Siempre"
|
|||
|
||||
#: objects/ui_Preferences.h:1104
|
||||
msgid "Only after indentation"
|
||||
msgstr "Sólo después de la sandría"
|
||||
msgstr "Sólo después de la indentación"
|
||||
|
||||
#: objects/ui_Preferences.h:1106
|
||||
msgid "Size"
|
||||
|
|
@ -877,7 +877,7 @@ msgstr "Marcar linea actual"
|
|||
|
||||
#: objects/ui_Preferences.h:1110 objects/ui_Preferences.h:1143
|
||||
msgid "Line wrap"
|
||||
msgstr "Quiebre de linea"
|
||||
msgstr "Ajuste de linea"
|
||||
|
||||
#: objects/ui_Preferences.h:1113 objects/ui_Preferences.h:1130
|
||||
#: objects/ui_Preferences.h:1138 src/settings.cc:127 src/settings.cc:130
|
||||
|
|
@ -895,11 +895,11 @@ msgstr "Salta en límites de las palabras"
|
|||
|
||||
#: objects/ui_Preferences.h:1117
|
||||
msgid "Line wrap indentation"
|
||||
msgstr "Salto de línea en el sangrado"
|
||||
msgstr "Ajuste de línea en el sangrado"
|
||||
|
||||
#: objects/ui_Preferences.h:1118
|
||||
msgid "Line wrap visualization"
|
||||
msgstr "Salto de línea visible"
|
||||
msgstr "Visualización del ajuste de línea"
|
||||
|
||||
#: objects/ui_Preferences.h:1119
|
||||
msgid "Style"
|
||||
|
|
@ -942,7 +942,7 @@ msgstr "Final"
|
|||
|
||||
#: objects/ui_Preferences.h:1144
|
||||
msgid "Automatically check for updates"
|
||||
msgstr "Comprobar actualización automáticamente"
|
||||
msgstr "Comprobar actualizaciones automáticamente"
|
||||
|
||||
#: objects/ui_Preferences.h:1145
|
||||
msgid "Include development snapshots"
|
||||
|
|
@ -950,11 +950,11 @@ msgstr "Incluir las versiones en desarrollo"
|
|||
|
||||
#: objects/ui_Preferences.h:1146
|
||||
msgid "Check Now"
|
||||
msgstr "Chequear ahora"
|
||||
msgstr "Comprobar ahora"
|
||||
|
||||
#: objects/ui_Preferences.h:1147
|
||||
msgid "Last checked: "
|
||||
msgstr "Último chequeo:"
|
||||
msgstr "Último Comprobado:"
|
||||
|
||||
#: objects/ui_Preferences.h:1149
|
||||
msgid "OpenCSG"
|
||||
|
|
@ -962,7 +962,7 @@ msgstr "OpenCSG"
|
|||
|
||||
#: objects/ui_Preferences.h:1150
|
||||
msgid "Show capability warning"
|
||||
msgstr "Advertir incapacidad"
|
||||
msgstr "Mostrar advertencias de capacidad"
|
||||
|
||||
#: objects/ui_Preferences.h:1151
|
||||
msgid "Enable for OpenGL 1.x"
|
||||
|
|
@ -994,7 +994,7 @@ msgstr "Tamaño de cache de PolySet"
|
|||
|
||||
#: objects/ui_Preferences.h:1159
|
||||
msgid "Allow opening multiple documents"
|
||||
msgstr "Permitir a abrir varios documentos"
|
||||
msgstr "Permitir abrir varios documentos"
|
||||
|
||||
#: objects/ui_Preferences.h:1160
|
||||
msgid "Enable docking of Editor and Console in different places"
|
||||
|
|
@ -1002,17 +1002,15 @@ msgstr "Habilitar soporte de editor y consola en diferentes lugares"
|
|||
|
||||
#: objects/ui_Preferences.h:1161
|
||||
msgid "Enable undocking of Editor and Console to separate windows"
|
||||
msgstr ""
|
||||
"Habilitar el desacoplamiento de editor y consola para separar las ventanas"
|
||||
msgstr "Habilitar el desacoplamiento de editor y consola para separar las ventanas"
|
||||
|
||||
#: objects/ui_Preferences.h:1162
|
||||
msgid "Show Welcome Screen"
|
||||
msgstr "Pantalla de bienvenida"
|
||||
msgstr "Mostrar pantalla de bienvenida"
|
||||
|
||||
#: objects/ui_Preferences.h:1163
|
||||
msgid "Enable user interface localization (requires restart of OpenSCAD)"
|
||||
msgstr ""
|
||||
"Habilitar interfaz de usuario localización (requiere reiniciar OpenSCAD)"
|
||||
msgstr "Habilitar localización de la interfaz de usuario (requiere reiniciar OpenSCAD)"
|
||||
|
||||
#: objects/ui_ProgressWidget.h:72
|
||||
msgid "%v / %m"
|
||||
|
|
@ -1064,7 +1062,7 @@ msgid ""
|
|||
"Viewport: translate = [ %.2f %.2f %.2f ], rotate = [ %.2f %.2f %.2f ], "
|
||||
"distance = %.2f"
|
||||
msgstr ""
|
||||
"Marco: translado = [ %.2f %.2f %.2f ], rotación = [ %.2f %.2f %.2f ], "
|
||||
"Ventana: traslación = [ %.2f %.2f %.2f ], rotación = [ %.2f %.2f %.2f ], "
|
||||
"distancia = %.2f"
|
||||
|
||||
#: src/QGLView.cc:129
|
||||
|
|
@ -1072,7 +1070,7 @@ msgid ""
|
|||
"Warning: You may experience OpenCSG rendering errors.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Advertencia: Usted puede experimentar OpenCSG errores de renderizado.\n"
|
||||
"Advertencia: Usted puede experimentar errores de renderizado de OpenCSG.\n"
|
||||
"\n"
|
||||
|
||||
#: src/QGLView.cc:132
|
||||
|
|
@ -1081,8 +1079,8 @@ msgid ""
|
|||
"disabled.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Advertencia: Manquantes capacités OpenGL vierten OpenCSG - OpenCSG ha sido "
|
||||
"desactivada. .\n"
|
||||
"Advertencia:Perdidas las capacidades OpenGL para OpenCSG - OpenCSG ha sido "
|
||||
"desactivado. .\n"
|
||||
"\n"
|
||||
|
||||
#: src/QGLView.cc:135
|
||||
|
|
@ -1093,7 +1091,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Es muy recomendable utilizar OpenSCAD en un sistema con OpenGL 2.0 o "
|
||||
"posterior.\n"
|
||||
"Su información renderer es como sigue:\n"
|
||||
"La información de su renderizador es la siguiente:\n"
|
||||
|
||||
#: src/QGLView.cc:139
|
||||
#, c-format
|
||||
|
|
@ -1116,14 +1114,14 @@ msgstr "Error de compilación"
|
|||
|
||||
#: src/mainwin.cc:976
|
||||
msgid "Error while compiling '%1'."
|
||||
msgstr "Error de compilación '%1'."
|
||||
msgstr "Error durante la compilación '%1'."
|
||||
|
||||
#: src/mainwin.cc:980
|
||||
#, fuzzy
|
||||
msgid "Compilation generated %1 warning."
|
||||
msgid_plural "Compilation generated %1 warnings."
|
||||
msgstr[0] "Advertencias %1"
|
||||
msgstr[1] "Advertencias %1"
|
||||
msgstr[0] "La compilación generó %1 advertencia"
|
||||
msgstr[1] "La compilación generó %1 advertencias"
|
||||
|
||||
#: src/mainwin.cc:990
|
||||
msgid " For details see <a href=\"#console\">console window</a>."
|
||||
|
|
@ -1131,18 +1129,18 @@ msgstr " Para más detalles <a href=\"#console\">ventana de consola</a>."
|
|||
|
||||
#: src/mainwin.cc:1355
|
||||
msgid "Save File"
|
||||
msgstr "Salvar archivo"
|
||||
msgstr "Guardar archivo"
|
||||
|
||||
#: src/mainwin.cc:1357
|
||||
msgid "OpenSCAD Designs (*.scad)"
|
||||
msgstr "Diseño OpenSCAD (*.scad)"
|
||||
msgstr "Diseños OpenSCAD (*.scad)"
|
||||
|
||||
#: src/mainwin.cc:1367
|
||||
msgid ""
|
||||
"%1 already exists.\n"
|
||||
"Do you want to replace it?"
|
||||
msgstr ""
|
||||
"%1 existe.\n"
|
||||
"%1 ya existe.\n"
|
||||
"Deseas reemplazarlo?"
|
||||
|
||||
#: src/mainwin.cc:1686
|
||||
|
|
@ -1163,7 +1161,7 @@ msgstr "Exportar %1 Archivo"
|
|||
|
||||
#: src/mainwin.cc:2041 src/mainwin.cc:2100
|
||||
msgid "%1 Files (*%2)"
|
||||
msgstr "%1 Archivo (*%2)"
|
||||
msgstr "%1 Archivos (*%2)"
|
||||
|
||||
#: src/mainwin.cc:2042
|
||||
msgid "Untitled"
|
||||
|
|
@ -1183,7 +1181,7 @@ msgstr "Sintitulo.csg"
|
|||
|
||||
#: src/mainwin.cc:2151
|
||||
msgid "CSG Files (*.csg)"
|
||||
msgstr "Archivo CSG (*.csg)"
|
||||
msgstr "Archivos CSG (*.csg)"
|
||||
|
||||
#: src/mainwin.cc:2177
|
||||
msgid "Export Image"
|
||||
|
|
@ -1191,7 +1189,7 @@ msgstr "Exportar una imagen"
|
|||
|
||||
#: src/mainwin.cc:2177
|
||||
msgid "PNG Files (*.png)"
|
||||
msgstr "Archivo PNG (*.png)"
|
||||
msgstr "Archivos PNG (*.png)"
|
||||
|
||||
#: src/mainwin.cc:2427
|
||||
msgid "Console"
|
||||
|
|
@ -1210,26 +1208,24 @@ msgid ""
|
|||
"Fontconfig needs to update its font cache.\n"
|
||||
"This can take up to a couple of minutes."
|
||||
msgstr ""
|
||||
"Fontconfig necesita actualizar su caché de la fuente.\n"
|
||||
"Fontconfig necesita actualizar su caché de fuentes.\n"
|
||||
"Esto puede tardar hasta un par de minutos."
|
||||
|
||||
#: src/settings.cc:132
|
||||
msgid "After indentation"
|
||||
msgstr ""
|
||||
"Marco: posición = [ %.2f %.2f %.2f ], rotación = [ %.2f %.2f %.2f ], "
|
||||
"distancia = %.2f"
|
||||
msgstr "Antes del indentado"
|
||||
|
||||
#: examples/examples.json:2
|
||||
msgid "Basics"
|
||||
msgstr "Básico"
|
||||
msgstr "Básicos"
|
||||
|
||||
#: examples/examples.json:13
|
||||
msgid "Functions"
|
||||
msgstr ""
|
||||
msgstr "Funciones"
|
||||
|
||||
#: examples/examples.json:28
|
||||
msgid "Old"
|
||||
msgstr ""
|
||||
msgstr "Viejo"
|
||||
|
||||
#~ msgid "Top"
|
||||
#~ msgstr "Arriba"
|
||||
|
|
@ -1258,7 +1254,7 @@ msgstr ""
|
|||
#~ "\n"
|
||||
#~ msgstr ""
|
||||
#~ "\n"
|
||||
#~ "Utilizar QGLWidget\n"
|
||||
#~ "Usando QGLWidget\n"
|
||||
#~ "\n"
|
||||
|
||||
#~ msgid "Shapes"
|
||||
|
|
|
|||
2093
locale/openscad.pot
2093
locale/openscad.pot
File diff suppressed because it is too large
Load diff
1318
locale/pl.po
Normal file
1318
locale/pl.po
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -967,7 +967,7 @@ msgstr "Включить перетаскивание Редактора и Ко
|
|||
|
||||
#: objects/ui_Preferences.h:1161
|
||||
msgid "Show Welcome Screen"
|
||||
msgstr "Показать экран преветствия"
|
||||
msgstr "Показать экран приветствия"
|
||||
|
||||
#: objects/ui_Preferences.h:1162
|
||||
msgid "Enable user interface localization (requires restart of OpenSCAD)"
|
||||
|
|
@ -1031,7 +1031,7 @@ msgid ""
|
|||
"Warning: You may experience OpenCSG rendering errors.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Предупреждение: Возможны ошибки рендринга OpenCSG.\n"
|
||||
"Предупреждение: Возможны ошибки рендеринга OpenCSG.\n"
|
||||
"\n"
|
||||
|
||||
#: src/QGLView.cc:132
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
# cross compilation unix->win32
|
||||
CONFIG(mingw-cross-env) {
|
||||
LIBS += mingw-cross-env/lib/libglew32s.a
|
||||
LIBS += mingw-cross-env/lib/libglut.a
|
||||
LIBS += mingw-cross-env/lib/libopengl32.a
|
||||
LIBS += mingw-cross-env/lib/libGLEW.a
|
||||
# exists( mingw-cross-env/lib/libglaux.a ) {
|
||||
# LIBS += mingw-cross-env/lib/libglaux.a
|
||||
# }
|
||||
LIBS += mingw-cross-env/lib/libglu32.a
|
||||
LIBS += mingw-cross-env/lib/libopencsg.a
|
||||
LIBS += mingw-cross-env/lib/libmpfr.a
|
||||
LIBS += mingw-cross-env/lib/libgmp.a
|
||||
LIBS += mingw-cross-env/lib/libCGAL.a
|
||||
LIBS += mingw-cross-env/lib/libfontconfig.a
|
||||
LIBS += mingw-cross-env/lib/libfreetype.a
|
||||
LIBS += mingw-cross-env/lib/libharfbuzz.a
|
||||
LIBS += mingw-cross-env/lib/libbz2.a
|
||||
LIBS += mingw-cross-env/lib/libexpat.a
|
||||
LIBS += mingw-cross-env/lib/libintl.a
|
||||
LIBS += mingw-cross-env/lib/libiconv.a
|
||||
QMAKE_CXXFLAGS += -fpermissive
|
||||
WINSTACKSIZE = 8388608 # 8MB # github issue 116
|
||||
QMAKE_CXXFLAGS += -Wl,--stack,$$WINSTACKSIZE
|
||||
LIBS += -Wl,--stack,$$WINSTACKSIZE
|
||||
QMAKE_DEL_FILE = rm -f
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedefs #eigen3
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
opencsg {
|
||||
DEFINES += ENABLE_OPENCSG
|
||||
CONFIG += glew
|
||||
|
||||
# Optionally specify location of OpenCSG using the
|
||||
# OPENCSGDIR env. variable
|
||||
|
|
|
|||
22
opengl.pri
Normal file
22
opengl.pri
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Prefer QOpenGLWidget when not doing an mxe cross build
|
||||
# To explicitly enable QOpenGLWidget: qmake CONFIG += qopenglwidget
|
||||
# To explicitly enable QGLWidget: qmake CONFIG += qglwidget
|
||||
!win*: CONFIG += qopenglwidget
|
||||
qopenglwidget:!qglwidget:!lessThan(QT_VERSION, 5.4): CONFIG += using_qopenglwidget
|
||||
contains(OSNAME,Msys) {
|
||||
CONFIG += using_qopenglwidget
|
||||
}
|
||||
|
||||
using_qglwidget {
|
||||
message("Using QGLWidget")
|
||||
DEFINES += USE_QGLWIDGET
|
||||
QT += opengl
|
||||
}
|
||||
|
||||
# see http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
|
||||
# and https://github.com/openscad/openscad/pull/119
|
||||
# ( QT += opengl does not automatically link glu on some DSO systems. )
|
||||
unix:!macx {
|
||||
QMAKE_LIBS_OPENGL *= -lGLU
|
||||
QMAKE_LIBS_OPENGL *= -lX11
|
||||
}
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<application>
|
||||
<id type="desktop">openscad.desktop</id>
|
||||
<licence>CC0</licence>
|
||||
<component type="desktop">
|
||||
<id>openscad.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-2.0+ and CC0-1.0</project_license>
|
||||
<name>OpenSCAD</name>
|
||||
<summary>The Programmers Solid 3D CAD Modeller</summary>
|
||||
<description>
|
||||
<p>OpenSCAD is a software for creating solid 3D CAD models. Unlike most free software for creating 3D models (such as Blender) it does not focus on the artistic aspects of 3D modelling but instead on the CAD aspects. Thus it might be the application you are looking for when you are planning to create 3D models of machine parts but pretty sure is not what you are looking for when you are more interested in creating computer-animated movies.</p>
|
||||
|
|
@ -9,8 +11,12 @@
|
|||
<p>OpenSCAD provides two main modelling techniques: First there is constructive solid geometry (aka CSG) and second there is extrusion of 2D outlines. As data exchange format format for this 2D outlines Autocad DXF files are used. In addition to 2D paths for extrusion it is also possible to read design parameters from DXF files. Besides DXF files OpenSCAD can read and create 3D models in the STL and OFF file formats.</p>
|
||||
</description>
|
||||
<screenshots>
|
||||
<screenshot type="default" width="800" height="437">http://www.openscad.org/images/appdata-screenshot-1.png</screenshot>
|
||||
<screenshot width="800" height="465">http://www.openscad.org/images/appdata-screenshot-2.png</screenshot>
|
||||
<screenshot type="default">
|
||||
<image>http://www.openscad.org/images/appdata-screenshot-1.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>http://www.openscad.org/images/appdata-screenshot-2.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<url type="homepage">http://www.openscad.org/</url>
|
||||
</application>
|
||||
</component>
|
||||
449
openscad.pro
449
openscad.pro
|
|
@ -1,10 +1,7 @@
|
|||
# Environment variables which can be set to specify library locations:
|
||||
# MPIRDIR
|
||||
# MPFRDIR
|
||||
# BOOSTDIR
|
||||
# CGALDIR
|
||||
# EIGENDIR
|
||||
# GLEWDIR
|
||||
# OPENCSGDIR
|
||||
# OPENSCAD_LIBRARIES
|
||||
#
|
||||
|
|
@ -12,228 +9,142 @@
|
|||
#
|
||||
# PREFIX defines the base installation folder
|
||||
#
|
||||
# SUFFIX defines an optional suffix for the binary and the
|
||||
# resource folder. E.g. using SUFFIX=-nightly will name the
|
||||
# resulting binary openscad-nightly.
|
||||
#
|
||||
# Please see the 'Building' sections of the OpenSCAD user manual
|
||||
# for updated tips & workarounds.
|
||||
#
|
||||
# http://en.wikibooks.org/wiki/OpenSCAD_User_Manual
|
||||
|
||||
!experimental {
|
||||
message("If you're building a development binary, consider adding CONFIG+=experimental")
|
||||
OSNAME=$$system(uname -o)
|
||||
contains(OSNAME,Msys) {
|
||||
# only use 'release' on windows, because qmake on win uses two makefiles
|
||||
# Makefile.release and Makefile.debug, the debug is broken b/c qcsintilla
|
||||
CONFIG=release
|
||||
CONFIG+=msys
|
||||
}
|
||||
|
||||
isEmpty(QT_VERSION) {
|
||||
error("Please use qmake for Qt 4 or Qt 5 (probably qmake-qt4)")
|
||||
message("If you're building a Stable Release, please use CONFIG=deploy")
|
||||
CONFIG += experimental
|
||||
DEFINES += ENABLE_EXPERIMENTAL
|
||||
macx: {
|
||||
ICON = icons/icon-nightly.icns
|
||||
}
|
||||
|
||||
# Auto-include config_<variant>.pri if the VARIANT variable is give on the
|
||||
# command-line, e.g. qmake VARIANT=mybuild
|
||||
!isEmpty(VARIANT) {
|
||||
message("Variant: $${VARIANT}")
|
||||
exists(config_$${VARIANT}.pri) {
|
||||
message("Including config_$${VARIANT}.pri")
|
||||
include(config_$${VARIANT}.pri)
|
||||
deploy {
|
||||
CONFIG -= experimental
|
||||
DEFINES -= ENABLE_EXPERIMENTAL
|
||||
macx: {
|
||||
ICON = $$PWD/icons/OpenSCAD.icns
|
||||
CONFIG += sparkle
|
||||
QMAKE_RPATHDIR = @executable_path/../Frameworks
|
||||
}
|
||||
}
|
||||
|
||||
# If VERSION is not set, populate VERSION, VERSION_YEAR, VERSION_MONTH from system date
|
||||
include(version.pri)
|
||||
mxetarget=$$(MXE_TARGET)
|
||||
!isEmpty(mxetarget) {
|
||||
CONFIG += mxe
|
||||
mxeabi=$$(MXE_TARGET)
|
||||
contains(mxeabi,shared) {
|
||||
CONFIG += mingw-cross-env-shared
|
||||
} else {
|
||||
CONFIG += mingw-cross-env
|
||||
}
|
||||
}
|
||||
|
||||
debug: DEFINES += DEBUG
|
||||
CONFIG += qt
|
||||
QT += widgets core gui concurrent
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
INCLUDEPATH += src
|
||||
DEPENDPATH += src
|
||||
|
||||
# Handle custom library location.
|
||||
# Used when manually installing 3rd party libraries
|
||||
isEmpty(OPENSCAD_LIBDIR) OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES)
|
||||
macx:isEmpty(OPENSCAD_LIBDIR) {
|
||||
exists(/opt/local):exists(/usr/local/Cellar) {
|
||||
error("It seems you might have libraries in both /opt/local and /usr/local. Please specify which one to use with qmake OPENSCAD_LIBDIR=<prefix>")
|
||||
} else {
|
||||
exists(/opt/local) {
|
||||
#Default to MacPorts on Mac OS X
|
||||
message("Automatically searching for libraries in /opt/local. To override, use qmake OPENSCAD_LIBDIR=<prefix>")
|
||||
OPENSCAD_LIBDIR = /opt/local
|
||||
} else:exists(/usr/local/Cellar) {
|
||||
message("Automatically searching for libraries in /usr/local. To override, use qmake OPENSCAD_LIBDIR=<prefix>")
|
||||
OPENSCAD_LIBDIR = /usr/local
|
||||
}
|
||||
}
|
||||
}
|
||||
OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES)
|
||||
|
||||
!isEmpty(OPENSCAD_LIBDIR) {
|
||||
QMAKE_INCDIR = $$OPENSCAD_LIBDIR/include
|
||||
QMAKE_LIBDIR = $$OPENSCAD_LIBDIR/lib
|
||||
}
|
||||
|
||||
# add CONFIG+=deploy to the qmake command-line to make a deployment build
|
||||
deploy {
|
||||
message("Building deployment version")
|
||||
DEFINES += OPENSCAD_DEPLOY
|
||||
macx: CONFIG += sparkle
|
||||
}
|
||||
snapshot: DEFINES += OPENSCAD_SNAPSHOT
|
||||
|
||||
macx {
|
||||
TARGET = OpenSCAD
|
||||
}
|
||||
else {
|
||||
TARGET = openscad$${SUFFIX}
|
||||
}
|
||||
FULLNAME = openscad$${SUFFIX}
|
||||
!isEmpty(SUFFIX): DEFINES += INSTALL_SUFFIX="\"\\\"$${SUFFIX}\\\"\""
|
||||
|
||||
macx {
|
||||
snapshot {
|
||||
ICON = icons/icon-nightly.icns
|
||||
}
|
||||
else {
|
||||
ICON = icons/OpenSCAD.icns
|
||||
}
|
||||
QMAKE_INFO_PLIST = Info.plist
|
||||
APP_RESOURCES.path = Contents/Resources
|
||||
APP_RESOURCES.files = OpenSCAD.sdef dsa_pub.pem icons/SCAD.icns
|
||||
QMAKE_BUNDLE_DATA += APP_RESOURCES
|
||||
LIBS += -framework Cocoa -framework ApplicationServices
|
||||
|
||||
# Mac needs special care to link against the correct C++ library
|
||||
# We attempt to auto-detect it by inspecting Boost
|
||||
dirs = $${BOOSTDIR} $${QMAKE_LIBDIR}
|
||||
for(dir, dirs) {
|
||||
system(grep -q __112basic_string $${dir}/libboost_thread* >& /dev/null) {
|
||||
message("Detected libc++-linked boost in $${dir}")
|
||||
CONFIG += libc++
|
||||
}
|
||||
}
|
||||
|
||||
libc++ {
|
||||
QMAKE_CXXFLAGS += -stdlib=libc++
|
||||
QMAKE_LFLAGS += -stdlib=libc++
|
||||
QMAKE_OBJECTIVE_CFLAGS += -stdlib=libc++
|
||||
# libc++ on requires Mac OS X 10.7+
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
|
||||
}
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
|
||||
}
|
||||
else {
|
||||
TARGET = openscad
|
||||
}
|
||||
|
||||
win* {
|
||||
RC_FILE = openscad_win32.rc
|
||||
QMAKE_CXXFLAGS += -DNOGDI
|
||||
}
|
||||
|
||||
mingw* {
|
||||
# needed to prevent compilation error on MSYS2:
|
||||
# as.exe: objects/cgalutils.o: too many sections (76541)
|
||||
# using -Wa,-mbig-obj did not help
|
||||
debug: QMAKE_CXXFLAGS += -O1
|
||||
}
|
||||
|
||||
CONFIG += qt
|
||||
QT += opengl concurrent
|
||||
|
||||
# see http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
|
||||
# and https://github.com/openscad/openscad/pull/119
|
||||
# ( QT += opengl does not automatically link glu on some DSO systems. )
|
||||
unix:!macx {
|
||||
QMAKE_LIBS_OPENGL *= -lGLU
|
||||
QMAKE_LIBS_OPENGL *= -lX11
|
||||
}
|
||||
|
||||
netbsd* {
|
||||
QMAKE_LFLAGS += -L/usr/X11R7/lib
|
||||
QMAKE_LFLAGS += -Wl,-R/usr/X11R7/lib
|
||||
QMAKE_LFLAGS += -Wl,-R/usr/pkg/lib
|
||||
!clang: { QMAKE_CXXFLAGS += -std=c++0x }
|
||||
# FIXME: Can the lines below be removed in favour of the OPENSCAD_LIBDIR handling above?
|
||||
!isEmpty(OPENSCAD_LIBDIR) {
|
||||
QMAKE_CFLAGS = -I$$OPENSCAD_LIBDIR/include $$QMAKE_CFLAGS
|
||||
QMAKE_CXXFLAGS = -I$$OPENSCAD_LIBDIR/include $$QMAKE_CXXFLAGS
|
||||
QMAKE_LFLAGS = -L$$OPENSCAD_LIBDIR/lib $$QMAKE_LFLAGS
|
||||
QMAKE_LFLAGS = -Wl,-R$$OPENSCAD_LIBDIR/lib $$QMAKE_LFLAGS
|
||||
}
|
||||
}
|
||||
|
||||
# Prevent LD_LIBRARY_PATH problems when running the openscad binary
|
||||
# on systems where uni-build-dependencies.sh was used.
|
||||
# Will not affect 'normal' builds.
|
||||
!isEmpty(OPENSCAD_LIBDIR) {
|
||||
unix:!macx {
|
||||
QMAKE_LFLAGS = -Wl,-R$$OPENSCAD_LIBDIR/lib $$QMAKE_LFLAGS
|
||||
# need /lib64 beause GLEW installs itself there on 64 bit machines
|
||||
QMAKE_LFLAGS = -Wl,-R$$OPENSCAD_LIBDIR/lib64 $$QMAKE_LFLAGS
|
||||
}
|
||||
}
|
||||
|
||||
# See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
|
||||
*g++* {
|
||||
QMAKE_CXXFLAGS *= -fno-strict-aliasing
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedefs # ignored before 4.8
|
||||
}
|
||||
|
||||
*clang* {
|
||||
# http://llvm.org/bugs/show_bug.cgi?id=9182
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-overloaded-virtual
|
||||
# disable enormous amount of warnings about CGAL / boost / etc
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-c++11-extensions
|
||||
# gettext
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-format-security
|
||||
# might want to actually turn this on once in a while
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
|
||||
}
|
||||
|
||||
CONFIG(skip-version-check) {
|
||||
# force the use of outdated libraries
|
||||
DEFINES += OPENSCAD_SKIP_VERSION_CHECK
|
||||
}
|
||||
|
||||
# Application configuration
|
||||
macx:CONFIG += mdi
|
||||
CONFIG += cgal
|
||||
CONFIG += opencsg
|
||||
CONFIG += boost
|
||||
CONFIG += eigen
|
||||
CONFIG += glib-2.0
|
||||
CONFIG += harfbuzz
|
||||
CONFIG += freetype
|
||||
CONFIG += fontconfig
|
||||
CONFIG += gettext
|
||||
|
||||
#Uncomment the following line to enable the QScintilla editor
|
||||
CONFIG += scintilla
|
||||
|
||||
# Make experimental features available
|
||||
experimental {
|
||||
DEFINES += ENABLE_EXPERIMENTAL
|
||||
}
|
||||
|
||||
mdi {
|
||||
DEFINES += ENABLE_MDI
|
||||
}
|
||||
|
||||
include(common.pri)
|
||||
|
||||
# mingw has to come after other items so OBJECT_DIRS will work properly
|
||||
CONFIG(mingw-cross-env) {
|
||||
include(mingw-cross-env.pri)
|
||||
}
|
||||
|
||||
win* {
|
||||
FLEXSOURCES = src/lexer.l
|
||||
BISONSOURCES = src/parser.y
|
||||
} else {
|
||||
LEXSOURCES += src/lexer.l
|
||||
YACCSOURCES += src/parser.y
|
||||
msys {
|
||||
QMAKE_CXXFLAGS -= -pipe # ctrl-c doesn't like pipes
|
||||
}
|
||||
|
||||
RESOURCES = openscad.qrc
|
||||
|
||||
OBJECTS_DIR = objects
|
||||
MOC_DIR = objects
|
||||
UI_DIR = objects
|
||||
RCC_DIR = objects
|
||||
INCLUDEPATH += objects
|
||||
|
||||
macx:CONFIG += mdi
|
||||
|
||||
CONFIG += c++11
|
||||
CONFIG += cgal
|
||||
CONFIG += opencsg
|
||||
CONFIG += boost
|
||||
CONFIG += gettext
|
||||
CONFIG += scintilla
|
||||
|
||||
include(cgal.pri)
|
||||
include(opencsg.pri)
|
||||
include(opengl.pri)
|
||||
include(boost.pri)
|
||||
include(gettext.pri)
|
||||
include(sparkle.pri)
|
||||
include(scintilla.pri)
|
||||
include(c++11.pri)
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += eigen3 glew fontconfig freetype2 harfbuzz glib-2.0 libxml-2.0
|
||||
#msys {
|
||||
# PKGCONFIG += Qt5Core Qt5OpenGL Qt5Gui Qt5Concurrent
|
||||
# CONFIG += moc opengl
|
||||
#}
|
||||
|
||||
# OPENSCAD_VERSION format: yyyy.mm.dd.gitcommit
|
||||
# format for stable release: yyyy.mm-patchlevel
|
||||
# note - VERSION is a qmake keyword, do not use
|
||||
isEmpty(OPENSCAD_VERSION) {
|
||||
datecmd=date
|
||||
msys: datecmd=$$(MINGW_PREFIX)/../usr/bin/date
|
||||
YMD=$$system($$datecmd "+%Y.%m.%d")
|
||||
COMMIT=$$system(git log -1 --pretty=format:"%h")
|
||||
!isEmpty(COMMIT): COMMIT=".$$COMMIT"
|
||||
OPENSCAD_VERSION=$$YMD$$COMMIT
|
||||
}
|
||||
DEFINES += OPENSCAD_VERSION=$$OPENSCAD_VERSION
|
||||
|
||||
# PKGNAME is for packaging and installation.
|
||||
# ordinary build: /usr/local/share/openscad-2016.01.20.f43f/locale
|
||||
# stable release: /usr/local/share/openscad/locale
|
||||
OPENSCAD_PKGNAME = openscad-$$OPENSCAD_VERSION
|
||||
deploy: $$OPENSCAD_PKGNAME = openscad
|
||||
|
||||
# mingw has to come after other items so OBJECT_DIRS will work properly
|
||||
|
||||
CONFIG(mingw-cross-env)|CONFIG(mingw-cross-env-shared): {
|
||||
QMAKE_CXXFLAGS += -fpermissive
|
||||
WINSTACKSIZE = 8388608 # 8MB # github issue 116
|
||||
QMAKE_CXXFLAGS += -Wl,--stack,$$WINSTACKSIZE
|
||||
LIBS += -Wl,--stack,$$WINSTACKSIZE
|
||||
QMAKE_DEL_FILE = rm -f
|
||||
}
|
||||
|
||||
# Qt5 removed access to the QMAKE_UIC variable, the following
|
||||
# way works for both Qt4 and Qt5
|
||||
load(uic)
|
||||
|
|
@ -248,8 +159,27 @@ FORMS += src/MainWindow.ui \
|
|||
src/launchingscreen.ui \
|
||||
src/LibraryInfoDialog.ui
|
||||
|
||||
HEADERS += src/typedefs.h \
|
||||
src/version_check.h \
|
||||
LEXSOURCES += src/lexer.l
|
||||
YACCSOURCES += src/parser.y
|
||||
#msys: CONFIG += yacc lex
|
||||
|
||||
HEADERS += src/AST.h \
|
||||
src/ModuleInstantiation.h \
|
||||
src/Package.h \
|
||||
src/Assignment.h \
|
||||
src/expression.h \
|
||||
src/function.h \
|
||||
src/module.h \
|
||||
src/UserModule.h
|
||||
|
||||
SOURCES += src/AST.cc \
|
||||
src/ModuleInstantiation.cc \
|
||||
src/expr.cc \
|
||||
src/function.cc \
|
||||
src/module.cc \
|
||||
src/UserModule.cc
|
||||
|
||||
HEADERS += \
|
||||
src/ProgressWidget.h \
|
||||
src/parsersettings.h \
|
||||
src/renderer.h \
|
||||
|
|
@ -262,29 +192,32 @@ HEADERS += src/typedefs.h \
|
|||
src/QGLView.h \
|
||||
src/GLView.h \
|
||||
src/MainWindow.h \
|
||||
src/OpenSCADApp.h \
|
||||
src/WindowManager.h \
|
||||
src/Preferences.h \
|
||||
src/OpenCSGWarningDialog.h \
|
||||
src/AboutDialog.h \
|
||||
src/FontListDialog.h \
|
||||
src/FontListTableView.h \
|
||||
src/GroupModule.h \
|
||||
src/FileModule.h \
|
||||
src/builtin.h \
|
||||
src/calc.h \
|
||||
src/context.h \
|
||||
src/modcontext.h \
|
||||
src/evalcontext.h \
|
||||
src/csgterm.h \
|
||||
src/csgtermnormalizer.h \
|
||||
src/csgops.h \
|
||||
src/CSGTreeNormalizer.h \
|
||||
src/CSGTreeEvaluator.h \
|
||||
src/dxfdata.h \
|
||||
src/dxfdim.h \
|
||||
src/export.h \
|
||||
src/expression.h \
|
||||
src/stackcheck.h \
|
||||
src/function.h \
|
||||
src/exceptions.h \
|
||||
src/grid.h \
|
||||
src/hash.h \
|
||||
src/highlighter.h \
|
||||
src/localscope.h \
|
||||
src/module.h \
|
||||
src/feature.h \
|
||||
src/node.h \
|
||||
src/csgnode.h \
|
||||
|
|
@ -294,6 +227,7 @@ HEADERS += src/typedefs.h \
|
|||
src/projectionnode.h \
|
||||
src/cgaladvnode.h \
|
||||
src/importnode.h \
|
||||
src/import.h \
|
||||
src/transformnode.h \
|
||||
src/colornode.h \
|
||||
src/rendernode.h \
|
||||
|
|
@ -311,20 +245,17 @@ HEADERS += src/typedefs.h \
|
|||
src/value.h \
|
||||
src/progress.h \
|
||||
src/editor.h \
|
||||
src/visitor.h \
|
||||
src/NodeVisitor.h \
|
||||
src/state.h \
|
||||
src/traverser.h \
|
||||
src/nodecache.h \
|
||||
src/nodedumper.h \
|
||||
src/ModuleCache.h \
|
||||
src/GeometryCache.h \
|
||||
src/GeometryEvaluator.h \
|
||||
src/CSGTermEvaluator.h \
|
||||
src/Tree.h \
|
||||
src/DrawingCallback.h \
|
||||
src/FreetypeRenderer.h \
|
||||
src/FontCache.h \
|
||||
src/mathc99.h \
|
||||
src/DrawingCallback.h \
|
||||
src/FreetypeRenderer.h \
|
||||
src/FontCache.h \
|
||||
src/memory.h \
|
||||
src/linalg.h \
|
||||
src/Camera.h \
|
||||
|
|
@ -346,34 +277,46 @@ src/FontCache.h \
|
|||
src/Dock.h \
|
||||
src/AutoUpdater.h \
|
||||
src/launchingscreen.h \
|
||||
src/legacyeditor.h \
|
||||
src/LibraryInfoDialog.h
|
||||
|
||||
SOURCES += src/version_check.cc \
|
||||
SOURCES += \
|
||||
src/libsvg/libsvg.cc \
|
||||
src/libsvg/circle.cc \
|
||||
src/libsvg/ellipse.cc \
|
||||
src/libsvg/line.cc \
|
||||
src/libsvg/polygon.cc \
|
||||
src/libsvg/polyline.cc \
|
||||
src/libsvg/rect.cc \
|
||||
src/libsvg/group.cc \
|
||||
src/libsvg/svgpage.cc \
|
||||
src/libsvg/path.cc \
|
||||
src/libsvg/shape.cc \
|
||||
src/libsvg/transformation.cc \
|
||||
src/libsvg/util.cc \
|
||||
\
|
||||
src/ProgressWidget.cc \
|
||||
src/mathc99.cc \
|
||||
src/linalg.cc \
|
||||
src/Camera.cc \
|
||||
src/handle_dep.cc \
|
||||
src/value.cc \
|
||||
src/expr.cc \
|
||||
src/stackcheck.cc \
|
||||
src/func.cc \
|
||||
src/localscope.cc \
|
||||
src/module.cc \
|
||||
src/feature.cc \
|
||||
src/node.cc \
|
||||
src/context.cc \
|
||||
src/modcontext.cc \
|
||||
src/evalcontext.cc \
|
||||
src/csgterm.cc \
|
||||
src/csgtermnormalizer.cc \
|
||||
src/csgnode.cc \
|
||||
src/CSGTreeNormalizer.cc \
|
||||
src/CSGTreeEvaluator.cc \
|
||||
src/Geometry.cc \
|
||||
src/Polygon2d.cc \
|
||||
src/clipper-utils.cc \
|
||||
src/polyset-utils.cc \
|
||||
src/GeometryUtils.cc \
|
||||
src/polyset.cc \
|
||||
src/polyset-gl.cc \
|
||||
src/csgops.cc \
|
||||
src/transform.cc \
|
||||
src/color.cc \
|
||||
|
|
@ -399,7 +342,7 @@ SOURCES += src/version_check.cc \
|
|||
src/LibraryInfo.cc \
|
||||
\
|
||||
src/nodedumper.cc \
|
||||
src/traverser.cc \
|
||||
src/NodeVisitor.cc \
|
||||
src/GeometryEvaluator.cc \
|
||||
src/ModuleCache.cc \
|
||||
src/GeometryCache.cc \
|
||||
|
|
@ -419,15 +362,26 @@ SOURCES += src/version_check.cc \
|
|||
src/AutoUpdater.cc \
|
||||
\
|
||||
src/grid.cc \
|
||||
src/hash.cc \
|
||||
src/GroupModule.cc \
|
||||
src/FileModule.cc \
|
||||
src/builtin.cc \
|
||||
src/calc.cc \
|
||||
src/export.cc \
|
||||
src/export_stl.cc \
|
||||
src/export_amf.cc \
|
||||
src/export_off.cc \
|
||||
src/export_dxf.cc \
|
||||
src/export_svg.cc \
|
||||
src/export_nef.cc \
|
||||
src/export_png.cc \
|
||||
src/import.cc \
|
||||
src/import_stl.cc \
|
||||
src/import_off.cc \
|
||||
src/import_svg.cc \
|
||||
src/renderer.cc \
|
||||
src/colormap.cc \
|
||||
src/ThrownTogetherRenderer.cc \
|
||||
src/CSGTermEvaluator.cc \
|
||||
src/svg.cc \
|
||||
src/OffscreenView.cc \
|
||||
src/fbo.cc \
|
||||
|
|
@ -437,12 +391,13 @@ SOURCES += src/version_check.cc \
|
|||
\
|
||||
src/openscad.cc \
|
||||
src/mainwin.cc \
|
||||
src/OpenSCADApp.cc \
|
||||
src/WindowManager.cc \
|
||||
src/UIUtils.cc \
|
||||
src/Dock.cc \
|
||||
src/FontListDialog.cc \
|
||||
src/FontListTableView.cc \
|
||||
src/launchingscreen.cc \
|
||||
src/legacyeditor.cc \
|
||||
src/LibraryInfoDialog.cc
|
||||
|
||||
# ClipperLib
|
||||
|
|
@ -499,6 +454,8 @@ HEADERS += src/cgal.h \
|
|||
src/Polygon2d-CGAL.h
|
||||
|
||||
SOURCES += src/cgalutils.cc \
|
||||
src/cgalutils-applyops.cc \
|
||||
src/cgalutils-project.cc \
|
||||
src/cgalutils-tess.cc \
|
||||
src/cgalutils-polyhedron.cc \
|
||||
src/CGALCache.cc \
|
||||
|
|
@ -524,20 +481,36 @@ win* {
|
|||
SOURCES += src/PlatformUtils-win.cc
|
||||
}
|
||||
|
||||
dryrun {
|
||||
LEXSOURCES =
|
||||
YACCSOURCES =
|
||||
SOURCES= scripts/fakescad.cc
|
||||
HEADERS=
|
||||
}
|
||||
|
||||
isEmpty(PREFIX):PREFIX = /usr/local
|
||||
|
||||
target.path = $$PREFIX/bin/
|
||||
INSTALLS += target
|
||||
|
||||
# Run translation update scripts as last step after linking the target
|
||||
QMAKE_POST_LINK += $$PWD/scripts/translation-make.sh
|
||||
POST_LINK_CMD = "$$_PRO_FILE_PWD_/scripts/translation-make.sh"
|
||||
win32 {
|
||||
# on MSYS2, handle spaces in pathnames (ex if username is "Emmy Noether")
|
||||
msys {
|
||||
POST_LINK_CMD = ___QUOTE___"$$POST_LINK_CMD"___QUOTE___
|
||||
POST_LINK_CMD = $$replace(POST_LINK_CMD,"___QUOTE___","\"")
|
||||
POST_LINK_CMD = $$shell_path($$POST_LINK_CMD)
|
||||
}
|
||||
}
|
||||
QMAKE_POST_LINK += $$POST_LINK_CMD
|
||||
|
||||
# Create install targets for the languages defined in LINGUAS
|
||||
LINGUAS = $$cat(locale/LINGUAS)
|
||||
LOCALE_PREFIX = "$$PREFIX/share/$${FULLNAME}/locale"
|
||||
LINGUAS = $$cat($$_PRO_FILE_PWD_/locale/LINGUAS)
|
||||
LOCALE_PREFIX = "$$PREFIX/share/$$OPENSCAD_PKGNAME/locale"
|
||||
for(language, LINGUAS) {
|
||||
catalogdir = locale/$$language/LC_MESSAGES
|
||||
exists(locale/$${language}.po) {
|
||||
catalogdir = $$_PRO_FILE_PWD_/locale/$$language/LC_MESSAGES
|
||||
exists($$_PRO_FILE_PWD_/locale/$${language}.po) {
|
||||
# Use .extra and copy manually as the source path might not exist,
|
||||
# e.g. on a clean checkout. In that case qmake would not create
|
||||
# the needed targets in the generated Makefile.
|
||||
|
|
@ -546,43 +519,59 @@ for(language, LINGUAS) {
|
|||
translation_depends = translation_$${language}.depends
|
||||
$$translation_path = $$LOCALE_PREFIX/$$language/LC_MESSAGES/
|
||||
$$translation_extra = cp -f $${catalogdir}/openscad.mo \"\$(INSTALL_ROOT)$$LOCALE_PREFIX/$$language/LC_MESSAGES/openscad.mo\"
|
||||
$$translation_depends = locale/$${language}.po
|
||||
$$translation_depends = $$_PRO_FILE_PWD_/locale/$${language}.po
|
||||
INSTALLS += translation_$$language
|
||||
}
|
||||
}
|
||||
|
||||
examples.path = "$$PREFIX/share/$${FULLNAME}/examples/"
|
||||
examples.files = examples/*
|
||||
examples.path = "$$PREFIX/share/$$OPENSCAD_PKGNAME/examples/"
|
||||
examples.files = $$PWD/examples/*
|
||||
examples.extra = chmod -R u=rwx,go=r,+X $$PREFIX/share/$$OPENSCAD_PKGNAME/examples
|
||||
INSTALLS += examples
|
||||
|
||||
libraries.path = "$$PREFIX/share/$${FULLNAME}/libraries/"
|
||||
libraries.files = libraries/*
|
||||
libraries.path = "$$PREFIX/share/$$OPENSCAD_PKGNAME/libraries/"
|
||||
libraries.files = $$PWD/libraries/*
|
||||
libraries.extra = chmod -R u=rwx,go=r,+X $$PREFIX/share/$$OPENSCAD_PKGNAME/libraries
|
||||
INSTALLS += libraries
|
||||
|
||||
fonts.path = "$$PREFIX/share/$${FULLNAME}/fonts/"
|
||||
fonts.files = fonts/*
|
||||
fonts.path = "$$PREFIX/share/$$OPENSCAD_PKGNAME/fonts/"
|
||||
fonts.files = $$PWD/fonts/10-liberation.conf
|
||||
fonts.files += $$PWD/fonts/Liberation-2.00.1
|
||||
mac: fonts.files += $$PWD/fonts/05-osx-fonts.conf
|
||||
mac: fonts.files += $$PWD/fonts-osx
|
||||
mxe: fonts.files += $$MXETARGETDIR/etc/fonts
|
||||
INSTALLS += fonts
|
||||
|
||||
colorschemes.path = "$$PREFIX/share/$${FULLNAME}/color-schemes/"
|
||||
colorschemes.files = color-schemes/*
|
||||
colorschemes.path = "$$PREFIX/share/$$OPENSCAD_PKGNAME/color-schemes/"
|
||||
colorschemes.files = $$PWD/color-schemes/*
|
||||
INSTALLS += colorschemes
|
||||
|
||||
applications.path = $$PREFIX/share/applications
|
||||
applications.extra = cat icons/openscad.desktop | sed -e \"'s/^Icon=openscad/Icon=$${FULLNAME}/; s/^Exec=openscad/Exec=$${FULLNAME}/'\" > \"\$(INSTALL_ROOT)$${applications.path}/$${FULLNAME}.desktop\"
|
||||
applications.extra = cat $$PWD/icons/openscad.desktop | sed -e \"'s/^Icon=openscad/Icon=$$OPENSCAD_PKGNAME/; s/^Version=1.0/Version=$$OPENSCAD_VERSION/; s/^Exec=openscad/Exec=$$OPENSCAD_PKGNAME/'\" > \"\$(INSTALL_ROOT)$${applications.path}/openscad.desktop\"
|
||||
INSTALLS += applications
|
||||
|
||||
mimexml.path = $$PREFIX/share/mime/packages
|
||||
mimexml.extra = cp -f icons/openscad.xml \"\$(INSTALL_ROOT)$${mimexml.path}/$${FULLNAME}.xml\"
|
||||
mimexml.extra = cp -f $$PWD/icons/openscad.xml \"\$(INSTALL_ROOT)$${mimexml.path}/$$OPENSCAD_PKGNAME.xml\"
|
||||
INSTALLS += mimexml
|
||||
|
||||
appdata.path = $$PREFIX/share/appdata
|
||||
appdata.extra = cp -f openscad.appdata.xml \"\$(INSTALL_ROOT)$${appdata.path}/$${FULLNAME}.appdata.xml\"
|
||||
appdata.extra = cp -f $$PWD/openscad.appdata.xml \"\$(INSTALL_ROOT)$${appdata.path}/$$OPENSCAD_PKGNAME.appdata.xml\"
|
||||
INSTALLS += appdata
|
||||
|
||||
OPENSCAD_PNGICON=openscad.png
|
||||
deploy: OPENSCAD_PNGICON=openscad-nightly.png
|
||||
|
||||
icons.path = $$PREFIX/share/pixmaps
|
||||
icons.extra = test -f icons/$${FULLNAME}.png && cp -f icons/$${FULLNAME}.png \"\$(INSTALL_ROOT)$${icons.path}/\" || cp -f icons/openscad.png \"\$(INSTALL_ROOT)$${icons.path}/$${FULLNAME}.png\"
|
||||
icons.extra = test -f $$PWD/icons/$$OPENSCAD_PNGICON && cp -f $$PWD/icons/$$OPENSCAD_PNGICON \"\$(INSTALL_ROOT)$${icons.path}/\"
|
||||
INSTALLS += icons
|
||||
|
||||
man.path = $$PREFIX/share/man/man1
|
||||
man.extra = cp -f doc/openscad.1 \"\$(INSTALL_ROOT)$${man.path}/$${FULLNAME}.1\"
|
||||
man.extra = cp -f $$PWD/doc/openscad.1 \"\$(INSTALL_ROOT)$${man.path}/openscad.1\"
|
||||
INSTALLS += man
|
||||
|
||||
msys {
|
||||
!exists(./objects/openscad_win32_res.o) {
|
||||
message("please ignore WARNING: Failure to find objects/openscad_win32_res.o and proceed to run make")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
# include <winver.h>
|
||||
# endif
|
||||
|
||||
#include "winuser.h"
|
||||
1 RT_MANIFEST "scripts/winmanifest.xml"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,0,0,0
|
||||
PRODUCTVERSION 0,0,0,0
|
||||
|
|
|
|||
|
|
@ -32,3 +32,11 @@
|
|||
gluTessCallback(tess_, GLenum(GLU_TESS_BEGIN),
|
||||
(GLvoid (CGAL_GLU_TESS_CALLBACK *)(CGAL_GLU_TESS_DOTS)) &beginCallback);
|
||||
gluTessCallback(tess_, GLenum(GLU_TESS_END),
|
||||
@@ -410,6 +429,7 @@
|
||||
gluTessEndPolygon(tess_);
|
||||
// CGAL_NEF_TRACEN("End Polygon");
|
||||
gluDeleteTess(tess_);
|
||||
+ combineCallback(NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
void construct_axes() const
|
||||
|
|
|
|||
21
patches/OpenCSG-1.4.1-MacOSX-port.patch
Normal file
21
patches/OpenCSG-1.4.1-MacOSX-port.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff --git a/opencsg.pro b/opencsg.pro
|
||||
index b56e622..5cf2d6d 100644
|
||||
--- a/opencsg.pro
|
||||
+++ b/opencsg.pro
|
||||
@@ -1,2 +1,2 @@
|
||||
TEMPLATE = subdirs
|
||||
-SUBDIRS = src example
|
||||
+SUBDIRS = src
|
||||
diff --git a/src/src.pro b/src/src.pro
|
||||
index 9091251..598112a 100644
|
||||
--- a/src/src.pro
|
||||
+++ b/src/src.pro
|
||||
@@ -7,6 +7,8 @@ TARGET = opencsg
|
||||
}
|
||||
|
||||
CONFIG += opengl warn_on release
|
||||
+CONFIG += absolute_library_soname
|
||||
+QMAKE_STRIP = echo
|
||||
INCLUDEPATH += ../include ../ $$INSTALLDIR/include
|
||||
CONFIG -= qt
|
||||
LIBS += -L$$INSTALLDIR/lib -lGLEW
|
||||
21
patches/OpenCSG-1.4.2-MacOSX-port.patch
Normal file
21
patches/OpenCSG-1.4.2-MacOSX-port.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff --git a/opencsg.pro b/opencsg.pro
|
||||
index b56e622..5cf2d6d 100644
|
||||
--- a/opencsg.pro
|
||||
+++ b/opencsg.pro
|
||||
@@ -1,2 +1,2 @@
|
||||
TEMPLATE = subdirs
|
||||
-SUBDIRS = src example
|
||||
+SUBDIRS = src
|
||||
diff --git a/src/src.pro b/src/src.pro
|
||||
index 9091251..598112a 100644
|
||||
--- a/src/src.pro
|
||||
+++ b/src/src.pro
|
||||
@@ -7,6 +7,8 @@ TARGET = opencsg
|
||||
}
|
||||
|
||||
CONFIG += opengl warn_on release
|
||||
+CONFIG += absolute_library_soname
|
||||
+QMAKE_STRIP = echo
|
||||
INCLUDEPATH += ../include ../ $$INSTALLDIR/include
|
||||
CONFIG -= qt
|
||||
LIBS += -L$$INSTALLDIR/lib -lGLEW
|
||||
23
patches/qt5/QTBUG-46846.patch
Normal file
23
patches/qt5/QTBUG-46846.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
|
||||
index 83e94c4..80957e6 100644
|
||||
--- a/src/widgets/widgets/qlabel.cpp
|
||||
+++ b/src/widgets/widgets/qlabel.cpp
|
||||
@@ -1076,14 +1076,16 @@ void QLabel::paintEvent(QPaintEvent *)
|
||||
if (d->pixmap && !d->pixmap->isNull()) {
|
||||
QPixmap pix;
|
||||
if (d->scaledcontents) {
|
||||
- if (!d->scaledpixmap || d->scaledpixmap->size() != cr.size()) {
|
||||
+ QSize scaledSize = cr.size() * devicePixelRatio();
|
||||
+ if (!d->scaledpixmap || d->scaledpixmap->size() != scaledSize) {
|
||||
if (!d->cachedimage)
|
||||
d->cachedimage = new QImage(d->pixmap->toImage());
|
||||
delete d->scaledpixmap;
|
||||
QImage scaledImage =
|
||||
- d->cachedimage->scaled(cr.size() * devicePixelRatio(),
|
||||
+ d->cachedimage->scaled(scaledSize,
|
||||
Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
d->scaledpixmap = new QPixmap(QPixmap::fromImage(scaledImage));
|
||||
+ d->scaledpixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
}
|
||||
pix = *d->scaledpixmap;
|
||||
} else
|
||||
|
|
@ -20,12 +20,34 @@ unix:linux* {
|
|||
}
|
||||
}
|
||||
|
||||
exists($$OPENSCAD_LIBDIR/lib/libqscintilla2.so) {
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT5LIB=qscintilla2
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
mac: {
|
||||
#LIBS += -lqscintilla2_debug
|
||||
LIBS += -lqscintilla2
|
||||
} else {
|
||||
win32: {
|
||||
# for DEBUG build on MSYS2, check that we actually have debug
|
||||
# version of qscintilla2 available. note the \msys64 prefix
|
||||
# and \ slashes (/ wont work)
|
||||
_MSYSTEM = $$(MSYSTEM)
|
||||
contains( _MSYSTEM, MINGW64 ) {
|
||||
dblib = \msys64\mingw64\bin\qscintilla2d.dll
|
||||
!exists( $$dblib ) {
|
||||
error("cant find $$dblib (debug lib)")
|
||||
}
|
||||
}
|
||||
contains( _MSYSTEM, MINGW32 ) {
|
||||
dblib = \msys64\mingw32\bin\qscintilla2d.dll
|
||||
!exists( $$dblib ) {
|
||||
error("cant find $$dblib (debug lib)")
|
||||
}
|
||||
}
|
||||
LIBS += -lqscintilla2d
|
||||
} else {
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
|
|
|
|||
8
releases/2016.XX.md
Normal file
8
releases/2016.XX.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
**Language Features:**
|
||||
* Added angle parameter to rotate_extrude()
|
||||
|
||||
**Program Features:**
|
||||
|
||||
**Bugfixes/improvements:**
|
||||
|
||||
**Deprecations:**
|
||||
|
|
@ -2,25 +2,46 @@ scintilla {
|
|||
HEADERS += src/scintillaeditor.h src/scadlexer.h
|
||||
SOURCES += src/scintillaeditor.cpp src/scadlexer.cpp
|
||||
|
||||
DEFINES += USE_SCINTILLA_EDITOR
|
||||
QSCILOADED =
|
||||
OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES)
|
||||
|
||||
!isEmpty(OPENSCAD_LIBDIR) {
|
||||
exists($$OPENSCAD_LIBDIR) {
|
||||
exists($$OPENSCAD_LIBDIR/lib/x86_64-linux-gnu/qt5/mkspecs/features/qscintilla2.prf) {
|
||||
include($$OPENSCAD_LIBDIR/lib/x86_64-linux-gnu/qt5/mkspecs/features/qscintilla2.prf)
|
||||
INCLUDEPATH = $$OPENSCAD_LIBDIR/include/qt5 $$INCLUDEPATH
|
||||
LIBS = -L$$OPENSCAD_LIBDIR/lib/x86_64-linux-gnu $$LIBS
|
||||
QSCILOADED=yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# The qscintilla2.prf which ships with QScintilla is broken for Mac/Windows
|
||||
# debug builds, so we supply our own
|
||||
win32|macx: {
|
||||
include(qscintilla2.prf)
|
||||
}
|
||||
else: {
|
||||
load(qscintilla2) {
|
||||
# All good, found installed *.prf file.
|
||||
} else {
|
||||
# Older scintilla libs (e.g. 2.7.2 on fedora20) do not provide the
|
||||
# prf file.
|
||||
#
|
||||
# In addition Ubuntu (and maybe other distributions) have the Qt5
|
||||
# prf file in the wrong location so it's not picked up by qmake
|
||||
#
|
||||
message("Using local copy of qscintilla2.prf instead.")
|
||||
isEmpty(QSCILOADED) {
|
||||
win32|macx: {
|
||||
include(qscintilla2.prf)
|
||||
QSCILOADED=yes
|
||||
}
|
||||
}
|
||||
|
||||
isEmpty(QSCILOADED) {
|
||||
load(qscintilla2) {
|
||||
QSCILOADED=yes
|
||||
# All good, found installed *.prf file.
|
||||
}
|
||||
}
|
||||
|
||||
isEmpty(QSCILOADED) {
|
||||
# Older scintilla libs (e.g. 2.7.2 on fedora20) do not provide the
|
||||
# prf file.
|
||||
#
|
||||
# In addition Ubuntu (and maybe other distributions) have the Qt5
|
||||
# prf file in the wrong location so it's not picked up by qmake
|
||||
#
|
||||
message("Using local copy of qscintilla2.prf instead.")
|
||||
include(qscintilla2.prf)
|
||||
QSCILOADED=yes
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,453 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# build&upload script for linux & windows snapshot binaries
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# Start with a clean directory. For example:
|
||||
#
|
||||
# mkdir builder
|
||||
# cd builder
|
||||
#
|
||||
# Then run this script, or optionally the 'build only' or 'upload only' version
|
||||
#
|
||||
# /some/path/openscad/builder.sh # standard build & upload
|
||||
# /some/path/openscad/builder.sh buildonly # only do build, dont upload
|
||||
# /some/path/openscad/builder.sh uploadonly # only upload, dont build
|
||||
|
||||
# Notes:
|
||||
#
|
||||
# This script is designed to build a 'clean' version of openscad directly
|
||||
# from the openscad github master source code. It will then optionally
|
||||
# upload the build to the OpenSCAD official file repository, and modify
|
||||
# the OpenSCAD website with links to the most recently built files.
|
||||
#
|
||||
#
|
||||
# For the mingw- cross build for Windows(TM) this script does a massive
|
||||
# 'from nothing' build, including downloading and building an MXE cross
|
||||
# environment, and dependencies, into $HOME/openscad_deps. This can take
|
||||
# many many many hours and use several gigabytes of disk space.
|
||||
#
|
||||
# This script itself is designed to call other scripts that do the heavy
|
||||
# lifting. This script itself should be kept relatively simple.
|
||||
#
|
||||
|
||||
#
|
||||
# requirements -
|
||||
# see http://mxe.cc for required tools (scons, perl, yasm, etc etc etc)
|
||||
#
|
||||
# todo - can we build 32 bit linux from within 64 bit linux?
|
||||
#
|
||||
# todo - make linux work
|
||||
#
|
||||
# todo - detect failure and stop
|
||||
#
|
||||
# todo - generalize to build release binaries as well
|
||||
#
|
||||
|
||||
init_variables()
|
||||
{
|
||||
#BRANCH_TO_BUILD=unstable
|
||||
BRANCH_TO_BUILD=master
|
||||
STARTPATH=$PWD
|
||||
# kilobit (not kilobyte!) per second for scp upload
|
||||
RATELIMIT=420
|
||||
DOBUILD=1
|
||||
DOUPLOAD=1
|
||||
DRYRUN=
|
||||
DOSNAPSHOT=1
|
||||
DOLOOP=
|
||||
#solar day
|
||||
LOOPSLEEP=86400
|
||||
DATECODE=`date +"%Y.%m.%d"`
|
||||
if [ "`echo $* | grep loop`" ]; then
|
||||
echo "----------------------------"
|
||||
echo "loop mode activated! woopee!"
|
||||
echo "----------------------------"
|
||||
DOLOOP=1
|
||||
fi
|
||||
if [ "`echo $* | grep release`" ]; then
|
||||
echo "this script cannot yet build releases, only snapshots"
|
||||
DOSNAPSHOT=
|
||||
exit 1
|
||||
fi
|
||||
if [ "`echo $* | grep uploadonly`" ]; then
|
||||
DOUPLOAD=1
|
||||
DOBUILD=
|
||||
fi
|
||||
if [ "`echo $* | grep buildonly`" ]; then
|
||||
DOUPLOAD=
|
||||
DOBUILD=1
|
||||
fi
|
||||
if [ "`echo $* | grep dry`" ]; then
|
||||
DRYRUN=1
|
||||
fi
|
||||
export STARTPATH
|
||||
export BRANCH_TO_BUILD
|
||||
export DOBUILD
|
||||
export DOUPLOAD
|
||||
export DRYRUN
|
||||
export DATECODE
|
||||
export DOSNAPSHOT
|
||||
export DOLOOP
|
||||
export LOOPSLEEP
|
||||
export RATELIMIT
|
||||
export DATECODE
|
||||
}
|
||||
|
||||
check_starting_path()
|
||||
{
|
||||
cd $STARTPATH
|
||||
if [ -e openscad.pro ]; then
|
||||
echo 'please start from a clean directory outside of openscad'
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
check_nsis()
|
||||
{
|
||||
# 64 bit mingw-cross build MXE cannot build nsis.... for now, we can
|
||||
# just ask the user to install their system's nsis package.
|
||||
# (it might be possible to d/l & build nsis here, or use pre-existing
|
||||
# 32-bit-mxe nsis)
|
||||
if [ ! "`command -v makensis`" ]; then
|
||||
echo the makensis command was not found.
|
||||
echo please install nsis for your system. for example
|
||||
echo on debian, sudo apt-get install nsis
|
||||
exit 1
|
||||
else
|
||||
echo makensis found.
|
||||
fi
|
||||
}
|
||||
|
||||
check_zip()
|
||||
if [ ! "`command -v zip`" ]; then
|
||||
echo the zip command was not found. please install zip
|
||||
echo on debian, sudo apt-get install zip
|
||||
exit 1
|
||||
else
|
||||
echo zip found.
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
get_openscad_source_code()
|
||||
{
|
||||
if [ -d openscad ]; then
|
||||
cd openscad
|
||||
if [ $? -ne 0 ]; then
|
||||
echo cd to 'openscad' directory failed
|
||||
exit 1
|
||||
fi
|
||||
git checkout $BRANCH_TO_BUILD
|
||||
if [ $? -ne 0 ]; then
|
||||
echo git checkout $BRANCH_TO_BUILD failed
|
||||
exit 1
|
||||
fi
|
||||
git fetch -a
|
||||
if [ $? -ne 0 ]; then
|
||||
echo git fetch -a openscad source code failed
|
||||
exit 1
|
||||
fi
|
||||
git pull origin $BRANCH_TO_BUILD
|
||||
if [ $? -ne 0 ]; then
|
||||
echo git pull origin $BRANCH_TO_BUILD failed
|
||||
exit 1
|
||||
fi
|
||||
git submodule update # MCAD
|
||||
return
|
||||
else
|
||||
git clone http://github.com/openscad/openscad.git
|
||||
fi
|
||||
if [ $? -eq 0 ]; then
|
||||
echo clone of source code is ok
|
||||
else
|
||||
if [ $DOUPLOAD ]; then
|
||||
if [ ! $DOBUILD ]; then
|
||||
echo upload only - skipping openscad git clone
|
||||
fi
|
||||
else
|
||||
echo clone of openscad source code failed. exiting
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
cd openscad
|
||||
git checkout $BRANCH_TO_BUILD
|
||||
if [ $? -ne 0 ]; then
|
||||
echo git checkout $BRANCH_TO_BUILD failed
|
||||
exit 1
|
||||
fi
|
||||
git submodule update --init # MCAD
|
||||
}
|
||||
|
||||
build_win32()
|
||||
{
|
||||
. ./scripts/setenv-mingw-xbuild.sh clean
|
||||
. ./scripts/setenv-mingw-xbuild.sh
|
||||
./scripts/mingw-x-build-dependencies.sh
|
||||
if [ $DOSNAPSHOT ] ; then
|
||||
./scripts/release-common.sh snapshot mingw32 tests
|
||||
else
|
||||
echo "this script cant yet build releases, only snapshots"
|
||||
exit 1
|
||||
fi
|
||||
if [ $? -eq 0 ]; then
|
||||
echo build of win32 stage over
|
||||
else
|
||||
echo build of win32 failed. exiting
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
build_win64()
|
||||
{
|
||||
. ./scripts/setenv-mingw-xbuild.sh clean
|
||||
. ./scripts/setenv-mingw-xbuild.sh 64
|
||||
./scripts/mingw-x-build-dependencies.sh 64
|
||||
if [ $DOSNAPSHOT ] ; then
|
||||
./scripts/release-common.sh snapshot mingw64 tests
|
||||
else
|
||||
echo "this script cant yet build releases, only snapshots"
|
||||
exit 1
|
||||
fi
|
||||
if [ $? -eq 0 ]; then
|
||||
echo build of win64 stage over
|
||||
else
|
||||
echo build of win64 failed. exiting
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
build_lin32()
|
||||
{
|
||||
. ./scripts/setenv-unibuild.sh
|
||||
./scripts/uni-build-dependencies.sh
|
||||
if [ $DOSNAPSHOT ] ; then
|
||||
./scripts/release-common.sh snapshot
|
||||
else
|
||||
echo "this script cant yet build releases, only snapshots"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
upload_win_common()
|
||||
{
|
||||
summary="$1"
|
||||
username=$2
|
||||
filename=$3
|
||||
if [ -f $filename ]; then
|
||||
echo 'file "'$filename'" found'
|
||||
else
|
||||
echo 'file "'$filename'" not found'
|
||||
exit 1
|
||||
fi
|
||||
opts=
|
||||
opts="$opts -p openscad"
|
||||
opts="$opts -u $username"
|
||||
opts="$opts $filename"
|
||||
remotepath=www/
|
||||
if [ $DOSNAPSHOT ]; then
|
||||
remotepath=www/snapshots/
|
||||
fi
|
||||
if [ $DRYRUN ]; then
|
||||
echo dry run, not uploading to files.openscad.org
|
||||
echo scp -v -l $RATELIMIT $filename openscad@files.openscad.org:$remotepath
|
||||
else
|
||||
scp -v -l $RATELIMIT $filename openscad@files.openscad.org:$remotepath
|
||||
fi
|
||||
}
|
||||
|
||||
upload_win32()
|
||||
{
|
||||
SUMMARY1="Windows x86-32 Snapshot Installer"
|
||||
SUMMARY2="Windows x86-32 Snapshot Zipfile"
|
||||
SUMMARY3="Windows x86-32 Snapshot Tests"
|
||||
BASEDIR=./mingw32.static/
|
||||
WIN32_PACKAGEFILE1=OpenSCAD-$DATECODE-x86-32-Installer.exe
|
||||
WIN32_PACKAGEFILE2=OpenSCAD-$DATECODE-x86-32.zip
|
||||
WIN32_PACKAGEFILE3=OpenSCAD-Tests-$DATECODE-x86-32.zip
|
||||
upload_win_common "$SUMMARY1" $USERNAME $BASEDIR/$WIN32_PACKAGEFILE1
|
||||
upload_win_common "$SUMMARY2" $USERNAME $BASEDIR/$WIN32_PACKAGEFILE2
|
||||
upload_win_common "$SUMMARY3" $USERNAME $BASEDIR/$WIN32_PACKAGEFILE3
|
||||
export WIN32_PACKAGEFILE1
|
||||
export WIN32_PACKAGEFILE2
|
||||
export WIN32_PACKAGEFILE3
|
||||
WIN32_PACKAGEFILE1_SIZE=`ls -sh $BASEDIR/$WIN32_PACKAGEFILE1 | awk ' {print $1} ';`
|
||||
WIN32_PACKAGEFILE2_SIZE=`ls -sh $BASEDIR/$WIN32_PACKAGEFILE2 | awk ' {print $1} ';`
|
||||
WIN32_PACKAGEFILE3_SIZE=`ls -sh $BASEDIR/$WIN32_PACKAGEFILE3 | awk ' {print $1} ';`
|
||||
WIN32_PACKAGEFILE1_SIZE=`echo "$WIN32_PACKAGEFILE1_SIZE""B"`
|
||||
WIN32_PACKAGEFILE2_SIZE=`echo "$WIN32_PACKAGEFILE2_SIZE""B"`
|
||||
WIN32_PACKAGEFILE3_SIZE=`echo "$WIN32_PACKAGEFILE3_SIZE""B"`
|
||||
export WIN32_PACKAGEFILE1_SIZE
|
||||
export WIN32_PACKAGEFILE2_SIZE
|
||||
export WIN32_PACKAGEFILE3_SIZE
|
||||
}
|
||||
|
||||
upload_win64()
|
||||
{
|
||||
SUMMARY1="Windows x86-64 Snapshot Zipfile"
|
||||
SUMMARY2="Windows x86-64 Snapshot Installer"
|
||||
SUMMARY3="Windows x86-64 Snapshot Tests"
|
||||
BASEDIR=./mingw64.static/
|
||||
WIN64_PACKAGEFILE1=OpenSCAD-$DATECODE-x86-64-Installer.exe
|
||||
WIN64_PACKAGEFILE2=OpenSCAD-$DATECODE-x86-64.zip
|
||||
WIN64_PACKAGEFILE3=OpenSCAD-Tests-$DATECODE-x86-64.zip
|
||||
upload_win_common "$SUMMARY1" $USERNAME $BASEDIR/$WIN64_PACKAGEFILE1
|
||||
upload_win_common "$SUMMARY2" $USERNAME $BASEDIR/$WIN64_PACKAGEFILE2
|
||||
upload_win_common "$SUMMARY3" $USERNAME $BASEDIR/$WIN64_PACKAGEFILE3
|
||||
export WIN64_PACKAGEFILE1
|
||||
export WIN64_PACKAGEFILE2
|
||||
export WIN64_PACKAGEFILE3
|
||||
WIN64_PACKAGEFILE1_SIZE=`ls -sh $BASEDIR/$WIN64_PACKAGEFILE1 | awk ' {print $1} ';`
|
||||
WIN64_PACKAGEFILE2_SIZE=`ls -sh $BASEDIR/$WIN64_PACKAGEFILE2 | awk ' {print $1} ';`
|
||||
WIN64_PACKAGEFILE3_SIZE=`ls -sh $BASEDIR/$WIN64_PACKAGEFILE3 | awk ' {print $1} ';`
|
||||
WIN64_PACKAGEFILE1_SIZE=`echo "$WIN64_PACKAGEFILE1_SIZE""B"`
|
||||
WIN64_PACKAGEFILE2_SIZE=`echo "$WIN64_PACKAGEFILE2_SIZE""B"`
|
||||
WIN64_PACKAGEFILE3_SIZE=`echo "$WIN64_PACKAGEFILE3_SIZE""B"`
|
||||
export WIN64_PACKAGEFILE1_SIZE
|
||||
export WIN64_PACKAGEFILE2_SIZE
|
||||
export WIN64_PACKAGEFILE3_SIZE
|
||||
}
|
||||
|
||||
read_username_from_user()
|
||||
{
|
||||
if [ $DRYRUN ]; then USERNAME=none;export USERNAME; return; fi
|
||||
echo 'Google code upload is deprecated'
|
||||
USERNAME=$USER
|
||||
echo 'username is ' $USERNAME
|
||||
return
|
||||
|
||||
echo 'Please enter your username for https://code.google.com/hosting/settings'
|
||||
echo -n 'Username:'
|
||||
read USERNAME
|
||||
echo 'username is ' $USERNAME
|
||||
return
|
||||
}
|
||||
|
||||
read_password_from_user()
|
||||
{
|
||||
if [ $DRYRUN ]; then return; fi
|
||||
echo 'Google code upload is deprecated'
|
||||
return
|
||||
|
||||
echo 'Please enter your password for https://code.google.com/hosting/settings'
|
||||
echo -n 'Password:'
|
||||
read -s PASSWORD1
|
||||
echo
|
||||
echo -n 'Verify :'
|
||||
read -s PASSWORD2
|
||||
echo
|
||||
if [ ! $PASSWORD1 = $PASSWORD2 ]; then
|
||||
echo 'error - passwords dont match'
|
||||
exit
|
||||
fi
|
||||
OSUPL_PASSWORD=$PASSWORD1
|
||||
export OSUPL_PASSWORD
|
||||
}
|
||||
|
||||
update_win_www_download_links()
|
||||
{
|
||||
cd $STARTPATH
|
||||
rm -rf ./openscad.github.com
|
||||
git clone git@github.com:openscad/openscad.github.com.git
|
||||
cd openscad.github.com
|
||||
cd inc
|
||||
echo `pwd`
|
||||
# BASEURL='https://openscad.googlecode.com/files/'
|
||||
BASEURL='http://files.openscad.org/'
|
||||
if [ $DOSNAPSHOT ]; then
|
||||
BASEURL='http://files.openscad.org/snapshots/'
|
||||
fi
|
||||
|
||||
mv win_snapshot_links.js win_snapshot_links.js.backup
|
||||
rm win_snapshot_links.js
|
||||
echo "fileinfo['WIN64_SNAPSHOT1_URL'] = '$BASEURL$WIN64_PACKAGEFILE1'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN64_SNAPSHOT2_URL'] = '$BASEURL$WIN64_PACKAGEFILE2'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN64_SNAPSHOT3_URL'] = '$BASEURL$WIN64_PACKAGEFILE3'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN64_SNAPSHOT1_NAME'] = 'OpenSCAD $DATECODE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN64_SNAPSHOT2_NAME'] = 'OpenSCAD $DATECODE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN64_SNAPSHOT3_NAME'] = 'OpenSCAD Tests $DATECODE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN64_SNAPSHOT1_SIZE'] = '$WIN64_PACKAGEFILE1_SIZE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN64_SNAPSHOT2_SIZE'] = '$WIN64_PACKAGEFILE2_SIZE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN64_SNAPSHOT3_SIZE'] = '$WIN64_PACKAGEFILE3_SIZE'" >> win_snapshot_links.js
|
||||
|
||||
echo "fileinfo['WIN32_SNAPSHOT1_URL'] = '$BASEURL$WIN32_PACKAGEFILE1'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN32_SNAPSHOT2_URL'] = '$BASEURL$WIN32_PACKAGEFILE2'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN32_SNAPSHOT3_URL'] = '$BASEURL$WIN32_PACKAGEFILE3'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN32_SNAPSHOT1_NAME'] = 'OpenSCAD $DATECODE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN32_SNAPSHOT2_NAME'] = 'OpenSCAD $DATECODE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN32_SNAPSHOT3_NAME'] = 'OpenSCAD Tests $DATECODE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN32_SNAPSHOT1_SIZE'] = '$WIN32_PACKAGEFILE1_SIZE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN32_SNAPSHOT2_SIZE'] = '$WIN32_PACKAGEFILE2_SIZE'" >> win_snapshot_links.js
|
||||
echo "fileinfo['WIN32_SNAPSHOT3_SIZE'] = '$WIN32_PACKAGEFILE3_SIZE'" >> win_snapshot_links.js
|
||||
echo 'modified win_snapshot_links.js'
|
||||
|
||||
PAGER=cat git diff
|
||||
if [ ! $DRYRUN ]; then
|
||||
git commit -a -m 'builder.sh - updated snapshot links'
|
||||
git push origin master
|
||||
else
|
||||
echo dry run, not updating www links
|
||||
fi
|
||||
cd $STARTPATH
|
||||
}
|
||||
|
||||
# FIXME: We might be running this locally and not need an ssh agent.
|
||||
# Before checking $SSH_AUTH_SOCK, try 'ssh -T git@github.com' to verify that we
|
||||
# can access github over ssh
|
||||
check_ssh_agent()
|
||||
{
|
||||
if [ $DRYRUN ]; then echo 'skipping ssh, dry run'; return; fi
|
||||
if [ $SSH_AUTH_SKIP ]; then
|
||||
return
|
||||
fi
|
||||
if [ ! $SSH_AUTH_SOCK ]; then
|
||||
echo 'please start an ssh-agent for github.com/openscad/openscad.github.com uploads'
|
||||
echo 'for example:'
|
||||
echo
|
||||
echo ' ssh-agent > .tmp && source .tmp && ssh-add'
|
||||
echo
|
||||
echo 'to force a run anyway, set SSH_AUTH_SKIP environment variable to 1'
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
init_variables $*
|
||||
if [ $DOUPLOAD ]; then
|
||||
check_ssh_agent
|
||||
fi
|
||||
check_starting_path
|
||||
check_nsis
|
||||
check_zip
|
||||
read_username_from_user
|
||||
read_password_from_user
|
||||
get_openscad_source_code
|
||||
if [ $DOBUILD ]; then
|
||||
build_win32
|
||||
build_win64
|
||||
fi
|
||||
if [ $DOUPLOAD ]; then
|
||||
upload_win32
|
||||
upload_win64
|
||||
update_win_www_download_links
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
if [ $DOLOOP ]; then
|
||||
while [ 1 ]; do
|
||||
init_variables $*
|
||||
main $*
|
||||
echo ---------------------------------------------------
|
||||
echo main loop finished. repeating in $LOOPSLEEP seconds
|
||||
echo ---------------------------------------------------
|
||||
sleep $LOOPSLEEP
|
||||
#if [ "`uname | grep -i linux`" ]; then
|
||||
# rtcwake -m mem -s 86400
|
||||
#fi
|
||||
done
|
||||
else
|
||||
main $*
|
||||
fi
|
||||
|
|
@ -1,665 +0,0 @@
|
|||
# Parse the minimum versions of dependencies from README.md, and compare
|
||||
# with what is found on the system. Print results.
|
||||
#
|
||||
# usage
|
||||
# check-dependencies.sh # check version of all dependencies
|
||||
# check-dependencies.sh debug # debug this script
|
||||
#
|
||||
# output
|
||||
# a table displaying the minimum version from README, the found version,
|
||||
# and whether it is OK or not.
|
||||
#
|
||||
# design
|
||||
# stage 1. search by parsing header files and/or binary output (_sysver)
|
||||
# stage 2. search with pkg-config
|
||||
#
|
||||
# Code style is portability and simplicity. Plain sed, awk, grep, sh.
|
||||
# Functions return strings under $function_name_result variable.
|
||||
# tmp variables are named funcname_abbreviated_tmp.
|
||||
# Local vars are not used.
|
||||
#
|
||||
# todo
|
||||
# testing of non-bash shells
|
||||
# if /usr/ and /usr/local/ on linux both hit, throw a warning
|
||||
# print location found, how found???
|
||||
# look at pkgconfig --exists & --modversion
|
||||
# deal with deps like GLEW that don't have proper version strings?
|
||||
#
|
||||
|
||||
DEBUG=
|
||||
|
||||
debug()
|
||||
{
|
||||
if [ $DEBUG ]; then echo check-dependencies.sh: $* ; fi
|
||||
}
|
||||
|
||||
|
||||
eigen_sysver()
|
||||
{
|
||||
debug eigen
|
||||
eigpath=$1/include/eigen3/Eigen/src/Core/util/Macros.h
|
||||
debug $eigpath
|
||||
if [ ! -e $eigpath ]; then return; fi
|
||||
eswrld=`grep "define *EIGEN_WORLD_VERSION *[0-9]*" $eigpath | awk '{print $3}'`
|
||||
esmaj=`grep "define *EIGEN_MAJOR_VERSION *[0-9]*" $eigpath | awk '{print $3}'`
|
||||
esmin=`grep "define *EIGEN_MINOR_VERSION *[0-9]*" $eigpath | awk '{print $3}'`
|
||||
eigen_sysver_result="$eswrld.$esmaj.$esmin"
|
||||
}
|
||||
|
||||
opencsg_sysver()
|
||||
{
|
||||
debug opencsg_sysver
|
||||
if [ ! -e $1/include/opencsg.h ]; then return; fi
|
||||
ocsgver=`grep -a "define *OPENCSG_VERSION_STRING *[0-9x]*" $1/include/opencsg.h`
|
||||
ocsgver=`echo $ocsgver | awk '{print $4}' | sed s/'"'//g | sed s/[^1-9.]//g`
|
||||
opencsg_sysver_result=$ocsgver
|
||||
}
|
||||
|
||||
cgal_sysver()
|
||||
{
|
||||
cgalpath=$1/include/CGAL/version.h
|
||||
if [ ! -e $cgalpath ]; then return; fi
|
||||
cgal_sysver_result=`grep "define *CGAL_VERSION *[0-9.]*" $cgalpath | awk '{print $3}'`
|
||||
}
|
||||
|
||||
glib2_sysver()
|
||||
{
|
||||
#Get architecture triplet - e.g. x86_64-linux-gnu
|
||||
glib2archtriplet=`gcc -dumpmachine 2>/dev/null`
|
||||
if [ -z "$VAR" ]; then
|
||||
if [ "`command -v dpkg-architectures`" ]; then
|
||||
glib2archtriplet=`dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null`
|
||||
fi
|
||||
fi
|
||||
glib2path=$1/lib/$glib2archtriplet/glib-2.0/include/glibconfig.h
|
||||
if [ ! -e $glib2path ]; then
|
||||
#No glib found
|
||||
#glib can be installed in /usr/lib/i386-linux-gnu/glib-2.0/ on arch i686-linux-gnu (sometimes?)
|
||||
if [ "$glib2archtriplet" = "i686-linux-gnu" ]; then
|
||||
glib2archtriplet=i386-linux-gnu
|
||||
glib2path=$1/lib/$glib2archtriplet/glib-2.0/include/glibconfig.h
|
||||
fi
|
||||
fi
|
||||
if [ ! -e $glib2path ]; then
|
||||
glib2path=$1/lib/glib-2.0/include/glibconfig.h
|
||||
fi
|
||||
if [ ! -e $glib2path ]; then
|
||||
glib2path=$1/lib64/glib-2.0/include/glibconfig.h
|
||||
fi
|
||||
if [ ! -e $glib2path ]; then
|
||||
return
|
||||
fi
|
||||
glib2major=`grep "define *GLIB_MAJOR_VERSION *[0-9.]*" $glib2path | awk '{print $3}'`
|
||||
glib2minor=`grep "define *GLIB_MINOR_VERSION *[0-9.]*" $glib2path | awk '{print $3}'`
|
||||
glib2micro=`grep "define *GLIB_MICRO_VERSION *[0-9.]*" $glib2path | awk '{print $3}'`
|
||||
glib2_sysver_result="${glib2major}.${glib2minor}.${glib2micro}"
|
||||
}
|
||||
|
||||
fontconfig_sysver()
|
||||
{
|
||||
fcpath=$1/include/fontconfig/fontconfig.h
|
||||
if [ ! -e $fcpath ]; then return; fi
|
||||
fcmajor=`grep "define *FC_MAJOR.*[0-9.]*" $fcpath | awk '{print $3}'`
|
||||
fcminor=`grep "define *FC_MINOR.*[0-9.]*" $fcpath | awk '{print $3}'`
|
||||
fcrevison=`grep "define *FC_REVISION.*[0-9.]*" $fcpath | awk '{print $3}'`
|
||||
fontconfig_sysver_result="${fcmajor}.${fcminor}.${fcrevision}"
|
||||
}
|
||||
|
||||
freetype2_sysver()
|
||||
{
|
||||
freetype2path=$1/include/freetype2/freetype/freetype.h
|
||||
if [ ! -e $freetype2path ]; then return; fi
|
||||
ftmajor=`grep "define *FREETYPE_MAJOR *[0-9.]*" $freetype2path | awk '{print $3}'`
|
||||
ftminor=`grep "define *FREETYPE_MINOR *[0-9.]*" $freetype2path | awk '{print $3}'`
|
||||
ftpatch=`grep "define *FREETYPE_PATCH *[0-9.]*" $freetype2path | awk '{print $3}'`
|
||||
freetype2_sysver_result="${ftmajor}.${ftminor}.${ftpatch}"
|
||||
}
|
||||
|
||||
harfbuzz_sysver()
|
||||
{
|
||||
harfbuzzpath=$1/include/harfbuzz/hb-version.h
|
||||
if [ ! -e $harfbuzzpath ]; then return; fi
|
||||
hbmajor=`grep "define *HB_VERSION_MAJOR *[0-9.]*" $harfbuzzpath | awk '{print $3}'`
|
||||
hbminor=`grep "define *HB_VERSION_MINOR *[0-9.]*" $harfbuzzpath | awk '{print $3}'`
|
||||
hbmicro=`grep "define *HB_VERSION_MICRO *[0-9.]*" $harfbuzzpath | awk '{print $3}'`
|
||||
harfbuzz_sysver_result="${hbmajor}.${hbminor}.${hbmicro}"
|
||||
}
|
||||
|
||||
boost_sysver()
|
||||
{
|
||||
boostpath=$1/include/boost/version.hpp
|
||||
if [ ! -e $boostpath ]; then return; fi
|
||||
bsver=`grep 'define *BOOST_LIB_VERSION *[0-9_"]*' $boostpath | awk '{print $3}'`
|
||||
bsver=`echo $bsver | sed s/'"'//g | sed s/'_'/'.'/g`
|
||||
boost_sysver_result=$bsver
|
||||
}
|
||||
|
||||
mpfr_sysver()
|
||||
{
|
||||
mpfrpath=$1/include/mpfr.h
|
||||
if [ ! -e $mpfrpath ]; then return; fi
|
||||
mpfrsver=`grep 'define *MPFR_VERSION_STRING *' $mpfrpath | awk '{print $3}'`
|
||||
mpfrsver=`echo $mpfrsver | sed s/"-.*"// | sed s/'"'//g`
|
||||
mpfr_sysver_result=$mpfrsver
|
||||
}
|
||||
|
||||
gmp_sysver()
|
||||
{
|
||||
gmppaths="`find $1/include -name 'gmp.h' -o -name 'gmp-*.h' 2>/dev/null`"
|
||||
if [ ! "$gmppaths" ]; then
|
||||
debug "gmp_sysver no gmp.h beneath $1"
|
||||
return
|
||||
fi
|
||||
for gmpfile in $gmppaths; do
|
||||
if [ "`grep __GNU_MP_VERSION $gmpfile`" ]; then
|
||||
gmpmaj=`grep "define *__GNU_MP_VERSION *[0-9]*" $gmpfile | awk '{print $3}'`
|
||||
gmpmin=`grep "define *__GNU_MP_VERSION_MINOR *[0-9]*" $gmpfile | awk '{print $3}'`
|
||||
gmppat=`grep "define *__GNU_MP_VERSION_PATCHLEVEL *[0-9]*" $gmpfile | awk '{print $3}'`
|
||||
fi
|
||||
done
|
||||
gmp_sysver_result="$gmpmaj.$gmpmin.$gmppat"
|
||||
}
|
||||
|
||||
qt_sysver()
|
||||
{
|
||||
if [ "`command -v qtchooser`" ]; then
|
||||
if qtchooser -run-tool=qmake -qt=5 -v >/dev/null 2>&1 ; then
|
||||
export QT_SELECT=5
|
||||
qtpath="`qtchooser -run-tool=qmake -qt=5 -query QT_INSTALL_HEADERS`"/QtCore/qglobal.h
|
||||
fi
|
||||
if [ ! -e "$qtpath" ]; then
|
||||
if qtchooser -run-tool=qmake -qt=4 -v >/dev/null 2>&1 ; then
|
||||
export QT_SELECT=4
|
||||
qtpath="`qtchooser -run-tool=qmake -qt=4 -query QT_INSTALL_HEADERS`"/QtCore/qglobal.h
|
||||
fi
|
||||
fi
|
||||
else
|
||||
export QT_SELECT=5
|
||||
qtpath=$1/include/qt5/QtCore/qglobal.h
|
||||
if [ ! -e $qtpath ]; then
|
||||
qtpath=$1/include/i686-linux-gnu/qt5/QtCore/qglobal.h
|
||||
fi
|
||||
if [ ! -e $qtpath ]; then
|
||||
qtpath=$1/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h
|
||||
fi
|
||||
if [ ! -e $qtpath ]; then
|
||||
export QT_SELECT=4
|
||||
qtpath=$1/include/qt4/QtCore/qglobal.h
|
||||
fi
|
||||
if [ ! -e $qtpath ]; then
|
||||
qtpath=$1/include/QtCore/qglobal.h
|
||||
fi
|
||||
if [ ! -e $qtpath ]; then
|
||||
# netbsd
|
||||
qtpath=$1/qt4/include/QtCore/qglobal.h
|
||||
fi
|
||||
fi
|
||||
if [ ! -e "$qtpath" ]; then
|
||||
unset QT_SELECT
|
||||
return
|
||||
fi
|
||||
qtver=`grep 'define *QT_VERSION_STR *' $qtpath | awk '{print $3}'`
|
||||
qtver=`echo $qtver | sed s/'"'//g`
|
||||
qt_sysver_result=$qtver
|
||||
}
|
||||
|
||||
qscintilla2_sysver()
|
||||
{
|
||||
# expecting the QT_SELECT already set in case we found qtchooser
|
||||
if qmake -v >/dev/null 2>&1 ; then
|
||||
QMAKE=qmake
|
||||
elif [ "`command -v qmake-qt4`" ]; then
|
||||
QMAKE=qmake-qt4
|
||||
fi
|
||||
debug using qmake: $QMAKE
|
||||
|
||||
qtincdir="`$QMAKE -query QT_INSTALL_HEADERS`"
|
||||
qscipath="$qtincdir/Qsci/qsciglobal.h"
|
||||
debug using qtincdir: $qtincdir
|
||||
debug using qscipath: $qscipath
|
||||
if [ ! -e $qscipath ]; then
|
||||
debug qscipath doesnt exist. giving up on version.
|
||||
return
|
||||
fi
|
||||
|
||||
qsciver=`grep define.*QSCINTILLA_VERSION_STR "$qscipath" | awk '{print $3}'`
|
||||
qsciver=`echo $qsciver | sed s/'"'//g`
|
||||
qscintilla2_sysver_result="$qsciver"
|
||||
}
|
||||
|
||||
glew_sysver()
|
||||
{
|
||||
glewh=$1/include/GL/glew.h
|
||||
if [ -e $glewh ]; then
|
||||
# glew has no traditional version number in it's headers
|
||||
# so we either test for what we need and 'guess', or assign it to 0.0
|
||||
# the resulting number is a 'lower bound', not exactly what is installed
|
||||
if [ "`grep __GLEW_VERSION_4_2 $glewh`" ]; then
|
||||
glew_sysver_result=1.7.0
|
||||
fi
|
||||
if [ ! $glew_sysver_result ]; then
|
||||
if [ "`grep __GLEW_ARB_occlusion_query2 $glewh`" ]; then
|
||||
glew_sysver_result=1.5.4
|
||||
fi
|
||||
fi
|
||||
if [ ! $glew_sysver_result ]; then
|
||||
glew_sysver_result=0.0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
imagemagick_sysver()
|
||||
{
|
||||
if [ ! -x $1/bin/convert ]; then return; fi
|
||||
imver=`$1/bin/convert --version | grep -i version`
|
||||
imagemagick_sysver_result=`echo $imver | sed s/"[^0-9. ]"/" "/g | awk '{print $1}'`
|
||||
}
|
||||
|
||||
flex_sysver()
|
||||
{
|
||||
flexbin=$1/bin/flex
|
||||
if [ -x $1/bin/gflex ]; then flexbin=$1/bin/gflex; fi # openbsd
|
||||
if [ ! -x $flexbin ]; then return ; fi
|
||||
flex_sysver_result=`$flexbin --version | sed s/"[^0-9.]"/" "/g`
|
||||
}
|
||||
|
||||
bison_sysver()
|
||||
{
|
||||
# bison (GNU Bison) 2.7.12-4996
|
||||
if [ ! -x $1/bin/bison ]; then return ; fi
|
||||
bison_sver=`$1/bin/bison --version | grep bison`
|
||||
debug bison_sver1: $bison_sver
|
||||
bison_sver=`echo $bison_sver | awk -F ")" ' { print $2 } '`
|
||||
debug bison_sver2: $bison_sver
|
||||
bison_sver=`echo $bison_sver | awk -F "-" ' { print $1 } '`
|
||||
debug bison_sver3: $bison_sver
|
||||
bison_sysver_result=$bison_sver
|
||||
}
|
||||
|
||||
gcc_sysver()
|
||||
{
|
||||
bingcc=$1/bin/g++
|
||||
if [ ! -x $1/bin/g++ ]; then
|
||||
if [ "`command -v g++`" ]; then # fallback to $PATH
|
||||
bingcc=g++;
|
||||
fi
|
||||
fi
|
||||
debug using bingcc: $bingcc
|
||||
if [ ! -x $bingcc ]; then return; fi
|
||||
if [ ! "`$bingcc --version`" ]; then return; fi
|
||||
gccver=`$bingcc --version| grep -i g++ | awk -F "(" ' { print $2 } '`
|
||||
debug g++ output1: $gccver
|
||||
gccver=`echo $gccver | awk -F ")" ' { print $2 } '`
|
||||
debug g++ output2: $gccver
|
||||
gccver=`echo $gccver | awk ' { print $1 } '`
|
||||
debug g++ output3: $gccver
|
||||
gcc_sysver_result=$gccver
|
||||
}
|
||||
|
||||
git_sysver()
|
||||
{
|
||||
if [ ! -x $1/bin/git ]; then return ; fi
|
||||
git_sysver_result=`$1/bin/git --version | grep git | sed s/"[^0-9.]"/" "/g`
|
||||
}
|
||||
|
||||
curl_sysver()
|
||||
{
|
||||
if [ ! -x $1/bin/curl ]; then return; fi
|
||||
curl_sysver_result=`$1/bin/curl --version | grep curl | sed s/"[^0-9. ]"/" "/g | awk '{print $1}'`
|
||||
}
|
||||
|
||||
cmake_sysver()
|
||||
{
|
||||
if [ ! -x $1/bin/cmake ]; then return ; fi
|
||||
cmake_sysver_result=`$1/bin/cmake --version | grep cmake | sed s/"[^0-9.]"/" "/g | awk '{ print $1 }'`
|
||||
}
|
||||
|
||||
make_sysver()
|
||||
{
|
||||
make_sysver_tmp=
|
||||
binmake=$1/bin/make
|
||||
if [ -x $1/bin/gmake ]; then binmake=$1/bin/gmake ;fi
|
||||
if [ ! -x $binmake ]; then return ;fi
|
||||
make_sysver_tmp=`$binmake --version 2>&1`
|
||||
|
||||
debug finding gnu make: raw make response: $make_sysver_tmp
|
||||
if [ ! "`echo $make_sysver_tmp | grep -i gnu`" ]; then
|
||||
return;
|
||||
fi
|
||||
|
||||
make_sysver_tmp=`$binmake --version 2>&1 | grep -i 'gnu make' | sed s/"[^0-9.]"/" "/g`
|
||||
if [ "`echo $make_sysver_tmp | grep [0-9]`" ]; then
|
||||
make_sysver_result=$make_sysver_tmp
|
||||
fi
|
||||
}
|
||||
|
||||
bash_sysver()
|
||||
{
|
||||
if [ -x /bin/bash ]; then binbash=/bin/bash ;fi
|
||||
if [ -x /usr/bin/bash ]; then binbash=/usr/bin/bash ;fi
|
||||
if [ -x $1/bin/bash ]; then binbash=$1/bin/bash ;fi
|
||||
if [ ! -x $binbash ]; then return; fi
|
||||
bash_sysver_result=`$binbash --version | grep bash | sed s/"[^0-9. ]"/" "/g|awk '{print $1}'`
|
||||
}
|
||||
|
||||
python_sysver()
|
||||
{
|
||||
if [ ! -x $1/bin/python ]; then return; fi
|
||||
python_sysver_result=`$1/bin/python --version 2>&1 | awk '{print $2}'`
|
||||
}
|
||||
|
||||
pkg_config_search()
|
||||
{
|
||||
debug pkg_config_search $*
|
||||
pkg_config_search_result=
|
||||
pcstmp=
|
||||
if [ ! $1 ]; then return; fi
|
||||
pkgname=$1
|
||||
|
||||
pkg-config --exists $pkgname 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
pkg_config_search_result=`pkg-config --modversion $pkgname`
|
||||
else
|
||||
debug pkg_config_search failed on $*, result of run was: $pcstmp
|
||||
fi
|
||||
}
|
||||
|
||||
get_minversion_from_readme()
|
||||
{
|
||||
debug get_minversion_from_readme $*
|
||||
|
||||
# Extract dependency name
|
||||
if [ ! $1 ]; then return; fi
|
||||
depname=$1
|
||||
|
||||
debug $depname
|
||||
local grv_tmp=
|
||||
for READFILE in README.md ../README.md "`dirname "$0"`/../README.md"
|
||||
do
|
||||
if [ ! -e "$READFILE" ]
|
||||
then
|
||||
debug "get_minversion_from_readme $READFILE not found"
|
||||
continue
|
||||
fi
|
||||
debug "get_minversion_from_readme $READFILE found"
|
||||
grep -qi ".$depname.*([0-9]" $READFILE || continue
|
||||
grv_tmp="`grep -i ".$depname.*([0-9]" $READFILE | sed s/"*"//`"
|
||||
debug $grv_tmp
|
||||
grv_tmp="`echo $grv_tmp | awk -F"(" '{print $2}'`"
|
||||
debug $grv_tmp
|
||||
grv_tmp="`echo $grv_tmp | awk -F"-" '{print $1}'`"
|
||||
debug $grv_tmp
|
||||
grv_tmp="`echo $grv_tmp | sed s/"x"/"0"/g`"
|
||||
debug $grv_tmp
|
||||
grv_tmp="`echo $grv_tmp | sed s/"[^0-9.]"//g`"
|
||||
debug $grv_tmp
|
||||
if [ "z$grv_tmp" = "z" ]
|
||||
then
|
||||
debug "get_minversion_from_readme no result for $depname from $READFILE"
|
||||
continue
|
||||
fi
|
||||
get_minversion_from_readme_result=$grv_tmp
|
||||
return 0
|
||||
done
|
||||
if [ "z$grv_tmp" = "z" ]
|
||||
then
|
||||
debug "get_minversion_from_readme no result for $depname found anywhere"
|
||||
get_minversion_from_readme_result=""
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
find_min_version()
|
||||
{
|
||||
find_min_version_result=
|
||||
fmvtmp=
|
||||
if [ ! $1 ] ; then return; fi
|
||||
fmvdep=$1
|
||||
get_minversion_from_readme $fmvdep
|
||||
fmvtmp=$get_minversion_from_readme_result
|
||||
|
||||
# items not included in README.md
|
||||
if [ $fmvdep = "git" ]; then fmvtmp=1.5 ; fi
|
||||
if [ $fmvdep = "curl" ]; then fmvtmp=6 ; fi
|
||||
if [ $fmvdep = "make" ]; then fmvtmp=3 ; fi
|
||||
if [ $fmvdep = "python" ]; then fmvtmp=2 ; fi
|
||||
|
||||
find_min_version_result=$fmvtmp
|
||||
}
|
||||
|
||||
vers_to_int()
|
||||
{
|
||||
# change x.y.z.p into an integer that can be compared using -lt or -gt
|
||||
# 1.2.3.4 into 1020304
|
||||
# 1.11.0.12 into 1110012
|
||||
# 2011.2.3 into 20110020300
|
||||
# it will work as long as the resulting int is less than 2.147 billion
|
||||
# and y z and p are less than 99
|
||||
vers_to_int_result=
|
||||
if [ ! $1 ] ; then return ; fi
|
||||
vtoi_ver=$1
|
||||
vtoi_test=`echo $vtoi_ver | sed s/"[^0-9.]"//g`
|
||||
debug vers_to_int $* :: vtoi_ver: $vtoi_ver vtoi_test: $vtoi_test
|
||||
if [ ! "$vtoi_test" = "$vtoi_ver" ]; then
|
||||
debug failure in version-to-integer conversion.
|
||||
debug '"'$vtoi_ver'"' has letters, etc in it. setting to 0
|
||||
vtoi_ver="0"
|
||||
fi
|
||||
vers_to_int_result=`echo $vtoi_ver | awk -F. '{print $1*1000000+$2*10000+$3*100+$4}'`
|
||||
vtoi_ver=
|
||||
vtoi_test=
|
||||
}
|
||||
|
||||
|
||||
version_less_than_or_equal()
|
||||
{
|
||||
if [ ! $1 ]; then return; fi
|
||||
if [ ! $2 ]; then return; fi
|
||||
v1=$1
|
||||
v2=$2
|
||||
vers_to_int $v1
|
||||
v1int=$vers_to_int_result
|
||||
vers_to_int $v2
|
||||
v2int=$vers_to_int_result
|
||||
debug "v1, v2, v1int, v2int" , $v1, $v2, $v1int, $v2int
|
||||
if [ $v1int -le $v2int ]; then
|
||||
debug "v1 <= v2"
|
||||
return 0
|
||||
else
|
||||
debug "v1 > v2"
|
||||
return 1
|
||||
fi
|
||||
v1=
|
||||
v2=
|
||||
v1int=
|
||||
v2int=
|
||||
}
|
||||
|
||||
compare_version()
|
||||
{
|
||||
debug compare_version $*
|
||||
compare_version_result="NotOK"
|
||||
if [ ! $1 ] ; then return; fi
|
||||
if [ ! $2 ] ; then return; fi
|
||||
cvminver=$1
|
||||
cvinstver=$2
|
||||
cvtmp=
|
||||
version_less_than_or_equal $cvminver $cvinstver
|
||||
if [ $? = 0 ]; then
|
||||
cvtmp="OK"
|
||||
else
|
||||
cvtmp="NotOK"
|
||||
fi
|
||||
compare_version_result=$cvtmp
|
||||
cvtmp=
|
||||
}
|
||||
|
||||
pretty_print()
|
||||
{
|
||||
# there are four columns, passed as $1 $2 $3 and $4
|
||||
# 1 = name of dependency
|
||||
# 2 = version found in README
|
||||
# 3 = version found on system
|
||||
# 4 = whether it is OK or not
|
||||
|
||||
debug pretty_print $*
|
||||
|
||||
brightred="\033[40;31m"
|
||||
red="\033[40;31m"
|
||||
brown="\033[40;33m"
|
||||
yellow="\033[40;33m"
|
||||
white="\033[40;37m"
|
||||
purple="\033[40;35m"
|
||||
green="\033[40;32m"
|
||||
cyan="\033[40;36m"
|
||||
gray="\033[40;37m"
|
||||
nocolor="\033[0m"
|
||||
|
||||
ppstr="%s%-12s"
|
||||
pp_format='{printf("'$ppstr$ppstr$ppstr$ppstr$nocolor'\n",$1,$2,$3,$4,$5,$6,$7,$8)}'
|
||||
pp_title="$gray depname $gray minimum $gray found $gray OKness"
|
||||
if [ $1 ]; then pp_depname=$1; fi
|
||||
if [ $pp_depname = "title" ]; then
|
||||
echo -e $pp_title | awk $pp_format
|
||||
return ;
|
||||
fi
|
||||
|
||||
if [ $2 ]; then pp_minver=$2; else pp_minver="unknown"; fi
|
||||
if [ $3 ]; then pp_foundver=$3; else pp_foundver="unknown"; fi
|
||||
if [ $4 ]; then pp_okness=$4; else pp_okness="NotOK"; fi
|
||||
|
||||
if [ $pp_okness = "NotOK" ]; then
|
||||
pp_foundcolor=$purple;
|
||||
pp_cmpcolor=$purple;
|
||||
else
|
||||
pp_foundcolor=$gray;
|
||||
pp_cmpcolor=$green;
|
||||
fi
|
||||
echo -e $cyan $pp_depname $gray $pp_minver $pp_foundcolor $pp_foundver $pp_cmpcolor $pp_okness | awk $pp_format
|
||||
pp_depname=
|
||||
pp_minver=
|
||||
pp_foundver=
|
||||
pp_okness=
|
||||
}
|
||||
|
||||
find_installed_version()
|
||||
{
|
||||
debug find_installed_version $*
|
||||
find_installed_version_result=unknown
|
||||
fsv_tmp=
|
||||
depname=$1
|
||||
|
||||
# try to find/parse headers and/or binary output
|
||||
# break on the first match. (change the order to change precedence)
|
||||
if [ ! $fsv_tmp ]; then
|
||||
for syspath in $OPENSCAD_LIBRARIES "/usr/local" "/opt/local" "/usr/pkg" "/usr"; do
|
||||
if [ -e $syspath ]; then
|
||||
debug $depname"_sysver" $syspath
|
||||
eval $depname"_sysver" $syspath
|
||||
fsv_tmp=`eval echo "$"$depname"_sysver_result"`
|
||||
if [ $fsv_tmp ]; then break; fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# use pkg-config to search
|
||||
if [ ! $fsv_tmp ]; then
|
||||
if [ "`command -v pkg-config`" ]; then
|
||||
debug plain search failed. trying pkg_config...
|
||||
pkg_config_search $depname
|
||||
fsv_tmp=$pkg_config_search_result
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $fsv_tmp ]; then
|
||||
find_installed_version_result=$fsv_tmp
|
||||
else
|
||||
debug all searches failed. unknown version.
|
||||
fi
|
||||
}
|
||||
|
||||
check_old_local()
|
||||
{
|
||||
warnon=
|
||||
if [ "`uname | grep -i linux`" ]; then
|
||||
header_list="opencsg.h CGAL boost GL/glew.h gmp.h mpfr.h eigen3"
|
||||
for i in $header_list; do
|
||||
if [ -e /usr/local/include/$i ]; then
|
||||
echo "Warning: you have a copy of "$i" under /usr/local/include"
|
||||
warnon=1
|
||||
fi
|
||||
done
|
||||
liblist="libboost_system libboost_system-mt libopencsg libCGAL libglew"
|
||||
for i in $liblist; do
|
||||
if [ -e /usr/local/lib/$i.so ]; then
|
||||
echo "Warning: you have a copy of "$i" under /usr/local/lib"
|
||||
warnon=1
|
||||
fi
|
||||
done
|
||||
if [ -e /usr/local/lib/pkgconfig ]; then
|
||||
echo "Warning: you have pkgconfig under /usr/local/lib"
|
||||
warnon=1
|
||||
fi
|
||||
fi
|
||||
if [ $warnon ]; then
|
||||
echo "Please verify these local copies don't conflict with the system"
|
||||
fi
|
||||
}
|
||||
|
||||
check_misc()
|
||||
{
|
||||
if [ "`uname -a|grep -i netbsd`" ]; then
|
||||
echo "NetBSD: Please manually verify the X Sets have been installed"
|
||||
fi
|
||||
|
||||
if [ "`uname -a|grep -i darwin`" ]; then
|
||||
sparkle=
|
||||
libs="~/Library /Library"
|
||||
for libhome in $libs; do
|
||||
echo "$libhome/Frameworks/Sparkle.framework..."
|
||||
if [ -d $libhome/Frameworks/Sparkle.framework ]; then
|
||||
echo "Found in $libhome"
|
||||
sparkle=$libhome
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -n "$sparkle" ]; then
|
||||
echo "OS X: Make sure Sparkle.framework is installed in your Frameworks path"
|
||||
else
|
||||
echo "OS X: Sparkle.framework found in $libhome"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
checkargs()
|
||||
{
|
||||
for i in $*; do
|
||||
if [ $i = "debug" ]; then DEBUG=1 ; fi
|
||||
done
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
deps="qt qscintilla2 cgal gmp mpfr boost opencsg glew eigen glib2 fontconfig freetype2 harfbuzz bison flex make"
|
||||
#deps="$deps curl git" # not technically necessary for build
|
||||
#deps="$deps python cmake imagemagick" # only needed for tests
|
||||
#deps="cgal"
|
||||
pretty_print title
|
||||
for depname in $deps; do
|
||||
debug "processing $dep"
|
||||
find_installed_version $depname
|
||||
dep_sysver=$find_installed_version_result
|
||||
find_min_version $depname
|
||||
dep_minver=$find_min_version_result
|
||||
compare_version $dep_minver $dep_sysver
|
||||
dep_compare=$compare_version_result
|
||||
pretty_print $depname "$dep_minver" "$dep_sysver" $dep_compare
|
||||
done
|
||||
check_old_local
|
||||
check_misc
|
||||
}
|
||||
|
||||
checkargs $*
|
||||
main
|
||||
exit 0
|
||||
|
||||
|
|
@ -1,766 +0,0 @@
|
|||
/***************************************************************************
|
||||
* *
|
||||
* This is a pre-configured single file version of chrpath for linux. *
|
||||
* It is used in the binary installer for OpenSCAD on Linux. *
|
||||
* *
|
||||
* This file has been created by running *
|
||||
* cat *.h *.c | sed 's, *# *include *",//&,' > ../chrpath_linux.c *
|
||||
* in the configured chrpath-0.13 source directory (as found in the debian *
|
||||
* package repository as the original download site seams to be down). *
|
||||
* *
|
||||
* chrpath is licensed under the terms of GPLv2: *
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
* The Authors are: *
|
||||
* *
|
||||
* Geoffrey Keating <geoffk@ozemail.com.au> *
|
||||
* Implemented first version of chrpath.c based on first version of *
|
||||
* killrpath. *
|
||||
* Peeter Joot <peeterj@ca.ibm.com> *
|
||||
* Implemented first version of killrpath.c. *
|
||||
* Petter Reinholdtsen <pere@hungry.com> *
|
||||
* Collected both implementations and made userfriendly wrapper. *
|
||||
* *
|
||||
* With patches from: *
|
||||
* *
|
||||
* Darren Salt <linux@youmustbejoking.demon.co.uk> *
|
||||
* David Hull <hull@paracel.com> *
|
||||
* Bradford W. Johnson <bradford@math.umn.edu> *
|
||||
* Thomas Anders <anders@hmi.de> *
|
||||
* Tollef Fog Heen <tollef@add.no> *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
/* config.h. Generated by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <elf.h> header file. */
|
||||
#define HAVE_ELF_H 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#define HAVE_GETOPT_H 1
|
||||
|
||||
/* Define to 1 if you have the `getopt_long' function. */
|
||||
#define HAVE_GETOPT_LONG 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <link.h> header file. */
|
||||
#define HAVE_LINK_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/link.h> header file. */
|
||||
/* #undef HAVE_SYS_LINK_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "chrpath"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "pere@hungry.com"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME ""chrpath""
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING ""chrpath" "0.13""
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "-chrpath-"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION ""0.13""
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.13"
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
/* #undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
#ifndef PROTOS_H
|
||||
#define PROTOS_H
|
||||
|
||||
#include <elf.h>
|
||||
//#include "config.h"
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define ELFDATA2 ELFDATA2MSB
|
||||
#else
|
||||
#define ELFDATA2 ELFDATA2LSB
|
||||
#endif
|
||||
#if SIZEOF_VOID_P == 8
|
||||
#define Elf_Ehdr Elf64_Ehdr
|
||||
#define ELFCLASS ELFCLASS64
|
||||
#define Elf_Phdr Elf64_Phdr
|
||||
#define Elf_Shdr Elf64_Shdr
|
||||
#define Elf_Dyn Elf64_Dyn
|
||||
#elif SIZEOF_VOID_P == 4
|
||||
#define Elf_Ehdr Elf32_Ehdr
|
||||
#define ELFCLASS ELFCLASS32
|
||||
#define Elf_Phdr Elf32_Phdr
|
||||
#define Elf_Shdr Elf32_Shdr
|
||||
#define Elf_Dyn Elf32_Dyn
|
||||
#else
|
||||
#error "Unknown word size (SIZEOF_VOID_P)!"
|
||||
#endif
|
||||
|
||||
int killrpath(const char *filename);
|
||||
int chrpath(const char *filename, const char *newpath, int convert);
|
||||
|
||||
int elf_open(const char *filename, int flags, Elf_Ehdr *ehdr);
|
||||
void elf_close(int fd);
|
||||
int elf_find_dynamic_section(int fd, Elf_Ehdr *ehdr, Elf_Phdr *phdr);
|
||||
const char *elf_tagname(int tag);
|
||||
int elf_dynpath_tag(int tag);
|
||||
|
||||
#endif /* PROTOS_H */
|
||||
/*
|
||||
<URL:http://gcc.gnu.org/ml/gcc/1999-04n/msg01105.html>
|
||||
|
||||
Re: changing embedded RPATH in existing executables.
|
||||
|
||||
To: geoffk@ozemail.com.au
|
||||
Subject: Re: changing embedded RPATH in existing executables.
|
||||
From: <peeter_joot@VNET.IBM.COM> (peeter joot)
|
||||
Date: Fri, 30 Apr 1999 16:14:44 -0400 (EDT)
|
||||
Cc: peeterj@ca.ibm.com, egcs@cygnus.com, libc-hacker@cygnus.com, linux-gcc@vger.rutgers.edu
|
||||
Reply-To: <peeter_joot@VNET.IBM.COM>
|
||||
|
||||
> _Changing_ is a little tricky, but the attached program strips rpaths
|
||||
> from executables (I find it essential for debugging the binutils).
|
||||
> It's endian-dependent, if you want this for x86 you can just change
|
||||
> the occurrences of 'MSB' to 'LSB' and compile (I should really fix
|
||||
> that).
|
||||
|
||||
Hi Geoff,
|
||||
|
||||
With your program as a guide (and some peeks into libbfd, elf.h, a bit
|
||||
of the glibc dynamic loader code, objdump, and a hex-editor) I was able to
|
||||
figure out enough to find and change the rpath string. That was fun!
|
||||
|
||||
This program assumes (unlike your original program) that there is only
|
||||
one DT_RPATH tag in the dynamic section as even with multiple '-Wl,-rpath,'
|
||||
commands in the link this seems to occur (they all get concatonated into
|
||||
a : separated path).
|
||||
|
||||
Thanks for your help. If you want to use this on non-x86 you have to change
|
||||
the occurances of LSB back to MSB:)
|
||||
|
||||
Peeter
|
||||
--
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
//# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <elf.h>
|
||||
#if defined(HAVE_LINK_H)
|
||||
# include <link.h>
|
||||
#endif /* HAVE_LINK_H */
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
//#include "protos.h"
|
||||
|
||||
/**
|
||||
* Reads an ELF file, and reads or alters the RPATH setting.
|
||||
*
|
||||
* TODO:
|
||||
* modify to add RPATH setting if none exists.
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
chrpath(const char *filename, const char *newpath, int convert)
|
||||
{
|
||||
int fd;
|
||||
Elf_Ehdr ehdr;
|
||||
int i;
|
||||
Elf_Phdr phdr;
|
||||
Elf_Shdr shdr;
|
||||
Elf_Dyn *dyns;
|
||||
int rpathoff;
|
||||
char * strtab;
|
||||
char * rpath;
|
||||
unsigned int rpathlen;
|
||||
int oflags;
|
||||
int rpath_dyns_index;
|
||||
|
||||
if (NULL == newpath && 0 == convert)
|
||||
oflags = O_RDONLY;
|
||||
else
|
||||
oflags = O_RDWR;
|
||||
|
||||
fd = elf_open(filename, oflags, &ehdr);
|
||||
if (fd == -1)
|
||||
{
|
||||
perror ("elf_open");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (0 != elf_find_dynamic_section(fd, &ehdr, &phdr))
|
||||
{
|
||||
perror("found no dynamic section");
|
||||
return 1;
|
||||
}
|
||||
|
||||
dyns = malloc(phdr.p_filesz);
|
||||
if (dyns == NULL)
|
||||
{
|
||||
perror ("allocating memory for dynamic section");
|
||||
return 1;
|
||||
}
|
||||
memset(dyns, 0, phdr.p_filesz);
|
||||
if (lseek(fd, phdr.p_offset, SEEK_SET) == -1
|
||||
|| read(fd, dyns, phdr.p_filesz) != (int)phdr.p_filesz)
|
||||
{
|
||||
perror ("reading dynamic section");
|
||||
free(dyns);
|
||||
return 1;
|
||||
}
|
||||
|
||||
rpathoff = -1;
|
||||
for ( rpath_dyns_index = 0; dyns[rpath_dyns_index].d_tag != DT_NULL;
|
||||
++rpath_dyns_index )
|
||||
{
|
||||
if ( elf_dynpath_tag(dyns[rpath_dyns_index].d_tag) )
|
||||
{
|
||||
rpathoff = dyns[rpath_dyns_index].d_un.d_ptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (rpathoff == -1)
|
||||
{
|
||||
printf("%s: no rpath or runpath tag found.\n", filename);
|
||||
free(dyns);
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (lseek(fd, ehdr.e_shoff, SEEK_SET) == -1)
|
||||
{
|
||||
perror ("positioning for sections");
|
||||
free(dyns);
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < ehdr.e_shnum; i++)
|
||||
{
|
||||
if (read(fd, &shdr, sizeof(shdr)) != sizeof(shdr))
|
||||
{
|
||||
perror ("reading section header");
|
||||
free(dyns);
|
||||
return 1;
|
||||
}
|
||||
if (shdr.sh_type == SHT_STRTAB)
|
||||
break;
|
||||
}
|
||||
if (i == ehdr.e_shnum)
|
||||
{
|
||||
fprintf (stderr, "No string table found.\n");
|
||||
free(dyns);
|
||||
return 2;
|
||||
}
|
||||
strtab = (char *)malloc(shdr.sh_size);
|
||||
if (strtab == NULL)
|
||||
{
|
||||
perror ("allocating memory for string table");
|
||||
free(dyns);
|
||||
return 1;
|
||||
}
|
||||
memset(strtab, 0, shdr.sh_size);
|
||||
|
||||
if (lseek(fd, shdr.sh_offset, SEEK_SET) == -1)
|
||||
{
|
||||
perror ("positioning for string table");
|
||||
free(strtab);
|
||||
free(dyns);
|
||||
return 1;
|
||||
}
|
||||
if (read(fd, strtab, shdr.sh_size) != (int)shdr.sh_size)
|
||||
{
|
||||
perror ("reading string table");
|
||||
free(strtab);
|
||||
free(dyns);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((int)shdr.sh_size < rpathoff)
|
||||
{
|
||||
fprintf(stderr, "%s string offset not contained in string table",
|
||||
elf_tagname(dyns[rpath_dyns_index].d_tag));
|
||||
free(strtab);
|
||||
free(dyns);
|
||||
return 5;
|
||||
}
|
||||
rpath = strtab+rpathoff;
|
||||
|
||||
#if defined(DT_RUNPATH)
|
||||
if (convert && dyns[rpath_dyns_index].d_tag == DT_RPATH)
|
||||
{
|
||||
dyns[rpath_dyns_index].d_tag = DT_RUNPATH;
|
||||
if (lseek(fd, phdr.p_offset, SEEK_SET) == -1
|
||||
|| write(fd, dyns, phdr.p_filesz) != (int)phdr.p_filesz)
|
||||
{
|
||||
perror ("converting RPATH to RUNPATH");
|
||||
return 1;
|
||||
}
|
||||
printf("%s: RPATH converted to RUNPATH\n", filename);
|
||||
}
|
||||
#endif /* DT_RUNPATH */
|
||||
|
||||
printf("%s: %s=%s\n", filename, elf_tagname(dyns[rpath_dyns_index].d_tag),
|
||||
rpath);
|
||||
|
||||
if (NULL == newpath)
|
||||
{
|
||||
free(dyns);
|
||||
free(strtab);
|
||||
return 0;
|
||||
}
|
||||
|
||||
rpathlen = strlen(rpath);
|
||||
|
||||
/*
|
||||
* Calculate the maximum rpath length (will be equal to rpathlen unless
|
||||
* we have previously truncated it).
|
||||
*/
|
||||
for ( i = rpathoff + rpathlen ; (i < (int)shdr.sh_size
|
||||
&& strtab[i] == '\0') ; i++ )
|
||||
;
|
||||
i--;
|
||||
|
||||
if (i > (int)(rpathoff + rpathlen))
|
||||
rpathlen = i - rpathoff;
|
||||
|
||||
if (strlen(newpath) > rpathlen)
|
||||
{
|
||||
fprintf(stderr, "new rpath '%s' too large; maximum length %i\n",
|
||||
newpath, rpathlen);
|
||||
free(dyns);
|
||||
free(strtab);
|
||||
return 7;
|
||||
}
|
||||
|
||||
memset(rpath, 0, rpathlen);
|
||||
strcpy(rpath, newpath);
|
||||
|
||||
if (lseek(fd, shdr.sh_offset+rpathoff, SEEK_SET) == -1)
|
||||
{
|
||||
perror ("positioning for RPATH");
|
||||
free(dyns);
|
||||
free(strtab);
|
||||
return 1;
|
||||
}
|
||||
if (write(fd, rpath, rpathlen) != (int)rpathlen)
|
||||
{
|
||||
perror ("writing RPATH");
|
||||
free(dyns);
|
||||
free(strtab);
|
||||
return 1;
|
||||
}
|
||||
printf("%s: new %s: %s\n", filename,
|
||||
elf_tagname(dyns[rpath_dyns_index].d_tag), rpath);
|
||||
|
||||
elf_close(fd);
|
||||
|
||||
free(dyns);
|
||||
dyns = NULL;
|
||||
|
||||
free(strtab);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
//# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <elf.h>
|
||||
#if defined(HAVE_SYS_LINK_H)
|
||||
# include <sys/link.h> /* Find DT_RPATH on Solaris 2.6 */
|
||||
#endif /* HAVE_SYS_LINK_H */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
//#include "protos.h"
|
||||
|
||||
int
|
||||
elf_open(const char *filename, int flags, Elf_Ehdr *ehdr)
|
||||
{
|
||||
int fd;
|
||||
|
||||
fd = open(filename, flags);
|
||||
if (fd == -1)
|
||||
{
|
||||
perror ("open");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (read(fd, ehdr, sizeof(*ehdr)) != sizeof(*ehdr))
|
||||
{
|
||||
perror ("reading header");
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (0 != memcmp(ehdr->e_ident, ELFMAG, SELFMAG) ||
|
||||
ehdr->e_ident[EI_CLASS] != ELFCLASS ||
|
||||
ehdr->e_ident[EI_DATA] != ELFDATA2 ||
|
||||
ehdr->e_ident[EI_VERSION] != EV_CURRENT)
|
||||
{
|
||||
fprintf(stderr,
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
"`%s' probably isn't a %d-bit MSB-first ELF file.\n",
|
||||
#else /* not WORD_BIGENDIAN */
|
||||
"`%s' probably isn't a %d-bit LSB-first ELF file.\n",
|
||||
#endif /* not WORD_BIGENDIAN */
|
||||
filename, SIZEOF_VOID_P * 8);
|
||||
close(fd);
|
||||
errno = ENOEXEC; /* Hm, is this the best errno code to use? */
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ehdr->e_phentsize != sizeof(Elf_Phdr))
|
||||
{
|
||||
fprintf(stderr, "section size was read as %d, not %d!\n",
|
||||
ehdr->e_phentsize, (int)sizeof(Elf_Phdr));
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
int
|
||||
elf_find_dynamic_section(int fd, Elf_Ehdr *ehdr, Elf_Phdr *phdr)
|
||||
{
|
||||
int i;
|
||||
if (lseek(fd, ehdr->e_phoff, SEEK_SET) == -1)
|
||||
{
|
||||
perror ("positioning for sections");
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < ehdr->e_phnum; i++)
|
||||
{
|
||||
if (read(fd, phdr, sizeof(*phdr)) != sizeof(*phdr))
|
||||
{
|
||||
perror ("reading section header");
|
||||
return 1;
|
||||
}
|
||||
if (phdr->p_type == PT_DYNAMIC)
|
||||
break;
|
||||
}
|
||||
if (i == ehdr->e_phnum)
|
||||
{
|
||||
fprintf (stderr, "No dynamic section found.\n");
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (0 == phdr->p_filesz)
|
||||
{
|
||||
fprintf (stderr, "Length of dynamic section is zero.\n");
|
||||
return 3;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
elf_close(int fd)
|
||||
{
|
||||
close(fd);
|
||||
}
|
||||
|
||||
const char *
|
||||
elf_tagname(int tag)
|
||||
{
|
||||
switch (tag) {
|
||||
case DT_RPATH:
|
||||
return "RPATH";
|
||||
break;
|
||||
#if defined(DT_RUNPATH)
|
||||
case DT_RUNPATH:
|
||||
return "RUNPATH";
|
||||
break;
|
||||
#endif /* DT_RUNPATH */
|
||||
}
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
int
|
||||
elf_dynpath_tag(int tag)
|
||||
{
|
||||
return ( tag == DT_RPATH
|
||||
#if defined(DT_RUNPATH)
|
||||
|| tag == DT_RUNPATH
|
||||
#endif /* DT_RUNPATH */
|
||||
);
|
||||
}
|
||||
/*
|
||||
Taken from another list:
|
||||
|
||||
_Changing_ is a little tricky, but the attached program strips rpaths
|
||||
from executables (I find it essential for debugging the binutils).
|
||||
It's endian-dependent, if you want this for x86 you can just change
|
||||
the occurrences of 'MSB' to 'LSB' and compile (I should really fix
|
||||
that).
|
||||
|
||||
--
|
||||
Geoffrey Keating <geoffk@ozemail.com.au>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
//# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <elf.h>
|
||||
#if defined(HAVE_LINK_H)
|
||||
# include <link.h>
|
||||
#endif /* HAVE_LINK_H */
|
||||
#include <stdlib.h>
|
||||
//#include "protos.h"
|
||||
#include <string.h>
|
||||
|
||||
/* Reads an ELF file, nukes all the RPATH entries. */
|
||||
|
||||
int
|
||||
killrpath(const char *filename)
|
||||
{
|
||||
int fd;
|
||||
Elf_Ehdr ehdr;
|
||||
int i;
|
||||
Elf_Phdr phdr;
|
||||
Elf_Dyn *dyns;
|
||||
int dynpos;
|
||||
|
||||
fd = elf_open(filename, O_RDWR, &ehdr);
|
||||
|
||||
if (fd == -1)
|
||||
{
|
||||
perror ("elf_open");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (0 != elf_find_dynamic_section(fd, &ehdr, &phdr))
|
||||
{
|
||||
perror("found no dynamic section");
|
||||
return 1;
|
||||
}
|
||||
|
||||
dyns = malloc(phdr.p_memsz);
|
||||
if (dyns == NULL)
|
||||
{
|
||||
perror ("allocating memory for dynamic section");
|
||||
return 1;
|
||||
}
|
||||
memset(dyns, 0, phdr.p_memsz);
|
||||
if (lseek(fd, phdr.p_offset, SEEK_SET) == -1
|
||||
|| read(fd, dyns, phdr.p_filesz) != (int)phdr.p_filesz)
|
||||
{
|
||||
perror ("reading dynamic section");
|
||||
return 1;
|
||||
}
|
||||
|
||||
dynpos = 0;
|
||||
for (i = 0; dyns[i].d_tag != DT_NULL; i++)
|
||||
{
|
||||
dyns[dynpos] = dyns[i];
|
||||
if ( ! elf_dynpath_tag(dyns[i].d_tag) )
|
||||
dynpos++;
|
||||
}
|
||||
for (; dynpos < i; dynpos++)
|
||||
dyns[dynpos].d_tag = DT_NULL;
|
||||
|
||||
if (lseek(fd, phdr.p_offset, SEEK_SET) == -1
|
||||
|| write(fd, dyns, phdr.p_filesz) != (int)phdr.p_filesz)
|
||||
{
|
||||
perror ("writing dynamic section");
|
||||
return 1;
|
||||
}
|
||||
|
||||
elf_close(fd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* Author: Petter Reinholdtsen <pere@hungry.com>
|
||||
* date: 2001-01-20
|
||||
*
|
||||
* Alter ELF rpath information (insert, modify, remove).
|
||||
*
|
||||
* Based on source from Peeter Joot <peeterj@ca.ibm.com> and Geoffrey
|
||||
* Keating <geoffk@ozemail.com.au>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
//# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
//#include "protos.h"
|
||||
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
# define GETOPT_LONG getopt_long
|
||||
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{"convert", 0, 0, 'c'},
|
||||
{"delete", 0, 0, 'd'},
|
||||
{"help", 0, 0, 'h'},
|
||||
{"keepgoing", 0, 0, 'k'},
|
||||
{"list", 0, 0, 'l'},
|
||||
{"replace", 1, 0, 'r'},
|
||||
{"version", 0, 0, 'v'}
|
||||
};
|
||||
|
||||
#else /* not HAVE_GETOPT_LONG */
|
||||
# define GETOPT_LONG(argc,argv,optstr,lopts,lidx) getopt(argc,argv,optstr)
|
||||
#endif /* not HAVE_GETOPT_LONG */
|
||||
|
||||
static void
|
||||
usage(char *progname)
|
||||
{
|
||||
printf("Usage: %s [-v|-d|-c|-r <path>] <program> [<program> ...]\n\n",
|
||||
progname);
|
||||
printf(" -v|--version Display program version number\n");
|
||||
printf(" -d|--delete Delete current rpath/runpath setting\n");
|
||||
#if defined(DT_RUNPATH)
|
||||
printf(" -c|--convert Convert rpath to runpath\n");
|
||||
#endif /* DT_RUNPATH */
|
||||
printf(" -r <path>|--replace <path> Replace current rpath/runpath setting\n");
|
||||
printf(" with the path given\n");
|
||||
printf(" -l|--list List the current rpath/runpath (default)\n");
|
||||
printf(" -h|--help Show this usage information.\n");
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
printf("\n *** The long options are not available on this platform");
|
||||
#endif /* not HAVE_GETOPT_LONG */
|
||||
#if !defined(DT_RUNPATH)
|
||||
printf("\n *** There is no support for runpath on this platform");
|
||||
#endif /* DT_RUNPATH */
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char * const argv[])
|
||||
{
|
||||
int retval = 0;
|
||||
int convert = 0; /* convert to given type */
|
||||
int remove = 0; /* remove or not */
|
||||
int keep_going = 0; /* Break on first error, or keep going? */
|
||||
char *newpath = NULL; /* insert this path */
|
||||
int opt;
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
int option_index = 0;
|
||||
#endif /* HAVE_GETOPT_LONG */
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
usage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
do {
|
||||
opt = GETOPT_LONG(argc, argv, "cdhklr:v", long_options, &option_index);
|
||||
switch (opt)
|
||||
{
|
||||
#if defined(DT_RUNPATH)
|
||||
case 'c':
|
||||
convert = 1;
|
||||
break;
|
||||
#endif /* DT_RUNPATH */
|
||||
case 'd':
|
||||
remove = 1;
|
||||
break;
|
||||
case 'k':
|
||||
keep_going = 1;
|
||||
break;
|
||||
case 'r':
|
||||
newpath = optarg;
|
||||
break;
|
||||
case 'v':
|
||||
printf("%s version %s\n", PACKAGE, VERSION);
|
||||
exit(0);
|
||||
break;
|
||||
case 'l': /* This is the default action */
|
||||
newpath = NULL;
|
||||
break;
|
||||
case -1:
|
||||
break;
|
||||
default:
|
||||
printf("Invalid argument '%c'\n", opt);
|
||||
case 'h':
|
||||
usage(argv[0]);
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
} while (-1 != opt);
|
||||
|
||||
while (optind < argc && (!retval || keep_going))
|
||||
{
|
||||
if (remove)
|
||||
retval |= killrpath(argv[optind++]);
|
||||
else
|
||||
/* list by default, replace if path is set */
|
||||
retval |= chrpath(argv[optind++], newpath, convert);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
@ -26,8 +26,20 @@ build_freetype()
|
|||
tar xzf "freetype-$version.tar.gz"
|
||||
cd "freetype-$version"
|
||||
./configure --prefix="$DEPLOYDIR" $extra_config_flags
|
||||
make -j"$NUMCPU"
|
||||
make install
|
||||
|
||||
MAKEBIN=make
|
||||
if [ "`uname -a | grep -i bsd`" ]; then
|
||||
MAKEBIN=gmake
|
||||
SAVEPATH=$PATH
|
||||
PATH=.:$PATH
|
||||
fi
|
||||
|
||||
$MAKEBIN -j"$NUMCPU"
|
||||
$MAKEBIN install
|
||||
|
||||
if [ "`uname -a | grep -i bsd`" ]; then
|
||||
PATH=$SAVEPATH
|
||||
fi
|
||||
}
|
||||
|
||||
build_libxml2()
|
||||
|
|
@ -48,8 +60,14 @@ build_libxml2()
|
|||
tar xzf "libxml2-$version.tar.gz"
|
||||
cd "libxml2-$version"
|
||||
./configure --prefix="$DEPLOYDIR" --without-ftp --without-http --without-python
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
|
||||
MAKEBIN=make
|
||||
if [ "`uname -a | grep -i bsd`" ]; then
|
||||
MAKEBIN=gmake
|
||||
fi
|
||||
|
||||
$MAKEBIN -j$NUMCPU
|
||||
$MAKEBIN install
|
||||
}
|
||||
|
||||
build_fontconfig()
|
||||
|
|
@ -107,6 +125,10 @@ build_gettext()
|
|||
echo "gettext already installed. not building"
|
||||
return
|
||||
fi
|
||||
if [ -f "$DEPLOYDIR"/lib/libgettextpo.dll ]; then
|
||||
echo "gettext already installed. not building"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Building gettext $version..."
|
||||
cd "$BASEDIR"/src
|
||||
|
|
@ -117,7 +139,8 @@ build_gettext()
|
|||
tar xzf "gettext-$version.tar.gz"
|
||||
cd "gettext-$version"
|
||||
|
||||
./configure --prefix="$DEPLOYDIR" --disable-java --disable-native-java
|
||||
./configure --prefix="$DEPLOYDIR" --disable-java --disable-native-java --enable-shared
|
||||
#exit
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
}
|
||||
|
|
@ -142,10 +165,19 @@ build_glib2()
|
|||
cd "glib-$version"
|
||||
|
||||
export PKG_CONFIG_PATH="$DEPLOYDIR/lib/pkgconfig"
|
||||
./configure --disable-gtk-doc --disable-man --prefix="$DEPLOYDIR" CFLAGS="-I$DEPLOYDIR/include" LDFLAGS="-L$DEPLOYDIR/lib"
|
||||
|
||||
MAKEBIN=make
|
||||
DTRACEFLAG=
|
||||
if [ "`uname -a | grep -i bsd`" ]; then
|
||||
DTRACEFLAG=--disable-dtrace
|
||||
MAKEBIN=gmake
|
||||
fi
|
||||
|
||||
./configure $DTRACEFLAG --disable-gtk-doc --disable-man --prefix="$DEPLOYDIR" CFLAGS="-I$DEPLOYDIR/include" LDFLAGS="-L$DEPLOYDIR/lib"
|
||||
unset PKG_CONFIG_PATH
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
|
||||
$MAKEBIN -j$NUMCPU
|
||||
$MAKEBIN install
|
||||
}
|
||||
|
||||
build_ragel()
|
||||
|
|
@ -178,7 +210,7 @@ build_harfbuzz()
|
|||
|
||||
if [ -e $DEPLOYDIR/include/harfbuzz ]; then
|
||||
echo "harfbuzz already installed. not building"
|
||||
return
|
||||
echo return
|
||||
fi
|
||||
|
||||
echo "Building harfbuzz $version..."
|
||||
|
|
@ -192,7 +224,20 @@ build_harfbuzz()
|
|||
# disable doc directories as they make problems on Mac OS Build
|
||||
sed -e "s/SUBDIRS = src util test docs/SUBDIRS = src util test/g" Makefile.am > Makefile.am.bak && mv Makefile.am.bak Makefile.am
|
||||
sed -e "s/^docs.*$//" configure.ac > configure.ac.bak && mv configure.ac.bak configure.ac
|
||||
./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no $extra_config_flags
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
|
||||
export PKG_CONFIG_PATH="$DEPLOYDIR/lib/pkgconfig"
|
||||
export PKG_CONFIG=$DEPLOYDIR/bin/pkg-config
|
||||
|
||||
sh ./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no $extra_config_flags
|
||||
|
||||
unset PKG_CONFIG_PATH
|
||||
unset PKG_CONFIG
|
||||
|
||||
MAKEBIN=make
|
||||
if [ "`uname -a | grep -i bsd`" ]; then
|
||||
MAKEBIN=gmake
|
||||
fi
|
||||
|
||||
$MAKEBIN -j$NUMCPU
|
||||
$MAKEBIN install
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,21 @@
|
|||
EXAMPLES := ../../examples
|
||||
LOG := out.log
|
||||
SRC=$(wildcard $(EXAMPLES)/*/*.scad)
|
||||
PNG=$(patsubst $(EXAMPLES)/%.scad,html/%.png,$(SRC))
|
||||
HTML=$(patsubst $(EXAMPLES)/%.scad,html/%.html,$(SRC))
|
||||
|
||||
OPENSCAD := ../../OpenSCAD.app/Contents/MacOS/OpenSCAD
|
||||
#OPENSCAD := openscad
|
||||
OPENSCAD := $(shell ls ../../openscad ../../OpenSCAD.app/Contents/MacOS/OpenSCAD 2>/dev/null | head -n 1)
|
||||
ARGS := --imgsize=1200,900 --camera=0,0,0,55,0,25,180 --viewall --autocenter
|
||||
|
||||
all : $(PNG) $(HTML) example-data.js assets
|
||||
all : info $(PNG) $(HTML) example-data.js assets
|
||||
|
||||
.PHONY: info
|
||||
info:
|
||||
@echo Using $(OPENSCAD)
|
||||
|
||||
.PHONY: clean
|
||||
clean :
|
||||
rm -rf html
|
||||
rm -rf html $(LOG)
|
||||
|
||||
.PHONY: assets
|
||||
assets :
|
||||
|
|
@ -21,7 +25,7 @@ assets :
|
|||
example-data.js :
|
||||
( \
|
||||
echo "openscad_examples = ["; \
|
||||
for a in Basics Functions Shapes Extrusion Advanced; \
|
||||
for a in `grep '\[' ../../examples/examples.json | tr -d ' \t":[]'`; \
|
||||
do \
|
||||
echo " {"; \
|
||||
echo " name : \"$$a\","; \
|
||||
|
|
@ -38,7 +42,7 @@ example-data.js :
|
|||
|
||||
html/%.png : $(EXAMPLES)/%.scad
|
||||
mkdir -p `dirname $@`
|
||||
$(OPENSCAD) $(ARGS) -o $@ $< > out.log 2>&1
|
||||
$(OPENSCAD) $(ARGS) -o $@ $< > $(LOG) 2>&1
|
||||
|
||||
html/%.html : $(EXAMPLES)/%.scad template-pre.html template-post.html
|
||||
#echo $(notdir $(patsubst %.scad,%.png,$<))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
.rainbow {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.rainbow .line:hover {
|
||||
background-color: #eee8d5;
|
||||
}
|
||||
.rainbow .line .line-number {
|
||||
text-align: right;
|
||||
background-color: #eee8d5;
|
||||
padding-left: 0.8em;
|
||||
padding-right: 0.8em;
|
||||
}
|
||||
.rainbow .line .line-number:before {
|
||||
content: attr(data-line-number);
|
||||
}
|
||||
.rainbow .line .line-code {
|
||||
padding-left: 1em;
|
||||
width: 100%;
|
||||
}
|
||||
14
scripts/examples-html/assets/js/README
Normal file
14
scripts/examples-html/assets/js/README
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
JavaScript Libraries:
|
||||
|
||||
Rainbow by Craig Campbell
|
||||
* https://github.com/ccampbell/rainbow
|
||||
* Apache License, Version 2.0
|
||||
|
||||
Rainbow.linenumbers.js by Blender3D
|
||||
* https://github.com/Blender3D/rainbow.linenumbers.js
|
||||
* Apache License, Version 2.0
|
||||
|
||||
Dropdown Menu by Oliver Gast
|
||||
* http://www.olivergast.de/blog/2012/04/18/css3-dropdown-menu/
|
||||
* (update in http://www.olivergast.de/blog/2015/05/12/css-ein-horizontales-dropdown-menue-reloaded/)
|
||||
* No specific license, download states "download for free usage"
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* Generic language patterns
|
||||
*
|
||||
* @author Craig Campbell
|
||||
* @version 1.0.11
|
||||
* @version 1.0.13
|
||||
*/
|
||||
Rainbow.extend([
|
||||
{
|
||||
|
|
@ -25,7 +25,7 @@ Rainbow.extend([
|
|||
}
|
||||
}
|
||||
},
|
||||
'pattern': /(\(|\s|\[|\=|:|\+|\.)(('|")([^\\\1]|\\.)*?(\3))/gm
|
||||
'pattern': /(\(|\s|\[|\=|:|\+|\.|\{)(('|")([^\\\1]|\\.)*?(\3))/gm
|
||||
},
|
||||
{
|
||||
'name': 'comment',
|
||||
|
|
|
|||
798
scripts/examples-html/assets/js/rainbow.js
Normal file
798
scripts/examples-html/assets/js/rainbow.js
Normal file
|
|
@ -0,0 +1,798 @@
|
|||
/**
|
||||
* Copyright 2013 Craig Campbell
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Rainbow is a simple code syntax highlighter
|
||||
*
|
||||
* @preserve @version 1.2
|
||||
* @url rainbowco.de
|
||||
*/
|
||||
window['Rainbow'] = (function() {
|
||||
|
||||
/**
|
||||
* array of replacements to process at the end
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
var replacements = {},
|
||||
|
||||
/**
|
||||
* an array of start and end positions of blocks to be replaced
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
replacement_positions = {},
|
||||
|
||||
/**
|
||||
* an array of the language patterns specified for each language
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
language_patterns = {},
|
||||
|
||||
/**
|
||||
* an array of languages and whether they should bypass the default patterns
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
bypass_defaults = {},
|
||||
|
||||
/**
|
||||
* processing level
|
||||
*
|
||||
* replacements are stored at this level so if there is a sub block of code
|
||||
* (for example php inside of html) it runs at a different level
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
CURRENT_LEVEL = 0,
|
||||
|
||||
/**
|
||||
* constant used to refer to the default language
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
DEFAULT_LANGUAGE = 0,
|
||||
|
||||
/**
|
||||
* used as counters so we can selectively call setTimeout
|
||||
* after processing a certain number of matches/replacements
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
match_counter = 0,
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
replacement_counter = 0,
|
||||
|
||||
/**
|
||||
* @type {null|string}
|
||||
*/
|
||||
global_class,
|
||||
|
||||
/**
|
||||
* @type {null|Function}
|
||||
*/
|
||||
onHighlight;
|
||||
|
||||
/**
|
||||
* cross browser get attribute for an element
|
||||
*
|
||||
* @see http://stackoverflow.com/questions/3755227/cross-browser-javascript-getattribute-method
|
||||
*
|
||||
* @param {Node} el
|
||||
* @param {string} attr attribute you are trying to get
|
||||
* @returns {string|number}
|
||||
*/
|
||||
function _attr(el, attr, attrs, i) {
|
||||
var result = (el.getAttribute && el.getAttribute(attr)) || 0;
|
||||
|
||||
if (!result) {
|
||||
attrs = el.attributes;
|
||||
|
||||
for (i = 0; i < attrs.length; ++i) {
|
||||
if (attrs[i].nodeName === attr) {
|
||||
return attrs[i].nodeValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* adds a class to a given code block
|
||||
*
|
||||
* @param {Element} el
|
||||
* @param {string} class_name class name to add
|
||||
* @returns void
|
||||
*/
|
||||
function _addClass(el, class_name) {
|
||||
el.className += el.className ? ' ' + class_name : class_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* checks if a block has a given class
|
||||
*
|
||||
* @param {Element} el
|
||||
* @param {string} class_name class name to check for
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function _hasClass(el, class_name) {
|
||||
return (' ' + el.className + ' ').indexOf(' ' + class_name + ' ') > -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the language for this block of code
|
||||
*
|
||||
* @param {Element} block
|
||||
* @returns {string|null}
|
||||
*/
|
||||
function _getLanguageForBlock(block) {
|
||||
|
||||
// if this doesn't have a language but the parent does then use that
|
||||
// this means if for example you have: <pre data-language="php">
|
||||
// with a bunch of <code> blocks inside then you do not have
|
||||
// to specify the language for each block
|
||||
var language = _attr(block, 'data-language') || _attr(block.parentNode, 'data-language');
|
||||
|
||||
// this adds support for specifying language via a css class
|
||||
// you can use the Google Code Prettify style: <pre class="lang-php">
|
||||
// or the HTML5 style: <pre><code class="language-php">
|
||||
if (!language) {
|
||||
var pattern = /\blang(?:uage)?-(\w+)/,
|
||||
match = block.className.match(pattern) || block.parentNode.className.match(pattern);
|
||||
|
||||
if (match) {
|
||||
language = match[1];
|
||||
}
|
||||
}
|
||||
|
||||
return language;
|
||||
}
|
||||
|
||||
/**
|
||||
* makes sure html entities are always used for tags
|
||||
*
|
||||
* @param {string} code
|
||||
* @returns {string}
|
||||
*/
|
||||
function _htmlEntities(code) {
|
||||
return code.replace(/</g, '<').replace(/>/g, '>').replace(/&(?![\w\#]+;)/g, '&');
|
||||
}
|
||||
|
||||
/**
|
||||
* determines if a new match intersects with an existing one
|
||||
*
|
||||
* @param {number} start1 start position of existing match
|
||||
* @param {number} end1 end position of existing match
|
||||
* @param {number} start2 start position of new match
|
||||
* @param {number} end2 end position of new match
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function _intersects(start1, end1, start2, end2) {
|
||||
if (start2 >= start1 && start2 < end1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return end2 > start1 && end2 < end1;
|
||||
}
|
||||
|
||||
/**
|
||||
* determines if two different matches have complete overlap with each other
|
||||
*
|
||||
* @param {number} start1 start position of existing match
|
||||
* @param {number} end1 end position of existing match
|
||||
* @param {number} start2 start position of new match
|
||||
* @param {number} end2 end position of new match
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function _hasCompleteOverlap(start1, end1, start2, end2) {
|
||||
|
||||
// if the starting and end positions are exactly the same
|
||||
// then the first one should stay and this one should be ignored
|
||||
if (start2 == start1 && end2 == end1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return start2 <= start1 && end2 >= end1;
|
||||
}
|
||||
|
||||
/**
|
||||
* determines if the match passed in falls inside of an existing match
|
||||
* this prevents a regex pattern from matching inside of a bigger pattern
|
||||
*
|
||||
* @param {number} start - start position of new match
|
||||
* @param {number} end - end position of new match
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function _matchIsInsideOtherMatch(start, end) {
|
||||
for (var key in replacement_positions[CURRENT_LEVEL]) {
|
||||
key = parseInt(key, 10);
|
||||
|
||||
// if this block completely overlaps with another block
|
||||
// then we should remove the other block and return false
|
||||
if (_hasCompleteOverlap(key, replacement_positions[CURRENT_LEVEL][key], start, end)) {
|
||||
delete replacement_positions[CURRENT_LEVEL][key];
|
||||
delete replacements[CURRENT_LEVEL][key];
|
||||
}
|
||||
|
||||
if (_intersects(key, replacement_positions[CURRENT_LEVEL][key], start, end)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* takes a string of code and wraps it in a span tag based on the name
|
||||
*
|
||||
* @param {string} name name of the pattern (ie keyword.regex)
|
||||
* @param {string} code block of code to wrap
|
||||
* @returns {string}
|
||||
*/
|
||||
function _wrapCodeInSpan(name, code) {
|
||||
return '<span class="' + name.replace(/\./g, ' ') + (global_class ? ' ' + global_class : '') + '">' + code + '</span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* finds out the position of group match for a regular expression
|
||||
*
|
||||
* @see http://stackoverflow.com/questions/1985594/how-to-find-index-of-groups-in-match
|
||||
*
|
||||
* @param {Object} match
|
||||
* @param {number} group_number
|
||||
* @returns {number}
|
||||
*/
|
||||
function _indexOfGroup(match, group_number) {
|
||||
var index = 0,
|
||||
i;
|
||||
|
||||
for (i = 1; i < group_number; ++i) {
|
||||
if (match[i]) {
|
||||
index += match[i].length;
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
/**
|
||||
* matches a regex pattern against a block of code
|
||||
* finds all matches that should be processed and stores the positions
|
||||
* of where they should be replaced within the string
|
||||
*
|
||||
* this is where pretty much all the work is done but it should not
|
||||
* be called directly
|
||||
*
|
||||
* @param {RegExp} pattern
|
||||
* @param {string} code
|
||||
* @returns void
|
||||
*/
|
||||
function _processPattern(regex, pattern, code, callback)
|
||||
{
|
||||
if (typeof regex === "undefined" || regex === null) {
|
||||
//console.warn("undefined regular expression")
|
||||
return callback();
|
||||
}
|
||||
var match = regex.exec(code);
|
||||
|
||||
if (!match) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
++match_counter;
|
||||
|
||||
// treat match 0 the same way as name
|
||||
if (!pattern['name'] && typeof pattern['matches'][0] == 'string') {
|
||||
pattern['name'] = pattern['matches'][0];
|
||||
delete pattern['matches'][0];
|
||||
}
|
||||
|
||||
var replacement = match[0],
|
||||
start_pos = match.index,
|
||||
end_pos = match[0].length + start_pos,
|
||||
|
||||
/**
|
||||
* callback to process the next match of this pattern
|
||||
*/
|
||||
processNext = function() {
|
||||
var nextCall = function() {
|
||||
_processPattern(regex, pattern, code, callback);
|
||||
};
|
||||
|
||||
// every 100 items we process let's call set timeout
|
||||
// to let the ui breathe a little
|
||||
return match_counter % 100 > 0 ? nextCall() : setTimeout(nextCall, 0);
|
||||
};
|
||||
|
||||
// if this is not a child match and it falls inside of another
|
||||
// match that already happened we should skip it and continue processing
|
||||
if (_matchIsInsideOtherMatch(start_pos, end_pos)) {
|
||||
return processNext();
|
||||
}
|
||||
|
||||
/**
|
||||
* callback for when a match was successfully processed
|
||||
*
|
||||
* @param {string} replacement
|
||||
* @returns void
|
||||
*/
|
||||
var onMatchSuccess = function(replacement) {
|
||||
// if this match has a name then wrap it in a span tag
|
||||
if (pattern['name']) {
|
||||
replacement = _wrapCodeInSpan(pattern['name'], replacement);
|
||||
}
|
||||
|
||||
// console.log('LEVEL', CURRENT_LEVEL, 'replace', match[0], 'with', replacement, 'at position', start_pos, 'to', end_pos);
|
||||
|
||||
// store what needs to be replaced with what at this position
|
||||
if (!replacements[CURRENT_LEVEL]) {
|
||||
replacements[CURRENT_LEVEL] = {};
|
||||
replacement_positions[CURRENT_LEVEL] = {};
|
||||
}
|
||||
|
||||
replacements[CURRENT_LEVEL][start_pos] = {
|
||||
'replace': match[0],
|
||||
'with': replacement
|
||||
};
|
||||
|
||||
// store the range of this match so we can use it for comparisons
|
||||
// with other matches later
|
||||
replacement_positions[CURRENT_LEVEL][start_pos] = end_pos;
|
||||
|
||||
// process the next match
|
||||
processNext();
|
||||
},
|
||||
|
||||
// if this pattern has sub matches for different groups in the regex
|
||||
// then we should process them one at a time by rerunning them through
|
||||
// this function to generate the new replacement
|
||||
//
|
||||
// we run through them backwards because the match position of earlier
|
||||
// matches will not change depending on what gets replaced in later
|
||||
// matches
|
||||
group_keys = keys(pattern['matches']),
|
||||
|
||||
/**
|
||||
* callback for processing a sub group
|
||||
*
|
||||
* @param {number} i
|
||||
* @param {Array} group_keys
|
||||
* @param {Function} callback
|
||||
*/
|
||||
processGroup = function(i, group_keys, callback) {
|
||||
if (i >= group_keys.length) {
|
||||
return callback(replacement);
|
||||
}
|
||||
|
||||
var processNextGroup = function() {
|
||||
processGroup(++i, group_keys, callback);
|
||||
},
|
||||
block = match[group_keys[i]];
|
||||
|
||||
// if there is no match here then move on
|
||||
if (!block) {
|
||||
return processNextGroup();
|
||||
}
|
||||
|
||||
var group = pattern['matches'][group_keys[i]],
|
||||
language = group['language'],
|
||||
|
||||
/**
|
||||
* process group is what group we should use to actually process
|
||||
* this match group
|
||||
*
|
||||
* for example if the subgroup pattern looks like this
|
||||
* 2: {
|
||||
* 'name': 'keyword',
|
||||
* 'pattern': /true/g
|
||||
* }
|
||||
*
|
||||
* then we use that as is, but if it looks like this
|
||||
*
|
||||
* 2: {
|
||||
* 'name': 'keyword',
|
||||
* 'matches': {
|
||||
* 'name': 'special',
|
||||
* 'pattern': /whatever/g
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* we treat the 'matches' part as the pattern and keep
|
||||
* the name around to wrap it with later
|
||||
*/
|
||||
process_group = group['name'] && group['matches'] ? group['matches'] : group,
|
||||
|
||||
/**
|
||||
* takes the code block matched at this group, replaces it
|
||||
* with the highlighted block, and optionally wraps it with
|
||||
* a span with a name
|
||||
*
|
||||
* @param {string} block
|
||||
* @param {string} replace_block
|
||||
* @param {string|null} match_name
|
||||
*/
|
||||
_replaceAndContinue = function(block, replace_block, match_name) {
|
||||
replacement = _replaceAtPosition(_indexOfGroup(match, group_keys[i]), block, match_name ? _wrapCodeInSpan(match_name, replace_block) : replace_block, replacement);
|
||||
processNextGroup();
|
||||
};
|
||||
|
||||
// if this is a sublanguage go and process the block using that language
|
||||
if (language) {
|
||||
return _highlightBlockForLanguage(block, language, function(code) {
|
||||
_replaceAndContinue(block, code);
|
||||
});
|
||||
}
|
||||
|
||||
// if this is a string then this match is directly mapped to selector
|
||||
// so all we have to do is wrap it in a span and continue
|
||||
if (typeof group === 'string') {
|
||||
return _replaceAndContinue(block, block, group);
|
||||
}
|
||||
|
||||
// the process group can be a single pattern or an array of patterns
|
||||
// _processCodeWithPatterns always expects an array so we convert it here
|
||||
_processCodeWithPatterns(block, process_group.length ? process_group : [process_group], function(code) {
|
||||
_replaceAndContinue(block, code, group['matches'] ? group['name'] : 0);
|
||||
});
|
||||
};
|
||||
|
||||
processGroup(0, group_keys, onMatchSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* should a language bypass the default patterns?
|
||||
*
|
||||
* if you call Rainbow.extend() and pass true as the third argument
|
||||
* it will bypass the defaults
|
||||
*/
|
||||
function _bypassDefaultPatterns(language)
|
||||
{
|
||||
return bypass_defaults[language];
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a list of regex patterns for this language
|
||||
*
|
||||
* @param {string} language
|
||||
* @returns {Array}
|
||||
*/
|
||||
function _getPatternsForLanguage(language) {
|
||||
var patterns = language_patterns[language] || [],
|
||||
default_patterns = language_patterns[DEFAULT_LANGUAGE] || [];
|
||||
|
||||
return _bypassDefaultPatterns(language) ? patterns : patterns.concat(default_patterns);
|
||||
}
|
||||
|
||||
/**
|
||||
* substring replace call to replace part of a string at a certain position
|
||||
*
|
||||
* @param {number} position the position where the replacement should happen
|
||||
* @param {string} replace the text we want to replace
|
||||
* @param {string} replace_with the text we want to replace it with
|
||||
* @param {string} code the code we are doing the replacing in
|
||||
* @returns {string}
|
||||
*/
|
||||
function _replaceAtPosition(position, replace, replace_with, code) {
|
||||
var sub_string = code.substr(position);
|
||||
return code.substr(0, position) + sub_string.replace(replace, replace_with);
|
||||
}
|
||||
|
||||
/**
|
||||
* sorts an object by index descending
|
||||
*
|
||||
* @param {Object} object
|
||||
* @return {Array}
|
||||
*/
|
||||
function keys(object) {
|
||||
var locations = [],
|
||||
replacement,
|
||||
pos;
|
||||
|
||||
for(var location in object) {
|
||||
if (object.hasOwnProperty(location)) {
|
||||
locations.push(location);
|
||||
}
|
||||
}
|
||||
|
||||
// numeric descending
|
||||
return locations.sort(function(a, b) {
|
||||
return b - a;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* processes a block of code using specified patterns
|
||||
*
|
||||
* @param {string} code
|
||||
* @param {Array} patterns
|
||||
* @returns void
|
||||
*/
|
||||
function _processCodeWithPatterns(code, patterns, callback)
|
||||
{
|
||||
// we have to increase the level here so that the
|
||||
// replacements will not conflict with each other when
|
||||
// processing sub blocks of code
|
||||
++CURRENT_LEVEL;
|
||||
|
||||
// patterns are processed one at a time through this function
|
||||
function _workOnPatterns(patterns, i)
|
||||
{
|
||||
// still have patterns to process, keep going
|
||||
if (i < patterns.length) {
|
||||
return _processPattern(patterns[i]['pattern'], patterns[i], code, function() {
|
||||
_workOnPatterns(patterns, ++i);
|
||||
});
|
||||
}
|
||||
|
||||
// we are done processing the patterns
|
||||
// process the replacements and update the DOM
|
||||
_processReplacements(code, function(code) {
|
||||
|
||||
// when we are done processing replacements
|
||||
// we are done at this level so we can go back down
|
||||
delete replacements[CURRENT_LEVEL];
|
||||
delete replacement_positions[CURRENT_LEVEL];
|
||||
--CURRENT_LEVEL;
|
||||
callback(code);
|
||||
});
|
||||
}
|
||||
|
||||
_workOnPatterns(patterns, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* process replacements in the string of code to actually update the markup
|
||||
*
|
||||
* @param {string} code the code to process replacements in
|
||||
* @param {Function} onComplete what to do when we are done processing
|
||||
* @returns void
|
||||
*/
|
||||
function _processReplacements(code, onComplete) {
|
||||
|
||||
/**
|
||||
* processes a single replacement
|
||||
*
|
||||
* @param {string} code
|
||||
* @param {Array} positions
|
||||
* @param {number} i
|
||||
* @param {Function} onComplete
|
||||
* @returns void
|
||||
*/
|
||||
function _processReplacement(code, positions, i, onComplete) {
|
||||
if (i < positions.length) {
|
||||
++replacement_counter;
|
||||
var pos = positions[i],
|
||||
replacement = replacements[CURRENT_LEVEL][pos];
|
||||
code = _replaceAtPosition(pos, replacement['replace'], replacement['with'], code);
|
||||
|
||||
// process next function
|
||||
var next = function() {
|
||||
_processReplacement(code, positions, ++i, onComplete);
|
||||
};
|
||||
|
||||
// use a timeout every 250 to not freeze up the UI
|
||||
return replacement_counter % 250 > 0 ? next() : setTimeout(next, 0);
|
||||
}
|
||||
|
||||
onComplete(code);
|
||||
}
|
||||
|
||||
var string_positions = keys(replacements[CURRENT_LEVEL]);
|
||||
_processReplacement(code, string_positions, 0, onComplete);
|
||||
}
|
||||
|
||||
/**
|
||||
* takes a string of code and highlights it according to the language specified
|
||||
*
|
||||
* @param {string} code
|
||||
* @param {string} language
|
||||
* @param {Function} onComplete
|
||||
* @returns void
|
||||
*/
|
||||
function _highlightBlockForLanguage(code, language, onComplete) {
|
||||
var patterns = _getPatternsForLanguage(language);
|
||||
_processCodeWithPatterns(_htmlEntities(code), patterns, onComplete);
|
||||
}
|
||||
|
||||
/**
|
||||
* highlight an individual code block
|
||||
*
|
||||
* @param {Array} code_blocks
|
||||
* @param {number} i
|
||||
* @returns void
|
||||
*/
|
||||
function _highlightCodeBlock(code_blocks, i, onComplete) {
|
||||
if (i < code_blocks.length) {
|
||||
var block = code_blocks[i],
|
||||
language = _getLanguageForBlock(block);
|
||||
|
||||
if (!_hasClass(block, 'rainbow') && language) {
|
||||
language = language.toLowerCase();
|
||||
|
||||
_addClass(block, 'rainbow');
|
||||
|
||||
return _highlightBlockForLanguage(block.innerHTML, language, function(code) {
|
||||
block.innerHTML = code;
|
||||
|
||||
// reset the replacement arrays
|
||||
replacements = {};
|
||||
replacement_positions = {};
|
||||
|
||||
// if you have a listener attached tell it that this block is now highlighted
|
||||
if (onHighlight) {
|
||||
onHighlight(block, language);
|
||||
}
|
||||
|
||||
// process the next block
|
||||
setTimeout(function() {
|
||||
_highlightCodeBlock(code_blocks, ++i, onComplete);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
return _highlightCodeBlock(code_blocks, ++i, onComplete);
|
||||
}
|
||||
|
||||
if (onComplete) {
|
||||
onComplete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* start highlighting all the code blocks
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
function _highlight(node, onComplete) {
|
||||
|
||||
// the first argument can be an Event or a DOM Element
|
||||
// I was originally checking instanceof Event but that makes it break
|
||||
// when using mootools
|
||||
//
|
||||
// @see https://github.com/ccampbell/rainbow/issues/32
|
||||
//
|
||||
node = node && typeof node.getElementsByTagName == 'function' ? node : document;
|
||||
|
||||
var pre_blocks = node.getElementsByTagName('pre'),
|
||||
code_blocks = node.getElementsByTagName('code'),
|
||||
i,
|
||||
final_pre_blocks = [],
|
||||
final_code_blocks = [];
|
||||
|
||||
// first loop through all pre blocks to find which ones to highlight
|
||||
// also strip whitespace
|
||||
for (i = 0; i < pre_blocks.length; ++i) {
|
||||
|
||||
// strip whitespace around code tags when they are inside of a pre tag
|
||||
// this makes the themes look better because you can't accidentally
|
||||
// add extra linebreaks at the start and end
|
||||
//
|
||||
// when the pre tag contains a code tag then strip any extra whitespace
|
||||
// for example
|
||||
// <pre>
|
||||
// <code>var foo = true;</code>
|
||||
// </pre>
|
||||
//
|
||||
// will become
|
||||
// <pre><code>var foo = true;</code></pre>
|
||||
//
|
||||
// if you want to preserve whitespace you can use a pre tag on its own
|
||||
// without a code tag inside of it
|
||||
if (pre_blocks[i].getElementsByTagName('code').length) {
|
||||
pre_blocks[i].innerHTML = pre_blocks[i].innerHTML.replace(/^\s+/, '').replace(/\s+$/, '');
|
||||
continue;
|
||||
}
|
||||
|
||||
// if the pre block has no code blocks then we are going to want to
|
||||
// process it directly
|
||||
final_pre_blocks.push(pre_blocks[i]);
|
||||
}
|
||||
|
||||
// @see http://stackoverflow.com/questions/2735067/how-to-convert-a-dom-node-list-to-an-array-in-javascript
|
||||
// we are going to process all <code> blocks
|
||||
for (i = 0; i < code_blocks.length; ++i) {
|
||||
final_code_blocks.push(code_blocks[i]);
|
||||
}
|
||||
|
||||
_highlightCodeBlock(final_code_blocks.concat(final_pre_blocks), 0, onComplete);
|
||||
}
|
||||
|
||||
/**
|
||||
* public methods
|
||||
*/
|
||||
return {
|
||||
|
||||
/**
|
||||
* extends the language pattern matches
|
||||
*
|
||||
* @param {*} language name of language
|
||||
* @param {*} patterns array of patterns to add on
|
||||
* @param {boolean|null} bypass if true this will bypass the default language patterns
|
||||
*/
|
||||
extend: function(language, patterns, bypass) {
|
||||
|
||||
// if there is only one argument then we assume that we want to
|
||||
// extend the default language rules
|
||||
if (arguments.length == 1) {
|
||||
patterns = language;
|
||||
language = DEFAULT_LANGUAGE;
|
||||
}
|
||||
|
||||
bypass_defaults[language] = bypass;
|
||||
language_patterns[language] = patterns.concat(language_patterns[language] || []);
|
||||
},
|
||||
|
||||
/**
|
||||
* call back to let you do stuff in your app after a piece of code has been highlighted
|
||||
*
|
||||
* @param {Function} callback
|
||||
*/
|
||||
onHighlight: function(callback) {
|
||||
onHighlight = callback;
|
||||
},
|
||||
|
||||
/**
|
||||
* method to set a global class that will be applied to all spans
|
||||
*
|
||||
* @param {string} class_name
|
||||
*/
|
||||
addClass: function(class_name) {
|
||||
global_class = class_name;
|
||||
},
|
||||
|
||||
/**
|
||||
* starts the magic rainbow
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
color: function() {
|
||||
|
||||
// if you want to straight up highlight a string you can pass the string of code,
|
||||
// the language, and a callback function
|
||||
if (typeof arguments[0] == 'string') {
|
||||
return _highlightBlockForLanguage(arguments[0], arguments[1], arguments[2]);
|
||||
}
|
||||
|
||||
// if you pass a callback function then we rerun the color function
|
||||
// on all the code and call the callback function on complete
|
||||
if (typeof arguments[0] == 'function') {
|
||||
return _highlight(0, arguments[0]);
|
||||
}
|
||||
|
||||
// otherwise we use whatever node you passed in with an optional
|
||||
// callback function as the second parameter
|
||||
_highlight(arguments[0], arguments[1]);
|
||||
}
|
||||
};
|
||||
}) ();
|
||||
|
||||
/**
|
||||
* adds event listener to start highlighting
|
||||
*/
|
||||
(function() {
|
||||
if (document.addEventListener) {
|
||||
return document.addEventListener('DOMContentLoaded', Rainbow.color, false);
|
||||
}
|
||||
window.attachEvent('onload', Rainbow.color);
|
||||
}) ();
|
||||
|
||||
// When using Google closure compiler in advanced mode some methods
|
||||
// get renamed. This keeps a public reference to these methods so they can
|
||||
// still be referenced from outside this library.
|
||||
Rainbow["onHighlight"] = Rainbow.onHighlight;
|
||||
Rainbow["addClass"] = Rainbow.addClass;
|
||||
118
scripts/examples-html/assets/js/rainbow.linenumbers.js
Normal file
118
scripts/examples-html/assets/js/rainbow.linenumbers.js
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
// Only install the plugin if Rainbow is present and has been loaded
|
||||
if (window.Rainbow) window.Rainbow.linenumbers = (function(Rainbow) {
|
||||
/**
|
||||
* Splits up a single element into individual lines
|
||||
*
|
||||
* @param {HTMLElement} elem
|
||||
* @returns {Array}
|
||||
*/
|
||||
function splitElement(elem) {
|
||||
if (elem.nodeType === 3) {
|
||||
// Just split up the text node
|
||||
return elem.nodeValue.split('\n');
|
||||
}
|
||||
|
||||
// Otherwise, we need to split up the HTML
|
||||
var sourceLines = elem.innerHTML.split('\n');
|
||||
var lines = [];
|
||||
|
||||
// Wraps each chunk in the parent element. For example:
|
||||
// <b>foo\nbar</b> -> [<b>foo</b>, <b>bar</b>]
|
||||
for (var i = 0; i < sourceLines.length; i++) {
|
||||
// Handles <b>\nbar</b> -> [, <b>bar</b>]
|
||||
if (sourceLines[i] === '') {
|
||||
lines.push('');
|
||||
} else {
|
||||
var wrapper = elem.cloneNode(true);
|
||||
wrapper.innerHTML = sourceLines[i];
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.appendChild(wrapper.cloneNode(true));
|
||||
|
||||
lines.push(div.innerHTML);
|
||||
}
|
||||
}
|
||||
|
||||
return lines;
|
||||
};
|
||||
|
||||
/**
|
||||
* Splits up the element containing highlighted source code
|
||||
* into an array of lines
|
||||
*
|
||||
* @param {HTMLElement} block
|
||||
* @returns {Array}
|
||||
*/
|
||||
function splitLines(block) {
|
||||
var lines = [''];
|
||||
|
||||
for (var i = 0; i < block.childNodes.length; i++) {
|
||||
var elemLines = splitElement(block.childNodes[i]);
|
||||
|
||||
// The first element in elemLines is
|
||||
// a continuation of the previous line
|
||||
lines[lines.length - 1] += elemLines[0];
|
||||
|
||||
// The remaining elements get their own lines
|
||||
for (var j = 1; j < elemLines.length; j++) {
|
||||
lines.push(elemLines[j]);
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the array of lines
|
||||
return lines;
|
||||
};
|
||||
|
||||
// Callback is called when Rainbow has highlighted a block
|
||||
Rainbow.onHighlight(function(block) {
|
||||
// This addresses an issue when Rainbow.color() is called multiple times.
|
||||
// Since code element is replaced with table element below,
|
||||
// second pass of Rainbow.color() will result in block.parentNode being null.
|
||||
if (!block || !block.parentNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a table wrapper
|
||||
var table = document.createElement('table');
|
||||
table.className = 'rainbow';
|
||||
table.setAttribute('data-language', block.getAttribute('data-language'));
|
||||
|
||||
// Split up the lines of the block
|
||||
var lines = splitLines(block);
|
||||
|
||||
// For each line
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
var line = lines[i];
|
||||
var index = i + 1;
|
||||
|
||||
// Create a row
|
||||
var row = table.insertRow(-1);
|
||||
row.className = 'line line-' + index;
|
||||
|
||||
// Create a cell which displays the line number with CSS
|
||||
var lineNumber = row.insertCell(-1);
|
||||
lineNumber.className = 'line-number';
|
||||
lineNumber.setAttribute('data-line-number', index);
|
||||
|
||||
// Add in the actual line of source code
|
||||
var code = row.insertCell(-1);
|
||||
code.className = 'line-code';
|
||||
|
||||
// If the line is blank, add a newline to make it copyable.
|
||||
if (line === '') {
|
||||
line = '\n';
|
||||
}
|
||||
|
||||
code.innerHTML = line;
|
||||
}
|
||||
|
||||
// If the block is a <pre> element, its parent is not an element
|
||||
// generated by Rainbow (i.e. it could be <body>). We don't want
|
||||
// to clear this.
|
||||
var parent = (block.nodeName.toLowerCase() === 'pre') ? block : block.parentNode;
|
||||
|
||||
// Clear the parent element and use the table in place of the <code> block
|
||||
parent.innerHTML = '';
|
||||
parent.appendChild(table);
|
||||
});
|
||||
})(window.Rainbow);
|
||||
2
scripts/examples-html/assets/js/rainbow.linenumbers.min.js
vendored
Normal file
2
scripts/examples-html/assets/js/rainbow.linenumbers.min.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
window.Rainbow&&(window.Rainbow.linenumbers=function(m){m.onHighlight(function(c){if(c&&c.parentNode){var h=document.createElement("table");h.className="rainbow";h.setAttribute("data-language",c.getAttribute("data-language"));for(var e=[""],d=0;d<c.childNodes.length;d++){var a;a=c.childNodes[d];if(3===a.nodeType)a=a.nodeValue.split("\n");else{for(var b=a.innerHTML.split("\n"),f=[],g=0;g<b.length;g++)if(""===b[g])f.push("");else{var k=a.cloneNode(!0);k.innerHTML=b[g];var l=document.createElement("div");
|
||||
l.appendChild(k.cloneNode(!0));f.push(l.innerHTML)}a=f}e[e.length-1]+=a[0];for(b=1;b<a.length;b++)e.push(a[b])}for(d=0;d<e.length;d++)a=e[d],b=d+1,f=h.insertRow(-1),f.className="line line-"+b,g=f.insertCell(-1),g.className="line-number",g.setAttribute("data-line-number",b),b=f.insertCell(-1),b.className="line-code",""===a&&(a="\n"),b.innerHTML=a;c="pre"===c.nodeName.toLowerCase()?c:c.parentNode;c.innerHTML="";c.appendChild(h)}})}(window.Rainbow));
|
||||
|
|
@ -6,10 +6,12 @@
|
|||
<link rel="stylesheet" href="../assets/css/main.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../assets/css/menu.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="../assets/css/solarized-light.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../assets/css/solarized-light-linenumbers.css" type="text/css" />
|
||||
|
||||
<script src="../example-data.js" type="text/javascript"></script>
|
||||
<script src="../assets/js/menu.js" type="text/javascript"></script>
|
||||
<script src="../assets/js/rainbow.min.js" type="text/javascript"></script>
|
||||
<script src="../assets/js/rainbow.linenumbers.min.js" type="text/javascript"></script>
|
||||
<script src="../assets/js/language/generic.js" type="text/javascript"></script>
|
||||
<script src="../assets/js/language/javascript.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
|
|
|||
5
scripts/fakescad.cc
Normal file
5
scripts/fakescad.cc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#include <iostream>
|
||||
int main() {
|
||||
std::cout << "fake openscad for testing openscad build system\n";
|
||||
}
|
||||
|
||||
|
|
@ -4,4 +4,4 @@
|
|||
#
|
||||
# Requires release.token and releases/<version>.md
|
||||
|
||||
curl https://api.github.com/repos/openscad/openscad/releases -H "Authorization: token $(<release.token)" -d "$(./scripts/makereleasejson.py $1)"
|
||||
curl https://api.github.com/repos/openscad/openscad/releases -H "Authorization: token $(<release.token>)" -d "$(./scripts/makereleasejson.py $1)"
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# change to the install source directory
|
||||
cd "$( dirname "$( type -p $0 )" )"
|
||||
|
||||
if ! [ -f bin/openscad -a -d lib/openscad -a -d examples -a -d libraries ]; then
|
||||
echo "Error: Can't change to install source directory!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "This will install openscad. Please enter the install prefix"
|
||||
echo "or press Ctrl-C to abort the install process:"
|
||||
read -p "[/usr/local]: " prefix
|
||||
|
||||
if [ "$prefix" = "" ]; then
|
||||
prefix="/usr/local"
|
||||
fi
|
||||
|
||||
if [ ! -d "$prefix" ]; then
|
||||
echo; echo "Install prefix \`$prefix' does not exist. Press ENTER to continue"
|
||||
echo "or press Ctrl-C to abort the install process:"
|
||||
read -p "press enter to continue> "
|
||||
fi
|
||||
|
||||
mkdir -p "$prefix"/{bin,lib/openscad,share/openscad/examples,share/openscad/libraries}
|
||||
|
||||
if ! [ -w "$prefix"/bin/ -a -w "$prefix"/lib/openscad -a -w "$prefix"/share/openscad ]; then
|
||||
echo "You does not seam to have write permissions for prefix \`$prefix'!" >&2
|
||||
echo "Maybe you should have run this install script using \`sudo'?" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Copying application wrappers..."
|
||||
cp -rv bin/. "$prefix"/bin/
|
||||
|
||||
echo "Copying application..."
|
||||
cp -rv lib/. "$prefix"/lib/
|
||||
|
||||
echo "Copying examples..."
|
||||
cp -rv examples/. "$prefix"/share/openscad/examples/
|
||||
|
||||
echo "Copying libraries..."
|
||||
cp -rv libraries/. "$prefix"/share/openscad/libraries/
|
||||
|
||||
echo "Copying support files..."
|
||||
cp -rv share/. "$prefix"/share/
|
||||
|
||||
echo "Installation finished. Have a nice day."
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# This script builds all library dependencies of OpenSCAD for Mac OS X.
|
||||
# The libraries will be build in 64-bit (and optionally 32-bit mode) mode
|
||||
# and backwards compatible with 10.5 "Leopard".
|
||||
# The libraries will be build in 64-bit mode and backwards compatible with 10.8 "Mountain Lion".
|
||||
#
|
||||
# This script must be run from the OpenSCAD source root directory
|
||||
#
|
||||
# Usage: macosx-build-dependencies.sh [-6lcd] [<package>]
|
||||
# -6 Build only 64-bit binaries
|
||||
# Usage: macosx-build-dependencies.sh [-16lcdf] [<package>]
|
||||
# -3 Build using C++03 and libstdc++ (default is C++11 and libc++)
|
||||
# -l Force use of LLVM compiler
|
||||
# -c Force use of clang compiler
|
||||
# -d Build for deployment (if not specified, e.g. Sparkle won't be built)
|
||||
|
|
@ -24,34 +23,33 @@ BASEDIR=$PWD/../libraries
|
|||
OPENSCADDIR=$PWD
|
||||
SRCDIR=$BASEDIR/src
|
||||
DEPLOYDIR=$BASEDIR/install
|
||||
MAC_OSX_VERSION_MIN=10.7
|
||||
OPTION_32BIT=false
|
||||
MAC_OSX_VERSION_MIN=10.8
|
||||
OPTION_LLVM=false
|
||||
OPTION_CLANG=false
|
||||
OPTION_GCC=false
|
||||
OPTION_DEPLOY=false
|
||||
OPTION_FORCE=0
|
||||
OPTION_CXX11=true
|
||||
|
||||
PACKAGES=(
|
||||
"eigen 3.2.4"
|
||||
"gmp 5.1.3"
|
||||
"mpfr 3.1.2"
|
||||
"boost 1.57.0"
|
||||
"qt5 5.4.1"
|
||||
"qscintilla 2.8.4"
|
||||
# NB! For eigen, also update the path in the function
|
||||
"eigen 3.2.8"
|
||||
"gmp 6.1.1"
|
||||
"mpfr 3.1.4"
|
||||
"boost 1.61.0"
|
||||
"qt5 5.7.0"
|
||||
"qscintilla 2.9.2"
|
||||
# NB! For CGAL, also update the actual download URL in the function
|
||||
"cgal 4.5.2"
|
||||
"glew 1.12.0"
|
||||
"gettext 0.19.4"
|
||||
"cgal 4.8.1"
|
||||
"glew 1.13.0"
|
||||
"gettext 0.19.8"
|
||||
"libffi 3.2.1"
|
||||
"glib2 2.42.1"
|
||||
"opencsg 1.4.0"
|
||||
"freetype 2.5.5"
|
||||
"glib2 2.46.1"
|
||||
"opencsg 1.4.2"
|
||||
"freetype 2.6.3"
|
||||
"ragel 6.9"
|
||||
"harfbuzz 0.9.37"
|
||||
"libxml2 2.9.2"
|
||||
"fontconfig 2.11.1"
|
||||
"harfbuzz 1.2.7"
|
||||
"libxml2 2.9.4"
|
||||
"fontconfig 2.12.0"
|
||||
)
|
||||
DEPLOY_PACKAGES=(
|
||||
"sparkle 1.13.1"
|
||||
|
|
@ -59,9 +57,9 @@ DEPLOY_PACKAGES=(
|
|||
|
||||
printUsage()
|
||||
{
|
||||
echo "Usage: $0 [-6lcd] [<package>]"
|
||||
echo "Usage: $0 [-3lcdf] [<package>]"
|
||||
echo
|
||||
echo " -6 Build only 64-bit binaries"
|
||||
echo " -3 Build using C++03 and libstdc++"
|
||||
echo " -l Force use of LLVM compiler"
|
||||
echo " -c Force use of clang compiler"
|
||||
echo " -d Build for deployment"
|
||||
|
|
@ -109,7 +107,6 @@ build()
|
|||
build_$package $version
|
||||
set +e
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# Usage: is_installed <package> [<version>]
|
||||
|
|
@ -185,9 +182,6 @@ build_qt()
|
|||
sed -i "" -e "s/::TabletProximityRec/TabletProximityRec/g" src/gui/kernel/qt_cocoa_helpers_mac_p.h
|
||||
PLATFORM="-platform unsupported/macx-clang"
|
||||
fi
|
||||
if $OPTION_32BIT; then
|
||||
QT_32BIT="-arch x86"
|
||||
fi
|
||||
case "$OSX_VERSION" in
|
||||
9)
|
||||
# libtiff fails in the linker step with Mavericks / XCode 5.0.1
|
||||
|
|
@ -199,7 +193,7 @@ build_qt()
|
|||
MACOSX_RELEASE_OPTIONS=
|
||||
;;
|
||||
esac
|
||||
./configure -prefix $DEPLOYDIR -release $QT_32BIT -arch x86_64 -opensource -confirm-license $PLATFORM -fast -no-qt3support -no-svg -no-phonon -no-audio-backend -no-multimedia -no-javascript-jit -no-script -no-scripttools -no-declarative -no-xmlpatterns -nomake demos -nomake examples -nomake docs -nomake translations -no-webkit $MACOSX_RELEASE_OPTIONS
|
||||
./configure -prefix $DEPLOYDIR -release -arch x86_64 -opensource -confirm-license $PLATFORM -fast -no-qt3support -no-svg -no-phonon -no-audio-backend -no-multimedia -no-javascript-jit -no-script -no-scripttools -no-declarative -no-xmlpatterns -nomake demos -nomake examples -nomake docs -nomake translations -no-webkit $MACOSX_RELEASE_OPTIONS
|
||||
make -j"$NUMCPU" install
|
||||
}
|
||||
|
||||
|
|
@ -221,15 +215,23 @@ build_qt5()
|
|||
fi
|
||||
tar xzf qt-everywhere-opensource-src-$version.tar.gz
|
||||
cd qt-everywhere-opensource-src-$version
|
||||
./configure -prefix $DEPLOYDIR -release -opensource -confirm-license \
|
||||
if ! $USING_CXX11; then
|
||||
QT_EXTRA_FLAGS="-no-c++11"
|
||||
fi
|
||||
CXXFLAGS="$CXXSTDFLAGS" ./configure -prefix $DEPLOYDIR $QT_EXTRA_FLAGS -release -opensource -confirm-license \
|
||||
-nomake examples -nomake tests \
|
||||
-no-xcb -no-c++11 -no-glib -no-harfbuzz -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc \
|
||||
-no-xcb -no-glib -no-harfbuzz -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc \
|
||||
-no-sql-psql -no-sql-sqlite2 -no-sql-tds -no-cups -no-qml-debug \
|
||||
-skip activeqt -skip connectivity -skip declarative -skip doc \
|
||||
-skip enginio -skip graphicaleffects -skip location -skip multimedia \
|
||||
-skip quick1 -skip quickcontrols -skip script -skip sensors -skip serialport \
|
||||
-skip svg -skip webkit -skip webkit-examples -skip websockets -skip xmlpatterns
|
||||
make -j"$NUMCPU" install
|
||||
-skip qtx11extras -skip qtandroidextras -skip qtserialport -skip qtserialbus \
|
||||
-skip qtactiveqt -skip qtxmlpatterns -skip qtdeclarative -skip qtscxml \
|
||||
-skip qtpurchasing -skip qtcanvas3d -skip qtgamepad -skip qtwayland \
|
||||
-skip qtconnectivity -skip qtwebsockets -skip qtwebchannel -skip qtsensors \
|
||||
-skip qtmultimedia -skip qtdatavis3d -skip qtcharts -skip qtwinextras \
|
||||
-skip qtgraphicaleffects -skip qtquickcontrols2 -skip qtquickcontrols \
|
||||
-skip qtvirtualkeyboard -skip qtlocation -skip qtwebengine -skip qtwebview \
|
||||
-skip qtscript -skip qttranslations -skip qtdoc
|
||||
make -j"$NUMCPU"
|
||||
make install
|
||||
}
|
||||
|
||||
check_qscintilla()
|
||||
|
|
@ -242,15 +244,15 @@ build_qscintilla()
|
|||
version=$1
|
||||
echo "Building QScintilla" $version "..."
|
||||
cd $BASEDIR/src
|
||||
rm -rf QScintilla-gpl-$version
|
||||
if [ ! -f QScintilla-gpl-$version.tar.gz ]; then
|
||||
curl -LO http://downloads.sourceforge.net/project/pyqt/QScintilla2/QScintilla-$version/QScintilla-gpl-$version.tar.gz
|
||||
rm -rf QScintilla_gpl-$version
|
||||
if [ ! -f QScintilla_gpl-$version.tar.gz ]; then
|
||||
curl -LO http://downloads.sourceforge.net/project/pyqt/QScintilla2/QScintilla-$version/QScintilla_gpl-$version.tar.gz
|
||||
fi
|
||||
tar xzf QScintilla-gpl-$version.tar.gz
|
||||
cd QScintilla-gpl-$version/Qt4Qt5
|
||||
qmake qscintilla.pro
|
||||
make -j6 install
|
||||
install_name_tool -id $DEPLOYDIR/lib/libqscintilla2.dylib $DEPLOYDIR/lib/libqscintilla2.dylib
|
||||
tar xzf QScintilla_gpl-$version.tar.gz
|
||||
cd QScintilla_gpl-$version/Qt4Qt5
|
||||
qmake QMAKE_CXXFLAGS+="$CXXSTDFLAGS" QMAKE_LFLAGS+="$CXXSTDFLAGS" qscintilla.pro
|
||||
make -j"$NUMCPU" install
|
||||
install_name_tool -id @rpath/libqscintilla2.dylib $DEPLOYDIR/lib/libqscintilla2.dylib
|
||||
}
|
||||
|
||||
check_gmp()
|
||||
|
|
@ -258,9 +260,6 @@ check_gmp()
|
|||
check_file lib/libgmp.dylib
|
||||
}
|
||||
|
||||
# Hack warning: gmplib is built separately in 32-bit and 64-bit mode
|
||||
# and then merged afterwards. gmplib's header files are dependent on
|
||||
# the CPU architecture on which configure was run and will be patched accordingly.
|
||||
build_gmp()
|
||||
{
|
||||
version=$1
|
||||
|
|
@ -273,87 +272,12 @@ build_gmp()
|
|||
fi
|
||||
tar xjf gmp-$version.tar.bz2
|
||||
cd gmp-$version
|
||||
patch -p0 gmp-h.in << EOF
|
||||
--- gmp-5.1.3/gmp-h.in.old 2013-12-02 20:16:26.000000000 -0800
|
||||
+++ gmp-5.1.3/gmp-h.in 2013-12-02 20:21:22.000000000 -0800
|
||||
@@ -27,13 +27,38 @@
|
||||
#endif
|
||||
|
||||
|
||||
-/* Instantiated by configure. */
|
||||
#if ! defined (__GMP_WITHIN_CONFIGURE)
|
||||
+/* For benefit of fat builds on MacOSX, generate a .h file that can
|
||||
+ * be used with a universal fat library
|
||||
+ */
|
||||
+#if defined(__x86_64__)
|
||||
+#define __GMP_HAVE_HOST_CPU_FAMILY_power 0
|
||||
+#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0
|
||||
+#define GMP_LIMB_BITS 64
|
||||
+#define GMP_NAIL_BITS 0
|
||||
+#elif defined(__i386__)
|
||||
+#define __GMP_HAVE_HOST_CPU_FAMILY_power 0
|
||||
+#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0
|
||||
+#define GMP_LIMB_BITS 32
|
||||
+#define GMP_NAIL_BITS 0
|
||||
+#elif defined(__powerpc64__)
|
||||
+#define __GMP_HAVE_HOST_CPU_FAMILY_power 0
|
||||
+#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 1
|
||||
+#define GMP_LIMB_BITS 64
|
||||
+#define GMP_NAIL_BITS 0
|
||||
+#elif defined(__ppc__)
|
||||
+#define __GMP_HAVE_HOST_CPU_FAMILY_power 0
|
||||
+#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 1
|
||||
+#define GMP_LIMB_BITS 32
|
||||
+#define GMP_NAIL_BITS 0
|
||||
+#else
|
||||
+/* For other architectures, fall back on values computed by configure */
|
||||
#define __GMP_HAVE_HOST_CPU_FAMILY_power @HAVE_HOST_CPU_FAMILY_power@
|
||||
#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc @HAVE_HOST_CPU_FAMILY_powerpc@
|
||||
#define GMP_LIMB_BITS @GMP_LIMB_BITS@
|
||||
#define GMP_NAIL_BITS @GMP_NAIL_BITS@
|
||||
#endif
|
||||
+#endif
|
||||
#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS)
|
||||
#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS)
|
||||
#define GMP_NUMB_MAX GMP_NUMB_MASK
|
||||
EOF
|
||||
./configure --prefix=$DEPLOYDIR CXXFLAGS="$CXXSTDFLAGS" CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" LDFLAGS="$LDSTDFLAGS -mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" ABI=64 --enable-cxx
|
||||
make -j"$NUMCPU" install
|
||||
|
||||
if $OPTION_32BIT; then
|
||||
mkdir build-i386
|
||||
cd build-i386
|
||||
../configure --prefix=$DEPLOYDIR/i386 "CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch i386" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch i386" ABI=32 --enable-cxx
|
||||
make install
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# 64-bit version
|
||||
mkdir build-x86_64
|
||||
cd build-x86_64
|
||||
../configure --prefix=$DEPLOYDIR/x86_64 "CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" ABI=64 --enable-cxx
|
||||
make install
|
||||
|
||||
# merge
|
||||
cd $DEPLOYDIR
|
||||
mkdir -p lib
|
||||
if $OPTION_32BIT; then
|
||||
lipo -create i386/lib/libgmp.dylib x86_64/lib/libgmp.dylib -output lib/libgmp.dylib
|
||||
lipo -create i386/lib/libgmpxx.dylib x86_64/lib/libgmpxx.dylib -output lib/libgmpxx.dylib
|
||||
else
|
||||
cp x86_64/lib/libgmp.dylib lib/libgmp.dylib
|
||||
cp x86_64/lib/libgmpxx.dylib lib/libgmpxx.dylib
|
||||
fi
|
||||
install_name_tool -id $DEPLOYDIR/lib/libgmp.dylib lib/libgmp.dylib
|
||||
install_name_tool -id $DEPLOYDIR/lib/libgmpxx.dylib lib/libgmpxx.dylib
|
||||
install_name_tool -change $DEPLOYDIR/x86_64/lib/libgmp.10.dylib $DEPLOYDIR/lib/libgmp.dylib lib/libgmpxx.dylib
|
||||
if $OPTION_32BIT; then
|
||||
cp lib/libgmp.dylib i386/lib/
|
||||
cp lib/libgmp.dylib x86_64/lib/
|
||||
cp lib/libgmpxx.dylib i386/lib/
|
||||
cp lib/libgmpxx.dylib x86_64/lib/
|
||||
fi
|
||||
mkdir -p include
|
||||
cp x86_64/include/gmp.h include/
|
||||
cp x86_64/include/gmpxx.h include/
|
||||
install_name_tool -id @rpath/libgmp.dylib $DEPLOYDIR/lib/libgmp.dylib
|
||||
install_name_tool -id @rpath/libgmpxx.dylib $DEPLOYDIR/lib/libgmpxx.dylib
|
||||
install_name_tool -change $DEPLOYDIR/lib/libgmp.10.dylib @rpath/libgmp.dylib $DEPLOYDIR/lib/libgmpxx.dylib
|
||||
}
|
||||
|
||||
check_mpfr()
|
||||
|
|
@ -363,6 +287,11 @@ check_mpfr()
|
|||
|
||||
# As with gmplib, mpfr is built separately in 32-bit and 64-bit mode and then merged
|
||||
# afterwards.
|
||||
check_mpfr()
|
||||
{
|
||||
check_file include/mpfr.h
|
||||
}
|
||||
|
||||
build_mpfr()
|
||||
{
|
||||
version=$1
|
||||
|
|
@ -375,33 +304,11 @@ build_mpfr()
|
|||
fi
|
||||
tar xjf mpfr-$version.tar.bz2
|
||||
cd mpfr-$version
|
||||
# curl -O http://www.mpfr.org/mpfr-$version/allpatches
|
||||
# patch -N -Z -p1 < allpatches
|
||||
if $OPTION_32BIT; then
|
||||
mkdir build-i386
|
||||
cd build-i386
|
||||
../configure --prefix=$DEPLOYDIR/i386 --with-gmp=$DEPLOYDIR/i386 CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch i386" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch i386"
|
||||
make install
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# 64-bit version
|
||||
mkdir build-x86_64
|
||||
cd build-x86_64
|
||||
../configure --prefix=$DEPLOYDIR/x86_64 --with-gmp=$DEPLOYDIR/x86_64 CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64"
|
||||
make install
|
||||
./configure --prefix=$DEPLOYDIR --with-gmp=$DEPLOYDIR CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64"
|
||||
make -j"$NUMCPU" install
|
||||
|
||||
# merge
|
||||
cd $DEPLOYDIR
|
||||
if $OPTION_32BIT; then
|
||||
lipo -create i386/lib/libmpfr.dylib x86_64/lib/libmpfr.dylib -output lib/libmpfr.dylib
|
||||
else
|
||||
cp x86_64/lib/libmpfr.dylib lib/libmpfr.dylib
|
||||
fi
|
||||
install_name_tool -id $DEPLOYDIR/lib/libmpfr.dylib lib/libmpfr.dylib
|
||||
mkdir -p include
|
||||
cp x86_64/include/mpfr.h include/
|
||||
cp x86_64/include/mpf2mpfr.h include/
|
||||
install_name_tool -id @rpath/libmpfr.dylib $DEPLOYDIR/lib/libmpfr.dylib
|
||||
}
|
||||
|
||||
check_boost()
|
||||
|
|
@ -424,9 +331,6 @@ build_boost()
|
|||
cd boost_$bversion
|
||||
# We only need the thread and program_options libraries
|
||||
./bootstrap.sh --prefix=$DEPLOYDIR --with-libraries=thread,program_options,filesystem,chrono,system,regex
|
||||
if $OPTION_32BIT; then
|
||||
BOOST_EXTRA_FLAGS="-arch i386"
|
||||
fi
|
||||
if $USING_LLVM; then
|
||||
BOOST_TOOLSET="toolset=darwin-llvm"
|
||||
echo "using darwin : llvm : llvm-g++ ;" >> tools/build/user-config.jam
|
||||
|
|
@ -434,17 +338,7 @@ build_boost()
|
|||
BOOST_TOOLSET="toolset=clang"
|
||||
echo "using clang ;" >> tools/build/user-config.jam
|
||||
fi
|
||||
./b2 -j"$NUMCPU" -d+2 $BOOST_TOOLSET cflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $BOOST_EXTRA_FLAGS" linkflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $BOOST_EXTRA_FLAGS -headerpad_max_install_names" install
|
||||
install_name_tool -id $DEPLOYDIR/lib/libboost_thread.dylib $DEPLOYDIR/lib/libboost_thread.dylib
|
||||
install_name_tool -change libboost_system.dylib $DEPLOYDIR/lib/libboost_system.dylib $DEPLOYDIR/lib/libboost_thread.dylib
|
||||
install_name_tool -change libboost_chrono.dylib $DEPLOYDIR/lib/libboost_chrono.dylib $DEPLOYDIR/lib/libboost_thread.dylib
|
||||
install_name_tool -id $DEPLOYDIR/lib/libboost_program_options.dylib $DEPLOYDIR/lib/libboost_program_options.dylib
|
||||
install_name_tool -id $DEPLOYDIR/lib/libboost_filesystem.dylib $DEPLOYDIR/lib/libboost_filesystem.dylib
|
||||
install_name_tool -change libboost_system.dylib $DEPLOYDIR/lib/libboost_system.dylib $DEPLOYDIR/lib/libboost_filesystem.dylib
|
||||
install_name_tool -id $DEPLOYDIR/lib/libboost_system.dylib $DEPLOYDIR/lib/libboost_system.dylib
|
||||
install_name_tool -id $DEPLOYDIR/lib/libboost_regex.dylib $DEPLOYDIR/lib/libboost_regex.dylib
|
||||
|
||||
|
||||
./b2 -j"$NUMCPU" -d+2 $BOOST_TOOLSET cflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $CXXSTDFLAGS" linkflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $LDSTDFLAGS -headerpad_max_install_names" install
|
||||
}
|
||||
|
||||
check_cgal()
|
||||
|
|
@ -459,9 +353,11 @@ build_cgal()
|
|||
echo "Building CGAL" $version "..."
|
||||
cd $BASEDIR/src
|
||||
rm -rf CGAL-$version
|
||||
if [ ! -f CGAL-$version.tar.gz ]; then
|
||||
# 4.5.2
|
||||
curl -O https://gforge.inria.fr/frs/download.php/file/34512/CGAL-$version.tar.gz
|
||||
if [ ! -f CGAL-$version.tar.xz ]; then
|
||||
# 4.8
|
||||
curl -LO https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-$version/CGAL-$version.tar.xz
|
||||
# 4.6.3 curl -O https://gforge.inria.fr/frs/download.php/file/35138/CGAL-$version.tar.gz
|
||||
# 4.5.2 curl -O https://gforge.inria.fr/frs/download.php/file/34512/CGAL-$version.tar.gz
|
||||
# 4.5.1 curl -O https://gforge.inria.fr/frs/download.php/file/34400/CGAL-$version.tar.gz
|
||||
# 4.5 curl -O https://gforge.inria.fr/frs/download.php/file/34149/CGAL-$version.tar.gz
|
||||
# 4.4 curl -O https://gforge.inria.fr/frs/download.php/file/33525/CGAL-$version.tar.gz
|
||||
|
|
@ -475,17 +371,14 @@ build_cgal()
|
|||
# 3.8 curl -O https://gforge.inria.fr/frs/download.php/28500/CGAL-$version.tar.gz
|
||||
# 3.7 curl -O https://gforge.inria.fr/frs/download.php/27641/CGAL-$version.tar.gz
|
||||
fi
|
||||
tar xzf CGAL-$version.tar.gz
|
||||
tar xzf CGAL-$version.tar.xz
|
||||
cd CGAL-$version
|
||||
if $OPTION_32BIT; then
|
||||
CGAL_EXTRA_FLAGS=";i386"
|
||||
fi
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.dylib -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.dylib -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.dylib -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_OSX_DEPLOYMENT_TARGET="$MAC_OSX_VERSION_MIN" -DCMAKE_OSX_ARCHITECTURES="x86_64$CGAL_EXTRA_FLAGS" -DBOOST_ROOT=$DEPLOYDIR -DBoost_USE_MULTITHREADED=false
|
||||
CXXFLAGS="$CXXSTDFLAGS" cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.dylib -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.dylib -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.dylib -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_OSX_DEPLOYMENT_TARGET="$MAC_OSX_VERSION_MIN" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DBOOST_ROOT=$DEPLOYDIR -DBoost_USE_MULTITHREADED=false
|
||||
make -j"$NUMCPU" install
|
||||
make install
|
||||
install_name_tool -id $DEPLOYDIR/lib/libCGAL.dylib $DEPLOYDIR/lib/libCGAL.dylib
|
||||
install_name_tool -id $DEPLOYDIR/lib/libCGAL_Core.dylib $DEPLOYDIR/lib/libCGAL_Core.dylib
|
||||
install_name_tool -change $PWD/lib/libCGAL.9.dylib $DEPLOYDIR/lib/libCGAL.dylib $DEPLOYDIR/lib/libCGAL_Core.dylib
|
||||
install_name_tool -id @rpath/libCGAL.dylib $DEPLOYDIR/lib/libCGAL.dylib
|
||||
install_name_tool -id @rpath/libCGAL_Core.dylib $DEPLOYDIR/lib/libCGAL_Core.dylib
|
||||
install_name_tool -change libCGAL.11.dylib @rpath/libCGAL.dylib $DEPLOYDIR/lib/libCGAL_Core.dylib
|
||||
}
|
||||
|
||||
check_glew()
|
||||
|
|
@ -506,10 +399,7 @@ build_glew()
|
|||
tar xzf glew-$version.tgz
|
||||
cd glew-$version
|
||||
mkdir -p $DEPLOYDIR/lib/pkgconfig
|
||||
if $OPTION_32BIT; then
|
||||
GLEW_EXTRA_FLAGS="-arch i386"
|
||||
fi
|
||||
make GLEW_DEST=$DEPLOYDIR CC=$CC CFLAGS.EXTRA="-no-cpp-precomp -dynamic -fno-common -mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" LDFLAGS.EXTRA="-mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" STRIP= install
|
||||
make GLEW_DEST=$DEPLOYDIR CC=$CC CFLAGS.EXTRA="-no-cpp-precomp -dynamic -fno-common -mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" LDFLAGS.EXTRA="-install_name @rpath/libGLEW.dylib -mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" POPT="-Os" STRIP= install
|
||||
}
|
||||
|
||||
check_opencsg()
|
||||
|
|
@ -530,11 +420,9 @@ build_opencsg()
|
|||
tar xzf OpenCSG-$version.tar.gz
|
||||
cd OpenCSG-$version
|
||||
patch -p1 < $OPENSCADDIR/patches/OpenCSG-$version-MacOSX-port.patch
|
||||
if $OPTION_32BIT; then
|
||||
OPENCSG_EXTRA_FLAGS="x86"
|
||||
fi
|
||||
qmake -r QMAKE_CXXFLAGS+="-I$DEPLOYDIR/include" QMAKE_LFLAGS+="-L$DEPLOYDIR/lib" CONFIG+="x86_64 $OPENCSG_EXTRA_FLAGS" DESTDIR=$DEPLOYDIR
|
||||
qmake -r INSTALLDIR=$DEPLOYDIR
|
||||
make install
|
||||
install_name_tool -id @rpath/libopencsg.dylib $DEPLOYDIR/lib/libopencsg.dylib
|
||||
}
|
||||
|
||||
# Usage: func [<version>]
|
||||
|
|
@ -567,8 +455,10 @@ build_eigen()
|
|||
elif [ $version = "3.2.2" ]; then EIGENDIR=eigen-eigen-1306d75b4a21;
|
||||
elif [ $version = "3.2.3" ]; then EIGENDIR=eigen-eigen-36fd1ba04c12;
|
||||
elif [ $version = "3.2.4" ]; then EIGENDIR=eigen-eigen-10219c95fe65;
|
||||
fi
|
||||
|
||||
elif [ $version = "3.2.6" ]; then EIGENDIR=eigen-eigen-c58038c56923;
|
||||
elif [ $version = "3.2.8" ]; then EIGENDIR=eigen-eigen-07105f7124f9;
|
||||
fi
|
||||
|
||||
if [ $EIGENDIR = "none" ]; then
|
||||
echo Unknown eigen version. Please edit script.
|
||||
exit 1
|
||||
|
|
@ -584,10 +474,7 @@ build_eigen()
|
|||
cd eigen-$version
|
||||
mkdir build
|
||||
cd build
|
||||
if $OPTION_32BIT; then
|
||||
EIGEN_EXTRA_FLAGS=";i386"
|
||||
fi
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DEIGEN_TEST_NOQT=TRUE -DCMAKE_OSX_DEPLOYMENT_TARGET="$MAC_OSX_VERSION_MIN" -DCMAKE_OSX_ARCHITECTURES="x86_64$EIGEN_EXTRA_FLAGS" ..
|
||||
CXXFLAGS="$CXXSTDFLAGS" cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DEIGEN_TEST_NOQT=TRUE -DCMAKE_OSX_DEPLOYMENT_TARGET="$MAC_OSX_VERSION_MIN" -DCMAKE_OSX_ARCHITECTURES="x86_64" ..
|
||||
make -j"$NUMCPU" install
|
||||
}
|
||||
|
||||
|
|
@ -599,6 +486,7 @@ check_sparkle()
|
|||
# Usage:
|
||||
# build_sparkle <githubuser>:<commitID>
|
||||
# build_sparkle <version>
|
||||
|
||||
build_sparkle()
|
||||
{
|
||||
# Binary install:
|
||||
|
|
@ -663,6 +551,7 @@ build_freetype()
|
|||
PKG_CONFIG_LIBDIR="$DEPLOYDOR/lib/pkgconfig" ./configure --prefix="$DEPLOYDIR" CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN $extra_config_flags
|
||||
make -j"$NUMCPU"
|
||||
make install
|
||||
install_name_tool -id @rpath/libfreetype.dylib $DEPLOYDIR/lib/libfreetype.dylib
|
||||
}
|
||||
|
||||
check_libxml2()
|
||||
|
|
@ -685,6 +574,7 @@ build_libxml2()
|
|||
./configure --prefix="$DEPLOYDIR" --with-zlib=/usr -without-lzma --without-ftp --without-http --without-python CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
install_name_tool -id @rpath/libxml2.dylib $DEPLOYDIR/lib/libxml2.dylib
|
||||
}
|
||||
|
||||
check_fontconfig()
|
||||
|
|
@ -709,6 +599,7 @@ build_fontconfig()
|
|||
unset PKG_CONFIG_PATH
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
install_name_tool -id @rpath/libfontconfig.dylib $DEPLOYDIR/lib/libfontconfig.dylib
|
||||
}
|
||||
|
||||
check_libffi()
|
||||
|
|
@ -731,6 +622,7 @@ build_libffi()
|
|||
./configure --prefix="$DEPLOYDIR"
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
install_name_tool -id @rpath/libffi.dylib $DEPLOYDIR/lib/libffi.dylib
|
||||
}
|
||||
|
||||
check_gettext()
|
||||
|
|
@ -754,6 +646,7 @@ build_gettext()
|
|||
./configure --prefix="$DEPLOYDIR" CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
install_name_tool -id @rpath/libintl.dylib $DEPLOYDIR/lib/libintl.dylib
|
||||
}
|
||||
|
||||
check_glib2()
|
||||
|
|
@ -781,6 +674,7 @@ build_glib2()
|
|||
unset PKG_CONFIG_PATH
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
install_name_tool -id @rpath/libglib-2.0.dylib $DEPLOYDIR/lib/libglib-2.0.dylib
|
||||
}
|
||||
|
||||
check_ragel()
|
||||
|
|
@ -827,9 +721,10 @@ build_harfbuzz()
|
|||
# disable doc directories as they make problems on Mac OS Build
|
||||
sed -e "s/SUBDIRS = src util test docs/SUBDIRS = src util test/g" Makefile.am > Makefile.am.bak && mv Makefile.am.bak Makefile.am
|
||||
sed -e "s/^docs.*$//" configure.ac > configure.ac.bak && mv configure.ac.bak configure.ac
|
||||
PKG_CONFIG_LIBDIR="$DEPLOYDIR/lib/pkgconfig" ./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN CXXFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN $extra_config_flags
|
||||
PKG_CONFIG_LIBDIR="$DEPLOYDIR/lib/pkgconfig" ./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN CXXFLAGS="$CXXFLAGS -mmacosx-version-min=$MAC_OSX_VERSION_MIN" LDFLAGS="$CXXFLAGS -mmacosx-version-min=$MAC_OSX_VERSION_MIN" $extra_config_flags
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
install_name_tool -id @rpath/libharfbuzz.dylib $DEPLOYDIR/lib/libharfbuzz.dylib
|
||||
}
|
||||
|
||||
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
|
||||
|
|
@ -838,10 +733,10 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then
|
|||
fi
|
||||
OPENSCAD_SCRIPTDIR=$PWD/scripts
|
||||
|
||||
while getopts '6lcdf' c
|
||||
while getopts '3lcdf' c
|
||||
do
|
||||
case $c in
|
||||
6) OPTION_32BIT=false;;
|
||||
3) USING_CXX11=false;;
|
||||
l) OPTION_LLVM=true;;
|
||||
c) OPTION_CLANG=true;;
|
||||
d) OPTION_DEPLOY=true;;
|
||||
|
|
@ -853,25 +748,22 @@ done
|
|||
OPTION_PACKAGES="${@:$OPTIND}"
|
||||
|
||||
OSX_VERSION=`sw_vers -productVersion | cut -d. -f2`
|
||||
if (( $OSX_VERSION >= 10 )); then
|
||||
if (( $OSX_VERSION >= 11 )); then
|
||||
echo "Detected El Capitan (10.11) or later"
|
||||
elif (( $OSX_VERSION >= 10 )); then
|
||||
echo "Detected Yosemite (10.10) or later"
|
||||
elif (( $OSX_VERSION >= 9 )); then
|
||||
echo "Detected Mavericks (10.9)"
|
||||
elif (( $OSX_VERSION >= 8 )); then
|
||||
echo "Detected Mountain Lion (10.8)"
|
||||
elif (( $OSX_VERSION >= 7 )); then
|
||||
echo "Detected Lion (10.7)"
|
||||
else
|
||||
echo "Detected Snow Leopard (10.6) or earlier"
|
||||
echo "Detected Lion (10.7) or earlier"
|
||||
fi
|
||||
|
||||
USING_LLVM=false
|
||||
USING_GCC=false
|
||||
USING_CLANG=false
|
||||
if $OPTION_LLVM; then
|
||||
USING_LLVM=true
|
||||
elif $OPTION_GCC; then
|
||||
USING_GCC=true
|
||||
elif $OPTION_CLANG; then
|
||||
USING_CLANG=true
|
||||
elif (( $OSX_VERSION >= 7 )); then
|
||||
|
|
@ -883,20 +775,20 @@ if $USING_LLVM; then
|
|||
export CC=llvm-gcc
|
||||
export CXX=llvm-g++
|
||||
export QMAKESPEC=macx-llvm
|
||||
elif $USING_GCC; then
|
||||
echo "Using gcc compiler"
|
||||
export CC=gcc
|
||||
export CXX=g++
|
||||
export CPP=cpp
|
||||
# Somehow, qmake in Qt-4.8.2 doesn't detect Lion's gcc and falls back into
|
||||
# project file mode unless manually given a QMAKESPEC
|
||||
export QMAKESPEC=macx-llvm
|
||||
elif $USING_CLANG; then
|
||||
echo "Using clang compiler"
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
fi
|
||||
|
||||
if $USING_CXX11; then
|
||||
export CXXSTDFLAGS="-std=c++11 -stdlib=libc++"
|
||||
export LDSTDFLAGS="-stdlib=libc++"
|
||||
else
|
||||
export CXXSTDFLAGS="-std=c++03 -stdlib=libstdc++"
|
||||
export LDSTDFLAGS="-stdlib=libstdc++"
|
||||
fi
|
||||
|
||||
echo "Building for $MAC_OSX_VERSION_MIN or later"
|
||||
|
||||
if [ ! $NUMCPU ]; then
|
||||
|
|
@ -908,12 +800,6 @@ if $OPTION_DEPLOY; then
|
|||
echo "Building deployment version of libraries"
|
||||
fi
|
||||
|
||||
if $OPTION_32BIT; then
|
||||
echo "Building combined 32/64-bit binaries"
|
||||
else
|
||||
echo "Building 64-bit binaries"
|
||||
fi
|
||||
|
||||
if (( $OPTION_FORCE )); then
|
||||
echo "Forcing rebuild"
|
||||
fi
|
||||
|
|
@ -929,6 +815,7 @@ fi
|
|||
|
||||
# Build specified (or all) packages
|
||||
ALL_PACKAGES=$(all_packages)
|
||||
echo $ALL_PACKAGES
|
||||
if [ -z "$OPTION_PACKAGES" ]; then
|
||||
OPTION_PACKAGES=$ALL_PACKAGES
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,33 +1,18 @@
|
|||
#!/bin/sh -e
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script builds all library dependencies of OpenSCAD for Mac OS X.
|
||||
# The libraries will be built in 64-bit mode and backwards compatible with 10.7 "Lion".
|
||||
# This script builds library dependencies of OpenSCAD for Mac OS X using Homebrew.
|
||||
#
|
||||
# This script must be run from the OpenSCAD source root directory
|
||||
#
|
||||
# Usage: macosx-build-dependencies.sh [-d]
|
||||
# -d Build for deployment (if not specified, e.g. Sparkle won't be built)
|
||||
#
|
||||
# Prerequisites:
|
||||
# - Xcode
|
||||
#
|
||||
# FIXME:
|
||||
# o Verbose option
|
||||
# o Force rebuild vs. only rebuild changes
|
||||
# - Homebrew (http://brew.sh)
|
||||
#
|
||||
|
||||
OPENSCADDIR=$PWD
|
||||
BASEDIR=$OPENSCADDIR/../libraries
|
||||
DEPLOYDIR=$BASEDIR/homebrew
|
||||
MAC_OSX_VERSION_MIN=10.7
|
||||
|
||||
OPTION_DEPLOY=false
|
||||
|
||||
printUsage()
|
||||
{
|
||||
echo "Usage: $0 [-d]"
|
||||
echo
|
||||
echo " -d Build for deployment"
|
||||
echo "Usage: $0"
|
||||
}
|
||||
|
||||
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
|
||||
|
|
@ -35,38 +20,16 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
while getopts 'd' c
|
||||
do
|
||||
case $c in
|
||||
d) OPTION_DEPLOY=true;;
|
||||
esac
|
||||
brew update
|
||||
# FIXME: We used to require unlinking boost, but doing so also causes us to lose boost.
|
||||
# Disabling until we can figure out why we unlinked in the first place
|
||||
# brew unlink boost
|
||||
for formula in eigen boost cgal glew glib opencsg freetype libxml2 fontconfig harfbuzz qt5 qscintilla2 imagemagick; do
|
||||
brew ls --versions $formula
|
||||
brew install $formula
|
||||
brew outdated $formula || brew upgrade $formula
|
||||
done
|
||||
brew link --force gettext
|
||||
brew link --force qt5
|
||||
brew link --force qscintilla2
|
||||
|
||||
OSX_VERSION=`sw_vers -productVersion | cut -d. -f2`
|
||||
if (( $OSX_VERSION >= 9 )); then
|
||||
echo "Detected Mavericks (10.9) or later"
|
||||
elif (( $OSX_VERSION >= 8 )); then
|
||||
echo "Detected Mountain Lion (10.8)"
|
||||
elif (( $OSX_VERSION >= 7 )); then
|
||||
echo "Detected Lion (10.7)"
|
||||
else
|
||||
echo "Detected Snow Leopard (10.6) or earlier"
|
||||
fi
|
||||
|
||||
echo "Building for $MAC_OSX_VERSION_MIN or later"
|
||||
|
||||
echo "Using basedir:" $BASEDIR
|
||||
|
||||
# Homebrew doesn't support building for other OS X versions than the current,
|
||||
# but we can do this with environment variables
|
||||
export MACOSX_DEPLOYMENT_TARGET=$MAC_OSX_VERSION_MIN
|
||||
|
||||
# Don't use bottles, as they might be built with the wrong deployment target
|
||||
export HOMEBREW_BUILD_FROM_SOURCE=1
|
||||
|
||||
for formula in qt5 eigen boost cgal glew glib opencsg freetype libxml2 fontconfig harfbuzz; do
|
||||
brew install openscad/tap/$formula
|
||||
done
|
||||
if $OPTION_DEPLOY; then
|
||||
brew install --HEAD openscad/tap/sparkle
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ def validate_lib(lib):
|
|||
# Check deployment target
|
||||
m = re.search("LC_VERSION_MIN_MACOSX.*\n(.*)\n\s+version (.*)", output, re.MULTILINE)
|
||||
deploymenttarget = float(m.group(2))
|
||||
if deploymenttarget > 10.7:
|
||||
if deploymenttarget > 10.8:
|
||||
print "Error: Unsupported deployment target " + m.group(2) + " found: " + lib
|
||||
return False
|
||||
# We don't support Snow Leopard anymore
|
||||
|
|
|
|||
108
scripts/makebinpkg-deb.sh
Executable file
108
scripts/makebinpkg-deb.sh
Executable file
|
|
@ -0,0 +1,108 @@
|
|||
#!/bin/sh
|
||||
|
||||
# build a simple .deb package.
|
||||
# 1. build and install files using 'qmake PREFIX=$DEPLOYDIR;make install'
|
||||
# 2. run this script
|
||||
# 3. resulting .deb should be installed with 'sudo gdebi'.
|
||||
# resulting .deb file does not contain dependencies, only a list of them
|
||||
|
||||
OPENSCADDIR=$1
|
||||
DEPLOYDIR=$2
|
||||
OPENSCAD_VERSION=$3
|
||||
|
||||
if [ ! -e /etc/os-release ]; then
|
||||
echo sorry this requires an OS with a file /etc/os-release
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! "`command -v dpkg`" ]; then
|
||||
echo this requires dpkg
|
||||
exit
|
||||
fi
|
||||
|
||||
# set variables
|
||||
|
||||
OSINFO=`cat /etc/os-release`
|
||||
eval $OSINFO
|
||||
DEBINFO=`dpkg-architecture`
|
||||
eval $DEBINFO
|
||||
TARGETOS=`echo $ID'_'$VERSION_ID`
|
||||
ARCH=$DEB_HOST_ARCH
|
||||
MACHINE_TRIPLE=$DEB_HOST_GNU_TYPE
|
||||
|
||||
if [ ! $OPENSCAD_VERSION ]; then
|
||||
OPENSCAD_VERSION=`date "+%Y.%m.%d"`
|
||||
OPENSCADDIR=`pwd`
|
||||
DEPLOYDIR=$OPENSCADDIR/bin/$MACHINE_TRIPLE
|
||||
mkdir $DEPLOYDIR
|
||||
cd $DEPLOYDIR
|
||||
fi
|
||||
|
||||
BINARYFILE=$DEPLOYDIR/bin/openscad
|
||||
DPKGNAME=openscad_$OPENSCAD_VERSION-$TARGETOS-$ARCH
|
||||
DPKGFILE=$DPKGNAME.deb
|
||||
ESCAPED_VERSION_ID=`echo $VERSION_ID | sed -e s/\\\./_/g -`
|
||||
|
||||
DEPLIBS=`ldd $BINARYFILE | awk ' { print $3 } ';`
|
||||
PKGLIST=
|
||||
for dlib in `echo $DEPLIBS`; do
|
||||
if [ -e $dlib ]; then
|
||||
RAWPKGNAME=`dpkg -S $dlib`
|
||||
if [ ! $? -eq 0 ]; then
|
||||
echo 'unknown package for dependency '$dlib
|
||||
echo 'please use system dependencies when building deb'
|
||||
exit
|
||||
fi
|
||||
PKGNAME=`echo $RAWPKGNAME | sed -e s/":.*"//g - `
|
||||
|
||||
echo -n 'dpkg -S:' `basename $dlib`' is from'
|
||||
echo ' '$PKGNAME
|
||||
if [ ! "`echo $PKGLIST | grep $PKGNAME`" ]; then
|
||||
PKGLIST=$PKGLIST' '$PKGNAME
|
||||
else
|
||||
echo ' already added '$PKGNAME
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo 'dependency package list: '$PKGLIST
|
||||
|
||||
# make package
|
||||
|
||||
cd $DEPLOYDIR
|
||||
TOPDIR=$DEPLOYDIR/$DPKGNAME/usr/local
|
||||
find ./bin -depth -print | cpio -pud $TOPDIR
|
||||
find ./share -depth -print | cpio -pud $TOPDIR
|
||||
|
||||
DEBDIR=$DEPLOYDIR/$DPKGNAME/DEBIAN
|
||||
CONTROLFILE=$DEBDIR/control
|
||||
mkdir -p $DEBDIR
|
||||
cat << EOF > $CONTROLFILE
|
||||
Package: openscad
|
||||
Version: $OPENSCAD_VERSION
|
||||
Section: graphics
|
||||
Priority: optional
|
||||
Architecture: $ARCH
|
||||
Maintainer: $USER ($USER@$HOSTNAME)
|
||||
Description: OpenSCAD
|
||||
The programmer's solid modeller
|
||||
Depends: debhelper,
|
||||
EOF
|
||||
|
||||
sed -i '/^\s*$/d' $CONTROLFILE
|
||||
for dep in $PKGLIST; do
|
||||
echo " "$dep"," >> $CONTROLFILE
|
||||
done
|
||||
echo " debhelper" >> $CONTROLFILE
|
||||
|
||||
cat $CONTROLFILE
|
||||
|
||||
dpkg-deb -v -D --build $DPKGNAME
|
||||
if [ ! $? -eq 0 ]; then
|
||||
echo dpkg-deb failed. exiting makedpkg
|
||||
exit
|
||||
fi
|
||||
|
||||
echo in directory $DEPLOYDIR
|
||||
echo to install, please run:
|
||||
echo ' 'sudo gdebi $DPKGFILE
|
||||
|
||||
414
scripts/makebinpkg.sh
Executable file
414
scripts/makebinpkg.sh
Executable file
|
|
@ -0,0 +1,414 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# This script creates a binary package of OpenSCAD for easy installation and
|
||||
# deinstallation.
|
||||
#
|
||||
# Type of binary package filename extension
|
||||
# Mac disk image .dmg
|
||||
# Linux gdebi package .deb
|
||||
# Linux AppImage package .AppImage
|
||||
# Windows MSYS installer .exe + .zip
|
||||
# Windows cross build MXE installer .exe + .zip
|
||||
#
|
||||
# openscad/bin/host-triple-tmp temporary build files (.o,.a,ui_)
|
||||
# openscad/bin/host-triple deploy build files (binary+data)
|
||||
# openscad/bin/host-triple.extension binary package
|
||||
#
|
||||
# host-triple is a system identifier, from gcc -dumpmachine (i686-linux-gnu)
|
||||
#
|
||||
# Usage: makebinpkg.sh [-dryrun]
|
||||
#
|
||||
# -dryrun Runs this script, but creates a dummy 'openscad' binary for testing
|
||||
|
||||
check_prereq()
|
||||
{
|
||||
if [ ! -e ./scripts/setenv.sh ]; then
|
||||
echo please run from openscad root directory.
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_prereq_mxe()
|
||||
{
|
||||
check_prereq
|
||||
MAKENSIS=
|
||||
if [ "`command -v makensis`" ]; then
|
||||
MAKENSIS=makensis
|
||||
elif [ "`command -v i686-pc-mingw32-makensis`" ]; then
|
||||
# we cant find systems nsis so look for the MXE's 32 bit version.
|
||||
MAKENSIS=i686-pc-mingw32-makensis
|
||||
else
|
||||
echo "makensis not found. please install nsis on your system."
|
||||
echo "(for example, on debian linux, try apt-get install nsis)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
update_mcad()
|
||||
{
|
||||
if [ ! -e $OPENSCADDIR/libraries/MCAD/__init__.py ]; then
|
||||
echo "Downloading MCAD"
|
||||
git submodule init
|
||||
git submodule update
|
||||
else
|
||||
echo "MCAD found:" $OPENSCADDIR/libraries/MCAD
|
||||
fi
|
||||
if [ -d .git ]; then
|
||||
git submodule update
|
||||
fi
|
||||
}
|
||||
|
||||
verify_binary_generic()
|
||||
{
|
||||
run ls $BUILDDIR/openscad
|
||||
}
|
||||
|
||||
verify_binary_darwin()
|
||||
{
|
||||
run ls $BUILDDIR/OpenSCAD.app/Contents/MacOS/OpenSCAD
|
||||
}
|
||||
|
||||
verify_binary_mxe()
|
||||
{
|
||||
run ls $BUILDDIR/openscad.com
|
||||
run ls $BUILDDIR/openscad.exe
|
||||
}
|
||||
|
||||
verify_binary_linux()
|
||||
{
|
||||
if [ ! -e $BUILDDIR/$MAKE_TARGET/openscad ]; then
|
||||
echo "cant find $MAKE_TARGET/openscad. build failed. stopping."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
create_package_darwin()
|
||||
{
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $VERSIONDATE" OpenSCAD.app/Contents/Info.plist
|
||||
macdeployqt OpenSCAD.app -dmg -no-strip
|
||||
mv OpenSCAD.dmg OpenSCAD-$VERSION.dmg
|
||||
hdiutil internet-enable -yes -quiet OpenSCAD-$VERSION.dmg
|
||||
echo "Binary created: OpenSCAD-$VERSION.dmg"
|
||||
}
|
||||
|
||||
create_package_msys()
|
||||
{
|
||||
cd $OPENSCADDIR
|
||||
cd $BUILDDIR
|
||||
|
||||
echo "QT5 deployment, dll and other files copying..."
|
||||
windeployqt $MAKE_TARGET/openscad.exe
|
||||
|
||||
bits=64
|
||||
if [ $OPENSCAD_BUILD_TARGET_ARCH = i686 ]; then
|
||||
bits=32
|
||||
fi
|
||||
|
||||
flprefix=/mingw$bits/bin/
|
||||
echo MSYS2, dll copying...
|
||||
echo from $flprefix
|
||||
echo to $BUILDDIR/$MAKE_TARGET
|
||||
fl=
|
||||
boostlist="filesystem program_options regex system thread"
|
||||
liblist="mpfr-4 gmp-10 gmpxx-4 opencsg-1 harfbuzz-0 harfbuzz-gobject-0 glib-2.0-0"
|
||||
liblist="$liblist CGAL CGAL_Core fontconfig-1 expat-1 bz2-1 intl-8 iconv-2"
|
||||
liblist="$liblist pcre16-0 png16-16 icudt55 freetype-6"
|
||||
dlist="glew32 opengl qscintilla2 zlib1 jsiosdjfiosdjf Qt5PrintSupport"
|
||||
for file in $boostlist; do fl="$fl libboost_"$file"-mt.dll"; done
|
||||
for file in $liblist; do fl="$fl lib"$file".dll"; done
|
||||
for file in $dlist; do fl="$fl "$file".dll"; done
|
||||
|
||||
for dllfile in $fl; do
|
||||
copyfail $flprefix/$dllfile /$BUILDDIR/$MAKE_TARGET/
|
||||
done
|
||||
|
||||
ARCH_INDICATOR=Msys2-x86-64
|
||||
if [ $OPENSCAD_BUILD_TARGET_ARCH = i686 ]; then
|
||||
ARCH_INDICATOR=Msys2-x86-32
|
||||
fi
|
||||
BINFILE=$BUILDDIR/OpenSCAD-$VERSION-$ARCH_INDICATOR.zip
|
||||
INSTFILE=$BUILDDIR/OpenSCAD-$VERSION-$ARCH_INDICATOR-Installer.exe
|
||||
|
||||
echo
|
||||
echo "Copying main binary .exe, .com, and dlls"
|
||||
echo "from $BUILDDIR/$MAKE_TARGET"
|
||||
echo "to $BUILDDIR/openscad-$VERSION"
|
||||
TMPTAR=$BUILDDIR/windeployqt.tar
|
||||
cd $BUILDDIR
|
||||
cd $MAKE_TARGET
|
||||
tar cvf $TMPTAR --exclude=winconsole.o .
|
||||
cd $BUILDDIR
|
||||
cd ./openscad-$VERSION
|
||||
tar xvf $TMPTAR
|
||||
cd $BUILDDIR
|
||||
rm -f $TMPTAR
|
||||
|
||||
echo "Creating zipfile..."
|
||||
rm -f OpenSCAD-$VERSION.x86-$ARCH.zip
|
||||
"$ZIP" $ZIPARGS $BINFILE openscad-$VERSION
|
||||
mv $BINFILE $OPENSCADDIR/
|
||||
cd $OPENSCADDIR
|
||||
echo "Binary zip package created:"
|
||||
echo " $BINFILE"
|
||||
echo "Not creating installable .msi/.exe package"
|
||||
}
|
||||
|
||||
create_package_mxe_shared()
|
||||
{
|
||||
flprefix=$MXE_TARGET_DIR/bin
|
||||
echo Copying dlls for shared library build
|
||||
echo from $flprefix
|
||||
echo to $BUILDDIR/release
|
||||
flist=
|
||||
# fl="$fl opengl.dll" # use Windows version?
|
||||
# fl="$fl libmpfr.dll" # does not exist
|
||||
fl="$fl libgmp-10.dll"
|
||||
fl="$fl libgmpxx-4.dll"
|
||||
fl="$fl libboost_filesystem-mt.dll"
|
||||
fl="$fl libboost_program_options-mt.dll"
|
||||
fl="$fl libboost_regex-mt.dll"
|
||||
fl="$fl libboost_chrono-mt.dll"
|
||||
fl="$fl libboost_system-mt.dll"
|
||||
fl="$fl libboost_thread_win32-mt.dll"
|
||||
fl="$fl libCGAL.dll"
|
||||
fl="$fl libCGAL_Core.dll"
|
||||
fl="$fl GLEW.dll"
|
||||
fl="$fl libglib-2.0-0.dll"
|
||||
fl="$fl libopencsg-1.dll"
|
||||
fl="$fl libharfbuzz-0.dll"
|
||||
# fl="$fl libharfbuzz-gobject-0.dll" # ????
|
||||
fl="$fl libfontconfig-1.dll"
|
||||
fl="$fl libexpat-1.dll"
|
||||
fl="$fl libbz2.dll"
|
||||
fl="$fl libintl-8.dll"
|
||||
fl="$fl libiconv-2.dll"
|
||||
fl="$fl libfreetype-6.dll"
|
||||
fl="$fl libpcre16-0.dll"
|
||||
fl="$fl zlib1.dll"
|
||||
fl="$fl libpng16-16.dll"
|
||||
fl="$fl icudt54.dll"
|
||||
fl="$fl icudt.dll"
|
||||
fl="$fl icuin.dll"
|
||||
fl="$fl libstdc++-6.dll"
|
||||
fl="$fl ../qt5/lib/qscintilla2.dll"
|
||||
fl="$fl ../qt5/bin/Qt5PrintSupport.dll"
|
||||
fl="$fl ../qt5/bin/Qt5Core.dll"
|
||||
fl="$fl ../qt5/bin/Qt5Gui.dll"
|
||||
fl="$fl ../qt5/bin/Qt5OpenGL.dll"
|
||||
# fl="$fl ../qt5/bin/QtSvg4.dll" # why is this here?
|
||||
fl="$fl ../qt5/bin/Qt5Widgets.dll"
|
||||
fl="$fl ../qt5/bin/Qt5PrintSupport.dll"
|
||||
fl="$fl ../qt5/bin/Qt5PrintSupport.dll"
|
||||
for dllfile in $fl; do
|
||||
if [ -e $flprefix/$dllfile ]; then
|
||||
echo $flprefix/$dllfile
|
||||
cp $flprefix/$dllfile $BUILDDIR/release/
|
||||
else
|
||||
echo cannot find $flprefix/$dllfile
|
||||
echo stopping build.
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
create_package_mxe()
|
||||
{
|
||||
cd $OPENSCADDIR
|
||||
cd $BUILDDIR
|
||||
|
||||
# try to use a package filename that is not confusing (i686-w64-mingw32 is)
|
||||
ARCH_INDICATOR=MingW-x86-32-$OPENSCAD_BUILD_TARGET_ABI
|
||||
if [ $OPENSCAD_BUILD_TARGET_ARCH = x86_64 ]; then
|
||||
ARCH_INDICATOR=MingW-x86-64-$OPENSCAD_BUILD_TARGET_ABI
|
||||
fi
|
||||
|
||||
BINFILE=$BUILDDIR/OpenSCAD-$VERSION-$ARCH_INDICATOR.zip
|
||||
INSTFILE=$BUILDDIR/OpenSCAD-$VERSION-$ARCH_INDICATOR-Installer.exe
|
||||
|
||||
#package
|
||||
if [ $OPENSCAD_BUILD_TARGET_ABI = "shared" ]; then
|
||||
flprefix=$MXE_SYS_DIR/bin
|
||||
echo Copying dlls for shared library build
|
||||
echo from $flprefix
|
||||
echo to $BUILDDIR/$MAKE_TARGET
|
||||
flist=
|
||||
fl=
|
||||
|
||||
qtlist="PrintSupport Core Gui OpenGL Widgets"
|
||||
boostlist="filesystem program_options regex system thread_win32 chrono"
|
||||
dlist="icuin icudt icudt54 zlib1 GLEW ../qt5/lib/qscintilla2"
|
||||
liblist="stdc++-6 png16-16 pcre16-0 freetype-6 iconv-2 intl-8 bz2 expat-1"
|
||||
liblist="$liblist fontconfig-1 harfbuzz-0 opencsg-1 glib-2.0-0"
|
||||
liblist="$liblist CGAL_Core CGAL gmpxx-4 gmp-10 mpfr-4 pcre-1"
|
||||
if [ $OPENSCAD_BUILD_TARGET_ARCH = i686 ]; then
|
||||
liblist="$liblist gcc_s_sjlj-1"
|
||||
else
|
||||
liblist="$liblist gcc_s_seh-1"
|
||||
fi
|
||||
fl=
|
||||
for file in $qtlist; do fl="$fl ../qt5/bin/Qt5"$file".dll"; done
|
||||
for file in $boostlist; do fl="$fl libboost_"$file"-mt.dll"; done
|
||||
for file in $liblist; do fl="$fl lib"$file".dll"; done
|
||||
for file in $dlist; do fl="$fl "$file".dll"; done
|
||||
for dllfile in $fl; do
|
||||
copyfail $flprefix/$dllfile $BUILDDIR/$MAKE_TARGET/
|
||||
done
|
||||
# replicate windeployqt behavior. as of writing, theres no mxe windeployqt
|
||||
dqt=$BUILDDIR/$MAKE_TARGET/
|
||||
for subdir in platforms iconengines imageformats translations; do
|
||||
echo mkdir $dqt/$subdir
|
||||
mkdir $dqt/$subdir
|
||||
done
|
||||
copyfail $MXE_SYS_DIR/qt5/plugins/platforms/qwindows.dll $dqt/platforms/
|
||||
copyfail $MXE_SYS_DIR/qt/plugins/iconengines/qsvgicon4.dll $dqt/iconengines/
|
||||
for idll in `ls $MXE_SYS_DIR/qt/plugins/imageformats/`; do
|
||||
copyfail $MXE_SYS_DIR/qt/plugins/imageformats/$idll $dqt/imageformats/
|
||||
done
|
||||
# dont know how windeployqt does these .qm files in 'translations'. skip it
|
||||
fi # shared
|
||||
|
||||
echo "Copying main binary .exe, .com, and other stuff"
|
||||
echo "from $BUILDDIR/$MAKE_TARGET"
|
||||
echo "to $BUILDDIR/openscad-$VERSION"
|
||||
TMPTAR=$BUILDDIR/tmpmingw.$OPENSCAD_BUILD_TARGET_TRIPLE.tar
|
||||
cd $BUILDDIR
|
||||
cd $MAKE_TARGET
|
||||
tar cvf $TMPTAR --exclude=winconsole.o .
|
||||
cd $BUILDDIR
|
||||
cd ./openscad-$VERSION
|
||||
tar xf $TMPTAR
|
||||
cd $BUILDDIR
|
||||
rm -f $TMPTAR
|
||||
|
||||
echo "Creating binary zip package `basename $BINFILE`"
|
||||
rm -f $BINFILE
|
||||
"$ZIP" $ZIPARGS $BINFILE openscad-$VERSION
|
||||
cd $OPENSCADDIR
|
||||
|
||||
echo "Creating installer `basename $INSTFILE`"
|
||||
echo "Copying NSIS files to $BUILDDIR/openscad-$VERSION"
|
||||
cp ./scripts/installer$OPENSCAD_BUILD_TARGET_ARCH.nsi $BUILDDIR/openscad-$VERSION/installer_arch.nsi
|
||||
cp ./scripts/installer.nsi $BUILDDIR/openscad-$VERSION/
|
||||
cp ./scripts/mingw-file-association.nsh $BUILDDIR/openscad-$VERSION/
|
||||
cp ./scripts/x64.nsh $BUILDDIR/openscad-$VERSION/
|
||||
cp ./scripts/LogicLib.nsh $BUILDDIR/openscad-$VERSION/
|
||||
cd $BUILDDIR/openscad-$VERSION
|
||||
NSISDEBUG=-V2
|
||||
# NSISDEBUG= # leave blank for full log
|
||||
echo $MAKENSIS $NSISDEBUG "-DVERSION=$VERSION" installer.nsi
|
||||
$MAKENSIS $NSISDEBUG "-DVERSION=$VERSION" installer.nsi
|
||||
cp $BUILDDIR/openscad-$VERSION/openscad_setup.exe $INSTFILE
|
||||
cd $OPENSCADDIR
|
||||
|
||||
mv $BINFILE $OPENSCADDIR/
|
||||
mv $INSTFILE $OPENSCADDIR/
|
||||
}
|
||||
|
||||
create_package_linux()
|
||||
{
|
||||
cd $OPENSCADDIR
|
||||
if [ "`echo $* | grep deb`" ]; then
|
||||
./scripts/makebinpkg-deb.sh $OPENSCADDIR $DEPLOYDIR $OPENSCAD_VERSION
|
||||
fi
|
||||
cd $BUILDDIR
|
||||
}
|
||||
|
||||
call_qmake()
|
||||
{
|
||||
DRYRUN=
|
||||
QDEBUG=
|
||||
# QDEBUG="-d -d"
|
||||
QMAKE="`command -v qmake-qt5`"
|
||||
if [ ! -x "$QMAKE" ]; then
|
||||
QMAKE=qmake
|
||||
fi
|
||||
QPRO_FILE=$OPENSCADDIR/openscad.pro
|
||||
if [ "`echo $* | grep dryrun`" ]; then
|
||||
DRYRUN="CONFIG+=dryrun"
|
||||
fi
|
||||
qmake $DRYRUN $QDEBUG PREFIX=$DEPLOYDIR OPENSCAD_VERSION=$OPENSCAD_VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT $QPRO_FILE
|
||||
}
|
||||
|
||||
cleanup()
|
||||
{
|
||||
make clean
|
||||
}
|
||||
|
||||
cleanup_darwin()
|
||||
{
|
||||
make clean
|
||||
sed -i.bak s/.Volumes.Macintosh.HD//g Makefile
|
||||
rm -rf OpenSCAD.app
|
||||
}
|
||||
|
||||
cleanup_mxe()
|
||||
{
|
||||
make clean
|
||||
rm -f ./release/*
|
||||
rm -f ./debug/*
|
||||
rm -rf $BUILDDIR/openscad-$VERSION
|
||||
mkdir $BUILDDIR/openscad-$VERSION
|
||||
}
|
||||
|
||||
call_make_install()
|
||||
{
|
||||
run make
|
||||
run make install
|
||||
}
|
||||
|
||||
call_make_install_mxe()
|
||||
{
|
||||
run call_make
|
||||
# make console pipe-able openscad.com - see winconsole.pro for info
|
||||
run qmake $OPENSCADDIR/winconsole/winconsole.pro
|
||||
run make
|
||||
run make install
|
||||
}
|
||||
|
||||
call_make_install_msys()
|
||||
{
|
||||
call_make_mxe
|
||||
}
|
||||
|
||||
setup_dirs()
|
||||
{
|
||||
if [ ! -d $BUILDDIR ]; then
|
||||
mkdir -p $BUILDDIR
|
||||
fi
|
||||
RESOURCES_DIR=$BUILDDIR/openscad-$VERSION
|
||||
}
|
||||
|
||||
setup_dirs_darwin()
|
||||
{
|
||||
setup_dirs
|
||||
RESOURCES_DIR=$BUILDDIR/OpenSCAD.app/Contents/Resources
|
||||
}
|
||||
|
||||
copy_resources()
|
||||
{
|
||||
cd $OPENSCADDIR
|
||||
#find ./examples -print -depth | cpio -pud $RESOURCES_DIR
|
||||
#find ./color-schemes -print -depth | cpio -pud $RESOURCES_DIR
|
||||
#find ./libraries -print -depth | grep -v ".git" | cpio -pud $RESOURCES_DIR
|
||||
#find ./locale -print -depth | grep ".mo" | cpio -pud $RESOURCES_DIR
|
||||
#chmod -R u=rwx,go=r,+X $RESOURCES_DIR/libraries
|
||||
#chmod -R 644 $RESOURCES_DIR/examples
|
||||
cd $BUILDDIR
|
||||
}
|
||||
|
||||
|
||||
#set -x
|
||||
check_prereq
|
||||
source ./scripts/setenv.sh $*
|
||||
run update_mcad
|
||||
run setup_dirs
|
||||
|
||||
cd $BUILDDIR
|
||||
QT_SELECT=5
|
||||
ZIP="zip"
|
||||
ZIPARGS="-r -q"
|
||||
|
||||
run call_qmake $*
|
||||
run cleanup
|
||||
run call_make_install
|
||||
run create_package $*
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# This script builds all library dependencies of OpenSCAD for cross-compilation
|
||||
# from linux to mingw32/64 for windows, using the MXE cross build system.
|
||||
#
|
||||
# This script must be run from the OpenSCAD source root directory
|
||||
# from linux to mingw32/64 for windows(TM), using the MXE cross build system.
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/mingw-x-build-dependencies.sh # 32 bit
|
||||
# ./scripts/mingw-x-build-dependencies.sh 64 # 64 bit
|
||||
# . ./scripts/setenv-mingw-xbuild.sh [64|32] [static|shared]
|
||||
# ./scripts/mingw-x-build-dependencies.sh
|
||||
#
|
||||
# If you just want to download, and build later:
|
||||
# As of 2016 MXE allows these targets with the MXE_TARGETS environment variable.
|
||||
#
|
||||
# ./scripts/mingw-x-build-dependencies.sh download # 32 bit download
|
||||
# ./scripts/mingw-x-build-dependencies.sh 64 download # 64 bit download
|
||||
# 64 bit static linked libraries MXE_TARGETS=x86_64-w64-mingw32.static
|
||||
# 32 bit static linked libraries MXE_TARGETS=i686-w64-mingw32.static
|
||||
# 64 bit shared libraries MXE_TARGETS=x86_64-w64-mingw32.shared
|
||||
# 32 bit shared libraries MXE_TARGETS=i686-w64-mingw32.shared
|
||||
#
|
||||
# Prerequisites:
|
||||
#
|
||||
|
|
@ -20,28 +20,13 @@
|
|||
#
|
||||
# Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
# Originally this was based on Tony Theodore's branch of MXE, which is now
|
||||
# integrated into official MXE.
|
||||
#
|
||||
# Targets:
|
||||
#
|
||||
# MXE allows 4 separate targets with the MXE_TARGETS environment variable.
|
||||
# As of 2015 shared are not guaranteed to work.
|
||||
#
|
||||
# 64 bit static linked libraries MXE_TARGETS=x86_64-w64-mingw32.static
|
||||
# 32 bit static linked libraries MXE_TARGETS=i686-w64-mingw32.static
|
||||
# 64 bit shared libraries MXE_TARGETS=x86_64-w64-mingw32.shared
|
||||
# 32 bit shared libraries MXE_TARGETS=i686-w64-mingw32.shared
|
||||
# Shout out to Tony Theodore for updating MXE to 64 bit
|
||||
#
|
||||
|
||||
OPENSCADDIR=$PWD
|
||||
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
|
||||
echo "Must be run from the OpenSCAD source root directory"
|
||||
exit 0
|
||||
if [ ! "`command -v zip`" ]; then
|
||||
echo please install zip
|
||||
exit
|
||||
fi
|
||||
echo OPENSCADDIR: $OPENSCADDIR
|
||||
|
||||
if [ ! $NUMCPU ]; then
|
||||
echo "note: you can 'export NUMCPU=x' for multi-core compiles (x=number)";
|
||||
|
|
@ -56,43 +41,59 @@ if [ ! $NUMJOBS ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
. ./scripts/setenv-mingw-xbuild.sh $*
|
||||
|
||||
if [ ! -e $BASEDIR ]; then
|
||||
mkdir -p $BASEDIR
|
||||
if [ ! $OPENSCAD_BUILD_TARGET_OSTYPE ]; then
|
||||
echo "please run 'source ./scripts/setenv-mingw-xbuild.sh' first"
|
||||
echo "please check the README.MD"
|
||||
fi
|
||||
|
||||
if [ ! -e $MXEDIR ]; then
|
||||
mkdir -p $MXEDIR
|
||||
cd $MXEDIR/..
|
||||
echo "Downloading MXE into " $PWD
|
||||
git clone git://github.com/openscad/mxe.git $MXEDIR
|
||||
docmd()
|
||||
{
|
||||
echo $*
|
||||
$*
|
||||
}
|
||||
|
||||
PACKAGES='qtbase qscintilla2 mpfr eigen opencsg cgal'
|
||||
PACKAGES=$PACKAGES' glib freetype fontconfig harfbuzz libxml2'
|
||||
if [ "`echo $MXE_TARGET | grep i686`" ]; then
|
||||
PACKAGES=$PACKAGES' nsis'
|
||||
fi
|
||||
|
||||
echo "entering" $MXEDIR
|
||||
cd $MXEDIR
|
||||
echo 'checkout openscad-snapshot-build branch'
|
||||
git checkout openscad-snapshot-build
|
||||
if [ "`echo $* | grep 64`" ]; then
|
||||
MXE_TARGETS='x86_64-w64-mingw32.static'
|
||||
if [ "`echo $* | grep download`" ]; then
|
||||
PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qtbase download-glib download-freetype download-fontconfig download-harfbuzz'
|
||||
else
|
||||
PACKAGES='qtbase qscintilla2 mpfr eigen opencsg cgal glib freetype fontconfig harfbuzz'
|
||||
fi
|
||||
else
|
||||
MXE_TARGETS='i686-w64-mingw32.static'
|
||||
if [ "`echo $* | grep download`" ]; then
|
||||
PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qtbase download-nsis download-glib download-freetype download-fontconfig download-harfbuzz'
|
||||
else
|
||||
PACKAGES='qtbase qscintilla2 mpfr eigen opencsg cgal nsis glib freetype fontconfig harfbuzz'
|
||||
fi
|
||||
fi
|
||||
echo make $PACKAGES MXE_TARGETS=$MXE_TARGETS -j $NUMCPU JOBS=$NUMJOBS
|
||||
make $PACKAGES MXE_TARGETS=$MXE_TARGETS -j $NUMCPU JOBS=$NUMJOBS
|
||||
mxe_get_debian_binary_deps()
|
||||
{
|
||||
debline="deb http://pkg.mxe.cc/repos/apt/debian wheezy main"
|
||||
echo $debline > /etc/apt/sources.list.d/mxeapt.list
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB
|
||||
apt-get update
|
||||
MXE_PREFIX=`echo $MXE_TARGET | sed -e s/_/-/g`
|
||||
PKGLIST=
|
||||
for pkg in $PACKAGES; do
|
||||
PKGLIST=$PKGLIST' '$MXE_PREFIX'-'$pkg
|
||||
done
|
||||
apt-get -y install $PKGLIST
|
||||
apt-get install nsis
|
||||
}
|
||||
|
||||
echo "leaving" $MXEDIR
|
||||
mxe_build_from_src()
|
||||
{
|
||||
if [ ! $MXE_TARGET ]; then
|
||||
echo please run '. scripts/setenv-mingw-xbuild.sh'
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -e $MXEDIR ]; then
|
||||
mkdir -p $MXEDIR
|
||||
cd $MXEDIR/..
|
||||
echo "Downloading MXE into " $PWD
|
||||
git clone git://github.com/openscad/mxe.git $MXEDIR
|
||||
fi
|
||||
|
||||
docmd cd $MXEDIR
|
||||
docmd git checkout openscad-snapshot-build
|
||||
|
||||
docmd make $PACKAGES MXE_TARGETS=$MXE_TARGET -j $NUMCPU JOBS=$NUMJOBS
|
||||
docmd cd $OPENSCADDIR
|
||||
}
|
||||
|
||||
mxe_get_debian_binary_deps
|
||||
|
||||
echo "entering $OPENSCADDIR"
|
||||
cd $OPENSCADDIR
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd "$( dirname "$( type -p $0 )" )"
|
||||
libdir=$PWD/../lib/openscad/
|
||||
cd "$OLDPWD"
|
||||
|
||||
export LIBGL_DRIVERS_PATH="$libdir"/dri
|
||||
export LD_LIBRARY_PATH="$libdir${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||
exec $libdir/openscad "$@"
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -4,113 +4,99 @@
|
|||
#
|
||||
# Usage:
|
||||
#
|
||||
# source ./scripts/setenv-mingw-xbuild.sh # 32 bit build
|
||||
# source ./scripts/setenv-mingw-xbuild.sh 64 # 64 bit build
|
||||
# source ./scripts/setenv-mingw-xbuild.sh clean # Clean up exported variables
|
||||
# source ./scripts/setenv-mingw-xbuild.sh qt5 # use qt5 (experimental)
|
||||
# source ./scripts/setenv-mingw-xbuild.sh [32|64] [shared|static] [qt4]
|
||||
#
|
||||
# Prerequisites:
|
||||
#
|
||||
# Please see http://mxe.cc/#requirements
|
||||
# Please see http://mxe.cc/#requirements
|
||||
#
|
||||
# Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X
|
||||
#
|
||||
|
||||
OPENSCADDIR=$PWD
|
||||
if [ ! -e openscad.pro ]; then
|
||||
echo "please run from root openscad source"
|
||||
fi
|
||||
|
||||
if [ ! $BASEDIR ]; then
|
||||
BASEDIR=$HOME/openscad_deps
|
||||
fi
|
||||
|
||||
DEPLOYDIR64=$OPENSCADDIR/mingw64.static
|
||||
DEPLOYDIR32=$OPENSCADDIR/mingw32.static
|
||||
|
||||
if [ ! $DEPLOYDIR ]; then
|
||||
if [ "`echo $* | grep 64 `" ]; then
|
||||
DEPLOYDIR=$DEPLOYDIR64
|
||||
else
|
||||
DEPLOYDIR=$DEPLOYDIR32
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! $MXEDIR ]; then
|
||||
if [ "`echo $* | grep 64 `" ]; then
|
||||
MXEDIR=$BASEDIR/mxe-w64
|
||||
else
|
||||
MXEDIR=$BASEDIR/mxe
|
||||
fi
|
||||
MXEDIR=$BASEDIR/mxe
|
||||
if [ ! -e $MXEDIR ]; then
|
||||
if [ -e /opt/mxe ]; then
|
||||
MXEDIR=/opt/mxe
|
||||
MXEDIR=/opt/mxe # mxe on custom build machines
|
||||
fi
|
||||
#if [ -e /usr/lib/mxe ]; then
|
||||
# MXEDIR=/usr/lib/mxe # mxe dpkg binary on debian
|
||||
#fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! $MXEQTSUBDIR ]; then
|
||||
if [ "`echo $* | grep qt4 `" ]; then
|
||||
# qt4 is just 'qt' in MXE, see http://mxe.cc
|
||||
MXEQTSUBDIR=qt
|
||||
else
|
||||
# default is qt5 see issue #252
|
||||
MXEQTSUBDIR=qt5
|
||||
fi
|
||||
MXE_TRIPLET_64=x86_64-w64-mingw32
|
||||
MXE_TRIPLET_32=i686-w64-mingw32
|
||||
|
||||
MXE_TRIPLET=$MXE_TRIPLET_64
|
||||
if [ "`echo $* | grep 32 `" ]; then
|
||||
MXE_TRIPLET=$MXE_TRIPLET_32
|
||||
fi
|
||||
|
||||
if [ ! -e $DEPLOYDIR ]; then
|
||||
mkdir -p $DEPLOYDIR
|
||||
MXE_LIB_TYPE=static
|
||||
if [ "`echo $* | grep shared `" ]; then
|
||||
MXE_LIB_TYPE=shared
|
||||
fi
|
||||
|
||||
if [ "`echo $* | grep 64 `" ]; then
|
||||
MXETARGETDIR=$MXEDIR/usr/x86_64-w64-mingw32.static
|
||||
else
|
||||
MXETARGETDIR=$MXEDIR/usr/i686-w64-mingw32.static
|
||||
MXE_QTSUBDIR=qt5
|
||||
if [ "`echo $* | grep qt4 `" ]; then
|
||||
MXE_QTSUBDIR=qt
|
||||
fi
|
||||
|
||||
if [ ! $MINGWX_SAVED_ORIGINAL_PATH ]; then
|
||||
MINGWX_SAVED_ORIGINAL_PATH=$PATH
|
||||
echo current path saved
|
||||
fi
|
||||
MXE_TARGET=$MXE_TRIPLET'.'$MXE_LIB_TYPE
|
||||
MXE_TARGET_DIR=$MXEDIR/usr/$MXE_TARGET
|
||||
MXE_QTBIN_DIR=$MXE_TARGET_DIR/$MXE_QTSUBDIR/bin
|
||||
MXE_BIN_DIR=$MXEDIR/usr/bin
|
||||
DEPLOYDIR=$OPENSCADDIR/bin/$MXE_TARGET
|
||||
OPENSCAD_LIBRARIES=$MXE_TARGET_DIR
|
||||
|
||||
PATH=$MXEDIR/usr/bin:$PATH
|
||||
PATH=$MXETARGETDIR/$MXEQTSUBDIR/bin:$PATH
|
||||
cleanpath()
|
||||
{
|
||||
D1=$MXEDIR/usr/$MXE_TRIPLET_32.s...../qt/bin:
|
||||
D2=$MXEDIR/usr/$MXE_TRIPLET_32.s...../qt5/bin:
|
||||
D3=$MXEDIR/usr/$MXE_TRIPLET_64.s...../qt/bin:
|
||||
D4=$MXEDIR/usr/$MXE_TRIPLET_64.s...../qt5/bin:
|
||||
PATH=`echo $PATH | sed -e s~$D1~~g`
|
||||
PATH=`echo $PATH | sed -e s~$D2~~g`
|
||||
PATH=`echo $PATH | sed -e s~$D3~~g`
|
||||
PATH=`echo $PATH | sed -e s~$D4~~g`
|
||||
PATH=`echo $PATH | sed -e s~$MXEDIR/usr/bin:~~g`
|
||||
}
|
||||
|
||||
OPENSCAD_LIBRARIES=$MXETARGETDIR
|
||||
cleanpath
|
||||
PATH=$MXE_BIN_DIR:$MXE_QTBIN_DIR:$PATH
|
||||
|
||||
if [ "`echo $* | grep clean`" ]; then
|
||||
OPENSCAD_LIBRARIES=
|
||||
BASEDIR=
|
||||
MXEDIR=
|
||||
MXETARGETDIR=
|
||||
DEPLOYDIR=
|
||||
PATH=$MINGWX_SAVED_ORIGINAL_PATH
|
||||
MINGWX_SAVED_ORIGINAL_PATH=
|
||||
MXEQTSUBDIR=
|
||||
else
|
||||
echo 'linking' $MXETARGETDIR
|
||||
echo ' to' $DEPLOYDIR/mingw-cross-env
|
||||
rm -f $DEPLOYDIR/mingw-cross-env
|
||||
ln -s $MXETARGETDIR $DEPLOYDIR/mingw-cross-env
|
||||
fi
|
||||
|
||||
export OPENSCAD_LIBRARIES
|
||||
export OPENSCADDIR
|
||||
export BASEDIR
|
||||
export MXEDIR
|
||||
export MXETARGETDIR
|
||||
export MXE_TARGET
|
||||
export MXE_LIB_TYPE
|
||||
export MXE_TARGET_DIR
|
||||
export DEPLOYDIR
|
||||
export OPENSCAD_LIBRARIES
|
||||
export PATH
|
||||
export MINGWX_SAVED_ORIGINAL_PATH
|
||||
export MXEQTSUBDIR
|
||||
|
||||
echo OPENSCAD_LIBRARIES: $OPENSCAD_LIBRARIES
|
||||
echo OPENSCADDIR: $OPENSCADDIR
|
||||
echo BASEDIR: $BASEDIR
|
||||
echo MXEDIR: $MXEDIR
|
||||
echo MXETARGETDIR: $MXETARGETDIR
|
||||
echo MXE_TARGET: $MXE_TARGET
|
||||
echo MXE_LIB_TYPE: $MXE_LIB_TYPE
|
||||
echo MXE_TARGET_DIR: $MXE_TARGET_DIR
|
||||
echo DEPLOYDIR: $DEPLOYDIR
|
||||
echo MXEQTSUBDIR: $MXEQTSUBDIR
|
||||
if [ "`echo $* | grep clean`" ]; then
|
||||
echo PATH restored to pre-setenv-mingw-x state
|
||||
else
|
||||
echo PATH modified: $MXEDIR/usr/bin
|
||||
echo PATH modified: $MXETARGETDIR/$MXEQTSUBDIR/bin
|
||||
echo OPENSCAD_LIBRARIES: $OPENSCAD_LIBRARIES
|
||||
echo PATH: $PATH
|
||||
|
||||
if [ ! -e $DEPLOYDIR ]; then
|
||||
echo creating $DEPLOYDIR
|
||||
mkdir -p $DEPLOYDIR
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,37 @@
|
|||
# setup environment variables for building OpenSCAD against custom built
|
||||
# dependency libraries. works on Linux/BSD.
|
||||
#
|
||||
# Please see the 'uni-build-dependencies.sh' file for usage information
|
||||
# setup environment variables for building OpenSCAD
|
||||
#
|
||||
|
||||
linuxbrew()
|
||||
{
|
||||
#LDFLAGS: -L$HOME/.linuxbrew/opt/qt5/lib
|
||||
#CPPFLAGS: -I$HOME/.linuxbrew/opt/qt5/include
|
||||
BASEDIR=$HOME/.linuxbrew
|
||||
PKG_CONFIG_PATH=$BASEDIR/opt/qt5/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
PATH=$BASEDIR/bin:$PATH
|
||||
PATH=$BASEDIR/opt/qt5/bin:$PATH
|
||||
LD_LIBRARY_PATH=$BASEDIR/lib:$BASEDIR/lib64:$BASEDIR/opt/qt5/lib
|
||||
LD_RUN_PATH=$BASEDIR/lib:$BASEDIR/lib64:$BASEDIR/opt/qt5/lib
|
||||
OPENSCAD_LIBRARIES=$BASEDIR
|
||||
GLEWDIR=$BASEDIR
|
||||
DEPLOYDIR=`pwd`/binbrew/
|
||||
export BASEDIR
|
||||
export PKG_CONFIG_PATH
|
||||
export PATH
|
||||
export LD_LIBRARY_PATH
|
||||
export LD_RUN_PATH
|
||||
export OPENSCAD_LIBRARIES
|
||||
export GLEWDIR
|
||||
echo BASEDIR: $BASEDIR
|
||||
echo PKG_CONFIG_PATH: $PKG_CONFIG_PATH
|
||||
echo DEPLOYDIR: $DEPLOYDIR
|
||||
echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH
|
||||
echo LD_RUN_PATH: $LD_RUN_PATH
|
||||
echo OPENSCAD_LIBRARIES: $OPENSCAD_LIBRARIES
|
||||
echo GLEWDIR: $GLEWDiR
|
||||
echo PATH: $PATH
|
||||
}
|
||||
|
||||
setenv_common()
|
||||
{
|
||||
if [ ! $BASEDIR ]; then
|
||||
|
|
@ -44,22 +72,35 @@ setenv_common()
|
|||
setenv_freebsd()
|
||||
{
|
||||
echo .... freebsd detected.
|
||||
echo .... if you have freebsd >9, it is advisable to install
|
||||
echo .... the clang compiler and re-run this script as
|
||||
echo .... '. ./scripts/setenv-unibuild.sh clang'
|
||||
setenv_common
|
||||
QMAKESPEC=freebsd-g++
|
||||
if [ "`uname -a |grep -i freebsd.9`" ]; then
|
||||
echo freebsd9 is unsupported, please use freebsd 11
|
||||
elif [ "`uname -a |grep -i freebsd.10`" ]; then
|
||||
echo freebsd10 is unsupported, please use freebsd 11
|
||||
else
|
||||
QMAKESPEC=freebsd-clang
|
||||
CC=clang
|
||||
CXX=clang++
|
||||
fi
|
||||
QTDIR=/usr/local/share/qt4
|
||||
PATH=/usr/local/lib/qt4/bin:$PATH
|
||||
export PATH
|
||||
export QMAKESPEC
|
||||
export QTDIR
|
||||
export CC
|
||||
export CXX
|
||||
echo QMAKESPEC $QMAKESPEC
|
||||
echo QTDIR $QTDIR
|
||||
echo CXX CC $CXX $CC
|
||||
}
|
||||
|
||||
setenv_netbsd()
|
||||
{
|
||||
setenv_common
|
||||
echo --- netbsd build situation is complex. it comes with gcc4.5
|
||||
echo --- which is incompatable with updated CGAL.
|
||||
echo --- you may need to hack with newer gcc to make it work
|
||||
if [ "` uname -a |grep NetBSD.6 `" ]; then
|
||||
echo sorry, recommend NetBSD 7 or more, you will have to hack 6 yourself
|
||||
fi
|
||||
# we have to use qt4 here because netbsd7 has no qscintilla for qt5
|
||||
QMAKESPEC=netbsd-g++
|
||||
QTDIR=/usr/pkg/qt4
|
||||
PATH=/usr/pkg/qt4/bin:$PATH
|
||||
|
|
@ -84,17 +125,6 @@ setenv_linux_clang()
|
|||
echo QMAKESPEC has been modified: $QMAKESPEC
|
||||
}
|
||||
|
||||
setenv_freebsd_clang()
|
||||
{
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export QMAKESPEC=freebsd-clang
|
||||
|
||||
echo CC has been modified: $CC
|
||||
echo CXX has been modified: $CXX
|
||||
echo QMAKESPEC has been modified: $QMAKESPEC
|
||||
}
|
||||
|
||||
setenv_netbsd_clang()
|
||||
{
|
||||
echo --------------------- this is not yet supported. netbsd 6 lacks
|
||||
|
|
@ -118,16 +148,15 @@ clean_note()
|
|||
echo "Please re-run" $QMAKEBIN "and run 'make clean' if necessary"
|
||||
}
|
||||
|
||||
if [ "`uname | grep -i 'linux\|debian'`" ]; then
|
||||
if [ "`echo $* | grep brew`" ]; then
|
||||
linuxbrew
|
||||
elif [ "`uname | grep -i 'linux\|debian'`" ]; then
|
||||
setenv_common
|
||||
if [ "`echo $* | grep clang`" ]; then
|
||||
setenv_linux_clang
|
||||
fi
|
||||
elif [ "`uname | grep -i freebsd`" ]; then
|
||||
setenv_freebsd
|
||||
if [ "`echo $* | grep clang`" ]; then
|
||||
setenv_freebsd_clang
|
||||
fi
|
||||
elif [ "`uname | grep -i netbsd`" ]; then
|
||||
setenv_netbsd
|
||||
if [ "`echo $* | grep clang`" ]; then
|
||||
|
|
|
|||
184
scripts/setenv.sh
Normal file
184
scripts/setenv.sh
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# set environment variables for various builds
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# source ./scripts/setenv.sh # standard darwin/linux/msys2 build
|
||||
#
|
||||
# MXE Linux->Windows cross building:
|
||||
#
|
||||
# source ./scripts/setenv.sh i686-w64-mingw32.static # Static link 32bit
|
||||
# source ./scripts/setenv.sh i686-w64-mingw32.shared # Dynamic link 32bit
|
||||
# source ./scripts/setenv.sh x86_64-w64-mingw32.static # Static link 64bit
|
||||
# source ./scripts/setenv.sh x86_64-w64-mingw32.shared # Dynamic link 64bit
|
||||
#
|
||||
# Special linux builds:
|
||||
#
|
||||
# source ./scripts/setenv.sh brew # use linuxbrew from $HOME/.linuxbrew
|
||||
# source ./scripts/setenv.sh clang # build linux using clang compiler
|
||||
#
|
||||
# See Also:
|
||||
#
|
||||
# ARCH,SUB,SYS,ABI - http://clang.llvn.org/docs/CrossCompilation
|
||||
# https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html
|
||||
# HOST = machine openscad will be run on
|
||||
# BUILD = machine openscad is being built on
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
# This script works by using function naming and run()
|
||||
# Ex, using 'run setup_mypath' will run setup_mypath, but if you
|
||||
# are on darwin, it will instead run 'setup_mypath_darwin', which
|
||||
# may or may not call the main setup_mypath
|
||||
|
||||
setup_host()
|
||||
{
|
||||
if [ "`echo $1 | grep mingw`" ]; then
|
||||
HOST_TRIPLE=$1
|
||||
MXE_TARGET=$1
|
||||
elif [ "`command -v gcc`" ]; then
|
||||
HOST_TRIPLE=`gcc -dumpmachine`
|
||||
elif [ "`command -v clang`" ]; then
|
||||
HOST_TRIPLE=`clang -dumpmachine`
|
||||
fi
|
||||
export_and_print_vars HOST_TRIPLE MXE_TARGET
|
||||
}
|
||||
|
||||
setup_host_darwin()
|
||||
{
|
||||
. ./setenv_mac-qt5.sh
|
||||
}
|
||||
|
||||
setup_buildtype()
|
||||
{
|
||||
BUILDTYPE=$OSTYPE
|
||||
case $BUILDTYPE in
|
||||
darwin*)
|
||||
BUILDTYPE=darwin
|
||||
;;
|
||||
linux*)
|
||||
BUILDTYPE=linux
|
||||
;;
|
||||
esac
|
||||
if [ "`echo $1 | grep mingw`" ]; then
|
||||
BUILDTYPE=mxe
|
||||
fi
|
||||
export_and_print_vars BUILDTYPE
|
||||
}
|
||||
|
||||
setup_dirvars()
|
||||
{
|
||||
OPENSCADDIR=$PWD
|
||||
|
||||
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
|
||||
echo "Cannot find OPENSCADDIR/openscad.pro, OPENSCADDIR should be src root "
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEPLOYDIR=$OPENSCADDIR/bin/$HOST_TRIPLE
|
||||
BUILDDIR=$OPENSCADDIR/build/$HOST_TRIPLE
|
||||
|
||||
export_and_print_vars OPENSCADDIR DEPLOYDIR BUILDDIR
|
||||
}
|
||||
|
||||
setup_dirvars_mxe()
|
||||
{
|
||||
setup_dirvars
|
||||
if [ ! $MXEDIR ]; then
|
||||
MXEDIR=$HOME/openscad_deps/mxe
|
||||
fi
|
||||
if [ ! -e $MXEDIR ]; then
|
||||
if [ -e /opt/mxe ]; then
|
||||
MXEDIR=/opt/mxe # mxe on custom build machines
|
||||
fi
|
||||
fi
|
||||
if [ ! -e $MXEDIR ]; then
|
||||
if [ -e /usr/lib/mxe ]; then
|
||||
MXEDIR=/usr/lib/mxe # mxe dpkg binary on debian
|
||||
fi
|
||||
fi
|
||||
if [ ! -e $MXEDIR ]; then
|
||||
echo "cannot find mxe. please install, see README.md"
|
||||
fi
|
||||
OPENSCAD_LIBRARIES=$MXEDIR/usr/$MXE_TARGET
|
||||
PATH=$MXEDIR/usr/bin:$PATH
|
||||
PKG_CONFIG_PATH=$MXEDIR/lib/pkgconfig
|
||||
export_and_print_vars OPENSCAD_LIBRARIES PATH PKG_CONFIG_PATH
|
||||
}
|
||||
|
||||
setup_dirvars_linuxbrew()
|
||||
{
|
||||
setup_dirvars
|
||||
OPENSCAD_LIBRARIES=$HOME/.linuxbrew
|
||||
PATH=$HOME/.linuxbrew/bin:$PATH
|
||||
PATH=$HOME/.linuxbrew/sbin:$PATH
|
||||
PATH=$HOME/.linuxbrew/opt/lib/qt5/bin:$PATH
|
||||
PKG_CONFIG_PATH=$HOME/.linuxbrew/lib/pkgconfig
|
||||
export_and_print_vars OPENSCAD_LIBRARIES PATH PKG_CONFIG_PATH
|
||||
}
|
||||
|
||||
setup_dirvars_darwin()
|
||||
{
|
||||
if [ ! $OPENSCAD_LIBRARIES ]; then
|
||||
OPENSCAD_LIBRARIES=/usr/local/Cellar
|
||||
if [ ! -e $OPENSCAD_LIBRARIES ]; then
|
||||
OPENSCAD_LIBRARIES=/opt/local
|
||||
fi
|
||||
if [ ! -e $OPENSCAD_LIBRARIES ]; then
|
||||
echo cannot find /usr/local/Cellar nor /opt/local, please see README
|
||||
fi
|
||||
fi
|
||||
export_and_print_vars OPENSCAD_LIBRARIES
|
||||
}
|
||||
|
||||
export_and_print_vars()
|
||||
{
|
||||
if [ "`echo $*`" ]; then
|
||||
for varname in $*; do
|
||||
export $varname
|
||||
echo "$varname: "`eval echo "$"$varname`
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
run()
|
||||
{
|
||||
# run() calls function $1, or a specialized version $1_$ostype.
|
||||
# also it exits the build if there is an error.
|
||||
# stackoverflow.com/questions/85880/determine-if-a-function-exists-in-bash
|
||||
runfunc1=`echo $1"_"$BUILDTYPE`
|
||||
runfunc2=`echo $1`
|
||||
if [ "`type -t $runfunc1 | grep function`" ]; then
|
||||
echo "calling $runfunc1 $2 $3 $4 $5"
|
||||
eval $runfunc1 $2 $3 $4 $5
|
||||
elif [ "`type -t $runfunc2 | grep function`" ]; then
|
||||
echo "calling $runfunc2 $2 $3 $4 $5"
|
||||
eval $runfunc2 $2 $3 $4 $5
|
||||
else
|
||||
echo "calling "$*
|
||||
eval $*
|
||||
fi
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Error while running $* ...Stopping"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
setup_version()
|
||||
{
|
||||
OPENSCAD_VERSION=`date "+%Y.%m.%d"`
|
||||
export_and_print_vars OPENSCAD_VERSION
|
||||
}
|
||||
|
||||
run setup_host
|
||||
run setup_buildtype
|
||||
run setup_dirvars
|
||||
run setup_version
|
||||
|
||||
#run setup_dirs
|
||||
#run save_path
|
||||
#run setup_path
|
||||
#if [ "`echo $ARGS | grep clang`" ]; then
|
||||
# run setup_clang
|
||||
#fi
|
||||
|
|
@ -25,6 +25,9 @@ updatepot()
|
|||
| awk '{ printf "#: examples/examples.json:%d\nmsgid %s\nmsgstr \"\"\n\n", $1, $2 }' \
|
||||
> ./locale/json-strings.pot
|
||||
|
||||
# extract strings from appdata file
|
||||
itstool -o ./locale/appdata-strings.pot ./openscad.appdata.xml.in --its=./contrib/appdata.its
|
||||
|
||||
VER=`date +"%Y.%m.%d"`
|
||||
OPTS=
|
||||
OPTS=$OPTS' --package-name=OpenSCAD'
|
||||
|
|
@ -41,7 +44,7 @@ updatepot()
|
|||
exit 1
|
||||
fi
|
||||
|
||||
cmd="${GETTEXT_PATH}msgcat -o ./locale/openscad.pot ./locale/openscad-tmp.pot ./locale/json-strings.pot"
|
||||
cmd="${GETTEXT_PATH}msgcat -o ./locale/openscad.pot ./locale/openscad-tmp.pot ./locale/json-strings.pot ./locale/appdata-strings.pot"
|
||||
echo $cmd
|
||||
$cmd
|
||||
if [ ! $? = 0 ]; then
|
||||
|
|
@ -50,7 +53,7 @@ updatepot()
|
|||
fi
|
||||
|
||||
sed -e s/"CHARSET"/"UTF-8"/g ./locale/openscad.pot > ./locale/openscad.pot.new && mv ./locale/openscad.pot.new ./locale/openscad.pot
|
||||
rm -f ./locale/json-strings.pot ./locale/openscad-tmp.pot
|
||||
rm -f ./locale/json-strings.pot ./locale/openscad-tmp.pot ./locale/appdata-strings.pot
|
||||
}
|
||||
|
||||
updatepo()
|
||||
|
|
@ -80,6 +83,26 @@ updatemo()
|
|||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if which itstool > /dev/null 2>&1; then
|
||||
# ugly workaround for bug https://bugs.freedesktop.org/show_bug.cgi?id=90937
|
||||
for LANGCODE in `cat locale/LINGUAS | grep -v "#"`; do
|
||||
ln -s openscad.mo ./locale/$LANGCODE/LC_MESSAGES/$LANGCODE.mo
|
||||
done
|
||||
|
||||
# generate translated appdata file
|
||||
itstool -j ./openscad.appdata.xml.in -o ./openscad.appdata.xml ./locale/*/LC_MESSAGES/[a-z][a-z].mo
|
||||
|
||||
# clean the mess
|
||||
for LANGCODE in `cat locale/LINGUAS | grep -v "#"`; do
|
||||
unlink ./locale/$LANGCODE/LC_MESSAGES/$LANGCODE.mo
|
||||
done
|
||||
else
|
||||
if [ x"$(uname -s)" = x"Linux" ]; then
|
||||
echo "itstool missing, won't apply translations to openscad.appdata.xml"
|
||||
fi
|
||||
cp -f ./openscad.appdata.xml.in ./openscad.appdata.xml
|
||||
fi
|
||||
}
|
||||
|
||||
GETTEXT_PATH=""
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
qmake CONFIG+=experimental CONFIG+=nogui
|
||||
make
|
||||
|
||||
cd tests
|
||||
cmake .
|
||||
if [[ $? != 0 ]]; then
|
||||
|
|
@ -11,12 +16,28 @@ if [[ $? != 0 ]]; then
|
|||
echo "Error building test suite"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# dump the logs of the virtual framebuffer system ( Xvfb, Xvnc, etc )
|
||||
DEBUG_VIRTUALFB=1
|
||||
export DEBUG_VIRTUALFB
|
||||
|
||||
if [[ "$DIST" == "trusty" ]]; then
|
||||
PARALLEL=-j1
|
||||
else
|
||||
PARALLEL=-j8
|
||||
fi
|
||||
|
||||
# Exclude tests known the cause issues on Travis
|
||||
# opencsgtest_rotate_extrude-tests - Fails on Ubuntu 12.04 using Gallium 0.4 drivers
|
||||
# opencsgtest_text-font-direction-tests - Fails due to old freetype (issue #899)
|
||||
# *_text-font-direction-tests - Fails due to old freetype (issue #899)
|
||||
# throwntogethertest_issue964 - Fails due to non-planar quad being tessellated slightly different
|
||||
# opencsgtest_issue1165 - z buffer tearing
|
||||
ctest -j8 -E "\
|
||||
|
||||
# Fails on Apple's software renderer:
|
||||
# opencsgtest_issue1258
|
||||
# throwntogethertest_issue1089
|
||||
# throwntogethertest_issue1215
|
||||
ctest $PARALLEL -E "\
|
||||
opencsgtest_rotate_extrude-tests|\
|
||||
opencsgtest_render-tests|\
|
||||
opencsgtest_rotate_extrude-hole|\
|
||||
|
|
@ -32,9 +53,13 @@ dxfpngtest_text-font-direction-tests|\
|
|||
cgalpngtest_text-font-direction-tests|\
|
||||
opencsgtest_text-font-direction-tests|\
|
||||
csgpngtest_text-font-direction-tests|\
|
||||
svgpngtest_text-font-direction-tests|\
|
||||
throwntogethertest_text-font-direction-tests|\
|
||||
throwntogethertest_issue964|\
|
||||
opencsgtest_issue1165\
|
||||
opencsgtest_issue1165|\
|
||||
opencsgtest_issue1258|\
|
||||
throwntogethertest_issue1089|\
|
||||
throwntogethertest_issue1215\
|
||||
"
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Test failure"
|
||||
|
|
|
|||
|
|
@ -1,57 +1,21 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# uni-build-dependencies by don bright 2012. copyright assigned to
|
||||
# Marius Kintel and Clifford Wolf, 2012. released under the GPL 2, or
|
||||
# later, as described in the file named 'COPYING' in OpenSCAD's project root.
|
||||
|
||||
# This script builds most dependencies, both libraries and binary tools,
|
||||
# of OpenSCAD for Linux/BSD. It is based on macosx-build-dependencies.sh
|
||||
#
|
||||
# By default it builds under $HOME/openscad_deps. You can alter this by
|
||||
# setting the BASEDIR environment variable or with the 'out of tree'
|
||||
# feature
|
||||
# Build openscad without root access
|
||||
#
|
||||
# Usage:
|
||||
# cd openscad
|
||||
# . ./scripts/setenv-unibuild.sh
|
||||
# ./scripts/uni-build-dependencies.sh
|
||||
#
|
||||
# Out-of-tree usage:
|
||||
#
|
||||
# cd somepath
|
||||
# . /path/to/openscad/scripts/setenv-unibuild.sh
|
||||
# /path/to/openscad/scripts/uni-build-dependencies.sh
|
||||
#
|
||||
# Prerequisites:
|
||||
# - wget or curl
|
||||
# - OpenGL (GL/gl.h)
|
||||
# - GLU (GL/glu.h)
|
||||
# - gcc
|
||||
# - Qt4
|
||||
#
|
||||
# If your system lacks qt4, build like this:
|
||||
#
|
||||
# ./scripts/uni-build-dependencies.sh qt4
|
||||
# . ./scripts/setenv-unibuild.sh #(Rerun to re-detect qt4)
|
||||
#
|
||||
# If your system lacks glu, gettext, or glib2, you can build them as well:
|
||||
#
|
||||
# ./scripts/uni-build-dependencies.sh glu
|
||||
# ./scripts/uni-build-dependencies.sh glib2
|
||||
# ./scripts/uni-build-dependencies.sh gettext
|
||||
#
|
||||
# If you want to try Clang compiler (experimental, only works on linux):
|
||||
#
|
||||
# . ./scripts/setenv-unibuild.sh clang
|
||||
#
|
||||
# If you want to try Qt5 (experimental)
|
||||
#
|
||||
# . ./scripts/setenv-unibuild.sh qt5
|
||||
# - see http://linuxbrew.sh/
|
||||
#
|
||||
|
||||
OPENSCADDIR=$PWD
|
||||
|
||||
printUsage()
|
||||
{
|
||||
echo "Usage: $0"
|
||||
<<<<<<< HEAD
|
||||
echo
|
||||
}
|
||||
|
||||
|
|
@ -79,10 +43,22 @@ check_env()
|
|||
detect_glu()
|
||||
{
|
||||
detect_glu_result=
|
||||
if [ -e $DEPLOYDIR/include/GL/glu.h ]; then detect_glu_result=1; fi
|
||||
if [ -e /usr/include/GL/glu.h ]; then detect_glu_result=1; fi
|
||||
if [ -e /usr/local/include/GL/glu.h ]; then detect_glu_result=1; fi
|
||||
if [ -e /usr/pkg/X11R7/include/GL/glu.h ]; then detect_glu_result=1; fi
|
||||
if [ -e $DEPLOYDIR/include/GL/glu.h ]; then
|
||||
detect_glu_include=$DEPLOYDIR/include
|
||||
detect_glu_result=1;
|
||||
fi
|
||||
if [ -e /usr/include/GL/glu.h ]; then
|
||||
detect_glu_include=/usr/include
|
||||
detect_glu_result=1;
|
||||
fi
|
||||
if [ -e /usr/local/include/GL/glu.h ]; then
|
||||
detect_glu_include=/usr/local/include
|
||||
detect_glu_result=1;
|
||||
fi
|
||||
if [ -e /usr/pkg/X11R7/include/GL/glu.h ]; then
|
||||
detect_glu_include=/usr/pkg/X11R7/include
|
||||
detect_glu_result=1;
|
||||
fi
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -171,14 +147,37 @@ build_qt5scintilla2()
|
|||
|
||||
echo "Building Qt5Scintilla2" $version "..."
|
||||
cd $BASEDIR/src
|
||||
#rm -rf QScintilla-gpl-$version.tar.gz
|
||||
rm -rf ./QScintilla-gpl-$version.tar.gz
|
||||
if [ ! -f QScintilla-gpl-$version.tar.gz ]; then
|
||||
curl -L -o "QScintilla-gpl-$version.tar.gz" "http://downloads.sourceforge.net/project/pyqt/QScintilla2/QScintilla-$version/QScintilla-gpl-$version.tar.gz?use_mirror=switch"
|
||||
fi
|
||||
tar xzf QScintilla-gpl-$version.tar.gz
|
||||
cd QScintilla-gpl-$version/Qt4Qt5/
|
||||
qmake CONFIG+=staticlib
|
||||
make -j"$NUMCPU" install
|
||||
tmpinstalldir=$DEPLOYDIR/tmp/qsci$version
|
||||
INSTALL_ROOT=$tmpinstalldir make -j"$NUMCPU" install
|
||||
|
||||
if [ -d $tmpinstalldir/usr/share ]; then
|
||||
cp -av $tmpinstalldir/usr/share $DEPLOYDIR/
|
||||
cp -av $tmpinstalldir/usr/include $DEPLOYDIR/
|
||||
cp -av $tmpinstalldir/usr/lib $DEPLOYDIR/
|
||||
fi
|
||||
|
||||
if [ ! -e $DEPLOYDIR/include/Qsci ]; then
|
||||
# workaround numerous bugs in qscintilla build system, see
|
||||
# ../qscintilla2.prf and ../scintilla.pri for more info
|
||||
qsci_staticlib=`find $tmpinstalldir -name libqscintilla2.a`
|
||||
qsci_include=`find $tmpinstalldir -name Qsci`
|
||||
if [ -e $qsci_staticlib ]; then
|
||||
cp -av $qsci_include $DEPLOYDIR/include/
|
||||
cp -av $qsci_staticlib $DEPLOYDIR/lib/
|
||||
else
|
||||
echo problems finding built qscintilla libraries and include headers
|
||||
fi
|
||||
if [ -e $DEPLOYDIR/lib/libqscintilla2.a ]; then
|
||||
cp $DEPLOYDIR/lib/libqscintilla2.a $DEPLOYDIR/lib/libqt5scintilla2.a
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
build_bison()
|
||||
|
|
@ -365,6 +364,8 @@ build_cgal()
|
|||
echo "Building CGAL" $version "..."
|
||||
cd $BASEDIR/src
|
||||
rm -rf CGAL-$version
|
||||
ver4_8="curl -L --insecure -O https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8/CGAL-4.8.tar.xz"
|
||||
ver4_7="curl -L --insecure -O https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.7/CGAL-4.7.tar.gz"
|
||||
ver4_4="curl --insecure -O https://gforge.inria.fr/frs/download.php/file/33524/CGAL-4.4.tar.bz2"
|
||||
ver4_2="curl --insecure -O https://gforge.inria.fr/frs/download.php/32360/CGAL-4.2.tar.bz2"
|
||||
ver4_1="curl --insecure -O https://gforge.inria.fr/frs/download.php/31640/CGAL-4.1.tar.bz2"
|
||||
|
|
@ -382,6 +383,9 @@ build_cgal()
|
|||
if [ -e CGAL-$version.tar.bz2 ]; then
|
||||
download_cmd=vernull;
|
||||
fi
|
||||
if [ -e CGAL-$version.tar.xz ]; then
|
||||
download_cmd=vernull;
|
||||
fi
|
||||
|
||||
eval echo "$"$download_cmd
|
||||
`eval echo "$"$download_cmd`
|
||||
|
|
@ -392,6 +396,10 @@ build_cgal()
|
|||
zipper=bzip2
|
||||
suffix=bz2
|
||||
fi
|
||||
if [ -e CGAL-$version.tar.xz ]; then
|
||||
zipper=xz
|
||||
suffix=xz
|
||||
fi
|
||||
|
||||
$zipper -f -d CGAL-$version.tar.$suffix;
|
||||
tar xf CGAL-$version.tar
|
||||
|
|
@ -400,8 +408,10 @@ build_cgal()
|
|||
|
||||
# older cmakes have buggy FindBoost that can result in
|
||||
# finding the system libraries but OPENSCAD_LIBRARIES include paths
|
||||
FINDBOOST_CMAKE=$OPENSCAD_SCRIPTDIR/../tests/FindBoost.cmake
|
||||
cp $FINDBOOST_CMAKE ./cmake/modules/
|
||||
# NB! This was removed 2015-12-02 - if this problem resurfaces, fix it only for the relevant platforms as this
|
||||
# messes up more recent installations of cmake and CGAL.
|
||||
# FINDBOOST_CMAKE=$OPENSCAD_SCRIPTDIR/../tests/FindBoost.cmake
|
||||
# cp $FINDBOOST_CMAKE ./cmake/modules/
|
||||
|
||||
mkdir bin
|
||||
cd bin
|
||||
|
|
@ -421,372 +431,40 @@ build_cgal()
|
|||
fi
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
=======
|
||||
>>>>>>> fbsdbuild
|
||||
}
|
||||
|
||||
build_glew()
|
||||
{
|
||||
GLEW_INSTALLED=
|
||||
if [ -e $DEPLOYDIR/lib64/libGLEW.so ]; then
|
||||
GLEW_INSTALLED=1
|
||||
fi
|
||||
if [ -e $DEPLOYDIR/lib/libGLEW.so ]; then
|
||||
GLEW_INSTALLED=1
|
||||
fi
|
||||
if [ $GLEW_INSTALLED ]; then
|
||||
echo "glew already installed. not building"
|
||||
return
|
||||
fi
|
||||
version=$1
|
||||
echo "Building GLEW" $version "..."
|
||||
cd $BASEDIR/src
|
||||
rm -rf glew-$version
|
||||
if [ ! -f glew-$version.tgz ]; then
|
||||
curl --insecure -LO http://downloads.sourceforge.net/project/glew/glew/$version/glew-$version.tgz
|
||||
fi
|
||||
tar xzf glew-$version.tgz
|
||||
cd glew-$version
|
||||
mkdir -p $DEPLOYDIR/lib/pkgconfig
|
||||
|
||||
# Glew's makefile is not built for Linux Multiarch. We aren't trying
|
||||
# to fix everything here, just the test machines OScad normally runs on
|
||||
|
||||
# Fedora 64-bit
|
||||
if [ "`uname -m | grep 64`" ]; then
|
||||
if [ -e /usr/lib64/libXmu.so.6 ]; then
|
||||
sed -ibak s/"\-lXmu"/"\-L\/usr\/lib64\/libXmu.so.6"/ config/Makefile.linux
|
||||
fi
|
||||
fi
|
||||
|
||||
# debian hurd i386
|
||||
if [ "`uname -m | grep 386`" ]; then
|
||||
if [ -e /usr/lib/i386-gnu/libXi.so.6 ]; then
|
||||
sed -ibak s/"-lXi"/"\-L\/usr\/lib\/i386-gnu\/libXi.so.6"/ config/Makefile.gnu
|
||||
fi
|
||||
fi
|
||||
|
||||
# clang linux
|
||||
if [ $CC ]; then
|
||||
sed -ibak s/"CC = cc"/"# CC = cc"/ config/Makefile.linux
|
||||
fi
|
||||
|
||||
MAKER=make
|
||||
if [ "`uname | grep BSD`" ]; then
|
||||
if [ "`command -v gmake`" ]; then
|
||||
MAKER=gmake
|
||||
else
|
||||
echo "building glew on BSD requires gmake (gnu make)"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
GLEW_DEST=$DEPLOYDIR $MAKER -j$NUMCPU
|
||||
GLEW_DEST=$DEPLOYDIR $MAKER install
|
||||
}
|
||||
|
||||
build_opencsg()
|
||||
{
|
||||
if [ -e $DEPLOYDIR/lib/libopencsg.so ]; then
|
||||
echo "OpenCSG already installed. not building"
|
||||
return
|
||||
fi
|
||||
version=$1
|
||||
echo "Building OpenCSG" $version "..."
|
||||
cd $BASEDIR/src
|
||||
rm -rf OpenCSG-$version
|
||||
if [ ! -f OpenCSG-$version.tar.gz ]; then
|
||||
curl --insecure -O http://www.opencsg.org/OpenCSG-$version.tar.gz
|
||||
fi
|
||||
tar xzf OpenCSG-$version.tar.gz
|
||||
cd OpenCSG-$version
|
||||
|
||||
# modify the .pro file for qmake, then use qmake to
|
||||
# manually rebuild the src/Makefile (some systems don't auto-rebuild it)
|
||||
|
||||
cp opencsg.pro opencsg.pro.bak
|
||||
cat opencsg.pro.bak | sed s/example// > opencsg.pro
|
||||
|
||||
if [ "`command -v qmake-qt4`" ]; then
|
||||
OPENCSG_QMAKE=qmake-qt4
|
||||
elif [ "`command -v qmake4`" ]; then
|
||||
OPENCSG_QMAKE=qmake4
|
||||
elif [ "`command -v qmake`" ]; then
|
||||
OPENCSG_QMAKE=qmake
|
||||
else
|
||||
echo qmake not found... using standard OpenCSG makefiles
|
||||
OPENCSG_QMAKE=make
|
||||
cp Makefile Makefile.bak
|
||||
cp src/Makefile src/Makefile.bak
|
||||
|
||||
cat Makefile.bak | sed s/example// |sed s/glew// > Makefile
|
||||
cat src/Makefile.bak | sed s@^INCPATH.*@INCPATH\ =\ -I$BASEDIR/include\ -I../include\ -I..\ -I.@ > src/Makefile
|
||||
cp src/Makefile src/Makefile.bak2
|
||||
cat src/Makefile.bak2 | sed s@^LIBS.*@LIBS\ =\ -L$BASEDIR/lib\ -L/usr/X11R6/lib\ -lGLU\ -lGL@ > src/Makefile
|
||||
tmp=$version
|
||||
detect_glu
|
||||
if [ ! $detect_glu_result ]; then build_glu 9.0.0 ; fi
|
||||
version=$tmp
|
||||
fi
|
||||
|
||||
cd $BASEDIR/src/OpenCSG-$version/src
|
||||
$OPENCSG_QMAKE
|
||||
|
||||
cd $BASEDIR/src/OpenCSG-$version
|
||||
$OPENCSG_QMAKE
|
||||
|
||||
make
|
||||
|
||||
ls lib/* include/*
|
||||
if [ -e lib/.libs ]; then ls lib/.libs/*; fi # netbsd
|
||||
echo "installing to -->" $DEPLOYDIR
|
||||
mkdir -p $DEPLOYDIR/lib
|
||||
mkdir -p $DEPLOYDIR/include
|
||||
install lib/* $DEPLOYDIR/lib
|
||||
install include/* $DEPLOYDIR/include
|
||||
if [ -e lib/.libs ]; then install lib/.libs/* $DEPLOYDIR/lib; fi #netbsd
|
||||
|
||||
cd $BASEDIR
|
||||
}
|
||||
|
||||
build_eigen()
|
||||
{
|
||||
version=$1
|
||||
if [ -e $DEPLOYDIR/include/eigen3 ]; then
|
||||
if [ `echo $version | grep 3....` ]; then
|
||||
echo "Eigen3 already installed. not building"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
echo "Building eigen" $version "..."
|
||||
cd $BASEDIR/src
|
||||
rm -rf eigen-$version
|
||||
EIGENDIR="none"
|
||||
if [ $version = "3.2.2" ]; then EIGENDIR=eigen-eigen-1306d75b4a21; fi
|
||||
if [ $version = "3.1.1" ]; then EIGENDIR=eigen-eigen-43d9075b23ef; fi
|
||||
if [ $EIGENDIR = "none" ]; then
|
||||
echo Unknown eigen version. Please edit script.
|
||||
exit 1
|
||||
fi
|
||||
rm -rf ./$EIGENDIR
|
||||
if [ ! -f eigen-$version.tar.bz2 ]; then
|
||||
curl --insecure -LO http://bitbucket.org/eigen/eigen/get/$version.tar.bz2
|
||||
mv $version.tar.bz2 eigen-$version.tar.bz2
|
||||
fi
|
||||
tar xjf eigen-$version.tar.bz2
|
||||
ln -s ./$EIGENDIR eigen-$version
|
||||
cd eigen-$version
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DEIGEN_TEST_NO_OPENGL=1 ..
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
}
|
||||
|
||||
|
||||
# glib2 and dependencies
|
||||
|
||||
#build_gettext()
|
||||
#{
|
||||
# version=$1
|
||||
# ls -l $DEPLOYDIR/include/gettext-po.h
|
||||
# if [ -e $DEPLOYDIR/include/gettext-po.h ]; then
|
||||
# echo "gettext already installed. not building"
|
||||
# return
|
||||
# fi
|
||||
#
|
||||
# echo "Building gettext $version..."
|
||||
#
|
||||
# cd "$BASEDIR"/src
|
||||
# rm -rf "gettext-$version"
|
||||
# if [ ! -f "glib-$version.tar.gz" ]; then
|
||||
# curl --insecure -LO "http://ftpmirror.gnu.org/gettext/gettext-$version.tar.gz"
|
||||
# fi
|
||||
# tar xzf "gettext-$version.tar.gz"
|
||||
# cd "gettext-$version"
|
||||
#
|
||||
# ./configure --prefix="$DEPLOYDIR"
|
||||
# make -j$NUMCPU
|
||||
# make install
|
||||
#}
|
||||
|
||||
build_pkgconfig()
|
||||
{
|
||||
if [ "`command -v pkg-config`" ]; then
|
||||
echo "pkg-config already installed. not building"
|
||||
return
|
||||
fi
|
||||
version=$1
|
||||
echo "Building pkg-config $version..."
|
||||
|
||||
cd "$BASEDIR"/src
|
||||
rm -rf "pkg-config-$version"
|
||||
if [ ! -f "pkg-config-$version.tar.gz" ]; then
|
||||
curl --insecure -LO "http://pkgconfig.freedesktop.org/releases/pkg-config-$version.tar.gz"
|
||||
fi
|
||||
tar xzf "pkg-config-$version.tar.gz"
|
||||
cd "pkg-config-$version"
|
||||
|
||||
./configure --prefix="$DEPLOYDIR" --with-internal-glib
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
}
|
||||
|
||||
build_libffi()
|
||||
{
|
||||
if [ -e $DEPLOYDIR/include/ffi.h ]; then
|
||||
echo "libffi already installed. not building"
|
||||
return
|
||||
fi
|
||||
version=$1
|
||||
echo "Building libffi $version..."
|
||||
|
||||
cd "$BASEDIR"/src
|
||||
rm -rf "libffi-$version"
|
||||
if [ ! -f "libffi-$version.tar.gz" ]; then
|
||||
curl --insecure -LO "ftp://sourceware.org/pub/libffi/libffi-$version.tar.gz"
|
||||
curl --insecure -LO "http://www.linuxfromscratch.org/patches/blfs/svn/libffi-$version-includedir-1.patch"
|
||||
fi
|
||||
tar xzf "libffi-$version.tar.gz"
|
||||
cd "libffi-$version"
|
||||
if [ ! "`command -v patch`" ]; then
|
||||
echo cannot proceed, need 'patch' program
|
||||
exit 1
|
||||
fi
|
||||
patch -Np1 -i ../libffi-3.0.13-includedir-1.patch
|
||||
./configure --prefix="$DEPLOYDIR"
|
||||
make -j$NUMCPU
|
||||
make install
|
||||
}
|
||||
|
||||
#build_glib2()
|
||||
#{
|
||||
# version="$1"
|
||||
# maj_min_version="${version%.*}" #Drop micro#
|
||||
#
|
||||
# if [ -e $DEPLOYDIR/lib/glib-2.0 ]; then
|
||||
# echo "glib2 already installed. not building"
|
||||
# return
|
||||
# fi
|
||||
#
|
||||
# echo "Building glib2 $version..."
|
||||
# cd "$BASEDIR"/src
|
||||
# rm -rf "glib-$version"
|
||||
# if [ ! -f "glib-$version.tar.xz" ]; then
|
||||
# curl --insecure -LO "http://ftp.gnome.org/pub/gnome/sources/glib/$maj_min_version/glib-$version.tar.xz"
|
||||
# fi
|
||||
# tar xJf "glib-$version.tar.xz"
|
||||
# cd "glib-$version"
|
||||
|
||||
# ./configure --disable-gtk-doc --disable-man --prefix="$DEPLOYDIR" CFLAGS="-I$DEPLOYDIR/include" LDFLAGS="-L$DEPLOYDIR/lib"
|
||||
# make -j$NUMCPU
|
||||
# make install
|
||||
#}
|
||||
|
||||
## end of glib2 stuff
|
||||
|
||||
# this section allows 'out of tree' builds, as long as the system has
|
||||
# the 'dirname' command installed
|
||||
|
||||
if [ "`command -v dirname`" ]; then
|
||||
RUNDIR=$PWD
|
||||
OPENSCAD_SCRIPTDIR=`dirname $0`
|
||||
cd $OPENSCAD_SCRIPTDIR
|
||||
OPENSCAD_SCRIPTDIR=$PWD
|
||||
cd $RUNDIR
|
||||
else
|
||||
if [ ! -f openscad.pro ]; then
|
||||
echo "Must be run from the OpenSCAD source root directory (dont have 'dirname')"
|
||||
exit 1
|
||||
else
|
||||
OPENSCAD_SCRIPTDIR=$PWD
|
||||
fi
|
||||
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
|
||||
echo "Must be run from the OpenSCAD source root directory"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
check_env
|
||||
|
||||
. $OPENSCAD_SCRIPTDIR/setenv-unibuild.sh # '.' is equivalent to 'source'
|
||||
. $OPENSCAD_SCRIPTDIR/common-build-dependencies.sh
|
||||
SRCDIR=$BASEDIR/src
|
||||
|
||||
if [ ! $NUMCPU ]; then
|
||||
echo "Note: The NUMCPU environment variable can be set for parallel builds"
|
||||
NUMCPU=1
|
||||
if [ ! "`uname -m`|grep x86_64" ]; then
|
||||
echo "requires x86_64 bit cpu sorry, please see linuxbrew.sh"
|
||||
fi
|
||||
|
||||
if [ ! -d $BASEDIR/bin ]; then
|
||||
mkdir -p $BASEDIR/bin
|
||||
fi
|
||||
|
||||
echo "Using basedir:" $BASEDIR
|
||||
echo "Using deploydir:" $DEPLOYDIR
|
||||
echo "Using srcdir:" $SRCDIR
|
||||
echo "Number of CPUs for parallel builds:" $NUMCPU
|
||||
mkdir -p $SRCDIR $DEPLOYDIR
|
||||
|
||||
# this section builds some basic tools, if they are missing or outdated
|
||||
# they are installed under $BASEDIR/bin which we have added to our PATH
|
||||
|
||||
if [ ! "`command -v curl`" ]; then
|
||||
build_curl 7.26.0
|
||||
fi
|
||||
|
||||
if [ ! "`command -v bison`" ]; then
|
||||
build_bison 2.6.1
|
||||
fi
|
||||
|
||||
# NB! For cmake, also update the actual download URL in the function
|
||||
if [ ! "`command -v cmake`" ]; then
|
||||
build_cmake 2.8.8
|
||||
fi
|
||||
# see README for needed version (this should match 1<minimum)
|
||||
if [ "`cmake --version | grep 'version 2.[1-8][^0-9][1-4] '`" ]; then
|
||||
build_cmake 2.8.8
|
||||
fi
|
||||
|
||||
# Singly build certain tools or libraries
|
||||
if [ $1 ]; then
|
||||
if [ $1 = "git" ]; then
|
||||
build_git 1.7.10.3
|
||||
exit $?
|
||||
fi
|
||||
if [ $1 = "cgal" ]; then
|
||||
build_cgal 4.4 use-sys-libs
|
||||
exit $?
|
||||
fi
|
||||
if [ $1 = "opencsg" ]; then
|
||||
build_opencsg 1.3.2
|
||||
exit $?
|
||||
fi
|
||||
if [ $1 = "qt4" ]; then
|
||||
# such a huge build, put here by itself
|
||||
build_qt4 4.8.4
|
||||
exit $?
|
||||
fi
|
||||
if [ $1 = "qt5" ]; then
|
||||
build_qt5 5.3.1
|
||||
build_qt5scintilla2 2.8.3
|
||||
exit $?
|
||||
fi
|
||||
if [ $1 = "glu" ]; then
|
||||
# Mesa and GLU split in late 2012, so it's not on some systems
|
||||
build_glu 9.0.0
|
||||
exit $?
|
||||
fi
|
||||
if [ $1 = "gettext" ]; then
|
||||
# such a huge build, put here by itself
|
||||
build_gettext 0.18.3.1
|
||||
exit $?
|
||||
fi
|
||||
if [ $1 = "glib2" ]; then
|
||||
# such a huge build, put here by itself
|
||||
build_pkgconfig 0.28
|
||||
build_libffi 3.0.13
|
||||
#build_gettext 0.18.3.1
|
||||
build_glib2 2.38.2
|
||||
exit $?
|
||||
fi
|
||||
. ./scripts/setenv-unibuild.sh
|
||||
|
||||
cd $HOME
|
||||
|
||||
brewurl=https://raw.githubusercontent.com/Linuxbrew/install/master/install
|
||||
if [ ! -e ~/.linuxbrew ]; then
|
||||
ruby -e "$(curl -fsSL "$brewurl")"
|
||||
fi
|
||||
|
||||
brew update
|
||||
pkgs='eigen boost cgal glew glib opencsg freetype libxml2 fontconfig'
|
||||
pkgs=$pkgs' harfbuzz qt5 qscintilla2 imagemagick'
|
||||
for formula in $pkgs; do
|
||||
brew install $formula
|
||||
brew outdated $formula || brew upgrade $formula
|
||||
done
|
||||
brew link --force gettext
|
||||
brew link --force qt5
|
||||
brew link --force qscintilla2
|
||||
|
||||
<<<<<<< HEAD
|
||||
# todo - cgal 4.02 for gcc<4.7, gcc 4.2 for above
|
||||
|
||||
#
|
||||
|
|
@ -799,21 +477,22 @@ fi
|
|||
# Some of these are defined in scripts/common-build-dependencies.sh
|
||||
|
||||
build_eigen 3.2.2
|
||||
build_gmp 5.0.5
|
||||
build_gmp 6.0.0
|
||||
build_mpfr 3.1.1
|
||||
build_boost 1.56.0
|
||||
# NB! For CGAL, also update the actual download URL in the function
|
||||
build_cgal 4.4
|
||||
build_cgal 4.7
|
||||
build_glew 1.9.0
|
||||
build_opencsg 1.3.2
|
||||
build_gettext 0.18.3.1
|
||||
build_glib2 2.38.2
|
||||
|
||||
# the following are only needed for text()
|
||||
build_freetype 2.5.0.1 --without-png
|
||||
build_freetype 2.6.1 --without-png
|
||||
build_libxml2 2.9.1
|
||||
build_fontconfig 2.11.0 --with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts
|
||||
build_ragel 6.9
|
||||
build_harfbuzz 0.9.23 --with-glib=yes
|
||||
build_harfbuzz 0.9.35 --with-glib=yes
|
||||
=======
|
||||
>>>>>>> fbsdbuild
|
||||
|
||||
echo "OpenSCAD dependencies built and installed to " $BASEDIR
|
||||
|
|
|
|||
|
|
@ -1,16 +1,31 @@
|
|||
#!/bin/sh
|
||||
# auto-install dependency packages using the systems package manager.
|
||||
# after running this, run ./script/check-dependencies.sh. see README.md
|
||||
#
|
||||
# this assumes you have sudo installed and running, or are running as root.
|
||||
#
|
||||
|
||||
get_fedora_deps()
|
||||
get_fedora_deps_yum()
|
||||
{
|
||||
yum -y install qt5-qtbase-devel bison flex eigen3-devel harfbuzz-devel \
|
||||
fontconfig-devel freetype-devel \
|
||||
boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc gcc-c++ pkgconfig \
|
||||
opencsg-devel git libXmu-devel curl imagemagick ImageMagick glib2-devel make \
|
||||
xorg-x11-server-Xvfb gettext
|
||||
xorg-x11-server-Xvfb gettext qscintilla-devel qscintilla-qt5-devel \
|
||||
mesa-dri-drivers
|
||||
}
|
||||
|
||||
get_fedora_deps_dnf()
|
||||
{
|
||||
dnf -y install qt5-qtbase-devel bison flex eigen3-devel harfbuzz-devel \
|
||||
fontconfig-devel freetype-devel \
|
||||
boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc gcc-c++ pkgconfig \
|
||||
opencsg-devel git libXmu-devel curl ImageMagick glib2-devel make \
|
||||
xorg-x11-server-Xvfb gettext qscintilla-devel qscintilla-qt5-devel \
|
||||
mesa-dri-drivers
|
||||
dnf -y install libxml2-devel
|
||||
dnf -y install libffi-devel
|
||||
dnf -y install redhat-rpm-config
|
||||
}
|
||||
|
||||
get_qomo_deps()
|
||||
|
|
@ -30,21 +45,43 @@ get_freebsd_deps()
|
|||
pkg_add -r bison boost-libs cmake git bash eigen3 flex gmake gmp mpfr \
|
||||
xorg libGLU libXmu libXi xorg-vfbserver glew \
|
||||
qt4-corelib qt4-gui qt4-moc qt4-opengl qt4-qmake qt4-rcc qt4-uic \
|
||||
opencsg cgal curl imagemagick glib2-devel gettext
|
||||
opencsg cgal curl imagemagick glib2-devel gettext harfbuzz libxml2 \
|
||||
qscintilla2
|
||||
}
|
||||
|
||||
get_netbsd_deps()
|
||||
get_freebsd_10_3_deps()
|
||||
{
|
||||
pkg install bison boost-libs cmake git bash eigen flex gmake gmp mpfr \
|
||||
xorg libGLU libXmu libXi xorg-vfbserver glew \
|
||||
opencsg cgal curl imagemagick glib gettext \
|
||||
qt4-corelib qt4-gui qt4-moc qt4-opengl qt4-qmake qt4-rcc qt4-uic \
|
||||
qscintilla2 \
|
||||
harfbuzz ragel imagemagick gettext libxml2 libxslt
|
||||
# on freebsd10 opencsg is linked to qt4 so qt5 cannot be used on default
|
||||
# qt5 qscintilla2-qt5 qt5-3d qt5-buildtools qt5-core \
|
||||
# qt5-gui qt5-opengl qt5-qmake \
|
||||
}
|
||||
|
||||
get_netbsd7_deps()
|
||||
{
|
||||
pkgin install bison boost cmake git bash eigen3 flex gmake gmp mpfr \
|
||||
qt4 glew cgal opencsg python27 curl \
|
||||
ImageMagick glib2 gettext
|
||||
ImageMagick glib2 gettext \
|
||||
fontconfig qt4-qscintilla harfbuzz freetype2 ragel libxml2 \
|
||||
modular-xorg-server modular-xorg-fonts
|
||||
# xorg-server has Xvfb virtual framebuffer
|
||||
}
|
||||
|
||||
get_opensuse_deps()
|
||||
{
|
||||
zypper install libeigen3-devel mpfr-devel gmp-devel boost-devel \
|
||||
libqt4-devel glew-devel cmake git bison flex cgal-devel opencsg-devel curl \
|
||||
glib2-devel gettext
|
||||
libqt4-devel glew-devel cmake git bison flex cgal-devel curl \
|
||||
glib2-devel gettext freetype-devel harfbuzz-devel libqscintilla-devel \
|
||||
xvfb-run imagemagick opencsg-devel
|
||||
echo if you are missing opencsg, please add the -graphics- repository
|
||||
echo find your version from cat /etc/issue, then replace it below, then run
|
||||
echo " zypper ar -f http://download.opensuse.org/repositories/graphics/openSUSE_13.2 graphics"
|
||||
echo " zypper install opencsg-devel"
|
||||
}
|
||||
|
||||
get_mageia_deps()
|
||||
|
|
@ -58,51 +95,251 @@ get_mageia_deps()
|
|||
get_debian_deps()
|
||||
{
|
||||
apt-get -y install \
|
||||
build-essential curl libffi-dev qtbase5-dev libqt5scintilla2-dev \
|
||||
build-essential curl libffi-dev \
|
||||
libxmu-dev cmake bison flex git-core libboost-all-dev \
|
||||
libXi-dev libmpfr-dev libboost-dev libglew-dev \
|
||||
libmpfr-dev libboost-dev libglew-dev \
|
||||
libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev libgmp-dev \
|
||||
imagemagick libfontconfig-dev libfreetype6-dev \
|
||||
libharfbuzz-dev gtk-doc-tools libglib2.0-dev gettext
|
||||
imagemagick libfreetype6-dev \
|
||||
gtk-doc-tools libglib2.0-dev gettext xvfb pkg-config ragel
|
||||
apt-get -y install libXi-dev libfontconfig-dev
|
||||
}
|
||||
|
||||
get_debian_7_deps()
|
||||
{
|
||||
get_debian_deps
|
||||
apt-get -y install libqt4-dev libqscintilla2-dev
|
||||
echo "debian 7 detected"
|
||||
echo "please build harfbuzz & see the README on building dependencies"
|
||||
echo ". ./scripts/setenv-unibuild.sh"
|
||||
echo "./scripts/uni-build-dependencies.sh harfbuzz"
|
||||
}
|
||||
|
||||
get_qt4or5_deps_debian()
|
||||
{
|
||||
# debian 8 can have both qt4 and qt5 installed... or neither. figure out which
|
||||
# and cater to it.
|
||||
useqt=5
|
||||
|
||||
if [ "`dpkg --list | grep qt5-default`" ]; then
|
||||
useqt=5
|
||||
elif [ "`dpkg --list | grep qt4-default`" ]; then
|
||||
useqt=4
|
||||
elif [ "`echo QT_SELECT | grep ^4`" ]; then
|
||||
useqt=4
|
||||
elif [ "`echo QT_SELECT | grep qt4`" ]; then
|
||||
useqt=4
|
||||
elif [ "`echo QT_SELECT | grep ^5`" ]; then
|
||||
useqt=5
|
||||
elif [ "`echo QT_SELECT | grep qt5`" ]; then
|
||||
useqt=5
|
||||
elif [ ! "`command -v qtchooser`" ]; then
|
||||
useqt=5
|
||||
elif [ "`qtchooser -l | grep qt5`" ]; then
|
||||
useqt=5
|
||||
elif [ ! "`qtchooser -l | grep qt4`" ]; then
|
||||
useqt=5
|
||||
elif [ ! "`command -v qmake`" ]; then
|
||||
useqt=5
|
||||
elif [ "`qmake --version | grep -i qt.version.4`" ]; then
|
||||
useqt=4
|
||||
fi
|
||||
|
||||
if [ $useqt = 5 ]; then
|
||||
apt-get -y install qtbase5-dev libqt5scintilla2-dev libqt5opengl5-dev qt5-qmake
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804539
|
||||
apt-get -y install libcgal-qt5-dev
|
||||
else
|
||||
apt-get -y install libqt4-dev libqscintilla2-dev libqt4-opengl-dev
|
||||
fi
|
||||
if [ ! "`command -v qmake`" ]; then
|
||||
apt-get -y install qt$useqt-default
|
||||
echo "installed qt$useqt-default to enable qmake"
|
||||
elif [ ! "`qmake --version | grep qmake.version`" ]; then
|
||||
apt-get -y install qt$useqt-default
|
||||
echo "installed qt$useqt-default to enable qmake"
|
||||
fi
|
||||
}
|
||||
|
||||
get_debian_8_deps()
|
||||
{
|
||||
apt-get -y install libharfbuzz-dev libxml2-dev
|
||||
get_debian_deps
|
||||
get_qt4or5_deps_debian
|
||||
}
|
||||
|
||||
get_ubuntu_14_deps()
|
||||
{
|
||||
get_debian_8_deps
|
||||
}
|
||||
|
||||
get_ubuntu_16_deps()
|
||||
{
|
||||
apt-get -y install libxi-dev libxml2-dev libfontconfig1-dev
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804539
|
||||
apt-get -y install libcgal-qt5-dev
|
||||
get_debian_8_deps
|
||||
}
|
||||
|
||||
get_neon_deps()
|
||||
{
|
||||
get_debian_deps
|
||||
apt-get -y install libxi-dev libxml2-dev libfontconfig1-dev
|
||||
apt-get -y install libharfbuzz-dev libxml2-dev
|
||||
# qt5 scintilla is broken on kde neon. use qt4 # issue 1790
|
||||
apt-get -y install libcgal-dev
|
||||
apt-get -y install libqt4-dev libqscintilla2-dev libqt4-opengl-dev
|
||||
echo on KDE Neon please use qmake-qt4 to build
|
||||
}
|
||||
|
||||
pacinstall()
|
||||
{
|
||||
# support function for MSYS2 Windows(TM) installs, see below.
|
||||
# Install $1 package but skip if it's already installed.
|
||||
if [ ! "`pacman -Qs $1`" ]; then
|
||||
pacman -S --noconfirm $1
|
||||
#else
|
||||
#echo pacman -Qs $1 reports package already installed, skipping
|
||||
fi
|
||||
}
|
||||
|
||||
get_msys2_x86_64_deps()
|
||||
{
|
||||
# for Windows(TM), see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Microsoft_Windows
|
||||
pacman -Syuu
|
||||
if [ ! -e /mingw64 ]; then mkdir /mingw64 ; fi
|
||||
for i in git make bison flex; do
|
||||
pacman -S --noconfirm --force $i
|
||||
done
|
||||
for i in freetype fontconfig harfbuzz qt5 qt-creator boost cgal eigen3 \
|
||||
glew qscintilla opencsg pkg-config cmake gdb zip mesa; do
|
||||
pacman -S --noconfirm mingw-w64-x86_64-$i
|
||||
done
|
||||
}
|
||||
|
||||
get_msys2_i686_deps()
|
||||
{
|
||||
# for Windows(TM), see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Microsoft_Windows
|
||||
pacman -Syuu
|
||||
if [ ! -e /mingw32 ]; then mkdir /mingw32 ; fi
|
||||
for i in git make bison flex; do
|
||||
pacinstall $i
|
||||
done
|
||||
for i in freetype fontconfig harfbuzz qt5 qt-creator boost cgal eigen3 \
|
||||
glew qscintilla opencsg pkg-config cmake gdb zip mesa; do
|
||||
pacinstall mingw-w64-i686-$i
|
||||
done
|
||||
}
|
||||
|
||||
unknown()
|
||||
{
|
||||
echo "Unknown system type. Please install the dependency packages listed"
|
||||
echo "in README.md using your system's package manager."
|
||||
echo $0
|
||||
echo " Unable to detect the OS of this system. Cannot run script to"
|
||||
echo " install dependency packages. Please check OpenSCAD's README.md"
|
||||
echo " and install packages using your system's package manager"
|
||||
}
|
||||
|
||||
if [ -e /etc/issue ]; then
|
||||
if [ "`grep -i ubuntu /etc/issue`" ]; then
|
||||
try_using_etc_issue()
|
||||
{
|
||||
try_result=1
|
||||
if [ ! -e /etc/issue ]; then
|
||||
try_result=0
|
||||
elif [ "`grep -i ubuntu.1[4-5] /etc/issue`" ]; then
|
||||
get_ubuntu_14_deps
|
||||
elif [ "`grep -i ubuntu.1[6-9] /etc/issue`" ]; then
|
||||
get_ubuntu_16_deps
|
||||
elif [ "`grep -i KDE.neon /etc/issue`" ]; then
|
||||
get_neon_deps
|
||||
elif [ "`grep -i ubuntu /etc/issue`" ]; then
|
||||
get_debian_deps
|
||||
elif [ "`grep -i elementary.*freya /etc/issue`" ]; then
|
||||
get_ubuntu_14_deps
|
||||
elif [ "`grep -i debian.GNU.Linux.7 /etc/issue`" ]; then
|
||||
get_debian_7_deps
|
||||
elif [ "`grep -i debian /etc/issue`" ]; then
|
||||
get_debian_deps
|
||||
get_debian_8_deps
|
||||
elif [ "`grep -i raspbian /etc/issue`" ]; then
|
||||
get_debian_deps
|
||||
elif [ "`grep -i linux.mint.2 /etc/issue`" ]; then
|
||||
get_ubuntu_14_deps
|
||||
elif [ "`grep -i linux.mint.1[789] /etc/issue`" ]; then
|
||||
get_ubuntu_14_deps
|
||||
elif [ "`grep -i mint /etc/issue`" ]; then
|
||||
get_debian_7_deps
|
||||
elif [ "`grep -i suse /etc/issue`" ]; then
|
||||
get_opensuse_deps
|
||||
elif [ "`grep -i fedora.release.2[2-9] /etc/issue`" ]; then
|
||||
get_fedora_deps_dnf
|
||||
elif [ "`grep -i fedora.release.[3-9][0-9] /etc/issue`" ]; then
|
||||
get_fedora_deps_dnf
|
||||
elif [ "`grep -i fedora.release.2[0-1] /etc/issue`" ]; then
|
||||
get_fedora_deps_yum
|
||||
elif [ "`grep -i fedora /etc/issue`" ]; then
|
||||
get_fedora_deps
|
||||
get_fedora_deps_yum
|
||||
elif [ "`grep -i red.hat /etc/issue`" ]; then
|
||||
get_fedora_deps
|
||||
elif [ "`grep -i mageia /etc/issue`" ]; then
|
||||
get_mageia_deps
|
||||
elif [ "`grep -i qomo /etc/issue`" ]; then
|
||||
get_qomo_deps
|
||||
elif [ -e /etc/fedora-release ]; then
|
||||
if [ "`grep -i fedora.release /etc/fedora-release`" ]; then
|
||||
get_fedora_deps_dnf
|
||||
fi
|
||||
elif [ "`command -v rpm`" ]; then
|
||||
if [ "`rpm -qa | grep altlinux`" ]; then
|
||||
get_altlinux_deps
|
||||
fi
|
||||
else
|
||||
unknown
|
||||
try_result=0
|
||||
fi
|
||||
elif [ "`uname | grep -i freebsd `" ]; then
|
||||
get_freebsd_deps
|
||||
elif [ "`uname | grep -i netbsd`" ]; then
|
||||
get_netbsd_deps
|
||||
else
|
||||
}
|
||||
|
||||
try_using_uname()
|
||||
{
|
||||
try_result=1
|
||||
if [ ! "`command -v uname`" ]; then
|
||||
try_result=0
|
||||
elif [ "`uname -a | grep -i x86_64.*Msys`" ]; then
|
||||
get_msys2_x86_64_deps
|
||||
elif [ "`uname -a | grep -i i686.*Msys`" ]; then
|
||||
get_msys2_i686_deps
|
||||
elif [ "`uname | grep -i freebsd `" ]; then
|
||||
get_freebsd_deps
|
||||
elif [ "`uname | grep -i netbsd`" ]; then
|
||||
get_netbsd_deps
|
||||
elif [ "`uname -a | grep -i freebsd.1[0-9].[0-9]`" ]; then
|
||||
get_freebsd_10_3_deps
|
||||
elif [ "`uname -a | grep -i freebsd`" ]; then
|
||||
get_freebsd_deps
|
||||
elif [ "`uname -a | grep -i netbsd.6`" ]; then
|
||||
echo sorry netbsd 6 is not advised, you have to hack it yourself
|
||||
elif [ "`uname -a | grep -i netbsd`" ]; then
|
||||
get_netbsd7_deps
|
||||
else
|
||||
try_result=0
|
||||
fi
|
||||
}
|
||||
|
||||
try_using_rpm()
|
||||
{
|
||||
try_result=1
|
||||
if [ ! "`command -v rpm`" ]; then
|
||||
try_result=0
|
||||
elif [ "`rpm -qa | grep altlinux`" ]; then
|
||||
get_altlinux_deps
|
||||
else
|
||||
try_result=0
|
||||
fi
|
||||
}
|
||||
|
||||
try_result=1
|
||||
try_using_etc_issue
|
||||
if [ $try_result -eq 0 ]; then
|
||||
try_using_uname
|
||||
fi
|
||||
if [ $try_result -eq 0 ]; then
|
||||
try_using_rpm
|
||||
fi
|
||||
if [ $try_result -eq 0 ]; then
|
||||
unknown
|
||||
fi
|
||||
|
||||
|
|
|
|||
28
scripts/winmanifest.xml
Normal file
28
scripts/winmanifest.xml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<description>OpenSCAD</description>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel
|
||||
level="asInvoker"
|
||||
uiAccess="false"
|
||||
/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!-- Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
export OPENSCAD_LIBRARIES=$PWD/../libraries/install
|
||||
export DYLD_LIBRARY_PATH=$OPENSCAD_LIBRARIES/lib
|
||||
export DYLD_FRAMEWORK_PATH=$OPENSCAD_LIBRARIES/lib
|
||||
export QMAKESPEC=macx-g++
|
||||
|
||||
# Our own Qt
|
||||
export PATH=$OPENSCAD_LIBRARIES/bin:$PATH
|
||||
|
||||
# ccache:
|
||||
export PATH=/opt/local/libexec/ccache:$PATH
|
||||
export CCACHE_BASEDIR=$PWD/..
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue