Browse Source

Fixed some bootstrap issues. (#130)

Brucey 2 years ago
parent
commit
85a577ab25
4 changed files with 35 additions and 3 deletions
  1. 6 0
      CHANGELOG
  2. 1 1
      bmk_ng.bmx
  3. 27 1
      bmk_util.bmx
  4. 1 1
      version.bmx

+ 6 - 0
CHANGELOG

@@ -1,3 +1,9 @@
+## [3.56] - 2023-09-30
+### Fixed
+ - Bootstrap script progress echoes require quotes.
+### Changed
+ - Bootstrap config can now be delimited by any whitespace.
+
 ## [3.55] - 2023-08-19
 ### Added
  - Added support for different assemblers.

+ 1 - 1
bmk_ng.bmx

@@ -1034,7 +1034,7 @@ Type TBMK
 	End Method
 
 	Method PushEcho(cmd:String)
-		PushLog("echo " + cmd)
+		PushLog("echo ~q" + cmd + "~q")
 	End Method
 	
 	Method FixPaths:String(Text:String)

+ 27 - 1
bmk_util.bmx

@@ -1961,7 +1961,7 @@ Function LoadBootstrapConfig:TBootstrapConfig()
 		
 		'Local i:Int
 		For Local assetLine:String = EachIn assets
-			Local parts:String[] = assetLine.Split("~t")
+			Local parts:String[] = SplitByWhitespace(assetLine)
 			If parts And parts.length > 1 Then
 				Select parts[0]
 					Case "t"
@@ -1992,6 +1992,32 @@ Function LoadBootstrapConfig:TBootstrapConfig()
 	
 End Function
 
+Function SplitByWhitespace:String[](input:String)
+    Local result:String[] = New String[0]
+    Local tempString:String = ""
+    
+    For Local i:Int = 0 Until input.Length
+        Local char:Int = input[i]
+
+		If char = 32 Or char = 9 Or char = 10 Or char = 13 Then
+
+			If tempString.Length > 0 Then
+                result :+ [tempString]
+                tempString = ""
+            End If
+        Else
+            tempString :+ Chr(char)
+        End If
+    Next
+    
+    If tempString.Length > 0 Then
+        result :+ [tempString]
+    End If
+    
+    Return result
+End Function
+
+
 Extern
 	Function bmx_setfiletimenow(path:String)
 

+ 1 - 1
version.bmx

@@ -1,3 +1,3 @@
 SuperStrict
 
-Const BMK_VERSION:String = "3.55"
+Const BMK_VERSION:String = "3.56"