File tree 6 files changed +36
-9
lines changed
6 files changed +36
-9
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ try/except [
220
220
][ git-commit: none]
221
221
222
222
str-version: reform [
223
- "Rebol" ; probably always same
223
+ "Rebol" ; probably always same
224
224
product ; like Core, View, etc...
225
225
version ; triple value product version
226
226
platform ; Linux, Windows, macOS, Android...
@@ -236,6 +236,13 @@ str-version: reform [
236
236
get-libc-version ;; musl, glibc_2.28,... or just none
237
237
]
238
238
239
+
240
+ short-str-version: next ajoin [{
241
+ Rebol/} product SP version SP format-date-time now /utc "(yyyy-MM-dd hh:mm:ss UTC)" {
242
+ Copyright (c) 2012 REBOL Technologies
243
+ Copyright (c) 2012-} now /year { Rebol Open Source Contributors
244
+ Source: https://github.com/Oldes/Rebol3} ]
245
+
239
246
ver3: version ver3/4: none ; trimmed version to just 3 parts
240
247
lib-version: version/1
241
248
Original file line number Diff line number Diff line change 3
3
Title: "Make primary boot files"
4
4
Rights: {
5
5
Copyright 2012 REBOL Technologies
6
+ Copyright 2012-2023 Rebol Open Source Contributors
6
7
REBOL is a trademark of REBOL Technologies
7
8
}
8
9
License: {
@@ -548,8 +549,9 @@ emit [{
548
549
#define REBOL_UPD } any [version/3 0 ] {
549
550
#define REBOL_SYS } any [version/4 0 ] {
550
551
#define REBOL_VAR } any [version/5 0 ] {
551
- #define REBOL_VERSION "} str-version {"
552
- } ]
552
+ // Version visible when used -v argument on start-up (before initialization)
553
+ #define REBOL_VERSION \} string-to-c short-str-version
554
+ ]
553
555
554
556
;-- Generate Lower-Level String Table ----------------------------------------
555
557
Original file line number Diff line number Diff line change @@ -113,6 +113,16 @@ binary-to-c: func [comp-data /local out data] [
113
113
head out
114
114
]
115
115
116
+ string-to-c : func [ str /local out] [
117
+ out: copy ""
118
+ foreach line split str lf [
119
+ replace/all line #"^"" {\"}
120
+ append out ajoin [{^/^- "} line {\n"\} ]
121
+ ]
122
+ take/last out ;; removes the last slash
123
+ out
124
+ ]
125
+
116
126
get-libc-version : function [] [
117
127
tmp: copy ""
118
128
num: system/catalog/bitsets/numeric
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ extern const REBYTE Str_Banner[];
122
122
{
123
123
if (rargs -> options & RO_VERS ) {
124
124
Out_Str (cb_cast (REBOL_VERSION ), 0 , FALSE);
125
+ Out_Str (cb_cast ("\n" ), 0 , FALSE);
125
126
OS_EXIT (0 );
126
127
}
127
128
}
@@ -366,10 +367,16 @@ extern const REBYTE Str_Banner[];
366
367
/*
367
368
// version: native [
368
369
// "Return Rebol version string"
370
+ // /data "loadable version"
369
371
// ]
370
372
***********************************************************************/
371
373
{
372
- const REBYTE * version = BOOT_STR (RS_VERSION , 0 );
374
+ const REBYTE * version ;
375
+ if (D_REF (1 )) {
376
+ version = BOOT_STR (RS_VERSION , 0 );
377
+ } else {
378
+ version = cb_cast (REBOL_VERSION );
379
+ }
373
380
Set_String (ds , Copy_Bytes (version , LEN_BYTES (version )));
374
381
return R_RET ;
375
382
}
Original file line number Diff line number Diff line change 3
3
Title: "REBOL 3 Mezzanine: Startup Banner"
4
4
Rights: {
5
5
Copyright 2012 REBOL Technologies
6
- Copyright 2012-2022 Rebol Open Source Developers
6
+ Copyright 2012-2023 Rebol Open Source Developers
7
7
REBOL is a trademark of REBOL Technologies
8
8
}
9
9
License: {
@@ -55,7 +55,7 @@ sys/boot-banner: make-banner [
55
55
["REBOL/" system/product #" " system/version " (Oldes branch)" ]
56
56
-
57
57
= Copyright: "2012 REBOL Technologies"
58
- = "" "2012-2022 Rebol Open Source Contributors"
58
+ = "" "2012-2023 Rebol Open Source Contributors"
59
59
= "" "Apache 2.0 License, see LICENSE."
60
60
= Website: "https://github.com/Oldes/Rebol3"
61
61
-
Original file line number Diff line number Diff line change 3
3
Title: "REBOL 3 Boot Sys: Startup"
4
4
Rights: {
5
5
Copyright 2012 REBOL Technologies
6
+ Copyright 2012-2023 Rebol Open Source Contributors
6
7
REBOL is a trademark of REBOL Technologies
7
8
}
8
9
License: {
@@ -33,7 +34,7 @@ start: func [
33
34
start: 'done ; only once
34
35
init-schemes ; only once
35
36
36
- ver: load/as lib/version 'unbound
37
+ ver: load/as lib/version/data 'unbound
37
38
system/product: ver/2
38
39
system/version: ver/3
39
40
system/platform: ver/4
@@ -46,6 +47,7 @@ start: func [
46
47
system/build/target: ver/11
47
48
system/build/date: ver/12
48
49
system/build/git: ver/13
50
+ system/build/libc: ver/14
49
51
50
52
if flags/verbose [system/options/log/rebol: 3 ] ;maximum log output for system messages
51
53
@@ -55,8 +57,7 @@ start: func [
55
57
any [flags/verbose flags/usage flags/help ]
56
58
][
57
59
; basic boot banner only
58
- prin "^/ "
59
- print boot-banner: form ver
60
+ print boot-banner: lib/version
60
61
]
61
62
if any [do-arg script] [quiet: true]
62
63
You can’t perform that action at this time.
0 commit comments