Skip to content

Commit

Permalink
Builder: updated code to be compatible with the upcoming Rebol version
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jul 20, 2024
1 parent d6cb6f6 commit b94c4ad
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 16 deletions.
6 changes: 4 additions & 2 deletions tree/rebol/Siskin/siskin-msvc.reb
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ make-project: func[
ADDITIONAL-DEPENDENCIES: copy output
LIBRARY-PATH: copy ""
foreach path unique lib-paths [
path: siskin/expand-env copy path
if #"/" <> first path [insert path %../]
append append LIBRARY-PATH to-local-file path #";"
]
Expand All @@ -335,6 +336,7 @@ make-project: func[
items: copy []
foreach file join spec/files spec/assembly [
;file: siskin/get-file-with-extensions file [%.c %.cpp %.cc %.m %.S %.s %.sx]
file: siskin/expand-env copy file
rel-file: get-relative-path file dir-vs
dir: first split-path rel-file
parse dir [remove any %../] ; get directory name without .. (used in gui as names of folders)
Expand All @@ -347,10 +349,9 @@ make-project: func[
append filters dir
]

if file
append output rejoin [
{ <ClCompile Include="} to-windows-file rel-file {" />^/}
]
]
]
PROJECT-FILES: copy output

Expand All @@ -365,6 +366,7 @@ make-project: func[
;-- collect INCLUDE-PATH
clear output
foreach inc spec/includes [
inc: siskin/expand-env copy inc
inc: clean-path/only inc
if #"/" <> first inc [ insert inc %../ ]
append append output to-local-file inc #";"
Expand Down
10 changes: 5 additions & 5 deletions tree/rebol/Siskin/siskin.rc
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
101 ICON "siskin.ico"

1 VERSIONINFO
FILEVERSION 0,16,0,0
PRODUCTVERSION 0,16,0,0
FILEVERSION 0,18,0,0
PRODUCTVERSION 0,18,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileDescription", "Siskin Builder"
VALUE "FileVersion", "0.16"
VALUE "FileVersion", "0.18"
VALUE "InternalName", "Siskin Builder"
VALUE "LegalCopyright", "2021 Oldes"
VALUE "LegalCopyright", "2024 Oldes"
VALUE "OriginalFilename", "Siskin.exe"
VALUE "ProductName", "Siskin"
VALUE "ProductVersion", "0.16"
VALUE "ProductVersion", "0.18"
END
END
BLOCK "VarFileInfo"
Expand Down
48 changes: 39 additions & 9 deletions tree/rebol/Siskin/siskin.reb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Rebol [
Title: "Siskin Builder - core"
Type: module
Name: siskin
Version: 0.17.0
Version: 0.18.0
Author: "Oldes"

exports: [
Expand All @@ -23,7 +23,7 @@ Rebol [
banner: next rejoin [{
^[[0;33m═╗
^[[0;33m ║^[[1;31m .-.
^[[0;33m ║^[[1;31m /'v'\ ^[[0;33mSISKIN-Framework Builder 0.17.0 Rebol } rebol/version {
^[[0;33m ║^[[1;31m /'v'\ ^[[0;33mSISKIN-Framework Builder 0.18.0 Rebol } rebol/version {
^[[0;33m ║^[[1;31m (/^[[0;31muOu^[[1;31m\) ^[[0;33mhttps://github.com/Siskin-framework/Builder/
^[[0;33m ╚════^[[1;31m"^[[0;33m═^[[1;31m"^[[0;33m═══════════════════════════════════════════════════════════════════════^[[m}]

Expand All @@ -37,6 +37,33 @@ mmake/siskin: self

debug?: off

;--- backwards compatibility ---
if system/version < 3.17.2 [
;; The code is using the new QUERY, so let's make it backward compatible, when needed...
lib/query: query: function/with [
"Forward compatibitity version!"
target [port! file! url! block! vector! date! handle! word!]
field [word! block! none! datatype!] ;;"NONE will return valid modes for target type"
/mode ;; deprecated
][
mode: true
case [
datatype? field [mode: none]
block? field [
parse field [any [change set w: word! (
all [field = 'modified file? target w: 'date]
to set-word! :w
) | skip]]
]
all [field = 'modified file? target] [field: 'date]
]
query*/:mode target field
][
query*: :lib/query
]
]
;-------------------------------

append system/options/log [siskin: 1]

all-options: [
Expand Down Expand Up @@ -850,7 +877,7 @@ do-nest: closure/with/extern [
none? nest-file
parent
all [
date? tmp: query/mode nest-file 'date
date? tmp: query nest-file 'modified
nest-time < tmp
]
][
Expand Down Expand Up @@ -1606,8 +1633,8 @@ build: function/with [
i: i + 1
;file: expand-env copy file
;?? file
source-info: query source: file
unless source-info [
source-modified: query source: file 'modified
unless source-modified [
print-error ["Source file not found: " to-local-file file]
print-failed
exit
Expand Down Expand Up @@ -1637,8 +1664,8 @@ build: function/with [

either any [
rebuild?
none? target-info: query target
target-info/date < source-info/date
none? target-modified: query target 'modified
target-modified < source-modified
][
make-dir/deep first split-path target

Expand All @@ -1665,7 +1692,10 @@ build: function/with [

foreach file spec/assembly [
either any [
all [source: query file source/type = 'file source: file]
all [
'file == query file 'type
source: file
]
source: get-file-with-extensions file [%.S %.s %.sx]
][
store-object spec/objects/objects.txt to-local-file source
Expand Down Expand Up @@ -2041,7 +2071,7 @@ print-bird: does [
^[[1;31m (/^[[0;31muOu^[[1;31m\)}
]
print-ready: closure/with [][
result: query out-file
result: query out-file [name size date]
print-bird
prin {^/^[[0;32m═[^[[1mSISKIN^[[0;32m]══^[[1;31m"^[[0;32m═^[[1;31m"^[[0;32m═> ^[[1mBuild READY}
prin {^/^[[0;32m │}
Expand Down
2 changes: 2 additions & 0 deletions tree/rebol/siskin.nest
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
github: @Rebol
nest: %Rebol/make/rebol3.nest

version: 0.18.0

make-siskin: [
product: Siskin
;version: 0.10.4 ;!! Don't use this setting! Because it would be reported like internal Rebol version!
Expand Down

0 comments on commit b94c4ad

Please sign in to comment.