1 ! Copyright (C) 2007, 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs combinators.smart hashtables kernel math
4 namespaces sequences vocabs ;
5 IN: tools.deploy.config
10 SYMBOL: deploy-console?
12 SYMBOL: deploy-unicode?
13 SYMBOL: deploy-threads?
18 CONSTANT: deploy-io-options
20 { 1 "Level 1 - No input/output" }
21 { 2 "Level 2 - Basic ANSI C streams" }
22 { 3 "Level 3 - Non-blocking streams and networking" }
25 : strip-io? ( -- ? ) deploy-io get 1 = ;
27 : native-io? ( -- ? ) deploy-io get 3 = ;
29 SYMBOL: deploy-reflection
31 CONSTANT: deploy-reflection-options
33 { 1 "Level 1 - No reflection" }
34 { 2 "Level 2 - Retain word names" }
35 { 3 "Level 3 - Prettyprinter" }
36 { 4 "Level 4 - Debugger" }
37 { 5 "Level 5 - Parser" }
38 { 6 "Level 6 - Full environment" }
41 : strip-word-names? ( -- ? ) deploy-reflection get 2 < ;
42 : strip-prettyprint? ( -- ? ) deploy-reflection get 3 < ;
43 : strip-debugger? ( -- ? ) deploy-reflection get 4 < ;
44 : strip-dictionary? ( -- ? ) deploy-reflection get 5 < ;
45 : strip-globals? ( -- ? ) deploy-reflection get 6 < ;
47 SYMBOL: deploy-word-props?
48 SYMBOL: deploy-word-defs?
49 SYMBOL: deploy-c-types?
54 : default-config ( vocab -- assoc )
55 vocab-name deploy-name associate H{
59 { deploy-reflection 1 }
64 { deploy-word-props? f }
65 { deploy-word-defs? f }
67 ! default value for deploy.macosx
68 { "stop-after-last-window?" t }
71 SYMBOL: deploy-directory
72 "resource:" deploy-directory set-global
74 : config>profile ( config -- profile )
76 ! The order should be similar to default-components in
78 [ deploy-math? of "math" f ? ]
79 [ deploy-threads? of "threads" f ? ]
81 [ deploy-io of 3 = "io" f ? ]
82 [ deploy-ui? of "ui" f ? ]
83 [ deploy-unicode? of "unicode" f ? ]
84 [ deploy-help? of "help" f ? ]