mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-13 14:13:02 +00:00
Compare commits
1083 commits
OLD_STYLE_
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
b7fcad40f8 | ||
|
1b7cc44ff1 | ||
|
6c0063600d | ||
|
4405dcc8c4 | ||
|
de5e8f63c5 | ||
|
63af855c24 | ||
|
5964418bb1 | ||
|
ac3fad4b6f | ||
|
05e4b859be | ||
|
f5bdb40882 | ||
|
7ce2cd367a | ||
|
fdebc6367f | ||
|
fc194db093 | ||
|
c37b1dbe05 | ||
|
79150d285b | ||
|
5932086c64 | ||
|
cdfebcedba | ||
|
7f100b4ecd | ||
|
cc48c443fa | ||
|
5244eb1037 | ||
|
aeeaf4c3ab | ||
|
8c3ebba096 | ||
|
beb93d83e3 | ||
|
7e64e50cda | ||
|
2c1c01f807 | ||
|
52539893eb | ||
|
522edc8cf6 | ||
|
0d75eae5d0 | ||
|
d63d77b98e | ||
|
377359a92f | ||
|
cf1b7a3215 | ||
|
c8c3b2fc0e | ||
|
008b192d99 | ||
|
c0f24a756f | ||
|
0b8ae1f554 | ||
|
4216c13cda | ||
|
01a3a61b2e | ||
|
a0856faf21 | ||
|
1749847eac | ||
|
8ab1b66eb5 | ||
|
d6a2ce3650 | ||
|
60db8c598f | ||
|
49a778a8ad | ||
|
ae35ca4c10 | ||
|
61eff93341 | ||
|
5b988495cc | ||
|
aaaea5965b | ||
|
07c911b995 | ||
|
aff171ceff | ||
|
bae62a963b | ||
|
bedce090f9 | ||
|
aa76e6406c | ||
|
b701d1a40b | ||
|
b3fa5f1949 | ||
|
d49d4d6e5f | ||
|
77972b4abb | ||
|
994aff232c | ||
|
0b9e2ddb8d | ||
|
538016b372 | ||
|
82d4d12f82 | ||
|
0bce146347 | ||
|
ffcf6cfff6 | ||
|
c0742c88a3 | ||
|
af4e9fffe4 | ||
|
0f6ce6ba95 | ||
|
aed50386f7 | ||
|
6c59f53df4 | ||
|
7504a154e1 | ||
|
f9633b2db6 | ||
|
18136e7678 | ||
|
f9d8e56a2e | ||
|
736093b0c1 | ||
|
87988f435c | ||
|
56d789e232 | ||
|
991b7fba21 | ||
|
25f423bebd | ||
|
dd9a827b30 | ||
|
56f5d087b9 | ||
|
7dedd5871f | ||
|
7c30ee1f38 | ||
|
b7cfa30f20 | ||
|
f68e83ad6f | ||
|
c567c110a3 | ||
|
725da9e9c8 | ||
|
4d19c42454 | ||
|
822e7f0d3a | ||
|
08cd658b6d | ||
|
b3a968b8a3 | ||
|
dd1c1e75ba | ||
|
ec805871c3 | ||
|
b1533c4a02 | ||
|
81e6f3b82a | ||
|
7adfa56357 | ||
|
67381ab3cc | ||
|
a26fbaa6c1 | ||
|
cd0c4972a3 | ||
|
c0fd3f8df7 | ||
|
8970a0617d | ||
|
079467ccc1 | ||
|
34a07aa4d5 | ||
|
a43aff41cf | ||
|
5aa4b5813c | ||
|
5beb3dfe39 | ||
|
7c741d63e6 | ||
|
b672b3b77c | ||
|
244e03d542 | ||
|
5aed0a18c2 | ||
|
058a60fbf4 | ||
|
08c40f31f3 | ||
|
0375286dcf | ||
|
17b6359ba9 | ||
|
6ab80ec17d | ||
|
5da063f7e7 | ||
|
82c6aa3162 | ||
|
a186488b30 | ||
|
196914ef14 | ||
|
f9ed96a3e4 | ||
|
2ace3c327a | ||
|
a6fc84bc9b | ||
|
78e4f47c8f | ||
|
059e105652 | ||
|
aa2ce8fd73 | ||
|
80d0c2575e | ||
|
209f71d692 | ||
|
6544ff872e | ||
|
59a0afd3df | ||
|
e618c988a4 | ||
|
19d497c4d1 | ||
|
dcc9e0ef14 | ||
|
963700e3d6 | ||
|
b87670431a | ||
|
ad65327732 | ||
|
17182aea86 | ||
|
24ede72e4a | ||
|
263106b117 | ||
|
b5324e9581 | ||
|
76b8316b5c | ||
|
1541788856 | ||
|
eb5837315c | ||
|
c0a820612c | ||
|
445b31db3f | ||
|
3df9137f39 | ||
|
79125b35a8 | ||
|
334bfd1f37 | ||
|
654aca86ef | ||
|
f911af422f | ||
|
acf38c1b62 | ||
|
3b006be691 | ||
|
75785db7e4 | ||
|
8b48d77cbb | ||
|
5d80d86a0c | ||
|
5f360ca78b | ||
|
0cdbc996a9 | ||
|
6c4099258c | ||
|
97aa34218f | ||
|
0f8d024577 | ||
|
bf394dce9c | ||
|
b4a148712e | ||
|
5792e6dbfc | ||
|
d894b87557 | ||
|
f1db0b7265 | ||
|
af6ec6a874 | ||
|
478033988a | ||
|
340d101ffd | ||
|
6e70451153 | ||
|
19997eb5c1 | ||
|
b9df6e5d27 | ||
|
3edc315827 | ||
|
eab302cc30 | ||
|
b7fc2a0ccf | ||
|
db013f327c | ||
|
98d05ffe44 | ||
|
4e2edf5d4f | ||
|
4228651008 | ||
|
6139623d1e | ||
|
93a9d4bb47 | ||
|
dab7063bc1 | ||
|
0e1fad82d3 | ||
|
78c6f1622a | ||
|
2dff311c2a | ||
|
f06ea6a5b6 | ||
|
9e127b1771 | ||
|
196afa593c | ||
|
58ced060bf | ||
|
bd2c3557bc | ||
|
3c0c85f3a5 | ||
|
27f8ec6f47 | ||
|
f2a5703959 | ||
|
2a05234abb | ||
|
486dfc7197 | ||
|
684a1b9836 | ||
|
be30cbfa45 | ||
|
7bb6b0a2cc | ||
|
21907bf78c | ||
|
71a0c53576 | ||
|
13412a4318 | ||
|
21ddb6e18a | ||
|
18d31ca7ee | ||
|
55b4d1a424 | ||
|
1ab5955e3d | ||
|
9396623f6f | ||
|
18d49572ee | ||
|
1efa2a8783 | ||
|
94cdea40d3 | ||
|
ce45c22ac0 | ||
|
f1f0317cce | ||
|
cc279c49d0 | ||
|
bc6d46ce5d | ||
|
20aaffe6bd | ||
|
9d1a01891c | ||
|
0bc7e0d6b1 | ||
|
98712ea405 | ||
|
ffe529218b | ||
|
34c9eb4279 | ||
|
b531ee6acb | ||
|
d8e498111e | ||
|
be6efbe7ba | ||
|
715c206bab | ||
|
d32078bd43 | ||
|
4e43654f0a | ||
|
fc3846ac2f | ||
|
12c4b63b33 | ||
|
e082b8e3d7 | ||
|
d1a269c0cb | ||
|
b964564325 | ||
|
233b83b218 | ||
|
4e885f7c5c | ||
|
372a9c4b82 | ||
|
e0617baf52 | ||
|
4998c77d29 | ||
|
dcacd40e33 | ||
|
da18e28fbf | ||
|
950ad36c3a | ||
|
e28350370e | ||
|
75af5d310e | ||
|
35f05690ed | ||
|
17c636f2f7 | ||
|
bd84b332de | ||
|
711ddd72ab | ||
|
f46b6e594a | ||
|
94538f96d0 | ||
|
15b5d6052c | ||
|
1a519dc39d | ||
|
fcd0c869e2 | ||
|
9fb7764ebc | ||
|
fdae99568e | ||
|
635a857419 | ||
|
ebe3320d03 | ||
|
5abf1258c2 | ||
|
6f7585f7a4 | ||
|
be1775dc44 | ||
|
03d439d49c | ||
|
7c4cd31b73 | ||
|
1806cf14dc | ||
|
da0b2d8249 | ||
|
ea33c39542 | ||
|
56f365b1a0 | ||
|
cb8e9ca4d7 | ||
|
2bb51c8462 | ||
|
e287500b99 | ||
|
e60d0be099 | ||
|
b5e637be5f | ||
|
0087c6cd17 | ||
|
ae829b3ac0 | ||
|
35b76bb231 | ||
|
a180a70e83 | ||
|
5c25a46af2 | ||
|
4111197fd7 | ||
|
f4110f9817 | ||
|
6ff7f19613 | ||
|
8b3327c10b | ||
|
cfebdb4e0d | ||
|
37fbd2d382 | ||
|
c900c7c4ce | ||
|
8a9d120d5c | ||
|
9f1a78361e | ||
|
90b0b362c8 | ||
|
5dcf71e0a8 | ||
|
591040d68e | ||
|
9e041e9b35 | ||
|
c312302b39 | ||
|
e617310415 | ||
|
82979d58d8 | ||
|
24b85f1573 | ||
|
a7673e0ac3 | ||
|
7fc6faaddc | ||
|
ffb201e9cb | ||
|
57c4c0e22a | ||
|
1293803645 | ||
|
847052d58a | ||
|
d52982ba41 | ||
|
1d906ebdf1 | ||
|
761ba276ce | ||
|
ae84c3ad36 | ||
|
6021cce07b | ||
|
c92e82d1c2 | ||
|
8c3ae8ddba | ||
|
93438554c3 | ||
|
9d220fdfad | ||
|
7b95ed074e | ||
|
3da9e8ca27 | ||
|
ef3a931684 | ||
|
46dbf0ce36 | ||
|
4469cb1820 | ||
|
f76a08b9a0 | ||
|
d6cf2a702d | ||
|
ea418f3ff1 | ||
|
842c395eae | ||
|
f81be77e3b | ||
|
c7e5eeba89 | ||
|
907f26aab5 | ||
|
2d92329112 | ||
|
bdf1f9e902 | ||
|
cb04cf2bb5 | ||
|
74db97895a | ||
|
f0f502f8ab | ||
|
3dfb67766c | ||
|
78d4babed7 | ||
|
f33f962c25 | ||
|
b010cead23 | ||
|
54c00a562f | ||
|
560bdde237 | ||
|
567dbdeb5b | ||
|
d7830b79c8 | ||
|
c0007e5b0a | ||
|
78bf74dc1d | ||
|
7c84efcd92 | ||
|
8562d733c5 | ||
|
b97e7068dc | ||
|
b97769af80 | ||
|
e89f88456b | ||
|
ca05e41d9f | ||
|
df3d681858 | ||
|
8152e6b4ee | ||
|
f3ac6d9d8a | ||
|
d98014879b | ||
|
8dde4d19e4 | ||
|
360e820370 | ||
|
078e0502af | ||
|
906750c769 | ||
|
7b81179dce | ||
|
912965080b | ||
|
c0a699944f | ||
|
2ca9202b6e | ||
|
2651233f3f | ||
|
4bae7d4a63 | ||
|
e0fe4ae4e3 | ||
|
26fafd712c | ||
|
405a68887b | ||
|
f8767ee74f | ||
|
6abca97576 | ||
|
20d074fc08 | ||
|
3b73fff1fc | ||
|
2613728937 | ||
|
affd155f9c | ||
|
615124400c | ||
|
84dc841e64 | ||
|
d334376dd6 | ||
|
4cddbeda45 | ||
|
a0f1d6efca | ||
|
e9ecaf9b08 | ||
|
eb2972f8fb | ||
|
7c094590a7 | ||
|
07308c6ccf | ||
|
77f710f67e | ||
|
912da0d4b3 | ||
|
79ae98bbb0 | ||
|
102557c7ca | ||
|
2a4aa4f0b8 | ||
|
d27ac097b1 | ||
|
9c2e1a4b7b | ||
|
a8749dd060 | ||
|
da048c3aa0 | ||
|
aab308dba1 | ||
|
099849f7ff | ||
|
95eb255d35 | ||
|
28c343707e | ||
|
c1c7f004d4 | ||
|
18efb7552d | ||
|
039b7f2d99 | ||
|
be6c8bbcf1 | ||
|
e1689431f6 | ||
|
a255e0650c | ||
|
c3960f94ee | ||
|
b7fb534bb9 | ||
|
b6ab133ce1 | ||
|
760149038d | ||
|
c816587571 | ||
|
a35a744f7a | ||
|
e5b908e541 | ||
|
491745fd36 | ||
|
10ccc32c63 | ||
|
85941fac98 | ||
|
1c0d8df3db | ||
|
c546135d3e | ||
|
bd0738109c | ||
|
082fb0ae70 | ||
|
b013152da8 | ||
|
de94278815 | ||
|
43211ec2b7 | ||
|
7928e2b4e5 | ||
|
00ca943852 | ||
|
bf26cfe775 | ||
|
b4c12c1a73 | ||
|
3517ccbc92 | ||
|
3ce2f4a4c5 | ||
|
6607fcc0ef | ||
|
45320c4c28 | ||
|
1a3b127a7e | ||
|
ae023c0c49 | ||
|
0d792e2a6d | ||
|
2db88e2844 | ||
|
daa35431f2 | ||
|
1f210b10e8 | ||
|
a2e0ccf011 | ||
|
524a2e7ceb | ||
|
05c75052d3 | ||
|
2fc703c5de | ||
|
6e95a9a1e5 | ||
|
09bc065c63 | ||
|
7a09098880 | ||
|
94ee603288 | ||
|
0cd4ab00c7 | ||
|
55f05b710b | ||
|
194e62f47a | ||
|
b8a1ac5612 | ||
|
e885b519a6 | ||
|
01c3eadcf5 | ||
|
8b186c4ad7 | ||
|
dde3badacc | ||
|
8c5d1ef6ed | ||
|
89697c5df2 | ||
|
0f642e77d4 | ||
|
f2a055ef97 | ||
|
03a7c073c2 | ||
|
e8c6874eb1 | ||
|
9f00b0da00 | ||
|
9515b6703f | ||
|
baa1cfbd35 | ||
|
67dfd71e53 | ||
|
1a6b1b6f5b | ||
|
e5681f4a50 | ||
|
9f0394f9c3 | ||
|
a6359c679d | ||
|
0f3a1e0ba4 | ||
|
d6a49c572a | ||
|
a002b0c43c | ||
|
ace38821ad | ||
|
96516dd723 | ||
|
f8d2b38fe4 | ||
|
7756df5dbf | ||
|
e6ce23e63b | ||
|
8300389ecf | ||
|
8c23bab5c2 | ||
|
64995148d5 | ||
|
29d7d59abc | ||
|
ec139b282b | ||
|
51459e04f9 | ||
|
628a5ffa00 | ||
|
6ee8943ebf | ||
|
9d2a79b3a4 | ||
|
863a0c679b | ||
|
5b5c07c061 | ||
|
c756ee4dd3 | ||
|
aaab08aa2a | ||
|
0e196e0fd1 | ||
|
811a306f55 | ||
|
9ae293917b | ||
|
e61398e79c | ||
|
dfb30e2882 | ||
|
4b2e398b0d | ||
|
ecec5ece13 | ||
|
8f26eb4a77 | ||
|
e8bc76c5b3 | ||
|
9724c929cb | ||
|
c3c4cfcc79 | ||
|
7a92c39ce5 | ||
|
5c6a72a7ca | ||
|
c81a433761 | ||
|
ea0d43d72f | ||
|
ae3f0a1870 | ||
|
d40f593b64 | ||
|
1699452ef8 | ||
|
41f163d735 | ||
|
7ea7dc4063 | ||
|
6817d12843 | ||
|
923416f666 | ||
|
2c703a94f5 | ||
|
2e847b959a | ||
|
cb81af5c42 | ||
|
bc9f8bb1f3 | ||
|
e98d337210 | ||
|
baafc22e05 | ||
|
375f9098a5 | ||
|
3c30f7fbd0 | ||
|
58757ae6d4 | ||
|
a417d8581e | ||
|
9b5a3b8e4c | ||
|
6f85c6383a | ||
|
183dfb4adb | ||
|
719bf01886 | ||
|
feac055af8 | ||
|
d1787e2c9c | ||
|
8f3e4f1b6e | ||
|
5e5fa71d5a | ||
|
7866230c2c | ||
|
62c8affc56 | ||
|
1d26215e7f | ||
|
c3aa1d47a0 | ||
|
ed890b7e2e | ||
|
f0c308711b | ||
|
6a062ed252 | ||
|
90c55771fd | ||
|
fd51336457 | ||
|
55e2966fb3 | ||
|
763d325c6a | ||
|
cc43e948dc | ||
|
073b6a650d | ||
|
321b334912 | ||
|
4b0be76f13 | ||
|
f41650b9b8 | ||
|
66b546f33f | ||
|
f684926ec8 | ||
|
38d424a25e | ||
|
591ef01a5b | ||
|
fc1d806411 | ||
|
eefe748587 | ||
|
96c021a74f | ||
|
ca0d589c85 | ||
|
1d1c796f67 | ||
|
466f1709f2 | ||
|
43e24cad84 | ||
|
cd2924d9ab | ||
|
dad9dde30e | ||
|
3ea83315ba | ||
|
50ac933d43 | ||
|
94baea2b63 | ||
|
0f85f9390c | ||
|
61691b8689 | ||
|
9feb86a622 | ||
|
c35bd787df | ||
|
32be29331b | ||
|
dfa1083363 | ||
|
077d9acf41 | ||
|
dd04c2f9b6 | ||
|
0fcb14a78f | ||
|
d616702b69 | ||
|
f3d2771081 | ||
|
173eb165ac | ||
|
1597cd9cee | ||
|
b41546414a | ||
|
08029f654a | ||
|
8c5c85d4db | ||
|
00d1c0f635 | ||
|
5fbc998044 | ||
|
2269ad78ec | ||
|
cf5e1561a9 | ||
|
e2fd1153ef | ||
|
a05bd780b9 | ||
|
0234884099 | ||
|
c1fb4165f9 | ||
|
6a3279d598 | ||
|
bb3decbb48 | ||
|
dc4adba496 | ||
|
2efa58419a | ||
|
7434ba3a2c | ||
|
b30e645eb2 | ||
|
a8bd14c991 | ||
|
d574a0a9cc | ||
|
f66acd94df | ||
|
256e47d6c9 | ||
|
6c4e1a4c65 | ||
|
f453b256ea | ||
|
171bf04b12 | ||
|
87bc0ef57b | ||
|
4e24cf3451 | ||
|
d2852f9571 | ||
|
55e1d65d65 | ||
|
993f6d5b82 | ||
|
e7781cc811 | ||
|
639baf6118 | ||
|
065115bbe3 | ||
|
5821ef654c | ||
|
91629266a0 | ||
|
b3d6df698d | ||
|
c793a9eb9b | ||
|
4bafd9555d | ||
|
26dc666444 | ||
|
e8e18614e8 | ||
|
7f177759cf | ||
|
bad9bbf095 | ||
|
73bba343ef | ||
|
805daf2bb2 | ||
|
45a14ab733 | ||
|
1cf72798df | ||
|
91419bc8eb | ||
|
c71af8d5cf | ||
|
6f1816983b | ||
|
d90884488d | ||
|
8a4661e36b | ||
|
6f1525ed30 | ||
|
0674dcb996 | ||
|
5882671bfb | ||
|
2c508faefe | ||
|
74db52149f | ||
|
f1f6ae6234 | ||
|
39c33fcf2d | ||
|
a8073eb037 | ||
|
b4044a3d1f | ||
|
d6da8e6f6b | ||
|
1bfdbcfe56 | ||
|
218d8f84db | ||
|
73e911a0e5 | ||
|
d93c8551e6 | ||
|
53135405c5 | ||
|
a827776a6e | ||
|
f24d40c2d3 | ||
|
7fb3796a38 | ||
|
3793013f03 | ||
|
d5c82c42a2 | ||
|
c47403f9b0 | ||
|
b8f509a5b3 | ||
|
1af5e10b72 | ||
|
4bc380355d | ||
|
8e2277ff6a | ||
|
096f3ed392 | ||
|
2095cdca6f | ||
|
941e34d83b | ||
|
a7fd0dfd70 | ||
|
827a4c7d00 | ||
|
c3973a8573 | ||
|
62f062f726 | ||
|
f113470a11 | ||
|
787bb6a506 | ||
|
78a45e6a2e | ||
|
4164ae01d8 | ||
|
4edc6af1fc | ||
|
efbe1eac39 | ||
|
cbde9aed9a | ||
|
8101618a59 | ||
|
05049e9a69 | ||
|
dec193e4c5 | ||
|
a4c58b49cd | ||
|
d9fb8ea6bb | ||
|
90bb9ac417 | ||
|
446784557f | ||
|
c5dc4943f5 | ||
|
232a83ccb6 | ||
|
e8d9376472 | ||
|
61e0f2c6ef | ||
|
8932c97e93 | ||
|
f605efba76 | ||
|
c54e5babb7 | ||
|
313e17ee33 | ||
|
5e07243fa8 | ||
|
ff72db3c5c | ||
|
48956cf88d | ||
|
cf1b68f0e7 | ||
|
ab6698ec55 | ||
|
ca6e580622 | ||
|
2eb78d7c9c | ||
|
2cb3174880 | ||
|
a66f7753e3 | ||
|
27d6b344e7 | ||
|
9be3f61de0 | ||
|
1f6aad8624 | ||
|
f44e640e8b | ||
|
7ece56461a | ||
|
9cab0f9822 | ||
|
bb13a30ed7 | ||
|
7a9f0785df | ||
|
c41409fd7f | ||
|
81f0133a29 | ||
|
db635d78a3 | ||
|
c3662d2502 | ||
|
0296453981 | ||
|
2f4e4df656 | ||
|
b8cf3d75c5 | ||
|
cbf3861dce | ||
|
f8b0c67d51 | ||
|
a47c8aa7b8 | ||
|
6781fde41f | ||
|
aacf8a79b1 | ||
|
aab56397c9 | ||
|
9084d3fa4b | ||
|
5137d57150 | ||
|
319aa22eea | ||
|
17526fd33f | ||
|
58ff2c3992 | ||
|
4867c9aa5d | ||
|
3bfa190040 | ||
|
cfe02368c5 | ||
|
cc6f1ede8b | ||
|
0b4fa737b8 | ||
|
68a13d3d66 | ||
|
db2e4ddedf | ||
|
f896634c59 | ||
|
755f874774 | ||
|
801bade1da | ||
|
be9e55b9f3 | ||
|
c2ec8fcf20 | ||
|
6f7a22551b | ||
|
d288662f70 | ||
|
508a0d21c3 | ||
|
242f97b135 | ||
|
e89e7a3bff | ||
|
784cb5c265 | ||
|
135aa36da4 | ||
|
ac94385c11 | ||
|
467e7fe100 | ||
|
b4b5c7774a | ||
|
447091bef1 | ||
|
dd0a4bda95 | ||
|
d2e71e1166 | ||
|
b6352e5f12 | ||
|
4a16a7ce1f | ||
|
770051d866 | ||
|
6541a8d081 | ||
|
78ecb14e67 | ||
|
41c72d7a22 | ||
|
ee6ee0d972 | ||
|
70c0bded36 | ||
|
b5c4e7400e | ||
|
f536e7911b | ||
|
c97d9d3d2b | ||
|
b0b735d334 | ||
|
c61214127f | ||
|
50bd23a4c9 | ||
|
9a751b48e1 | ||
|
e6b06df5bc | ||
|
afcad58ef7 | ||
|
25efcb356b | ||
|
2349fb88b0 | ||
|
e061983f9e | ||
|
3224622b15 | ||
|
82037bdc17 | ||
|
5fc73c33f7 | ||
|
bb9f62c760 | ||
|
4eb73b4d38 | ||
|
41abbd7e65 | ||
|
66c2ac76eb | ||
|
31aaf2c2d6 | ||
|
ed6a04b56c | ||
|
1ff9f6f15b | ||
|
d0f26f386c | ||
|
c70e1a179d | ||
|
5420a02aa4 | ||
|
181436660c | ||
|
9a779abeab | ||
|
e6b4cf1013 | ||
|
2f1ebef4a4 | ||
|
51d8556e77 | ||
|
d24d3b6317 | ||
|
b4e56ad563 | ||
|
9b1fe5d511 | ||
|
d0a5db4bba | ||
|
9784867867 | ||
|
da215f6a33 | ||
|
61e1781fc6 | ||
|
beaf539825 | ||
|
946e6fee1b | ||
|
0eebe7b0b9 | ||
|
2e3223964d | ||
|
13a8397007 | ||
|
25b12298f4 | ||
|
9e099e1e6e | ||
|
2755295519 | ||
|
f91993363b | ||
|
fc06370e9b | ||
|
fdc640dd4a | ||
|
e0e655652c | ||
|
9050a86ea2 | ||
|
b3e730c3c4 | ||
|
e70e0e7004 | ||
|
f837d12425 | ||
|
33a923af9b | ||
|
f0eaa2048a | ||
|
cc32102067 | ||
|
8659bb94e7 | ||
|
6cf6280ed8 | ||
|
a85d7e3650 | ||
|
fcc36de3ce | ||
|
506f50d311 | ||
|
c94876d937 | ||
|
262298d816 | ||
|
07224a015a | ||
|
88f0f2e8b9 | ||
|
d9bef5e8f0 | ||
|
4970c95110 | ||
|
220b51ed48 | ||
|
346dec6834 | ||
|
be573e765e | ||
|
b5953bef10 | ||
|
0ef56de99e | ||
|
37222e5fb3 | ||
|
b87794b02f | ||
|
e628e29892 | ||
|
f6d68a48db | ||
|
5be09e6be4 | ||
|
132eb0b079 | ||
|
d2e25e2e17 | ||
|
7efcf289e5 | ||
|
cbda1249f8 | ||
|
de8c1ba781 | ||
|
571a37543f | ||
|
2b931d1d23 | ||
|
e4d501f314 | ||
|
2e21945493 | ||
|
684d8c4e04 | ||
|
173daea3a9 | ||
|
f5c28c6c0e | ||
|
2cd27b58cf | ||
|
e6b5fe9a63 | ||
|
003529d176 | ||
|
3d0dc327ac | ||
|
a6fa2c8ca8 | ||
|
6e94671abd | ||
|
a20a881483 | ||
|
caec361077 | ||
|
791f4a83c2 | ||
|
3653959fbe | ||
|
3a4a5414c2 | ||
|
24653ffbd3 | ||
|
8b4413a6f4 | ||
|
38c86d992a | ||
|
1fc7e1f921 | ||
|
5194e84deb | ||
|
a2392f8080 | ||
|
d57c50e9b0 | ||
|
5ae48c7190 | ||
|
d866626cfa | ||
|
3b0bab69df | ||
|
42cea681ef | ||
|
95d546188b | ||
|
dd19efbb9e | ||
|
1ee1d813c8 | ||
|
42e2e7f986 | ||
|
6e6a5d4feb | ||
|
9a0c4b72a3 | ||
|
6a99b961c1 | ||
|
5895f8c884 | ||
|
52b25aa0a9 | ||
|
14a58329a8 | ||
|
ca4aea4c5a | ||
|
4c26556df6 | ||
|
f426bca118 | ||
|
c79f2adfa3 | ||
|
08c9835524 | ||
|
da76830956 | ||
|
36ea546a03 | ||
|
849eb4ef3b | ||
|
b1e997da7e | ||
|
088455e8c6 | ||
|
5755a72fe4 | ||
|
6180a9b078 | ||
|
b366475795 | ||
|
cfb5894d70 | ||
|
8841a26519 | ||
|
533a424b62 | ||
|
7bfa1bddb8 | ||
|
835ec95694 | ||
|
e136c8c2a5 | ||
|
324a187f3e | ||
|
e6ce7b3293 | ||
|
8f06001865 | ||
|
e56b2c6901 | ||
|
e72a9d2f0c | ||
|
92bec02077 | ||
|
28924714c1 | ||
|
8239c8f04f | ||
|
cfceb8ab2d | ||
|
be70ff6945 | ||
|
74989e0a97 | ||
|
5e791b7147 | ||
|
50112a3cb8 | ||
|
050cf77b3d | ||
|
28fc83d068 | ||
|
6b55050ba0 | ||
|
2db57284c5 | ||
|
f0b7439483 | ||
|
aa5832cc64 | ||
|
80e836921b | ||
|
5561cc5006 | ||
|
66bdfda587 | ||
|
c974abfafd | ||
|
fbf46fce2c | ||
|
326618fc2a | ||
|
b317904de7 | ||
|
29d6aeb29f | ||
|
50bdad85b9 | ||
|
78eaf33537 | ||
|
5d42b6bb67 | ||
|
4682c6aa76 | ||
|
ae73b13acc | ||
|
b846123f5b | ||
|
6508160786 | ||
|
6b2f8c69f7 | ||
|
4ee31e2a7c | ||
|
9f0c48d05b | ||
|
0781bf5817 | ||
|
c423bc5768 | ||
|
91c6d95415 | ||
|
bae1bafa98 | ||
|
e07767053f | ||
|
81e9828afd | ||
|
b9bcd643d8 | ||
|
f5b3597a80 | ||
|
7a51615f9d | ||
|
5480873552 | ||
|
ce7d12acb3 | ||
|
396f6b9751 | ||
|
005848beb8 | ||
|
6f74df7b63 | ||
|
c325a04f64 | ||
|
6485275f21 | ||
|
0d86fadeb3 | ||
|
a634432d6f | ||
|
62f64889bd | ||
|
7c264a098c | ||
|
d4bd4d3637 | ||
|
e2a9d52ed5 | ||
|
0b9b383d9c | ||
|
32f9d95914 | ||
|
5adf8da156 | ||
|
4b984a8357 | ||
|
a3b3031ffe | ||
|
91d38827a0 | ||
|
59c7905360 | ||
|
a50df2110a | ||
|
346daad02e | ||
|
fa7bda8926 | ||
|
ba23332a84 | ||
|
b98b09f399 | ||
|
9d2387f4bf | ||
|
0dbee7d4b5 | ||
|
63b8fa60dd | ||
|
1de4b9ab38 | ||
|
fed5094fe2 | ||
|
c27438e6c5 | ||
|
53645b6799 | ||
|
c27f10ff80 | ||
|
debdc3d8aa | ||
|
a6b824ea22 | ||
|
81d5697f5a | ||
|
3bda3f4b47 | ||
|
738cd02b95 | ||
|
0a98952de1 | ||
|
b4b59ad657 | ||
|
f23771be80 | ||
|
36d234f2e7 | ||
|
c574c7cae4 | ||
|
cdcc6ced81 | ||
|
a93953166a | ||
|
630ef09ea3 | ||
|
610f59b2a4 | ||
|
61c2a9ad58 | ||
|
b98c03aebc | ||
|
52e50372a9 | ||
|
bd6e55d0d1 | ||
|
c0e2b4703b | ||
|
89cc067a89 | ||
|
dfcb0dc606 | ||
|
08f161f3e8 | ||
|
6a13cec6b9 | ||
|
23c50044d1 | ||
|
d56a67b599 | ||
|
2688e0b00a | ||
|
a465400cff | ||
|
24e18e6d01 | ||
|
05a0252a56 | ||
|
3fedd7bc3d | ||
|
5a35542c50 | ||
|
e1d2090c18 | ||
|
1461dc196f | ||
|
b6801c69a3 | ||
|
3c779f87fb | ||
|
5e759f1c47 | ||
|
3300150a67 | ||
|
8e626c2cb3 | ||
|
bfe24865bd | ||
|
f88603af5d | ||
|
be32c6841d | ||
|
066bfa2d03 | ||
|
c7c709650a | ||
|
ae0e0ad3bd | ||
|
af27b15e84 | ||
|
e5c8b3045a | ||
|
374cd11896 | ||
|
5249caa6a2 | ||
|
240173b8d4 | ||
|
6edda48f03 | ||
|
b9b4075e9f | ||
|
6a40916418 | ||
|
dfad5e01b4 | ||
|
e703368ff9 | ||
|
9e0978ce99 | ||
|
8533503dae | ||
|
4d601bf8c6 | ||
|
9d89925f00 | ||
|
af54ec14db | ||
|
f82e117932 | ||
|
d59201b358 | ||
|
04d292688f | ||
|
62b5d849d3 | ||
|
457634d06f | ||
|
f7b4c54b34 | ||
|
cec4656e0f | ||
|
043563d37c | ||
|
de3d438171 | ||
|
f7ac48ff59 | ||
|
6b6d8aba72 | ||
|
7345f0a00d | ||
|
845b0b26da | ||
|
eae27b6ba9 | ||
|
05dccc683e | ||
|
a8188943d4 | ||
|
a0b2a3a561 | ||
|
ca020b4dfb | ||
|
2ccae66aa5 | ||
|
2015c9c907 | ||
|
b94043090b | ||
|
d76f33661b | ||
|
0d44f5df35 | ||
|
6dbfddf8e2 | ||
|
1d7a3dbf06 | ||
|
6aa26d3356 | ||
|
8e5f79c4e7 | ||
|
3ed78e0fea | ||
|
3336f4afdf | ||
|
4f8cf5f17c | ||
|
f353be74cb | ||
|
696429d464 | ||
|
fc638551ef | ||
|
b5a17b3424 | ||
|
a58305c7c0 | ||
|
f359db21e8 | ||
|
fd8c5a701a | ||
|
5c5a54d2d3 | ||
|
e5f22cafc2 | ||
|
849b5f0d12 | ||
|
257bc6530a | ||
|
908efddd71 | ||
|
6f709e1763 | ||
|
90c1430cb2 | ||
|
875123d1d2 | ||
|
501c2539c8 | ||
|
d0679eaed2 | ||
|
63ba44401c | ||
|
8fb9759aa8 | ||
|
8bcb16c61a | ||
|
166fbabc54 | ||
|
d847966a45 | ||
|
7373a42c79 | ||
|
6ca52c5e1a | ||
|
46387e0182 | ||
|
7aefcb0107 | ||
|
0c574b306e | ||
|
7f1e0bfb4d | ||
|
1af6bc56f1 | ||
|
7240bee8e9 | ||
|
d6a972b53c | ||
|
cf970b5ab5 | ||
|
668ac2222d | ||
|
0fc1ae74ad | ||
|
bdce4b5596 | ||
|
7bb31a9de8 | ||
|
08d183d7e6 | ||
|
8984c54fce | ||
|
995f11d6dc | ||
|
763dccb954 | ||
|
299c0b49e7 | ||
|
c4b41a26b9 | ||
|
43aaf2c612 | ||
|
a1cfff2685 | ||
|
8f5233a551 | ||
|
259a8a7593 | ||
|
17a1df5063 | ||
|
51a4a037b2 | ||
|
0e04c229e5 | ||
|
f1433a8ed2 | ||
|
9b58cc9f36 | ||
|
d8da8ad908 | ||
|
e568aa4b2e |
490 changed files with 41726 additions and 12971 deletions
9
.cvsignore
Normal file
9
.cvsignore
Normal file
|
@ -0,0 +1,9 @@
|
|||
.gwdir
|
||||
*.swp
|
||||
*~
|
||||
*.app
|
||||
*.bundle
|
||||
*.framework
|
||||
*obj
|
||||
derived_src
|
||||
ProjectCenter
|
3
.dist-ignore
Normal file
3
.dist-ignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
.gwdir
|
||||
*.swp
|
||||
*~
|
23
.github/scripts/build.sh
vendored
Executable file
23
.github/scripts/build.sh
vendored
Executable file
|
@ -0,0 +1,23 @@
|
|||
#! /usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
|
||||
echo "Building..."
|
||||
|
||||
# build dependencies...
|
||||
./.github/scripts/dependencies.sh
|
||||
|
||||
export LIBRARY_PATH=$HOME/staging/lib:$HOME/staging/lib64:$LIBRARY_PATH;
|
||||
export LD_LIBRARY_PATH=$HOME/staging/lib:$HOME/staging/lib64:$LD_LIBRARY_PATH;
|
||||
if [ $LIBRARY_COMBO = 'ng-gnu-gnu' ];
|
||||
then
|
||||
export CPATH=$HOME/staging/include;
|
||||
else
|
||||
export CPATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/include;
|
||||
fi;
|
||||
export PATH=$HOME/staging/bin:$PATH;
|
||||
export GNUSTEP_MAKEFILES=$HOME/staging/share/GNUstep/Makefiles;
|
||||
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh;
|
||||
|
||||
# Build gorm
|
||||
make && make install && make check || (cat Tests/tests.log && false);
|
135
.github/scripts/dependencies.sh
vendored
Executable file
135
.github/scripts/dependencies.sh
vendored
Executable file
|
@ -0,0 +1,135 @@
|
|||
#! /usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
|
||||
DEP_SRC=$HOME/dependency_source/
|
||||
DEP_ROOT=$HOME/staging
|
||||
|
||||
install_prerequisites() {
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get install -y cmake pkg-config libgnutls28-dev libgmp-dev libffi-dev libicu-dev \
|
||||
libxml2-dev libxslt1-dev libssl-dev libavahi-client-dev zlib1g-dev
|
||||
|
||||
if [ $LIBRARY_COMBO = 'gnu-gnu-gnu' ];
|
||||
then
|
||||
if [ $CC = 'gcc' ];
|
||||
then
|
||||
sudo apt-get install -y gobjc;
|
||||
fi;
|
||||
sudo apt-get install -y libobjc-8-dev libblocksruntime-dev;
|
||||
else
|
||||
curl -s -o - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -;
|
||||
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main" && sudo apt-get update -qq;
|
||||
sudo apt-get install -y clang-9 libkqueue-dev libpthread-workqueue-dev;
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 10 \
|
||||
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-9;
|
||||
export PATH=$(echo "$PATH" | sed -e 's/:\/usr\/local\/clang-7.0.0\/bin//');
|
||||
if [ "$RUNTIME_VERSION" = "gnustep-2.0" ];
|
||||
then
|
||||
sudo update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 10;
|
||||
fi;
|
||||
fi;
|
||||
if [ $LIBRARY_COMBO = 'ng-gnu-gnu' ];
|
||||
then
|
||||
curl -LO https://cmake.org/files/v3.15/cmake-3.15.5-Linux-x86_64.tar.gz;
|
||||
tar xf cmake-3.15.5-Linux-x86_64.tar.gz;
|
||||
mv cmake-3.15.5-Linux-x86_64 $HOME/cmake;
|
||||
export PATH=$HOME/cmake/:$HOME/cmake/bin:$PATH
|
||||
fi;
|
||||
}
|
||||
|
||||
install_gnustep_make() {
|
||||
cd $DEP_SRC
|
||||
git clone https://github.com/gnustep/tools-make.git
|
||||
cd tools-make
|
||||
if [ -n "$RUNTIME_VERSION" ]
|
||||
then
|
||||
WITH_RUNTIME_ABI="--with-runtime-abi=${RUNTIME_VERSION}"
|
||||
else
|
||||
WITH_RUNTIME_ABI=""
|
||||
fi
|
||||
./configure --prefix=$DEP_ROOT --with-library-combo=$LIBRARY_COMBO $WITH_RUNTIME_ABI
|
||||
make install
|
||||
echo Objective-C build flags: `$HOME/staging/bin/gnustep-config --objc-flags`
|
||||
}
|
||||
|
||||
install_ng_runtime() {
|
||||
cd $DEP_SRC
|
||||
git clone https://github.com/gnustep/libobjc2.git
|
||||
cd libobjc2
|
||||
git submodule init
|
||||
git submodule sync
|
||||
git submodule update
|
||||
cd ..
|
||||
mkdir libobjc2/build
|
||||
cd libobjc2/build
|
||||
export CC="clang"
|
||||
export CXX="clang++"
|
||||
export CXXFLAGS="-std=c++11"
|
||||
cmake -DTESTS=off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGNUSTEP_INSTALL_TYPE=NONE -DCMAKE_INSTALL_PREFIX:PATH=$DEP_ROOT ../
|
||||
make install
|
||||
}
|
||||
|
||||
install_libdispatch() {
|
||||
cd $DEP_SRC
|
||||
# will reference upstream after https://github.com/apple/swift-corelibs-libdispatch/pull/534 is merged
|
||||
git clone -b system-blocksruntime https://github.com/ngrewe/swift-corelibs-libdispatch.git
|
||||
mkdir swift-corelibs-libdispatch/build
|
||||
cd swift-corelibs-libdispatch/build
|
||||
export CC="clang"
|
||||
export CXX="clang++"
|
||||
export LIBRARY_PATH=$DEP_ROOT/lib;
|
||||
export LD_LIBRARY_PATH=$DEP_ROOT/lib:$LD_LIBRARY_PATH;
|
||||
export CPATH=$DEP_ROOT/include;
|
||||
cmake -DBUILD_TESTING=off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=$HOME/staging -DINSTALL_PRIVATE_HEADERS=1 -DBlocksRuntime_INCLUDE_DIR=$DEP_ROOT/include -DBlocksRuntime_LIBRARIES=$DEP_ROOT/lib/libobjc.so ../
|
||||
make install
|
||||
}
|
||||
|
||||
install_gnustep_base() {
|
||||
export GNUSTEP_MAKEFILES=$HOME/staging/share/GNUstep/Makefiles
|
||||
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh
|
||||
|
||||
cd $DEP_SRC
|
||||
git clone https://github.com/gnustep/libs-base.git
|
||||
cd libs-base
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
}
|
||||
|
||||
install_gnustep_gui() {
|
||||
export GNUSTEP_MAKEFILES=$HOME/staging/share/GNUstep/Makefiles
|
||||
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh
|
||||
|
||||
cd $DEP_SRC
|
||||
git clone https://github.com/gnustep/libs-gui.git
|
||||
cd libs-gui
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
}
|
||||
|
||||
install_gnustep_back() {
|
||||
export GNUSTEP_MAKEFILES=$HOME/staging/share/GNUstep/Makefiles
|
||||
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh
|
||||
|
||||
cd $DEP_SRC
|
||||
git clone https://github.com/gnustep/libs-back.git
|
||||
cd libs-back
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
}
|
||||
|
||||
mkdir -p $DEP_SRC
|
||||
if [ "$LIBRARY_COMBO" = 'ng-gnu-gnu' ]
|
||||
then
|
||||
install_ng_runtime
|
||||
install_libdispatch
|
||||
fi
|
||||
|
||||
install_prerequisites
|
||||
install_gnustep_make
|
||||
install_gnustep_base
|
||||
install_gnustep_gui
|
||||
install_gnustep_back
|
10
.github/scripts/test.sh
vendored
Executable file
10
.github/scripts/test.sh
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
#! /usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
|
||||
echo "Testing..."
|
||||
|
||||
. $HOME/staging/share/GNUstep/Makefiles/GNUstep.sh;
|
||||
|
||||
# Test gorm
|
||||
make check || (cat Tests/tests.log && false);
|
38
.github/workflows/main.yml
vendored
Normal file
38
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: CI
|
||||
|
||||
# Controls when the workflow will run
|
||||
on: push
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run
|
||||
# sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LIBRARY_COMBO: gnu-gnu-gnu
|
||||
CC: gcc
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as
|
||||
# part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE,
|
||||
# so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Runs a single command using the runners shell
|
||||
- name: Build source
|
||||
run: ./.github/scripts/build.sh
|
||||
|
||||
# Runs a single command using the runners shell
|
||||
- name: Run tests
|
||||
run: ./.github/scripts/test.sh
|
||||
|
||||
# Runs a set of commands using the runners shell
|
||||
- name: Run a multi-line script
|
||||
run: |
|
||||
echo Add other actions to build,
|
||||
echo test, and deploy your project.
|
14
.gitignore
vendored
Normal file
14
.gitignore
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
*.app
|
||||
*.debug
|
||||
*.profile
|
||||
*.plugin
|
||||
*.framework
|
||||
*.debugger
|
||||
*.editor
|
||||
*.parser
|
||||
*.preferences
|
||||
*.project
|
||||
*.swp
|
||||
derived_src
|
||||
obj
|
||||
*~
|
68
ANNOUNCE
68
ANNOUNCE
|
@ -1,68 +0,0 @@
|
|||
Announcement
|
||||
************
|
||||
|
||||
What is ProjectCenter?
|
||||
======================
|
||||
|
||||
ProjectCenter is an application developed for GNUstep which one day should
|
||||
becoime a full blown development environment.
|
||||
|
||||
The file `INSTALL' gives instructions for installing the package.
|
||||
|
||||
The GNUstep web site at `http://www.prjectcenter.ch' contains more
|
||||
information.
|
||||
|
||||
ProjectCenter is covered under the GNU Public License. This means if you
|
||||
make changes to these programs, you cannot charge a fee, other than
|
||||
distribution fees, for others to use the program. You should read the
|
||||
COPYING file for more information.
|
||||
|
||||
How can you help?
|
||||
=================
|
||||
|
||||
* Check the bug list at the ProjectCenter web site.
|
||||
If you can volunteer for any of the todo's, or if you have any useful
|
||||
comments send email! <info@projectcenter.ch>
|
||||
|
||||
* Give us feedback! Tell us what you like; tell us what you think
|
||||
could be better. Send bug reports to <info@projectcenter.ch>.
|
||||
|
||||
Machines
|
||||
========
|
||||
|
||||
GNUstep ProjectCenter is known to compile on the following machines.
|
||||
|
||||
* OpenStep 4.x/m68k
|
||||
|
||||
* OpenStep 4.x/ix86
|
||||
|
||||
* Linux/GNUstep 0.6.5
|
||||
|
||||
Where do I send bug reports?
|
||||
============================
|
||||
|
||||
Bug reports can be sent to <info@projectcenter.ch>.
|
||||
|
||||
Enjoy!
|
||||
Philippe C.D. Robert
|
||||
<phr@projectcenter.ch>
|
||||
|
||||
Obtaining GNU Software
|
||||
======================
|
||||
|
||||
Check out the GNU web site. (`http://www.gnu.org/')
|
||||
|
||||
Check out the GNUstep web site. (`http://www.gnustep.org/')
|
||||
|
||||
Most GNU software is packed using the GNU `gzip' compression program.
|
||||
Source code is available on most sites distributing GNU software.
|
||||
|
||||
For information on how to order GNU software on tape, floppy or
|
||||
cd-rom, or printed GNU manuals, check the file etc/ORDERS in the GNU
|
||||
Emacs distribution or in GNUinfo/ORDERS on prep, or e-mail a request to:
|
||||
<gnu@gnu.org>
|
||||
|
||||
By ordering your GNU software from the FSF, you help us continue to
|
||||
develop more free software. Media revenues are our primary source of
|
||||
support. Donations to FSF are deductible on US tax returns.
|
||||
|
6
CODEOWNERS
Normal file
6
CODEOWNERS
Normal file
|
@ -0,0 +1,6 @@
|
|||
# These owners will be the default owners for everything in
|
||||
# the repo. Unless a later match takes precedence,
|
||||
# @global-owner1 and @global-owner2 will be requested for
|
||||
# review when someone opens a pull request.
|
||||
* @rmottola
|
||||
* @gcasa
|
850
COPYING
850
COPYING
|
@ -1,285 +1,627 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02111, USA
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
0. Definitions.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
1. Source Code.
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
14. Revised Versions of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
NO WARRANTY
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
|
@ -287,15 +629,15 @@ free software which everyone can redistribute and change under these terms.
|
|||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
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
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
|
@ -304,36 +646,30 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02111, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
|
65
Documentation/ANNOUNCE
Normal file
65
Documentation/ANNOUNCE
Normal file
|
@ -0,0 +1,65 @@
|
|||
|
||||
ANNOUNCE
|
||||
********
|
||||
|
||||
This is version 0.5.0 of ProjectCenter.
|
||||
|
||||
What is ProjectCenter?
|
||||
======================
|
||||
|
||||
ProjectCenter is GNUstep IDE(Intergated Development Environment)
|
||||
application. It is a clone of the OPENSTEP ProjectBuilder application
|
||||
for GNUstep.
|
||||
|
||||
ProjectCenter is covered under the GNU General Public License. This means
|
||||
if you make changes to these programs, you cannot charge a fee, other than
|
||||
distribution fees, for others to use the program. You should read the
|
||||
Documentation/COPYING file for more information.
|
||||
|
||||
Noteworthy changes in version `0.5.0'.
|
||||
======================================
|
||||
|
||||
* Added new project types "Framework" and "Resource Set".
|
||||
|
||||
* Implemented on demand loading of bundles (project types, editor).
|
||||
|
||||
* Impemented localization support for projects.
|
||||
|
||||
* Some user interface ehnancements were made (save/restore geometry of
|
||||
subviews in project window splitview, drag and drop for icons).
|
||||
|
||||
* Clicking on .m and .h file in project browser expands to file structure
|
||||
(classes, methods).
|
||||
|
||||
* Incorporated ProjectManager's editor with some modifications. Implemented
|
||||
syntax color highlighting.
|
||||
|
||||
* All windows and panels are now GORM files.
|
||||
|
||||
* Fixes for MingW environment.
|
||||
|
||||
* Support for separate build directory added.
|
||||
|
||||
How can I get support for this software?
|
||||
========================================
|
||||
|
||||
You may wish to use the GNUstep discussion mailing list for general
|
||||
questions and discussion. Look at the GNUstep Web Pages for more
|
||||
information regarding GNUstep resources <http://www.gnustep.org>
|
||||
|
||||
Where can you get it? How can you compile it?
|
||||
==============================================
|
||||
|
||||
You can download sources from ftp://ftp.gnustep.org/pub/gnustep/dev-apps/.
|
||||
|
||||
Where do I send bug reports?
|
||||
============================
|
||||
|
||||
Bug reports can be sent to <bug-gnustep@gnu.org>.
|
||||
|
||||
Obtaining GNU Software
|
||||
======================
|
||||
|
||||
Check out the GNU web site. (`http://www.gnu.org/')
|
||||
|
||||
Check out the GNUstep web site. (`http://www.gnustep.org/')
|
12
Documentation/AUTHORS
Normal file
12
Documentation/AUTHORS
Normal file
|
@ -0,0 +1,12 @@
|
|||
Authors:
|
||||
Philippe C.D. Robert <probert@siggraph.org>
|
||||
Sergii Stoian <stoyan255gmail.com>
|
||||
|
||||
Contributors:
|
||||
David Ayers <d.ayers@inode.at>
|
||||
Richard Frith-Macdonald <rfm@gnu.org>
|
||||
Nicola Pero <n.pero@mi.flashnet.it>
|
||||
Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
|
||||
Adam Fedor <fedor@gnu.org>
|
||||
Daniel Luederwald <das_flip@gmx.de>
|
||||
Gregory Jonh Casamento <greg_casamento@yahoo.com>
|
73
Documentation/BUGS
Normal file
73
Documentation/BUGS
Normal file
|
@ -0,0 +1,73 @@
|
|||
KNOWN BUGS:
|
||||
~~~~~~~~~~
|
||||
- [bug #25571] exception on removing author in project inspector.
|
||||
This happens to me with project-center-0.5.0.
|
||||
in the Project Inspector -> Project Description, click the Add button to
|
||||
add an Author now the text input field is active, to add an author, as
|
||||
long as this is active, and then pressing remove button, to remove an
|
||||
author, then PC exits with the following exception:
|
||||
|
||||
NSRangeException: Index 1 is out of range 1 (in 'removeObjectAtIndex:')
|
||||
|
||||
- [sr #106614] ProjectCenter, document type extensions.
|
||||
In the project center project properties editor, if there are several
|
||||
extensions separated bya space, they should be encoded as element arrays
|
||||
|
||||
- [bug #25193] pc fails to load project from ImageViewer.pc.project.
|
||||
|
||||
- [bug #22815] ProjectCenter won't open a new project .
|
||||
[doesn't work for me]
|
||||
|
||||
- [bug #22411] font types in ProjectCenter Editor.
|
||||
|
||||
- [bug #22441] Usability: Project Center should have a separate project type
|
||||
for Renaissance based applications
|
||||
|
||||
- [bug #22124] ProjectCenter doesn't support extra entries in Plist.
|
||||
|
||||
- [bug #22008] Project Center should support more flexible directory
|
||||
configurations.
|
||||
|
||||
- [bug #22026] ProjectCenter should split up project file.
|
||||
|
||||
- [bug #11931] Build before launch on change.
|
||||
|
||||
- [bug #20858] UI components (editor, builder, launcher).
|
||||
The latest change fixes the initial problem but introduces a new one!
|
||||
|
||||
The new issue is that doesn't matter what I check or uncheck on the Interface
|
||||
Preferences the only thing that is shown is the Editor in the SplitView.
|
||||
It's reproducable every time, no matter what. All you need to do is check
|
||||
every option, so that only the browser will be shown, then uncheck random
|
||||
options.
|
||||
|
||||
On another note, but still related, when the Editor is shown (after being
|
||||
hidden by the preferences) it doesn't preserve it's previous size.
|
||||
|
||||
RELEASE CRTITICAL UNKNOWN BUGS:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
- ProjectBuilder's incorrectly parses output of gnustep-make (incorrect
|
||||
directories, incorrectly recognises initial point of error etc.).
|
||||
- Browser must be double checked for correct behaviour on browsing,
|
||||
file removal, opening editor (currently is bad).
|
||||
- It seems that changing subproject's attributes doesn't change 'edited'
|
||||
state of project window.
|
||||
- Removing files works bad (crashes, strange warnings, exceptions). Check it!
|
||||
Maybe this happens only in subprojects... It may be connected to browser's
|
||||
functionality.
|
||||
- PC tries to load internal editor for .gorm files. Fix it!!!
|
||||
- Setting localizable resources through inspector works bad. Double check it
|
||||
and fix!!! Also check this functionality when multiple files selected.
|
||||
- Double check support for "Resource Set" project type as subproject of
|
||||
existing projecttypes.
|
||||
-
|
||||
|
||||
WHISH LIST:
|
||||
~~~~~~~~~~
|
||||
+ Open panel with list of modified files on project close and project build.
|
||||
- Think about browser initial responder status: now very uncomfortable
|
||||
to find some file in browser list when editor is open.
|
||||
- "Project Attributes" for Application should be reviewed after split of
|
||||
"Application" to "Application" and "Renaissance" project types.
|
||||
- Add setting to preferences "Create template-based files on project creation".
|
||||
It should allow to switch off creation of .m, .h, .gorm files from templates.
|
339
Documentation/COPYING
Normal file
339
Documentation/COPYING
Normal file
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02111, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02111, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
2092
Documentation/ChangeLog-1
Normal file
2092
Documentation/ChangeLog-1
Normal file
File diff suppressed because it is too large
Load diff
18
Documentation/INSTALL
Normal file
18
Documentation/INSTALL
Normal file
|
@ -0,0 +1,18 @@
|
|||
Installation
|
||||
************
|
||||
|
||||
This file documents the installation of the GNUstep ProjectCenter application.
|
||||
|
||||
Installing `ProjectCenter'
|
||||
=========================
|
||||
|
||||
ProjectCenter requires GNUstep core to be installed. Make sure that you have
|
||||
the latest released version installed.
|
||||
|
||||
Here is the quick way of building and installing ProjectCenter:
|
||||
|
||||
cd ProjectCenter;
|
||||
make;
|
||||
make install;
|
||||
|
||||
By default ProjectCenter gets installed under GNUSTEP_SYSTEM_ROOT.
|
22
Documentation/README
Normal file
22
Documentation/README
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
ProjectCenter
|
||||
=============
|
||||
|
||||
This is ProjectCenter, the GNUstep IDE which is part of the GNUstep
|
||||
project and is copyrighted by the Free Softare Foundation. ProjectCenter
|
||||
is released under the GPL - see Documentation/COPYING for the details.
|
||||
|
||||
Further information can be found on the GNUstep site at www.gnustep.org
|
||||
on the ProjectCenter page
|
||||
|
||||
http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
For the installation instructions read the INSTALL file.
|
||||
For a list of upcoming and/or planned features read the TODO file.
|
||||
For a list of changes in released versions read the ANNOUNCE file.
|
||||
|
||||
The main author of ProjectCenter is Philippe C.D. Robert, current
|
||||
maintainer is Serg Stoyan, but others have contributed a lot to the
|
||||
current state of the project (see Documentatio/AUTHORS). Many of the
|
||||
icons have been created by Andrew Lindsay.
|
||||
|
24
Documentation/README.contributions
Normal file
24
Documentation/README.contributions
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
ProjectCenter Contributions
|
||||
===========================
|
||||
|
||||
Contributions are welcome! You can either send code diffs or new stuff to
|
||||
be added to the maintainer of ProjectCenter (<probert@siggraph.org>) or
|
||||
apply the change by yourself if you have write access to the CVS. If you
|
||||
plane to apply changes by yourself please consider to following rules:
|
||||
|
||||
- Major features will first have to be approved, please contact the
|
||||
maintainer beforehand! This is because we want to keep the project
|
||||
as much focused as possible and not because we do not trust you!
|
||||
|
||||
- If a feature is approved for a particular version it can be commited
|
||||
to the appropriate CVS branch, this might be HEAD or RELEASE_X_Y_Z.
|
||||
|
||||
- If a feature is not yet approved for a specific release it might go
|
||||
into the respective UNSTABLE_X_Y tree. Changes from this branch will
|
||||
then later be merged into HEAD, if it makes sense.
|
||||
|
||||
Remember, these rules are made to enhance the quality of the project and
|
||||
to be able to stick to our release plan! However if you think these
|
||||
rules have some weaknesses please let us know, so that we can discuss it!
|
||||
|
70
Documentation/SCHEME
Normal file
70
Documentation/SCHEME
Normal file
|
@ -0,0 +1,70 @@
|
|||
+- PCProjectInspector
|
||||
|
|
||||
+- PCLoadedFilesPanel
|
||||
|
|
||||
+- PCBuildPanel
|
||||
|
|
||||
+- PCLaunchPanel
|
||||
|
|
||||
+- [SI]PCFindPanel
|
||||
PCAppController-\ |
|
||||
| ----- PCProjectManager
|
||||
PCMenuController/ | ||
|
||||
| PCProject <PCAppProject, PCBundleProject>
|
||||
| |
|
||||
| +- PCProjectWindow
|
||||
| |
|
||||
| +- PCProjectBrowser
|
||||
| |
|
||||
| +- PCProjectLoadedFiles
|
||||
| |
|
||||
| +- PCProjectBuilder
|
||||
| |
|
||||
| +- PCProjectLauncher
|
||||
| |
|
||||
| +- [SI]PCProjectFinder
|
||||
| |
|
||||
| +- PCProjectEditor
|
||||
| ||
|
||||
| PCEditor
|
||||
| |
|
||||
| +- PCEditorView
|
||||
|
|
||||
PCTextFinder
|
||||
|
|
||||
PCFileManager
|
||||
|
|
||||
+- PCFileCreator
|
||||
|
||||
------------------------------
|
||||
Other (controls, tools, etc.):
|
||||
------------------------------
|
||||
PCButton
|
||||
PCSplitView
|
||||
PCOutputView (Should be implemented. Used by e.g. Project Builder)
|
||||
PCBundleLoader (Used in ProjectCenter application)
|
||||
PCMakefileFactory (Used in PC*Project bundles)
|
||||
PCServer (don't used)
|
||||
|
||||
----------
|
||||
THOUGHTS:
|
||||
----------
|
||||
- implement PCProjectFinder and PCFindPanel GUI;
|
||||
|
||||
- "Edit" menu should be completely provided by Editor part;
|
||||
- "Add Files" panel should provide selection of type and "Choose Folders"
|
||||
and "Add Class", "Add Header" and so on checkbox;
|
||||
- "New File in Project..." panel should provide "Create Header",
|
||||
"Create Class" and so on checkbox.
|
||||
- Add "Installable" or something to "Bundle" project type project attributes.
|
||||
|
||||
Localization:
|
||||
~~~~~~~~~~~~~
|
||||
- On project creation, all resources go to Resources subdir and placed into
|
||||
GNUmakefile as *_RESOURCE_FILES; [done!]
|
||||
- If some file from [PC*Proj localizableKeys] categories selected as
|
||||
"Localizable Resource", that file removed from *_RESOURCE_FILES and placed
|
||||
into *_LOCALIZED_RESOURCE_FILES (for directories: Resources->Language.lproj);
|
||||
- in PC.project add USER_LANGUAGES=(); [done!]
|
||||
- in PC.project add LOCALIZED_RESOURCES=(); [done!]
|
||||
|
118
Documentation/TODO
Normal file
118
Documentation/TODO
Normal file
|
@ -0,0 +1,118 @@
|
|||
TODO
|
||||
****
|
||||
|
||||
This is the GNUstep ProjectCenter TODO list.
|
||||
Feel free to propose changes to this list or make suggestions!
|
||||
|
||||
ProjectCenter 0.4 Owner/Status
|
||||
----------------- ------------
|
||||
|
||||
- Review and cleanup of PC project bundles/templates [done!]
|
||||
- Finish Project Inspector [done!]
|
||||
- Inspector UI using Gorm [done!]
|
||||
- File creation (File->New in project) cleanup and finishing [done!]
|
||||
- Initial suprojects support [done!]
|
||||
- Finish support of external editors [done!]
|
||||
- Preferences enhancements and UI using Gorm [done!]
|
||||
- Remember project windows and panels in PC.project [done!]
|
||||
|
||||
ProjectCenter 0.5
|
||||
-----------------
|
||||
|
||||
- Create ProjectWindow GORM file [done!]
|
||||
- Add "Framework" project type [done!]
|
||||
- Add "Resource Set" project type [done!]
|
||||
- Implement on demand loading of bundles [done!]
|
||||
- Localization support for projects [done!]
|
||||
- Finish save/restore size of split views in Project Window [done!]
|
||||
--- Project Editor:
|
||||
- Implement on demand loading (editor for file type) [done!]
|
||||
- Open some files read only (Supporting Files) [done!]
|
||||
- Implement code parser (get it from CodeEditor?) [done!]
|
||||
- Project Browser should show file structure. [done!]
|
||||
- Click on Browser item should move cursor to line in file [done!]
|
||||
--- Project Builder:
|
||||
- Create panel and builder GORM files [done!]
|
||||
- Implement root build directory handling [done!]
|
||||
- Finish options handling [done!]
|
||||
- Parse gcc output [95% done!]
|
||||
- Display warnings,errors,options etc. as clickable list [done!]
|
||||
- GNUstep make version 2.0 compliance [done!]
|
||||
- Save last used path separately for different file panels [done!]
|
||||
|
||||
ProjectCenter 0.6
|
||||
-----------------
|
||||
|
||||
- Create new Info panel [done!]
|
||||
- Implement support for integrated debugging [90% done]
|
||||
- change project type from file to bundle [done!] casamento/mottola
|
||||
- Finish FileNameIcon (draggable, files can be dragged to it) [done!]
|
||||
- More options for file creation [done!]
|
||||
- Review all situations when dialogs must be popped up [done!]
|
||||
- Check all textfields if 'scrollable' attribute set [done!]
|
||||
- Rewrite Preferences (3rd party sections etc.) [done!]
|
||||
--- Project Builder --------------------------------------------
|
||||
- Review build, compiler, linker options setting
|
||||
(Build Options, Inspector) [done!]
|
||||
- Finish parsing build output (compiler errors/warnings,
|
||||
make errors, gnustep-make verbose mode) stoyan
|
||||
- Finish interaction with Editor (errors, warnings) stoyan
|
||||
- Add support for running configurable(Build Options)
|
||||
command before and after make stoyan
|
||||
--- Project Editor ---------------------------------------------
|
||||
- review situations when editor is opened stoyan
|
||||
- implement go to line stoyan
|
||||
- Implement interaction with Builder (errors, warnings) stoyan
|
||||
- Implement indentation stoyan
|
||||
- implement undo inside editor [done!]
|
||||
- Add and use basic editor preferences (fonts, colors, sizes) [50% done]
|
||||
--- Project Inspector ------------------------------------------
|
||||
- Make sections as loadable bundles stoyan
|
||||
- Finish functionality of all sections stoyan
|
||||
- Review all sections for correct behaviour stoyan
|
||||
- Split "Application" to "Application GORM" and
|
||||
"Application Renaissance" project types stoyan
|
||||
- Add "Palette" project type ???
|
||||
- Add "Component" project type ???
|
||||
- Process reported bugs ???
|
||||
- Think about imlementing pending adding/removal of files ???
|
||||
- New icons. Need volunteers!!! ???
|
||||
|
||||
ProjectCenter 0.7
|
||||
-----------------
|
||||
|
||||
- Finish suppor of integrated debugging ???
|
||||
- Add support for browsing 'Library' category entries ???
|
||||
- Add support for non-project files ???
|
||||
- Implement symbols indexing. This feature touches Browser
|
||||
(class and method list) and Editor (autocompletion) ???
|
||||
- Editor: implement autocompletion ???
|
||||
- An initial project wide find feature ???
|
||||
- Better integration with other tools (GORM). DevKit? ???
|
||||
|
||||
ProjectCenter 0.8
|
||||
-----------------
|
||||
|
||||
- Implement code folding in Editor ???
|
||||
- Direct code documentation (using autogsdoc) ???
|
||||
- Think about adopting existing directory tree (more flexible
|
||||
directory configurations) [bug #22008] ???
|
||||
|
||||
ProjectCenter 0.9
|
||||
-----------------
|
||||
|
||||
- ProjectCenter localization ???
|
||||
- Initial user documentation ???
|
||||
- Implement Plist editor for editing project files[bug #22124] ???
|
||||
- An initial class browser/documentation feature ???
|
||||
|
||||
ProjectCenter 1.0
|
||||
-----------------
|
||||
|
||||
Version 1.0 is aimed at stabilising and optimising existing
|
||||
features. There will not be any new features since 0.9.
|
||||
|
||||
After 1.0
|
||||
---------
|
||||
- CVS/SVN integration ???
|
||||
|
34
English.lproj/FindPanel.gorm/data.classes
Normal file
34
English.lproj/FindPanel.gorm/data.classes
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"findNext:",
|
||||
"findNextAndOrderFindPanelOut:",
|
||||
"findPrevious:",
|
||||
"ignoreCase:",
|
||||
"replace:",
|
||||
"replaceAll:",
|
||||
"replaceAndFind:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
TextFinder = {
|
||||
Actions = (
|
||||
"findNext:",
|
||||
"findNextAndOrderFindPanelOut:",
|
||||
"findPrevious:",
|
||||
"replace:",
|
||||
"replaceAll:",
|
||||
"replaceAndFind:"
|
||||
);
|
||||
Outlets = (
|
||||
findNextButton,
|
||||
findTextField,
|
||||
ignoreCaseButton,
|
||||
replaceAllScopeMatrix,
|
||||
replaceTextField,
|
||||
statusField
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
English.lproj/FindPanel.gorm/data.info
Normal file
BIN
English.lproj/FindPanel.gorm/data.info
Normal file
Binary file not shown.
BIN
English.lproj/FindPanel.gorm/objects.gorm
Normal file
BIN
English.lproj/FindPanel.gorm/objects.gorm
Normal file
Binary file not shown.
BIN
English.lproj/Info.gorm/Info.tiff
Normal file
BIN
English.lproj/Info.gorm/Info.tiff
Normal file
Binary file not shown.
20
English.lproj/Info.gorm/data.classes
Normal file
20
English.lproj/Info.gorm/data.classes
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"showInfoWindow:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCInfoController = {
|
||||
Actions = (
|
||||
"showInfoWindow:"
|
||||
);
|
||||
Outlets = (
|
||||
infoWindow,
|
||||
versionField,
|
||||
copyrightField
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
English.lproj/Info.gorm/data.info
Normal file
BIN
English.lproj/Info.gorm/data.info
Normal file
Binary file not shown.
BIN
English.lproj/Info.gorm/objects.gorm
Normal file
BIN
English.lproj/Info.gorm/objects.gorm
Normal file
Binary file not shown.
73
English.lproj/Preferences.gorm/data.classes
Normal file
73
English.lproj/Preferences.gorm/data.classes
Normal file
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"setBuildTool:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCPrefController = {
|
||||
Actions = (
|
||||
"popupChanged:",
|
||||
"setSuccessSound:",
|
||||
"setFailureSound:",
|
||||
"setPromptOnClean:",
|
||||
"setKeepBackup:",
|
||||
"setSaveOnQuit:",
|
||||
"setSavePeriod:",
|
||||
"setDisplayPanels:",
|
||||
"setPromptWhenQuit:",
|
||||
"setDebugger:",
|
||||
"setEditor:",
|
||||
"setTabBehaviour:",
|
||||
"setTabSpaces:",
|
||||
"setRootBuildDir:",
|
||||
"setDeleteCache:",
|
||||
"setFullPathInFilePanels:",
|
||||
"setRememberWindows:",
|
||||
"setEditorSize:",
|
||||
"setDisplayLog:",
|
||||
"setBuildTool:"
|
||||
);
|
||||
Outlets = (
|
||||
panel,
|
||||
popupButton,
|
||||
sectionsView,
|
||||
buildingView,
|
||||
successField,
|
||||
setSuccessButton,
|
||||
failureField,
|
||||
setFailureButton,
|
||||
promptOnClean,
|
||||
savingView,
|
||||
keyBindingsView,
|
||||
miscView,
|
||||
saveOnQuit,
|
||||
keepBackup,
|
||||
autosaveSlider,
|
||||
autosaveField,
|
||||
separateBuilder,
|
||||
separateLauncher,
|
||||
separateEditor,
|
||||
separateLoadedFiles,
|
||||
promptWhenQuit,
|
||||
debuggerField,
|
||||
editorField,
|
||||
interfaceView,
|
||||
deleteCache,
|
||||
fullPathInFilePanels,
|
||||
rememberWindows,
|
||||
tabMatrix,
|
||||
tabSpacesField,
|
||||
rootBuildDirField,
|
||||
rootBuildDirButton,
|
||||
editorColumnsField,
|
||||
editorLinesField,
|
||||
displayLog,
|
||||
buildToolField,
|
||||
debuggerButton,
|
||||
buildToolButton
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
English.lproj/Preferences.gorm/data.info
Normal file
BIN
English.lproj/Preferences.gorm/data.info
Normal file
Binary file not shown.
BIN
English.lproj/Preferences.gorm/objects.gorm
Normal file
BIN
English.lproj/Preferences.gorm/objects.gorm
Normal file
Binary file not shown.
70
English.lproj/ProjectCenter.gorm/data.classes
Normal file
70
English.lproj/ProjectCenter.gorm/data.classes
Normal file
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"findEnterSelection:",
|
||||
"findJumpToSelection:",
|
||||
"findNext:",
|
||||
"findPrevious:",
|
||||
"findShowPanel:",
|
||||
"performGoToLinePanelAction:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCAppController = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
menuController
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCMenuController = {
|
||||
Actions = (
|
||||
"showInfoPanel:",
|
||||
"showPrefWindow:",
|
||||
"projectOpen:",
|
||||
"projectNew:",
|
||||
"projectSave:",
|
||||
"projectAddFiles:",
|
||||
"projectSaveFiles:",
|
||||
"projectRemoveFiles:",
|
||||
"subprojectNew:",
|
||||
"subprojectAdd:",
|
||||
"fileOpen:",
|
||||
"fileNew:",
|
||||
"fileSave:",
|
||||
"fileSaveAs:",
|
||||
"fileSaveTo:",
|
||||
"fileRevertToSaved:",
|
||||
"fileClose:",
|
||||
"fileOpenQuickly:",
|
||||
"fileRename:",
|
||||
"fileNewUntitled:",
|
||||
"showInspector:",
|
||||
"showBuildPanel:",
|
||||
"showLoadedFilesPanel:",
|
||||
"runTarget:",
|
||||
"executeBuild:",
|
||||
"stopBuild:",
|
||||
"startClean:",
|
||||
"showLaunchPanel:",
|
||||
"debugTarget:",
|
||||
"toggleToolbar:",
|
||||
"loadedFilesSortByTime:",
|
||||
"loadedFilesSortByName:",
|
||||
"loadedFilesNextFile:",
|
||||
"loadedFilesPreviousFile:",
|
||||
"showLogPanel:",
|
||||
"findEnterSelection:",
|
||||
"findNext:",
|
||||
"findPrevious:",
|
||||
"findShowPanel:",
|
||||
"findJumpToSelection:",
|
||||
"goToLine:"
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
English.lproj/ProjectCenter.gorm/data.info
Normal file
BIN
English.lproj/ProjectCenter.gorm/data.info
Normal file
Binary file not shown.
BIN
English.lproj/ProjectCenter.gorm/objects.gorm
Normal file
BIN
English.lproj/ProjectCenter.gorm/objects.gorm
Normal file
Binary file not shown.
41
Framework/English.lproj/BuildAttributes.gorm/data.classes
Normal file
41
Framework/English.lproj/BuildAttributes.gorm/data.classes
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"orderFrontFontPanel:",
|
||||
"searchOrderPopupDidChange:",
|
||||
"setSearchOrder:",
|
||||
"removeSearchOrder:",
|
||||
"addSearchOrder:",
|
||||
"changeCommonProjectEntry:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCProjectInspector = {
|
||||
Actions = (
|
||||
"searchOrderPopupDidChange:",
|
||||
"setSearchOrder:",
|
||||
"removeSearchOrder:",
|
||||
"addSearchOrder:",
|
||||
"changeCommonProjectEntry:"
|
||||
);
|
||||
Outlets = (
|
||||
buildAttributesView,
|
||||
projectNameLabel,
|
||||
searchOrderPopup,
|
||||
searchOrderList,
|
||||
searchOrderTF,
|
||||
searchOrderSet,
|
||||
searchOrderRemove,
|
||||
searchOrderAdd,
|
||||
cppOptField,
|
||||
objcOptField,
|
||||
cOptField,
|
||||
ldOptField,
|
||||
searchOrderScroll,
|
||||
searchOrderColumn,
|
||||
installDomainPopup
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/BuildAttributes.gorm/data.info
Normal file
BIN
Framework/English.lproj/BuildAttributes.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/BuildAttributes.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/BuildAttributes.gorm/objects.gorm
Normal file
Binary file not shown.
48
Framework/English.lproj/Builder.gorm/data.classes
Normal file
48
Framework/English.lproj/Builder.gorm/data.classes
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"showOptionsPanel:",
|
||||
"showFindView:",
|
||||
"showProjectBuild:",
|
||||
"showProjectInspector:",
|
||||
"showProjectLaunch:",
|
||||
"showProjectLoadedFiles:",
|
||||
"startBuild:",
|
||||
"startClean:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCButton = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSButton;
|
||||
};
|
||||
PCProjectBuilder = {
|
||||
Actions = (
|
||||
"startBuild:",
|
||||
"startClean:",
|
||||
"showOptionsPanel:"
|
||||
);
|
||||
Outlets = (
|
||||
buildButton,
|
||||
cleanButton,
|
||||
componentView,
|
||||
split,
|
||||
optionsButton,
|
||||
statusField,
|
||||
targetField,
|
||||
errorsCountField
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCSplitView = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSSplitView;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/Builder.gorm/data.info
Normal file
BIN
Framework/English.lproj/Builder.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/Builder.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/Builder.gorm/objects.gorm
Normal file
Binary file not shown.
26
Framework/English.lproj/BuilderOptions.gorm/data.classes
Normal file
26
Framework/English.lproj/BuilderOptions.gorm/data.classes
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"optionsButtonClicked:",
|
||||
"optionsPopupChanged:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCProjectBuilderOptions = {
|
||||
Actions = (
|
||||
"optionsPopupChanged:",
|
||||
"optionsButtonClicked:"
|
||||
);
|
||||
Outlets = (
|
||||
buildArgsField,
|
||||
debugButton,
|
||||
verboseButton,
|
||||
optionsPanel,
|
||||
stripButton,
|
||||
sharedLibsButton,
|
||||
targetPopup
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/BuilderOptions.gorm/data.info
Normal file
BIN
Framework/English.lproj/BuilderOptions.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/BuilderOptions.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/BuilderOptions.gorm/objects.gorm
Normal file
Binary file not shown.
37
Framework/English.lproj/BuilderPanel.gorm/data.classes
Normal file
37
Framework/English.lproj/BuilderPanel.gorm/data.classes
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"showProjectInspector:",
|
||||
"showFindView:",
|
||||
"showProjectBuild:",
|
||||
"showProjectLaunch:",
|
||||
"showProjectLoadedFiles:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCAuxiliaryWindow = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSWindow;
|
||||
};
|
||||
PCProjectBuilderPanel = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
contentBox,
|
||||
emptyBox,
|
||||
panel
|
||||
);
|
||||
Super = NSPanel;
|
||||
};
|
||||
PCSplitView = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSSplitView;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/BuilderPanel.gorm/data.info
Normal file
BIN
Framework/English.lproj/BuilderPanel.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/BuilderPanel.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/BuilderPanel.gorm/objects.gorm
Normal file
Binary file not shown.
39
Framework/English.lproj/FileAttributes.gorm/data.classes
Normal file
39
Framework/English.lproj/FileAttributes.gorm/data.classes
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"fileNameDidChange:",
|
||||
"setLocalizableResource:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCFileNameField = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSTextField;
|
||||
};
|
||||
PCFileNameIcon = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSImageView;
|
||||
};
|
||||
PCProjectInspector = {
|
||||
Actions = (
|
||||
"fileNameDidChange:",
|
||||
"setPublicHeader:",
|
||||
"setLocalizableResource:"
|
||||
);
|
||||
Outlets = (
|
||||
fileIconView,
|
||||
fileNameField,
|
||||
fileAttributesView,
|
||||
localizableButton,
|
||||
publicHeaderButton
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/FileAttributes.gorm/data.info
Normal file
BIN
Framework/English.lproj/FileAttributes.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/FileAttributes.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/FileAttributes.gorm/objects.gorm
Normal file
Binary file not shown.
12
Framework/English.lproj/LogPanel.gorm/data.classes
Normal file
12
Framework/English.lproj/LogPanel.gorm/data.classes
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
PCLogController = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
panel,
|
||||
textView
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/LogPanel.gorm/data.info
Normal file
BIN
Framework/English.lproj/LogPanel.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/LogPanel.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/LogPanel.gorm/objects.gorm
Normal file
Binary file not shown.
29
Framework/English.lproj/NewFile.gorm/data.classes
Normal file
29
Framework/English.lproj/NewFile.gorm/data.classes
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"closeNewFilePanel:",
|
||||
"createFile:",
|
||||
"newFilePopupChanged:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCFileCreator = {
|
||||
Actions = (
|
||||
"closeNewFilePanel:",
|
||||
"createFile:",
|
||||
"newFilePopupChanged:"
|
||||
);
|
||||
Outlets = (
|
||||
newFilePanel,
|
||||
nfImage,
|
||||
nfTypePB,
|
||||
nfDescriptionTV,
|
||||
nfNameField,
|
||||
nfCancelButton,
|
||||
nfCreateButton,
|
||||
nfAddHeaderButton
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/NewFile.gorm/data.info
Normal file
BIN
Framework/English.lproj/NewFile.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/NewFile.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/NewFile.gorm/objects.gorm
Normal file
Binary file not shown.
28
Framework/English.lproj/NewSubproject.gorm/data.classes
Normal file
28
Framework/English.lproj/NewSubproject.gorm/data.classes
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"orderFrontFontPanel:",
|
||||
"closeNewSubprojectPanel:",
|
||||
"createSubproject:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCProjectManager = {
|
||||
Actions = (
|
||||
"closeNewSubprojectPanel:",
|
||||
"createSubproject:"
|
||||
);
|
||||
Outlets = (
|
||||
nsPanel,
|
||||
nsImage,
|
||||
nsTitle,
|
||||
nsNameField,
|
||||
nsTypePB,
|
||||
nsCancelButton,
|
||||
nsCreateButton,
|
||||
projectNameField
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/NewSubproject.gorm/data.info
Normal file
BIN
Framework/English.lproj/NewSubproject.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/NewSubproject.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/NewSubproject.gorm/objects.gorm
Normal file
Binary file not shown.
21
Framework/English.lproj/ProjectAttributes.gorm/data.classes
Normal file
21
Framework/English.lproj/ProjectAttributes.gorm/data.classes
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"setCurrentLanguage:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCProjectInspector = {
|
||||
Actions = (
|
||||
"setCurrentLanguage:"
|
||||
);
|
||||
Outlets = (
|
||||
projectTypeField,
|
||||
projectAttributesView,
|
||||
projectLanguagePB,
|
||||
projectNameField
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/ProjectAttributes.gorm/data.info
Normal file
BIN
Framework/English.lproj/ProjectAttributes.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/ProjectAttributes.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/ProjectAttributes.gorm/objects.gorm
Normal file
Binary file not shown.
37
Framework/English.lproj/ProjectDescription.gorm/data.classes
Normal file
37
Framework/English.lproj/ProjectDescription.gorm/data.classes
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"orderFrontFontPanel:",
|
||||
"addAuthor:",
|
||||
"removeAuthor:",
|
||||
"upAuthor:",
|
||||
"downAuthor:",
|
||||
"changeCommonProjectEntry:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCProjectInspector = {
|
||||
Actions = (
|
||||
"addAuthor:",
|
||||
"removeAuthor:",
|
||||
"upAuthor:",
|
||||
"downAuthor:",
|
||||
"changeCommonProjectEntry:"
|
||||
);
|
||||
Outlets = (
|
||||
descriptionField,
|
||||
releaseField,
|
||||
licenseField,
|
||||
licDescriptionField,
|
||||
urlField,
|
||||
authorsScroll,
|
||||
authorAdd,
|
||||
authorRemove,
|
||||
authorUp,
|
||||
authorDown,
|
||||
projectDescriptionView
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/ProjectDescription.gorm/data.info
Normal file
BIN
Framework/English.lproj/ProjectDescription.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/ProjectDescription.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/ProjectDescription.gorm/objects.gorm
Normal file
Binary file not shown.
22
Framework/English.lproj/ProjectInspector.gorm/data.classes
Normal file
22
Framework/English.lproj/ProjectInspector.gorm/data.classes
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"orderFrontFontPanel:",
|
||||
"inspectorPopupDidChange:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCProjectInspector = {
|
||||
Actions = (
|
||||
"inspectorPopupDidChange:"
|
||||
);
|
||||
Outlets = (
|
||||
inspectorPanel,
|
||||
inspectorPopup,
|
||||
inspectorView,
|
||||
contentView
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/ProjectInspector.gorm/data.info
Normal file
BIN
Framework/English.lproj/ProjectInspector.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/ProjectInspector.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/ProjectInspector.gorm/objects.gorm
Normal file
Binary file not shown.
22
Framework/English.lproj/ProjectLanguages.gorm/data.classes
Normal file
22
Framework/English.lproj/ProjectLanguages.gorm/data.classes
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"addLanguage:",
|
||||
"removeLanguage:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCProjectInspector = {
|
||||
Actions = (
|
||||
"addLanguage:",
|
||||
"removeLanguage:"
|
||||
);
|
||||
Outlets = (
|
||||
projectLanguagesView,
|
||||
languagesList,
|
||||
newLanguage
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/ProjectLanguages.gorm/data.info
Normal file
BIN
Framework/English.lproj/ProjectLanguages.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/ProjectLanguages.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/ProjectLanguages.gorm/objects.gorm
Normal file
Binary file not shown.
64
Framework/English.lproj/ProjectWindow.gorm/data.classes
Normal file
64
Framework/English.lproj/ProjectWindow.gorm/data.classes
Normal file
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"showProjectInspector:",
|
||||
"showFindView:",
|
||||
"showProjectBuild:",
|
||||
"showProjectLaunch:",
|
||||
"showProjectLoadedFiles:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCButton = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSButton;
|
||||
};
|
||||
PCFileNameField = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSTextField;
|
||||
};
|
||||
PCFileNameIcon = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSImageView;
|
||||
};
|
||||
PCProjectWindow = {
|
||||
Actions = (
|
||||
"showProjectInspector:",
|
||||
"showFindView:",
|
||||
"showProjectBuild:",
|
||||
"showProjectLaunch:",
|
||||
"showProjectLoadedFiles:"
|
||||
);
|
||||
Outlets = (
|
||||
buildButton,
|
||||
fileIcon,
|
||||
fileIconTitle,
|
||||
findButton,
|
||||
h_split,
|
||||
inspectorButton,
|
||||
launchButton,
|
||||
loadedFilesButton,
|
||||
projectWindow,
|
||||
statusLine,
|
||||
toolbarView
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCSplitView = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSSplitView;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/ProjectWindow.gorm/data.info
Normal file
BIN
Framework/English.lproj/ProjectWindow.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/ProjectWindow.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/ProjectWindow.gorm/objects.gorm
Normal file
Binary file not shown.
BIN
Framework/English.lproj/SaveModified.gorm/ProjectCenter.tiff
Normal file
BIN
Framework/English.lproj/SaveModified.gorm/ProjectCenter.tiff
Normal file
Binary file not shown.
29
Framework/English.lproj/SaveModified.gorm/data.classes
Normal file
29
Framework/English.lproj/SaveModified.gorm/data.classes
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"buttonClicked:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCAuxiliaryWindow = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSWindow;
|
||||
};
|
||||
SaveModifiedFilesDelegate = {
|
||||
Actions = (
|
||||
"buttonClicked:"
|
||||
);
|
||||
Outlets = (
|
||||
alternateButton,
|
||||
defaultButton,
|
||||
panel,
|
||||
otherButton,
|
||||
filesList
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/SaveModified.gorm/data.info
Normal file
BIN
Framework/English.lproj/SaveModified.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/SaveModified.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/SaveModified.gorm/objects.gorm
Normal file
Binary file not shown.
138
Framework/GNUmakefile
Normal file
138
Framework/GNUmakefile
Normal file
|
@ -0,0 +1,138 @@
|
|||
#
|
||||
# GNUmakefile - Generated by ProjectCenter
|
||||
#
|
||||
PACKAGE_NAME = ProjectCenter
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
#
|
||||
# Framework
|
||||
#
|
||||
VERSION = 0.7.0
|
||||
FRAMEWORK_NAME = ProjectCenter
|
||||
ProjectCenter_CURRENT_VERSION_NAME = 0.7.0
|
||||
ProjectCenter_DEPLOY_WITH_CURRENT_VERSION = yes
|
||||
ProjectCenter_HEADER_FILES_DIR = ../Headers/ProjectCenter
|
||||
|
||||
ProjectCenter_LIBRARIES_DEPEND_UPON += $(OBJC_LIBS) $(FND_LIBS) $(GUI_LIBS)
|
||||
|
||||
#
|
||||
# Subprojects
|
||||
#
|
||||
#SUBPROJECTS = Resources
|
||||
|
||||
#
|
||||
# Header files
|
||||
#
|
||||
ProjectCenter_HEADER_FILES = \
|
||||
PCDefines.h \
|
||||
ProjectCenter.h \
|
||||
\
|
||||
PCBundleManager.h \
|
||||
PCEditorManager.h \
|
||||
PCFileManager.h \
|
||||
PCAddFilesPanel.h \
|
||||
PCFileCreator.h \
|
||||
PCMakefileFactory.h \
|
||||
PCSaveModified.h \
|
||||
\
|
||||
PCProjectManager.h \
|
||||
PCProject.h \
|
||||
PCProjectWindow.h \
|
||||
PCProjectInspector.h \
|
||||
PCProjectBuilder.h \
|
||||
PCProjectBuilderOptions.h \
|
||||
PCProjectBuilderPanel.h \
|
||||
PCProjectLauncher.h \
|
||||
PCProjectLauncherPanel.h \
|
||||
PCProjectEditor.h \
|
||||
\
|
||||
PCProjectBrowser.h \
|
||||
PCProjectLoadedFiles.h \
|
||||
PCProjectLoadedFilesPanel.h \
|
||||
\
|
||||
PCFileNameField.h \
|
||||
PCFileNameIcon.h \
|
||||
\
|
||||
PCLogController.h \
|
||||
\
|
||||
PCAuxiliaryWindow.h
|
||||
|
||||
#
|
||||
# Class files
|
||||
#
|
||||
|
||||
ProjectCenter_OBJC_FILES = \
|
||||
PCBundleManager.m \
|
||||
PCEditorManager.m \
|
||||
PCMakefileFactory.m \
|
||||
PCFileManager.m \
|
||||
PCAddFilesPanel.m \
|
||||
PCFileCreator.m \
|
||||
PCSaveModified.m \
|
||||
\
|
||||
PCProjectManager.m \
|
||||
PCProject.m \
|
||||
PCProjectWindow.m \
|
||||
PCProjectInspector.m \
|
||||
PCProjectBuilder.m \
|
||||
PCProjectBuilderOptions.m \
|
||||
PCProjectBuilderPanel.m \
|
||||
PCProjectLauncher.m \
|
||||
PCProjectLauncherPanel.m \
|
||||
PCProjectEditor.m \
|
||||
\
|
||||
PCProjectBrowser.m \
|
||||
PCProjectLoadedFiles.m \
|
||||
PCProjectLoadedFilesPanel.m \
|
||||
\
|
||||
PCButton.m \
|
||||
PCFileNameField.m \
|
||||
PCFileNameIcon.m \
|
||||
\
|
||||
PCLogController.m \
|
||||
\
|
||||
PCAuxiliaryWindow.m
|
||||
|
||||
#
|
||||
# Resources
|
||||
#
|
||||
ProjectCenter_RESOURCE_FILES = \
|
||||
Resources/cfile.template \
|
||||
Resources/cheader.template \
|
||||
Resources/class.template \
|
||||
Resources/gsmarkup.template \
|
||||
Resources/header.template \
|
||||
Resources/postamble.template \
|
||||
Resources/protocol.template \
|
||||
Resources/ocppclass.template \
|
||||
|
||||
#
|
||||
# Localization
|
||||
#
|
||||
ProjectCenter_LOCALIZED_RESOURCE_FILES = \
|
||||
ProjectWindow.gorm \
|
||||
BuilderPanel.gorm \
|
||||
Builder.gorm \
|
||||
BuilderOptions.gorm \
|
||||
NewSubproject.gorm \
|
||||
NewFile.gorm \
|
||||
ProjectInspector.gorm \
|
||||
BuildAttributes.gorm \
|
||||
ProjectAttributes.gorm \
|
||||
ProjectDescription.gorm \
|
||||
ProjectLanguages.gorm \
|
||||
FileAttributes.gorm \
|
||||
LogPanel.gorm \
|
||||
SaveModified.gorm
|
||||
|
||||
|
||||
ProjectCenter_LANGUAGES = \
|
||||
English
|
||||
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/framework.make
|
||||
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
||||
|
||||
-include GNUmakefile.postamble
|
|
@ -1,11 +1,11 @@
|
|||
#
|
||||
# Makefile.postamble
|
||||
# GNUmakefile.postamble
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
#
|
||||
# Original Author: Scott Christley <scottc@net-community.com>
|
||||
# Author: Philippe C.D. Robert <probert@siggraph.org>
|
||||
#
|
||||
# This file is part of the GNUstep ProjectCenter.
|
||||
# This file is part of GNUstep
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
|
@ -17,14 +17,20 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# If you are interested in a warranty or support for this source code,
|
||||
# contact Scott Christley at scottc@net-community.com
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; see the file COPYING.LIB.
|
||||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# 31 Milk Street #960789 Boston, MA 02196 USAA.
|
||||
|
||||
#before-all::
|
||||
# cd ..;rm -f ProjectCenter;$(LN_S) Library ProjectCenter
|
||||
|
||||
#after-clean::
|
||||
# rm -f ../ProjectCenter
|
||||
|
||||
#after-uninstall::
|
||||
# rm -rf $(GNUSTEP_LIBRARIES)/libProjectCenter*
|
||||
|
||||
#after-install::
|
||||
# cp -r Protocols $(GNUSTEP_HEADERS)/ProjectCenter
|
||||
# cp -r Widgets $(GNUSTEP_HEADERS)/ProjectCenter
|
|
@ -1,11 +1,10 @@
|
|||
# GNUmakefile.preamble
|
||||
#
|
||||
# Makefile.preamble
|
||||
# Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
# Author: Philippe C.D. Robert <probert@siggraph.org>
|
||||
#
|
||||
# Original Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# This file is part of the GNUstep ProjectCenter.
|
||||
# This file is part of GNUstep
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
|
@ -23,7 +22,7 @@
|
|||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; see the file COPYING.LIB.
|
||||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# 31 Milk Street #960789 Boston, MA 02196 USAA.
|
||||
|
||||
#
|
||||
# Makefile.preamble
|
||||
|
@ -34,28 +33,34 @@
|
|||
# be put into Makefile.postamble.
|
||||
#
|
||||
|
||||
# FIXME: Why are we hardcoding the full path to 'make' or 'gdb' in
|
||||
# here ? Can't we discover them at runtime ?
|
||||
GMAKE := $(shell which ${MAKE})
|
||||
GDB := $(shell which gdb)
|
||||
|
||||
#
|
||||
# Flags dealing with compiling and linking
|
||||
#
|
||||
|
||||
# Additional flags to pass to the preprocessor
|
||||
ADDITIONAL_CPPFLAGS +=
|
||||
ADDITIONAL_CPPFLAGS +=
|
||||
|
||||
# Additional flags to pass to the Objective-C compiler
|
||||
ADDITIONAL_OBJCFLAGS +=
|
||||
ADDITIONAL_OBJCFLAGS += -DDEVELOPMENT\
|
||||
-DPCDefaultBuildTool=@"\"$(GMAKE)\"" \
|
||||
-DPCDefaultDebugger=@"\"$(GDB)\""
|
||||
|
||||
# Additional flags to pass to the C compiler
|
||||
ADDITIONAL_CFLAGS +=
|
||||
#ADDITIONAL_CFLAGS +=
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS +=
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../ -I../Headers
|
||||
|
||||
# Additional LDFLAGS to pass to the linker
|
||||
ADDITIONAL_LDFLAGS +=
|
||||
|
||||
# Additional library directories the linker should search
|
||||
ADDITIONAL_LIB_DIRS +=
|
||||
ADDITIONAL_LIB_DIRS += -L../ProjectCenter/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
ADDITIONAL_TOOL_LIBS +=
|
||||
|
||||
|
@ -64,8 +69,10 @@ ADDITIONAL_TOOL_LIBS +=
|
|||
#
|
||||
|
||||
# Additional directories to be created during installation
|
||||
ADDITIONAL_INSTALL_DIRS +=
|
||||
ADDITIONAL_INSTALL_DIRS +=
|
||||
|
||||
#
|
||||
# Local configuration
|
||||
#
|
||||
|
||||
|
116
Framework/PCAddFilesPanel.m
Normal file
116
Framework/PCAddFilesPanel.m
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2004-2014 Free Software Foundation
|
||||
|
||||
Authors: Serg Stoyan
|
||||
Riccardo Mottola
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
#import <ProjectCenter/PCAddFilesPanel.h>
|
||||
|
||||
static PCAddFilesPanel *addFilesPanel = nil;
|
||||
|
||||
@implementation PCAddFilesPanel
|
||||
|
||||
+ (PCAddFilesPanel *)addFilesPanel
|
||||
{
|
||||
if (addFilesPanel == nil)
|
||||
{
|
||||
addFilesPanel = [[self alloc] init];
|
||||
}
|
||||
|
||||
return addFilesPanel;
|
||||
}
|
||||
|
||||
// --- "Add Files..." panel
|
||||
- (id)init
|
||||
{
|
||||
NSRect fr;
|
||||
|
||||
self = [super init];
|
||||
|
||||
fr = NSMakeRect(20,30,160,21);
|
||||
|
||||
// File type popup
|
||||
fileTypePopup = [[NSPopUpButton alloc] initWithFrame:fr pullsDown:NO];
|
||||
[fileTypePopup setRefusesFirstResponder:YES];
|
||||
[fileTypePopup setAutoenablesItems:NO];
|
||||
[fileTypePopup setTarget:self];
|
||||
[fileTypePopup setAction:@selector(filesForAddPopupClicked:)];
|
||||
[fileTypePopup selectItemAtIndex:0];
|
||||
|
||||
fileTypeAccessaryView = [[NSBox alloc] init];
|
||||
[fileTypeAccessaryView setTitle:@"File Types"];
|
||||
[fileTypeAccessaryView setTitlePosition:NSAtTop];
|
||||
[fileTypeAccessaryView setBorderType:NSGrooveBorder];
|
||||
[fileTypeAccessaryView addSubview:fileTypePopup];
|
||||
[fileTypeAccessaryView sizeToFit];
|
||||
[fileTypeAccessaryView setAutoresizingMask:NSViewMinXMargin
|
||||
| NSViewMaxXMargin];
|
||||
|
||||
// Panel
|
||||
[self setAllowsMultipleSelection:YES];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setCategories:(NSArray *)categories
|
||||
{
|
||||
[fileTypePopup removeAllItems];
|
||||
[fileTypePopup addItemsWithTitles:categories];
|
||||
}
|
||||
|
||||
- (void)selectCategory:(NSString *)category
|
||||
{
|
||||
[self setAccessoryView:fileTypeAccessaryView];
|
||||
[fileTypePopup selectItemWithTitle:category];
|
||||
[self filesForAddPopupClicked:self];
|
||||
}
|
||||
|
||||
- (NSString *)selectedCategory
|
||||
{
|
||||
return [fileTypePopup titleOfSelectedItem];
|
||||
}
|
||||
|
||||
- (void)setFileTypes:(NSArray *)fileTypes
|
||||
{
|
||||
NSString *path = nil;
|
||||
|
||||
[super setAllowedFileTypes: fileTypes];
|
||||
|
||||
path = [_browser path];
|
||||
[self validateVisibleColumns];
|
||||
[_browser setPath:path];
|
||||
|
||||
[self display];
|
||||
}
|
||||
|
||||
- (void)filesForAddPopupClicked:(id)sender
|
||||
{
|
||||
NSString *category = [fileTypePopup titleOfSelectedItem];
|
||||
|
||||
if ([[self delegate] respondsToSelector:@selector(categoryChangedTo:)])
|
||||
{
|
||||
[[self delegate] categoryChangedTo:category];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
33
Framework/PCAuxiliaryWindow.m
Normal file
33
Framework/PCAuxiliaryWindow.m
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
PCAuxiliaryWindow.m
|
||||
|
||||
Author: German A. Arias <germanandre@gmx.es>
|
||||
Date: September 2013
|
||||
|
||||
This file is part of ProjectCenter.
|
||||
|
||||
ProjectCenter is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCAuxiliaryWindow.h>
|
||||
|
||||
@implementation PCAuxiliaryWindow
|
||||
|
||||
- (BOOL) canBecomeMainWindow
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
421
Framework/PCBundleManager.m
Normal file
421
Framework/PCBundleManager.m
Normal file
|
@ -0,0 +1,421 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2000-2004 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
// TODO: Finish support for third party bundles.
|
||||
// It involves support for user defined bundle directories
|
||||
// through preferences. Now supported are:
|
||||
// - PC application resource dir
|
||||
// (GNUSTEP_SYSTEM_APPS/ProjectCenter.app/Resources)
|
||||
// - GNUSTEP_SYSTEM_LIBRARY/Bundles/ProjectCenter
|
||||
// (NSApplicationSupportDirectory)
|
||||
|
||||
#import <ProjectCenter/PCBundleManager.h>
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
|
||||
@implementation PCBundleManager
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Init and free methods
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
loadedBundles = [[NSMutableDictionary alloc] init];
|
||||
bundlesInfo = [[NSMutableDictionary alloc] init];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
RELEASE(loadedBundles);
|
||||
RELEASE(bundlesInfo);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//
|
||||
- (NSString *)resourcePath
|
||||
{
|
||||
NSString *path = [[NSBundle mainBundle] resourcePath];
|
||||
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:path])
|
||||
{
|
||||
[NSException raise:@"PCBundleManagerPathException"
|
||||
format:@"ProjectCenter installed incorrectly"];
|
||||
return nil;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
// --- Handling of bundles' Info.table dictionaries without actual
|
||||
// --- bundles loading
|
||||
|
||||
// bundlesInfo is a dictionary. key/value pair is the following:
|
||||
// (NSString *) (NSDictionary *)
|
||||
// "full path of a bundle" = "Info.table contents"
|
||||
- (NSDictionary *)infoForBundlesType:(NSString *)extension
|
||||
{
|
||||
NSArray *bundles;
|
||||
NSEnumerator *enumerator;
|
||||
NSString *bundlePath;
|
||||
NSString *infoTablePath;
|
||||
NSDictionary *infoTable;
|
||||
NSMutableDictionary *reqBundlesInfo;
|
||||
|
||||
reqBundlesInfo = [NSMutableDictionary dictionary];
|
||||
bundles = [NSBundle pathsForResourcesOfType:extension
|
||||
inDirectory:[self resourcePath]];
|
||||
enumerator = [bundles objectEnumerator];
|
||||
|
||||
while ((bundlePath = [enumerator nextObject]))
|
||||
{
|
||||
infoTablePath = [NSString
|
||||
stringWithFormat:@"%@/Resources/Info.table", bundlePath];
|
||||
// TODO: fill 'reqBundlesInfo' with element from 'bundlesInfo' if
|
||||
// exists
|
||||
infoTable = [NSDictionary dictionaryWithContentsOfFile:infoTablePath];
|
||||
[reqBundlesInfo setObject:infoTable forKey:bundlePath];
|
||||
[bundlesInfo setObject:infoTable forKey:bundlePath];
|
||||
}
|
||||
|
||||
return reqBundlesInfo;
|
||||
}
|
||||
|
||||
// Key value can be checked against NSString and NSArray values only.
|
||||
- (NSDictionary *)infoForBundleType:(NSString *)extension
|
||||
keyName:(NSString *)key
|
||||
keyContains:(NSString *)value
|
||||
{
|
||||
NSDictionary *reqBundlesInfo;
|
||||
NSEnumerator *enumerator;
|
||||
NSString *bundlePath;
|
||||
id keyValue;
|
||||
NSDictionary *infoTable;
|
||||
|
||||
if (extension == nil)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
reqBundlesInfo = [self infoForBundlesType:extension];
|
||||
enumerator = [[reqBundlesInfo allKeys] objectEnumerator];
|
||||
|
||||
infoTable = nil;
|
||||
while ((bundlePath = [enumerator nextObject]))
|
||||
{
|
||||
infoTable = [reqBundlesInfo objectForKey:bundlePath];
|
||||
|
||||
if (key == nil || value == nil)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
keyValue = [infoTable objectForKey:key];
|
||||
|
||||
if ([keyValue isKindOfClass:[NSString class]] &&
|
||||
[keyValue isEqualToString:value])
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if ([keyValue isKindOfClass:[NSArray class]] &&
|
||||
[keyValue containsObject:value])
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
infoTable = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return infoTable;
|
||||
}
|
||||
|
||||
- (NSDictionary *)infoForBundleName:(NSString *)name
|
||||
type:(NSString *)type
|
||||
{
|
||||
NSDictionary *reqBundlesInfo = [self infoForBundlesType:type];
|
||||
NSEnumerator *enumerator = [[reqBundlesInfo allKeys] objectEnumerator];
|
||||
NSString *bundlePath;
|
||||
NSDictionary *infoTable;
|
||||
|
||||
infoTable = nil;
|
||||
while ((bundlePath = [enumerator nextObject]))
|
||||
{
|
||||
infoTable = [reqBundlesInfo objectForKey:bundlePath];
|
||||
if ([[infoTable objectForKey:@"Name"] isEqualToString:name])
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
infoTable = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return infoTable;
|
||||
}
|
||||
|
||||
- (NSString *)classNameForBundleType:(NSString*)type
|
||||
fileName:(NSString *)fileName
|
||||
{
|
||||
NSString *fileExtension = [fileName pathExtension];
|
||||
NSDictionary *infoTable = nil;
|
||||
NSString *className = nil;
|
||||
|
||||
infoTable = [self infoForBundleType:type
|
||||
keyName:@"FileTypes"
|
||||
keyContains:fileExtension];
|
||||
|
||||
className = [infoTable objectForKey:@"PrincipalClassName"];
|
||||
|
||||
return className;
|
||||
}
|
||||
|
||||
- (NSString *)bundlePathWithName:(NSString *)bundleName
|
||||
{
|
||||
NSArray *bundlePaths = nil;
|
||||
NSString *bundleFullPath = nil;
|
||||
NSEnumerator *enumerator = nil;
|
||||
|
||||
// Search for bundle full path in bundlesInfo dictionary
|
||||
bundlePaths = [bundlesInfo allKeys];
|
||||
enumerator = [bundlePaths objectEnumerator];
|
||||
|
||||
// NSLog(@"Bundle fullpath method #1: %@",
|
||||
// [[self resourcePath] stringByAppendingPathComponent:bundleName]);
|
||||
|
||||
while ((bundleFullPath = [enumerator nextObject]))
|
||||
{
|
||||
if ([[bundleFullPath lastPathComponent] isEqualToString:bundleName])
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// NSLog(@"Bundle fullpath method #2: %@", bundleFullPath);
|
||||
|
||||
return bundleFullPath;
|
||||
}
|
||||
|
||||
// --- Invokes loading of bundle
|
||||
|
||||
- (id)objectForClassName:(NSString *)className
|
||||
bundleType:(NSString *)bundleExtension
|
||||
protocol:(Protocol *)proto
|
||||
{
|
||||
Class objectClass;
|
||||
|
||||
if (!className)
|
||||
{
|
||||
NSLog(@"Bundle for class called with empty className");
|
||||
return nil;
|
||||
}
|
||||
|
||||
if ([self bundleOfType:bundleExtension withClassName:className] == nil)
|
||||
{
|
||||
NSLog(@"Bundle for class %@ NOT FOUND!", className);
|
||||
return nil;
|
||||
}
|
||||
|
||||
objectClass = NSClassFromString(className);
|
||||
|
||||
if (proto != nil && ![objectClass conformsToProtocol:proto])
|
||||
{
|
||||
[NSException raise:NOT_A_PROJECT_TYPE_EXCEPTION
|
||||
format:@"%@ does not conform to protocol!", className];
|
||||
return nil;
|
||||
}
|
||||
|
||||
return [[objectClass alloc] init];
|
||||
}
|
||||
|
||||
- (id)objectForBundleWithName:(NSString *)name
|
||||
type:(NSString *)extension
|
||||
protocol:(Protocol *)proto
|
||||
{
|
||||
NSDictionary *infoTable;
|
||||
NSString *className;
|
||||
|
||||
infoTable = [self infoForBundleName:name type:extension];
|
||||
className = [infoTable objectForKey:@"PrincipalClassName"];
|
||||
|
||||
return [self objectForClassName:className
|
||||
bundleType:extension
|
||||
protocol:proto];
|
||||
}
|
||||
|
||||
- (id)objectForBundleType:(NSString *)extension
|
||||
protocol:(Protocol *)proto
|
||||
fileName:(NSString *)fileName
|
||||
{
|
||||
NSString *className;
|
||||
|
||||
className = [self classNameForBundleType:extension fileName:fileName];
|
||||
|
||||
return [self objectForClassName:className
|
||||
bundleType:extension
|
||||
protocol:proto];
|
||||
}
|
||||
|
||||
// --- Bundle loading
|
||||
|
||||
- (NSBundle *)bundleOfType:(NSString *)type
|
||||
withClassName:(NSString *)className
|
||||
{
|
||||
NSArray *bundlePaths = nil;
|
||||
NSString *bundleFullPath = nil;
|
||||
NSDictionary *infoTable = nil;
|
||||
NSEnumerator *enumerator = nil;
|
||||
NSString *bundleName = nil;
|
||||
NSString *principalClass;
|
||||
|
||||
// Search for bundle full path in bundlesInfo dictionary
|
||||
bundlePaths = [bundlesInfo allKeys];
|
||||
enumerator = [bundlePaths objectEnumerator];
|
||||
|
||||
while ((bundleFullPath = [enumerator nextObject]))
|
||||
{
|
||||
|
||||
if ([[bundleFullPath pathExtension] isEqualToString:type])
|
||||
{
|
||||
infoTable = [bundlesInfo objectForKey:bundleFullPath];
|
||||
principalClass = [infoTable objectForKey:@"PrincipalClassName"];
|
||||
if ([className isEqualToString:principalClass])
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NSLog(@"bundleForClassName: %@ path %@", className, bundleFullPath);
|
||||
|
||||
// Extract from full bundle path it's name and extension
|
||||
bundleName = [bundleFullPath lastPathComponent];
|
||||
if (![self loadBundleIfNeededWithName:bundleName])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
return [loadedBundles objectForKey:bundleFullPath];
|
||||
}
|
||||
|
||||
- (BOOL)loadBundleIfNeededWithName:(NSString *)bundleName
|
||||
{
|
||||
NSString *bundleFullPath = [self bundlePathWithName:bundleName];
|
||||
|
||||
// Check if bundle allready loaded
|
||||
if ([[loadedBundles allKeys] containsObject:bundleFullPath] == NO)
|
||||
{
|
||||
return [self loadBundleWithFullPath:bundleFullPath];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)loadBundlesWithExtension:(NSString *)extension
|
||||
{
|
||||
NSEnumerator *enumerator;
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
BOOL isDir;
|
||||
NSString *path = [self resourcePath];
|
||||
|
||||
if (path)
|
||||
{
|
||||
[self loadBundlesAtPath:path withExtension:extension];
|
||||
}
|
||||
|
||||
// Load third party bundles
|
||||
enumerator = [NSSearchPathForDirectoriesInDomains
|
||||
(NSApplicationSupportDirectory, NSAllDomainsMask, YES)
|
||||
objectEnumerator];
|
||||
while ((path = [enumerator nextObject]) != nil)
|
||||
{
|
||||
path = [path stringByAppendingPathComponent:@"ProjectCenter"];
|
||||
|
||||
if ([fileManager fileExistsAtPath:path isDirectory:&isDir] && isDir)
|
||||
{
|
||||
PCLogInfo(self, @"Loading bundles at %@", path);
|
||||
[self loadBundlesAtPath:path withExtension:extension];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadBundlesAtPath:(NSString *)path withExtension:(NSString *)extension
|
||||
{
|
||||
NSEnumerator *enumerator;
|
||||
NSString *bundleName;
|
||||
NSArray *dir;
|
||||
|
||||
dir = [[NSFileManager defaultManager] directoryContentsAtPath:path];
|
||||
enumerator = [dir objectEnumerator];
|
||||
|
||||
while ((bundleName = [enumerator nextObject]))
|
||||
{
|
||||
if ([[bundleName pathExtension] isEqualToString:extension])
|
||||
{
|
||||
NSString *fullPath = nil;
|
||||
|
||||
fullPath = [NSString stringWithFormat:@"%@/%@", path, bundleName];
|
||||
|
||||
[self loadBundleWithFullPath:fullPath];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)loadBundleWithFullPath:(NSString *)path
|
||||
{
|
||||
NSBundle *bundle = nil;
|
||||
|
||||
if ((bundle = [NSBundle bundleWithPath:path]) && [bundle load])
|
||||
{
|
||||
[loadedBundles setObject:bundle forKey:path];
|
||||
|
||||
PCLogInfo(self, @"Bundle %@ successfully loaded!", path);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSRunAlertPanel(@"Load Bundle",
|
||||
@"Could not load bundle %@!",
|
||||
@"OK", nil, nil, path);
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSDictionary *)loadedBundles
|
||||
{
|
||||
return loadedBundles;
|
||||
}
|
||||
|
||||
@end
|
50
Framework/PCButton.m
Normal file
50
Framework/PCButton.m
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2003-2019 Free Software Foundation
|
||||
|
||||
Authors: Serg Stoyan
|
||||
Riccardo Mottola
|
||||
|
||||
This file is part of ProjectCenter.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCButton.h>
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
|
||||
@implementation PCButton
|
||||
|
||||
// ============================================================================
|
||||
// ==== Main
|
||||
// ============================================================================
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)coder
|
||||
{
|
||||
self = [super initWithCoder:coder];
|
||||
if (self)
|
||||
{
|
||||
[_cell setGradientType:NSGradientConcaveWeak];
|
||||
[_cell setImageDimsWhenDisabled:YES];
|
||||
[self setImagePosition:NSImageOnly];
|
||||
[self setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
|
||||
[self setRefusesFirstResponder:YES];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
550
Framework/PCEditorManager.m
Normal file
550
Framework/PCEditorManager.m
Normal file
|
@ -0,0 +1,550 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2002-2015 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
Riccardo Mottola
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
#import <ProjectCenter/PCProjectManager.h>
|
||||
#import <ProjectCenter/PCBundleManager.h>
|
||||
#import <ProjectCenter/PCEditorManager.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCProjectEditor.h>
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
#import <ProjectCenter/PCSaveModified.h>
|
||||
|
||||
#import <Protocols/CodeEditor.h>
|
||||
|
||||
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
|
||||
|
||||
NSString *PCEditorDidChangeFileNameNotification =
|
||||
@"PCEditorDidChangeFileNameNotification";
|
||||
|
||||
NSString *PCEditorWillOpenNotification = @"PCEditorWillOpenNotification";
|
||||
NSString *PCEditorDidOpenNotification = @"PCEditorDidOpenNotification";
|
||||
NSString *PCEditorWillCloseNotification = @"PCEditorWillCloseNotification";
|
||||
NSString *PCEditorDidCloseNotification = @"PCEditorDidCloseNotification";
|
||||
|
||||
NSString *PCEditorWillChangeNotification = @"PCEditorWillChangeNotification";
|
||||
NSString *PCEditorDidChangeNotification = @"PCEditorDidChangeNotification";
|
||||
NSString *PCEditorWillSaveNotification = @"PCEditorWillSaveNotification";
|
||||
NSString *PCEditorDidSaveNotification = @"PCEditorDidSaveNotification";
|
||||
NSString *PCEditorWillRevertNotification = @"PCEditorWillRevertNotification";
|
||||
NSString *PCEditorDidRevertNotification = @"PCEditorDidRevertNotification";
|
||||
|
||||
NSString *PCEditorDidBecomeActiveNotification =
|
||||
@"PCEditorDidBecomeActiveNotification";
|
||||
NSString *PCEditorDidResignActiveNotification =
|
||||
@"PCEditorDidResignActiveNotification";
|
||||
|
||||
@implementation PCEditorManager
|
||||
// ===========================================================================
|
||||
// ==== Initialisation
|
||||
// ===========================================================================
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
PCLogStatus(self, @"[init]");
|
||||
_editorsDict = [[NSMutableDictionary alloc] init];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(editorDidOpen:)
|
||||
name:PCEditorDidOpenNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(editorDidClose:)
|
||||
name:PCEditorDidCloseNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(editorDidBecomeActive:)
|
||||
name:PCEditorDidBecomeActiveNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(editorDidResignActive:)
|
||||
name:PCEditorDidResignActiveNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(editorDidChangeFileName:)
|
||||
name:PCEditorDidChangeFileNameNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEBUG
|
||||
NSLog (@"PCEditorManager: dealloc");
|
||||
#endif
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
RELEASE(editorName);
|
||||
RELEASE(_editorsDict);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (PCProjectManager *)projectManager
|
||||
{
|
||||
return _projectManager;
|
||||
}
|
||||
|
||||
- (void)setProjectManager:(PCProjectManager *)aProjectManager
|
||||
{
|
||||
_projectManager = aProjectManager;
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(loadPreferences:)
|
||||
name:PCPreferencesDidChangeNotification
|
||||
object:nil];
|
||||
[self loadPreferences:nil];
|
||||
}
|
||||
|
||||
- (void)loadPreferences:(NSNotification *)aNotification
|
||||
{
|
||||
id <PCPreferences> prefs = [_projectManager prefController];
|
||||
|
||||
ASSIGN(editorName, [prefs stringForKey:Editor]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Editor handling
|
||||
// ===========================================================================
|
||||
|
||||
- (id<CodeEditor>)editorForFile:(NSString *)filePath
|
||||
{
|
||||
return [_editorsDict objectForKey:filePath];
|
||||
}
|
||||
|
||||
- (id<CodeEditor>)openEditorForFile:(NSString *)filePath
|
||||
editable:(BOOL)editable
|
||||
windowed:(BOOL)windowed
|
||||
{
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
BOOL isDir;
|
||||
PCBundleManager *bundleManager = [_projectManager bundleManager];
|
||||
NSString *fileName = [filePath lastPathComponent];
|
||||
id<CodeEditor> editor;
|
||||
id<CodeParser> parser;
|
||||
BOOL exists = [fm fileExistsAtPath:filePath isDirectory:&isDir];
|
||||
|
||||
// Determine if file does not exist or file is directory
|
||||
if (!exists)
|
||||
{
|
||||
NSRunAlertPanel(@"Open Editor",
|
||||
@"Couldn't open editor for file '%@'.\n"
|
||||
@"File doesn't exist.",
|
||||
@"Close", nil, nil, filePath);
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Determine if file is text file
|
||||
if(isDir == NO)
|
||||
{
|
||||
if (![[PCFileManager defaultManager] isTextFile:filePath] && !isDir)
|
||||
{
|
||||
// TODO: Do not open alert panel for now. Internal editor
|
||||
// for non text files must not be opened. Review PCProjectBrowser.
|
||||
/* NSRunAlertPanel(@"Open Editor",
|
||||
@"Couldn't open editor for file '%@'.\n"
|
||||
@"File is not plain text.",
|
||||
@"Close", nil, nil, filePath);*/
|
||||
PCLogInfo(self, @"Not a text file %@", filePath);
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NSString *app;
|
||||
|
||||
/* we don't have in-window editors for any bundles right now */
|
||||
if (!windowed)
|
||||
return nil;
|
||||
|
||||
/* Check for bundles and if possible let them be opened by Workspace but only if windowed */
|
||||
app = [[NSWorkspace sharedWorkspace] getBestAppInRole:@"Editor" forExtension:[fileName pathExtension]];
|
||||
if (windowed && app != nil)
|
||||
{
|
||||
if ([[NSWorkspace sharedWorkspace] openFile: filePath])
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
// NSLog(@"EditorManager 1: %@", _editorsDict);
|
||||
editor = [_editorsDict objectForKey: filePath];
|
||||
if (editor == nil)
|
||||
{
|
||||
// Editor
|
||||
editor = [bundleManager objectForBundleWithName:editorName
|
||||
type:@"editor"
|
||||
protocol:@protocol(CodeEditor)];
|
||||
if (editor == nil)
|
||||
{
|
||||
editor = [bundleManager
|
||||
objectForBundleWithName:@"ProjectCenter"
|
||||
type:@"editor"
|
||||
protocol:@protocol(CodeEditor)];
|
||||
}
|
||||
|
||||
/* if we have a valid editor, we try to set a parser */
|
||||
if (editor)
|
||||
{
|
||||
// Parser
|
||||
parser = [bundleManager objectForBundleType:@"parser"
|
||||
protocol:@protocol(CodeParser)
|
||||
fileName:fileName];
|
||||
if(parser != nil)
|
||||
{
|
||||
[editor setParser:parser];
|
||||
}
|
||||
[editor openFileAtPath:filePath
|
||||
editorManager:self
|
||||
editable:editable];
|
||||
[_editorsDict setObject:editor forKey:filePath];
|
||||
RELEASE(editor);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// If we don't have an editor, we fall back to opening the
|
||||
// file with the editor designated by the system.
|
||||
//
|
||||
[[NSWorkspace sharedWorkspace] openFile: filePath];
|
||||
}
|
||||
}
|
||||
|
||||
if(editor != nil)
|
||||
{
|
||||
[editor setWindowed:windowed];
|
||||
}
|
||||
|
||||
return editor;
|
||||
}
|
||||
|
||||
- (void)orderFrontEditorForFile:(NSString *)path
|
||||
{
|
||||
id<CodeEditor> editor = [_editorsDict objectForKey:path];
|
||||
|
||||
if (!editor)
|
||||
{
|
||||
return;
|
||||
}
|
||||
[editor show];
|
||||
}
|
||||
|
||||
- (id<CodeEditor>)activeEditor
|
||||
{
|
||||
return _activeEditor;
|
||||
}
|
||||
|
||||
- (void)setActiveEditor:(id<CodeEditor>)anEditor
|
||||
{
|
||||
if (anEditor != _activeEditor)
|
||||
{
|
||||
_activeEditor = anEditor;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray *)allEditors
|
||||
{
|
||||
return [_editorsDict allValues];
|
||||
}
|
||||
|
||||
- (void)closeActiveEditor:(id)sender
|
||||
{
|
||||
if (!_activeEditor)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[_activeEditor close:sender];
|
||||
}
|
||||
|
||||
- (void)closeEditorForFile:(NSString *)file
|
||||
{
|
||||
id<CodeEditor> editor;
|
||||
|
||||
if ([_editorsDict count] > 0 && (editor = [_editorsDict objectForKey:file]))
|
||||
{
|
||||
[editor close:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray *)modifiedFiles
|
||||
{
|
||||
NSEnumerator *enumerator = [_editorsDict keyEnumerator];
|
||||
NSString *key = nil;
|
||||
id<CodeEditor> editor;
|
||||
NSMutableArray *modifiedFiles = [[NSMutableArray alloc] init];
|
||||
|
||||
while ((key = [enumerator nextObject]))
|
||||
{
|
||||
editor = [_editorsDict objectForKey:key];
|
||||
if ([editor isEdited])
|
||||
{
|
||||
[modifiedFiles addObject:key];
|
||||
}
|
||||
}
|
||||
|
||||
return AUTORELEASE((NSArray *)modifiedFiles);
|
||||
}
|
||||
|
||||
- (BOOL)hasModifiedFiles
|
||||
{
|
||||
if ([[self modifiedFiles] count])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)reviewUnsaved:(NSArray *)modifiedFiles
|
||||
{
|
||||
NSEnumerator *enumerator = [modifiedFiles objectEnumerator];
|
||||
NSString *filePath;
|
||||
id<CodeEditor> editor;
|
||||
|
||||
while ((filePath = [enumerator nextObject]))
|
||||
{
|
||||
editor = [_editorsDict objectForKey:filePath];
|
||||
|
||||
[self orderFrontEditorForFile:filePath];
|
||||
|
||||
if ([editor close:self] == NO)
|
||||
{ // Operation should be aborted
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)closeAllEditors
|
||||
{
|
||||
NSArray *modifiedFiles = [self modifiedFiles];
|
||||
|
||||
if ([modifiedFiles count])
|
||||
{
|
||||
if (!PCRunSaveModifiedFilesPanel(self,
|
||||
@"Save and Close",
|
||||
@"Close Anyway",
|
||||
@"Cancel"))
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
[_editorsDict removeAllObjects];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== File handling
|
||||
// ===========================================================================
|
||||
|
||||
- (BOOL)saveAllFiles
|
||||
{
|
||||
NSEnumerator *enumerator = [_editorsDict keyEnumerator];
|
||||
id<CodeEditor> editor;
|
||||
NSString *key;
|
||||
BOOL ret = YES;
|
||||
|
||||
while ((key = [enumerator nextObject]))
|
||||
{
|
||||
editor = [_editorsDict objectForKey:key];
|
||||
|
||||
if ([editor saveFileIfNeeded] == NO)
|
||||
{
|
||||
ret = NSRunAlertPanel(@"Save Files",
|
||||
@"Couldn't save file '%@'.\n"
|
||||
@"Operation stopped.",
|
||||
@"Ok",nil,nil);
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
- (BOOL)saveFile
|
||||
{
|
||||
id<CodeEditor> editor = [self activeEditor];
|
||||
|
||||
if (editor != nil)
|
||||
{
|
||||
return [editor saveFileIfNeeded];
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)saveFileAs:(NSString *)file
|
||||
{
|
||||
id<CodeEditor> editor = [self activeEditor];
|
||||
|
||||
if (editor != nil)
|
||||
{
|
||||
BOOL res;
|
||||
BOOL iw = [editor isWindowed];
|
||||
|
||||
res = [editor saveFileTo:file];
|
||||
[editor closeFile:self save:NO];
|
||||
|
||||
[self openEditorForFile:file
|
||||
editable:YES
|
||||
windowed:iw];
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)saveFileTo:(NSString *)file
|
||||
{
|
||||
id<CodeEditor> editor = [self activeEditor];
|
||||
|
||||
if (editor != nil)
|
||||
{
|
||||
return [editor saveFileTo:file];
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)revertFileToSaved
|
||||
{
|
||||
id<CodeEditor> editor = [self activeEditor];
|
||||
|
||||
if (editor != nil)
|
||||
{
|
||||
return [editor revertFileToSaved];
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Notifications
|
||||
// ===========================================================================
|
||||
|
||||
- (void)editorDidOpen:(NSNotification *)aNotif
|
||||
{
|
||||
id editor = [aNotif object];
|
||||
|
||||
[self setActiveEditor:editor];
|
||||
}
|
||||
|
||||
- (void)editorDidClose:(NSNotification *)aNotif
|
||||
{
|
||||
id editor = [aNotif object];
|
||||
|
||||
// It is not our editor
|
||||
if (![[_editorsDict allValues] containsObject:editor])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[_editorsDict removeObjectForKey:[editor path]];
|
||||
|
||||
if (![_editorsDict count])
|
||||
{
|
||||
[self setActiveEditor:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)editorDidBecomeActive:(NSNotification *)aNotif
|
||||
{
|
||||
id<CodeEditor> editor = [aNotif object];
|
||||
|
||||
if (![[_editorsDict allValues] containsObject:editor])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[self setActiveEditor:editor];
|
||||
}
|
||||
|
||||
- (void)editorDidResignActive:(NSNotification *)aNotif
|
||||
{
|
||||
// Clearing activeEditor blocks the ability to get some information from
|
||||
// loaded and visible but not active editor
|
||||
/* PCEditor *editor = [aNotif object];
|
||||
|
||||
if ([editor projectEditor] != self)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[self setActiveEditor:nil];*/
|
||||
}
|
||||
|
||||
- (void)editorDidChangeFileName:(NSNotification *)aNotif
|
||||
{
|
||||
NSDictionary *_editorDict = [aNotif object];
|
||||
id<CodeEditor> _editor = [_editorDict objectForKey:@"Editor"];
|
||||
NSString *_oldFileName = nil;
|
||||
NSString *_newFileName = nil;
|
||||
|
||||
if (![[_editorsDict allValues] containsObject:_editor])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_oldFileName = [_editorDict objectForKey:@"OldFile"];
|
||||
_newFileName = [_editorDict objectForKey:@"NewFile"];
|
||||
|
||||
[_editorsDict removeObjectForKey:_oldFileName];
|
||||
[_editorsDict setObject:_editor forKey:_newFileName];
|
||||
}
|
||||
|
||||
- (void)gotoFile: (NSString *)fileName atLine: (NSUInteger)line
|
||||
{
|
||||
PCProject *project = [_projectManager rootActiveProject];
|
||||
PCProjectEditor *pe = [project projectEditor];
|
||||
|
||||
id<CodeEditor> editor = [pe openEditorForFilePath: fileName windowed: NO];
|
||||
|
||||
// [self orderFrontEditorForFile:fileName];
|
||||
[editor scrollToLineNumber: line];
|
||||
}
|
||||
|
||||
@end
|
||||
|
534
Framework/PCFileCreator.m
Normal file
534
Framework/PCFileCreator.m
Normal file
|
@ -0,0 +1,534 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2001-2015 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
Riccardo Mottola
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
#import <ProjectCenter/PCFileCreator.h>
|
||||
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
|
||||
static PCFileCreator *_creator = nil;
|
||||
static NSDictionary *dict = nil;
|
||||
|
||||
@implementation PCFileCreator
|
||||
|
||||
+ (id)sharedCreator
|
||||
{
|
||||
if (_creator == nil)
|
||||
{
|
||||
NSDictionary *classDict;
|
||||
NSDictionary *headerDict;
|
||||
NSDictionary *ccDict;
|
||||
NSDictionary *chDict;
|
||||
NSDictionary *classPpDict;
|
||||
NSDictionary *protocolDict;
|
||||
NSDictionary *gsmarkupDict;
|
||||
NSString *descr;
|
||||
NSString *template;
|
||||
NSBundle *bundle;
|
||||
|
||||
_creator = [[[self class] alloc] init];
|
||||
bundle = [NSBundle bundleForClass:[self class]];
|
||||
|
||||
// Setting up the dictionary needed for registration!
|
||||
|
||||
// Objective C Class
|
||||
descr = @"Generic Objective-C class.\n\n"
|
||||
@"This is a plain subclass of NSObject which includes"
|
||||
@" only Foundation.h.";
|
||||
template = [bundle pathForResource:@"class" ofType:@"template"];
|
||||
classDict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
PCClasses, @"ProjectKey",
|
||||
descr, @"TypeDescription",
|
||||
template,@"TemplateFile",
|
||||
nil];
|
||||
|
||||
// Objective C Header
|
||||
descr = @"Generic Objective-C header.\n\n"
|
||||
@"This is a plain interface subclassing NSObject."
|
||||
@" The file includes Foundation.h";
|
||||
template = [bundle pathForResource:@"header" ofType:@"template"];
|
||||
headerDict =[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
PCHeaders,@"ProjectKey",
|
||||
descr,@"TypeDescription",
|
||||
template,@"TemplateFile",
|
||||
nil];
|
||||
|
||||
// C File
|
||||
descr = @"Generic ANSI-C implementation file.\n\n"
|
||||
@"This file contains no Objective-C dependency in any form.";
|
||||
template = [bundle pathForResource:@"cfile" ofType:@"template"];
|
||||
ccDict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
PCOtherSources,@"ProjectKey",
|
||||
descr,@"TypeDescription",
|
||||
template,@"TemplateFile",
|
||||
nil];
|
||||
|
||||
// C Header
|
||||
descr = @"Generic ANSI-C header.\n\n"
|
||||
@"This file contains no Objective-C dependency in any form.";
|
||||
template = [bundle pathForResource:@"cheader" ofType:@"template"];
|
||||
chDict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
PCHeaders,@"ProjectKey",
|
||||
descr,@"TypeDescription",
|
||||
template,@"TemplateFile",
|
||||
nil];
|
||||
|
||||
// Objective C Protocol
|
||||
descr = @"Generic Objective-C protocol.\n\n"
|
||||
@"This is common Objective-C protocol, comparable"
|
||||
@" i.e. to a Java interface.";
|
||||
template = [bundle pathForResource:@"protocol" ofType:@"template"];
|
||||
protocolDict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
PCHeaders,@"ProjectKey",
|
||||
descr,@"TypeDescription",
|
||||
template,@"TemplateFile",
|
||||
nil];
|
||||
|
||||
// Objective C++ Class
|
||||
descr = @"Generic Objective-C++ class.\n\n"
|
||||
@"This is a plain subclass of NSObject which includes"
|
||||
@" only Foundation.h. Extend it with c++";
|
||||
template = [bundle pathForResource:@"ocppclass" ofType:@"template"];
|
||||
classPpDict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
PCClasses, @"ProjectKey",
|
||||
descr, @"TypeDescription",
|
||||
template,@"TemplateFile",
|
||||
nil];
|
||||
|
||||
// GSMarkup
|
||||
descr = @"Generic GSMarkup File.\n\n"
|
||||
@"This is the interface description of GNUstep Renaissance.";
|
||||
template = [bundle pathForResource:@"gsmarkup" ofType:@"template"];
|
||||
gsmarkupDict =[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
PCGSMarkupFiles,@"ProjectKey",
|
||||
descr,@"TypeDescription",
|
||||
template, @"TemplateFile",
|
||||
nil];
|
||||
|
||||
|
||||
dict = [[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
ccDict, CFile,
|
||||
chDict, CHeader,
|
||||
protocolDict, ProtocolFile,
|
||||
headerDict, ObjCHeader,
|
||||
classDict, ObjCClass,
|
||||
classPpDict, ObjCppClass,
|
||||
gsmarkupDict, GSMarkupFile,
|
||||
nil];
|
||||
}
|
||||
|
||||
return _creator;
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
activeProject = nil;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
RELEASE(newFilePanel);
|
||||
RELEASE(dict);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSDictionary *)creatorDictionary
|
||||
{
|
||||
return dict;
|
||||
}
|
||||
|
||||
- (void)newFileInProject:(PCProject *)aProject
|
||||
{
|
||||
// Set to nil after panel closing
|
||||
activeProject = aProject;
|
||||
[self showNewFilePanel];
|
||||
}
|
||||
|
||||
- (void)createFileOfType:(NSString *)fileType
|
||||
path:(NSString *)path
|
||||
project:(PCProject *)project
|
||||
{
|
||||
NSDictionary *newFiles;
|
||||
|
||||
newFiles = [self filesToCreateForFileOfType:fileType
|
||||
path:path
|
||||
withComplementary:YES];
|
||||
|
||||
[self createFiles:newFiles inProject:project];
|
||||
}
|
||||
|
||||
- (NSDictionary *)filesToCreateForFileOfType:(NSString *)type
|
||||
path:(NSString *)path
|
||||
withComplementary:(BOOL)complementary
|
||||
{
|
||||
NSMutableDictionary *files = nil;
|
||||
NSString *newFile = nil;
|
||||
|
||||
// A class and possibly a header
|
||||
files = [NSMutableDictionary dictionaryWithCapacity:2];
|
||||
|
||||
// Remove file extension from "path"
|
||||
if (![[path pathExtension] isEqualToString: @""])
|
||||
{
|
||||
path = [path stringByDeletingPathExtension];
|
||||
}
|
||||
|
||||
// Objective-C Class
|
||||
if ([type isEqualToString:ObjCClass])
|
||||
{
|
||||
newFile = [path stringByAppendingPathExtension:@"m"];
|
||||
[files setObject:[dict objectForKey:ObjCClass] forKey:newFile];
|
||||
}
|
||||
// Objective-C++ Class
|
||||
else if ([type isEqualToString:ObjCppClass])
|
||||
{
|
||||
newFile = [path stringByAppendingPathExtension:@"mm"];
|
||||
[files setObject:[dict objectForKey:ObjCppClass] forKey:newFile];
|
||||
}
|
||||
// C File
|
||||
else if ([type isEqualToString:CFile])
|
||||
{
|
||||
newFile = [path stringByAppendingPathExtension:@"c"];
|
||||
[files setObject:[dict objectForKey:CFile] forKey:newFile];
|
||||
}
|
||||
|
||||
// C Header
|
||||
// When creating C file also create C Header file
|
||||
if ([type isEqualToString:CHeader] ||
|
||||
([type isEqualToString:CFile] && complementary))
|
||||
{
|
||||
newFile = [path stringByAppendingPathExtension:@"h"];
|
||||
[files setObject:[dict objectForKey:CHeader] forKey:newFile];
|
||||
}
|
||||
// Objective-C Header
|
||||
// When creating Objective C Class file also create Objective C Header file
|
||||
else if ([type isEqualToString:ObjCHeader] ||
|
||||
([type isEqualToString:ObjCClass] && complementary))
|
||||
{
|
||||
newFile = [path stringByAppendingPathExtension:@"h"];
|
||||
[files setObject:[dict objectForKey:ObjCHeader] forKey:newFile];
|
||||
}
|
||||
// GSMarkup
|
||||
else if ([type isEqualToString:GSMarkupFile])
|
||||
{
|
||||
newFile = [path stringByAppendingPathExtension:@"gsmarkup"];
|
||||
[files setObject:[dict objectForKey:GSMarkupFile] forKey:newFile];
|
||||
}
|
||||
// Objective-C Protocol
|
||||
else if ([type isEqualToString:ProtocolFile])
|
||||
{
|
||||
newFile = [path stringByAppendingPathExtension:@"h"];
|
||||
[files setObject:[dict objectForKey:ProtocolFile] forKey:newFile];
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
- (BOOL)createFiles:(NSDictionary *)fileList
|
||||
inProject:(PCProject *)aProject
|
||||
{
|
||||
PCFileManager *pcfm = [PCFileManager defaultManager];
|
||||
NSEnumerator *enumerator = [[fileList allKeys] objectEnumerator];
|
||||
NSString *template = nil;
|
||||
NSString *newFile = nil;
|
||||
NSDictionary *fileType = nil;
|
||||
NSString *key = nil;
|
||||
|
||||
while ((newFile = [enumerator nextObject]))
|
||||
{
|
||||
fileType = [fileList objectForKey:newFile];
|
||||
key = [fileType objectForKey:@"ProjectKey"];
|
||||
template = [fileType objectForKey:@"TemplateFile"];
|
||||
|
||||
if ([pcfm copyFile:template toFile:newFile])
|
||||
{
|
||||
[self replaceTagsInFileAtPath:newFile withProject:aProject];
|
||||
[aProject addFiles:[NSArray arrayWithObject:newFile]
|
||||
forKey:key
|
||||
notify:YES];
|
||||
}
|
||||
}
|
||||
|
||||
// Notify the browser!
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:@"ProjectDictDidChangeNotification"
|
||||
object:self];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)replaceTagsInFileAtPath:(NSString *)newFile
|
||||
withProject:(PCProject *)aProject
|
||||
{
|
||||
NSString *projectName = [aProject projectName];
|
||||
NSString *date = [[NSCalendarDate calendarDate] description];
|
||||
int year = [[NSCalendarDate calendarDate] yearOfCommonEra];
|
||||
NSString *aFile = [newFile lastPathComponent];
|
||||
NSString *UCfn = [[aFile stringByDeletingPathExtension] uppercaseString];
|
||||
NSString *fn = [aFile stringByDeletingPathExtension];
|
||||
NSRange subRange;
|
||||
|
||||
#ifdef WIN32
|
||||
file = [[NSMutableString stringWithContentsOfFile: newFile
|
||||
encoding: NSUTF8StringEncoding
|
||||
error: NULL] retain];
|
||||
#else
|
||||
file = [[NSMutableString stringWithContentsOfFile:newFile] retain];
|
||||
#endif
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$FULLFILENAME$"]).length)
|
||||
{
|
||||
[file replaceCharactersInRange:subRange withString:aFile];
|
||||
}
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$FILENAME$"]).length)
|
||||
{
|
||||
[file replaceCharactersInRange:subRange withString:fn];
|
||||
}
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$UCFILENAME$"]).length)
|
||||
{
|
||||
[file replaceCharactersInRange:subRange withString:UCfn];
|
||||
}
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$USERNAME$"]).length)
|
||||
{
|
||||
[file replaceCharactersInRange:subRange withString:NSUserName()];
|
||||
}
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$FULLUSERNAME$"]).length)
|
||||
{
|
||||
[file replaceCharactersInRange:subRange withString:NSFullUserName()];
|
||||
}
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$PROJECTNAME$"]).length)
|
||||
{
|
||||
[file replaceCharactersInRange:subRange withString:projectName];
|
||||
}
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$DATE$"]).length)
|
||||
{
|
||||
[file replaceCharactersInRange:subRange withString:date];
|
||||
}
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$YEAR$"]).length)
|
||||
{
|
||||
[file replaceCharactersInRange:subRange
|
||||
withString:[[NSNumber numberWithInt:year] stringValue]];
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
[file writeToFile: newFile
|
||||
atomically: YES
|
||||
encoding: NSUTF8StringEncoding
|
||||
error: NULL];
|
||||
#else
|
||||
[file writeToFile:newFile atomically:YES];
|
||||
#endif
|
||||
|
||||
[file release];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation PCFileCreator (UInterface)
|
||||
|
||||
// ============================================================================
|
||||
// ==== "New File in Project" Panel
|
||||
// ============================================================================
|
||||
- (void)showNewFilePanel
|
||||
{
|
||||
if (!newFilePanel)
|
||||
{
|
||||
if ([NSBundle loadNibNamed:@"NewFile" owner:self] == NO)
|
||||
{
|
||||
PCLogError(self, @"error loading NewFile NIB!");
|
||||
return;
|
||||
}
|
||||
[newFilePanel setFrameAutosaveName:@"NewFile"];
|
||||
if (![newFilePanel setFrameUsingName: @"NewFile"])
|
||||
{
|
||||
[newFilePanel center];
|
||||
}
|
||||
[nfImage setImage:[NSApp applicationIconImage]];
|
||||
[nfTypePB setRefusesFirstResponder:YES];
|
||||
[nfTypePB removeAllItems];
|
||||
[nfTypePB addItemsWithTitles:
|
||||
[[dict allKeys]
|
||||
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]];
|
||||
[nfTypePB selectItemAtIndex:0];
|
||||
[nfCancelButton setRefusesFirstResponder:YES];
|
||||
[nfCreateButton setRefusesFirstResponder:YES];
|
||||
[nfAddHeaderButton setRefusesFirstResponder:YES];
|
||||
[newFilePanel setDefaultButtonCell:[nfCreateButton cell]];
|
||||
}
|
||||
|
||||
[self newFilePopupChanged:nfTypePB];
|
||||
|
||||
[newFilePanel makeKeyAndOrderFront:self];
|
||||
[nfNameField setStringValue:@""];
|
||||
[newFilePanel makeFirstResponder:nfNameField];
|
||||
|
||||
[newFilePanel setLevel:NSModalPanelWindowLevel];
|
||||
[NSApp runModalForWindow:newFilePanel];
|
||||
}
|
||||
|
||||
- (void)closeNewFilePanel:(id)sender
|
||||
{
|
||||
[newFilePanel orderOut:self];
|
||||
[NSApp stopModal];
|
||||
|
||||
activeProject = nil;
|
||||
}
|
||||
|
||||
- (void)createFile:(id)sender
|
||||
{
|
||||
if ([self createFile])
|
||||
{
|
||||
[self closeNewFilePanel:self];
|
||||
}
|
||||
else
|
||||
{
|
||||
[newFilePanel makeKeyAndOrderFront:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)newFilePopupChanged:(id)sender
|
||||
{
|
||||
NSString *typeTitle = [sender titleOfSelectedItem];
|
||||
NSDictionary *fileType = [dict objectForKey:typeTitle];
|
||||
|
||||
if (!fileType)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[nfDescriptionTV setString:[fileType objectForKey:@"TypeDescription"]];
|
||||
[nfAddHeaderButton setState:NSOffState];
|
||||
if ([typeTitle isEqualToString:ObjCClass] ||
|
||||
[typeTitle isEqualToString:CFile])
|
||||
{
|
||||
[nfAddHeaderButton setEnabled:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
[nfAddHeaderButton setEnabled:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)controlTextDidChange:(NSNotification *)aNotif
|
||||
{
|
||||
if ([aNotif object] != nfNameField)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Add check for valid file names
|
||||
if ([[nfNameField stringValue] length] > 0)
|
||||
{
|
||||
[nfCreateButton setEnabled:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
[nfCreateButton setEnabled:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)createFile
|
||||
{
|
||||
NSString *fileName = [nfNameField stringValue];
|
||||
NSString *fileType = [nfTypePB titleOfSelectedItem];
|
||||
NSString *path = nil;
|
||||
NSString *key = nil;
|
||||
NSDictionary *newFiles = nil;
|
||||
NSEnumerator *enumerator = nil;
|
||||
NSString *filePath = nil;
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
BOOL complementary;
|
||||
|
||||
path = [[activeProject projectPath] stringByAppendingPathComponent:fileName];
|
||||
// Create file
|
||||
if (path)
|
||||
{
|
||||
// Get file list for creation
|
||||
complementary = [nfAddHeaderButton state]==NSOnState ? YES : NO;
|
||||
newFiles = [self filesToCreateForFileOfType:fileType
|
||||
path:path
|
||||
withComplementary:complementary];
|
||||
|
||||
// Check if project already has files with such names
|
||||
enumerator = [[newFiles allKeys] objectEnumerator];
|
||||
while ((filePath = [enumerator nextObject]))
|
||||
{
|
||||
key = [[newFiles objectForKey:filePath] objectForKey:@"ProjectKey"];
|
||||
fileName = [filePath lastPathComponent];
|
||||
if (![activeProject doesAcceptFile:fileName forKey:key])
|
||||
{
|
||||
NSRunAlertPanel(@"New File in Project",
|
||||
@"Project %@ already has file %@ in %@",
|
||||
@"OK", nil, nil,
|
||||
[activeProject projectName], fileName, key);
|
||||
return NO;
|
||||
}
|
||||
if ([fm fileExistsAtPath:filePath])
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = NSRunAlertPanel
|
||||
(@"New File in Project",
|
||||
@"Project directory %@ already has file %@.\n"
|
||||
@"Do you want to overwrite it?",
|
||||
@"Stop", @"Overwrite", nil,
|
||||
[filePath stringByDeletingLastPathComponent],
|
||||
fileName);
|
||||
|
||||
if (ret == NSAlertDefaultReturn) // Stop
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
else // Overwrite. Remove destination of copy operation
|
||||
{
|
||||
[fm removeFileAtPath:filePath handler:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create files
|
||||
return [self createFiles:newFiles inProject:activeProject];
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
710
Framework/PCFileManager.m
Normal file
710
Framework/PCFileManager.m
Normal file
|
@ -0,0 +1,710 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2000-2022 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
Riccardo Mottola
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
#import <ProjectCenter/PCFileCreator.h>
|
||||
#import <ProjectCenter/PCProjectManager.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCProjectBrowser.h>
|
||||
#import <ProjectCenter/PCAddFilesPanel.h>
|
||||
|
||||
#import <Protocols/Preferences.h>
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
|
||||
@implementation PCFileManager
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Class methods
|
||||
// ===========================================================================
|
||||
|
||||
static PCFileManager *_mgr = nil;
|
||||
|
||||
+ (PCFileManager *)defaultManager
|
||||
{
|
||||
if (_mgr == nil)
|
||||
{
|
||||
_mgr = [[self alloc] init];
|
||||
}
|
||||
|
||||
return _mgr;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Init and free
|
||||
// ===========================================================================
|
||||
|
||||
- (id)initWithProjectManager:(PCProjectManager *)aProjectManager
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
projectManager = aProjectManager;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEVELOPMENT
|
||||
NSLog (@"PCFileManager: dealloc");
|
||||
#endif
|
||||
|
||||
if (addFilesPanel)
|
||||
{
|
||||
RELEASE(addFilesPanel);
|
||||
}
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== NSFileManager delegate methods
|
||||
// ===========================================================================
|
||||
- (BOOL) fileManager:(NSFileManager *)manager
|
||||
shouldProceedAfterError:(NSDictionary *)errorDict
|
||||
{
|
||||
NSLog(@"FM error is: %@", [errorDict objectForKey:@"Error"]);
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== File handling
|
||||
// ===========================================================================
|
||||
- (BOOL)createDirectoriesIfNeededAtPath:(NSString *)path
|
||||
{
|
||||
NSString *_path = [NSString stringWithString:path];
|
||||
NSString *_oldPath = nil;
|
||||
NSMutableArray *pathArray = [NSMutableArray array];
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
BOOL isDir;
|
||||
int i;
|
||||
|
||||
/* We stop when we find a file, or when we can't remove any path
|
||||
* component any more. Else, you may end up in an infinite loop if
|
||||
* _path = @"".
|
||||
*/
|
||||
isDir = NO;
|
||||
while (_path != nil
|
||||
&& ![_path isEqualToString: _oldPath]
|
||||
&& ![fm fileExistsAtPath:_path isDirectory:&isDir])
|
||||
{
|
||||
[pathArray addObject:[_path lastPathComponent]];
|
||||
_oldPath = _path;
|
||||
_path = [_path stringByDeletingLastPathComponent];
|
||||
}
|
||||
|
||||
if (!isDir)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
if ([_path length] != [path length])
|
||||
{
|
||||
for (i = [pathArray count]-1; i >= 0; i--)
|
||||
{
|
||||
_path =
|
||||
[_path stringByAppendingPathComponent:[pathArray objectAtIndex:i]];
|
||||
if ([fm createDirectoryAtPath:_path attributes:nil] == NO)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)copyFile:(NSString *)file toFile:(NSString *)toFile
|
||||
{
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
NSString *directoryPath = nil;
|
||||
|
||||
if (!file)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (![fm fileExistsAtPath:toFile])
|
||||
{
|
||||
directoryPath = [toFile stringByDeletingLastPathComponent];
|
||||
if ([self createDirectoriesIfNeededAtPath:directoryPath] == NO)
|
||||
{
|
||||
NSRunAlertPanel(@"Copy File",
|
||||
@"Couldn't create directories at path %@",
|
||||
@"Ok",nil,nil, directoryPath);
|
||||
return NO;
|
||||
}
|
||||
|
||||
if ([fm copyPath:file toPath:toFile handler:self] == NO)
|
||||
{
|
||||
NSRunAlertPanel(@"Copy File",
|
||||
@"Couldn't copy file %@ to %@",
|
||||
@"Ok",nil,nil, file, toFile);
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)copyFile:(NSString *)file intoDirectory:(NSString *)directory
|
||||
{
|
||||
NSString *path = nil;
|
||||
|
||||
if (!file)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
path = [directory stringByAppendingPathComponent:[file lastPathComponent]];
|
||||
|
||||
if (![self copyFile:file toFile:path])
|
||||
{ // No need to open aler panel here
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)copyFile:(NSString *)file
|
||||
fromDirectory:(NSString *)fromDir
|
||||
intoDirectory:(NSString *)toDir
|
||||
{
|
||||
NSString *path = nil;
|
||||
|
||||
if (!file || !fromDir || !toDir)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
path = [fromDir stringByAppendingPathComponent:[file lastPathComponent]];
|
||||
|
||||
if (![self copyFile:path intoDirectory:toDir])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)copyFiles:(NSArray *)files intoDirectory:(NSString *)directory
|
||||
{
|
||||
NSEnumerator *enumerator = nil;
|
||||
NSString *file = nil;
|
||||
|
||||
if (!files)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
enumerator = [files objectEnumerator];
|
||||
while ((file = [enumerator nextObject]))
|
||||
{
|
||||
if ([self copyFile:file intoDirectory:directory] == NO)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)removeDirectoriesIfEmptyAtPath:(NSString *)path
|
||||
{
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
|
||||
while ([[fm directoryContentsAtPath:path] count] == 0)
|
||||
{
|
||||
if ([fm removeFileAtPath:path handler:nil] == NO)
|
||||
{
|
||||
NSRunAlertPanel(@"Remove Directory",
|
||||
@"Couldn't remove empty directory at path %@",
|
||||
@"Ok",nil,nil, path);
|
||||
return NO;
|
||||
}
|
||||
path = [path stringByDeletingLastPathComponent];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)removeFile:(NSString *)file
|
||||
fromDirectory:(NSString *)directory
|
||||
removeDirsIfEmpty:(BOOL)removeDirs
|
||||
{
|
||||
NSString *path = nil;
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
|
||||
if (!file)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
path = [directory stringByAppendingPathComponent:file];
|
||||
if (![fm removeFileAtPath:path handler:nil])
|
||||
{
|
||||
NSRunAlertPanel(@"Remove File",
|
||||
@"Couldn't remove file at path %@",
|
||||
@"Ok",nil,nil, path);
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (removeDirs)
|
||||
{
|
||||
[self removeDirectoriesIfEmptyAtPath:directory];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)removeFileAtPath:(NSString *)file removeDirsIfEmpty:(BOOL)removeDirs
|
||||
{
|
||||
return [self removeFile:[file lastPathComponent]
|
||||
fromDirectory:[file stringByDeletingLastPathComponent]
|
||||
removeDirsIfEmpty:removeDirs];
|
||||
}
|
||||
|
||||
- (BOOL)removeFiles:(NSArray *)files
|
||||
fromDirectory:(NSString *)directory
|
||||
removeDirsIfEmpty:(BOOL)removeDirs
|
||||
{
|
||||
NSEnumerator *filesEnum = nil;
|
||||
NSString *file = nil;
|
||||
|
||||
if (!files)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
filesEnum = [files objectEnumerator];
|
||||
while ((file = [filesEnum nextObject]))
|
||||
{
|
||||
if ([self removeFile:file
|
||||
fromDirectory:directory
|
||||
removeDirsIfEmpty:removeDirs] == NO)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)moveFile:(NSString *)file intoDirectory:(NSString *)directory
|
||||
{
|
||||
if ([self copyFile:file intoDirectory:directory] == YES)
|
||||
{
|
||||
[self removeFileAtPath:file removeDirsIfEmpty:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSRunAlertPanel(@"Move File",
|
||||
@"Couldn't move file %@ to %@",
|
||||
@"Ok",nil,nil, file, directory);
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Find Executable
|
||||
// Tries to find the first matching executable tool fromt he given, nil-terminated
|
||||
// list. Returns the full path for it.
|
||||
// ===========================================================================
|
||||
- (NSString*) findExecutableToolFrom: (NSArray*)candidates
|
||||
{
|
||||
NSFileManager *manager;
|
||||
NSEnumerator *pathEnumerator;
|
||||
NSString *directory;
|
||||
|
||||
manager = [NSFileManager defaultManager];
|
||||
pathEnumerator = [NSSearchPathForDirectoriesInDomains(NSDeveloperDirectory, NSAllDomainsMask, YES) objectEnumerator];
|
||||
|
||||
while (nil != (directory = [pathEnumerator nextObject]))
|
||||
{
|
||||
NSEnumerator *candidateEnumerator = [candidates objectEnumerator];
|
||||
NSString *candidate;
|
||||
|
||||
while (nil != (candidate = [candidateEnumerator nextObject]))
|
||||
{
|
||||
NSString *path = [directory stringByAppendingPathComponent: candidate];
|
||||
|
||||
if ([manager isExecutableFileAtPath: path])
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCFileManager (UInterface)
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Panels
|
||||
// ===========================================================================
|
||||
|
||||
- (id)_panelForOperation:(int)op
|
||||
title:(NSString *)title
|
||||
accView:(NSView *)accessoryView
|
||||
{
|
||||
id <PCPreferences> prefs = [projectManager prefController];
|
||||
NSString *lastOpenDir;
|
||||
id panel;
|
||||
|
||||
operation = op;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case PCOpenFileOperation:
|
||||
panel = [NSOpenPanel openPanel];
|
||||
[panel setCanChooseFiles:YES];
|
||||
[panel setCanChooseDirectories:NO];
|
||||
lastOpenDir = [prefs stringForKey:@"FileOpenLastDirectory"];
|
||||
break;
|
||||
case PCSaveFileOperation:
|
||||
panel = [NSSavePanel savePanel];
|
||||
lastOpenDir = [prefs stringForKey:@"FileSaveLastDirectory"];
|
||||
break;
|
||||
case PCOpenProjectOperation:
|
||||
panel = [NSOpenPanel openPanel];
|
||||
[panel setAllowsMultipleSelection:NO];
|
||||
[panel setCanChooseFiles:YES];
|
||||
[panel setCanChooseDirectories:YES];
|
||||
lastOpenDir = [prefs stringForKey:@"ProjectOpenLastDirectory"];
|
||||
break;
|
||||
case PCOpenDirectoryOperation:
|
||||
panel = [NSOpenPanel openPanel];
|
||||
[panel setCanChooseFiles:NO];
|
||||
[panel setCanChooseDirectories:YES];
|
||||
lastOpenDir = [prefs stringForKey:@"FileOpenLastDirectory"];
|
||||
break;
|
||||
case PCAddFileOperation:
|
||||
if (addFilesPanel == nil)
|
||||
{
|
||||
addFilesPanel = [PCAddFilesPanel addFilesPanel];
|
||||
[addFilesPanel setTreatsFilePackagesAsDirectories: YES];
|
||||
}
|
||||
panel = addFilesPanel;
|
||||
lastOpenDir = [prefs stringForKey:@"FileAddLastDirectory"];
|
||||
if (lastOpenDir == nil)
|
||||
{
|
||||
PCProject *pr = [projectManager activeProject];
|
||||
NSString *prPathRoot = [pr projectPath];
|
||||
lastOpenDir = prPathRoot;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return nil;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!lastOpenDir)
|
||||
{
|
||||
lastOpenDir = NSHomeDirectory();
|
||||
}
|
||||
[panel setDirectory:lastOpenDir];
|
||||
[panel setDelegate:self];
|
||||
|
||||
if (title != nil)
|
||||
{
|
||||
[panel setTitle:title];
|
||||
}
|
||||
if (accessoryView != nil)
|
||||
{
|
||||
[panel setAccessoryView:accessoryView];
|
||||
}
|
||||
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
- (void)_saveLastDirectoryForPanel:(id)panel
|
||||
{
|
||||
id <PCPreferences> prefs = [projectManager prefController];
|
||||
NSString *key = nil;
|
||||
|
||||
switch (operation)
|
||||
{
|
||||
case PCOpenFileOperation:
|
||||
key = @"FileOpenLastDirectory";
|
||||
break;
|
||||
case PCSaveFileOperation:
|
||||
key = @"FileSaveLastDirectory";
|
||||
break;
|
||||
case PCOpenProjectOperation:
|
||||
key = @"ProjectOpenLastDirectory";
|
||||
break;
|
||||
case PCAddFileOperation:
|
||||
key = @"FileAddLastDirectory";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (key != nil)
|
||||
{
|
||||
[prefs setString:[panel directory] forKey:key notify:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSMutableArray *)filesOfTypes:(NSArray *)types
|
||||
operation:(int)op
|
||||
multiple:(BOOL)yn
|
||||
title:(NSString *)title
|
||||
accView:(NSView *)accessoryView
|
||||
{
|
||||
id panel;
|
||||
NSMutableArray *fileList = [[NSMutableArray alloc] init];
|
||||
int result = -10;
|
||||
|
||||
panel = [self _panelForOperation:op title:title accView:accessoryView];
|
||||
if (types != nil)
|
||||
{
|
||||
[panel setAllowedFileTypes:types];
|
||||
}
|
||||
|
||||
if ((op == PCOpenFileOperation) ||
|
||||
(op == PCOpenProjectOperation) ||
|
||||
(op == PCOpenDirectoryOperation))
|
||||
{
|
||||
if ((result = [panel runModalForTypes:types]) == NSOKButton)
|
||||
{
|
||||
[fileList addObjectsFromArray:[panel filenames]];
|
||||
}
|
||||
}
|
||||
else if (op == PCSaveFileOperation)
|
||||
{
|
||||
if ((result = [panel runModal]) == NSOKButton)
|
||||
{
|
||||
[fileList addObject:[panel filename]];
|
||||
}
|
||||
}
|
||||
else if (op == PCAddFileOperation)
|
||||
{
|
||||
PCProject *project = [projectManager activeProject];
|
||||
NSString *selectedCategory = nil;
|
||||
|
||||
[panel setCategories:[project rootCategories]];
|
||||
selectedCategory = [[project projectBrowser] nameOfSelectedCategory];
|
||||
[panel selectCategory:selectedCategory];
|
||||
|
||||
if ((result = [panel runModalForTypes:types]) == NSOKButton)
|
||||
{
|
||||
[fileList addObjectsFromArray:[panel filenames]];
|
||||
}
|
||||
}
|
||||
|
||||
if (result == NSOKButton)
|
||||
{
|
||||
[self _saveLastDirectoryForPanel:panel];
|
||||
return [fileList autorelease];
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// ==== PCAddFilesPanel delegate
|
||||
// ============================================================================
|
||||
|
||||
- (void)categoryChangedTo:(NSString *)category
|
||||
{
|
||||
PCProject *project = [projectManager activeProject];
|
||||
NSArray *fileTypes = nil;
|
||||
PCProjectBrowser *browser = [project projectBrowser];
|
||||
NSString *path = [browser path];
|
||||
|
||||
[addFilesPanel setTitle:[NSString stringWithFormat:@"Add %@",category]];
|
||||
|
||||
fileTypes = [project
|
||||
fileTypesForCategoryKey:[project keyForCategory:category]];
|
||||
[addFilesPanel setFileTypes:fileTypes];
|
||||
|
||||
// Set project browser path
|
||||
path = [path stringByDeletingLastPathComponent];
|
||||
path = [path stringByAppendingPathComponent:category];
|
||||
[browser setPath:path];
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// ==== NSOpenPanel and NSSavePanel delegate
|
||||
// ============================================================================
|
||||
|
||||
// If file name already in project -- don't show it!
|
||||
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename
|
||||
{
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
BOOL isDir;
|
||||
PCProject *project = nil;
|
||||
NSArray *fileTypes = nil;
|
||||
NSString *category = nil;
|
||||
NSString *categoryKey = nil;
|
||||
|
||||
[fileManager fileExistsAtPath:filename isDirectory:&isDir];
|
||||
|
||||
if ([[filename pathExtension] isEqualToString:@"gorm"])
|
||||
{
|
||||
isDir = NO;
|
||||
}
|
||||
|
||||
if (sender == addFilesPanel && !isDir)
|
||||
{
|
||||
project = [projectManager activeProject];
|
||||
category = [addFilesPanel selectedCategory];
|
||||
categoryKey = [project keyForCategory:category];
|
||||
fileTypes = [project fileTypesForCategoryKey:categoryKey];
|
||||
// Wrong file extension
|
||||
if (fileTypes
|
||||
&& ![fileTypes containsObject:[filename pathExtension]])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
// File is already in project
|
||||
if (![project doesAcceptFile:filename forKey:categoryKey])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
// Test if we should accept file name selected or entered
|
||||
- (BOOL)panel:(id)sender isValidFilename:(NSString *)filename
|
||||
{
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
BOOL isDir;
|
||||
NSEnumerator *e = nil;
|
||||
NSArray *tempList = nil;
|
||||
NSString *tempExtension = nil;
|
||||
|
||||
if (operation == PCOpenProjectOperation)
|
||||
{
|
||||
if ([fm fileExistsAtPath:filename isDirectory:&isDir] && isDir)
|
||||
{
|
||||
e = [[sender allowedFileTypes] objectEnumerator];
|
||||
while ((tempExtension = [e nextObject]) != nil)
|
||||
{
|
||||
tempList = [self filesWithExtension:tempExtension
|
||||
atPath:filename
|
||||
includeDirs:YES];
|
||||
if ([tempList count] > 0)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCFileManager (Misc)
|
||||
|
||||
/**
|
||||
* Returns YES if the file identified by `filename' is a text file,
|
||||
* otherwise returns NO.
|
||||
*
|
||||
* The test is one by reading the first 512 bytes of the file
|
||||
* and checking whether at least 90% of the data are printable
|
||||
* ASCII characters.
|
||||
*
|
||||
* Author Saso Kiselkov
|
||||
*/
|
||||
- (BOOL)isTextFile:(NSString *)filename
|
||||
{
|
||||
NSFileHandle *fh;
|
||||
NSData *data;
|
||||
NSUInteger i, printable = 0;
|
||||
NSString *content;
|
||||
NSCharacterSet *alpha = [NSCharacterSet alphanumericCharacterSet];
|
||||
NSCharacterSet *spaces = [NSCharacterSet whitespaceAndNewlineCharacterSet];
|
||||
NSCharacterSet *marks = [NSCharacterSet punctuationCharacterSet];
|
||||
|
||||
fh = [NSFileHandle fileHandleForReadingAtPath:filename];
|
||||
if (fh == nil)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
data = [fh readDataOfLength:512];
|
||||
if ([data length] == 0)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
content = [NSString stringWithContentsOfFile: filename];
|
||||
for (i = 0; i < [content length]; i++)
|
||||
{
|
||||
if ([alpha characterIsMember: [content characterAtIndex: i]] ||
|
||||
[spaces characterIsMember: [content characterAtIndex: i]] ||
|
||||
[marks characterIsMember: [content characterAtIndex: i]])
|
||||
{
|
||||
printable++;
|
||||
}
|
||||
}
|
||||
|
||||
return (((double) printable / i) > 0.9);
|
||||
}
|
||||
|
||||
- (NSArray *)filesWithExtension:(NSString *)extension
|
||||
atPath:(NSString *)dirPath
|
||||
includeDirs:(BOOL)incDirs
|
||||
{
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
NSMutableArray *filesList = [[NSMutableArray alloc] init];
|
||||
NSEnumerator *e = nil;
|
||||
NSString *temp = nil;
|
||||
BOOL isDir;
|
||||
|
||||
e = [[fm directoryContentsAtPath:dirPath] objectEnumerator];
|
||||
while ((temp = [e nextObject]) != nil)
|
||||
{
|
||||
if ([fm fileExistsAtPath:temp isDirectory:&isDir] && isDir && !incDirs)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ([[temp pathExtension] isEqual:extension])
|
||||
{
|
||||
[filesList addObject:[dirPath stringByAppendingPathComponent:temp]];
|
||||
}
|
||||
}
|
||||
|
||||
return [filesList autorelease];
|
||||
}
|
||||
|
||||
@end
|
133
Framework/PCFileNameField.m
Normal file
133
Framework/PCFileNameField.m
Normal file
|
@ -0,0 +1,133 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2000-2004 Free Software Foundation
|
||||
|
||||
Authors: Serg Stoyan
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import <ProjectCenter/PCFileNameField.h>
|
||||
|
||||
NSString *PCFileNameFieldNoFiles = @"No files selected";
|
||||
|
||||
@implementation PCFileNameField
|
||||
|
||||
- (void)setFont:(NSFont *)fontObject
|
||||
{
|
||||
NSLog(@"PCFNF: setFont");
|
||||
}
|
||||
|
||||
- (void)setEditableField:(BOOL)yn
|
||||
{
|
||||
NSRect frame = [self frame];
|
||||
NSRect fontFrame = [[self font] boundingRectForFont];
|
||||
|
||||
// NSLog (@"TF height: %f font height: %f",
|
||||
// frame.size.height, fontFrame.size.height);
|
||||
|
||||
if ([self textShouldSetEditable:[self stringValue]] == NO)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Correct self size wrt font bounding rect
|
||||
if (frame.size.height > fontFrame.size.height+3)
|
||||
{
|
||||
frame.origin.y += (frame.size.height - (fontFrame.size.height+3))/2;
|
||||
frame.size.height = fontFrame.size.height+3;
|
||||
}
|
||||
|
||||
if (yn == YES)
|
||||
{
|
||||
frame.size.width += 4;
|
||||
if ([self alignment] != NSRightTextAlignment)
|
||||
{
|
||||
frame.origin.x -= 4;
|
||||
}
|
||||
[self setFrame:frame];
|
||||
|
||||
[self setBordered:YES];
|
||||
[self setBackgroundColor:[NSColor whiteColor]];
|
||||
[self setEditable:YES];
|
||||
[self setNeedsDisplay:YES];
|
||||
[[self superview] setNeedsDisplay:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
frame.size.width -= 4;
|
||||
if ([self alignment] != NSRightTextAlignment)
|
||||
{
|
||||
frame.origin.x += 4;
|
||||
}
|
||||
[self setFrame:frame];
|
||||
|
||||
[self setBackgroundColor:[NSColor lightGrayColor]];
|
||||
[self setBordered:NO];
|
||||
[self setEditable:NO];
|
||||
[self setNeedsDisplay:YES];
|
||||
[[self superview] setNeedsDisplay:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)mouseDown:(NSEvent *)theEvent
|
||||
{
|
||||
[self setEditableField:YES];
|
||||
[super mouseDown:theEvent];
|
||||
}
|
||||
|
||||
- (void)setStringValue:(NSString *)aString
|
||||
{
|
||||
id delegate = [self delegate];
|
||||
SEL action = @selector(controlStringValueDidChange:);
|
||||
|
||||
[super setStringValue:aString];
|
||||
|
||||
if ([delegate respondsToSelector:action])
|
||||
{
|
||||
[delegate performSelector:action withObject:aString];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)textShouldSetEditable:(NSString *)text
|
||||
{
|
||||
id delegate = [self delegate];
|
||||
|
||||
if ([text isEqualToString:PCFileNameFieldNoFiles])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
if ([delegate respondsToSelector:@selector(textShouldSetEditable:)])
|
||||
{
|
||||
return [delegate textShouldSetEditable:text];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)textDidEndEditing:(NSNotification *)aNotification
|
||||
{
|
||||
[self setEditableField:NO];
|
||||
[super textDidEndEditing:aNotification];
|
||||
}
|
||||
|
||||
@end
|
||||
|
215
Framework/PCFileNameIcon.m
Normal file
215
Framework/PCFileNameIcon.m
Normal file
|
@ -0,0 +1,215 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2005 Free Software Foundation
|
||||
|
||||
Authors: Serg Stoyan
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCFileNameIcon.h>
|
||||
#import <ProjectCenter/PCProjectBrowser.h>
|
||||
|
||||
@implementation PCFileNameIcon
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
filePath = nil;
|
||||
[self setRefusesFirstResponder:YES];
|
||||
// [self setEditable:NO]; // prevents dragging
|
||||
// [self setImage:[NSImage imageNamed:@"ProjectCenter"]];
|
||||
[self
|
||||
registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(NSRect)frameRect
|
||||
{
|
||||
self = [super initWithFrame:frameRect];
|
||||
|
||||
filePath = nil;
|
||||
[self setRefusesFirstResponder:YES];
|
||||
// [self setEditable:NO]; // prevents dragging
|
||||
// [self setImage:[NSImage imageNamed:@"ProjectCenter"]];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEBUG
|
||||
NSLog (@"PCFileNameIcon: dealloc");
|
||||
#endif
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
RELEASE(fileNameField);
|
||||
RELEASE(delegate);
|
||||
RELEASE(filePath);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)setFileNameField:(NSTextField *)field
|
||||
{
|
||||
fileNameField = RETAIN(field);
|
||||
}
|
||||
|
||||
- (void)setDelegate:(id)object
|
||||
{
|
||||
ASSIGN(delegate, object);
|
||||
}
|
||||
|
||||
- (void)updateIcon
|
||||
{
|
||||
if (delegate)
|
||||
{
|
||||
if ([delegate respondsToSelector:@selector(fileNameIconImage)])
|
||||
{
|
||||
[self setImage:[delegate fileNameIconImage]];
|
||||
}
|
||||
if ((fileNameField != nil) &&
|
||||
[delegate respondsToSelector:@selector(fileNameIconTitle)])
|
||||
{
|
||||
[fileNameField setStringValue:[delegate fileNameIconTitle]];
|
||||
}
|
||||
if ([delegate respondsToSelector:@selector(fileNameIconPath)])
|
||||
{
|
||||
ASSIGN(filePath, [delegate fileNameIconPath]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- Drag and drop
|
||||
|
||||
- (void)mouseDown:(NSEvent *)theEvent
|
||||
{
|
||||
NSArray *fileList = [NSArray arrayWithObjects:filePath, nil];
|
||||
NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSDragPboard];
|
||||
NSPoint dragPosition;
|
||||
|
||||
[pboard declareTypes:[NSArray arrayWithObject:NSFilenamesPboardType]
|
||||
owner:nil];
|
||||
[pboard setPropertyList:fileList forType:NSFilenamesPboardType];
|
||||
|
||||
// Start the drag operation
|
||||
dragPosition = [self convertPoint:[theEvent locationInWindow]
|
||||
fromView:nil];
|
||||
dragPosition.x -= 16;
|
||||
dragPosition.y -= 16;
|
||||
|
||||
[self dragImage:[self image]
|
||||
at:dragPosition
|
||||
offset:NSZeroSize
|
||||
event:theEvent
|
||||
pasteboard:pboard
|
||||
source:self
|
||||
slideBack:YES];
|
||||
}
|
||||
|
||||
// --- NSDraggingDestination protocol methods
|
||||
// -- Before the image is released
|
||||
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
NSPasteboard *pb = [sender draggingPasteboard];
|
||||
NSArray *paths = [pb propertyListForType:NSFilenamesPboardType];
|
||||
NSDragOperation draggingOp = NSDragOperationNone;
|
||||
|
||||
// NSLog(@"Dragging entered: %@", paths);
|
||||
|
||||
if (![paths isKindOfClass:[NSArray class]] || [paths count] == 0)
|
||||
{
|
||||
return draggingOp;
|
||||
}
|
||||
|
||||
if (delegate &&
|
||||
[delegate respondsToSelector:@selector(canPerformDraggingOf:)] &&
|
||||
[delegate canPerformDraggingOf:paths] == YES)
|
||||
{
|
||||
draggingOp = NSDragOperationCopy;
|
||||
}
|
||||
|
||||
if (draggingOp == NSDragOperationCopy)
|
||||
{ // TODO: Change icon to icon that shows open state of destination
|
||||
}
|
||||
|
||||
return draggingOp;
|
||||
}
|
||||
|
||||
- (void)draggingExited:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
NSLog(@"Dragging exited");
|
||||
}
|
||||
|
||||
// -- After the image is released
|
||||
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
NSPasteboard *pb = [sender draggingPasteboard];
|
||||
NSArray *paths = [pb propertyListForType:NSFilenamesPboardType];
|
||||
|
||||
NSLog(@"Prepare for drag operation");
|
||||
|
||||
if (delegate &&
|
||||
[delegate respondsToSelector:@selector(prepareForDraggingOf:)])
|
||||
{
|
||||
return [delegate prepareForDraggingOf:paths];
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
NSPasteboard *pb = [sender draggingPasteboard];
|
||||
NSArray *paths = [pb propertyListForType:NSFilenamesPboardType];
|
||||
|
||||
NSLog(@"performDragOperation: %@", paths);
|
||||
|
||||
if (delegate &&
|
||||
[delegate respondsToSelector:@selector(performDraggingOf:)])
|
||||
{
|
||||
return [delegate performDraggingOf:paths];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
NSPasteboard *pb = [sender draggingPasteboard];
|
||||
NSArray *paths = [pb propertyListForType:NSFilenamesPboardType];
|
||||
|
||||
NSLog(@"Conclude drag operation");
|
||||
|
||||
if (delegate &&
|
||||
[delegate respondsToSelector:@selector(concludeDraggingOf:)])
|
||||
{
|
||||
[delegate concludeDraggingOf:paths];
|
||||
}
|
||||
}
|
||||
|
||||
// --- NSDraggingSource protocol methods
|
||||
|
||||
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
|
||||
{
|
||||
return NSDragOperationCopy;
|
||||
}
|
||||
|
||||
@end
|
||||
|
188
Framework/PCLogController.m
Normal file
188
Framework/PCLogController.m
Normal file
|
@ -0,0 +1,188 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2001 Free Software Foundation
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
|
||||
void
|
||||
PCLog(id sender, int tag, NSString* format, va_list args)
|
||||
{
|
||||
[[PCLogController sharedLogController]
|
||||
logMessage:[NSString stringWithFormat:format arguments: args]
|
||||
withTag:tag
|
||||
sender:sender];
|
||||
}
|
||||
|
||||
void
|
||||
PCLogInfo(id sender, NSString* format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
PCLog(sender, INFO, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
PCLogStatus(id sender, NSString* format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
PCLog(sender, STATUS, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
PCLogWarning(id sender, NSString* format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
PCLog(sender, WARNING, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
PCLogError(id sender, NSString* format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
PCLog(sender, ERROR, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
@implementation PCLogController
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Class methods
|
||||
// ===========================================================================
|
||||
|
||||
static PCLogController *_logCtrllr = nil;
|
||||
|
||||
+ (PCLogController *)sharedLogController
|
||||
{
|
||||
if (!_logCtrllr)
|
||||
{
|
||||
_logCtrllr = [[PCLogController alloc] init];
|
||||
}
|
||||
|
||||
return _logCtrllr;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Init and free
|
||||
// ===========================================================================
|
||||
|
||||
- (id)init
|
||||
{
|
||||
NSFont *font = nil;
|
||||
|
||||
if (!(self = [super init]))
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
if ([NSBundle loadNibNamed:@"LogPanel" owner:self] == NO)
|
||||
{
|
||||
NSLog(@"PCLogController[init]: error loading NIB file!");
|
||||
return nil;
|
||||
}
|
||||
|
||||
[panel setFrameAutosaveName:@"LogPanel"];
|
||||
if (![panel setFrameUsingName: @"LogPanel"])
|
||||
{
|
||||
[panel center];
|
||||
}
|
||||
|
||||
font = [NSFont userFixedPitchFontOfSize:[NSFont systemFontSize]];
|
||||
textAttributes =
|
||||
[NSMutableDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
|
||||
[textAttributes retain];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEVELOPMENT
|
||||
NSLog(@"PCLogController: dealloc");
|
||||
#endif
|
||||
RELEASE(textAttributes);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)showPanel
|
||||
{
|
||||
[panel makeKeyAndOrderFront:self];
|
||||
}
|
||||
|
||||
- (void)logMessage:(NSString *)text withTag:(int)tag sender:(id)sender;
|
||||
{
|
||||
NSString *messageText = nil;
|
||||
NSAttributedString *message = nil;
|
||||
|
||||
messageText =
|
||||
[NSString stringWithFormat:@" %@: %@\n",[sender className],text];
|
||||
|
||||
switch (tag)
|
||||
{
|
||||
case INFO:
|
||||
[textAttributes
|
||||
setObject:[NSColor colorWithDeviceRed:.0 green:.0 blue:.0 alpha:1.0]
|
||||
forKey:NSForegroundColorAttributeName];
|
||||
break;
|
||||
case STATUS:
|
||||
[textAttributes
|
||||
setObject:[NSColor colorWithDeviceRed:.0 green:.35 blue:.0 alpha:1.0]
|
||||
forKey:NSForegroundColorAttributeName];
|
||||
break;
|
||||
|
||||
case WARNING:
|
||||
[textAttributes
|
||||
setObject:[NSColor colorWithDeviceRed:.56 green:.45 blue:.0 alpha:1.0]
|
||||
forKey:NSForegroundColorAttributeName];
|
||||
break;
|
||||
|
||||
case ERROR:
|
||||
[textAttributes
|
||||
setObject:[NSColor colorWithDeviceRed:.63 green:.0 blue:.0 alpha:1.0]
|
||||
forKey:NSForegroundColorAttributeName];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
message = [[NSAttributedString alloc] initWithString:messageText
|
||||
attributes:textAttributes];
|
||||
[self putMessageOnScreen:message];
|
||||
}
|
||||
|
||||
- (void)putMessageOnScreen:(NSAttributedString *)message
|
||||
{
|
||||
[[textView textStorage] appendAttributedString:message];
|
||||
[textView scrollRangeToVisible:NSMakeRange([[textView string] length], 0)];
|
||||
}
|
||||
|
||||
@end
|
604
Framework/PCMakefileFactory.m
Normal file
604
Framework/PCMakefileFactory.m
Normal file
|
@ -0,0 +1,604 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2002-2014 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
Riccardo Mottola
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCProjectManager.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCMakefileFactory.h>
|
||||
|
||||
#import <Protocols/Preferences.h>
|
||||
#import "../Modules/Preferences/Build/PCBuildPrefs.h"
|
||||
|
||||
#define COMMENT_HEADERS @"\n\n#\n# Header files\n#\n"
|
||||
#define COMMENT_RESOURCES @"\n\n#\n# Resource files\n#\n"
|
||||
#define COMMENT_CLASSES @"\n\n#\n# Objective-C Class files\n#\n"
|
||||
#define COMMENT_OCPPCLASSES @"\n\n#\n# Objective-C++ Class files\n#\n"
|
||||
#define COMMENT_CFILES @"\n\n#\n# Other sources\n#\n"
|
||||
#define COMMENT_SUBPROJECTS @"\n\n#\n# Subprojects\n#\n"
|
||||
#define COMMENT_APP @"\n\n#\n# Main application\n#\n"
|
||||
#define COMMENT_LIBRARIES @"\n\n#\n# Additional libraries\n#\n"
|
||||
#define COMMENT_BUNDLE @"\n\n#\n# Bundle\n#\n"
|
||||
#define COMMENT_LIBRARY @"\n\n#\n# Library\n#\n"
|
||||
#define COMMENT_TOOL @"\n\n#\n# Tool\n#\n"
|
||||
#define COMMENT_LOCALIZATION @"\n\n#\n# Localization\n#\n"
|
||||
|
||||
@implementation PCMakefileFactory
|
||||
|
||||
static PCMakefileFactory *_factory = nil;
|
||||
|
||||
+ (PCMakefileFactory *)sharedFactory
|
||||
{
|
||||
static BOOL isInitialised = NO;
|
||||
|
||||
if (isInitialised == NO)
|
||||
{
|
||||
_factory = [[PCMakefileFactory alloc] init];
|
||||
|
||||
isInitialised = YES;
|
||||
}
|
||||
|
||||
return _factory;
|
||||
}
|
||||
|
||||
- (void) createMakefileForProject: (PCProject *)project
|
||||
{
|
||||
id <PCPreferences> prefs = [[project projectManager] prefController];
|
||||
NSString *buildDir = [prefs stringForKey:RootBuildDirectory];
|
||||
NSString *prName = [project projectName];
|
||||
NSString *buildName = [prName stringByAppendingPathExtension: @"build"];
|
||||
NSString *instDomain = [[project projectDict] objectForKey:PCInstallDomain];
|
||||
|
||||
NSAssert(prName, @"No project name given!");
|
||||
|
||||
AUTORELEASE(mfile);
|
||||
mfile = [[NSMutableString alloc] init];
|
||||
|
||||
AUTORELEASE(pnme);
|
||||
pnme = [prName copy];
|
||||
|
||||
[mfile appendString: @"#\n"];
|
||||
[mfile appendString: @"# GNUmakefile - Generated by ProjectCenter\n"];
|
||||
[mfile appendString: @"#\n"];
|
||||
|
||||
[mfile appendString: @"ifeq ($(GNUSTEP_MAKEFILES),)\n"];
|
||||
[mfile appendString: @" GNUSTEP_MAKEFILES := $(shell gnustep-config "];
|
||||
[mfile appendString: @"--variable=GNUSTEP_MAKEFILES 2>/dev/null)\n"];
|
||||
[mfile appendString: @" ifeq ($(GNUSTEP_MAKEFILES),)\n"];
|
||||
[mfile appendString: @" $(warning )\n"];
|
||||
[mfile appendString: @" $(warning Unable to obtain GNUSTEP_MAKEFILES"];
|
||||
[mfile appendString: @" setting from gnustep-config!)\n"];
|
||||
[mfile appendString: @" $(warning Perhaps gnustep-make is not properly"];
|
||||
[mfile appendString: @" installed,)\n"];
|
||||
[mfile appendString: @" $(warning so gnustep-config is not in your"];
|
||||
[mfile appendString: @" PATH.)\n"];
|
||||
[mfile appendString: @" $(warning )\n"];
|
||||
[mfile appendString: @" $(warning Your PATH is currently $(PATH))\n"];
|
||||
[mfile appendString: @" $(warning )\n"];
|
||||
[mfile appendString: @" endif\n"];
|
||||
[mfile appendString: @"endif\n"];
|
||||
[mfile appendString: @"ifeq ($(GNUSTEP_MAKEFILES),)\n"];
|
||||
[mfile appendString: @" $(error You need to set GNUSTEP_MAKEFILES"];
|
||||
[mfile appendString: @" before compiling!)\n"];
|
||||
[mfile appendString: @"endif\n"];
|
||||
|
||||
if ([instDomain isEqualToString: @"LOCAL"]
|
||||
|| [instDomain isEqualToString: @"SYSTEM"]
|
||||
|| [instDomain isEqualToString: @"USER"]
|
||||
|| [instDomain isEqualToString: @"NETWORK"])
|
||||
{
|
||||
[mfile appendString:
|
||||
[NSString stringWithFormat: @"\nGNUSTEP_INSTALLATION_DOMAIN = %@\n",
|
||||
instDomain]];
|
||||
}
|
||||
|
||||
/* If GNUSTEP_INSTALLATION_DOMAIN was not set explicitly by the
|
||||
* user, it should not be specified; gnustep-make will use the
|
||||
* default - normally, but not necessarily, LOCAL.
|
||||
*/
|
||||
|
||||
[mfile appendString: @"\ninclude $(GNUSTEP_MAKEFILES)/common.make\n"];
|
||||
|
||||
if (![buildDir isEqualToString: @""] && buildDir != nil)
|
||||
{
|
||||
[mfile appendString:
|
||||
[NSString stringWithFormat: @"\nGNUSTEP_BUILD_DIR = %@\n",
|
||||
[buildDir stringByAppendingPathComponent:buildName]]];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)createPreambleForProject:(PCProject *)project
|
||||
{
|
||||
NSMutableString *mfp = [[NSMutableString alloc] init];
|
||||
NSString *mfl = nil;
|
||||
NSArray *array = nil;
|
||||
NSDictionary *projectDict = [project projectDict];
|
||||
NSString *projectPath = [project projectPath];
|
||||
NSString *projectType = [project projectTypeName];
|
||||
|
||||
// Create the new file
|
||||
[mfp appendString: @"#\n"];
|
||||
[mfp appendString: @"# GNUmakefile.preamble - Generated by ProjectCenter\n"];
|
||||
[mfp appendString: @"#\n\n"];
|
||||
|
||||
// Preprocessor flags
|
||||
[mfp appendString: @"# Additional flags to pass to the preprocessor\n"];
|
||||
[mfp appendString:
|
||||
[NSString stringWithFormat: @"ADDITIONAL_CPPFLAGS += %@\n\n",
|
||||
[projectDict objectForKey:PCPreprocessorOptions]]];
|
||||
|
||||
// Objective C compiler flags
|
||||
[mfp appendString: @"# Additional flags to pass to Objective C compiler\n"];
|
||||
[mfp appendString:
|
||||
[NSString stringWithFormat: @"ADDITIONAL_OBJCFLAGS += %@\n\n",
|
||||
[projectDict objectForKey:PCObjCCompilerOptions]]];
|
||||
|
||||
// C compiler flags
|
||||
[mfp appendString: @"# Additional flags to pass to C compiler\n"];
|
||||
[mfp appendString:
|
||||
[NSString stringWithFormat: @"ADDITIONAL_CFLAGS += %@\n\n",
|
||||
[projectDict objectForKey:PCCompilerOptions]]];
|
||||
|
||||
// Linker flags
|
||||
[mfp appendString: @"# Additional flags to pass to the linker\n"];
|
||||
[mfp appendString:
|
||||
[NSString stringWithFormat: @"ADDITIONAL_LDFLAGS += %@ ",
|
||||
[projectDict objectForKey:PCLinkerOptions]]];
|
||||
[mfp appendString: @"\n\n"];
|
||||
|
||||
// Directories where to search headers
|
||||
[mfp appendString:
|
||||
@"# Additional include directories the compiler should search\n"];
|
||||
[mfp appendString: @"ADDITIONAL_INCLUDE_DIRS += "];
|
||||
array = [projectDict objectForKey:PCSearchHeaders];
|
||||
if (array && [array count])
|
||||
{
|
||||
NSString *tmp;
|
||||
NSEnumerator *enumerator = [array objectEnumerator];
|
||||
|
||||
while ((tmp = [enumerator nextObject]))
|
||||
{
|
||||
[mfp appendString: [NSString stringWithFormat: @"-I%@ ",tmp]];
|
||||
}
|
||||
}
|
||||
[mfp appendString: @"\n\n"];
|
||||
|
||||
// Directories where to search libraries
|
||||
[mfp appendString:
|
||||
@"# Additional library directories the linker should search\n"];
|
||||
[mfp appendString: @"ADDITIONAL_LIB_DIRS += "];
|
||||
array = [projectDict objectForKey:PCSearchLibs];
|
||||
if (array && [array count])
|
||||
{
|
||||
NSString *tmp;
|
||||
NSEnumerator *enumerator = [array objectEnumerator];
|
||||
|
||||
while ((tmp = [enumerator nextObject]))
|
||||
{
|
||||
[mfp appendString: [NSString stringWithFormat: @"-L%@ ",tmp]];
|
||||
}
|
||||
}
|
||||
[mfp appendString: @"\n\n"];
|
||||
|
||||
// [mfp appendString: [projectDict objectForKey:PCLibraries]];
|
||||
|
||||
if ([projectType isEqualToString: @"Tool"])
|
||||
{
|
||||
// Additional TOOL libraries
|
||||
[mfp appendString: @"# Additional TOOL libraries to link\n"];
|
||||
[mfp appendString: @"ADDITIONAL_TOOL_LIBS += "];
|
||||
array = [projectDict objectForKey:PCLibraries];
|
||||
if (array && [array count])
|
||||
{
|
||||
NSString *tmp;
|
||||
NSEnumerator *enumerator = [array objectEnumerator];
|
||||
|
||||
while ((tmp = [enumerator nextObject]))
|
||||
{
|
||||
if (![tmp isEqualToString: @"gnustep-base"])
|
||||
{
|
||||
[mfp appendString: [NSString stringWithFormat: @"-l%@ ",tmp]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Additional GUI libraries
|
||||
// TODO: Let the user select objc, base, gui libraries/frameworks
|
||||
// on the gui - the following works well for GUI stuff only.
|
||||
[mfp appendString: @"# Additional GUI libraries to link\n"];
|
||||
[mfp appendString: @"ADDITIONAL_GUI_LIBS += "];
|
||||
array = [projectDict objectForKey:PCLibraries];
|
||||
if (array && [array count])
|
||||
{
|
||||
NSString *tmp;
|
||||
NSEnumerator *enumerator = [array objectEnumerator];
|
||||
|
||||
while ((tmp = [enumerator nextObject]))
|
||||
{
|
||||
if (![tmp isEqualToString: @"gnustep-base"] &&
|
||||
![tmp isEqualToString: @"gnustep-gui"])
|
||||
{
|
||||
[mfp appendString: [NSString stringWithFormat: @"-l%@ ",tmp]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[mfp appendString: @"\n\n"];
|
||||
|
||||
// Write the new file to disc!
|
||||
mfl = [projectPath stringByAppendingPathComponent: @"GNUmakefile.preamble"];
|
||||
if (![mfp writeToFile:mfl atomically:YES])
|
||||
{
|
||||
NSRunAlertPanel(@"Create Makefile",
|
||||
@"Couldn't create %@",
|
||||
@"Ok",nil,nil, mfl);
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)createPostambleForProject:(PCProject *)project
|
||||
{
|
||||
NSBundle *bundle = nil;
|
||||
NSString *template = nil;
|
||||
NSString *postamble = nil;
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
|
||||
bundle = [NSBundle bundleForClass: [self class]];
|
||||
template = [bundle pathForResource: @"postamble" ofType: @"template"];
|
||||
postamble = [[project projectPath]
|
||||
stringByAppendingPathComponent: @"GNUmakefile.postamble"];
|
||||
|
||||
if (![fm copyPath:template toPath:postamble handler:nil])
|
||||
{
|
||||
NSRunAlertPanel(@"Create Makefile",
|
||||
@"Couldn't create %@",
|
||||
@"Ok",nil,nil, postamble);
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)appendString:(NSString *)aString
|
||||
{
|
||||
NSAssert(mfile, @"No valid makefile available!");
|
||||
NSAssert(aString, @"No valid string!");
|
||||
|
||||
[mfile appendString:aString];
|
||||
}
|
||||
|
||||
- (void)appendLibraries:(NSArray *)array
|
||||
{
|
||||
NSMutableArray *libs = [NSMutableArray arrayWithArray:array];
|
||||
NSString *lib = nil;
|
||||
NSEnumerator *enumerator = nil;
|
||||
|
||||
[libs removeObject: @"gnustep-base"];
|
||||
[libs removeObject: @"gnustep-gui"];
|
||||
|
||||
if (libs == nil || [libs count] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[self appendString: @"\n\n#\n# Libraries\n#\n"];
|
||||
[self appendString:
|
||||
[NSString stringWithFormat: @"%@_LIBRARIES_DEPEND_UPON += ",pnme]];
|
||||
|
||||
enumerator = [libs objectEnumerator];
|
||||
while ((lib = [enumerator nextObject]))
|
||||
{
|
||||
[self appendString: [NSString stringWithFormat: @"-l%@ ",lib]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)appendHeaders:(NSArray *)array
|
||||
{
|
||||
if (array == nil || [array count] == 0)
|
||||
return;
|
||||
|
||||
[self appendHeaders:array forTarget:pnme];
|
||||
}
|
||||
|
||||
- (void)appendHeaders:(NSArray *)array forTarget:(NSString *)target
|
||||
{
|
||||
if (array == nil || [array count] == 0)
|
||||
return;
|
||||
|
||||
[self appendString:COMMENT_HEADERS];
|
||||
[self appendString:
|
||||
[NSString stringWithFormat: @"%@_HEADER_FILES = \\\n", target]];
|
||||
|
||||
[self appendString: [array componentsJoinedByString: @" \\\n"]];
|
||||
}
|
||||
|
||||
- (void)appendClasses:(NSArray *)array
|
||||
{
|
||||
if (array == nil || [array count] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[self appendClasses:array forTarget:pnme];
|
||||
}
|
||||
|
||||
- (void)appendClasses:(NSArray *)array forTarget:(NSString *)target
|
||||
{
|
||||
NSEnumerator *oenum;
|
||||
NSMutableArray *marray = nil;
|
||||
NSMutableArray *mmarray = nil;
|
||||
NSString *file;
|
||||
|
||||
if (array == nil || [array count] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
oenum = [array objectEnumerator];
|
||||
while ((file = [oenum nextObject]))
|
||||
{
|
||||
if ([file hasSuffix: @".m"])
|
||||
{
|
||||
if (marray == nil)
|
||||
{
|
||||
marray = [NSMutableArray array];
|
||||
}
|
||||
[marray addObject: file];
|
||||
}
|
||||
else if ([file hasSuffix: @".mm"])
|
||||
{
|
||||
if (mmarray == nil)
|
||||
{
|
||||
mmarray = [NSMutableArray array];
|
||||
}
|
||||
[mmarray addObject: file];
|
||||
}
|
||||
}
|
||||
|
||||
if (marray)
|
||||
{
|
||||
[self appendString:COMMENT_CLASSES];
|
||||
[self appendString: [NSString stringWithFormat: @"%@_OBJC_FILES = \\\n",target]];
|
||||
[self appendString: [marray componentsJoinedByString: @" \\\n"]];
|
||||
}
|
||||
|
||||
if (mmarray)
|
||||
{
|
||||
[self appendString:COMMENT_OCPPCLASSES];
|
||||
[self appendString: [NSString stringWithFormat: @"%@_OBJCC_FILES = \\\n",target]];
|
||||
[self appendString: [mmarray componentsJoinedByString: @" \\\n"]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)appendOtherSources:(NSArray *)array
|
||||
{
|
||||
if (array == nil || [array count] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[self appendOtherSources: array forTarget: pnme];
|
||||
}
|
||||
|
||||
- (void)appendOtherSources:(NSArray *)array forTarget: (NSString *)target
|
||||
{
|
||||
NSMutableArray *marray = nil;
|
||||
NSMutableArray *mmarray = nil;
|
||||
NSMutableArray *oarray = nil;
|
||||
NSEnumerator *oenum;
|
||||
NSString *file;
|
||||
|
||||
if (array == nil || [array count] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Other Sources can have both .m files and non .m files
|
||||
oenum = [array objectEnumerator];
|
||||
while ((file = [oenum nextObject]))
|
||||
{
|
||||
if ([file hasSuffix: @".m"])
|
||||
{
|
||||
if (marray == nil)
|
||||
{
|
||||
marray = [NSMutableArray array];
|
||||
}
|
||||
[marray addObject: file];
|
||||
}
|
||||
else if ([file hasSuffix: @".mm"])
|
||||
{
|
||||
if (mmarray == nil)
|
||||
{
|
||||
mmarray = [NSMutableArray array];
|
||||
}
|
||||
[mmarray addObject: file];
|
||||
}
|
||||
else // non .m file
|
||||
{
|
||||
if (oarray == nil)
|
||||
{
|
||||
oarray = [NSMutableArray array];
|
||||
}
|
||||
[oarray addObject: file];
|
||||
}
|
||||
}
|
||||
|
||||
[self appendString:COMMENT_CFILES];
|
||||
|
||||
// Add other sources if any
|
||||
if (oarray && [oarray count] != 0)
|
||||
{
|
||||
oenum = [oarray objectEnumerator];
|
||||
|
||||
[self appendString: [NSString stringWithFormat: @"%@_C_FILES = ", target]];
|
||||
|
||||
while ((file = [oenum nextObject]))
|
||||
{
|
||||
[self appendString: [NSString stringWithFormat: @"\\\n%@ ",file]];
|
||||
}
|
||||
[self appendString: @"\n\n"];
|
||||
}
|
||||
|
||||
// Add .m files if any
|
||||
if (marray && [marray count] != 0)
|
||||
{
|
||||
oenum = [marray objectEnumerator];
|
||||
|
||||
[self appendString: [NSString stringWithFormat: @"%@_OBJC_FILES += ",pnme]];
|
||||
|
||||
while ((file = [oenum nextObject]))
|
||||
{
|
||||
[self appendString: [NSString stringWithFormat: @"\\\n%@ ", file]];
|
||||
}
|
||||
}
|
||||
|
||||
// Add .mm files if any
|
||||
if (mmarray && [marray count] != 0)
|
||||
{
|
||||
oenum = [mmarray objectEnumerator];
|
||||
|
||||
[self appendString: [NSString stringWithFormat: @"%@_OBJCC_FILES += ",pnme]];
|
||||
|
||||
while ((file = [oenum nextObject]))
|
||||
{
|
||||
[self appendString: [NSString stringWithFormat: @"\\\n%@ ", file]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)appendResources:(NSArray *)array inDir:(NSString *)dir
|
||||
{
|
||||
int i = 0;
|
||||
int count = [array count];
|
||||
NSString *string = nil;
|
||||
NSString *item = nil;
|
||||
NSString *eol = @"\\\n";
|
||||
|
||||
if (array == nil || count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Header
|
||||
[self appendString:COMMENT_RESOURCES];
|
||||
[self appendString:
|
||||
[NSString stringWithFormat: @"%@_RESOURCE_FILES = \\\n",pnme]];
|
||||
|
||||
// Items
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
item = [array objectAtIndex:i];
|
||||
string = [NSString stringWithFormat: @"%@/%@ %@", dir, item, eol];
|
||||
[self appendString:string];
|
||||
if (i == (count-2))
|
||||
{
|
||||
eol = @"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)appendResourceItems:(NSArray *)array
|
||||
{
|
||||
if (array == nil || [array count] <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[self appendString: @"\\\n"];
|
||||
[self appendString: [array componentsJoinedByString: @" \\\n"]];
|
||||
}
|
||||
|
||||
- (void)appendLocalizedResources:(NSArray *)resources
|
||||
forLanguages:(NSArray *)languages
|
||||
{
|
||||
NSString *langs = [languages componentsJoinedByString: @" "];
|
||||
NSString *string = nil;
|
||||
NSString *item = nil;
|
||||
NSString *eol = @"\\\n";
|
||||
int i = 0;
|
||||
int count = [resources count];
|
||||
|
||||
if (resources == nil || count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Header
|
||||
[self appendString:COMMENT_LOCALIZATION];
|
||||
|
||||
// Languages
|
||||
string = [NSString stringWithFormat: @"%@_LANGUAGES = %@\n", pnme, langs];
|
||||
[self appendString:string];
|
||||
|
||||
// Items
|
||||
[self appendString:
|
||||
[NSString stringWithFormat: @"%@_LOCALIZED_RESOURCE_FILES = \\\n",pnme]];
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if (i == (count-1))
|
||||
{
|
||||
eol = @"\n";
|
||||
}
|
||||
item = [resources objectAtIndex:i];
|
||||
string = [NSString stringWithFormat: @"%@ %@", item, eol];
|
||||
[self appendString:string];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)appendSubprojects:(NSArray*)array
|
||||
{
|
||||
NSString *tmp = nil;
|
||||
NSEnumerator *enumerator = nil;
|
||||
|
||||
if (array == nil || [array count] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[self appendString:COMMENT_SUBPROJECTS];
|
||||
[self appendString: @"SUBPROJECTS = "];
|
||||
|
||||
enumerator = [array objectEnumerator];
|
||||
while ((tmp = [enumerator nextObject]))
|
||||
{
|
||||
tmp = [tmp stringByAppendingPathExtension: @"subproj"];
|
||||
[self appendString: [NSString stringWithFormat: @"\\\n%@ ",tmp]];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSData *)encodedMakefile
|
||||
{
|
||||
NSAssert(mfile, @"No valid makefile available!");
|
||||
|
||||
return [mfile dataUsingEncoding: [NSString defaultCStringEncoding]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
1853
Framework/PCProject.m
Normal file
1853
Framework/PCProject.m
Normal file
File diff suppressed because it is too large
Load diff
778
Framework/PCProjectBrowser.m
Normal file
778
Framework/PCProjectBrowser.m
Normal file
|
@ -0,0 +1,778 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2000-2004 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
#import <ProjectCenter/PCProjectManager.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCProjectBrowser.h>
|
||||
#import <ProjectCenter/PCProjectEditor.h>
|
||||
#import <ProjectCenter/PCFileNameField.h>
|
||||
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
|
||||
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
|
||||
|
||||
NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
|
||||
|
||||
@implementation PCProjectBrowser
|
||||
|
||||
// ============================================================================
|
||||
// ==== Intialization & deallocation
|
||||
// ============================================================================
|
||||
|
||||
- (id)initWithProject:(PCProject *)aProject
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
project = aProject;
|
||||
|
||||
browser = [[NSBrowser alloc] initWithFrame:NSMakeRect(-10,-10,256,128)];
|
||||
[browser setRefusesFirstResponder:YES];
|
||||
// [browser setAutoresizingMask: NSViewWidthSizable | NSViewMinYMargin];
|
||||
[browser setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
||||
[browser setTitled:NO];
|
||||
[browser setMaxVisibleColumns:4];
|
||||
[browser setSeparatesColumns:NO];
|
||||
[browser setAllowsMultipleSelection:YES];
|
||||
[browser setDelegate:self];
|
||||
[browser setTarget:self];
|
||||
[browser setAction:@selector(click:)];
|
||||
[browser setDoubleAction:@selector(doubleClick:)];
|
||||
[browser setRefusesFirstResponder:YES];
|
||||
[browser loadColumnZero];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(projectDictDidChange:)
|
||||
name:PCProjectDictDidChangeNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEVELOPMENT
|
||||
NSLog (@"PCProjectBrowser: dealloc");
|
||||
#endif
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
RELEASE(browser);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// ==== Accessory methods
|
||||
// ============================================================================
|
||||
|
||||
- (NSView *)view
|
||||
{
|
||||
return browser;
|
||||
}
|
||||
|
||||
// Returns nil if multiple files or category selected
|
||||
- (NSString *)nameOfSelectedFile
|
||||
{
|
||||
NSString *name = [[browser path] lastPathComponent];
|
||||
NSString *category = [self nameOfSelectedCategory];
|
||||
NSMutableArray *pathArray;
|
||||
NSEnumerator *enumerator;
|
||||
NSString *pathItem;
|
||||
|
||||
// NSLog(@"---> Selected: %@: category: %@", name, category);
|
||||
|
||||
if ([[browser selectedCells] count] != 1 ||
|
||||
!category ||
|
||||
[name isEqualToString:category])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
pathArray = [[[browser path] pathComponents] mutableCopy];
|
||||
enumerator = [pathArray objectEnumerator];
|
||||
while ((pathItem = [enumerator nextObject]))
|
||||
{
|
||||
if ([pathItem isEqualToString:category])
|
||||
{
|
||||
name = [enumerator nextObject];
|
||||
break;
|
||||
}
|
||||
}
|
||||
RELEASE(pathArray);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
// Returns nil if multiple files selected
|
||||
- (NSString *)pathToSelectedFile
|
||||
{
|
||||
NSString *name = [self nameOfSelectedFile];
|
||||
NSString *path = [browser path];
|
||||
|
||||
if (!name)
|
||||
{
|
||||
path = nil;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
// Returns 'nil' if selected:
|
||||
// - root project (browser path is @"/")
|
||||
// - multiple categories
|
||||
// - name of subproject
|
||||
// Should not call any of the nameOf... or pathTo... methods to prevent
|
||||
// cyclic recursion.
|
||||
- (NSString *)nameOfSelectedCategory
|
||||
{
|
||||
NSArray *pathArray = [[browser path] componentsSeparatedByString:@"/"];
|
||||
NSString *lastPathElement = [[browser path] lastPathComponent];
|
||||
PCProject *activeProject = [[project projectManager] activeProject];
|
||||
NSArray *rootCategories = [activeProject rootCategories];
|
||||
NSString *name = nil;
|
||||
int i;
|
||||
|
||||
// Name of subproject selected: Change active project to superproject
|
||||
// to check category against superproject's catgory list.
|
||||
// But: path '/Subproject/Foo' and '/Subprojects/Foo/Subprojects' will
|
||||
// return the same category 'Subprojects' and active project will be 'Foo'
|
||||
// in both cases
|
||||
// ![[self nameOfSelectedFile] isEqualToString:lastPathElement])
|
||||
/* if ([lastPathElement isEqualToString:[activeProject projectName]])
|
||||
{
|
||||
activeProject = [activeProject superProject];
|
||||
rootCategories = [activeProject rootCategories];
|
||||
}*/
|
||||
|
||||
// Multiple categories selected
|
||||
if (([rootCategories containsObject:lastPathElement]
|
||||
&& [[browser selectedCells] count] > 1))
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
for (i = [pathArray count] - 1; i >= 0; i--)
|
||||
{
|
||||
if ([rootCategories containsObject:[pathArray objectAtIndex:i]])
|
||||
{
|
||||
name = [pathArray objectAtIndex:i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Subproject's name selected
|
||||
if ([name isEqualToString:@"Subprojects"] &&
|
||||
[lastPathElement isEqualToString:[activeProject projectName]])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
// Returns nil of multiple categories selected
|
||||
- (NSString *)pathToSelectedCategory
|
||||
{
|
||||
NSString *path = nil;
|
||||
NSString *selectedCategory = [self nameOfSelectedCategory];
|
||||
NSMutableArray *bPathArray = nil;
|
||||
int i;
|
||||
|
||||
if (selectedCategory)
|
||||
{
|
||||
bPathArray = [NSMutableArray arrayWithArray:[[browser path]
|
||||
componentsSeparatedByString:@"/"]];
|
||||
i = [bPathArray count] - 1;
|
||||
while (![[bPathArray objectAtIndex:i] isEqualToString:selectedCategory])
|
||||
{
|
||||
[bPathArray removeObjectAtIndex:i];
|
||||
i = [bPathArray count] - 1;
|
||||
}
|
||||
path = [bPathArray componentsJoinedByString:@"/"];
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
// Returns nil of multiple categories selected
|
||||
- (NSString *)pathFromSelectedCategory
|
||||
{
|
||||
NSString *selectedCategory = [self nameOfSelectedCategory];
|
||||
NSMutableArray *bPathArray;
|
||||
NSString *path = nil;
|
||||
|
||||
if (selectedCategory)
|
||||
{
|
||||
bPathArray =
|
||||
[[[browser path] componentsSeparatedByString:@"/"] mutableCopy];
|
||||
while (![[bPathArray objectAtIndex:1] isEqualToString:selectedCategory])
|
||||
{
|
||||
[bPathArray removeObjectAtIndex:1];
|
||||
}
|
||||
path = [bPathArray componentsJoinedByString:@"/"];
|
||||
RELEASE(bPathArray);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
- (NSString *)nameOfSelectedRootCategory
|
||||
{
|
||||
NSString *categoryPath = [self pathToSelectedCategory];
|
||||
NSArray *pathComponents;
|
||||
|
||||
if ([categoryPath isEqualToString:@"/"] || [categoryPath isEqualToString:@""])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
pathComponents = [categoryPath componentsSeparatedByString:@"/"];
|
||||
|
||||
return [pathComponents objectAtIndex:1];
|
||||
}
|
||||
|
||||
- (NSArray *)selectedFiles
|
||||
{
|
||||
NSArray *cells = [browser selectedCells];
|
||||
NSMutableArray *files = [[NSMutableArray alloc] initWithCapacity: 1];
|
||||
int i;
|
||||
int count = [cells count];
|
||||
PCProject *activeProject = [[project projectManager] activeProject];
|
||||
|
||||
// Return nil if categories selected
|
||||
if ([cells count] == 0
|
||||
|| [[activeProject rootCategories]
|
||||
containsObject:[[cells objectAtIndex:0] stringValue]])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
[files addObject: [[cells objectAtIndex: i] stringValue]];
|
||||
}
|
||||
|
||||
return AUTORELEASE((NSArray *)files);
|
||||
}
|
||||
|
||||
- (NSString *)path
|
||||
{
|
||||
return [browser path];
|
||||
}
|
||||
|
||||
- (BOOL)setPath:(NSString *)path
|
||||
{
|
||||
BOOL res;
|
||||
|
||||
if ([[browser path] isEqualToString: path])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
// PCLogInfo(self, @"[setPath]: %@", path);
|
||||
|
||||
res = [browser setPath:path];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:PCBrowserDidSetPathNotification
|
||||
object:self];
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
- (void)reloadLastColumnAndNotify:(BOOL)yn
|
||||
{
|
||||
NSInteger column = [browser lastColumn];
|
||||
NSString *category = [self nameOfSelectedCategory];
|
||||
NSInteger selectedColumn = [browser selectedColumn];
|
||||
NSMatrix *colMatrix = [browser matrixInColumn:selectedColumn];
|
||||
NSInteger rowCount = 0, colCount = 0, spCount = 0;
|
||||
PCProject *activeProject = [[project projectManager] activeProject];
|
||||
NSString *selCellTitle = [[browser selectedCell] stringValue];
|
||||
|
||||
if ([category isEqualToString:@"Subprojects"]
|
||||
&& ![selCellTitle isEqualToString:@"Subprojects"])
|
||||
{ // /Subprojects/Name selected
|
||||
if ([selCellTitle isEqualToString:[activeProject projectName]])
|
||||
{
|
||||
activeProject = [activeProject superProject];
|
||||
}
|
||||
[colMatrix getNumberOfRows:&rowCount columns:&colCount];
|
||||
spCount = [[[activeProject projectDict]
|
||||
objectForKey:PCSubprojects] count];
|
||||
}
|
||||
|
||||
if ([category isEqualToString:@"Subprojects"] && rowCount != spCount
|
||||
&& ![[[browser selectedCell] stringValue] isEqualToString:@"Subprojects"])
|
||||
{
|
||||
column = selectedColumn;
|
||||
}
|
||||
|
||||
[browser reloadColumn:column];
|
||||
|
||||
if (yn)
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:PCBrowserDidSetPathNotification
|
||||
object:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)reloadLastColumnAndSelectFile:(NSString *)file
|
||||
{
|
||||
PCProject *p = [[project projectManager] activeProject];
|
||||
NSString *catKey = [p keyForCategory:[self nameOfSelectedCategory]];
|
||||
NSArray *array = [[p projectDict] objectForKey:catKey];
|
||||
NSString *path = [self path];
|
||||
NSString *tmp;
|
||||
|
||||
// Determine last column with files (removing classes and methods from path)
|
||||
tmp = [[path lastPathComponent] substringWithRange:NSMakeRange(0,1)];
|
||||
while ([tmp isEqualToString:@"@"] // classes
|
||||
|| [tmp isEqualToString:@"+"] // factory methods
|
||||
|| [tmp isEqualToString:@"-"]) // instance methods
|
||||
{
|
||||
path = [path stringByDeletingLastPathComponent];
|
||||
tmp = [[path lastPathComponent] substringWithRange:NSMakeRange(0,1)];
|
||||
}
|
||||
|
||||
NSLog(@"PCBrowser set path: %@", path);
|
||||
[self setPath:[path stringByDeletingLastPathComponent]];
|
||||
[self reloadLastColumnAndNotify:NO];
|
||||
|
||||
[browser selectRow:[array indexOfObject:file] inColumn:[browser lastColumn]];
|
||||
|
||||
// Notify
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:PCBrowserDidSetPathNotification
|
||||
object:self];
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// ==== Actions
|
||||
// ============================================================================
|
||||
|
||||
- (void)click:(id)sender
|
||||
{
|
||||
NSString *category;
|
||||
PCProject *activeProject;
|
||||
NSString *browserPath;
|
||||
NSString *filePath;
|
||||
NSString *fileName;
|
||||
|
||||
if (sender != browser)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
category = [self nameOfSelectedCategory];
|
||||
activeProject = [[project projectManager] activeProject];
|
||||
browserPath = [self path];
|
||||
filePath = [self pathToSelectedFile];
|
||||
fileName = [self nameOfSelectedFile];
|
||||
|
||||
NSLog(@"[click] category: %@ forProject: %@ fileName: %@",
|
||||
category, [activeProject projectName], fileName);
|
||||
|
||||
// ![fileName isEqualToString:[activeProject projectName]] &&
|
||||
if (filePath &&
|
||||
[filePath isEqualToString:browserPath] &&
|
||||
category &&
|
||||
![category isEqualToString:@"Libraries"]
|
||||
)
|
||||
{
|
||||
NSLog(@"[click] category: %@ filePath: %@", category, filePath);
|
||||
[[activeProject projectEditor] openEditorForCategoryPath:browserPath
|
||||
windowed:NO];
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:PCBrowserDidSetPathNotification
|
||||
object:self];
|
||||
}
|
||||
|
||||
- (void)doubleClick:(id)sender
|
||||
{
|
||||
NSString *category = [self nameOfSelectedCategory];
|
||||
id selectedCell;
|
||||
NSString *fileName;
|
||||
PCProject *activeProject;
|
||||
NSString *key;
|
||||
NSString *filePath;
|
||||
id <PCPreferences> prefs = [[project projectManager] prefController];
|
||||
NSWorkspace *workspace;
|
||||
NSString *appName, *type;
|
||||
|
||||
if ((sender != browser) || [category isEqualToString:@"Libraries"])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
selectedCell = [sender selectedCell];
|
||||
fileName = [[sender selectedCell] stringValue];
|
||||
activeProject = [[project projectManager] activeProject];
|
||||
key = [activeProject keyForCategory:category];
|
||||
filePath = [activeProject pathForFile:fileName forKey:key];
|
||||
|
||||
if ([self nameOfSelectedFile] != nil)
|
||||
{
|
||||
BOOL foundFile = NO;
|
||||
BOOL foundApp = NO;
|
||||
// PCLogInfo(self, @"{doubleClick} filePath: %@", filePath);*/
|
||||
|
||||
workspace = [NSWorkspace sharedWorkspace];
|
||||
foundFile = [workspace getInfoForFile:filePath
|
||||
application:&appName
|
||||
type:&type];
|
||||
foundApp = foundFile && appName;
|
||||
// NSLog (@"Open file: %@ with app: %@", filePath, appName);
|
||||
|
||||
// If 'Editor' role was set in .GNUstepExtPrefs application
|
||||
// name will be returned according that setting. Otherwise
|
||||
// 'ProjectCenter.app' will be returned accoring to NSTypes
|
||||
// from Info-gnustep.plist file of PC.
|
||||
if(foundApp == NO || [appName isEqualToString:@"ProjectCenter.app"])
|
||||
{
|
||||
appName = [prefs stringForKey:Editor];
|
||||
|
||||
if (![appName isEqualToString:@"ProjectCenter"])
|
||||
{
|
||||
[workspace openFile:filePath
|
||||
withApplication:appName];
|
||||
}
|
||||
else
|
||||
{
|
||||
[[activeProject projectEditor]
|
||||
openEditorForCategoryPath:[self path]
|
||||
windowed:YES];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[workspace openFile:filePath];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([[selectedCell title] isEqualToString:@"Subprojects"])
|
||||
{
|
||||
[[project projectManager] addSubproject];
|
||||
}
|
||||
else
|
||||
{
|
||||
[[project projectManager] addProjectFiles];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// ==== Notifications
|
||||
// ============================================================================
|
||||
|
||||
- (void)projectDictDidChange:(NSNotification *)aNotif
|
||||
{
|
||||
NSDictionary *notifObject = [aNotif object];
|
||||
PCProject *changedProject = [notifObject objectForKey:@"Project"];
|
||||
NSString *changedAttribute = [notifObject objectForKey:@"Attribute"];
|
||||
|
||||
if (!browser)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (changedProject != project
|
||||
&& changedProject != [project activeSubproject]
|
||||
&& [changedProject superProject] != [project activeSubproject])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// NSLog(@"PCPB: projectDictDidChange in %@ (%@)",
|
||||
// [changedProject projectName], [project projectName]);
|
||||
|
||||
// If project dictionary changed after files adding/removal,
|
||||
// refresh file list
|
||||
if ([[changedProject rootKeys] containsObject:changedAttribute])
|
||||
{
|
||||
[self reloadLastColumnAndNotify:YES];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCProjectBrowser (ProjectBrowserDelegate)
|
||||
|
||||
- (void) browser:(NSBrowser *)sender
|
||||
createRowsForColumn:(NSInteger)column
|
||||
inMatrix:(NSMatrix *)matrix
|
||||
{
|
||||
NSString *pathToCol;
|
||||
NSArray *files;
|
||||
NSUInteger i = 0;
|
||||
NSUInteger count = 0;
|
||||
|
||||
if (sender != browser || !matrix || ![matrix isKindOfClass:[NSMatrix class]])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pathToCol = [sender pathToColumn:column];
|
||||
files = [project contentAtCategoryPath:pathToCol];
|
||||
if (files)
|
||||
{
|
||||
count = [files count];
|
||||
}
|
||||
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
NSMutableString *categoryPath = nil;
|
||||
id cell;
|
||||
|
||||
categoryPath = [NSMutableString stringWithString:pathToCol];
|
||||
|
||||
[matrix insertRow:i];
|
||||
|
||||
cell = [matrix cellAtRow:i column:0];
|
||||
[cell setStringValue:[files objectAtIndex:i]];
|
||||
|
||||
if (![categoryPath isEqualToString:@"/"])
|
||||
{
|
||||
[categoryPath appendString:@"/"];
|
||||
}
|
||||
[categoryPath appendString:[files objectAtIndex:i]];
|
||||
|
||||
[cell setLeaf:![project hasChildrenAtCategoryPath:categoryPath]];
|
||||
[cell setRefusesFirstResponder:YES];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCProjectBrowser (FileNameIconDelegate)
|
||||
|
||||
// If file was opened in editor:
|
||||
// 1. Determine editor
|
||||
// 2. Ask editor for icon
|
||||
- (NSImage *)_editorIconImageForFile:(NSString *)fileName
|
||||
{
|
||||
PCProjectEditor *projectEditor = [project projectEditor];
|
||||
id<CodeEditor> editor = nil;
|
||||
NSString *categoryName = [self nameOfSelectedCategory];
|
||||
NSString *categoryKey = [project keyForCategory:categoryName];
|
||||
NSString *filePath;
|
||||
|
||||
filePath = [project pathForFile:fileName forKey:categoryKey];
|
||||
editor = [projectEditor editorForFile:filePath];
|
||||
if (editor != nil)
|
||||
{
|
||||
return [editor fileIcon];
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSImage *)fileNameIconImage
|
||||
{
|
||||
NSString *categoryName = nil;
|
||||
NSString *fileName = nil;
|
||||
NSString *iconName = nil;
|
||||
NSImage *icon = nil;
|
||||
PCProject *activeProject = [[project projectManager] activeProject];
|
||||
|
||||
fileName = [self nameOfSelectedFile];
|
||||
if (fileName)
|
||||
{
|
||||
if ((icon = [self _editorIconImageForFile:fileName]))
|
||||
{
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
categoryName = [self nameOfSelectedCategory];
|
||||
}
|
||||
|
||||
/* PCLogError(self,@"{setFileIcon} file %@ category %@",
|
||||
fileName, categoryName);*/
|
||||
|
||||
if ([[self selectedFiles] count] > 1)
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"MultiFiles"];
|
||||
}
|
||||
// Nothing or subproject name selected
|
||||
else if ((!categoryName && !fileName) ||
|
||||
[fileName isEqualToString:[activeProject projectName]])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"FileProject"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Classes"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"classSuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Headers"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"headerSuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Other Sources"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"genericSuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Interfaces"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"nibSuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Images"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"iconSuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Other Resources"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"otherSuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Subprojects"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"subprojectSuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Documentation"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"helpSuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Supporting Files"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"genericSuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Libraries"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"librarySuitcase"];
|
||||
}
|
||||
else if ([categoryName isEqualToString: @"Non Project Files"])
|
||||
{
|
||||
iconName = [[NSString alloc] initWithString:@"projectSuitcase"];
|
||||
}
|
||||
|
||||
if (iconName != nil)
|
||||
{
|
||||
icon = IMAGE(iconName);
|
||||
RELEASE(iconName);
|
||||
}
|
||||
else
|
||||
{
|
||||
icon = [[NSWorkspace sharedWorkspace] iconForFile:fileName];
|
||||
}
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
- (NSString *)fileNameIconTitle
|
||||
{
|
||||
NSString *categoryName = [self nameOfSelectedCategory];
|
||||
NSString *fileName = [self nameOfSelectedFile];
|
||||
int filesCount = [[self selectedFiles] count];
|
||||
|
||||
if (filesCount > 1)
|
||||
{
|
||||
return [NSString stringWithFormat:@"%i files", filesCount];
|
||||
}
|
||||
else if (fileName)
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
else if (categoryName)
|
||||
{
|
||||
return categoryName;
|
||||
}
|
||||
|
||||
return PCFileNameFieldNoFiles;
|
||||
}
|
||||
|
||||
- (NSString *)fileNameIconPath
|
||||
{
|
||||
NSString *fileName = [self nameOfSelectedFile];
|
||||
NSString *category = [self nameOfSelectedCategory];
|
||||
|
||||
return [project pathForFile:fileName
|
||||
forKey:[project keyForCategory:category]];
|
||||
}
|
||||
|
||||
- (BOOL)canPerformDraggingOf:(NSArray *)paths
|
||||
{
|
||||
NSString *category = [self nameOfSelectedCategory];
|
||||
NSString *categoryKey = [project keyForCategory:category];
|
||||
NSArray *fileTypes = [project fileTypesForCategoryKey:categoryKey];
|
||||
NSEnumerator *e = [paths objectEnumerator];
|
||||
NSString *s;
|
||||
|
||||
NSLog(@"PCBrowser: canPerformDraggingOf -> %@", category);
|
||||
|
||||
if (!category || ([self nameOfSelectedFile] != nil))
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (![project isEditableCategory:category])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
// Check if we can accept files of such types
|
||||
while ((s = [e nextObject]))
|
||||
{
|
||||
if (![fileTypes containsObject:[s pathExtension]])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)prepareForDraggingOf:(NSArray *)paths
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)performDraggingOf:(NSArray *)paths
|
||||
{
|
||||
NSString *category = [self nameOfSelectedCategory];
|
||||
NSString *categoryKey = [project keyForCategory:category];
|
||||
NSEnumerator *pathsEnum = [paths objectEnumerator];
|
||||
NSString *file = nil;
|
||||
|
||||
while ((file = [[pathsEnum nextObject] lastPathComponent]))
|
||||
{
|
||||
if (![project doesAcceptFile:file forKey:categoryKey])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return [project addAndCopyFiles:paths forKey:categoryKey];
|
||||
}
|
||||
|
||||
@end
|
1346
Framework/PCProjectBuilder.m
Normal file
1346
Framework/PCProjectBuilder.m
Normal file
File diff suppressed because it is too large
Load diff
196
Framework/PCProjectBuilderOptions.m
Normal file
196
Framework/PCProjectBuilderOptions.m
Normal file
|
@ -0,0 +1,196 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2000-2007 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Sergii Stoian
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCProjectBuilderOptions.h>
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
|
||||
@implementation PCProjectBuilderOptions
|
||||
|
||||
- (void)_setStateForButton:(id)button
|
||||
key:(NSString *)key
|
||||
defaultState:(int)dState
|
||||
{
|
||||
NSString *value = [[project projectDict] objectForKey:key];
|
||||
int state;
|
||||
|
||||
if (value == nil)
|
||||
{
|
||||
state = dState;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([value isEqualToString:@"YES"])
|
||||
state = NSOnState;
|
||||
else
|
||||
state = NSOffState;
|
||||
}
|
||||
[button setState:state];
|
||||
}
|
||||
|
||||
- (id)initWithProject:(PCProject *)aProject delegate:(id)aDelegate
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
project = aProject;
|
||||
delegate = aDelegate;
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(loadProjectProperties:)
|
||||
name:PCProjectDictDidChangeNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEBUG
|
||||
NSLog (@"PCProjectBuilderOptions: dealloc");
|
||||
#endif
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[verboseButton setRefusesFirstResponder:YES];
|
||||
[debugButton setRefusesFirstResponder:YES];
|
||||
[stripButton setRefusesFirstResponder:YES];
|
||||
[sharedLibsButton setRefusesFirstResponder:YES];
|
||||
|
||||
[self loadProjectProperties:nil];
|
||||
}
|
||||
|
||||
- (void)show:(NSRect)builderRect
|
||||
{
|
||||
NSRect opRect;
|
||||
|
||||
if (!optionsPanel)
|
||||
{
|
||||
if ([NSBundle loadNibNamed:@"BuilderOptions" owner:self] == NO)
|
||||
{
|
||||
PCLogError(self, @"error loading BuilderOptions NIB file!");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
opRect = [optionsPanel frame];
|
||||
opRect.origin.x = builderRect.origin.x +
|
||||
(builderRect.size.width - opRect.size.width)/2;
|
||||
opRect.origin.y = builderRect.origin.y +
|
||||
(builderRect.size.height - opRect.size.height)/2;
|
||||
[optionsPanel setFrame:opRect display:NO];
|
||||
|
||||
[optionsPanel makeKeyAndOrderFront:nil];
|
||||
[optionsPanel makeFirstResponder:buildArgsField];
|
||||
}
|
||||
|
||||
- (NSString *)buildTarget
|
||||
{
|
||||
if (targetPopup)
|
||||
{
|
||||
return [targetPopup titleOfSelectedItem];
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)optionsPopupChanged:(id)sender
|
||||
{
|
||||
[delegate targetDidSet:[targetPopup titleOfSelectedItem]];
|
||||
}
|
||||
|
||||
- (void)controlTextDidEndEditing:(NSNotification *)aNotif
|
||||
{
|
||||
id object = [aNotif object];
|
||||
NSMutableArray *args;
|
||||
|
||||
if (object != buildArgsField)
|
||||
return;
|
||||
|
||||
args = [[[buildArgsField stringValue] componentsSeparatedByString:@" "]
|
||||
mutableCopy];
|
||||
[args removeObject:@""];
|
||||
[args removeObject:@" "];
|
||||
|
||||
[project setProjectDictObject:args forKey:PCBuilderArguments notify:NO];
|
||||
|
||||
[delegate targetDidSet:[targetPopup titleOfSelectedItem]];
|
||||
}
|
||||
|
||||
- (void)optionsButtonClicked:(id)sender
|
||||
{
|
||||
NSString *value = [sender state] == NSOnState ? @"YES" : @"NO";
|
||||
NSString *key;
|
||||
|
||||
if (sender == verboseButton)
|
||||
key = PCBuilderVerbose;
|
||||
if (sender == debugButton)
|
||||
key = PCBuilderDebug;
|
||||
if (sender == stripButton)
|
||||
key = PCBuilderStrip;
|
||||
if (sender == sharedLibsButton)
|
||||
key = PCBuilderSharedLibs;
|
||||
|
||||
[project setProjectDictObject:value forKey:key notify:NO];
|
||||
}
|
||||
|
||||
- (void)loadProjectProperties:(NSNotification *)aNotif
|
||||
{
|
||||
NSArray *args;
|
||||
|
||||
// Setup target popup
|
||||
[targetPopup removeAllItems];
|
||||
[targetPopup addItemsWithTitles:[project buildTargets]];
|
||||
[targetPopup selectItemAtIndex:0];
|
||||
|
||||
// Setup build arguments field
|
||||
args = [[project projectDict] objectForKey:PCBuilderArguments];
|
||||
[buildArgsField setStringValue:[args componentsJoinedByString:@" "]];
|
||||
|
||||
// Setup option buttons
|
||||
[self _setStateForButton:verboseButton
|
||||
key:PCBuilderVerbose
|
||||
defaultState:NSOffState];
|
||||
[self _setStateForButton:debugButton
|
||||
key:PCBuilderDebug
|
||||
defaultState:NSOnState];
|
||||
[self _setStateForButton:stripButton
|
||||
key:PCBuilderStrip
|
||||
defaultState:NSOffState];
|
||||
[self _setStateForButton:sharedLibsButton
|
||||
key:PCBuilderSharedLibs
|
||||
defaultState:NSOnState];
|
||||
}
|
||||
|
||||
@end
|
162
Framework/PCProjectBuilderPanel.m
Normal file
162
Framework/PCProjectBuilderPanel.m
Normal file
|
@ -0,0 +1,162 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation
|
||||
|
||||
Authors: Serg Stoyan
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCProjectManager.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCProjectBuilder.h>
|
||||
#import <ProjectCenter/PCProjectBuilderPanel.h>
|
||||
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
|
||||
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
|
||||
|
||||
@implementation PCProjectBuilderPanel
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
PCProject *activeProject = [projectManager rootActiveProject];
|
||||
|
||||
[panel setFrameAutosaveName:@"ProjectBuilder"];
|
||||
[panel setTitle:[NSString stringWithFormat:
|
||||
@"%@ - Project Build", [activeProject projectName]]];
|
||||
|
||||
// Panel's content view
|
||||
[panel setContentView:contentBox];
|
||||
|
||||
// Empty content view of contentBox
|
||||
RETAIN(emptyBox);
|
||||
|
||||
// Track project switching
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(activeProjectDidChange:)
|
||||
name:PCActiveProjectDidChangeNotification
|
||||
object:nil];
|
||||
|
||||
if (![panel setFrameUsingName:@"ProjectBuilder"])
|
||||
{
|
||||
[panel center];
|
||||
}
|
||||
}
|
||||
|
||||
- (id)initWithProjectManager:(PCProjectManager *)aManager
|
||||
{
|
||||
projectManager = aManager;
|
||||
|
||||
if ([NSBundle loadNibNamed:@"BuilderPanel" owner:self] == NO)
|
||||
{
|
||||
PCLogError(self, @"error loading BuilderPanel NIB file!");
|
||||
return nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEVELOPMENT
|
||||
NSLog(@"PCBuildPanel: dealloc");
|
||||
#endif
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
RELEASE(emptyBox);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)orderFront:(id)sender
|
||||
{
|
||||
PCProject *activeProject = [projectManager rootActiveProject];
|
||||
NSView *builderView = [[activeProject projectBuilder] componentView];
|
||||
|
||||
if (!([contentBox contentView] == builderView))
|
||||
{
|
||||
[contentBox setContentView:builderView];
|
||||
}
|
||||
|
||||
/* NSLog(self, @"orderFront: %@ -> %@",
|
||||
builderView, [builderView superview]);*/
|
||||
|
||||
[panel orderFront:self];
|
||||
}
|
||||
|
||||
- (void)close
|
||||
{
|
||||
// PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
|
||||
[contentBox setContentView:emptyBox];
|
||||
|
||||
// PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
|
||||
[panel close];
|
||||
}
|
||||
|
||||
- (void)activeProjectDidChange:(NSNotification *)aNotif
|
||||
{
|
||||
PCProject *rootProject;
|
||||
id <PCPreferences> prefs = [projectManager prefController];
|
||||
|
||||
if (![prefs boolForKey:UseTearOffWindows])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rootProject = [projectManager rootActiveProject];
|
||||
if (rootProject == currentProject)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
currentProject = rootProject;
|
||||
|
||||
// NSLog(@"Buider Panel: activeProjectDidChange to: %@",
|
||||
// [rootProject projectName]);
|
||||
|
||||
if (!rootProject)
|
||||
{
|
||||
[contentBox setContentView:emptyBox];
|
||||
}
|
||||
else
|
||||
{
|
||||
[panel setTitle:[NSString stringWithFormat:
|
||||
@"%@ - Project Build", [rootProject projectName]]];
|
||||
[contentBox setContentView:[[rootProject projectBuilder] componentView]];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)isVisible
|
||||
{
|
||||
return [panel isVisible];
|
||||
}
|
||||
|
||||
// --- Panel delgate
|
||||
- (BOOL)windowShouldClose:(id)sender
|
||||
{
|
||||
[contentBox setContentView:emptyBox];
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
421
Framework/PCProjectEditor.m
Normal file
421
Framework/PCProjectEditor.m
Normal file
|
@ -0,0 +1,421 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2002-2015 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
Riccardo Mottola
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCFileManager.h>
|
||||
#import <ProjectCenter/PCProjectManager.h>
|
||||
#import <ProjectCenter/PCBundleManager.h>
|
||||
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCProjectWindow.h>
|
||||
#import <ProjectCenter/PCProjectBrowser.h>
|
||||
#import <ProjectCenter/PCProjectEditor.h>
|
||||
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
|
||||
@interface PCProjectEditor (CreateUI)
|
||||
|
||||
- (void) _createComponentView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCProjectEditor (CreateUI)
|
||||
|
||||
- (void) _createComponentView
|
||||
{
|
||||
NSRect frame;
|
||||
NSTextView *textView;
|
||||
|
||||
frame = NSMakeRect(0,0,562,248);
|
||||
_componentView = [[NSBox alloc] initWithFrame:frame];
|
||||
[_componentView setTitlePosition:NSNoTitle];
|
||||
[_componentView setBorderType:NSNoBorder];
|
||||
[_componentView setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
|
||||
[_componentView setContentViewMargins:NSMakeSize(0.0,0.0)];
|
||||
|
||||
frame = NSMakeRect (0, 0, 562, 40);
|
||||
_scrollView = [[NSScrollView alloc] initWithFrame:frame];
|
||||
[_scrollView setHasHorizontalScroller:NO];
|
||||
[_scrollView setHasVerticalScroller:YES];
|
||||
[_scrollView setBorderType:NSBezelBorder];
|
||||
[_scrollView setAutoresizingMask:(NSViewWidthSizable|NSViewHeightSizable)];
|
||||
|
||||
// This is a placeholder!
|
||||
frame = [[_scrollView contentView] frame];
|
||||
textView = [[NSTextView alloc] initWithFrame:frame];
|
||||
[textView setMinSize:NSMakeSize (0, 0)];
|
||||
[textView setMaxSize:NSMakeSize(1e7, 1e7)];
|
||||
[textView setRichText:NO];
|
||||
[textView setEditable:NO];
|
||||
[textView setSelectable:YES];
|
||||
[textView setVerticallyResizable:YES];
|
||||
[textView setHorizontallyResizable:NO];
|
||||
[textView setAutoresizingMask:(NSViewWidthSizable|NSViewHeightSizable)];
|
||||
[[textView textContainer] setWidthTracksTextView:YES];
|
||||
[_scrollView setDocumentView:textView];
|
||||
RELEASE(textView);
|
||||
|
||||
frame.size = NSMakeSize([_scrollView contentSize].width,1e7);
|
||||
[[textView textContainer] setContainerSize:frame.size];
|
||||
|
||||
[_componentView setContentView:_scrollView];
|
||||
// RELEASE(_scrollView);
|
||||
|
||||
[_componentView sizeToFit];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCProjectEditor
|
||||
// ===========================================================================
|
||||
// ==== Initialisation
|
||||
// ===========================================================================
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
PCLogStatus(self, @"[init]");
|
||||
_componentView = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEVELOPMENT
|
||||
#endif
|
||||
NSLog (@"PCProjectEditor: dealloc");
|
||||
|
||||
// [[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
if (_componentView)
|
||||
{
|
||||
RELEASE(_scrollView);
|
||||
RELEASE(_componentView);
|
||||
}
|
||||
|
||||
// RELEASE(_editorsDict);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSView *)componentView
|
||||
{
|
||||
if (_componentView == nil)
|
||||
{
|
||||
[self _createComponentView];
|
||||
}
|
||||
|
||||
return _componentView;
|
||||
}
|
||||
|
||||
- (PCProject *)project
|
||||
{
|
||||
return _project;
|
||||
}
|
||||
|
||||
- (void)setProject:(PCProject *)aProject
|
||||
{
|
||||
_project = aProject;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Project and Editor handling
|
||||
// ===========================================================================
|
||||
|
||||
// TODO: Should it be editor or parser?
|
||||
- (BOOL)editorProvidesBrowserItemsForItem:(NSString *)item
|
||||
{
|
||||
NSString *file = [[_project projectBrowser] nameOfSelectedFile];
|
||||
PCBundleManager *bundleManager = [[_project projectManager] bundleManager];
|
||||
NSDictionary *infoTable = nil;
|
||||
|
||||
// File selected and editor should already be loaded
|
||||
if (file != nil)
|
||||
{
|
||||
if ([[item substringToIndex:1] isEqualToString:@"@"])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
// Category selected
|
||||
infoTable = [bundleManager infoForBundleType:@"editor"
|
||||
keyName:@"FileTypes"
|
||||
keyContains:[item pathExtension]];
|
||||
|
||||
if ([[infoTable objectForKey:@"ProvidesBrowserItems"] isEqualToString:@"YES"])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (id<CodeEditor>) openEditorForFilePath: (NSString *)filePath
|
||||
windowed: (BOOL)windowed
|
||||
{
|
||||
PCProject *activeProject = [[_project projectManager] activeProject];
|
||||
NSString *fileName = [filePath lastPathComponent];
|
||||
BOOL editable = YES;
|
||||
id<CodeEditor> editor = nil;
|
||||
NSFileManager *mgr = [NSFileManager defaultManager];
|
||||
|
||||
NSLog(@"PCPE: fileName: %@, filePath: %@, project: %@",
|
||||
fileName, filePath, [activeProject projectName]);
|
||||
|
||||
if (![mgr fileExistsAtPath: filePath])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Determine if file should be opened for read only
|
||||
if (![_project isEditableFile:fileName])
|
||||
{
|
||||
editable = NO;
|
||||
}
|
||||
|
||||
// Set the 'editor' var either by requesting already opened
|
||||
// editor or by creating the new one.
|
||||
editor = [self openEditorForFile:filePath
|
||||
editable:editable
|
||||
windowed:windowed];
|
||||
if (!editor)
|
||||
{
|
||||
NSLog(@"We don't have editor for file: %@", fileName);
|
||||
[self setActiveEditor: nil];
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Category path was changed by user's clicking inside browser.
|
||||
// That's why new category path must be transfered to editor.
|
||||
NSString *categoryPath = [NSString stringWithFormat: @"/Classes/%@/", fileName];
|
||||
[editor setCategoryPath:categoryPath];
|
||||
[self orderFrontEditorForFile:filePath];
|
||||
|
||||
// Reload last column because editor has just been loaded
|
||||
[[_project projectBrowser] reloadLastColumnAndNotify:NO];
|
||||
[editor fileStructureItemSelected:fileName];
|
||||
|
||||
return editor;
|
||||
}
|
||||
|
||||
// Called by PCProjectBrowser
|
||||
// categoryPath:
|
||||
// 1. "/Classes/Class.m/- init"
|
||||
// 2. "/Subprojects/Project/Classes/Class.m/- init"
|
||||
// 3. "/Library/gnustep-gui"
|
||||
- (id<CodeEditor>)openEditorForCategoryPath:(NSString *)categoryPath
|
||||
windowed:(BOOL)windowed
|
||||
{
|
||||
NSArray *pathArray = [categoryPath pathComponents];
|
||||
NSString *pathLastObject = [pathArray lastObject];
|
||||
PCProject *activeProject = [[_project projectManager] activeProject];
|
||||
NSString *category = [[_project projectBrowser] nameOfSelectedCategory];
|
||||
NSString *categoryKey = [activeProject keyForCategory:category];
|
||||
NSString *fileName = nil;
|
||||
NSString *filePath = nil;
|
||||
BOOL editable = YES;
|
||||
id<CodeEditor> editor;
|
||||
|
||||
fileName = [[[[_project projectBrowser] pathFromSelectedCategory]
|
||||
pathComponents] objectAtIndex:2];
|
||||
filePath = [activeProject pathForFile:fileName forKey:categoryKey];
|
||||
|
||||
/* NSLog(@"PCPE: fileName: %@ filePath: %@ project: %@",
|
||||
fileName, filePath, [activeProject projectName]);*/
|
||||
|
||||
// Determine if file should be opened for read only
|
||||
if (![_project isEditableFile:fileName])
|
||||
{
|
||||
editable = NO;
|
||||
}
|
||||
|
||||
// NSLog(@"fileName: %@ > %@", fileName, listEntry);
|
||||
|
||||
// Set the 'editor' var either by requesting already opened
|
||||
// editor or by creating the new one.
|
||||
editor = [self openEditorForFile:filePath
|
||||
editable:editable
|
||||
windowed:windowed];
|
||||
if (!editor)
|
||||
{
|
||||
NSLog(@"We don't have editor for file: %@", fileName);
|
||||
[self setActiveEditor: nil];
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Category path was changed by user's clicking inside browser.
|
||||
// That's why new category path must be transfered to editor.
|
||||
[editor setCategoryPath:categoryPath];
|
||||
[self orderFrontEditorForFile:filePath];
|
||||
|
||||
pathLastObject = [pathArray lastObject];
|
||||
/* NSLog(@"pathArray: c: %i %@", [pathArray count], pathArray);
|
||||
NSLog(@"pathArray: lastObject %@", [pathArray lastObject]);
|
||||
NSLog(@"lastObject[1]: %@",
|
||||
[pathLastObject substringWithRange:NSMakeRange(0,1)]);*/
|
||||
|
||||
if ([pathLastObject isEqualToString:@"/"])
|
||||
{
|
||||
pathLastObject = [pathArray objectAtIndex:[pathArray count]-2];
|
||||
|
||||
if ([pathLastObject isEqualToString:fileName]) // file selected
|
||||
{ // Reload last column because editor has just been loaded
|
||||
[[_project projectBrowser] reloadLastColumnAndNotify:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
[editor fileStructureItemSelected:pathLastObject];
|
||||
}
|
||||
}
|
||||
else // TODO: rethink
|
||||
{
|
||||
[editor fileStructureItemSelected:pathLastObject];
|
||||
}
|
||||
|
||||
return editor;
|
||||
}
|
||||
|
||||
- (void)orderFrontEditorForFile:(NSString *)path
|
||||
{
|
||||
id<CodeEditor> editor = [_editorsDict objectForKey:path];
|
||||
|
||||
if (!editor)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ([editor isWindowed])
|
||||
{
|
||||
[editor show];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_componentView setContentView:[editor componentView]];
|
||||
[[_project projectWindow] setCustomContentView:_componentView];
|
||||
[[_project projectWindow] makeFirstResponder:[editor editorView]];
|
||||
[[_project projectWindow] makeKeyAndOrderFront:self];
|
||||
|
||||
NSLog(@"PCPE: categoryPath - %@", [editor categoryPath]);
|
||||
[[_project projectBrowser] setPath:[editor categoryPath]];
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== File handling
|
||||
// ===========================================================================
|
||||
|
||||
- (BOOL)saveFileAs:(NSString *)file
|
||||
{
|
||||
id<CodeEditor> editor = [self activeEditor];
|
||||
NSString *categoryPath = nil;
|
||||
BOOL res;
|
||||
|
||||
if (editor != nil)
|
||||
{
|
||||
categoryPath = [editor categoryPath];
|
||||
res = [super saveFileAs:file];
|
||||
[editor setCategoryPath:categoryPath];
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ==== Notifications
|
||||
// ===========================================================================
|
||||
|
||||
- (void)editorDidOpen:(NSNotification *)aNotif
|
||||
{
|
||||
/* PCEditor *editor = [aNotif object];
|
||||
PCProjectBrowser *browser = [_project projectBrowser];
|
||||
NSString *path = [browser path];
|
||||
|
||||
// Active editor is set after PCEditorDidBecomeActiveNotification will be
|
||||
// sent, but we should do it here for loading list of classes into browser.
|
||||
[self setActiveEditor:editor];
|
||||
[browser reloadLastColumnAndNotify:NO];
|
||||
[browser setPath:path];*/
|
||||
NSLog(@"PCProjectEditor editorDidOpen!");
|
||||
}
|
||||
|
||||
- (void)editorDidClose:(NSNotification *)aNotif
|
||||
{
|
||||
id editor = [aNotif object];
|
||||
|
||||
// It is not our editor
|
||||
if (![[_editorsDict allValues] containsObject:editor])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[_editorsDict removeObjectForKey:[editor path]];
|
||||
|
||||
if ([_editorsDict count])
|
||||
{
|
||||
NSString *lastEditorKey = [[_editorsDict allKeys] lastObject];
|
||||
id<CodeEditor> lastEditor = [_editorsDict objectForKey:lastEditorKey];
|
||||
|
||||
[_componentView setContentView:[lastEditor componentView]];
|
||||
[[_project projectWindow] makeFirstResponder:[lastEditor editorView]];
|
||||
}
|
||||
else
|
||||
{
|
||||
PCProjectBrowser *browser = [_project projectBrowser];
|
||||
|
||||
[_componentView setContentView:_scrollView];
|
||||
[[_project projectWindow] makeFirstResponder:_scrollView];
|
||||
|
||||
[browser setPath:[browser pathToSelectedCategory]];
|
||||
[self setActiveEditor:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)editorDidBecomeActive:(NSNotification *)aNotif
|
||||
{
|
||||
id<CodeEditor> editor = [aNotif object];
|
||||
NSString *categoryPath = [editor categoryPath];
|
||||
|
||||
if (![[_editorsDict allValues] containsObject:editor])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[self setActiveEditor:editor];
|
||||
|
||||
if (categoryPath)
|
||||
{
|
||||
[[_project projectBrowser] setPath:categoryPath];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
1122
Framework/PCProjectInspector.m
Normal file
1122
Framework/PCProjectInspector.m
Normal file
File diff suppressed because it is too large
Load diff
542
Framework/PCProjectLauncher.m
Normal file
542
Framework/PCProjectLauncher.m
Normal file
|
@ -0,0 +1,542 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2000-2020 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
Riccardo Mottola
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import <ProjectCenter/PCDefines.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCProjectManager.h>
|
||||
#import <ProjectCenter/PCProjectLauncher.h>
|
||||
#import <ProjectCenter/PCBundleManager.h>
|
||||
#import <ProjectCenter/PCButton.h>
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
#import <Protocols/Preferences.h>
|
||||
|
||||
|
||||
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
|
||||
#import "Modules/Preferences/EditorFSC/PCEditorFSCPrefs.h"
|
||||
|
||||
|
||||
#ifndef NOTIFICATION_CENTER
|
||||
#define NOTIFICATION_CENTER [NSNotificationCenter defaultCenter]
|
||||
#endif
|
||||
|
||||
#ifndef IMAGE
|
||||
#define IMAGE(X) [NSImage imageNamed: X]
|
||||
#endif
|
||||
|
||||
enum {
|
||||
DEBUG_DEFAULT_TARGET = 1,
|
||||
DEBUG_DEBUG_TARGET = 2
|
||||
};
|
||||
|
||||
@protocol Terminal
|
||||
|
||||
- (BOOL)terminalRunProgram:(NSString *)path
|
||||
withArguments:(NSArray *)args
|
||||
inDirectory:(NSString *)directory
|
||||
properties:(NSDictionary *)properties;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCProjectLauncher (UserInterface)
|
||||
|
||||
- (void)_createComponentView
|
||||
{
|
||||
NSScrollView *scrollView;
|
||||
NSString *string;
|
||||
NSAttributedString *attributedString;
|
||||
|
||||
componentView = [[NSBox alloc] initWithFrame:NSMakeRect(8,-1,464,322)];
|
||||
[componentView setTitlePosition:NSNoTitle];
|
||||
[componentView setBorderType:NSNoBorder];
|
||||
[componentView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||
[componentView setContentViewMargins: NSMakeSize(0.0,0.0)];
|
||||
|
||||
/*
|
||||
* Top buttons
|
||||
*/
|
||||
runButton = [[PCButton alloc] initWithFrame: NSMakeRect(0,271,43,43)];
|
||||
[runButton setTitle: @"Run"];
|
||||
[runButton setImage: IMAGE(@"Run")];
|
||||
[runButton setAlternateImage: IMAGE(@"Stop")];
|
||||
[runButton setTarget: self];
|
||||
[runButton setAction: @selector(run:)];
|
||||
[runButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
|
||||
[runButton setButtonType: NSToggleButton];
|
||||
[componentView addSubview: runButton];
|
||||
RELEASE (runButton);
|
||||
|
||||
debugButton = [[PCButton alloc] initWithFrame: NSMakeRect(44,271,43,43)];
|
||||
[debugButton setTitle: @"Debug"];
|
||||
[debugButton setImage: IMAGE(@"Debug")];
|
||||
[debugButton setAlternateImage: IMAGE(@"Stop")];
|
||||
[debugButton setTarget: self];
|
||||
[debugButton setAction: @selector(debug:)];
|
||||
[debugButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
|
||||
[debugButton setButtonType: NSToggleButton];
|
||||
[componentView addSubview: debugButton];
|
||||
RELEASE (debugButton);
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
scrollView = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,0,464,255)];
|
||||
|
||||
[scrollView setHasHorizontalScroller:NO];
|
||||
[scrollView setHasVerticalScroller:YES];
|
||||
[scrollView setBorderType: NSBezelBorder];
|
||||
[scrollView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
|
||||
|
||||
stdOut=[[NSTextView alloc] initWithFrame:[[scrollView contentView] frame]];
|
||||
|
||||
[stdOut setMinSize: NSMakeSize(0, 0)];
|
||||
[stdOut setMaxSize: NSMakeSize(1e7, 1e7)];
|
||||
[stdOut setRichText:YES];
|
||||
[stdOut setEditable:NO];
|
||||
[stdOut setSelectable:YES];
|
||||
[stdOut setVerticallyResizable: YES];
|
||||
[stdOut setHorizontallyResizable: NO];
|
||||
[stdOut setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
||||
[[stdOut textContainer] setWidthTracksTextView:YES];
|
||||
[[stdOut textContainer] setContainerSize:
|
||||
NSMakeSize([stdOut frame].size.width, 1e7)];
|
||||
|
||||
// Font
|
||||
string = @"=== Launcher ready ===";
|
||||
attributedString =
|
||||
[[NSAttributedString alloc] initWithString:string
|
||||
attributes:textAttributes];
|
||||
[[stdOut textStorage] setAttributedString:attributedString];
|
||||
|
||||
[scrollView setDocumentView:stdOut];
|
||||
RELEASE (stdOut);
|
||||
|
||||
[componentView addSubview: scrollView];
|
||||
RELEASE(scrollView);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCProjectLauncher
|
||||
|
||||
- (id)initWithProject:(PCProject *)aProject
|
||||
{
|
||||
NSAssert (aProject, @"No project specified!");
|
||||
|
||||
if ((self = [super init]))
|
||||
{
|
||||
id <PCPreferences> prefs;
|
||||
NSFont *font;
|
||||
NSString *fontName;
|
||||
CGFloat fontSize;
|
||||
|
||||
project = aProject;
|
||||
|
||||
prefs = [[project projectManager] prefController];
|
||||
fontName = [prefs stringForKey:ConsoleFixedFont];
|
||||
fontSize = [prefs floatForKey:ConsoleFixedFontSize];
|
||||
font = [NSFont fontWithName:fontName size:fontSize];
|
||||
if (font == nil)
|
||||
font = [NSFont userFixedPitchFontOfSize:0];
|
||||
|
||||
textAttributes =
|
||||
[NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
|
||||
[textAttributes retain];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEVELOPMENT
|
||||
NSLog (@"PCProjectLauncher: dealloc");
|
||||
#endif
|
||||
RELEASE (componentView);
|
||||
RELEASE (textAttributes);
|
||||
RELEASE (debugger);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSView *)componentView;
|
||||
{
|
||||
if (!componentView)
|
||||
{
|
||||
[self _createComponentView];
|
||||
}
|
||||
|
||||
return componentView;
|
||||
}
|
||||
|
||||
- (BOOL)isRunning
|
||||
{
|
||||
return _isRunning;
|
||||
}
|
||||
|
||||
- (BOOL)isDebugging
|
||||
{
|
||||
return _isDebugging;
|
||||
}
|
||||
|
||||
- (void)performRun
|
||||
{
|
||||
if (!_isRunning && !_isDebugging)
|
||||
{
|
||||
[runButton performClick:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)performDebug
|
||||
{
|
||||
if (!_isRunning && !_isDebugging)
|
||||
{
|
||||
[debugButton performClick:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)debug:(id)sender
|
||||
{
|
||||
NSString *executablePath;
|
||||
NSString *gdbPath = nil;
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
PCBundleManager *bundleManager = [[project projectManager] bundleManager];
|
||||
|
||||
executablePath = [project projectPath];
|
||||
|
||||
if ([project isExecutable])
|
||||
{
|
||||
NSString *prjType;
|
||||
|
||||
prjType = [project projectTypeName];
|
||||
if ([prjType isEqualToString: @"Application"])
|
||||
{
|
||||
/* MyApplication.app/MyApplication */
|
||||
executablePath = [executablePath stringByAppendingPathComponent:[project projectName]];
|
||||
executablePath = [executablePath stringByAppendingString:@".app"];
|
||||
executablePath = [executablePath stringByAppendingPathComponent:[project projectName]];
|
||||
}
|
||||
else if ([prjType isEqualToString: @"Tool"])
|
||||
{
|
||||
/* obj/MyTool */
|
||||
executablePath = [executablePath stringByAppendingPathComponent:@"obj"];
|
||||
executablePath = [executablePath stringByAppendingPathComponent:[project projectName]];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NSRunAlertPanel(@"Debug",
|
||||
@"The project is not executable",
|
||||
@"Close", nil, nil, nil);
|
||||
[debugButton setState:NSOffState];
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef __MINGW__
|
||||
/* On windows we need to check the .exe file */
|
||||
if ([[executablePath pathExtension] length] == 0)
|
||||
{
|
||||
executablePath = [executablePath stringByAppendingPathExtension: @"exe"];
|
||||
}
|
||||
#endif
|
||||
|
||||
NSLog(@"debug executable launch path: %@", executablePath);
|
||||
if ([fm isExecutableFileAtPath:executablePath] == NO)
|
||||
{
|
||||
NSRunAlertPanel(@"Debug",
|
||||
@"No executable! Please build the project first.",
|
||||
@"Close",nil,nil);
|
||||
[debugButton setState:NSOffState];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Debugger
|
||||
gdbPath = [[[project projectManager] prefController] stringForKey:Debugger];
|
||||
if (gdbPath == nil)
|
||||
{
|
||||
gdbPath = @"/usr/bin/gdb";
|
||||
}
|
||||
|
||||
if ([fm isExecutableFileAtPath:gdbPath] == NO)
|
||||
{
|
||||
NSRunAlertPanel(@"Debug",
|
||||
@"Specified debugger `%@` cannot be executed!",
|
||||
@"Close",nil,nil,gdbPath);
|
||||
[debugButton setState:NSOffState];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Debugger
|
||||
if (nil == debugger)
|
||||
{
|
||||
debugger = [bundleManager objectForBundleType: @"debugger"
|
||||
protocol: @protocol(CodeDebugger)
|
||||
fileName: [executablePath stringByDeletingLastPathComponent]];
|
||||
[debugger debugExecutableAtPath: executablePath
|
||||
withDebugger: gdbPath];
|
||||
}
|
||||
else
|
||||
{
|
||||
[debugger show];
|
||||
}
|
||||
|
||||
if (nil == debugger)
|
||||
NSLog(@"No debugger module found");
|
||||
|
||||
// turn debug button off...
|
||||
// [debugButton setState:NSOffState];
|
||||
}
|
||||
|
||||
- (void)run:(id)sender
|
||||
{
|
||||
NSMutableArray *args = [[NSMutableArray alloc] init];
|
||||
NSPipe *logPipe;
|
||||
NSPipe *errorPipe;
|
||||
NSString *executablePath;
|
||||
NSFileManager *fm;
|
||||
|
||||
executablePath = [project projectPath];
|
||||
|
||||
// Check if project type is executable
|
||||
if ([project isExecutable])
|
||||
{
|
||||
NSString *prjType;
|
||||
|
||||
prjType = [project projectTypeName];
|
||||
if ([prjType isEqualToString: @"Application"])
|
||||
{
|
||||
/* MyApplication.app/MyApplication */
|
||||
executablePath = [executablePath stringByAppendingPathComponent:[project projectName]];
|
||||
executablePath = [executablePath stringByAppendingString:@".app"];
|
||||
executablePath = [executablePath stringByAppendingPathComponent:[project projectName]];
|
||||
}
|
||||
else if ([prjType isEqualToString: @"Tool"])
|
||||
{
|
||||
/* obj/MyTool */
|
||||
executablePath = [executablePath stringByAppendingPathComponent:@"obj"];
|
||||
executablePath = [executablePath stringByAppendingPathComponent:[project projectName]];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Unknown project type to execute: %@", prjType);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NSRunAlertPanel(@"Run",
|
||||
@"The project is not executable",
|
||||
@"Close", nil, nil, nil);
|
||||
[runButton setState:NSOffState];
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef __MINGW__
|
||||
/* On windows we need to check the .exe file */
|
||||
if ([[executablePath pathExtension] length] == 0)
|
||||
{
|
||||
executablePath = [executablePath stringByAppendingPathExtension: @"exe"];
|
||||
}
|
||||
#endif
|
||||
|
||||
NSLog(@"executable launch path: %@", executablePath);
|
||||
|
||||
/* now check if the executable does exist. Perhaps make failed */
|
||||
fm = [NSFileManager defaultManager];
|
||||
if (![fm isExecutableFileAtPath:executablePath])
|
||||
{
|
||||
NSRunAlertPanel(@"Run",
|
||||
@"The project does not have an executable",
|
||||
@"Close", nil, nil, nil);
|
||||
[runButton setState:NSOffState];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// [makeTask isRunning] doesn't work here.
|
||||
// "waitpid 7045, result -1, error No child processes" is printed.
|
||||
if (launchTask)
|
||||
{
|
||||
PCLogStatus(self, @"task will terminate");
|
||||
[launchTask terminate];
|
||||
return;
|
||||
}
|
||||
|
||||
// Setting I/O
|
||||
logPipe = [NSPipe pipe];
|
||||
RELEASE(readHandle);
|
||||
readHandle = [[logPipe fileHandleForReading] retain];
|
||||
[stdOut setString:@""];
|
||||
[readHandle waitForDataInBackgroundAndNotify];
|
||||
|
||||
[NOTIFICATION_CENTER addObserver:self
|
||||
selector:@selector(logStdOut:)
|
||||
name:NSFileHandleDataAvailableNotification
|
||||
object:readHandle];
|
||||
|
||||
errorPipe = [NSPipe pipe];
|
||||
RELEASE(errorReadHandle);
|
||||
errorReadHandle = [[errorPipe fileHandleForReading] retain];
|
||||
[stdOut setString:@""];
|
||||
[errorReadHandle waitForDataInBackgroundAndNotify];
|
||||
|
||||
[NOTIFICATION_CENTER addObserver:self
|
||||
selector:@selector(logErrOut:)
|
||||
name:NSFileHandleDataAvailableNotification
|
||||
object:errorReadHandle];
|
||||
|
||||
// Launch task
|
||||
RELEASE(launchTask);
|
||||
launchTask = [[NSTask alloc] init];
|
||||
|
||||
[NOTIFICATION_CENTER addObserver:self
|
||||
selector:@selector(runDidTerminate:)
|
||||
name:NSTaskDidTerminateNotification
|
||||
object:launchTask];
|
||||
[launchTask setArguments:args];
|
||||
[launchTask setCurrentDirectoryPath:[project projectPath]];
|
||||
[launchTask setLaunchPath:executablePath];
|
||||
[launchTask setStandardOutput:logPipe];
|
||||
[launchTask setStandardError:errorPipe];
|
||||
[launchTask launch];
|
||||
|
||||
[debugButton setEnabled:NO];
|
||||
|
||||
_isRunning = YES;
|
||||
_isErrorRunning = YES;
|
||||
RELEASE(args);
|
||||
}
|
||||
|
||||
- (void)runDidTerminate:(NSNotification *)aNotif
|
||||
{
|
||||
if ([aNotif object] != launchTask)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[NOTIFICATION_CENTER removeObserver: self
|
||||
name: NSTaskDidTerminateNotification
|
||||
object: launchTask];
|
||||
|
||||
// Wait if there are data available.
|
||||
if (_isRunning || _isErrorRunning)
|
||||
{
|
||||
[[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode
|
||||
beforeDate: [NSDate distantFuture]];
|
||||
}
|
||||
|
||||
[runButton setState:NSOffState];
|
||||
[debugButton setState:NSOffState];
|
||||
[runButton setEnabled:YES];
|
||||
[debugButton setEnabled:YES];
|
||||
[componentView display];
|
||||
|
||||
RELEASE(launchTask);
|
||||
launchTask = nil;
|
||||
_isDebugging = NO;
|
||||
|
||||
}
|
||||
|
||||
- (void)logStdOut:(NSNotification *)aNotif
|
||||
{
|
||||
NSData *data;
|
||||
|
||||
if ((data = [readHandle availableData]) && [data length] > 0)
|
||||
{
|
||||
[self logData:data error:NO];
|
||||
[readHandle waitForDataInBackgroundAndNotifyForModes:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
[NOTIFICATION_CENTER removeObserver: self
|
||||
name: NSFileHandleDataAvailableNotification
|
||||
object: readHandle];
|
||||
|
||||
_isRunning = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)logErrOut:(NSNotification *)aNotif
|
||||
{
|
||||
NSData *data;
|
||||
|
||||
if ((data = [errorReadHandle availableData]) && [data length] > 0)
|
||||
{
|
||||
[self logData:data error:YES];
|
||||
[errorReadHandle waitForDataInBackgroundAndNotifyForModes:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
[NOTIFICATION_CENTER removeObserver: self
|
||||
name: NSFileHandleDataAvailableNotification
|
||||
object: errorReadHandle];
|
||||
|
||||
_isErrorRunning = NO;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCProjectLauncher (BuildLogging)
|
||||
|
||||
- (void)logString:(NSString *)str newLine:(BOOL)newLine
|
||||
{
|
||||
[stdOut replaceCharactersInRange:NSMakeRange([[stdOut string] length],0)
|
||||
withString:str];
|
||||
|
||||
if (newLine) {
|
||||
[stdOut replaceCharactersInRange:NSMakeRange([[stdOut string] length], 0)
|
||||
withString:@"\n"];
|
||||
}
|
||||
else {
|
||||
[stdOut replaceCharactersInRange:NSMakeRange([[stdOut string] length], 0)
|
||||
withString:@" "];
|
||||
}
|
||||
|
||||
[stdOut scrollRangeToVisible:NSMakeRange([[stdOut string] length], 0)];
|
||||
}
|
||||
|
||||
- (void)logData:(NSData *)data error:(BOOL)yn
|
||||
{
|
||||
NSString *s = nil;
|
||||
NSAttributedString *as = nil;
|
||||
|
||||
// [self logString:s newLine:NO];
|
||||
s = [[NSString alloc] initWithData:data
|
||||
encoding:[NSString defaultCStringEncoding]];
|
||||
as = [[NSAttributedString alloc] initWithString:s
|
||||
attributes:textAttributes];
|
||||
[[stdOut textStorage] appendAttributedString: as];
|
||||
[stdOut scrollRangeToVisible:NSMakeRange([[stdOut string] length], 0)];
|
||||
|
||||
[s release];
|
||||
[as release];
|
||||
}
|
||||
|
||||
@end
|
||||
|
155
Framework/PCProjectLauncherPanel.m
Normal file
155
Framework/PCProjectLauncherPanel.m
Normal file
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2003-2004 Free Software Foundation
|
||||
|
||||
Authors: Serg Stoyan
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application 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 application 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
||||
*/
|
||||
|
||||
#import <ProjectCenter/PCProjectManager.h>
|
||||
#import <ProjectCenter/PCProject.h>
|
||||
#import <ProjectCenter/PCProjectLauncher.h>
|
||||
#import <ProjectCenter/PCProjectLauncherPanel.h>
|
||||
|
||||
#import <ProjectCenter/PCLogController.h>
|
||||
|
||||
#import "Modules/Preferences/Misc/PCMiscPrefs.h"
|
||||
|
||||
@implementation PCProjectLauncherPanel
|
||||
|
||||
- (id)initWithProjectManager:(PCProjectManager *)aManager
|
||||
{
|
||||
PCProject *activeProject = nil;
|
||||
|
||||
projectManager = aManager;
|
||||
activeProject = [projectManager rootActiveProject];
|
||||
|
||||
self = [super initWithContentRect: NSMakeRect (0, 300, 480, 322)
|
||||
styleMask: (NSTitledWindowMask
|
||||
| NSClosableWindowMask
|
||||
| NSResizableWindowMask)
|
||||
backing: NSBackingStoreRetained
|
||||
defer: YES];
|
||||
[self setMinSize: NSMakeSize(440, 222)];
|
||||
[self setFrameAutosaveName: @"ProjectLauncher"];
|
||||
[self setReleasedWhenClosed: NO];
|
||||
[self setHidesOnDeactivate: NO];
|
||||
[self setTitle: [NSString stringWithFormat:
|
||||
@"%@ - Launch", [activeProject projectName]]];
|
||||
|
||||
contentBox = [[NSBox alloc] init];
|
||||
[contentBox setContentViewMargins:NSMakeSize(8.0, 0.0)];
|
||||
[contentBox setTitlePosition:NSNoTitle];
|
||||
[contentBox setBorderType:NSNoBorder];
|
||||
[super setContentView:contentBox];
|
||||
|
||||
// Empty content view of contentBox
|
||||
emptyBox = [[NSBox alloc] init];
|
||||
[emptyBox setContentViewMargins:NSMakeSize(0.0, 0.0)];
|
||||
[emptyBox setTitlePosition:NSNoTitle];
|
||||
[emptyBox setBorderType:NSLineBorder];
|
||||
[contentBox setContentView:emptyBox];
|
||||
|
||||
// Track project switching
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(activeProjectDidChange:)
|
||||
name:PCActiveProjectDidChangeNotification
|
||||
object:nil];
|
||||
|
||||
if (![self setFrameUsingName: @"ProjectLauncher"])
|
||||
{
|
||||
[self center];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEVELOPMENT
|
||||
NSLog (@"PCLaunchPanel: dealloc");
|
||||
#endif
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)orderFront:(id)sender
|
||||
{
|
||||
PCProject *activeProject = [projectManager rootActiveProject];
|
||||
NSView *launcherView = [[activeProject projectLauncher] componentView];
|
||||
|
||||
if (!([contentBox contentView] == launcherView))
|
||||
{
|
||||
[contentBox setContentView:launcherView];
|
||||
[contentBox display];
|
||||
}
|
||||
|
||||
/* PCLogInfo(self, @"orderFront: %@ -> %@",
|
||||
launcherView, [launcherView superview]);*/
|
||||
|
||||
[super orderFront:self];
|
||||
}
|
||||
|
||||
- (void)close
|
||||
{
|
||||
// PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
|
||||
[contentBox setContentView:emptyBox];
|
||||
|
||||
// PCLogInfo(self, @"close: %@", [contentBox contentView]);
|
||||
|
||||
[super close];
|
||||
}
|
||||
|
||||
- (void)activeProjectDidChange:(NSNotification *)aNotif
|
||||
{
|
||||
PCProject *rootProject;
|
||||
id <PCPreferences> prefs = [projectManager prefController];
|
||||
|
||||
if (![prefs boolForKey:UseTearOffWindows])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rootProject = [projectManager rootActiveProject];
|
||||
if (rootProject == currentProject)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
currentProject = rootProject;
|
||||
|
||||
if (!rootProject)
|
||||
{
|
||||
[contentBox setContentView:emptyBox];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setTitle: [NSString stringWithFormat:
|
||||
@"%@ - Launch", [rootProject projectName]]];
|
||||
|
||||
[contentBox
|
||||
setContentView:[[rootProject projectLauncher] componentView]];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue