-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot.red
60 lines (49 loc) · 1.61 KB
/
boot.red
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Red [
Title: "Red base environment definitions"
Author: "Nenad Rakocevic"
File: %boot.red
Tabs: 4
Rights: "Copyright (C) 2011-2015 Nenad Rakocevic. All rights reserved."
License: {
Distributed under the Boost Software License, Version 1.0.
See https://github.com/red/red/blob/master/BSL-License.txt
}
]
#if any [not config/dev-mode? config/libRedRT?][
#include %environment/datatypes.red
#include %environment/actions.red
#include %environment/natives.red
#include %environment/routines.red
#include %environment/scalars.red
#include %environment/colors.red
#include %environment/functions.red
#include %environment/system.red
#include %environment/lexer.red
#include %environment/operators.red
#register-intrinsics
#include %environment/codecs/png.red
#include %environment/codecs/jpeg.red
#include %environment/codecs/bmp.red
#include %environment/codecs/gif.red
#include %environment/reactivity.red ;-- requires SET intrinsic
#include %utils/preprocessor.r
;-- temporary code --
#if not find [Windows macOS] config/OS [
unset [event! image!]
image?: func ["Returns true if the value is this type" value [any-type!]][false]
]
;-- initialize some system words
system/version: load system/version
system/options/cache: either system/platform = 'Windows [
append to-red-file get-env "ALLUSERSPROFILE" %/Red/
][
append any [attempt [to-red-file get-env "HOME"] %/tmp] %/.red/
]
]
;-- command-line arguments processing
#if config/dev-mode? [
system/script/args: #system [
#either type = 'exe [stack/push get-cmdline-args][none/push]
]
]
#if config/type = 'exe [extract-boot-args]