From b94c4ad2bbb2433b5d77871d3eb4cb4529a7f96b Mon Sep 17 00:00:00 2001 From: Oldes Huhuman Date: Sat, 20 Jul 2024 13:43:48 +0200 Subject: [PATCH] Builder: updated code to be compatible with the upcoming Rebol version --- tree/rebol/Siskin/siskin-msvc.reb | 6 ++-- tree/rebol/Siskin/siskin.rc | 10 +++---- tree/rebol/Siskin/siskin.reb | 48 +++++++++++++++++++++++++------ tree/rebol/siskin.nest | 2 ++ 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/tree/rebol/Siskin/siskin-msvc.reb b/tree/rebol/Siskin/siskin-msvc.reb index 428974f..65fe617 100644 --- a/tree/rebol/Siskin/siskin-msvc.reb +++ b/tree/rebol/Siskin/siskin-msvc.reb @@ -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 #";" ] @@ -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) @@ -347,10 +349,9 @@ make-project: func[ append filters dir ] - if file append output rejoin [ { ^/} - ] + ] ] PROJECT-FILES: copy output @@ -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 #";" diff --git a/tree/rebol/Siskin/siskin.rc b/tree/rebol/Siskin/siskin.rc index 2f8040c..3d37425 100644 --- a/tree/rebol/Siskin/siskin.rc +++ b/tree/rebol/Siskin/siskin.rc @@ -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" diff --git a/tree/rebol/Siskin/siskin.reb b/tree/rebol/Siskin/siskin.reb index 2b88e8c..4d08f6a 100644 --- a/tree/rebol/Siskin/siskin.reb +++ b/tree/rebol/Siskin/siskin.reb @@ -2,7 +2,7 @@ Rebol [ Title: "Siskin Builder - core" Type: module Name: siskin - Version: 0.17.0 + Version: 0.18.0 Author: "Oldes" exports: [ @@ -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}] @@ -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: [ @@ -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 ] ][ @@ -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 @@ -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 @@ -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 @@ -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 │} diff --git a/tree/rebol/siskin.nest b/tree/rebol/siskin.nest index 90d440c..a542a79 100644 --- a/tree/rebol/siskin.nest +++ b/tree/rebol/siskin.nest @@ -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!