factor/basis/tools/deploy/config/config.factor

68 lines
1.9 KiB
Factor
Raw Normal View History

2008-02-05 19:55:28 -05:00
! Copyright (C) 2007, 2008 Slava Pestov.
2007-10-06 13:37:47 -04:00
! See http://factorcode.org/license.txt for BSD license.
2008-12-08 15:58:00 -05:00
USING: io.files io kernel sequences assocs splitting parser
namespaces math vocabs hashtables ;
2007-10-06 13:37:47 -04:00
IN: tools.deploy.config
SYMBOL: deploy-name
2007-10-06 13:37:47 -04:00
SYMBOL: deploy-ui?
SYMBOL: deploy-console?
2007-10-31 01:09:24 -04:00
SYMBOL: deploy-math?
SYMBOL: deploy-unicode?
SYMBOL: deploy-threads?
2007-10-31 01:09:24 -04:00
SYMBOL: deploy-io
CONSTANT: deploy-io-options
2007-10-31 01:09:24 -04:00
{
{ 1 "Level 1 - No input/output" }
{ 2 "Level 2 - Basic ANSI C streams" }
{ 3 "Level 3 - Non-blocking streams and networking" }
}
2007-10-31 01:09:24 -04:00
2008-06-08 16:32:55 -04:00
: strip-io? ( -- ? ) deploy-io get 1 = ;
2007-10-31 01:09:24 -04:00
2008-06-08 16:32:55 -04:00
: native-io? ( -- ? ) deploy-io get 3 = ;
2007-10-31 01:09:24 -04:00
SYMBOL: deploy-reflection
CONSTANT: deploy-reflection-options
2007-10-31 01:09:24 -04:00
{
{ 1 "Level 1 - No reflection" }
{ 2 "Level 2 - Retain word names" }
{ 3 "Level 3 - Prettyprinter" }
{ 4 "Level 4 - Debugger" }
{ 5 "Level 5 - Parser" }
{ 6 "Level 6 - Full environment" }
}
2007-10-31 01:09:24 -04:00
2008-06-08 16:32:55 -04:00
: strip-word-names? ( -- ? ) deploy-reflection get 2 < ;
: strip-prettyprint? ( -- ? ) deploy-reflection get 3 < ;
: strip-debugger? ( -- ? ) deploy-reflection get 4 < ;
: strip-dictionary? ( -- ? ) deploy-reflection get 5 < ;
: strip-globals? ( -- ? ) deploy-reflection get 6 < ;
2007-10-31 01:09:24 -04:00
SYMBOL: deploy-word-props?
SYMBOL: deploy-word-defs?
2007-10-31 01:09:24 -04:00
SYMBOL: deploy-c-types?
2007-10-06 13:37:47 -04:00
SYMBOL: deploy-vm
SYMBOL: deploy-image
: default-config ( vocab -- assoc )
vocab-name deploy-name associate H{
2007-10-31 20:26:24 -04:00
{ deploy-ui? f }
{ deploy-console? t }
2007-10-31 01:09:24 -04:00
{ deploy-io 2 }
{ deploy-reflection 1 }
{ deploy-threads? t }
{ deploy-unicode? f }
2007-10-31 01:09:24 -04:00
{ deploy-math? t }
{ deploy-word-props? f }
{ deploy-word-defs? f }
2007-10-31 01:09:24 -04:00
{ deploy-c-types? f }
! default value for deploy.macosx
2007-10-06 13:37:47 -04:00
{ "stop-after-last-window?" t }
} assoc-union ;