diff --git a/Build/4DPop-Git.dmg b/Build/4DPop-Git.dmg
new file mode 100644
index 0000000..7e5e442
Binary files /dev/null and b/Build/4DPop-Git.dmg differ
diff --git a/Build/4DPop-Git.zip b/Build/4DPop-Git.zip
new file mode 100644
index 0000000..4f0a9eb
Binary files /dev/null and b/Build/4DPop-Git.zip differ
diff --git a/Build/Components/4DPop Git.4dbase/4DPop Git.4DZ b/Build/Components/4DPop Git.4dbase/4DPop Git.4DZ
index 16fb0e9..c2120b7 100755
Binary files a/Build/Components/4DPop Git.4dbase/4DPop Git.4DZ and b/Build/Components/4DPop Git.4dbase/4DPop Git.4DZ differ
diff --git a/Build/Components/4DPop Git.4dbase/Info.plist b/Build/Components/4DPop Git.4dbase/Info.plist
index 1e88afe..f7fead5 100644
--- a/Build/Components/4DPop Git.4dbase/Info.plist
+++ b/Build/Components/4DPop Git.4dbase/Info.plist
@@ -6,17 +6,17 @@
CFBundleName
4DPop Git
CFBundleShortVersionString
- 20R4
+ 20R6
CFBundleLongVersionString
- 20R4 (181)
+ 20R6 (182)
CFBundleGetInfoString
- 20R4
+ 20R6
CFBundleDisplayName
4DPop Git
CFBundleVersion
- 182
+ 183
NSHumanReadableCopyright
- ©vdl 2020-2023
+ ©vdl 2020-2024
diff --git a/Build/Components/4DPop Git.4dbase/Libraries/lib4d-arm64.dylib b/Build/Components/4DPop Git.4dbase/Libraries/lib4d-arm64.dylib
index 51add19..8233281 100644
Binary files a/Build/Components/4DPop Git.4dbase/Libraries/lib4d-arm64.dylib and b/Build/Components/4DPop Git.4dbase/Libraries/lib4d-arm64.dylib differ
diff --git a/Build/Components/4DPop Git.4dbase/Resources/InfoPlist.strings b/Build/Components/4DPop Git.4dbase/Resources/InfoPlist.strings
index 761649a..fcd4ffd 100755
Binary files a/Build/Components/4DPop Git.4dbase/Resources/InfoPlist.strings and b/Build/Components/4DPop Git.4dbase/Resources/InfoPlist.strings differ
diff --git a/Info.plist b/Info.plist
index 1e88afe..f7fead5 100755
--- a/Info.plist
+++ b/Info.plist
@@ -6,17 +6,17 @@
CFBundleName
4DPop Git
CFBundleShortVersionString
- 20R4
+ 20R6
CFBundleLongVersionString
- 20R4 (181)
+ 20R6 (182)
CFBundleGetInfoString
- 20R4
+ 20R6
CFBundleDisplayName
4DPop Git
CFBundleVersion
- 182
+ 183
NSHumanReadableCopyright
- ©vdl 2020-2023
+ ©vdl 2020-2024
diff --git a/Project/4DPop Git.4DProject b/Project/4DPop Git.4DProject
index 139a458..6cd3bb4 100755
--- a/Project/4DPop Git.4DProject
+++ b/Project/4DPop Git.4DProject
@@ -1,3 +1,4 @@
{
- "$comment": "The project file let you override the location for most folders"
-}
+ "$comment": "The project file let you override the location for most folders",
+ "$4DPopAppMakerToolVersion": "20R6"
+}
\ No newline at end of file
diff --git a/Project/Sources/Classes/_CLI.4dm b/Project/Sources/Classes/_CLI.4dm
new file mode 100644
index 0000000..d7266cc
--- /dev/null
+++ b/Project/Sources/Classes/_CLI.4dm
@@ -0,0 +1,192 @@
+property dataType; data; dataError : Text
+property success; available : Boolean
+property timeout : Integer
+property errors; history : Collection
+
+
+Class constructor($name : Text; $embedded : Boolean)
+
+ This:C1470.timeout:=60
+ This:C1470.dataType:="text"
+ This:C1470.encoding:="UTF-8"
+ This:C1470.variables:={}
+ This:C1470.currentDirectory:=Null:C1517
+ This:C1470.hideWindow:=True:C214
+
+ This:C1470.data:=""
+ This:C1470.dataError:=""
+
+ This:C1470.success:=True:C214
+ This:C1470.available:=False:C215
+
+ This:C1470.errors:=[]
+ This:C1470.history:=[]
+
+ This:C1470.available:=This:C1470.getExe($name; $embedded)
+
+ If (Not:C34(This:C1470.available))
+
+ This:C1470._pushError("The "+$name+" command line interface is not available")
+
+ End if
+
+ // <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <==
+Function get lastError() : Text
+
+ return This:C1470.errors.length>0 ? This:C1470.errors.copy().pop() : ""
+
+ // === === === === === === === === === === === === === === === === === === === === === === === === === ===
+ /// Locates the exe to use
+Function getExe($name : Text; $embedded : Boolean) : Boolean
+
+ var $cmd; $error; $in; $out : Text
+ var $file : 4D:C1709.File
+
+ If (Not:C34($embedded))
+
+ If (Is macOS:C1572)
+
+ $cmd:="find /usr -type f -name "+$name
+ LAUNCH EXTERNAL PROCESS:C811($cmd; $in; $out; $error)
+
+ If (Bool:C1537(OK))
+
+ This:C1470.exe:=Split string:C1554($out; "\n"; sk ignore empty strings:K86:1).first()
+
+ return True:C214
+
+ End if
+
+ Else
+
+ // TODO:On windows
+
+ End if
+ End if
+
+ // Use embedded binary
+ $file:=This:C1470._unsanboxed(File:C1566("/RESOURCES/Bin/"+(Is macOS:C1572 ? $name : $name+".exe")))
+ This:C1470.exe:=$file.path
+
+ If ($file.exists && Is macOS:C1572)
+
+ SET ENVIRONMENT VARIABLE:C812("_4D_OPTION_CURRENT_DIRECTORY"; $file.parent.platformPath)
+ LAUNCH EXTERNAL PROCESS:C811("chmod +x "+$name)
+
+ End if
+
+ return $file.exists
+
+ // === === === === === === === === === === === === === === === === === === === === === === === === === ===
+Function execute($cmd : Text)
+
+ $cmd:=[This:C1470.exe; $cmd].join(" ")
+
+ This:C1470.history.push($cmd)
+
+/*This._worker:=4D.SystemWorker.new(This._commands.shift(); This)*/
+ This:C1470._worker:=4D:C1709.SystemWorker.new($cmd; This:C1470).wait()
+
+
+ // <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <== <==
+Function get EOL() : Text
+
+ return Is macOS:C1572 ? "\r\n" : "\n"
+
+ // === === === === === === === === === === === === === === === === === === === === === === === === === ===
+Function escape($in : Text) : Text
+
+ var $char; $metacharacters; $out : Text
+
+ $out:=$in
+
+ Case of
+
+ //______________________________________________________
+ : (Is macOS:C1572) // Escape for bash or zsh
+
+ For each ($char; Split string:C1554("\\!\"#$%&'()=~|<>?;*`[] "; ""))
+
+ $out:=Replace string:C233($out; $char; "\\"+$char; *)
+
+ End for each
+
+ //______________________________________________________
+ : (Is Windows:C1573) // Escape for cmd.exe
+
+ $metacharacters:="&|<>()%^\" "
+
+ For each ($char; Split string:C1554("&|<>()%^\" "; ""))
+
+ If (Position:C15($char; $out; *)=0)
+
+ continue
+
+ End if
+
+ // Should quote
+ If (Substring:C12($out; Length:C16($out))="\\")
+
+ $out:="\""+$out+"\\\""
+
+ Else
+
+ $out:="\""+$out+"\""
+
+ End if
+
+ //
+
+ break
+
+ End for each
+
+ //______________________________________________________
+ End case
+
+ return $out
+
+ // === === === === === === === === === === === === === === === === === === === === === === === === === ===
+Function quote($in : Text) : Text
+
+ return "\""+$in+"\""
+
+ //MARK:- [System worker callbacks]
+ // === === === === === === === === === === === === === === === === === === === === === === === === === ===
+Function onDataError($worker : 4D:C1709.SystemWorker; $info : Object)
+
+ // Should be overloaded by the custom class
+
+ // === === === === === === === === === === === === === === === === === === === === === === === === === ===
+Function onTerminate($worker : 4D:C1709.SystemWorker)
+
+ // Should be overloaded by the custom class
+
+ //MARK:- [private]
+ // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
+Function _unsanboxed($target : Object) : Object
+
+ Case of
+ //______________________________________________________
+ : (OB Instance of:C1731($target; 4D:C1709.File))
+
+ return File:C1566($target.platformPath; fk platform path:K87:2)
+
+ //______________________________________________________
+ : (OB Instance of:C1731($target; 4D:C1709.Folder))
+
+ return Folder:C1567($target.platformPath; fk platform path:K87:2)
+
+ //______________________________________________________
+ Else
+
+ This:C1470.errors.push("Bad parameter")
+
+ //______________________________________________________
+ End case
+
+ // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
+Function _pushError($error : Text)
+
+ This:C1470.success:=False:C215
+ This:C1470.errors.push($error)
\ No newline at end of file
diff --git a/Project/Sources/Classes/_gitWorker.4dm b/Project/Sources/Classes/_gitWorker.4dm
index 696e3c8..a0a4f7b 100644
--- a/Project/Sources/Classes/_gitWorker.4dm
+++ b/Project/Sources/Classes/_gitWorker.4dm
@@ -1,17 +1,18 @@
-Class constructor
+Class extends _CLI
+
+Class constructor($embedded : Boolean)
- This:C1470.dataType:="text"
- This:C1470.data:=""
- This:C1470.dataError:=""
+ Super:C1705("git"; $embedded)
- This:C1470.cwd:=This:C1470._unsanboxed(Folder:C1567(fk database folder:K87:14))
-
- This:C1470.hideWindow:=True:C214
+ This:C1470.currentDirectory:=This:C1470._unsanboxed(Folder:C1567(fk database folder:K87:14))
+ //MARK:- [System worker callbacks]
+ // === === === === === === === === === === === === === === === === === === === === === === === === === ===
Function onResponse($worker : 4D:C1709.SystemWorker)
//…
+ // === === === === === === === === === === === === === === === === === === === === === === === === === ===
Function onData($worker : 4D:C1709.SystemWorker; $info : Object)
This:C1470.data+=$info.data
@@ -37,28 +38,7 @@ Function onTerminate($worker : 4D:C1709.SystemWorker)
End if
- //MARK:- [private]
- // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-Function _unsanboxed($target : Object) : Object
-
- Case of
- //______________________________________________________
- : (OB Instance of:C1731($target; 4D:C1709.File))
-
- return File:C1566($target.platformPath; fk platform path:K87:2)
-
- //______________________________________________________
- : (OB Instance of:C1731($target; 4D:C1709.Folder))
-
- return Folder:C1567($target.platformPath; fk platform path:K87:2)
-
- //______________________________________________________
- Else
-
- This:C1470.errors.push("Bad parameter")
-
- //______________________________________________________
- End case
+
//// === === === === === === === === === === === === === === === === === === === === === === === === === ===
@@ -68,11 +48,11 @@ Function _unsanboxed($target : Object) : Object
////┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
//: ($params.type="data")\
- && ($worker.dataType="text")
+ && ($worker.dataType="text")
////┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
//: ($params.type="data")\
- && ($worker.dataType="blob")
+ && ($worker.dataType="blob")
////┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
//: ($params.type="error")
diff --git a/Project/Sources/Classes/gitW.4dm b/Project/Sources/Classes/gitW.4dm
new file mode 100644
index 0000000..e69de29
diff --git a/Resources/InfoPlist.strings b/Resources/InfoPlist.strings
index 761649a..fcd4ffd 100755
Binary files a/Resources/InfoPlist.strings and b/Resources/InfoPlist.strings differ
diff --git a/lastbuild b/lastbuild
deleted file mode 100644
index 4c6ca3f..0000000
--- a/lastbuild
+++ /dev/null
@@ -1 +0,0 @@
-20R4
\ No newline at end of file