Compare commits
2087 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c0f4395a53 | |||
| fd6f59e39a | |||
| de69ac7843 | |||
| a6174993d1 | |||
| d263552a79 | |||
| e67f671fe6 | |||
| bee097f3cd | |||
| 61c2fc4e49 | |||
| 6f7398e4ae | |||
| 5f1e49978b | |||
| 564a82c187 | |||
| ea2243ea86 | |||
| 4be828ede3 | |||
| 88e14a14d8 | |||
| b583d53f61 | |||
| fa79703f09 | |||
| e122d22ef8 | |||
| 34c070d37b | |||
| b9c5f2f988 | |||
| adb4ab80db | |||
| b55e36853e | |||
| 46c547a9b0 | |||
| 6c753a4a09 | |||
| 88417761ee | |||
| 5bff9be02c | |||
| de4c50bb2a | |||
| 5895fbcced | |||
| 5fc7f32b5a | |||
| a30500d665 | |||
| 9cd9e126a2 | |||
| 6d7da4f882 | |||
| bffa96a344 | |||
| 393df20e44 | |||
| 6acf2605bb | |||
| bd1524c362 | |||
| d9db6cc96a | |||
| 1f004edc6a | |||
| d6b9ea81de | |||
| d869f67126 | |||
| 92630baa6e | |||
| e8adc17543 | |||
| d72a03aeb4 | |||
| f5e75a7c4c | |||
| 2aa92d02d3 | |||
| b04e511767 | |||
| 34616cdbd3 | |||
| dfccf93175 | |||
| 34a62d74b5 | |||
| 41c48a5941 | |||
| c4f2d2894b | |||
| fc77c0e0ec | |||
| 99fa4e9c15 | |||
| 913a1078df | |||
| ed5e38727c | |||
| 28a5d5fcf2 | |||
| a96e9614c4 | |||
| 598d4faea0 | |||
| 3776ec0ef7 | |||
| 8a2546a83c | |||
| 566cb0f1cf | |||
| 6fee9e81e9 | |||
| 5ef6952c95 | |||
| 366306b8cc | |||
| 7d74ff010c | |||
| bb2a80f5e8 | |||
| 0c31f22fb4 | |||
| fb74356541 | |||
| ee18baed5e | |||
| 9f8b327aa8 | |||
| ba34df1a2e | |||
| 35584ebcba | |||
| dedc3af9d4 | |||
| 57652ce002 | |||
| 1f4f5e5030 | |||
| 0a6a43e139 | |||
| f930a2addb | |||
| 77f3ba0198 | |||
| 7dd98cd421 | |||
| 3ebf9d4b28 | |||
| eefc1412fa | |||
| a0f38b9442 | |||
| 123e96b872 | |||
| 14672d6f9b | |||
| ccc950a703 | |||
| aee59b6a05 | |||
| 1a5345f089 | |||
| 6ee705dd21 | |||
| fe197216b9 | |||
| 462730fcae | |||
| 972da30f8c | |||
| 5f07ce8c32 | |||
| 1940c98e67 | |||
| c1f8a23f17 | |||
| 7da459ae63 | |||
| 9125823bc9 | |||
| 188a0bac0a | |||
| 7d33f1663c | |||
| d3c075e11f | |||
| 2c984ed8f5 | |||
| 7f3563bcb0 | |||
| a6ab0e84e6 | |||
| d40dc4acc6 | |||
| d9d8eb4175 | |||
| 18df24da42 | |||
| 99f4b021d3 | |||
| 19bc668e0a | |||
| fe0a6a8e47 | |||
| d8c51b32b2 | |||
| 92b1a67e4a | |||
| 5a41588969 | |||
| 749236868a | |||
| c741f0cded | |||
| 638ecbbd2a | |||
| 697664de8f | |||
| b66379b203 | |||
| 92492d1198 | |||
| a325ea8bff | |||
| 4b3627a1e3 | |||
| 44ea36b475 | |||
| 1348a53fa8 | |||
| c34c8ebd3c | |||
| e2650d11dd | |||
| a73abc82e3 | |||
| d08933ce88 | |||
| 09ca171e81 | |||
| 7affd8cfbb | |||
| 73763275fb | |||
| 9d93ef10b5 | |||
| 6fd7fd89e5 | |||
| 3fa1dbe10e | |||
| f52735ef53 | |||
| 50988a167b | |||
| 60232028c2 | |||
| f1384edaf5 | |||
| bed8233afe | |||
| a1fd8c6d1c | |||
| 8868d6c99a | |||
| 293b191739 | |||
| ce4ebffd69 | |||
| b08a0daa10 | |||
| 3bd0557948 | |||
| 5ceb663fb3 | |||
| 8c684678c9 | |||
| 8749f3d178 | |||
| a001313516 | |||
| 4fc8554384 | |||
| 91f0b8452a | |||
| d1d71b8065 | |||
| 96929bce42 | |||
| 3c38654a8b | |||
| baeb458879 | |||
| 7ecb7a36a0 | |||
| a688687736 | |||
| 32c904935b | |||
| 1484505bd4 | |||
| cba6a15dda | |||
| c4cc830b7a | |||
| e83ec927de | |||
| caa9ebc25c | |||
| 9175fad5c1 | |||
| 13d8861459 | |||
| 7e7525e3d3 | |||
| 6e789307ef | |||
| ec8308b82c | |||
| f5efeec320 | |||
| 649fda046c | |||
| dcd829931c | |||
| d63f5ba134 | |||
| 647c1a026b | |||
| 3ea8d6a368 | |||
| 625a6afb1f | |||
| 9d8ccec0ee | |||
| 32554bf5e6 | |||
| a03c4d6f39 | |||
| eeefba5a45 | |||
| 22d87d62d6 | |||
| 8a1d6cd934 | |||
| 5769fbfb5a | |||
| 6912acaa3d | |||
| 1df3f281fd | |||
| f1c0df3156 | |||
| 6c5c1ff1bd | |||
| e37c0ac09b | |||
| c0572eb996 | |||
| 1b745a9c21 | |||
| cc855e3573 | |||
| 7089bb2d95 | |||
| 256d33e20f | |||
| d6b66629e0 | |||
| d813a1b58f | |||
| 7f6c8efb57 | |||
| af5420c949 | |||
| 5b28bc1bcd | |||
| 42d5d62575 | |||
| 525657843c | |||
| c4b15d9c84 | |||
| 099f3d5cc8 | |||
| 07b4407f03 | |||
| e8adb1b30b | |||
| 8995873089 | |||
| cda0083a3e | |||
| e32eae2946 | |||
| b6a1c28bfc | |||
| 457673a3bb | |||
| 10f2620590 | |||
| 9d9c924d82 | |||
| 23a7f8d00d | |||
| 259c010d4e | |||
| b728d85b00 | |||
| bf1e3af046 | |||
| bfb8bbfc29 | |||
| 259dd579eb | |||
| 8554a64c8b | |||
| 36c8ed2648 | |||
| a02ee4cef0 | |||
| 5e337bb971 | |||
| 4e2916c3f0 | |||
| c4ebac7fcf | |||
| 01899980a5 | |||
| 11c4f64f9d | |||
| 0334c56441 | |||
| f63731d18d | |||
| 33c07fc986 | |||
| 7a398bc847 | |||
| e9dbadab56 | |||
| 622bfa44fb | |||
| 73cfd1b29c | |||
| eae987f665 | |||
| bcd95d937c | |||
| 87fea5b4c7 | |||
| ee29f1c2c0 | |||
| 995d483072 | |||
| 5a209b0384 | |||
| db6911da6d | |||
| 2e2d29b0f5 | |||
| 77fc911f7e | |||
| a4f659387f | |||
| 33a452dab6 | |||
| d9b4d916c8 | |||
| 599cc25f7c | |||
| 4054cd1c72 | |||
| eb1f96ad20 | |||
| c1d1a766c7 | |||
| 2cb7632e96 | |||
| e14464081e | |||
| 49fa613b48 | |||
| c7dca40479 | |||
| d9d7801a50 | |||
| 44edd1c723 | |||
| a46ddc9e55 | |||
| c12560fed3 | |||
| f7dbfeec3f | |||
| 2b44ffe0e2 | |||
| 643fe8928b | |||
| a6f9d787ef | |||
| cf993a71da | |||
| 8f9ecee00a | |||
| 8ffe6eaad4 | |||
| 3256bd10b7 | |||
| 2b5bf3055e | |||
| 51743d03e6 | |||
| 50fdc88754 | |||
| f04f3e7961 | |||
| d38e96dfac | |||
| d09f5764bd | |||
| 608a55b942 | |||
| 0141ef770e | |||
| d936a9a28b | |||
| bc941d4e7a | |||
| a777919dcf | |||
| 73c9479474 | |||
| 179af6dffb | |||
| 8cab84384b | |||
| 92e0e32c83 | |||
| 0f73bda3a5 | |||
| 1a19c95b60 | |||
| 2269a3a70c | |||
| afa4d561c6 | |||
| b0524459b6 | |||
| 5142810101 | |||
| 365544d62f | |||
| 3e77dafbc7 | |||
| ec45a88c61 | |||
| 9c6b3ca4d0 | |||
| d4eefdc3ab | |||
| 2771c25f37 | |||
| 46137dd7cf | |||
| 006efeb15f | |||
| 3b18174c8c | |||
| e50f3147a9 | |||
| 145b33bd3d | |||
| edc5b84082 | |||
| d99c52614c | |||
| 39e626cca3 | |||
| cf848e8d2f | |||
| 0a6f6ae8d3 | |||
| fde580d67d | |||
| dde4c3fee3 | |||
| 461d1a2ef5 | |||
| 28ccb37b58 | |||
| e36908d9e5 | |||
| 63c94e7987 | |||
| 41767642f4 | |||
| e33987183a | |||
| 32c4029b4b | |||
| fec8125ae3 | |||
| c368a70d0b | |||
| 70a3a3c454 | |||
| 17d4933ff6 | |||
| 774cb588d1 | |||
| 1e68f0e583 | |||
| e911f5a2d0 | |||
| abd473a384 | |||
| 43143e69eb | |||
| 43f6c19b1e | |||
| 2e97d84c5b | |||
| 6132dde743 | |||
| 613f7c0511 | |||
| 572c829179 | |||
| 533b969d5c | |||
| 177b0c0bde | |||
| dde25cfcc7 | |||
| 85e86fe406 | |||
| abaf4056dd | |||
| 32a0e92b69 | |||
| 7d4a1d7532 | |||
| 9031bf8100 | |||
| 8c4b21ad62 | |||
| 8e21344356 | |||
| b3620191d8 | |||
| 8ecdef81c9 | |||
| 43db399352 | |||
| 798dd075ba | |||
| 6794e5fa36 | |||
| 799716565c | |||
| de15d2045f | |||
| 219767251c | |||
| 5272af0b06 | |||
| 2325691fcb | |||
| 2f072f4a26 | |||
| e57842386c | |||
| 09d682cd23 | |||
| b03f96a756 | |||
| 4d553c9db6 | |||
| 61f09261d4 | |||
| b38551eef8 | |||
| 79cf7df614 | |||
| e2eecee1d8 | |||
| 2d51144c43 | |||
| d4565981b1 | |||
| e0ffeeea2a | |||
| a8e83dc58c | |||
| ea6666185a | |||
| efe70fad93 | |||
| f4fec843e1 | |||
| fadbe0e226 | |||
| 69068c8720 | |||
| f7960006cc | |||
| fb214d9ab8 | |||
| d5d68632e7 | |||
| b5ec036687 | |||
| 3e1a5c18a9 | |||
| b480580399 | |||
| 2822624e85 | |||
| 205019a769 | |||
| 3d935e164d | |||
| 915fc5d6d8 | |||
| 3b60108c7a | |||
| c624331af5 | |||
| 1e096ec479 | |||
| d9ba99962c | |||
| 6e3cd02fdc | |||
| 98520d6d74 | |||
| 5085b1300b | |||
| 88275fa716 | |||
| ce752343ca | |||
| f74fb6ab29 | |||
| 7b185e022a | |||
| f9523a63f3 | |||
| 524d9a77a2 | |||
| 7362261469 | |||
| bf98392005 | |||
| 037686e7a1 | |||
| 9df83fb0ae | |||
| 1486757426 | |||
| b9671f7c77 | |||
| f95ff022d4 | |||
| 25661cf69e | |||
| c2cb614750 | |||
| e326c8d66e | |||
| 030edbd5d8 | |||
| 4bab0874b7 | |||
| 26b5b3a315 | |||
| bc94ee0cfa | |||
| a7aba0642b | |||
| 956b9aff4a | |||
| 25bea3444f | |||
| 71ea4caeb9 | |||
| 9d354bfcf9 | |||
| b548b851ce | |||
| 6d2faf0d02 | |||
| 154c9f9d4a | |||
| 579701cd30 | |||
| aacbd640e0 | |||
| 01e8296661 | |||
| 32f2fc8126 | |||
| 076e342f65 | |||
| b186a703e2 | |||
| c9bfd1e377 | |||
| 3365a073cb | |||
| 33e615bbf2 | |||
| a1adafa600 | |||
| 153d435571 | |||
| 6a8ad2e80c | |||
| 1395aba079 | |||
| 54e89492f3 | |||
| a69bb2edfa | |||
| b4b5a5fa59 | |||
| 389f3de5f4 | |||
| d457b345d7 | |||
| ace21dca93 | |||
| 6d72e96bc2 | |||
| f4f6cd1215 | |||
| 7de6e764a5 | |||
| 4c9a56de23 | |||
| e54a18e4ad | |||
| 4183e60fc7 | |||
| b25d19509c | |||
| d6c1444432 | |||
| edd1222e0e | |||
| c0106e8bee | |||
| 99be725ede | |||
| b0d04c3eac | |||
| b463732c42 | |||
| 5827121db5 | |||
| 7994a28363 | |||
| f6a9cb92b2 | |||
| 446a6a640f | |||
| 570a85e472 | |||
| f1f6c84758 | |||
| 3acf232631 | |||
| 0a2a2b35fe | |||
| 0eedc523bb | |||
| 5f59f4e126 | |||
| 9d6f1e5110 | |||
| fc653f265c | |||
| 0f32739675 | |||
| a333bcdc44 | |||
| 3c3be23f1f | |||
| 6b91fb9847 | |||
| 2219e4aebf | |||
| 97b9c02aa8 | |||
| 864c959b4d | |||
| 1a873b2d6a | |||
| e3d20823ae | |||
| 069b679e7d | |||
| 82b28baf87 | |||
| ffc150e569 | |||
| 7bb1b85b66 | |||
| 827f597e07 | |||
| b3f5e0c964 | |||
| 3dec76ecf4 | |||
| 897caf7abc | |||
| 0cac58e4a0 | |||
| cce422709b | |||
| b4d68fdb85 | |||
| 1acf4e1243 | |||
| bb53094f66 | |||
| 3d840f5c6d | |||
| db332a1f0f | |||
| 443a9001f5 | |||
| b7f9ad1808 | |||
| 5aa7658cdf | |||
| 5dd2fae7a9 | |||
| 3a5e571aea | |||
| 5ee03ed977 | |||
| 6710463318 | |||
| 893d36d4a3 | |||
| 8f8b7e1fd9 | |||
| e46c78fb36 | |||
| 5fd25efe0b | |||
| 4d2f567bc4 | |||
| 0aa5016758 | |||
| aac6291147 | |||
| 3cd4c18d6a | |||
| fe4bad7c11 | |||
| 251dbb2dee | |||
| 2ed6b14dc2 | |||
| a5162ac666 | |||
| 2a0adb3dbf | |||
| 7edfe2cca8 | |||
| 757ecb37b4 | |||
| 0ebcd4a7f3 | |||
| ef1e6b0676 | |||
| db94d03b64 | |||
| 87b994b67a | |||
| e5064f0794 | |||
| 6751172cfe | |||
| 6c0d7802d9 | |||
| ab7fd52fbd | |||
| c6cb66dc61 | |||
| 4b5ff75412 | |||
| 6dd5724be1 | |||
| 32f3bbb67d | |||
| 51cca16196 | |||
| 1fa87f753e | |||
| 48cc2ae4cf | |||
| e463c886cc | |||
| 2efb7058f8 | |||
| 1c582ab21a | |||
| 4f30e7ac85 | |||
| 0e223e4c7a | |||
| b431d32825 | |||
| 8f41a8be99 | |||
| e9b260aae9 | |||
| 2505af9985 | |||
| 18fff449f3 | |||
| cc437eb47c | |||
| 14cd7e71b4 | |||
| 03499adffc | |||
| c738e39268 | |||
| 922af0d651 | |||
| bfe91ab358 | |||
| 0cfe13e214 | |||
| 1246258f73 | |||
| 9655ef6a0d | |||
| 3fde29fecd | |||
| 04d5f374ef | |||
| acf0207f12 | |||
| 2ebc6fb26e | |||
| 1c1c70e951 | |||
| 3ff3054f5d | |||
| eee003c184 | |||
| 661a884566 | |||
| e35860c235 | |||
| abfbebe996 | |||
| 075555c294 | |||
| 30eb973810 | |||
| e60d332de6 | |||
| 835fe5db03 | |||
| 9705ff7837 | |||
| 56aea76e25 | |||
| f90ce46577 | |||
| 5355f87e1d | |||
| fd3d21229b | |||
| 1c819fec4d | |||
| 1256909852 | |||
| cf933f2b37 | |||
| f3031a3cab | |||
| ddf5e82bd5 | |||
| 95184394a4 | |||
| 8fbea7d329 | |||
| 7fd9de354f | |||
| 70f5d97aef | |||
| 1e8813e668 | |||
| b07403855c | |||
| 3ca12ea1d6 | |||
| 5ce0347e54 | |||
| ec2104d656 | |||
| e686b1228a | |||
| 2667268f0d | |||
| d3e5341c2d | |||
| 878aae6686 | |||
| 2df74bb052 | |||
| 66f73ab014 | |||
| 8b7ccada49 | |||
| 27845de14b | |||
| d59b550e04 | |||
| 4f26fd98a0 | |||
| e3fe09a1ae | |||
| 657b072ffa | |||
| def9865849 | |||
| 98cff70eaf | |||
| 0c4eb467fe | |||
| 3e6ed73769 | |||
| 6c29701b0d | |||
| 273dbf780e | |||
| 35831b0ba7 | |||
| 275f56a384 | |||
| dbb6551d20 | |||
| 6d74eecc5c | |||
| eae4fd3f1b | |||
| 687b3ad1cd | |||
| def04ec41c | |||
| cdbc67f3d5 | |||
| 2fd4f04bd8 | |||
| 2edbd375fd | |||
| d685c3963a | |||
| 4218e2d950 | |||
| f96a6eee04 | |||
| 12650ae9f7 | |||
| 9dee75e243 | |||
| e9a2579a64 | |||
| 7ca20972af | |||
| 3b6c187ad1 | |||
| c4e50aa700 | |||
| 4736b75cc7 | |||
| 775a007a41 | |||
| ae64c83d01 | |||
| 723622b7f5 | |||
| 7903ee1235 | |||
| da6629c210 | |||
| a994adfed7 | |||
| 66fc4eb85e | |||
| 04d4a113ac | |||
| fd6417bc3c | |||
| 74eee18415 | |||
| d5d27062d7 | |||
| 4983e581ba | |||
| ab37f35cf8 | |||
| 4a4fbb9b3f | |||
| 9b2617e48c | |||
| 80c2d4cee2 | |||
| 6255511d02 | |||
| e61ccaa6c8 | |||
| a2f31d5798 | |||
| 29f22d1e79 | |||
| fe78160055 | |||
| ba5d433dd1 | |||
| 3516bfc3c5 | |||
| 17fa9b6a14 | |||
| d0a8ab1976 | |||
| 051ca25fe7 | |||
| 3e097905e3 | |||
| d516731d24 | |||
| 2ddd430484 | |||
| 099c8a53d3 | |||
| dcbf0d05e5 | |||
| dd70a48e3f | |||
| fe954a9e33 | |||
| 5f5791a8e3 | |||
| 1c90ce4dea | |||
| 8bbd3a0000 | |||
| 72e430ef49 | |||
| 1c017a7589 | |||
| b9836c3eaa | |||
| 479f45f46f | |||
| e3204944f6 | |||
| debcd2043b | |||
| b57ceed621 | |||
| e6e0e80527 | |||
| 3c0b350a4f | |||
| b9a065d48a | |||
| c00e5abf80 | |||
| 2b3e06bf6d | |||
| 293b165aef | |||
| 3dbbb3129c | |||
| 7b5378fcf1 | |||
| 0e9d90e761 | |||
| d6acab6bd4 | |||
| b6096f6e95 | |||
| 84f2da4a27 | |||
| 3f6dfcb08e | |||
| f68e38b011 | |||
| 7bb92310b5 | |||
| ebab397625 | |||
| 776c0c2eb0 | |||
| c4bf9c07ca | |||
| 8d8703bec6 | |||
| cdfb2a162e | |||
| 842116e037 | |||
| 12403dab26 | |||
| 0dcb0e9fad | |||
| 450740318c | |||
| 455940abda | |||
| 38e2d1aaa9 | |||
| 8b640426a2 | |||
| 19a8c5512e | |||
| 9c50bce587 | |||
| 3f06c505ce | |||
| 04e5b93f91 | |||
| 052ed5c8e3 | |||
| 881a1a684f | |||
| 5bb41aa035 | |||
| 62c69c8357 | |||
| 93c4da6216 | |||
| 40cedc59cb | |||
| 3e44420023 | |||
| 16aacb8fef | |||
| 96a6d8cf3f | |||
| 4e2d68bb4a | |||
| b3c96949d9 | |||
| ac421dd971 | |||
| 97d7cf4f91 | |||
| cdfe0a5e9a | |||
| 170286d6ce | |||
| 5efa00294c | |||
| 1b47b4b420 | |||
| 2868b5c12e | |||
| 4cd7fbf7be | |||
| 1ed8555b4e | |||
| a7655a6809 | |||
| cd64333364 | |||
| 4de7b7c504 | |||
| df4634bb6a | |||
| fa338784d9 | |||
| ca501350e1 | |||
| db597d3a2b | |||
| 49b3ba9e34 | |||
| d7bdbe0420 | |||
| 86f9c2e0fb | |||
| c7d4b3e45a | |||
| 1bbe821474 | |||
| f9d46b15c8 | |||
| 8d80e6399a | |||
| e2ec6a57ff | |||
| 661466df50 | |||
| 2d45112fc4 | |||
| bf4b6c6dcd | |||
| 170aa7fd79 | |||
| 825ad67c6e | |||
| cfd2c66ea4 | |||
| 323258443f | |||
| e7c45601de | |||
| 61a18e8a0d | |||
| 2c5b292888 | |||
| 8a7538338f | |||
| c088bd776e | |||
| 7a2232ee46 | |||
| d52067a8d2 | |||
| 821344d0f2 | |||
| 2536f989c7 | |||
| 828cb7dc3b | |||
| eac8b86fcf | |||
| ef13f95cc2 | |||
| 3fa528cca1 | |||
| 585d2185bc | |||
| 817c43ed75 | |||
| ba75191d37 | |||
| df8dfa0ddb | |||
| 093269ebcd | |||
| 556ab591f9 | |||
| a91727c886 | |||
| ff567918b1 | |||
| e4f16f0d4e | |||
| 98f3488520 | |||
| ac7830ff50 | |||
| 12d60b81b8 | |||
| 8744787348 | |||
| fb37b423bd | |||
| 5e171a3ac9 | |||
| f8ffb1641f | |||
| eb86123a47 | |||
| cd1e6e7766 | |||
| 2fa5056ffd | |||
| ebe6b092a7 | |||
| 78a37292cc | |||
| 749a83d28b | |||
| 91a8aa22b7 | |||
| f7084cc07b | |||
| fa900941d5 | |||
| 4da5cea54c | |||
| d83ab22d45 | |||
| c1229f65a1 | |||
| 8b8bf8d6aa | |||
| 08200cb5e8 | |||
| bce5bb7d14 | |||
| f07fed4804 | |||
| 8112bd6af4 | |||
| e0443512e6 | |||
| cbfe972ace | |||
| e078700af9 | |||
| 0c74863be9 | |||
| 2779280b83 | |||
| 176c86a73e | |||
| 694c2d9e85 | |||
| 7fd7dba118 | |||
| b998b4c967 | |||
| 206eb4d2cb | |||
| bbee178ff9 | |||
| 67775552b5 | |||
| 54f02890cb | |||
| b7bce5efd2 | |||
| 8f13c8e37a | |||
| eccc452d80 | |||
| 7a1c36f8db | |||
| 654095786e | |||
| c12adecf9f | |||
| fc6013c5de | |||
| 3dd9f07fe2 | |||
| 5308fdd0b8 | |||
| 273d1e296c | |||
| 152af7dc7b | |||
| 43b34f22a3 | |||
| 3330b451d0 | |||
| 5290296952 | |||
| 8fc784aef5 | |||
| 110c8b890b | |||
| b6c686d770 | |||
| 6358db88ff | |||
| b2611fd613 | |||
| 5eb3af0188 | |||
| ad71c17f77 | |||
| 0d7dec8e4e | |||
| 112fbbfc08 | |||
| 4ee5240c72 | |||
| 025e359394 | |||
| 143bcfad08 | |||
| a39ebd13e0 | |||
| e7c0a5f19f | |||
| f0b03dc426 | |||
| 3d2ad79b6b | |||
| 9f28a93c56 | |||
| 386dd1d799 | |||
| e85ebf3a50 | |||
| 81eb2e6f42 | |||
| 9d021a2ec1 | |||
| 439fac65e2 | |||
| dee484a16b | |||
| 90457d6f20 | |||
| 245c30d7a7 | |||
| 81b28293ca | |||
| 392f71b214 | |||
| 257a5281ed | |||
| d44f70a145 | |||
| ec9198f25d | |||
| 1ffd4f97fc | |||
| e8968252ab | |||
| ae618ddd76 | |||
| 73d36d34c8 | |||
| 4126b0574a | |||
| 005aa1a64c | |||
| a63231d36f | |||
| db530f7def | |||
| 627261f51d | |||
| d080b71f29 | |||
| 0a62195625 | |||
| 571bb43459 | |||
| 817b9d5c9f | |||
| 6f3fa9bf8d | |||
| 2de5a7d9f7 | |||
| d26f1a65e8 | |||
| 667c2e59d3 | |||
| b4411a027f | |||
| 142831ec44 | |||
| 2dd58759de | |||
| 866f3a11b2 | |||
| 8a2d779320 | |||
| 2ef8cd4c3f | |||
| 88ec1e66e6 | |||
| f6bfeefc8e | |||
| bbdf9023fe | |||
| b0070122f8 | |||
| ad51bfb30f | |||
| d15ae51825 | |||
| 2efa265983 | |||
| cc6513c93a | |||
| a81865484c | |||
| d70eb13cb0 | |||
| 4b5d94eeb9 | |||
| 5674a4ddac | |||
| 5bb6483ab4 | |||
| f62e4b6eb7 | |||
| c54a613393 | |||
| 2c4be00267 | |||
| 0b8c22e0d8 | |||
| 65a7dca95f | |||
| fdcfaface0 | |||
| 5f08884b52 | |||
| 3595eee11c | |||
| b33eb54c34 | |||
| c86fc743bc | |||
| 10b82603b9 | |||
| 1a1ae36299 | |||
| cc004c00f0 | |||
| cda96afd14 | |||
| 966630ea16 | |||
| 8c746bdccc | |||
| 4fac7da3bb | |||
| 4045958cd2 | |||
| 45155a9ff4 | |||
| 83ad789654 | |||
| 21eaa5ee9c | |||
| e2bc9aa6d0 | |||
| 670721ac52 | |||
| 69bcd84d5d | |||
| 7357fa4c5b | |||
| d51c768112 | |||
| 32ae4fef3a | |||
| fd5ee77f1c | |||
| b9acbfccd7 | |||
| d05059e64d | |||
| bc80e38bb5 | |||
| 838233a68f | |||
| 6968d973a6 | |||
| 199f6aa70c | |||
| e195ea5221 | |||
| ea1ebb4bba | |||
| b7e33bb2b9 | |||
| d2d777be0c | |||
| 4c924b4971 | |||
| ddd4a1a4ea | |||
| c68f240061 | |||
| 5d9d4955ff | |||
| fb4eeaaaeb | |||
| a0b04c2d99 | |||
| 6a60039aac | |||
| 96485ec8d0 | |||
| 86b38b5e40 | |||
| 2e6ff091e2 | |||
| e91972589c | |||
| eb5a8b8beb | |||
| e1320c4661 | |||
| 2db0d397a6 | |||
| 7f85af9c54 | |||
| 3a981be8c6 | |||
| 95b51dae6f | |||
| 9eef533e8a | |||
| 8e4930d031 | |||
| 2b9621e7cf | |||
| 747bf2c3c1 | |||
| e398518bd1 | |||
| 48bdab0ed5 | |||
| ab122f92ad | |||
| ef0b374959 | |||
| dbfc04afc4 | |||
| 7d6687f46f | |||
| f8483ec22e | |||
| 0b690bbe43 | |||
| 871aa08f41 | |||
| e2c2e2e841 | |||
| ba9dfa8f4c | |||
| cad5b436e5 | |||
| 312fdcea96 | |||
| 518a969aab | |||
| e6687bd7b8 | |||
| 74260589f4 | |||
| aefd6e6a9e | |||
| 58e60ee148 | |||
| fdc2b21e0b | |||
| 9d6c15e10b | |||
| f271d3890b | |||
| 69a4a29014 | |||
| f72771c026 | |||
| d2e05c481f | |||
| f999cfc2c7 | |||
| 6c7812b8a4 | |||
| b841358e22 | |||
| 3419343e85 | |||
| 917fc68e27 | |||
| fadd0279a8 | |||
| bbcc75dd2d | |||
| f0b44d8c02 | |||
| eddf89697d | |||
| 92a155c780 | |||
| 6661e6e058 | |||
| 68c49a9aa1 | |||
| 1ae7d4bd54 | |||
| 8330ef062e | |||
| 5493ba998e | |||
| ed59d8a351 | |||
| 077def41ae | |||
| 7480a33eaf | |||
| 4e1e8832cc | |||
| fe290a42c1 | |||
| 54ae627ed2 | |||
| a3d30e9012 | |||
| 021e9c6335 | |||
| 3833f01f2d | |||
| 2060dc288e | |||
| fe10a1d57e | |||
| 563e50334c | |||
| a630c1daa4 | |||
| 97380ceae6 | |||
| 7f8a4ec63d | |||
| 88eaf9ad53 | |||
| 0e8a7f4b30 | |||
| 42cd424723 | |||
| d7319907e8 | |||
| 3c942cfea1 | |||
| 2884b93971 | |||
| 494f445b33 | |||
| f23299fc9a | |||
| d53f00a55a | |||
| 89315c90e8 | |||
| 3fedc41772 | |||
| da4db2e4a2 | |||
| 7e0f611279 | |||
| 56ff162681 | |||
| 0eebc91e3d | |||
| 284dc98394 | |||
| f11928f91f | |||
| 1bcbdc1411 | |||
| 19067d10ea | |||
| e53c9f596b | |||
| 970420e275 | |||
| 9d3d2877d9 | |||
| 32af9095cb | |||
| ea6304f4bc | |||
| 695a804813 | |||
| 88d23f22a4 | |||
| 754b6dc069 | |||
| b72466a1e3 | |||
| d7d7795b99 | |||
| f4c03d58c9 | |||
| 431231ed68 | |||
| 34521e8656 | |||
| 16765ff731 | |||
| 2e59973c8d | |||
| e0277b2b59 | |||
| 91ddb05f27 | |||
| 70b215054d | |||
| afe596eb7d | |||
| 811f04e783 | |||
| 38543b0979 | |||
| 0574b03aeb | |||
| 460ccfcacb | |||
| 50e0f04b9a | |||
| 77bc0f095f | |||
| 064e7f544a | |||
| 06f329ae3b | |||
| d05283200b | |||
| d700c3ea17 | |||
| 3c381320c0 | |||
| 876d07f467 | |||
| 691adcb82d | |||
| 0321b19eaa | |||
| 02a84d71a6 | |||
| 504a81b86a | |||
| 0baf603f90 | |||
| 7593b7a3e3 | |||
| b07a146f27 | |||
| 2eee59c530 | |||
| 9b50b5bdb5 | |||
| 4911348396 | |||
| 2a9759e7d2 | |||
| 4366e29c05 | |||
| c612eef65d | |||
| 48cd830628 | |||
| 7be08a2e2d | |||
| 3d4def2072 | |||
| 259ef699d4 | |||
| 2a79d00726 | |||
| eb27efd9e0 | |||
| c94ce0ac7d | |||
| 0acd9a38fa | |||
| 5a0a60e8ba | |||
| 02854ef0a0 | |||
| 62e5b63229 | |||
| c2c537baa2 | |||
| 89223eb90f | |||
| 2ba95ea13b | |||
| e4af56c5ae | |||
| 5accf191dc | |||
| a011e15e14 | |||
| 2c9b67c87e | |||
| 895c8f2dde | |||
| 47e5f54776 | |||
| 13ff44ec32 | |||
| 8d03df8553 | |||
| 5bdac85eab | |||
| f391f2d9c6 | |||
| ebebd6c6b9 | |||
| e7b4a1d156 | |||
| a93d083cce | |||
| c38d6c07f7 | |||
| 0d1a6f1926 | |||
| b6e86ec2f2 | |||
| d867e5a578 | |||
| 8fd52a383e | |||
| 44c73da13b | |||
| 79daaf3387 | |||
| 6ccb9bc261 | |||
| 5f6608e43a | |||
| dbdf3f1b61 | |||
| 39bc31ede3 | |||
| 07eaf04454 | |||
| c77be46006 | |||
| 5be1d2dee8 | |||
| b04b095055 | |||
| 0a26b7bdff | |||
| 2755ac54db | |||
| e7155dae52 | |||
| b499c5b7bc | |||
| 30e06d21b7 | |||
| c01b910aa5 | |||
| 748920b136 | |||
| e07fbd55cb | |||
| 6cf01c4261 | |||
| afdb276473 | |||
| 445d16bde6 | |||
| 3d9f73500c | |||
| 165e3490fc | |||
| 7ab1a9b6d8 | |||
| 526e44dbae | |||
| f33f5fad35 | |||
| ee36c66333 | |||
| fc6c7e7549 | |||
| eb4b3613cd | |||
| 2859390ff7 | |||
| 654c648feb | |||
| ad07fa19d7 | |||
| 4d1cb10fd3 | |||
| d936b0f482 | |||
| 915b67758a | |||
| 16b152ddf8 | |||
| 3cc56f5c9d | |||
| ac69e0e45b | |||
| e0f53d1030 | |||
| 4e8eafe92e | |||
| 263fd588af | |||
| fac0b5af94 | |||
| 02a266f2d7 | |||
| 392df791ee | |||
| fa797518c1 | |||
| 1791824b14 | |||
| 407f37dd9e | |||
| af50b50110 | |||
| 1af7616961 | |||
| 0d8100c1d8 | |||
| 9b8ab5430c | |||
| d7e325ba89 | |||
| cae94fe7eb | |||
| bbb50748e4 | |||
| c34253c6af | |||
| a027dd6579 | |||
| 4a5cdd31f4 | |||
| 83703f757f | |||
| 58f68de94a | |||
| 963dfd0c62 | |||
| cd7f00b9e3 | |||
| 0c0b560321 | |||
| 3c31888f54 | |||
| 1f057d8945 | |||
| a28e207511 | |||
| 35dd42a9f9 | |||
| 9cb00851aa | |||
| 73f4ae8d28 | |||
| 5e0edd9d95 | |||
| dfbb5aa79e | |||
| 62d9bbf522 | |||
| e832d56310 | |||
| 45fc6fb1b2 | |||
| be39d4c825 | |||
| 7baf6559ed | |||
| 13ee3550f9 | |||
| 4f63b6f2e0 | |||
| 536d765359 | |||
| 20c4dcac26 | |||
| 58bd1a7bde | |||
| bacb4f067d | |||
| e4d82fcfc2 | |||
| 754f457574 | |||
| 96984da285 | |||
| 1d1d1cb405 | |||
| 6beb2ed831 | |||
| 80ac28bd07 | |||
| e4e39cdfeb | |||
| 25c03ae410 | |||
| 7ef4449fc1 | |||
| 2c728bc9a4 | |||
| b1353fdfcc | |||
| 3a3cad9fd4 | |||
| a573008ef1 | |||
| 6e6784a5e7 | |||
| cf22336e3a | |||
| 72a8e029ad | |||
| 4142473dc0 | |||
| 6e2bb81a1c | |||
| dd4fc916ec | |||
| 8e755eb157 | |||
| b33b9628fd | |||
| b9a6dfea88 | |||
| be69bd95af | |||
| e16489fc5e | |||
| 1b0c5477f4 | |||
| d85565910d | |||
| 1201924c28 | |||
| 02be062444 | |||
| 7a113712e1 | |||
| c046a7fd56 | |||
| 07c1599821 | |||
| 9d5154b50a | |||
| 3982c45886 | |||
| 90772350fb | |||
| bc19194c58 | |||
| fd250df032 | |||
| 9ea3c36a88 | |||
| 62ac5b09b1 | |||
| 9ccc66da0e | |||
| 1d6ec0fcfd | |||
| d9510a7569 | |||
| 5412165427 | |||
| 4cc4cae8bb | |||
| d4d9543019 | |||
| bf2cf5b5e3 | |||
| 99cf00ad54 | |||
| 0ddb47ce6d | |||
| 52f6898ffd | |||
| cc8d2823cd | |||
| 03e09f45c0 | |||
| 061a04cd84 | |||
| 0b555d73ab | |||
| c05606aa94 | |||
| 98a37cb84f | |||
| 94f2fa7a9a | |||
| 1cf9bb29ab | |||
| 771311a955 | |||
| a647a670a4 | |||
| 00e0dfb5c7 | |||
| e1f5a7e9de | |||
| e959d3e694 | |||
| affd6d986f | |||
| f30f82262f | |||
| 39e17a5872 | |||
| b2c3480b8e | |||
| f822e9a0e9 | |||
| 4238849c4b | |||
| 23ad4f0140 | |||
| de85018794 | |||
| cfa85aeb37 | |||
| f81fdd55e2 | |||
| 5a8cf4c4ed | |||
| 98292a2dc3 | |||
| 1f16af50aa | |||
| f24af00189 | |||
| 704546149c | |||
| 259e4bbb9b | |||
| 004a05a49b | |||
| 1a91b29cf5 | |||
| 79b2f36088 | |||
| 8b52a0c515 | |||
| 01689987d5 | |||
| 9b9b8aed61 | |||
| 325299f342 | |||
| 3384fc378f | |||
| 6b66f3cce8 | |||
| d3e54853d6 | |||
| 6aa927c39a | |||
| d70374a5c0 | |||
| 67c4b55663 | |||
| 0cbb4a6c0e | |||
| 6f063c92de | |||
| 5504397bb8 | |||
| 08a15c417d | |||
| ff05b590be | |||
| eb603088ae | |||
| 1363792d17 | |||
| 21ef05b0fa | |||
| 7b34af584f | |||
| 4b5ec57624 | |||
| ccf3ce6f5b | |||
| 0fff7e9bbe | |||
| 90bda7dd23 | |||
| f845f787ad | |||
| c16774c325 | |||
| c2842286c7 | |||
| ee8744b490 | |||
| f14c68d047 | |||
| be76ab63e8 | |||
| ea825dfe23 | |||
| a0c87efac8 | |||
| b55bad9e27 | |||
| 72af1de7e6 | |||
| 85e07b8cb8 | |||
| 55c4369d6e | |||
| d860378a73 | |||
| 1943a31628 | |||
| d7a26f722f | |||
| 9af1b75fda | |||
| 4787441d1f | |||
| 9b47c3c4fd | |||
| 5c63e14ae7 | |||
| ca606112bc | |||
| e0f1fe2847 | |||
| 2179a13ea5 | |||
| 4873db2a6a | |||
| 6768f9da67 | |||
| 1a10e6d4e7 | |||
| 2159888b07 | |||
| 478135fe56 | |||
| 701bfcb23a | |||
| 3d0b9b14c8 | |||
| ad73b70c9e | |||
| c04826f663 | |||
| 9bcb811bb2 | |||
| 61d403f032 | |||
| 7651a34206 | |||
| f2334d05fd | |||
| 20a98290bd | |||
| 870db9d610 | |||
| 7ef94349bd | |||
| 987e38e2e1 | |||
| 547dbf5e16 | |||
| 9e7c373d58 | |||
| c271293b8b | |||
| eed02c98c5 | |||
| c08400cee4 | |||
| 99bf5c7e29 | |||
| 3ee7f91523 | |||
| 3715590a19 | |||
| 81c265ce46 | |||
| 112788b597 | |||
| 6b58675000 | |||
| a0872d1cdc | |||
| 1cad8b6c1e | |||
| 4a25c62fe4 | |||
| 113716bfd3 | |||
| 282b315c77 | |||
| 91b541617e | |||
| 82f634f98e | |||
| 25068cb249 | |||
| 81047a4375 | |||
| d90d91f484 | |||
| f113661745 | |||
| b87ba78b9f | |||
| 60241ad0f3 | |||
| 01471d51c5 | |||
| 8ba8b92d79 | |||
| e12935ed38 | |||
| c0ce664d7c | |||
| 39c06631bf | |||
| de3fd83810 | |||
| 015389dfeb | |||
| da69ef70bd | |||
| 2a47037f7e | |||
| 3fb7aace9c | |||
| 1a33949a5b | |||
| 4ea4a22ec9 | |||
| 55c50e62f1 | |||
| 2b5ebc443e | |||
| 705a9556e7 | |||
| ce1d05b019 | |||
| fb8151f656 | |||
| eb90c6a4e3 | |||
| 33ecff8633 | |||
| fdf7bd8112 | |||
| 8dd4ac2259 | |||
| eafc62936c | |||
| a6991d4950 | |||
| 6be3c59c0f | |||
| d961dd609b | |||
| 0a71291e24 | |||
| 7ec34e80ed | |||
| a124dce48c | |||
| fe191f364a | |||
| 9fd83f56c6 | |||
| bdaa617f65 | |||
| 1b93566780 | |||
| b10af0a3d1 | |||
| b19fe5788b | |||
| e8729a086d | |||
| 9f96864edb | |||
| ae9c2a0af7 | |||
| 76ba294af3 | |||
| 0be10220b3 | |||
| d27549bfdb | |||
| 63d7ee70e0 | |||
| 350af3ccd9 | |||
| cfa355d944 | |||
| 1bb2a49479 | |||
| ed05c4b98c | |||
| b39bb13527 | |||
| 8484b63c2d | |||
| 58d0f71df1 | |||
| f6e9262b0e | |||
| bf2da27703 | |||
| 9c9864528d | |||
| 23f3636fbb | |||
| b84d9e5ca0 | |||
| 9b030c2297 | |||
| 98c4ed746d | |||
| 09e2cbd45c | |||
| 3ff2f0cd56 | |||
| cb6c4d6953 | |||
| acfac50066 | |||
| a90c3e1255 | |||
| 91f5f40fd8 | |||
| a1616b5e65 | |||
| 739ea64fa0 | |||
| 010007b0a1 | |||
| 13fe854082 | |||
| 249c98f320 | |||
| 46e84d3661 | |||
| 171eb33966 | |||
| 35cdadbcee | |||
| fd501a7a03 | |||
| d27ea92fd1 | |||
| 0a701ed929 | |||
| b5e6cb97c7 | |||
| b2671013fd | |||
| 3eada61cc7 | |||
| f693e26ab0 | |||
| f575a1f233 | |||
| 9834b85ced | |||
| b8d96d86b7 | |||
| d58eaaf387 | |||
| 67adb17ad3 | |||
| 435e919326 | |||
| 37f35e4f34 | |||
| 3c6353f73e | |||
| dfc573d307 | |||
| 6758b6acc7 | |||
| 2c9bfddb4e | |||
| 81bf4c2288 | |||
| b38ae1fb13 | |||
| 7f0ce7a40b | |||
| 0f5da2d89b | |||
| c80095f511 | |||
| a9414d4692 | |||
| d2de95afc1 | |||
| 718a8fb4f8 | |||
| 7c603578db | |||
| 86e3c7f12f | |||
| 7d8f8b8f12 | |||
| 546a16e23c | |||
| 80571b8fbd | |||
| 7b1a634701 | |||
| 3e4efa344e | |||
| 13c76f6cb5 | |||
| a71e6cf6ec | |||
| b1dbbeeef8 | |||
| 1d3216b6c9 | |||
| 11bbe2cff8 | |||
| ff83ef5676 | |||
| dcfc3a173e | |||
| 2f83caea2d | |||
| 17ed25387d | |||
| 4d8c1031cd | |||
| 89f4b81b57 | |||
| ad50aa7602 | |||
| 316c64bb48 | |||
| 19920b37ca | |||
| ef5d6a4b66 | |||
| 2ea0299615 | |||
| 4cd605c134 | |||
| c2ddd39f2c | |||
| 47209c9f63 | |||
| bb9c7dfe46 | |||
| d95192e018 | |||
| 68b76e2306 | |||
| 6f0c5125ae | |||
| 7b6da918a7 | |||
| 0c05990db3 | |||
| a3581860b3 | |||
| f371ed6f5f | |||
| 17ea9736cd | |||
| a1e13e3eab | |||
| 1de06e650e | |||
| f92f14f68a | |||
| a3c5e57616 | |||
| 5840d6c464 | |||
| ba751a8a93 | |||
| 29c7d33c0a | |||
| dfb053dbd6 | |||
| 5918606f33 | |||
| 794f8955e3 | |||
| e90754e2dc | |||
| 976b4fc2fc | |||
| ddb7bd2167 | |||
| 74fd442303 | |||
| 66555facd5 | |||
| 83b9ca6b96 | |||
| dddeb56b91 | |||
| 39a799e995 | |||
| 88032a1478 | |||
| 90e547b0a5 | |||
| cc9ea22354 | |||
| ea3d409c19 | |||
| 5ef40f8c3e | |||
| 71ccf249f2 | |||
| 45d9d640ee | |||
| 14c38ded81 | |||
| d90d68fd68 | |||
| 9abd26d76c | |||
| 3f0b27ba26 | |||
| 70276655c8 | |||
| b07b6aa32f | |||
| bcce21b0d5 | |||
| 967e0d6539 | |||
| 383193d478 | |||
| 6b640a7070 | |||
| e22a2c16bd | |||
| 67f356f1b4 | |||
| 2eee3c772b | |||
| 7b14755607 | |||
| 8c8940dcbb | |||
| 5aadfa5ca4 | |||
| 46ef0cbf04 | |||
| be6d4fdf77 | |||
| c663b71114 | |||
| e9b8a16a80 | |||
| 2750bcf927 | |||
| 320dc92092 | |||
| 790bdb03e7 | |||
| 619addc5f0 | |||
| 47fb3f9438 | |||
| 7ac22328b2 | |||
| 91989a56e9 | |||
| 34070e63e6 | |||
| 1a5a7ef82a | |||
| e2ae6828be | |||
| 9f02ad9a82 | |||
| 0289c770b4 | |||
| 6c5ce3198e | |||
| 7acc54daa3 | |||
| 08192c47fc | |||
| b94a84b931 | |||
| 82576c5ed6 | |||
| 19333248d9 | |||
| 4774017317 | |||
| 21a667d645 | |||
| 81276aeb26 | |||
| 8e975217f5 | |||
| 3d47c7bae3 | |||
| c93a2ed5d5 | |||
| eb9b83860b | |||
| d9b7c73e8f | |||
| 0f5b7267fb | |||
| eac1b02212 | |||
| cc8396a8ab | |||
| 31a8cd2a3c | |||
| 295e64a02c | |||
| ee566fc6c8 | |||
| fb60c4acfe | |||
| 8381b5184c | |||
| 9e5570b1b4 | |||
| 2caaebc1f5 | |||
| abb99e19e2 | |||
| 63ed2b8632 | |||
| 07d1391c4a | |||
| b69c0c2007 | |||
| 6bda5fa459 | |||
| 5e9f4e71c8 | |||
| d2188c860f | |||
| b60ad5f3ec | |||
| 5305670f1c | |||
| bfb9380de0 | |||
| 25c7bc5726 | |||
| 63acf7eb05 | |||
| 2f134f69f1 | |||
| bf17e281c9 | |||
| 2b40f1b84d | |||
| e6617caeef | |||
| 34eee81a55 | |||
| bec2a832ea | |||
| 6d86238f0a | |||
| 758d5bad17 | |||
| 291ff22366 | |||
| f4f0b8f8ce | |||
| b8abc5aa16 | |||
| 28fd3c9c89 | |||
| 2c94cd19f6 | |||
| 8add2bca63 | |||
| 77041374ea | |||
| 3d54904e89 | |||
| a9d1f16cd8 | |||
| 0439b22269 | |||
| 3fe8abf25c | |||
| 04299ac0f5 | |||
| 96397ea768 | |||
| 6580b36e35 | |||
| 4af4384dac | |||
| ebaaf0b242 | |||
| bea36e2aa2 | |||
| 247ec17be3 | |||
| 577c378517 | |||
| 52e631f229 | |||
| f8307f725e | |||
| c13fbcaab2 | |||
| 6c4eff321e | |||
| 54b8b73d45 | |||
| 0e88b7629e | |||
| 012f148622 | |||
| 56a20cc877 | |||
| b8df922459 | |||
| 896232d308 | |||
| 0207327ded | |||
| e6815a3a4f | |||
| 179bbaea92 | |||
| c7889bc7a2 | |||
| ce9ecd124a | |||
| 426a12d50c | |||
| eefd0ed728 | |||
| 6604043df0 | |||
| a3271bb290 | |||
| aeed3598a1 | |||
| 4b43986a6c | |||
| 4f79180a8e | |||
| a635c4c35c | |||
| afc42f4ed3 | |||
| 547accfd44 | |||
| ccb51c7a26 | |||
| 33190bba34 | |||
| b3147011d4 | |||
| 4c987901b6 | |||
| ce332b895f | |||
| 9b5823109f | |||
| 7a84fb8cdd | |||
| 94c5c525a7 | |||
| 0d25e419b4 | |||
| b669f8363c | |||
| 8e44aa6f88 | |||
| 3ef70f862e | |||
| e4d99edb65 | |||
| 5f611786dd | |||
| 657711a0a7 | |||
| 0f1e6e7702 | |||
| e379ffae51 | |||
| b10d5e715c | |||
| 2f54637881 | |||
| eda1e01a71 | |||
| 8fdc4b8f58 | |||
| 3048825824 | |||
| 704685c11a | |||
| 7fba3a04da | |||
| bfc57ecfc6 | |||
| c0dba7f121 | |||
| ce3e63f3a5 | |||
| 0105503855 | |||
| 0d8525f1b1 | |||
| bfd4a1e846 | |||
| c74343d2dd | |||
| 6f7f545cd8 | |||
| 303885776e | |||
| cabcf5b73c | |||
| a8a1972418 | |||
| 347778d8aa | |||
| 9646c951bb | |||
| 7b4128f6b2 | |||
| 7ac623fc99 | |||
| e9328255b7 | |||
| 11ce47287b | |||
| a1ab25955d | |||
| 3f59b82c2a | |||
| 0e6cded6cd | |||
| e18f73b317 | |||
| e65146503c | |||
| a6a5c65067 | |||
| afb58fa423 | |||
| 8762636374 | |||
| d1b53fb56c | |||
| c7b028b8cf | |||
| d0ee364a81 | |||
| a48fdc0d2c | |||
| a464034fd0 | |||
| 51955cae76 | |||
| f2633d528e | |||
| 33090e1aa4 | |||
| ffc801eaca | |||
| 49e77a1fa1 | |||
| 13c5ddc5fa | |||
| 1ee54eecbd | |||
| b7ac285aeb | |||
| b6b50f1842 | |||
| d283792193 | |||
| 0c5ccd267c | |||
| 81108e2d26 | |||
| 3c3590bafe | |||
| b9e1120f69 | |||
| 9f943337bb | |||
| ab8964be1d | |||
| 37c1ba3926 | |||
| 364d077c8a | |||
| 626f86b500 | |||
| d6488e4e7d | |||
| 846abef17f | |||
| 60e65a4d01 | |||
| 4057365ff1 | |||
| f7d95e2791 | |||
| db812e7f7b | |||
| 66e51bab0d | |||
| d0d82a5e22 | |||
| 2d99e76007 | |||
| 102ff2145f | |||
| 0e00282758 | |||
| 337d12e490 | |||
| 916e125f4b | |||
| 752ef70000 | |||
| b67c70dbe3 | |||
| 8277ba6b5b | |||
| 2db2a4a94d | |||
| a477b862dd | |||
| 0a5cf3bcee | |||
| 2d6e2bcd61 | |||
| 8d8b52dead | |||
| 3409759271 | |||
| 3109dad59b | |||
| 16c35e21f4 | |||
| 509b33477a | |||
| 4fcfdd24d1 | |||
| 473e8ea861 | |||
| 0bbbde3fb6 | |||
| 0576bb71de | |||
| e91d35abda | |||
| da638df367 | |||
| bf8467aaa0 | |||
| 3a8eea3223 | |||
| 566ed9bae6 | |||
| 132341c9b5 | |||
| 3f2a18a387 | |||
| 296f940437 | |||
| dc7833e0fe | |||
| 7f38694341 | |||
| 0a25f4e488 | |||
| 88d5b6ea16 | |||
| b775916a8d | |||
| c1e4d3d598 | |||
| 2435b50e6d | |||
| 466c40f501 | |||
| e76f4205cb | |||
| 1961d467d9 | |||
| 3cb9b3637d | |||
| cf0232d24a | |||
| d1c786aa4a | |||
| 209b2b2099 | |||
| efd378e71c | |||
| 50edf2ad83 | |||
| 27aae8a8f0 | |||
| b07cae5959 | |||
| f786704d9a | |||
| 9f46f7a824 | |||
| 9b98a0f442 | |||
| 165c6886c1 | |||
| c79f9f585b | |||
| 486ea3dc70 | |||
| 765566acb0 | |||
| 06e06c3504 | |||
| a16cf65808 | |||
| b65a5e6452 | |||
| ec88378641 | |||
| e22cc152d8 | |||
| db8adea231 | |||
| 7c7c92fe91 | |||
| 7a8dec6afa | |||
| 49637c2dbd | |||
| 51372d281a | |||
| 3a4973ba20 | |||
| e447c6170b | |||
| 90b25d3ea4 | |||
| 951afa8799 | |||
| 644243db31 | |||
| 212a1f0682 | |||
| d700cd9a97 | |||
| 59d4ff87b8 | |||
| 08641efd0c | |||
| 7c81554b39 | |||
| 6fc1792436 | |||
| c2855f7871 | |||
| 5988076d56 | |||
| 4a0164fc7f | |||
| 9bad334102 | |||
| 4dfca9e6c1 | |||
| 8b1dee04cd | |||
| d856bd13be | |||
| e9d198109c | |||
| aed19f9492 | |||
| 126c520d14 | |||
| 6d23374f01 | |||
| 6f0c5873c2 | |||
| b8fb05f30f | |||
| 925b53db58 | |||
| 99c1268051 | |||
| 6be247e07d | |||
| dfa423b62d | |||
| 49b95e1a8a | |||
| 03eedca87c | |||
| 4602f8b43a | |||
| 9b77f044ab | |||
| 7200908ea9 | |||
| b87827f53b | |||
| 173370b905 | |||
| 628703aab3 | |||
| 6bd014b9a6 | |||
| 7feff9e690 | |||
| af300d118a | |||
| 25e74c5f79 | |||
| c63d860d1f | |||
| 32db1082c0 | |||
| 06193b4285 | |||
| 1192c546a1 | |||
| ec3881d5c4 | |||
| 473ae87547 | |||
| 6112741a6b | |||
| b68e23551a | |||
| 817bc804a6 | |||
| 93976e043f | |||
| 07b48bd353 | |||
| 6923507e74 | |||
| 5e1a260546 | |||
| 63e2cc802c | |||
| c4bdd4a800 | |||
| 0fdca7c146 | |||
| 0d35f3709b | |||
| b1e366a31f | |||
| 922e5c0fbb | |||
| 11bc000a85 | |||
| 8ab9bb0e01 | |||
| ea83307012 | |||
| df35b3f955 | |||
| b9b460e549 | |||
| 91f78bee55 | |||
| a0833f0dd7 | |||
| b9a2c8d50c | |||
| dafd79d55b | |||
| 18808fffec | |||
| 29ea80260f | |||
| a61dd71833 | |||
| e1b740eeff | |||
| c99e94e24d | |||
| 7141ae8478 | |||
| b10df22048 | |||
| 986a5822bc | |||
| 5f0057d3f8 | |||
| 8b64077881 | |||
| 61c7e90f86 | |||
| 9ec2752883 | |||
| 192fe79839 | |||
| 51e548d481 | |||
| 045077e983 | |||
| 334195cc8f | |||
| 1d5696e10d | |||
| d4139d026a | |||
| 13520a7e23 | |||
| 49890f230a | |||
| 0bb8c545f0 | |||
| f7d799ea78 | |||
| c7cadc4097 | |||
| 583b4d79af | |||
| d58bea4f19 | |||
| bacab075d8 | |||
| 46b4ca65eb | |||
| 783fdc120a | |||
| 4cce7d9523 | |||
| 065a1736f6 | |||
| 8f5119bb10 | |||
| f5a9eb90ac | |||
| 24f553dfec | |||
| 47be57973e | |||
| 23240e634a | |||
| c13438cee9 | |||
| 3e3cd634a0 | |||
| 72c5974efe | |||
| 5832498bfe | |||
| 965418255d | |||
| 317f981657 | |||
| 8706c55260 | |||
| d29326065e | |||
| e5cdb1346d | |||
| 9b2ff06341 | |||
| 725382a378 | |||
| 61c4cac28e | |||
| 05a0273995 | |||
| 5c30ed7ebe | |||
| 32f7790b1f | |||
| 0926618ed0 | |||
| e4b8b3e726 | |||
| 0615b8432e | |||
| 88ad3fc1dd | |||
| 4187cdafd4 | |||
| 62d4323c95 | |||
| 57f1fb6505 | |||
| c953a71e36 | |||
| db7075753d | |||
| f9709a429e | |||
| 3bc64e4af3 | |||
| 49cf9af762 | |||
| ed14a0576a | |||
| ec3a4ddb5a | |||
| 097479d0b0 | |||
| a995e3f542 | |||
| a0cfb8779d | |||
| 3b137c3e54 | |||
| 50cc54840f | |||
| d9799ac5bb | |||
| 64bf3f1b9c | |||
| b791945564 | |||
| a8cc7abfff | |||
| fa15618437 | |||
| 844f7ac4d2 | |||
| a43426bf64 | |||
| 7015216392 | |||
| 5cc0dbbf08 | |||
| 98acd5b0f3 | |||
| 14f24424ea | |||
| 9483a7daa5 | |||
| 89d93544a7 | |||
| af3a579122 | |||
| ae769272a6 | |||
| 5f08daa85a | |||
| 8fdec02557 | |||
| f8cef3d339 | |||
| d891dd290c | |||
| 0b366f6850 | |||
| 899bf47d34 | |||
| 888c485186 | |||
| dbbabbb2dc | |||
| 7a38331f8c | |||
| 0dbcb352c9 | |||
| 1ab0b43202 | |||
| 106d95e795 | |||
| cf9005e457 | |||
| be7fd4fa13 | |||
| b0f848b089 | |||
| 07077e89b1 | |||
| bc2a0451db | |||
| 4e38257900 | |||
| f934838a59 | |||
| ee0fb68d60 | |||
| 37e8fd19cd | |||
| f600e6a24b | |||
| ca9009f5fe | |||
| 9a299a9b38 | |||
| 845ae6e7ba | |||
| 8f706107ac | |||
| d489199e00 | |||
| bf023dc2e3 | |||
| ac6b04b5e3 | |||
| a34de5d601 | |||
| b9900776a8 | |||
| 12a444c11f | |||
| 433473e53e | |||
| d5f889767a | |||
| 9873dd487c | |||
| ec8bed61f1 | |||
| d76971385d | |||
| b87fed5541 | |||
| bd8d3dbc38 | |||
| 6022e3fa2b | |||
| c5c8a6e20e | |||
| 3306bc848a | |||
| 2911ef54e5 | |||
| cc54d1970b | |||
| e6915fffd3 | |||
| 964d746f6d | |||
| de6af43d74 | |||
| 0dc1a6e46c | |||
| 4098830804 | |||
| 304ab15b8f | |||
| 16fa9410db | |||
| 9ff69de20c | |||
| cd50f1ee86 | |||
| 195f3d6130 | |||
| 89d8622f6f | |||
| d71e054eb4 | |||
| 48a648eecd | |||
| 63268d079e | |||
| 743d5ca81a | |||
| dffb33c8e0 | |||
| a6ea0931dd | |||
| 17016c0eb2 | |||
| 67c703d934 | |||
| c163d1c936 | |||
| e3c15a2c58 | |||
| dfc149f292 | |||
| 627ba65b9a | |||
| a92170d88a | |||
| 503653cb5e | |||
| 68c277ff9a | |||
| 7b171b4f9b | |||
| 30956e4c58 | |||
| 6a956aacab | |||
| 681c845e2d | |||
| 11594ef5e8 | |||
| 28f06291db | |||
| c6937698ed | |||
| 15f85c8b80 | |||
| 7fd5695f83 | |||
| 952880287b | |||
| f76c7cf25a | |||
| 7c14b4d381 | |||
| c67389f0a3 | |||
| 219994ced2 | |||
| 274f08807e | |||
| 7601b4d3da | |||
| 05d14b4bfd | |||
| c5b63fd1c5 | |||
| 0bb6a926b2 | |||
| 0124eacb15 | |||
| 7ac06761d6 | |||
| c8c6226045 | |||
| 507d9610c7 | |||
| 5f4075fc35 | |||
| 514571cc80 | |||
| 6ff34b71cf | |||
| 37416daa53 | |||
| 6bd5401633 | |||
| ea6b9571b5 | |||
| bd7c403986 | |||
| 99417726ce | |||
| 4319e542f7 | |||
| 61d8445949 | |||
| 743095064d | |||
| efa12ab5a6 | |||
| b49b1b392c | |||
| 09e54e9915 | |||
| 373d175f2d | |||
| 5f3955a04a | |||
| 98c0e51527 | |||
| 8b3a6e8fc6 | |||
| b2d2e8ba7e | |||
| f1efced19c | |||
| 5b09dfc80c | |||
| 39f91a4368 | |||
| 3b6c9bde63 | |||
| 1df05ea53e | |||
| 3e9aee1c6f | |||
| 5231a460da | |||
| e6b3b36df9 | |||
| 060d510658 | |||
| 3b21a4aa97 | |||
| 4824b44950 | |||
| 988a92d4a5 | |||
| 378e2e61bd | |||
| eb94a7d9bb | |||
| fe2ba07a57 | |||
| 2788b12eb2 | |||
| 265b553b4e | |||
| 5f800681aa | |||
| 890c9cf591 | |||
| 2c356b80ed | |||
| cc097ba7da | |||
| 78401f1c4a | |||
| 8802363544 | |||
| 05388c3733 | |||
| 8f84301b39 | |||
| 774ba5d990 | |||
| 6bf0cd93d1 | |||
| 7f63c26348 | |||
| bce3e6ede1 | |||
| 4f642041f9 | |||
| b990b2768c | |||
| 53b8d37d8c | |||
| db9f63c2d9 | |||
| 87df4ff487 | |||
| f0fe459460 | |||
| f71a35751a | |||
| 2458d9cbb3 | |||
| 81c6d33005 | |||
| dba5c20e34 | |||
| c2eddb21e5 | |||
| de1d289670 | |||
| 623201fd75 | |||
| 2f900b6bc7 | |||
| 375af0cccd | |||
| 8ae8e887f5 | |||
| 201b6432c4 | |||
| fc10bbf6b6 | |||
| 1c82c71aea | |||
| a59abd3135 | |||
| a51633b511 | |||
| 2b40d265f9 | |||
| 734b5b02f8 | |||
| 4120434e5a | |||
| 6d9c4dc6d9 | |||
| ce94a1360a | |||
| 27a61f4faf | |||
| 36f50a482b | |||
| 28d681b29b | |||
| ddb53bfce1 | |||
| 81414254f9 | |||
| 4af4481a17 | |||
| 1e6e0f0800 | |||
| f1cff045e1 | |||
| b3b3c55473 | |||
| 7f2c6fd977 | |||
| 59338d3ae3 | |||
| 98a5647f97 | |||
| 5d11642776 | |||
| 297277451f | |||
| d5ec269811 | |||
| 02bbe29ccb | |||
| 3844ace955 | |||
| 3715a03598 | |||
| 82c695a199 | |||
| 09ff58a1a6 | |||
| 0fbe522235 | |||
| cc38b5e5c3 | |||
| c6101f5565 | |||
| f4e50ae4d8 | |||
| 3f42edbb08 | |||
| c63ff665b2 | |||
| 230ef6d4ca | |||
| 9d1783f4d6 | |||
| 99d14d9521 | |||
| 57ed7e692e | |||
| 6aaf974049 | |||
| 1fce0f5557 | |||
| f75f0ccb14 | |||
| 01f82aaf4c | |||
| 8b294e05ad | |||
| 5b2fcb85e5 | |||
| fb1d38dc3a | |||
| 5cc6a8d75a | |||
| fbe2a03933 | |||
| 915bccf099 | |||
| 0943e368e7 |
@@ -1,69 +0,0 @@
|
||||
build
|
||||
dist
|
||||
dists
|
||||
renpy.app
|
||||
**/*.rpyc
|
||||
**/*.rpyb
|
||||
**/*.rpymc
|
||||
jedit
|
||||
lint.txt
|
||||
renpy.code
|
||||
traceback.txt
|
||||
doc/common.css
|
||||
doc/images
|
||||
doc/index.html
|
||||
doc/monobook.css
|
||||
doc/monobook2.css
|
||||
doc/reference
|
||||
doc/shared.css
|
||||
doc/tutorials
|
||||
doc/www.renpy.org
|
||||
testing
|
||||
translations.rpy
|
||||
launchertrans.rpy
|
||||
jcc
|
||||
scite/scite.zip
|
||||
screenshot*
|
||||
.ropeproject
|
||||
release_cardgame.sh
|
||||
cardgame
|
||||
dse.split
|
||||
empty
|
||||
empty-linux-x86.tar.bz2
|
||||
empty-mac.zip
|
||||
empty.zip
|
||||
errors.txt
|
||||
icons
|
||||
iliad-icon.png
|
||||
iliad-work
|
||||
kuroi
|
||||
lsprofcalltree.py
|
||||
manifest.xml
|
||||
mediatest
|
||||
musicroom
|
||||
nobmtest
|
||||
renpy-iliad.sh
|
||||
renpy.kcg
|
||||
renpy.stats
|
||||
renpygame-1.2.zip
|
||||
speedtest
|
||||
styles.txt
|
||||
renpygame-demo/game/saves
|
||||
Lucy Sprites.zip
|
||||
translate
|
||||
close_bugs.py
|
||||
.logplayer
|
||||
scite-6.10.zip
|
||||
scite-renpy-20090803.zip
|
||||
module/cython.sh
|
||||
old_demo
|
||||
opengl.txt
|
||||
Microsoft.VC90.CRT.manifest
|
||||
console.exe
|
||||
msvcr90.dll
|
||||
python26.dll
|
||||
renpy.exe
|
||||
lib/windows-x86
|
||||
sphinx/source/inc/*
|
||||
doc/*
|
||||
updates/prerelease
|
||||
@@ -0,0 +1,54 @@
|
||||
*.rpyc
|
||||
*.rpyb
|
||||
*.rpymc
|
||||
*.pyc
|
||||
*.pyo
|
||||
|
||||
*~
|
||||
*.bak
|
||||
|
||||
saves
|
||||
tmp
|
||||
cache
|
||||
|
||||
log.txt
|
||||
/errors.txt
|
||||
/traceback.txt
|
||||
|
||||
styles.txt
|
||||
|
||||
/android
|
||||
/build
|
||||
/dist
|
||||
/dists
|
||||
/renpy.app
|
||||
/jedit
|
||||
/lint.txt
|
||||
/renpy.code
|
||||
/*testing*
|
||||
/screenshot*
|
||||
/renpy.exe
|
||||
/lib
|
||||
/lib.old
|
||||
/doc
|
||||
/.pydevproject
|
||||
/.pydevproject.bak
|
||||
/.project
|
||||
/.settings
|
||||
/LICENSE.txt
|
||||
/templates/english/README.html
|
||||
/the_question/README.html
|
||||
/tutorial/README.html
|
||||
/renpy/angle/*.pyx
|
||||
/renpy/angle/*.pxd
|
||||
/renpy-ppc.zip
|
||||
/module/build
|
||||
/module/gen
|
||||
/editra
|
||||
/launcher/game/theme
|
||||
/launcher/game/script_version.rpy
|
||||
|
||||
dl
|
||||
renpy/vc_version.py
|
||||
.externalToolBuilders
|
||||
rapt
|
||||
@@ -1,803 +0,0 @@
|
||||
=======
|
||||
License
|
||||
=======
|
||||
|
||||
Most of Ren'Py is covered by the terms of the following (MIT) license:
|
||||
|
||||
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.
|
||||
|
||||
Portions of Ren'Py are derived from code that is copyright using the
|
||||
Lesser GNU Public License, so Ren'Py games must be distributed in a
|
||||
manner that satisfies the LGPL.
|
||||
|
||||
Please see each individual source file for a list of copyright
|
||||
holders. The artwork in the demo is released by various copyright
|
||||
holders, under the same terms.
|
||||
|
||||
Ren'Py binaries include code from the following projects:
|
||||
|
||||
* Python (Python License)
|
||||
* Pygame (LGPL)
|
||||
* SDL (LGPL)
|
||||
* SDL_image (LGPL)
|
||||
* SDL_ttf (LGPL)
|
||||
* SDL_mixer (LGPL)
|
||||
* Freetype (LGPL)
|
||||
* FFmpeg (LGPL)
|
||||
* Fribidi (LGPL)
|
||||
* jpeg (JPEG License)
|
||||
* libpng (PNG license)
|
||||
* zlib (Zlib License)
|
||||
* bzip2 (Bzip2 License)
|
||||
* pyobjc (MIT License)
|
||||
* py2exe (MIT License)
|
||||
* GLEW (Modified BSD, MIT)
|
||||
* tegl (Modified BSD)
|
||||
|
||||
For the purpose of LGPL compliance, the source code to all LGPL
|
||||
software we depend on is either in the Ren'Py package (available from
|
||||
http://www.renpy.org/), or in the renpy-deps package
|
||||
(http://www.renpy.org/dl/lgpl/). We believe compliance can be achieved
|
||||
by including a copy of this license with every copy of Ren'Py you
|
||||
distribute, and referring to it in your project's README file.
|
||||
|
||||
The default Ren'Py build distributes Ren'Py alongside jEdit, which is
|
||||
licensed under the GNU GPL. The source code to jEdit is distributed as
|
||||
part of the renpy-deps package (http://www.renpy.org/dl/lgpl/).
|
||||
|
||||
|
||||
GNU Lesser General Public License
|
||||
=================================
|
||||
|
||||
::
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes a de-facto standard. To achieve this, non-free programs must
|
||||
be allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least
|
||||
three years, to give the same user the materials specified in
|
||||
Subsection 6a, above, for a charge no more than the cost of
|
||||
performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
Python License
|
||||
==============
|
||||
|
||||
::
|
||||
|
||||
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
||||
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
||||
otherwise using Python 2.3 software in source or binary form and its
|
||||
associated documentation.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, PSF
|
||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
||||
license to reproduce, analyze, test, perform and/or display publicly,
|
||||
prepare derivative works, distribute, and otherwise use Python 2.3
|
||||
alone or in any derivative version, provided, however, that PSF's
|
||||
License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
|
||||
2001, 2002 Python Software Foundation; All Rights Reserved" are
|
||||
retained in Python 2.3 alone or in any derivative version prepared by
|
||||
Licensee.
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python 2.3 or any part thereof, and wants to make
|
||||
the derivative work available to others as provided herein, then
|
||||
Licensee hereby agrees to include in any such work a brief summary of
|
||||
the changes made to Python 2.3.
|
||||
|
||||
4. PSF is making Python 2.3 available to Licensee on an "AS IS"
|
||||
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.3 WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||
2.3 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.3,
|
||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
6. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
7. Nothing in this License Agreement shall be deemed to create any
|
||||
relationship of agency, partnership, or joint venture between PSF and
|
||||
Licensee. This License Agreement does not grant permission to use PSF
|
||||
trademarks or trade name in a trademark sense to endorse or promote
|
||||
products or services of Licensee, or any third party.
|
||||
|
||||
8. By copying, installing or otherwise using Python 2.3, Licensee
|
||||
agrees to be bound by the terms and conditions of this License
|
||||
Agreement.
|
||||
|
||||
Jpeg License
|
||||
============
|
||||
|
||||
::
|
||||
|
||||
In plain English:
|
||||
|
||||
1. We don't promise that this software works. (But if you find any bugs,
|
||||
please let us know!)
|
||||
2. You can use this software for whatever you want. You don't have to pay us.
|
||||
3. You may not pretend that you wrote this software. If you use it in a
|
||||
program, you must acknowledge somewhere in your documentation that
|
||||
you've used the IJG code.
|
||||
|
||||
In legalese:
|
||||
|
||||
The authors make NO WARRANTY or representation, either express or implied,
|
||||
with respect to this software, its quality, accuracy, merchantability, or
|
||||
fitness for a particular purpose. This software is provided "AS IS", and you,
|
||||
its user, assume the entire risk as to its quality and accuracy.
|
||||
|
||||
This software is copyright (C) 1991-1998, Thomas G. Lane.
|
||||
All Rights Reserved except as specified below.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute this
|
||||
software (or portions thereof) for any purpose, without fee, subject to these
|
||||
conditions:
|
||||
(1) If any part of the source code for this software is distributed, then this
|
||||
README file must be included, with this copyright and no-warranty notice
|
||||
unaltered; and any additions, deletions, or changes to the original files
|
||||
must be clearly indicated in accompanying documentation.
|
||||
(2) If only executable code is distributed, then the accompanying
|
||||
documentation must state that "this software is based in part on the work of
|
||||
the Independent JPEG Group".
|
||||
(3) Permission for use of this software is granted only if the user accepts
|
||||
full responsibility for any undesirable consequences; the authors accept
|
||||
NO LIABILITY for damages of any kind.
|
||||
|
||||
These conditions apply to any software derived from or based on the IJG code,
|
||||
not just to the unmodified library. If you use our work, you ought to
|
||||
acknowledge us.
|
||||
|
||||
Permission is NOT granted for the use of any IJG author's name or company name
|
||||
in advertising or publicity relating to this software or products derived from
|
||||
it. This software may be referred to only as "the Independent JPEG Group's
|
||||
software".
|
||||
|
||||
We specifically permit and encourage the use of this software as the basis of
|
||||
commercial products, provided that all warranty or liability claims are
|
||||
assumed by the product vendor.
|
||||
|
||||
|
||||
PNG License
|
||||
===========
|
||||
|
||||
::
|
||||
|
||||
The PNG Reference Library is supplied "AS IS". The Contributing Authors
|
||||
and Group 42, Inc. disclaim all warranties, expressed or implied,
|
||||
including, without limitation, the warranties of merchantability and of
|
||||
fitness for any purpose. The Contributing Authors and Group 42, Inc.
|
||||
assume no liability for direct, indirect, incidental, special, exemplary,
|
||||
or consequential damages, which may result from the use of the PNG
|
||||
Reference Library, even if advised of the possibility of such damage.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute this
|
||||
source code, or portions hereof, for any purpose, without fee, subject
|
||||
to the following restrictions:
|
||||
|
||||
1. The origin of this source code must not be misrepresented.
|
||||
|
||||
2. Altered versions must be plainly marked as such and must not
|
||||
be misrepresented as being the original source.
|
||||
|
||||
3. This Copyright notice may not be removed or altered from any
|
||||
source or altered source distribution.
|
||||
|
||||
The Contributing Authors and Group 42, Inc. specifically permit, without
|
||||
fee, and encourage the use of this source code as a component to
|
||||
supporting the PNG file format in commercial products. If you use this
|
||||
source code in a product, acknowledgment is not required but would be
|
||||
appreciated.
|
||||
|
||||
Zlib License
|
||||
============
|
||||
|
||||
::
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
|
||||
Bzip2 License
|
||||
=============
|
||||
|
||||
::
|
||||
|
||||
This program, "bzip2", the associated library "libbzip2", and all
|
||||
documentation, are copyright (C) 1996-2005 Julian R Seward. All
|
||||
rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided 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. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product
|
||||
documentation would be appreciated but is not required.
|
||||
|
||||
3. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
4. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Modified BSD License
|
||||
====================
|
||||
|
||||
::
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* 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.
|
||||
* The name of the author may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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.
|
||||
@@ -0,0 +1,141 @@
|
||||
==============================
|
||||
The Ren'Py Visual Novel Engine
|
||||
==============================
|
||||
|
||||
http://www.renpy.org
|
||||
|
||||
Ren'Py development takes place on the ``master`` branch, and occasionally
|
||||
on feature branches.
|
||||
|
||||
Getting Started
|
||||
===============
|
||||
|
||||
Ren'Py depends on a number of python modules written in Cython and C. For
|
||||
changes to Ren'Py that only involve python modules, you can use the modules
|
||||
found in the latest nightly build. Otherwise, you'll have to compile the
|
||||
modules yourself.
|
||||
|
||||
The development scripts assume a POSIX-like platform. The scripts should run
|
||||
on Linux or Mac OS X, and can be made to run on Windows using an environment
|
||||
like Msys.
|
||||
|
||||
Nightly Build
|
||||
-------------
|
||||
|
||||
Nightly builds can be downloaded from:
|
||||
|
||||
http://nightly.renpy.org
|
||||
|
||||
Note that the latest nightly build is at the bottom of the list. Once you've
|
||||
unpacked the nightly, change into this repository, and run::
|
||||
|
||||
./after_checkout.sh <path-to-nightly>
|
||||
|
||||
Once this script completes, you should be able to run Ren'Py using renpy.sh,
|
||||
renpy.app, or renpy.exe, as appropriate for your platform.
|
||||
|
||||
If the current nightly build doesn't work, please wait 24 hours for a new
|
||||
build to occur. If that build still doesn't work, contact Tom (`pytom at bishoujo.us`,
|
||||
or @renpytom on twitter) to find out what's wrong.
|
||||
|
||||
The ``doc`` symlink will dangle until documentation is built, as described
|
||||
below.
|
||||
|
||||
Compiling the Modules
|
||||
----------------------
|
||||
|
||||
Building the modules requires you have the many dependencies installed on
|
||||
your system. On Ubuntu, these dependencies can be installed with the
|
||||
command::
|
||||
|
||||
apt-get install python-dev python-pygame libavcodec-dev libavformat-dev \
|
||||
libfreetype6-dev libglew1.6-dev libsdl1.2-dev libsdl-image1.2-dev \
|
||||
libfribidi-dev libswscale-dev libesd0-dev libpulse-dev
|
||||
|
||||
Other platforms may have an equivalent command. Otherwise, you'll need to
|
||||
build `renpy-deps <https://github.com/renpy/renpy-deps>`_.
|
||||
|
||||
We strongly suggest installing the Ren'Py modules into a Python
|
||||
virtualenv. `This page <http://dabapps.com/blog/introduction-to-pip-and-virtualenv-python/>`_
|
||||
describes how to install pip and the virtualenv tool, and set up a new virtualenv.
|
||||
|
||||
After activating the virtualenv, install cython::
|
||||
|
||||
pip install -U cython
|
||||
|
||||
Next, set RENPY_DEPS_INSTALL To a \::-separated list of paths containing the
|
||||
dependencies, and RENPY_CYTHON to the name of the cython command::
|
||||
|
||||
export RENPY_DEPS_INSTALL=/usr::/usr/lib/x86_64-linux-gnu/
|
||||
export RENPY_CYTHON=cython
|
||||
|
||||
Finally, change into the `modules` directory, and run::
|
||||
|
||||
python setup.py install
|
||||
|
||||
Ren'Py will be installed into the activated virtualenv. It can then be run
|
||||
using the command::
|
||||
|
||||
python -O renpy.py
|
||||
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
Building the documentation requires Ren'Py to work. You'll either need to
|
||||
link in a nightly build, or compile the modules as described above. You'll
|
||||
also need the `Sphinx <http://sphinx-doc.org/>`_ documentation generator.
|
||||
If you have pip working, install Sphinx using::
|
||||
|
||||
pip install -U sphinx
|
||||
|
||||
Once Sphinx is installed, change into the ``sphinx`` directory inside the
|
||||
Ren'Py checkout and run::
|
||||
|
||||
./build.sh
|
||||
|
||||
Format
|
||||
------
|
||||
|
||||
Ren'Py's documentation consists of reStructuredText files found in sphinx/source, and
|
||||
generated documentation found in function docstrings scattered throughout the code. Do
|
||||
not edit the files in sphinx/source/inc directly, as they will be overwritten.
|
||||
|
||||
Docstrings may include tags on the first few lines:
|
||||
|
||||
\:doc: `section` `kind`
|
||||
Indicates that this functions should be documented. `section` gives
|
||||
the name of the include file the function will be documented in, while
|
||||
`kind` indicates the kind of object to be documented (one of ``function``,
|
||||
``method`` or ``class``. If omitted, `kind` will be auto-detected.
|
||||
\:name: `name`
|
||||
The name of the function to be documented. Function names are usually
|
||||
detected, so this is only necessary when a function has multiple aliases.
|
||||
\:args: `args`
|
||||
This overrides the detected argument list. It can be used if some arguments
|
||||
to the function are deprecated.
|
||||
|
||||
For example::
|
||||
|
||||
def warp_speed(factor, transwarp=False):
|
||||
"""
|
||||
:doc: warp
|
||||
:name: renpy.warp_speed
|
||||
:args: (factor)
|
||||
|
||||
Exceeds the speed of light.
|
||||
"""
|
||||
|
||||
renpy.engine.warp_drive.engage(factor)
|
||||
|
||||
|
||||
Contributing
|
||||
============
|
||||
|
||||
For bug fixes, documentation improvements, and simple changes, just
|
||||
make a pull request. For more complex changes, it might make sense
|
||||
to file an issue first so we can discuss the design.
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from renpy import version_tuple #@UnresolvedImport
|
||||
|
||||
version = ".".join(str(i) for i in version_tuple)
|
||||
short_version = ".".join(str(i) for i in version_tuple[:3])
|
||||
print "Version", version
|
||||
|
||||
ap = argparse.ArgumentParser()
|
||||
|
||||
ap.add_argument("--release", action="store_true")
|
||||
ap.add_argument("--prerelease", action="store_true")
|
||||
ap.add_argument("--experimental", action="store_true")
|
||||
ap.add_argument("--no-tag", "-n", action="store_true")
|
||||
|
||||
args = ap.parse_args()
|
||||
|
||||
if args.release:
|
||||
links = [ "release", "prerelease", "experimental" ]
|
||||
tag = True
|
||||
elif args.prerelease:
|
||||
links = [ "prerelease", "experimental" ]
|
||||
tag = True
|
||||
elif args.experimental:
|
||||
links = [ "experimental" ]
|
||||
tag = False
|
||||
else:
|
||||
links = [ ]
|
||||
tag = False
|
||||
|
||||
|
||||
def check_dirty():
|
||||
if args.no_tag:
|
||||
return
|
||||
|
||||
if subprocess.check_call([ "git", "diff", "--quiet", "HEAD" ]):
|
||||
print "Directory not checked in: {}".format(os.getcwd())
|
||||
sys.exit(1)
|
||||
|
||||
os.chdir("/home/tom/ab/renpy")
|
||||
check_dirty()
|
||||
|
||||
os.chdir("/home/tom/ab/renpy/android")
|
||||
check_dirty()
|
||||
subprocess.check_call([ "./add_renpy.sh", short_version ])
|
||||
|
||||
if not args.no_tag:
|
||||
subprocess.check_call([ "git", "tag", "-a", "rapt-" + version, "-m", "Tagging RAPT release." ])
|
||||
|
||||
os.chdir("/home/tom/ab/renpy/dl")
|
||||
|
||||
for i in links:
|
||||
if os.path.exists(i):
|
||||
os.unlink(i)
|
||||
os.symlink(short_version, i)
|
||||
|
||||
os.chdir("/home/tom/ab/renpy")
|
||||
|
||||
if tag and not args.no_tag:
|
||||
cmd = [ "git", "tag", "-a", version, "-m", "Ren'Py " + version ]
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
os.chdir("/home/tom/ab/website")
|
||||
subprocess.check_call("./upload.sh")
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
echo need version
|
||||
exit
|
||||
fi
|
||||
|
||||
rsync -av updates tom@onegeek.org:/home/tom/WWW.update/renpy/
|
||||
|
||||
mkdir ~/ab/website/renpy/dl/$1
|
||||
cp dists/renpy-$1-* ~/ab/website/renpy/dl/$1
|
||||
cp CHANGELOG.txt ~/ab/website/renpy/dl/$1
|
||||
|
||||
cd ~/ab/website
|
||||
./upload.sh
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
ROOT="$(dirname $(python -c "import os;print(os.path.realpath('$0'))"))"
|
||||
|
||||
ln -s "$ROOT/help.html" "$ROOT/tutorial/README.html"
|
||||
ln -s "$ROOT/help.html" "$ROOT/the_question/README.html"
|
||||
ln -s "$ROOT/help.html" "$ROOT/templates/english/README.html"
|
||||
|
||||
ln -s "$ROOT/sphinx/source/license.rst" "$ROOT/LICENSE.txt"
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
ln -s "$1/lib" "$ROOT/lib"
|
||||
ln -s "$1/renpy.app" "$ROOT"
|
||||
ln -s "$1/renpy.exe" "$ROOT"
|
||||
fi
|
||||
@@ -0,0 +1,10 @@
|
||||
# This file sets up the normal python modules. It's used to help eclipse
|
||||
# do type detection, by providing an importable version of the cython code.
|
||||
|
||||
from distutils.core import setup
|
||||
|
||||
setup(
|
||||
packages=['renpy', 'renpy.gl', 'renpy.angle', 'renpy.display', 'renpy.audio', 'renpy.text', 'pysdlsound'],
|
||||
package_dir={ 'pysdlsound' : 'module' },
|
||||
)
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import shutil
|
||||
from distutils.core import setup
|
||||
import py2exe
|
||||
import sys
|
||||
import zipfile
|
||||
import traceback
|
||||
import os
|
||||
|
||||
# The pythonpath on my system.
|
||||
sys.path.insert(0, 'c:\\msys\\1.0\\newbuild\\install\\bin')
|
||||
sys.path.insert(0, 'c:\\msys\\1.0\\newbuild\\install\\python')
|
||||
|
||||
def move_from_dist(fn):
|
||||
"""
|
||||
Moves the file `fn` from the dist directory to the main
|
||||
directory. (This means we don't need symlinks on windows.)
|
||||
"""
|
||||
|
||||
if os.path.isdir(fn):
|
||||
shutil.rmtree(fn)
|
||||
elif os.path.exists(fn):
|
||||
os.unlink(fn)
|
||||
|
||||
os.rename("dist/" + fn, fn)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
sys.argv[1:] = [ 'py2exe', '-a', '--dll-excludes', 'w9xpopen.exe', ]
|
||||
|
||||
setup(name="Ren'Py",
|
||||
windows=[ dict(script="renpy.py",
|
||||
dest_base="renpy",
|
||||
icon_resources=[ (1, "newicon.ico") ],
|
||||
),
|
||||
],
|
||||
|
||||
console=[ dict(script="renpy.py", dest_base="console") ],
|
||||
|
||||
zipfile='lib/windows-x86/renpy.code',
|
||||
|
||||
options={ 'py2exe' : { 'excludes' : [ 'doctest',
|
||||
'pygame.macosx',
|
||||
'pygame.surfarray',
|
||||
'pygame.mixer',
|
||||
'pygame.mixer_music',
|
||||
'pygame.font',
|
||||
'_ssl',
|
||||
'_hashlib',
|
||||
'win32con',
|
||||
'win32api',
|
||||
'Numeric',
|
||||
'locale',
|
||||
'gettext',
|
||||
'os2emxpath',
|
||||
'macpath',
|
||||
'posixpath',
|
||||
],
|
||||
'optimize' : 2,
|
||||
} },
|
||||
)
|
||||
|
||||
|
||||
zfold = zipfile.ZipFile("dist/lib/windows-x86/renpy.code")
|
||||
zfnew = zipfile.ZipFile("dist/lib/windows-x86/renpy.code.new", "w", zipfile.ZIP_STORED)
|
||||
|
||||
seen = { }
|
||||
|
||||
for fn in zfold.namelist():
|
||||
if fn.startswith("renpy/"):
|
||||
continue
|
||||
|
||||
if fn in seen:
|
||||
continue
|
||||
|
||||
if fn == "SDL_mixer.dll":
|
||||
continue
|
||||
|
||||
seen[fn] = True
|
||||
|
||||
zfnew.writestr(fn, zfold.read(fn))
|
||||
|
||||
zfold.close()
|
||||
zfnew.close()
|
||||
|
||||
os.unlink("dist/lib/windows-x86/renpy.code")
|
||||
os.rename("dist/lib/windows-x86/renpy.code.new", "dist/lib/windows-x86/renpy.code")
|
||||
|
||||
shutil.copy("c:/Python26/Microsoft.VC90.CRT.manifest", "Microsoft.VC90.CRT.manifest")
|
||||
shutil.copy("c:/Python26/msvcr90.dll", "msvcr90.dll")
|
||||
|
||||
move_from_dist("lib/windows-x86")
|
||||
move_from_dist("console.exe")
|
||||
move_from_dist("python26.dll")
|
||||
move_from_dist("renpy.exe")
|
||||
|
||||
|
||||
try:
|
||||
main()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
print
|
||||
print "Press return to quit."
|
||||
raw_input()
|
||||
@@ -1,81 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import collections
|
||||
import glob
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import os
|
||||
|
||||
# A map from string to filename, line number where the string is found.
|
||||
strings = collections.defaultdict(list)
|
||||
|
||||
def process(fn):
|
||||
|
||||
lineno = 0
|
||||
|
||||
for data in file(fn, "r"):
|
||||
|
||||
lineno += 1
|
||||
|
||||
matches = [ ]
|
||||
|
||||
matches += re.finditer(r'\bu\"(\\"|[^"])+\"', data)
|
||||
matches += re.finditer(r"\bu\'(\\'|[^'])+\'", data)
|
||||
|
||||
for m in matches:
|
||||
s = m.group(0)[2:-1]
|
||||
|
||||
if "\\u" in s:
|
||||
continue
|
||||
|
||||
if len(s) == 1:
|
||||
continue
|
||||
|
||||
strings[s].append("%s:%d" % (fn, lineno))
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
files = [ ]
|
||||
|
||||
files += glob.glob("launcher/*.rpy")
|
||||
files += glob.glob("common/*.rpy")
|
||||
files += glob.glob("common/*.rpym")
|
||||
files += glob.glob("common/_layout/*.rpym")
|
||||
files += glob.glob("common/_compat/*.rpym")
|
||||
|
||||
if "launcher/strings.rpy" in files:
|
||||
files.remove("launcher/strings.rpy")
|
||||
|
||||
for fn in files:
|
||||
process(fn)
|
||||
|
||||
converse = [ ]
|
||||
|
||||
for k, v in strings.iteritems():
|
||||
v = " ".join(sorted(v))
|
||||
converse.append((v, k))
|
||||
|
||||
converse.sort()
|
||||
|
||||
f = file("launcher/strings.rpy", "w")
|
||||
|
||||
files = set(i for i in os.listdir("launcher") if i.endswith(".rpy"))
|
||||
|
||||
print >>f, """\
|
||||
init python:
|
||||
LAUNCHER_RPYS = %r
|
||||
|
||||
TRANSLATION_STRINGS = [
|
||||
""" % files
|
||||
|
||||
for v, k in converse:
|
||||
# print
|
||||
# print "#:", v
|
||||
# print "#, python-format"
|
||||
|
||||
print >>f, " u\"%s\"," % unicode(k)
|
||||
|
||||
print >>f, """\
|
||||
]
|
||||
"""
|
||||
@@ -1,35 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains warpers that are used by ATL. They need to be defined
|
||||
# early, so Ren'Py knows about them when parsing other files.
|
||||
|
||||
python early hide:
|
||||
|
||||
# pause is defined internally, but would look like:
|
||||
#
|
||||
# @renpy.atl_warper
|
||||
# def pause(t):
|
||||
# if t >= 1.0:
|
||||
# return 1.0
|
||||
# else:
|
||||
# return 0.0
|
||||
|
||||
@renpy.atl_warper
|
||||
def linear(t):
|
||||
return t
|
||||
|
||||
@renpy.atl_warper
|
||||
def easeout(x):
|
||||
import math
|
||||
return 1.0 - math.cos(x * math.pi / 2.0)
|
||||
|
||||
@renpy.atl_warper
|
||||
def easein(x):
|
||||
import math
|
||||
return math.cos((1.0 - x) * math.pi / 2.0)
|
||||
|
||||
@renpy.atl_warper
|
||||
def ease(x):
|
||||
import math
|
||||
return .5 - math.cos(math.pi * x) / 2.0
|
||||
@@ -1,99 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1210 python:
|
||||
|
||||
# This is called when script_version is set, to immediately
|
||||
# run code in response to a script_version change.
|
||||
def _set_script_version(version):
|
||||
|
||||
if version is None:
|
||||
return
|
||||
|
||||
if version <= (5, 6, 0):
|
||||
config.check_properties = False
|
||||
|
||||
if version <= (6, 5, 0):
|
||||
layout.compat()
|
||||
|
||||
if version <= (6, 9, 1):
|
||||
store.library = store.config
|
||||
|
||||
if version <= (6, 9, 3):
|
||||
|
||||
# Before 6.10, these were positions, rather than transforms.
|
||||
store.left = Position(xalign=0.0)
|
||||
store.center = Position(xalign=0.5)
|
||||
store.truecenter = Position(xalign=0.5, yalign=0.5)
|
||||
store.right = Position(xalign=1.0)
|
||||
store.offscreenleft = Position(xpos=0.0, xanchor=1.0)
|
||||
store.offscreenright = Position(xpos=1.0, xanchor=0.0)
|
||||
|
||||
if version <= (6, 10, 2):
|
||||
# Before 6.11, we used the image placement to handle
|
||||
# the location of things on the screen.
|
||||
style.image_placement.xpos = 0.5
|
||||
style.image_placement.ypos = 1.0
|
||||
style.image_placement.xanchor = 0.5
|
||||
style.image_placement.yanchor = 1.0
|
||||
|
||||
config.transform_uses_child_position = False
|
||||
config.default_transform = None
|
||||
config.start_scene_black = True
|
||||
|
||||
if version <= (6, 11, 0):
|
||||
config.movetransition_respects_offsets = False
|
||||
|
||||
|
||||
init 1210 python hide::
|
||||
|
||||
# This returns true if the script_version is <= the
|
||||
# script_version supplied. Give it the last script version
|
||||
# where an old version was used.
|
||||
def compat(x, y, z):
|
||||
return config.script_version and config.script_version <= (x, y, z)
|
||||
|
||||
# Compat for changes to with-callback.
|
||||
if compat(5, 4, 5):
|
||||
if config.with_callback:
|
||||
def compat_with_function(trans, paired, old=config.with_callback):
|
||||
old(trans)
|
||||
return trans
|
||||
|
||||
config.with_callback = compat_with_function
|
||||
|
||||
if not config.sound:
|
||||
config.has_sound = False
|
||||
config.has_music = False
|
||||
config.has_voice = False
|
||||
|
||||
# Compat for SFont recoloring.
|
||||
if compat(5, 1, 1):
|
||||
config.recolor_sfonts = False
|
||||
|
||||
if compat(5, 5, 4):
|
||||
config.implicit_with_none = False
|
||||
|
||||
# Compat for changes to button look.
|
||||
if compat(5, 5, 4):
|
||||
style.button.setdefault(xpos=0.5, xanchor=0.5)
|
||||
style.menu_button.clear()
|
||||
style.menu_button_text.clear()
|
||||
|
||||
if compat(5, 6, 6):
|
||||
config.reject_midi = False
|
||||
|
||||
if compat(6, 2, 0):
|
||||
config.reject_backslash = False
|
||||
|
||||
if compat(6, 9, 0):
|
||||
style.motion.clear()
|
||||
|
||||
if "Fullscreen" in config.translations:
|
||||
fs = _("Fullscreen")
|
||||
config.translations.setdefault("Fullscreen 4:3", fs + " 4:3")
|
||||
config.translations.setdefault("Fullscreen 16:9", fs + " 16:9")
|
||||
config.translations.setdefault("Fullscreen 16:10", fs + " 16:10")
|
||||
|
||||
for i in layout.compat_funcs:
|
||||
i()
|
||||
@@ -1,193 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains a number of definitions of standard
|
||||
# locations and transitions. We've moved them into the common
|
||||
# directory so that it's easy for an updated version of all of these
|
||||
# definitions.
|
||||
|
||||
init -1110:
|
||||
|
||||
transform reset:
|
||||
alpha 1 rotate None zoom 1 xzoom 1 yzoom 1 align (0, 0) alignaround (0, 0) subpixel False size None crop None
|
||||
|
||||
# These are positions that can be used inside at clauses. We set
|
||||
# them up here so that they can be used throughout the program.
|
||||
transform left:
|
||||
xpos 0.0 xanchor 0.0 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform right:
|
||||
xpos 1.0 xanchor 1.0 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform center:
|
||||
xpos 0.5 xanchor 0.5 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform truecenter:
|
||||
xpos 0.5 xanchor 0.5 ypos 0.5 yanchor 0.5
|
||||
|
||||
# Offscreen positions for use with the move transition. Images at
|
||||
# these positions are still shown (and consume
|
||||
# resources)... remember to hide the image after the transition.
|
||||
transform offscreenleft:
|
||||
xpos 0.0 xanchor 1.0 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform offscreenright:
|
||||
xpos 1.0 xanchor 0.0 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform default:
|
||||
alpha 1 rotate None zoom 1 xzoom 1 yzoom 1 align (0, 0) alignaround (0, 0) subpixel False size None crop None
|
||||
xpos 0.5 xanchor 0.5 ypos 1.0 yanchor 1.0
|
||||
|
||||
python:
|
||||
config.default_transform = default
|
||||
|
||||
|
||||
init -1110 python:
|
||||
|
||||
_define = define = object()
|
||||
|
||||
# Transitions ############################################################
|
||||
|
||||
# Simple transitions.
|
||||
fade = Fade(.5, 0, .5) # Fade to black and back.
|
||||
dissolve = Dissolve(0.5)
|
||||
pixellate = Pixellate(1.0, 5)
|
||||
|
||||
# Various uses of CropMove.
|
||||
wiperight = CropMove(1.0, "wiperight")
|
||||
wipeleft = CropMove(1.0, "wipeleft")
|
||||
wipeup = CropMove(1.0, "wipeup")
|
||||
wipedown = CropMove(1.0, "wipedown")
|
||||
|
||||
slideright = CropMove(1.0, "slideright")
|
||||
slideleft = CropMove(1.0, "slideleft")
|
||||
slideup = CropMove(1.0, "slideup")
|
||||
slidedown = CropMove(1.0, "slidedown")
|
||||
|
||||
slideawayright = CropMove(1.0, "slideawayright")
|
||||
slideawayleft = CropMove(1.0, "slideawayleft")
|
||||
slideawayup = CropMove(1.0, "slideawayup")
|
||||
slideawaydown = CropMove(1.0, "slideawaydown")
|
||||
|
||||
irisout = CropMove(1.0, "irisout")
|
||||
irisin = CropMove(1.0, "irisin")
|
||||
|
||||
# Ease images around. These are basically cosine-warped moves.
|
||||
def _ease_out_time_warp(x):
|
||||
import math
|
||||
return 1.0 - math.cos(x * math.pi / 2.0)
|
||||
|
||||
def _ease_in_time_warp(x):
|
||||
import math
|
||||
return math.cos((1.0 - x) * math.pi / 2.0)
|
||||
|
||||
def _ease_time_warp(x):
|
||||
import math
|
||||
return .5 - math.cos(math.pi * x) / 2.0
|
||||
|
||||
# This defines a family of move transitions.
|
||||
def move_transitions(prefix, delay, time_warp=None, in_time_warp=None, out_time_warp=None, old=False, layers=[ 'master' ], **kwargs):
|
||||
moves = {
|
||||
"" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs)),
|
||||
|
||||
"inright" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((1.0, None, 0.0, None), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
"inleft" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((0.0, None, 1.0, None), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
"intop" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((None, 0.0, None, 1.0), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
"inbottom" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((None, 1.0, None, 0.0), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
"outright" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((1.0, None, 0.0, None), time_warp=out_time_warp, **kwargs)),
|
||||
|
||||
"outleft" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((0.0, None, 1.0, None), time_warp=out_time_warp, **kwargs)),
|
||||
|
||||
"outtop" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((None, 0.0, None, 1.0), time_warp=out_time_warp, **kwargs)),
|
||||
|
||||
"outbottom" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((None, 1.0, None, 0.0), time_warp=time_warp, **kwargs)),
|
||||
}
|
||||
|
||||
for k, v in moves.iteritems():
|
||||
setattr(store, prefix + k, v)
|
||||
|
||||
define.move_transitions = move_transitions
|
||||
del move_transitions
|
||||
|
||||
define.move_transitions("move", 0.5)
|
||||
define.move_transitions("ease", 0.5, _ease_time_warp, _ease_in_time_warp, _ease_out_time_warp)
|
||||
|
||||
# Zoom-based transitions.
|
||||
zoomin = MoveTransition(0.5, enter_factory=ZoomInOut(0.01, 1.0))
|
||||
zoomout = MoveTransition(0.5, leave_factory=ZoomInOut(1.0, 0.01))
|
||||
zoominout = MoveTransition(0.5, enter_factory=ZoomInOut(0.01, 1.0), leave_factory=ZoomInOut(1.0, 0.01))
|
||||
|
||||
# These shake the screen up and down for a quarter second.
|
||||
# The delay needs to be an integer multiple of the period.
|
||||
vpunch = Move((0, 10), (0, -10), .10, bounce=True, repeat=True, delay=.275)
|
||||
hpunch = Move((15, 0), (-15, 0), .10, bounce=True, repeat=True, delay=.275)
|
||||
|
||||
# These use the ImageDissolve to do some nifty effects.
|
||||
blinds = ImageDissolve(im.Tile("blindstile.png"), 1.0, 8)
|
||||
squares = ImageDissolve(im.Tile("squarestile.png"), 1.0, 256)
|
||||
|
||||
|
||||
init -1110:
|
||||
image black = Solid("#000")
|
||||
|
||||
init 1110 python:
|
||||
if not hasattr(store, 'narrator'):
|
||||
narrator = Character(None, kind=adv, what_style='say_thought')
|
||||
|
||||
if not hasattr(store, 'name_only'):
|
||||
name_only = adv
|
||||
|
||||
if not hasattr(store, 'centered'):
|
||||
centered = Character(None, what_style="centered_text", window_style="centered_window")
|
||||
|
||||
# This is necessary to ensure that config.default_transform works.
|
||||
if config.default_transform:
|
||||
config.default_transform._show()
|
||||
@@ -1,180 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This contains code to choose between OpenGL and Software rendering, when
|
||||
# a system supports both.
|
||||
|
||||
init -1024:
|
||||
screen _gl_test:
|
||||
frame:
|
||||
xalign .5
|
||||
yalign .33
|
||||
|
||||
xpadding 20
|
||||
ypadding 20
|
||||
|
||||
has vbox
|
||||
|
||||
label _(u"Graphics Acceleration")
|
||||
|
||||
null height 10
|
||||
|
||||
textbutton _(u"Automatically Choose"):
|
||||
size_group "gl"
|
||||
action SetField(persistent, "_gl_test", "auto")
|
||||
textbutton _(u"Prefer Software Renderer"):
|
||||
size_group "gl"
|
||||
action SetField(persistent, "_gl_test", "sw")
|
||||
textbutton _(u"Prefer OpenGL Renderer"):
|
||||
size_group "gl"
|
||||
action SetField(persistent, "_gl_test", "gl")
|
||||
|
||||
null height 10
|
||||
|
||||
textbutton _(u"Continue"):
|
||||
size_group "gl"
|
||||
action Return(True)
|
||||
|
||||
init -1024 python:
|
||||
# The image that we fill the screen with in GL-test mode.
|
||||
config.gl_test_image = "black"
|
||||
|
||||
class __GLTest(renpy.Displayable):
|
||||
"""
|
||||
This counts the number of times it's been rendered, and
|
||||
the number of seconds it's been displayed, and uses them
|
||||
to make the decisions as to if OpenGL is working or not.
|
||||
"""
|
||||
|
||||
def __init__(self, frames, fps, timeout):
|
||||
super(__GLTest, self).__init__()
|
||||
|
||||
self.target = 1.0 * frames / fps
|
||||
self.frames = frames
|
||||
self.timeout = timeout
|
||||
|
||||
self.times = [ ]
|
||||
self.success = False
|
||||
|
||||
def render(self, width, height, st, at):
|
||||
self.times.append(st)
|
||||
|
||||
renpy.redraw(self, 0)
|
||||
|
||||
if len(self.times) >= self.frames:
|
||||
if (self.times[-1] - self.times[-self.frames]) < self.target:
|
||||
self.success = True
|
||||
renpy.timeout(0)
|
||||
|
||||
rv = renpy.Render(width, height)
|
||||
return rv
|
||||
|
||||
def event(self, ev, x, y, st):
|
||||
|
||||
if self.success:
|
||||
return True
|
||||
|
||||
if st > self.timeout:
|
||||
return False
|
||||
|
||||
renpy.timeout(self.timeout - st)
|
||||
|
||||
|
||||
def __gl_prefer_renderers(renderers):
|
||||
"""
|
||||
Forces the current renderer to be renderer, one of gl or sw.
|
||||
"""
|
||||
|
||||
if renpy.display.prefer_renderers == renderers:
|
||||
return
|
||||
|
||||
renpy.display.prefer_renderers = renderers
|
||||
renpy.display_reset()
|
||||
|
||||
def __gl_prompt():
|
||||
"""
|
||||
Decides if we want to prompt the user to enable OpenGL mode.
|
||||
If so, shows a screen that allows the user to alter the
|
||||
OpenGL setting.
|
||||
"""
|
||||
|
||||
if not renpy.display.interface.safe_mode:
|
||||
return
|
||||
|
||||
__gl_prefer_renderers("sw")
|
||||
|
||||
renpy.call_screen("_gl_test")
|
||||
|
||||
renpy.display.interface.safe_mode = False
|
||||
|
||||
def __gl_test():
|
||||
"""
|
||||
Makes the decision as to if we should use GL or SW mode.
|
||||
"""
|
||||
|
||||
import os
|
||||
if "RENPY_RENDERER" in os.environ:
|
||||
return
|
||||
|
||||
# Our decision survives a restart.
|
||||
if _restart:
|
||||
return
|
||||
|
||||
# If GL is disabled, don't bother.
|
||||
if not config.gl_enable:
|
||||
return
|
||||
|
||||
__gl_prompt()
|
||||
|
||||
if persistent._gl_test == "gl":
|
||||
__gl_prefer_renderers("gl,sw")
|
||||
return
|
||||
|
||||
if persistent._gl_test == "sw":
|
||||
__gl_prefer_renderers("sw")
|
||||
return
|
||||
|
||||
__gl_prefer_renderers("gl,sw")
|
||||
|
||||
ui.pausebehavior(0)
|
||||
ui.interact(suppress_underlay=True, suppress_overlay=True)
|
||||
|
||||
# If GL is able to render FRAMES frames at FPS fps in less
|
||||
# than DELAY seconds, we consider it to be operational, and
|
||||
# continue in GL mode. Otherwise, we rever to software
|
||||
# rendering mode.
|
||||
FRAMES = 5
|
||||
FPS = 15
|
||||
DELAY = 1
|
||||
|
||||
renpy.transition(Dissolve(DELAY), always=True, force=True)
|
||||
ui.add(__GLTest(FRAMES, FPS, DELAY))
|
||||
result = ui.interact(suppress_overlay=True, suppress_underlay=True)
|
||||
|
||||
if result:
|
||||
__gl_prefer_renderers("gl,sw")
|
||||
else:
|
||||
__gl_prefer_renderers("sw")
|
||||
|
||||
# Init-time code:
|
||||
# Make a guess as to what modes we should be in.
|
||||
if persistent._gl_test is None:
|
||||
persistent._gl_test = "auto"
|
||||
|
||||
if persistent._gl_test == "sw":
|
||||
renpy.display.prefer_renderers = "sw"
|
||||
|
||||
|
||||
label _gl_test:
|
||||
|
||||
# Show the test image.
|
||||
scene
|
||||
show expression config.gl_test_image
|
||||
|
||||
$ __gl_test()
|
||||
|
||||
# Hide the test image.
|
||||
scene
|
||||
|
||||
return
|
||||
|
||||
@@ -1,891 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file consists of renpy functions that aren't expected to be
|
||||
# touched by the user too much. We reserve the _ prefix for names
|
||||
# defined in the library.
|
||||
|
||||
init -1180 python:
|
||||
|
||||
# These are settings that the user can tweak to control the
|
||||
# look of the main menu and the load/save/escape screens.
|
||||
|
||||
# basics: The version of Ren'Py this script is intended for, or
|
||||
# None if it's intended for the current version.
|
||||
config.script_version = None
|
||||
|
||||
# The minimum version of the module we work with. Don't change
|
||||
# this unless you know what you're doing.
|
||||
config.module_version = 6007001
|
||||
|
||||
# Should we warn the user if the module is missing or has a bad
|
||||
# version?
|
||||
config.module_warning = False
|
||||
|
||||
# basics: A map from a string that's displayed by the interface to
|
||||
# a translated value of that string.
|
||||
config.translations = { }
|
||||
|
||||
# Used internally to maintain compatiblity with old
|
||||
# translations of strings.
|
||||
config.old_names = { }
|
||||
|
||||
# basics: True if the skip indicator should be shown.
|
||||
config.skip_indicator = True
|
||||
|
||||
# basics: The width of a thumbnail.
|
||||
config.thumbnail_width = 66
|
||||
|
||||
# basics: The height of a thumbnail.
|
||||
config.thumbnail_height = 50
|
||||
|
||||
# basics: If not None, the default value of the fullscreen
|
||||
# preference when the game is first run.
|
||||
config.default_fullscreen = None
|
||||
|
||||
# basics: If not None, the default value of the text_cps
|
||||
# preference when the game is first run.
|
||||
config.default_text_cps = None
|
||||
|
||||
# If not None, the default value of afm_time
|
||||
config.default_afm_time = None
|
||||
|
||||
# If not None, the default value of afm_enable
|
||||
config.default_afm_enable = None
|
||||
|
||||
# Should we automatically define images?
|
||||
config.automatic_images = None
|
||||
|
||||
# Prefixes to strip from automatic images.
|
||||
config.automatic_images_strip = [ ]
|
||||
|
||||
# A save to automatically load, if it exists.
|
||||
config.auto_load = None
|
||||
|
||||
# Layers to clear when entering the menus.
|
||||
config.menu_clear_layers = [ ]
|
||||
|
||||
# Should we start the game with scene black or just scene?
|
||||
config.start_scene_black = False
|
||||
|
||||
# This is updated to give the user an idea of where a save is
|
||||
# taking place.
|
||||
save_name = ''
|
||||
|
||||
# Should the window be shown during transitions?
|
||||
_window_during_transitions = False
|
||||
|
||||
def _default_with_callback(trans, paired=None):
|
||||
if (_window_during_transitions and not
|
||||
renpy.context_nesting_level() and
|
||||
not renpy.count_displayables_in_layer('transient')):
|
||||
|
||||
# narrator("", interact=False)
|
||||
ui.window(style=style.say_window["empty"])
|
||||
ui.null()
|
||||
|
||||
return trans
|
||||
|
||||
config.with_callback = _default_with_callback
|
||||
|
||||
|
||||
def _default_empty_window():
|
||||
|
||||
who = _last_say_who
|
||||
|
||||
if who is not None:
|
||||
who = eval(who)
|
||||
|
||||
if who is None:
|
||||
who = narrator
|
||||
|
||||
if isinstance(who, NVLCharacter):
|
||||
nvl_show_core()
|
||||
else:
|
||||
store.narrator("", interact=False)
|
||||
|
||||
config.empty_window = _default_empty_window
|
||||
|
||||
style.skip_indicator = Style(style.default, heavy=True, help='The skip indicator.')
|
||||
style.skip_indicator.xpos = 10
|
||||
style.skip_indicator.ypos = 10
|
||||
|
||||
# This is used to jump to a label with a transition.
|
||||
def _intra_jumps_core(label, transition):
|
||||
renpy.transition(getattr(config, transition))
|
||||
renpy.jump(label)
|
||||
|
||||
_intra_jumps = renpy.curry(_intra_jumps_core)
|
||||
|
||||
|
||||
# The function that's used to translate strings in the game menu.
|
||||
def _(s):
|
||||
"""
|
||||
Translates s into another language or something.
|
||||
"""
|
||||
|
||||
if s in config.translations:
|
||||
return config.translations[s]
|
||||
|
||||
if s in config.old_names and config.old_names[s] in config.translations:
|
||||
return config.translations[config.old_names[s]]
|
||||
|
||||
return s
|
||||
|
||||
# Are the windows currently hidden?
|
||||
_windows_hidden = False
|
||||
|
||||
init -1180 python:
|
||||
|
||||
def toggle_skipping():
|
||||
|
||||
if not config.skipping:
|
||||
config.skipping = "slow"
|
||||
else:
|
||||
config.skipping = None
|
||||
|
||||
if renpy.context()._menu:
|
||||
renpy.jump("_noisy_return")
|
||||
else:
|
||||
renpy.restart_interaction()
|
||||
|
||||
config.help = None
|
||||
|
||||
def _help(help=None):
|
||||
|
||||
if help is None:
|
||||
help = config.help
|
||||
|
||||
if help is None:
|
||||
return
|
||||
|
||||
if renpy.has_label(help):
|
||||
renpy.call_in_new_context(help)
|
||||
return
|
||||
|
||||
_preferences.fullscreen = False
|
||||
|
||||
try:
|
||||
import webbrowser
|
||||
webbrowser.open_new("file:///" + config.basedir + "/" + help)
|
||||
except:
|
||||
pass
|
||||
|
||||
# Called to make a screenshot happen.
|
||||
def _screenshot():
|
||||
import os.path
|
||||
import os
|
||||
import __main__
|
||||
|
||||
pattern = os.environ.get("RENPY_SCREENSHOT_PATTERN", "screenshot%04d.png")
|
||||
|
||||
# Pick the directory to save into.
|
||||
dest = config.renpy_base.rstrip("/")
|
||||
|
||||
# Guess if we're an OSX App.
|
||||
if dest.endswith("/Contents/Resources/autorun"):
|
||||
# Go up 4 directories.
|
||||
dest = os.path.dirname(dest)
|
||||
dest = os.path.dirname(dest)
|
||||
dest = os.path.dirname(dest)
|
||||
dest = os.path.dirname(dest)
|
||||
|
||||
# Try to pick a filename.
|
||||
i = 1
|
||||
while True:
|
||||
fn = dest + "/" + pattern % i
|
||||
if not os.path.exists(fn):
|
||||
break
|
||||
i += 1
|
||||
|
||||
try:
|
||||
renpy.screenshot(fn)
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
init -1180 python hide:
|
||||
|
||||
def dump_styles():
|
||||
if config.developer:
|
||||
renpy.style.write_text("styles.txt")
|
||||
|
||||
# This is run when entering the game menu.
|
||||
config.game_menu_action = None
|
||||
|
||||
def invoke_game_menu():
|
||||
if renpy.context()._menu:
|
||||
if renpy.context()._main_menu:
|
||||
return
|
||||
else:
|
||||
renpy.jump("_noisy_return")
|
||||
else:
|
||||
if config.game_menu_action:
|
||||
renpy.display.behavior.run(config.game_menu_action)
|
||||
else:
|
||||
renpy.call_in_new_context('_game_menu')
|
||||
|
||||
def keymap_toggle_skipping():
|
||||
if renpy.context()._menu:
|
||||
return
|
||||
|
||||
toggle_skipping()
|
||||
|
||||
def fast_skip():
|
||||
if config.fast_skipping or config.developer:
|
||||
config.skipping = "fast"
|
||||
|
||||
if renpy.context()._menu:
|
||||
renpy.jump("_noisy_return")
|
||||
|
||||
def reload_game():
|
||||
if not config.developer:
|
||||
return
|
||||
|
||||
renpy.call_in_new_context("_save_reload_game")
|
||||
|
||||
def launch_editor():
|
||||
if not config.developer:
|
||||
return
|
||||
|
||||
filename, line = renpy.get_filename_line()
|
||||
renpy.launch_editor([ filename ], line)
|
||||
|
||||
# The default keymap. We might also want to put some of this into
|
||||
# the launcher.
|
||||
km = renpy.Keymap(
|
||||
rollback = renpy.rollback,
|
||||
screenshot = _screenshot,
|
||||
toggle_fullscreen = renpy.toggle_fullscreen,
|
||||
toggle_music = renpy.toggle_music,
|
||||
toggle_skip = keymap_toggle_skipping,
|
||||
fast_skip = fast_skip,
|
||||
game_menu = invoke_game_menu,
|
||||
hide_windows = renpy.curried_call_in_new_context("_hide_windows"),
|
||||
launch_editor = launch_editor,
|
||||
dump_styles = dump_styles,
|
||||
reload_game = reload_game,
|
||||
developer = renpy.curried_call_in_new_context("_developer"),
|
||||
quit = renpy.quit_event,
|
||||
iconify = renpy.iconify,
|
||||
help = _help,
|
||||
)
|
||||
|
||||
config.underlay = [ km ]
|
||||
|
||||
def skip_indicator():
|
||||
|
||||
### skip_indicator default
|
||||
# (text) The style and placement of the skip indicator.
|
||||
|
||||
if config.skip_indicator is True:
|
||||
|
||||
if config.skipping == "slow" and config.skip_indicator:
|
||||
ui.text(_(u"Skip Mode"), style='skip_indicator')
|
||||
|
||||
if config.skipping == "fast" and config.skip_indicator:
|
||||
ui.text(_(u"Fast Skip Mode"), style='skip_indicator')
|
||||
|
||||
return
|
||||
|
||||
if not config.skip_indicator:
|
||||
return
|
||||
|
||||
if not config.skipping:
|
||||
return
|
||||
|
||||
ui.add(renpy.easy.displayable(config.skip_indicator))
|
||||
|
||||
config.overlay_functions.append(skip_indicator)
|
||||
|
||||
|
||||
def hyperlink_styler(target):
|
||||
return style.hyperlink_text
|
||||
|
||||
def hyperlink_function(target):
|
||||
if target.startswith("http:"):
|
||||
try:
|
||||
import webbrowser
|
||||
webbrowser.open(target)
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
renpy.call_in_new_context(target)
|
||||
|
||||
config.hyperlink_styler = hyperlink_styler
|
||||
config.hyperlink_callback = hyperlink_function
|
||||
|
||||
|
||||
config.extend_interjection = "{fast}"
|
||||
|
||||
init -1180 python:
|
||||
def extend(what, interact=True):
|
||||
who = _last_say_who
|
||||
|
||||
if who is not None:
|
||||
who = eval(who)
|
||||
|
||||
if who is None:
|
||||
who = narrator
|
||||
|
||||
if isinstance(who, basestring):
|
||||
who = unknown.copy(who)
|
||||
|
||||
# This ensures extend works even with NVL mode.
|
||||
who.do_extend()
|
||||
|
||||
what = _last_say_what + config.extend_interjection + what
|
||||
|
||||
renpy.exports.say(who, what, interact=interact)
|
||||
store._last_say_what = what
|
||||
|
||||
extend.record_say = False
|
||||
|
||||
|
||||
label _hide_windows:
|
||||
|
||||
if renpy.context()._menu:
|
||||
return
|
||||
|
||||
if _windows_hidden:
|
||||
return
|
||||
|
||||
python:
|
||||
_windows_hidden = True
|
||||
ui.saybehavior(dismiss=['dismiss', 'hide_windows'])
|
||||
ui.interact(suppress_overlay=True, suppress_window=True)
|
||||
_windows_hidden = False
|
||||
|
||||
return
|
||||
|
||||
|
||||
# This code here handles check for the correct version of the Ren'Py module.
|
||||
|
||||
label _save_reload_game:
|
||||
python hide:
|
||||
renpy.take_screenshot((config.thumbnail_width, config.thumbnail_height))
|
||||
|
||||
ui.add(Solid((0, 0, 0, 255)))
|
||||
ui.text("Saving game...",
|
||||
size=32, xalign=0.5, yalign=0.5, color=(255, 255, 255, 255))
|
||||
|
||||
renpy.pause(0)
|
||||
renpy.save("reload", "reload save game")
|
||||
|
||||
renpy.music.stop()
|
||||
|
||||
persistent._reload_save = "reload"
|
||||
|
||||
ui.add(Solid((0, 0, 0, 255)))
|
||||
ui.text("Reloading script...",
|
||||
size=32, xalign=0.5, yalign=0.5, color=(255, 255, 255, 255))
|
||||
|
||||
renpy.pause(0)
|
||||
|
||||
renpy.utter_restart()
|
||||
|
||||
label _load_reload_game:
|
||||
|
||||
if not persistent._reload_save:
|
||||
return
|
||||
|
||||
python hide:
|
||||
save = persistent._reload_save
|
||||
persistent._reload_save = 0
|
||||
|
||||
ui.add(Solid((0, 0, 0, 255)))
|
||||
ui.text("Reloading game...",
|
||||
size=32, xalign=0.5, yalign=0.5, color=(255, 255, 255, 255))
|
||||
|
||||
ui.pausebehavior(0)
|
||||
ui.interact(suppress_underlay=True, suppress_overlay=True)
|
||||
|
||||
renpy.load(save)
|
||||
|
||||
return
|
||||
|
||||
init -1001:
|
||||
image text = renpy.ParameterizedText(style="centered_text")
|
||||
|
||||
# Lock the library object.
|
||||
$ config.locked = True
|
||||
|
||||
|
||||
# Implement config.default_fullscreen and config.default_text_cps.
|
||||
init 1180 python:
|
||||
|
||||
if not persistent._set_preferences:
|
||||
persistent._set_preferences = True
|
||||
|
||||
if config.default_fullscreen is not None:
|
||||
_preferences.fullscreen = config.default_fullscreen
|
||||
|
||||
if config.default_text_cps is not None:
|
||||
_preferences.text_cps = config.default_text_cps
|
||||
|
||||
if config.default_afm_time is not None:
|
||||
_preferences.afm_time = config.default_afm_time
|
||||
|
||||
if config.default_afm_enable is not None:
|
||||
_preferences.afm_enable = config.default_afm_enable
|
||||
_preferences.using_afm_enable = True
|
||||
else:
|
||||
_preferences.afm_enable = True
|
||||
_preferences.using_afm_enable = False
|
||||
|
||||
|
||||
if config.developer:
|
||||
|
||||
def _inspector(l):
|
||||
|
||||
ui.add("#000")
|
||||
ui.window(xmargin=20, ymargin=20, style='default')
|
||||
ui.vbox()
|
||||
|
||||
ui.text("Style Inspector")
|
||||
ui.text("")
|
||||
|
||||
if not l:
|
||||
ui.text("Nothing to inspect.")
|
||||
|
||||
for depth, width, height, d in l:
|
||||
|
||||
s = d.style
|
||||
|
||||
while s:
|
||||
if s.name:
|
||||
break
|
||||
|
||||
if s.parent:
|
||||
s = style.get(s.parent)
|
||||
else:
|
||||
break
|
||||
|
||||
name = s.name[0] + "".join([ "[%r]" % i for i in s.name[1:] ])
|
||||
|
||||
ui.text(" " * depth + u" \u2022 " + d.__class__.__name__ + " : " + name + " (%dx%d)" % (width, height))
|
||||
|
||||
ui.text("")
|
||||
ui.text("(click to continue)")
|
||||
|
||||
ui.close()
|
||||
ui.saybehavior()
|
||||
ui.interact(suppress_overlay=True, suppress_underlay=True)
|
||||
|
||||
return
|
||||
|
||||
config.inspector = _inspector
|
||||
|
||||
##############################################################################
|
||||
# Code that originated in 00gamemenu.rpy
|
||||
init -1180 python:
|
||||
|
||||
######################################################################
|
||||
# First up, we define a bunch of configuration variable, which the
|
||||
# user can change.
|
||||
|
||||
# menus: Music to play when entering the game menu.
|
||||
config.game_menu_music = None
|
||||
|
||||
# menus: Sound played when entering the library without clicking a
|
||||
# button.
|
||||
config.enter_sound = None
|
||||
|
||||
# menus: Sound played when leaving the library without clicking a
|
||||
# button.
|
||||
config.exit_sound = None
|
||||
|
||||
# menus: Transition that occurs when entering the game menu.
|
||||
config.enter_transition = None
|
||||
|
||||
# menus: Transition that occurs when leaving the game menu.
|
||||
config.exit_transition = None
|
||||
|
||||
# menus: Transition that's used when going from one screen to another.
|
||||
config.intra_transition = None
|
||||
|
||||
# menus: Transition that's used when going from the main to the game
|
||||
# menu.
|
||||
config.main_game_transition = None
|
||||
|
||||
# menus: Transition that's used when going from the game to the main
|
||||
# menu.
|
||||
config.game_main_transition = None
|
||||
|
||||
# menus: Transition that's used at the end of the game, when returning
|
||||
# to the main menu.
|
||||
config.end_game_transition = None
|
||||
|
||||
# menus: Transition that's used at the end of the splash screen, when
|
||||
# it is shown.
|
||||
config.end_splash_transition = None
|
||||
|
||||
# Transition that's used after the game is loaded.
|
||||
config.after_load_transition = None
|
||||
|
||||
# basics: True if autosave should be used.
|
||||
config.has_autosave = True
|
||||
|
||||
# basics: True if quicksave has been enabled.
|
||||
config.has_quicksave = False
|
||||
|
||||
# A list of layers to clear when entering the main and game menus.
|
||||
config.clear_layers = [ ]
|
||||
|
||||
# The _window_subtitle used inside menus.
|
||||
config.menu_window_subtitle = ''
|
||||
|
||||
# The screen that we go to when entering the game menu.
|
||||
_game_menu_screen = None
|
||||
|
||||
style.error_root = Style(style.default)
|
||||
style.error_title = Style(style.default)
|
||||
style.error_body = Style(style.default)
|
||||
|
||||
def _show_exception(title, message):
|
||||
|
||||
ui.window(style='error_root')
|
||||
ui.vbox()
|
||||
|
||||
ui.text(title, style='error_title')
|
||||
ui.text("")
|
||||
ui.text(message, style='error_body')
|
||||
ui.text("")
|
||||
ui.text(_(u"Please click to continue."), style='error_body')
|
||||
|
||||
ui.close()
|
||||
|
||||
ui.saybehavior()
|
||||
|
||||
ui.interact()
|
||||
|
||||
|
||||
# Run at the end of init, to set up autosaving based on the user's
|
||||
# choices.
|
||||
init 1180 python:
|
||||
|
||||
if config.has_autosave:
|
||||
config.autosave_slots = 10
|
||||
else:
|
||||
config.autosave_frequency = None
|
||||
|
||||
label _enter_menu:
|
||||
python hide:
|
||||
renpy.movie_stop(only_fullscreen=True)
|
||||
renpy.take_screenshot((config.thumbnail_width, config.thumbnail_height))
|
||||
|
||||
for i in config.menu_clear_layers:
|
||||
renpy.scene(layer=i)
|
||||
|
||||
renpy.context()._menu = True
|
||||
|
||||
# This may be changed, if we are already in the main menu.
|
||||
renpy.context()._main_menu = False
|
||||
renpy.context_dynamic("main_menu")
|
||||
renpy.context_dynamic("_window_subtitle")
|
||||
renpy.context_dynamic("_window")
|
||||
|
||||
store.main_menu = False
|
||||
store._window_subtitle = config.menu_window_subtitle
|
||||
store._window = False
|
||||
|
||||
store.mouse_visible = True
|
||||
store.suppress_overlay = True
|
||||
ui.clear()
|
||||
|
||||
for i in config.clear_layers:
|
||||
renpy.scene(layer=i)
|
||||
|
||||
return
|
||||
|
||||
# Factored this all into one place, to make our lives a bit easier.
|
||||
label _enter_game_menu:
|
||||
call _enter_menu from _call__enter_menu_2
|
||||
|
||||
$ renpy.transition(config.enter_transition)
|
||||
|
||||
if renpy.has_label("enter_game_menu"):
|
||||
call expression "enter_game_menu" from _call_enter_game_menu_1
|
||||
|
||||
if config.game_menu_music:
|
||||
$ renpy.music.play(config.game_menu_music, if_changed=True)
|
||||
|
||||
return
|
||||
|
||||
# Entry points from the game into menu-space.
|
||||
label _game_menu(_game_menu_screen=_game_menu_screen):
|
||||
if not _game_menu_screen:
|
||||
return
|
||||
|
||||
$ renpy.play(config.enter_sound)
|
||||
|
||||
call _enter_game_menu from _call__enter_game_menu_0
|
||||
|
||||
if renpy.has_label("game_menu"):
|
||||
jump expression "game_menu"
|
||||
|
||||
if renpy.has_screen(_game_menu_screen):
|
||||
$ renpy.show_screen(_game_menu_screen)
|
||||
$ ui.interact()
|
||||
jump _noisy_return
|
||||
|
||||
jump expression _game_menu_screen
|
||||
|
||||
label _game_menu_save:
|
||||
call _enter_game_menu from _call__enter_game_menu_1
|
||||
|
||||
if renpy.has_label("_save_screen"):
|
||||
jump expression "_save_screen"
|
||||
else:
|
||||
jump expression "save_screen"
|
||||
|
||||
label _game_menu_load:
|
||||
call _enter_game_menu from _call__enter_game_menu_2
|
||||
|
||||
if renpy.has_label("_load_screen"):
|
||||
jump expression "_load_screen"
|
||||
else:
|
||||
jump expression "load_screen"
|
||||
|
||||
label _game_menu_preferences:
|
||||
call _enter_game_menu from _call__enter_game_menu_3
|
||||
|
||||
if renpy.has_label("_prefs_screen"):
|
||||
jump expression "_prefs_screen"
|
||||
else:
|
||||
jump expression "preferences_screen"
|
||||
|
||||
label _quit:
|
||||
$ renpy.quit()
|
||||
|
||||
label _return_skipping:
|
||||
$ config.skipping = "slow"
|
||||
jump _return
|
||||
|
||||
# Make some noise, then return.
|
||||
label _noisy_return:
|
||||
$ renpy.play(config.exit_sound)
|
||||
|
||||
# Return to the game.
|
||||
label _return:
|
||||
|
||||
if renpy.context()._main_menu:
|
||||
$ renpy.transition(config.game_main_transition)
|
||||
jump _main_menu_screen
|
||||
|
||||
$ renpy.transition(config.exit_transition)
|
||||
|
||||
return
|
||||
|
||||
label _confirm_quit:
|
||||
|
||||
if renpy.has_label("confirm_quit"):
|
||||
jump expression "confirm_quit"
|
||||
elif renpy.has_label("_compat_confirm_quit"):
|
||||
jump expression "_compat_confirm_quit"
|
||||
else:
|
||||
jump expression "_quit_prompt"
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Code that originated in 00mainmenu.rpy
|
||||
|
||||
init -1180 python hide:
|
||||
|
||||
# menus: Music to play at the main menu.
|
||||
config.main_menu_music = None
|
||||
|
||||
# advanced: Callbacks to run at start.
|
||||
config.start_callbacks = [ ]
|
||||
|
||||
|
||||
# This fixes up the context, if necessary, then calls the real
|
||||
# after_load.
|
||||
label _after_load:
|
||||
$ renpy.context()._menu = False
|
||||
$ renpy.context()._main_menu = False
|
||||
|
||||
if config.after_load_transition:
|
||||
$ renpy.transition(config.after_load_transition, force=True)
|
||||
|
||||
if renpy.has_label("after_load"):
|
||||
jump expression "after_load"
|
||||
else:
|
||||
return
|
||||
|
||||
|
||||
# This is the true starting point of the program. Sssh... Don't
|
||||
# tell anyone.
|
||||
label _start:
|
||||
|
||||
python hide:
|
||||
renpy.context()._menu = False
|
||||
renpy.context()._main_menu = False
|
||||
|
||||
for i in config.start_callbacks:
|
||||
i()
|
||||
|
||||
$ renpy.block_rollback()
|
||||
|
||||
call _gl_test
|
||||
|
||||
call _load_reload_game from _call__load_reload_game_1
|
||||
|
||||
if not _restart and config.auto_load and renpy.can_load(config.auto_load):
|
||||
$ renpy.load(config.auto_load)
|
||||
|
||||
if config.start_scene_black:
|
||||
scene black
|
||||
else:
|
||||
scene
|
||||
|
||||
if not _restart:
|
||||
$ ui.pausebehavior(0)
|
||||
$ ui.interact(suppress_underlay=True, suppress_overlay=True)
|
||||
|
||||
$ renpy.block_rollback()
|
||||
|
||||
$ _old_game_menu_screen = _game_menu_screen
|
||||
$ _game_menu_screen = None
|
||||
|
||||
if renpy.has_label("splashscreen") and not _restart:
|
||||
call expression "splashscreen" from _call_splashscreen_1
|
||||
|
||||
$ _game_menu_screen = _old_game_menu_screen
|
||||
$ del _old_game_menu_screen
|
||||
|
||||
$ renpy.block_rollback()
|
||||
|
||||
if config.main_menu_music:
|
||||
$ renpy.music.play(config.main_menu_music, if_changed=True)
|
||||
else:
|
||||
$ renpy.music.stop()
|
||||
|
||||
# Clean out any residual scene from the splashscreen.
|
||||
if config.start_scene_black:
|
||||
scene black
|
||||
else:
|
||||
scene
|
||||
|
||||
|
||||
# This has to be python, to deal with a case where _restart may
|
||||
# change across a shift-reload.
|
||||
python:
|
||||
if _restart is None:
|
||||
renpy.transition(config.end_splash_transition)
|
||||
else:
|
||||
renpy.transition(_restart[0])
|
||||
renpy.jump(_restart[1])
|
||||
|
||||
label _invoke_main_menu:
|
||||
|
||||
# Again, this has to be python.
|
||||
python:
|
||||
if _restart:
|
||||
renpy.call_in_new_context(_restart[2])
|
||||
else:
|
||||
renpy.call_in_new_context("_main_menu")
|
||||
|
||||
|
||||
# If the main menu returns, then start the game.
|
||||
jump start
|
||||
|
||||
# At this point, we've been switched into a new context. So we
|
||||
# initialize it.
|
||||
label _main_menu(_main_menu_screen="_main_menu_screen"):
|
||||
|
||||
call _enter_menu from _call__enter_menu_1
|
||||
|
||||
python:
|
||||
renpy.dynamic("_load_prompt")
|
||||
_load_prompt = False
|
||||
|
||||
renpy.context()._main_menu = True
|
||||
store.main_menu = True
|
||||
|
||||
jump expression _main_menu_screen
|
||||
|
||||
# This is called to show the main menu to the user.
|
||||
label _main_menu_screen:
|
||||
|
||||
# Let the user completely override the main menu. (But please note
|
||||
# it still lives in the menu context, rather than the game context.)
|
||||
if renpy.has_label("main_menu"):
|
||||
jump expression "main_menu"
|
||||
|
||||
# New name.
|
||||
elif renpy.has_label("main_menu_screen"):
|
||||
jump expression "main_menu_screen"
|
||||
|
||||
# Compatibility name.
|
||||
elif renpy.has_label("_library_main_menu"):
|
||||
jump expression "_library_main_menu"
|
||||
|
||||
return
|
||||
|
||||
init 1180 python hide:
|
||||
|
||||
def create_automatic_images():
|
||||
|
||||
seps = config.automatic_images
|
||||
|
||||
if seps is True:
|
||||
seps = [ ' ', '/', '_' ]
|
||||
|
||||
for dir, fn in renpy.loader.listdirfiles():
|
||||
|
||||
if fn.startswith("_"):
|
||||
continue
|
||||
|
||||
# Only .png and .jpg
|
||||
if not fn.lower().endswith(".png") and not fn.lower().endswith(".jpg"):
|
||||
continue
|
||||
|
||||
# Strip the extension, replace slashes.
|
||||
shortfn = fn[:-4].replace("\\", "/")
|
||||
|
||||
# Determine the name.
|
||||
name = ( shortfn, )
|
||||
for sep in seps:
|
||||
name = tuple(j for i in name for j in i.split(sep))
|
||||
|
||||
# Strip name components.
|
||||
while name:
|
||||
for i in config.automatic_images_strip:
|
||||
if name[0] == i:
|
||||
name = name[1:]
|
||||
break
|
||||
else:
|
||||
break
|
||||
|
||||
# Only names of 2 components or more.
|
||||
if len(name) < 2:
|
||||
continue
|
||||
|
||||
# Reject if it already exists.
|
||||
if name in renpy.exports.images:
|
||||
continue
|
||||
|
||||
renpy.image(name, fn)
|
||||
|
||||
if config.automatic_images:
|
||||
create_automatic_images()
|
||||
|
||||
|
||||
# Load the developer screen, if necessary.
|
||||
init 1180 python hide:
|
||||
|
||||
if config.developer:
|
||||
renpy.load_module("_developer")
|
||||
|
||||
# Entry point for the developer screen. The rest of it is loaded from
|
||||
# _developer.rpym
|
||||
label _developer:
|
||||
|
||||
if not config.developer:
|
||||
return
|
||||
|
||||
call _enter_menu from _call__enter_menu_4
|
||||
|
||||
jump expression "_developer_screen"
|
||||
@@ -1,44 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# Common stuff that's used by the various Ren'Py menus. This includes
|
||||
# the default definitions of config.main_menu and config.game_menu, as
|
||||
# well as the default definitions of the various preferences (and the objects
|
||||
# holding those preferences)
|
||||
|
||||
init -1150 python:
|
||||
|
||||
config.main_menu = [
|
||||
(u"Start Game", "start", "True"),
|
||||
(u"Load Game", _intra_jumps("load_screen", "main_game_transition"), "True"),
|
||||
(u"Preferences", _intra_jumps("preferences_screen", "main_game_transition"), "True"),
|
||||
(u"Help", _help, "True", "config.help"),
|
||||
(u"Quit", ui.jumps("_quit"), "True"),
|
||||
]
|
||||
|
||||
config.game_menu = [
|
||||
( None, u"Return", ui.jumps("_return"), 'True'),
|
||||
( "preferences", u"Preferences", _intra_jumps("preferences_screen", "intra_transition"), 'True' ),
|
||||
( "save", u"Save Game", _intra_jumps("save_screen", "intra_transition"), 'not main_menu' ),
|
||||
( "load", u"Load Game", _intra_jumps("load_screen", "intra_transition"), 'True'),
|
||||
( None, u"Main Menu", ui.callsinnewcontext("_main_menu_prompt"), 'not main_menu' ),
|
||||
( "help", u"Help", _help, "True", "config.help"),
|
||||
( None, u"Quit", ui.callsinnewcontext("_quit_prompt"), 'True' ),
|
||||
]
|
||||
|
||||
label _quit_prompt:
|
||||
$ renpy.loadsave.force_autosave()
|
||||
|
||||
if layout.yesno_prompt(None, layout.QUIT):
|
||||
jump _quit
|
||||
else:
|
||||
return
|
||||
|
||||
label _main_menu_prompt:
|
||||
if layout.yesno_prompt(None, layout.MAIN_MENU):
|
||||
$ renpy.full_restart(transition=config.game_main_transition)
|
||||
else:
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1,316 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file is responsible for creating and defining the default styles
|
||||
# used by the system.
|
||||
|
||||
# This file should be considered part of the Ren'Py library, and not
|
||||
# something that needs to be modified by the user. Instead, just update
|
||||
# the appropriate style property in an init: block in your script.
|
||||
#
|
||||
# For example, to change the default window backgrounds to a
|
||||
# transparent dark red, add:
|
||||
#
|
||||
# init:
|
||||
# $ style.window.background = "#8008"
|
||||
#
|
||||
# to your script. No need to mess around here, it will just make your
|
||||
# life harder when a new version of Ren'Py is released.
|
||||
|
||||
init -1200 python hide:
|
||||
|
||||
# Style Declarations #################################################
|
||||
|
||||
style.default = Style(None, help='root of style hierarchy')
|
||||
style.text = Style(style.default, help='style of text')
|
||||
|
||||
style.fixed = Style(style.default, help='fixed layouts')
|
||||
style.hbox = Style(style.default, help='horizontal boxes')
|
||||
style.vbox = Style(style.default, help='vertical boxes')
|
||||
style.grid = Style(style.default, help='grid layouts')
|
||||
style.side = Style(style.default, help='side layouts')
|
||||
|
||||
style.window = Style(style.default, help='windows created with ui.window')
|
||||
|
||||
style.image_placement = Style(style.default, help='default placement of images on the screen')
|
||||
style.image = Style(style.default, help="default style of images")
|
||||
|
||||
style.motion = Style(style.default, help="default style of motions and zooms.")
|
||||
style.animation = Style(style.default, help="default style of animations.")
|
||||
|
||||
style.say_label = Style(style.default, help='the name of the character speaking dialogue.')
|
||||
style.say_dialogue = Style(style.default, help='used for dialogue text')
|
||||
style.say_thought = Style(style.default, help='used by the default narrator')
|
||||
style.say_window = Style(style.window, help='windows containing dialogue and thoughts')
|
||||
style.say_who_window = Style(style.window, help='window containing the label in two-window-say mode')
|
||||
style.say_two_window_vbox = Style(style.vbox, help='vbox containing the two windows in two-window-say mode')
|
||||
style.say_vbox = Style(style.vbox, help='contains the label (if present) and the body of dialogue')
|
||||
|
||||
style.menu = Style(style.default, help='the vbox containing an in-game menu')
|
||||
style.menu_caption = Style(style.default, help='in-game menu caption text')
|
||||
style.menu_choice = Style(style.default, help='text of an in-game menu choice')
|
||||
style.menu_choice_button = Style(style.default, help='buttons containing in-game menu choices')
|
||||
style.menu_choice_chosen = Style(style.menu_choice, help='text of an in-game menu choice that has been chosen')
|
||||
style.menu_choice_chosen_button = Style(style.menu_choice_button, help='buttons containing chosen in-game menu choices')
|
||||
style.menu_window = Style(style.window, help='a window containing a menu')
|
||||
|
||||
style.input = Style(style.default, help='style of an input control')
|
||||
style.input_text = Style(style.input, help='text of an input box')
|
||||
style.input_prompt = Style(style.default, help='prompt of an input box')
|
||||
style.input_window = Style(style.window, help='window of an input box')
|
||||
|
||||
style.centered_window = Style(style.default, help='window containing centered text')
|
||||
style.centered_text = Style(style.default, help='centered text')
|
||||
|
||||
style.imagemap = Style(style.image_placement, help='default style of imagemaps')
|
||||
style.hotspot = Style(style.default, help='default style of hotspots inside imagemaps')
|
||||
style.hotbar = Style(style.default, help='default style of hotbars inside imagemaps')
|
||||
style.imagemap_button = style.hotspot
|
||||
|
||||
style.image_button = Style(style.default, help='default style of image buttons')
|
||||
style.image_button_image = Style(style.default, help='default style of images inside image buttons')
|
||||
|
||||
style.hyperlink = Style(style.default, help=None) # ignored
|
||||
style.hyperlink_text = Style(style.default, help='hyperlinked text')
|
||||
|
||||
style.viewport = Style(style.default, help='default style of viewports')
|
||||
style.transform = Style(style.motion, help='default style of transforms')
|
||||
|
||||
style.list = Style(style.default)
|
||||
style.list_box = Style(style.vbox)
|
||||
style.list_row = Style(style.default)
|
||||
style.list_row_box = Style(style.hbox)
|
||||
style.list_spacer = Style(style.default)
|
||||
style.list_text = Style(style.default)
|
||||
|
||||
style.tile = Style(style.default, help='default style of tile')
|
||||
|
||||
# The base styles that can be customized by themes.
|
||||
|
||||
style.frame = Style(style.default, help='base style for frames.')
|
||||
style.menu_frame = Style(style.frame, help='base style for frames used in the game and main menus.')
|
||||
|
||||
style.button = Style(style.default, help='base style for buttons.')
|
||||
style.button_text = Style(style.default, help='base style for button text')
|
||||
|
||||
style.small_button = Style(style.button, help="base style for small buttons")
|
||||
style.small_button_text = Style(style.button_text, help="base style for small button text")
|
||||
style.radio_button = Style(style.button, help="base style for radio buttons")
|
||||
style.radio_button_text = Style(style.button_text, help="base style for radio button text")
|
||||
style.check_button = Style(style.button, help="base style for check buttons")
|
||||
style.check_button_text = Style(style.button_text, help="base style for check button text")
|
||||
|
||||
style.large_button = Style(style.default, help="base style for large buttons")
|
||||
style.large_button_text = Style(style.default, help="base style for large button text")
|
||||
|
||||
style.label = Style(style.default, help="base style for windows surrounding labels")
|
||||
style.label_text = Style(style.default, help="base style for label text")
|
||||
|
||||
style.prompt = Style(style.default, help="base style for windows surrounding prompts")
|
||||
style.prompt_text = Style(style.default, help="base style for prompt text")
|
||||
|
||||
style.bar = Style(style.default, help='base style for horizontal bars')
|
||||
style.vbar = Style(style.default, help='base style for vertical bars')
|
||||
|
||||
style.slider = Style(style.default, help='base style for horizontal sliders')
|
||||
style.vslider = Style(style.default, help='base style for vertical sliders')
|
||||
|
||||
style.scrollbar = Style(style.default, help='base style for horizontal scrollbars')
|
||||
style.vscrollbar = Style(style.default, help='base style for vertical scollbars')
|
||||
|
||||
style.mm_root = Style(style.default, help="main menu root window")
|
||||
style.gm_root = Style(style.default, help="game menu root window")
|
||||
|
||||
|
||||
init -1090 python:
|
||||
|
||||
# Colors #############################################################
|
||||
|
||||
# The Default Style ###################################################
|
||||
|
||||
# Text properties.
|
||||
style.default.font = "DejaVuSans.ttf"
|
||||
style.default.language = "western"
|
||||
style.default.antialias = True
|
||||
style.default.size = 22
|
||||
style.default.color = (255, 255, 255, 255)
|
||||
style.default.black_color = (0, 0, 0, 255)
|
||||
style.default.bold = False
|
||||
style.default.italic = False
|
||||
style.default.underline = False
|
||||
style.default.strikethrough = False
|
||||
style.default.drop_shadow = None
|
||||
style.default.drop_shadow_color = (0, 0, 0, 255)
|
||||
style.default.outlines = [ ]
|
||||
style.default.minwidth = 0
|
||||
style.default.text_align = 0
|
||||
style.default.justify = False
|
||||
style.default.text_y_fudge = 0
|
||||
style.default.first_indent = 0
|
||||
style.default.rest_indent = 0
|
||||
style.default.line_spacing = 0
|
||||
style.default.layout = "greedy"
|
||||
style.default.subtitle_width = 0.9
|
||||
style.default.slow_cps = None
|
||||
style.default.slow_cps_multiplier = 1.0
|
||||
style.default.slow_abortable = False
|
||||
|
||||
# Window properties.
|
||||
style.default.background = None
|
||||
style.default.xpadding = 0
|
||||
style.default.ypadding = 0
|
||||
style.default.xmargin = 0
|
||||
style.default.ymargin = 0
|
||||
style.default.xfill = False
|
||||
style.default.yfill = False
|
||||
style.default.xminimum = 0 # Includes margins and padding.
|
||||
style.default.yminimum = 0 # Includes margins and padding.
|
||||
|
||||
# Placement properties.
|
||||
style.default.xpos = None # 0
|
||||
style.default.ypos = None # 0
|
||||
style.default.xanchor = None # 0
|
||||
style.default.yanchor = None # 0
|
||||
style.default.xmaximum = None
|
||||
style.default.ymaximum = None
|
||||
style.default.xoffset = 0
|
||||
style.default.yoffset = 0
|
||||
style.default.subpixel = False
|
||||
|
||||
# Sound properties.
|
||||
style.default.sound = None
|
||||
|
||||
# Box properties.
|
||||
style.default.spacing = 0
|
||||
style.default.first_spacing = None
|
||||
style.default.box_layout = None
|
||||
|
||||
# Focus properties.
|
||||
style.default.focus_mask = None
|
||||
style.default.focus_rect = None
|
||||
|
||||
# Bar properties.
|
||||
style.default.fore_bar = Null()
|
||||
style.default.aft_bar = Null()
|
||||
style.default.thumb = None
|
||||
style.default.thumb_shadow = None
|
||||
style.default.left_gutter = 0
|
||||
style.default.right_gutter = 0
|
||||
style.default.thumb_offset = 0
|
||||
style.default.unscrollable = None
|
||||
|
||||
# Misc.
|
||||
style.default.activate_sound = None
|
||||
style.default.clipping = False
|
||||
|
||||
# Boxes.
|
||||
style.hbox.box_layout = 'horizontal'
|
||||
style.vbox.box_layout = 'vertical'
|
||||
|
||||
# Motions, zooms, rotozooms, and transforms.
|
||||
style.motion.xanchor = 0
|
||||
style.motion.yanchor = 0
|
||||
style.motion.xpos = 0
|
||||
style.motion.ypos = 0
|
||||
|
||||
# Windows.
|
||||
style.window.background = Solid((0, 0, 0, 192))
|
||||
style.window.xpadding = 6
|
||||
style.window.ypadding = 6
|
||||
style.window.xmargin = 0
|
||||
style.window.ymargin = 0
|
||||
style.window.xfill = True
|
||||
style.window.yfill = False
|
||||
style.window.yminimum = 150 # Includes margins and padding.
|
||||
style.window.xalign = 0.5
|
||||
style.window.yalign = 1.0
|
||||
|
||||
# Dialogue
|
||||
style.say_label.bold = True
|
||||
style.say_vbox.spacing = 8
|
||||
|
||||
# Two window styles.
|
||||
style.say_who_window.xminimum = 200
|
||||
style.say_who_window.yminimum = 34
|
||||
style.say_who_window.xfill = False
|
||||
style.say_who_window.xalign = 0
|
||||
|
||||
style.say_two_window_vbox.yalign = 1.0
|
||||
|
||||
# Menus.
|
||||
style.menu_choice.idle_color = "#0ff"
|
||||
style.menu_choice.hover_color = "#ff0"
|
||||
style.input.color = "#ff0"
|
||||
|
||||
# Styles used by centered.
|
||||
style.centered_window.xalign = 0.5
|
||||
style.centered_window.xfill = False
|
||||
style.centered_window.yalign = 0.5
|
||||
style.centered_window.yfill = False
|
||||
style.centered_window.xpadding = 10
|
||||
|
||||
style.centered_text.textalign = 0.5
|
||||
style.centered_text.xalign = 0.5
|
||||
style.centered_text.yalign = 0.5
|
||||
style.centered_text.layout = "subtitle"
|
||||
|
||||
# Hyperlinks.
|
||||
style.hyperlink_text.underline = True
|
||||
style.hyperlink_text.hover_color = "#0ff"
|
||||
style.hyperlink_text.idle_color = "#08f"
|
||||
|
||||
# Bars.
|
||||
style.default.bar_invert = False
|
||||
style.default.bar_resizing = False
|
||||
style.default.bar_vertical = False
|
||||
|
||||
style.vbar.bar_vertical = True
|
||||
style.vslider.bar_vertical = True
|
||||
style.vscrollbar.bar_vertical = True
|
||||
style.vscrollbar.bar_invert = True
|
||||
|
||||
# Viewport
|
||||
style.viewport.clipping = True
|
||||
|
||||
# Transform
|
||||
style.transform.subpixel = True
|
||||
|
||||
# Menu windows.
|
||||
style.mm_root.background = "#000"
|
||||
style.mm_root.xfill = True
|
||||
style.mm_root.yfill = True
|
||||
|
||||
style.gm_root.background = "#000"
|
||||
style.gm_root.xfill = True
|
||||
style.gm_root.yfill = True
|
||||
|
||||
# Lists.
|
||||
style.list_row.xfill = True
|
||||
|
||||
style.list_row.ymargin = 0
|
||||
style.list_row.background = "#eee"
|
||||
style.list_row[1].background = "#ddd"
|
||||
style.list_row.hover_background = "#fff"
|
||||
style.list_row[1].hover_background = "#fff"
|
||||
style.list_row.selected_background = "#cce"
|
||||
style.list_row[1].selected_background = "#cce"
|
||||
style.list_text.color = "#000"
|
||||
style.list_text.size = 14
|
||||
style.list_spacer.xminimum = 15
|
||||
|
||||
# Tile
|
||||
style.tile.clipping = True
|
||||
|
||||
|
||||
######################################################################
|
||||
|
||||
# Error messages.
|
||||
style.error_root.background = Solid((220, 220, 255, 255))
|
||||
style.error_root.xfill = True
|
||||
style.error_root.yfill = True
|
||||
style.error_root.xpadding = 20
|
||||
style.error_root.ypadding = 20
|
||||
|
||||
style.error_title.color = (255, 128, 128, 255)
|
||||
style.error_body.color = (128, 128, 255, 255)
|
||||
|
||||
@@ -1,706 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1110 python:
|
||||
|
||||
class _Theme(object):
|
||||
|
||||
# Using theme as a decorator is what we do to create a new theme.
|
||||
def __call__(self, func):
|
||||
setattr(self, func.func_name, func)
|
||||
return func
|
||||
|
||||
_theme = theme = _Theme()
|
||||
del _Theme
|
||||
|
||||
# Public only for compatiblity purposes.
|
||||
def RoundRect(color, small=False):
|
||||
if small:
|
||||
size = 6
|
||||
else:
|
||||
if config.screen_width <= 640:
|
||||
size = 6
|
||||
else:
|
||||
size = 12
|
||||
|
||||
return Frame(theme.OneOrTwoColor("_roundrect/rr%dg.png" % size, color), size, size)
|
||||
|
||||
init -1110 python hide:
|
||||
|
||||
@theme
|
||||
def clear_frames():
|
||||
style.frame.clear()
|
||||
|
||||
@theme
|
||||
def clear_buttons():
|
||||
style.button.clear()
|
||||
style.button_text.clear()
|
||||
style.radio_button.clear()
|
||||
style.radio_button_text.clear()
|
||||
style.check_button.clear()
|
||||
style.check_button_text.clear()
|
||||
style.small_button.clear()
|
||||
style.small_button_text.clear()
|
||||
|
||||
@theme
|
||||
def clear_large_buttons():
|
||||
style.large_button.clear()
|
||||
style.large_button_text.clear()
|
||||
|
||||
@theme
|
||||
def clear_labels():
|
||||
style.label.clear()
|
||||
style.label_text.clear()
|
||||
|
||||
@theme
|
||||
def clear_prompts():
|
||||
style.prompt.clear()
|
||||
style.prompt_text.clear()
|
||||
|
||||
@theme
|
||||
def clear_bars():
|
||||
style.bar.clear()
|
||||
style.vbar.clear()
|
||||
style.scrollbar.clear()
|
||||
style.vscrollbar.clear()
|
||||
style.slider.clear()
|
||||
style.vslider.clear()
|
||||
|
||||
style.vbar.bar_vertical = True
|
||||
style.vslider.bar_vertical = True
|
||||
style.vscrollbar.bar_vertical = True
|
||||
style.vscrollbar.bar_invert = True
|
||||
|
||||
|
||||
|
||||
|
||||
# This recolors the given image using one or two colors.
|
||||
@theme
|
||||
def OneOrTwoColor(image, color):
|
||||
if len(color) == 2:
|
||||
return im.Twocolor(image, color[0], color[1])
|
||||
else:
|
||||
return im.Twocolor(image, color, color)
|
||||
|
||||
@theme
|
||||
def roundrect_frames(
|
||||
less_rounded,
|
||||
frame):
|
||||
|
||||
theme.clear_frames()
|
||||
|
||||
style.frame.background = RoundRect(frame, less_rounded)
|
||||
|
||||
style.frame.xpadding = 6
|
||||
style.frame.ypadding = 6
|
||||
|
||||
|
||||
@theme
|
||||
def roundrect_buttons(text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text):
|
||||
|
||||
theme.clear_buttons()
|
||||
|
||||
style.button.background = RoundRect(widget, less_rounded)
|
||||
style.button.hover_background = RoundRect(widget_hover, less_rounded)
|
||||
style.button.insensitive_background = RoundRect(disabled, less_rounded)
|
||||
|
||||
style.button_text.size = text_size
|
||||
style.button_text.color = widget_text
|
||||
style.button_text.selected_color = widget_selected
|
||||
style.button_text.insensitive_color = disabled_text
|
||||
|
||||
if less_rounded:
|
||||
style.button.xpadding = 6
|
||||
else:
|
||||
style.button.xpadding = 12
|
||||
|
||||
style.button.ypadding = 1
|
||||
style.button.xmargin = 1
|
||||
style.button.ymargin = 1
|
||||
|
||||
style.button_text.xalign = 0.5
|
||||
style.button_text.yalign = 0.5
|
||||
style.button_text.text_align = 0.5
|
||||
|
||||
@theme
|
||||
def roundrect_large_buttons(
|
||||
text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text):
|
||||
|
||||
theme.clear_large_buttons()
|
||||
|
||||
if less_rounded:
|
||||
style.large_button.xpadding = 6
|
||||
else:
|
||||
style.large_button.xpadding = 12
|
||||
|
||||
style.large_button.ypadding = 1
|
||||
style.large_button.xmargin = 1
|
||||
style.large_button.ymargin = 1
|
||||
|
||||
style.large_button.background = RoundRect(widget, less_rounded)
|
||||
style.large_button.hover_background = RoundRect(widget_hover, less_rounded)
|
||||
style.large_button.insensitive_background = RoundRect(disabled, less_rounded)
|
||||
|
||||
style.large_button_text.size = text_size
|
||||
style.large_button_text.color = widget_text
|
||||
style.large_button_text.selected_color = widget_selected
|
||||
style.large_button_text.insensitive_color = disabled_text
|
||||
|
||||
style.large_button_text.xalign = 0
|
||||
style.large_button_text.yalign = 0
|
||||
|
||||
@theme
|
||||
def roundrect_labels(
|
||||
text_size,
|
||||
label):
|
||||
|
||||
theme.clear_labels()
|
||||
|
||||
style.label_text.size = text_size
|
||||
style.label_text.color = label
|
||||
|
||||
@theme
|
||||
def roundrect_prompts(
|
||||
text_size,
|
||||
label):
|
||||
|
||||
theme.clear_prompts()
|
||||
|
||||
style.prompt_text.size = text_size
|
||||
style.prompt_text.color = label
|
||||
|
||||
style.prompt.xalign = 0.5
|
||||
style.prompt_text.text_align = 0.5
|
||||
style.prompt_text.layout = "subtitle"
|
||||
|
||||
@theme
|
||||
def roundrect_bars(
|
||||
widget,
|
||||
widget_hover):
|
||||
|
||||
theme.clear_bars()
|
||||
|
||||
def img(name, color, x, y):
|
||||
rv = theme.OneOrTwoColor("_roundrect/" + name + ".png", color)
|
||||
if x is not None:
|
||||
rv = Frame(rv, x, y)
|
||||
return rv
|
||||
|
||||
# Bars.
|
||||
style.bar.ymaximum = 24
|
||||
style.bar.left_gutter = 6
|
||||
style.bar.right_gutter = 6
|
||||
style.bar.thumb_offset = 6
|
||||
|
||||
style.bar.left_bar = img("rrslider_full", widget, 12, 0)
|
||||
style.bar.right_bar = img("rrslider_empty", widget, 12, 0)
|
||||
style.bar.thumb = img("rrslider_thumb", widget, None, None)
|
||||
style.bar.hover_left_bar = img("rrslider_full", widget_hover, 12, 0)
|
||||
style.bar.hover_right_bar = img("rrslider_empty", widget_hover, 12, 0)
|
||||
style.bar.hover_thumb = img("rrslider_thumb", widget_hover, None, None)
|
||||
|
||||
style.vbar.xmaximum = 24
|
||||
style.vbar.top_gutter = 6
|
||||
style.vbar.bottom_gutter = 6
|
||||
style.vbar.thumb_offset = 6
|
||||
|
||||
style.vbar.bottom_bar = img("rrvslider_full", widget, 0, 12)
|
||||
style.vbar.top_bar = img("rrvslider_empty", widget, 0, 12)
|
||||
style.vbar.thumb = img("rrvslider_thumb", widget, None, None)
|
||||
style.vbar.hover_bottom_bar = img("rrvslider_full", widget_hover, 0, 12)
|
||||
style.vbar.hover_top_bar = img("rrvslider_empty", widget_hover, 0, 12)
|
||||
style.vbar.hover_thumb = img("rrvslider_thumb", widget_hover, None, None)
|
||||
|
||||
# Sliders.
|
||||
style.slider.ymaximum = 24
|
||||
style.slider.left_gutter = 6
|
||||
style.slider.right_gutter = 6
|
||||
style.slider.thumb_offset = 6
|
||||
|
||||
style.slider.left_bar = img("rrslider_full", widget, 12, 0)
|
||||
style.slider.right_bar = img("rrslider_empty", widget, 12, 0)
|
||||
style.slider.thumb = img("rrslider_thumb", widget, None, None)
|
||||
style.slider.hover_left_bar = img("rrslider_full", widget_hover, 12, 0)
|
||||
style.slider.hover_right_bar = img("rrslider_empty", widget_hover, 12, 0)
|
||||
style.slider.hover_thumb = img("rrslider_thumb", widget_hover, None, None)
|
||||
|
||||
style.vslider.xmaximum = 24
|
||||
style.vslider.top_gutter = 6
|
||||
style.vslider.bottom_gutter = 6
|
||||
style.vslider.thumb_offset = 6
|
||||
|
||||
style.vslider.bottom_bar = img("rrvslider_full", widget, 0, 12)
|
||||
style.vslider.top_bar = img("rrvslider_empty", widget, 0, 12)
|
||||
style.vslider.thumb = img("rrvslider_thumb", widget, None, None)
|
||||
style.vslider.hover_bottom_bar = img("rrvslider_full", widget_hover, 0, 12)
|
||||
style.vslider.hover_top_bar = img("rrvslider_empty", widget_hover, 0, 12)
|
||||
style.vslider.hover_thumb = img("rrvslider_thumb", widget_hover, None, None)
|
||||
|
||||
|
||||
# Scrollbars.
|
||||
style.scrollbar.left_gutter = 6
|
||||
style.scrollbar.right_gutter = 6
|
||||
style.scrollbar.thumb_offset = 6
|
||||
style.scrollbar.ymaximum = 12
|
||||
|
||||
style.scrollbar.left_bar = img("rrscrollbar", widget, 12, 0)
|
||||
style.scrollbar.right_bar = img("rrscrollbar", widget, 12, 0)
|
||||
style.scrollbar.thumb = img("rrscrollbar_thumb", widget, None, None)
|
||||
style.scrollbar.hover_left_bar = img("rrscrollbar", widget_hover, 12, 0)
|
||||
style.scrollbar.hover_right_bar = img("rrscrollbar", widget_hover, 12, 0)
|
||||
style.scrollbar.hover_thumb = img("rrscrollbar_thumb", widget_hover, None, None)
|
||||
|
||||
style.vscrollbar.top_gutter = 6
|
||||
style.vscrollbar.bottom_gutter = 6
|
||||
style.vscrollbar.thumb_offset = 6
|
||||
style.vscrollbar.xmaximum = 12
|
||||
|
||||
style.vscrollbar.left_bar = img("rrvscrollbar", widget, 0, 12)
|
||||
style.vscrollbar.right_bar = img("rrvscrollbar", widget, 0, 12)
|
||||
style.vscrollbar.thumb = img("rrvscrollbar_thumb", widget, None, None)
|
||||
style.vscrollbar.hover_left_bar = img("rrvscrollbar", widget_hover, 0, 12)
|
||||
style.vscrollbar.hover_right_bar = img("rrvscrollbar", widget_hover, 0, 12)
|
||||
style.vscrollbar.hover_thumb = img("rrvscrollbar_thumb", widget_hover, None, None)
|
||||
|
||||
@theme
|
||||
def roundrect(
|
||||
widget = (0, 60, 120, 255),
|
||||
widget_hover = (0, 80, 160, 255),
|
||||
widget_text = (200, 225, 255, 255),
|
||||
widget_selected = (255, 255, 200, 255),
|
||||
disabled = (64, 64, 64, 255),
|
||||
disabled_text = (200, 200, 200, 255),
|
||||
label = (255, 255, 255, 255),
|
||||
frame = (100, 150, 200, 255),
|
||||
|
||||
text_size=None,
|
||||
small_text_size=None,
|
||||
less_rounded = False,
|
||||
|
||||
# Compat for the old roundrect theme.
|
||||
window = None,
|
||||
button_menu = None,
|
||||
rounded_window = True,
|
||||
outline_bars = False,
|
||||
mm_root = None,
|
||||
gm_root = None):
|
||||
|
||||
if button_menu is None:
|
||||
if (config.script_version is not None) and (config.script_version < (6, 9, 0)):
|
||||
button_menu = True
|
||||
else:
|
||||
button_menu = False
|
||||
|
||||
layout.defaults()
|
||||
|
||||
if config.screen_width <= 640:
|
||||
text_size = text_size or 18
|
||||
small_text_size = small_text_size or 12
|
||||
less_rounded = True
|
||||
|
||||
else:
|
||||
text_size = text_size or 22
|
||||
small_text_size = small_text_size or 16
|
||||
radius = 12
|
||||
|
||||
theme.roundrect_frames(
|
||||
less_rounded,
|
||||
frame)
|
||||
|
||||
theme.roundrect_buttons(
|
||||
text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text)
|
||||
|
||||
theme.roundrect_large_buttons(
|
||||
small_text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text)
|
||||
|
||||
theme.roundrect_labels(
|
||||
text_size,
|
||||
label)
|
||||
|
||||
theme.roundrect_prompts(
|
||||
text_size,
|
||||
label)
|
||||
|
||||
theme.roundrect_bars(
|
||||
widget,
|
||||
widget_hover)
|
||||
|
||||
if mm_root is not None:
|
||||
style.mm_root.background = mm_root
|
||||
|
||||
if gm_root is not None:
|
||||
style.gm_root.background = gm_root
|
||||
|
||||
if window is not None:
|
||||
|
||||
if rounded_window:
|
||||
style.window.background = RoundRect(window, less_rounded)
|
||||
style.window.xpadding = 6
|
||||
style.window.xmargin = 6
|
||||
style.window.ypadding = 6
|
||||
style.window.ymargin = 6
|
||||
else:
|
||||
style.window.background = Solid(window)
|
||||
style.window.xpadding = 6
|
||||
style.window.xmargin = 0
|
||||
style.window.ypadding = 6
|
||||
style.window.ymargin = 0
|
||||
|
||||
|
||||
if button_menu:
|
||||
layout.button_menu()
|
||||
|
||||
@theme
|
||||
def ancient():
|
||||
|
||||
layout.defaults()
|
||||
|
||||
style.frame.background = Solid((0, 0, 128, 128))
|
||||
style.frame.xpadding = 10
|
||||
style.frame.ypadding = 10
|
||||
style.frame.xmargin = 10
|
||||
style.frame.ymargin = 5
|
||||
|
||||
style.menu_frame.set_parent(style.default)
|
||||
|
||||
dark_cyan = (0, 192, 255, 255)
|
||||
bright_cyan = (0, 255, 255, 255)
|
||||
dark_red = (255, 128, 128, 255)
|
||||
bright_red = (255, 64, 64, 255)
|
||||
green = (0, 128, 0, 255)
|
||||
|
||||
style.button_text.color = dark_cyan
|
||||
style.button_text.hover_color = bright_cyan
|
||||
style.button_text.insensitive_color = (192, 192, 192, 255)
|
||||
style.button_text.size = 24
|
||||
style.button_text.drop_shadow = (2, 2)
|
||||
style.button_text.drop_shadow_color = "#000"
|
||||
|
||||
style.button_text.selected_color = dark_red
|
||||
style.button_text.selected_hover_color = bright_red
|
||||
|
||||
style.button_text.xalign = 0.5
|
||||
style.button_text.text_align = 0.5
|
||||
|
||||
style.bar.ymaximum = 22
|
||||
style.bar.left_bar = Solid(bright_cyan)
|
||||
style.bar.right_bar = Solid((0, 0, 0, 128))
|
||||
style.bar.thumb = None
|
||||
style.bar.thumb_offset = 0
|
||||
style.bar.thumb_shadow = None
|
||||
|
||||
style.vbar.xmaximum = 22
|
||||
style.vbar.bottom_bar = Solid(bright_cyan)
|
||||
style.vbar.top_bar = Solid((0, 0, 0, 128))
|
||||
style.vbar.thumb = None
|
||||
style.vbar.thumb_offset = 0
|
||||
style.vbar.thumb_shadow = None
|
||||
|
||||
style.slider.ymaximum = 22
|
||||
style.slider.left_bar = Solid(bright_cyan)
|
||||
style.slider.right_bar = Solid((0, 0, 0, 128))
|
||||
style.slider.thumb = None
|
||||
style.slider.thumb_offset = 0
|
||||
style.slider.thumb_shadow = None
|
||||
|
||||
style.vslider.xmaximum = 22
|
||||
style.vslider.bottom_bar = Solid(bright_cyan)
|
||||
style.vslider.top_bar = Solid((0, 0, 0, 128))
|
||||
style.vslider.thumb = None
|
||||
style.vslider.thumb_offset = 0
|
||||
style.vslider.thumb_shadow = None
|
||||
|
||||
style.scrollbar.ymaximum = 22
|
||||
style.scrollbar.left_bar = Solid("#0008")
|
||||
style.scrollbar.right_bar = Solid("#0008")
|
||||
style.scrollbar.thumb = Solid(bright_cyan)
|
||||
style.scrollbar.thumb_offset = 0
|
||||
style.scrollbar.thumb_shadow = None
|
||||
|
||||
style.vscrollbar.xmaximum = 22
|
||||
style.vscrollbar.top_bar = Solid("#0008")
|
||||
style.vscrollbar.bottom_bar = Solid("#0008")
|
||||
style.vscrollbar.thumb = Solid(bright_cyan)
|
||||
style.vscrollbar.thumb_offset = 0
|
||||
style.vscrollbar.thumb_shadow = None
|
||||
|
||||
style.large_button.xpadding = 5
|
||||
style.large_button.ypadding = 2
|
||||
style.large_button.xmargin = 5
|
||||
style.large_button.ymargin = 2
|
||||
style.large_button.background = "#fff"
|
||||
style.large_button.hover_background = "#ffc"
|
||||
|
||||
style.large_button_text.size = 16
|
||||
style.large_button_text.drop_shadow = (1, 1)
|
||||
style.large_button_text.xalign = 0
|
||||
style.large_button_text.text_align = 0
|
||||
|
||||
style.label_text.size = 24
|
||||
style.label_text.color = green
|
||||
style.label_text.drop_shadow = (1, 1)
|
||||
style.label_text.drop_shadow_color = "#000"
|
||||
|
||||
style.prompt_text.size = 24
|
||||
style.prompt_text.color = green
|
||||
style.prompt_text.layout = "subtitle"
|
||||
style.prompt_text.text_align = 0.5
|
||||
style.prompt_text.drop_shadow = (1, 1)
|
||||
style.prompt_text.drop_shadow_color = "#000"
|
||||
|
||||
style.mm_root.background = "#e9d8bc"
|
||||
style.gm_root.background = "#e9d8bc"
|
||||
|
||||
|
||||
@theme
|
||||
def outline_frames():
|
||||
theme.clear_frames()
|
||||
|
||||
@theme
|
||||
def outline_buttons(
|
||||
inside,
|
||||
idle,
|
||||
hover,
|
||||
selected,
|
||||
insensitive,
|
||||
text_size):
|
||||
|
||||
theme.clear_buttons()
|
||||
|
||||
style.button.xmargin = 4
|
||||
|
||||
style.button_text.size = text_size
|
||||
style.button_text.color = inside
|
||||
style.button_text.outlines = [ (2, idle) ]
|
||||
style.button_text.hover_outlines = [ (2, hover) ]
|
||||
style.button_text.selected_outlines = [ (2, selected) ]
|
||||
style.button_text.selected_hover_outlines = [ (2, hover) ]
|
||||
style.button_text.insensitive_outlines = [ (2, insensitive) ]
|
||||
|
||||
|
||||
@theme
|
||||
def outline_large_buttons(
|
||||
inside,
|
||||
idle,
|
||||
hover,
|
||||
selected,
|
||||
insensitive,
|
||||
text_size,
|
||||
large_button):
|
||||
|
||||
theme.clear_large_buttons()
|
||||
|
||||
style.large_button.xmargin = 4
|
||||
style.large_button.ymargin = 2
|
||||
|
||||
style.large_button.background = large_button
|
||||
|
||||
style.large_button_text.size = text_size
|
||||
style.large_button_text.color = inside
|
||||
|
||||
style.large_button_text.outlines = [ (2, idle) ]
|
||||
style.large_button_text.hover_outlines = [ (2, hover) ]
|
||||
style.large_button_text.selected_outlines = [ (2, selected) ]
|
||||
style.large_button_text.selected_hover_outlines = [ (2, hover) ]
|
||||
style.large_button_text.insensitive_outlines = [ (2, insensitive) ]
|
||||
|
||||
@theme
|
||||
def outline_prompts(
|
||||
inside,
|
||||
prompt,
|
||||
text_size):
|
||||
|
||||
theme.clear_prompts()
|
||||
|
||||
style.prompt_text.color = inside
|
||||
style.prompt_text.outlines = [ (2, prompt) ]
|
||||
style.prompt_text.size = text_size
|
||||
|
||||
@theme
|
||||
def outline_labels(
|
||||
inside,
|
||||
label,
|
||||
text_size):
|
||||
|
||||
theme.clear_labels()
|
||||
|
||||
style.label_text.color = inside
|
||||
style.label_text.outlines = [ (2, label) ]
|
||||
style.label_text.size = text_size
|
||||
|
||||
@theme
|
||||
def outline_bars(
|
||||
inside,
|
||||
idle,
|
||||
hover):
|
||||
|
||||
theme.clear_bars()
|
||||
|
||||
def color(fn, c):
|
||||
return im.Twocolor("_outline/" + fn + ".png", inside, c)
|
||||
|
||||
style.bar.ymaximum = 16
|
||||
style.bar.left_bar = Frame(color("circle", idle), 7, 0)
|
||||
style.bar.right_bar = Frame(color("bar", idle), 0, 0)
|
||||
style.bar.left_gutter = 16
|
||||
style.bar.bar_resizing = True
|
||||
|
||||
style.slider.ymaximum = 16
|
||||
style.slider.left_bar = Frame(color("bar", idle), 0, 0)
|
||||
style.slider.right_bar = Frame(color("bar", idle), 0, 0)
|
||||
style.slider.thumb = color("circle", idle)
|
||||
style.slider.hover_left_bar = Frame(color("bar", hover), 0, 0)
|
||||
style.slider.hover_right_bar = Frame(color("bar", hover), 0, 0)
|
||||
style.slider.hover_thumb = color("circle", hover)
|
||||
|
||||
style.scrollbar.ymaximum = 16
|
||||
style.scrollbar.left_bar = Frame(color("bar", idle), 0, 0)
|
||||
style.scrollbar.right_bar = Frame(color("bar", idle), 0, 0)
|
||||
style.scrollbar.thumb = Frame(color("circle", idle), 7, 0)
|
||||
style.scrollbar.hover_left_bar = Frame(color("bar", hover), 0, 0)
|
||||
style.scrollbar.hover_right_bar = Frame(color("bar", hover), 0, 0)
|
||||
style.scrollbar.hover_thumb = Frame(color("circle", hover), 7, 0)
|
||||
|
||||
style.vbar.xmaximum = 16
|
||||
style.vbar.bottom_bar = Frame(color("circle", idle), 0, 7)
|
||||
style.vbar.top_bar = Frame(color("vbar", idle), 0, 0)
|
||||
style.vbar.bottom_gutter = 16
|
||||
style.vbar.bar_resizing = True
|
||||
|
||||
style.vslider.xmaximum = 16
|
||||
style.vslider.top_bar = Frame(color("vbar", idle), 0, 0)
|
||||
style.vslider.bottom_bar = Frame(color("vbar", idle), 0, 0)
|
||||
style.vslider.thumb = color("circle", idle)
|
||||
style.vslider.hover_top_bar = Frame(color("vbar", hover), 0, 0)
|
||||
style.vslider.hover_bottom_bar = Frame(color("vbar", hover), 0, 0)
|
||||
style.vslider.hover_thumb = color("circle", hover)
|
||||
|
||||
style.vscrollbar.xmaximum = 16
|
||||
style.vscrollbar.top_bar = Frame(color("vbar", idle), 0, 0)
|
||||
style.vscrollbar.bottom_bar = Frame(color("vbar", idle), 0, 0)
|
||||
style.vscrollbar.thumb = Frame(color("circle", idle), 0, 7)
|
||||
style.vscrollbar.hover_top_bar = Frame(color("vbar", hover), 0, 0)
|
||||
style.vscrollbar.hover_bottom_bar = Frame(color("vbar", hover), 0, 0)
|
||||
style.vscrollbar.hover_thumb = Frame(color("circle", hover), 0, 7)
|
||||
|
||||
@theme
|
||||
def outline(
|
||||
inside="#fff",
|
||||
idle="#e66",
|
||||
hover="#48f",
|
||||
selected="#84f",
|
||||
insensitive="#ccc",
|
||||
label="#484",
|
||||
prompt="#484",
|
||||
background="#fee",
|
||||
large_button="#fff8f8",
|
||||
text_size=22,
|
||||
small_text_size=16,
|
||||
):
|
||||
|
||||
layout.defaults()
|
||||
|
||||
theme.outline_frames()
|
||||
|
||||
theme.outline_buttons(
|
||||
inside,
|
||||
idle,
|
||||
hover,
|
||||
selected,
|
||||
insensitive,
|
||||
text_size)
|
||||
|
||||
theme.outline_large_buttons(
|
||||
inside,
|
||||
idle,
|
||||
hover,
|
||||
selected,
|
||||
insensitive,
|
||||
small_text_size,
|
||||
large_button)
|
||||
|
||||
theme.outline_prompts(
|
||||
inside,
|
||||
prompt,
|
||||
text_size)
|
||||
|
||||
theme.outline_labels(
|
||||
inside,
|
||||
label,
|
||||
text_size)
|
||||
|
||||
theme.outline_bars(
|
||||
inside,
|
||||
idle,
|
||||
hover)
|
||||
|
||||
style.mm_root.background = background
|
||||
style.gm_root.background = background
|
||||
|
||||
@theme
|
||||
def image_buttons(d):
|
||||
for k, (idle, hover, selected_idle, selected_hover, insensitive) in d.iteritems():
|
||||
s = style.button[k]
|
||||
s.xpadding = 0
|
||||
s.ypadding = 0
|
||||
s.background = None
|
||||
s.foreground = None
|
||||
s.idle_child = idle
|
||||
s.hover_child = hover
|
||||
s.selected_idle_child = selected_idle
|
||||
s.selected_hover_child = selected_hover
|
||||
s.insensitive_child = insensitive
|
||||
s.focus_mask = True
|
||||
|
||||
|
||||
@theme
|
||||
def image_labels(d):
|
||||
for k, l in d.iteritems():
|
||||
s = style.label[k]
|
||||
s.xpadding = 0
|
||||
s.ypadding = 0
|
||||
s.background = None
|
||||
s.foreground = None
|
||||
s.child = k
|
||||
|
||||
|
||||
config.image_buttons = { }
|
||||
config.image_labels = { }
|
||||
|
||||
init 1110 python:
|
||||
|
||||
if not "compat" in _layout.provided:
|
||||
theme.image_buttons(config.image_buttons)
|
||||
theme.image_labels(config.image_labels)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This extra contains a basic implementation of voice support. Right
|
||||
# now, voice is given its own toggle, and can either be turned on or
|
||||
# turned off. In the future, we'll probably provide some way of
|
||||
# toggling it on or off for individual characters.
|
||||
#
|
||||
# To use it, place a voice "<sndfile>" line before each voiced line of
|
||||
# dialogue.
|
||||
#
|
||||
# voice "e_1001.ogg"
|
||||
# e "Voice support lets you add the spoken word to your games."
|
||||
#
|
||||
# Normally, a voice is cancelled at the start of the next
|
||||
# interaction. If you want a voice to span interactions, call
|
||||
# voice_sustain.
|
||||
#
|
||||
# voice "e_1002.ogg"
|
||||
# e "Voice sustain is a technique that allows the same voice file.."
|
||||
#
|
||||
# $ voice_sustain()
|
||||
# e "...to play for two lines of dialogue."
|
||||
|
||||
init -1120:
|
||||
|
||||
python:
|
||||
|
||||
_voice = object()
|
||||
_voice.play = None
|
||||
_voice.sustain = False
|
||||
_voice.seen_in_lint = False
|
||||
|
||||
# Call this to specify the voice file that will be played for
|
||||
# the user.
|
||||
def voice(file, **kwargs):
|
||||
|
||||
if not config.has_voice:
|
||||
return
|
||||
|
||||
_voice.play = file
|
||||
_last_voice_play = file
|
||||
|
||||
# Call this to specify that the currently playing voice file
|
||||
# should be sustained through the current interaction.
|
||||
def voice_sustain(ignored="", **kwargs):
|
||||
if not config.has_voice:
|
||||
return
|
||||
|
||||
_voice.sustain = True
|
||||
|
||||
# Call this to replay the last bit of voice.
|
||||
def voice_replay():
|
||||
renpy.sound.play(_last_voice_play, channel="voice")
|
||||
|
||||
# Returns true if we can replay the voice.
|
||||
def voice_can_replay():
|
||||
return _last_voice_play != None
|
||||
|
||||
python hide:
|
||||
|
||||
# basics: True if the game will have voice.
|
||||
config.has_voice = True
|
||||
|
||||
# This is called on each interaction, to ensure that the
|
||||
# appropriate voice file is played for the user.
|
||||
def voice_interact():
|
||||
|
||||
if not config.has_voice:
|
||||
return
|
||||
|
||||
if _voice.play and not config.skipping:
|
||||
renpy.sound.play(_voice.play, channel="voice")
|
||||
store._last_voice_play = _voice.play
|
||||
elif not _voice.sustain:
|
||||
renpy.sound.stop(channel="voice")
|
||||
store._last_voice_play = _voice.play
|
||||
|
||||
_voice.play = None
|
||||
_voice.sustain = False
|
||||
|
||||
config.start_interact_callbacks.append(voice_interact)
|
||||
config.say_sustain_callbacks.append(voice_sustain)
|
||||
|
||||
def voice_afm_callback():
|
||||
return not renpy.sound.is_playing(channel="voice")
|
||||
|
||||
config.afm_callback = voice_afm_callback
|
||||
|
||||
python early hide:
|
||||
|
||||
def parse_voice(l):
|
||||
fn = l.simple_expression()
|
||||
if fn is None:
|
||||
renpy.error('expected simple expression (string)')
|
||||
|
||||
if not l.eol():
|
||||
renpy.error('expected end of line')
|
||||
|
||||
return fn
|
||||
|
||||
def execute_voice(fn):
|
||||
fn = eval(fn)
|
||||
voice(fn)
|
||||
|
||||
def lint_voice(fn):
|
||||
_voice.seen_in_lint = True
|
||||
|
||||
fn = _try_eval(fn, 'voice filename')
|
||||
if isinstance(fn, basestring) and not renpy.loadable(fn):
|
||||
renpy.error('voice file %r is not loadable' % fn)
|
||||
|
||||
renpy.statements.register('voice',
|
||||
parse=parse_voice,
|
||||
execute=execute_voice,
|
||||
lint=lint_voice)
|
||||
|
||||
def parse_voice_sustain(l):
|
||||
if not l.eol():
|
||||
renpy.error('expected end of line')
|
||||
|
||||
return None
|
||||
|
||||
def execute_voice_sustain(parsed):
|
||||
voice_sustain()
|
||||
|
||||
renpy.statements.register('voice sustain',
|
||||
parse=parse_voice_sustain,
|
||||
execute=execute_voice_sustain)
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
layout.provides('joystick_preferences')
|
||||
|
||||
label joystick_preferences_screen:
|
||||
|
||||
$ renpy.show_screen('joystick_preferences')
|
||||
$ ui.interact()
|
||||
|
||||
jump _noisy_return
|
||||
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
layout.provides('load_save')
|
||||
|
||||
label load_screen:
|
||||
|
||||
$ renpy.show_screen('load')
|
||||
$ ui.interact()
|
||||
jump _noisy_return
|
||||
|
||||
label save_screen:
|
||||
|
||||
$ renpy.show_screen('save')
|
||||
$ ui.interact()
|
||||
jump _noisy_return
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
layout.provides('main_menu')
|
||||
|
||||
label main_menu_screen:
|
||||
|
||||
$ renpy.show_screen("main_menu")
|
||||
$ ui.interact()
|
||||
|
||||
return
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
layout.provides('preferences')
|
||||
|
||||
label preferences_screen:
|
||||
|
||||
$ renpy.show_screen('preferences')
|
||||
$ ui.interact()
|
||||
|
||||
jump _noisy_return
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Copyright 2004-2010 PyTom <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python hide:
|
||||
|
||||
layout.provides('yesno_prompt')
|
||||
|
||||
def yesno_prompt(screen, message):
|
||||
return renpy.call_screen('yesno_prompt', message=message, yes_action=Return(True), no_action=Return(False))
|
||||
|
||||
layout.yesno_prompt = yesno_prompt
|
||||
@@ -0,0 +1,2 @@
|
||||
lib\windows-i686\python.exe -OO renpy.py
|
||||
pause
|
||||
@@ -1,256 +1,232 @@
|
||||
#!/home/tom/bin/renpython -O
|
||||
# Builds a distributions of Ren'Py.
|
||||
|
||||
# Builds a distribution of Ren'Py.
|
||||
|
||||
import sys
|
||||
import os
|
||||
import zipfile
|
||||
import tarfile
|
||||
import time
|
||||
import zlib
|
||||
import compileall
|
||||
import shutil
|
||||
import subprocess
|
||||
import makeupdate
|
||||
import time
|
||||
import argparse
|
||||
import glob
|
||||
|
||||
zlib.Z_DEFAULT_COMPRESSION = 9
|
||||
ROOT = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
# Gets the data for the given file.
|
||||
def data(fn):
|
||||
def copy_tutorial_file(src, dest):
|
||||
"""
|
||||
Copies a file from src to dst. Lines between "# tutorial-only" and
|
||||
"# end-tutorial-only" comments are omitted from the copy.
|
||||
"""
|
||||
|
||||
rv = file(fn, "rb").read()
|
||||
sf = open(src, "rb")
|
||||
df = open(dest, "wb")
|
||||
|
||||
if fn.startswith("renpy.app"):
|
||||
return rv
|
||||
# True if we want to copy the line.
|
||||
copy = True
|
||||
|
||||
if fn.endswith(".rpy") or fn.endswith(".py") or fn.endswith(".txt"):
|
||||
rv = rv.replace("\n", "\r\n")
|
||||
rv = rv.replace("\r\r\n", "\r\n")
|
||||
for l in sf:
|
||||
if "# tutorial-only" in l:
|
||||
copy = False
|
||||
elif "# end-tutorial-only" in l:
|
||||
copy = True
|
||||
else:
|
||||
if copy:
|
||||
df.write(l)
|
||||
|
||||
return rv
|
||||
|
||||
sf.close()
|
||||
df.close()
|
||||
|
||||
def tarup(filename, prefix, files):
|
||||
|
||||
tf = tarfile.open(filename, "w:bz2")
|
||||
tf.dereference = True
|
||||
|
||||
sys.stdout.write(filename)
|
||||
sys.stdout.flush()
|
||||
|
||||
for fn in files:
|
||||
sys.stdout.write(".")
|
||||
sys.stdout.flush()
|
||||
|
||||
tf.add(fn, prefix + "/" + fn, False)
|
||||
|
||||
sys.stdout.write("\n")
|
||||
|
||||
tf.close()
|
||||
|
||||
|
||||
# Creates a zip file.
|
||||
def zipup(filename, prefix, files):
|
||||
|
||||
zf = zipfile.ZipFile(filename, "w")
|
||||
|
||||
sys.stdout.write(filename)
|
||||
sys.stdout.flush()
|
||||
|
||||
for fn in files:
|
||||
sys.stdout.write(".")
|
||||
sys.stdout.flush()
|
||||
|
||||
zi = zipfile.ZipInfo(prefix + "/" + fn)
|
||||
|
||||
st = os.stat(fn)
|
||||
|
||||
zi.date_time = time.gmtime(st.st_mtime)[:6]
|
||||
zi.compress_type = zipfile.ZIP_DEFLATED
|
||||
zi.create_system = 3
|
||||
zi.external_attr = long(st.st_mode) << 16
|
||||
|
||||
zf.writestr(zi, data(fn))
|
||||
|
||||
zf.close()
|
||||
|
||||
sys.stdout.write("\n")
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
|
||||
def tree(root):
|
||||
|
||||
rv = [ ]
|
||||
|
||||
for dirname, dirs, filenames in os.walk(root):
|
||||
|
||||
if "saves" in dirs:
|
||||
dirs.remove("saves")
|
||||
|
||||
if ".svn" in dirs:
|
||||
dirs.remove(".svn")
|
||||
|
||||
if ".doctrees" in dirs:
|
||||
dirs.remove(".doctrees")
|
||||
|
||||
|
||||
for f in filenames:
|
||||
if f[-1] == '~' or f[0] == '.':
|
||||
continue
|
||||
|
||||
if f.endswith(".bak") or f.endswith(".pyc"):
|
||||
continue
|
||||
|
||||
if f == "semantic.cache":
|
||||
continue
|
||||
|
||||
if "libSDL_mixer" in f or "mixer_music" in f:
|
||||
continue
|
||||
|
||||
rv.append(dirname + "/" + f)
|
||||
|
||||
return rv
|
||||
|
||||
def main():
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print "Usage: %s <prefix>" % sys.argv[0]
|
||||
return
|
||||
if not sys.flags.optimize:
|
||||
raise Exception("Not running with python optimization.")
|
||||
|
||||
prefix = sys.argv[1]
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("version")
|
||||
ap.add_argument("--fast", action="store_true")
|
||||
|
||||
# Update the update-version.txt file.
|
||||
p = subprocess.Popen(["bzr", "revno"], stdout=subprocess.PIPE)
|
||||
revno = p.stdout.read().strip() + "-" + str(time.time())
|
||||
p.wait()
|
||||
args = ap.parse_args()
|
||||
|
||||
f = file("lib/update-version.txt", "w")
|
||||
f.write(revno + " base\n")
|
||||
f.close()
|
||||
|
||||
# Compile all the python files.
|
||||
compileall.compile_dir("renpy/", ddir=prefix + "/renpy/", force=1)
|
||||
# Revision updating is done early, so we can do it even if the rest
|
||||
# of the program fails.
|
||||
|
||||
os.environ['RENPY_PATH_ELIDE'] = '/home/tom/ab/renpy:' + prefix
|
||||
# Determine the version. We grab the current revision, and if any
|
||||
# file has changed, bump it by 1.
|
||||
import renpy
|
||||
|
||||
# Chmod the mac app.
|
||||
os.chmod("./renpy.app/Contents/MacOS/Ren'Py Launcher", 0755)
|
||||
match_version = ".".join(str(i) for i in renpy.version_tuple[:2]) #@UndefinedVariable
|
||||
zip_version = ".".join(str(i) for i in renpy.version_tuple[:3]) #@UndefinedVariable
|
||||
|
||||
# Chmod down renpy.py, for now.
|
||||
os.chmod("renpy.py", 0644)
|
||||
|
||||
# Compile the various games
|
||||
for i in [ 'tutorial/game', 'launcher', 'template/game', 'the_question/game' ]:
|
||||
os.system("./renpy.sh --compile --game " + i)
|
||||
|
||||
files = [ ]
|
||||
more_files = [ ]
|
||||
s = subprocess.check_output([ "git", "describe", "--tags", "--dirty", "--match", match_version ])
|
||||
parts = s.strip().split("-")
|
||||
|
||||
files.append("CHANGELOG.txt")
|
||||
files.append("LICENSE.txt")
|
||||
files.extend(tree("common"))
|
||||
files.extend(tree("launcher"))
|
||||
files.extend(tree("tutorial"))
|
||||
files.extend(tree("the_question"))
|
||||
if len(parts) <= 2:
|
||||
vc_version = 0
|
||||
else:
|
||||
vc_version = int(parts[1])
|
||||
|
||||
more_files.extend(tree("jedit"))
|
||||
more_files.extend(tree("lib"))
|
||||
more_files.extend(tree("lib/linux-x86"))
|
||||
|
||||
module_files = [
|
||||
"lib/pysdlsound/linmixer.py",
|
||||
"lib/pysdlsound/__init__.py",
|
||||
"core.c",
|
||||
"ffdecode.c",
|
||||
"IMG_savepng.c",
|
||||
"IMG_savepng.h",
|
||||
"mmx.h",
|
||||
"pss.c",
|
||||
"pss.h",
|
||||
"README.txt",
|
||||
"_renpy.c",
|
||||
"renpy_font.c",
|
||||
"renpy.h",
|
||||
"_renpy.pyx",
|
||||
"renpy_ttf.c",
|
||||
"renpy_ttf.h",
|
||||
"rwobject.c",
|
||||
"setup.py",
|
||||
"sound.c",
|
||||
"sound.pyx",
|
||||
"subpixel.c",
|
||||
"winmixer.c",
|
||||
"winmixer.pyx",
|
||||
"_renpybidi.c",
|
||||
"renpybidicore.c",
|
||||
"_renpybidi.pyx",
|
||||
"_renpy_pysdlgl.c",
|
||||
"_renpy_pysdlgl.pyx",
|
||||
"_renpy_tegl.c",
|
||||
"maketegl.py",
|
||||
"maketegl.txt",
|
||||
]
|
||||
if parts[-1] == "dirty":
|
||||
vc_version += 1
|
||||
|
||||
for i in module_files:
|
||||
files.append('module/' + i)
|
||||
|
||||
files.extend(tree('renpy'))
|
||||
files.append('renpy.py')
|
||||
|
||||
more_files.append('python26.dll')
|
||||
more_files.append('msvcr90.dll')
|
||||
more_files.append('Microsoft.VC90.CRT.manifest')
|
||||
more_files.extend(tree('renpy.app'))
|
||||
more_files.append('renpy.exe')
|
||||
more_files.append("console.exe")
|
||||
more_files.append('renpy.sh')
|
||||
|
||||
files.extend(tree('template'))
|
||||
files.extend(tree('doc'))
|
||||
|
||||
files.sort()
|
||||
more_files.sort()
|
||||
|
||||
# zipup("dists/" + prefix + "-win32.zip", prefix, files)
|
||||
# print "----"
|
||||
zipup("dists/" + prefix + "-sdk.zip", prefix, files + more_files)
|
||||
print "----"
|
||||
tarup("dists/" + prefix + "-sdk.tar.bz2", prefix, files + more_files)
|
||||
print "----"
|
||||
tarup("dists/" + prefix + "-source.tar.bz2", prefix, files)
|
||||
print "----"
|
||||
|
||||
# Make the 7zip.
|
||||
os.chdir("dists")
|
||||
os.system("unzip " + prefix + "-sdk.zip")
|
||||
with open("renpy/vc_version.py", "w") as f:
|
||||
f.write("vc_version = {}".format(vc_version))
|
||||
|
||||
try:
|
||||
os.unlink(prefix + "-sdk.7z")
|
||||
reload(sys.modules['renpy.vc_version']) #@UndefinedVariable
|
||||
except:
|
||||
pass
|
||||
import renpy.vc_version # @UnusedImport
|
||||
|
||||
os.system("7z a " + prefix + "-sdk.7z " + prefix)
|
||||
os.system("cat ../7z.sfx " + prefix + "-sdk.7z > " + prefix + "-sdk.7z.exe""")
|
||||
os.unlink(prefix + "-sdk.7z")
|
||||
reload(sys.modules['renpy'])
|
||||
|
||||
os.chdir("..")
|
||||
# Check that the versions match.
|
||||
full_version = ".".join(str(i) for i in renpy.version_tuple) #@UndefinedVariable
|
||||
if args.version != "renpy-experimental" \
|
||||
and not args.version.startswith("renpy-nightly-") \
|
||||
and not full_version.startswith(args.version):
|
||||
|
||||
if os.path.exists("updates/prerelease"):
|
||||
shutil.rmtree("updates/prerelease")
|
||||
raise Exception("The command-line and Ren'Py versions do not match.")
|
||||
|
||||
os.rename("dists/" + prefix, "updates/prerelease")
|
||||
os.unlink("updates/prerelease/lib/update-version.txt")
|
||||
# The destination directory.
|
||||
destination = os.path.join("dl", args.version)
|
||||
|
||||
makeupdate.make_update("updates/prerelease", revno)
|
||||
print "Version {} ({})".format(args.version, full_version)
|
||||
|
||||
os.chmod("renpy.py", 0755)
|
||||
# Copy over the screens, to keep them up to date.
|
||||
copy_tutorial_file("tutorial/game/screens.rpy", "templates/english/game/screens.rpy")
|
||||
|
||||
# Compile all the python files.
|
||||
compileall.compile_dir("renpy/", ddir="renpy/", force=1, quiet=1)
|
||||
|
||||
# Generate launcher/game/script_version.rpy
|
||||
with open("launcher/game/script_version.rpy", "w") as f:
|
||||
f.write("init -999 python:\n")
|
||||
f.write(" config.script_version = {!r}\n".format(renpy.version_tuple[:3])) # @UndefinedVariable
|
||||
|
||||
# Compile the various games.
|
||||
if not args.fast:
|
||||
for i in [ 'tutorial', 'launcher', 'the_question' ] + glob.glob("templates/*"):
|
||||
print "Compiling", i
|
||||
subprocess.check_call(["./renpy.sh", i, "quit" ])
|
||||
|
||||
|
||||
# Kick off the rapt build.
|
||||
if not args.fast:
|
||||
out = open("/tmp/rapt_build.txt", "wb")
|
||||
|
||||
print("Building RAPT.")
|
||||
|
||||
android = os.path.abspath("android")
|
||||
|
||||
rapt_build = subprocess.Popen([
|
||||
os.path.join(android, "build_renpy.sh"),
|
||||
"renpy",
|
||||
ROOT,
|
||||
],
|
||||
cwd = android,
|
||||
stdout=out,
|
||||
stderr=out)
|
||||
|
||||
code = rapt_build.wait()
|
||||
|
||||
if code:
|
||||
print "RAPT build failed. The output is in /tmp/rapt_build.txt."
|
||||
sys.exit(1)
|
||||
else:
|
||||
print "RAPT build succeeded."
|
||||
|
||||
if not os.path.exists(destination):
|
||||
os.makedirs(destination)
|
||||
|
||||
if args.fast:
|
||||
|
||||
cmd = [
|
||||
"./renpy.sh",
|
||||
"launcher",
|
||||
"distribute",
|
||||
"launcher",
|
||||
"--package",
|
||||
"sdk",
|
||||
"--destination",
|
||||
destination,
|
||||
"--no-update",
|
||||
]
|
||||
|
||||
else:
|
||||
cmd = [
|
||||
"./renpy.sh",
|
||||
"launcher",
|
||||
"distribute",
|
||||
"launcher",
|
||||
"--destination",
|
||||
destination,
|
||||
]
|
||||
|
||||
print
|
||||
print "Did you remember to rebuild the exe after the last change?"
|
||||
print "Did you run me with renpython -OO?"
|
||||
print "Did you update renpy.py and launcher/script_version.rpy?"
|
||||
print "Did you run with a RENPY_SCALE_FACTOR?"
|
||||
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
# Sign the update.
|
||||
if not args.fast:
|
||||
subprocess.check_call([
|
||||
"scripts/sign_update.py",
|
||||
"/home/tom/ab/keys/renpy_private.pem",
|
||||
os.path.join(destination, "updates.json"),
|
||||
])
|
||||
|
||||
|
||||
# Write 7z.exe.
|
||||
sdk = "renpy-{}-sdk".format(zip_version)
|
||||
|
||||
if args.version.startswith("renpy-nightly-"):
|
||||
sdk = args.version + "-sdk"
|
||||
|
||||
if not args.fast:
|
||||
|
||||
# shutil.copy("renpy-ppc.zip", os.path.join(destination, "renpy-ppc.zip"))
|
||||
|
||||
with open("7z.sfx", "rb") as f:
|
||||
sfx = f.read()
|
||||
|
||||
os.chdir(destination)
|
||||
|
||||
if os.path.exists(sdk):
|
||||
shutil.rmtree(sdk)
|
||||
|
||||
subprocess.check_call([ "unzip", "-q", sdk + ".zip" ])
|
||||
|
||||
if os.path.exists(sdk + ".7z"):
|
||||
os.unlink(sdk + ".7z")
|
||||
|
||||
sys.stdout.write("Creating -sdk.7z")
|
||||
|
||||
p = subprocess.Popen([ "7z", "a", sdk +".7z", sdk], stdout=subprocess.PIPE)
|
||||
for i, _l in enumerate(p.stdout):
|
||||
if i % 10 != 0:
|
||||
continue
|
||||
|
||||
sys.stdout.write(".")
|
||||
sys.stdout.flush()
|
||||
|
||||
if p.wait() != 0:
|
||||
raise Exception("7z failed")
|
||||
|
||||
with open(sdk + ".7z", "rb") as f:
|
||||
data = f.read()
|
||||
|
||||
with open(sdk + ".7z.exe", "wb") as f:
|
||||
f.write(sfx)
|
||||
f.write(data)
|
||||
|
||||
os.unlink(sdk + ".7z")
|
||||
shutil.rmtree(sdk)
|
||||
|
||||
else:
|
||||
os.chdir(destination)
|
||||
|
||||
if os.path.exists(sdk + ".7z.exe"):
|
||||
os.unlink(sdk + ".7z.exe")
|
||||
|
||||
print
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
# This contains code for the new day planner. You probably
|
||||
# don't want to change this file, but it might make sense to
|
||||
# change many of the variables or styles defined here from
|
||||
# other files.
|
||||
|
||||
init -100 python:
|
||||
|
||||
# The frame containing the day planner.
|
||||
style.dp_frame = Style(style.frame)
|
||||
style.dp_vbox = Style(style.vbox)
|
||||
style.dp_hbox = Style(style.hbox)
|
||||
|
||||
# The frame and vbox containing a single choice.
|
||||
style.dp_choices = Style(style.default)
|
||||
style.dp_choices_vbox = Style(style.vbox)
|
||||
style.dp_choices.xalign = 0.5
|
||||
|
||||
# Buttons.
|
||||
style.dp_choice_button = Style(style.button)
|
||||
style.dp_choice_button_text = Style(style.button_text)
|
||||
|
||||
style.dp_done_button = Style(style.button)
|
||||
style.dp_done_button_text = Style(style.button_text)
|
||||
|
||||
# Labels.
|
||||
style.dp_label = Style(style.label)
|
||||
style.dp_label_text = Style(style.label_text)
|
||||
|
||||
# The title of the done button.
|
||||
dp_done_title = "Done Planning"
|
||||
|
||||
# A map from period name to the information we know about that
|
||||
# period.
|
||||
__periods = { }
|
||||
|
||||
# The period we're updating.
|
||||
__period = None
|
||||
|
||||
class __Period(object):
|
||||
|
||||
def __init__(self, name, var):
|
||||
self.name = name
|
||||
self.var = var
|
||||
self.acts = [ ]
|
||||
|
||||
def dp_period(name, var):
|
||||
__periods[name] = store.__period = __Period(name, var)
|
||||
|
||||
__None = object()
|
||||
|
||||
def dp_choice(name, value=__None, enable="True", show="True"):
|
||||
|
||||
if not __period:
|
||||
raise Exception("Choices must be part of a defined period.")
|
||||
|
||||
if value is __None:
|
||||
value = name
|
||||
|
||||
__period.acts.append((name, value, enable, show))
|
||||
|
||||
def __set_noncurried(var, value):
|
||||
setattr(store, var, value)
|
||||
return True
|
||||
|
||||
__set = renpy.curry(__set_noncurried)
|
||||
|
||||
|
||||
label day_planner(periods):
|
||||
|
||||
python hide:
|
||||
renpy.choice_for_skipping()
|
||||
|
||||
label day_planner_repeat:
|
||||
|
||||
if renpy.has_label("dp_callback"):
|
||||
call dp_callback
|
||||
|
||||
python hide:
|
||||
|
||||
ui.window(style=style.dp_frame)
|
||||
ui.vbox(style=style.dp_vbox)
|
||||
ui.hbox(style=style.dp_hbox)
|
||||
|
||||
can_continue = True
|
||||
|
||||
for p in periods:
|
||||
|
||||
if p not in __periods:
|
||||
raise Exception("Period %r was never defined." % p)
|
||||
|
||||
ui.window(style=style.dp_choices)
|
||||
ui.vbox(style=style.dp_choices_vbox)
|
||||
|
||||
p = __periods[p]
|
||||
v = getattr(store, p.var)
|
||||
|
||||
layout.label(p.name, "dp")
|
||||
|
||||
valid_choice = False
|
||||
|
||||
for name, value, enable, show in p.acts:
|
||||
show = eval(show)
|
||||
enable = eval(enable)
|
||||
|
||||
selected = (v == value)
|
||||
|
||||
if show:
|
||||
layout.button(
|
||||
name,
|
||||
"dp_choice",
|
||||
clicked=__set(p.var, value),
|
||||
selected=selected,
|
||||
enabled=enable,
|
||||
)
|
||||
|
||||
if show and enable and selected:
|
||||
valid_choice = True
|
||||
|
||||
if not valid_choice:
|
||||
can_continue = False
|
||||
|
||||
ui.close()
|
||||
|
||||
ui.close() # hbox.
|
||||
|
||||
layout.button(
|
||||
dp_done_title,
|
||||
"dp_done",
|
||||
clicked=ui.returns(False),
|
||||
enabled=can_continue)
|
||||
|
||||
ui.close() # vbox
|
||||
|
||||
if ui.interact():
|
||||
jump day_planner_repeat
|
||||
else:
|
||||
return
|
||||
@@ -1,328 +0,0 @@
|
||||
# The Ren'Py/DSE event dispatcher. This file contains the code that
|
||||
# actually supports the running of events. Specifically, it contains
|
||||
# code that determines which events are available, which events can
|
||||
# run, and to actually run the events that should be run during a
|
||||
# given period.
|
||||
|
||||
# This isn't really intended to be user-changable.
|
||||
|
||||
init -100 python:
|
||||
|
||||
# A list of all of the events that the system knowns about,
|
||||
# it's filtered to determine which events should run when.
|
||||
all_events = [ ]
|
||||
|
||||
# The base class for events. When constructed, an event
|
||||
# automatically adds itself to all_events.
|
||||
#
|
||||
# The first parameter for this is a unique name for the event,
|
||||
# which is also used as the label that is called when the
|
||||
# event executes.
|
||||
#
|
||||
# All other parameters are expressions. These expressions can
|
||||
# be either strings, or objects having an eval method. Many
|
||||
# interesting objects are given below.
|
||||
#
|
||||
# Keyword arguments are also kept on the object. Currently,
|
||||
# there is one useful keyword argument, priority. This
|
||||
# controls the order in which events are in the event list.
|
||||
# (Events with lower priority number are evaluated first. If a
|
||||
# priority is not specified, it's 100.)
|
||||
class event(object):
|
||||
|
||||
def __repr__(self):
|
||||
return '<event ' + self.name + '>'
|
||||
|
||||
def __init__(self, name, *args, **kwargs):
|
||||
|
||||
self.name = name
|
||||
|
||||
exprs = [ ]
|
||||
|
||||
for i in args:
|
||||
if isinstance(i, basestring):
|
||||
exprs.append(event.evaluate(i))
|
||||
else:
|
||||
exprs.append(i)
|
||||
|
||||
self.exprs = exprs
|
||||
|
||||
self.priority = kwargs.get('priority', 100)
|
||||
|
||||
all_events.append(self)
|
||||
|
||||
# Checks to see if this event is valid. It's called with
|
||||
# a list of events that have already checked out to be
|
||||
# True, and returns True if this event checks out.
|
||||
def check(self, valid):
|
||||
|
||||
for i in self.exprs:
|
||||
if not i.eval(self.name, valid):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def properties(self):
|
||||
|
||||
rv = { }
|
||||
|
||||
for i in self.exprs:
|
||||
rv.update(i.properties())
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
# The base class for all of the event checks given below.
|
||||
class event_check(object):
|
||||
|
||||
def properties(self):
|
||||
return { }
|
||||
|
||||
def __invert__(self):
|
||||
return event.false(self)
|
||||
|
||||
def __and__(self, other):
|
||||
return event.and_op(self, other)
|
||||
|
||||
def __or__(self, other):
|
||||
return event.or_op(self, other)
|
||||
|
||||
|
||||
# This evaluates the expression given as an argument, and the
|
||||
# returns true if it evaluates to true.
|
||||
class evaluate(event_check):
|
||||
|
||||
def __init__(self, expr):
|
||||
self.expr = expr
|
||||
|
||||
def eval(self, name, valid):
|
||||
return eval(self.expr)
|
||||
|
||||
# If present as a condition to an event, an object of this
|
||||
# type ensures that the event will only execute once.
|
||||
class once(event_check):
|
||||
def eval(self, name, valid):
|
||||
return name not in events_executed
|
||||
|
||||
# Returns True if no event of higher priority can execute,
|
||||
# and false otherwise. In general, solo events should be
|
||||
# the lowest priority, and are run if nothing else is.
|
||||
class solo(event_check):
|
||||
def eval(self, name, valid):
|
||||
|
||||
# True if valid is empty.
|
||||
return not valid
|
||||
|
||||
# Returns True if no event of higher priority can execute.
|
||||
# This also prevents other events from executing.
|
||||
class only(solo):
|
||||
|
||||
def properties(self):
|
||||
return dict(only=True)
|
||||
|
||||
|
||||
# Returns True if the given events have happend already,
|
||||
# at any time in the game. False if at least one hasn't
|
||||
# happened yet.
|
||||
class happened(event_check):
|
||||
def __init__(self, *events):
|
||||
self.events = events
|
||||
|
||||
def eval(self, name, valid):
|
||||
for i in self.events:
|
||||
if i not in events_executed:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
# Returns True probability of the time, where probability
|
||||
# is a number between 0 and 1.
|
||||
class random(event_check):
|
||||
|
||||
def __init__(self, probability):
|
||||
self.probability = probability
|
||||
|
||||
def eval(self, name, valid):
|
||||
return renpy.random.random() <= self.probability
|
||||
|
||||
# Chooses only one from the group.
|
||||
class choose_one(event_check):
|
||||
|
||||
def __init__(self, group, group_count=1):
|
||||
self.group = group
|
||||
self.group_count = group_count
|
||||
|
||||
def eval(self, name, valid):
|
||||
return True
|
||||
|
||||
def properties(self):
|
||||
return dict(group=self.group,
|
||||
group_count=self.group_count)
|
||||
|
||||
|
||||
# Evaluates its argument, and returns true if it is false
|
||||
# and vice-versa.
|
||||
class false(event_check):
|
||||
def __init__(self, cond):
|
||||
self.cond = cond
|
||||
|
||||
def eval(self, name, valid):
|
||||
return not self.cond.eval(name, valid)
|
||||
|
||||
# Handles the and operator.
|
||||
class and_op(event_check):
|
||||
|
||||
def __init__(self, *args):
|
||||
self.args = args
|
||||
|
||||
def eval(self, name, valid):
|
||||
for i in self.args:
|
||||
if not i.eval(name, valid):
|
||||
return False
|
||||
return True
|
||||
|
||||
# Handles the or operator.
|
||||
class or_op(event_check):
|
||||
|
||||
def __init__(self, *args):
|
||||
self.args = args
|
||||
|
||||
def eval(self, name, valid):
|
||||
for i in self.args:
|
||||
if i.eval(name, valid):
|
||||
return True
|
||||
return False
|
||||
|
||||
# Returns True if all of the events given as arguments have
|
||||
# happened yesterday or earlier, or False otherwise.
|
||||
class depends(event_check):
|
||||
def __init__(self, *events):
|
||||
self.events = events
|
||||
|
||||
def eval(self, name, valid):
|
||||
for i in self.events:
|
||||
if i not in events_executed_yesterday:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
# The number of periods to skip.
|
||||
skip_periods = 0
|
||||
|
||||
# This returns True if the current period should be skipped,
|
||||
# or False if the current period should execute. If it returns
|
||||
# True, it decrements skip_periods.
|
||||
def check_skip_period():
|
||||
|
||||
global skip_periods
|
||||
|
||||
if skip_periods:
|
||||
skip_periods -= 1
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def __events_init():
|
||||
store.events_executed = { }
|
||||
store.events_executed_yesterday = { }
|
||||
|
||||
config.start_callbacks.append(__events_init)
|
||||
|
||||
|
||||
# This should called at the end of a (game) day, to let things
|
||||
# like depends_yesterday to work.
|
||||
label events_end_day:
|
||||
|
||||
$ skip_periods = 0
|
||||
|
||||
python hide:
|
||||
|
||||
# We can't skip between days.
|
||||
skip_periods = 0
|
||||
|
||||
for k in events_executed:
|
||||
events_executed_yesterday[k] = True
|
||||
|
||||
return
|
||||
|
||||
# This is called once per period, to determine, and then execute, the
|
||||
# events that should be run for that period.
|
||||
label events_run_period:
|
||||
|
||||
$ events = [ ]
|
||||
|
||||
python hide:
|
||||
|
||||
eobjs = [ ]
|
||||
egroups = { }
|
||||
eingroup = { }
|
||||
|
||||
for i in all_events:
|
||||
if not i.check(eobjs):
|
||||
continue
|
||||
|
||||
eobjs.append(i)
|
||||
|
||||
props = i.properties()
|
||||
|
||||
if 'group' in props:
|
||||
group = props['group']
|
||||
count = props['group_count']
|
||||
|
||||
egroups.setdefault(group, [ ]).extend([ i ] * count)
|
||||
eingroup[i] = group
|
||||
|
||||
if 'only' in props:
|
||||
break
|
||||
|
||||
echosen = { }
|
||||
|
||||
for k in egroups:
|
||||
echosen[k] = renpy.random.choice(egroups[k])
|
||||
|
||||
for i in eobjs:
|
||||
|
||||
if i in eingroup and echosen[eingroup[i]] is not i:
|
||||
continue
|
||||
|
||||
events.append(i.name)
|
||||
|
||||
|
||||
while not check_skip_period() and events:
|
||||
|
||||
$ _event = events.pop(0)
|
||||
$ events_executed[_event] = True
|
||||
|
||||
call expression _event from call_expression_event_1
|
||||
|
||||
return
|
||||
|
||||
# If this is jumped to, it will end the current period immediately,
|
||||
# and return control to the main program.
|
||||
label events_end_period:
|
||||
|
||||
$ skip_period = 1
|
||||
return
|
||||
|
||||
# If this is jumped to, it will end the current period and skip
|
||||
# the next period. Use this if, say, the user goes on a date that
|
||||
# takes up two time slots.
|
||||
label events_skip_period:
|
||||
|
||||
$ skip_period = 2
|
||||
return
|
||||
|
||||
|
||||
init 100:
|
||||
python hide:
|
||||
# Sort all events on priority.
|
||||
all_events.sort(key=lambda i : i.priority)
|
||||
|
||||
python hide:
|
||||
|
||||
for i in all_events:
|
||||
if not renpy.has_label(i.name):
|
||||
raise Exception("'%s' is defined as an event somewhere in the game, but no label named '%s' was defined anywhere." % (i.name, i.name))
|
||||
|
||||
|
||||
@@ -1,767 +0,0 @@
|
||||
# This file contains the events that will be part of the game. It's
|
||||
# expected that the user will add and remove events as appropriate
|
||||
# for this game.
|
||||
|
||||
|
||||
# Some characters that are used in events in the game.
|
||||
init:
|
||||
$ t = Character('Teacher')
|
||||
$ gg = Character('Glasses Girl', color=(192, 255, 192, 255))
|
||||
$ sg = Character('Sporty Girl', color=(255, 255, 192, 255))
|
||||
$ bg = Character('Both Girls')
|
||||
$ narrator = Character(' ')
|
||||
|
||||
# First up, we define some simple events for the various actions, that
|
||||
# are run only if no higher-priority event is about to occur.
|
||||
|
||||
init:
|
||||
$ event("class", "act == 'class'", event.only(), priority=200)
|
||||
$ event("class_bad", "act == 'class'", priority=210)
|
||||
$ event("cut1", "act == 'cut'", event.choose_one('cut'), priority=200)
|
||||
$ event("cut2", "act == 'cut'", event.choose_one('cut'), priority=200)
|
||||
$ event("study", "act == 'study'", event.solo(), priority=200)
|
||||
$ event("hang", "act == 'hang'", event.solo(), priority=200)
|
||||
$ event("exercise", "act == 'exercise'", event.solo(), priority=200)
|
||||
$ event("play", "act == 'play'", event.solo(), priority=200)
|
||||
|
||||
label class:
|
||||
|
||||
"I make it to class just in time, and proceed to listen to the
|
||||
teacher droning on about a wide range of topics, none of which
|
||||
are remotely interesting."
|
||||
|
||||
return
|
||||
|
||||
# For test purposes only.
|
||||
label class_bad:
|
||||
|
||||
"You shouldn't be seeing this."
|
||||
|
||||
"This is because class was declared with event.only(), which
|
||||
should suspend processing of further events."
|
||||
|
||||
"This is really for testing purposes only."
|
||||
|
||||
return
|
||||
|
||||
label cut1:
|
||||
|
||||
"I cut class, and spend the morning goofing off instead."
|
||||
$ intelligence -= 10
|
||||
|
||||
return
|
||||
|
||||
label cut2:
|
||||
|
||||
"I cut class, and spend the morning playing computer games."
|
||||
|
||||
return
|
||||
|
||||
label study:
|
||||
|
||||
"I head on down to the library, and start reading about the topics
|
||||
I should have been reading about in class."
|
||||
|
||||
$ intelligence += 10
|
||||
return
|
||||
|
||||
label hang:
|
||||
|
||||
"I spend the afternoon hanging out with my friends, killing
|
||||
some time."
|
||||
|
||||
return
|
||||
|
||||
label exercise:
|
||||
|
||||
"I decide to go out for a run through the town, to keep myself in
|
||||
shape."
|
||||
|
||||
$ strength += 10
|
||||
return
|
||||
|
||||
label play:
|
||||
|
||||
"I pop a DVD into my video game console, and spend the evening
|
||||
rolling small cities up into balls."
|
||||
|
||||
$ strength -= 10
|
||||
return
|
||||
|
||||
|
||||
# Below here are special events that are triggered when certain
|
||||
# conditions are true.
|
||||
|
||||
# This is an introduction event, that runs once when we first go
|
||||
# to class.
|
||||
|
||||
init:
|
||||
$ event("introduction", "act == 'class'", event.once(), event.only())
|
||||
|
||||
label introduction:
|
||||
|
||||
"I run to school, and make it to my seat just as the bell
|
||||
signalling the start of class rings."
|
||||
|
||||
t "Before we start, I have an announcement to make."
|
||||
|
||||
t "We will have two new students joining us. Girls, come on in."
|
||||
|
||||
"Two girls walk in, and stand in front of the class."
|
||||
|
||||
"They're twins."
|
||||
|
||||
"Identical twins."
|
||||
|
||||
"Identical black hair, and the same pretty face."
|
||||
|
||||
"Despite that, it's still fairly easy to tell them apart."
|
||||
|
||||
"The one on the left is wearing glasses."
|
||||
|
||||
"Not too thick, but enough to let me know she probably reads alot
|
||||
of books."
|
||||
|
||||
"If I look a little closely, I can find another difference."
|
||||
|
||||
"The one on the right probably exercises a bit more."
|
||||
|
||||
"I can tell by the muscle tone in her legs."
|
||||
|
||||
"I realize that I'm staring at her legs, and quickly look up."
|
||||
|
||||
"Suddenly, I realize that she's been talking for all this town."
|
||||
|
||||
sg "... to this town. And we hope to be friends with all of you."
|
||||
|
||||
sg "Well, that's about it. Sis, do you have anything to say?"
|
||||
|
||||
"The girl with glasses pauses for a second, and then quickly says:"
|
||||
|
||||
gg "{size=-4}It's good to meet you all.{/size}"
|
||||
|
||||
"She stops, and goes back to not saying anything."
|
||||
|
||||
t "Well, if that's all, you can take your seats and we can start
|
||||
the class."
|
||||
|
||||
"They do, and our teacher begins his lecture."
|
||||
|
||||
"I don't think anyone pays much attention to it, however."
|
||||
|
||||
return
|
||||
|
||||
|
||||
# These are the events with glasses girl.
|
||||
|
||||
init:
|
||||
# The glasses girl is studying in the library, but we do not
|
||||
# talk to her.
|
||||
#
|
||||
#
|
||||
$ event("gg_studying",
|
||||
|
||||
# This takes place when the action is 'study'.
|
||||
"act == 'study'",
|
||||
|
||||
# This will only take place if no higher-priority
|
||||
# event will occur.
|
||||
event.solo(),
|
||||
|
||||
# This takes place at least one day after seeing the
|
||||
# introduction event.
|
||||
event.depends("introduction"),
|
||||
|
||||
# This takes priority over the study event.
|
||||
priority=190)
|
||||
|
||||
# She asks to borrow our pen.
|
||||
$ event("borrow_pen",
|
||||
|
||||
# This takes place when we go to study, and we have an int
|
||||
# >= 50.
|
||||
"act == 'study' and intelligence >= 50",
|
||||
|
||||
# It runs only once.
|
||||
event.once(),
|
||||
|
||||
# It requires the introduction event to have run at least
|
||||
# one day before.
|
||||
event.depends("introduction"))
|
||||
|
||||
# After the pen, she smiles when she sees us.
|
||||
$ event("gg_smiling", "act == 'study'",
|
||||
event.solo(), event.depends("borrow_pen"),
|
||||
priority = 180)
|
||||
|
||||
# The bookslide.
|
||||
$ event("bookslide", "act == 'study' and intelligence == 100",
|
||||
event.once(), event.depends("borrow_pen"))
|
||||
|
||||
# She makes us cookies.
|
||||
$ event("cookies", "act == 'study'",
|
||||
event.once(), event.depends("bookslide"))
|
||||
|
||||
# Her solo ending.
|
||||
$ event("gg_confess", "act == 'class'",
|
||||
event.once(), event.depends("cookies"))
|
||||
|
||||
|
||||
label gg_studying:
|
||||
|
||||
"I head to the library, to get some studying done."
|
||||
|
||||
"The glasses girl is there, but she's busy reading a book, taking
|
||||
notes as she does so."
|
||||
|
||||
"I decide not to disturb her, and instead start reading my own
|
||||
book."
|
||||
|
||||
$ intelligence += 10
|
||||
|
||||
return
|
||||
|
||||
label borrow_pen:
|
||||
|
||||
"I head to the library, to get some studying done."
|
||||
|
||||
"The glasses girl is there, but she's busy reading a book."
|
||||
|
||||
"I decide not to disturb her, and instead start reading my own
|
||||
book."
|
||||
|
||||
"Suddenly, I feel a tap on my shoulder."
|
||||
|
||||
"I look up, and see the glasses girl standing right next to me."
|
||||
|
||||
gg "Excuse me, but can I borrow your pen?"
|
||||
|
||||
gg "Mine ran out of ink."
|
||||
|
||||
"I dig through my bag, to find the pen I had stashed there."
|
||||
|
||||
"While I'm looking, I point out that she seems to come to the
|
||||
library alot."
|
||||
|
||||
gg "Hm... I guess you're right."
|
||||
|
||||
gg "There's so much stuff here, and I want to know about it all."
|
||||
|
||||
gg "Surely, you must feel the same way, as you're here almost as
|
||||
much as I am."
|
||||
|
||||
"I don't have the heart to tell her that I'm only here to study so
|
||||
that I don't fail out."
|
||||
|
||||
"My hand brushes the pen, and I quickly pull it out and give it to
|
||||
her."
|
||||
|
||||
gg "Thank you."
|
||||
|
||||
"She says, and she goes back to studying."
|
||||
|
||||
return
|
||||
|
||||
label gg_smiling:
|
||||
|
||||
"I head to the library, to get some studying done."
|
||||
|
||||
"The glasses girl is there, and smiles at me for a second before
|
||||
turning back to her book."
|
||||
|
||||
"I decide not to disturb her, and instead start reading my own
|
||||
book."
|
||||
|
||||
$ intelligence += 10
|
||||
|
||||
return
|
||||
|
||||
label bookslide:
|
||||
|
||||
"I head to the library, to get some studying done."
|
||||
|
||||
"The glasses girl is standing right by the entrance, putting a
|
||||
book back into a bookcase containing science books."
|
||||
|
||||
"It looks quite old, and quite weak, as if it could break at any
|
||||
time."
|
||||
|
||||
"Suddenly, I hear a loud crack come from the bookcase."
|
||||
|
||||
"Without thinking, I throw myself between the girl and the
|
||||
bookcase, pushing her out of the way in the process."
|
||||
|
||||
"As the shelves fail one by one, I'm hit with large textbooks on
|
||||
topics ranging from Astronomy to Zoology."
|
||||
|
||||
"She's safe, but I'm knocked off my feet by the falling books."
|
||||
|
||||
"Before the dust even settled, the girl with glasses realized what
|
||||
happened and asked:"
|
||||
|
||||
gg "Are you alright?"
|
||||
|
||||
"I tell her that I am, all the while rubbing a bruise left by a
|
||||
particularly large Physics book."
|
||||
|
||||
gg "You saved me."
|
||||
|
||||
"She points out. I shrug... I guess I did, but it's not like I'm a
|
||||
hero or anything."
|
||||
|
||||
"She extends out her hand, I take it, and she helps me to get up."
|
||||
|
||||
gg "Wow... Um..."
|
||||
|
||||
"She doesn't know what to say."
|
||||
|
||||
"I suggest that we help clean up the mess, mostly to take her off
|
||||
the spot."
|
||||
|
||||
"She agrees, and together we begin piling the books up into neat
|
||||
piles."
|
||||
|
||||
return
|
||||
|
||||
|
||||
label cookies:
|
||||
|
||||
"I head to the library, to get some studying done."
|
||||
|
||||
"The glasses girl is there, apparently waiting for me."
|
||||
|
||||
"She's holding a package in her hands."
|
||||
|
||||
gg "Here."
|
||||
|
||||
"She says, and she hands me the package."
|
||||
|
||||
"I take it from her, and open it."
|
||||
|
||||
"It contains fresh homemade cookies. Ginger snaps, I think."
|
||||
|
||||
gg "It's to thank you."
|
||||
|
||||
"She points out... She's probably not used to this. Especially
|
||||
with guys."
|
||||
|
||||
"I take one of them, and stick it in my mouth."
|
||||
|
||||
"The taste is exquisite."
|
||||
|
||||
"It's perhaps one of the best cookies I've ever tasted."
|
||||
|
||||
"Of course it is. It's the only cookie I'd ever tasted that was
|
||||
made for me by a beutiful girl."
|
||||
|
||||
"I tell her this... that it's delicious, not the girl part."
|
||||
|
||||
"But I do let slip that if I could eat these every day, I'd be the
|
||||
happiest guy in the world."
|
||||
|
||||
"At this, she can only blush."
|
||||
|
||||
return
|
||||
|
||||
label gg_confess:
|
||||
|
||||
"I once again barely make it to class on time."
|
||||
|
||||
"I sit down, at my desk, and put some of my books into it."
|
||||
|
||||
"My hand brushes a folded sheet of paper, one I didn't remember
|
||||
putting in there."
|
||||
|
||||
"It's a girl's handwriting... \"Meet me on the roof at lunch.\""
|
||||
|
||||
"That's all it says... no signature or anything."
|
||||
|
||||
"Lunch is a few hours away, but the time passes like a blur."
|
||||
|
||||
"It's all I can do to avoid racing up to the roof... but I give it
|
||||
some time anyway."
|
||||
|
||||
"It wouldn't make sense for me to get there first."
|
||||
|
||||
"I let two minutes elapse before leaving the classroom, and then
|
||||
slowly walk the flights of stairs up to the roof."
|
||||
|
||||
"Standing there, I find the glasses girl."
|
||||
|
||||
"She's holding what looks like a homemade lunch... big enough for
|
||||
two."
|
||||
|
||||
"I look at it, then her, then remember what I had said after she
|
||||
made me the cookies."
|
||||
|
||||
"Finally, I ask her... \"Does this mean?\""
|
||||
|
||||
"She nods. It's all the confirmation I need."
|
||||
|
||||
"I sit down next to my new girlfriend... and together we start
|
||||
eating her lunch."
|
||||
|
||||
"I'm probably the happiest guy in the world."
|
||||
|
||||
"But I still have to find out her name."
|
||||
|
||||
".:. Ending 1."
|
||||
|
||||
$ renpy.full_restart()
|
||||
|
||||
|
||||
init:
|
||||
|
||||
$ event("catchme", "act == 'exercise'",
|
||||
event.depends('introduction'), event.once())
|
||||
|
||||
$ event("cantcatchme", "act == 'exercise'",
|
||||
event.depends('catchme'), event.solo(), priority=190)
|
||||
|
||||
$ event("caughtme", "act == 'exercise' and strength >= 50",
|
||||
event.depends('catchme'), event.once())
|
||||
|
||||
$ event("together", "act == 'exercise' and strength >= 50",
|
||||
event.depends('caughtme'), event.solo(), priority=180)
|
||||
|
||||
$ event("apart", "act == 'exercise' and strength < 50",
|
||||
event.depends('caughtme'), event.solo(), priority=180)
|
||||
|
||||
$ event("pothole", "act == 'exercise' and strength >= 100",
|
||||
event.depends('caughtme'), event.once())
|
||||
|
||||
$ event("dontsee", "act == 'exercise'",
|
||||
event.depends('pothole'), event.solo(), priority=170)
|
||||
|
||||
$ event("sg_confess", "act == 'class'",
|
||||
event.depends('dontsee'), event.once())
|
||||
|
||||
|
||||
label catchme:
|
||||
|
||||
"I decide to go out for a run, to keep myself in shape."
|
||||
|
||||
"As I'm running through the town, I see a girl."
|
||||
|
||||
"She's one of the twins who transferred into my class."
|
||||
|
||||
"She waves, and comes over to me."
|
||||
|
||||
sg "I didn't know you were a runner."
|
||||
|
||||
"I point out that I'm not really a runner... I just run a little
|
||||
bit at a time."
|
||||
|
||||
"I ask her if she wants to run with me for a while."
|
||||
|
||||
sg "As if! You couldn't keep up with me."
|
||||
|
||||
"I point out that I probably can."
|
||||
|
||||
sg "Well, let's see."
|
||||
|
||||
"We set off running, but she quickly pulls past me."
|
||||
|
||||
sg "See? Well, maybe we can try it again when you're a bit
|
||||
faster."
|
||||
|
||||
sg "Until then, later."
|
||||
|
||||
"Even though I'm jogging, she pulls away as if it is nothing."
|
||||
|
||||
return
|
||||
|
||||
label cantcatchme:
|
||||
|
||||
"I'm out running again, when the sporty girl catches up to me."
|
||||
|
||||
sg "Still at it?"
|
||||
|
||||
sg "Well, keep up the good work. One day you'll be as fast as me!"
|
||||
|
||||
sg "Well, maybe."
|
||||
|
||||
"She pulls out past me, and disappears into the distance. One day
|
||||
I'll catch up to her."
|
||||
|
||||
$ strength += 10
|
||||
|
||||
return
|
||||
|
||||
label caughtme:
|
||||
|
||||
"I'm out running again, when the sporty girl catches up to me."
|
||||
|
||||
sg "Still at it?"
|
||||
|
||||
sg "Well, keep up the good work. One day you'll be as fast as me!"
|
||||
|
||||
sg "Well, maybe."
|
||||
|
||||
|
||||
"Today, however, I'm not about to let this stand unchallenged."
|
||||
|
||||
"I break out into a run, and for the first time ever, I keep up
|
||||
with her."
|
||||
|
||||
"We both run, neck and neck, me keeping up with her."
|
||||
|
||||
"Finally, she starts slowing down, and we come to a stop
|
||||
together."
|
||||
|
||||
sg "Not bad."
|
||||
|
||||
"She pauses to catch her breath."
|
||||
|
||||
sg "You've been practicing, and it really shows."
|
||||
|
||||
sg "You've finally become fast enough to run with me."
|
||||
|
||||
"I nod, accepting her praise."
|
||||
|
||||
sg "We should do this more often... it's better to run with
|
||||
someone else, to keep the challenge up."
|
||||
|
||||
"I nod again."
|
||||
|
||||
sg "Well, shall we go?"
|
||||
|
||||
"I nod a third time, and we take off, running side by side."
|
||||
|
||||
$ strength += 10
|
||||
|
||||
return
|
||||
|
||||
label together:
|
||||
|
||||
"I start running, and meet up with the sporty girl as she passes
|
||||
the street in front of my house."
|
||||
|
||||
"She's still better than me... she's been running for over a mile
|
||||
before reaching this point."
|
||||
|
||||
"Still, I can keep up with her for the rest of the run. And that's
|
||||
not bad."
|
||||
|
||||
$ strength += 10
|
||||
|
||||
return
|
||||
|
||||
label apart:
|
||||
|
||||
"I start running, and meet up with the sporty girl as she passes
|
||||
the street in front of my house."
|
||||
|
||||
"I try to keep up with her, but she pulls away from me."
|
||||
|
||||
"When she's a block away, she slows down and lets me catch up."
|
||||
|
||||
sg "It's your own fault... this is what you get for not
|
||||
practicing."
|
||||
|
||||
"She's right, of course, and I redouble my efforts to try to keep
|
||||
up with her."
|
||||
|
||||
$ strength += 10
|
||||
return
|
||||
|
||||
label pothole:
|
||||
|
||||
"I start running, and meet up with the sporty girl as she passes
|
||||
the street in front of my house."
|
||||
|
||||
"We run together for several miles."
|
||||
|
||||
"I think about how much I've improved in our time together."
|
||||
|
||||
"And, although she probably won't admit it, I think she's improved
|
||||
as well."
|
||||
|
||||
"I guess a little friendly competition is usually for the best."
|
||||
|
||||
"A small yelp pulls me out of my thought."
|
||||
|
||||
sg "Ow!"
|
||||
|
||||
"The sporty girl sits down, grabbing her ankle."
|
||||
|
||||
"I ask her what happened."
|
||||
|
||||
sg "I... hit a... pothole. Twisted my... ankle."
|
||||
|
||||
"I wince in sympathy."
|
||||
|
||||
"We wait a bit. I'm not sure what to do."
|
||||
|
||||
"Finally, I ask her if she can walk on it."
|
||||
|
||||
"She tries for a bit, but then winces in pain."
|
||||
|
||||
sg "No, I don't think so."
|
||||
|
||||
"I realize that we can't stay here."
|
||||
|
||||
"And so, I crouch down and motion for her to climb up onto my
|
||||
back."
|
||||
|
||||
sg "What are you doing?"
|
||||
|
||||
"I explain that she can't stay out in the middle of the street
|
||||
forever, and she won't get any help until I can get her home."
|
||||
|
||||
"And the only way to do that is for me to carry her."
|
||||
|
||||
"She accepts this, and climbs up onto my back."
|
||||
|
||||
"She wraps her arms around my neck, and I place my hands
|
||||
underneath her to make a seat."
|
||||
|
||||
"I stand up, and start carrying her home."
|
||||
|
||||
return
|
||||
|
||||
label dontsee:
|
||||
|
||||
"I go running again."
|
||||
|
||||
"But this time, I don't see the sporty girl."
|
||||
|
||||
"I finish the course that we usually take, but it's not the same
|
||||
without her."
|
||||
|
||||
return
|
||||
|
||||
label sg_confess:
|
||||
|
||||
"I once again barely make it to class on time."
|
||||
|
||||
"I sit down, at my desk, and put some of my books into it."
|
||||
|
||||
"My hand brushes a folded sheet of paper, one I didn't remember
|
||||
putting in there."
|
||||
|
||||
"It's a girl's handwriting... \"Meet me on the roof at lunch.\""
|
||||
|
||||
"That's all it says... no signature or anything."
|
||||
|
||||
"Lunch is a few hours away, but the time passes like a blur."
|
||||
|
||||
"It's all I can do to avoid racing up to the roof... but I give it
|
||||
some time anyway."
|
||||
|
||||
"It wouldn't make sense for me to get there first."
|
||||
|
||||
"I let two minutes elapse before leaving the classroom, and then
|
||||
slowly walk the flights of stairs up to the roof."
|
||||
|
||||
"Standing there, I find the sporty girl."
|
||||
|
||||
"She's leaning on a crutch."
|
||||
|
||||
"I look at it for a second, and she notices that."
|
||||
|
||||
sg "I went to the doctor, and he gave me this."
|
||||
|
||||
sg "Looks like we won't be running together for a while."
|
||||
|
||||
"I nod."
|
||||
|
||||
sg "And that's why I asked you here."
|
||||
|
||||
sg "I couldn't stand the though of not seeing you for a few
|
||||
weeks."
|
||||
|
||||
"I search my feelings, and realize I feel the same way."
|
||||
|
||||
sg "So I thought..."
|
||||
|
||||
"She doesn't say it... she doesn't need to."
|
||||
|
||||
"We both know how we feel about each other."
|
||||
|
||||
"And with that, we went from being running partners to partners in
|
||||
a deeper sense."
|
||||
|
||||
"Now if I only knew her name..."
|
||||
|
||||
".:. Ending 2."
|
||||
|
||||
$ renpy.full_restart()
|
||||
|
||||
|
||||
init:
|
||||
|
||||
# This needs to be higher-priority than either girl's ending.
|
||||
$ event('both_confess', 'act == "class"',
|
||||
event.depends("dontsee"), event.depends("cookies"),
|
||||
event.once(), priority = 50)
|
||||
|
||||
label both_confess:
|
||||
|
||||
"I once again barely make it to class on time."
|
||||
|
||||
"I sit down, at my desk, and put some of my books into it."
|
||||
|
||||
"My hand brushes a folded sheet of paper, then another."
|
||||
|
||||
"I take the first one out, and read it."
|
||||
|
||||
"It's a girl's handwriting... \"Meet me on the roof at lunch.\""
|
||||
|
||||
"That's all it says... no signature or anything."
|
||||
|
||||
"I take a look at the second one, and it says the same thing."
|
||||
|
||||
"Sure, the handwriting is a little different, but..."
|
||||
|
||||
"Lunch is a few hours away, but the time passes like a blur."
|
||||
|
||||
"It's all I can do to avoid racing up to the roof... but I give it
|
||||
some time anyway."
|
||||
|
||||
"I let two minutes elapse before leaving the classroom, and then
|
||||
slowly walk the flights of stairs up to the roof."
|
||||
|
||||
"Standing there are the twins."
|
||||
|
||||
"Both of them."
|
||||
|
||||
"As in, the two notes came from the two twins."
|
||||
|
||||
"I ask them what they are doing there, feigning ignorance."
|
||||
|
||||
sg "Well, I invited you up here to confess to you..."
|
||||
|
||||
sg "... and then I found out that my sister here was about to do
|
||||
the same thing."
|
||||
|
||||
gg "{size=-4}...I was...{/size}"
|
||||
|
||||
sg "When we found out, we were quite shocked, but after comparing
|
||||
notes, we decide what we're going to do..."
|
||||
|
||||
"I quickly run through the possibilities in my head."
|
||||
|
||||
"The best cases involve them never talking to me again."
|
||||
|
||||
"The worst cases involve me being thrown off the roof."
|
||||
|
||||
bg "We're going to share you!"
|
||||
|
||||
"Eh?"
|
||||
|
||||
"That wasn't something I considered."
|
||||
|
||||
"Each of the girls grabs onto one of my arms."
|
||||
|
||||
"I don't know what the future holds for us..."
|
||||
|
||||
"... and I don't know if this will work out."
|
||||
|
||||
"But I do know that one day I will work up the courage to find out
|
||||
their names."
|
||||
|
||||
".:. Ending 3."
|
||||
|
||||
$ renpy.full_restart()
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
# This is the main program. This can be changed quite a bit to
|
||||
# customize it for your program... But remember what you do, so you
|
||||
# can integrate with a new version of DSE when it comes out.
|
||||
|
||||
# Set up a default theme.
|
||||
init python:
|
||||
register_stat("Strength", "strength", 10, 100)
|
||||
register_stat("Intelligence", "intelligence", 10, 100)
|
||||
|
||||
dp_period("Morning", "morning_act")
|
||||
dp_choice("Attend Class", "class")
|
||||
dp_choice("Cut Class", "cut")
|
||||
|
||||
dp_period("Afternoon", "afternoon_act")
|
||||
dp_choice("Study", "study")
|
||||
dp_choice("Hang Out", "hang")
|
||||
|
||||
dp_period("Evening", "evening_act")
|
||||
dp_choice("Exercise", "exercise")
|
||||
dp_choice("Play Games", "play")
|
||||
|
||||
|
||||
# This is the entry point into the game.
|
||||
label start:
|
||||
|
||||
# Initialize the default values of some of the variables used in
|
||||
# the game.
|
||||
$ day = 0
|
||||
|
||||
# Show a default background.
|
||||
scene black
|
||||
|
||||
# The script here is run before any event.
|
||||
|
||||
"In case you're just tuning in, here's the story of my life to
|
||||
date."
|
||||
|
||||
"I'm a guy in the second year of high school."
|
||||
|
||||
"I'm not good at sports or school or even something as simple as
|
||||
remembering peoples names."
|
||||
|
||||
"In short, I am your usual random loser guy."
|
||||
|
||||
"And this is my story..."
|
||||
|
||||
|
||||
# We jump to day to start the first day.
|
||||
jump day
|
||||
|
||||
|
||||
# This is the label that is jumped to at the start of a day.
|
||||
label day:
|
||||
|
||||
# Increment the day it is.
|
||||
$ day += 1
|
||||
|
||||
# We may also want to compute the name for the day here, but
|
||||
# right now we don't bother.
|
||||
|
||||
"It's day %(day)d."
|
||||
|
||||
# Here, we want to set up some of the default values for the
|
||||
# day planner. In a more complicated game, we would probably
|
||||
# want to add and remove choices from the dp_ variables
|
||||
# (especially dp_period_acts) to reflect the choices the
|
||||
# user has available to him.
|
||||
|
||||
$ morning_act = None
|
||||
$ afternoon_act = None
|
||||
$ evening_act = None
|
||||
|
||||
# Now, we call the day planner, which may set the act variables
|
||||
# to new values. We call it with a list of periods that we want
|
||||
# to compute the values for.
|
||||
call day_planner(["Morning", "Afternoon", "Evening"])
|
||||
|
||||
|
||||
# We process each of the three periods of the day, in turn.
|
||||
label morning:
|
||||
|
||||
# Tell the user what period it is.
|
||||
centered "Morning"
|
||||
|
||||
# Set these variables to appropriate values, so they can be
|
||||
# picked up by the expression in the various events defined below.
|
||||
$ period = "morning"
|
||||
$ act = morning_act
|
||||
|
||||
# Ensure that the stats are in the proper range.
|
||||
$ normalize_stats()
|
||||
|
||||
# Execute the events for the morning.
|
||||
call events_run_period
|
||||
|
||||
# That's it for the morning, so we fall through to the
|
||||
# afternoon.
|
||||
|
||||
label afternoon:
|
||||
|
||||
# It's possible that we will be skipping the afternoon, if one
|
||||
# of the events in the morning jumped to skip_next_period. If
|
||||
# so, we should skip the afternoon.
|
||||
if check_skip_period():
|
||||
jump evening
|
||||
|
||||
# The rest of this is the same as for the morning.
|
||||
|
||||
centered "Afternoon"
|
||||
|
||||
$ period = "afternoon"
|
||||
$ act = afternoon_act
|
||||
|
||||
$ normalize_stats()
|
||||
|
||||
call events_run_period
|
||||
|
||||
|
||||
label evening:
|
||||
|
||||
# The evening is the same as the afternoon.
|
||||
if check_skip_period():
|
||||
jump night
|
||||
|
||||
centered "Evening"
|
||||
|
||||
$ period = "evening"
|
||||
$ act = evening_act
|
||||
|
||||
$ normalize_stats()
|
||||
|
||||
call events_run_period
|
||||
|
||||
|
||||
label night:
|
||||
|
||||
# This is now the end of the day, and not a period in which
|
||||
# events can be run. We put some boilerplate end-of-day text
|
||||
# in here.
|
||||
|
||||
centered "Night"
|
||||
|
||||
"It's getting late, so I decide to go to sleep."
|
||||
|
||||
# We call events_end_day to let it know that the day is done.
|
||||
call events_end_day
|
||||
|
||||
# And we jump back to day to start the next day. This goes
|
||||
# on forever, until an event ends the game.
|
||||
jump day
|
||||
|
||||
|
||||
# This is a callback that is called by the day planner. One of the
|
||||
# uses of this is to show the statistics to the user.
|
||||
label dp_callback:
|
||||
|
||||
# Add in a line of dialogue asking the question that's on
|
||||
# everybody's mind.
|
||||
$ narrator("What should I do today?", interact=False)
|
||||
$ display_stats()
|
||||
|
||||
return
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
init -100 python:
|
||||
|
||||
style.stats_frame = Style(style.frame)
|
||||
style.stats_vbox = Style(style.vbox)
|
||||
|
||||
style.stats_label = Style(style.label)
|
||||
style.stats_label_text = Style(style.label_text)
|
||||
|
||||
style.stat_side = Style(style.default)
|
||||
|
||||
style.stat_label = Style(style.label)
|
||||
style.stat_label_text = Style(style.label_text)
|
||||
style.stat_bar = Style(style.bar)
|
||||
style.stat_value_label = Style(style.label)
|
||||
style.stat_value_label_text = Style(style.label_text)
|
||||
|
||||
__dse_stats = [ ]
|
||||
|
||||
class __Stat(object):
|
||||
|
||||
def __init__(self, name, var, default, max):
|
||||
self.name = name
|
||||
self.var = var
|
||||
self.default = default
|
||||
self.max = max
|
||||
|
||||
def __init_stats():
|
||||
for s in __dse_stats:
|
||||
setattr(store, s.var, s.default)
|
||||
|
||||
config.start_callbacks.append(__init_stats)
|
||||
|
||||
def register_stat(name, var, default, max):
|
||||
__dse_stats.append(__Stat(name, var, default, max))
|
||||
|
||||
def normalize_stats():
|
||||
for s in __dse_stats:
|
||||
|
||||
v = getattr(store, s.var)
|
||||
|
||||
if v > s.max:
|
||||
v = s.max
|
||||
if v < 0:
|
||||
v = 0
|
||||
|
||||
setattr(store, s.var, v)
|
||||
|
||||
|
||||
def display_stats(name=True, bar=True, value=True, max=True):
|
||||
|
||||
normalize_stats()
|
||||
|
||||
ui.window(style=style.stats_frame)
|
||||
ui.vbox(style=style.stats_vbox)
|
||||
|
||||
layout.label("Statistics", "stats")
|
||||
|
||||
for s in __dse_stats:
|
||||
v = getattr(store, s.var)
|
||||
|
||||
ui.side(['l', 'r', 'c'], style=style.stat_side)
|
||||
|
||||
if name:
|
||||
layout.label(s.name, "stat")
|
||||
else:
|
||||
ui.null()
|
||||
|
||||
if value and max:
|
||||
layout.label("%d/%d" % (v, s.max), "stat_value")
|
||||
elif value:
|
||||
layout.label("%d" % (v,), "stat_value")
|
||||
elif max:
|
||||
layout.label("%d" % (max,), "stat_value")
|
||||
else:
|
||||
ui.null()
|
||||
|
||||
if bar:
|
||||
ui.bar(s.max, v, style=style.stat_bar)
|
||||
else:
|
||||
ui.null()
|
||||
|
||||
ui.close()
|
||||
|
||||
ui.close()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
# This file contains styles for the day planner.
|
||||
|
||||
init python:
|
||||
|
||||
# Place the day planner.
|
||||
style.dp_frame.ypos = 120
|
||||
style.dp_frame.yanchor = 0.0
|
||||
style.dp_frame.xalign = 0.5
|
||||
|
||||
# Spacing betweeen the choices and the done button.
|
||||
style.dp_vbox.box_spacing = 20
|
||||
|
||||
# Spacing between the choice columns.
|
||||
style.dp_hbox.box_spacing = 20
|
||||
|
||||
# Center the choices.
|
||||
style.dp_choices.xalign = 0.5
|
||||
|
||||
# Center the label of each choice.
|
||||
style.dp_label.xalign = 0.5
|
||||
style.dp_label_text.text_align = 0.5
|
||||
|
||||
# Make each choice button the same size, and centered.
|
||||
style.dp_choice_button.size_group = "dp_choice"
|
||||
style.dp_choice_button.xalign = 0.5
|
||||
|
||||
# Center the done button.
|
||||
style.dp_done_button.xalign = 0.5
|
||||
|
||||
# Put a margin on the stats frame.
|
||||
style.stats_frame.xmargin = 10
|
||||
style.stats_frame.ymargin = 5
|
||||
|
||||
# Space between the label and the stats.
|
||||
style.stats_vbox.box_first_spacing = 10
|
||||
|
||||
# Put blank space around each stat name, and right-justify.
|
||||
style.stat_label.xminimum = 140
|
||||
style.stat_label_text.xalign = 1.0
|
||||
style.stat_label.xmargin = 5
|
||||
|
||||
# Put blank space around each stat value, and right-justify.
|
||||
style.stat_value_label.xminimum = 100
|
||||
style.stat_value_label_text.xalign = 1.0
|
||||
|
||||
|
||||
# Center the stat bar vertically.
|
||||
style.stat_bar.yalign = 0.5
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
description = "A game that demonstrates the use of the dating-sim engine. A non-graphical proof of concept."
|
||||
ro = True
|
||||
@@ -112,7 +112,7 @@ display: none;
|
||||
<dd>Toggles fullscreen mode</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Takes a screenshot, saving it in a file named screenshotxxxx.png, where xxxx is a serial number.</dd>
|
||||
<dt>Alt-H, Command-H</dt>
|
||||
<dt>Alt-M, Command-H</dt>
|
||||
<dd>Hides (iconifies) the window.</dd>
|
||||
<dt>Alt-F4, Command-Q</dt>
|
||||
<dd>Quits the game.</dd>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import renpy
|
||||
|
||||
# Do nothing when the editor is invoked.
|
||||
Editor = renpy.editor.Editor
|
||||
@@ -1,6 +0,0 @@
|
||||
# Name: None
|
||||
# Version: 1
|
||||
# Description: Disables the automatic launching of an editor.
|
||||
|
||||
config.editor = None
|
||||
config.editor_transient = None
|
||||
@@ -0,0 +1,4 @@
|
||||
import renpy
|
||||
|
||||
# Pass the file off to the system editor (as determined by file associations).
|
||||
Editor = renpy.editor.SystemEditor
|
||||
@@ -1,177 +0,0 @@
|
||||
init python:
|
||||
import renpy.tools.archiver as archiver
|
||||
import os
|
||||
import os.path
|
||||
import fnmatch
|
||||
|
||||
label archiver:
|
||||
|
||||
python hide:
|
||||
|
||||
# Get the options
|
||||
name = project.info.get('archive_name', "data")
|
||||
include = project.info.get('archive_include', "*.png *.gif *.jpg")
|
||||
exclude = project.info.get('archive_exclude', "presplash.png")
|
||||
|
||||
# Allow the user to set the options.
|
||||
while True:
|
||||
|
||||
set_tooltip("")
|
||||
|
||||
screen()
|
||||
ui.vbox()
|
||||
|
||||
title(_(u"Archiver"))
|
||||
|
||||
text(_(u"The archiver allows you to obfuscate your game by including files in an archive file."))
|
||||
|
||||
ui.null(height=15)
|
||||
|
||||
text_variable(_(u"Archive Name:"), name, "name",
|
||||
_(u"The name of the archive to create."))
|
||||
|
||||
text_variable(_(u"Include Patterns:"), include, "include",
|
||||
_(u"Files matching these patterns are included in the archive."))
|
||||
|
||||
text_variable(_(u"Exclude Patterns:"), exclude, "exclude",
|
||||
_(u"Files matching these patterns are excluded from the archive."))
|
||||
|
||||
ui.null(height=15)
|
||||
|
||||
button(_(u"Archive"), ui.returns("archive"), _(u"Build the archive."))
|
||||
button(_(u"Cancel"), ui.jumps("top"), "")
|
||||
|
||||
ui.close()
|
||||
|
||||
act = interact()
|
||||
|
||||
if act == "name":
|
||||
name = input(
|
||||
_(u"Archive Name"),
|
||||
_(u"The name of the archive file to create, without the .rpa extension.\n\nThe \"data\" archive is loaded automatically. Other archives must be added to config.archives."),
|
||||
name)
|
||||
|
||||
elif act == "include":
|
||||
include = input(
|
||||
_(u"Include Patterns"),
|
||||
_(u"This is a space-separated list of file patterns. Files matching these patterns are added to the archive.\n\nAsterisks (*) can be used as a wildcard."),
|
||||
include)
|
||||
|
||||
elif act == "exclude":
|
||||
exclude = input(
|
||||
_(u"Include Patterns"),
|
||||
_(u"This is a space-separated list of file patterns. Files matching these patterns are excluded from the archive. If a file is matched by both an exclude and include pattern, the exclude takes precedence.\n\nAsterisks (*) can be used as a wildcard."),
|
||||
exclude)
|
||||
|
||||
elif act == "archive":
|
||||
break
|
||||
|
||||
# Store the options.
|
||||
|
||||
project.info["archive_name"] = name
|
||||
project.info["archive_include"] = include
|
||||
project.info["archive_exclude"] = exclude
|
||||
|
||||
project.save()
|
||||
|
||||
|
||||
# Break up the extension lists.
|
||||
|
||||
include = [ i.strip() for i in include.split() ]
|
||||
exclude = [ i.strip() for i in exclude.split() ]
|
||||
|
||||
# Get the gamedir and the archived dir.
|
||||
gamedir = os.path.join(project.path, "game")
|
||||
archived = os.path.join(project.path, "archived")
|
||||
|
||||
# The prefix of the archive file.
|
||||
prefix = os.path.join(gamedir, name)
|
||||
|
||||
archived_files = set()
|
||||
files = [ ]
|
||||
|
||||
# Choose files to archive.
|
||||
|
||||
set_tooltip("")
|
||||
|
||||
info(
|
||||
_(u"Scanning Files..."),
|
||||
"")
|
||||
|
||||
for bdir in (gamedir, archived):
|
||||
|
||||
for dirname, dirs, filenames in os.walk(bdir):
|
||||
|
||||
dirs[:] = [ i for i in dirs if not i[0] == '.' ]
|
||||
|
||||
for fn in filenames:
|
||||
|
||||
fullfn = dirname + "/" + fn
|
||||
shortfn = fullfn[len(bdir)+1:]
|
||||
|
||||
if fn[0] == ".":
|
||||
continue
|
||||
|
||||
if shortfn in archived_files:
|
||||
continue
|
||||
|
||||
should_archive = False
|
||||
|
||||
for i in include:
|
||||
if fnmatch.fnmatch(fn, i):
|
||||
should_archive = True
|
||||
|
||||
for i in exclude:
|
||||
if fnmatch.fnmatch(fn, i):
|
||||
should_archive = False
|
||||
|
||||
if not should_archive:
|
||||
continue
|
||||
|
||||
files.append((fullfn, shortfn))
|
||||
archived_files.add(shortfn)
|
||||
|
||||
if not files:
|
||||
error(_(u"The patterns did not match any files, so no archive was created."))
|
||||
|
||||
# Actually archiving files.
|
||||
info(_(u"Archiving Files..."), "")
|
||||
|
||||
archiver.archive(prefix, files)
|
||||
|
||||
# Move files out of the way.
|
||||
for fullfn, shortfn in files:
|
||||
afn = archived + "/" + shortfn
|
||||
|
||||
if fullfn == afn:
|
||||
continue
|
||||
|
||||
try:
|
||||
os.makedirs(os.path.dirname(afn))
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
os.rename(fullfn, afn)
|
||||
except:
|
||||
os.rename(afn, afn + ".old")
|
||||
os.rename(fullfn, afn)
|
||||
os.unlink(afn + ".old")
|
||||
|
||||
# Report success.
|
||||
screen()
|
||||
ui.vbox()
|
||||
|
||||
title(_(u"Success"))
|
||||
text(_(u"The files have been added to the archive, and moved into the \"archived\" directory. Future runs of the archiver will archive files in both the \"game\" and \"archived\" directories."))
|
||||
|
||||
ui.null(height=20)
|
||||
|
||||
button(_(u"Return"), ui.jumps("top"), None)
|
||||
|
||||
ui.close()
|
||||
interact()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,326 +0,0 @@
|
||||
init python:
|
||||
|
||||
import codecs
|
||||
import re
|
||||
import sys
|
||||
|
||||
##########################################################################
|
||||
# Code to update options.rpy
|
||||
|
||||
def list_logical_lines(filename):
|
||||
"""
|
||||
This reads in filename, and turns it into a list of logical
|
||||
lines.
|
||||
"""
|
||||
|
||||
f = codecs.open(filename, "rb", "utf-8")
|
||||
data = f.read()
|
||||
f.close()
|
||||
|
||||
# The result.
|
||||
rv = []
|
||||
|
||||
# The current position we're looking at in the buffer.
|
||||
pos = 0
|
||||
|
||||
# Looping over the lines in the file.
|
||||
while pos < len(data):
|
||||
|
||||
# The line that we're building up.
|
||||
line = ""
|
||||
|
||||
# The number of open parenthesis there are right now.
|
||||
parendepth = 0
|
||||
|
||||
# Looping over the characters in a single logical line.
|
||||
while pos < len(data):
|
||||
|
||||
c = data[pos]
|
||||
|
||||
if c == '\n' and not parendepth:
|
||||
rv.append(line)
|
||||
|
||||
pos += 1
|
||||
# This helps out error checking.
|
||||
line = ""
|
||||
break
|
||||
|
||||
# Backslash/newline.
|
||||
if c == "\\" and data[pos+1] == "\n":
|
||||
pos += 2
|
||||
line += "\\\n"
|
||||
continue
|
||||
|
||||
# Parenthesis.
|
||||
if c in ('(', '[', '{'):
|
||||
parendepth += 1
|
||||
|
||||
if c in ('}', ']', ')') and parendepth:
|
||||
parendepth -= 1
|
||||
|
||||
# Comments.
|
||||
if c == '#':
|
||||
while data[pos] != '\n':
|
||||
line += data[pos]
|
||||
pos += 1
|
||||
|
||||
continue
|
||||
|
||||
# Strings.
|
||||
if c in ('"', "'", "`"):
|
||||
delim = c
|
||||
line += c
|
||||
pos += 1
|
||||
|
||||
escape = False
|
||||
|
||||
while pos < len(data):
|
||||
|
||||
c = data[pos]
|
||||
|
||||
if escape:
|
||||
escape = False
|
||||
pos += 1
|
||||
line += c
|
||||
continue
|
||||
|
||||
if c == delim:
|
||||
pos += 1
|
||||
line += c
|
||||
break
|
||||
|
||||
if c == '\\':
|
||||
escape = True
|
||||
|
||||
line += c
|
||||
pos += 1
|
||||
|
||||
continue
|
||||
|
||||
continue
|
||||
|
||||
line += c
|
||||
pos += 1
|
||||
|
||||
if line:
|
||||
rv.append(line)
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
def switch_theme(name):
|
||||
"""
|
||||
Switches the theme of the current project to the named theme.
|
||||
"""
|
||||
|
||||
theme_functions = set(i[1] for i in themes)
|
||||
|
||||
td = theme_data[name].copy()
|
||||
td["name"] = name
|
||||
|
||||
# Did we change the file at all?
|
||||
changed = False
|
||||
|
||||
filename = os.path.join(project.gamedir, "options.rpy")
|
||||
|
||||
out = codecs.open(filename + ".new", "wb", "utf-8")
|
||||
|
||||
for l in list_logical_lines(filename):
|
||||
|
||||
m = re.match(r' theme.(\w+)\(', l)
|
||||
if m:
|
||||
if m.group(1) in theme_functions:
|
||||
l = theme_templates[td["theme"]] % td
|
||||
changed = True
|
||||
|
||||
out.write(l + "\n")
|
||||
|
||||
out.close()
|
||||
|
||||
if changed:
|
||||
try:
|
||||
os.unlink(filename + ".bak")
|
||||
except:
|
||||
pass
|
||||
|
||||
os.rename(filename, filename + ".bak")
|
||||
os.rename(filename + ".new", filename)
|
||||
|
||||
else:
|
||||
os.unlink(filename + ".new")
|
||||
|
||||
error(_(u"Could not modify options.rpy. Perhaps it was changed too much."))
|
||||
|
||||
set_tooltip(_(u"Theme changed to %s.") % name)
|
||||
renpy.jump("top")
|
||||
|
||||
curried_switch_theme = renpy.curry(switch_theme)
|
||||
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Code that handles display.
|
||||
|
||||
current_theme = None
|
||||
|
||||
def show_theme(name, target):
|
||||
"""
|
||||
Changes from the current theme to the roundrect theme named
|
||||
`name`.
|
||||
"""
|
||||
|
||||
if current_theme == name:
|
||||
return
|
||||
|
||||
store.current_theme = name
|
||||
|
||||
td = theme_data[name].copy()
|
||||
kind = td["theme"]
|
||||
del td["theme"]
|
||||
|
||||
if kind == "roundrect":
|
||||
td["rounded_window"] = False
|
||||
|
||||
renpy.style.restore(style_backup)
|
||||
getattr(theme, kind)(**td)
|
||||
customize_styles()
|
||||
renpy.style.rebuild()
|
||||
|
||||
renpy.jump(target)
|
||||
|
||||
curried_show_theme = renpy.curry(show_theme)
|
||||
|
||||
def theme_demo():
|
||||
# The sample area, that shows what the theme looks like.
|
||||
ui.window(style='default', background="#444", xpadding=1, ypadding=1)
|
||||
ui.window(style='gm_root', xpadding=5, ypadding=5)
|
||||
ui.vbox(5)
|
||||
|
||||
# Display Preference.
|
||||
ui.window(style=style.prefs_pref_frame)
|
||||
ui.vbox(style=style.prefs_pref_box)
|
||||
|
||||
ui.hbox(style=style.prefs_pref_choicebox)
|
||||
|
||||
layout.label(_(u"Display"), "prefs")
|
||||
layout.button(_(u"Window"), "prefs", clicked=does_nothing, selected=True)
|
||||
layout.button(_(u"Fullscreen"), "prefs", clicked=does_nothing, selected=False)
|
||||
layout.button(_(u"Planetarium"), "prefs", clicked=None, selected=False)
|
||||
|
||||
ui.close()
|
||||
ui.close()
|
||||
|
||||
# Volume Preference
|
||||
ui.window(style=style.prefs_pref_frame)
|
||||
ui.vbox(style=style.prefs_pref_box)
|
||||
|
||||
layout.label(_(u"Music Volume"), "prefs")
|
||||
ui.vbox(style=style.prefs_volume_box)
|
||||
|
||||
ui.bar(128,
|
||||
92,
|
||||
changed=does_nothing,
|
||||
style=style.prefs_volume_slider)
|
||||
|
||||
layout.button(_(u"Test"), "soundtest", clicked=does_nothing)
|
||||
|
||||
ui.close()
|
||||
ui.close()
|
||||
|
||||
ui.close() # vbox
|
||||
|
||||
|
||||
# Used to have buttons not do anything.
|
||||
def does_nothing(*args):
|
||||
return
|
||||
|
||||
|
||||
label choose_theme:
|
||||
|
||||
python:
|
||||
if not os.path.exists(os.path.join(project.gamedir, "options.rpy")):
|
||||
error(_(u"The options.rpy file does not exist in the game directory, so this launcher cannot change the theme."))
|
||||
|
||||
current_theme = None
|
||||
theme_adjustment = ui.adjustment()
|
||||
|
||||
label repeat_choose_theme:
|
||||
|
||||
python hide:
|
||||
|
||||
tip = _(u"Themes control the basic look of interface elements. You'll be able to pick a color scheme next.")
|
||||
|
||||
screen()
|
||||
ui.vbox()
|
||||
title(_(u"Choose Theme"))
|
||||
|
||||
ui.grid(2, 1, padding=10, xfill=True)
|
||||
|
||||
# The scroll area, that lets the user pick a theme.
|
||||
scrolled('top', theme_adjustment)
|
||||
ui.vbox()
|
||||
|
||||
for name, function, exemplar in themes:
|
||||
button(name,
|
||||
ui.returns(function),
|
||||
"",
|
||||
hovered=curried_show_theme(exemplar, "repeat_choose_theme"),
|
||||
unhovered=does_nothing)
|
||||
|
||||
ui.close() # vbox
|
||||
ui.close() # scrolled
|
||||
|
||||
theme_demo()
|
||||
|
||||
ui.close() # grid
|
||||
ui.close() # vbox
|
||||
|
||||
set_tooltip(tip)
|
||||
store.theme_function = interact()
|
||||
|
||||
|
||||
label choose_color_scheme:
|
||||
|
||||
python:
|
||||
|
||||
current_theme = None
|
||||
theme_adjustment = ui.adjustment()
|
||||
|
||||
label repeat_choose_color_scheme:
|
||||
|
||||
python hide:
|
||||
|
||||
tip = _(u"Please choose a color scheme for your project.")
|
||||
|
||||
themes = [ k for k,v in theme_data.iteritems() if v["theme"] == theme_function ]
|
||||
themes.sort()
|
||||
|
||||
screen()
|
||||
ui.vbox()
|
||||
title(_(u"Choose Color Scheme"))
|
||||
|
||||
ui.grid(2, 1, padding=10, xfill=True)
|
||||
|
||||
# The scroll area, that lets the user pick a theme.
|
||||
scrolled('choose_theme', theme_adjustment)
|
||||
ui.vbox()
|
||||
|
||||
for i in themes:
|
||||
button(i,
|
||||
curried_switch_theme(i),
|
||||
"",
|
||||
hovered=curried_show_theme(i, "repeat_choose_color_scheme"),
|
||||
unhovered=does_nothing)
|
||||
|
||||
ui.close() # vbox
|
||||
ui.close() # scrolled
|
||||
|
||||
theme_demo()
|
||||
|
||||
ui.close() # grid
|
||||
ui.close() # vbox
|
||||
|
||||
set_tooltip(tip)
|
||||
interact()
|
||||
|
||||
|
||||
@@ -1,536 +0,0 @@
|
||||
import os
|
||||
import os.path
|
||||
import zipfile
|
||||
import tarfile
|
||||
import time
|
||||
import sys
|
||||
import struct
|
||||
import zlib
|
||||
zlib.Z_DEFAULT_COMPRESSION = 9
|
||||
|
||||
import binascii
|
||||
import change_icon
|
||||
|
||||
import argparse
|
||||
|
||||
# The directory containing the project that we'll be distributing.
|
||||
project_path = None
|
||||
|
||||
# The path to the Ren'Py base directory.
|
||||
renpy_base = None
|
||||
|
||||
# A function that is called to give information about what is going
|
||||
# on now.
|
||||
def info(title, body):
|
||||
return
|
||||
|
||||
# A function that is called to give a progress report.
|
||||
def progress(title, total, amount):
|
||||
amount += 1
|
||||
|
||||
if amount % 25 == 0:
|
||||
print title, amount, "of", total
|
||||
|
||||
# A translation function.
|
||||
def _(s):
|
||||
return s
|
||||
|
||||
# These are files that are ignored wherever they are found in a
|
||||
# distribution.
|
||||
ignored_files = (
|
||||
"thumbs.db",
|
||||
"traceback.txt",
|
||||
"errors.txt",
|
||||
"files.txt",
|
||||
"saves"
|
||||
)
|
||||
|
||||
# These are files (and directories) that are ignored when found in
|
||||
# the root directory of the distribution.
|
||||
root_ignored_files = (
|
||||
"common",
|
||||
"renpy",
|
||||
"renpy.code",
|
||||
"python23.dll",
|
||||
"python24.dll",
|
||||
"python25.dll",
|
||||
"msvcr71.dll",
|
||||
"lib",
|
||||
"iliad-icon.png",
|
||||
"manifest.xml",
|
||||
"icon.ico",
|
||||
"icon.icns",
|
||||
"launcherinfo.py",
|
||||
"archived",
|
||||
)
|
||||
|
||||
# Extensions that should be made executable.
|
||||
executable_extensions = (
|
||||
"MacOS",
|
||||
"so",
|
||||
"dylib",
|
||||
".sh",
|
||||
"python",
|
||||
"python.real",
|
||||
)
|
||||
|
||||
class MyZipFile(zipfile.ZipFile):
|
||||
"""
|
||||
Modified ZipFile class that can insert a file into the archive,
|
||||
using a supplied ZipInfo object. Code comes from the writestr
|
||||
and write methods of ZipFile.
|
||||
"""
|
||||
|
||||
def write_file_with_zipinfo(self, filename, zinfo, compress_type=None):
|
||||
"""Put the bytes from filename into the archive under the name
|
||||
arcname."""
|
||||
st = os.stat(filename)
|
||||
|
||||
if compress_type is None:
|
||||
zinfo.compress_type = self.compression
|
||||
else:
|
||||
zinfo.compress_type = compress_type
|
||||
|
||||
zinfo.file_size = st.st_size
|
||||
zinfo.flag_bits = 0x00
|
||||
zinfo.header_offset = self.fp.tell() # Start of header bytes
|
||||
|
||||
self._writecheck(zinfo)
|
||||
self._didModify = True
|
||||
|
||||
fp = open(filename, "rb")
|
||||
|
||||
# Must overwrite CRC and sizes with correct data later
|
||||
zinfo.CRC = CRC = 0
|
||||
zinfo.compress_size = compress_size = 0
|
||||
zinfo.file_size = file_size = 0
|
||||
|
||||
self.fp.write(zinfo.FileHeader())
|
||||
|
||||
if zinfo.compress_type == zipfile.ZIP_DEFLATED:
|
||||
cmpr = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION,
|
||||
zlib.DEFLATED, -15)
|
||||
else:
|
||||
cmpr = None
|
||||
while 1:
|
||||
buf = fp.read(1024 * 64)
|
||||
if not buf:
|
||||
break
|
||||
file_size = file_size + len(buf)
|
||||
CRC = binascii.crc32(buf, CRC)
|
||||
if cmpr:
|
||||
buf = cmpr.compress(buf)
|
||||
compress_size = compress_size + len(buf)
|
||||
self.fp.write(buf)
|
||||
fp.close()
|
||||
if cmpr:
|
||||
buf = cmpr.flush()
|
||||
compress_size = compress_size + len(buf)
|
||||
self.fp.write(buf)
|
||||
zinfo.compress_size = compress_size
|
||||
else:
|
||||
zinfo.compress_size = file_size
|
||||
|
||||
zinfo.CRC = CRC
|
||||
zinfo.file_size = file_size
|
||||
|
||||
# Seek backwards and write CRC and file sizes
|
||||
position = self.fp.tell() # Preserve current position in file
|
||||
self.fp.seek(zinfo.header_offset + 14, 0)
|
||||
self.fp.write(struct.pack("<lLL", zinfo.CRC, zinfo.compress_size,
|
||||
zinfo.file_size))
|
||||
|
||||
self.fp.seek(position, 0)
|
||||
self.filelist.append(zinfo)
|
||||
self.NameToInfo[zinfo.filename] = zinfo
|
||||
|
||||
def tree(
|
||||
src,
|
||||
dest,
|
||||
exclude_suffix=[ ".pyc", "~", ".bak", ".old", ".new" ],
|
||||
exclude_prefix=[ "#", "." ],
|
||||
exclude_files = set(ignored_files),
|
||||
root_exclude_prefix = [ ],
|
||||
root_exclude_suffix = [ ".py", ".sh", ".app" ],
|
||||
root_exclude_files = set(root_ignored_files),
|
||||
root=False):
|
||||
|
||||
"""
|
||||
Returns a list of source-filename, destination-filename pairs.
|
||||
"""
|
||||
|
||||
if dest[0] != "/":
|
||||
raise Exception("Destination must begin with /: %r" % dest)
|
||||
|
||||
src = src.rstrip('/')
|
||||
dest = dest.rstrip('/')
|
||||
|
||||
def include(fn, is_root):
|
||||
"""
|
||||
Returns True if the file should be included in the list of
|
||||
files we are copying.
|
||||
"""
|
||||
|
||||
for i in exclude_suffix:
|
||||
if fn.endswith(i):
|
||||
return False
|
||||
|
||||
for i in exclude_prefix:
|
||||
if fn.startswith(i):
|
||||
return False
|
||||
|
||||
if fn in exclude_files:
|
||||
return False
|
||||
|
||||
if not root or not is_root:
|
||||
return True
|
||||
|
||||
for i in root_exclude_suffix:
|
||||
if fn.endswith(i):
|
||||
return False
|
||||
|
||||
for i in root_exclude_prefix:
|
||||
if fn.startswith(i):
|
||||
return False
|
||||
|
||||
if fn in root_exclude_files:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
rv = [ ]
|
||||
|
||||
# Walk the tree, including what is necessary.
|
||||
for srcdir, dirs, files in os.walk(src):
|
||||
|
||||
is_root = (srcdir == src)
|
||||
|
||||
srcdir += "/"
|
||||
destdir = dest + srcdir[len(src):]
|
||||
destdir.replace("\\", "/")
|
||||
|
||||
rv.append((srcdir, destdir))
|
||||
|
||||
for fn in files:
|
||||
|
||||
if not include(fn, is_root):
|
||||
continue
|
||||
|
||||
sfn = srcdir + fn
|
||||
dfn = destdir + fn
|
||||
|
||||
rv.append((sfn, dfn))
|
||||
|
||||
dirs[:] = [ i for i in dirs if include(i, is_root) ]
|
||||
|
||||
rv = [ (a.replace("\\", "/"), b.replace("\\", "/")) for a, b in rv ]
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
def make_zip(t, filename, files, file_data):
|
||||
"""
|
||||
This creates `filename`.zip, containing `files`, placed in the
|
||||
`filename` directory. `file_data` is a map from source file to
|
||||
replacement data.
|
||||
"""
|
||||
|
||||
files.sort(key=lambda a : a[1])
|
||||
progress_len = len(files)
|
||||
|
||||
fn = os.path.join(os.path.dirname(project_path), filename)
|
||||
|
||||
zf = MyZipFile(fn + ".zip", "w", zipfile.ZIP_DEFLATED)
|
||||
|
||||
for i, (fn, an) in enumerate(files):
|
||||
|
||||
progress(t, progress_len, i)
|
||||
|
||||
if os.path.isdir(fn):
|
||||
continue
|
||||
|
||||
zi = zipfile.ZipInfo(filename + an)
|
||||
|
||||
s = os.stat(fn)
|
||||
zi.date_time = time.gmtime(s.st_mtime)[:6]
|
||||
zi.compress_type = zipfile.ZIP_DEFLATED
|
||||
zi.create_system = 3
|
||||
|
||||
for i in executable_extensions:
|
||||
if os.path.dirname(fn).endswith(i) or fn.endswith(i):
|
||||
zi.external_attr = long(0100777) << 16
|
||||
break
|
||||
else:
|
||||
zi.external_attr = long(0100666) << 16
|
||||
|
||||
if fn in file_data:
|
||||
data = file_data[fn]
|
||||
zf.writestr(zi, data)
|
||||
else:
|
||||
zf.write_file_with_zipinfo(fn, zi)
|
||||
|
||||
zf.close()
|
||||
|
||||
def make_tar(t, filename, files):
|
||||
"""
|
||||
Makes a tarfile, as above.
|
||||
"""
|
||||
|
||||
files.sort(key=lambda a : a[1])
|
||||
progress_len = len(files)
|
||||
|
||||
fn = os.path.join(os.path.dirname(project_path), filename)
|
||||
|
||||
tf = tarfile.open(fn + ".tar.bz2", "w:bz2")
|
||||
tf.dereference = True
|
||||
|
||||
for j, (fn, an) in enumerate(files):
|
||||
|
||||
progress(t, progress_len, j)
|
||||
|
||||
info = tf.gettarinfo(fn, filename + an)
|
||||
|
||||
perms = 0666
|
||||
|
||||
if info.isdir():
|
||||
perms = 0777
|
||||
|
||||
for i in executable_extensions:
|
||||
if fn.endswith(i):
|
||||
perms = 0777
|
||||
|
||||
info.mode = perms
|
||||
info.uid = 1000
|
||||
info.gid = 1000
|
||||
info.uname = "renpy"
|
||||
info.gname = "renpy"
|
||||
|
||||
if info.isreg():
|
||||
tf.addfile(info, file(fn, "rb"))
|
||||
else:
|
||||
tf.addfile(info)
|
||||
|
||||
tf.close()
|
||||
|
||||
|
||||
def distribute(
|
||||
_project_path,
|
||||
_renpy_base,
|
||||
base_name,
|
||||
executable_name,
|
||||
ignore_extensions,
|
||||
documentation_extensions,
|
||||
build_windows,
|
||||
build_linux,
|
||||
build_mac,
|
||||
build_all):
|
||||
|
||||
global project_path
|
||||
global renpy_base
|
||||
project_path = _project_path
|
||||
renpy_base = _renpy_base
|
||||
|
||||
base_name = base_name.encode("utf-8")
|
||||
executable_name = executable_name.encode("utf-8")
|
||||
ignore_extensions = ignore_extensions.encode("utf-8")
|
||||
documentation_extensions = documentation_extensions.encode("utf-8")
|
||||
|
||||
# Convert some of these to more useful formats.
|
||||
ignore_extensions = [ i.strip() for i in ignore_extensions.split() ]
|
||||
documentation_extensions = [ i.strip() for i in documentation_extensions.split() ]
|
||||
|
||||
# Scan for the files we want to include in the various distributions.
|
||||
info(_(u"Scanning..."), "")
|
||||
|
||||
# Files included in the various distributions.
|
||||
multi_files = [ ]
|
||||
win_files = [ ]
|
||||
linux_files = [ ]
|
||||
mac_files = [ ]
|
||||
|
||||
# A map from source file name to replacement data to be placed in
|
||||
# that file.
|
||||
file_data = { }
|
||||
|
||||
|
||||
######################################################################
|
||||
# Multi files.
|
||||
|
||||
rb = renpy_base.replace("\\", "/") + "/"
|
||||
|
||||
# Project files.
|
||||
multi_files.extend(tree(project_path, "/", root=True, exclude_suffix=ignore_extensions))
|
||||
multi_files.append((rb + "renpy.py", "/" + executable_name + ".py"))
|
||||
|
||||
# Renpy files.
|
||||
multi_files.extend(tree(rb + "common", "/common"))
|
||||
multi_files.extend(tree(rb + "renpy", "/renpy"))
|
||||
multi_files.append((rb + "LICENSE.txt", "/renpy/LICENSE.txt"))
|
||||
|
||||
def add_script_version(fn, ignore_extensions=ignore_extensions, multi_files=multi_files, rb=rb):
|
||||
"""
|
||||
Add a script_version file if it does not already exist, and if the
|
||||
extension is allowed by the game.
|
||||
"""
|
||||
|
||||
for a, b in multi_files:
|
||||
if b == "/game/" + fn:
|
||||
return
|
||||
|
||||
for i in ignore_extensions:
|
||||
if fn.endswith(i):
|
||||
return
|
||||
|
||||
multi_files.append((rb + "launcher/" + fn, "/game/" + fn))
|
||||
|
||||
add_script_version("script_version.rpy")
|
||||
add_script_version("script_version.rpyc")
|
||||
|
||||
|
||||
######################################################################
|
||||
# Windows files.
|
||||
|
||||
if build_windows or build_all:
|
||||
|
||||
win_files.append((rb + "renpy.exe", "/" + executable_name + ".exe"))
|
||||
win_files.append((rb + "python26.dll", "/python26.dll"))
|
||||
win_files.append((rb + "msvcr90.dll", "/msvcr90.dll"))
|
||||
win_files.append((rb + "Microsoft.VC90.CRT.manifest", "/Microsoft.VC90.CRT.manifest"))
|
||||
|
||||
win_files.append((rb + "lib", "/lib"))
|
||||
win_files.extend(tree(rb + "lib/windows-x86", "/lib/windows-x86"))
|
||||
|
||||
if os.path.exists(project_path + "/icon.ico"):
|
||||
file_data[rb + "renpy.exe"] = change_icon.change_icons(
|
||||
rb + "renpy.exe",
|
||||
project_path + "/icon.ico",
|
||||
)
|
||||
|
||||
|
||||
######################################################################
|
||||
# Linux files.
|
||||
|
||||
if build_linux or build_all:
|
||||
|
||||
linux_files.append((rb + "renpy.sh", "/" + executable_name + ".sh"))
|
||||
linux_files.append((rb + "lib", "/lib"))
|
||||
linux_files.append((rb + "lib/python", "/lib/python"))
|
||||
linux_files.extend(tree(rb + "lib/linux-x86", "/lib/linux-x86"))
|
||||
|
||||
# Warning: The tar.bz2 builder doesn't support file_data.
|
||||
|
||||
|
||||
######################################################################
|
||||
# Mac (non-app) files.
|
||||
|
||||
if build_mac or build_all:
|
||||
mac_files = tree(rb + "renpy.app",
|
||||
"/" + executable_name + ".app")
|
||||
|
||||
# Rename executable.
|
||||
mac_files = [ (fn, an.replace("Ren'Py Launcher", executable_name)) for (fn, an) in mac_files ]
|
||||
|
||||
# Plist file.
|
||||
quoted_name = executable_name.replace("&", "&").replace("<", "<")
|
||||
info_plist = file(rb + "renpy.app/Contents/Info.plist", "rb").read().replace("Ren'Py Launcher", quoted_name)
|
||||
file_data[rb + "renpy.app/Contents/Info.plist"] = info_plist
|
||||
|
||||
# Launcher script.
|
||||
quoted_name = executable_name.replace("\"", "\\\"")
|
||||
launcher_py = file(rb + "renpy.app/Contents/Resources/launcher.py", "rb").read().replace("Ren'Py Launcher", quoted_name)
|
||||
file_data[rb + "renpy.app/Contents/Resources/launcher.py"] = launcher_py
|
||||
|
||||
# Icon file.
|
||||
if os.path.exists(project_path + "/icon.icns"):
|
||||
icon_data = file(project_path + "/icon.icns", "rb").read()
|
||||
file_data[rb + "renpy.app/Contents/Resources/launcher.icns"] = icon_data
|
||||
|
||||
|
||||
######################################################################
|
||||
# Now, build the various distributions.
|
||||
|
||||
if build_windows:
|
||||
make_zip(
|
||||
_(u"Building Windows..."),
|
||||
base_name + "-win32",
|
||||
multi_files + win_files,
|
||||
file_data)
|
||||
|
||||
if build_linux:
|
||||
make_tar(
|
||||
_(u"Building Linux..."),
|
||||
base_name + "-linux-x86",
|
||||
multi_files + linux_files)
|
||||
|
||||
|
||||
if build_mac:
|
||||
|
||||
# Reorganize the files so all the non application files live inside
|
||||
# the application. If there's documentation involved, then it
|
||||
# lives in both places.
|
||||
macapp_files = [ ]
|
||||
|
||||
for fn, an in multi_files + mac_files:
|
||||
if not an.startswith("/" + executable_name + ".app"):
|
||||
new_an = "/" + executable_name + ".app/Contents/Resources/autorun" + an
|
||||
macapp_files.append((fn, new_an))
|
||||
|
||||
if an.rindex('/') == 0:
|
||||
for i in documentation_extensions:
|
||||
if fn.endswith(i):
|
||||
macapp_files.append((fn, an))
|
||||
break
|
||||
else:
|
||||
macapp_files.append((fn, an))
|
||||
|
||||
make_zip(
|
||||
_(u"Building Macintosh..."),
|
||||
base_name + "-mac",
|
||||
macapp_files,
|
||||
file_data)
|
||||
|
||||
|
||||
if build_all:
|
||||
make_zip(
|
||||
_(u"Building Combined..."),
|
||||
base_name + "-all",
|
||||
multi_files + win_files + linux_files + mac_files,
|
||||
file_data)
|
||||
|
||||
def main():
|
||||
|
||||
ap = argparse.ArgumentParser(description="Prepare a Ren'Py game for distribution.")
|
||||
|
||||
ap.add_argument("project_path", type=str, help="The path to the directory containing the project.")
|
||||
ap.add_argument("base_name", type=str, help="The base name of the archive files produced.")
|
||||
ap.add_argument("executable_name", type=str, help="The name of the executables produced.")
|
||||
ap.add_argument("--renpy-base", type=str, default=None, help="The path to the Ren'Py distribution.")
|
||||
|
||||
ap.add_argument("--ignore-extensions", type=str, default="~ .bak", help="A space-separated list of extensions to ignore.")
|
||||
ap.add_argument("--documentation-extensions", type=str, default="txt html", help="A space-separated list of extensions to treat as documentation.")
|
||||
|
||||
ap.add_argument("--build-windows", action="store_true", default=False, help="Build the Windows distribution.")
|
||||
ap.add_argument("--build-mac", action="store_true", default=False, help="Build the Mac OS X distribution.")
|
||||
ap.add_argument("--build-linux", action="store_true", default=False, help="Build the Windows distribution.")
|
||||
ap.add_argument("--build-all", action="store_true", default=False, help="Build the All Platforms distribution.")
|
||||
|
||||
args = ap.parse_args()
|
||||
|
||||
renpy_base = args.renpy_base
|
||||
if renpy_base is None:
|
||||
renpy_base = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
|
||||
|
||||
distribute(
|
||||
args.project_path,
|
||||
renpy_base,
|
||||
base_name=args.base_name,
|
||||
executable_name=args.executable_name,
|
||||
ignore_extensions=args.ignore_extensions,
|
||||
documentation_extensions=args.documentation_extensions,
|
||||
build_windows=args.build_windows,
|
||||
build_mac=args.build_mac,
|
||||
build_linux=args.build_linux,
|
||||
build_all=args.build_all)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,185 +0,0 @@
|
||||
# This file contains the code needed to build a Ren'Py distribution.
|
||||
|
||||
init 12 python:
|
||||
|
||||
import distribute
|
||||
|
||||
distribute.progress = progress
|
||||
distribute.info = info
|
||||
distribute._ = _
|
||||
|
||||
def dist_exists(fn):
|
||||
"""
|
||||
Returns true if the given file exists in the renpy directory.
|
||||
"""
|
||||
|
||||
return os.path.exists(os.path.join(config.renpy_base, fn))
|
||||
|
||||
|
||||
label distribute:
|
||||
|
||||
call lint
|
||||
|
||||
if not yesno(_(u"Building Distributions"),
|
||||
_(u"I've just performed a lint on your project. If it contains errors, you should say no and fix them.\nPlease also check {a=http://www.renpy.org/wiki/renpy/Download_Ren'Py}www.renpy.org{/a} to see if updates or fixes are available.\n\nDo you want to continue?")):
|
||||
|
||||
jump top
|
||||
|
||||
python hide:
|
||||
|
||||
# Do we have the files?
|
||||
has_windows = dist_exists("renpy.exe")
|
||||
has_linux = dist_exists("lib/linux-x86")
|
||||
has_mac = dist_exists("renpy.app")
|
||||
has_all = has_windows and has_mac and has_linux
|
||||
|
||||
# Should we build these distributions?
|
||||
build_windows = has_windows and project.info.get("build_windows", has_windows)
|
||||
build_linux = has_linux and project.info.get("build_linux", has_linux)
|
||||
build_mac = has_mac and project.info.get("build_mac", has_mac)
|
||||
build_all = has_all and project.info.get("build_all", False)
|
||||
|
||||
# The base name of the distribution.
|
||||
base_name = project.info.get("distribution_base", project.name)
|
||||
|
||||
# The executable name.
|
||||
executable_name = project.info.get("executable_name", project.name)
|
||||
|
||||
# Extensions to exclude.
|
||||
ignore_extensions = project.info.get("ignore_extensions", "~ .bak")
|
||||
|
||||
# Documentation extensions.
|
||||
documentation_extensions = project.info.get("documentation_extensions", "txt html")
|
||||
|
||||
# Prompt the user for all of the above.
|
||||
|
||||
while True:
|
||||
|
||||
set_tooltip("")
|
||||
screen()
|
||||
|
||||
ui.vbox()
|
||||
|
||||
title(_(u"Building Distributions"))
|
||||
|
||||
text_variable(_(u"Base Name:"), base_name, "base_name",
|
||||
_(u"Used to generate the names of directories and archive files."))
|
||||
|
||||
text_variable(_(u"Executable Name:"), executable_name, "executable_name",
|
||||
_(u"Used to generate the names of executables and runnable programs."))
|
||||
|
||||
text_variable(_(u"Ignore Extensions:"), ignore_extensions, "ignore_extensions",
|
||||
_(u"Files with these extensions will not be included in the distributions."))
|
||||
|
||||
text_variable(_(u"Documentation Extensions:"), documentation_extensions, "documentation_extensions",
|
||||
_(u"Files with these extensions will be treated as documentation, when building the Macintosh application."))
|
||||
|
||||
text(_(u"Distributions to Build:"))
|
||||
|
||||
if has_windows:
|
||||
toggle_button(_(u"Windows x86"), build_windows, ui.returns("build_windows"),
|
||||
_(u"Zip distribution for the 32-bit Windows platform."))
|
||||
|
||||
if has_linux:
|
||||
toggle_button(_(u"Linux x86"), build_linux, ui.returns("build_linux"),
|
||||
_(u"Tar.Bz2 distribution for the Linux x86 platform."))
|
||||
|
||||
if has_mac:
|
||||
toggle_button(_(u"Macintosh Universal"), build_mac, ui.returns("build_mac"),
|
||||
_(u"Single application distribution for the Macintosh x86 and ppc platforms."))
|
||||
|
||||
if has_all:
|
||||
toggle_button(_(u"Windows/Linux/Mac Combined"), build_all, ui.returns("build_all"),
|
||||
_(u"Zip distribution for the Windows x86, Linux x86, Macintosh x86 and Macintosh ppc platforms."))
|
||||
|
||||
|
||||
ui.null(height=15)
|
||||
|
||||
button(_(u"Build"), ui.returns("build"), _(u"Start building the distributions."))
|
||||
button(_(u"Cancel"), ui.jumps("top"), "")
|
||||
|
||||
ui.close()
|
||||
|
||||
act = interact()
|
||||
|
||||
if act == "build_windows":
|
||||
build_windows = not build_windows
|
||||
elif act == "build_linux":
|
||||
build_linux = not build_linux
|
||||
elif act == "build_mac":
|
||||
build_mac = not build_mac
|
||||
elif act == "build_all":
|
||||
build_all = not build_all
|
||||
elif act == "base_name":
|
||||
|
||||
base_name = input(
|
||||
_(u"Base Name"),
|
||||
_(u"Please enter in the base name for your distribution. This name is used to generate the names of directories and archive files. Usually, this is the name of your game, plus a version number, like \"moonlight-1.0\"."),
|
||||
base_name)
|
||||
|
||||
elif act == "executable_name":
|
||||
|
||||
executable_name = input(
|
||||
_(u"Executable Name"),
|
||||
_(u"Please enter a name for the executables in your distribution. This should not include an extension, as that will be added automatically."),
|
||||
executable_name)
|
||||
|
||||
elif act == "ignore_extensions":
|
||||
|
||||
ignore_extensions = input(
|
||||
_(u"Ignore Extensions"),
|
||||
_(u"Please enter a space-separated list of file extensions. Files with these extensions will not be included in the built distributions."),
|
||||
ignore_extensions)
|
||||
|
||||
elif act == "documentation_extensions":
|
||||
|
||||
documentation_extensions = input(
|
||||
_(u"Documentation Extensions"),
|
||||
_(u"Please enter a space separated list of documentation extensions. Files in the base directory with these extensions will have a second copy stored outside of the Macintosh application."),
|
||||
documentation_extensions)
|
||||
|
||||
elif act == "build":
|
||||
break
|
||||
|
||||
# Store the user-selected options in info, and save info.
|
||||
|
||||
project.info["distribution_base"] = base_name
|
||||
project.info["executable_name"] = executable_name
|
||||
project.info["ignore_extensions"] = ignore_extensions
|
||||
project.info["documentation_extensions"] = documentation_extensions
|
||||
|
||||
project.info["build_windows"] = build_windows
|
||||
project.info["build_linux"] = build_linux
|
||||
project.info["build_mac"] = build_mac
|
||||
project.info["build_all"] = build_all
|
||||
|
||||
project.save()
|
||||
|
||||
distribute.distribute(
|
||||
project.path,
|
||||
config.renpy_base,
|
||||
base_name=base_name,
|
||||
executable_name=executable_name,
|
||||
ignore_extensions=ignore_extensions,
|
||||
documentation_extensions=documentation_extensions,
|
||||
build_windows=build_windows,
|
||||
build_mac=build_mac,
|
||||
build_linux=build_linux,
|
||||
build_all=build_all)
|
||||
|
||||
# Report success to the user.
|
||||
set_tooltip(_(u"Thank you for choosing Ren'Py."))
|
||||
|
||||
screen()
|
||||
ui.vbox()
|
||||
|
||||
title(_(u"Success"))
|
||||
text(_(u"The distributions have been built. Be sure to test them before release.\n\nNote that unpacking and repacking the Macintosh, Linux, or Combined distributions on Windows is not supported.\n\nPlease announce your release at the {a=http://lemmasoft.renai.us/forums/}Lemma Soft Forums{/a}, and add it to {a=http://games.renpy.org}games.renpy.org{/a}."))
|
||||
|
||||
ui.null(height=20)
|
||||
|
||||
button(_(u"Return"), ui.jumps("top"), None)
|
||||
|
||||
ui.close()
|
||||
interact()
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
# This file contains logic for selecting an editor.
|
||||
|
||||
init python:
|
||||
|
||||
import glob
|
||||
import re
|
||||
import traceback
|
||||
import os
|
||||
import os.path
|
||||
|
||||
|
||||
# The default name for the editor.
|
||||
if persistent.editor is None:
|
||||
persistent.editor = "jEdit"
|
||||
|
||||
# A map from editor name to the file containing information about
|
||||
# that editor.
|
||||
editors = { }
|
||||
|
||||
# A map from editor to the version of that editor.
|
||||
editor_versions = { }
|
||||
|
||||
# A map from editor to a description of that editor.
|
||||
editor_descriptions = { }
|
||||
|
||||
# Should we set up the editor? How about the transient editor?
|
||||
set_editor = "RENPY_EDITOR" not in os.environ
|
||||
set_editor_transient = "RENPY_EDITOR_TRANSIENT" not in os.environ
|
||||
|
||||
if set_editor and not set_editor_transient:
|
||||
config.editor_transient = config.editor
|
||||
os.environ['RENPY_EDITOR_TRANSIENT'] = config.editor
|
||||
set_editor_transient = False
|
||||
|
||||
def scan_editor(ef):
|
||||
"""
|
||||
Scans a single editor file to get the meta-information. If it
|
||||
checks out, adds it to editors. Uses editor_versions as a cache
|
||||
so we only add the newest version of each editor.
|
||||
"""
|
||||
|
||||
info = { }
|
||||
|
||||
f = file(ef, "r")
|
||||
for l in f:
|
||||
m = re.match("#\s*(\w+):\s*(.*?)\s*$", l)
|
||||
if not m:
|
||||
break
|
||||
|
||||
info[m.group(1)] = m.group(2)
|
||||
|
||||
f.close()
|
||||
|
||||
try:
|
||||
name = info["Name"]
|
||||
version = int(info["Version"])
|
||||
description = info.get("Description", "")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
print >>sys.stderr, ef
|
||||
|
||||
|
||||
if version > editor_versions.get(name, -1):
|
||||
editors[name] = ef
|
||||
editor_versions[name] = version
|
||||
editor_descriptions[name] = description
|
||||
|
||||
|
||||
def scan_editors():
|
||||
"""
|
||||
Finds all *.editor.py files, and uses them to populate the list
|
||||
of editors.
|
||||
"""
|
||||
|
||||
editors.clear()
|
||||
editor_versions.clear()
|
||||
editor_descriptions.clear()
|
||||
|
||||
for d in [ config.renpy_base, persistent.projects_directory ]:
|
||||
if d is None:
|
||||
continue
|
||||
|
||||
for ef in glob.glob(d + "/*/*.editor.py"):
|
||||
scan_editor(ef)
|
||||
|
||||
|
||||
def setup_editor():
|
||||
"""
|
||||
Sets the system up to respect the value containined in
|
||||
persistent.editor.
|
||||
"""
|
||||
|
||||
if not set_editor:
|
||||
return
|
||||
|
||||
ef = None
|
||||
|
||||
for i in [ persistent.editor, "jEdit", "None" ]:
|
||||
if i in editors:
|
||||
ef = editors[i]
|
||||
break
|
||||
else:
|
||||
return
|
||||
|
||||
ctx = {
|
||||
"renpy" : renpy,
|
||||
"config" : config,
|
||||
"persistent" : persistent,
|
||||
"base" : os.path.dirname(ef),
|
||||
}
|
||||
|
||||
execfile(ef, ctx, ctx)
|
||||
|
||||
if set_editor:
|
||||
if config.editor:
|
||||
os.environ['RENPY_EDITOR'] = config.editor
|
||||
else:
|
||||
if 'RENPY_EDITOR' in os.environ:
|
||||
del os.environ['RENPY_EDITOR']
|
||||
|
||||
if set_editor_transient:
|
||||
if config.editor_transient:
|
||||
os.environ['RENPY_EDITOR_TRANSIENT'] = config.editor_transient
|
||||
else:
|
||||
if 'RENPY_EDITOR_TRANSIENT' in os.environ:
|
||||
del os.environ['RENPY_EDITOR_TRANSIENT']
|
||||
|
||||
label editor:
|
||||
|
||||
python hide:
|
||||
|
||||
if not set_editor:
|
||||
error(_(u"The editor has been set from the RENPY_EDITOR environment variable, and cannot be changed."), "options")
|
||||
|
||||
set_tooltip("")
|
||||
|
||||
screen()
|
||||
ui.vbox()
|
||||
title(_(u"Choose Editor"))
|
||||
|
||||
text(_(u"Please choose the editor that will be use to edit scripts and display errors. More editors can be downloaded from {a=http://www.renpy.org/wiki/renpy/Editors}the Ren'Py website{/a}."))
|
||||
|
||||
ui.null(height=15)
|
||||
|
||||
scrolled("options")
|
||||
|
||||
ui.vbox()
|
||||
|
||||
for i in sorted(editors, key=lambda a : a.lower()):
|
||||
button(i,
|
||||
ui.returns(i),
|
||||
editor_descriptions[i])
|
||||
|
||||
ui.close() # Vbox
|
||||
ui.close() # Scrolled
|
||||
|
||||
ui.close() # Vbox
|
||||
|
||||
persistent.editor = interact()
|
||||
setup_editor()
|
||||
|
||||
jump options
|
||||
|
Before Width: | Height: | Size: 7.7 KiB |
@@ -1,3 +1,4 @@
|
||||
#@PydevCodeAnalysisIgnore
|
||||
"""Easy to use dialogs.
|
||||
|
||||
Message(msg) -- display a message and an OK button.
|
||||
@@ -0,0 +1,45 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Checks for various abilities that might be taken away from us by
|
||||
# redistributors.
|
||||
|
||||
init 1 python in ability:
|
||||
|
||||
from store import config
|
||||
import store
|
||||
import store.updater as updater
|
||||
|
||||
import os
|
||||
|
||||
EXECUTABLES = [ "renpy.exe", "renpy.app", "renpy.sh" ]
|
||||
|
||||
# can_distribute - True if we can distribute
|
||||
for i in EXECUTABLES:
|
||||
if not os.path.exists(os.path.join(config.renpy_base, i)):
|
||||
can_distribute = False
|
||||
else:
|
||||
can_distribute = True
|
||||
|
||||
|
||||
# can_update - True if we can update.
|
||||
can_update = updater.can_update() or (store.UPDATE_SIMULATE is not None)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2007 PyTom <pytom@bishoujo.us>
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -19,14 +19,31 @@
|
||||
# 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 renpy
|
||||
import pygame
|
||||
import renpygame
|
||||
screen about:
|
||||
|
||||
from pygame.time import *
|
||||
$ version = renpy.version()
|
||||
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_root"
|
||||
|
||||
window:
|
||||
xfill True
|
||||
|
||||
has vbox xfill True
|
||||
|
||||
add "images/logo.png" xalign 0.5 yoffset -5
|
||||
|
||||
null height 15
|
||||
|
||||
text _("[version!q]") xalign 0.5 bold True
|
||||
|
||||
null height 20
|
||||
|
||||
textbutton _("View license") action interface.OpenLicense() xalign 0.5
|
||||
|
||||
textbutton _("Back") action Jump("front_page") style "l_left_button"
|
||||
|
||||
label about:
|
||||
call screen about
|
||||
|
||||
# This doesn't work right if the wait is too long. Well, probably other
|
||||
# things will break as well, so no biggie.
|
||||
def wait(time):
|
||||
renpygame.event.periodic()
|
||||
pygame.time.wait(time)
|
||||
@@ -0,0 +1,57 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
label add_file:
|
||||
|
||||
python hide:
|
||||
import os
|
||||
import codecs
|
||||
|
||||
filename = interface.input(_("FILENAME"), _("Enter the name of the script file to create."), filename="withslash", cancel=Jump("navigation"))
|
||||
|
||||
if "." in filename and not filename.endswith(".rpy"):
|
||||
interface.error(_("The filename must have the .rpy extension."), label="navigation")
|
||||
elif "." not in filename:
|
||||
filename += ".rpy"
|
||||
|
||||
path = os.path.join(project.current.gamedir, filename)
|
||||
dir = os.path.dirname(path)
|
||||
|
||||
if os.path.exists(path):
|
||||
interface.error(_("The file already exists."), label="navigation")
|
||||
|
||||
contents = u"\uFEFF"
|
||||
contents += _("# Ren'Py automatically loads all script files ending with .rpy. To use this\n# file, define a label and jump to it from another file.\n")
|
||||
contents += "\n"
|
||||
|
||||
try:
|
||||
os.makedirs(dir)
|
||||
except:
|
||||
pass
|
||||
|
||||
contents = u"\uFEFF"
|
||||
contents += _("# Ren'Py automatically loads all script files ending with .rpy. To use this\n# file, define a label and jump to it from another file.\n")
|
||||
|
||||
with open(path, "wb") as f:
|
||||
f.write(contents.encode("utf-8"))
|
||||
|
||||
jump navigation_refresh
|
||||
|
||||
@@ -0,0 +1,556 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init python:
|
||||
ANDROID_NO_RAPT = 0
|
||||
ANDROID_NO_JDK = 1
|
||||
ANDROID_NO_SDK = 2
|
||||
ANDROID_NO_KEY = 3
|
||||
ANDROID_NO_CONFIG = 4
|
||||
ANDROID_OK = 5
|
||||
|
||||
NO_RAPT_TEXT = _("To build Android packages, please download RAPT, unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher.")
|
||||
NO_JDK_TEXT = _("A 32-bit Java Development Kit is required to build Android packages on Windows. The JDK is different from the JRE, so it's possible you have Java without having the JDK.\n\nPlease {a=http://www.oracle.com/technetwork/java/javase/downloads/index.html}download and install the JDK{/a}, then restart the Ren'Py launcher.")
|
||||
NO_SDK_TEXT = _("RAPT has been installed, but you'll need to install the Android SDK before you can build Android packages. Choose Install SDK to do this.")
|
||||
NO_KEY_TEXT = _("RAPT has been installed, but a key hasn't been configured. Please create a new key, or restore android.keystore.")
|
||||
NO_CONFIG_TEXT = _("The current project has not been configured. Use \"Configure\" to configure it before building.")
|
||||
OK_TEXT = _("Choose \"Build\" to build the current project, or attach an Android device and choose \"Build & Install\" to build and install it on the device.")
|
||||
|
||||
PHONE_TEXT = _("Attempts to emulate an Android phone.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button.")
|
||||
TABLET_TEXT = _("Attempts to emulate an Android tablet.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button.")
|
||||
OUYA_TEXT = _("Attempts to emulate an OUYA console.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button.")
|
||||
|
||||
INSTALL_SDK_TEXT = _("Downloads and installs the Android SDK and supporting packages. Optionally, generates the keys required to sign the package.")
|
||||
CONFIGURE_TEXT = _("Configures the package name, version, and other information about this project.")
|
||||
PLAY_KEYS_TEXT = _("Opens the file containing the Google Play keys in the editor.\n\nThis is only needed if the application is using an expansion APK. Read the documentation for more details.")
|
||||
BUILD_TEXT = _("Builds the Android package.")
|
||||
BUILD_AND_INSTALL_TEXT = _("Builds the Android package, and installs it on an Android device connected to your computer.")
|
||||
|
||||
|
||||
import subprocess
|
||||
import re
|
||||
import os
|
||||
import json
|
||||
|
||||
def find_rapt():
|
||||
|
||||
global RAPT_PATH
|
||||
|
||||
candidates = [ ]
|
||||
|
||||
RAPT_PATH = os.path.join(config.renpy_base, "rapt")
|
||||
|
||||
if os.path.isdir(RAPT_PATH):
|
||||
import sys
|
||||
sys.path.insert(0, os.path.join(RAPT_PATH, "buildlib"))
|
||||
else:
|
||||
RAPT_PATH = None
|
||||
RAPT_PATH is None
|
||||
|
||||
find_rapt()
|
||||
|
||||
import threading
|
||||
|
||||
if RAPT_PATH:
|
||||
import rapt
|
||||
import rapt.build
|
||||
import rapt.configure
|
||||
import rapt.install_sdk
|
||||
import rapt.plat
|
||||
import rapt.interface
|
||||
else:
|
||||
rapt = None
|
||||
|
||||
def AndroidState():
|
||||
"""
|
||||
Determines the state of the android install, and returns it.
|
||||
"""
|
||||
|
||||
if RAPT_PATH is None:
|
||||
return ANDROID_NO_RAPT
|
||||
if renpy.windows and not "JAVA_HOME" in os.environ:
|
||||
return ANDROID_NO_JDK
|
||||
if not os.path.exists(os.path.join(RAPT_PATH, "android-sdk/extras/google/play_licensing")):
|
||||
return ANDROID_NO_SDK
|
||||
if not os.path.exists(os.path.join(RAPT_PATH, "android.keystore")):
|
||||
return ANDROID_NO_KEY
|
||||
if not os.path.exists(os.path.join(project.current.path, ".android.json")):
|
||||
return ANDROID_NO_CONFIG
|
||||
return ANDROID_OK
|
||||
|
||||
|
||||
def AndroidStateText(state):
|
||||
"""
|
||||
Returns text corresponding to the state.
|
||||
"""
|
||||
|
||||
if state == ANDROID_NO_RAPT:
|
||||
return NO_RAPT_TEXT
|
||||
if state == ANDROID_NO_JDK:
|
||||
return NO_JDK_TEXT
|
||||
if state == ANDROID_NO_SDK:
|
||||
return NO_SDK_TEXT
|
||||
if state == ANDROID_NO_KEY:
|
||||
return NO_KEY_TEXT
|
||||
if state == ANDROID_NO_CONFIG:
|
||||
return NO_CONFIG_TEXT
|
||||
if state == ANDROID_OK:
|
||||
return OK_TEXT
|
||||
|
||||
def AndroidIfState(state, needed, action):
|
||||
"""
|
||||
If `state` is `needed` or better, `action` is returned. Otherwise,
|
||||
returns None, disabling the button.
|
||||
"""
|
||||
|
||||
if state >= needed:
|
||||
return action
|
||||
else:
|
||||
return None
|
||||
|
||||
class AndroidInterface(object):
|
||||
|
||||
def __init__(self):
|
||||
self.process = None
|
||||
self.filename = project.current.temp_filename("android.txt")
|
||||
|
||||
self.info_msg = ""
|
||||
|
||||
with open(self.filename, "w"):
|
||||
pass
|
||||
|
||||
def log(self, msg):
|
||||
with open(self.filename, "a") as f:
|
||||
f.write("\n")
|
||||
f.write(msg)
|
||||
f.write("\n")
|
||||
|
||||
def info(self, prompt):
|
||||
self.info_msg = prompt
|
||||
interface.processing(prompt, pause=False)
|
||||
self.log(prompt)
|
||||
|
||||
def yesno(self, prompt, submessage=None):
|
||||
return interface.yesno(prompt, submessage=submessage)
|
||||
|
||||
def yesno_choice(self, prompt, default=None):
|
||||
choices = [ (True, "Yes"), (False, "No") ]
|
||||
return interface.choice(prompt, choices, default)
|
||||
|
||||
def terms(self, url, prompt):
|
||||
submessage = _("{a=%s}%s{/a}") % (url, url)
|
||||
|
||||
if not interface.yesno(prompt, submessage=submessage):
|
||||
self.fail("You must accept the terms and conditions to proceed.", edit=False)
|
||||
|
||||
|
||||
def input(self, prompt, empty=None):
|
||||
|
||||
if empty is None:
|
||||
empty = ''
|
||||
|
||||
while True:
|
||||
rv = interface.input(_("QUESTION"), prompt, default=empty, cancel=Jump("android"))
|
||||
|
||||
rv = rv.strip()
|
||||
|
||||
if rv:
|
||||
return rv
|
||||
|
||||
def choice(self, prompt, choices, default):
|
||||
return interface.choice(prompt, choices, default, cancel=Jump("android"))
|
||||
|
||||
def fail(self, prompt, edit=True):
|
||||
self.log(prompt)
|
||||
prompt = re.sub(r'(http://\S+)', r'{a=\1}\1{/a}', prompt)
|
||||
|
||||
# Open android.txt in the editor.
|
||||
if edit:
|
||||
editor.EditAbsolute(self.filename)()
|
||||
|
||||
interface.error(prompt, label="android")
|
||||
|
||||
def success(self, prompt):
|
||||
self.log(prompt)
|
||||
interface.info(prompt, pause=False)
|
||||
|
||||
def final_success(self, prompt):
|
||||
self.log(prompt)
|
||||
interface.info(prompt, label="android")
|
||||
|
||||
def call(self, cmd, cancel=False, use_path=False):
|
||||
|
||||
if not use_path:
|
||||
cmd = [ rapt.plat.path(cmd[0]) ] + list(cmd[1:])
|
||||
|
||||
self.cmd = cmd
|
||||
|
||||
f = open(self.filename, "a")
|
||||
|
||||
f.write("\n\n\n")
|
||||
|
||||
if cancel:
|
||||
cancel_action = self.cancel
|
||||
else:
|
||||
cancel_action = None
|
||||
|
||||
startupinfo = None
|
||||
if renpy.windows:
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
|
||||
try:
|
||||
interface.processing(self.info_msg, show_screen=True, cancel=cancel_action)
|
||||
self.process = subprocess.Popen(cmd, cwd=RAPT_PATH, stdout=f, stderr=f, startupinfo=startupinfo)
|
||||
renpy.call_screen("android_process", interface=self)
|
||||
finally:
|
||||
f.close()
|
||||
interface.hide_screen()
|
||||
self.process = None
|
||||
|
||||
def check_process(self):
|
||||
rv = self.process.poll()
|
||||
|
||||
if rv is not None:
|
||||
if rv:
|
||||
raise subprocess.CalledProcessError(rv, self.cmd)
|
||||
else:
|
||||
return True
|
||||
|
||||
def download(self, url, dest):
|
||||
try:
|
||||
d = Downloader(url, dest)
|
||||
cancel_action = [ d.cancel, Jump("android") ]
|
||||
interface.processing(self.info_msg, show_screen=True, cancel=cancel_action, bar_value=DownloaderValue(d))
|
||||
ui.timer(.1, action=d.check, repeat=True)
|
||||
ui.interact()
|
||||
finally:
|
||||
interface.hide_screen()
|
||||
|
||||
def background(self, f):
|
||||
try:
|
||||
t = threading.Thread(target=f)
|
||||
t.start()
|
||||
|
||||
interface.processing(self.info_msg, show_screen=True)
|
||||
|
||||
while t.is_alive():
|
||||
renpy.pause(0)
|
||||
t.join(0.25)
|
||||
|
||||
finally:
|
||||
interface.hide_screen()
|
||||
|
||||
|
||||
def cancel(self):
|
||||
if self.process:
|
||||
self.process.terminate()
|
||||
|
||||
renpy.jump("android")
|
||||
|
||||
|
||||
class AndroidBuild(Action):
|
||||
"""
|
||||
Activates an Android build process.
|
||||
"""
|
||||
|
||||
def __init__(self, label):
|
||||
self.label = label
|
||||
|
||||
def __call__(self):
|
||||
renpy.jump(self.label)
|
||||
|
||||
class LaunchEmulator(Action):
|
||||
|
||||
def __init__(self, emulator, variants):
|
||||
self.emulator = emulator
|
||||
self.variants = variants
|
||||
|
||||
def __call__(self):
|
||||
|
||||
env = {
|
||||
"RENPY_EMULATOR" : self.emulator,
|
||||
"RENPY_VARIANT" : self.variants,
|
||||
}
|
||||
|
||||
p = project.current
|
||||
p.launch(env=env)
|
||||
|
||||
def update_android_json(p, gui):
|
||||
"""
|
||||
Updates .android.json to include the google play information.
|
||||
|
||||
`p`
|
||||
The project to update json for.
|
||||
"""
|
||||
|
||||
p.update_dump(True, gui=gui)
|
||||
|
||||
build = p.dump["build"]
|
||||
|
||||
filename = os.path.join(p.path, ".android.json")
|
||||
|
||||
with open(filename, "r") as f:
|
||||
android_json = json.load(f)
|
||||
|
||||
if "google_play_key" in build:
|
||||
android_json["google_play_key"] = build["google_play_key"]
|
||||
else:
|
||||
android_json.pop("google_play_key", None)
|
||||
|
||||
if "google_play_salt" in build:
|
||||
|
||||
if len(build["google_play_salt"]) != 20:
|
||||
raise Exception("build.google_play_salt must be exactly 20 bytes long.")
|
||||
|
||||
android_json["google_play_salt"] = ", ".join(str(i) for i in build["google_play_salt"])
|
||||
else:
|
||||
android_json.pop("google_play_salt", None)
|
||||
|
||||
|
||||
with open(filename, "w") as f:
|
||||
json.dump(android_json, f)
|
||||
|
||||
def android_build(command, p=None, gui=True):
|
||||
"""
|
||||
This actually builds the package.
|
||||
"""
|
||||
|
||||
if p is None:
|
||||
p = project.current
|
||||
|
||||
update_android_json(p, gui)
|
||||
|
||||
dist = p.temp_filename("android.dist")
|
||||
|
||||
if os.path.exists(dist):
|
||||
shutil.rmtree(dist)
|
||||
|
||||
if gui:
|
||||
reporter = distribute.GuiReporter()
|
||||
rapt_interface = AndroidInterface()
|
||||
else:
|
||||
reporter = distribute.TextReporter()
|
||||
rapt_interface = rapt.interface.Interface()
|
||||
|
||||
distribute.Distributor(project.current,
|
||||
reporter=reporter,
|
||||
packages=[ 'android' ],
|
||||
build_update=False,
|
||||
noarchive=True,
|
||||
packagedest=dist,
|
||||
report_success=False,
|
||||
)
|
||||
|
||||
with interface.nolinks():
|
||||
rapt.build.build(rapt_interface, dist, command)
|
||||
|
||||
# The android support can stick unicode into os.environ. Fix that.
|
||||
init 100 python:
|
||||
for k, v in list(os.environ.items()):
|
||||
if not isinstance(v, str):
|
||||
os.environ[k] = renpy.fsencode(v)
|
||||
|
||||
screen android_process(interface):
|
||||
|
||||
zorder 100
|
||||
|
||||
default ft = FileTail(interface.filename)
|
||||
|
||||
text "[ft.text!q]":
|
||||
size 14
|
||||
color TEXT
|
||||
font "Roboto-Light.ttf"
|
||||
xpos 75
|
||||
ypos 350
|
||||
|
||||
timer .1 action interface.check_process repeat True
|
||||
timer .2 action ft.update repeat True
|
||||
|
||||
|
||||
screen android:
|
||||
|
||||
default tt = Tooltip(None)
|
||||
$ state = AndroidState()
|
||||
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_root"
|
||||
|
||||
window:
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Android: [project.current.name!q]")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
hbox:
|
||||
|
||||
# Left side.
|
||||
frame:
|
||||
style "l_indent"
|
||||
xmaximum ONEHALF
|
||||
xfill True
|
||||
|
||||
has vbox
|
||||
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
has vbox
|
||||
|
||||
text _("Emulation:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
frame style "l_indent":
|
||||
|
||||
has vbox
|
||||
|
||||
textbutton _("Phone"):
|
||||
action LaunchEmulator("touch", "small phone touch android")
|
||||
hovered tt.Action(PHONE_TEXT)
|
||||
|
||||
textbutton _("Tablet"):
|
||||
action LaunchEmulator("touch", "medium tablet touch android")
|
||||
hovered tt.Action(TABLET_TEXT)
|
||||
|
||||
textbutton _("Television / OUYA"):
|
||||
action LaunchEmulator("tv", "small tv ouya android")
|
||||
hovered tt.Action(OUYA_TEXT)
|
||||
|
||||
|
||||
add SPACER
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
has vbox
|
||||
|
||||
text _("Build:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
frame style "l_indent":
|
||||
|
||||
has vbox
|
||||
|
||||
textbutton _("Install SDK & Create Keys"):
|
||||
action AndroidIfState(state, ANDROID_NO_SDK, Jump("android_installsdk"))
|
||||
hovered tt.Action(INSTALL_SDK_TEXT)
|
||||
|
||||
textbutton _("Configure"):
|
||||
action AndroidIfState(state, ANDROID_NO_CONFIG, Jump("android_configure"))
|
||||
hovered tt.Action(CONFIGURE_TEXT)
|
||||
|
||||
textbutton _("Build Package"):
|
||||
action AndroidIfState(state, ANDROID_OK, AndroidBuild("android_build"))
|
||||
hovered tt.Action(BUILD_TEXT)
|
||||
|
||||
textbutton _("Build & Install"):
|
||||
action AndroidIfState(state, ANDROID_OK, AndroidBuild("android_build_and_install"))
|
||||
hovered tt.Action(BUILD_AND_INSTALL_TEXT)
|
||||
|
||||
|
||||
|
||||
# Right side.
|
||||
frame:
|
||||
style "l_indent"
|
||||
xmaximum ONEHALF
|
||||
xfill True
|
||||
|
||||
has vbox
|
||||
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
has vbox
|
||||
|
||||
add SPACER
|
||||
|
||||
if tt.value:
|
||||
text tt.value
|
||||
else:
|
||||
text AndroidStateText(state)
|
||||
|
||||
|
||||
textbutton _("Back") action Jump("front_page") style "l_left_button"
|
||||
|
||||
|
||||
label android:
|
||||
|
||||
if RAPT_PATH is None:
|
||||
$ interface.yesno(_("Before packaging Android apps, you'll need to download RAPT, the Ren'Py Android Packaging Tool. Would you like to download RAPT now?"), no=Jump("front_page"))
|
||||
$ add_dlc("rapt", restart=True)
|
||||
|
||||
call screen android
|
||||
|
||||
|
||||
label android_installsdk:
|
||||
|
||||
python:
|
||||
with interface.nolinks():
|
||||
rapt.install_sdk.install_sdk(AndroidInterface())
|
||||
|
||||
jump android
|
||||
|
||||
|
||||
label android_configure:
|
||||
|
||||
python:
|
||||
rapt.configure.configure(AndroidInterface(), project.current.path)
|
||||
|
||||
jump android
|
||||
|
||||
|
||||
label android_build:
|
||||
|
||||
$ android_build([ 'release' ])
|
||||
|
||||
jump android
|
||||
|
||||
|
||||
label android_build_and_install:
|
||||
|
||||
$ android_build([ 'release', 'install' ])
|
||||
|
||||
jump android
|
||||
|
||||
init python:
|
||||
|
||||
def android_build_command():
|
||||
ap = renpy.arguments.ArgumentParser()
|
||||
ap.add_argument("project", help="The path to the project directory.")
|
||||
ap.add_argument("command", help="Commands to pass to ant. (Try 'release' 'install'.)", nargs='+')
|
||||
|
||||
args = ap.parse_args()
|
||||
|
||||
p = project.Project(args.project)
|
||||
|
||||
android_build(args.command, p=p, gui=False)
|
||||
|
||||
return False
|
||||
|
||||
renpy.arguments.register_command("android_build", android_build_command)
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Ren'Py archiver. This builds a Ren'Py archive file, and the
|
||||
# associated index file. These files are really easy to
|
||||
# reverse-engineer, but are probably better than nothing.
|
||||
|
||||
init python in archiver:
|
||||
|
||||
import sys
|
||||
import random
|
||||
import glob
|
||||
|
||||
from cPickle import dumps, HIGHEST_PROTOCOL
|
||||
|
||||
|
||||
class Archive(object):
|
||||
"""
|
||||
Adds files from disk to a rpa archive.
|
||||
"""
|
||||
|
||||
def __init__(self, filename):
|
||||
|
||||
# The archive file.
|
||||
self.f = open(filename, "wb")
|
||||
|
||||
# The index to the file.
|
||||
self.index = _dict()
|
||||
|
||||
# A fixed key minimizes difference between archive versions.
|
||||
self.key = 0x42424242
|
||||
|
||||
padding = "RPA-3.0 XXXXXXXXXXXXXXXX XXXXXXXX\n"
|
||||
self.f.write(padding)
|
||||
|
||||
def add(self, name, path):
|
||||
"""
|
||||
Adds a file to the archive.
|
||||
"""
|
||||
|
||||
self.index[name] = _list()
|
||||
|
||||
with open(path, "rb") as df:
|
||||
data = df.read()
|
||||
dlen = len(data)
|
||||
|
||||
# Pad.
|
||||
padding = "Made with Ren'Py."
|
||||
self.f.write(padding)
|
||||
|
||||
offset = self.f.tell()
|
||||
|
||||
self.f.write(data)
|
||||
|
||||
self.index[name].append((offset ^ self.key, dlen ^ self.key, ""))
|
||||
|
||||
def close(self):
|
||||
|
||||
indexoff = self.f.tell()
|
||||
|
||||
self.f.write(dumps(self.index, HIGHEST_PROTOCOL).encode("zlib"))
|
||||
|
||||
self.f.seek(0)
|
||||
self.f.write("RPA-3.0 %016x %08x\n" % (indexoff, self.key))
|
||||
|
||||
self.f.close()
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
# http://www.csn.ul.ie/~caolan/publink/winresdump/winresdump/doc/pefile.html
|
||||
# Contains a reasonable description of the format.
|
||||
@@ -5,7 +26,7 @@
|
||||
import struct
|
||||
import sys
|
||||
import array
|
||||
import pefile
|
||||
import pefile # @UnresolvedImport
|
||||
|
||||
# This class performs various operations on memory-loaded binary files,
|
||||
# including modifications.
|
||||
@@ -16,7 +37,7 @@ class BinFile(object):
|
||||
self.a[addr+1] = (value >> 8) & 0xff
|
||||
self.a[addr+2] = (value >> 16) & 0xff
|
||||
self.a[addr+3] = (value >> 24) & 0xff
|
||||
|
||||
|
||||
def u32(self):
|
||||
addr = self.addr
|
||||
rv = self.a[addr]
|
||||
@@ -42,20 +63,20 @@ class BinFile(object):
|
||||
c = self.u16()
|
||||
|
||||
rv = u""
|
||||
for i in range(c):
|
||||
for _i in range(c):
|
||||
rv += unichr(self.u16())
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
def seek(self, addr):
|
||||
self.addr = addr
|
||||
|
||||
def tostring(self):
|
||||
return self.a.tostring()
|
||||
|
||||
def substring(self, start, len):
|
||||
def substring(self, start, len): #@ReservedAssignment
|
||||
return self.a[start:start+len].tostring()
|
||||
|
||||
|
||||
def __init__(self, data):
|
||||
self.a = array.array('B')
|
||||
self.a.fromstring(data)
|
||||
@@ -66,7 +87,7 @@ class BinFile(object):
|
||||
|
||||
# The virtual address of the resource segment.
|
||||
resource_virtual = 0
|
||||
|
||||
|
||||
# This parses a data block out of the resources.
|
||||
def parse_data(bf, offset):
|
||||
bf.seek(offset)
|
||||
@@ -78,7 +99,7 @@ def parse_data(bf, offset):
|
||||
l = [ ]
|
||||
|
||||
bf.seek(data_offset - resource_virtual)
|
||||
for i in range(data_len):
|
||||
for _i in range(data_len):
|
||||
l.append(chr(bf.u8()))
|
||||
|
||||
return (code_page, "".join(l))
|
||||
@@ -87,16 +108,16 @@ def parse_data(bf, offset):
|
||||
def parse_directory(bf, offset):
|
||||
|
||||
bf.seek(offset)
|
||||
char = bf.u32()
|
||||
timedate = bf.u32()
|
||||
major = bf.u16()
|
||||
minor = bf.u16()
|
||||
char = bf.u32() #@UnusedVariable
|
||||
timedate = bf.u32() #@UnusedVariable
|
||||
major = bf.u16() #@UnusedVariable
|
||||
minor = bf.u16() #@UnusedVariable
|
||||
n_named = bf.u16()
|
||||
n_id = bf.u16()
|
||||
|
||||
entries = [ ]
|
||||
|
||||
for i in range(n_named + n_id):
|
||||
|
||||
for _i in range(n_named + n_id):
|
||||
entries.append((bf.u32(), bf.u32()))
|
||||
|
||||
rv = { }
|
||||
@@ -113,8 +134,8 @@ def parse_directory(bf, offset):
|
||||
value = parse_data(bf, value)
|
||||
|
||||
rv[name] = value
|
||||
|
||||
return rv
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -124,7 +145,7 @@ def show_resources(d, prefix):
|
||||
if not isinstance(d, dict):
|
||||
print prefix, "Codepage", d[0], "length", len(d[1])
|
||||
return
|
||||
|
||||
|
||||
for k in d:
|
||||
print prefix, k
|
||||
show_resources(d[k], prefix + " ")
|
||||
@@ -141,7 +162,7 @@ class Packer(object):
|
||||
|
||||
self.entries = ""
|
||||
self.entries_offset = 0
|
||||
|
||||
|
||||
head = self.pack_dict(d, 0)
|
||||
|
||||
self.data = ""
|
||||
@@ -151,44 +172,44 @@ class Packer(object):
|
||||
self.entries_offset = len(head)
|
||||
|
||||
return self.pack_dict(d, 0) + self.entries + self.data
|
||||
|
||||
|
||||
def pack_name(self, s):
|
||||
rv = self.data_offset + len(self.data)
|
||||
|
||||
l = len(s)
|
||||
s = s.encode("utf-16le")
|
||||
self.data += struct.pack("<H", l) + s + "\0\0"
|
||||
|
||||
|
||||
return rv
|
||||
|
||||
def pack_tuple(self, t):
|
||||
codepage, data = t
|
||||
|
||||
rv = len(self.entries) + self.entries_offset
|
||||
rv = len(self.entries) + self.entries_offset
|
||||
|
||||
if len(self.data) % 2:
|
||||
self.data += "P"
|
||||
|
||||
daddr = len(self.data) + self.data_offset
|
||||
|
||||
|
||||
self.entries += struct.pack("<IIII", daddr + resource_virtual, len(data), codepage, 0)
|
||||
self.data += data
|
||||
|
||||
# if len(self.data) % 1 == 1:
|
||||
# self.data += 'P'
|
||||
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
def pack_dict(self, d, offset):
|
||||
name_entries = sorted((a, b) for a, b in d.iteritems() if isinstance(a, unicode))
|
||||
id_entries = sorted((a, b) for a, b in d.iteritems() if isinstance(a, int))
|
||||
|
||||
|
||||
rv = struct.pack("<IIHHHH", 0, 0, 4, 0, len(name_entries), len(id_entries))
|
||||
|
||||
|
||||
offset += len(rv) + (len(name_entries) + len(id_entries)) * 8
|
||||
|
||||
|
||||
rest = ""
|
||||
|
||||
|
||||
for (name, value) in name_entries + id_entries:
|
||||
if isinstance(name, unicode):
|
||||
name = 0x80000000 | self.pack_name(name)
|
||||
@@ -200,11 +221,11 @@ class Packer(object):
|
||||
rest += packed
|
||||
else:
|
||||
addr = self.pack_tuple(value)
|
||||
|
||||
|
||||
rv += struct.pack("<II", name, addr)
|
||||
|
||||
return rv + rest
|
||||
|
||||
|
||||
##############################################################################
|
||||
# This loads in an icon file, and returns a dictionary that is suitable for
|
||||
# use in the resources of an exe file.
|
||||
@@ -219,8 +240,8 @@ def load_icon(fn):
|
||||
rv = { }
|
||||
rv[3] = { }
|
||||
|
||||
group = struct.pack("HHH", 0, 1, count)
|
||||
|
||||
group = struct.pack("HHH", 0, 1, count)
|
||||
|
||||
for i in range(count):
|
||||
width = f.u8()
|
||||
height = f.u8()
|
||||
@@ -235,17 +256,17 @@ def load_icon(fn):
|
||||
f.seek(offset + 16)
|
||||
if not f.u32():
|
||||
f.set_u32(offset + 20, 0)
|
||||
|
||||
|
||||
rv[3][i + 1] = { 0 : (1252, f.substring(offset, size)) }
|
||||
|
||||
|
||||
group += struct.pack("BBBBHHIH", width, height, colors, reserved,
|
||||
planes, bpp, size, i + 1)
|
||||
|
||||
|
||||
f.seek(addr)
|
||||
|
||||
rv[14] = { 1 : { 0 : (1252, group) } }
|
||||
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
@@ -269,25 +290,25 @@ def change_icons(oldexe, icofn):
|
||||
|
||||
physize = rsrc_section.SizeOfRawData
|
||||
virsize = rsrc_section.Misc_VirtualSize
|
||||
|
||||
|
||||
f = file(oldexe, "rb")
|
||||
f.seek(base)
|
||||
data = f.read(physize)
|
||||
f.close()
|
||||
|
||||
bf = BinFile(data)
|
||||
|
||||
|
||||
resources = parse_directory(bf, 0)
|
||||
# show_resources(resources, "")
|
||||
resources.update(load_icon(icofn))
|
||||
# show_resources(resources, "")
|
||||
|
||||
|
||||
rsrc = Packer().pack(resources)
|
||||
|
||||
alignment = pe.OPTIONAL_HEADER.SectionAlignment
|
||||
|
||||
|
||||
# print "Alignment is", alignment
|
||||
|
||||
|
||||
if len(rsrc) % alignment:
|
||||
pad = alignment - (len(rsrc) % alignment)
|
||||
padding = "RENPYVNE" * (pad / 8 + 1)
|
||||
@@ -295,35 +316,34 @@ def change_icons(oldexe, icofn):
|
||||
rsrc += padding
|
||||
|
||||
newsize = len(rsrc)
|
||||
|
||||
|
||||
rsrc_section.Misc_VirtualSize += newsize - virsize
|
||||
rsrc_section.Misc_PhysicalAddress += newsize - virsize
|
||||
rsrc_section.Misc += newsize - virsize
|
||||
rsrc_section.SizeOfRawData += newsize - physize
|
||||
|
||||
pe.OPTIONAL_HEADER.SizeOfInitializedData += newsize - physize
|
||||
|
||||
pe.OPTIONAL_HEADER.SizeOfInitializedData += newsize - physize
|
||||
|
||||
# Resource size.
|
||||
pe.OPTIONAL_HEADER.DATA_DIRECTORY[2].Size += newsize - virsize
|
||||
|
||||
# Compute the total size of the image.
|
||||
total_size = 0
|
||||
|
||||
|
||||
for i in pe.sections:
|
||||
|
||||
sec_size = i.Misc_VirtualSize
|
||||
sec_size = sec_size - (sec_size % alignment) + alignment
|
||||
print sec_size
|
||||
|
||||
|
||||
total_size += sec_size
|
||||
|
||||
pe.OPTIONAL_HEADER.SizeOfImage = total_size
|
||||
|
||||
return pe.write()[:base] + rsrc
|
||||
|
||||
return pe.write()[:base] + rsrc
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
f = file(sys.argv[3], "wb")
|
||||
f.write(change_icons(sys.argv[1], sys.argv[2]))
|
||||
f.close()
|
||||
|
||||
|
||||
@@ -0,0 +1,488 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init python:
|
||||
import random
|
||||
import codecs
|
||||
import re
|
||||
import sys
|
||||
|
||||
def theme_names():
|
||||
"""
|
||||
Gets a list of all of the theme names we know about.
|
||||
"""
|
||||
|
||||
names = list(theme_data.THEME.keys())
|
||||
names.sort(key=lambda a : a.lower())
|
||||
|
||||
return names
|
||||
|
||||
def scheme_names(theme):
|
||||
"""
|
||||
Gets a list of the color scheme names corresponding to the given
|
||||
theme.
|
||||
"""
|
||||
|
||||
names = list(theme_data.THEME[theme].keys())
|
||||
names.sort(key=lambda a : a.lower())
|
||||
|
||||
return names
|
||||
|
||||
def theme_yinitial():
|
||||
names = theme_names()
|
||||
|
||||
if len(names) < 2:
|
||||
return 0
|
||||
|
||||
return 1.0 * names.index(current_theme) / (len(names) - 1)
|
||||
|
||||
def scheme_yinitial():
|
||||
names = scheme_names(current_theme)
|
||||
|
||||
if len(names) < 2:
|
||||
return 0
|
||||
|
||||
return 1.0 * names.index(current_scheme) / (len(names) - 1)
|
||||
|
||||
def pick_theme(theme, scheme):
|
||||
"""
|
||||
Returns a theme and scheme that are similar to `theme` and `scheme`.
|
||||
|
||||
If the theme is known, picks it, otherwise picks a random theme. If
|
||||
the scheme is known for that theme, picks it, otherwise picks a
|
||||
random scheme that is known for the current theme.
|
||||
"""
|
||||
|
||||
if theme not in theme_data.THEME:
|
||||
theme = random.choice(list(theme_data.THEME))
|
||||
|
||||
schemes = theme_data.THEME[theme]
|
||||
|
||||
if scheme not in schemes:
|
||||
if theme in schemes:
|
||||
scheme = theme
|
||||
else:
|
||||
scheme = random.choice(list(schemes))
|
||||
|
||||
return theme, scheme
|
||||
|
||||
def implement_theme(theme, scheme):
|
||||
global showing_theme, showing_scheme
|
||||
|
||||
if theme == showing_theme and scheme == showing_scheme:
|
||||
return
|
||||
|
||||
renpy.style.restore(style_backup)
|
||||
exec theme_data.THEME[theme][scheme] in globals()
|
||||
renpy.style.rebuild()
|
||||
|
||||
showing_theme = theme
|
||||
showing_scheme = scheme
|
||||
|
||||
renpy.restart_interaction()
|
||||
|
||||
showing_theme = None
|
||||
showing_scheme = None
|
||||
|
||||
class SetTheme(Action):
|
||||
def __init__(self, theme):
|
||||
self.theme = theme
|
||||
|
||||
def __call__(self):
|
||||
global current_theme
|
||||
global current_scheme
|
||||
|
||||
current_theme, current_scheme = pick_theme(self.theme, current_scheme)
|
||||
|
||||
implement_theme(current_theme, current_scheme)
|
||||
renpy.restart_interaction()
|
||||
|
||||
def get_selected(self):
|
||||
return current_theme == self.theme
|
||||
|
||||
class SetScheme(Action):
|
||||
def __init__(self, scheme):
|
||||
self.scheme = scheme
|
||||
|
||||
def __call__(self):
|
||||
global current_theme
|
||||
global current_scheme
|
||||
|
||||
current_theme, current_scheme = pick_theme(current_theme, self.scheme)
|
||||
|
||||
implement_theme(current_theme, current_scheme)
|
||||
renpy.restart_interaction()
|
||||
|
||||
def get_selected(self):
|
||||
return current_scheme == self.scheme
|
||||
|
||||
class PreviewTheme(Action):
|
||||
|
||||
def __init__(self, theme, scheme):
|
||||
self.theme = theme
|
||||
self.scheme = scheme
|
||||
|
||||
def __call__(self):
|
||||
theme, scheme = pick_theme(self.theme, self.scheme)
|
||||
implement_theme(theme, scheme)
|
||||
|
||||
def unhovered(self):
|
||||
if (showing_theme == self.theme and showing_scheme == self.scheme):
|
||||
implement_theme(current_theme, current_scheme)
|
||||
|
||||
def value_changed(value):
|
||||
return None
|
||||
|
||||
##########################################################################
|
||||
# Code to update options.rpy
|
||||
|
||||
def list_logical_lines(filename):
|
||||
"""
|
||||
This reads in filename, and turns it into a list of logical
|
||||
lines.
|
||||
"""
|
||||
|
||||
f = codecs.open(filename, "rb", "utf-8")
|
||||
data = f.read()
|
||||
f.close()
|
||||
|
||||
# The result.
|
||||
rv = [ ]
|
||||
|
||||
# The current position we're looking at in the buffer.
|
||||
pos = 0
|
||||
|
||||
# Looping over the lines in the file.
|
||||
while pos < len(data):
|
||||
|
||||
# The line that we're building up.
|
||||
line = ""
|
||||
|
||||
# The number of open parenthesis there are right now.
|
||||
parendepth = 0
|
||||
|
||||
# Looping over the characters in a single logical line.
|
||||
while pos < len(data):
|
||||
|
||||
c = data[pos]
|
||||
|
||||
if c == '\n' and not parendepth:
|
||||
rv.append(line)
|
||||
|
||||
pos += 1
|
||||
# This helps out error checking.
|
||||
line = ""
|
||||
break
|
||||
|
||||
# Backslash/newline.
|
||||
if c == "\\" and data[pos+1] == "\n":
|
||||
pos += 2
|
||||
line += "\\\n"
|
||||
continue
|
||||
|
||||
# Parenthesis.
|
||||
if c in ('(', '[', '{'):
|
||||
parendepth += 1
|
||||
|
||||
if c in ('}', ']', ')') and parendepth:
|
||||
parendepth -= 1
|
||||
|
||||
# Comments.
|
||||
if c == '#':
|
||||
while data[pos] != '\n':
|
||||
line += data[pos]
|
||||
pos += 1
|
||||
|
||||
continue
|
||||
|
||||
# Strings.
|
||||
if c in ('"', "'", "`"):
|
||||
delim = c
|
||||
line += c
|
||||
pos += 1
|
||||
|
||||
escape = False
|
||||
|
||||
while pos < len(data):
|
||||
|
||||
c = data[pos]
|
||||
|
||||
if escape:
|
||||
escape = False
|
||||
pos += 1
|
||||
line += c
|
||||
continue
|
||||
|
||||
if c == delim:
|
||||
pos += 1
|
||||
line += c
|
||||
break
|
||||
|
||||
if c == '\\':
|
||||
escape = True
|
||||
|
||||
line += c
|
||||
pos += 1
|
||||
|
||||
continue
|
||||
|
||||
continue
|
||||
|
||||
line += c
|
||||
pos += 1
|
||||
|
||||
if line:
|
||||
rv.append(line)
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
def switch_theme():
|
||||
"""
|
||||
Switches the theme of the current project to the current theme
|
||||
and color scheme. (As set in current_theme and current_scheme.)
|
||||
"""
|
||||
|
||||
theme_code = theme_data.THEME[current_theme][current_scheme]
|
||||
|
||||
# Did we change the file at all?
|
||||
changed = False
|
||||
|
||||
filename = os.path.join(project.current.path, "game/options.rpy")
|
||||
|
||||
with codecs.open(filename + ".new", "wb", "utf-8") as out:
|
||||
|
||||
for l in list_logical_lines(filename):
|
||||
|
||||
m = re.match(r' theme.(\w+)\(', l)
|
||||
if (not changed) and m and (m.group(1) in theme_data.THEME_FUNCTIONS):
|
||||
l = " " + theme_code
|
||||
changed = True
|
||||
|
||||
out.write(l + "\n")
|
||||
|
||||
if changed:
|
||||
try:
|
||||
os.unlink(filename + ".bak")
|
||||
except:
|
||||
pass
|
||||
|
||||
os.rename(filename, filename + ".bak")
|
||||
os.rename(filename + ".new", filename)
|
||||
else:
|
||||
os.unlink(filename + ".new")
|
||||
interface.error(_("Could not change the theme. Perhaps options.rpy was changed too much."))
|
||||
|
||||
|
||||
# Now give the theme's screen-ops function a chance to make any
|
||||
# necessary changes to the screens.rpy file
|
||||
filename = os.path.join(project.current.path, "game/screens.rpy")
|
||||
changed = False
|
||||
|
||||
try:
|
||||
with codecs.open(filename + ".new", "wb", "utf-8") as out:
|
||||
lines = list_logical_lines(filename)
|
||||
|
||||
lines = theme_data.THEME_SCREEN_OPERATIONS[current_theme](lines)
|
||||
|
||||
if lines != None:
|
||||
for l in lines:
|
||||
out.write(l + "\n")
|
||||
changed = True
|
||||
|
||||
if changed:
|
||||
try:
|
||||
os.unlink(filename + ".bak")
|
||||
except:
|
||||
pass
|
||||
|
||||
os.rename(filename, filename + ".bak")
|
||||
os.rename(filename + ".new", filename)
|
||||
|
||||
except Exception as inst:
|
||||
try:
|
||||
# just in case
|
||||
os.unlink(filename + ".new")
|
||||
except:
|
||||
pass
|
||||
pass
|
||||
|
||||
def make_style_backup():
|
||||
"""
|
||||
Call this to back up the styles. This should be called in a
|
||||
translate python block in each translation.
|
||||
"""
|
||||
|
||||
global style_backup
|
||||
style_backup = renpy.style.backup()
|
||||
|
||||
translate None python:
|
||||
make_style_backup()
|
||||
|
||||
screen theme_demo:
|
||||
|
||||
window:
|
||||
style "gm_root"
|
||||
xpadding 5
|
||||
ypadding 5
|
||||
|
||||
grid 1 1:
|
||||
xfill True
|
||||
style_group "prefs"
|
||||
|
||||
vbox:
|
||||
|
||||
frame:
|
||||
style_group "pref"
|
||||
has vbox
|
||||
|
||||
label _("Display")
|
||||
textbutton _("Window") action SelectedIf(True)
|
||||
textbutton _("Fullscreen") action ui.returns(None)
|
||||
textbutton _("Planetarium") action None
|
||||
|
||||
|
||||
frame:
|
||||
style_group "pref"
|
||||
has vbox
|
||||
|
||||
label _("Sound Volume")
|
||||
bar style "slider" value .75 range 1.0 changed value_changed
|
||||
|
||||
textbutton "Test":
|
||||
action ui.returns(None)
|
||||
style "soundtest_button"
|
||||
|
||||
|
||||
init -2 python:
|
||||
style.pref_frame.xfill = True
|
||||
style.pref_frame.xmargin = 5
|
||||
style.pref_frame.top_margin = 5
|
||||
|
||||
style.pref_vbox.xfill = True
|
||||
|
||||
style.pref_button.size_group = "pref"
|
||||
style.pref_button.xalign = 1.0
|
||||
|
||||
style.pref_slider.xmaximum = 192
|
||||
style.pref_slider.xalign = 1.0
|
||||
|
||||
style.soundtest_button.xalign = 1.0
|
||||
|
||||
|
||||
screen choose_theme:
|
||||
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_root"
|
||||
|
||||
window:
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Choose Theme")
|
||||
|
||||
hbox:
|
||||
yfill True
|
||||
|
||||
# Theme selector.
|
||||
frame:
|
||||
style "l_indent"
|
||||
bottom_margin HALF_SPACER_HEIGHT
|
||||
xmaximum 225
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Theme") style "l_label_small"
|
||||
|
||||
viewport:
|
||||
scrollbars "vertical"
|
||||
yinitial theme_yinitial()
|
||||
mousewheel True
|
||||
|
||||
has vbox
|
||||
|
||||
for i in theme_names():
|
||||
textbutton "[i]":
|
||||
action SetTheme(i)
|
||||
hovered PreviewTheme(i, current_scheme)
|
||||
style "l_list2"
|
||||
|
||||
|
||||
# Color scheme selector.
|
||||
frame:
|
||||
style "l_indent"
|
||||
bottom_margin HALF_SPACER_HEIGHT
|
||||
xmaximum 225
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Color Scheme") style "l_label_small"
|
||||
|
||||
viewport:
|
||||
scrollbars "vertical"
|
||||
mousewheel True
|
||||
yinitial scheme_yinitial()
|
||||
|
||||
has vbox
|
||||
|
||||
for i in scheme_names(current_theme):
|
||||
textbutton "[i]":
|
||||
action SetScheme(i)
|
||||
hovered PreviewTheme(current_theme, i)
|
||||
style "l_list2"
|
||||
|
||||
|
||||
# Preview
|
||||
frame:
|
||||
style "l_default"
|
||||
background Frame(PATTERN, 0, 0, tile=True)
|
||||
xpadding 5
|
||||
ypadding 5
|
||||
|
||||
xfill True
|
||||
yfill True
|
||||
xmargin 20
|
||||
bottom_margin 6
|
||||
|
||||
use theme_demo
|
||||
|
||||
textbutton _("Back") action Jump("front_page") style "l_left_button"
|
||||
textbutton _("Continue") action Return(True) style "l_right_button"
|
||||
|
||||
|
||||
label choose_theme_callable:
|
||||
|
||||
python:
|
||||
current_theme, current_scheme = pick_theme(None, None)
|
||||
implement_theme(current_theme, current_scheme)
|
||||
|
||||
call screen choose_theme
|
||||
|
||||
python hide:
|
||||
with interface.error_handling("changing the theme"):
|
||||
switch_theme()
|
||||
|
||||
return
|
||||
|
||||
label choose_theme:
|
||||
call choose_theme_callable
|
||||
jump front_page
|
||||
@@ -0,0 +1,260 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init python:
|
||||
class PackageToggle(Action):
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
def get_selected(self):
|
||||
return self.name in project.current.data['packages']
|
||||
|
||||
def __call__(self):
|
||||
packages = project.current.data['packages']
|
||||
|
||||
if self.name in packages:
|
||||
packages.remove(self.name)
|
||||
else:
|
||||
packages.append(self.name)
|
||||
|
||||
project.current.save_data()
|
||||
renpy.restart_interaction()
|
||||
|
||||
class DataToggle(Action):
|
||||
def __init__(self, field):
|
||||
self.field = field
|
||||
|
||||
def get_selected(self):
|
||||
return project.current.data[self.field]
|
||||
|
||||
def __call__(self):
|
||||
project.current.data[self.field] = not project.current.data[self.field]
|
||||
|
||||
project.current.save_data()
|
||||
renpy.restart_interaction()
|
||||
|
||||
|
||||
DEFAULT_BUILD_INFO = """
|
||||
|
||||
## This section contains information about how to build your project into
|
||||
## distribution files.
|
||||
init python:
|
||||
|
||||
## The name that's used for directories and archive files. For example, if
|
||||
## this is 'mygame-1.0', the windows distribution will be in the
|
||||
## directory 'mygame-1.0-win', in the 'mygame-1.0-win.zip' file.
|
||||
build.directory_name = "PROJECTNAME-1.0"
|
||||
|
||||
## The name that's uses for executables - the program that users will run
|
||||
## to start the game. For example, if this is 'mygame', then on Windows,
|
||||
## users can click 'mygame.exe' to start the game.
|
||||
build.executable_name = "PROJECTNAME"
|
||||
|
||||
## If True, Ren'Py will include update information into packages. This
|
||||
## allows the updater to run.
|
||||
build.include_update = False
|
||||
|
||||
## File patterns:
|
||||
##
|
||||
## The following functions take file patterns. File patterns are case-
|
||||
## insensitive, and matched against the path relative to the base
|
||||
## directory, with and without a leading /. If multiple patterns match,
|
||||
## the first is used.
|
||||
##
|
||||
##
|
||||
## In a pattern:
|
||||
##
|
||||
## /
|
||||
## Is the directory separator.
|
||||
## *
|
||||
## Matches all characters, except the directory separator.
|
||||
## **
|
||||
## Matches all characters, including the directory separator.
|
||||
##
|
||||
## For example:
|
||||
##
|
||||
## *.txt
|
||||
## Matches txt files in the base directory.
|
||||
## game/**.ogg
|
||||
## Matches ogg files in the game directory or any of its subdirectories.
|
||||
## **.psd
|
||||
## Matches psd files anywhere in the project.
|
||||
|
||||
## Classify files as None to exclude them from the built distributions.
|
||||
|
||||
build.classify('**~', None)
|
||||
build.classify('**.bak', None)
|
||||
build.classify('**/.**', None)
|
||||
build.classify('**/#**', None)
|
||||
build.classify('**/thumbs.db', None)
|
||||
|
||||
## To archive files, classify them as 'archive'.
|
||||
|
||||
# build.classify('game/**.png', 'archive')
|
||||
# build.classify('game/**.jpg', 'archive')
|
||||
|
||||
## Files matching documentation patterns are duplicated in a mac app
|
||||
## build, so they appear in both the app and the zip file.
|
||||
|
||||
build.documentation('*.html')
|
||||
build.documentation('*.txt')
|
||||
"""
|
||||
|
||||
# A screen that displays a file or directory name, and
|
||||
# lets the user change it,
|
||||
#
|
||||
# title
|
||||
# The title of the link.
|
||||
# value
|
||||
# The value of the field.
|
||||
screen distribute_name:
|
||||
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
has vbox
|
||||
|
||||
text title
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
text "[value!q]"
|
||||
|
||||
add SPACER
|
||||
|
||||
|
||||
screen build_distributions:
|
||||
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_root"
|
||||
|
||||
window:
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Build Distributions: [project.current.name!q]")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
hbox:
|
||||
|
||||
# Left side.
|
||||
frame:
|
||||
style "l_indent"
|
||||
xmaximum ONEHALF
|
||||
xfill True
|
||||
|
||||
has vbox
|
||||
|
||||
use distribute_name(
|
||||
title=_("Directory Name:"),
|
||||
value=project.current.dump["build"]["directory_name"])
|
||||
|
||||
use distribute_name(
|
||||
title=_("Executable Name:"),
|
||||
value=project.current.dump["build"]["executable_name"])
|
||||
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
has vbox
|
||||
|
||||
text _("Actions:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
frame style "l_indent":
|
||||
|
||||
has vbox
|
||||
|
||||
textbutton _("Edit options.rpy") action editor.Edit("game/options.rpy", check=True)
|
||||
textbutton _("Refresh") action Jump("build_distributions")
|
||||
|
||||
|
||||
# Right side.
|
||||
frame:
|
||||
style "l_indent"
|
||||
xmaximum ONEHALF
|
||||
xfill True
|
||||
|
||||
has vbox
|
||||
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
has vbox
|
||||
|
||||
text _("Build Packages:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
$ packages = project.current.dump["build"]["packages"]
|
||||
|
||||
for pkg in packages:
|
||||
if not pkg["hidden"]:
|
||||
$ description = pkg["description"]
|
||||
textbutton "[description!q]" action PackageToggle(pkg["name"]) style "l_checkbox"
|
||||
|
||||
add SPACER
|
||||
|
||||
if project.current.dump["build"]["include_update"]:
|
||||
textbutton _("Build Updates") action DataToggle("build_update") style "l_checkbox"
|
||||
|
||||
|
||||
textbutton _("Back") action Jump("front_page") style "l_left_button"
|
||||
textbutton _("Build") action Jump("distribute") style "l_right_button"
|
||||
|
||||
label build_update_dump:
|
||||
python:
|
||||
project.current.update_dump(True)
|
||||
|
||||
if project.current.dump.get("error", False):
|
||||
interface.error(_("Errors were detected when running the project. Please ensure the project runs without errors before building distributions."))
|
||||
|
||||
return
|
||||
|
||||
label build_distributions:
|
||||
|
||||
call build_update_dump
|
||||
|
||||
if not project.current.dump["build"]["directory_name"]:
|
||||
jump build_missing
|
||||
|
||||
call screen build_distributions
|
||||
|
||||
label build_missing:
|
||||
|
||||
python hide:
|
||||
|
||||
interface.yesno(_("Your project does not contain build information. Would you like to add build information to the end of options.rpy?"), yes=Return(True), no=Jump("front_page"))
|
||||
|
||||
build_info = DEFAULT_BUILD_INFO.replace("PROJECTNAME", project.current.name)
|
||||
|
||||
with open(os.path.join(project.current.path, "game", "options.rpy"), "a") as f:
|
||||
f.write(build_info)
|
||||
|
||||
jump build_distributions
|
||||
@@ -0,0 +1,150 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init python:
|
||||
|
||||
import urllib2
|
||||
import os
|
||||
import threading
|
||||
import time
|
||||
|
||||
class Downloader(object):
|
||||
|
||||
def __init__(self, url, dest):
|
||||
"""
|
||||
Downloads `url` to `dest`, providing progress reports
|
||||
as necessary.
|
||||
"""
|
||||
|
||||
self.url = url
|
||||
|
||||
# The destination file, and the destination temp file.
|
||||
self.dest = dest
|
||||
self.tmp = dest + ".tmp"
|
||||
|
||||
# Open the tmpfile.
|
||||
self.safe_unlink(self.tmp)
|
||||
self.tmpfile = open(self.tmp, "wb")
|
||||
|
||||
# Set by the thread to indicate progress (ranges from 0.0 to 1.0).
|
||||
self.progress = 0.0
|
||||
|
||||
# This is set to true by cancel() to indicate the download should be cancelled.
|
||||
self.cancelled = False
|
||||
|
||||
# Set on succes or failure.
|
||||
self.success = False
|
||||
self.failure = None
|
||||
|
||||
try:
|
||||
# Open the URL.
|
||||
self.urlfile = urllib2.urlopen(url)
|
||||
|
||||
t = threading.Thread(target=self.thread)
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
||||
except Exception as e:
|
||||
self.failure = str(e)
|
||||
|
||||
def thread(self):
|
||||
|
||||
try:
|
||||
count = 0
|
||||
|
||||
if "content-length" in self.urlfile.headers:
|
||||
length = int(self.urlfile.headers["content-length"])
|
||||
else:
|
||||
length = 0
|
||||
|
||||
while not self.cancelled:
|
||||
|
||||
data = self.urlfile.read(65536)
|
||||
|
||||
if not data:
|
||||
break
|
||||
|
||||
count += len(data)
|
||||
self.tmpfile.write(data)
|
||||
|
||||
if length > 0:
|
||||
self.progress = 1.0 * count / length
|
||||
|
||||
self.tmpfile.close()
|
||||
|
||||
if self.cancelled:
|
||||
return
|
||||
|
||||
if length and count != length:
|
||||
self.failure = "Download length does not match content length."
|
||||
return
|
||||
|
||||
self.safe_unlink(self.dest)
|
||||
os.rename(self.tmp, self.dest)
|
||||
|
||||
self.success = True
|
||||
|
||||
except Exception as e:
|
||||
self.failure = str(e)
|
||||
|
||||
|
||||
def safe_unlink(self, fn):
|
||||
if os.path.exists(fn):
|
||||
os.unlink(fn)
|
||||
|
||||
def cancel(self):
|
||||
"""
|
||||
Cancels the download.
|
||||
"""
|
||||
|
||||
self.cancelled = True
|
||||
|
||||
def check(self):
|
||||
"""
|
||||
Returns True if the download is finished, False if it was cancelled,
|
||||
None if it's ongoing, and raises an Exception if the download has failed.
|
||||
"""
|
||||
|
||||
if self.success:
|
||||
return True
|
||||
if self.cancelled:
|
||||
return False
|
||||
if self.failure:
|
||||
raise Exception("Downloading {} to {} failed: {}".format(self.url, self.dest, self.failure))
|
||||
|
||||
return None
|
||||
|
||||
class DownloaderValue(BarValue):
|
||||
"""
|
||||
A BarValue that reports the progress of a background download.
|
||||
"""
|
||||
|
||||
def __init__(self, d):
|
||||
self.downloader = d
|
||||
|
||||
def get_adjustment(self):
|
||||
self.adjustment = ui.adjustment(value=0.0, range=1.0, adjustable=False)
|
||||
return self.adjustment
|
||||
|
||||
def periodic(self, st):
|
||||
self.adjustment.change(self.downloader.progress)
|
||||
return .25
|
||||
|
||||
@@ -0,0 +1,482 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Editor Support.
|
||||
#
|
||||
# This contains code for scanning for editors, and for allowing the user to
|
||||
# select an editor.
|
||||
|
||||
init python in editor:
|
||||
|
||||
from store import Action, renpy, config, persistent
|
||||
import store.project as project
|
||||
import store.updater as updater
|
||||
import store.interface as interface
|
||||
import store
|
||||
|
||||
import glob
|
||||
import re
|
||||
import traceback
|
||||
import os
|
||||
import os.path
|
||||
|
||||
# Should we set up the editor?
|
||||
set_editor = "RENPY_EDIT_PY" not in os.environ
|
||||
|
||||
# A map from editor name to EditorInfo object.
|
||||
editors = { }
|
||||
|
||||
class EditorInfo(object):
|
||||
def __init__(self, filename):
|
||||
# The path to the editor info file.
|
||||
self.filename = filename
|
||||
|
||||
# The name of the editor.
|
||||
self.name = os.path.basename(filename)[:-len(".edit.py")]
|
||||
|
||||
# The time the editor file was last modified. We use this
|
||||
# to decide if we should update the editors mat when we
|
||||
# have multiple versions of an editor in contention.
|
||||
self.mtime = os.path.getmtime(filename)
|
||||
|
||||
def scan_editor(filename):
|
||||
"""
|
||||
Inserts an editor into editors if there isn't a newer
|
||||
editor there already.
|
||||
"""
|
||||
|
||||
ei = EditorInfo(filename)
|
||||
|
||||
if ei.name in editors:
|
||||
if editors[ei.name].mtime >= ei.mtime:
|
||||
return
|
||||
|
||||
editors[ei.name] = ei
|
||||
|
||||
def scan_all():
|
||||
"""
|
||||
Finds all *.edit.py files, and uses them to populate the list
|
||||
of editors.
|
||||
"""
|
||||
|
||||
editors.clear()
|
||||
|
||||
for d in [ config.renpy_base, persistent.projects_directory ]:
|
||||
if d is None:
|
||||
continue
|
||||
|
||||
for filename in glob.glob(d + "/*/*.edit.py"):
|
||||
scan_editor(filename)
|
||||
|
||||
########################################################################
|
||||
|
||||
# A list of fancy_editor_info objects.
|
||||
fancy_editors = [ ]
|
||||
|
||||
# The error message to display if an editor failed to start.
|
||||
error_message = None
|
||||
|
||||
class FancyEditorInfo(object):
|
||||
"""
|
||||
Represents an editor in the selection screen. A FEI knows if the
|
||||
editor is installed or not.
|
||||
"""
|
||||
|
||||
def __init__(self, priority, name, description=None, dlc=None, dldescription=None, error_message=None):
|
||||
# The priority of the editor. Lower priorities will come later
|
||||
# in the list.
|
||||
self.priority = priority
|
||||
|
||||
# The name of the editor.
|
||||
self.name = name
|
||||
|
||||
# Is the editor installed?
|
||||
self.installed = name in editors
|
||||
|
||||
# The dlc needed to install the editor.
|
||||
self.dlc = dlc
|
||||
|
||||
# A description of the editor.
|
||||
self.description = description
|
||||
|
||||
# A description of the download.
|
||||
self.dldescription = dldescription
|
||||
|
||||
# An error message to display if the editor failed to start.
|
||||
self.error_message = error_message
|
||||
|
||||
def fancy_scan_editors():
|
||||
"""
|
||||
Creates the list of FancyEditorInfo objects.
|
||||
"""
|
||||
|
||||
global fancy_editors
|
||||
|
||||
scan_all()
|
||||
|
||||
fei = fancy_editors = [ ]
|
||||
|
||||
# Editra.
|
||||
ED = _("{b}Recommended.{/b} A beta editor with an easy to use interface and features that aid in development, such as spell-checking. Editra currently lacks the IME support required for Chinese, Japanese, and Korean text input.")
|
||||
EDL = _("{b}Recommended.{/b} A beta editor with an easy to use interface and features that aid in development, such as spell-checking. Editra currently lacks the IME support required for Chinese, Japanese, and Korean text input. On Linux, Editra requires wxPython.")
|
||||
|
||||
if renpy.windows:
|
||||
dlc = "editra-windows"
|
||||
installed = os.path.exists(os.path.join(config.basedir, "editra/Editra-win32"))
|
||||
description = ED
|
||||
error_message = None
|
||||
elif renpy.macintosh:
|
||||
dlc = "editra-mac"
|
||||
installed = os.path.exists(os.path.join(config.basedir, "editra/Editra-mac.app"))
|
||||
description = ED
|
||||
error_message = None
|
||||
else:
|
||||
dlc = "editra-linux"
|
||||
installed = os.path.exists(os.path.join(config.basedir, "editra/Editra"))
|
||||
description = EDL
|
||||
error_message = _("This may have occured because wxPython is not installed on this system.")
|
||||
|
||||
e = FancyEditorInfo(
|
||||
1,
|
||||
"Editra",
|
||||
description,
|
||||
dlc,
|
||||
_("Up to 22 MB download required."),
|
||||
error_message)
|
||||
|
||||
e.installed = e.installed or installed
|
||||
|
||||
fei.append(e)
|
||||
|
||||
# jEdit
|
||||
fei.append(FancyEditorInfo(
|
||||
2,
|
||||
"jEdit",
|
||||
_("A mature editor that requires Java."),
|
||||
"jedit",
|
||||
_("1.8 MB download required."),
|
||||
_("This may have occured because Java is not installed on this system."),
|
||||
))
|
||||
|
||||
fei.append(FancyEditorInfo(
|
||||
3,
|
||||
"System Editor",
|
||||
_("Invokes the editor your operating system has associated with .rpy files."),
|
||||
None))
|
||||
|
||||
for k in editors:
|
||||
if k in [ "Editra", "jEdit", "System Editor", "None" ]:
|
||||
continue
|
||||
|
||||
fei.append(FancyEditorInfo(
|
||||
4,
|
||||
k,
|
||||
None,
|
||||
None))
|
||||
|
||||
fei.append(FancyEditorInfo(
|
||||
5,
|
||||
"None",
|
||||
_("Prevents Ren'Py from opening a text editor."),
|
||||
None))
|
||||
|
||||
fei.sort(key=lambda e : (e.priority, e.name.lower()))
|
||||
|
||||
# If we're in a linux distro or something, assume all editors work.
|
||||
if not updater.can_update():
|
||||
for i in fei:
|
||||
i.installed = True
|
||||
|
||||
def fancy_activate_editor(default=False):
|
||||
"""
|
||||
Activates the editor in persistent.editor, if it's installed.
|
||||
|
||||
`default`
|
||||
|
||||
"""
|
||||
|
||||
global error_message
|
||||
|
||||
fancy_scan_editors()
|
||||
|
||||
if default and not set_editor:
|
||||
renpy.editor.init()
|
||||
return
|
||||
|
||||
for i in fancy_editors:
|
||||
|
||||
if i.name == persistent.editor:
|
||||
if i.installed and i.name in editors:
|
||||
ei = editors[i.name]
|
||||
os.environ["RENPY_EDIT_PY"] = renpy.fsencode(os.path.abspath(ei.filename))
|
||||
error_message = i.error_message
|
||||
break
|
||||
|
||||
else:
|
||||
persistent.editor = None
|
||||
os.environ.pop("RENPY_EDIT_PY", None)
|
||||
|
||||
renpy.editor.init()
|
||||
|
||||
def fancy_select_editor(name):
|
||||
"""
|
||||
Selects the editor with the given name, installing it if it
|
||||
doesn't already exist.
|
||||
"""
|
||||
|
||||
for fe in fancy_editors:
|
||||
if fe.name == name:
|
||||
break
|
||||
else:
|
||||
return
|
||||
|
||||
if not fe.installed:
|
||||
|
||||
# We don't check the status of this because fancy_activate_editor
|
||||
# will fail if the editor is not installed.
|
||||
store.add_dlc(fe.dlc)
|
||||
|
||||
persistent.editor = fe.name
|
||||
fancy_activate_editor()
|
||||
|
||||
return persistent.editor is not None
|
||||
|
||||
# Call fancy_activate_editor on startup.
|
||||
fancy_activate_editor(True)
|
||||
|
||||
class SelectEditor(Action):
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
def get_selected(self):
|
||||
return persistent.editor == self.name
|
||||
|
||||
def __call__(self):
|
||||
return fancy_select_editor(self.name)
|
||||
|
||||
|
||||
def check_editor():
|
||||
"""
|
||||
Checks to see if an editor is set. If one isn't asks the user to
|
||||
select one.
|
||||
|
||||
Returns True if the editor is set and editing can proceed, and
|
||||
False otherwise.
|
||||
"""
|
||||
|
||||
if not set_editor:
|
||||
return True
|
||||
|
||||
if persistent.editor:
|
||||
return True
|
||||
|
||||
return renpy.invoke_in_new_context(renpy.call_screen, "editor")
|
||||
|
||||
##########################################################################
|
||||
# Editing actions.
|
||||
|
||||
|
||||
class Edit(Action):
|
||||
def __init__(self, filename, line=None, check=False):
|
||||
"""
|
||||
An action that opens the given line of the given file in a
|
||||
text editor.
|
||||
|
||||
`filename`
|
||||
The filename to open.
|
||||
|
||||
`line`
|
||||
The line in the file to jump to.
|
||||
|
||||
`check`
|
||||
If true, we will check to see if the file exists, and gray
|
||||
out the box if it does not.
|
||||
"""
|
||||
|
||||
self.filename = filename
|
||||
self.line = line
|
||||
self.check = check
|
||||
|
||||
def get_sensitive(self):
|
||||
if not self.check:
|
||||
return True
|
||||
|
||||
fn = project.current.unelide_filename(self.filename)
|
||||
return os.path.exists(fn)
|
||||
|
||||
def __call__(self):
|
||||
|
||||
if not self.get_sensitive():
|
||||
return
|
||||
|
||||
if not check_editor():
|
||||
return
|
||||
|
||||
fn = project.current.unelide_filename(self.filename)
|
||||
|
||||
try:
|
||||
|
||||
e = renpy.editor.editor
|
||||
|
||||
e.begin()
|
||||
e.open(fn, line=self.line)
|
||||
e.end()
|
||||
|
||||
except Exception, e:
|
||||
exception = traceback.format_exception_only(type(e), e)[-1][:-1]
|
||||
renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
|
||||
|
||||
class EditAbsolute(Action):
|
||||
def __init__(self, filename, line=None, check=False):
|
||||
"""
|
||||
An action that lets us edit an absolutely-specified filename.
|
||||
|
||||
`filename`
|
||||
The filename to open.
|
||||
|
||||
`line`
|
||||
The line in the file to jump to.
|
||||
|
||||
`check`
|
||||
If true, we will check to see if the file exists, and gray
|
||||
out the box if it does not.
|
||||
"""
|
||||
|
||||
self.filename = filename
|
||||
self.line = line
|
||||
self.check = check
|
||||
|
||||
def get_sensitive(self):
|
||||
if not self.check:
|
||||
return True
|
||||
|
||||
return os.path.exists(self.filename)
|
||||
|
||||
def __call__(self):
|
||||
|
||||
if not self.get_sensitive():
|
||||
return
|
||||
|
||||
if not check_editor():
|
||||
return
|
||||
|
||||
try:
|
||||
|
||||
e = renpy.editor.editor
|
||||
|
||||
e.begin()
|
||||
e.open(self.filename, line=self.line)
|
||||
e.end()
|
||||
|
||||
except Exception, e:
|
||||
exception = traceback.format_exception_only(type(e), e)[-1][:-1]
|
||||
renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
|
||||
|
||||
|
||||
class EditAll(Action):
|
||||
"""
|
||||
Opens all scripts that are part of the current project in a web browser.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
return
|
||||
|
||||
def __call__(self):
|
||||
|
||||
if not check_editor():
|
||||
return
|
||||
|
||||
scripts = project.current.script_files()
|
||||
scripts = [ i for i in scripts if not i.startswith("game/tl/") ]
|
||||
scripts.sort(key=lambda fn : fn.lower())
|
||||
|
||||
for fn in [ "game/screens.rpy", "game/options.rpy", "game/script.rpy" ]:
|
||||
if fn in scripts:
|
||||
scripts.remove(fn)
|
||||
scripts.insert(0, fn)
|
||||
|
||||
try:
|
||||
|
||||
e = renpy.editor.editor
|
||||
e.begin()
|
||||
|
||||
for fn in scripts:
|
||||
fn = project.current.unelide_filename(fn)
|
||||
e.open(fn)
|
||||
|
||||
e.end()
|
||||
|
||||
except Exception, e:
|
||||
exception = traceback.format_exception_only(type(e), e)[-1][:-1]
|
||||
renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
|
||||
|
||||
screen editor:
|
||||
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_root"
|
||||
|
||||
window:
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Select Editor")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
hbox:
|
||||
frame:
|
||||
style "l_indent"
|
||||
xfill True
|
||||
|
||||
viewport:
|
||||
scrollbars "vertical"
|
||||
mousewheel True
|
||||
|
||||
has vbox
|
||||
|
||||
text _("A text editor is the program you'll use to edit Ren'Py script files. Here, you can select the editor Ren'Py will use. If not already present, the editor will be automatically downloaded and installed.") style "l_small_text"
|
||||
|
||||
for fe in editor.fancy_editors:
|
||||
|
||||
add SPACER
|
||||
|
||||
textbutton fe.name action editor.SelectEditor(fe.name)
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
has vbox
|
||||
|
||||
if fe.description:
|
||||
text fe.description style "l_small_text"
|
||||
|
||||
if not fe.installed:
|
||||
add HALF_SPACER
|
||||
text fe.dldescription style "l_small_text"
|
||||
|
||||
|
||||
textbutton _("Cancel") action Return(False) style "l_left_button"
|
||||
|
||||
label editor_preference:
|
||||
call screen editor
|
||||
jump preferences
|
||||
@@ -0,0 +1,274 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
define PROJECT_ADJUSTMENT = ui.adjustment()
|
||||
|
||||
init python:
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
class OpenDirectory(Action):
|
||||
"""
|
||||
Opens `directory` in a file browser. `directory` is relative to
|
||||
the project root.
|
||||
"""
|
||||
|
||||
def __init__(self, directory, absolute=False):
|
||||
if absolute:
|
||||
self.directory = directory
|
||||
else:
|
||||
self.directory = os.path.join(project.current.path, directory)
|
||||
|
||||
def get_sensitive(self):
|
||||
return os.path.exists(self.directory)
|
||||
|
||||
def __call__(self):
|
||||
|
||||
try:
|
||||
directory = renpy.fsencode(self.directory)
|
||||
|
||||
if renpy.windows:
|
||||
os.startfile(directory)
|
||||
elif renpy.macintosh:
|
||||
subprocess.Popen([ "open", directory ])
|
||||
else:
|
||||
subprocess.Popen([ "xdg-open", directory ])
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
# Used for testing.
|
||||
def Relaunch():
|
||||
renpy.quit(relaunch=True)
|
||||
|
||||
screen front_page:
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_root"
|
||||
|
||||
has hbox
|
||||
|
||||
# Projects list section - on left.
|
||||
|
||||
frame:
|
||||
style "l_projects"
|
||||
xmaximum 300
|
||||
right_margin 2
|
||||
|
||||
top_padding 20
|
||||
bottom_padding 26
|
||||
|
||||
side "t c b":
|
||||
|
||||
window style "l_label":
|
||||
|
||||
has hbox:
|
||||
xfill True
|
||||
|
||||
text "PROJECTS:" style "l_label_text" size 36 yoffset 10
|
||||
|
||||
textbutton _("refresh"):
|
||||
xalign 1.0
|
||||
yalign 1.0
|
||||
yoffset 5
|
||||
style "l_small_button"
|
||||
action project.Rescan()
|
||||
right_margin HALF_INDENT
|
||||
|
||||
side "c r":
|
||||
|
||||
viewport:
|
||||
yadjustment PROJECT_ADJUSTMENT
|
||||
mousewheel True
|
||||
use front_page_project_list
|
||||
|
||||
vbar:
|
||||
style "l_vscrollbar"
|
||||
adjustment PROJECT_ADJUSTMENT
|
||||
|
||||
vbox:
|
||||
add HALF_SPACER
|
||||
add SEPARATOR
|
||||
add HALF_SPACER
|
||||
|
||||
hbox:
|
||||
xfill True
|
||||
|
||||
textbutton _("+ Create New Project"):
|
||||
left_margin (HALF_INDENT)
|
||||
action Jump("new_project")
|
||||
|
||||
|
||||
|
||||
# Project section - on right.
|
||||
|
||||
if project.current is not None:
|
||||
use front_page_project
|
||||
|
||||
if project.current is not None:
|
||||
textbutton _("Launch Project") action project.Launch() style "l_right_button"
|
||||
|
||||
|
||||
|
||||
# This is used by front_page to display the list of known projects on the screen.
|
||||
screen front_page_project_list:
|
||||
|
||||
$ projects = project.manager.projects
|
||||
$ templates = project.manager.templates
|
||||
|
||||
vbox:
|
||||
|
||||
if templates and persistent.show_templates:
|
||||
|
||||
for p in templates:
|
||||
|
||||
textbutton _("[p.name!q] (template)"):
|
||||
action project.Select(p)
|
||||
style "l_list"
|
||||
|
||||
null height 12
|
||||
|
||||
if projects:
|
||||
|
||||
for p in projects:
|
||||
|
||||
textbutton "[p.name!q]":
|
||||
action project.Select(p)
|
||||
style "l_list"
|
||||
|
||||
null height 12
|
||||
|
||||
textbutton _("Tutorial") action project.Select("tutorial") style "l_list"
|
||||
textbutton _("The Question") action project.Select("the_question") style "l_list"
|
||||
|
||||
|
||||
# This is used for the right side of the screen, which is where the project-specific
|
||||
# buttons are.
|
||||
screen front_page_project:
|
||||
|
||||
$ p = project.current
|
||||
|
||||
window:
|
||||
|
||||
has vbox
|
||||
|
||||
frame style "l_label":
|
||||
has hbox xfill True
|
||||
text "[p.name!q]" style "l_label_text"
|
||||
label _("Active Project") style "l_alternate"
|
||||
|
||||
grid 2 1:
|
||||
xfill True
|
||||
spacing HALF_INDENT
|
||||
|
||||
vbox:
|
||||
|
||||
label _("Open Directory") style "l_label_small"
|
||||
|
||||
frame style "l_indent":
|
||||
has vbox
|
||||
|
||||
textbutton _("game") action OpenDirectory("game")
|
||||
textbutton _("base") action OpenDirectory(".")
|
||||
# textbutton _("images") action OpenDirectory("game/images") style "l_list"
|
||||
# textbutton _("save") action None style "l_list"
|
||||
|
||||
vbox:
|
||||
|
||||
label _("Edit File") style "l_label_small"
|
||||
|
||||
frame style "l_indent":
|
||||
has vbox
|
||||
|
||||
textbutton "script.rpy" action editor.Edit("game/script.rpy", check=True)
|
||||
textbutton "options.rpy" action editor.Edit("game/options.rpy", check=True)
|
||||
textbutton "screens.rpy" action editor.Edit("game/screens.rpy", check=True)
|
||||
textbutton _("All script files") action editor.EditAll()
|
||||
|
||||
add SPACER
|
||||
add SEPARATOR
|
||||
add SPACER
|
||||
|
||||
frame style "l_indent":
|
||||
has vbox
|
||||
|
||||
textbutton _("Navigate Script") text_size 30 action Jump("navigation")
|
||||
|
||||
add SPACER
|
||||
|
||||
grid 2 1:
|
||||
xfill True
|
||||
spacing HALF_INDENT
|
||||
|
||||
frame style "l_indent":
|
||||
has vbox
|
||||
|
||||
textbutton _("Check Script (Lint)") action Jump("lint")
|
||||
textbutton _("Change Theme") action Jump("choose_theme")
|
||||
textbutton _("Delete Persistent") action Jump("rmpersistent")
|
||||
|
||||
# textbutton "Relaunch" action Relaunch
|
||||
|
||||
frame style "l_indent":
|
||||
has vbox
|
||||
|
||||
if ability.can_distribute:
|
||||
textbutton _("Build Distributions") action Jump("build_distributions")
|
||||
|
||||
textbutton _("Android") action Jump("android")
|
||||
textbutton _("Generate Translations") action Jump("translate")
|
||||
textbutton _("Extract Dialogue") action Jump("extract_dialogue")
|
||||
|
||||
label main_menu:
|
||||
return
|
||||
|
||||
label start:
|
||||
show screen bottom_info
|
||||
|
||||
label front_page:
|
||||
call screen front_page
|
||||
jump front_page
|
||||
|
||||
|
||||
label lint:
|
||||
python hide:
|
||||
|
||||
interface.processing(_("Checking script for potential problems..."))
|
||||
lint_fn = project.current.temp_filename("lint.txt")
|
||||
|
||||
project.current.launch([ 'lint', lint_fn ], wait=True)
|
||||
|
||||
e = renpy.editor.editor
|
||||
e.begin(True)
|
||||
e.open(lint_fn)
|
||||
e.end()
|
||||
|
||||
jump front_page
|
||||
|
||||
label rmpersistent:
|
||||
|
||||
python hide:
|
||||
interface.processing(_("Deleting persistent data..."))
|
||||
project.current.launch([ 'rmpersistent' ], wait=True)
|
||||
|
||||
jump front_page
|
||||
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 687 B |
|
After Width: | Height: | Size: 96 B |
|
After Width: | Height: | Size: 106 B |
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,481 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
################################################################################
|
||||
# Interface actions.
|
||||
init python in interface:
|
||||
from store import OpenURL, config, Return
|
||||
import store
|
||||
|
||||
import os.path
|
||||
import contextlib
|
||||
|
||||
RENPY_URL = "http://www.renpy.org"
|
||||
RENPY_GAMES_URL = "http://games.renpy.org"
|
||||
DOC_PATH = os.path.join(config.renpy_base, "doc/index.html")
|
||||
DOC_URL = "http://www.renpy.org/doc/html/"
|
||||
|
||||
LICENSE_PATH = os.path.join(config.renpy_base, "doc/license.html")
|
||||
LICENSE_URL = "http://www.renpy.org/doc/html/license.html"
|
||||
|
||||
if os.path.exists(DOC_PATH):
|
||||
DOC_LOCAL_URL = "file:///" + DOC_PATH
|
||||
else:
|
||||
DOC_LOCAL_URL = None
|
||||
|
||||
if os.path.exists(LICENSE_PATH):
|
||||
LICENSE_LOCAL_URL = "file:///" + LICENSE_PATH
|
||||
else:
|
||||
LICENSE_LOCAL_URL = None
|
||||
|
||||
def OpenDocumentation():
|
||||
"""
|
||||
An action that opens the documentation.
|
||||
"""
|
||||
|
||||
if DOC_LOCAL_URL is not None:
|
||||
return OpenURL(DOC_LOCAL_URL)
|
||||
else:
|
||||
return OpenURL(DOC_URL)
|
||||
|
||||
def OpenLicense():
|
||||
"""
|
||||
An action that opens the license.
|
||||
"""
|
||||
|
||||
if LICENSE_LOCAL_URL is not None:
|
||||
return OpenURL(LICENSE_LOCAL_URL)
|
||||
else:
|
||||
return OpenURL(LICENSE_URL)
|
||||
|
||||
|
||||
# Should we display the bottom links?
|
||||
links = True
|
||||
|
||||
@contextlib.contextmanager
|
||||
def nolinks():
|
||||
global links
|
||||
links = False
|
||||
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
links = True
|
||||
|
||||
# This displays the bottom of the screen. If the tooltip is not None, this displays the
|
||||
# tooltip. Otherwise, it displays a list of links (to various websites, and to the
|
||||
# preferences and update screen), or is just blank.
|
||||
screen bottom_info:
|
||||
|
||||
zorder 100
|
||||
|
||||
if interface.links:
|
||||
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_default"
|
||||
|
||||
left_margin (10 + INDENT)
|
||||
right_margin (10 + INDENT)
|
||||
xfill True
|
||||
ypos 536
|
||||
yanchor 0.0
|
||||
|
||||
hbox:
|
||||
xfill True
|
||||
|
||||
hbox:
|
||||
spacing INDENT
|
||||
textbutton _("Documentation") style "l_link" action interface.OpenDocumentation()
|
||||
textbutton _("Ren'Py Website") style "l_link" action OpenURL(interface.RENPY_URL)
|
||||
textbutton _("Ren'Py Games List") style "l_link" action OpenURL(interface.RENPY_GAMES_URL)
|
||||
textbutton _("About") style "l_link" action Jump("about")
|
||||
|
||||
hbox:
|
||||
spacing INDENT
|
||||
xalign 1.0
|
||||
|
||||
if ability.can_update:
|
||||
textbutton _("update") action Jump("update") style "l_link"
|
||||
|
||||
textbutton _("preferences") style "l_link" action Jump("preferences")
|
||||
textbutton _("quit") style "l_link" action Quit(confirm=False)
|
||||
|
||||
|
||||
screen common:
|
||||
|
||||
default complete = None
|
||||
default total = None
|
||||
default yes = None
|
||||
default no = None
|
||||
default choices = None
|
||||
default cancel = None
|
||||
default bar_value = None
|
||||
|
||||
frame:
|
||||
style "l_root"
|
||||
|
||||
frame:
|
||||
style_group "l_info"
|
||||
|
||||
has vbox
|
||||
|
||||
text message:
|
||||
text_align 0.5
|
||||
xalign 0.5
|
||||
layout "subtitle"
|
||||
|
||||
if complete is not None:
|
||||
add SPACER
|
||||
|
||||
frame:
|
||||
style "l_progress_frame"
|
||||
|
||||
bar:
|
||||
range total
|
||||
value complete
|
||||
style "l_progress_bar"
|
||||
|
||||
if bar_value is not None:
|
||||
add SPACER
|
||||
|
||||
frame:
|
||||
style "l_progress_frame"
|
||||
|
||||
bar:
|
||||
value bar_value
|
||||
style "l_progress_bar"
|
||||
|
||||
|
||||
if choices:
|
||||
add SPACER
|
||||
|
||||
for v, l in choices:
|
||||
textbutton l action SetScreenVariable("selected", v)
|
||||
|
||||
if selected is not None:
|
||||
$ continue_ = Return(selected)
|
||||
else:
|
||||
$ continue_ = None
|
||||
|
||||
if submessage:
|
||||
add SPACER
|
||||
|
||||
text submessage:
|
||||
text_align 0.5
|
||||
xalign 0.5
|
||||
layout "subtitle"
|
||||
|
||||
if yes:
|
||||
add SPACER
|
||||
|
||||
hbox:
|
||||
xalign 0.5
|
||||
textbutton _("Yes") style "l_button" action yes
|
||||
null width 160
|
||||
textbutton _("No") style "l_button" action no
|
||||
|
||||
|
||||
label title text_color title_color style "l_info_label"
|
||||
|
||||
if back:
|
||||
textbutton _("Back") action back style "l_left_button"
|
||||
elif cancel:
|
||||
textbutton _("Cancel") action cancel style "l_left_button"
|
||||
|
||||
if continue_:
|
||||
textbutton _("Continue") action continue_ style "l_right_button"
|
||||
|
||||
|
||||
screen launcher_input:
|
||||
|
||||
frame:
|
||||
style "l_root"
|
||||
|
||||
frame:
|
||||
style_group "l_info"
|
||||
|
||||
has vbox
|
||||
|
||||
text message:
|
||||
text_align 0.5
|
||||
xalign 0.5
|
||||
layout "subtitle"
|
||||
|
||||
add SPACER
|
||||
|
||||
input style "l_default" size 24 xalign 0.5 default default color INPUT_COLOR
|
||||
|
||||
if filename:
|
||||
add SPACER
|
||||
text _("Due to package format limitations, non-ASCII file and directory names are not allowed.")
|
||||
|
||||
label title style "l_info_label" text_color QUESTION_COLOR
|
||||
|
||||
if cancel:
|
||||
textbutton _("Cancel") action cancel style "l_left_button"
|
||||
|
||||
init python in interface:
|
||||
|
||||
import traceback
|
||||
from store import Jump
|
||||
|
||||
def common(title, title_color, message, submessage=None, back=None, continue_=None, pause0=False, show_screen=False, **kwargs):
|
||||
"""
|
||||
Displays the info, interaction, and processing screens.
|
||||
|
||||
`title`
|
||||
The title of the screen.
|
||||
|
||||
`message`
|
||||
The main message that is displayed when the screen is.
|
||||
|
||||
`submessage`
|
||||
If not None, a message that is displayed below the main message.
|
||||
|
||||
`back`
|
||||
If not None, a back button will be present. `back` is the action that
|
||||
is called when the button is clicked.
|
||||
|
||||
`cancel`
|
||||
If not None, a cancel button will be present. `cancel` is the action
|
||||
that is called when the button is clicked.
|
||||
|
||||
`continue_`
|
||||
If True, a continue button will be present. `continue_` gives the action
|
||||
that is called when that button is clicked.
|
||||
|
||||
`pause0`
|
||||
If True, a zero-length pause will be inserted before calling the
|
||||
screen. This will display it to the user and then immediately
|
||||
return.
|
||||
|
||||
`show_screen`
|
||||
If True, the screen will be show, and will return immediately. if False,
|
||||
the screen will be called, and interaction will pause.
|
||||
|
||||
Other keyword arguments are passed to the screen itself.
|
||||
"""
|
||||
|
||||
|
||||
if show_screen:
|
||||
screen_func = renpy.show_screen
|
||||
else:
|
||||
screen_func = renpy.call_screen
|
||||
|
||||
if pause0:
|
||||
ui.pausebehavior(0)
|
||||
|
||||
return screen_func("common", title=title, title_color=title_color, message=message, submessage=submessage, back=back, continue_=continue_, **kwargs)
|
||||
|
||||
def hide_screen():
|
||||
"""
|
||||
Hides a screen that was shown with show_screen=True.
|
||||
"""
|
||||
|
||||
renpy.hide_screen("common")
|
||||
|
||||
|
||||
def error(message, submessage=None, label="front_page", **kwargs):
|
||||
"""
|
||||
Indicates to the user that an error has occured.
|
||||
|
||||
`message`
|
||||
The message to display.
|
||||
|
||||
`submessage`
|
||||
Optional secondary message information. For example, this may be
|
||||
used to display an exception string.
|
||||
|
||||
`label`
|
||||
The label to redirect to when the user finishes displaying the error. None
|
||||
to just return False.
|
||||
|
||||
Keyword arguments are passed into the screen so that they can be substituted into
|
||||
the message.
|
||||
"""
|
||||
|
||||
if label is None:
|
||||
action = Return(False)
|
||||
else:
|
||||
action = Jump(label)
|
||||
|
||||
common(_("ERROR"), store.ERROR_COLOR, message=message, submessage=submessage, back=action, **kwargs)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def error_handling(what, label="front_page"):
|
||||
"""
|
||||
This is a context manager that catches exceptions and displays them using
|
||||
interface.error.
|
||||
|
||||
`what`
|
||||
What we're doing when the error occurs. This is usually written using
|
||||
the present participle.
|
||||
|
||||
`label`
|
||||
The label to jump to when error handling finishes.
|
||||
|
||||
As an example of usage::
|
||||
|
||||
with interface.error_handling("opening the log file"):
|
||||
f = open("log.txt", "w")
|
||||
"""
|
||||
|
||||
|
||||
try:
|
||||
yield
|
||||
except Exception, e:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
error(_("While [what!q], an error occured:"),
|
||||
_("[exception!q]"),
|
||||
what=what,
|
||||
label=label,
|
||||
exception=traceback.format_exception_only(type(e), e)[-1][:-1])
|
||||
|
||||
def input(title, message, filename=False, sanitize=True, cancel=None, default=""):
|
||||
"""
|
||||
Requests typewritten input from the user.
|
||||
"""
|
||||
|
||||
rv = default
|
||||
|
||||
while True:
|
||||
|
||||
rv = renpy.call_screen("launcher_input", title=title, message=message, filename=filename, cancel=cancel, default=rv)
|
||||
|
||||
if sanitize:
|
||||
if ("[" in rv) or ("{" in rv):
|
||||
error(_("Text input may not contain the {{ or [[ characters."), label=None)
|
||||
continue
|
||||
|
||||
if filename:
|
||||
if filename and (filename != "withslash") and (("\\" in rv) or ("/" in rv)):
|
||||
error(_("File and directory names may not contain / or \\."), label=None)
|
||||
continue
|
||||
|
||||
try:
|
||||
rv.encode("ascii")
|
||||
except:
|
||||
error(_("File and directory names must consist of ASCII characters."), label=None)
|
||||
continue
|
||||
|
||||
return rv
|
||||
|
||||
def info(message, submessage=None, pause=True, **kwargs):
|
||||
"""
|
||||
Displays an informational message to the user. The user will be asked to click to
|
||||
confirm that he has read the message.
|
||||
|
||||
`message`
|
||||
The message to display.
|
||||
|
||||
`pause`
|
||||
True if we should pause while showing the info.
|
||||
|
||||
Keyword arguments are passed into the screen so that they can be substituted into
|
||||
the message.
|
||||
"""
|
||||
|
||||
if pause:
|
||||
common(_("INFORMATION"), store.INFO_COLOR, message, submessage, continue_=Return(True), **kwargs)
|
||||
else:
|
||||
common(_("INFORMATION"), store.INFO_COLOR, message, submessage, pause0=True, **kwargs)
|
||||
|
||||
|
||||
def interaction(title, message, submessage=None, pause=0, **kwargs):
|
||||
"""
|
||||
Put up on the screen while an interaction with an external program occurs.
|
||||
This shows the message, then immediately returns.
|
||||
|
||||
`title`
|
||||
The title of the interaction.
|
||||
|
||||
`message`
|
||||
The message itself.
|
||||
|
||||
`submessage`
|
||||
An optional sub message.
|
||||
|
||||
`pause`
|
||||
The amount of time to pause for after showing the message.
|
||||
"""
|
||||
|
||||
common(title, store.INTERACTION_COLOR, message, submessage=None, pause=pause, show_screen=True, **kwargs)
|
||||
renpy.pause(pause)
|
||||
|
||||
def processing(message, submessage=None, complete=None, total=None, **kwargs):
|
||||
"""
|
||||
Indicates to the user that processing is taking place. This should be used when
|
||||
there is an indefinite amount of work to be done.
|
||||
|
||||
`message`
|
||||
The message to display.
|
||||
|
||||
`submessage`
|
||||
An additional message to display.
|
||||
|
||||
`complete`
|
||||
The fraction complete the step is.
|
||||
|
||||
`total`
|
||||
The total amount of work to do in this step.
|
||||
|
||||
Keyword arguments are passed into the screen so that they can be substituted into
|
||||
the message.
|
||||
"""
|
||||
|
||||
common(_("PROCESSING"), store.INTERACTION_COLOR, message, submessage, pause0=True, complete=complete, total=total, **kwargs)
|
||||
|
||||
|
||||
def yesno(message, yes=Return(True), no=Return(False), **kwargs):
|
||||
"""
|
||||
Asks the user a yes or no question.
|
||||
|
||||
`message`
|
||||
The question to ask.
|
||||
|
||||
`yes`
|
||||
The action to perform if the user answers yes.
|
||||
|
||||
`no`
|
||||
The action to perform if the user answer no.
|
||||
"""
|
||||
|
||||
return common(_("QUESTION"), store.QUESTION_COLOR, message, yes=yes, no=no, **kwargs)
|
||||
|
||||
def choice(message, choices, selected, **kwargs):
|
||||
"""
|
||||
Asks the user to pick a choice from a menu.
|
||||
|
||||
`choices`
|
||||
A list of (value, label) tuples, giving the choices.
|
||||
|
||||
`selected`
|
||||
The default choice that we mark as selected.
|
||||
"""
|
||||
|
||||
return common(_("CHOICE"), store.QUESTION_COLOR, message, choices=choices, selected=selected, **kwargs)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init python in navigation:
|
||||
import store.interface as interface
|
||||
import store.project as project
|
||||
import store.editor as editor
|
||||
from store import persistent, Action
|
||||
|
||||
|
||||
# The last navigation screen we've seen. This is the scree we try to go
|
||||
# to the next time we enter navigation. (We may not be able to go there,
|
||||
# if the screen is empty.)
|
||||
if persistent.navigation is None:
|
||||
persistent.navigation = "label"
|
||||
|
||||
# A map from a kind of information, to how we should sort it. Possible
|
||||
# sorts are alphabetical, by-file, natural.
|
||||
if persistent.navigation_sort is None:
|
||||
persistent.navigation_sort = { }
|
||||
|
||||
if persistent.navigate_private is None:
|
||||
persistent.navigate_private = False
|
||||
|
||||
if persistent.navigate_library is None:
|
||||
persistent.navigate_library = False
|
||||
|
||||
# A list of kinds of navigation we support.
|
||||
KINDS = [ "file", "label", "define", "transform", "screen", "callable", "todo" ]
|
||||
|
||||
# A map from kind name to adjustment.
|
||||
adjustments = { }
|
||||
|
||||
for i in KINDS:
|
||||
persistent.navigation_sort.setdefault(i, "by-file")
|
||||
adjustments[i] = ui.adjustment()
|
||||
|
||||
def group_and_sort(kind):
|
||||
"""
|
||||
This is responsible for pulling navigation information of the
|
||||
appropriate kind out of project.current.dump, grouping it,
|
||||
and sorting it.
|
||||
|
||||
This returns a list of (group, list of (name, filename, line)). The
|
||||
group may be a string or None.
|
||||
"""
|
||||
|
||||
project.current.update_dump()
|
||||
|
||||
sort = persistent.navigation_sort[kind]
|
||||
|
||||
name_map = project.current.dump.get("location", {}).get(kind, { })
|
||||
|
||||
groups = { }
|
||||
|
||||
for name, loc in name_map.items():
|
||||
filename, line = loc
|
||||
filename = filename.replace("\\", "/")
|
||||
|
||||
if sort == "alphabetical":
|
||||
group = None
|
||||
else:
|
||||
group = filename
|
||||
if group.startswith("game/"):
|
||||
group = group[5:]
|
||||
|
||||
g = groups.get(group, None)
|
||||
if g is None:
|
||||
groups[group] = g = [ ]
|
||||
|
||||
g.append((name, filename, line))
|
||||
|
||||
for g in groups.values():
|
||||
if sort == "natural":
|
||||
g.sort(key=lambda a : a[2])
|
||||
else:
|
||||
g.sort(key=lambda a : a[0].lower())
|
||||
|
||||
rv = list(groups.items())
|
||||
rv.sort()
|
||||
|
||||
return rv
|
||||
|
||||
def group_and_sort_files():
|
||||
|
||||
rv = [ ]
|
||||
|
||||
for fn in project.current.script_files():
|
||||
shortfn = fn
|
||||
shortfn = shortfn.replace("\\", "/")
|
||||
|
||||
if shortfn.startswith("game/"):
|
||||
shortfn = fn[5:]
|
||||
|
||||
rv.append((shortfn, fn, None))
|
||||
|
||||
rv.sort()
|
||||
|
||||
return [ (None, rv) ]
|
||||
|
||||
class ChangeKind(Action):
|
||||
"""
|
||||
Changes the kind of thing we're navigating over.
|
||||
"""
|
||||
|
||||
def __init__(self, kind):
|
||||
self.kind = kind
|
||||
|
||||
def get_selected(self):
|
||||
return persistent.navigation == self.kind
|
||||
|
||||
def __call__(self):
|
||||
if persistent.navigation == self.kind:
|
||||
return
|
||||
|
||||
persistent.navigation = self.kind
|
||||
renpy.jump("navigation_loop")
|
||||
|
||||
class ChangeSort(Action):
|
||||
"""
|
||||
Changes the sort order.
|
||||
"""
|
||||
|
||||
def __init__(self, sort):
|
||||
self.sort = sort
|
||||
|
||||
def get_selected(self):
|
||||
return persistent.navigation_sort[persistent.navigation] == self.sort
|
||||
|
||||
def __call__(self):
|
||||
if self.get_selected():
|
||||
return
|
||||
|
||||
persistent.navigation_sort[persistent.navigation] = self.sort
|
||||
renpy.jump("navigation_loop")
|
||||
|
||||
|
||||
screen navigation:
|
||||
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_root"
|
||||
|
||||
window:
|
||||
|
||||
has vbox
|
||||
|
||||
frame style "l_label":
|
||||
has hbox xfill True
|
||||
text _("Navigate: [project.current.name]") style "l_label_text"
|
||||
|
||||
frame:
|
||||
style "l_alternate"
|
||||
style_group "l_small"
|
||||
|
||||
has hbox
|
||||
|
||||
if persistent.navigation != "file":
|
||||
text _("Order: ")
|
||||
textbutton _("alphabetical") action navigation.ChangeSort("alphabetical")
|
||||
text " | "
|
||||
textbutton _("by-file") action navigation.ChangeSort("by-file")
|
||||
text " | "
|
||||
textbutton _("natural") action navigation.ChangeSort("natural")
|
||||
|
||||
null width HALF_INDENT
|
||||
|
||||
textbutton _("refresh") action Jump("navigation_refresh")
|
||||
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
frame style "l_indent":
|
||||
hbox:
|
||||
spacing HALF_INDENT
|
||||
text _("Category:")
|
||||
|
||||
textbutton _("files") action navigation.ChangeKind("file")
|
||||
textbutton _("labels") action navigation.ChangeKind("label")
|
||||
textbutton _("defines") action navigation.ChangeKind("define")
|
||||
textbutton _("transforms") action navigation.ChangeKind("transform")
|
||||
textbutton _("screens") action navigation.ChangeKind("screen")
|
||||
textbutton _("callables") action navigation.ChangeKind("callable")
|
||||
textbutton _("TODOs") action navigation.ChangeKind("todo")
|
||||
|
||||
add SPACER
|
||||
add SEPARATOR
|
||||
|
||||
frame style "l_indent_margin":
|
||||
|
||||
if groups:
|
||||
|
||||
viewport:
|
||||
mousewheel True
|
||||
scrollbars "vertical"
|
||||
yadjustment navigation.adjustments[persistent.navigation]
|
||||
|
||||
vbox:
|
||||
style_group "l_navigation"
|
||||
|
||||
for group_name, group in groups:
|
||||
|
||||
if group_name is not None:
|
||||
text "[group_name!q]"
|
||||
|
||||
if persistent.navigation == "todo":
|
||||
vbox:
|
||||
for name, filename, line in group:
|
||||
textbutton "[name!q]" action editor.Edit(filename, line)
|
||||
|
||||
else:
|
||||
hbox:
|
||||
box_wrap True
|
||||
|
||||
for name, filename, line in group:
|
||||
textbutton "[name!q]" action editor.Edit(filename, line)
|
||||
|
||||
if group_name is not None:
|
||||
add SPACER
|
||||
|
||||
if persistent.navigation == "file":
|
||||
add SPACER
|
||||
textbutton _("+ Add script file") action Jump("add_file") style "l_button"
|
||||
|
||||
else:
|
||||
|
||||
fixed:
|
||||
|
||||
if persistent.navigation == "todo":
|
||||
|
||||
text _("No TODO comments found.\n\nTo create one, include \"# TODO\" in your script."):
|
||||
text_align 0.5
|
||||
xalign 0.5
|
||||
yalign 0.5
|
||||
|
||||
else:
|
||||
|
||||
text _("The list of names is empty."):
|
||||
xalign 0.5
|
||||
yalign 0.5
|
||||
|
||||
textbutton _("Back") action Jump("front_page") style "l_left_button"
|
||||
textbutton _("Launch Project") action project.Launch() style "l_right_button"
|
||||
|
||||
label navigation:
|
||||
label navigation_loop:
|
||||
|
||||
python in navigation:
|
||||
|
||||
kind = persistent.navigation
|
||||
|
||||
if kind == "file":
|
||||
groups = group_and_sort_files()
|
||||
else:
|
||||
groups = group_and_sort(kind)
|
||||
|
||||
renpy.call_screen("navigation", groups=groups)
|
||||
|
||||
label navigation_refresh:
|
||||
$ project.current.update_dump(True)
|
||||
jump navigation_loop
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init python:
|
||||
import shutil
|
||||
import os
|
||||
import time
|
||||
import re
|
||||
|
||||
screen select_template:
|
||||
|
||||
default result = project.manager.get("english")
|
||||
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_root"
|
||||
|
||||
window:
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Choose Project Template")
|
||||
|
||||
hbox:
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
xmaximum ONETHIRD
|
||||
|
||||
viewport:
|
||||
scrollbars "vertical"
|
||||
vbox:
|
||||
for p in project.manager.templates:
|
||||
textbutton "[p.name!q]" action SetScreenVariable("result", p) style "l_list"
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
xmaximum TWOTHIRDS
|
||||
|
||||
text _("Please select a template to use for your new project. The template sets the default font and the user interface language. If your language is not supported, choose 'english'.")
|
||||
|
||||
|
||||
textbutton _("Back") action Jump("front_page") style "l_left_button"
|
||||
textbutton _("Continue") action Return(result) style "l_right_button"
|
||||
|
||||
|
||||
label new_project:
|
||||
|
||||
if persistent.projects_directory is None:
|
||||
call choose_projects_directory
|
||||
|
||||
python hide:
|
||||
|
||||
project_name = interface.input(
|
||||
_("PROJECT NAME"),
|
||||
_("Please enter the name of your project:"),
|
||||
filename=True,
|
||||
cancel=Jump("front_page"))
|
||||
|
||||
project_name = project_name.strip()
|
||||
if not project_name:
|
||||
interface.error(_("The project name may not be empty."))
|
||||
|
||||
project_dir = os.path.join(persistent.projects_directory, project_name)
|
||||
|
||||
if project.manager.get(project_name) is not None:
|
||||
interface.error(_("[project_name!q] already exists. Please choose a different project name."), project_name=project_name)
|
||||
|
||||
if os.path.exists(project_dir):
|
||||
interface.error(_("[project_dir!q] already exists. Please choose a different project name."), project_dir=project_dir)
|
||||
|
||||
if len(project.manager.templates) == 1:
|
||||
template = project.manager.templates[0]
|
||||
else:
|
||||
template = renpy.call_screen("select_template")
|
||||
|
||||
template_path = template.path
|
||||
|
||||
with interface.error_handling("creating a new project"):
|
||||
shutil.copytree(template_path, project_dir)
|
||||
|
||||
# Delete the tmp directory, if it exists.
|
||||
if os.path.isdir(os.path.join(project_dir, "tmp")):
|
||||
shutil.rmtree(os.path.join(project_dir, "tmp"))
|
||||
|
||||
# Delete project.json, which must exist.
|
||||
os.unlink(os.path.join(project_dir, "project.json"))
|
||||
|
||||
# Change the save directory in options.rpy
|
||||
fn = os.path.join(project_dir, "game/options.rpy")
|
||||
with open(fn, "rb") as f:
|
||||
options = f.read().decode("utf-8")
|
||||
|
||||
options = options.replace("PROJECT_NAME", project_name)
|
||||
options = options.replace("UNIQUE", str(int(time.time())))
|
||||
|
||||
with open(fn, "wb") as f:
|
||||
f.write(options.encode("utf-8"))
|
||||
|
||||
# Activate the project.
|
||||
with interface.error_handling("activating the new project"):
|
||||
project.manager.scan()
|
||||
project.Select(project.manager.get(project_name))()
|
||||
|
||||
call choose_theme_callable
|
||||
|
||||
jump front_page
|
||||
@@ -0,0 +1,343 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
## This file contains some of the options that can be changed to customize
|
||||
## your Ren'Py game. It only contains the most common options... there
|
||||
## is quite a bit more customization you can do.
|
||||
##
|
||||
## Lines beginning with two '#' marks are comments, and you shouldn't
|
||||
## uncomment them. Lines beginning with a single '#' mark are
|
||||
## commented-out code, and you may want to uncomment them when
|
||||
## appropriate.
|
||||
|
||||
init -1 python hide:
|
||||
|
||||
## Should we enable the use of developer tools? This should be
|
||||
## set to False before the game is released, so the user can't
|
||||
## cheat using developer tools.
|
||||
|
||||
config.developer = True
|
||||
|
||||
## These control the width and height of the screen.
|
||||
|
||||
config.screen_width = 800
|
||||
config.screen_height = 600
|
||||
|
||||
## This controls the title of the window, when Ren'Py is
|
||||
## running in a window.
|
||||
|
||||
config.window_title = u"Ren'Py Launcher"
|
||||
|
||||
# These control the name and version of the game, that are reported
|
||||
# with tracebacks and other debugging logs.
|
||||
config.name = "Ren'Py Launcher"
|
||||
config.version = renpy.version().split()[1]
|
||||
|
||||
#########################################
|
||||
# Themes
|
||||
|
||||
## We then want to call a theme function. themes.roundrect is
|
||||
## a theme that features the use of rounded rectangles. It's
|
||||
## the only theme we currently support.
|
||||
##
|
||||
## The theme function takes a number of parameters that can
|
||||
## customize the color scheme.
|
||||
|
||||
theme.roundrect(
|
||||
## Theme: Roundrect
|
||||
## Color scheme: Basic Blue
|
||||
|
||||
## The color of an idle widget face.
|
||||
widget = "#003c78",
|
||||
|
||||
## The color of a focused widget face.
|
||||
widget_hover = "#0050a0",
|
||||
|
||||
## The color of the text in a widget.
|
||||
widget_text = "#c8ffff",
|
||||
|
||||
## The color of the text in a selected widget. (For
|
||||
## example, the current value of a preference.)
|
||||
widget_selected = "#ffffc8",
|
||||
|
||||
## The color of a disabled widget face.
|
||||
disabled = "#404040",
|
||||
|
||||
## The color of disabled widget text.
|
||||
disabled_text = "#c8c8c8",
|
||||
|
||||
## The color of informational labels.
|
||||
label = "#ffffff",
|
||||
|
||||
## The color of a frame containing widgets.
|
||||
frame = "#6496c8",
|
||||
|
||||
## The background of the main menu. This can be a color
|
||||
## beginning with '#', or an image filename. The latter
|
||||
## should take up the full height and width of the screen.
|
||||
mm_root = "#dcebff",
|
||||
|
||||
## The background of the game menu. This can be a color
|
||||
## beginning with '#', or an image filename. The latter
|
||||
## should take up the full height and width of the screen.
|
||||
gm_root = "#dcebff",
|
||||
|
||||
## If this is True, the in-game window is rounded. If False,
|
||||
## the in-game window is square.
|
||||
rounded_window = False,
|
||||
|
||||
## And we're done with the theme. The theme will customize
|
||||
## various styles, so if we want to change them, we should
|
||||
## do so below.
|
||||
)
|
||||
|
||||
#########################################
|
||||
## Help.
|
||||
|
||||
## This lets you configure the help option on the Ren'Py menus.
|
||||
## It may be:
|
||||
## - A label in the script, in which case that label is called to
|
||||
## show help to the user.
|
||||
## - A file name relative to the base directory, which is opened in a
|
||||
## web browser.
|
||||
## - None, to disable help.
|
||||
config.help = "README.html"
|
||||
|
||||
#########################################
|
||||
## Transitions.
|
||||
|
||||
## Used when entering the game menu from the game.
|
||||
config.enter_transition = None
|
||||
|
||||
## Used when exiting the game menu to the game.
|
||||
config.exit_transition = None
|
||||
|
||||
## Used between screens of the game menu.
|
||||
config.intra_transition = None
|
||||
|
||||
## Used when entering the game menu from the main menu.
|
||||
config.main_game_transition = None
|
||||
|
||||
## Used when returning to the main menu from the game.
|
||||
config.game_main_transition = None
|
||||
|
||||
## Used when entering the main menu from the splashscreen.
|
||||
config.end_splash_transition = None
|
||||
|
||||
## Used when entering the main menu after the game has ended.
|
||||
config.end_game_transition = None
|
||||
|
||||
## Used when a game is loaded.
|
||||
config.after_load_transition = None
|
||||
|
||||
## Used when the window is shown.
|
||||
config.window_show_transition = None
|
||||
|
||||
## Used when the window is hidden.
|
||||
config.window_hide_transition = None
|
||||
|
||||
|
||||
#########################################
|
||||
## This is the name of the directory where the game's data is
|
||||
## stored. (It needs to be set early, before any other init code
|
||||
## is run, so the persistent information can be found by the init code.)
|
||||
python early:
|
||||
config.save_directory = "launcher-4"
|
||||
|
||||
init -1 python hide:
|
||||
#########################################
|
||||
## Default values of Preferences.
|
||||
|
||||
## Note: These options are only evaluated the first time a
|
||||
## game is run. To have them run a second time, delete
|
||||
## game/saves/persistent
|
||||
|
||||
## Should we start in fullscreen mode?
|
||||
|
||||
config.default_fullscreen = False
|
||||
|
||||
## The default text speed in characters per second. 0 is infinite.
|
||||
|
||||
config.default_text_cps = 0
|
||||
|
||||
#########################################
|
||||
## More customizations can go here.
|
||||
|
||||
config.sound = False
|
||||
config.quit_action = Quit(confirm=False)
|
||||
config.gl_resize = False
|
||||
config.window_icon = "images/logo.png"
|
||||
config.windows_icon = "images/logo32.png"
|
||||
config.has_autosave = False
|
||||
config.log_enable = False
|
||||
config.mouse_hide_time = 86400 * 366
|
||||
|
||||
_game_menu_screen = None
|
||||
|
||||
config.underlay = [
|
||||
renpy.Keymap(
|
||||
quit = renpy.quit_event,
|
||||
iconify = renpy.iconify,
|
||||
choose_renderer = renpy.curried_call_in_new_context("_choose_renderer"),
|
||||
),
|
||||
]
|
||||
|
||||
config.rollback_enabled = False
|
||||
|
||||
|
||||
## This section controls how to build Ren'Py. (Building the launcher is how
|
||||
## we build Ren'Py distributions.)
|
||||
init python:
|
||||
|
||||
## We're building Ren'Py tonight.
|
||||
build.renpy = True
|
||||
|
||||
## The version number that's supplied to the updater.
|
||||
build.version = "Ren'Py {}".format(config.version)
|
||||
|
||||
## The name that's used for directories and archive files. For example, if
|
||||
## this is 'mygame-1.0', the windows distribution will be in the
|
||||
## directory 'mygame-1.0-win', in the 'mygame-1.0-win.zip' file.
|
||||
|
||||
if 'RENPY_NIGHTLY' in os.environ:
|
||||
build.directory_name = os.environ['RENPY_NIGHTLY']
|
||||
else:
|
||||
build.directory_name = "renpy-" + config.version.rsplit('.', 1)[0]
|
||||
|
||||
## The name that's uses for executables - the program that users will run
|
||||
## to start the game. For example, if this is 'mygame', then on Windows,
|
||||
## users can click 'mygame.exe' to start the game.
|
||||
build.executable_name = "renpy"
|
||||
|
||||
## If True, Ren'Py will include update information into packages. This
|
||||
## allows the updater to run.
|
||||
build.include_update = True
|
||||
|
||||
## Clear out various file patterns.
|
||||
build.renpy_patterns = [ ]
|
||||
build.early_base_patterns = [ ]
|
||||
build.base_patterns = [ ]
|
||||
build.late_base_patterns = [ ]
|
||||
|
||||
# We don't need to clear out the executable patterns, since they're
|
||||
# correct for Ren'Py.
|
||||
|
||||
## Now, add the Ren'Py distribution in using classify_renpy.
|
||||
|
||||
build.classify_renpy("rapt/**", "rapt")
|
||||
|
||||
build.classify_renpy("**~", None)
|
||||
build.classify_renpy("**/#*", None)
|
||||
build.classify_renpy("**/thumbs.db", None)
|
||||
build.classify_renpy("**/.*", None)
|
||||
|
||||
build.classify_renpy("**.old", None)
|
||||
build.classify_renpy("**.new", None)
|
||||
build.classify_renpy("**.bak", None)
|
||||
build.classify_renpy("**.pyc", None)
|
||||
|
||||
build.classify_renpy("**/log.txt", None)
|
||||
build.classify_renpy("**/traceback.txt", None)
|
||||
build.classify_renpy("**/errors.txt", None)
|
||||
build.classify_renpy("**/saves/", None)
|
||||
build.classify_renpy("**/tmp/", None)
|
||||
build.classify_renpy("**/.Editra", None)
|
||||
|
||||
# main source.
|
||||
|
||||
def source_and_binary(pattern):
|
||||
"""
|
||||
Classifies source and binary files beginning with `pattern`.
|
||||
.pyo, .rpyc, .rpycm, and .rpyb go into binary, everything
|
||||
else goes into source.
|
||||
"""
|
||||
|
||||
build.classify_renpy(pattern + ".pyo", "binary")
|
||||
build.classify_renpy(pattern + ".rpyc", "binary")
|
||||
build.classify_renpy(pattern + ".rpymc", "binary")
|
||||
build.classify_renpy(pattern + ".rpyb", "binary")
|
||||
build.classify_renpy(pattern, "source")
|
||||
|
||||
build.classify_renpy("renpy.py", "source")
|
||||
source_and_binary("renpy/**")
|
||||
|
||||
# games.
|
||||
build.classify_renpy("launcher/game/theme/", None)
|
||||
source_and_binary("launcher/**")
|
||||
source_and_binary("templates/**")
|
||||
source_and_binary("the_question/**")
|
||||
source_and_binary("tutorial/**")
|
||||
|
||||
# docs.
|
||||
build.classify_renpy("doc/", "source")
|
||||
build.classify_renpy("doc/.doctrees/", None)
|
||||
build.classify_renpy("doc/_sources/", None)
|
||||
build.classify_renpy("doc/**", "source")
|
||||
build.classify_renpy("LICENSE.txt", "source")
|
||||
|
||||
# module.
|
||||
build.classify_renpy("module/", "source")
|
||||
build.classify_renpy("module/*.c", "source")
|
||||
build.classify_renpy("module/gen/", "source")
|
||||
build.classify_renpy("module/gen/*.c", "source")
|
||||
build.classify_renpy("module/*.h", "source")
|
||||
build.classify_renpy("module/*.py*", "source")
|
||||
build.classify_renpy("module/include/", "source")
|
||||
build.classify_renpy("module/include/*.pxd", "source")
|
||||
build.classify_renpy("module/pysdlsound/", "source")
|
||||
build.classify_renpy("module/pysdlsound/*.py", "source")
|
||||
build.classify_renpy("module/pysdlsound/*.pyx", "source")
|
||||
|
||||
# all-platforms binary.
|
||||
build.classify_renpy("lib/*/renpy", None)
|
||||
build.classify_renpy("lib/*/renpy.exe", None)
|
||||
build.classify_renpy("lib/**", "binary")
|
||||
build.classify_renpy("renpy.sh", "binary")
|
||||
build.classify_renpy("renpy.exe", "binary")
|
||||
# renpy.app is now built from scratch from distribute.rpy.
|
||||
|
||||
# jedit rules.
|
||||
build.classify_renpy("jedit/**", "jedit")
|
||||
|
||||
# editra rules.
|
||||
build.classify_renpy("editra/", "editra-all")
|
||||
build.classify_renpy("editra/Editra.edit.py", "editra-all")
|
||||
build.classify_renpy("editra/Editra/**", "editra-linux editra-windows")
|
||||
build.classify_renpy("editra/Editra-mac.app/**", "editra-mac")
|
||||
build.classify_renpy("editra/lib/**", "editra-windows")
|
||||
build.classify_renpy("editra/editra.exe", "editra-windows")
|
||||
|
||||
|
||||
# Executable rules.
|
||||
build.executable("editra/Editra/Editra")
|
||||
|
||||
# Packages.
|
||||
build.packages = [ ]
|
||||
|
||||
build.package("sdk", "zip tar.bz2", "source binary")
|
||||
build.package("source", "tar.bz2", "source", update=False)
|
||||
|
||||
build.package("jedit", "zip", "jedit", dlc=True)
|
||||
build.package("editra-linux", "tar.bz2", "editra-all editra-linux", dlc=True)
|
||||
build.package("editra-mac", "zip", "editra-all editra-mac", dlc=True)
|
||||
build.package("editra-windows", "zip", "editra-all editra-windows", dlc=True)
|
||||
build.package("rapt", "zip", "rapt", dlc=True)
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init python in distribute:
|
||||
|
||||
import time
|
||||
import zipfile
|
||||
import tarfile
|
||||
import zlib
|
||||
import struct
|
||||
import stat
|
||||
import shutil
|
||||
|
||||
from zipfile import crc32
|
||||
|
||||
zlib.Z_DEFAULT_COMPRESSION = 9
|
||||
|
||||
class ZipFile(zipfile.ZipFile):
|
||||
|
||||
def write_with_info(self, zinfo, filename):
|
||||
"""Put the bytes from filename into the archive under the name
|
||||
arcname."""
|
||||
if not self.fp:
|
||||
raise RuntimeError(
|
||||
"Attempt to write to ZIP archive that was already closed")
|
||||
|
||||
st = os.stat(filename)
|
||||
isdir = stat.S_ISDIR(st.st_mode)
|
||||
|
||||
zinfo.file_size = st.st_size
|
||||
zinfo.flag_bits = 0x00
|
||||
zinfo.header_offset = self.fp.tell() # Start of header bytes
|
||||
|
||||
self._writecheck(zinfo)
|
||||
self._didModify = True
|
||||
|
||||
if isdir:
|
||||
zinfo.file_size = 0
|
||||
zinfo.compress_size = 0
|
||||
zinfo.CRC = 0
|
||||
self.filelist.append(zinfo)
|
||||
self.NameToInfo[zinfo.filename] = zinfo
|
||||
self.fp.write(zinfo.FileHeader())
|
||||
return
|
||||
|
||||
with open(filename, "rb") as fp:
|
||||
# Must overwrite CRC and sizes with correct data later
|
||||
zinfo.CRC = CRC = 0
|
||||
zinfo.compress_size = compress_size = 0
|
||||
zinfo.file_size = file_size = 0
|
||||
self.fp.write(zinfo.FileHeader())
|
||||
if zinfo.compress_type == zipfile.ZIP_DEFLATED:
|
||||
cmpr = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION,
|
||||
zlib.DEFLATED, -15)
|
||||
else:
|
||||
cmpr = None
|
||||
while 1:
|
||||
buf = fp.read(1024 * 1024)
|
||||
if not buf:
|
||||
break
|
||||
file_size = file_size + len(buf)
|
||||
CRC = crc32(buf, CRC) & 0xffffffff
|
||||
if cmpr:
|
||||
buf = cmpr.compress(buf)
|
||||
compress_size = compress_size + len(buf)
|
||||
self.fp.write(buf)
|
||||
if cmpr:
|
||||
buf = cmpr.flush()
|
||||
compress_size = compress_size + len(buf)
|
||||
self.fp.write(buf)
|
||||
zinfo.compress_size = compress_size
|
||||
else:
|
||||
zinfo.compress_size = file_size
|
||||
zinfo.CRC = CRC
|
||||
zinfo.file_size = file_size
|
||||
# Seek backwards and write CRC and file sizes
|
||||
position = self.fp.tell() # Preserve current position in file
|
||||
self.fp.seek(zinfo.header_offset + 14, 0)
|
||||
self.fp.write(struct.pack("<LLL", zinfo.CRC, zinfo.compress_size,
|
||||
zinfo.file_size))
|
||||
self.fp.seek(position, 0)
|
||||
self.filelist.append(zinfo)
|
||||
self.NameToInfo[zinfo.filename] = zinfo
|
||||
|
||||
|
||||
class ZipPackage(object):
|
||||
"""
|
||||
A class that creates a zip file.
|
||||
"""
|
||||
|
||||
def __init__(self, filename):
|
||||
self.zipfile = ZipFile(filename, "w", zipfile.ZIP_DEFLATED)
|
||||
|
||||
def add_file(self, name, path, xbit):
|
||||
|
||||
if path is None:
|
||||
raise Exception("path for " + name + " must not be None.")
|
||||
|
||||
zi = zipfile.ZipInfo(name)
|
||||
|
||||
try:
|
||||
s = os.stat(path)
|
||||
zi.date_time = time.gmtime(s.st_mtime)[:6]
|
||||
except:
|
||||
zi.date_time = time.gmtime()[:6]
|
||||
|
||||
zi.compress_type = zipfile.ZIP_DEFLATED
|
||||
zi.create_system = 3
|
||||
|
||||
if xbit:
|
||||
zi.external_attr = long(0100755) << 16
|
||||
else:
|
||||
zi.external_attr = long(0100644) << 16
|
||||
|
||||
self.zipfile.write_with_info(zi, path)
|
||||
|
||||
def add_directory(self, name, path):
|
||||
if path is None:
|
||||
return
|
||||
|
||||
zi = zipfile.ZipInfo(name + "/")
|
||||
|
||||
s = os.stat(path)
|
||||
zi.date_time = time.gmtime(s.st_mtime)[:6]
|
||||
zi.compress_type = zipfile.ZIP_STORED
|
||||
zi.create_system = 3
|
||||
zi.external_attr = (long(0040755) << 16) | 0x10
|
||||
|
||||
self.zipfile.write_with_info(zi, path)
|
||||
|
||||
def close(self):
|
||||
self.zipfile.close()
|
||||
|
||||
|
||||
class TarPackage(object):
|
||||
|
||||
def __init__(self, filename, mode, notime=False):
|
||||
"""
|
||||
notime
|
||||
If true, times will be forced to the epoch.
|
||||
"""
|
||||
|
||||
self.tarfile = tarfile.open(filename, mode)
|
||||
self.tarfile.dereference = True
|
||||
self.notime = notime
|
||||
|
||||
def add_file(self, name, path, xbit):
|
||||
|
||||
if path is not None:
|
||||
info = self.tarfile.gettarinfo(path, name)
|
||||
else:
|
||||
info = tarfile.TarInfo(name)
|
||||
info.size = 0
|
||||
info.mtime = int(time.time())
|
||||
info.type = tarfile.DIRTYPE
|
||||
|
||||
if xbit:
|
||||
info.mode = 0755
|
||||
else:
|
||||
info.mode = 0644
|
||||
|
||||
info.uid = 1000
|
||||
info.gid = 1000
|
||||
info.uname = "renpy"
|
||||
info.gname = "renpy"
|
||||
|
||||
if self.notime:
|
||||
info.mtime = 0
|
||||
|
||||
if info.isreg():
|
||||
with open(path, "rb") as f:
|
||||
self.tarfile.addfile(info, f)
|
||||
else:
|
||||
self.tarfile.addfile(info)
|
||||
|
||||
def add_directory(self, name, path):
|
||||
self.add_file(name, path, True)
|
||||
|
||||
def close(self):
|
||||
self.tarfile.close()
|
||||
|
||||
class DirectoryPackage(object):
|
||||
|
||||
def mkdir(self, path):
|
||||
if not os.path.isdir(path):
|
||||
os.mkdir(path, 0755)
|
||||
|
||||
def __init__(self, path):
|
||||
self.path = path
|
||||
self.mkdir(path)
|
||||
|
||||
def add_file(self, name, path, xbit):
|
||||
fn = os.path.join(self.path, name)
|
||||
shutil.copy2(path, fn)
|
||||
|
||||
if xbit:
|
||||
os.chmod(fn, 0755)
|
||||
else:
|
||||
os.chmod(fn, 0644)
|
||||
|
||||
def add_directory(self, name, path):
|
||||
fn = os.path.join(self.path, name)
|
||||
self.mkdir(fn)
|
||||
|
||||
def close(self):
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init python:
|
||||
if persistent.gl_enable is None:
|
||||
persistent.gl_enable = True
|
||||
|
||||
config.gl_enable = persistent.gl_enable
|
||||
|
||||
if persistent.windows_console is None:
|
||||
persistent.windows_console = False
|
||||
|
||||
def scan_translations():
|
||||
|
||||
languages = renpy.known_languages()
|
||||
|
||||
if not languages:
|
||||
return None
|
||||
|
||||
rv = [ ( "English", None) ]
|
||||
|
||||
for i in languages:
|
||||
rv.append((i.title(), i))
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
screen preferences:
|
||||
|
||||
$ translations = scan_translations()
|
||||
|
||||
frame:
|
||||
style_group "l"
|
||||
style "l_root"
|
||||
|
||||
window:
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Launcher Preferences")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
hbox:
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
xmaximum ONETHIRD
|
||||
xfill True
|
||||
|
||||
has vbox
|
||||
|
||||
# Projects directory selection.
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
yminimum 75
|
||||
has vbox
|
||||
|
||||
text _("Projects Directory:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
|
||||
frame style "l_indent":
|
||||
if persistent.projects_directory:
|
||||
textbutton _("[persistent.projects_directory!q]") action Jump("projects_directory_preference")
|
||||
else:
|
||||
textbutton _("Not Set") action Jump("projects_directory_preference")
|
||||
|
||||
|
||||
|
||||
add SPACER
|
||||
|
||||
# Text editor selection.
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
yminimum 75
|
||||
has vbox
|
||||
|
||||
text _("Text Editor:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
frame style "l_indent":
|
||||
if persistent.editor:
|
||||
textbutton persistent.editor action Jump("editor_preference")
|
||||
else:
|
||||
textbutton _("Not Set") action Jump("editor_preference")
|
||||
|
||||
add SPACER
|
||||
|
||||
if ability.can_update:
|
||||
|
||||
# Update URL selection.
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
yminimum 75
|
||||
has vbox
|
||||
|
||||
text _("Update Channel:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
frame style "l_indent":
|
||||
textbutton persistent.update_channel action Jump("update_preference")
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
xmaximum ONETHIRD
|
||||
xfill True
|
||||
|
||||
has vbox
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
yminimum 75
|
||||
has vbox
|
||||
|
||||
text _("Navigation Options:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
textbutton _("Include private names") style "l_checkbox" action ToggleField(persistent, "navigate_private")
|
||||
textbutton _("Include library names") style "l_checkbox" action ToggleField(persistent, "navigate_library")
|
||||
|
||||
add SPACER
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
yminimum 75
|
||||
has vbox
|
||||
|
||||
text _("Launcher Options:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
textbutton _("Hardware rendering") style "l_checkbox" action ToggleField(persistent, "gl_enable")
|
||||
textbutton _("Show templates") style "l_checkbox" action ToggleField(persistent, "show_templates")
|
||||
|
||||
if renpy.windows:
|
||||
textbutton _("Console output") style "l_checkbox" action ToggleField(persistent, "windows_console")
|
||||
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
xmaximum ONETHIRD
|
||||
xfill True
|
||||
|
||||
has vbox
|
||||
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
yminimum 75
|
||||
has vbox
|
||||
|
||||
text _("Actions:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
textbutton _("Open launcher project") style "l_nonbox" action [ project.Select("launcher"), Jump("front_page") ]
|
||||
|
||||
if translations:
|
||||
|
||||
add SPACER
|
||||
|
||||
# Text editor selection.
|
||||
add SEPARATOR2
|
||||
|
||||
frame:
|
||||
style "l_indent"
|
||||
yminimum 75
|
||||
has vbox
|
||||
|
||||
text _("Language:")
|
||||
|
||||
add HALF_SPACER
|
||||
|
||||
# frame style "l_indent":
|
||||
|
||||
for tlname, tlvalue in translations:
|
||||
textbutton tlname action Language(tlvalue) style "l_list"
|
||||
|
||||
|
||||
textbutton _("Back") action Jump("front_page") style "l_left_button"
|
||||
|
||||
label projects_directory_preference:
|
||||
call choose_projects_directory
|
||||
jump preferences
|
||||
|
||||
|
||||
label preferences:
|
||||
call screen preferences
|
||||
jump preferences
|
||||
@@ -0,0 +1,601 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Code that manages projects.
|
||||
|
||||
init python:
|
||||
try:
|
||||
import EasyDialogsWin as EasyDialogs
|
||||
except:
|
||||
EasyDialogs = None
|
||||
|
||||
import os
|
||||
|
||||
init python in project:
|
||||
from store import persistent, config, Action, renpy
|
||||
import store.util as util
|
||||
import store.interface as interface
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
import json
|
||||
import subprocess
|
||||
import re
|
||||
import tempfile
|
||||
|
||||
if persistent.blurb is None:
|
||||
persistent.blurb = 0
|
||||
|
||||
LAUNCH_BLURBS = [
|
||||
_("After making changes to the script, press shift+R to reload your game."),
|
||||
_("Press shift+O (the letter) to access the console."),
|
||||
_("Press shift+D to access the developer menu."),
|
||||
]
|
||||
|
||||
class Project(object):
|
||||
|
||||
def __init__(self, path):
|
||||
|
||||
while path.endswith("/"):
|
||||
path = path[:-1]
|
||||
|
||||
if not os.path.exists(path):
|
||||
raise Exception("{} does not exist.".format(path))
|
||||
|
||||
# The name of the project.
|
||||
self.name = os.path.basename(path)
|
||||
|
||||
# The path to the project.
|
||||
self.path = path
|
||||
|
||||
# The path to the game directory.
|
||||
gamedir = os.path.join(path, "game")
|
||||
if os.path.isdir(gamedir):
|
||||
self.gamedir = gamedir
|
||||
else:
|
||||
self.gamedir = path
|
||||
|
||||
# Load the data.
|
||||
self.load_data()
|
||||
|
||||
# The project's temporary directory.
|
||||
self.tmp = None
|
||||
|
||||
# This contains the result of dumping information about the game
|
||||
# to disk.
|
||||
self.dump = { }
|
||||
|
||||
# The mtime of the last dump file loaded.
|
||||
self.dump_mtime = 0
|
||||
|
||||
def get_dump_filename(self):
|
||||
self.make_tmp()
|
||||
return os.path.join(self.tmp, "navigation.json")
|
||||
|
||||
def load_data(self):
|
||||
try:
|
||||
f = open(os.path.join(self.path, "project.json"), "rb")
|
||||
self.data = json.load(f)
|
||||
f.close()
|
||||
except:
|
||||
self.data = { }
|
||||
|
||||
self.update_data()
|
||||
|
||||
|
||||
def save_data(self):
|
||||
"""
|
||||
Saves the project data.
|
||||
"""
|
||||
|
||||
try:
|
||||
with open(os.path.join(self.path, "project.json"), "wb") as f:
|
||||
json.dump(self.data, f)
|
||||
except:
|
||||
self.load_data()
|
||||
|
||||
def update_data(self):
|
||||
data = self.data
|
||||
|
||||
data.setdefault("build_update", False)
|
||||
data.setdefault("packages", [ "all" ])
|
||||
|
||||
def make_tmp(self):
|
||||
"""
|
||||
Makes the project's temporary directory, if it doesn't exist
|
||||
yet.
|
||||
"""
|
||||
|
||||
if self.tmp and os.path.isdir(self.tmp):
|
||||
return
|
||||
|
||||
tmp = os.path.join(self.path, "tmp")
|
||||
|
||||
try:
|
||||
os.mkdir(tmp)
|
||||
except:
|
||||
pass
|
||||
|
||||
if os.path.isdir(tmp):
|
||||
self.tmp = tmp
|
||||
return
|
||||
|
||||
self.tmp = tempfile.mkdtemp()
|
||||
|
||||
def temp_filename(self, filename):
|
||||
"""
|
||||
Returns a filename in the temporary directory.
|
||||
"""
|
||||
|
||||
self.make_tmp()
|
||||
return os.path.join(self.tmp, filename)
|
||||
|
||||
def launch(self, args=[], wait=False, env={}):
|
||||
"""
|
||||
Launches the project.
|
||||
|
||||
`args`
|
||||
Additional arguments to give to the project.
|
||||
|
||||
`wait`
|
||||
If true, waits for the launched project to terminate before
|
||||
continuing.
|
||||
|
||||
`env`
|
||||
Additional variables to include in the environment.
|
||||
"""
|
||||
|
||||
self.make_tmp()
|
||||
|
||||
# Find the python executable to run.
|
||||
executable_path = os.path.dirname(sys.executable)
|
||||
|
||||
if renpy.renpy.windows:
|
||||
extension = ".exe"
|
||||
else:
|
||||
extension = ""
|
||||
|
||||
if persistent.windows_console:
|
||||
executables = [ "python" + extension ]
|
||||
else:
|
||||
executables = [ "pythonw" + extension ]
|
||||
|
||||
executables.append(sys.executable)
|
||||
|
||||
for i in executables:
|
||||
executable = os.path.join(executable_path, i)
|
||||
if os.path.exists(executable):
|
||||
break
|
||||
else:
|
||||
raise Exception("Python interpreter not found: %r", executables)
|
||||
|
||||
# Put together the basic command line.
|
||||
cmd = [ executable, "-EO", sys.argv[0] ]
|
||||
|
||||
cmd.append(self.path)
|
||||
cmd.extend(args)
|
||||
|
||||
# Add flags to dump game info.
|
||||
cmd.append("--json-dump")
|
||||
cmd.append(self.get_dump_filename())
|
||||
|
||||
if persistent.navigate_private:
|
||||
cmd.append("--json-dump-private")
|
||||
|
||||
if persistent.navigate_library:
|
||||
cmd.append("--json-dump-common")
|
||||
|
||||
environ = dict(os.environ)
|
||||
environ.update(env)
|
||||
|
||||
for k in environ:
|
||||
environ[k] = renpy.fsencode(environ[k])
|
||||
|
||||
# Launch the project.
|
||||
cmd = [ renpy.fsencode(i) for i in cmd ]
|
||||
|
||||
p = subprocess.Popen(cmd, env=environ)
|
||||
|
||||
if wait:
|
||||
if p.wait():
|
||||
interface.error(_("Launching the project failed."), _("Please ensure that your project launches normally before running this command."))
|
||||
|
||||
def update_dump(self, force=False, gui=True):
|
||||
"""
|
||||
If the dumpfile does not exist, runs Ren'Py to create it. Otherwise,
|
||||
loads it in iff it's newer than the one that's already loaded.
|
||||
"""
|
||||
|
||||
dump_filename = self.get_dump_filename()
|
||||
|
||||
if force or not os.path.exists(dump_filename):
|
||||
|
||||
if gui:
|
||||
interface.processing(_("Ren'Py is scanning the project..."))
|
||||
|
||||
self.launch(["quit"], wait=True)
|
||||
|
||||
if not os.path.exists(dump_filename):
|
||||
self.dump["error"] = True
|
||||
return
|
||||
|
||||
file_mtime = os.path.getmtime(dump_filename)
|
||||
if file_mtime == self.dump_mtime:
|
||||
return
|
||||
|
||||
self.dump_mtime = file_mtime
|
||||
|
||||
try:
|
||||
with open(dump_filename, "r") as f:
|
||||
self.dump = json.load(f)
|
||||
# add todo list to dump data
|
||||
self.update_todos()
|
||||
|
||||
except:
|
||||
self.dump["error"] = True
|
||||
|
||||
def update_todos(self):
|
||||
"""
|
||||
Scans the scriptfiles for lines TODO comments and add them to
|
||||
the dump data.
|
||||
"""
|
||||
|
||||
todos = self.dump.setdefault("location", {})["todo"] = {}
|
||||
|
||||
files = self.script_files()
|
||||
|
||||
for f in files:
|
||||
|
||||
data = file(self.unelide_filename(f))
|
||||
|
||||
for l, line in enumerate(data):
|
||||
l += 1
|
||||
|
||||
try:
|
||||
line = line.decode("utf-8")
|
||||
except:
|
||||
continue
|
||||
|
||||
m = re.search(ur".*#\s*TODO(\s*:\s*|\s+)(.*)", line, re.I)
|
||||
|
||||
if m is None:
|
||||
continue
|
||||
|
||||
raw_todo_text = m.group(2).strip()
|
||||
todo_text = raw_todo_text
|
||||
|
||||
index = 0
|
||||
|
||||
while not todo_text or todo_text in todos:
|
||||
index += 1
|
||||
todo_text = u"{0} ({1})".format(raw_todo_text, index)
|
||||
|
||||
todos[todo_text] = [f, l]
|
||||
|
||||
|
||||
def unelide_filename(self, fn):
|
||||
"""
|
||||
Unelides the filename relative to the project base.
|
||||
"""
|
||||
|
||||
fn1 = os.path.join(self.path, fn)
|
||||
if os.path.exists(fn1):
|
||||
return fn1
|
||||
|
||||
fn2 = os.path.join(config.renpy_base, fn)
|
||||
if os.path.exists(fn2):
|
||||
return fn2
|
||||
|
||||
return fn
|
||||
|
||||
def script_files(self):
|
||||
"""
|
||||
Return a list of the script files that make up the project. These
|
||||
are elided, and so need to be passed to unelide_filename before they
|
||||
can be included in the project.
|
||||
"""
|
||||
|
||||
rv = [ ]
|
||||
rv.extend(i for i, isdir in util.walk(self.path) if (not isdir) and (i.endswith(".rpy") or i.endswith(".rpym")) )
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
class ProjectManager(object):
|
||||
"""
|
||||
This maintains a list of the various types of projects that
|
||||
we know about.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
|
||||
# The projects directory.
|
||||
self.projects_directory = ""
|
||||
|
||||
# Normal projects, in alphabetical order by lowercase name.
|
||||
self.projects = [ ]
|
||||
|
||||
# Template projects.
|
||||
self.templates = [ ]
|
||||
|
||||
# All projects - normal, template, and hidden.
|
||||
self.all_projects = [ ]
|
||||
|
||||
# Directories that have been scanned.
|
||||
self.scanned = set()
|
||||
|
||||
self.scan()
|
||||
|
||||
def scan(self):
|
||||
"""
|
||||
Scans for projects.
|
||||
"""
|
||||
|
||||
if (persistent.projects_directory is not None) and not os.path.isdir(persistent.projects_directory):
|
||||
persistent.projects_directory = None
|
||||
|
||||
self.projects_directory = persistent.projects_directory
|
||||
|
||||
self.projects = [ ]
|
||||
self.templates = [ ]
|
||||
self.all_projects = [ ]
|
||||
self.scanned = set()
|
||||
|
||||
if self.projects_directory is not None:
|
||||
self.scan_directory(self.projects_directory)
|
||||
|
||||
self.scan_directory(config.renpy_base)
|
||||
self.scan_directory(os.path.join(config.renpy_base, "templates"))
|
||||
|
||||
self.projects.sort(key=lambda p : p.name.lower())
|
||||
self.templates.sort(key=lambda p : p.name.lower())
|
||||
|
||||
def scan_directory(self, d):
|
||||
"""
|
||||
Scans for projects in directories directly underneath `d`.
|
||||
"""
|
||||
|
||||
global current
|
||||
|
||||
d = os.path.abspath(d)
|
||||
|
||||
if not os.path.isdir(d):
|
||||
return
|
||||
|
||||
for pdir in os.listdir(d):
|
||||
ppath = os.path.join(d, pdir)
|
||||
|
||||
# A project must be a directory.
|
||||
if not os.path.isdir(ppath):
|
||||
continue
|
||||
|
||||
# A project has either a game/ directory, or a project.json
|
||||
# file.
|
||||
if (not os.path.isdir(os.path.join(ppath, "game"))) and (not os.path.exists(os.path.join(ppath, "project.json"))):
|
||||
continue
|
||||
|
||||
if ppath in self.scanned:
|
||||
continue
|
||||
self.scanned.add(ppath)
|
||||
|
||||
# We have a project directory, so create a Project.
|
||||
p = Project(ppath)
|
||||
|
||||
project_type = p.data.get("type", "normal")
|
||||
|
||||
if project_type == "hidden":
|
||||
pass
|
||||
elif project_type == "template":
|
||||
self.templates.append(p)
|
||||
else:
|
||||
self.projects.append(p)
|
||||
|
||||
self.all_projects.append(p)
|
||||
|
||||
# Select the default project.
|
||||
if persistent.active_project is not None:
|
||||
p = self.get(persistent.active_project)
|
||||
|
||||
if p is not None:
|
||||
current = p
|
||||
return
|
||||
|
||||
p = self.get("tutorial")
|
||||
if p is not None:
|
||||
current = p
|
||||
return
|
||||
|
||||
current = None
|
||||
|
||||
|
||||
def get(self, name):
|
||||
"""
|
||||
Gets the project with the given name.
|
||||
|
||||
Returns None if the project doesn't exist.
|
||||
"""
|
||||
|
||||
for p in self.all_projects:
|
||||
if p.name == name:
|
||||
return p
|
||||
|
||||
return None
|
||||
|
||||
manager = ProjectManager()
|
||||
|
||||
# The current project.
|
||||
current = None
|
||||
|
||||
# Actions
|
||||
class Select(Action):
|
||||
"""
|
||||
An action that causes p to become the selected project when it was
|
||||
clicked. If label is not None, jumps to the given label.
|
||||
"""
|
||||
|
||||
def __init__(self, p, label=None):
|
||||
"""
|
||||
`p`
|
||||
Either a project object, or a string giving the name of a
|
||||
project.
|
||||
|
||||
`label`
|
||||
The label to jump to when clicked.
|
||||
"""
|
||||
|
||||
if isinstance(p, basestring):
|
||||
p = manager.get(p)
|
||||
|
||||
self.project = p
|
||||
self.label = label
|
||||
|
||||
def get_selected(self):
|
||||
if self.project is None:
|
||||
return False
|
||||
|
||||
if current is None:
|
||||
return False
|
||||
|
||||
return current.path == self.project.path
|
||||
|
||||
def get_sensitive(self):
|
||||
return self.project is not None
|
||||
|
||||
def __call__(self):
|
||||
global current
|
||||
|
||||
current = self.project
|
||||
persistent.active_project = self.project.name
|
||||
|
||||
renpy.restart_interaction()
|
||||
|
||||
if self.label is not None:
|
||||
renpy.jump(self.label)
|
||||
|
||||
|
||||
class Launch(Action):
|
||||
"""
|
||||
An action that launches the supplied project, or the current
|
||||
project if no project is supplied.
|
||||
"""
|
||||
|
||||
def __init__(self, p=None):
|
||||
if p is None:
|
||||
self.project = current
|
||||
elif isinstance(p, basestring):
|
||||
self.project = manager.get(p)
|
||||
else:
|
||||
self.project = p
|
||||
|
||||
def get_sensitive(self):
|
||||
return self.project is not None
|
||||
|
||||
def post_launch(self):
|
||||
blurb = LAUNCH_BLURBS[persistent.blurb % len(LAUNCH_BLURBS)]
|
||||
persistent.blurb += 1
|
||||
|
||||
interface.interaction(_("Launching"), blurb, pause=2.5)
|
||||
|
||||
|
||||
def __call__(self):
|
||||
self.project.launch()
|
||||
renpy.invoke_in_new_context(self.post_launch)
|
||||
|
||||
class Rescan(Action):
|
||||
def __call__(self):
|
||||
"""
|
||||
Rescans the projects directory.
|
||||
"""
|
||||
|
||||
manager.scan()
|
||||
renpy.restart_interaction()
|
||||
|
||||
|
||||
manager.scan()
|
||||
|
||||
if isinstance(persistent.projects_directory, str):
|
||||
persistent.projects_directory = renpy.fsdecode(persistent.projects_directory)
|
||||
|
||||
###############################################################################
|
||||
# Code to choose the projects directory.
|
||||
|
||||
label choose_projects_directory:
|
||||
|
||||
python hide:
|
||||
|
||||
interface.interaction(_("PROJECTS DIRECTORY"), _("Please choose the projects directory using the directory chooser.\n{b}The directory chooser may have opened behind this window.{/b}"), _("This launcher will scan for projects in this directory, will create new projects in this directory, and will place built projects into this directory."),)
|
||||
|
||||
path = persistent.projects_directory
|
||||
|
||||
if path:
|
||||
default_path = path
|
||||
else:
|
||||
try:
|
||||
default_path = os.path.dirname(os.path.abspath(config.renpy_base))
|
||||
except:
|
||||
default_path = os.path.abspath(config.renpy_base)
|
||||
|
||||
|
||||
if EasyDialogs:
|
||||
|
||||
choice = EasyDialogs.AskFolder(defaultLocation=default_path, wanted=unicode)
|
||||
|
||||
if choice is not None:
|
||||
path = choice
|
||||
else:
|
||||
path = None
|
||||
|
||||
else:
|
||||
|
||||
try:
|
||||
|
||||
cmd = [ "/usr/bin/python", os.path.join(config.gamedir, "tkaskdir.py"), renpy.fsencode(default_path) ]
|
||||
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||
choice = p.stdout.read()
|
||||
code = p.wait()
|
||||
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
code = 0
|
||||
choice = ""
|
||||
path = None
|
||||
|
||||
interface.error(_("Ren'Py was unable to run python with tkinter to choose the projects directory. Please install the python-tk or tkinter package."), label=None)
|
||||
|
||||
if code:
|
||||
interface.error(_("Ren'Py was unable to run python with tkinter to choose the projects directory. Please install the python-tk or tkinter package."), label=None)
|
||||
|
||||
elif choice:
|
||||
path = renpy.fsdecode(choice)
|
||||
|
||||
if path is None:
|
||||
path = default_path
|
||||
interface.info(_("Ren'Py has set the projects directory to:"), "[path!q]", path=path)
|
||||
|
||||
path = renpy.fsdecode(path)
|
||||
|
||||
persistent.projects_directory = path
|
||||
project.manager.scan()
|
||||
|
||||
return
|
||||
@@ -0,0 +1,8 @@
|
||||
-----BEGIN RSA PUBLIC KEY-----
|
||||
MIIBCgKCAQEAnEdzfwV6FFnmjkbJHJKJ59jqLTGkPSES5LBFbxwweGuC3LU2sNs+
|
||||
tRlWx+2+kbW6azb5yteP/O05/hzHdtIa4slao7s8A/wf0zA6HbLX4H5iqSosDvuw
|
||||
FP9DAF46vH0Qn1a3k97JFV2eXoGAbwHZICKhbIPCm7qR39G8FvUrw7grCS+5Scb+
|
||||
LzqkBv6TnwRDB4agcwhlkA432s6BTU8p9RIFmyldCEgq0SXeK07lkuDmOplp6IdL
|
||||
bVwLoRWg6pngIEoPo/Qxt8ZnLdBthN+TAsMRiquz17GaAvERbkUBwYtlt7R8qx01
|
||||
F3vzweKXSCguzr9XQBQflkVu2y6cmIEwPQIDAQAB
|
||||
-----END RSA PUBLIC KEY-----
|
||||
@@ -0,0 +1,330 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init -1 python:
|
||||
|
||||
# The color of non-interactive text.
|
||||
TEXT = "#545454"
|
||||
|
||||
# Colors for buttons in various states.
|
||||
IDLE = "#42637b"
|
||||
HOVER = "#d86b45"
|
||||
DISABLED = "#808080"
|
||||
|
||||
# Colors for reversed text buttons (selected list entries).
|
||||
REVERSE_IDLE = "#78a5c5"
|
||||
REVERSE_HOVER = "#d86b45"
|
||||
REVERSE_TEXT = "#ffffff"
|
||||
|
||||
# Colors for the scrollbar thumb.
|
||||
SCROLLBAR_IDLE = "#dfdfdf"
|
||||
SCROLLBAR_HOVER = "#d86b45"
|
||||
|
||||
# An image used as a separator pattern.
|
||||
PATTERN = "images/pattern.png"
|
||||
|
||||
# A displayable used for the background of everything.
|
||||
BACKGROUND = "images/background.png"
|
||||
|
||||
# A displayable used for the background of windows
|
||||
# containing commands, preferences, and navigation info.
|
||||
WINDOW = Frame("images/window.png", 0, 0, tile=True)
|
||||
|
||||
# A displayable used for the background of the projects list.
|
||||
PROJECTS_WINDOW = Null()
|
||||
|
||||
# A displayable used the background of information boxes.
|
||||
INFO_WINDOW = "#f9f9f9"
|
||||
|
||||
# Colors for the titles of information boxes.
|
||||
ERROR_COLOR = "#d15353"
|
||||
INFO_COLOR = "#545454"
|
||||
INTERACTION_COLOR = "#d19753"
|
||||
QUESTION_COLOR = "#d19753"
|
||||
|
||||
# The color of input text.
|
||||
INPUT_COLOR = "#d86b45"
|
||||
|
||||
# FONTS/WEIGHTS
|
||||
LIGHT = "Roboto-Light.ttf"
|
||||
REGULAR = "Roboto-Regular.ttf"
|
||||
DARK = "Roboto-Medium.ttf"
|
||||
|
||||
init 1 python:
|
||||
|
||||
INDENT = 20
|
||||
HALF_INDENT = 10
|
||||
|
||||
SCROLLBAR_SIZE = 16
|
||||
|
||||
SEPARATOR = Frame(PATTERN, 0, 0, tile=True, ymaximum=5, yalign=1.0)
|
||||
SEPARATOR2 = Frame(PATTERN, 0, 0, tile=True, ymaximum=10, yalign=1.0)
|
||||
|
||||
SPACER_HEIGHT = 12
|
||||
SPACER = Null(height=SPACER_HEIGHT)
|
||||
|
||||
HALF_SPACER_HEIGHT = 6
|
||||
HALF_SPACER = Null(height=HALF_SPACER_HEIGHT)
|
||||
|
||||
# DIVIDING THE SCREEN
|
||||
ONETHIRD = 258
|
||||
TWOTHIRDS = 496
|
||||
ONEHALF = 377
|
||||
|
||||
def checkbox(full, color):
|
||||
if full:
|
||||
return im.Twocolor("images/checkbox_full.png", color, color, yalign=0.5)
|
||||
else:
|
||||
return im.Twocolor("images/checkbox_empty.png", color, color, yalign=0.5)
|
||||
|
||||
init 1:
|
||||
|
||||
# The default style.
|
||||
style l_default is default:
|
||||
font LIGHT
|
||||
color TEXT
|
||||
idle_color IDLE
|
||||
hover_color HOVER
|
||||
size 18
|
||||
|
||||
style l_text is l_default
|
||||
|
||||
style l_button is l_default
|
||||
style l_button_text is l_default:
|
||||
insensitive_color DISABLED
|
||||
selected_font REGULAR
|
||||
|
||||
# A small button, used at the bottom of the screen.
|
||||
style l_link is l_default
|
||||
style l_link_text is l_default:
|
||||
size 14
|
||||
font LIGHT
|
||||
|
||||
# Action buttons on the bottom of the screen.
|
||||
style l_right_button is l_default:
|
||||
xalign 1.0
|
||||
ypos 600 - 128 + 12
|
||||
left_margin 8 + INDENT
|
||||
right_margin 10 + INDENT
|
||||
|
||||
style l_right_button_text is l_default:
|
||||
size 30
|
||||
|
||||
style l_left_button is l_right_button:
|
||||
xalign 0.0
|
||||
|
||||
style l_left_button_text is l_right_button_text
|
||||
|
||||
|
||||
# The root frame. This contains everything but the bottom navigation,
|
||||
# and buttons.
|
||||
style l_root is l_default:
|
||||
background BACKGROUND
|
||||
xpadding 10
|
||||
top_padding 64
|
||||
bottom_padding 128
|
||||
|
||||
# An inner window.
|
||||
style l_window is l_default:
|
||||
background WINDOW
|
||||
left_padding 6
|
||||
xfill True
|
||||
yfill True
|
||||
|
||||
# Normal size labels.
|
||||
style l_label is l_default:
|
||||
xfill True
|
||||
top_padding 10
|
||||
bottom_padding 8
|
||||
bottom_margin 12
|
||||
background SEPARATOR
|
||||
|
||||
style l_label_text is l_default:
|
||||
size 24
|
||||
xpos INDENT
|
||||
yoffset 6
|
||||
|
||||
style l_label_small is l_default:
|
||||
xfill True
|
||||
bottom_padding 8
|
||||
bottom_margin HALF_SPACER_HEIGHT
|
||||
background SEPARATOR
|
||||
|
||||
# Small labels.
|
||||
style l_label_small_text is l_default:
|
||||
xpos INDENT
|
||||
yoffset 6
|
||||
size 20
|
||||
|
||||
# Alternate labels. This nests inside an l_label, and gives a button
|
||||
# or label that's nested inside another label.
|
||||
|
||||
style l_alternate is l_default:
|
||||
xalign 1.0
|
||||
yalign 1.0
|
||||
yoffset 4
|
||||
right_margin INDENT
|
||||
|
||||
style l_alternate_text is l_default:
|
||||
size 14
|
||||
font LIGHT
|
||||
text_align 1.0
|
||||
|
||||
style l_small_button is l_button
|
||||
|
||||
style l_small_button_text is l_button_text:
|
||||
size 14
|
||||
|
||||
style l_small_text is l_text:
|
||||
size 14
|
||||
|
||||
# Indents its contents.
|
||||
style l_indent is l_default:
|
||||
left_margin INDENT
|
||||
|
||||
# Indents its contents and pads vertically.
|
||||
style l_indent_margin is l_indent:
|
||||
ymargin 6
|
||||
|
||||
# Lists.
|
||||
style l_list is l_default:
|
||||
left_padding HALF_INDENT
|
||||
xfill True
|
||||
selected_background REVERSE_IDLE
|
||||
selected_hover_background REVERSE_HOVER
|
||||
|
||||
style l_list_text is l_default:
|
||||
idle_color IDLE
|
||||
hover_color HOVER
|
||||
selected_idle_color REVERSE_TEXT
|
||||
selected_hover_color REVERSE_TEXT
|
||||
insensitive_color DISABLED
|
||||
|
||||
style l_list2 is l_list:
|
||||
left_padding (HALF_INDENT + INDENT)
|
||||
|
||||
style l_list2_text is l_list_text
|
||||
|
||||
# Scrollbar.
|
||||
style l_vscrollbar is l_default:
|
||||
thumb Fixed(
|
||||
Solid(SCROLLBAR_IDLE, xmaximum=8, xalign=0.5),
|
||||
Image("images/vscrollbar_center.png", xalign=0.5, yalign=0.5),
|
||||
xmaximum = SCROLLBAR_SIZE)
|
||||
hover_thumb Fixed(
|
||||
Solid(SCROLLBAR_HOVER, xmaximum=8, xalign=0.5),
|
||||
Image("images/vscrollbar_center.png", xalign=0.5, yalign=0.5),
|
||||
xmaximum = SCROLLBAR_SIZE)
|
||||
xmaximum SCROLLBAR_SIZE
|
||||
bar_vertical True
|
||||
bar_invert True
|
||||
unscrollable "hide"
|
||||
|
||||
# Information window.
|
||||
style l_info_vbox is vbox:
|
||||
yalign 0.5
|
||||
xalign 0.5
|
||||
xfill True
|
||||
|
||||
style l_info_frame is l_default:
|
||||
ypadding 21
|
||||
xfill True
|
||||
background Fixed(
|
||||
INFO_WINDOW,
|
||||
Frame(PATTERN, 0, 0, tile=True, ymaximum=5, yalign=0.0, yoffset=8),
|
||||
Frame(PATTERN, 0, 0, tile=True, ymaximum=5, yalign=1.0, yoffset=-8),
|
||||
)
|
||||
yminimum 180
|
||||
ypos 75
|
||||
|
||||
style l_info_label is l_default:
|
||||
xalign 0.5
|
||||
ypos 75
|
||||
yanchor 1.0
|
||||
yoffset 12
|
||||
|
||||
style l_info_label_text is l_default:
|
||||
size 36
|
||||
|
||||
style l_info_text is l_default:
|
||||
xalign 0.5
|
||||
|
||||
style l_info_button is l_button:
|
||||
xalign 0.5
|
||||
xmargin 50
|
||||
|
||||
style l_info_button_text is l_button_text:
|
||||
text_align 0.5
|
||||
layout "subtitle"
|
||||
|
||||
# Progress bar.
|
||||
style l_progress_frame is l_default:
|
||||
background Frame(PATTERN, 0, 0, tile=True)
|
||||
ypadding 5
|
||||
|
||||
style l_progress_bar is l_default:
|
||||
left_bar REVERSE_IDLE
|
||||
right_bar Null()
|
||||
ymaximum 24
|
||||
|
||||
# Navigation.
|
||||
style l_navigation_button is l_button:
|
||||
size_group "navigation"
|
||||
right_margin INDENT
|
||||
top_margin 3
|
||||
|
||||
style l_navigation_button_text is l_button_text:
|
||||
size 14
|
||||
font REGULAR
|
||||
|
||||
style l_navigation_text is l_text:
|
||||
size 12
|
||||
font LIGHT
|
||||
color TEXT
|
||||
|
||||
# Checkboxes.
|
||||
style l_checkbox is l_button:
|
||||
left_padding INDENT
|
||||
background checkbox(False, IDLE)
|
||||
hover_background checkbox(False, HOVER)
|
||||
selected_idle_background checkbox(True, IDLE)
|
||||
selected_hover_background checkbox(True, HOVER)
|
||||
insensitive_background checkbox(False, DISABLED)
|
||||
|
||||
style l_checkbox_text is l_button_text:
|
||||
selected_font LIGHT
|
||||
|
||||
# Lines up with a checkbox.
|
||||
style l_nonbox is l_button:
|
||||
xpadding INDENT
|
||||
|
||||
style l_nonbox_text is l_button_text:
|
||||
selected_font LIGHT
|
||||
|
||||
# Projects list.
|
||||
style l_projects is l_default:
|
||||
background PROJECTS_WINDOW
|
||||
|
||||
style hyperlink_text:
|
||||
size 18
|
||||
font LIGHT
|
||||
color IDLE
|
||||
hover_color HOVER
|
||||
@@ -0,0 +1,68 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
init python:
|
||||
|
||||
class FileTail(object):
|
||||
|
||||
def __init__(self, filename, lines=8):
|
||||
self.filename = filename
|
||||
self.text = ""
|
||||
self.lines = lines
|
||||
|
||||
def update(self):
|
||||
|
||||
try:
|
||||
with open(self.filename) as f:
|
||||
text = f.read()
|
||||
|
||||
try:
|
||||
text = renpy.fsdecode(text)
|
||||
except:
|
||||
text = text.decode("latin-1")
|
||||
|
||||
text = text.strip()
|
||||
text = text.split("\n")
|
||||
|
||||
newtext = [ ]
|
||||
for l in text:
|
||||
|
||||
if "\r" in l:
|
||||
_head, _sep, l = l.rpartition("\r")
|
||||
|
||||
while l:
|
||||
newtext.append(l[:100])
|
||||
l = l[100:]
|
||||
|
||||
text = newtext
|
||||
text = text[-self.lines:]
|
||||
text = "\n".join(text)
|
||||
|
||||
if text != self.text:
|
||||
self.text = text
|
||||
renpy.restart_interaction()
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,609 @@
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# 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.
|
||||
|
||||
init python in theme_data:
|
||||
|
||||
def __PerformScreenOperations(lines, file_picker_rows=5, file_picker_cols=2):
|
||||
|
||||
import re
|
||||
|
||||
x = 0
|
||||
correct_section = False
|
||||
|
||||
while x < len(lines):
|
||||
l = lines[x]
|
||||
|
||||
m = re.match(r'^screen\s+\w+\s*:\s*$', l)
|
||||
if m:
|
||||
correct_section = False
|
||||
|
||||
m = re.match(r'^screen\s+file_picker\s*:\s*$', l)
|
||||
if m:
|
||||
correct_section = True
|
||||
|
||||
if correct_section:
|
||||
m = re.match(r'^\s+\$\s*columns\s*=\s*(\d+)\s*$', l)
|
||||
if m:
|
||||
l = l.replace(str(m.group(1)), str(file_picker_cols))
|
||||
m = re.match(r'^\s+\$\s*rows\s*=\s*(\d+)\s*$', l)
|
||||
if m:
|
||||
l = l.replace(str(m.group(1)), str(file_picker_rows))
|
||||
|
||||
lines[x] = l
|
||||
|
||||
x = x + 1
|
||||
|
||||
return lines
|
||||
|
||||
def roundrect_screen_ops(lines):
|
||||
return __PerformScreenOperations(lines)
|
||||
|
||||
def awt_screen_ops(lines):
|
||||
return __PerformScreenOperations(lines, file_picker_rows=3)
|
||||
|
||||
|
||||
|
||||
|
||||
# theme name -> (color scheme name -> code that implements it)
|
||||
THEME = { }
|
||||
|
||||
# The set of theme functions.
|
||||
THEME_FUNCTIONS = set()
|
||||
|
||||
# theme name -> function name to call to munge screens.rpy as appropriate
|
||||
# for that theme.
|
||||
THEME_SCREEN_OPERATIONS = { }
|
||||
|
||||
# Color schemes that work (technically - some are eye-melting) with the
|
||||
# roundrect-style themes.
|
||||
ROUNDRECT_SCHEMES = {
|
||||
'Basic Blue': {'disabled': '#404040',
|
||||
'disabled_text': '#c8c8c8',
|
||||
'frame': '#6496c8',
|
||||
'gm_root': '#dcebff',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#dcebff',
|
||||
'widget': '#003c78',
|
||||
'widget_hover': '#0050a0',
|
||||
'widget_selected': '#ffffc8',
|
||||
'widget_text': '#c8ffff'},
|
||||
'Bloody Mary': {'disabled': '#400000',
|
||||
'disabled_text': '#260000',
|
||||
'frame': '#400808',
|
||||
'gm_root': '#000000',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#000000',
|
||||
'widget': '#000000',
|
||||
'widget_hover': '#830000',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#C2C2C2'},
|
||||
'Colorblind': {'disabled': '#898989',
|
||||
'disabled_text': '#666666',
|
||||
'frame': '#252525',
|
||||
'gm_root': '#393939',
|
||||
'label': '#c2c2c2',
|
||||
'mm_root': '#393939',
|
||||
'widget': '#898989',
|
||||
'widget_hover': '#464646',
|
||||
'widget_selected': '#F2F2F2',
|
||||
'widget_text': '#CCCCCC'},
|
||||
'Cotton Candy': {'disabled': '#C8AFA1',
|
||||
'disabled_text': '#E1D4C9',
|
||||
'frame': '#FCF5F2',
|
||||
'gm_root': '#D0B4BA',
|
||||
'label': '#805C40',
|
||||
'mm_root': '#D0B4BA',
|
||||
'widget': '#ECC7D0',
|
||||
'widget_hover': '#E1D4C9',
|
||||
'widget_selected': '#805C40',
|
||||
'widget_text': '#805C40'},
|
||||
'Creamsicle': {'disabled': '#FFECBF',
|
||||
'disabled_text': '#ffffff',
|
||||
'frame': '#FFECBF',
|
||||
'gm_root': '#FDF5E3',
|
||||
'label': '#502F13',
|
||||
'mm_root': '#FDF5E3',
|
||||
'widget': '#D96B00',
|
||||
'widget_hover': '#FD9B1C',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#FCE6B1'},
|
||||
'Dramatic Flesh': {'disabled': '#ab6038',
|
||||
'disabled_text': '#BF7C51',
|
||||
'frame': '#49271b',
|
||||
'gm_root': '#2a201f',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#2a201f',
|
||||
'widget': '#BF7C51',
|
||||
'widget_hover': '#dda570',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#E5DFDF'},
|
||||
'Easter Baby': {'disabled': '#DDE9FF',
|
||||
'disabled_text': '#A6AFBF',
|
||||
'frame': '#CCF8DC',
|
||||
'gm_root': '#FBF9DF',
|
||||
'label': '#698071',
|
||||
'mm_root': '#FBF9DF',
|
||||
'widget': '#F5D4EE',
|
||||
'widget_hover': '#F0DDFF',
|
||||
'widget_selected': '#000000',
|
||||
'widget_text': '#698071'},
|
||||
'Favorite Jeans': {'disabled': '#919994',
|
||||
'disabled_text': '#B6BFB9',
|
||||
'frame': '#6f7571',
|
||||
'gm_root': '#b0b8ba',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#b0b8ba',
|
||||
'widget': '#8699a7',
|
||||
'widget_hover': '#9eb1ad',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#dcdfd6'},
|
||||
'Fine China': {'disabled': '#ADB9CC',
|
||||
'disabled_text': '#DFBA14',
|
||||
'frame': '#ADB9CC',
|
||||
'gm_root': '#F7F7FA',
|
||||
'label': '#39435E',
|
||||
'mm_root': '#F7F7FA',
|
||||
'widget': '#6A7183',
|
||||
'widget_hover': '#1A2B47',
|
||||
'widget_selected': '#E3E3E4',
|
||||
'widget_text': '#C9C9CB'},
|
||||
'First Valentines': {'disabled': '#F8F2D0',
|
||||
'disabled_text': '#BFA1A1',
|
||||
'frame': '#F8F2D0',
|
||||
'gm_root': '#D98989',
|
||||
'label': '#5D1010',
|
||||
'mm_root': '#D98989',
|
||||
'widget': '#F09898',
|
||||
'widget_hover': '#D6C5BB',
|
||||
'widget_selected': '#B31E1E',
|
||||
'widget_text': '#593131'},
|
||||
'Ice Queen': {'disabled': '#F0F2F2',
|
||||
'disabled_text': '#FBFBFB',
|
||||
'frame': '#ffffff',
|
||||
'gm_root': '#E6E6E6',
|
||||
'label': '#D9D9D9',
|
||||
'mm_root': '#E6E6E6',
|
||||
'widget': '#D9D9D9',
|
||||
'widget_hover': '#F0F2F2',
|
||||
'widget_selected': '#737373',
|
||||
'widget_text': '#ffffff'},
|
||||
'Mocha Latte': {'disabled': '#614D3A',
|
||||
'disabled_text': '#80654D',
|
||||
'frame': '#926841',
|
||||
'gm_root': '#1A140E',
|
||||
'label': '#F1EBE5',
|
||||
'mm_root': '#1A140E',
|
||||
'widget': '#4D3B29',
|
||||
'widget_hover': '#996E45',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#B99D83'},
|
||||
'Muted Horror': {'disabled': '#73735C',
|
||||
'disabled_text': '#8C8C70',
|
||||
'frame': '#555544',
|
||||
'gm_root': '#1A0001',
|
||||
'label': '#1A0001',
|
||||
'mm_root': '#1A0001',
|
||||
'widget': '#777777',
|
||||
'widget_hover': '#73735C',
|
||||
'widget_selected': '#000000',
|
||||
'widget_text': '#404033'},
|
||||
'Old Polaroid': {'disabled': '#A89E7D',
|
||||
'disabled_text': '#CCC097',
|
||||
'frame': '#49403E',
|
||||
'gm_root': '#A84A3E',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#A84A3E',
|
||||
'widget': '#A89E7D',
|
||||
'widget_hover': '#8DB6B9',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#49403E'},
|
||||
'Really Red': {'disabled': '#404040',
|
||||
'disabled_text': '#c8c8c8',
|
||||
'frame': '#e17373',
|
||||
'gm_root': '#ffd0d0',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#ffd0d0',
|
||||
'widget': '#963232',
|
||||
'widget_hover': '#c83232',
|
||||
'widget_selected': '#ffffc8',
|
||||
'widget_text': '#ffffff'},
|
||||
'Summer Sky': {'disabled': '#6074BF',
|
||||
'disabled_text': '#7383BF',
|
||||
'frame': '#6074BF',
|
||||
'gm_root': '#B4CDD4',
|
||||
'label': '#94C7D4',
|
||||
'mm_root': '#B4CDD4',
|
||||
'widget': '#F2E6AA',
|
||||
'widget_hover': '#FCFCA4',
|
||||
'widget_selected': '#1A5766',
|
||||
'widget_text': '#7DA8B3'},
|
||||
'Swamp Critter': {'disabled': '#A2521D',
|
||||
'disabled_text': '#753D00',
|
||||
'frame': '#797C1C',
|
||||
'gm_root': '#B09D5A',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#B09B4F',
|
||||
'widget': '#753D00',
|
||||
'widget_hover': '#B19A48',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#CCCAC2'},
|
||||
'Urban Sprawl': {'disabled': '#8F0000',
|
||||
'disabled_text': '#333333',
|
||||
'frame': '#8F0000',
|
||||
'gm_root': '#000000',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#000000',
|
||||
'widget': '#333333',
|
||||
'widget_hover': '#000000',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#6C8A2F'},
|
||||
'Victorian Gingerbread': {'disabled': '#7A674F',
|
||||
'disabled_text': '#664F33',
|
||||
'frame': '#BF8A73',
|
||||
'gm_root': '#695640',
|
||||
'label': '#F2EDC4',
|
||||
'mm_root': '#695640',
|
||||
'widget': '#7A674F',
|
||||
'widget_hover': '#BDA77D',
|
||||
'widget_selected': '#FDFBEE',
|
||||
'widget_text': '#F2EDC4'},
|
||||
'Watermelon Pie': {'disabled': '#FABF46',
|
||||
'disabled_text': '#FFE06D',
|
||||
'frame': '#C3CD91',
|
||||
'gm_root': '#F7F7C5',
|
||||
'label': '#FCFCD7',
|
||||
'mm_root': '#F7F7C5',
|
||||
'widget': '#FFE06D',
|
||||
'widget_hover': '#E38A4F',
|
||||
'widget_selected': '#996600',
|
||||
'widget_text': '#FAA700'},
|
||||
'White Chocolate': {'disabled': '#614D3A',
|
||||
'disabled_text': '#80654D',
|
||||
'frame': '#926841',
|
||||
'gm_root': '#FBF9EA',
|
||||
'label': '#F1EBE5',
|
||||
'mm_root': '#FBF9EA',
|
||||
'widget': '#33271C',
|
||||
'widget_hover': '#ECE7C4',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#B99D83'},
|
||||
'Winter Mint': {'disabled': '#426143',
|
||||
'disabled_text': '#819981',
|
||||
'frame': '#245536',
|
||||
'gm_root': '#e5f1e5',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#e5f1e5',
|
||||
'widget': '#7AA27B',
|
||||
'widget_hover': '#A3C7A3',
|
||||
'widget_selected': '#ffffff',
|
||||
'widget_text': '#CDE0CE'},
|
||||
'Mint Chocolate': {'disabled': '#ffe69c',
|
||||
'disabled_text': '#ddbc7e',
|
||||
'frame': '#8ab395',
|
||||
'gm_root': '#7a4229',
|
||||
'label': '#7a4229',
|
||||
'mm_root': '#7a4229',
|
||||
'widget': '#ffe69c',
|
||||
'widget_hover': '#f5c153',
|
||||
'widget_selected': '#7a4229',
|
||||
'widget_text': '#b5743a'},
|
||||
'Parachute Pants': {'disabled': '#53c7bb',
|
||||
'disabled_text': '#97d7bd',
|
||||
'frame': '#457b9f',
|
||||
'gm_root': '#37397f',
|
||||
'label': '#cce2ae',
|
||||
'mm_root': '#37397f',
|
||||
'widget': '#53c7bb',
|
||||
'widget_hover': '#97d7bd',
|
||||
'widget_selected': '#37397f',
|
||||
'widget_text': '#457b9f'},
|
||||
'Strawberry Orchard': {'disabled': '#b3c292',
|
||||
'disabled_text': '#525748',
|
||||
'frame': '#d8ebae',
|
||||
'gm_root': '#e7f3cb',
|
||||
'label': '#525748',
|
||||
'mm_root': '#e7f3cb',
|
||||
'widget': '#525748',
|
||||
'widget_hover': '#f45c73',
|
||||
'widget_selected': '#ffce95',
|
||||
'widget_text': '#e7f3cb'},
|
||||
'Grape Jelly': {'disabled': '#81859a',
|
||||
'disabled_text': '#5e2862',
|
||||
'frame': '#8ea9b0',
|
||||
'gm_root': '#5e2862',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#5e2862',
|
||||
'widget': '#c45693',
|
||||
'widget_hover': '#5e2862',
|
||||
'widget_selected': '#e59eae',
|
||||
'widget_text': '#ffffff'},
|
||||
'Dreamscape': {'disabled': '#966077',
|
||||
'disabled_text': '#c75f77',
|
||||
'frame': '#836177',
|
||||
'gm_root': '#c75f77',
|
||||
'label': '#fefab6',
|
||||
'mm_root': '#c75f77',
|
||||
'widget': '#77a493',
|
||||
'widget_hover': '#8accb3',
|
||||
'widget_selected': '#c75f77',
|
||||
'widget_text': '#ffffff'},
|
||||
'Unrequited Love': {'disabled': '#dbe4dd',
|
||||
'disabled_text': '#bd9ca9',
|
||||
'frame': '#fffeed',
|
||||
'gm_root': '#b38698',
|
||||
'label': '#23000e',
|
||||
'mm_root': '#b38698',
|
||||
'widget': '#7fa1b3',
|
||||
'widget_hover': '#b38698',
|
||||
'widget_selected': '#fffeed',
|
||||
'widget_text': '#ffffff'},
|
||||
|
||||
'Watermelon': {'disabled': '#f9cdad',
|
||||
'disabled_text': '#fc9d9a',
|
||||
'frame': '#f9cdad',
|
||||
'gm_root': '#83af9b',
|
||||
'label': '#fe4365',
|
||||
'mm_root': '#83af9b',
|
||||
'widget': '#fc9d9a',
|
||||
'widget_hover': '#fe4365',
|
||||
'widget_selected': '#e5fcc2',
|
||||
'widget_text': '#ffffff'},
|
||||
'City Lights': {'disabled': '#638e89',
|
||||
'disabled_text': '#594f4f',
|
||||
'frame': '#547980',
|
||||
'gm_root': '#594f4f',
|
||||
'label': '#e5fcc2',
|
||||
'mm_root': '#594f4f',
|
||||
'widget': '#45ada8',
|
||||
'widget_hover': '#2e5860',
|
||||
'widget_selected': '#e5fcc2',
|
||||
'widget_text': '#9de0ad'},
|
||||
'Vampire Bite': {'disabled': '#971140',
|
||||
'disabled_text': '#bd4b40',
|
||||
'frame': '#bd1550',
|
||||
'gm_root': '#490a3d',
|
||||
'label': '#f8ca00',
|
||||
'mm_root': '#490a3d',
|
||||
'widget': '#e97f02',
|
||||
'widget_hover': '#f5a240',
|
||||
'widget_selected': '#490a3d',
|
||||
'widget_text': '#bd1550'},
|
||||
'Underground Rave': {'disabled': '#57cdff',
|
||||
'disabled_text': '#717be5',
|
||||
'frame': '#04b4ff',
|
||||
'gm_root': '#cd249b',
|
||||
'label': '#000000',
|
||||
'mm_root': '#cd249b',
|
||||
'widget': '#8833ce',
|
||||
'widget_hover': '#cd249b',
|
||||
'widget_selected': '#b6d754',
|
||||
'widget_text': '#000000'},
|
||||
'Tree Frog': {'disabled': '#ffffff',
|
||||
'disabled_text': '#1c140d',
|
||||
'frame': '#cbe86b',
|
||||
'gm_root': '#ffffff',
|
||||
'label': '#1c140d',
|
||||
'mm_root': '#ffffff',
|
||||
'widget': '#1c140d',
|
||||
'widget_hover': '#86827e',
|
||||
'widget_selected': '#f2e9e1',
|
||||
'widget_text': '#cbe86b'},
|
||||
'Sun Kissed': {'disabled': '#ffffff',
|
||||
'disabled_text': '#ec4c51',
|
||||
'frame': '#f0874d',
|
||||
'gm_root': '#f8c821',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#f8c821',
|
||||
'widget': '#ec4c51',
|
||||
'widget_hover': '#dc454a',
|
||||
'widget_selected': '#f8c821',
|
||||
'widget_text': '#ffffff'},
|
||||
'Vintage Faded': {'disabled': '#b17d6f',
|
||||
'disabled_text': '#8c4e3d',
|
||||
'frame': '#ab7464',
|
||||
'gm_root': '#935844',
|
||||
'label': '#f7d3c8',
|
||||
'mm_root': '#935844',
|
||||
'widget': '#8c4e3d',
|
||||
'widget_hover': '#734032',
|
||||
'widget_selected': '#fcf5ed',
|
||||
'widget_text': '#e2b9ad'},
|
||||
'Vintage': {'disabled': '#883e35',
|
||||
'disabled_text': '#b86258',
|
||||
'frame': '#b86258',
|
||||
'gm_root': '#a24637',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#a24637',
|
||||
'widget': '#6c2921',
|
||||
'widget_hover': '#832f26',
|
||||
'widget_selected': '#ffc7c0',
|
||||
'widget_text': '#fff4eb'},
|
||||
'Earth Tones': {'disabled': '#12612f',
|
||||
'disabled_text': '#2c6e44',
|
||||
'frame': '#00551f',
|
||||
'gm_root': '#6b4a27',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#568153',
|
||||
'widget': '#ad8c31',
|
||||
'widget_hover': '#568153',
|
||||
'widget_selected': '#f2edc4',
|
||||
'widget_text': '#ffffff'},
|
||||
'Kindergarten': {'disabled': '#1ca4b2',
|
||||
'disabled_text': '#22d5b3',
|
||||
'frame': '#22d5b3',
|
||||
'gm_root': '#ffeca6',
|
||||
'label': '#ffffff',
|
||||
'mm_root': '#ffeca6',
|
||||
'widget': '#1781b1',
|
||||
'widget_hover': '#12678e',
|
||||
'widget_selected': '#f2edc4',
|
||||
'widget_text': '#fdfbee'},
|
||||
'Phone Operator': {'disabled': '#929292',
|
||||
'disabled_text': '#ababab',
|
||||
'frame': '#d2d2d2',
|
||||
'gm_root': '#59667a',
|
||||
'label': '#343e4d',
|
||||
'mm_root': '#59667a',
|
||||
'widget': '#59667a',
|
||||
'widget_hover': '#343e4d',
|
||||
'widget_selected': '#bed4f6',
|
||||
'widget_text': '#ffffff'},
|
||||
}
|
||||
|
||||
ROUNDRECT_VARIANTS = [
|
||||
("Roundrect", "roundrect"),
|
||||
("Bordered", "bordered"),
|
||||
("Diamond", "diamond"),
|
||||
("Regal", "regal"),
|
||||
("Austen", "austen"),
|
||||
("TV", "tv"),
|
||||
("3D", "threeD"),
|
||||
("Glow", "glow"),
|
||||
("Marker", "marker"),
|
||||
("Crayon", "crayon"),
|
||||
]
|
||||
|
||||
ROUNDRECT_CODE = """theme.%(function)s(
|
||||
## Theme: %(theme)s
|
||||
## Color scheme: %(scheme)s
|
||||
|
||||
## The color of an idle widget face.
|
||||
widget = "%(widget)s",
|
||||
|
||||
## The color of a focused widget face.
|
||||
widget_hover = "%(widget_hover)s",
|
||||
|
||||
## The color of the text in a widget.
|
||||
widget_text = "%(widget_text)s",
|
||||
|
||||
## The color of the text in a selected widget. (For
|
||||
## example, the current value of a preference.)
|
||||
widget_selected = "%(widget_selected)s",
|
||||
|
||||
## The color of a disabled widget face.
|
||||
disabled = "%(disabled)s",
|
||||
|
||||
## The color of disabled widget text.
|
||||
disabled_text = "%(disabled_text)s",
|
||||
|
||||
## The color of informational labels.
|
||||
label = "%(label)s",
|
||||
|
||||
## The color of a frame containing widgets.
|
||||
frame = "%(frame)s",
|
||||
|
||||
## The background of the main menu. This can be a color
|
||||
## beginning with '#', or an image filename. The latter
|
||||
## should take up the full height and width of the screen.
|
||||
mm_root = "%(mm_root)s",
|
||||
|
||||
## The background of the game menu. This can be a color
|
||||
## beginning with '#', or an image filename. The latter
|
||||
## should take up the full height and width of the screen.
|
||||
gm_root = "%(gm_root)s",
|
||||
|
||||
## If this is True, the in-game window is rounded. If False,
|
||||
## the in-game window is square.
|
||||
rounded_window = False,
|
||||
|
||||
## And we're done with the theme. The theme will customize
|
||||
## various styles, so if we want to change them, we should
|
||||
## do so below.
|
||||
)"""
|
||||
|
||||
for theme, function in ROUNDRECT_VARIANTS:
|
||||
THEME[theme] = { }
|
||||
THEME_FUNCTIONS.add(function)
|
||||
THEME_SCREEN_OPERATIONS[theme] = roundrect_screen_ops
|
||||
|
||||
for scheme, colors in ROUNDRECT_SCHEMES.iteritems():
|
||||
subs = dict(colors)
|
||||
subs["function"] = function
|
||||
subs["theme"] = theme
|
||||
subs["scheme"] = scheme
|
||||
|
||||
THEME[theme][scheme] = ROUNDRECT_CODE % (subs)
|
||||
|
||||
AWT_CODE = """theme.a_white_tulip(
|
||||
## Theme: A White Tulip
|
||||
## Scheme %(scheme)s
|
||||
|
||||
## The color of an idle widget face.
|
||||
widget = "%(widget)s",
|
||||
|
||||
## The color of a focused widget face.
|
||||
widget_hover = "%(widget_hover)s",
|
||||
|
||||
## The color of the text in a selected widget. (For
|
||||
## example, the current value of a preference.)
|
||||
widget_selected = "%(widget_selected)s",
|
||||
|
||||
## The color of a disabled widget face.
|
||||
disabled = "%(disabled)s",
|
||||
|
||||
## The color of a frame containing widgets.
|
||||
frame = "%(frame)s",
|
||||
|
||||
## The background of the main menu. This can be a color
|
||||
## beginning with '#', or an image filename. The latter
|
||||
## should take up the full height and width of the screen.
|
||||
mm_root = "%(mm_root)s",
|
||||
|
||||
## The background of the game menu. This can be a color
|
||||
## beginning with '#', or an image filename. The latter
|
||||
## should take up the full height and width of the screen.
|
||||
gm_root = "%(gm_root)s",
|
||||
|
||||
## The fonts used by this theme. The default fonts may not be
|
||||
## suitable for non-English languages.
|
||||
regular_font = "_theme_awt/Quicksand-Regular.ttf",
|
||||
bold_font = "_theme_awt/Quicksand-Bold.ttf",
|
||||
|
||||
## And we're done with the theme. The theme will customize
|
||||
## various styles, so if we want to change them, we should
|
||||
## do so below.
|
||||
)"""
|
||||
|
||||
THEME["A White Tulip"] = { }
|
||||
THEME_FUNCTIONS.add("a_white_tulip")
|
||||
THEME_SCREEN_OPERATIONS["A White Tulip"] = awt_screen_ops
|
||||
|
||||
|
||||
for scheme, colors in ROUNDRECT_SCHEMES.iteritems():
|
||||
subs = dict(colors)
|
||||
subs["scheme"] = scheme
|
||||
|
||||
THEME["A White Tulip"][scheme] = AWT_CODE % (subs)
|
||||
|
||||
THEME["A White Tulip"]["A White Tulip"] = AWT_CODE % dict(
|
||||
scheme = "A White Tulip",
|
||||
widget = "#c1c6d3",
|
||||
widget_hover = "#d7dbe5",
|
||||
widget_text = "#6b6b6b",
|
||||
widget_selected = "#c1c6d3",
|
||||
disabled = "#b4b4b4",
|
||||
disabled_text = "#6b6b6b",
|
||||
label = "#6b6b6b",
|
||||
frame = "#9391c9",
|
||||
mm_root = "#ffffff",
|
||||
gm_root = "#ffffff",
|
||||
)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# Copyright 2007 PyTom <pytom@bishoujo.us>
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -19,27 +21,24 @@
|
||||
# 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 renpy
|
||||
import pygame
|
||||
# This is used on Linux and Mac to prompt the user for the projects
|
||||
# directory.
|
||||
|
||||
import sys
|
||||
|
||||
# Python3 and Python2-style imports.
|
||||
try:
|
||||
import _renpy_font
|
||||
pygame.font = _renpy_font
|
||||
except:
|
||||
pass
|
||||
from tkinter import Tk
|
||||
from tkinter.filedialog import askdirectory
|
||||
except ImportError:
|
||||
from Tkinter import Tk
|
||||
from tkFileDialog import askdirectory
|
||||
|
||||
def Font(filename, size):
|
||||
"""
|
||||
RPG: Extended to load fonts from the game directory.
|
||||
"""
|
||||
# Create the TK canvas.
|
||||
|
||||
if filename is None:
|
||||
filename = renpy.store.style.default.font
|
||||
|
||||
return pygame.font.Font(renpy.loader.transfn(filename), size)
|
||||
|
||||
def init():
|
||||
"""
|
||||
RPG: Does nothing.
|
||||
"""
|
||||
if __name__ == "__main__":
|
||||
root = Tk()
|
||||
root.withdraw()
|
||||
|
||||
result = askdirectory(initialdir=sys.argv[1], parent=root, title="Select Ren'Py Projects Directory")
|
||||
sys.stdout.write(result)
|
||||
@@ -0,0 +1,10 @@
|
||||
translate french strings:
|
||||
|
||||
# game/about.rpy:21
|
||||
old "[version!q]"
|
||||
new "[version!q]"
|
||||
|
||||
# game/about.rpy:25
|
||||
old "View license"
|
||||
new "Voir la licence"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
translate french strings:
|
||||
|
||||
# game/add_file.rpy:7
|
||||
old "FILENAME"
|
||||
new "NOM DU FICHIER"
|
||||
|
||||
# game/add_file.rpy:7
|
||||
old "Enter the name of the script file to create."
|
||||
new "Entrez le nom du fichier de script à créer."
|
||||
|
||||
# game/add_file.rpy:10
|
||||
old "The filename must have the .rpy extension."
|
||||
new "Le fichier doit avoir l'extension .rpy."
|
||||
|
||||
# game/add_file.rpy:18
|
||||
old "The file already exists."
|
||||
new "Le fichier éxiste déjà."
|
||||
|
||||
# game/add_file.rpy:21
|
||||
old "# Ren'Py automatically loads all script files ending with .rpy. To use this\n# file, define a label and jump to it from another file.\n"
|
||||
new "Ren'Py charge automatiquement tous les fichiers de script finissant par .rpy. Pour utiliser ce ficher\n#, définissez un label et faites un «jump» vers lui depuis un autre fichier.\n"
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
translate french strings:
|
||||
|
||||
# game/android.rpy:12
|
||||
old "To build Android packages, please download RAPT (from {a=http://www.renpy.org/dl/android}here{/a}), unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher."
|
||||
new "Pour construire les paquets Android, téléchargez RAPT (depuis {a=http://www.renpy.org/dl/android}here{/a}), dézippé le, et placez le dans le répertoire de Ren'Py. Puis, redémarrez Ren'Py."
|
||||
|
||||
# game/android.rpy:13
|
||||
old "RAPT has been installed, but you'll need to install the Android SDK before you can build Android packages. Choose Install SDK to do this."
|
||||
new "RAPT a été installé, mais vous devez installer le kit de développement Android pour pouvoir construire les paquets Android. Choisissez \"installer le kit de développement et créer les clés\" pour cela"
|
||||
|
||||
# game/android.rpy:14
|
||||
old "RAPT has been installed, but a key hasn't been configured. Please create a new key, or restore android.keystore."
|
||||
new "RAPT a été installé, mais aucune clé n'a été configurée. Créez une nouvelle clé, ou restaurez android.keystore."
|
||||
|
||||
# game/android.rpy:15
|
||||
old "The current project has not been configured. Use \"Configure\" to configure it before building."
|
||||
new "Le projet courant n'a pas été configuré. Choisissez \"Configurer\' pour effectuer la configuration."
|
||||
|
||||
# game/android.rpy:16
|
||||
old "Choose \"Build\" to build the current project, or attach an Android device and choose \"Build & Install\" to build and install it on the device."
|
||||
new "Choisissez \"Construire\" pour construire le projet courant, ou connecté un appareil Android et choisissez \"Construire et Installer\" pour l'installer sur l'appareil."
|
||||
|
||||
# game/android.rpy:18
|
||||
old "Attempts to emulate an Android phone.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button."
|
||||
new "Tentative d'émulation d'un téléphone Android.\n\nLe touché est émulé via la souris, mails uniquement lorsque le bouton est pressé. La barre d'espace correspond au bouton menu, et la touche PageUp correspond au bouton retour."
|
||||
|
||||
# game/android.rpy:19
|
||||
old "Attempts to emulate an Android tablet.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button."
|
||||
new "Tentative d'émulation d'une tablette Android.\n\nLe touché est émulé via la souris, mails uniquement lorsque le bouton est pressé. La barre d'espace correspond au bouton menu, et la touche PageUp correspond au bouton retour."
|
||||
|
||||
# game/android.rpy:20
|
||||
old "Attempts to emulate an OUYA console.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button."
|
||||
new "Tentative d'émulation d'une console OUYA.\n\nLe pad est émulé via les flèches du clavier. La touche Entrée correspond au bouton select, la barre d'espace au bouton menu, et la touche PageUp correspond au bouton retour."
|
||||
|
||||
# game/android.rpy:22
|
||||
old "Downloads and installs the Android SDK and supporting packages. Optionally, generates the keys required to sign the package."
|
||||
new "Télécharge et installe le kit de développement Android et les paquets supportés. Optionnellement, génère les clés requises pour signer le paquet."
|
||||
|
||||
# game/android.rpy:23
|
||||
old "Configures the package name, version, and other information about this project."
|
||||
new "Configure le nom du packet, sa version et d'autres informations à propos de ce projet."
|
||||
|
||||
# game/android.rpy:24
|
||||
old "Opens the file containing the Google Play keys in the editor.\n\nThis is only needed if the application is using an expansion APK. Read the documentation for more details."
|
||||
new "Ouvre le fichier contenant les clés Google Play dans l'éditeur.\n\nCela est nécessaire uniquement si l'application utilise une expansion APK. Référez-vous à la documentation pour plus d'informations."
|
||||
|
||||
# game/android.rpy:25
|
||||
old "Builds the Android package."
|
||||
new "Construire le paquet Android."
|
||||
|
||||
# game/android.rpy:26
|
||||
old "Builds the Android package, and installs it on an Android device connected to your computer."
|
||||
new "Construire le paquet Android, et l'installer sur l'appareil Android connecté à votre ordinateur."
|
||||
|
||||
# game/android.rpy:142
|
||||
old "{a=%s}%s{/a}"
|
||||
new "{a=%s}%s{/a}"
|
||||
|
||||
# game/android.rpy:361
|
||||
old "Android: [project.current.name!q]"
|
||||
new "Android: [project.current.name!q]"
|
||||
|
||||
# game/android.rpy:381
|
||||
old "Emulation:"
|
||||
new "Émulateur:"
|
||||
|
||||
# game/android.rpy:389
|
||||
old "Phone"
|
||||
new "Téléphone"
|
||||
|
||||
# game/android.rpy:393
|
||||
old "Tablet"
|
||||
new "Tablette"
|
||||
|
||||
# game/android.rpy:397
|
||||
old "Television / OUYA"
|
||||
new "Télévision / OUYA"
|
||||
|
||||
# game/android.rpy:409
|
||||
old "Build:"
|
||||
new "Construire:"
|
||||
|
||||
# game/android.rpy:417
|
||||
old "Install SDK & Create Keys"
|
||||
new "Installer le kit de développement et créer les clés"
|
||||
|
||||
# game/android.rpy:421
|
||||
old "Configure"
|
||||
new "Configurer"
|
||||
|
||||
# game/android.rpy:425
|
||||
old "Build Package"
|
||||
new "Construire le paquet"
|
||||
|
||||
# game/android.rpy:429
|
||||
old "Build & Install"
|
||||
new "Construire et installer"
|
||||
|
||||
# game/android.rpy:13
|
||||
old "A 32-bit Java Development Kit is required to build Android packages on Windows. The JDK is different from the JRE, so it's possible you have Java without having the JDK.\n\nPlease {a=http://www.oracle.com/technetwork/java/javase/downloads/index.html}download and install the JDK{/a}, then restart the Ren'Py launcher."
|
||||
new "Un Kit de Développement Java (JDK) 32 bits est nécessaire pour construire les paquets pour Android depuis Windows. Le JDK n'est pas la même chose que le JRE, il est possible que Java soit installé sur votre machine sans le JDK.\n\n{a=http://www.oracle.com/technetwork/java/javase/downloads/index.html}Téléchargez et installez le JDK{/a}, puis relancer le lanceur Ren'Py."
|
||||
@@ -0,0 +1,41 @@
|
||||
translate french strings:
|
||||
|
||||
# game/choose_theme.rpy:274
|
||||
old "Could not change the theme. Perhaps options.rpy was changed too much."
|
||||
new "Impossible de changer le thème. Peut être que options.rpy a été trop modifié."
|
||||
|
||||
# game/choose_theme.rpy:332
|
||||
old "Display"
|
||||
new "Affichage"
|
||||
|
||||
# game/choose_theme.rpy:333
|
||||
old "Window"
|
||||
new "Fenêtre"
|
||||
|
||||
# game/choose_theme.rpy:334
|
||||
old "Fullscreen"
|
||||
new "Plein écran"
|
||||
|
||||
# game/choose_theme.rpy:335
|
||||
old "Planetarium"
|
||||
new "Planetarium"
|
||||
|
||||
# game/choose_theme.rpy:342
|
||||
old "Sound Volume"
|
||||
new "Volume sonore"
|
||||
|
||||
# game/choose_theme.rpy:376
|
||||
old "Choose Theme"
|
||||
new "Choisir un thème"
|
||||
|
||||
# game/choose_theme.rpy:389
|
||||
old "Theme"
|
||||
new "Thème"
|
||||
|
||||
# game/choose_theme.rpy:413
|
||||
old "Color Scheme"
|
||||
new "Agencement des couleurs"
|
||||
|
||||
# game/choose_theme.rpy:444
|
||||
old "Continue"
|
||||
new "Continuer"
|
||||
@@ -0,0 +1,281 @@
|
||||
translate french strings:
|
||||
|
||||
# renpy/common/00updater.rpy:1258
|
||||
old "Updater"
|
||||
new "Programme de mise à jour"
|
||||
|
||||
# renpy/common/00updater.rpy:1267
|
||||
old "This program is up to date."
|
||||
new "Ce programme est à jour."
|
||||
|
||||
# renpy/common/00updater.rpy:1269
|
||||
old "[u.version] is available. Do you want to install it?"
|
||||
new "La version [u.version]. Voulez-vous l'installer ?"
|
||||
|
||||
# renpy/common/00updater.rpy:1271
|
||||
old "Preparing to download the updates."
|
||||
new "Préparation du téléchargement de la mise à jour."
|
||||
|
||||
# renpy/common/00updater.rpy:1273
|
||||
old "Downloading the updates."
|
||||
new "Téléchargement de la mise à jour."
|
||||
|
||||
# renpy/common/00updater.rpy:1275
|
||||
old "Unpacking the updates."
|
||||
new "Dépaquetage de la mise à jour."
|
||||
|
||||
# renpy/common/00updater.rpy:1279
|
||||
old "The updates have been installed. The program will restart."
|
||||
new "La mise à jour a bien été effectuée. Le programme va redémarrer."
|
||||
|
||||
# renpy/common/00updater.rpy:1281
|
||||
old "The updates have been installed."
|
||||
new "La mise à jour a bien été effectuée."
|
||||
|
||||
# renpy/common/00updater.rpy:1283
|
||||
old "The updates were cancelled."
|
||||
new "La mise à jour a été annullée."
|
||||
|
||||
# renpy/common/_layout/classic_load_save.rpym:120
|
||||
old "Empty Slot."
|
||||
new "Emplacement vide."
|
||||
|
||||
# renpy/common/_layout/classic_load_save.rpym:152
|
||||
old "a"
|
||||
new "a"
|
||||
|
||||
# renpy/common/_layout/classic_load_save.rpym:161
|
||||
old "q"
|
||||
new "q"
|
||||
|
||||
# renpy/common/_layout/classic_joystick_preferences.rpym:76
|
||||
old "Joystick Mapping"
|
||||
new "Joystick"
|
||||
|
||||
# renpy/common/00layout.rpy:421
|
||||
old "Are you sure?"
|
||||
new "Êtes-vous sûr ?"
|
||||
|
||||
# renpy/common/00layout.rpy:422
|
||||
old "Are you sure you want to delete this save?"
|
||||
new "Êtes-vous sûr de vouloir supprimer cette sauvegarde ?"
|
||||
|
||||
# renpy/common/00layout.rpy:423
|
||||
old "Are you sure you want to overwrite your save?"
|
||||
new "Êtes-vous sûr de vouloir écraser cette sauvegarde ?"
|
||||
|
||||
# renpy/common/00layout.rpy:424
|
||||
old "Loading will lose unsaved progress.\nAre you sure you want to do this?"
|
||||
new "En effectuant ce chargement, vous perderez votre avancement non sauvegardé.\nÊtes-vous sûr de vouloire faire ça ?"
|
||||
|
||||
# renpy/common/00layout.rpy:425
|
||||
old "Are you sure you want to quit?"
|
||||
new "Êtes-vous sûr de vouloir quitter ?"
|
||||
|
||||
# renpy/common/00layout.rpy:426
|
||||
old "Are you sure you want to return to the main menu?\nThis will lose unsaved progress."
|
||||
new "Êtes-vous sûr de vouloir retourner au menu principal ?\nVous perdrez votre avancement non sauvegardé."
|
||||
|
||||
# renpy/common/00keymap.rpy:167
|
||||
old "Saved screenshot as %s."
|
||||
new "La capture d'écran a été enregistrée en tant que %s"
|
||||
|
||||
# renpy/common/00gltest.rpy:50
|
||||
old "Graphics Acceleration"
|
||||
new "Accélération graphique"
|
||||
|
||||
# renpy/common/00gltest.rpy:54
|
||||
old "Automatically Choose"
|
||||
new "Choix automatique"
|
||||
|
||||
# renpy/common/00gltest.rpy:59
|
||||
old "Force Angle/DirectX Renderer"
|
||||
new "Forcer le rendu Angle/DirectX"
|
||||
|
||||
# renpy/common/00gltest.rpy:63
|
||||
old "Force OpenGL Renderer"
|
||||
new "Forcer le rendu OpenGL"
|
||||
|
||||
# renpy/common/00gltest.rpy:67
|
||||
old "Force Software Renderer"
|
||||
new "Forcer le rendu logiciel"
|
||||
|
||||
# renpy/common/00gltest.rpy:73
|
||||
old "Changes will take effect the next time this program is run."
|
||||
new "Les changement seront pris en compte au prochin démarrage du programme."
|
||||
|
||||
# renpy/common/00gltest.rpy:77
|
||||
old "Quit"
|
||||
new "Quitter"
|
||||
|
||||
# renpy/common/00gltest.rpy:82
|
||||
old "Return"
|
||||
new "Retour"
|
||||
|
||||
# renpy/common/00gltest.rpy:112
|
||||
old "Performance Warning"
|
||||
new "Avertissement sur les performances"
|
||||
|
||||
# renpy/common/00gltest.rpy:117
|
||||
old "This computer is using software rendering."
|
||||
new "Cet ordinateur utilise le rendu logiciel."
|
||||
|
||||
# renpy/common/00gltest.rpy:119
|
||||
old "This computer is not using shaders."
|
||||
new "Cet ordinateur n'utilise pas les shaders."
|
||||
|
||||
# renpy/common/00gltest.rpy:121
|
||||
old "This computer is displaying graphics slowly."
|
||||
new "Cet ordinateur affiche lentement les graphismes."
|
||||
|
||||
# renpy/common/00gltest.rpy:123
|
||||
old "This computer has a problem displaying graphics: [problem]."
|
||||
new "Cet ordinateur rencontre des difficultés à afficher les graphismes: [problem]."
|
||||
|
||||
# renpy/common/00gltest.rpy:128
|
||||
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display. Updating DirectX could fix this problem."
|
||||
new "Les pilotes graphiques ne semblent pas à jour ou dysfonctionnent. Cela peut entraîner des ralentissements ou de mauvais affichages. Mettre à jour DirectX pourraît régler ce problème."
|
||||
|
||||
# renpy/common/00gltest.rpy:130
|
||||
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display."
|
||||
new "Les pilotes graphiques ne semblent pas à jour ou dysfonctionnent. Cela peut entraîner des ralentissements ou de mauvais affichages."
|
||||
|
||||
# renpy/common/00gltest.rpy:135
|
||||
old "Update DirectX"
|
||||
new "Mettre à jour DirectX"
|
||||
|
||||
# renpy/common/00gltest.rpy:141
|
||||
old "Continue, Show this warning again"
|
||||
new "Continer, Afficher cet avertissement la prochaine fois."
|
||||
|
||||
# renpy/common/00gltest.rpy:145
|
||||
old "Continue, Don't show warning again"
|
||||
new "Continer, Ne plus afficher cet avertissement."
|
||||
|
||||
# renpy/common/00gltest.rpy:171
|
||||
old "Updating DirectX."
|
||||
new "Mettre à jour de DirectX en cours"
|
||||
|
||||
# renpy/common/00gltest.rpy:175
|
||||
old "DirectX web setup has been started. It may start minimized in the taskbar. Please follow the prompts to install DirectX."
|
||||
new "La mise à jour de DirectX a débutée. Elle est sans doute minimisée dans la bare de tâche. Merci de suivre les instructions pour installer DirectX."
|
||||
|
||||
# renpy/common/00gltest.rpy:179
|
||||
old "{b}Note:{/b} Microsoft's DirectX web setup program will, by default, install the Bing toolbar. If you do not want this toolbar, uncheck the appropriate box."
|
||||
new "{b}Note:{/b} le programme d'installation de Microsoft's DirectX va, par defaut, installer la barre d'outils Bing. Si vous ne voulez pas de cette barre, décochez la case appropriée."
|
||||
|
||||
# renpy/common/00gltest.rpy:183
|
||||
old "When setup finishes, please click below to restart this program."
|
||||
new "Lorsque l'instllation sera terminée, cliquez ci-dessous pour redémarrer ce programme."
|
||||
|
||||
# renpy/common/00gltest.rpy:185
|
||||
old "Restart"
|
||||
new "Redémarrer"
|
||||
|
||||
# renpy/common/_errorhandling.rpym:408
|
||||
old "An exception has occurred."
|
||||
new "Une exception a été levée."
|
||||
|
||||
# renpy/common/_errorhandling.rpym:434
|
||||
old "Rollback"
|
||||
new "Revenir en arrière"
|
||||
|
||||
# renpy/common/_errorhandling.rpym:436
|
||||
old "Attempts a roll back to a prior time, allowing you to save or choose a different choice."
|
||||
new "Tenter de revenir en arrière, vous permet de sauvegarder ou de faire un autre choix."
|
||||
|
||||
# renpy/common/_errorhandling.rpym:439
|
||||
old "Ignore"
|
||||
new "Ignorer"
|
||||
|
||||
# renpy/common/_errorhandling.rpym:441
|
||||
old "Ignores the exception, allowing you to continue. This often leads to additional errors."
|
||||
new "Ignorer l'exception vous permet de continuer. Cela entraîne généralement des erreurs additionelles."
|
||||
|
||||
# renpy/common/_errorhandling.rpym:444
|
||||
old "Reload"
|
||||
new "Recharger"
|
||||
|
||||
# renpy/common/_errorhandling.rpym:446
|
||||
old "Reloads the game from disk, saving and restoring game state if possible."
|
||||
new "Recharger le jeu depuis le disque dur and tenter de restaurer le jeu dans l'état actuel."
|
||||
|
||||
# renpy/common/_errorhandling.rpym:448
|
||||
old "Open Traceback"
|
||||
new "Ouvrir la pile d'appel"
|
||||
|
||||
# renpy/common/_errorhandling.rpym:450
|
||||
old "Opens the traceback.txt file in a text editor."
|
||||
new "Ouvrir traceback.txt dans un éditeur de texte."
|
||||
|
||||
# renpy/common/_errorhandling.rpym:456
|
||||
old "Quits the game."
|
||||
new "Quitter le jeu."
|
||||
|
||||
# renpy/common/_errorhandling.rpym:483
|
||||
old "Parsing the script failed."
|
||||
new "L'analyse du script a échouée."
|
||||
|
||||
# renpy/common/_errorhandling.rpym:510
|
||||
old "Open Parse Errors"
|
||||
new "Ouvrir les erreurs d'analyse."
|
||||
|
||||
# renpy/common/_errorhandling.rpym:512
|
||||
old "Opens the errors.txt file in a text editor."
|
||||
new "Ouvrir errors.txt dans un éditeur de texte."
|
||||
|
||||
# renpy/common/00action_file.rpy:118
|
||||
old "%b %d, %H:%M"
|
||||
new "%b %d, %H:%M"
|
||||
|
||||
# renpy/common/_compat/gamemenu.rpym:337
|
||||
old "Previous"
|
||||
new "Précédent"
|
||||
|
||||
# renpy/common/_compat/gamemenu.rpym:344
|
||||
old "Next"
|
||||
new "Suivant"
|
||||
|
||||
# renpy/common/00library.rpy:77
|
||||
old "Skip Mode"
|
||||
new "Mode rapide"
|
||||
|
||||
# renpy/common/00library.rpy:80
|
||||
old "Fast Skip Mode"
|
||||
new "Mode très rapide"
|
||||
|
||||
# renpy/common/00gallery.rpy:521
|
||||
old "Image [index] of [count] locked."
|
||||
new "Image [index] sur [count] verrouillée."
|
||||
|
||||
# renpy/common/00gallery.rpy:539
|
||||
old "prev"
|
||||
new "précédent"
|
||||
|
||||
# renpy/common/00gallery.rpy:540
|
||||
old "next"
|
||||
new "suivant"
|
||||
|
||||
# renpy/common/00gallery.rpy:541
|
||||
old "slideshow"
|
||||
new "diaporama"
|
||||
|
||||
# renpy/common/00gallery.rpy:542
|
||||
old "return"
|
||||
new "retour"
|
||||
|
||||
# renpy/common/00layout.rpy:427
|
||||
old "Are you sure you want to begin skipping?"
|
||||
new "Êtes-vous sûr de vouloir commencer à sauter certaines étapes ?"
|
||||
|
||||
# renpy/common/00layout.rpy:428
|
||||
old "Are you sure you want to skip to the next choice?"
|
||||
new "Êtes-vous sûr de vouloir sauter le prochain choix ?"
|
||||
|
||||
# renpy/common/00layout.rpy:429
|
||||
old "Are you sure you want to skip to unseen dialogue or the next choice?"
|
||||
new "Êtes-vous sûr de vouloir sauter des dialogues non lus or le prochain choix ?"
|
||||
|
||||
# renpy/common/00action_file.rpy:587
|
||||
old "Quick save complete."
|
||||
new "Sauvegarde rapide effectuée."
|
||||
@@ -0,0 +1,37 @@
|
||||
translate french strings:
|
||||
|
||||
# game/distribute.rpy:333
|
||||
old "Nothing to do."
|
||||
new "Rien à faire."
|
||||
|
||||
# game/distribute.rpy:337
|
||||
old "Scanning project files..."
|
||||
new "Scan des fichiers du projet..."
|
||||
|
||||
# game/distribute.rpy:344
|
||||
old "Scanning Ren'Py files..."
|
||||
new "Scan des fichiers Ren'Py..."
|
||||
|
||||
# game/distribute.rpy:494
|
||||
old "Archiving files..."
|
||||
new "Archivage des fichiers..."
|
||||
|
||||
# game/distribute.rpy:745
|
||||
old "Writing the [variant] [format] package."
|
||||
new "Écriture du paquet [variant] [format]."
|
||||
|
||||
# game/distribute.rpy:758
|
||||
old "Making the [variant] update zsync file."
|
||||
new "Création du fichier de mise à jour zsync [variant]."
|
||||
|
||||
# game/distribute.rpy:854
|
||||
old "Processed {b}[complete]{/b} of {b}[total]{/b} files."
|
||||
new "Traitement du fichier {b}[complete]{/b} sur {b}[total]{/b}."
|
||||
|
||||
# game/distribute.rpy:915
|
||||
old "All packages have been built.\n\nDue to the presence of permission information, unpacking and repacking the Linux and Macintosh distributions on Windows is not supported."
|
||||
new "Tous les paquets ont été contruits.\n\nDu fait de la présence des systèmes de permissions, il n'est pas possible de reconstruire les paquets construits sur GNU-Linux ou Mac OS sur Windows."
|
||||
|
||||
# game/distribute.rpy:358
|
||||
old "No packages are selected, so there's nothing to do."
|
||||
new "Aucun paquet sélectionné, il n'y a donc rien à faire."
|
||||
@@ -0,0 +1,41 @@
|
||||
translate french strings:
|
||||
|
||||
# game/distribute_gui.rpy:139
|
||||
old "Build Distributions: [project.current.name!q]"
|
||||
new "Construction des packets: [project.current.name!q]"
|
||||
|
||||
# game/distribute_gui.rpy:154
|
||||
old "Directory Name:"
|
||||
new "Nom du répertoire:"
|
||||
|
||||
# game/distribute_gui.rpy:158
|
||||
old "Executable Name:"
|
||||
new "Nom de l'exécutable:"
|
||||
|
||||
# game/distribute_gui.rpy:175
|
||||
old "Edit options.rpy"
|
||||
new "Éditer options.rpy"
|
||||
|
||||
# game/distribute_gui.rpy:176
|
||||
old "Refresh"
|
||||
new "Rafraichir"
|
||||
|
||||
# game/distribute_gui.rpy:193
|
||||
old "Build Packages:"
|
||||
new "Construire les packets:"
|
||||
|
||||
# game/distribute_gui.rpy:208
|
||||
old "Build Updates"
|
||||
new "Construire les mises à jour"
|
||||
|
||||
# game/distribute_gui.rpy:212
|
||||
old "Build"
|
||||
new "Construire"
|
||||
|
||||
# game/distribute_gui.rpy:219
|
||||
old "Errors were detected when running the project. Please ensure the project runs without errors before building distributions."
|
||||
new "Des erreurs ont été détectées lors de l'utilisation du projet. Assurez-vous qu'il n'y ait plus d'erreur avant de construire les packets."
|
||||
|
||||
# game/distribute_gui.rpy:236
|
||||
old "Your project does not contain build information. Would you like to add build information to the end of options.rpy?"
|
||||
new "Votre projet ne contient pas d'information pour la construction. Voulez-vous ajouter ces informations à la fin de options.rpy ?"
|
||||
@@ -0,0 +1,57 @@
|
||||
translate french strings:
|
||||
|
||||
# game/editor.rpy:120
|
||||
old "{b}Recommended.{/b} A beta editor with an easy to use interface and features that aid in development, such as spell-checking. Editra currently lacks the IME support required for Chinese, Japanese, and Korean text input."
|
||||
new "{b}Recommendé.{/b} Un éditeur en version bêta avec une interface simple et des fonctionnalités d'assistance au développement. Editra manque pour le moment du support pour les textes en chinois, japonais et coréen."
|
||||
|
||||
# game/editor.rpy:121
|
||||
old "{b}Recommended.{/b} A beta editor with an easy to use interface and features that aid in development, such as spell-checking. Editra currently lacks the IME support required for Chinese, Japanese, and Korean text input. On Linux, Editra requires wxPython."
|
||||
new "{b}Recommendé.{/b} Un éditeur en version bêta avec une interface simple et des fonctionnalités d'assistance au développement. Editra manque pour le moment du support pour les textes en chinois, japonais et coréen. Sur GNU-Linux, Editra nécessite wxPython."
|
||||
|
||||
# game/editor.rpy:137
|
||||
old "The may have occured because wxPython is not installed on this system."
|
||||
new "Cela est sans doute arrivé car wxPython n'est pas installé sur ce système."
|
||||
|
||||
# game/editor.rpy:144
|
||||
old "Up to 22 MB download required."
|
||||
new "Jusqu'à 22 MB de téléchargement requis."
|
||||
|
||||
# game/editor.rpy:157
|
||||
old "1.8 MB download required."
|
||||
new "1.8 MB de réléchargement requis."
|
||||
|
||||
# game/editor.rpy:158
|
||||
old "This may have occured because Java is not installed on this system."
|
||||
new "Cela est sans doute arrivé car Java n'est pas installé sur ce système."
|
||||
|
||||
# game/editor.rpy:327
|
||||
old "An exception occured while launching the text editor:\n[exception!q]"
|
||||
new "Une exception a été levée lors du lancement de l'édieteur de texte :\n[exception!q]"
|
||||
|
||||
# game/editor.rpy:378
|
||||
old "Select Editor"
|
||||
new "Sélectionnez un éditeur"
|
||||
|
||||
# game/editor.rpy:393
|
||||
old "A text editor is the program you'll use to edit Ren'Py script files. Here, you can select the editor Ren'Py will use. If not already present, the editor will be automatically downloaded and installed."
|
||||
new "Un éditeur de texte est un logiciel que vous utilisez pour éditer les fichiers de script Ren'Py. Vous pouvez choisir l'édteur que Ren'Py utilise. Si ce n'est pas déjà le cas, l'éditeur sera automatiquement téléchargé et installé."
|
||||
|
||||
# game/editor.rpy:415
|
||||
old "Cancel"
|
||||
new "Annuler"
|
||||
|
||||
# game/editor.rpy:137
|
||||
old "This may have occured because wxPython is not installed on this system."
|
||||
new "Cela est sans doute dû au fait que wxPython n'est pas installé sur votre système."
|
||||
|
||||
# game/editor.rpy:155
|
||||
old "A mature editor that requires Java."
|
||||
new "Un éditeur éprouvé nécessitant Java."
|
||||
|
||||
# game/editor.rpy:164
|
||||
old "Invokes the editor your operating system has associated with .rpy files."
|
||||
new "Lance l'éditeur associé par votre systèmes aux fichiers .rpy."
|
||||
|
||||
# game/editor.rpy:180
|
||||
old "Prevents Ren'Py from opening a text editor."
|
||||
new "Empêche Ren'Py d'ouvrir un éditeur de texte."
|
||||
@@ -0,0 +1,81 @@
|
||||
translate french strings:
|
||||
|
||||
# game/front_page.rpy:79
|
||||
old "+ Create New Project"
|
||||
new "+ Créer un nouveau projet"
|
||||
|
||||
# game/front_page.rpy:111
|
||||
old "Tutorial"
|
||||
new "Tutoriel"
|
||||
|
||||
# game/front_page.rpy:112
|
||||
old "The Question"
|
||||
new "The Question"
|
||||
|
||||
# game/front_page.rpy:128
|
||||
old "Active Project"
|
||||
new "Projet actif"
|
||||
|
||||
# game/front_page.rpy:136
|
||||
old "Open Directory"
|
||||
new "Ouvrir le répertoire"
|
||||
|
||||
# game/front_page.rpy:141
|
||||
old "game"
|
||||
new "game"
|
||||
|
||||
# game/front_page.rpy:142
|
||||
old "base"
|
||||
new "base"
|
||||
|
||||
# game/front_page.rpy:148
|
||||
old "Edit File"
|
||||
new "Éditer le fichier"
|
||||
|
||||
# game/front_page.rpy:156
|
||||
old "All script files"
|
||||
new "Tous les fichiers de script"
|
||||
|
||||
# game/front_page.rpy:165
|
||||
old "Navigate Script"
|
||||
new "Naviguer dans le script"
|
||||
|
||||
# game/front_page.rpy:176
|
||||
old "Check Script (Lint)"
|
||||
new "Vérifier le script (Lint)"
|
||||
|
||||
# game/front_page.rpy:177
|
||||
old "Change Theme"
|
||||
new "Changer de thème"
|
||||
|
||||
# game/front_page.rpy:178
|
||||
old "Delete Persistent"
|
||||
new "Supprimer persistant"
|
||||
|
||||
# game/front_page.rpy:186
|
||||
old "Build Distributions"
|
||||
new "Construire les packets"
|
||||
|
||||
# game/front_page.rpy:188
|
||||
old "Generate Translations"
|
||||
new "Générer fichiers de traduction"
|
||||
|
||||
# game/front_page.rpy:204
|
||||
old "Checking script for potential problems..."
|
||||
new "Vérifier le script vis à vis des problèmes potentiels..."
|
||||
|
||||
# game/front_page.rpy:219
|
||||
old "Deleting persistent data..."
|
||||
new "Supprimer les données persistantes..."
|
||||
|
||||
# game/front_page.rpy:204
|
||||
old "Android"
|
||||
new "Android"
|
||||
|
||||
# game/front_page.rpy:206
|
||||
old "Extract Dialogue"
|
||||
new "Extraire dialogue"
|
||||
|
||||
# game/front_page.rpy:126
|
||||
old "[p.name!q] (template)"
|
||||
new "[p.name!q] (gabarit)"
|
||||
@@ -0,0 +1,85 @@
|
||||
translate french strings:
|
||||
|
||||
# game/interface.rpy:89
|
||||
old "Documentation"
|
||||
new "Documentation"
|
||||
|
||||
# game/interface.rpy:90
|
||||
old "Ren'Py Website"
|
||||
new "Site Web de Ren'Py"
|
||||
|
||||
# game/interface.rpy:91
|
||||
old "Ren'Py Games List"
|
||||
new "Liste des jeux Ren'Py"
|
||||
|
||||
# game/interface.rpy:92
|
||||
old "About"
|
||||
new "À propos"
|
||||
|
||||
# game/interface.rpy:99
|
||||
old "update"
|
||||
new "mise à jour"
|
||||
|
||||
# game/interface.rpy:101
|
||||
old "preferences"
|
||||
new "préférences"
|
||||
|
||||
# game/interface.rpy:102
|
||||
old "quit"
|
||||
new "quitter"
|
||||
|
||||
# game/interface.rpy:149
|
||||
old "Yes"
|
||||
new "Oui"
|
||||
|
||||
# game/interface.rpy:151
|
||||
old "No"
|
||||
new "Non"
|
||||
|
||||
# game/interface.rpy:181
|
||||
old "Due to package format limitations, non-ASCII file and directory names are not allowed."
|
||||
new "Les caractères non-ASCII ne sont pas autorisés pour les noms de fichiers et répertoires."
|
||||
|
||||
# game/interface.rpy:183
|
||||
old "[title]"
|
||||
new "[title]"
|
||||
|
||||
# game/interface.rpy:248
|
||||
old "ERROR"
|
||||
new "ERREUR"
|
||||
|
||||
# game/interface.rpy:280
|
||||
old "While [what!q], an error occured:"
|
||||
new "Pendant que [what!q], une erreur est arrivée:"
|
||||
|
||||
# game/interface.rpy:281
|
||||
old "[exception!q]"
|
||||
new "[exception!q]"
|
||||
|
||||
# game/interface.rpy:298
|
||||
old "Text input may not contain the {{ or [[ characters."
|
||||
new "Le texte ne devrait pas contenir les caractères {{ ou [[."
|
||||
|
||||
# game/interface.rpy:303
|
||||
old "File and directory names may not contain / or \\."
|
||||
new "Les noms de fichiers et répertoires ne devrait pas contenir / ou \\."
|
||||
|
||||
# game/interface.rpy:309
|
||||
old "File and directory names must consist of ASCII characters."
|
||||
new "Les noms de fichiers et de répertoires doivent contenir uniquement des caractères ASCII."
|
||||
|
||||
# game/interface.rpy:330
|
||||
old "INFORMATION"
|
||||
new "INFORMATION"
|
||||
|
||||
# game/interface.rpy:373
|
||||
old "PROCESSING"
|
||||
new "TRAITEMENT"
|
||||
|
||||
# game/interface.rpy:390
|
||||
old "QUESTION"
|
||||
new "QUESTION"
|
||||
|
||||
# game/interface.rpy:451
|
||||
old "CHOICE"
|
||||
new "CHOIX"
|
||||
@@ -0,0 +1,73 @@
|
||||
translate french strings:
|
||||
|
||||
# game/navigation.rpy:150
|
||||
old "Navigate: [project.current.name]"
|
||||
new "Navigation: [project.current.name]"
|
||||
|
||||
# game/navigation.rpy:159
|
||||
old "Order: "
|
||||
new "Ordre:"
|
||||
|
||||
# game/navigation.rpy:160
|
||||
old "alphabetical"
|
||||
new "alphabétique"
|
||||
|
||||
# game/navigation.rpy:162
|
||||
old "by-file"
|
||||
new "par fichier"
|
||||
|
||||
# game/navigation.rpy:164
|
||||
old "natural"
|
||||
new "naturel"
|
||||
|
||||
# game/navigation.rpy:168
|
||||
old "refresh"
|
||||
new "rafraichir"
|
||||
|
||||
# game/navigation.rpy:176
|
||||
old "Category:"
|
||||
new "Catégorie:"
|
||||
|
||||
# game/navigation.rpy:178
|
||||
old "files"
|
||||
new "fichiers"
|
||||
|
||||
# game/navigation.rpy:179
|
||||
old "labels"
|
||||
new "labels"
|
||||
|
||||
# game/navigation.rpy:180
|
||||
old "defines"
|
||||
new "définitions"
|
||||
|
||||
# game/navigation.rpy:181
|
||||
old "transforms"
|
||||
new "transformations"
|
||||
|
||||
# game/navigation.rpy:182
|
||||
old "screens"
|
||||
new "écrans"
|
||||
|
||||
# game/navigation.rpy:183
|
||||
old "callables"
|
||||
new "appelables"
|
||||
|
||||
# game/navigation.rpy:184
|
||||
old "TODOs"
|
||||
new "TODOs"
|
||||
|
||||
# game/navigation.rpy:223
|
||||
old "+ Add script file"
|
||||
new "+ Ajouter un fichier de script"
|
||||
|
||||
# game/navigation.rpy:231
|
||||
old "No TODO comments found.\n\nTo create one, include \"# TODO\" in your script."
|
||||
new "Aucun commentaire «TODO» trouvé.\n\nPour un créer un, écrivez \"# TODO\" dans le script."
|
||||
|
||||
# game/navigation.rpy:238
|
||||
old "The list of names is empty."
|
||||
new "La liste des noms est vide."
|
||||
|
||||
# game/navigation.rpy:243
|
||||
old "Launch Project"
|
||||
new "Lancer le projet"
|
||||
@@ -0,0 +1,33 @@
|
||||
translate french strings:
|
||||
|
||||
# game/new_project.rpy:22
|
||||
old "Choose Project Template"
|
||||
new "Choisissez un patron de projet"
|
||||
|
||||
# game/new_project.rpy:40
|
||||
old "Please select a template to use for your new project. Ren'Py ships with a default template that creates an English-language game with standard screens."
|
||||
new "Merci de sélectioner un patron à utiliser pour votre nouveau projet. Ren'Py est livré avec un patron par défaut qui créé un jeu en anglais avec des écrans standards."
|
||||
|
||||
# game/new_project.rpy:55
|
||||
old "PROJECT NAME"
|
||||
new "NOM DU PROJET"
|
||||
|
||||
# game/new_project.rpy:56
|
||||
old "Please enter the name of your project:"
|
||||
new "Entrez le nom de votre projet:"
|
||||
|
||||
# game/new_project.rpy:62
|
||||
old "The project name may not be empty."
|
||||
new "Le nom du projet ne doit pas être vide."
|
||||
|
||||
# game/new_project.rpy:67
|
||||
old "[project_name!q] already exists. Please choose a different project name."
|
||||
new "Le projet [project_name!q] éxiste déjà. Choisissez un nom de projet différend."
|
||||
|
||||
# game/new_project.rpy:70
|
||||
old "[project_dir!q] already exists. Please choose a different project name."
|
||||
new "Le projet [project_name!q] éxiste déjà. Choisissez un nom de projet différend."
|
||||
|
||||
# game/new_project.rpy:40
|
||||
old "Please select a template to use for your new project. The template sets the default font and the user interface language. If your language is not supported, choose 'english'."
|
||||
new "Sélectionnez un gabarit pour votre nouveau projet. Le gabarit définit la police par défaut, ainsi que la langue de l'interface. Si votre langue n'est pas supportée, sélectionnez 'english'."
|
||||
@@ -0,0 +1,69 @@
|
||||
translate french strings:
|
||||
|
||||
# game/preferences.rpy:40
|
||||
old "Launcher Preferences"
|
||||
new "Préférence du lanceur"
|
||||
|
||||
# game/preferences.rpy:61
|
||||
old "Projects Directory:"
|
||||
new "Répertoire des projets:"
|
||||
|
||||
# game/preferences.rpy:68
|
||||
old "[persistent.projects_directory!q]"
|
||||
new "[persistent.projects_directory!q]"
|
||||
|
||||
# game/preferences.rpy:70
|
||||
old "Not Set"
|
||||
new "Non précisé"
|
||||
|
||||
# game/preferences.rpy:84
|
||||
old "Text Editor:"
|
||||
new "Éditeur:"
|
||||
|
||||
# game/preferences.rpy:106
|
||||
old "Update Channel:"
|
||||
new "Version"
|
||||
|
||||
# game/preferences.rpy:126
|
||||
old "Navigation Options:"
|
||||
new "Options de navigation:"
|
||||
|
||||
# game/preferences.rpy:130
|
||||
old "Include private names"
|
||||
new "Inclure les noms privés"
|
||||
|
||||
# game/preferences.rpy:131
|
||||
old "Include library names"
|
||||
new "Inclure les noms des bibliothèques"
|
||||
|
||||
# game/preferences.rpy:141
|
||||
old "Launcher Options:"
|
||||
new "Options du lanceur:"
|
||||
|
||||
# game/preferences.rpy:145
|
||||
old "Hardware rendering"
|
||||
new "Rendu matériel"
|
||||
|
||||
# game/preferences.rpy:148
|
||||
old "Console output"
|
||||
new "Sortie console"
|
||||
|
||||
# game/preferences.rpy:165
|
||||
old "Actions:"
|
||||
new "Actions:"
|
||||
|
||||
# game/preferences.rpy:169
|
||||
old "Open launcher project"
|
||||
new "Ouvrir le projet lanceur"
|
||||
|
||||
# game/preferences.rpy:183
|
||||
old "Language:"
|
||||
new "Langue:"
|
||||
|
||||
# game/preferences.rpy:193
|
||||
old "Back"
|
||||
new "Retour"
|
||||
|
||||
# game/preferences.rpy:146
|
||||
old "Show templates"
|
||||
new "Montrer les gabarits"
|
||||
@@ -0,0 +1,25 @@
|
||||
translate french strings:
|
||||
|
||||
# game/project.rpy:196
|
||||
old "Ren'Py is scanning the project..."
|
||||
new "Ren'Py est en train de scanner le projet..."
|
||||
|
||||
# game/project.rpy:485
|
||||
old "PROJECTS DIRECTORY"
|
||||
new "RÉPERTOIRE DES PROJETS"
|
||||
|
||||
# game/project.rpy:485
|
||||
old "Please choose the projects directory using the directory chooser.\n{b}The directory chooser may have opened behind this window.{/b}"
|
||||
new "Choisissez le répertoire des projets avec le sélecteur de fichier.\n{b}Il se peut que le sélecteur de fichier s'ouvre derière cette fenêtre.{/b}"
|
||||
|
||||
# game/project.rpy:485
|
||||
old "This launcher will scan for projects in this directory, will create new projects in this directory, and will place built projects into this directory."
|
||||
new "Ce lanceur va scanner ce répertoire pour trouver des projets éxistants, créra les nouveaux projets dans ce répertoire, et placera les projets construits dans ce répertoire."
|
||||
|
||||
# game/project.rpy:525
|
||||
old "Ren'Py was unable to run python with tkinter to choose the projects directory."
|
||||
new "Ren'Py n'a pas pu lancer python avec le module tkinker pout choisir le répertoire des projets."
|
||||
|
||||
# game/project.rpy:529
|
||||
old "Ren'Py has set the projects directory to:"
|
||||
new "Le répertoire des projets vient d'être établit:"
|
||||
@@ -0,0 +1,6 @@
|
||||
translate french python:
|
||||
style.l_default.size = 16
|
||||
style.l_button_text.selected_bold = True
|
||||
style.l_navigation_text.bold = False
|
||||
make_style_backup()
|
||||
|
||||