-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b0c0d4
commit e12a0b6
Showing
10 changed files
with
117 additions
and
101 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+160 Bytes
(100%)
Build/Components/4DPop Macros.4dbase/Libraries/lib4d-arm64.dylib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Build/Components/4DPop Macros.4dbase/Resources/InfoPlist.strings
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,62 @@ | ||
//%attributes = {"invisible":true} | ||
// ---------------------------------------------------- | ||
// Method : INSTALL_LOCALIZED_MACROS | ||
// Created 12/05/10 by Vincent de Lachaux | ||
// ---------------------------------------------------- | ||
// Description | ||
// Tests if the language of the system and the language of the macros are the same. | ||
// If not, installs a localized file if any | ||
// ---------------------------------------------------- | ||
// Declarations | ||
C_LONGINT:C283($i) | ||
C_TEXT:C284($Dom_document;$Dom_root;$t;$Txt_macrosLanguage;$Txt_pattern) | ||
C_OBJECT:C1216($file;$o) | ||
// ---------------------------------------------------- | ||
// Method : INSTALL_LOCALIZED_MACROS | ||
// Created 12/05/10 by Vincent de Lachaux | ||
// ---------------------------------------------------- | ||
// Description | ||
// Tests if the language of the system and the language of the macros are the same. | ||
// If not, installs a localized file if any | ||
// ---------------------------------------------------- | ||
// Declarations | ||
var $document; $macrosLanguage; $root; $t : Text | ||
var $i : Integer | ||
var $file; $o : Object | ||
|
||
ARRAY LONGINT:C221($tLon_childTypes;0) | ||
ARRAY TEXT:C222($tTxt_nodes;0) | ||
ARRAY TEXT:C222($tTxt_result;0) | ||
ARRAY TEXT:C222($nodes; 0) | ||
ARRAY TEXT:C222($results; 0) | ||
ARRAY LONGINT:C221($childTypes; 0) | ||
|
||
// ---------------------------------------------------- | ||
// ---------------------------------------------------- | ||
$file:=File:C1566("/PACKAGE/Macros v2/4DPop_Macros.xml").original | ||
|
||
If ($file.exists) | ||
|
||
$t:=$file.getText() | ||
|
||
$Dom_root:=DOM Parse XML variable:C720($t) | ||
$root:=DOM Parse XML variable:C720($t) | ||
|
||
If (OK=1) | ||
|
||
$Dom_document:=DOM Get XML document ref:C1088($Dom_root) | ||
$document:=DOM Get XML document ref:C1088($root) | ||
|
||
DOM GET XML CHILD NODES:C1081($Dom_document;$tLon_childTypes;$tTxt_nodes) | ||
DOM GET XML CHILD NODES:C1081($document; $childTypes; $nodes) | ||
|
||
Repeat | ||
|
||
$i:=Find in array:C230($tLon_childTypes;XML comment:K45:8;$i+1) | ||
$i:=Find in array:C230($childTypes; XML comment:K45:8; $i+1) | ||
|
||
If ($i>0) | ||
|
||
If (Rgx_ExtractText ("\\[([^\\]]*)\\]";$tTxt_nodes{$i};"1";->$tTxt_result)=0) | ||
If (Rgx_ExtractText("\\[([^\\]]*)\\]"; $nodes{$i}; "1"; ->$results)=0) | ||
|
||
$Txt_macrosLanguage:=$tTxt_result{1} | ||
$macrosLanguage:=$results{1} | ||
$i:=-1 | ||
|
||
End if | ||
End if | ||
Until ($i=-1) | ||
|
||
DOM CLOSE XML:C722($Dom_root) | ||
DOM CLOSE XML:C722($root) | ||
|
||
End if | ||
End if | ||
|
||
If ($Txt_macrosLanguage#Get database localization:C1009(User system localization:K5:23)) | ||
If ($macrosLanguage#Get database localization:C1009(User system localization:K5:23)) | ||
|
||
$o:=File:C1566(Get localized document path:C1105("4DPop_Macros.xml");fk platform path:K87:2) | ||
$o:=File:C1566(Get localized document path:C1105("4DPop_Macros.xml"); fk platform path:K87:2) | ||
|
||
If (Bool:C1537($o.exists)) | ||
|
||
$o.copyTo($file.parent;fk overwrite:K87:5) | ||
$o.copyTo($file.parent; fk overwrite:K87:5) | ||
|
||
End if | ||
End if |
Oops, something went wrong.