Skip to content

Commit

Permalink
fix preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
vdelachaux committed Sep 7, 2021
1 parent 8b0c0d4 commit e12a0b6
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 101 deletions.
Binary file modified Build/Components/4DPop Macros.4dbase/4DPop Macros.4DZ
Binary file not shown.
2 changes: 1 addition & 1 deletion Build/Components/4DPop Macros.4dbase/Info.plist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>CFBundleName</key> <string>4DPop Macros</string> <key>CFBundleVersion</key> <string>199</string> <key>NSHumanReadableCopyright</key> <string>©4D SAS 2009-2021</string> <key>CFBundleGetInfoString</key> <string>4DPop Macros</string> <key>CFBundleLongVersionString</key> <string>19</string> <key>CFBundleShortVersionString</key> <string>19</string> <key>CFBundleDisplayName</key> <string>4DPop Macros</string> </dict></plist>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>CFBundleName</key> <string>4DPop Macros</string> <key>CFBundleVersion</key> <string>202</string> <key>NSHumanReadableCopyright</key> <string>©4D SAS 2009-2021</string> <key>CFBundleGetInfoString</key> <string>4DPop Macros</string> <key>CFBundleLongVersionString</key> <string>19</string> <key>CFBundleShortVersionString</key> <string>19</string> <key>CFBundleDisplayName</key> <string>4DPop Macros</string> </dict></plist>
Expand Down
Binary file modified Build/Components/4DPop Macros.4dbase/Libraries/lib4d-arm64.dylib
Binary file not shown.
Binary file modified Build/Components/4DPop Macros.4dbase/Resources/InfoPlist.strings
Binary file not shown.
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>CFBundleName</key> <string>4DPop Macros</string> <key>CFBundleVersion</key> <string>199</string> <key>NSHumanReadableCopyright</key> <string>©4D SAS 2009-2021</string> <key>CFBundleGetInfoString</key> <string>4DPop Macros</string> <key>CFBundleLongVersionString</key> <string>19</string> <key>CFBundleShortVersionString</key> <string>19</string> <key>CFBundleDisplayName</key> <string>4DPop Macros</string> </dict></plist>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>CFBundleName</key> <string>4DPop Macros</string> <key>CFBundleVersion</key> <string>202</string> <key>NSHumanReadableCopyright</key> <string>©4D SAS 2009-2021</string> <key>CFBundleGetInfoString</key> <string>4DPop Macros</string> <key>CFBundleLongVersionString</key> <string>19</string> <key>CFBundleShortVersionString</key> <string>19</string> <key>CFBundleDisplayName</key> <string>4DPop Macros</string> </dict></plist>
Expand Down
Binary file modified Libraries/lib4d-arm64.dylib
Binary file not shown.
53 changes: 26 additions & 27 deletions Project/Sources/Methods/INSTALL_LOCALIZED_MACROS.4dm
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
Loading

0 comments on commit e12a0b6

Please sign in to comment.