Comparar commits
1108 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 2efbe9ce4e | |||
| 3366c4d6a5 | |||
| acb69a4221 | |||
| b3b501ef07 | |||
| e34d8e4c42 | |||
| adebae6c47 | |||
| 4ae0d8af9f | |||
| 651bbaa3ce | |||
| 0448ba5ceb | |||
| 6d70bf9106 | |||
| 857629e07e | |||
| 18c5c788d7 | |||
| a8e7a9a091 | |||
| 59097ddf96 | |||
| 433beac9aa | |||
| c7f6e87132 | |||
| 64e2fee975 | |||
| df35cb0756 | |||
| 0e6a3c52ad | |||
| b786bcc774 | |||
| 6cb13e843c | |||
| 7e76721712 | |||
| 23df564189 | |||
| 0c17ed9c33 | |||
| cde9ae02fe | |||
| 77017c2cd3 | |||
| 7615d54337 | |||
| 6b591b121d | |||
| 268edf16d8 | |||
| 01f220fb1b | |||
| 53a92751e6 | |||
| b66431e3a6 | |||
| 5a9e45f9d8 | |||
| 8561bb34a8 | |||
| d55c09c9d3 | |||
| f4300b8cab | |||
| f3f9c2c921 | |||
| 33dca9315c | |||
| c596514d11 | |||
| 390b03647e | |||
| 5b00cf1701 | |||
| 95e69ad858 | |||
| ef0363e8ff | |||
| a62cd0f16a | |||
| f340828506 | |||
| 8b0a68dd4a | |||
| 1049a677bf | |||
| d2bc415042 | |||
| b439e6239d | |||
| b999c71ad6 | |||
| 9f31f9a76b | |||
| 7fe356b649 | |||
| b5aa0b900c | |||
| cd4622fbeb | |||
| 89192c2ee2 | |||
| b5b408d134 | |||
| b08f320ed5 | |||
| 4c7025ae81 | |||
| 554af1becb | |||
| 6d49e0fd57 | |||
| 31d872fbfe | |||
| b842a727ee | |||
| 0851b4d011 | |||
| 8a7c57994d | |||
| 6480e956af | |||
| 9c95a4751b | |||
| d283834978 | |||
| 66b490b5da | |||
| 0d252ab9fd | |||
| 3e8de2d22d | |||
| 52aee1d050 | |||
| ff9dc2c5af | |||
| 3b8cdb58e2 | |||
| bd14aeee17 | |||
| e434f7c0a9 | |||
| 837e3000d3 | |||
| e1c2aa0da1 | |||
| e7aac2ef6e | |||
| f9545acde6 | |||
| 45ce8e1d63 | |||
| bdbec54f24 | |||
| 1df48d1725 | |||
| 6c0f4c09d9 | |||
| f45ce3a7ee | |||
| dc6e624eda | |||
| e67676b01c | |||
| f37ae7e4e7 | |||
| f913f6a8d5 | |||
| 20991381bd | |||
| 6930fe0eff | |||
| f3b50eed3b | |||
| a4217909c0 | |||
| 5b7c4686f9 | |||
| 86c8343107 | |||
| 6b6ce03c72 | |||
| a7ee5985db | |||
| be354f78a6 | |||
| ab75f6f635 | |||
| d6513e9aa9 | |||
| afac77ddfd | |||
| fcd0b6839b | |||
| 32c2548442 | |||
| 1cf02c22a7 | |||
| 34e5594a2d | |||
| 46eac52dbf | |||
| 915a737797 | |||
| d227d8794d | |||
| ad888b3250 | |||
| 5350a67990 | |||
| c02be2330c | |||
| cf936a8a02 | |||
| 0b07d276b9 | |||
| 6879f0d0ac | |||
| d31d18360b | |||
| aeee3c9ade | |||
| dae28d2222 | |||
| f81f95e830 | |||
| 41611f826a | |||
| 4eac57c31c | |||
| 2a7f03761d | |||
| 264f7e1a74 | |||
| 94227889f1 | |||
| 34114a9620 | |||
| b562b3cf72 | |||
| 3938d143a1 | |||
| 95418566ef | |||
| 622b877663 | |||
| 503ff13eb3 | |||
| 2792f0d835 | |||
| 82cb2aa124 | |||
| ba08123abc | |||
| 93d6a80bc6 | |||
| fd78c2a709 | |||
| fb7080c39a | |||
| cc591e18b0 | |||
| 7e6979236e | |||
| e72c48607b | |||
| 3e91334c82 | |||
| 593e8c0e14 | |||
| f8bc5ce648 | |||
| 29f10e71ce | |||
| 84340782ff | |||
| 674946d180 | |||
| abf4a6501a | |||
| ee0d073cd2 | |||
| 2d583d6ea0 | |||
| e46af10631 | |||
| 0328c77be1 | |||
| 5c2aaf9849 | |||
| eab21e19f6 | |||
| 266548d75c | |||
| 4731c1f3f0 | |||
| d6cd51399d | |||
| 7eff25e180 | |||
| ab53e2ffda | |||
| e23357cf13 | |||
| d5808e1164 | |||
| f47fa21fe9 | |||
| 478c617e60 | |||
| 4449758135 | |||
| 7163d8dc71 | |||
| 128f7b851a | |||
| 90bc5f58f7 | |||
| c89328fa14 | |||
| af655b3674 | |||
| 5875c814df | |||
| fcaa952973 | |||
| 65c02328b3 | |||
| d629468cd1 | |||
| 0cdb477b3f | |||
| ed4f4a699b | |||
| fc7b8b4bf1 | |||
| 22b7ae2136 | |||
| 032d865c92 | |||
| c48c716eb0 | |||
| e98219d2c5 | |||
| 519e090a7a | |||
| 4e0f37281b | |||
| e6750de14d | |||
| 5380a342d5 | |||
| 44e73200ff | |||
| 48b4c62696 | |||
| b9accadb70 | |||
| e358c67da5 | |||
| 1764677b7d | |||
| 264ddbe183 | |||
| d8ba422178 | |||
| 95f43917a4 | |||
| e0f806f0fb | |||
| 01a7b5fbc6 | |||
| c86b8198d9 | |||
| 3771bda471 | |||
| 1178d844d0 | |||
| aa9577db67 | |||
| 7af474cbc6 | |||
| 7f6de430c0 | |||
| bc2d0ff0cc | |||
| 645aa65e9b | |||
| 2ae494999c | |||
| 2826d50cbb | |||
| 8c4bddac9f | |||
| 2a7d35cc39 | |||
| 8389698958 | |||
| 289b270c85 | |||
| 8661290c6a | |||
| 84a8f11fc9 | |||
| ad1b530d32 | |||
| 65e322824b | |||
| 3f5bee7e4c | |||
| bff57e53f0 | |||
| 8280b3a3ff | |||
| 7dd52995d0 | |||
| e8bf433c68 | |||
| 12b5c43d85 | |||
| b42cc6f683 | |||
| a1d6ae010e | |||
| cd1c88a1b5 | |||
| 5d245f403f | |||
| 91f18df917 | |||
| f3b3c291b9 | |||
| 6bcd6240ce | |||
| 5df5a679ac | |||
| 6dc2db25da | |||
| 7d33e1302a | |||
| 2edb5b5496 | |||
| 3ba7d68d4a | |||
| da58bd5609 | |||
| e8c0f46afb | |||
| 772a99012d | |||
| f408406ef0 | |||
| 1fa319a8f3 | |||
| a0aefe21c8 | |||
| d6be29dbdc | |||
| 52ffa2d8c0 | |||
| 5ca4e8006e | |||
| 75cfddebcd | |||
| 1bc4b4ef32 | |||
| ff7c639b64 | |||
| 77172800a8 | |||
| 6615e0f2db | |||
| 0f562330cf | |||
| 42a8a1ff61 | |||
| 29c0f0c115 | |||
| dc33168ecc | |||
| 1e26bb533a | |||
| 021fbc533f | |||
| bc6daaeac2 | |||
| d60c255703 | |||
| 2d9ba937fb | |||
| 9cdc6122b3 | |||
| 3374074940 | |||
| 4f65cb099a | |||
| 0e52a3bcee | |||
| ed3a4a33e2 | |||
| 3e0658fe30 | |||
| f35724daa9 | |||
| 58fd786fda | |||
| bf41c77d80 | |||
| d8de321074 | |||
| d77705a039 | |||
| 27d9da15dc | |||
| a192842dc0 | |||
| 400aa93bf3 | |||
| 86952ff85e | |||
| bab9bd7550 | |||
| 87e60bd0eb | |||
| 711d20ea14 | |||
| a0a0036727 | |||
| 15f6a33c4b | |||
| 10f92836e6 | |||
| 54558c863d | |||
| e25aece700 | |||
| bfdad19911 | |||
| d112089152 | |||
| 6c91d8bea6 | |||
| 7edebc6dd2 | |||
| 76649ba268 | |||
| 2ae95bdf2b | |||
| 1548ef10b0 | |||
| 835cd70ded | |||
| 5a8444579c | |||
| dc4012ea7c | |||
| 17007e6154 | |||
| 82013b1970 | |||
| 7cf4063d9e | |||
| d1cf839e53 | |||
| f47164a2e6 | |||
| bdb641ec94 | |||
| 341a327ea0 | |||
| 3d53a6ecf8 | |||
| eede4a386f | |||
| 437137783c | |||
| b96597b089 | |||
| eeb2782700 | |||
| 0f4ad0bbf5 | |||
| 750e4a1cca | |||
| e5b8aa57d7 | |||
| 0723514fea | |||
| c298e1b3ee | |||
| 91e5d171b7 | |||
| 28f47e8248 | |||
| f870dc7b72 | |||
| 04c5e9fa42 | |||
| 65b08e2914 | |||
| ed19b9e032 | |||
| e72b5a55a0 | |||
| 5281507483 | |||
| abf7303d6e | |||
| 775f29564a | |||
| 7e33a3e12f | |||
| 5538b2910d | |||
| c7c7988ae6 | |||
| 454106a22b | |||
| 43c1d7f8aa | |||
| 1156018c0d | |||
| e00e87a845 | |||
| 2b29212d0f | |||
| 7390d908bd | |||
| a98308a7a4 | |||
| 3b263eb961 | |||
| c6d5c143cf | |||
| 6d0f303cd5 | |||
| 327f16fa03 | |||
| a4ee1eb785 | |||
| fc52ee518e | |||
| b3e0ea6d33 | |||
| dc53f387a6 | |||
| 11dfe7b649 | |||
| 1ce861c000 | |||
| 0c8f200d45 | |||
| c63536c682 | |||
| 7516cebb40 | |||
| e82a7f57fe | |||
| bcc16fbefe | |||
| a57c5c7c93 | |||
| f7db59ea7c | |||
| 4f348dcd19 | |||
| a3d896f456 | |||
| 9ad65e6e46 | |||
| 790c9714c7 | |||
| 68074be9d6 | |||
| 4c2a40808b | |||
| 8dbac6a34f | |||
| 6bd8213093 | |||
| 0b0af2296f | |||
| 2c7d49f7a8 | |||
| dc89b0569a | |||
| ff5ea00b00 | |||
| 1894901930 | |||
| 135a285596 | |||
| 32e229b162 | |||
| 3102ac403b | |||
| 0f16b54d8e | |||
| 8fc1e34a74 | |||
| af2b775a4a | |||
| e9bf2fe161 | |||
| 3709a0b7e1 | |||
| c651cdc356 | |||
| db9d92041f | |||
| b474a818aa | |||
| cea521a737 | |||
| b89eb07c6e | |||
| 7f6e5e2e52 | |||
| 4fdaf6dead | |||
| dea0e08d93 | |||
| fca1c13d03 | |||
| 3029137cb8 | |||
| c7c9a2496a | |||
| f40a7105bc | |||
| 00313c747a | |||
| 2ffd187094 | |||
| 6f519b0456 | |||
| cb2bf796fa | |||
| bbde993e81 | |||
| 9088ecca16 | |||
| 9a99af2281 | |||
| 70bb40ce2f | |||
| 9fea9ea756 | |||
| dc46960e6c | |||
| 7a04b22375 | |||
| d5526515f1 | |||
| 8aeedb8971 | |||
| 9fe7bfb898 | |||
| 7313407d04 | |||
| 42d70f888e | |||
| 881efc8e8f | |||
| 71c86381df | |||
| efdb750334 | |||
| 5afd8d8bd3 | |||
| 6f21ea930a | |||
| af14f57962 | |||
| e9b8f71997 | |||
| 2f8c45aec4 | |||
| eaf5b8bc8e | |||
| efb2cfab9f | |||
| 320328777e | |||
| 21f965f284 | |||
| 5c36064afc | |||
| 01b583957e | |||
| 7ccf2390a7 | |||
| feab9862ac | |||
| f85f95e792 | |||
| d658e7c490 | |||
| 520e510aab | |||
| 769834e1a6 | |||
| 42d06d6281 | |||
| 0d6028976b | |||
| 69f7af7c63 | |||
| abbada47da | |||
| e7679d8320 | |||
| d3807fd908 | |||
| 5adf74794b | |||
| 73c2e94a32 | |||
| 66000a6769 | |||
| 09b15bab9b | |||
| 0ed88c474a | |||
| c40a312e73 | |||
| 3d1ca5abb1 | |||
| f63866b2a2 | |||
| 7dec3866cf | |||
| 06a5234d10 | |||
| a109a3317e | |||
| 9f4fc49790 | |||
| 6c8063b26a | |||
| 36ddbe99a1 | |||
| 47e5c0df16 | |||
| 86635c4543 | |||
| 855549d677 | |||
| d58ec4d3f6 | |||
| 879cc31261 | |||
| 56fea45505 | |||
| 5e7656489d | |||
| a816423037 | |||
| f3a500923c | |||
| 7f0947ef9b | |||
| f90530f593 | |||
| 3683f7e097 | |||
| 98310e8d7a | |||
| 8c9aad9e34 | |||
| 2b6a4365ac | |||
| 94c1ed4c28 | |||
| c1a1633593 | |||
| a6c37ff276 | |||
| 495b218c7f | |||
| d224f3c5bd | |||
| be309aba69 | |||
| 2b3d3d9cf5 | |||
| 681969439d | |||
| f9be1f3493 | |||
| a2efd40798 | |||
| 94e7011413 | |||
| 1aca554ae3 | |||
| eefc18202f | |||
| 70e414b279 | |||
| e629088ec3 | |||
| 9431a8c3ac | |||
| 9e7a9e6210 | |||
| c36fc467e6 | |||
| 0c7701dc57 | |||
| 2dbbce31d6 | |||
| d18ccc168f | |||
| cc5ae002a2 | |||
| 06886f98d4 | |||
| 5e072e94e8 | |||
| 9e4ef708e4 | |||
| da0af11bbb | |||
| 04b8ab1b87 | |||
| 7988e3ead9 | |||
| b51aea98b4 | |||
| 91cb03a43c | |||
| 9977f4efab | |||
| 7928f075b5 | |||
| 79bc23f83a | |||
| b201dbb698 | |||
| 11004c20e6 | |||
| 3a54d0b8a9 | |||
| 24d5fdd6eb | |||
| 75eb321272 | |||
| ef8f630ad5 | |||
| 5c51060dca | |||
| ec13dea5e6 | |||
| affd4a481f | |||
| eafad9a5c4 | |||
| 454656a91c | |||
| a5c3ca9e8e | |||
| 4db152b2d7 | |||
| 43a2096852 | |||
| f76ab1ebe6 | |||
| 04392c562e | |||
| a4470f9b6d | |||
| db85792c59 | |||
| 92f071de93 | |||
| ee046f1c25 | |||
| 2135de059f | |||
| 3cad4ae118 | |||
| 69b8b7989a | |||
| 3c02b28c11 | |||
| 9e7510deea | |||
| e259df1d0a | |||
| 941a3d8bf8 | |||
| 970227e082 | |||
| c42b018915 | |||
| c7553e032e | |||
| 3e10fac5d0 | |||
| b15f0b0805 | |||
| fa3c636494 | |||
| b91487c60f | |||
| 8ad695e89f | |||
| 0f5c68971c | |||
| 3373549e56 | |||
| 608fcbd0a1 | |||
| 1470ae73e7 | |||
| b0f51eaca6 | |||
| 715210944e | |||
| a4f35a8452 | |||
| 5a691a1b1e | |||
| 73a755f29b | |||
| fe7f36ad7f | |||
| 36e41ecae6 | |||
| 367e532578 | |||
| ce71cf7703 | |||
| e19c0e4f87 | |||
| 60881e2ecd | |||
| f8fb803e52 | |||
| 19411d3d3d | |||
| c1ebf8ae1a | |||
| f8f059d3fe | |||
| 17a83933d4 | |||
| 326c1332bf | |||
| c6d4942295 | |||
| 9a08ea10cc | |||
| aace41032e | |||
| b1e8a45fbe | |||
| 0cc86b024d | |||
| d4142db847 | |||
| 30b67af51a | |||
| be595a62b7 | |||
| f64724eda0 | |||
| fe532b9dd5 | |||
| 40dd8275d2 | |||
| 40b654048b | |||
| 53f98951ea | |||
| 88a3a82a21 | |||
| bb5e18d981 | |||
| 7bc905d352 | |||
| ba60324426 | |||
| a731e4a9b5 | |||
| ed4d12bfcb | |||
| 0c44769740 | |||
| 8c774a204d | |||
| 9919387904 | |||
| 13d57f56f6 | |||
| 56731927ee | |||
| b21db90456 | |||
| 55e0f91bcc | |||
| 0eaec66ba6 | |||
| 7c4f373d2a | |||
| 60e08de077 | |||
| a081c47efa | |||
| b015b8bd2b | |||
| 2bd95a2b57 | |||
| ea7ff135ee | |||
| e84e13fe37 | |||
| 617af68aeb | |||
| 6690598024 | |||
| 54de539b8b | |||
| 684778b666 | |||
| e89ee8ff3c | |||
| 50ba01e22d | |||
| 462bd77ad5 | |||
| 0cdbfed7ab | |||
| ddfae74ba4 | |||
| 45f96ab67f | |||
| 5170478f19 | |||
| 6b08d18f4b | |||
| 7aa6c1c08e | |||
| 623a58fb47 | |||
| b6c543734a | |||
| 6ae858d35c | |||
| 47410c54e5 | |||
| e430002951 | |||
| 0fa5ca3782 | |||
| 6bbea1bbf2 | |||
| a00fe91fca | |||
| 22d77af409 | |||
| e2a18e3487 | |||
| 7bb6a7c1e8 | |||
| 2937404227 | |||
| a3b7df7b25 | |||
| 6edcb553e8 | |||
| ce1c1e1f88 | |||
| fa0a35741a | |||
| cf4c2b5768 | |||
| 0dd823aa38 | |||
| b9b8101676 | |||
| d1917fb986 | |||
| e1442efef3 | |||
| 20b53313af | |||
| 15baa08ca2 | |||
| 7daeb6c633 | |||
| a267b67337 | |||
| 70ac47b8a8 | |||
| 61d9f957ea | |||
| c0149100bb | |||
| 1b896d8b30 | |||
| 20c0b76329 | |||
| f715a6fca2 | |||
| 8849eb1186 | |||
| 95d5bff6ba | |||
| 1d9449838f | |||
| b5bd7160d2 | |||
| ce4cb0db80 | |||
| 603868a8c9 | |||
| 7716441bbd | |||
| b5c805f0e9 | |||
| 6f54250ee5 | |||
| 2746d72731 | |||
| 7f083acdc4 | |||
| 681bc18248 | |||
| 23ce97a358 | |||
| 26bfd95289 | |||
| 51cd8cc977 | |||
| 571c953e51 | |||
| d65b3608ba | |||
| 14db63df3c | |||
| ed95c0d555 | |||
| 8deaeed6b7 | |||
| 05df25b8f4 | |||
| 9a5fc6ebe8 | |||
| d671345ab3 | |||
| 9ecfe91729 | |||
| fa571717d4 | |||
| 262a7d549e | |||
| 860dd76d0d | |||
| 484c16da42 | |||
| 9552ebf4c2 | |||
| 732c846cfc | |||
| a518af71ea | |||
| ca8a99bcfb | |||
| d1a5add3ea | |||
| 055e4d96e8 | |||
| ce20bba792 | |||
| 80a55bb69a | |||
| 32bdffa7eb | |||
| 07e8ee35d9 | |||
| 25b8da0a76 | |||
| 63bfca3d09 | |||
| 37b1d4e77d | |||
| d4e5050fc2 | |||
| 0cd27eac50 | |||
| 7fa67d4a21 | |||
| 493f02951f | |||
| 82597aa636 | |||
| 76384747a1 | |||
| e85e30c1f7 | |||
| 25eb893837 | |||
| b6b48513de | |||
| e9a22192f7 | |||
| 1fe576752b | |||
| 4277271992 | |||
| 6622e7369d | |||
| d2bd937f36 | |||
| ff1f9b98d2 | |||
| 0c85b40789 | |||
| b4104c0136 | |||
| fb712cf9c1 | |||
| 061b285aeb | |||
| 9841df732f | |||
| 9f94d1b6b4 | |||
| 5b2b699618 | |||
| 7c04662d7d | |||
| 4746ac82c3 | |||
| a223439eb8 | |||
| 6e50b5c005 | |||
| 213524e893 | |||
| be020fad39 | |||
| 2308533235 | |||
| 009b50557c | |||
| 8668dd67ac | |||
| e7df1f1f3d | |||
| 6b81eebb02 | |||
| c4cfc0cff6 | |||
| d3cbd937fb | |||
| 102068f9e5 | |||
| 0901e1a34c | |||
| 6abe6e7539 | |||
| f6cb33b2ea | |||
| 1dc49cfc70 | |||
| f49ec5fac8 | |||
| ab466b60c8 | |||
| d2e5c55bbf | |||
| 127e38a0b5 | |||
| b68978ecb3 | |||
| a381e36779 | |||
| a5a6af7ef6 | |||
| 31ffe5e060 | |||
| 61f8878e05 | |||
| 9b44b15f3b | |||
| 530965ac7e | |||
| 42e1595bd7 | |||
| e7c08d1202 | |||
| 61b5160d81 | |||
| b58fcc5395 | |||
| d4b146d080 | |||
| f65fbdf7ae | |||
| 8008985120 | |||
| f23cb1aa79 | |||
| 0caf6b5a2e | |||
| d401f7cd19 | |||
| 21bf03320e | |||
| ecc65ff233 | |||
| 26094a5405 | |||
| 40d49373d3 | |||
| 501acbc9c8 | |||
| cf6b2f8efd | |||
| 4faf48233b | |||
| bf6e0752f8 | |||
| 6e012ed24f | |||
| 1254561724 | |||
| 60fcb97a3e | |||
| 5459f1e9db | |||
| 0ad96ca7da | |||
| 8be54136ed | |||
| 7cb6801ce8 | |||
| 177ac5687f | |||
| 1301eb0fa4 | |||
| 62caaf01d7 | |||
| 160c9b9d8e | |||
| c8891c1008 | |||
| 153668db56 | |||
| 276c6c1725 | |||
| 5859ae6ba7 | |||
| 1594231b4f | |||
| f9acde8c55 | |||
| 6bdfe65bf2 | |||
| 5fd6c1c5ab | |||
| bab80e0089 | |||
| be2cfb3252 | |||
| 49bc53c6d2 | |||
| 067bbb966d | |||
| 75508fe9e8 | |||
| 49afce5f68 | |||
| 6260d350ac | |||
| 26c89f71b2 | |||
| 2d14f6e768 | |||
| b27cd33116 | |||
| f0448ba231 | |||
| acf5e21f50 | |||
| d1ca0a8f8f | |||
| e7b35d27e7 | |||
| 02e3f4cd9c | |||
| 8487536280 | |||
| 84753e55a7 | |||
| 0c96b30053 | |||
| 27bd476b12 | |||
| ed69dc12ab | |||
| e05b443a69 | |||
| a4455d2c5f | |||
| 8f17889f7f | |||
| a965cb684c | |||
| f713429674 | |||
| 392ffce8c7 | |||
| d7a238b5ec | |||
| 92ec78cd8a | |||
| 889ccdb58d | |||
| a29015551c | |||
| 83e6a4a57e | |||
| 001183245e | |||
| 09ab319328 | |||
| 76e7161608 | |||
| bc854afead | |||
| 1e0b734734 | |||
| 848ce7936f | |||
| d76d0a030f | |||
| e2af4c964d | |||
| 4527d8bd51 | |||
| a17a282b03 | |||
| 2c050522cd | |||
| c98e7cab4b | |||
| 4b49562949 | |||
| efb388ded4 | |||
| 08e9f19644 | |||
| 3b35a4b63b | |||
| b3b7f1ea97 | |||
| 075018d03d | |||
| ae7dce4575 | |||
| 3b0748fe44 | |||
| 2b49a04227 | |||
| 097ee9f2a9 | |||
| ee12977a9f | |||
| e2821cbea8 | |||
| e9f9c6e777 | |||
| 95d4391680 | |||
| f65a2826f2 | |||
| 94a8c44d39 | |||
| 16f8402d36 | |||
| 04d4085759 | |||
| a75896c85b | |||
| d397bd5c4f | |||
| 61675c2e77 | |||
| 718175eb34 | |||
| 8a3ee0515c | |||
| aefb84cdeb | |||
| 5aac826ec1 | |||
| aa86362a0a | |||
| 6104927cb6 | |||
| 74c889062b | |||
| 7b2539c4f4 | |||
| 851febd495 | |||
| a12abd7377 | |||
| 2f54cb4c22 | |||
| 81f7354fb5 | |||
| f8c20e1659 | |||
| 56394f6d8d | |||
| e0e6d96c84 | |||
| f41b558fe5 | |||
| 5507febe09 | |||
| b8ee3187ec | |||
| f74842cd4c | |||
| 2e61201f86 | |||
| 4108d572b8 | |||
| 423b133e75 | |||
| eb25d2e6a8 | |||
| eae06b62bc | |||
| 49aeef99b6 | |||
| 8e37d2ada6 | |||
| 7513fe9c69 | |||
| 34d3091fc9 | |||
| 992f520698 | |||
| b23e1d3d52 | |||
| dd53539799 | |||
| 93b1ce53c0 | |||
| e70d6d1f8f | |||
| c34db290e4 | |||
| 9d2b7875b9 | |||
| 1f025817f1 | |||
| 38d4e3a097 | |||
| c03d44da00 | |||
| 537c507efe | |||
| 0fbd08f1ab | |||
| 0f469a3269 | |||
| 9713bc8c02 | |||
| 7f0b2c54f3 | |||
| e9fd61a1ea | |||
| 33c95d1a58 | |||
| c5aa670569 | |||
| 533b11f991 | |||
| ebb68c3386 | |||
| e9a4d9cafe | |||
| bb114932ea | |||
| 3b87c5d84b | |||
| 30b635527c | |||
| 77963aaf88 | |||
| 02d5ca78d5 | |||
| e99fe93029 | |||
| 548021dd40 | |||
| 0f528c4811 | |||
| c876876d5e | |||
| 7dde2fec55 | |||
| 49cf92c2a2 | |||
| 60319c30ac | |||
| 191e8ab240 | |||
| b4dec8ccbb | |||
| 7d28edc116 | |||
| 4d314f99ac | |||
| 1d146640e5 | |||
| b4c95d4fc9 | |||
| d9c258f27e | |||
| 4a56cc3693 | |||
| 8b149ff827 | |||
| f3145e671a | |||
| d3cb001d65 | |||
| 16da9b0506 | |||
| d7914d2c54 | |||
| 9849c62d80 | |||
| 3c630fb7f4 | |||
| 55f0b6a1f8 | |||
| 1b21fdda3b | |||
| c17d6ba487 | |||
| c6ff7e8934 | |||
| 1895e8143d | |||
| 5c74a02688 | |||
| 2f900e11ed | |||
| 1123ca4bc1 | |||
| 4973c2afc6 | |||
| 502e3ceb3b | |||
| 32b40fe1ad | |||
| 9a12b170f6 | |||
| 9f4b594bd0 | |||
| ea7a8c9670 | |||
| 113dac6e2b | |||
| 642427d015 | |||
| 26dad65c8d | |||
| 827bab90bf | |||
| 1a90f1c017 | |||
| 8172618bec | |||
| e12d779f00 | |||
| 1300955c13 | |||
| 7714c35829 | |||
| 3de070708f | |||
| 7aba7b0854 | |||
| f16c7247a9 | |||
| ef2ece3600 | |||
| 962b559638 | |||
| 9ab4707d43 | |||
| c3759feaa0 | |||
| 96418f3640 | |||
| a96c354f4f | |||
| 81462d9050 | |||
| 919bdca8f4 | |||
| 130e5cd3ec | |||
| 42301210c4 | |||
| 43a3c93d9b | |||
| cc98b88e28 | |||
| 212a192abf | |||
| ebc75b1ba8 | |||
| 7be6421989 | |||
| b4206d3202 | |||
| e8e0d5dd02 | |||
| be229d374e | |||
| 14b28a8a89 | |||
| c71bccd72c | |||
| cee9605fc5 | |||
| 7b5b942c47 | |||
| d5e0af2646 | |||
| a12e1d8b0e | |||
| d9d9b6800b | |||
| 8d7fd982e1 | |||
| 3e937e9811 | |||
| 4b993b99cd | |||
| 839f0b642c | |||
| f4d7586034 | |||
| ab23f624af | |||
| 86484e7426 | |||
| 734b6778b1 | |||
| 252682dd99 | |||
| 95e14486af | |||
| cf239ccac0 | |||
| dd041945d2 | |||
| 1cc4c52c7a | |||
| a2c894bcc9 | |||
| ebfd8ca4c3 | |||
| da938d8212 | |||
| 855f955dec | |||
| 1b8a8cf939 | |||
| 9147e86d96 | |||
| 6c748c2f87 | |||
| 4b6e0916c9 | |||
| fa5861a626 | |||
| f556890873 | |||
| 55f185f980 | |||
| d4474e1d4d | |||
| b64f6c5c27 | |||
| 616bb487f4 | |||
| 9f4fb29b58 | |||
| 1262d3fce9 | |||
| f4f74e1171 | |||
| f0c8c044c9 | |||
| c13b291c64 | |||
| 70191ea368 | |||
| d294bf4d05 | |||
| 10ca03f238 | |||
| 67f96e0fdd | |||
| 879ce3b30d | |||
| 3de96f1e7a | |||
| ee621bcace | |||
| c2118a8cb9 | |||
| 21f1579f73 | |||
| 4dce9d659f | |||
| ca4cfe358f | |||
| 7c8c4bd233 | |||
| 35cf96e15f | |||
| 7a9d408425 | |||
| 69300e0766 | |||
| 559f76e887 | |||
| 6eb88278ae | |||
| 662ddf9fd6 | |||
| 698f670350 | |||
| aebaf688a9 | |||
| 7e15a343f3 | |||
| f47eea1e6c | |||
| 5a944514f3 | |||
| fb955667f5 | |||
| 31aaa23b20 | |||
| 4d239b46e2 | |||
| 856b07197a | |||
| d07751605a | |||
| ddb09e98e8 | |||
| 75b40f603a | |||
| 5c21d71461 | |||
| 6c5f310cba | |||
| 909a951ff0 | |||
| 51a07bdb31 | |||
| 3dcdf0863e | |||
| 46b5731ac4 | |||
| 9be438d2f7 | |||
| bb8f4fb092 | |||
| 7b65a68450 | |||
| 7e6eecc6cf | |||
| 9d709ea152 | |||
| eadb3cf98c | |||
| 09e9c2f224 | |||
| dbae05605b | |||
| 3c5b721177 | |||
| b0e4ce7bb8 | |||
| 2bf7adef5c | |||
| 34fb03fbd3 | |||
| a8a28fea18 | |||
| 16cef29925 | |||
| 26564ee020 | |||
| 66a80ade30 | |||
| 685ec5d8d7 | |||
| 52139dc24e | |||
| 2357f46761 | |||
| 64fea21a38 | |||
| 71e73750e2 | |||
| 37b298fcba | |||
| 01ad97e7b0 | |||
| 988f4da6e1 | |||
| f48ee846e9 | |||
| a9c599abeb | |||
| c717d23901 | |||
| 6153375c76 | |||
| 850ecb23df | |||
| 8f03ff2952 | |||
| 0be166bb59 | |||
| cb2d24baca | |||
| 7609b08e86 | |||
| aeffa0e150 | |||
| 932d552ae7 | |||
| 78d8485243 | |||
| c3232a463c | |||
| 536beb0d40 | |||
| 1afe4f0cd9 | |||
| 334c4095bb | |||
| 986e5f9c7a | |||
| 6077cf2389 | |||
| f417e898f6 | |||
| 047d9525e7 | |||
| ca7da8a0da | |||
| 49b17023a5 | |||
| 693c4f8270 | |||
| df08c14aef | |||
| af903f6690 | |||
| cef25898bb | |||
| 0dea901368 | |||
| 9086171f45 | |||
| 9aec992693 | |||
| a788006d7c | |||
| 40512a4823 | |||
| 2e77f0ed7d | |||
| af5392b8ac | |||
| 471ac4976f | |||
| 16c892caa6 | |||
| 35b0e06260 | |||
| bbb7dfdd07 | |||
| 56a9316a28 | |||
| 7d676f51bd | |||
| 7ca8e31087 | |||
| 029d8b58db | |||
| 160a336b48 | |||
| 1ecd195e6e | |||
| 9f8a07fc27 | |||
| 1f3e3c698f | |||
| 1f9e33d995 | |||
| 32178541fe | |||
| 51e915c423 | |||
| 4ca00f7347 | |||
| b2d34d93ab | |||
| 78bb074c0d | |||
| 3a39c92ae4 | |||
| 883127f0d6 | |||
| 3b52cd018b | |||
| 6f34d0b346 | |||
| b35bd36ec7 | |||
| 8c037bf425 | |||
| ae5e07ddd6 | |||
| b16529bf9f | |||
| db0676cc51 | |||
| 2d1cb8b519 | |||
| 3a11c56438 | |||
| caf34d6a3a | |||
| a028dff6e9 | |||
| 0563ee4a97 | |||
| d466abdc64 | |||
| f4be899ae9 | |||
| 5403bc647a | |||
| 482eb6c0de | |||
| e02e4cd975 | |||
| ac90b13032 | |||
| 64aaf670ed | |||
| 4a764c2d9d | |||
| 0f0480b79f | |||
| df6feab346 | |||
| aef34c11b7 | |||
| 0292ba959f | |||
| 58275a2f0a | |||
| f0d3a06655 | |||
| 0ce67b307c | |||
| 598cdea22a | |||
| 32d23d6303 | |||
| 3279a575f6 | |||
| 16ffbd1920 | |||
| 9180060920 | |||
| fdae5fd89c | |||
| 8e218de3e7 | |||
| a6c89b75fc | |||
| 15cf475d04 |
+2
-7
@@ -3,13 +3,8 @@
|
||||
.project
|
||||
.svn
|
||||
.nvm-version
|
||||
atom.xcodeproj
|
||||
build
|
||||
.xcodebuild-info
|
||||
node_modules
|
||||
npm-debug.log
|
||||
tags
|
||||
/cef/
|
||||
/sources.gypi
|
||||
/node/
|
||||
/tags
|
||||
/atom-shell/
|
||||
docs/api
|
||||
|
||||
+6
-87
@@ -1,90 +1,9 @@
|
||||
[submodule "vendor/packages/text.tmbundle"]
|
||||
path = vendor/packages/text.tmbundle
|
||||
url = https://github.com/textmate/text.tmbundle.git
|
||||
[submodule "vendor/packages/css.tmbundle"]
|
||||
path = vendor/packages/css.tmbundle
|
||||
url = https://github.com/textmate/css.tmbundle.git
|
||||
[submodule "vendor/packages/html.tmbundle"]
|
||||
path = vendor/packages/html.tmbundle
|
||||
url = https://github.com/textmate/html.tmbundle.git
|
||||
[submodule "vendor/packages/javascript.tmbundle"]
|
||||
path = vendor/packages/javascript.tmbundle
|
||||
url = https://github.com/textmate/javascript.tmbundle.git
|
||||
[submodule "vendor/packages/ruby-on-rails-tmbundle"]
|
||||
path = vendor/packages/ruby-on-rails-tmbundle
|
||||
url = https://github.com/drnic/ruby-on-rails-tmbundle.git
|
||||
[submodule "vendor/packages/ruby.tmbundle"]
|
||||
path = vendor/packages/ruby.tmbundle
|
||||
url = https://github.com/textmate/ruby.tmbundle.git
|
||||
[submodule "vendor/packages/coffee-script-tmbundle"]
|
||||
path = vendor/packages/coffee-script-tmbundle
|
||||
url = https://github.com/kevinsawicki/coffee-script-tmbundle.git
|
||||
[submodule "vendor/packages/puppet-textmate.tmbundle"]
|
||||
path = vendor/packages/puppet-textmate.tmbundle
|
||||
url = https://github.com/cburyta/puppet-textmate.tmbundle.git
|
||||
[submodule "vendor/packages/c.tmbundle"]
|
||||
path = vendor/packages/c.tmbundle
|
||||
url = https://github.com/textmate/c.tmbundle.git
|
||||
[submodule "vendor/packages/objective-c.tmbundle"]
|
||||
path = vendor/packages/objective-c.tmbundle
|
||||
url = https://github.com/textmate/objective-c.tmbundle.git
|
||||
[submodule "vendor/packages/git.tmbundle"]
|
||||
path = vendor/packages/git.tmbundle
|
||||
url = https://github.com/kevinsawicki/git.tmbundle.git
|
||||
[submodule "vendor/packages/json.tmbundle"]
|
||||
path = vendor/packages/json.tmbundle
|
||||
url = https://github.com/textmate/json.tmbundle.git
|
||||
[submodule "vendor/packages/shellscript.tmbundle"]
|
||||
path = vendor/packages/shellscript.tmbundle
|
||||
url = https://github.com/textmate/shellscript.tmbundle
|
||||
[submodule "vendor/packages/xml.tmbundle"]
|
||||
path = vendor/packages/xml.tmbundle
|
||||
url = https://github.com/textmate/xml.tmbundle.git
|
||||
[submodule "vendor/packages/property-list.tmbundle"]
|
||||
path = vendor/packages/property-list.tmbundle
|
||||
url = https://github.com/textmate/property-list.tmbundle.git
|
||||
[submodule "vendor/packages/python.tmbundle"]
|
||||
path = vendor/packages/python.tmbundle
|
||||
url = https://github.com/textmate/python.tmbundle
|
||||
[submodule "vendor/packages/clojure.tmbundle"]
|
||||
path = vendor/packages/clojure.tmbundle
|
||||
url = https://github.com/mmcgrana/textmate-clojure
|
||||
[submodule "prebuilt-cef"]
|
||||
path = prebuilt-cef
|
||||
url = https://github.com/github/prebuilt-cef
|
||||
[submodule "vendor/packages/yaml.tmbundle"]
|
||||
path = vendor/packages/yaml.tmbundle
|
||||
url = https://github.com/textmate/yaml.tmbundle.git
|
||||
[submodule "vendor/packages/java.tmbundle"]
|
||||
path = vendor/packages/java.tmbundle
|
||||
url = https://github.com/textmate/java.tmbundle.git
|
||||
[submodule "vendor/packages/php.tmbundle"]
|
||||
path = vendor/packages/php.tmbundle
|
||||
url = https://github.com/textmate/php.tmbundle.git
|
||||
[submodule "vendor/packages/perl.tmbundle"]
|
||||
path = vendor/packages/perl.tmbundle
|
||||
url = https://github.com/textmate/perl.tmbundle.git
|
||||
[submodule "vendor/packages/sass.tmbundle"]
|
||||
path = vendor/packages/sass.tmbundle
|
||||
url = https://github.com/alexsancho/SASS.tmbundle.git
|
||||
[submodule "vendor/packages/less.tmbundle"]
|
||||
path = vendor/packages/less.tmbundle
|
||||
url = https://github.com/mathewbyrne/less.tmbundle.git
|
||||
[submodule "vendor/packages/mustache.tmbundle"]
|
||||
path = vendor/packages/mustache.tmbundle
|
||||
url = https://github.com/kevinsawicki/Mustache.tmbundle.git
|
||||
[submodule "vendor/packages/go.tmbundle"]
|
||||
path = vendor/packages/go.tmbundle
|
||||
url = https://github.com/rsms/Go.tmbundle
|
||||
[submodule "vendor/bootstrap"]
|
||||
path = vendor/bootstrap
|
||||
url = https://github.com/twitter/bootstrap
|
||||
[submodule "vendor/packages/pegjs.tmbundle"]
|
||||
path = vendor/packages/pegjs.tmbundle
|
||||
url = https://github.com/alexstrat/PEGjs.tmbundle
|
||||
[submodule "vendor/packages/sql.tmbundle"]
|
||||
path = vendor/packages/sql.tmbundle
|
||||
url = https://github.com/textmate/sql.tmbundle
|
||||
[submodule "vendor/packages/hyperlink-helper.tmbundle"]
|
||||
path = vendor/packages/hyperlink-helper.tmbundle
|
||||
url = https://github.com/textmate/hyperlink-helper.tmbundle
|
||||
[submodule "vendor/apm"]
|
||||
path = vendor/apm
|
||||
url = https://github.com/github/apm.git
|
||||
[submodule "vendor/telepath"]
|
||||
path = vendor/telepath
|
||||
url = https://github.com/github/telepath.git
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
tags
|
||||
node_modules
|
||||
vendor/packages
|
||||
docs/api
|
||||
.git
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ pairs:
|
||||
jc: Jerry Cheung; jerry
|
||||
bl: Brian Lopez; brian
|
||||
jp: Justin Palmer; justin
|
||||
gt: Garen Torikian; garen
|
||||
email:
|
||||
domain: github.com
|
||||
#global: true
|
||||
|
||||
|
||||
@@ -1,3 +1,37 @@
|
||||
* Fixed: Atom can now be launched when ~/.atom/config.cson doesn't exist
|
||||
* Added: Initial collaboration sessions
|
||||
* Fixed: Empty lines being deleted via uppercase/downcase command
|
||||
* Fixed: Keybindings not working when using non-English keyboard language
|
||||
* Fixed: cmd-shift-p and cmd-alt-w not doing anything when pressed
|
||||
|
||||
* Improved: Use grunt (instead of rake) for build system
|
||||
* Fixed: Java files not syntax highlighting correctly.
|
||||
* Fixed: LESS/CSS now indents properly after hitting enter.
|
||||
* Added: Support for browsing .tar.gz and .zip files in the editor
|
||||
* Added: TODO/FIXME/CHANGED are now highlighted in comments.
|
||||
* Fixed: Full screen state of windows is now persisted across restarts.
|
||||
* Added: Makefile syntax highlighting now included.
|
||||
* Added: Open fuzzy finder to specific line using colon suffix (i.e ':25')
|
||||
* Fixed: Issues deleting and moving over certain UTF-8 characters
|
||||
* Fixed: Tree view not properly highlighting or revealing for open images.
|
||||
* Added: Packages can now be installed from the configuration UI.
|
||||
* Fixed: .git folder now ignored by default when searching
|
||||
|
||||
* Fixed: Not being able to disable packages from configuration UI.
|
||||
* Fixed: Fuzzy finder showing poor results for entered text
|
||||
* Improved: App icon
|
||||
|
||||
* Fixed: Fuzzy finder being empty sometimes
|
||||
|
||||
* Improved: App icon
|
||||
* Fixed: End of line invisibles rendering incorrectly with the indent guide
|
||||
* Fixed: Updates not installing automatically on restart
|
||||
* Fixed: Wrap guide not displaying
|
||||
* Fixed: Error when saving with the markdown preview focused
|
||||
|
||||
* Fixed: Atom always running in dev mode
|
||||
* Fixed: Crash when running in dev mode without a path to the Atom source
|
||||
|
||||
* Fixed: Freeze when editing a RoR class
|
||||
* Added: meta-N to open a new untitled editor in the current window
|
||||
|
||||
|
||||
+6
-1
@@ -18,6 +18,11 @@
|
||||
* Style new elements in both the light and dark default themes when
|
||||
appropriate
|
||||
* New packages go in `src/packages/`
|
||||
* Add 3rd-party packages by submoduling in `vendor/packages/`
|
||||
* Add 3rd-party packages as a `package.json` dependency
|
||||
* Commit messages are in the present tense
|
||||
* Files end with a newline
|
||||
* Class variables and methods should be in the following order:
|
||||
* Class variables (variables starting with a `@`)
|
||||
* Class methods (methods starting with a `@`)
|
||||
* Instance variables
|
||||
* Instance methods
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
path = require 'path'
|
||||
|
||||
module.exports = (grunt) ->
|
||||
appName = 'Atom.app'
|
||||
buildDir = grunt.option('build-dir') ? '/tmp/atom-build'
|
||||
shellAppDir = path.join(buildDir, appName)
|
||||
contentsDir = path.join(shellAppDir, 'Contents')
|
||||
appDir = path.join(contentsDir, 'Resources', 'app')
|
||||
installDir = path.join('/Applications', appName)
|
||||
|
||||
grunt.initConfig
|
||||
pkg: grunt.file.readJSON('package.json')
|
||||
|
||||
atom: {appDir, appName, buildDir, contentsDir, installDir, shellAppDir}
|
||||
|
||||
coffee:
|
||||
options:
|
||||
sourceMap: true
|
||||
glob_to_multiple:
|
||||
expand: true
|
||||
src: [
|
||||
'src/**/*.coffee'
|
||||
'static/**/*.coffee'
|
||||
]
|
||||
dest: appDir
|
||||
ext: '.js'
|
||||
|
||||
less:
|
||||
options:
|
||||
paths: [
|
||||
'static'
|
||||
'vendor'
|
||||
]
|
||||
glob_to_multiple:
|
||||
expand: true
|
||||
src: [
|
||||
'src/**/*.less'
|
||||
'static/**/*.less'
|
||||
'themes/**/*.less'
|
||||
]
|
||||
dest: appDir
|
||||
ext: '.css'
|
||||
|
||||
cson:
|
||||
options:
|
||||
rootObject: true
|
||||
glob_to_multiple:
|
||||
expand: true
|
||||
src: [
|
||||
'src/**/*.cson'
|
||||
'static/**/*.cson'
|
||||
'themes/**/*.cson'
|
||||
]
|
||||
dest: appDir
|
||||
ext: '.json'
|
||||
|
||||
coffeelint:
|
||||
options:
|
||||
no_empty_param_list:
|
||||
level: 'error'
|
||||
max_line_length:
|
||||
level: 'ignore'
|
||||
src: [
|
||||
'dot-atom/**/*.coffee'
|
||||
'src/**/*.coffee'
|
||||
]
|
||||
test: [
|
||||
'spec/*.coffee'
|
||||
'spec/app/**/*.coffee'
|
||||
'spec/stdlib/**/*.coffee'
|
||||
]
|
||||
|
||||
csslint:
|
||||
options:
|
||||
'adjoining-classes': false
|
||||
'box-model': false
|
||||
'box-sizing': false
|
||||
'bulletproof-font-face': false
|
||||
'compatible-vendor-prefixes': false
|
||||
'fallback-colors': false
|
||||
'font-sizes': false
|
||||
'gradients': false
|
||||
'ids': false
|
||||
'important': false
|
||||
'known-properties': false
|
||||
'outline-none': false
|
||||
'overqualified-elements': false
|
||||
'qualified-headings': false
|
||||
'unique-headings': false
|
||||
'universal-selector': false
|
||||
'vendor-prefix': false
|
||||
src: [
|
||||
'src/**/*.css',
|
||||
'static/**/*.css'
|
||||
'themes/**/*.css'
|
||||
]
|
||||
|
||||
lesslint:
|
||||
src: [
|
||||
'src/**/*.less',
|
||||
'static/**/*.less'
|
||||
'themes/**/*.less'
|
||||
]
|
||||
|
||||
grunt.loadNpmTasks('grunt-coffeelint')
|
||||
grunt.loadNpmTasks('grunt-lesslint')
|
||||
grunt.loadNpmTasks('grunt-cson')
|
||||
grunt.loadNpmTasks('grunt-contrib-csslint')
|
||||
grunt.loadNpmTasks('grunt-contrib-coffee')
|
||||
grunt.loadNpmTasks('grunt-contrib-less')
|
||||
grunt.loadTasks('tasks')
|
||||
|
||||
grunt.registerTask('compile', ['coffee', 'less', 'cson'])
|
||||
grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint'])
|
||||
grunt.registerTask('ci', ['lint', 'partial-clean', 'update-atom-shell', 'build', 'test'])
|
||||
grunt.registerTask('deploy', ['partial-clean', 'update-atom-shell', 'build', 'codesign'])
|
||||
grunt.registerTask('default', ['update-atom-shell', 'build', 'set-development-version', 'install'])
|
||||
+12
-5
@@ -1,19 +1,26 @@
|
||||
# Atom — Futuristic Text Editing
|
||||
|
||||

|
||||

|
||||
|
||||
Check out our [documentation on the docs tab](https://github.com/github/atom/docs).
|
||||
|
||||
## Building from source
|
||||
## Installing
|
||||
|
||||
Download the latest Atom release from [speakeasy](https://speakeasy.githubapp.com/apps/27).
|
||||
|
||||
It will automatically update when a new release is available.
|
||||
|
||||
## Building
|
||||
|
||||
### Requirements
|
||||
|
||||
* Mountain Lion
|
||||
* The Setup™ or Boxen
|
||||
* Xcode (available in the App Store)
|
||||
* Boxen (Obviously Atom won't release with this requirement)
|
||||
|
||||
### Installation
|
||||
|
||||
1. `gh-setup atom`
|
||||
|
||||
2. `cd ~/github/atom && rake install`
|
||||
2. `cd ~/github/atom`
|
||||
|
||||
3. `script/build`
|
||||
|
||||
+9
-147
@@ -1,149 +1,11 @@
|
||||
ATOM_SRC_PATH = File.dirname(__FILE__)
|
||||
BUILD_DIR = '/tmp/atom-build'
|
||||
rule "" do |t|
|
||||
puts <<-HELP
|
||||
Atom now uses grunt instead of Rake.
|
||||
See https://github.com/github/atom/pull/596 for more info.
|
||||
|
||||
desc "Build Atom via `xcodebuild`"
|
||||
task :build => "create-xcode-project" do
|
||||
command = "xcodebuild -target Atom SYMROOT=#{BUILD_DIR}"
|
||||
output = `#{command}`
|
||||
if $?.exitstatus != 0
|
||||
$stderr.puts "Error #{$?.exitstatus}:\n#{output}"
|
||||
exit($?.exitstatus)
|
||||
end
|
||||
end
|
||||
|
||||
desc "Create xcode project from gyp file"
|
||||
task "create-xcode-project" => ["update-cef", "update-node"] do
|
||||
`rm -rf atom.xcodeproj`
|
||||
`script/generate-sources-gypi`
|
||||
version = %{-D version="#{ENV['VERSION']}"} if ENV['VERSION']
|
||||
code_sign = %{-D code_sign="#{ENV['CODE_SIGN']}"} if ENV['CODE_SIGN']
|
||||
`gyp --depth=. #{code_sign} #{version} atom.gyp`
|
||||
end
|
||||
|
||||
desc "Update CEF to the latest version specified by the prebuilt-cef submodule"
|
||||
task "update-cef" => "bootstrap" do
|
||||
exit 1 unless system %{script/update-cefode}
|
||||
Dir.glob('cef/*.gypi').each do |filename|
|
||||
`sed -i '' -e "s/'include\\//'cef\\/include\\//" -e "s/'libcef_dll\\//'cef\\/libcef_dll\\//" #{filename}`
|
||||
end
|
||||
end
|
||||
|
||||
desc "Download node binary"
|
||||
task "update-node" do
|
||||
`script/update-node v0.10.3`
|
||||
end
|
||||
|
||||
desc "Download debug symbols for CEF"
|
||||
task "download-cef-symbols" => "update-cef" do
|
||||
sh %{script/update-cefode -s}
|
||||
end
|
||||
|
||||
task "bootstrap" do
|
||||
`script/bootstrap`
|
||||
end
|
||||
|
||||
desc "Copies Atom.app to /Applications and creates `atom` cli app"
|
||||
task :install => [:build] do
|
||||
path = application_path()
|
||||
exit 1 if not path
|
||||
|
||||
# Install Atom.app
|
||||
dest_path = "/Applications/#{File.basename(path)}"
|
||||
`rm -rf #{dest_path}`
|
||||
`cp -a #{path} #{File.expand_path(dest_path)}`
|
||||
|
||||
# Install atom cli
|
||||
if File.directory?("/opt/boxen")
|
||||
cli_path = "/opt/boxen/bin/atom"
|
||||
elsif File.directory?("/opt/github")
|
||||
cli_path = "/opt/github/bin/atom"
|
||||
elsif File.directory?("/usr/local")
|
||||
cli_path = "/usr/local/bin/atom"
|
||||
else
|
||||
raise "Missing directory for `atom` binary"
|
||||
end
|
||||
|
||||
FileUtils.cp("#{ATOM_SRC_PATH}/atom.sh", cli_path)
|
||||
FileUtils.chmod(0755, cli_path)
|
||||
|
||||
Rake::Task["clone-default-bundles"].invoke()
|
||||
|
||||
puts "\033[32mAtom is installed at `#{dest_path}`. Atom cli is installed at `#{cli_path}`\033[0m"
|
||||
end
|
||||
|
||||
task "setup-codesigning" do
|
||||
ENV['CODE_SIGN'] = "Developer ID Application: GitHub"
|
||||
end
|
||||
|
||||
desc "Clone default bundles into vendor/bundles directory"
|
||||
task "clone-default-bundles" do
|
||||
`git submodule --quiet sync`
|
||||
`git submodule --quiet update --recursive --init`
|
||||
end
|
||||
|
||||
desc "Clean build Atom via `xcodebuild`"
|
||||
task :clean do
|
||||
output = `xcodebuild clean`
|
||||
`rm -rf #{application_path()}`
|
||||
`rm -rf #{BUILD_DIR}`
|
||||
`rm -rf /tmp/atom-coffee-cache`
|
||||
`rm -rf node_modules`
|
||||
`rm -rf cef`
|
||||
end
|
||||
|
||||
desc "Run the specs"
|
||||
task :test => ["update-cef", "clone-default-bundles", "build"] do
|
||||
`pkill Atom`
|
||||
if path = application_path()
|
||||
cmd = "#{path}/Contents/MacOS/Atom --test --resource-path=#{ATOM_SRC_PATH}"
|
||||
system(cmd)
|
||||
exit($?.exitstatus)
|
||||
else
|
||||
exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
desc "Run the benchmarks"
|
||||
task :benchmark do
|
||||
Rake::Task["run"].invoke("--benchmark")
|
||||
end
|
||||
|
||||
task :nof do
|
||||
system %{find . -name *spec.coffee | grep --invert-match --regexp "#{BUILD_DIR}\\|__package-name__" | xargs sed -E -i "" "s/f+(it|describe) +(['\\"])/\\1 \\2/g"}
|
||||
end
|
||||
|
||||
task :tags do
|
||||
system %{find src native cef vendor -not -name "*spec.coffee" -type f -print0 | xargs -0 ctags}
|
||||
end
|
||||
|
||||
namespace :docs do
|
||||
namespace :app do
|
||||
desc "Builds the API docs in src/app"
|
||||
task :build do
|
||||
system %{./node_modules/coffee-script/bin/coffee ./node_modules/biscotto/bin/biscotto -- -o docs/api src/app/}
|
||||
end
|
||||
|
||||
desc "Lists the stats for API doc coverage in src/app"
|
||||
task :stats do
|
||||
system %{./node_modules/coffee-script/bin/coffee ./node_modules/biscotto/bin/biscotto -- --statsOnly src/app/}
|
||||
end
|
||||
|
||||
desc "Show which docs are missing"
|
||||
task :missing do
|
||||
system %{./node_modules/coffee-script/bin/coffee ./node_modules/biscotto/bin/biscotto -- --listMissing src/app/}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def application_path
|
||||
applications = FileList["#{BUILD_DIR}/**/Atom.app"]
|
||||
if applications.size == 0
|
||||
$stderr.puts "No Atom application found in directory `#{BUILD_DIR}`"
|
||||
elsif applications.size > 1
|
||||
$stderr.puts "Multiple Atom applications found \n\t" + applications.join("\n\t")
|
||||
else
|
||||
return applications.first
|
||||
end
|
||||
|
||||
return nil
|
||||
tl;dr
|
||||
-----
|
||||
Run ./script/build instead of rake install.
|
||||
|
||||
HELP
|
||||
end
|
||||
|
||||
Arquivo executável
+2
@@ -0,0 +1,2 @@
|
||||
coffee -c -o /Applications/Atom.app/Contents/Resources/app/src/ src/main.coffee src/atom-application.coffee src/atom-window.coffee &&
|
||||
/Applications/Atom.app/Contents/MacOS/Atom --resource-path=$(pwd) --executed-from=$(pwd) $@
|
||||
+3
-415
@@ -1,426 +1,14 @@
|
||||
{
|
||||
'variables': {
|
||||
'pkg-config': 'pkg-config',
|
||||
'chromium_code': 1,
|
||||
'version%': "<!(git rev-parse --short HEAD)",
|
||||
'code_sign%': 0,
|
||||
'use_aura%': 0,
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
'os_posix': 0,
|
||||
}, {
|
||||
'os_posix': 1,
|
||||
}],
|
||||
# Set toolkit_uses_gtk for the Chromium browser on Linux.
|
||||
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
|
||||
'toolkit_uses_gtk%': 1,
|
||||
}, {
|
||||
'toolkit_uses_gtk%': 0,
|
||||
}],
|
||||
],
|
||||
'fix_framework_link_command': [
|
||||
'install_name_tool',
|
||||
'-change',
|
||||
'@executable_path/libcef.dylib',
|
||||
'@rpath/Chromium Embedded Framework.framework/Libraries/libcef.dylib',
|
||||
'-change',
|
||||
'@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle',
|
||||
'@rpath/Sparkle.framework/Versions/A/Sparkle',
|
||||
'-change',
|
||||
'@executable_path/../Frameworks/Quincy.framework/Versions/A/Quincy',
|
||||
'@rpath/Quincy.framework/Versions/A/Quincy',
|
||||
'${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'cef/cef_paths2.gypi',
|
||||
'sources.gypi',
|
||||
],
|
||||
'target_defaults': {
|
||||
'default_configuration': 'Release',
|
||||
'configurations': {
|
||||
'Debug': {
|
||||
'defines': ['DEBUG=1'],
|
||||
'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL' : '0' },
|
||||
},
|
||||
'Release': {
|
||||
},
|
||||
},
|
||||
'xcode_settings': {
|
||||
'VERSION': "<(version)",
|
||||
'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x',
|
||||
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
|
||||
'COMBINE_HIDPI_IMAGES': 'YES', # Removes 'Validate Project Settings' warning
|
||||
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES' # Removes 'Reference to global weak symbol vtable' warning
|
||||
},
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'Atom',
|
||||
'type': 'executable',
|
||||
'mac_bundle': 1,
|
||||
'msvs_guid': 'D22C6F51-AA2D-457C-B579-6C97A96C724D',
|
||||
'dependencies': [
|
||||
'atom_framework',
|
||||
],
|
||||
'mac_framework_dirs': [ 'native/frameworks' ],
|
||||
'sources': [
|
||||
'native/main.cpp',
|
||||
],
|
||||
'mac_bundle_resources': [
|
||||
'native/mac/atom.icns',
|
||||
'native/mac/file.icns',
|
||||
'native/mac/speakeasy.pem',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INFOPLIST_FILE': 'native/mac/Atom-Info.plist',
|
||||
'LD_RUNPATH_SEARCH_PATHS': '@executable_path/../Frameworks',
|
||||
},
|
||||
'conditions': [
|
||||
['code_sign' , {
|
||||
'xcode_settings': {'CODE_SIGN_IDENTITY': "<(code_sign)"},
|
||||
}],
|
||||
['OS=="win" and win_use_allocator_shim==1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
||||
],
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'configurations': {
|
||||
'Debug_Base': {
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
# Set /SUBSYSTEM:WINDOWS.
|
||||
'SubSystem': '2',
|
||||
'EntryPointSymbol' : 'wWinMainCRTStartup',
|
||||
},
|
||||
},
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lcomctl32.lib',
|
||||
'-lshlwapi.lib',
|
||||
'-lrpcrt4.lib',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(includes_win)',
|
||||
],
|
||||
}],
|
||||
['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/sandbox/sandbox.gyp:sandbox',
|
||||
],
|
||||
}],
|
||||
['toolkit_uses_gtk == 1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="mac"', {
|
||||
'product_name': 'Atom',
|
||||
'dependencies': [
|
||||
'AtomHelperApp',
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/',
|
||||
'files': [
|
||||
'cef/Release/libcef.dylib',
|
||||
'cef/Release/ffmpegsumo.so',
|
||||
],
|
||||
},
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks',
|
||||
'files': [
|
||||
'<(PRODUCT_DIR)/Atom Helper.app',
|
||||
'<(PRODUCT_DIR)/Atom.framework',
|
||||
'native/frameworks/Sparkle.framework',
|
||||
'native/frameworks/Quincy.framework'
|
||||
],
|
||||
},
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks/Chromium Embedded Framework.framework',
|
||||
'files': [
|
||||
'cef/Resources',
|
||||
],
|
||||
},
|
||||
{
|
||||
# Copy node binary for worker process support.
|
||||
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Resources',
|
||||
'files': [
|
||||
'node/node',
|
||||
],
|
||||
},
|
||||
],
|
||||
'postbuilds': [
|
||||
{
|
||||
'postbuild_name': 'Fix Framework Link',
|
||||
'action': [
|
||||
'<@(fix_framework_link_command)',
|
||||
],
|
||||
},
|
||||
{
|
||||
# This postbuid step is responsible for creating the following
|
||||
# helpers:
|
||||
#
|
||||
# Atom Helper EH.app and Atom Helper NP.app are created
|
||||
# from Atom Helper.app.
|
||||
#
|
||||
# The EH helper is marked for an executable heap. The NP helper
|
||||
# is marked for no PIE (ASLR).
|
||||
'postbuild_name': 'Make More Helpers',
|
||||
'action': [
|
||||
'script/make_more_helpers.sh',
|
||||
'Frameworks',
|
||||
'Atom',
|
||||
],
|
||||
},
|
||||
{
|
||||
'postbuild_name': 'Print env for Constructicon',
|
||||
'action': [
|
||||
'env',
|
||||
],
|
||||
},
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'cef/include/cef_application_mac.h',
|
||||
'cef/include/internal/cef_mac.h',
|
||||
'cef/include/internal/cef_types_mac.h',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'sources': [
|
||||
'<@(includes_linux)',
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/files',
|
||||
'files': [
|
||||
'<@(cefclient_bundle_resources_linux)',
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'atom_framework',
|
||||
'product_name': 'Atom',
|
||||
'type': 'shared_library',
|
||||
'mac_bundle': 1,
|
||||
'dependencies': [
|
||||
'generated_sources',
|
||||
'libcef_dll_wrapper',
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INFOPLIST_FILE': 'native/mac/framework-info.plist',
|
||||
'LD_DYLIB_INSTALL_NAME': '@rpath/Atom.framework/Atom',
|
||||
},
|
||||
'include_dirs': [ '.', 'cef' ],
|
||||
'mac_framework_dirs': [ 'native/frameworks' ],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(includes_wrapper)',
|
||||
'native/atom_application.h',
|
||||
'native/atom_application.mm',
|
||||
'native/atom_cef_app.h',
|
||||
'native/atom_cef_app.h',
|
||||
'native/atom_cef_client.cpp',
|
||||
'native/atom_cef_client.h',
|
||||
'native/atom_cef_client_mac.mm',
|
||||
'native/atom_cef_render_process_handler.h',
|
||||
'native/atom_cef_render_process_handler.mm',
|
||||
'native/atom_window_controller.h',
|
||||
'native/atom_window_controller.mm',
|
||||
'native/atom_main.h',
|
||||
'native/atom_main_mac.mm',
|
||||
'native/message_translation.cpp',
|
||||
'native/message_translation.cpp',
|
||||
'native/message_translation.h',
|
||||
'native/message_translation.h',
|
||||
'native/v8_extensions/atom.h',
|
||||
'native/v8_extensions/atom.mm',
|
||||
'native/v8_extensions/native.h',
|
||||
'native/v8_extensions/native.mm',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||
'native/frameworks/Sparkle.framework',
|
||||
'native/frameworks/Quincy.framework',
|
||||
],
|
||||
},
|
||||
'mac_bundle_resources': [
|
||||
'native/mac/English.lproj/AtomWindow.xib',
|
||||
'native/mac/English.lproj/MainMenu.xib',
|
||||
],
|
||||
'conditions': [
|
||||
['code_sign', {
|
||||
'defines': [
|
||||
'CODE_SIGNING_ENABLED=1',
|
||||
],
|
||||
}],
|
||||
],
|
||||
'type': 'none',
|
||||
'postbuilds': [
|
||||
{
|
||||
'postbuild_name': 'Copy Static Files',
|
||||
'action': [
|
||||
'script/copy-files-to-bundle',
|
||||
'<(compiled_sources_dir_xcode)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'postbuild_name': 'Fix Framework Link',
|
||||
'action': [
|
||||
'<@(fix_framework_link_command)',
|
||||
],
|
||||
'postbuild_name': 'Create Atom, basically do everything',
|
||||
'action': ['script/constructicon/build'],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'libcef_dll_wrapper',
|
||||
'type': 'static_library',
|
||||
'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9',
|
||||
'dependencies': [
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
],
|
||||
'include_dirs': [ '.', 'cef' ],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(includes_capi)',
|
||||
'<@(includes_wrapper)',
|
||||
'<@(libcef_dll_wrapper_sources_common)',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'cef/Release/libcef.dylib',
|
||||
],
|
||||
}
|
||||
},
|
||||
{
|
||||
'target_name': 'generated_sources',
|
||||
'type': 'none',
|
||||
'sources': [
|
||||
'<@(coffee_sources)',
|
||||
'<@(cson_sources)',
|
||||
'<@(less_sources)'
|
||||
],
|
||||
'rules': [
|
||||
{
|
||||
'rule_name': 'coffee',
|
||||
'extension': 'coffee',
|
||||
'inputs': [
|
||||
'script/compile-coffee',
|
||||
],
|
||||
'outputs': [
|
||||
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).js',
|
||||
],
|
||||
'action': [
|
||||
'sh',
|
||||
'script/compile-coffee',
|
||||
'<(RULE_INPUT_PATH)',
|
||||
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).js',
|
||||
],
|
||||
},
|
||||
{
|
||||
'rule_name': 'cson2json',
|
||||
'extension': 'cson',
|
||||
'inputs': [
|
||||
'script/compile-cson',
|
||||
],
|
||||
'outputs': [
|
||||
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).json',
|
||||
],
|
||||
'action': [
|
||||
'sh',
|
||||
'script/compile-cson',
|
||||
'<(RULE_INPUT_PATH)',
|
||||
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).json',
|
||||
],
|
||||
},
|
||||
{
|
||||
'rule_name': 'less',
|
||||
'extension': 'less',
|
||||
'inputs': [
|
||||
'script/compile-less',
|
||||
],
|
||||
'outputs': [
|
||||
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).css',
|
||||
],
|
||||
'action': [
|
||||
'sh',
|
||||
'script/compile-less',
|
||||
'<(RULE_INPUT_PATH)',
|
||||
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).css',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
'conditions': [
|
||||
['os_posix==1 and OS!="mac" and OS!="android" and gcc_version==46', {
|
||||
'target_defaults': {
|
||||
# Disable warnings about c++0x compatibility, as some names (such
|
||||
# as nullptr) conflict with upcoming c++0x types.
|
||||
'cflags_cc': ['-Wno-c++0x-compat'],
|
||||
},
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'AtomHelperApp',
|
||||
'type': 'executable',
|
||||
'variables': { 'enable_wexit_time_destructors': 1, },
|
||||
'product_name': 'Atom Helper',
|
||||
'mac_bundle': 1,
|
||||
'dependencies': [
|
||||
'atom_framework',
|
||||
],
|
||||
'defines': [
|
||||
'USING_CEF_SHARED',
|
||||
'PROCESS_HELPER_APP',
|
||||
],
|
||||
'mac_framework_dirs': [ 'native/frameworks' ],
|
||||
'sources': [
|
||||
'native/main.cpp',
|
||||
],
|
||||
# TODO(mark): For now, don't put any resources into this app. Its
|
||||
# resources directory will be a symbolic link to the browser app's
|
||||
# resources directory.
|
||||
'mac_bundle_resources/': [
|
||||
['exclude', '.*'],
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INFOPLIST_FILE': 'native/mac/helper-info.plist',
|
||||
'LD_RUNPATH_SEARCH_PATHS': '@executable_path/../../..',
|
||||
},
|
||||
'postbuilds': [
|
||||
{
|
||||
'postbuild_name': 'Fix Framework Link',
|
||||
'action': [
|
||||
'<@(fix_framework_link_command)',
|
||||
],
|
||||
},
|
||||
],
|
||||
}, # target cefclient_helper_app
|
||||
],
|
||||
}], # OS=="mac"
|
||||
],
|
||||
}
|
||||
|
||||
Arquivo normal → Arquivo executável
@@ -56,7 +56,7 @@ window.benchmark = (args...) ->
|
||||
report = "#{fullname}: #{total} / #{count} = #{avg}ms"
|
||||
console.log(report)
|
||||
|
||||
if atom.exitWhenDone
|
||||
if atom.getLoadSettings().exitWhenDone
|
||||
url = "https://github.com/_stats"
|
||||
data = [type: 'timing', metric: "atom.#{fullname}", ms: avg]
|
||||
$.ajax url,
|
||||
|
||||
@@ -106,7 +106,7 @@ describe "TokenizedBuffer.", ->
|
||||
[languageMode, buffer] = []
|
||||
|
||||
beforeEach ->
|
||||
editSession = benchmarkFixturesProject.buildEditSession('medium.coffee')
|
||||
editSession = benchmarkFixturesProject.open('medium.coffee')
|
||||
{ languageMode, buffer } = editSession
|
||||
|
||||
benchmark "construction", 20, ->
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
# Authoring Packages
|
||||
|
||||
A package can contain a variety of different resource types to change Atom's
|
||||
behavior. The basic package layout is as follows (not every package will
|
||||
have all of these directories):
|
||||
|
||||
```text
|
||||
my-package/
|
||||
lib/
|
||||
config/
|
||||
stylesheets/
|
||||
keymaps/
|
||||
snippets/
|
||||
grammars/
|
||||
package.json
|
||||
index.coffee
|
||||
```
|
||||
|
||||
**NOTE:** NPM behavior is partially implemented until we get a working Node.js
|
||||
API built into Atom. The goal is to make Atom packages be a superset of NPM
|
||||
packages
|
||||
|
||||
## package.json
|
||||
|
||||
Similar to npm packages, Atom packages can contain a `package.json` file in their
|
||||
top-level directory. This file contains metadata about the package, such as the
|
||||
path to its "main" module, library dependencies, and manifests specifying the
|
||||
order in which its resources should be loaded.
|
||||
|
||||
## Source Code
|
||||
|
||||
If you want to extend Atom's behavior, your package should contain a single
|
||||
top-level module, which you export from `index.coffee` or another file as
|
||||
indicated by the `main` key in your `package.json` file. The remainder of your
|
||||
code should be placed in the `lib` directory, and required from your top-level
|
||||
file.
|
||||
|
||||
Your package's top-level module is a singleton object that manages the lifecycle
|
||||
of your extensions to Atom. Even if your package creates ten different views and
|
||||
appends them to different parts of the DOM, it's all managed from your top-level
|
||||
object. Your package's top-level module should implement the following methods:
|
||||
|
||||
- `activate(rootView, state)` **Required**: This method is called when your
|
||||
package is loaded. It is always passed the window's global `rootView`, and is
|
||||
sometimes passed state data if the window has been reloaded and your module
|
||||
implements the `serialize` method.
|
||||
|
||||
- `serialize()` **Optional**: This method is called when the window is shutting
|
||||
down, allowing you to return JSON to represent the state of your component. When
|
||||
the window is later restored, the data you returned will be passed to your
|
||||
module's `activate` method so you can restore your view to where the user left
|
||||
off.
|
||||
|
||||
- `deactivate()` **Optional**: This method is called when the window is shutting
|
||||
down. If your package is watching any files or holding external resources in any
|
||||
other way, release them here. If you're just subscribing to things on window
|
||||
you don't need to worry because that's getting torn down anyway.
|
||||
|
||||
## A Simple Package Layout:
|
||||
|
||||
```text
|
||||
my-package/
|
||||
package.json # optional
|
||||
index.coffee
|
||||
lib/
|
||||
my-package.coffee
|
||||
```
|
||||
|
||||
`index.coffee`:
|
||||
```coffeescript
|
||||
module.exports = require "./lib/my-package"
|
||||
```
|
||||
|
||||
`my-package/my-package.coffee`:
|
||||
```coffeescript
|
||||
module.exports =
|
||||
activate: (rootView, state) -> # ...
|
||||
deactivate: -> # ...
|
||||
serialize: -> # ...
|
||||
```
|
||||
|
||||
Beyond this simple contract, your package has full access to Atom's internal
|
||||
API. Anything we call internally, you can call as well. Be aware that since we
|
||||
are early in development, APIs are subject to change and we have not yet
|
||||
established clear boundaries between what is public and what is private. Also,
|
||||
Please collaborate with us if you need an API that doesn't exist. Our goal is
|
||||
to build out Atom's API organically based on the needs of package authors like
|
||||
you. See [Atom's built-in packages](https://github.com/github/atom/tree/master/src/packages)
|
||||
for examples of Atom's API in action.
|
||||
|
||||
## Stylesheets
|
||||
|
||||
Stylesheets for your package should be placed in the `stylesheets` directory.
|
||||
Any stylesheets in this directory will be loaded and attached to the DOM when
|
||||
your package is activated. An optional `stylesheets` key in your `package.json`
|
||||
can list the stylesheets by name in order to specify a load order; otherwise
|
||||
stylesheets are loaded alphabetically.
|
||||
|
||||
## Keymaps
|
||||
|
||||
Keymaps are placed in the `keymaps` subdirectory. By default, all keymaps will be
|
||||
loaded in alphabetical order unless there is a `keymaps` array in `package.json`
|
||||
specifying which keymaps to load and in what order. It's a good idea to provide
|
||||
default keymaps for your extension. They can be customized by users later. See
|
||||
the (main keymaps documentation)[#keymaps] for more information on how keymaps
|
||||
work.
|
||||
|
||||
## Snippets
|
||||
|
||||
An extension can supply snippets in a `snippets` directory as `.cson` or `.json`
|
||||
files:
|
||||
|
||||
```coffeescript
|
||||
".source.coffee .specs":
|
||||
"Expect":
|
||||
prefix: "ex"
|
||||
body: "expect($1).to$2"
|
||||
"Describe":
|
||||
prefix: "de"
|
||||
body: """
|
||||
describe "${1:description}", ->
|
||||
${2:body}
|
||||
"""
|
||||
```
|
||||
|
||||
A snippets file contains scope selectors at its top level. Each scope selector
|
||||
contains a hash of snippets keyed by their name. Each snippet specifies a
|
||||
`prefix` and a `body` key.
|
||||
|
||||
All files in the directory will be automatically loaded, unless the
|
||||
`package.json` supplies a `snippets` key as a manifest. As with all scoped
|
||||
items, snippets loaded later take precedence over earlier snippets when two
|
||||
snippets match a scope with the same specificity.
|
||||
@@ -1,22 +1,26 @@
|
||||
## Command Panel
|
||||
|
||||
A partial implementation of the [Sam command language](http://man.cat-v.org/plan_9/1/sam)
|
||||
The command panel contains a partial implementation of the [Sam command language](http://man.cat-v.org/plan_9/1/sam).
|
||||
In addition, packages are free to design and define any scoped command.
|
||||
|
||||
*Examples*
|
||||
Pop open the command line by hitting .
|
||||
You can get a list of commands available to Atom (including any keybindings) by hitting `meta-p`.
|
||||
|
||||
`,` selects entire file
|
||||
## Examples
|
||||
|
||||
`1,4` selects lines 1-4
|
||||
`,` selects the entire file
|
||||
|
||||
`1,4` selects lines 1-4 in the current file
|
||||
|
||||
`/pattern` selects the first match after the cursor/selection
|
||||
|
||||
`s/pattern/replacement` replace first text matching pattern in current selection
|
||||
`s/pattern/replacement` replaces the first text matching pattern in current selection
|
||||
|
||||
`s/pattern/replacement/g` replace all text matching pattern in current selection
|
||||
`s/pattern/replacement/g` replaces all text matching pattern in current selection
|
||||
|
||||
`,s/pattern/replacement/g` replace all text matching pattern in file
|
||||
`,s/pattern/replacement/g` replaces all text matching pattern in file
|
||||
|
||||
`1,4s/pattern/replacement` replace all text matching pattern in lines 1-4
|
||||
`1,4s/pattern/replacement` replaces all text matching pattern in lines 1-4
|
||||
|
||||
`x/pattern` selects all matches in the current selections
|
||||
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
## Wrap Guide
|
||||
|
||||
The `wrap-guide` extension places a vertical line in each editor at a certain
|
||||
column to guide your formatting so lines do not exceed a certain width.
|
||||
column to guide your formatting, so lines do not exceed a certain width.
|
||||
|
||||
By default the wrap-guide is placed at the 80th column.
|
||||
By default, the wrap-guide is placed at the 80th column.
|
||||
|
||||
### Configuration
|
||||
|
||||
You can customize where the column is placed using the `wrapGuide.columns`
|
||||
config option.
|
||||
config option:
|
||||
|
||||
config.cson:
|
||||
```coffee-cript
|
||||
```coffeescript
|
||||
"wrap-guide":
|
||||
columns: [
|
||||
{ pattern: "\.mm$", column: 200 },
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
# Configuration Settings
|
||||
|
||||
## Your .atom Directory
|
||||
|
||||
When you install Atom, an _.atom_ directory is created in your home directory.
|
||||
If you press `meta-,`, that directory is opened in a new window. For the
|
||||
time being, this serves as the primary interface for adjusting configuration
|
||||
settings, adding and changing key bindings, tweaking styles, etc.
|
||||
|
||||
Atom loads configuration settings from the `config.cson` file in your _~/.atom_
|
||||
directory, which contains CoffeeScript-style JSON:
|
||||
|
||||
```coffeescript
|
||||
core:
|
||||
hideGitIgnoredFiles: true
|
||||
editor:
|
||||
fontSize: 18
|
||||
```
|
||||
|
||||
Configuration is broken into namespaces, which are defined by the config hash's
|
||||
top-level keys. In addition to Atom's core components, each package may define
|
||||
its own namespace.
|
||||
|
||||
## Glossary of Config Keys
|
||||
|
||||
- `core`
|
||||
- `disablePackages`: An array of package names to disable
|
||||
- `hideGitIgnoredFiles`: Whether files in the _.gitignore_ should be hidden
|
||||
- `ignoredNames`: File names to ignore across all of Atom (not fully implemented)
|
||||
- `themes`: An array of theme names to load, in cascading order
|
||||
- `autosave`: Save a buffer when its view loses focus
|
||||
- `editor`
|
||||
- `autoIndent`: Enable/disable basic auto-indent (defaults to `true`)
|
||||
- `autoIndentOnPaste`: Enable/disable auto-indented pasted text (defaults to `false`)
|
||||
- `nonWordCharacters`: A string of non-word characters to define word boundaries
|
||||
- `fontSize`: The editor font size
|
||||
- `fontFamily`: The editor font family
|
||||
- `invisibles`: Specify characters that Atom renders for invisibles in this hash
|
||||
- `tab`: Hard tab characters
|
||||
- `cr`: Carriage return (for Microsoft-style line endings)
|
||||
- `eol`: `\n` characters
|
||||
- `space`: Leading and trailing space characters
|
||||
- `preferredLineLength`: Identifies the length of a line (defaults to `80`)
|
||||
- `showInvisibles`: Whether to render placeholders for invisible characters (defaults to `false`)
|
||||
- `fuzzyFinder`
|
||||
- `ignoredNames`: Files to ignore *only* in the fuzzy-finder
|
||||
- `whitespace`
|
||||
- `ensureSingleTrailingNewline`: Whether to reduce multiple newlines to one at the end of files
|
||||
- `wrapGuide`
|
||||
- `columns`: Array of hashes with a `pattern` and `column` key to match the
|
||||
the path of the current editor to a column position.
|
||||
|
||||
## Customizing Key Bindings
|
||||
|
||||
Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
|
||||
to apply styles to elements, Atom keymaps use selectors to associate keystrokes
|
||||
with events in specific contexts. Here's a small example, excerpted from Atom's
|
||||
built-in keymaps:
|
||||
|
||||
```coffee-script
|
||||
'.editor':
|
||||
'enter': 'editor:newline'
|
||||
|
||||
".select-list .editor.mini":
|
||||
'enter': 'core:confirm',
|
||||
```
|
||||
|
||||
This keymap defines the meaning of `enter` in two different contexts. In a
|
||||
normal editor, pressing `enter` emits the `editor:newline` event, which causes
|
||||
the editor to insert a newline. But if the same keystroke occurs inside of a
|
||||
select list's mini-editor, it instead emits the `core:confirm` event based on
|
||||
the binding in the more-specific selector.
|
||||
|
||||
By default, any keymap files in your `~/.atom/keymaps` directory are loaded
|
||||
in alphabetical order when Atom is started. They will always be loaded last,
|
||||
giving you the chance to override bindings that are defined by Atom's core
|
||||
keymaps or third-party packages.
|
||||
|
||||
## Changing The Theme
|
||||
|
||||
Atom comes bundled with two themes `atom-dark-*` and `atom-light-*`.
|
||||
|
||||
Because Atom themes are based on CSS, it's possible to have multiple themes
|
||||
active at the same time. For example, you'll usually select a theme for the UI
|
||||
and another theme for syntax highlighting. You can select themes by specifying
|
||||
them in the `core.themes` array in your `config.cson`:
|
||||
|
||||
```coffee-script
|
||||
core:
|
||||
themes: ["atom-light-ui", "atom-light-syntax"]
|
||||
# or, if the sun is going down:
|
||||
# themes: ["atom-dark-ui", "atom-dark-syntax"]
|
||||
```
|
||||
|
||||
You install new themes by placing them in the _~/.atom/themes_ directory. A
|
||||
theme can be a CSS file, a directory containing multiple CSS files, or a
|
||||
TextMate theme (either _.tmTheme_ or _.plist_).
|
||||
|
||||
|
||||
## Installing Packages (Partially Implemented)
|
||||
|
||||
To install a package, clone it into the _~/.atom/packages_ directory. Atom will
|
||||
also load grammars and snippets from TextMate bundles. If you want to disable a
|
||||
package without removing it from the packages directory, insert its name into
|
||||
_config.core.disabledPackages_:
|
||||
|
||||
```coffeescript
|
||||
core:
|
||||
disabledPackages: [
|
||||
"fuzzy-finder",
|
||||
"tree-view"
|
||||
]
|
||||
```
|
||||
|
||||
## Quick Personal Hacks
|
||||
|
||||
### user.coffee
|
||||
|
||||
When Atom finishes loading, it will evaluate _user.coffee_ in your _~/.atom_
|
||||
directory, giving you a chance to run arbitrary personal CoffeeScript code to
|
||||
make customizations. You have full access to Atom's API from code in this file.
|
||||
Please refer to the [Atom Internals Guide](./internals/intro,md) for more information. If your
|
||||
customizations become extensive, consider [creating a package](./packages/creating_packages.md).
|
||||
|
||||
### user.css
|
||||
|
||||
If you want to apply quick-and-dirty personal styling changes without creating
|
||||
an entire theme that you intend to distribute, you can add styles to
|
||||
_user.css_ in your _~/.atom_ directory.
|
||||
|
||||
For example, to change the color of the highlighted line number for the line that
|
||||
contains the cursor, you could add the following style to _user.css_:
|
||||
|
||||
```css
|
||||
.editor .line-number.cursor-line {
|
||||
color: pink;
|
||||
}
|
||||
```
|
||||
+40
-35
@@ -1,36 +1,37 @@
|
||||
# Getting Started
|
||||
|
||||
Welcome to Atom. This documentation is intended to offer a basic introduction
|
||||
of how to get productive with this editor. Then we'll delve into more details
|
||||
about configuring, theming, and extending Atom.
|
||||
Welcome to Atom. This documentation provides a basic introduction to being
|
||||
productive with this editor. We'll then delve into more details about configuring,
|
||||
theming, and extending Atom.
|
||||
|
||||
## The Command Palette
|
||||
|
||||
If there's one key-command you learn in Atom, it should be `meta-p` (`meta` is
|
||||
If there's one key-command you must remember in Atom, it should be `meta-p` (`meta` is
|
||||
synonymous with the ⌘ key). You can always hit `meta-p` to bring up a list of
|
||||
commands that are relevant to the currently focused UI element. If there is a
|
||||
key binding for a given command, it is also displayed. This is a great way to
|
||||
explore the system and get to know the key commands interactively. If you'd like
|
||||
to add or change a binding for a command, refer to the [key
|
||||
bindings](#customizing-key-bindings) section to learn how.
|
||||
to learn about adding or changing a binding for a command, refer to the [key
|
||||
bindings](#customizing-key-bindings) section.
|
||||
|
||||

|
||||
|
||||
## Basic Key Bindings
|
||||
Remember you can always use `meta-p` to explore available commands and their
|
||||
|
||||
You can always use `meta-p` to explore available commands and their
|
||||
bindings, but here's a list of a few useful commands.
|
||||
|
||||
- `meta-o` : open file/directory
|
||||
- `meta-n` : new window
|
||||
- `meta-o` : open a file or directory
|
||||
- `meta-n` : open new window
|
||||
- `meta-r` : reload the current window
|
||||
- `meta-alt-ctrl-s` : run specs
|
||||
- `meta-t` : open fuzzy file finder
|
||||
- `meta-alt-ctrl-s` : run test specs
|
||||
- `meta-t` : open file finder to navigate files in your project
|
||||
- `meta-;` : open command prompt
|
||||
- `meta-f` : open command prompt with `/`
|
||||
- `meta-f` : open command prompt with `/` for a local file search
|
||||
- `meta-g` : repeat the last local search
|
||||
- `meta-shift-f` : open command prompt with `Xx/` for a project-wide search
|
||||
- `meta-\` : focus/open tree view, or close it when it is focused
|
||||
- `meta-shift-\` : open tree view with the current file selected
|
||||
- `meta-|` : open tree view with the current file selected
|
||||
- `ctrl-w v`, `ctrl-|` : split screen vertically
|
||||
- `ctrl-w s`, `ctrl--` : split screen horizontally
|
||||
- `meta-l` : go to line
|
||||
@@ -52,8 +53,8 @@ issue so you can keep working.
|
||||
|
||||
The fastest way to find a file in your project is to use the fuzzy finder. Just
|
||||
hit `meta-t` and start typing the name of the file you're looking for. If you
|
||||
already have the file open and want to jump to it, hit `meta-b` to bring up a
|
||||
searchable list of open buffers.
|
||||
already have the file open as a tab and want to jump to it, hit `meta-b` to bring
|
||||
up a searchable list of open buffers.
|
||||
|
||||
You can also use the tree view to navigate to a file. To open or move focus to
|
||||
the tree view, hit `meta-\`. You can then navigate to a file and select it with
|
||||
@@ -73,28 +74,32 @@ To delete a file, select it in the tree view and hit `delete`.
|
||||
|
||||
#### Using the Command Line
|
||||
|
||||
Atom has a command line similar to editors Emacs and Vim, which is currently the
|
||||
only interface for performing searches. Hitting `meta-f` will open the command
|
||||
line prepopulated with the `/` command, which finds forward in the current
|
||||
buffer from the location of the cursor. Pressing `meta-g` will repeat the
|
||||
search. Hitting `meta-shift-f` will open the command line prepopulated with
|
||||
`Xx/`, which is a composite command that performs a global search. The results
|
||||
of the search will appear in the operation preview list, which you can focus
|
||||
Atom has a command line similar to old-school editors such as emacs and vim. Nearly
|
||||
every command has a key binding which you can discover with `meta-p`.
|
||||
|
||||
The command line is also (currently) the only place you can perform a search. Hitting
|
||||
`meta-f` opens the command line and prepopulates it with the `/` command. This finds
|
||||
text in the current buffer, starting at the location of the cursor. Pressing `meta-g`
|
||||
repeats the search. Hitting `meta-shift-f` opens the command line and prepopulates
|
||||
it with `Xx/`, which is a composite command that performs a global search. The results
|
||||
of the search appear in the operation preview list, which you can focus
|
||||
with `meta-:`.
|
||||
|
||||
Atom's command language is still under construction and is loosely based on
|
||||
Atom's command language is still under construction, and is loosely based on
|
||||
the [Sam editor](http://doc.cat-v.org/bell_labs/sam_lang_tutorial/) from the
|
||||
Plan 9 operating system. It's similar to Ex mode in Vim, but is selection-based
|
||||
Plan 9 operating system. It's similar to Ex mode in vim, but is selection-based
|
||||
rather than line-based. It allows you to compose commands together in
|
||||
interesting ways.
|
||||
|
||||
#### Navigating By Symbols
|
||||
|
||||
If you want to jump to a method, you can use the ctags-based symbols package.
|
||||
The `meta-j` binding will open a list of all symbols in the current file. The
|
||||
`meta-shift-j` binding will open a list of all symbols for the current project
|
||||
based on a tags file. And `meta-.` will jump to the tag for the word currently
|
||||
under the cursor. Make sure you have a tags file generated for the project for
|
||||
The `meta-j` binding opens a list of all symbols in the current file. The
|
||||
`meta-shift-j` binding opens a list of all symbols for the current project
|
||||
based on a tags file. `meta-.` jumps to the tag for the word currently
|
||||
under the cursor.
|
||||
|
||||
Make sure you have a tags file generated for the project for
|
||||
the latter of these two bindings to work. Also, if you're editing CoffeeScript,
|
||||
it's a good idea to update your `~/.ctags` file to understand the language. Here
|
||||
is [a good example](https://github.com/kevinsawicki/dotfiles/blob/master/.ctags).
|
||||
@@ -106,31 +111,31 @@ command, as follows: `s/foo/bar/g`. Note that if you have a selection, the
|
||||
replacement will only occur inside the selected text. An empty selection will
|
||||
cause the replacement to occur across the whole buffer. If you want to run the
|
||||
command on the whole buffer even if you have a selection, precede your
|
||||
substitution with the `,` address, which specifies that the command following it
|
||||
operate on the whole buffer.
|
||||
substitution with the `,` address; this indicates that the following command should
|
||||
run on the whole buffer.
|
||||
|
||||
### Split Panes
|
||||
|
||||
You can split any editor pane horizontally or vertically by using `ctrl-shift-|` or
|
||||
You can split any editor pane horizontally or vertically by using `ctrl-\` or
|
||||
`ctrl-w v`. Once you have a split pane, you can move focus between them with
|
||||
`ctrl-tab` or `ctrl-w w`. To close a pane, close all tabs inside it.
|
||||
|
||||
### Folding
|
||||
|
||||
You can fold everything with `ctrl-shift-[` and unfold everything with
|
||||
`ctrl-shift-]`. Or, you can fold / unfold by a single level with `ctrl-[` and
|
||||
You can fold everything with `ctrl-{` and unfold everything with
|
||||
`ctrl-}`. Or, you can fold / unfold by a single level with `ctrl-[` and
|
||||
`ctrl-]`. The user interaction around folds is still a bit rough, but we're
|
||||
planning to improve it soon.
|
||||
|
||||
### Soft-Wrap
|
||||
|
||||
If you want to toggle soft wrap, trigger the command from the command palette.
|
||||
Press `meta-p` to open the palette, then type "wrap" to find the correct
|
||||
Hit `meta-p` to open the palette, then type "wrap" to find the correct
|
||||
command.
|
||||
|
||||
## Your .atom Directory
|
||||
|
||||
When you install Atom, a `.atom` directory is created in your home directory.
|
||||
When you install Atom, an `.atom` directory is created in your home directory.
|
||||
If you press `meta-,`, that directory will be opened in a new window. For the
|
||||
time being, this will serve as the primary interface for adjusting configuration
|
||||
settings, adding and changing key bindings, tweaking styles, etc.
|
||||
|
||||
@@ -49,10 +49,7 @@ the following way:
|
||||
# basic key update
|
||||
config.set("core.autosave", true)
|
||||
|
||||
# if you mutate a config key, you'll need to call `config.update` to inform
|
||||
# observers of the change
|
||||
config.get("fuzzyFinder.ignoredPaths").push "vendor"
|
||||
config.update()
|
||||
config.pushAtKeyPath("core.disabledPackages", "wrap-guide")
|
||||
```
|
||||
|
||||
You can also use `setDefaults`, which will assign default values for keys that
|
||||
|
||||
+6
-2
@@ -1,10 +1,14 @@
|
||||
getting-started.md
|
||||
configuring-atom.md
|
||||
built-in-packages/intro.md
|
||||
built-in-packages/command-panel.md
|
||||
built-in-packages/markdown-preview.md
|
||||
built-in-packages/wrap-guide.md
|
||||
authoring-themes.md
|
||||
authoring-packages..md
|
||||
packages/authoring-packages.md
|
||||
packages/creating_a_package.md
|
||||
packages/included_libraries.md
|
||||
packages/package_json.md
|
||||
themes/authoring-themes.md
|
||||
internals/intro.md
|
||||
internals/configuration.md
|
||||
internals/keymaps.md
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
# Authoring Packages
|
||||
|
||||
Packages are at the core of Atom. Nearly everything outside of the main editor manipulation
|
||||
is handled by a package. That includes "core" pieces like the command panel, status bar,
|
||||
file tree, and more.
|
||||
|
||||
A package can contain a variety of different resource types to change Atom's
|
||||
behavior. The basic package layout is as follows (though not every package will
|
||||
have all of these directories):
|
||||
|
||||
```text
|
||||
my-package/
|
||||
lib/
|
||||
stylesheets/
|
||||
keymaps/
|
||||
snippets/
|
||||
grammars/
|
||||
spec/
|
||||
package.json
|
||||
index.coffee
|
||||
```
|
||||
|
||||
**NOTE:** NPM behavior is partially implemented until we get a working Node.js
|
||||
API built into Atom. The goal is to make Atom packages be a superset of NPM
|
||||
packages.
|
||||
|
||||
Below, we'll break down each directory. There's also [a tutorial](./creating_a_package.md)
|
||||
on creating your first package.
|
||||
|
||||
## package.json
|
||||
|
||||
Similar to [npm packages](http://en.wikipedia.org/wiki/Npm_(software)), Atom packages
|
||||
can contain a _package.json_ file in their top-level directory. This file contains metadata
|
||||
about the package, such as the path to its "main" module, library dependencies,
|
||||
and manifests specifying the order in which its resources should be loaded.
|
||||
|
||||
In addition to the regular [npm package.json keys](https://npmjs.org/doc/json.html)
|
||||
available, Atom package.json files [have their own additions](./package_json.md).
|
||||
|
||||
## Source Code
|
||||
|
||||
If you want to extend Atom's behavior, your package should contain a single
|
||||
top-level module, which you export from _index.coffee_ (or whichever file is
|
||||
indicated by the `main` key in your _package.json_ file). The remainder of your
|
||||
code should be placed in the `lib` directory, and required from your top-level
|
||||
file.
|
||||
|
||||
Your package's top-level module is a singleton object that manages the lifecycle
|
||||
of your extensions to Atom. Even if your package creates ten different views and
|
||||
appends them to different parts of the DOM, it's all managed from your top-level
|
||||
object.
|
||||
|
||||
Your package's top-level module should implement the following methods:
|
||||
|
||||
- `activate(rootView, state)`: This **required** method is called when your
|
||||
package is loaded. It is always passed the window's global `rootView`, and is
|
||||
sometimes passed state data if the window has been reloaded and your module
|
||||
implements the `serialize` method. Use this to do initialization work when your
|
||||
package is started (like setting up DOM elements or binding events).
|
||||
|
||||
- `serialize()`: This **optional** method is called when the window is shutting
|
||||
down, allowing you to return JSON to represent the state of your component. When
|
||||
the window is later restored, the data you returned is passed to your
|
||||
module's `activate` method so you can restore your view to where the user left
|
||||
off.
|
||||
|
||||
- `deactivate()`: This **optional** method is called when the window is shutting
|
||||
down. If your package is watching any files or holding external resources in any
|
||||
other way, release them here. If you're just subscribing to things on window,
|
||||
you don't need to worry because that's getting torn down anyway.
|
||||
|
||||
### Simple Package Code
|
||||
|
||||
```text
|
||||
my-package/
|
||||
package.json # optional
|
||||
index.coffee
|
||||
lib/
|
||||
my-package.coffee
|
||||
```
|
||||
|
||||
`index.coffee`:
|
||||
```coffeescript
|
||||
module.exports = require "./lib/my-package"
|
||||
```
|
||||
|
||||
`my-package/my-package.coffee`:
|
||||
```coffeescript
|
||||
module.exports =
|
||||
activate: (rootView, state) -> # ...
|
||||
deactivate: -> # ...
|
||||
serialize: -> # ...
|
||||
```
|
||||
|
||||
Beyond this simple contract, your package has full access to Atom's internal
|
||||
API. Anything we call internally, you can call as well. Be aware that since we
|
||||
are early in development, APIs are subject to change and we have not yet
|
||||
established clear boundaries between what is public and what is private. Also,
|
||||
please collaborate with us if you need an API that doesn't exist. Our goal is
|
||||
to build out Atom's API organically based on the needs of package authors like
|
||||
you.
|
||||
|
||||
See [Atom's built-in packages](https://github.com/github/atom/tree/master/src/packages)
|
||||
for examples of Atom's API in action.
|
||||
|
||||
## Stylesheets
|
||||
|
||||
Stylesheets for your package should be placed in the _stylesheets_ directory.
|
||||
Any stylesheets in this directory will be loaded and attached to the DOM when
|
||||
your package is activated. Stylesheets can be written as CSS or LESS.
|
||||
|
||||
An optional `stylesheets` array in your _package.json_ can list the stylesheets by
|
||||
name to specify a loading order; otherwise, stylesheets are loaded alphabetically.
|
||||
|
||||
## Keymaps
|
||||
|
||||
Keymaps are placed in the _keymaps_ subdirectory. It's a good idea to provide
|
||||
default keymaps for your extension, especially if you're also adding a new command.
|
||||
|
||||
By default, all keymaps are loaded in alphabetical order. An optional `keymaps`
|
||||
array in your _package.json_ can specify which keymaps to load and in what order.
|
||||
|
||||
See the [main keymaps documentation](../internals/keymaps.md) for more information on
|
||||
how keymaps work.
|
||||
|
||||
## Snippets
|
||||
|
||||
An extension can supply language snippets in the _snippets_ directory. These can
|
||||
be `.cson` or `.json` files. Here's an example:
|
||||
|
||||
```coffeescript
|
||||
".source.coffee .specs":
|
||||
"Expect":
|
||||
prefix: "ex"
|
||||
body: "expect($1).to$2"
|
||||
"Describe":
|
||||
prefix: "de"
|
||||
body: """
|
||||
describe "${1:description}", ->
|
||||
${2:body}
|
||||
"""
|
||||
```
|
||||
|
||||
A snippets file contains scope selectors at its top level (`.source.coffee .spec`).
|
||||
Each scope selector contains a hash of snippets keyed by their name (`Expect`, `Describe`).
|
||||
Each snippet also specifies a `prefix` and a `body` key. The `prefix` represents
|
||||
the first few letters to type before hitting the `tab` key to autocomplete. The
|
||||
`body` defines the autofilled text. You can use placeholders like `$1`, `$2`, to indicate
|
||||
regions in the body the user can navigate to every time they hit `tab`.
|
||||
|
||||
All files in the directory are automatically loaded, unless the
|
||||
_package.json_ supplies a `snippets` key. As with all scoped
|
||||
items, snippets loaded later take precedence over earlier snippets when two
|
||||
snippets match a scope with the same specificity.
|
||||
|
||||
## Language Grammars
|
||||
|
||||
If you're developing a new language grammar, you'll want to place your file in
|
||||
the _grammars_ directory. Each grammar is a pairing of two keys, `match` and
|
||||
`captures`. `match` is a regular expression identifying the pattern to highlight,
|
||||
while `captures` is a JSON representing what to do with each matching group.
|
||||
For example:
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
'match': '(?:^|\\s)(__[^_]+__)'
|
||||
'captures':
|
||||
'1': 'name': 'markup.bold.gfm'
|
||||
}
|
||||
```
|
||||
|
||||
This indicates that the first matching capture (`(__[^_]+__)`) should have the
|
||||
`markup.bold.gfm` token applied to it.
|
||||
|
||||
To capture a single group, simply use the `name` key instead:
|
||||
|
||||
```json
|
||||
{
|
||||
'match': '^#{1,6}\\s+.+$'
|
||||
'name': 'markup.heading.gfm'
|
||||
}
|
||||
```
|
||||
|
||||
This indicates that Markdown header lines (`#`, `##`, `###`) should be applied with
|
||||
the `markup.heading.gfm` token.
|
||||
|
||||
More information about the significance of these tokens can be found in
|
||||
[section 12.4 of the TextMate Manual](http://manual.macromates.com/en/language_grammars.html).
|
||||
|
||||
Your grammar should also include a `filetypes` array, which is a list of file extensions
|
||||
your grammar supports:
|
||||
|
||||
```
|
||||
'fileTypes': [
|
||||
'markdown'
|
||||
'md'
|
||||
'mkd'
|
||||
'mkdown'
|
||||
'ron'
|
||||
]
|
||||
```
|
||||
|
||||
## Writing Tests
|
||||
|
||||
Your package **should** have tests, and if they're placed in the _spec_ directory,
|
||||
they can be run by Atom.
|
||||
|
||||
Under the hood, [Jasmine](https://github.com/pivotal/jasmine) is being used to run
|
||||
to execute the tests, so you can assume that any DSL available there is available
|
||||
to your package as well.
|
||||
@@ -0,0 +1,254 @@
|
||||
# Creating Packages
|
||||
|
||||
Let's take a look at creating our first package.
|
||||
|
||||
Atom has a command you can enter that'll create a package for you:
|
||||
`package-generator:generate`. Otherwise, you can hit `meta-p`, and start typing
|
||||
"Package Generator." Once you activate this package, it'll ask you for a name for
|
||||
your new package. Let's call ours _changer_.
|
||||
|
||||
Now, _changer_ is going to have a default set of folders and files created for us.
|
||||
Hit `meta-R` to reload Atom, then hit `meta-p` and start typing "Changer." You'll
|
||||
see a new `Changer:Toggle` command which, if selected, pops up a new message. So
|
||||
far, so good!
|
||||
|
||||
In order to demonstrate the capabilities of Atom and its API, our Changer plugin
|
||||
is going to do two things:
|
||||
|
||||
1. It'll show only modified files in the file tree
|
||||
2. It'll append a new pane to the editor with some information about the modified
|
||||
files
|
||||
|
||||
Let's get started!
|
||||
|
||||
## Changing Keybindings and Commands
|
||||
|
||||
Since Changer is primarily concerned with the file tree, let's write a keybinding
|
||||
that works only when the tree is focused. Instead of using the default `toggle`,
|
||||
our keybinding executes a new command called `magic`.
|
||||
|
||||
_keymaps/changer.cson_ can easily become this:
|
||||
|
||||
```cson
|
||||
'.tree-view-scroller':
|
||||
'ctrl-V': 'changer:magic'
|
||||
```
|
||||
|
||||
Notice that the keybinding is called `ctrl-V`--that's actually `ctrl-shift-v`.
|
||||
You can use capital letters to denote using `shift` for your binding.
|
||||
|
||||
`.tree-view-scroller` represents the parent container for the tree view. Keybindings
|
||||
only work within the context of where they're entered. For example, hitting `ctrl-V`
|
||||
anywhere other than tree won't do anything. You can map to `body` if you want
|
||||
to scope to anywhere in Atom, or just `.editor` for the editor portion.
|
||||
|
||||
To bind keybindings to a command, we'll use the `rootView.command` method. This
|
||||
takes a command name and executes a function in the code. For example:
|
||||
|
||||
```coffeescript
|
||||
rootView.command "changer:magic", => @magic()
|
||||
```
|
||||
|
||||
It's common practice to namespace your commands with your package name, and separate
|
||||
it with a colon (`:`). Rename the existing `toggle` method to `magic` to get the
|
||||
binding to work.
|
||||
|
||||
Reload the editor, click on the tree, hit your keybinding, and...nothing happens! What the heck?!
|
||||
|
||||
Open up the _package.json_ file, and notice the key that says `activationEvents`.
|
||||
Basically, this tells Atom to not load a package until it hears a certain event.
|
||||
Let's change the event to `changer:magic` and reload the editor.
|
||||
|
||||
Hitting the key binding on the tree now works!
|
||||
|
||||
## Working with styles
|
||||
|
||||
The next step is to hide elements in the tree that aren't modified. To do that,
|
||||
we'll first try and get a list of files that have not changed.
|
||||
|
||||
All packages are able to use jQuery in their code. In fact, we have [a list of
|
||||
some of the bundled libraries Atom provides by default](./included_libraries.md).
|
||||
|
||||
Let's bring in jQuery:
|
||||
|
||||
```coffeescript
|
||||
$ = require 'jquery'
|
||||
```
|
||||
|
||||
Now, we can query the tree to get us a list of every file that _wasn't_ modified:
|
||||
|
||||
```coffeescript
|
||||
magic: ->
|
||||
$('ol.entries li').each (i, el) ->
|
||||
if !$(el).hasClass("modified")
|
||||
console.log el
|
||||
```
|
||||
|
||||
You can access the dev console by hitting `alt-meta-i`. When we execute the
|
||||
`changer:magic` command, the browser console lists the items that are not being
|
||||
modified. Let's add a class to each of these elements called `hide-me`:
|
||||
|
||||
```coffeescript
|
||||
magic: ->
|
||||
$('ol.entries li').each (i, el) ->
|
||||
if !$(el).hasClass("modified")
|
||||
$(el).addClass("hide-me")
|
||||
```
|
||||
|
||||
With our newly added class, we can manipulate the visibility of the elements
|
||||
with a simple stylesheet. Open up _changer.css_ in the _stylesheets_ directory,
|
||||
and add a single entry:
|
||||
|
||||
```css
|
||||
ol.entries .hide-me {
|
||||
display: none;
|
||||
}
|
||||
```
|
||||
|
||||
Refresh atom, and run the `changer` command. You'll see all the non-changed files
|
||||
disappear from the tree. There are a number of ways you can get the list back;
|
||||
let's just naively iterate over the same elements and remove the class:
|
||||
|
||||
```coffeescript
|
||||
magic: ->
|
||||
$('ol.entries li').each (i, el) ->
|
||||
if !$(el).hasClass("modified")
|
||||
if !$(el).hasClass("hide-me")
|
||||
$(el).addClass("hide-me")
|
||||
else
|
||||
$(el).removeClass("hide-me")
|
||||
```
|
||||
|
||||
## Creating a New Pane
|
||||
|
||||
The next goal of this package is to append a pane to the Atom editor that lists
|
||||
some information about the modified files.
|
||||
|
||||
To do that, we're going to first create a new class method called `content`. Every
|
||||
package that extends from the `View` class can provide an optional class method
|
||||
called `content`. The `content` method constructs the DOM that your package uses
|
||||
as its UI. The principals of `content` are built entirely on [SpacePen](https://github.com/nathansobo/space-pen),
|
||||
which we'll touch upon only briefly here.
|
||||
|
||||
Our display will simply be an unordered list of the file names, and their
|
||||
modified times. Let's start by carving out a `div` to hold the filenames:
|
||||
|
||||
```coffeescript
|
||||
@content: ->
|
||||
@div class: 'modified-files-container', =>
|
||||
@ul class: 'modified-files-list', outlet: 'modifiedFilesList', =>
|
||||
@li 'Test'
|
||||
@li 'Test2'
|
||||
```
|
||||
|
||||
You can add any HTML5 attribute you like. `outlet` names the variable
|
||||
your package can uses to manipulate the element directly. The fat pipe (`=>`) indicates
|
||||
that the next set are nested children.
|
||||
|
||||
We'll add one more line to `magic` to make this pane appear:
|
||||
|
||||
```coffeescript
|
||||
rootView.vertical.append(this)
|
||||
```
|
||||
|
||||
If you hit the key command, you'll see a box appear right underneath the editor.
|
||||
Success!
|
||||
|
||||
Before we populate this, let's apply some logic to toggle the pane off and on, just
|
||||
like we did with the tree view:
|
||||
|
||||
```coffeescript
|
||||
# toggles the pane
|
||||
if @hasParent()
|
||||
rootView.vertical.children().last().remove()
|
||||
else
|
||||
rootView.vertical.append(this)
|
||||
```
|
||||
|
||||
There are about a hundred different ways to toggle a pane on and off, and this
|
||||
might not be the most efficient one. If you know your package needs to be toggled
|
||||
on and off more freely, it might be better to draw the UI during the initialization,
|
||||
then immediately call `hide()` on the element to remove it from the view. You can
|
||||
then swap between `show()` and `hide()`, and instead of forcing Atom to add and remove
|
||||
the element as we're doing here, it'll just set a CSS property to control your package's
|
||||
visibility.
|
||||
|
||||
You might have noticed that our two `li` elements aren't showing up. Let's set
|
||||
a color on them so that they pop. Open up `changer.css` and add this CSS:
|
||||
|
||||
```css
|
||||
ul.modified-files-list {
|
||||
color: white;
|
||||
}
|
||||
```
|
||||
|
||||
Refresh Atom, hit the key combo, and see your brilliantly white test list.
|
||||
|
||||
## Calling Node.js Code
|
||||
|
||||
Since Atom is built on top of Node.js, you can call any of its libraries, including
|
||||
other modules that your package requires.
|
||||
|
||||
We'll iterate through our resulting tree, and construct the path to our modified
|
||||
file based on its depth in the tree:
|
||||
|
||||
```coffeescript
|
||||
path = require 'path'
|
||||
|
||||
# ...
|
||||
|
||||
modifiedFiles = []
|
||||
# for each single entry...
|
||||
$('ol.entries li.file.modified span.name').each (i, el) ->
|
||||
filePath = []
|
||||
# ...grab its name...
|
||||
filePath.unshift($(el).text())
|
||||
|
||||
# ... then find its parent directories, and grab their names
|
||||
parents = $(el).parents('.directory.modified')
|
||||
parents.each (i, el) ->
|
||||
filePath.unshift($(el).find('div.header span.name').eq(0).text())
|
||||
|
||||
modifiedFilePath = path.join(project.rootDirectory.path, filePath.join(path.sep))
|
||||
modifiedFiles.push modifiedFilePath
|
||||
```
|
||||
|
||||
`modifiedFiles` is an array containing a list of our modified files. We're also using
|
||||
the node.js [`path` library](http://nodejs.org/docs/latest/api/path.html) to get
|
||||
the proper directory separator for our system.
|
||||
|
||||
Let's remove the two `@li` elements we added in `@content`, so that we can populate
|
||||
our `modifiedFilesList` with real information. We'll do that by iterating over
|
||||
`modifiedFiles`, accessing a file's last modified time, and appending it to
|
||||
`modifiedFilesList`:
|
||||
|
||||
```coffeescript
|
||||
# toggles the pane
|
||||
if @hasParent()
|
||||
rootView.vertical.children().last().remove()
|
||||
else
|
||||
for file in modifiedFiles
|
||||
stat = fs.lstatSync(file)
|
||||
mtime = stat.mtime
|
||||
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
|
||||
rootView.vertical.append(this)
|
||||
```
|
||||
|
||||
When you toggle the modified files list, your pane is now populated with the filenames
|
||||
and modified times of files in your project. You might notice that subsequent calls
|
||||
to this command reduplicate information. We could provide an elegant way of rechecking
|
||||
files already in the list, but for this demonstration, we'll just clear the `modifiedFilesList`
|
||||
each time it's closed:
|
||||
|
||||
```coffeescript
|
||||
# toggles the pane
|
||||
if @hasParent()
|
||||
@modifiedFilesList.empty()
|
||||
rootView.vertical.children().last().remove()
|
||||
else
|
||||
for file in modifiedFiles
|
||||
stat = fs.lstatSync(file)
|
||||
mtime = stat.mtime
|
||||
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
|
||||
rootView.vertical.append(this)
|
||||
```
|
||||
@@ -0,0 +1,10 @@
|
||||
# Included Libraries
|
||||
|
||||
In addition to core node.js modules, all packages can `require` the following popular
|
||||
libraries into their packages:
|
||||
|
||||
* [SpacePen](https://github.com/nathansobo/space-pen) (as `require 'space-pen'`)
|
||||
* [jQuery](http://jquery.com/) (as `require 'jquery'`)
|
||||
* [Underscore](http://underscorejs.org/) (as `require 'underscore'`)
|
||||
|
||||
Additional libraries can be found by browsing Atom's _node_modules_ folder.
|
||||
@@ -0,0 +1,18 @@
|
||||
# package.json format
|
||||
|
||||
The following keys are available to your package's _package.json_ manifest file:
|
||||
|
||||
- `main` (**Required**): the path to the CoffeeScript file that's the entry point
|
||||
to your package
|
||||
- `stylesheets` (**Optional**): an Array of Strings identifying the order of the
|
||||
stylesheets your package needs to load. If not specified, stylesheets in the _stylesheets_
|
||||
directory are added alphabetically.
|
||||
- `keymaps`(**Optional**): an Array of Strings identifying the order of the
|
||||
key mappings your package needs to load. If not specified, mappings in the _keymaps_
|
||||
directory are added alphabetically.
|
||||
- `snippets` (**Optional**): an Array of Strings identifying the order of the
|
||||
snippets your package needs to load. If not specified, snippets in the _snippets_
|
||||
directory are added alphabetically.
|
||||
- `activationEvents` (**Optional**): an Array of Strings identifying events that
|
||||
trigger your package's activation. You can delay the loading of your package until
|
||||
one of these events is trigged.
|
||||
@@ -1,4 +1,4 @@
|
||||
# Authoring A Theme
|
||||
# Authoring Themes
|
||||
|
||||
If you understand CSS, you can write an Atom theme easily. Your theme can style
|
||||
Atom's user interface, specify the appearance of syntax-highlighted code, or
|
||||
@@ -9,9 +9,9 @@ translate scope names to CSS classes. To theme Atom's user interface, take a
|
||||
look at the existing light and dark themes for an example. Pressing `alt-meta-i`
|
||||
and inspecting the Atom's markup directly can also be helpful.
|
||||
|
||||
The most basic theme is just a `.css` file. More complex themes occupy their own
|
||||
The most basic theme is just a _.css_ file. More complex themes occupy their own
|
||||
folder, which can contain multiple stylesheets along with an optional
|
||||
`package.cson` file containing a manifest to control their load-order:
|
||||
_package.cson_ file containing a manifest to control their load-order:
|
||||
|
||||
```text
|
||||
~/.atom/themes/
|
||||
@@ -1,32 +0,0 @@
|
||||
#include "include/cef_app.h"
|
||||
#include "include/cef_application_mac.h"
|
||||
|
||||
class AtomCefClient;
|
||||
|
||||
@interface AtomApplication : NSApplication <CefAppProtocol, NSApplicationDelegate> {
|
||||
IBOutlet NSMenuItem *_versionMenuItem;
|
||||
NSWindowController *_backgroundWindowController;
|
||||
NSDictionary *_arguments;
|
||||
NSInvocation *_updateInvocation;
|
||||
NSString *_updateStatus;
|
||||
BOOL _filesOpened;
|
||||
BOOL _handlingSendEvent;
|
||||
}
|
||||
|
||||
+ (AtomApplication *)sharedApplication;
|
||||
+ (id)applicationWithArguments:(char **)argv count:(int)argc;
|
||||
+ (CefSettings)createCefSettings;
|
||||
+ (NSDictionary *)parseArguments:(char **)argv count:(int)argc;
|
||||
- (void)open:(NSString *)path;
|
||||
- (void)openDev:(NSString *)path;
|
||||
- (void)open:(NSString *)path pidToKillWhenWindowCloses:(NSNumber *)pid;
|
||||
- (void)openConfig;
|
||||
- (IBAction)runSpecs:(id)sender;
|
||||
- (IBAction)runBenchmarks:(id)sender;
|
||||
- (void)runSpecsThenExit:(BOOL)exitWhenDone;
|
||||
- (NSDictionary *)arguments;
|
||||
- (void)runBenchmarksThenExit:(BOOL)exitWhenDone;
|
||||
|
||||
@property (nonatomic, retain) NSDictionary *arguments;
|
||||
|
||||
@end
|
||||
@@ -1,334 +0,0 @@
|
||||
#import "include/cef_application_mac.h"
|
||||
#import "native/atom_cef_client.h"
|
||||
#import "native/atom_application.h"
|
||||
#import "native/atom_window_controller.h"
|
||||
#import "native/atom_cef_app.h"
|
||||
#import <getopt.h>
|
||||
#import <Sparkle/Sparkle.h>
|
||||
#import <Quincy/BWQuincyManager.h>
|
||||
|
||||
@implementation AtomApplication
|
||||
|
||||
@synthesize arguments=_arguments;
|
||||
|
||||
+ (AtomApplication *)sharedApplication {
|
||||
return (AtomApplication *)[super sharedApplication];
|
||||
}
|
||||
|
||||
+ (id)applicationWithArguments:(char **)argv count:(int)argc {
|
||||
AtomApplication *application = [self sharedApplication];
|
||||
CefInitialize(CefMainArgs(argc, argv), [self createCefSettings], new AtomCefApp);
|
||||
application.arguments = [self parseArguments:argv count:argc];
|
||||
|
||||
return application;
|
||||
}
|
||||
|
||||
+ (NSDictionary *)parseArguments:(char **)argv count:(int)argc {
|
||||
NSMutableDictionary *arguments = [[NSMutableDictionary alloc] init];
|
||||
|
||||
// Remove non-posix (i.e. -long_argument_with_one_leading_hyphen) added by OS X from the command line
|
||||
int cleanArgc = argc;
|
||||
size_t argvSize = argc * sizeof(char *);
|
||||
char **cleanArgv = (char **)alloca(argvSize);
|
||||
for (int i=0; i < argc; i++) {
|
||||
if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) { // Xcode inserts useless command-line args by default: http://trac.wxwidgets.org/ticket/13732
|
||||
cleanArgc -= 2;
|
||||
i++;
|
||||
}
|
||||
else if (strncmp(argv[i], "-psn_", 5) == 0) { // OS X inserts a -psn_[PID] argument.
|
||||
cleanArgc -= 1;
|
||||
}
|
||||
else {
|
||||
cleanArgv[i] = argv[i];
|
||||
}
|
||||
}
|
||||
|
||||
int opt;
|
||||
int longindex;
|
||||
|
||||
static struct option longopts[] = {
|
||||
{ "executed-from", required_argument, NULL, 'K' },
|
||||
{ "resource-path", required_argument, NULL, 'R' },
|
||||
{ "benchmark", no_argument, NULL, 'B' },
|
||||
{ "test", no_argument, NULL, 'T' },
|
||||
{ "dev", no_argument, NULL, 'D' },
|
||||
{ "pid", required_argument, NULL, 'P' },
|
||||
{ "wait", no_argument, NULL, 'W' },
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
while ((opt = getopt_long(cleanArgc, cleanArgv, "K:R:BYDP:Wh?", longopts, &longindex)) != -1) {
|
||||
NSString *key, *value;
|
||||
switch (opt) {
|
||||
case 'K':
|
||||
case 'R':
|
||||
case 'B':
|
||||
case 'T':
|
||||
case 'D':
|
||||
case 'W':
|
||||
case 'P':
|
||||
key = [NSString stringWithUTF8String:longopts[longindex].name];
|
||||
value = optarg ? [NSString stringWithUTF8String:optarg] : @"YES";
|
||||
[arguments setObject:value forKey:key];
|
||||
break;
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
NSLog(@"usage: atom [--resource-path=<path>] [<path>]");
|
||||
}
|
||||
}
|
||||
|
||||
cleanArgc -= optind;
|
||||
cleanArgv += optind;
|
||||
|
||||
if (cleanArgc > 0) {
|
||||
NSString *path = [NSString stringWithUTF8String:cleanArgv[0]];
|
||||
path = [self standardizePathToOpen:path withArguments:arguments];
|
||||
[arguments setObject:path forKey:@"path"];
|
||||
} else {
|
||||
NSString *executedFromPath = [arguments objectForKey:@"executed-from"];
|
||||
if (executedFromPath) {
|
||||
[arguments setObject:executedFromPath forKey:@"path"];
|
||||
}
|
||||
}
|
||||
|
||||
return arguments;
|
||||
}
|
||||
|
||||
+ (NSString *)standardizePathToOpen:(NSString *)path withArguments:(NSDictionary *)arguments {
|
||||
NSString *standardizedPath = path;
|
||||
NSString *executedFromPath = [arguments objectForKey:@"executed-from"];
|
||||
if (![standardizedPath isAbsolutePath] && executedFromPath) {
|
||||
standardizedPath = [executedFromPath stringByAppendingPathComponent:standardizedPath];
|
||||
}
|
||||
standardizedPath = [standardizedPath stringByStandardizingPath];
|
||||
return standardizedPath;
|
||||
}
|
||||
|
||||
+ (NSString *)supportDirectory {
|
||||
NSString *cachePath = [NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) objectAtIndex:0];
|
||||
NSString *executableName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleExecutable"];
|
||||
NSString *supportDirectory = [cachePath stringByAppendingPathComponent:executableName];
|
||||
|
||||
NSFileManager *fs = [NSFileManager defaultManager];
|
||||
NSError *error;
|
||||
BOOL success = [fs createDirectoryAtPath:supportDirectory withIntermediateDirectories:YES attributes:nil error:&error];
|
||||
if (!success) {
|
||||
NSLog(@"Warning: Can't create support directory '%@' because %@", supportDirectory, [error localizedDescription]);
|
||||
supportDirectory = @"";
|
||||
}
|
||||
|
||||
return supportDirectory;
|
||||
}
|
||||
|
||||
+ (CefSettings)createCefSettings {
|
||||
CefSettings settings;
|
||||
|
||||
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
|
||||
NSString *userAgent = [NSString stringWithFormat:@"GitHubAtom/%@", version];
|
||||
CefString(&settings.cache_path) = [[self supportDirectory] UTF8String];
|
||||
CefString(&settings.user_agent) = [userAgent UTF8String];
|
||||
CefString(&settings.log_file) = "";
|
||||
CefString(&settings.javascript_flags) = "--harmony_collections";
|
||||
settings.remote_debugging_port = 9090;
|
||||
settings.log_severity = LOGSEVERITY_ERROR;
|
||||
return settings;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[_backgroundWindowController release];
|
||||
[_arguments release];
|
||||
[_updateInvocation release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)open:(NSString *)path pidToKillWhenWindowCloses:(NSNumber *)pid {
|
||||
BOOL openingDirectory = false;
|
||||
[[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&openingDirectory];
|
||||
|
||||
if (!pid) {
|
||||
for (NSWindow *window in [self windows]) {
|
||||
if (![window isExcludedFromWindowsMenu]) {
|
||||
AtomWindowController *controller = [window windowController];
|
||||
if (!controller.pathToOpen) {
|
||||
continue;
|
||||
}
|
||||
if (!openingDirectory) {
|
||||
BOOL openedPathIsDirectory = false;
|
||||
[[NSFileManager defaultManager] fileExistsAtPath:controller.pathToOpen isDirectory:&openedPathIsDirectory];
|
||||
NSString *projectPath = NULL;
|
||||
if (openedPathIsDirectory) {
|
||||
projectPath = [NSString stringWithFormat:@"%@/", controller.pathToOpen];
|
||||
}
|
||||
else {
|
||||
projectPath = [controller.pathToOpen stringByDeletingLastPathComponent];
|
||||
}
|
||||
if ([path hasPrefix:projectPath]) {
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
[controller openPath:path];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ([path isEqualToString:controller.pathToOpen]) {
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AtomWindowController *windowController = [[AtomWindowController alloc] initWithPath:path];
|
||||
[windowController setPidToKillOnClose:pid];
|
||||
return windowController;
|
||||
}
|
||||
|
||||
- (void)open:(NSString *)path {
|
||||
[self open:path pidToKillWhenWindowCloses:nil];
|
||||
}
|
||||
|
||||
- (void)openDev:(NSString *)path {
|
||||
[[AtomWindowController alloc] initDevWithPath:path];
|
||||
}
|
||||
|
||||
- (void)openConfig {
|
||||
for (NSWindow *window in [self windows]) {
|
||||
if ([[window windowController] isConfig]) {
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
return;
|
||||
}
|
||||
}
|
||||
[[AtomWindowController alloc] initConfig];
|
||||
}
|
||||
|
||||
- (IBAction)runSpecs:(id)sender {
|
||||
[self runSpecsThenExit:NO];
|
||||
}
|
||||
|
||||
- (void)runSpecsThenExit:(BOOL)exitWhenDone {
|
||||
[[AtomWindowController alloc] initSpecsThenExit:exitWhenDone];
|
||||
}
|
||||
|
||||
- (IBAction)runBenchmarks:(id)sender {
|
||||
[self runBenchmarksThenExit:NO];
|
||||
}
|
||||
|
||||
- (void)runBenchmarksThenExit:(BOOL)exitWhenDone {
|
||||
[[AtomWindowController alloc] initBenchmarksThenExit:exitWhenDone];
|
||||
}
|
||||
|
||||
# pragma mark NSApplicationDelegate
|
||||
|
||||
- (BOOL)shouldOpenFiles {
|
||||
if ([self.arguments objectForKey:@"benchmark"]) {
|
||||
return NO;
|
||||
}
|
||||
if ([self.arguments objectForKey:@"test"]) {
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames {
|
||||
if ([self shouldOpenFiles]) {
|
||||
for (NSString *path in filenames) {
|
||||
path = [[self class] standardizePathToOpen:path withArguments:self.arguments];
|
||||
NSNumber *pid = [self.arguments objectForKey:@"wait"] ? [self.arguments objectForKey:@"pid"] : nil;
|
||||
[self open:path pidToKillWhenWindowCloses:pid];
|
||||
}
|
||||
if ([filenames count] > 0) {
|
||||
_filesOpened = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
|
||||
BWQuincyManager *manager = [BWQuincyManager sharedQuincyManager];
|
||||
[manager setCompanyName:@"GitHub"];
|
||||
[manager setSubmissionURL:@"https://speakeasy.githubapp.com/submit_crash_log"];
|
||||
[manager setAutoSubmitCrashReport:YES];
|
||||
|
||||
if (!_filesOpened && [self shouldOpenFiles]) {
|
||||
NSString *path = [self.arguments objectForKey:@"path"];
|
||||
NSNumber *pid = [self.arguments objectForKey:@"wait"] ? [self.arguments objectForKey:@"pid"] : nil;
|
||||
[self open:path pidToKillWhenWindowCloses:pid];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationWillFinishLaunching:(NSNotification *)notification {
|
||||
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
|
||||
_versionMenuItem.title = [NSString stringWithFormat:@"Version %@", version];
|
||||
|
||||
if ([self.arguments objectForKey:@"benchmark"]) {
|
||||
[self runBenchmarksThenExit:true];
|
||||
}
|
||||
else if ([self.arguments objectForKey:@"test"]) {
|
||||
[self runSpecsThenExit:true];
|
||||
}
|
||||
else {
|
||||
_backgroundWindowController = [[AtomWindowController alloc] initInBackground];
|
||||
|
||||
#if defined(CODE_SIGNING_ENABLED)
|
||||
SUUpdater.sharedUpdater.delegate = self;
|
||||
SUUpdater.sharedUpdater.automaticallyChecksForUpdates = YES;
|
||||
SUUpdater.sharedUpdater.automaticallyDownloadsUpdates = YES;
|
||||
[SUUpdater.sharedUpdater checkForUpdatesInBackground];
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
- (NSApplicationTerminateReply)applicationShouldTerminate:
|
||||
(NSApplication *)sender {
|
||||
for (NSWindow *window in [self windows]) {
|
||||
[window performClose:self];
|
||||
}
|
||||
|
||||
return NSTerminateCancel;
|
||||
}
|
||||
|
||||
# pragma mark CefAppProtocol
|
||||
|
||||
- (BOOL)isHandlingSendEvent {
|
||||
return _handlingSendEvent;
|
||||
}
|
||||
|
||||
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
|
||||
_handlingSendEvent = handlingSendEvent;
|
||||
}
|
||||
|
||||
- (void)sendEvent:(NSEvent*)event {
|
||||
CefScopedSendingEvent sendingEventScoper;
|
||||
if ([[self mainMenu] performKeyEquivalent:event]) return;
|
||||
|
||||
if (_backgroundWindowController && ![self keyWindow] && [event type] == NSKeyDown) {
|
||||
[_backgroundWindowController.window makeKeyWindow];
|
||||
[_backgroundWindowController.window sendEvent:event];
|
||||
}
|
||||
else {
|
||||
[super sendEvent:event];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark SUUpdaterDelegate
|
||||
|
||||
- (void)updaterDidNotFindUpdate:(SUUpdater *)update {
|
||||
}
|
||||
|
||||
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update {
|
||||
}
|
||||
|
||||
- (void)updater:(SUUpdater *)updater willExtractUpdate:(SUAppcastItem *)update {
|
||||
}
|
||||
|
||||
- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)update immediateInstallationInvocation:(NSInvocation *)invocation {
|
||||
_updateInvocation = [invocation retain];
|
||||
_versionMenuItem.title = [NSString stringWithFormat:@"Update to %@", update.versionString];
|
||||
_versionMenuItem.target = _updateInvocation;
|
||||
_versionMenuItem.action = @selector(invoke);
|
||||
}
|
||||
|
||||
- (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)update {
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,18 +0,0 @@
|
||||
#ifndef ATOM_CEF_APP_H_
|
||||
#define ATOM_CEF_APP_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_app.h"
|
||||
|
||||
#include "atom_cef_render_process_handler.h"
|
||||
|
||||
class AtomCefApp : public CefApp {
|
||||
|
||||
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() OVERRIDE {
|
||||
return CefRefPtr<CefRenderProcessHandler>(new AtomCefRenderProcessHandler);
|
||||
}
|
||||
|
||||
IMPLEMENT_REFCOUNTING(AtomCefApp);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,276 +0,0 @@
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
#include "include/cef_app.h"
|
||||
#include "include/cef_path_util.h"
|
||||
#include "include/cef_process_util.h"
|
||||
#include "include/cef_task.h"
|
||||
#include "include/cef_runnable.h"
|
||||
#include "include/cef_trace.h"
|
||||
#include "cef_types.h"
|
||||
#include "native/atom_cef_client.h"
|
||||
#include "cef_v8.h"
|
||||
|
||||
#define REQUIRE_UI_THREAD() assert(CefCurrentlyOn(TID_UI));
|
||||
#define REQUIRE_IO_THREAD() assert(CefCurrentlyOn(TID_IO));
|
||||
#define REQUIRE_FILE_THREAD() assert(CefCurrentlyOn(TID_FILE));
|
||||
|
||||
static int numberOfOpenBrowsers = 0;
|
||||
|
||||
AtomCefClient::AtomCefClient() {
|
||||
}
|
||||
|
||||
AtomCefClient::AtomCefClient(bool handlePasteboardCommands, bool ignoreTitleChanges) {
|
||||
m_HandlePasteboardCommands = handlePasteboardCommands;
|
||||
m_IgnoreTitleChanges = ignoreTitleChanges;
|
||||
}
|
||||
|
||||
AtomCefClient::~AtomCefClient() {
|
||||
}
|
||||
|
||||
bool AtomCefClient::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) {
|
||||
std::string name = message->GetName().ToString();
|
||||
CefRefPtr<CefListValue> argumentList = message->GetArgumentList();
|
||||
int messageId = argumentList->GetInt(0);
|
||||
|
||||
if (name == "open") {
|
||||
bool hasArguments = argumentList->GetSize() > 1;
|
||||
hasArguments ? Open(argumentList->GetString(1)) : Open();
|
||||
}
|
||||
if (name == "openDev") {
|
||||
bool hasArguments = argumentList->GetSize() > 1;
|
||||
hasArguments ? OpenDev(argumentList->GetString(1)) : OpenDev();
|
||||
}
|
||||
else if (name == "newWindow") {
|
||||
NewWindow();
|
||||
}
|
||||
else if (name == "openConfig") {
|
||||
OpenConfig();
|
||||
}
|
||||
else if (name == "toggleDevTools") {
|
||||
ToggleDevTools(browser);
|
||||
}
|
||||
else if (name == "showDevTools") {
|
||||
ShowDevTools(browser);
|
||||
}
|
||||
else if (name == "confirm") {
|
||||
std::string message = argumentList->GetString(1).ToString();
|
||||
std::string detailedMessage = argumentList->GetString(2).ToString();
|
||||
std::vector<std::string> buttonLabels(argumentList->GetSize() - 3);
|
||||
for (int i = 3; i < argumentList->GetSize(); i++) {
|
||||
buttonLabels[i - 3] = argumentList->GetString(i).ToString();
|
||||
}
|
||||
|
||||
Confirm(messageId, message, detailedMessage, buttonLabels, browser);
|
||||
}
|
||||
else if (name == "showSaveDialog") {
|
||||
ShowSaveDialog(messageId, browser);
|
||||
}
|
||||
else if (name == "focus") {
|
||||
GetBrowser()->GetHost()->SetFocus(true);
|
||||
}
|
||||
else if (name == "exit") {
|
||||
Exit(argumentList->GetInt(1));
|
||||
}
|
||||
else if (name == "log") {
|
||||
std::string message = argumentList->GetString(1).ToString();
|
||||
Log(message.c_str());
|
||||
}
|
||||
else if (name == "beginTracing") {
|
||||
BeginTracing();
|
||||
}
|
||||
else if (name == "endTracing") {
|
||||
EndTracing();
|
||||
}
|
||||
else if (name == "show") {
|
||||
Show(browser);
|
||||
}
|
||||
else if (name == "toggleFullScreen") {
|
||||
ToggleFullScreen(browser);
|
||||
}
|
||||
else if (name == "getVersion") {
|
||||
GetVersion(messageId, browser);
|
||||
}
|
||||
else if (name == "crash") {
|
||||
__builtin_trap();
|
||||
}
|
||||
else if (name == "restartRendererProcess") {
|
||||
RestartRendererProcess(browser);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AtomCefClient::OnBeforeContextMenu(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefContextMenuParams> params,
|
||||
CefRefPtr<CefMenuModel> model) {
|
||||
|
||||
model->Clear();
|
||||
model->AddItem(MENU_ID_USER_FIRST, "&Toggle DevTools");
|
||||
}
|
||||
|
||||
bool AtomCefClient::OnContextMenuCommand(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefContextMenuParams> params,
|
||||
int command_id,
|
||||
EventFlags event_flags) {
|
||||
|
||||
if (command_id == MENU_ID_USER_FIRST) {
|
||||
ToggleDevTools(browser);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool AtomCefClient::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& message,
|
||||
const CefString& source,
|
||||
int line) {
|
||||
REQUIRE_UI_THREAD();
|
||||
Log(message.ToString().c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AtomCefClient::OnKeyEvent(CefRefPtr<CefBrowser> browser,
|
||||
const CefKeyEvent& event,
|
||||
CefEventHandle os_event) {
|
||||
if (event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'r') {
|
||||
browser->SendProcessMessage(PID_RENDERER, CefProcessMessage::Create("reload"));
|
||||
}
|
||||
if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'x') {
|
||||
browser->GetFocusedFrame()->Cut();
|
||||
}
|
||||
if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'c') {
|
||||
browser->GetFocusedFrame()->Copy();
|
||||
}
|
||||
if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'v') {
|
||||
browser->GetFocusedFrame()->Paste();
|
||||
}
|
||||
else if (event.modifiers == (EVENTFLAG_COMMAND_DOWN | EVENTFLAG_ALT_DOWN) && event.unmodified_character == 'i') {
|
||||
ToggleDevTools(browser);
|
||||
} else if (event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == '`') {
|
||||
FocusNextWindow();
|
||||
} else if (event.modifiers == (EVENTFLAG_COMMAND_DOWN | EVENTFLAG_SHIFT_DOWN) && event.unmodified_character == '~') {
|
||||
FocusPreviousWindow();
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AtomCefClient::OnBeforeClose(CefRefPtr<CefBrowser> browser) {
|
||||
// REQUIRE_UI_THREAD(); // When uncommented this fails when app is terminated
|
||||
m_Browser = NULL;
|
||||
numberOfOpenBrowsers--;
|
||||
if (numberOfOpenBrowsers == 0) {
|
||||
CefQuitMessageLoop();
|
||||
}
|
||||
}
|
||||
|
||||
void AtomCefClient::OnAfterCreated(CefRefPtr<CefBrowser> browser) {
|
||||
REQUIRE_UI_THREAD();
|
||||
|
||||
AutoLock lock_scope(this);
|
||||
if (!m_Browser.get()) {
|
||||
m_Browser = browser;
|
||||
}
|
||||
|
||||
GetBrowser()->GetHost()->SetFocus(true);
|
||||
numberOfOpenBrowsers++;
|
||||
}
|
||||
|
||||
void AtomCefClient::OnLoadError(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
ErrorCode errorCode,
|
||||
const CefString& errorText,
|
||||
const CefString& failedUrl) {
|
||||
REQUIRE_UI_THREAD();
|
||||
frame->LoadString(std::string(errorText) + "<br />" + std::string(failedUrl), failedUrl);
|
||||
}
|
||||
|
||||
void AtomCefClient::BeginTracing() {
|
||||
if (CefCurrentlyOn(TID_UI)) {
|
||||
class Client : public CefTraceClient,
|
||||
public CefRunFileDialogCallback {
|
||||
public:
|
||||
explicit Client(CefRefPtr<AtomCefClient> handler)
|
||||
: handler_(handler),
|
||||
trace_data_("{\"traceEvents\":["),
|
||||
first_(true) {
|
||||
}
|
||||
|
||||
virtual void OnTraceDataCollected(const char* fragment,
|
||||
size_t fragment_size) OVERRIDE {
|
||||
if (first_)
|
||||
first_ = false;
|
||||
else
|
||||
trace_data_.append(",");
|
||||
trace_data_.append(fragment, fragment_size);
|
||||
}
|
||||
|
||||
virtual void OnEndTracingComplete() OVERRIDE {
|
||||
REQUIRE_UI_THREAD();
|
||||
trace_data_.append("]}");
|
||||
|
||||
handler_->GetBrowser()->GetHost()->RunFileDialog(
|
||||
FILE_DIALOG_SAVE, CefString(), "/tmp/atom-trace.txt", std::vector<CefString>(),
|
||||
this);
|
||||
}
|
||||
|
||||
virtual void OnFileDialogDismissed(
|
||||
CefRefPtr<CefBrowserHost> browser_host,
|
||||
const std::vector<CefString>& file_paths) OVERRIDE {
|
||||
if (!file_paths.empty())
|
||||
handler_->Save(file_paths.front(), trace_data_);
|
||||
}
|
||||
|
||||
private:
|
||||
CefRefPtr<AtomCefClient> handler_;
|
||||
std::string trace_data_;
|
||||
bool first_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(Callback);
|
||||
};
|
||||
|
||||
CefBeginTracing(new Client(this), CefString());
|
||||
} else {
|
||||
CefPostTask(TID_UI, NewCefRunnableMethod(this, &AtomCefClient::BeginTracing));
|
||||
}
|
||||
}
|
||||
|
||||
void AtomCefClient::EndTracing() {
|
||||
if (CefCurrentlyOn(TID_UI)) {
|
||||
CefEndTracingAsync();
|
||||
} else {
|
||||
CefPostTask(TID_UI, NewCefRunnableMethod(this, &AtomCefClient::BeginTracing));
|
||||
}
|
||||
}
|
||||
|
||||
bool AtomCefClient::Save(const std::string& path, const std::string& data) {
|
||||
FILE* f = fopen(path.c_str(), "w");
|
||||
if (!f)
|
||||
return false;
|
||||
fwrite(data.c_str(), data.size(), 1, f);
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
void AtomCefClient::RestartRendererProcess(CefRefPtr<CefBrowser> browser) {
|
||||
// Navigating to the same URL has the effect of restarting the renderer
|
||||
// process, because cefode has overridden ContentBrowserClient's
|
||||
// ShouldSwapProcessesForNavigation method.
|
||||
CefRefPtr<CefFrame> frame = browser->GetFocusedFrame();
|
||||
frame->LoadURL(frame->GetURL());
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
#ifndef ATOM_CEF_CLIENT_H_
|
||||
#define ATOM_CEF_CLIENT_H_
|
||||
#pragma once
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include "include/cef_client.h"
|
||||
|
||||
class AtomCefClient : public CefClient,
|
||||
public CefContextMenuHandler,
|
||||
public CefDisplayHandler,
|
||||
public CefJSDialogHandler,
|
||||
public CefKeyboardHandler,
|
||||
public CefLifeSpanHandler,
|
||||
public CefLoadHandler,
|
||||
public CefRequestHandler {
|
||||
public:
|
||||
AtomCefClient();
|
||||
AtomCefClient(bool handlePasteboardCommands, bool ignoreTitleChanges);
|
||||
virtual ~AtomCefClient();
|
||||
|
||||
CefRefPtr<CefBrowser> GetBrowser() { return m_Browser; }
|
||||
|
||||
virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() {
|
||||
return this;
|
||||
}
|
||||
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
virtual CefRefPtr<CefRequestHandler> GetRequestHandler() OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
|
||||
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) OVERRIDE;
|
||||
|
||||
|
||||
// CefContextMenuHandler methods
|
||||
virtual void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefContextMenuParams> params,
|
||||
CefRefPtr<CefMenuModel> model) OVERRIDE;
|
||||
|
||||
virtual bool OnContextMenuCommand(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefContextMenuParams> params,
|
||||
int command_id,
|
||||
EventFlags event_flags) OVERRIDE;
|
||||
|
||||
// CefDisplayHandler methods
|
||||
virtual bool OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& message,
|
||||
const CefString& source,
|
||||
int line) OVERRIDE;
|
||||
|
||||
virtual void OnTitleChange(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& title) OVERRIDE;
|
||||
|
||||
// CefJsDialogHandlerMethods
|
||||
virtual bool OnBeforeUnloadDialog(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& message_text,
|
||||
bool is_reload,
|
||||
CefRefPtr<CefJSDialogCallback> callback) {
|
||||
callback->Continue(true, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
// CefKeyboardHandler methods
|
||||
virtual bool OnKeyEvent(CefRefPtr<CefBrowser> browser,
|
||||
const CefKeyEvent& event,
|
||||
CefEventHandle os_event) OVERRIDE;
|
||||
|
||||
// CefLifeSpanHandler methods
|
||||
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual bool DoClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
|
||||
|
||||
// CefLoadHandler methods
|
||||
virtual void OnLoadError(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
ErrorCode errorCode,
|
||||
const CefString& errorText,
|
||||
const CefString& failedUrl) OVERRIDE;
|
||||
|
||||
void BeginTracing();
|
||||
void EndTracing();
|
||||
|
||||
bool Save(const std::string& path, const std::string& data);
|
||||
void RestartRendererProcess(CefRefPtr<CefBrowser> browser);
|
||||
bool IsClosed() { return m_IsClosed; };
|
||||
|
||||
protected:
|
||||
CefRefPtr<CefBrowser> m_Browser;
|
||||
bool m_HandlePasteboardCommands = false;
|
||||
bool m_IgnoreTitleChanges = false;
|
||||
bool m_IsClosed = false;
|
||||
|
||||
void FocusNextWindow();
|
||||
void FocusPreviousWindow();
|
||||
void Open(std::string path);
|
||||
void Open();
|
||||
void OpenDev(std::string path);
|
||||
void OpenDev();
|
||||
void NewWindow();
|
||||
void OpenConfig();
|
||||
void ToggleDevTools(CefRefPtr<CefBrowser> browser);
|
||||
void ShowDevTools(CefRefPtr<CefBrowser> browser);
|
||||
void Confirm(int replyId,
|
||||
std::string message,
|
||||
std::string detailedMessage,
|
||||
std::vector<std::string> buttonLabels,
|
||||
CefRefPtr<CefBrowser> browser);
|
||||
void ShowSaveDialog(int replyId, CefRefPtr<CefBrowser> browser);
|
||||
CefRefPtr<CefListValue> CreateReplyDescriptor(int replyId, int callbackIndex);
|
||||
void Exit(int status);
|
||||
void Log(const char *message);
|
||||
void Show(CefRefPtr<CefBrowser> browser);
|
||||
void ToggleFullScreen(CefRefPtr<CefBrowser> browser);
|
||||
void GetVersion(int replyId, CefRefPtr<CefBrowser> browser);
|
||||
|
||||
IMPLEMENT_REFCOUNTING(AtomCefClient);
|
||||
IMPLEMENT_LOCKING(AtomCefClient);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,63 +0,0 @@
|
||||
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <string>
|
||||
#include "cefclient/client_handler.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
|
||||
void ClientHandler::OnAddressChange(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefString& url) {
|
||||
REQUIRE_UI_THREAD();
|
||||
|
||||
if (m_BrowserId == browser->GetIdentifier() && frame->IsMain()) {
|
||||
// Set the edit window text
|
||||
std::string urlStr(url);
|
||||
gtk_entry_set_text(GTK_ENTRY(m_EditHwnd), urlStr.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void ClientHandler::OnTitleChange(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& title) {
|
||||
REQUIRE_UI_THREAD();
|
||||
|
||||
GtkWidget* window = gtk_widget_get_ancestor(
|
||||
GTK_WIDGET(browser->GetHost()->GetWindowHandle()),
|
||||
GTK_TYPE_WINDOW);
|
||||
std::string titleStr(title);
|
||||
gtk_window_set_title(GTK_WINDOW(window), titleStr.c_str());
|
||||
}
|
||||
|
||||
void ClientHandler::SendNotification(NotificationType type) {
|
||||
// TODO(port): Implement this method.
|
||||
}
|
||||
|
||||
void ClientHandler::SetLoading(bool isLoading) {
|
||||
if (isLoading)
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(m_StopHwnd), true);
|
||||
else
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(m_StopHwnd), false);
|
||||
}
|
||||
|
||||
void ClientHandler::SetNavState(bool canGoBack, bool canGoForward) {
|
||||
if (canGoBack)
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(m_BackHwnd), true);
|
||||
else
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(m_BackHwnd), false);
|
||||
|
||||
if (canGoForward)
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(m_ForwardHwnd), true);
|
||||
else
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(m_ForwardHwnd), false);
|
||||
}
|
||||
|
||||
void ClientHandler::CloseMainWindow() {
|
||||
// TODO(port): Close main window.
|
||||
}
|
||||
|
||||
std::string ClientHandler::GetDownloadPath(const std::string& file_name) {
|
||||
return std::string();
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <iostream>
|
||||
#import "include/cef_browser.h"
|
||||
#import "include/cef_frame.h"
|
||||
#import "native/atom_cef_client.h"
|
||||
#import "atom_application.h"
|
||||
#import "atom_window_controller.h"
|
||||
#import "atom_application.h"
|
||||
|
||||
void AtomCefClient::FocusNextWindow() {
|
||||
NSArray *windows = [NSApp windows];
|
||||
int count = [windows count];
|
||||
int start = [windows indexOfObject:[NSApp keyWindow]];
|
||||
|
||||
int i = start;
|
||||
while (true) {
|
||||
i = (i + 1) % count;
|
||||
if (i == start) break;
|
||||
NSWindow *window = [windows objectAtIndex:i];
|
||||
if ([window isVisible] && ![window isExcludedFromWindowsMenu]) {
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AtomCefClient::FocusPreviousWindow() {
|
||||
NSArray *windows = [NSApp windows];
|
||||
int count = [windows count];
|
||||
int start = [windows indexOfObject:[NSApp keyWindow]];
|
||||
|
||||
int i = start;
|
||||
while (true) {
|
||||
i = i - 1;
|
||||
if (i == 0) i = count -1;
|
||||
if (i == start) break;
|
||||
NSWindow *window = [windows objectAtIndex:i];
|
||||
if ([window isVisible] && ![window isExcludedFromWindowsMenu]) {
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AtomCefClient::Open(std::string path) {
|
||||
NSString *pathString = [NSString stringWithCString:path.c_str() encoding:NSUTF8StringEncoding];
|
||||
[(AtomApplication *)[AtomApplication sharedApplication] open:pathString];
|
||||
}
|
||||
|
||||
void AtomCefClient::Open() {
|
||||
NSOpenPanel *panel = [NSOpenPanel openPanel];
|
||||
[panel setCanChooseDirectories:YES];
|
||||
if ([panel runModal] == NSFileHandlingPanelOKButton) {
|
||||
NSURL *url = [[panel URLs] lastObject];
|
||||
Open([[url path] UTF8String]);
|
||||
}
|
||||
}
|
||||
|
||||
void AtomCefClient::OpenDev(std::string path) {
|
||||
NSString *pathString = [NSString stringWithCString:path.c_str() encoding:NSUTF8StringEncoding];
|
||||
[(AtomApplication *)[AtomApplication sharedApplication] openDev:pathString];
|
||||
}
|
||||
|
||||
void AtomCefClient::OpenDev() {
|
||||
NSOpenPanel *panel = [NSOpenPanel openPanel];
|
||||
[panel setCanChooseDirectories:YES];
|
||||
if ([panel runModal] == NSFileHandlingPanelOKButton) {
|
||||
NSURL *url = [[panel URLs] lastObject];
|
||||
OpenDev([[url path] UTF8String]);
|
||||
}
|
||||
}
|
||||
|
||||
void AtomCefClient::NewWindow() {
|
||||
[(AtomApplication *)[AtomApplication sharedApplication] open:nil];
|
||||
}
|
||||
|
||||
void AtomCefClient::OpenConfig() {
|
||||
[(AtomApplication *)[AtomApplication sharedApplication] openConfig];
|
||||
}
|
||||
|
||||
void AtomCefClient::Confirm(int replyId,
|
||||
std::string message,
|
||||
std::string detailedMessage,
|
||||
std::vector<std::string> buttonLabels,
|
||||
CefRefPtr<CefBrowser> browser) {
|
||||
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
|
||||
[alert setMessageText:[NSString stringWithCString:message.c_str() encoding:NSUTF8StringEncoding]];
|
||||
[alert setInformativeText:[NSString stringWithCString:detailedMessage.c_str() encoding:NSUTF8StringEncoding]];
|
||||
|
||||
for (int i = 0; i < buttonLabels.size(); i++) {
|
||||
NSString *title = [NSString stringWithCString:buttonLabels[i].c_str() encoding:NSUTF8StringEncoding];
|
||||
NSButton *button = [alert addButtonWithTitle:title];
|
||||
[button setTag:i];
|
||||
}
|
||||
|
||||
NSUInteger clickedButtonTag = [alert runModal];
|
||||
|
||||
CefRefPtr<CefProcessMessage> replyMessage = CefProcessMessage::Create("reply");
|
||||
CefRefPtr<CefListValue> replyArguments = replyMessage->GetArgumentList();
|
||||
replyArguments->SetSize(1);
|
||||
replyArguments->SetList(0, CreateReplyDescriptor(replyId, clickedButtonTag));
|
||||
browser->SendProcessMessage(PID_RENDERER, replyMessage);
|
||||
}
|
||||
|
||||
|
||||
void AtomCefClient::OnTitleChange(CefRefPtr<CefBrowser> browser, const CefString& title) {
|
||||
if (m_IgnoreTitleChanges) return;
|
||||
|
||||
NSWindow *window = [browser->GetHost()->GetWindowHandle() window];
|
||||
[window setTitle:[NSString stringWithUTF8String:title.ToString().c_str()]];
|
||||
}
|
||||
|
||||
void AtomCefClient::ToggleDevTools(CefRefPtr<CefBrowser> browser) {
|
||||
AtomWindowController *windowController = [[browser->GetHost()->GetWindowHandle() window] windowController];
|
||||
[windowController toggleDevTools];
|
||||
}
|
||||
|
||||
void AtomCefClient::ShowDevTools(CefRefPtr<CefBrowser> browser) {
|
||||
AtomWindowController *windowController = [[browser->GetHost()->GetWindowHandle() window] windowController];
|
||||
[windowController showDevTools];
|
||||
}
|
||||
|
||||
void AtomCefClient::Show(CefRefPtr<CefBrowser> browser) {
|
||||
AtomWindowController *windowController = [[browser->GetHost()->GetWindowHandle() window] windowController];
|
||||
[windowController.webView setHidden:NO];
|
||||
}
|
||||
|
||||
void AtomCefClient::ToggleFullScreen(CefRefPtr<CefBrowser> browser) {
|
||||
[[browser->GetHost()->GetWindowHandle() window] toggleFullScreen:nil];
|
||||
}
|
||||
|
||||
void AtomCefClient::ShowSaveDialog(int replyId, CefRefPtr<CefBrowser> browser) {
|
||||
CefRefPtr<CefProcessMessage> replyMessage = CefProcessMessage::Create("reply");
|
||||
CefRefPtr<CefListValue> replyArguments = replyMessage->GetArgumentList();
|
||||
|
||||
NSSavePanel *panel = [NSSavePanel savePanel];
|
||||
if ([panel runModal] == NSFileHandlingPanelOKButton) {
|
||||
CefString path = CefString([[[panel URL] path] UTF8String]);
|
||||
replyArguments->SetSize(2);
|
||||
replyArguments->SetString(1, path);
|
||||
}
|
||||
else {
|
||||
replyArguments->SetSize(1);
|
||||
}
|
||||
replyArguments->SetList(0, CreateReplyDescriptor(replyId, 0));
|
||||
|
||||
browser->SendProcessMessage(PID_RENDERER, replyMessage);
|
||||
}
|
||||
|
||||
CefRefPtr<CefListValue> AtomCefClient::CreateReplyDescriptor(int replyId, int callbackIndex) {
|
||||
CefRefPtr<CefListValue> descriptor = CefListValue::Create();
|
||||
descriptor->SetSize(2);
|
||||
descriptor->SetInt(0, replyId);
|
||||
descriptor->SetInt(1, callbackIndex);
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
void AtomCefClient::Exit(int status) {
|
||||
exit(status);
|
||||
}
|
||||
|
||||
void AtomCefClient::Log(const char *message) {
|
||||
NSLog(@"%s", message);
|
||||
}
|
||||
|
||||
void AtomCefClient::GetVersion(int replyId, CefRefPtr<CefBrowser> browser) {
|
||||
CefRefPtr<CefProcessMessage> replyMessage = CefProcessMessage::Create("reply");
|
||||
CefRefPtr<CefListValue> replyArguments = replyMessage->GetArgumentList();
|
||||
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
|
||||
|
||||
replyArguments->SetSize(2);
|
||||
replyArguments->SetString(1, [version UTF8String]);
|
||||
replyArguments->SetList(0, CreateReplyDescriptor(replyId, 0));
|
||||
browser->SendProcessMessage(PID_RENDERER, replyMessage);
|
||||
}
|
||||
|
||||
bool AtomCefClient::DoClose(CefRefPtr<CefBrowser> browser) {
|
||||
m_IsClosed = true;
|
||||
NSWindow *window = [browser->GetHost()->GetWindowHandle() window];
|
||||
[window performClose:window];
|
||||
return false;
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "cefclient/client_handler.h"
|
||||
|
||||
#include <string>
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include "cefclient/resource.h"
|
||||
|
||||
void ClientHandler::OnAddressChange(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefString& url) {
|
||||
REQUIRE_UI_THREAD();
|
||||
|
||||
if (m_BrowserId == browser->GetIdentifier() && frame->IsMain()) {
|
||||
// Set the edit window text
|
||||
SetWindowText(m_EditHwnd, std::wstring(url).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void ClientHandler::OnTitleChange(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& title) {
|
||||
REQUIRE_UI_THREAD();
|
||||
|
||||
// Set the frame window title bar
|
||||
CefWindowHandle hwnd = browser->GetHost()->GetWindowHandle();
|
||||
if (m_BrowserId == browser->GetIdentifier()) {
|
||||
// The frame window will be the parent of the browser window
|
||||
hwnd = GetParent(hwnd);
|
||||
}
|
||||
SetWindowText(hwnd, std::wstring(title).c_str());
|
||||
}
|
||||
|
||||
void ClientHandler::SendNotification(NotificationType type) {
|
||||
UINT id;
|
||||
switch (type) {
|
||||
case NOTIFY_CONSOLE_MESSAGE:
|
||||
id = ID_WARN_CONSOLEMESSAGE;
|
||||
break;
|
||||
case NOTIFY_DOWNLOAD_COMPLETE:
|
||||
id = ID_WARN_DOWNLOADCOMPLETE;
|
||||
break;
|
||||
case NOTIFY_DOWNLOAD_ERROR:
|
||||
id = ID_WARN_DOWNLOADERROR;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
PostMessage(m_MainHwnd, WM_COMMAND, id, 0);
|
||||
}
|
||||
|
||||
void ClientHandler::SetLoading(bool isLoading) {
|
||||
ASSERT(m_EditHwnd != NULL && m_ReloadHwnd != NULL && m_StopHwnd != NULL);
|
||||
EnableWindow(m_EditHwnd, TRUE);
|
||||
EnableWindow(m_ReloadHwnd, !isLoading);
|
||||
EnableWindow(m_StopHwnd, isLoading);
|
||||
}
|
||||
|
||||
void ClientHandler::SetNavState(bool canGoBack, bool canGoForward) {
|
||||
ASSERT(m_BackHwnd != NULL && m_ForwardHwnd != NULL);
|
||||
EnableWindow(m_BackHwnd, canGoBack);
|
||||
EnableWindow(m_ForwardHwnd, canGoForward);
|
||||
}
|
||||
|
||||
void ClientHandler::CloseMainWindow() {
|
||||
::PostMessage(m_MainHwnd, WM_CLOSE, 0, 0);
|
||||
}
|
||||
|
||||
std::string ClientHandler::GetDownloadPath(const std::string& file_name) {
|
||||
TCHAR szFolderPath[MAX_PATH];
|
||||
std::string path;
|
||||
|
||||
// Save the file in the user's "My Documents" folder.
|
||||
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PERSONAL | CSIDL_FLAG_CREATE,
|
||||
NULL, 0, szFolderPath))) {
|
||||
path = CefString(szFolderPath);
|
||||
path += "\\" + file_name;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
#ifndef ATOM_CEF_RENDER_PROCESS_HANDLER_H_
|
||||
#define ATOM_CEF_RENDER_PROCESS_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_app.h"
|
||||
|
||||
class AtomCefRenderProcessHandler : public CefRenderProcessHandler {
|
||||
|
||||
virtual void OnWebKitInitialized() OVERRIDE;
|
||||
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) OVERRIDE;
|
||||
virtual void OnContextReleased(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) OVERRIDE;
|
||||
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) OVERRIDE;
|
||||
|
||||
void Reload(CefRefPtr<CefBrowser> browser);
|
||||
bool CallMessageReceivedHandler(CefRefPtr<CefV8Context> context, CefRefPtr<CefProcessMessage> message);
|
||||
void InjectExtensionsIntoV8Context(CefRefPtr<CefV8Context> context);
|
||||
|
||||
IMPLEMENT_REFCOUNTING(AtomCefRenderProcessHandler);
|
||||
};
|
||||
|
||||
#endif // ATOM_CEF_RENDER_PROCESS_HANDLER_H_
|
||||
@@ -1,83 +0,0 @@
|
||||
#import <iostream>
|
||||
#import "native/v8_extensions/atom.h"
|
||||
#import "native/v8_extensions/native.h"
|
||||
#import "native/message_translation.h"
|
||||
#import "atom_cef_render_process_handler.h"
|
||||
|
||||
|
||||
void AtomCefRenderProcessHandler::OnWebKitInitialized() {
|
||||
}
|
||||
|
||||
void AtomCefRenderProcessHandler::OnContextCreated(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) {
|
||||
InjectExtensionsIntoV8Context(context);
|
||||
}
|
||||
|
||||
void AtomCefRenderProcessHandler::OnContextReleased(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) {
|
||||
}
|
||||
|
||||
bool AtomCefRenderProcessHandler::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) {
|
||||
std::string name = message->GetName().ToString();
|
||||
|
||||
if (name == "reload") {
|
||||
Reload(browser);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return CallMessageReceivedHandler(browser->GetMainFrame()->GetV8Context(), message);
|
||||
}
|
||||
}
|
||||
|
||||
void AtomCefRenderProcessHandler::Reload(CefRefPtr<CefBrowser> browser) {
|
||||
CefRefPtr<CefV8Context> context = browser->GetMainFrame()->GetV8Context();
|
||||
CefRefPtr<CefV8Value> global = context->GetGlobal();
|
||||
|
||||
context->Enter();
|
||||
CefV8ValueList arguments;
|
||||
|
||||
CefRefPtr<CefV8Value> reloadFunction = global->GetValue("reload");
|
||||
reloadFunction->ExecuteFunction(global, arguments);
|
||||
if (!reloadFunction->IsFunction() || reloadFunction->HasException()) {
|
||||
browser->ReloadIgnoreCache();
|
||||
}
|
||||
context->Exit();
|
||||
}
|
||||
|
||||
bool AtomCefRenderProcessHandler::CallMessageReceivedHandler(CefRefPtr<CefV8Context> context, CefRefPtr<CefProcessMessage> message) {
|
||||
context->Enter();
|
||||
|
||||
CefRefPtr<CefV8Value> atom = context->GetGlobal()->GetValue("atom");
|
||||
CefRefPtr<CefV8Value> receiveFn = atom->GetValue("receiveMessageFromBrowserProcess");
|
||||
|
||||
CefV8ValueList arguments;
|
||||
arguments.push_back(CefV8Value::CreateString(message->GetName().ToString()));
|
||||
|
||||
CefRefPtr<CefListValue> messageArguments = message->GetArgumentList();
|
||||
if (messageArguments->GetSize() > 0) {
|
||||
CefRefPtr<CefV8Value> data = CefV8Value::CreateArray(messageArguments->GetSize());
|
||||
TranslateList(messageArguments, data);
|
||||
arguments.push_back(data);
|
||||
}
|
||||
|
||||
receiveFn->ExecuteFunction(atom, arguments);
|
||||
context->Exit();
|
||||
|
||||
if (receiveFn->HasException()) {
|
||||
std::cout << "ERROR: Exception in JS receiving message " << message->GetName().ToString() << "\n";
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void AtomCefRenderProcessHandler::InjectExtensionsIntoV8Context(CefRefPtr<CefV8Context> context) {
|
||||
// these objects are deleted when the context removes all references to them
|
||||
(new v8_extensions::Atom())->CreateContextBinding(context);
|
||||
(new v8_extensions::Native())->CreateContextBinding(context);
|
||||
}
|
||||
@@ -1,408 +0,0 @@
|
||||
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
#include "cefclient/cefclient.h"
|
||||
#include "include/cef_app.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/cef_runnable.h"
|
||||
#include "cefclient/binding_test.h"
|
||||
#include "cefclient/client_handler.h"
|
||||
#include "cefclient/dom_test.h"
|
||||
#include "cefclient/scheme_test.h"
|
||||
#include "cefclient/string_util.h"
|
||||
|
||||
char szWorkingDir[512]; // The current working directory
|
||||
|
||||
// The global ClientHandler reference.
|
||||
extern CefRefPtr<ClientHandler> g_handler;
|
||||
|
||||
void destroy(void) {
|
||||
CefQuitMessageLoop();
|
||||
}
|
||||
|
||||
void TerminationSignalHandler(int signatl) {
|
||||
destroy();
|
||||
}
|
||||
|
||||
// Callback for Debug > Get Source... menu item.
|
||||
gboolean GetSourceActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunGetSourceTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Get Source... menu item.
|
||||
gboolean GetTextActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunGetTextTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Request... menu item.
|
||||
gboolean RequestActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunRequestTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Local Storage... menu item.
|
||||
gboolean LocalStorageActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunLocalStorageTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > XMLHttpRequest... menu item.
|
||||
gboolean XMLHttpRequestActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunXMLHTTPRequestTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Scheme Handler... menu item.
|
||||
gboolean SchemeHandlerActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
scheme_test::RunTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > JavaScript Binding... menu item.
|
||||
gboolean BindingActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
binding_test::RunTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Plugin Info... menu item.
|
||||
gboolean PluginInfoActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunPluginInfoTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > DOM Access... menu item.
|
||||
gboolean DOMAccessActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
dom_test::RunTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Popup Window... menu item.
|
||||
gboolean PopupWindowActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunPopupTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Accelerated 2D Canvas... menu item.
|
||||
gboolean Accelerated2DCanvasActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunAccelerated2DCanvasTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Accelerated Layers... menu item.
|
||||
gboolean AcceleratedLayersActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunAcceleratedLayersTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > WebGL... menu item.
|
||||
gboolean WebGLActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunWebGLTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > HTML5 Video... menu item.
|
||||
gboolean HTML5VideoActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunHTML5VideoTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > HTML5 Drag & Drop... menu item.
|
||||
gboolean HTML5DragDropActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
RunDragDropTest(g_handler->GetBrowser());
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
|
||||
// Callback for Debug > Zoom In... menu item.
|
||||
gboolean ZoomInActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId()) {
|
||||
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
|
||||
browser->GetHost()->SetZoomLevel(browser->GetHost()->GetZoomLevel() + 0.5);
|
||||
}
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Zoom Out... menu item.
|
||||
gboolean ZoomOutActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId()) {
|
||||
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
|
||||
browser->GetHost()->SetZoomLevel(browser->GetHost()->GetZoomLevel() - 0.5);
|
||||
}
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for Debug > Zoom Reset... menu item.
|
||||
gboolean ZoomResetActivated(GtkWidget* widget) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId()) {
|
||||
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
|
||||
browser->GetHost()->SetZoomLevel(0.0);
|
||||
}
|
||||
|
||||
return FALSE; // Don't stop this message.
|
||||
}
|
||||
|
||||
// Callback for when you click the back button.
|
||||
void BackButtonClicked(GtkButton* button) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
g_handler->GetBrowser()->GoBack();
|
||||
}
|
||||
|
||||
// Callback for when you click the forward button.
|
||||
void ForwardButtonClicked(GtkButton* button) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
g_handler->GetBrowser()->GoForward();
|
||||
}
|
||||
|
||||
// Callback for when you click the stop button.
|
||||
void StopButtonClicked(GtkButton* button) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
g_handler->GetBrowser()->StopLoad();
|
||||
}
|
||||
|
||||
// Callback for when you click the reload button.
|
||||
void ReloadButtonClicked(GtkButton* button) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId())
|
||||
g_handler->GetBrowser()->Reload();
|
||||
}
|
||||
|
||||
// Callback for when you press enter in the URL box.
|
||||
void URLEntryActivate(GtkEntry* entry) {
|
||||
if (!g_handler.get() || !g_handler->GetBrowserId())
|
||||
return;
|
||||
|
||||
const gchar* url = gtk_entry_get_text(entry);
|
||||
g_handler->GetBrowser()->GetMainFrame()->LoadURL(std::string(url).c_str());
|
||||
}
|
||||
|
||||
// GTK utility functions ----------------------------------------------
|
||||
|
||||
GtkWidget* AddMenuEntry(GtkWidget* menu_widget, const char* text,
|
||||
GCallback callback) {
|
||||
GtkWidget* entry = gtk_menu_item_new_with_label(text);
|
||||
g_signal_connect(entry, "activate", callback, NULL);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu_widget), entry);
|
||||
return entry;
|
||||
}
|
||||
|
||||
GtkWidget* CreateMenu(GtkWidget* menu_bar, const char* text) {
|
||||
GtkWidget* menu_widget = gtk_menu_new();
|
||||
GtkWidget* menu_header = gtk_menu_item_new_with_label(text);
|
||||
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_header), menu_widget);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), menu_header);
|
||||
return menu_widget;
|
||||
}
|
||||
|
||||
GtkWidget* CreateMenuBar() {
|
||||
GtkWidget* menu_bar = gtk_menu_bar_new();
|
||||
GtkWidget* debug_menu = CreateMenu(menu_bar, "Tests");
|
||||
|
||||
AddMenuEntry(debug_menu, "Get Source",
|
||||
G_CALLBACK(GetSourceActivated));
|
||||
AddMenuEntry(debug_menu, "Get Text",
|
||||
G_CALLBACK(GetTextActivated));
|
||||
AddMenuEntry(debug_menu, "Request",
|
||||
G_CALLBACK(RequestActivated));
|
||||
AddMenuEntry(debug_menu, "Local Storage",
|
||||
G_CALLBACK(LocalStorageActivated));
|
||||
AddMenuEntry(debug_menu, "XMLHttpRequest",
|
||||
G_CALLBACK(XMLHttpRequestActivated));
|
||||
AddMenuEntry(debug_menu, "Scheme Handler",
|
||||
G_CALLBACK(SchemeHandlerActivated));
|
||||
AddMenuEntry(debug_menu, "JavaScript Binding",
|
||||
G_CALLBACK(BindingActivated));
|
||||
AddMenuEntry(debug_menu, "Plugin Info",
|
||||
G_CALLBACK(PluginInfoActivated));
|
||||
AddMenuEntry(debug_menu, "DOM Access",
|
||||
G_CALLBACK(DOMAccessActivated));
|
||||
AddMenuEntry(debug_menu, "Popup Window",
|
||||
G_CALLBACK(PopupWindowActivated));
|
||||
AddMenuEntry(debug_menu, "Accelerated 2D Canvas",
|
||||
G_CALLBACK(Accelerated2DCanvasActivated));
|
||||
AddMenuEntry(debug_menu, "Accelerated Layers",
|
||||
G_CALLBACK(AcceleratedLayersActivated));
|
||||
AddMenuEntry(debug_menu, "WebGL",
|
||||
G_CALLBACK(WebGLActivated));
|
||||
AddMenuEntry(debug_menu, "HTML5 Video",
|
||||
G_CALLBACK(HTML5VideoActivated));
|
||||
AddMenuEntry(debug_menu, "HTML5 Drag & Drop",
|
||||
G_CALLBACK(HTML5DragDropActivated));
|
||||
AddMenuEntry(debug_menu, "Zoom In",
|
||||
G_CALLBACK(ZoomInActivated));
|
||||
AddMenuEntry(debug_menu, "Zoom Out",
|
||||
G_CALLBACK(ZoomOutActivated));
|
||||
AddMenuEntry(debug_menu, "Zoom Reset",
|
||||
G_CALLBACK(ZoomResetActivated));
|
||||
return menu_bar;
|
||||
}
|
||||
|
||||
// WebViewDelegate::TakeFocus in the test webview delegate.
|
||||
static gboolean HandleFocus(GtkWidget* widget,
|
||||
GdkEventFocus* focus) {
|
||||
if (g_handler.get() && g_handler->GetBrowserId()) {
|
||||
// Give focus to the browser window.
|
||||
g_handler->GetBrowser()->GetHost()->SetFocus(true);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
CefMainArgs main_args(argc, argv);
|
||||
CefRefPtr<ClientApp> app(new ClientApp);
|
||||
|
||||
// Execute the secondary process, if any.
|
||||
int exit_code = CefExecuteProcess(main_args, app.get());
|
||||
if (exit_code >= 0)
|
||||
return exit_code;
|
||||
|
||||
if (!getcwd(szWorkingDir, sizeof (szWorkingDir)))
|
||||
return -1;
|
||||
|
||||
GtkWidget* window;
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
// Parse command line arguments.
|
||||
AppInitCommandLine(argc, argv);
|
||||
|
||||
CefSettings settings;
|
||||
|
||||
// Populate the settings based on command line arguments.
|
||||
AppGetSettings(settings, app);
|
||||
|
||||
// Initialize CEF.
|
||||
CefInitialize(main_args, settings, app.get());
|
||||
|
||||
// Register the scheme handler.
|
||||
scheme_test::InitTest();
|
||||
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size(GTK_WINDOW(window), 800, 600);
|
||||
|
||||
g_signal_connect(window, "focus", G_CALLBACK(&HandleFocus), NULL);
|
||||
|
||||
GtkWidget* vbox = gtk_vbox_new(FALSE, 0);
|
||||
|
||||
GtkWidget* menu_bar = CreateMenuBar();
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(vbox), menu_bar, FALSE, FALSE, 0);
|
||||
|
||||
GtkWidget* toolbar = gtk_toolbar_new();
|
||||
// Turn off the labels on the toolbar buttons.
|
||||
gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
|
||||
|
||||
GtkToolItem* back = gtk_tool_button_new_from_stock(GTK_STOCK_GO_BACK);
|
||||
g_signal_connect(back, "clicked",
|
||||
G_CALLBACK(BackButtonClicked), NULL);
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), back, -1 /* append */);
|
||||
|
||||
GtkToolItem* forward = gtk_tool_button_new_from_stock(GTK_STOCK_GO_FORWARD);
|
||||
g_signal_connect(forward, "clicked",
|
||||
G_CALLBACK(ForwardButtonClicked), NULL);
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), forward, -1 /* append */);
|
||||
|
||||
GtkToolItem* reload = gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
|
||||
g_signal_connect(reload, "clicked",
|
||||
G_CALLBACK(ReloadButtonClicked), NULL);
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), reload, -1 /* append */);
|
||||
|
||||
GtkToolItem* stop = gtk_tool_button_new_from_stock(GTK_STOCK_STOP);
|
||||
g_signal_connect(stop, "clicked",
|
||||
G_CALLBACK(StopButtonClicked), NULL);
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), stop, -1 /* append */);
|
||||
|
||||
GtkWidget* m_editWnd = gtk_entry_new();
|
||||
g_signal_connect(G_OBJECT(m_editWnd), "activate",
|
||||
G_CALLBACK(URLEntryActivate), NULL);
|
||||
|
||||
GtkToolItem* tool_item = gtk_tool_item_new();
|
||||
gtk_container_add(GTK_CONTAINER(tool_item), m_editWnd);
|
||||
gtk_tool_item_set_expand(tool_item, TRUE);
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), tool_item, -1); // append
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
|
||||
|
||||
g_signal_connect(G_OBJECT(window), "destroy",
|
||||
G_CALLBACK(gtk_widget_destroyed), &window);
|
||||
g_signal_connect(G_OBJECT(window), "destroy",
|
||||
G_CALLBACK(destroy), NULL);
|
||||
|
||||
// Create the handler.
|
||||
g_handler = new ClientHandler();
|
||||
g_handler->SetMainHwnd(vbox);
|
||||
g_handler->SetEditHwnd(m_editWnd);
|
||||
g_handler->SetButtonHwnds(GTK_WIDGET(back), GTK_WIDGET(forward),
|
||||
GTK_WIDGET(reload), GTK_WIDGET(stop));
|
||||
|
||||
// Create the browser view.
|
||||
CefWindowInfo window_info;
|
||||
CefBrowserSettings browserSettings;
|
||||
|
||||
// Populate the settings based on command line arguments.
|
||||
AppGetBrowserSettings(browserSettings);
|
||||
|
||||
window_info.SetAsChild(vbox);
|
||||
|
||||
CefBrowserHost::CreateBrowserSync(
|
||||
window_info, g_handler.get(),
|
||||
g_handler->GetStartupURL(), browserSettings);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
||||
gtk_widget_show_all(GTK_WIDGET(window));
|
||||
|
||||
// Install an signal handler so we clean up after ourselves.
|
||||
signal(SIGINT, TerminationSignalHandler);
|
||||
signal(SIGTERM, TerminationSignalHandler);
|
||||
|
||||
CefRunMessageLoop();
|
||||
|
||||
CefShutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Global functions
|
||||
|
||||
std::string AppGetWorkingDirectory() {
|
||||
return szWorkingDir;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
__attribute__((visibility("default"))) int AtomMain(int argc, char* argv[]);
|
||||
@@ -1,139 +0,0 @@
|
||||
#import "atom_main.h"
|
||||
#import "atom_cef_app.h"
|
||||
#import "include/cef_application_mac.h"
|
||||
#import "native/atom_application.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
void sendPathToMainProcessAndExit(int fd, NSString *socketPath, NSDictionary *arguments);
|
||||
void handleBeingOpenedAgain(int argc, char* argv[]);
|
||||
void listenForPathToOpen(int fd, NSString *socketPath);
|
||||
void activateOpenApp();
|
||||
BOOL isAppAlreadyOpen();
|
||||
|
||||
int AtomMain(int argc, char* argv[]) {
|
||||
// Check if we're being run as a secondary process.
|
||||
CefMainArgs main_args(argc, argv);
|
||||
CefRefPtr<CefApp> app(new AtomCefApp);
|
||||
int exitCode = CefExecuteProcess(main_args, app);
|
||||
if (exitCode >= 0)
|
||||
return exitCode;
|
||||
|
||||
// We're the main process.
|
||||
@autoreleasepool {
|
||||
handleBeingOpenedAgain(argc, argv);
|
||||
|
||||
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
|
||||
AtomApplication *application = [AtomApplication applicationWithArguments:argv count:argc];
|
||||
|
||||
NSString *mainNibName = [infoDictionary objectForKey:@"NSMainNibFile"];
|
||||
NSNib *mainNib = [[NSNib alloc] initWithNibNamed:mainNibName bundle:[NSBundle bundleWithIdentifier:@"com.github.atom.framework"]];
|
||||
[mainNib instantiateWithOwner:application topLevelObjects:nil];
|
||||
|
||||
CefRunMessageLoop();
|
||||
CefShutdown();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void handleBeingOpenedAgain(int argc, char* argv[]) {
|
||||
NSString *socketPath = [NSString stringWithFormat:@"/tmp/atom-%d.sock", getuid()];
|
||||
|
||||
int fd = socket(AF_UNIX, SOCK_DGRAM, 0);
|
||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
if (isAppAlreadyOpen()) {
|
||||
NSDictionary *arguments = [AtomApplication parseArguments:argv count:argc];
|
||||
sendPathToMainProcessAndExit(fd, socketPath, arguments);
|
||||
}
|
||||
else {
|
||||
listenForPathToOpen(fd, socketPath);
|
||||
}
|
||||
}
|
||||
|
||||
void sendPathToMainProcessAndExit(int fd, NSString *socketPath, NSDictionary *arguments) {
|
||||
struct sockaddr_un send_addr;
|
||||
send_addr.sun_family = AF_UNIX;
|
||||
strcpy(send_addr.sun_path, [socketPath UTF8String]);
|
||||
|
||||
NSString *path = [arguments objectForKey:@"path"];
|
||||
if (path) {
|
||||
NSMutableString *packedString = [NSMutableString stringWithString:path];
|
||||
if ([arguments objectForKey:@"wait"]) {
|
||||
[packedString appendFormat:@"\n%@", [arguments objectForKey:@"pid"]];
|
||||
}
|
||||
|
||||
const char *buf = [packedString UTF8String];
|
||||
if (sendto(fd, buf, [packedString lengthOfBytesUsingEncoding:NSUTF8StringEncoding], 0, (sockaddr *)&send_addr, sizeof(send_addr)) < 0) {
|
||||
perror("Error: Failed to sending path to main Atom process");
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
activateOpenApp();
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void listenForPathToOpen(int fd, NSString *socketPath) {
|
||||
struct sockaddr_un addr;
|
||||
addr.sun_family = AF_UNIX;
|
||||
strcpy(addr.sun_path, [socketPath UTF8String]);
|
||||
|
||||
unlink([socketPath UTF8String]);
|
||||
if (bind(fd, (sockaddr*)&addr, sizeof(addr)) < 0) {
|
||||
perror("ERROR: Binding to socket");
|
||||
}
|
||||
else {
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
dispatch_async(queue, ^{
|
||||
char buf[MAXPATHLEN + 16]; // Add 16 to hold the pid string
|
||||
struct sockaddr_un listen_addr;
|
||||
listen_addr.sun_family = AF_UNIX;
|
||||
strcpy(listen_addr.sun_path, [socketPath UTF8String]);
|
||||
socklen_t listen_addr_length;
|
||||
|
||||
while(true) {
|
||||
memset(buf, 0, sizeof(buf));
|
||||
if (recvfrom(fd, &buf, sizeof(buf), 0, (sockaddr *)&listen_addr, &listen_addr_length) < 0) {
|
||||
perror("ERROR: Receiving from socket");
|
||||
}
|
||||
else {
|
||||
NSArray *components = [[NSString stringWithUTF8String:buf] componentsSeparatedByString:@"\n"];
|
||||
NSString *path = [components objectAtIndex:0];
|
||||
NSNumber *pid = nil;
|
||||
if (components.count > 1) pid = [NSNumber numberWithInt:[[components objectAtIndex:1] intValue]];
|
||||
dispatch_queue_t mainQueue = dispatch_get_main_queue();
|
||||
dispatch_async(mainQueue, ^{
|
||||
[[AtomApplication sharedApplication] open:path pidToKillWhenWindowCloses:pid];
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void activateOpenApp() {
|
||||
for (NSRunningApplication *app in [[NSWorkspace sharedWorkspace] runningApplications]) {
|
||||
BOOL hasSameBundleId = [app.bundleIdentifier isEqualToString:[[NSBundle mainBundle] bundleIdentifier]];
|
||||
BOOL hasSameProcessesId = app.processIdentifier == [[NSProcessInfo processInfo] processIdentifier];
|
||||
if (hasSameBundleId && !hasSameProcessesId) {
|
||||
[app activateWithOptions:NSApplicationActivateIgnoringOtherApps];
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL isAppAlreadyOpen() {
|
||||
for (NSRunningApplication *app in [[NSWorkspace sharedWorkspace] runningApplications]) {
|
||||
BOOL hasSameBundleId = [app.bundleIdentifier isEqualToString:[[NSBundle mainBundle] bundleIdentifier]];
|
||||
BOOL hasSameProcessesId = app.processIdentifier == [[NSProcessInfo processInfo] processIdentifier];
|
||||
if (hasSameBundleId && !hasSameProcessesId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1,546 +0,0 @@
|
||||
// Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "cefclient/cefclient.h"
|
||||
#include <windows.h>
|
||||
#include <commdlg.h>
|
||||
#include <shellapi.h>
|
||||
#include <direct.h>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include "include/cef_app.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/cef_runnable.h"
|
||||
#include "cefclient/binding_test.h"
|
||||
#include "cefclient/client_handler.h"
|
||||
#include "cefclient/dom_test.h"
|
||||
#include "cefclient/resource.h"
|
||||
#include "cefclient/scheme_test.h"
|
||||
#include "cefclient/string_util.h"
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
#define MAX_URL_LENGTH 255
|
||||
#define BUTTON_WIDTH 72
|
||||
#define URLBAR_HEIGHT 24
|
||||
|
||||
// Global Variables:
|
||||
HINSTANCE hInst; // current instance
|
||||
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
|
||||
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
|
||||
char szWorkingDir[MAX_PATH]; // The current working directory
|
||||
|
||||
// Forward declarations of functions included in this code module:
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
// The global ClientHandler reference.
|
||||
extern CefRefPtr<ClientHandler> g_handler;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Add Common Controls to the application manifest because it's required to
|
||||
// support the default tooltip implementation.
|
||||
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") // NOLINT(whitespace/line_length)
|
||||
#endif
|
||||
|
||||
// Program entry point function.
|
||||
int APIENTRY wWinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPTSTR lpCmdLine,
|
||||
int nCmdShow) {
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
|
||||
CefMainArgs main_args(hInstance);
|
||||
CefRefPtr<ClientApp> app(new ClientApp);
|
||||
|
||||
// Execute the secondary process, if any.
|
||||
int exit_code = CefExecuteProcess(main_args, app.get());
|
||||
if (exit_code >= 0)
|
||||
return exit_code;
|
||||
|
||||
// Retrieve the current working directory.
|
||||
if (_getcwd(szWorkingDir, MAX_PATH) == NULL)
|
||||
szWorkingDir[0] = 0;
|
||||
|
||||
// Parse command line arguments. The passed in values are ignored on Windows.
|
||||
AppInitCommandLine(0, NULL);
|
||||
|
||||
CefSettings settings;
|
||||
|
||||
// Populate the settings based on command line arguments.
|
||||
AppGetSettings(settings, app);
|
||||
|
||||
// Initialize CEF.
|
||||
CefInitialize(main_args, settings, app.get());
|
||||
|
||||
// Register the scheme handler.
|
||||
scheme_test::InitTest();
|
||||
|
||||
HACCEL hAccelTable;
|
||||
|
||||
// Initialize global strings
|
||||
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
LoadString(hInstance, IDC_CEFCLIENT, szWindowClass, MAX_LOADSTRING);
|
||||
MyRegisterClass(hInstance);
|
||||
|
||||
// Perform application initialization
|
||||
if (!InitInstance (hInstance, nCmdShow))
|
||||
return FALSE;
|
||||
|
||||
hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_CEFCLIENT));
|
||||
|
||||
int result = 0;
|
||||
|
||||
if (!settings.multi_threaded_message_loop) {
|
||||
// Run the CEF message loop. This function will block until the application
|
||||
// recieves a WM_QUIT message.
|
||||
CefRunMessageLoop();
|
||||
} else {
|
||||
MSG msg;
|
||||
|
||||
// Run the application message loop.
|
||||
while (GetMessage(&msg, NULL, 0, 0)) {
|
||||
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
result = static_cast<int>(msg.wParam);
|
||||
}
|
||||
|
||||
// Shut down CEF.
|
||||
CefShutdown();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// FUNCTION: MyRegisterClass()
|
||||
//
|
||||
// PURPOSE: Registers the window class.
|
||||
//
|
||||
// COMMENTS:
|
||||
//
|
||||
// This function and its usage are only necessary if you want this code
|
||||
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
|
||||
// function that was added to Windows 95. It is important to call this
|
||||
// function so that the application will get 'well formed' small icons
|
||||
// associated with it.
|
||||
//
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance) {
|
||||
WNDCLASSEX wcex;
|
||||
|
||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
||||
|
||||
wcex.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wcex.lpfnWndProc = WndProc;
|
||||
wcex.cbClsExtra = 0;
|
||||
wcex.cbWndExtra = 0;
|
||||
wcex.hInstance = hInstance;
|
||||
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_CEFCLIENT));
|
||||
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
||||
wcex.lpszMenuName = MAKEINTRESOURCE(IDC_CEFCLIENT);
|
||||
wcex.lpszClassName = szWindowClass;
|
||||
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
|
||||
|
||||
return RegisterClassEx(&wcex);
|
||||
}
|
||||
|
||||
//
|
||||
// FUNCTION: InitInstance(HINSTANCE, int)
|
||||
//
|
||||
// PURPOSE: Saves instance handle and creates main window
|
||||
//
|
||||
// COMMENTS:
|
||||
//
|
||||
// In this function, we save the instance handle in a global variable and
|
||||
// create and display the main program window.
|
||||
//
|
||||
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) {
|
||||
HWND hWnd;
|
||||
|
||||
hInst = hInstance; // Store instance handle in our global variable
|
||||
|
||||
hWnd = CreateWindow(szWindowClass, szTitle,
|
||||
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, CW_USEDEFAULT, 0,
|
||||
CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
|
||||
|
||||
if (!hWnd)
|
||||
return FALSE;
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Change the zoom factor on the UI thread.
|
||||
static void ModifyZoom(CefRefPtr<CefBrowser> browser, double delta) {
|
||||
if (CefCurrentlyOn(TID_UI)) {
|
||||
browser->GetHost()->SetZoomLevel(
|
||||
browser->GetHost()->GetZoomLevel() + delta);
|
||||
} else {
|
||||
CefPostTask(TID_UI, NewCefRunnableFunction(ModifyZoom, browser, delta));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)
|
||||
//
|
||||
// PURPOSE: Processes messages for the main window.
|
||||
//
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
LPARAM lParam) {
|
||||
static HWND backWnd = NULL, forwardWnd = NULL, reloadWnd = NULL,
|
||||
stopWnd = NULL, editWnd = NULL;
|
||||
static WNDPROC editWndOldProc = NULL;
|
||||
|
||||
// Static members used for the find dialog.
|
||||
static FINDREPLACE fr;
|
||||
static WCHAR szFindWhat[80] = {0};
|
||||
static WCHAR szLastFindWhat[80] = {0};
|
||||
static bool findNext = false;
|
||||
static bool lastMatchCase = false;
|
||||
|
||||
int wmId, wmEvent;
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc;
|
||||
|
||||
if (hWnd == editWnd) {
|
||||
// Callback for the edit window
|
||||
switch (message) {
|
||||
case WM_CHAR:
|
||||
if (wParam == VK_RETURN && g_handler.get()) {
|
||||
// When the user hits the enter key load the URL
|
||||
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
|
||||
wchar_t strPtr[MAX_URL_LENGTH+1] = {0};
|
||||
*((LPWORD)strPtr) = MAX_URL_LENGTH;
|
||||
LRESULT strLen = SendMessage(hWnd, EM_GETLINE, 0, (LPARAM)strPtr);
|
||||
if (strLen > 0) {
|
||||
strPtr[strLen] = 0;
|
||||
browser->GetMainFrame()->LoadURL(strPtr);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return (LRESULT)CallWindowProc(editWndOldProc, hWnd, message, wParam,
|
||||
lParam);
|
||||
} else {
|
||||
// Callback for the main window
|
||||
switch (message) {
|
||||
case WM_CREATE: {
|
||||
// Create the single static handler class instance
|
||||
g_handler = new ClientHandler();
|
||||
g_handler->SetMainHwnd(hWnd);
|
||||
|
||||
// Create the child windows used for navigation
|
||||
RECT rect;
|
||||
int x = 0;
|
||||
|
||||
GetClientRect(hWnd, &rect);
|
||||
|
||||
backWnd = CreateWindow(L"BUTTON", L"Back",
|
||||
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON
|
||||
| WS_DISABLED, x, 0, BUTTON_WIDTH, URLBAR_HEIGHT,
|
||||
hWnd, (HMENU) IDC_NAV_BACK, hInst, 0);
|
||||
x += BUTTON_WIDTH;
|
||||
|
||||
forwardWnd = CreateWindow(L"BUTTON", L"Forward",
|
||||
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON
|
||||
| WS_DISABLED, x, 0, BUTTON_WIDTH,
|
||||
URLBAR_HEIGHT, hWnd, (HMENU) IDC_NAV_FORWARD,
|
||||
hInst, 0);
|
||||
x += BUTTON_WIDTH;
|
||||
|
||||
reloadWnd = CreateWindow(L"BUTTON", L"Reload",
|
||||
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON
|
||||
| WS_DISABLED, x, 0, BUTTON_WIDTH,
|
||||
URLBAR_HEIGHT, hWnd, (HMENU) IDC_NAV_RELOAD,
|
||||
hInst, 0);
|
||||
x += BUTTON_WIDTH;
|
||||
|
||||
stopWnd = CreateWindow(L"BUTTON", L"Stop",
|
||||
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON
|
||||
| WS_DISABLED, x, 0, BUTTON_WIDTH, URLBAR_HEIGHT,
|
||||
hWnd, (HMENU) IDC_NAV_STOP, hInst, 0);
|
||||
x += BUTTON_WIDTH;
|
||||
|
||||
editWnd = CreateWindow(L"EDIT", 0,
|
||||
WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT |
|
||||
ES_AUTOVSCROLL | ES_AUTOHSCROLL| WS_DISABLED,
|
||||
x, 0, rect.right - BUTTON_WIDTH * 4,
|
||||
URLBAR_HEIGHT, hWnd, 0, hInst, 0);
|
||||
|
||||
// Assign the edit window's WNDPROC to this function so that we can
|
||||
// capture the enter key
|
||||
editWndOldProc =
|
||||
reinterpret_cast<WNDPROC>(GetWindowLongPtr(editWnd, GWLP_WNDPROC));
|
||||
SetWindowLongPtr(editWnd, GWLP_WNDPROC,
|
||||
reinterpret_cast<LONG_PTR>(WndProc));
|
||||
g_handler->SetEditHwnd(editWnd);
|
||||
g_handler->SetButtonHwnds(backWnd, forwardWnd, reloadWnd, stopWnd);
|
||||
|
||||
rect.top += URLBAR_HEIGHT;
|
||||
|
||||
CefWindowInfo info;
|
||||
CefBrowserSettings settings;
|
||||
|
||||
// Populate the settings based on command line arguments.
|
||||
AppGetBrowserSettings(settings);
|
||||
|
||||
// Initialize window info to the defaults for a child window
|
||||
info.SetAsChild(hWnd, rect);
|
||||
|
||||
// Creat the new child browser window
|
||||
CefBrowserHost::CreateBrowser(info, g_handler.get(),
|
||||
g_handler->GetStartupURL(), settings);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
case WM_COMMAND: {
|
||||
CefRefPtr<CefBrowser> browser;
|
||||
if (g_handler.get())
|
||||
browser = g_handler->GetBrowser();
|
||||
|
||||
wmId = LOWORD(wParam);
|
||||
wmEvent = HIWORD(wParam);
|
||||
// Parse the menu selections:
|
||||
switch (wmId) {
|
||||
case IDM_ABOUT:
|
||||
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
|
||||
return 0;
|
||||
case IDM_EXIT:
|
||||
DestroyWindow(hWnd);
|
||||
return 0;
|
||||
case ID_WARN_CONSOLEMESSAGE:
|
||||
if (g_handler.get()) {
|
||||
std::wstringstream ss;
|
||||
ss << L"Console messages will be written to "
|
||||
<< std::wstring(CefString(g_handler->GetLogFile()));
|
||||
MessageBox(hWnd, ss.str().c_str(), L"Console Messages",
|
||||
MB_OK | MB_ICONINFORMATION);
|
||||
}
|
||||
return 0;
|
||||
case ID_WARN_DOWNLOADCOMPLETE:
|
||||
case ID_WARN_DOWNLOADERROR:
|
||||
if (g_handler.get()) {
|
||||
std::wstringstream ss;
|
||||
ss << L"File \"" <<
|
||||
std::wstring(CefString(g_handler->GetLastDownloadFile())) <<
|
||||
L"\" ";
|
||||
|
||||
if (wmId == ID_WARN_DOWNLOADCOMPLETE)
|
||||
ss << L"downloaded successfully.";
|
||||
else
|
||||
ss << L"failed to download.";
|
||||
|
||||
MessageBox(hWnd, ss.str().c_str(), L"File Download",
|
||||
MB_OK | MB_ICONINFORMATION);
|
||||
}
|
||||
return 0;
|
||||
case IDC_NAV_BACK: // Back button
|
||||
if (browser.get())
|
||||
browser->GoBack();
|
||||
return 0;
|
||||
case IDC_NAV_FORWARD: // Forward button
|
||||
if (browser.get())
|
||||
browser->GoForward();
|
||||
return 0;
|
||||
case IDC_NAV_RELOAD: // Reload button
|
||||
if (browser.get())
|
||||
browser->Reload();
|
||||
return 0;
|
||||
case IDC_NAV_STOP: // Stop button
|
||||
if (browser.get())
|
||||
browser->StopLoad();
|
||||
return 0;
|
||||
case ID_TESTS_GETSOURCE: // Test the GetSource function
|
||||
if (browser.get())
|
||||
RunGetSourceTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_GETTEXT: // Test the GetText function
|
||||
if (browser.get())
|
||||
RunGetTextTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_POPUP: // Test a popup window
|
||||
if (browser.get())
|
||||
RunPopupTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_REQUEST: // Test a request
|
||||
if (browser.get())
|
||||
RunRequestTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_SCHEME_HANDLER: // Test the scheme handler
|
||||
if (browser.get())
|
||||
scheme_test::RunTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_BINDING: // Test JavaScript binding
|
||||
if (browser.get())
|
||||
binding_test::RunTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_DIALOGS: // Test JavaScript dialogs
|
||||
if (browser.get())
|
||||
RunDialogTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_PLUGIN_INFO: // Test plugin info
|
||||
if (browser.get())
|
||||
RunPluginInfoTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_DOM_ACCESS: // Test DOM access
|
||||
if (browser.get())
|
||||
dom_test::RunTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_LOCALSTORAGE: // Test localStorage
|
||||
if (browser.get())
|
||||
RunLocalStorageTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_ACCELERATED2DCANVAS: // Test accelerated 2d canvas
|
||||
if (browser.get())
|
||||
RunAccelerated2DCanvasTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_ACCELERATEDLAYERS: // Test accelerated layers
|
||||
if (browser.get())
|
||||
RunAcceleratedLayersTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_WEBGL: // Test WebGL
|
||||
if (browser.get())
|
||||
RunWebGLTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_HTML5VIDEO: // Test HTML5 video
|
||||
if (browser.get())
|
||||
RunHTML5VideoTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_XMLHTTPREQUEST: // Test XMLHttpRequest
|
||||
if (browser.get())
|
||||
RunXMLHTTPRequestTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_DRAGDROP: // Test drag & drop
|
||||
if (browser.get())
|
||||
RunDragDropTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_GEOLOCATION: // Test geolocation
|
||||
if (browser.get())
|
||||
RunGeolocationTest(browser);
|
||||
return 0;
|
||||
case ID_TESTS_ZOOM_IN:
|
||||
if (browser.get())
|
||||
ModifyZoom(browser, 0.5);
|
||||
return 0;
|
||||
case ID_TESTS_ZOOM_OUT:
|
||||
if (browser.get())
|
||||
ModifyZoom(browser, -0.5);
|
||||
return 0;
|
||||
case ID_TESTS_ZOOM_RESET:
|
||||
if (browser.get())
|
||||
browser->GetHost()->SetZoomLevel(0.0);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_PAINT:
|
||||
hdc = BeginPaint(hWnd, &ps);
|
||||
EndPaint(hWnd, &ps);
|
||||
return 0;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
if (g_handler.get() && g_handler->GetBrowser()) {
|
||||
// Pass focus to the browser window
|
||||
CefWindowHandle hwnd =
|
||||
g_handler->GetBrowser()->GetHost()->GetWindowHandle();
|
||||
if (hwnd)
|
||||
PostMessage(hwnd, WM_SETFOCUS, wParam, NULL);
|
||||
}
|
||||
return 0;
|
||||
|
||||
case WM_SIZE:
|
||||
// Minimizing resizes the window to 0x0 which causes our layout to go all
|
||||
// screwy, so we just ignore it.
|
||||
if (wParam != SIZE_MINIMIZED && g_handler.get() &&
|
||||
g_handler->GetBrowser()) {
|
||||
CefWindowHandle hwnd =
|
||||
g_handler->GetBrowser()->GetHost()->GetWindowHandle();
|
||||
if (hwnd) {
|
||||
// Resize the browser window and address bar to match the new frame
|
||||
// window size
|
||||
RECT rect;
|
||||
GetClientRect(hWnd, &rect);
|
||||
rect.top += URLBAR_HEIGHT;
|
||||
|
||||
int urloffset = rect.left + BUTTON_WIDTH * 4;
|
||||
|
||||
HDWP hdwp = BeginDeferWindowPos(1);
|
||||
hdwp = DeferWindowPos(hdwp, editWnd, NULL, urloffset,
|
||||
0, rect.right - urloffset, URLBAR_HEIGHT, SWP_NOZORDER);
|
||||
hdwp = DeferWindowPos(hdwp, hwnd, NULL,
|
||||
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||
SWP_NOZORDER);
|
||||
EndDeferWindowPos(hdwp);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
if (g_handler.get() && g_handler->GetBrowser()) {
|
||||
CefWindowHandle hwnd =
|
||||
g_handler->GetBrowser()->GetHost()->GetWindowHandle();
|
||||
if (hwnd) {
|
||||
// Dont erase the background if the browser window has been loaded
|
||||
// (this avoids flashing)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
if (g_handler.get()) {
|
||||
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
|
||||
if (browser.get()) {
|
||||
// Let the browser window know we are about to destroy it.
|
||||
browser->GetHost()->ParentWindowWillClose();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
// The frame window has exited
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
// Message handler for about box.
|
||||
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
UNREFERENCED_PARAMETER(lParam);
|
||||
switch (message) {
|
||||
case WM_INITDIALOG:
|
||||
return (INT_PTR)TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {
|
||||
EndDialog(hDlg, LOWORD(wParam));
|
||||
return (INT_PTR)TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return (INT_PTR)FALSE;
|
||||
}
|
||||
|
||||
|
||||
// Global functions
|
||||
|
||||
std::string AppGetWorkingDirectory() {
|
||||
return szWorkingDir;
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
#include "include/cef_app.h"
|
||||
|
||||
class AtomCefClient;
|
||||
|
||||
@interface AtomWindowController : NSWindowController <NSWindowDelegate> {
|
||||
NSSplitView *_splitView;
|
||||
NSView *_devToolsView;
|
||||
NSView *_webView;
|
||||
NSButton *_devButton;
|
||||
NSString *_bootstrapScript;
|
||||
NSString *_resourcePath;
|
||||
NSString *_pathToOpen;
|
||||
NSNumber *_pidToKillOnClose;
|
||||
|
||||
CefRefPtr<AtomCefClient> _cefClient;
|
||||
CefRefPtr<AtomCefClient> _cefDevToolsClient;
|
||||
CefRefPtr<CefV8Context> _atomContext;
|
||||
|
||||
BOOL _runningSpecs;
|
||||
BOOL _exitWhenDone;
|
||||
BOOL _isConfig;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet NSSplitView *splitView;
|
||||
@property (nonatomic, retain) IBOutlet NSView *webView;
|
||||
@property (nonatomic, retain) IBOutlet NSView *devToolsView;
|
||||
@property (nonatomic, retain) NSString *pathToOpen;
|
||||
@property (nonatomic) BOOL isConfig;
|
||||
|
||||
- (id)initWithPath:(NSString *)path;
|
||||
- (id)initDevWithPath:(NSString *)path;
|
||||
- (id)initInBackground;
|
||||
- (id)initConfig;
|
||||
- (id)initSpecsThenExit:(BOOL)exitWhenDone;
|
||||
- (id)initBenchmarksThenExit:(BOOL)exitWhenDone;
|
||||
- (void)setPidToKillOnClose:(NSNumber *)pid;
|
||||
- (BOOL)isDevMode;
|
||||
|
||||
- (void)toggleDevTools;
|
||||
- (void)showDevTools;
|
||||
- (void)openPath:(NSString*)path;
|
||||
|
||||
@end
|
||||
@@ -1,346 +0,0 @@
|
||||
#import "include/cef_application_mac.h"
|
||||
#import "include/cef_client.h"
|
||||
#import "native/atom_cef_client.h"
|
||||
#import "native/atom_window_controller.h"
|
||||
#import "native/atom_application.h"
|
||||
#import <signal.h>
|
||||
|
||||
@implementation AtomWindowController
|
||||
|
||||
@synthesize splitView=_splitView;
|
||||
@synthesize webView=_webView;
|
||||
@synthesize devToolsView=_devToolsView;
|
||||
@synthesize pathToOpen=_pathToOpen;
|
||||
@synthesize isConfig=_isConfig;
|
||||
|
||||
- (void)dealloc {
|
||||
[_splitView release];
|
||||
[_devToolsView release];
|
||||
[_webView release];
|
||||
[_devButton release];
|
||||
[_bootstrapScript release];
|
||||
[_resourcePath release];
|
||||
[_pathToOpen release];
|
||||
|
||||
_cefClient = NULL;
|
||||
_cefDevToolsClient = NULL;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id)initWithBootstrapScript:(NSString *)bootstrapScript background:(BOOL)background useBundleResourcePath:(BOOL)useBundleResourcePath {
|
||||
self = [super initWithWindowNibName:@"AtomWindow"];
|
||||
_bootstrapScript = [bootstrapScript retain];
|
||||
|
||||
AtomApplication *atomApplication = (AtomApplication *)[AtomApplication sharedApplication];
|
||||
|
||||
if (useBundleResourcePath) {
|
||||
_resourcePath = [[NSBundle bundleForClass:self.class] resourcePath];
|
||||
}
|
||||
else {
|
||||
_resourcePath = [[atomApplication.arguments objectForKey:@"resource-path"] stringByStandardizingPath];
|
||||
if (!_resourcePath) {
|
||||
NSString *defaultRepositoryPath = [@"~/github/atom" stringByStandardizingPath];
|
||||
if ([defaultRepositoryPath characterAtIndex:0] == '/') {
|
||||
BOOL isDir = false;
|
||||
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:defaultRepositoryPath isDirectory:&isDir];
|
||||
if (isDir && exists) {
|
||||
_resourcePath = defaultRepositoryPath;
|
||||
}
|
||||
else {
|
||||
NSLog(@"Warning: No resource path specified and no directory exists at ~/github/atom");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ([self isDevMode]) {
|
||||
[self displayDevIcon];
|
||||
}
|
||||
|
||||
_resourcePath = [_resourcePath stringByStandardizingPath];
|
||||
[_resourcePath retain];
|
||||
|
||||
NSMutableArray *paths = [NSMutableArray arrayWithObjects:
|
||||
@"src/stdlib",
|
||||
@"src/app",
|
||||
@"src/packages",
|
||||
@"src",
|
||||
@"vendor",
|
||||
@"static",
|
||||
@"node_modules",
|
||||
nil];
|
||||
NSMutableArray *resourcePaths = [[NSMutableArray alloc] init];
|
||||
|
||||
if (_runningSpecs) {
|
||||
[paths insertObject:@"benchmark" atIndex:0];
|
||||
[paths insertObject:@"spec" atIndex:0];
|
||||
NSString *fixturePackagesDirectory = [NSString stringWithFormat:@"%@/spec/fixtures/packages", _resourcePath];
|
||||
[resourcePaths addObject:fixturePackagesDirectory];
|
||||
}
|
||||
|
||||
NSString *userPackagesDirectory = [@"~/.atom/packages" stringByStandardizingPath];
|
||||
[resourcePaths addObject:userPackagesDirectory];
|
||||
|
||||
for (int i = 0; i < paths.count; i++) {
|
||||
NSString *fullPath = [NSString stringWithFormat:@"%@/%@", _resourcePath, [paths objectAtIndex:i]];
|
||||
[resourcePaths addObject:fullPath];
|
||||
}
|
||||
[resourcePaths addObject:_resourcePath];
|
||||
|
||||
NSString *nodePath = [resourcePaths componentsJoinedByString:@":"];
|
||||
setenv("NODE_PATH", [nodePath UTF8String], TRUE);
|
||||
|
||||
if (!background) {
|
||||
[self setShouldCascadeWindows:NO];
|
||||
[self setWindowFrameAutosaveName:@"AtomWindow"];
|
||||
NSColor *background = [NSColor colorWithDeviceRed:(51.0/255.0) green:(51.0/255.0f) blue:(51.0/255.0f) alpha:1.0];
|
||||
[self.window setBackgroundColor:background];
|
||||
if (self.isConfig) {
|
||||
NSRect frame = self.window.frame;
|
||||
frame.size.width = 800;
|
||||
frame.size.height = 600;
|
||||
[self.window setFrame:frame display: YES];
|
||||
}
|
||||
[self showWindow:self];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithPath:(NSString *)path {
|
||||
_pathToOpen = [path retain];
|
||||
return [self initWithBootstrapScript:@"window-bootstrap" background:NO useBundleResourcePath:![self isDevMode]];
|
||||
}
|
||||
|
||||
- (id)initDevWithPath:(NSString *)path {
|
||||
_pathToOpen = [path retain];
|
||||
return [self initWithBootstrapScript:@"window-bootstrap" background:NO useBundleResourcePath:false];
|
||||
}
|
||||
|
||||
- (id)initInBackground {
|
||||
[self initWithBootstrapScript:@"window-bootstrap" background:YES useBundleResourcePath:![self isDevMode]];
|
||||
[self.window setFrame:NSMakeRect(0, 0, 0, 0) display:NO];
|
||||
[self.window setExcludedFromWindowsMenu:YES];
|
||||
[self.window setCollectionBehavior:NSWindowCollectionBehaviorStationary];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initSpecsThenExit:(BOOL)exitWhenDone {
|
||||
_runningSpecs = true;
|
||||
_exitWhenDone = exitWhenDone;
|
||||
return [self initWithBootstrapScript:@"spec-bootstrap" background:NO useBundleResourcePath:NO];
|
||||
}
|
||||
|
||||
- (id)initBenchmarksThenExit:(BOOL)exitWhenDone {
|
||||
_runningSpecs = true;
|
||||
_exitWhenDone = exitWhenDone;
|
||||
return [self initWithBootstrapScript:@"benchmark-bootstrap" background:NO useBundleResourcePath:NO];
|
||||
}
|
||||
|
||||
- (id)initConfig {
|
||||
_isConfig = true;
|
||||
return [self initWithBootstrapScript:@"config-bootstrap" background:NO useBundleResourcePath:![self isDevMode]];
|
||||
}
|
||||
|
||||
- (void)addBrowserToView:(NSView *)view url:(const char *)url cefHandler:(CefRefPtr<AtomCefClient>)cefClient {
|
||||
CefBrowserSettings settings;
|
||||
[self populateBrowserSettings:settings];
|
||||
CefWindowInfo window_info;
|
||||
window_info.SetAsChild(view, 0, 0, view.bounds.size.width, view.bounds.size.height);
|
||||
CefBrowserHost::CreateBrowser(window_info, cefClient.get(), url, settings);
|
||||
}
|
||||
|
||||
- (NSString *)encodeUrlParam:(NSString *)param {
|
||||
param = [param stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
param = [param stringByReplacingOccurrencesOfString:@"&" withString:@"%26"];
|
||||
return param;
|
||||
}
|
||||
|
||||
- (void)windowDidLoad {
|
||||
[self.window setDelegate:self];
|
||||
[self performSelector:@selector(attachWebView) withObject:nil afterDelay:0];
|
||||
}
|
||||
|
||||
// If this is run directly in windowDidLoad, the web view doesn't
|
||||
// have the correct initial size based on the frame's last stored size.
|
||||
// HACK: I hate this and want to place this code directly in windowDidLoad
|
||||
- (void)attachWebView {
|
||||
NSMutableString *urlString = [NSMutableString string];
|
||||
|
||||
NSURL *indexUrl = [[NSURL alloc] initFileURLWithPath:[_resourcePath stringByAppendingPathComponent:@"static/index.html"]];
|
||||
[urlString appendString:[indexUrl absoluteString]];
|
||||
[urlString appendFormat:@"?bootstrapScript=%@", [self encodeUrlParam:_bootstrapScript]];
|
||||
[urlString appendFormat:@"&resourcePath=%@", [self encodeUrlParam:_resourcePath]];
|
||||
if ([self isDevMode])
|
||||
[urlString appendFormat:@"&devMode=1"];
|
||||
if (_exitWhenDone)
|
||||
[urlString appendString:@"&exitWhenDone=1"];
|
||||
if (_pathToOpen)
|
||||
[urlString appendFormat:@"&pathToOpen=%@", [self encodeUrlParam:_pathToOpen]];
|
||||
|
||||
_cefClient = new AtomCefClient();
|
||||
[self.webView setHidden:YES];
|
||||
[self addBrowserToView:self.webView url:[urlString UTF8String] cefHandler:_cefClient];
|
||||
}
|
||||
|
||||
- (BOOL)isBrowserUsable {
|
||||
return _cefClient && !_cefClient->IsClosed() && _cefClient->GetBrowser();
|
||||
}
|
||||
|
||||
- (void)toggleDevTools {
|
||||
if (_devToolsView) {
|
||||
[self hideDevTools];
|
||||
}
|
||||
else {
|
||||
[self showDevTools];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)showDevTools {
|
||||
if (_devToolsView) return;
|
||||
if (![self isBrowserUsable]) return;
|
||||
|
||||
NSRect webViewFrame = _webView.frame;
|
||||
NSRect devToolsViewFrame = _webView.frame;
|
||||
devToolsViewFrame.size.height = NSHeight(webViewFrame) / 3;
|
||||
webViewFrame.size.height = NSHeight(webViewFrame) - NSHeight(devToolsViewFrame);
|
||||
[_webView setFrame:webViewFrame];
|
||||
_devToolsView = [[NSView alloc] initWithFrame:devToolsViewFrame];
|
||||
|
||||
[_splitView addSubview:_devToolsView];
|
||||
[_splitView adjustSubviews];
|
||||
|
||||
_cefDevToolsClient = new AtomCefClient(true, true);
|
||||
std::string devtools_url = _cefClient->GetBrowser()->GetHost()->GetDevToolsURL(true);
|
||||
[self addBrowserToView:_devToolsView url:devtools_url.c_str() cefHandler:_cefDevToolsClient];
|
||||
}
|
||||
|
||||
- (void)hideDevTools {
|
||||
[_devToolsView removeFromSuperview];
|
||||
[_splitView adjustSubviews];
|
||||
[_devToolsView release];
|
||||
_devToolsView = nil;
|
||||
_cefDevToolsClient = NULL;
|
||||
if ([self isBrowserUsable]) {
|
||||
_cefClient->GetBrowser()->GetHost()->SetFocus(true);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)openPath:(NSString*)path {
|
||||
if (![self isBrowserUsable]) return;
|
||||
|
||||
CefRefPtr<CefProcessMessage> openMessage = CefProcessMessage::Create("openPath");
|
||||
CefRefPtr<CefListValue> openArguments = openMessage->GetArgumentList();
|
||||
openArguments->SetSize(1);
|
||||
openArguments->SetString(0, [path UTF8String]);
|
||||
_cefClient->GetBrowser()->SendProcessMessage(PID_RENDERER, openMessage);
|
||||
}
|
||||
|
||||
- (void)setPidToKillOnClose:(NSNumber *)pid {
|
||||
_pidToKillOnClose = [pid retain];
|
||||
}
|
||||
|
||||
# pragma mark NSWindowDelegate
|
||||
|
||||
|
||||
- (void)windowDidResignMain:(NSNotification *)notification {
|
||||
if (!_runningSpecs) {
|
||||
[self.window makeFirstResponder:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidBecomeMain:(NSNotification *)notification {
|
||||
if ([self isBrowserUsable]) {
|
||||
_cefClient->GetBrowser()->GetHost()->SetFocus(true);
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)windowShouldClose:(NSNotification *)notification {
|
||||
if ([self isBrowserUsable]) {
|
||||
_cefClient->GetBrowser()->GetHost()->CloseBrowser(false);
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (_pidToKillOnClose) kill([_pidToKillOnClose intValue], SIGQUIT);
|
||||
|
||||
[self autorelease];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)windowWillEnterFullScreen:(NSNotification *)notification {
|
||||
if (_devButton)
|
||||
[_devButton setHidden:YES];
|
||||
}
|
||||
|
||||
- (void)windowDidExitFullScreen:(NSNotification *)notification {
|
||||
if (_devButton)
|
||||
[_devButton setHidden:NO];
|
||||
}
|
||||
|
||||
- (BOOL)isDevMode {
|
||||
NSString *bundleResourcePath = [[NSBundle bundleForClass:self.class] resourcePath];
|
||||
return ![_resourcePath isEqualToString:bundleResourcePath];
|
||||
}
|
||||
|
||||
- (void)displayDevIcon {
|
||||
NSView *themeFrame = [self.window.contentView superview];
|
||||
NSButton *fullScreenButton = nil;
|
||||
for (NSView *view in themeFrame.subviews) {
|
||||
if (![view isKindOfClass:NSButton.class]) continue;
|
||||
NSButton *button = (NSButton *)view;
|
||||
if (button.action != @selector(toggleFullScreen:)) continue;
|
||||
fullScreenButton = button;
|
||||
break;
|
||||
}
|
||||
|
||||
_devButton = [[NSButton alloc] init];
|
||||
[_devButton setTitle:@"\xF0\x9F\x92\x80"];
|
||||
_devButton.autoresizingMask = NSViewMinXMargin | NSViewMinYMargin;
|
||||
_devButton.buttonType = NSMomentaryChangeButton;
|
||||
_devButton.bordered = NO;
|
||||
[_devButton sizeToFit];
|
||||
_devButton.frame = NSMakeRect(fullScreenButton.frame.origin.x - _devButton.frame.size.width - 5, fullScreenButton.frame.origin.y, _devButton.frame.size.width, _devButton.frame.size.height);
|
||||
|
||||
[[self.window.contentView superview] addSubview:_devButton];
|
||||
}
|
||||
|
||||
- (void)populateBrowserSettings:(CefBrowserSettings &)settings {
|
||||
CefString(&settings.default_encoding) = "UTF-8";
|
||||
settings.remote_fonts = STATE_ENABLED;
|
||||
settings.javascript = STATE_ENABLED;
|
||||
settings.javascript_open_windows = STATE_ENABLED;
|
||||
settings.javascript_close_windows = STATE_ENABLED;
|
||||
settings.javascript_access_clipboard = STATE_ENABLED;
|
||||
settings.javascript_dom_paste = STATE_DISABLED;
|
||||
settings.caret_browsing = STATE_DISABLED;
|
||||
settings.java = STATE_DISABLED;
|
||||
settings.plugins = STATE_DISABLED;
|
||||
settings.universal_access_from_file_urls = STATE_DISABLED;
|
||||
settings.file_access_from_file_urls = STATE_DISABLED;
|
||||
settings.web_security = STATE_DISABLED;
|
||||
settings.image_loading = STATE_ENABLED;
|
||||
settings.image_shrink_standalone_to_fit = STATE_DISABLED;
|
||||
settings.text_area_resize = STATE_ENABLED;
|
||||
settings.page_cache = STATE_DISABLED;
|
||||
settings.tab_to_links = STATE_DISABLED;
|
||||
settings.author_and_user_styles = STATE_ENABLED;
|
||||
settings.local_storage = STATE_ENABLED;
|
||||
settings.databases = STATE_ENABLED;
|
||||
settings.application_cache = STATE_ENABLED;
|
||||
settings.webgl = STATE_ENABLED;
|
||||
settings.accelerated_compositing = STATE_ENABLED;
|
||||
settings.developer_tools = STATE_ENABLED;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface GraySplitView : NSSplitView
|
||||
- (NSColor*)dividerColor;
|
||||
@end
|
||||
|
||||
@implementation GraySplitView
|
||||
- (NSColor*)dividerColor {
|
||||
return [NSColor darkGrayColor];
|
||||
}
|
||||
@end
|
||||
@@ -1 +0,0 @@
|
||||
Versions/Current/Headers
|
||||
@@ -1 +0,0 @@
|
||||
Versions/Current/Quincy
|
||||
@@ -1 +0,0 @@
|
||||
Versions/Current/Resources
|
||||
@@ -1,169 +0,0 @@
|
||||
/*
|
||||
* Author: Andreas Linde <mail@andreaslinde.de>
|
||||
* Kent Sutherland
|
||||
*
|
||||
* Copyright (c) 2011 Andreas Linde & Kent Sutherland.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
typedef enum CrashAlertType {
|
||||
CrashAlertTypeSend = 0,
|
||||
CrashAlertTypeFeedback = 1,
|
||||
} CrashAlertType;
|
||||
|
||||
typedef enum CrashReportStatus {
|
||||
// This app version is set to discontinued, no new crash reports accepted by the server
|
||||
CrashReportStatusFailureVersionDiscontinued = -30,
|
||||
|
||||
// XML: Sender ersion string contains not allowed characters, only alphanumberical including space and . are allowed
|
||||
CrashReportStatusFailureXMLSenderVersionNotAllowed = -21,
|
||||
|
||||
// XML: Version string contains not allowed characters, only alphanumberical including space and . are allowed
|
||||
CrashReportStatusFailureXMLVersionNotAllowed = -20,
|
||||
|
||||
// SQL for adding a symoblicate todo entry in the database failed
|
||||
CrashReportStatusFailureSQLAddSymbolicateTodo = -18,
|
||||
|
||||
// SQL for adding crash log in the database failed
|
||||
CrashReportStatusFailureSQLAddCrashlog = -17,
|
||||
|
||||
// SQL for adding a new version in the database failed
|
||||
CrashReportStatusFailureSQLAddVersion = -16,
|
||||
|
||||
// SQL for checking if the version is already added in the database failed
|
||||
CrashReportStatusFailureSQLCheckVersionExists = -15,
|
||||
|
||||
// SQL for creating a new pattern for this bug and set amount of occurrances to 1 in the database failed
|
||||
CrashReportStatusFailureSQLAddPattern = -14,
|
||||
|
||||
// SQL for checking the status of the bugfix version in the database failed
|
||||
CrashReportStatusFailureSQLCheckBugfixStatus = -13,
|
||||
|
||||
// SQL for updating the occurances of this pattern in the database failed
|
||||
CrashReportStatusFailureSQLUpdatePatternOccurances = -12,
|
||||
|
||||
// SQL for getting all the known bug patterns for the current app version in the database failed
|
||||
CrashReportStatusFailureSQLFindKnownPatterns = -11,
|
||||
|
||||
// SQL for finding the bundle identifier in the database failed
|
||||
CrashReportStatusFailureSQLSearchAppName = -10,
|
||||
|
||||
// the post request didn't contain valid data
|
||||
CrashReportStatusFailureInvalidPostData = -3,
|
||||
|
||||
// incoming data may not be added, because e.g. bundle identifier wasn't found
|
||||
CrashReportStatusFailureInvalidIncomingData = -2,
|
||||
|
||||
// database cannot be accessed, check hostname, username, password and database name settings in config.php
|
||||
CrashReportStatusFailureDatabaseNotAvailable = -1,
|
||||
|
||||
CrashReportStatusUnknown = 0,
|
||||
|
||||
CrashReportStatusAssigned = 1,
|
||||
|
||||
CrashReportStatusSubmitted = 2,
|
||||
|
||||
CrashReportStatusAvailable = 3,
|
||||
} CrashReportStatus;
|
||||
|
||||
|
||||
@class BWQuincyUI;
|
||||
|
||||
@protocol BWQuincyManagerDelegate <NSObject>
|
||||
|
||||
@required
|
||||
|
||||
// Invoked once the modal sheets are gone
|
||||
- (void) showMainApplicationWindow;
|
||||
|
||||
@optional
|
||||
|
||||
// Return the description the crashreport should contain, empty by default. The string will automatically be wrapped into <[DATA[ ]]>, so make sure you don't do that in your string.
|
||||
-(NSString *) crashReportDescription;
|
||||
|
||||
// Return the userid the crashreport should contain, empty by default
|
||||
-(NSString *) crashReportUserID;
|
||||
|
||||
// Return the contact value (e.g. email) the crashreport should contain, empty by default
|
||||
-(NSString *) crashReportContact;
|
||||
@end
|
||||
|
||||
|
||||
@interface BWQuincyManager : NSObject
|
||||
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
|
||||
<NSXMLParserDelegate>
|
||||
#endif
|
||||
{
|
||||
CrashReportStatus _serverResult;
|
||||
NSInteger _statusCode;
|
||||
|
||||
NSMutableString *_contentOfProperty;
|
||||
|
||||
id<BWQuincyManagerDelegate> _delegate;
|
||||
|
||||
NSString *_submissionURL;
|
||||
NSString *_companyName;
|
||||
NSString *_appIdentifier;
|
||||
BOOL _autoSubmitCrashReport;
|
||||
|
||||
NSString *_crashFile;
|
||||
|
||||
BWQuincyUI *_quincyUI;
|
||||
}
|
||||
|
||||
- (NSString*) modelVersion;
|
||||
|
||||
+ (BWQuincyManager *)sharedQuincyManager;
|
||||
|
||||
// submission URL defines where to send the crash reports to (required)
|
||||
@property (nonatomic, retain) NSString *submissionURL;
|
||||
|
||||
// defines the company name to be shown in the crash reporting dialog
|
||||
@property (nonatomic, retain) NSString *companyName;
|
||||
|
||||
// delegate is required
|
||||
@property (nonatomic, assign) id <BWQuincyManagerDelegate> delegate;
|
||||
|
||||
// if YES, the crash report will be submitted without asking the user
|
||||
// if NO, the user will be asked if the crash report can be submitted (default)
|
||||
@property (nonatomic, assign, getter=isAutoSubmitCrashReport) BOOL autoSubmitCrashReport;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// settings
|
||||
|
||||
// If you want to use HockeyApp instead of your own server, this is required
|
||||
@property (nonatomic, retain) NSString *appIdentifier;
|
||||
|
||||
|
||||
- (void) cancelReport;
|
||||
- (void) sendReportCrash:(NSString*)crashContent
|
||||
description:(NSString*)description;
|
||||
|
||||
- (NSString *) applicationName;
|
||||
- (NSString *) applicationVersionString;
|
||||
- (NSString *) applicationVersion;
|
||||
|
||||
@end
|
||||
Arquivo binário não exibido.
Arquivo binário não exibido.
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>12D78</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Quincy</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>de.buzzworks.Quincy</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>DTCompiler</key>
|
||||
<string></string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>4H512</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>12D75</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.8</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0461</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>4H512</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1 +0,0 @@
|
||||
A
|
||||
@@ -1 +0,0 @@
|
||||
Versions/Current/Headers
|
||||
@@ -1 +0,0 @@
|
||||
Versions/Current/Resources
|
||||
@@ -1 +0,0 @@
|
||||
Versions/Current/Sparkle
|
||||
@@ -1,36 +0,0 @@
|
||||
//
|
||||
// SUAppcast.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 3/12/06.
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUAPPCAST_H
|
||||
#define SUAPPCAST_H
|
||||
|
||||
@class SUAppcastItem;
|
||||
@interface SUAppcast : NSObject
|
||||
{
|
||||
@private
|
||||
NSArray *items;
|
||||
NSString *userAgentString;
|
||||
id delegate;
|
||||
NSString *downloadFilename;
|
||||
NSURLDownload *download;
|
||||
}
|
||||
|
||||
- (void)fetchAppcastFromURL:(NSURL *)url;
|
||||
- (void)setDelegate:delegate;
|
||||
- (void)setUserAgentString:(NSString *)userAgentString;
|
||||
|
||||
- (NSArray *)items;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSObject (SUAppcastDelegate)
|
||||
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
|
||||
- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
|
||||
@end
|
||||
|
||||
#endif
|
||||
@@ -1,61 +0,0 @@
|
||||
//
|
||||
// SUAppcastItem.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 3/12/06.
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUAPPCASTITEM_H
|
||||
#define SUAPPCASTITEM_H
|
||||
|
||||
@interface SUAppcastItem : NSObject
|
||||
{
|
||||
@private
|
||||
NSString *title;
|
||||
NSDate *date;
|
||||
NSString *itemDescription;
|
||||
|
||||
NSURL *releaseNotesURL;
|
||||
|
||||
NSString *DSASignature;
|
||||
NSString *minimumSystemVersion;
|
||||
NSString *maximumSystemVersion;
|
||||
|
||||
NSURL *fileURL;
|
||||
NSString *versionString;
|
||||
NSString *displayVersionString;
|
||||
|
||||
NSDictionary *deltaUpdates;
|
||||
|
||||
NSDictionary *propertiesDictionary;
|
||||
|
||||
NSURL *infoURL; // UK 2007-08-31
|
||||
}
|
||||
|
||||
// Initializes with data from a dictionary provided by the RSS class.
|
||||
- initWithDictionary:(NSDictionary *)dict;
|
||||
- initWithDictionary:(NSDictionary *)dict failureReason:(NSString**)error;
|
||||
|
||||
- (NSString *)title;
|
||||
- (NSString *)versionString;
|
||||
- (NSString *)displayVersionString;
|
||||
- (NSDate *)date;
|
||||
- (NSString *)itemDescription;
|
||||
- (NSURL *)releaseNotesURL;
|
||||
- (NSURL *)fileURL;
|
||||
- (NSString *)DSASignature;
|
||||
- (NSString *)minimumSystemVersion;
|
||||
- (NSString *)maximumSystemVersion;
|
||||
- (NSDictionary *)deltaUpdates;
|
||||
- (BOOL)isDeltaUpdate;
|
||||
- (BOOL)isCriticalUpdate;
|
||||
|
||||
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
|
||||
- (NSDictionary *)propertiesDictionary;
|
||||
|
||||
- (NSURL *)infoURL; // UK 2007-08-31
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
@@ -1,169 +0,0 @@
|
||||
//
|
||||
// SUUpdater.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 1/4/06.
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUUPDATER_H
|
||||
#define SUUPDATER_H
|
||||
|
||||
#import "SUVersionComparisonProtocol.h"
|
||||
#import "SUVersionDisplayProtocol.h"
|
||||
|
||||
@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
|
||||
|
||||
@interface SUUpdater : NSObject
|
||||
{
|
||||
@private
|
||||
NSTimer *checkTimer;
|
||||
SUUpdateDriver *driver;
|
||||
|
||||
NSString *customUserAgentString;
|
||||
SUHost *host;
|
||||
IBOutlet id delegate;
|
||||
}
|
||||
|
||||
+ (SUUpdater *)sharedUpdater;
|
||||
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
|
||||
- initForBundle:(NSBundle *)bundle;
|
||||
|
||||
- (NSBundle *)hostBundle;
|
||||
|
||||
- (void)setDelegate:(id)delegate;
|
||||
- delegate;
|
||||
|
||||
- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyChecks;
|
||||
- (BOOL)automaticallyChecksForUpdates;
|
||||
|
||||
- (void)setUpdateCheckInterval:(NSTimeInterval)interval;
|
||||
- (NSTimeInterval)updateCheckInterval;
|
||||
|
||||
- (void)setFeedURL:(NSURL *)feedURL;
|
||||
- (NSURL *)feedURL; // *** MUST BE CALLED ON MAIN THREAD ***
|
||||
|
||||
- (void)setUserAgentString:(NSString *)userAgent;
|
||||
- (NSString *)userAgentString;
|
||||
|
||||
- (void)setSendsSystemProfile:(BOOL)sendsSystemProfile;
|
||||
- (BOOL)sendsSystemProfile;
|
||||
|
||||
- (void)setAutomaticallyDownloadsUpdates:(BOOL)automaticallyDownloadsUpdates;
|
||||
- (BOOL)automaticallyDownloadsUpdates;
|
||||
|
||||
// This IBAction is meant for a main menu item. Hook up any menu item to this action,
|
||||
// and Sparkle will check for updates and report back its findings verbosely.
|
||||
- (IBAction)checkForUpdates:(id)sender;
|
||||
|
||||
// This kicks off an update meant to be programmatically initiated. That is, it will display no UI unless it actually finds an update,
|
||||
// in which case it proceeds as usual. If the fully automated updating is turned on, however, this will invoke that behavior, and if an
|
||||
// update is found, it will be downloaded and prepped for installation.
|
||||
- (void)checkForUpdatesInBackground;
|
||||
|
||||
// Date of last update check. Returns nil if no check has been performed.
|
||||
- (NSDate*)lastUpdateCheckDate;
|
||||
|
||||
// This begins a "probing" check for updates which will not actually offer to update to that version. The delegate methods, though,
|
||||
// (up to updater:didFindValidUpdate: and updaterDidNotFindUpdate:), are called, so you can use that information in your UI.
|
||||
- (void)checkForUpdateInformation;
|
||||
|
||||
// Call this to appropriately schedule or cancel the update checking timer according to the preferences for time interval and automatic checks. This call does not change the date of the next check, but only the internal NSTimer.
|
||||
- (void)resetUpdateCycle;
|
||||
|
||||
- (BOOL)updateInProgress;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// SUUpdater Delegate:
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@interface NSObject (SUUpdaterDelegateInformalProtocol)
|
||||
|
||||
// Use this to keep Sparkle from popping up e.g. while your setup assistant is showing:
|
||||
- (BOOL)updaterMayCheckForUpdates:(SUUpdater *)bundle;
|
||||
|
||||
// This method allows you to add extra parameters to the appcast URL, potentially based on whether or not Sparkle will also be sending along the system profile. This method should return an array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user.
|
||||
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
|
||||
|
||||
// Override this to dynamically specify the entire URL.
|
||||
- (NSString*)feedURLStringForUpdater:(SUUpdater*)updater;
|
||||
|
||||
// Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
|
||||
- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle;
|
||||
|
||||
// Implement this if you want to do some special handling with the appcast once it finishes loading.
|
||||
- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast;
|
||||
|
||||
// If you're using special logic or extensions in your appcast, implement this to use your own logic for finding
|
||||
// a valid update, if any, in the given appcast.
|
||||
- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)bundle;
|
||||
|
||||
// Sent when a valid update is found by the update driver.
|
||||
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update;
|
||||
|
||||
// Sent when a valid update is not found.
|
||||
- (void)updaterDidNotFindUpdate:(SUUpdater *)update;
|
||||
|
||||
// Sent immediately before extracting the specified update.
|
||||
- (void)updater:(SUUpdater *)updater willExtractUpdate:(SUAppcastItem *)update;
|
||||
|
||||
// Sent immediately before installing the specified update.
|
||||
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
|
||||
|
||||
// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
|
||||
// This is not called if the user didn't relaunch on the previous update, in that case it will immediately
|
||||
// restart.
|
||||
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
|
||||
|
||||
// Some apps *can not* be relaunched in certain circumstances. They can use this method
|
||||
// to prevent a relaunch "hard":
|
||||
- (BOOL)updaterShouldRelaunchApplication:(SUUpdater *)updater;
|
||||
|
||||
// Called immediately before relaunching.
|
||||
- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
|
||||
|
||||
// This method allows you to provide a custom version comparator.
|
||||
// If you don't implement this method or return nil, the standard version comparator will be used.
|
||||
- (id <SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
|
||||
|
||||
// This method allows you to provide a custom version comparator.
|
||||
// If you don't implement this method or return nil, the standard version displayer will be used.
|
||||
- (id <SUVersionDisplay>)versionDisplayerForUpdater:(SUUpdater *)updater;
|
||||
|
||||
// Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle.
|
||||
- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
|
||||
|
||||
// Called before and after, respectively, an updater shows a modal alert window, to give the host
|
||||
// the opportunity to hide attached windows etc. that may get in the way:
|
||||
-(void) updaterWillShowModalAlert:(SUUpdater *)updater;
|
||||
-(void) updaterDidShowModalAlert:(SUUpdater *)updater;
|
||||
|
||||
// Called when an update is scheduled to be silently installed on quit.
|
||||
// The invocation can be used to trigger an immediate silent install and relaunch.
|
||||
- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)update immediateInstallationInvocation:(NSInvocation *)invocation;
|
||||
- (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)update;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constants:
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
|
||||
#if defined(DEBUG) && DEBUG && 0
|
||||
#define SU_MIN_CHECK_INTERVAL 60
|
||||
#else
|
||||
#define SU_MIN_CHECK_INTERVAL 60*60
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG) && DEBUG && 0
|
||||
#define SU_DEFAULT_CHECK_INTERVAL 60
|
||||
#else
|
||||
#define SU_DEFAULT_CHECK_INTERVAL 60*60*24
|
||||
#endif
|
||||
|
||||
#endif
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// SUVersionComparisonProtocol.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 12/21/07.
|
||||
// Copyright 2007 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
|
||||
#define SUVERSIONCOMPARISONPROTOCOL_H
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
/*!
|
||||
@protocol
|
||||
@abstract Implement this protocol to provide version comparison facilities for Sparkle.
|
||||
*/
|
||||
@protocol SUVersionComparison
|
||||
|
||||
/*!
|
||||
@method
|
||||
@abstract An abstract method to compare two version strings.
|
||||
@discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent.
|
||||
*/
|
||||
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; // *** MAY BE CALLED ON NON-MAIN THREAD!
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
@@ -1,27 +0,0 @@
|
||||
//
|
||||
// SUVersionDisplayProtocol.h
|
||||
// EyeTV
|
||||
//
|
||||
// Created by Uli Kusterer on 08.12.09.
|
||||
// Copyright 2009 Elgato Systems GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
/*!
|
||||
@protocol
|
||||
@abstract Implement this protocol to apply special formatting to the two
|
||||
version numbers.
|
||||
*/
|
||||
@protocol SUVersionDisplay
|
||||
|
||||
/*!
|
||||
@method
|
||||
@abstract An abstract method to format two version strings.
|
||||
@discussion You get both so you can display important distinguishing
|
||||
information, but leave out unnecessary/confusing parts.
|
||||
*/
|
||||
-(void) formatVersion: (NSString**)inOutVersionA andVersion: (NSString**)inOutVersionB;
|
||||
|
||||
@end
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// Sparkle.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SPARKLE_H
|
||||
#define SPARKLE_H
|
||||
|
||||
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
|
||||
// there are name-space collisions) so we can list all of them to start with:
|
||||
|
||||
#import <Sparkle/SUUpdater.h>
|
||||
|
||||
#import <Sparkle/SUAppcast.h>
|
||||
#import <Sparkle/SUAppcastItem.h>
|
||||
#import <Sparkle/SUVersionComparisonProtocol.h>
|
||||
|
||||
#endif
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>12C60</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Sparkle</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.andymatuschak.Sparkle</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Sparkle</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.5 Beta (git)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>4abc126</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>4G2008a</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>11E52</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.7</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0452</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>4G2008a</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,38 +0,0 @@
|
||||
Copyright (c) 2006 Andy Matuschak
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
=================
|
||||
EXTERNAL LICENSES
|
||||
=================
|
||||
|
||||
License for bspatch.c and bsdiff.c, from bsdiff 4.3 (<http://www.daemonology.net/bsdiff/>:
|
||||
/*-
|
||||
* Copyright 2003-2005 Colin Percival
|
||||
* All rights reserved
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted providing that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
@@ -1,182 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ADP2,1</key>
|
||||
<string>Developer Transition Kit</string>
|
||||
<key>iMac1,1</key>
|
||||
<string>iMac G3 (Rev A-D)</string>
|
||||
<key>iMac4,1</key>
|
||||
<string>iMac (Core Duo)</string>
|
||||
<key>iMac4,2</key>
|
||||
<string>iMac for Education (17-inch, Core Duo)</string>
|
||||
<key>iMac5,1</key>
|
||||
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
|
||||
<key>iMac5,2</key>
|
||||
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
|
||||
<key>iMac6,1</key>
|
||||
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
|
||||
<key>iMac8,1</key>
|
||||
<string>iMac (April 2008)</string>
|
||||
<key>MacBook1,1</key>
|
||||
<string>MacBook (Core Duo)</string>
|
||||
<key>MacBook2,1</key>
|
||||
<string>MacBook (Core 2 Duo)</string>
|
||||
<key>MacBook4,1</key>
|
||||
<string>MacBook (Core 2 Duo Feb 2008)</string>
|
||||
<key>MacBookAir1,1</key>
|
||||
<string>MacBook Air (January 2008)</string>
|
||||
<key>MacBookAir2,1</key>
|
||||
<string>MacBook Air (June 2009)</string>
|
||||
<key>MacBookAir3,1</key>
|
||||
<string>MacBook Air (October 2010)</string>
|
||||
<key>MacBookPro1,1</key>
|
||||
<string>MacBook Pro Core Duo (15-inch)</string>
|
||||
<key>MacBookPro1,2</key>
|
||||
<string>MacBook Pro Core Duo (17-inch)</string>
|
||||
<key>MacBookPro2,1</key>
|
||||
<string>MacBook Pro Core 2 Duo (17-inch)</string>
|
||||
<key>MacBookPro2,2</key>
|
||||
<string>MacBook Pro Core 2 Duo (15-inch)</string>
|
||||
<key>MacBookPro3,1</key>
|
||||
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
|
||||
<key>MacBookPro3,2</key>
|
||||
<string>MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)</string>
|
||||
<key>MacBookPro4,1</key>
|
||||
<string>MacBook Pro (Core 2 Duo Feb 2008)</string>
|
||||
<key>Macmini1,1</key>
|
||||
<string>Mac Mini (Core Solo/Duo)</string>
|
||||
<key>MacPro1,1</key>
|
||||
<string>Mac Pro (four-core)</string>
|
||||
<key>MacPro2,1</key>
|
||||
<string>Mac Pro (eight-core)</string>
|
||||
<key>MacPro3,1</key>
|
||||
<string>Mac Pro (January 2008 4- or 8- core "Harpertown")</string>
|
||||
<key>MacPro4,1</key>
|
||||
<string>Mac Pro (March 2009)</string>
|
||||
<key>MacPro5,1</key>
|
||||
<string>Mac Pro (August 2010)</string>
|
||||
<key>PowerBook1,1</key>
|
||||
<string>PowerBook G3</string>
|
||||
<key>PowerBook2,1</key>
|
||||
<string>iBook G3</string>
|
||||
<key>PowerBook2,2</key>
|
||||
<string>iBook G3 (FireWire)</string>
|
||||
<key>PowerBook2,3</key>
|
||||
<string>iBook G3</string>
|
||||
<key>PowerBook2,4</key>
|
||||
<string>iBook G3</string>
|
||||
<key>PowerBook3,1</key>
|
||||
<string>PowerBook G3 (FireWire)</string>
|
||||
<key>PowerBook3,2</key>
|
||||
<string>PowerBook G4</string>
|
||||
<key>PowerBook3,3</key>
|
||||
<string>PowerBook G4 (Gigabit Ethernet)</string>
|
||||
<key>PowerBook3,4</key>
|
||||
<string>PowerBook G4 (DVI)</string>
|
||||
<key>PowerBook3,5</key>
|
||||
<string>PowerBook G4 (1GHz / 867MHz)</string>
|
||||
<key>PowerBook4,1</key>
|
||||
<string>iBook G3 (Dual USB, Late 2001)</string>
|
||||
<key>PowerBook4,2</key>
|
||||
<string>iBook G3 (16MB VRAM)</string>
|
||||
<key>PowerBook4,3</key>
|
||||
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
|
||||
<key>PowerBook5,1</key>
|
||||
<string>PowerBook G4 (17 inch)</string>
|
||||
<key>PowerBook5,2</key>
|
||||
<string>PowerBook G4 (15 inch FW 800)</string>
|
||||
<key>PowerBook5,3</key>
|
||||
<string>PowerBook G4 (17-inch 1.33GHz)</string>
|
||||
<key>PowerBook5,4</key>
|
||||
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
|
||||
<key>PowerBook5,5</key>
|
||||
<string>PowerBook G4 (17-inch 1.5GHz)</string>
|
||||
<key>PowerBook5,6</key>
|
||||
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
|
||||
<key>PowerBook5,7</key>
|
||||
<string>PowerBook G4 (17-inch 1.67GHz)</string>
|
||||
<key>PowerBook5,8</key>
|
||||
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
|
||||
<key>PowerBook5,9</key>
|
||||
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
|
||||
<key>PowerBook6,1</key>
|
||||
<string>PowerBook G4 (12 inch)</string>
|
||||
<key>PowerBook6,2</key>
|
||||
<string>PowerBook G4 (12 inch, DVI)</string>
|
||||
<key>PowerBook6,3</key>
|
||||
<string>iBook G4</string>
|
||||
<key>PowerBook6,4</key>
|
||||
<string>PowerBook G4 (12 inch 1.33GHz)</string>
|
||||
<key>PowerBook6,5</key>
|
||||
<string>iBook G4 (Early-Late 2004)</string>
|
||||
<key>PowerBook6,7</key>
|
||||
<string>iBook G4 (Mid 2005)</string>
|
||||
<key>PowerBook6,8</key>
|
||||
<string>PowerBook G4 (12 inch 1.5GHz)</string>
|
||||
<key>PowerMac1,1</key>
|
||||
<string>Power Macintosh G3 (Blue & White)</string>
|
||||
<key>PowerMac1,2</key>
|
||||
<string>Power Macintosh G4 (PCI Graphics)</string>
|
||||
<key>PowerMac10,1</key>
|
||||
<string>Mac Mini G4</string>
|
||||
<key>PowerMac10,2</key>
|
||||
<string>Mac Mini (Late 2005)</string>
|
||||
<key>PowerMac11,2</key>
|
||||
<string>Power Macintosh G5 (Late 2005)</string>
|
||||
<key>PowerMac12,1</key>
|
||||
<string>iMac G5 (iSight)</string>
|
||||
<key>PowerMac2,1</key>
|
||||
<string>iMac G3 (Slot-loading CD-ROM)</string>
|
||||
<key>PowerMac2,2</key>
|
||||
<string>iMac G3 (Summer 2000)</string>
|
||||
<key>PowerMac3,1</key>
|
||||
<string>Power Macintosh G4 (AGP Graphics)</string>
|
||||
<key>PowerMac3,2</key>
|
||||
<string>Power Macintosh G4 (AGP Graphics)</string>
|
||||
<key>PowerMac3,3</key>
|
||||
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
|
||||
<key>PowerMac3,4</key>
|
||||
<string>Power Macintosh G4 (Digital Audio)</string>
|
||||
<key>PowerMac3,5</key>
|
||||
<string>Power Macintosh G4 (Quick Silver)</string>
|
||||
<key>PowerMac3,6</key>
|
||||
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
|
||||
<key>PowerMac4,1</key>
|
||||
<string>iMac G3 (Early/Summer 2001)</string>
|
||||
<key>PowerMac4,2</key>
|
||||
<string>iMac G4 (Flat Panel)</string>
|
||||
<key>PowerMac4,4</key>
|
||||
<string>eMac</string>
|
||||
<key>PowerMac4,5</key>
|
||||
<string>iMac G4 (17-inch Flat Panel)</string>
|
||||
<key>PowerMac5,1</key>
|
||||
<string>Power Macintosh G4 Cube</string>
|
||||
<key>PowerMac6,1</key>
|
||||
<string>iMac G4 (USB 2.0)</string>
|
||||
<key>PowerMac6,3</key>
|
||||
<string>iMac G4 (20-inch Flat Panel)</string>
|
||||
<key>PowerMac6,4</key>
|
||||
<string>eMac (USB 2.0, 2005)</string>
|
||||
<key>PowerMac7,2</key>
|
||||
<string>Power Macintosh G5</string>
|
||||
<key>PowerMac7,3</key>
|
||||
<string>Power Macintosh G5</string>
|
||||
<key>PowerMac8,1</key>
|
||||
<string>iMac G5</string>
|
||||
<key>PowerMac8,2</key>
|
||||
<string>iMac G5 (Ambient Light Sensor)</string>
|
||||
<key>PowerMac9,1</key>
|
||||
<string>Power Macintosh G5 (Late 2005)</string>
|
||||
<key>RackMac1,1</key>
|
||||
<string>Xserve G4</string>
|
||||
<key>RackMac1,2</key>
|
||||
<string>Xserve G4 (slot-loading, cluster node)</string>
|
||||
<key>RackMac3,1</key>
|
||||
<string>Xserve G5</string>
|
||||
<key>Xserve1,1</key>
|
||||
<string>Xserve (Intel Xeon)</string>
|
||||
<key>Xserve2,1</key>
|
||||
<string>Xserve (January 2008 quad-core)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
gerado
BIN
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
gerado
BIN
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
gerado
BIN
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
gerado
BIN
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
gerado
BIN
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
gerado
BIN
Arquivo binário não exibido.
Arquivo binário não exibido.
-50
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>12C60</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>finish_installation</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Sparkle</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.andymatuschak.sparkle.finish-installation</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>4G2008a</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>11E52</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.7</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0452</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>4G2008a</string>
|
||||
<key>LSBackgroundOnly</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.4</string>
|
||||
<key>LSUIElement</key>
|
||||
<string>1</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Arquivo binário não exibido.
-1
@@ -1 +0,0 @@
|
||||
APPL????
|
||||
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário