소스 검색

Updated glscviewer localization

glscene 1 년 전
부모
커밋
76f8108f8a
91개의 변경된 파일26206개의 추가작업 그리고 6490개의 파일을 삭제
  1. BIN
      Assets/Map/earth.jpg
  2. 0 2
      Examples/AdvDemos/Christmas/ChristmasC.cbproj
  3. 18920 4
      Examples/AdvDemos/Earth/fEarthD.dfm
  4. 7 10
      Examples/AdvDemos/Earth/fEarthD.pas
  5. 0 1
      Examples/AdvDemos/GLSViewer/GLSViewerD.dpr
  6. 26 3
      Examples/AdvDemos/GLSViewer/GLSViewerD.dproj
  7. 1 1
      Examples/AdvDemos/GLSViewer/GLSViewerD.ini
  8. BIN
      Examples/AdvDemos/GLSViewer/Locale/es/LC_MESSAGES/default.mo
  9. 51 81
      Examples/AdvDemos/GLSViewer/Locale/es/LC_MESSAGES/default.po
  10. BIN
      Examples/AdvDemos/GLSViewer/Locale/es/LC_MESSAGES/glsviewer.mo
  11. BIN
      Examples/AdvDemos/GLSViewer/Locale/es/LC_MESSAGES/languages.mo
  12. 1 1
      Examples/AdvDemos/GLSViewer/Locale/fr/LC_MESSAGES/languages.po
  13. 0 3565
      Examples/AdvDemos/GLSViewer/Locale/gnugettext.pas
  14. BIN
      Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/default.mo
  15. 17 17
      Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/default.po
  16. BIN
      Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/examples.mo
  17. BIN
      Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/glsvewer.mo
  18. BIN
      Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/glsviewer.mo
  19. BIN
      Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/languages.mo
  20. 6 6
      Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/languages.po
  21. 2 1
      Examples/AdvDemos/GLSViewer/Source/fGLAbout.dfm
  22. 2 4
      Examples/AdvDemos/GLSViewer/Source/fGLForm.pas
  23. 14 9
      Examples/AdvDemos/GLSViewer/Source/fGLOptions.dfm
  24. 2 3
      Examples/AdvDemos/GLSViewer/Source/fGLSViewer.pas
  25. 16 7
      Examples/Demos/bench/megaglasscube/fMegaglassD.dfm
  26. 47 0
      Examples/Demos/collisions/BoxSphere/BoxSphereC.cbproj
  27. 1 0
      Examples/Demos/collisions/BoxSphere/BoxSphereD.dproj
  28. 271 135
      Examples/Demos/collisions/BoxSphere/fBoxSphereD.dfm
  29. 47 0
      Examples/Demos/collisions/OcclusionQuery/OcclusionQueryC.cbproj
  30. 5 0
      Examples/Demos/collisions/OcclusionQuery/OcclusionQueryD.dproj
  31. 47 0
      Examples/Demos/collisions/RayBox/RayBoxC.cbproj
  32. 5 0
      Examples/Demos/collisions/RayBox/RayBoxD.dproj
  33. 1 1
      Examples/Demos/collisions/RayBox/fRayBoxC.cpp
  34. 65 32
      Examples/Demos/collisions/RayBox/fRayBoxC.dfm
  35. 2 2
      Examples/Demos/collisions/RayBox/fRayBoxC.h
  36. 5 0
      Examples/Demos/collisions/Raycast/RayCastD.dproj
  37. 47 0
      Examples/Demos/collisions/Raycast/RaycastC.cbproj
  38. 80 39
      Examples/Demos/collisions/Raycast/fRayCastD.dfm
  39. 47 0
      Examples/Demos/collisions/TriangleBox/TriangleBoxC.cbproj
  40. 5 0
      Examples/Demos/collisions/TriangleBox/TriangleBoxD.dproj
  41. 1 0
      Examples/Demos/collisions/boxedin/BoxedinD.dproj
  42. 47 0
      Examples/Demos/collisions/boxedin/boxedinC.cbproj
  43. 82 41
      Examples/Demos/collisions/boxedin/fBoxedinD.dfm
  44. 2 2
      Examples/Demos/collisions/boxedin/fBoxedinD.pas
  45. 5 0
      Examples/Demos/collisions/facevsface/FacevsFaceD.dproj
  46. 47 0
      Examples/Demos/collisions/facevsface/FacevsfaceC.cbproj
  47. 106 66
      Examples/Demos/collisions/facevsface/fFacevsFaceD.dfm
  48. 1 0
      Examples/Demos/collisions/meshhit/MeshHitD.dproj
  49. 47 0
      Examples/Demos/collisions/meshhit/MeshhitC.cbproj
  50. 43 22
      Examples/Demos/collisions/meshhit/fMeshHitD.dfm
  51. 48 0
      Examples/Demos/collisions/octree/OctreeC.cbproj
  52. 5 0
      Examples/Demos/collisions/octree/OctreeD.dproj
  53. 47 0
      Examples/Demos/collisions/sphere/SphereC.cbproj
  54. 5 0
      Examples/Demos/collisions/sphere/SphereD.dproj
  55. 86 61
      Examples/Demos/glslshaders/BumpShader/fBumpShaderD.dfm
  56. 43 46
      Examples/Demos/glslshaders/BumpShader/fBumpShaderD.pas
  57. 5 0
      Examples/Demos/glslshaders/DiffuseShader/DiffuseShaderD.dproj
  58. 13 13
      Examples/Demos/glslshaders/DiffuseShader/fDiffuseShaderD.dfm
  59. 4 4
      Examples/Demos/glslshaders/DiffuseShader/fDiffuseShaderD.pas
  60. 5 0
      Examples/Demos/glslshaders/LiningShaders/LiningShadersD.dproj
  61. 25 24
      Examples/Demos/glslshaders/LiningShaders/fLiningShaderD.dfm
  62. 11 11
      Examples/Demos/glslshaders/LiningShaders/fLiningShaderD.pas
  63. 25 0
      Examples/Demos/glslshaders/Mandelbrot/MandelbrotD.dproj
  64. 5 0
      Examples/Demos/glslshaders/Ocean/OceanD.dproj
  65. 5 0
      Examples/Demos/glslshaders/PostShader/PostShaderD.dproj
  66. 4 4
      Examples/Demos/glslshaders/PostShader/fPostShaderD.dfm
  67. 19 19
      Examples/Demos/glslshaders/PostShader/fPostShaderD.pas
  68. 5 0
      Examples/Demos/glslshaders/ShadersLab/ShadersLabD.dproj
  69. 1063 501
      Examples/Demos/glslshaders/ShadersLab/fShaderLabD.dfm
  70. 49 46
      Examples/Demos/glslshaders/ShadersLab/fShaderLabD.pas
  71. 0 7
      Examples/Demos/glslshaders/Shadertoy/ShadertoyD.dproj
  72. 5 0
      Examples/Demos/glslshaders/SkyboxShader/SkyboxShaderD.dproj
  73. 71 34
      Examples/Demos/sprites/imposter/fImposterD.dfm
  74. 0 13
      Examples/Demos/utilities/Language/Deutsch.ini
  75. 0 13
      Examples/Demos/utilities/Language/English.ini
  76. 0 13
      Examples/Demos/utilities/Language/LanguageD.dpr
  77. 0 1115
      Examples/Demos/utilities/Language/LanguageD.dproj
  78. 0 13
      Examples/Demos/utilities/Language/Russian.ini
  79. 0 87
      Examples/Demos/utilities/Language/fLanguageD.dfm
  80. 0 89
      Examples/Demos/utilities/Language/fLanguageD.pas
  81. 47 0
      Examples/Demos/utilities/ScreenSaver/ScreenSaverC.cbproj
  82. 48 0
      Examples/Demos/utilities/fontgen/FontgenC.cbproj
  83. 3 15
      Examples/Demos/utilities/utilities.groupproj
  84. 1 1
      Packages/GLScene_RT.dpk
  85. 1 1
      Packages/GLScene_RT.dproj
  86. 0 297
      Source/GLS.Language.pas
  87. 2 3
      Source/GLS.Scene.pas
  88. 1 3
      Source/GLS.SceneRegister.pas
  89. 1 2
      Source/GLS.Utils.pas
  90. 4433 0
      Source/gnugettext.pas
  91. 0 0
      _cleandebug.cmd

BIN
Assets/Map/earth.jpg


+ 0 - 2
Examples/AdvDemos/Christmas/ChristmasC.cbproj

@@ -9,7 +9,6 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
-        <CC_Suffix Condition="'$(CC_Suffix)'==''">c</CC_Suffix>
         <ProjectName Condition="'$(ProjectName)'==''">ChristmasC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -158,7 +157,6 @@
         <LinkPackageStatics>GLScene_Sounds_RT.lib</LinkPackageStatics>
         <LinkPackageImports>rtl.bpi;vcl.bpi;fmx.bpi;xmlrtl.bpi;vclimg.bpi;GLScene_RT.bpi</LinkPackageImports>
         <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
-        <BCC_UseClassicCompiler>false</BCC_UseClassicCompiler>
         <AppDPIAwarenessMode>none</AppDPIAwarenessMode>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 18920 - 4
Examples/AdvDemos/Earth/fEarthD.dfm


+ 7 - 10
Examples/AdvDemos/Earth/fEarthD.pas

@@ -16,6 +16,7 @@ uses
   Vcl.Forms,
   Vcl.ExtCtrls,
   Vcl.Imaging.Jpeg,
+  Vcl.Imaging.pngimage,
   Vcl.Menus,
   Vcl.ComCtrls,
 
@@ -43,7 +44,7 @@ uses
   Vcl.BaseImageCollection,
   Vcl.ImageCollection,
   Vcl.ImgList,
-  Vcl.VirtualImageList;
+  Vcl.VirtualImageList, GLS.GeomObjects;
 
 type
   TFormEarth = class(TForm)
@@ -101,6 +102,8 @@ type
     sfGanymede: TGLSphere;
     sfDeimos: TGLSphere;
     sfPhobos: TGLSphere;
+    diskSaturnUp: TGLDisk;
+    diskSaturnDn: TGLDisk;
     procedure FormCreate(Sender: TObject);
     procedure DirectOpenGLRender(Sender: TObject; var rci: TGLRenderContextInfo);
     procedure TimerTimer(Sender: TObject);
@@ -414,23 +417,17 @@ begin
   case tvPlanets.Selected.StateIndex of
      0: begin
           sfSun.Visible := True;
-          Camera.MoveTo(sfSun);
-          Camera.TargetObject := sfSun;
-          Cameracontroller.MoveTo(sfSun);
-          Cameracontroller.TargetObject := sfSun;
         end;
      1: begin
           sfMercury.Visible := True;
-          Camera.MoveTo(sfMercury);
-          Camera.TargetObject := sfMercury;
         end;
      2: begin
           sfVenus.Visible := True;
         end;
      3: begin
           Camera.MoveTo(sfEarth);
-          Camera.TargetObject := sfEarth;
           Cameracontroller.MoveTo(sfEarth);
+          Camera.TargetObject := sfEarth;
           Cameracontroller.TargetObject := sfEarth;
         end;
        4: begin
@@ -441,8 +438,6 @@ begin
           end;
      5: begin
           sfMars.Visible := True;
-          Camera.MoveTo(sfMars);
-          Camera.TargetObject := sfMars;
         end;
      6: begin
           // to be replaced with ffDeimos
@@ -470,6 +465,8 @@ begin
      13: begin
           // should have rings
           sfSaturn.Visible := True;
+          diskSaturnUp.Visible := True;
+          diskSaturnDn.Visible := True;
         end;
      14: begin
           sfEnceladus.Visible := True;

+ 0 - 1
Examples/AdvDemos/GLSViewer/GLSViewerD.dpr

@@ -10,7 +10,6 @@ uses
   dImages in 'Source\dImages.pas' {dmGLSViewer: TDataModule},
   fGLAbout in 'Source\fGLAbout.pas' {GLAbout},
   fGLOptions in 'Source\fGLOptions.pas' {GLOptions},
-  gnugettext in 'Locale\gnugettext.pas',
   dDialogs in 'Source\dDialogs.pas' {dmDialogs: TDataModule};
 
 {$R *.res}

+ 26 - 3
Examples/AdvDemos/GLSViewer/GLSViewerD.dproj

@@ -4,7 +4,7 @@
         <MainSource>GLSViewerD.dpr</MainSource>
         <Base>True</Base>
         <Config Condition="'$(Config)'==''">Debug</Config>
-        <TargetedPlatforms>1</TargetedPlatforms>
+        <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
@@ -35,6 +35,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
+        <Cfg_1_Win64>true</Cfg_1_Win64>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -46,6 +52,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
+        <Cfg_2_Win64>true</Cfg_2_Win64>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <DCC_E>false</DCC_E>
         <DCC_F>false</DCC_F>
@@ -72,6 +84,12 @@
     <PropertyGroup Condition="'$(Base_Win64)'!=''">
         <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
         <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
@@ -83,6 +101,9 @@
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
         <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Optimize>false</DCC_Optimize>
@@ -97,6 +118,9 @@
         <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
         <Icon_MainIcon>..\..\..\Assets\Icon\Pyramid.ico</Icon_MainIcon>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <DelphiCompile Include="$(MainSource)">
             <MainSource>MainSource</MainSource>
@@ -122,7 +146,6 @@
         <DCCReference Include="Source\fGLOptions.pas">
             <Form>GLOptions</Form>
         </DCCReference>
-        <DCCReference Include="Locale\gnugettext.pas"/>
         <DCCReference Include="Source\dDialogs.pas">
             <Form>dmDialogs</Form>
             <FormType>dfm</FormType>
@@ -157,7 +180,7 @@
             </Delphi.Personality>
             <Platforms>
                 <Platform value="Win32">True</Platform>
-                <Platform value="Win64">False</Platform>
+                <Platform value="Win64">True</Platform>
             </Platforms>
             <Deployment Version="4">
                 <DeployFile LocalName="GLSViewerD.exe" Configuration="Debug" Class="ProjectOutput"/>

+ 1 - 1
Examples/AdvDemos/GLSViewer/GLSViewerD.ini

@@ -1,4 +1,4 @@
 [GLOptions]
 CheckBoxAxis=1
-RadioGroupLanguage=25
+RadioGroupLanguage=9
 PanelBackground=0

BIN
Examples/AdvDemos/GLSViewer/Locale/es/LC_MESSAGES/default.mo


+ 51 - 81
Examples/AdvDemos/GLSViewer/Locale/es/LC_MESSAGES/default.po

@@ -2,18 +2,20 @@
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-# 
+#
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: \n"
 "POT-Creation-Date: 2012-12-20 07:34\n"
-"PO-Revision-Date: 2012-12-20 07:34\n"
+"PO-Revision-Date: 2024-05-23 15:09+0300\n"
 "Last-Translator: Somebody <[email protected]>\n"
+"Language-Team: \n"
+"Language: es\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: dxgettext 1.2.2\n"
+"X-Generator: Poedit 3.4.4\n"
 
 #. LibMaterialPicker..Caption
 #: FLibMaterialPicker.dfm:5
@@ -21,9 +23,8 @@ msgid "LibMaterial Picker"
 msgstr ""
 
 #. LibMaterialPicker..Label1..Caption
-#: FLibMaterialPicker.dfm:22
 #. MaterialEditorForm..GroupBox1..Caption
-#: FMaterialEditorForm.dfm:95
+#: FLibMaterialPicker.dfm:22 FMaterialEditorForm.dfm:95
 msgid "Material Preview"
 msgstr ""
 
@@ -50,7 +51,7 @@ msgstr ""
 #. MaterialEditorForm..PageControl1..TSTexture..Caption
 #: FMaterialEditorForm.dfm:67
 msgid "Texture"
-msgstr ""
+msgstr "Textura"
 
 #. RColorEditor..Label1..Caption
 #: FRColorEditor.dfm:15
@@ -228,16 +229,15 @@ msgid "Insert template"
 msgstr ""
 
 #. GLShaderEditor..Panel1..CancelButton..Caption
-#: FShaderMemo.dfm:254
 #. GUISkinEditor..panBottom..Button6..Caption
-#: GuiSkinEditorFormUnit.dfm:72
+#: FShaderMemo.dfm:254 GuiSkinEditorFormUnit.dfm:72
 msgid "Cancel"
-msgstr ""
+msgstr "Cancelar"
 
 #. GLShaderEditor..Panel1..CheckButton..Caption
 #: FShaderMemo.dfm:274
 msgid "Check"
-msgstr ""
+msgstr "Controlar"
 
 #. VectorEditorForm..Caption
 #: FVectorEditor.dfm:5
@@ -270,60 +270,51 @@ msgid "Invert"
 msgstr ""
 
 #. GLSceneEditorForm..ToolBar..TBEffectsPanel..Hint
-#: GLSceneEdit.dfm:205
 #. GLSceneEditorForm..ToolBar..TBEffectsPanel..Caption
-#: GLSceneEdit.dfm:206
+#: GLSceneEdit.dfm:205 GLSceneEdit.dfm:206
 msgid "Show Behaviours/Effects"
 msgstr ""
 
 #. GLSceneEditorForm..PABehaviours..Label1..Caption
-#: GLSceneEdit.dfm:334
 #. GLSceneEditorForm..PABehaviours..ToolBar1..TBAddBehaviours..Caption
-#: GLSceneEdit.dfm:406
+#: GLSceneEdit.dfm:334 GLSceneEdit.dfm:406
 msgid "Behaviours"
 msgstr ""
 
 #. GLSceneEditorForm..PABehaviours..Label2..Caption
-#: GLSceneEdit.dfm:343
 #. GLSceneEditorForm..PABehaviours..ToolBar1..TBAddEffects..Caption
-#: GLSceneEdit.dfm:417
+#: GLSceneEdit.dfm:343 GLSceneEdit.dfm:417
 msgid "Effects"
 msgstr ""
 
 #. GLSceneEditorForm..PABehaviours..ToolBar1..TBAddEffects..Hint
-#: GLSceneEdit.dfm:415
 #. GLSceneEditorForm..PopupMenu..MIAddEffect..Caption
-#: GLSceneEdit.dfm:446
 #. GLSceneEditorForm..PopupMenu..MIAddEffect..Hint
-#: GLSceneEdit.dfm:447
+#: GLSceneEdit.dfm:415 GLSceneEdit.dfm:446 GLSceneEdit.dfm:447
 msgid "Add effect"
 msgstr ""
 
 #. GLSceneEditorForm..PopupMenu..MIAddBehaviour..Caption
-#: GLSceneEdit.dfm:441
 #. GLSceneEditorForm..ActionList..ACAddBehaviour..Hint
-#: GLSceneEdit.dfm:493
+#: GLSceneEdit.dfm:441 GLSceneEdit.dfm:493
 msgid "Add behaviour"
 msgstr ""
 
 #. GLSceneEditorForm..ActionList..ACAddCamera..Caption
-#: GLSceneEdit.dfm:480
 #. GLSceneEditorForm..ActionList..ACAddCamera..Hint
-#: GLSceneEdit.dfm:481
+#: GLSceneEdit.dfm:480 GLSceneEdit.dfm:481
 msgid "Add camera"
 msgstr ""
 
 #. GLSceneEditorForm..ActionList..ACAddObject..Caption
-#: GLSceneEdit.dfm:486
 #. GLSceneEditorForm..ActionList..ACAddObject..Hint
-#: GLSceneEdit.dfm:487
+#: GLSceneEdit.dfm:486 GLSceneEdit.dfm:487
 msgid "Add object"
 msgstr ""
 
 #. GLSceneEditorForm..ActionList..ACDeleteObject..Caption
-#: GLSceneEdit.dfm:503
 #. GLSceneEditorForm..ActionList..ACDeleteObject..Hint
-#: GLSceneEdit.dfm:504
+#: GLSceneEdit.dfm:503 GLSceneEdit.dfm:504
 msgid "Delete object"
 msgstr ""
 
@@ -333,16 +324,14 @@ msgid "Delete behaviour"
 msgstr ""
 
 #. GLSceneEditorForm..ActionList..ACMoveUp..Caption
-#: GLSceneEdit.dfm:514
 #. GLSceneEditorForm..ActionList..ACMoveUp..Hint
-#: GLSceneEdit.dfm:515
+#: GLSceneEdit.dfm:514 GLSceneEdit.dfm:515
 msgid "Move object up"
 msgstr ""
 
 #. GLSceneEditorForm..ActionList..ACMoveDown..Caption
-#: GLSceneEdit.dfm:521
 #. GLSceneEditorForm..ActionList..ACMoveDown..Hint
-#: GLSceneEdit.dfm:522
+#: GLSceneEdit.dfm:521 GLSceneEdit.dfm:522
 msgid "Move object down"
 msgstr ""
 
@@ -362,23 +351,20 @@ msgid "OpenGL Info"
 msgstr ""
 
 #. GLSceneEditorForm..ActionList..ACCopy..Caption
-#: GLSceneEdit.dfm:546
 #. GLSceneEditorForm..ActionList..ACCopy..Hint
-#: GLSceneEdit.dfm:547
+#: GLSceneEdit.dfm:546 GLSceneEdit.dfm:547
 msgid "Copy"
-msgstr ""
+msgstr "Копировать"
 
 #. GLSceneEditorForm..ActionList..ACCut..Caption
-#: GLSceneEdit.dfm:553
 #. GLSceneEditorForm..ActionList..ACCut..Hint
-#: GLSceneEdit.dfm:554
+#: GLSceneEdit.dfm:553 GLSceneEdit.dfm:554
 msgid "Cut"
 msgstr ""
 
 #. GLSceneEditorForm..ActionList..ACPaste..Caption
-#: GLSceneEdit.dfm:560
 #. GLSceneEditorForm..ActionList..ACPaste..Hint
-#: GLSceneEdit.dfm:561
+#: GLSceneEdit.dfm:560 GLSceneEdit.dfm:561
 msgid "Paste"
 msgstr ""
 
@@ -398,9 +384,8 @@ msgid "Add OpenGL Image Resource"
 msgstr ""
 
 #. GLSCUDAEditorForm..ToolBar1..DeleteButton..Hint
-#: GLSCUDAEditor.dfm:74
 #. GLSCUDAEditorForm..ToolBar1..DeleteButton..Caption
-#: GLSCUDAEditor.dfm:75
+#: GLSCUDAEditor.dfm:74 GLSCUDAEditor.dfm:75
 msgid "Delete Item"
 msgstr ""
 
@@ -446,14 +431,12 @@ msgstr ""
 
 #. Programmer's name for it: glsDisplayList
 #: GLStrings.pas:32
-msgid "Failed to create a new display list for object "
-"'%s'"
+msgid "Failed to create a new display list for object '%s'"
 msgstr ""
 
 #. Programmer's name for it: glsWrongBitmapCanvas
 #: GLStrings.pas:33
-msgid "Couldn't create a rendering context for the given "
-"bitmap"
+msgid "Couldn't create a rendering context for the given bitmap"
 msgstr ""
 
 #. Programmer's name for it: glsWrongPrinter
@@ -528,39 +511,33 @@ msgstr ""
 
 #. Programmer's name for it: glsMaterialNotFoundInMatlib
 #: GLStrings.pas:58
-msgid "Material not found in current Material "
-"Library!"
+msgid "Material not found in current Material Library!"
 msgstr ""
 
 #. Programmer's name for it: glsMaterialNotFoundInMatlibEx
 #: GLStrings.pas:59
-msgid "Material \"%s\" not found in current Material "
-"Library!"
+msgid "Material \"%s\" not found in current Material Library!"
 msgstr ""
 
 #. GLObjects
 #. Programmer's name for it: glsSphereTopBottom
 #: GLStrings.pas:62
-msgid "The top angle must be higher than the bottom "
-"angle"
+msgid "The top angle must be higher than the bottom angle"
 msgstr ""
 
 #. Programmer's name for it: glsSphereStartStop
 #: GLStrings.pas:63
-msgid "The start angle must be smaller than then stop "
-"angle"
+msgid "The start angle must be smaller than then stop angle"
 msgstr ""
 
 #. Programmer's name for it: glsMaterialNotFound
 #: GLStrings.pas:64
-msgid "Loading failed: could not find material "
-"%s"
+msgid "Loading failed: could not find material %s"
 msgstr ""
 
 #. Programmer's name for it: glsInterleaveNotSupported
 #: GLStrings.pas:65
-msgid "Interleaved Array format not supported yet. "
-"Sorry."
+msgid "Interleaved Array format not supported yet. Sorry."
 msgstr ""
 
 #. common messages
@@ -586,7 +563,8 @@ msgstr ""
 
 #. Programmer's name for it: glsFailedOpenFileFromCurrentDir
 #: GLStrings.pas:72
-msgid "Could not open file: %s\n"
+msgid ""
+"Could not open file: %s\n"
 "(Current directory is %s)"
 msgstr ""
 
@@ -602,8 +580,9 @@ msgstr ""
 
 #. Programmer's name for it: glsUnknownExtension
 #: GLStrings.pas:76
-msgid "Unknown file extension (%s), maybe you forgot to add the support unit "
-"to your uses? (%s?)"
+msgid ""
+"Unknown file extension (%s), maybe you forgot to add the support unit to "
+"your uses? (%s?)"
 msgstr ""
 
 #. Programmer's name for it: glsMissingResource
@@ -689,8 +668,7 @@ msgstr ""
 
 #. Programmer's name for it: glsOCExperimental
 #: GLStrings.pas:98
-msgid "Unknown %s \"%s\" for \"%s\" or program not in "
-"use"
+msgid "Unknown %s \"%s\" for \"%s\" or program not in use"
 msgstr ""
 
 #. Programmer's name for it: gluInvalidColor
@@ -700,20 +678,19 @@ msgstr ""
 
 #. Programmer's name for it: cForwardContextFailed
 #: GLWin32Context.pas:169
-msgid "Can not create forward compatible context: #%X, "
-"%s"
+msgid "Can not create forward compatible context: #%X, %s"
 msgstr ""
 
 #. Programmer's name for it: cBackwardContextFailed
 #: GLWin32Context.pas:170
-msgid "Can not create backward compatible context: #%X, "
-"%s"
+msgid "Can not create backward compatible context: #%X, %s"
 msgstr ""
 
 #. Programmer's name for it: cFailHWRC
 #: GLWin32Context.pas:171
-msgid "Unable to create rendering context with hardware acceleration - down "
-"to software"
+msgid ""
+"Unable to create rendering context with hardware acceleration - down to "
+"software"
 msgstr ""
 
 #. Programmer's name for it: glsTmpRC_Created
@@ -723,26 +700,22 @@ msgstr ""
 
 #. Programmer's name for it: glsDriverNotSupportFRC
 #: GLWin32Context.pas:173
-msgid "Driver not support creating of forward "
-"context"
+msgid "Driver not support creating of forward context"
 msgstr ""
 
 #. Programmer's name for it: glsDriverNotSupportOESRC
 #: GLWin32Context.pas:174
-msgid "Driver not support creating of OpenGL ES 2.0 "
-"context"
+msgid "Driver not support creating of OpenGL ES 2.0 context"
 msgstr ""
 
 #. Programmer's name for it: glsDriverNotSupportDebugRC
 #: GLWin32Context.pas:175
-msgid "Driver not support creating of debug "
-"context"
+msgid "Driver not support creating of debug context"
 msgstr ""
 
 #. Programmer's name for it: glsOESvsForwardRC
 #: GLWin32Context.pas:176
-msgid "OpenGL ES 2.0 context incompatible with Forward context - flag "
-"ignored"
+msgid "OpenGL ES 2.0 context incompatible with Forward context - flag ignored"
 msgstr ""
 
 #. Programmer's name for it: glsFRC_created
@@ -757,8 +730,7 @@ msgstr ""
 
 #. Programmer's name for it: glsPBufferRC_created
 #: GLWin32Context.pas:179
-msgid "Backward compatible core PBuffer context successfully "
-"created"
+msgid "Backward compatible core PBuffer context successfully created"
 msgstr ""
 
 #. Programmer's name for it: strInvalidType
@@ -778,8 +750,7 @@ msgstr ""
 
 #. Programmer's name for it: glsJoystickError
 #: Joystick.pas:124
-msgid "Your system reports a joystick error, can't do anything about "
-"it"
+msgid "Your system reports a joystick error, can't do anything about it"
 msgstr ""
 
 #. Programmer's name for it: rstrOpenGLError
@@ -811,4 +782,3 @@ msgstr ""
 #: XCollection.pas:192
 msgid "Unknown archive version : "
 msgstr ""
-

BIN
Examples/AdvDemos/GLSViewer/Locale/es/LC_MESSAGES/glsviewer.mo


BIN
Examples/AdvDemos/GLSViewer/Locale/es/LC_MESSAGES/languages.mo


+ 1 - 1
Examples/AdvDemos/GLSViewer/Locale/fr/LC_MESSAGES/languages.po

@@ -22,7 +22,7 @@ msgid "Arabic"
 msgstr "Arabe"
 
 msgid "Chinese"
-msgstr ""
+msgstr "China"
 
 msgid "English"
 msgstr "Anglais"

+ 0 - 3565
Examples/AdvDemos/GLSViewer/Locale/gnugettext.pas

@@ -1,3565 +0,0 @@
-//
-// This unit is part of the GLScene Engine, http://glscene.org
-//
-{*------------------------------------------------------------------------------
-  GNU gettext translation system for Delphi, Kylix, C++ Builder and others.
-  All parts of the translation system are kept in this unit.
-
-  @author Lars B. Dybdahl and others
-  @version $LastChangedRevision$
-  @see http://dybdahl.dk/dxgettext/
--------------------------------------------------------------------------------}
-unit GnuGettext;
-
- (**************************************************************)
- (*                                                            *)
- (*  (C) Copyright by Lars B. Dybdahl and others               *)
- (*  E-mail: [email protected], phone +45 70201241               *)
- (*                                                            *)
- (*  Contributors: Peter Thornqvist, Troy Wolbrink,            *)
- (*                Frank Andreas de Groot, Igor Siticov,       *)
- (*                Jacques Garcia Vazquez, Igor Gitman         *)
-(*                Arvid Winkelsdorf, Andreas Hausladen,       *)
-(*                Olivier Sannier                             *)
- (*                                                            *)
- (*  See http://dybdahl.dk/dxgettext/ for more information     *)
- (*                                                            *)
- (**************************************************************)
-
-// Information about this file:
-// $--LastChangedDate: 2010-08-25 15:40:17 +0200 (mer., 25 avg 2010) $
-// $--LastChangedRevision: 220 $
-// $--HeadURL: http://svn.berlios.de/svnroot/repos/dxgettext/trunk/dxgettext/sample/gnugettext.pas $
-
- // Redistribution and use in source and binary forms, with or without
- // modification, are permitted provided that the following conditions are met:
-
- // The names of any contributor may not be used to endorse or promote
- // products derived from this software without specific prior written permission.
-
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-interface
-
- // If the conditional define DXGETTEXTDEBUG is defined, debugging log is activated.
- // Use DefaultInstance.DebugLogToFile() to write the log to a file.
- { $define DXGETTEXTDEBUG}
-
-{$ifdef VER140}
-  // Delphi 6
-  {$DEFINE DELPHI2007OROLDER}
-{$ifdef MSWINDOWS}
-  {$DEFINE DELPHI6OROLDER}
-{$endif}
-{$endif}
-{$ifdef VER150}
-  // Delphi 7
-  {$DEFINE DELPHI2007OROLDER}
-{$endif}
-{$ifdef VER160}
-  // Delphi 8
-  {$DEFINE DELPHI2007OROLDER}
-{$endif}
-{$ifdef VER170}
-  // Delphi 2005
-  {$DEFINE DELPHI2007OROLDER}
-{$endif}
-{$ifdef VER180}
-  // Delphi 2006
-  {$DEFINE DELPHI2007OROLDER}
-{$endif}
-{$ifdef VER190}
-  // Delphi 2007
-  {$DEFINE DELPHI2007OROLDER}
-{$endif}
-{$ifdef VER200}
-  // Delphi 2009 with Unicode
-{$endif}
-{$ifdef VER220}
-  // Delphi XE with Unicode
-{$endif}
-{$ifdef VER230}
-  // Delphi XE2 with Unicode
-{$endif}
-{$ifdef VER240}
-  // Delphi XE3 with Unicode
-  {$DEFINE DELPHIXE3OROLDER}
-{$endif}
-
-
-uses
-{$ifdef MSWINDOWS}
-  Winapi.Windows,
-{$else}
-  Libc,
-{$ifdef FPC}
-  CWString,
-{$endif}
-{$endif}
-  Classes,
-  StrUtils,
-  SysUtils,
-  TypInfo;
-
- (*****************************************************************************)
- (*                                                                           *)
- (*  MAIN API                                                                 *)
- (*                                                                           *)
- (*****************************************************************************)
-
-type
-  {$IFNDEF UNICODE}
-  UnicodeString=WideString;
-  RawUtf8String=AnsiString;
-  RawByteString=AnsiString;
-  {$ELSE}
-  RawUtf8String=RawByteString;
-  {$ENDIF}
-  DomainString   = string;
-  LanguageString = string;
-  ComponentNameString = string;
-  FilenameString = string;
-  MsgIdString    = UnicodeString;
-  TranslatedUnicodeString = UnicodeString;
-
-// Main GNU gettext functions. See documentation for instructions on how to use them.
-function _(const szMsgId: MsgIdString): TranslatedUnicodeString;
-function gettext(const szMsgId: MsgIdString): TranslatedUnicodeString;
-function dgettext(const szDomain: DomainString;
-  const szMsgId: MsgIdString): TranslatedUnicodeString;
-function dngettext(const szDomain: DomainString; const singular, plural: MsgIdString;
-  Number: longint): TranslatedUnicodeString;
-function ngettext(const singular, plural: MsgIdString;
-  Number: longint): TranslatedUnicodeString;
-procedure textdomain(const szDomain: DomainString);
-function getcurrenttextdomain: DomainString;
-procedure bindtextdomain(const szDomain: DomainString;
-  const szDirectory: FilenameString);
-
-// Set language to use
-procedure UseLanguage(LanguageCode: LanguageString);
-function GetCurrentLanguage: LanguageString;
-
- // Translates a component (form, frame etc.) to the currently selected language.
- // Put TranslateComponent(self) in the OnCreate event of all your forms.
- // See the manual for documentation on these functions
-type
-  TTranslator = procedure(obj: TObject) of object;
-
-procedure TP_Ignore(AnObject: TObject; const Name: ComponentNameString);
-procedure TP_IgnoreClass(IgnClass: TClass);
-procedure TP_IgnoreClassProperty(IgnClass: TClass; const propertyname: ComponentNameString);
-procedure TP_GlobalIgnoreClass(IgnClass: TClass);
-procedure TP_GlobalIgnoreClassProperty(IgnClass: TClass; const propertyname: ComponentNameString);
-procedure TP_GlobalHandleClass(HClass: TClass; Handler: TTranslator);
-procedure TranslateComponent(AnObject: TComponent; const TextDomain: DomainString = '');
-procedure RetranslateComponent(AnObject: TComponent; const TextDomain: DomainString = '');
-
- // Add more domains that resourcestrings can be extracted from. If a translation
- // is not found in the default domain, this domain will be searched, too.
- // This is useful for adding mo files for certain runtime libraries and 3rd
- // party component libraries
-procedure AddDomainForResourceString(const domain: DomainString);
-procedure RemoveDomainForResourceString(const domain: DomainString);
-
-// Add more domains that component strings can be extracted from. If a translation
-// is not found in the default domain, this domain will be searched, too.
-// This is useful when an application inherits components from a 3rd
-// party component libraries
-procedure AddDomainForComponent (const domain:DomainString);
-procedure RemoveDomainForComponent (const domain:DomainString);
-
-// Unicode-enabled way to get resourcestrings, automatically translated
-// Use like this: ws:=LoadResStringW(@NameOfResourceString);
-function LoadResString(ResStringRec: PResStringRec): WideString;
-function LoadResStringW(ResStringRec: PResStringRec): UnicodeString;
-
-// This returns an empty string if not translated or translator name is not specified.
-function GetTranslatorNameAndEmail: TranslatedUnicodeString;
-
-
- (*****************************************************************************)
- (*                                                                           *)
- (*  ADVANCED FUNCTIONALITY                                                   *)
- (*                                                                           *)
- (*****************************************************************************)
-
-const
-  DefaultTextDomain = 'default';
-
-var
-  ExecutableFilename: FilenameString;
-// This is set to paramstr(0) or the name of the DLL you are creating.
-
-const
-  PreferExternal             = False;       // Set to true, to prefer external *.mo over embedded translation
-  UseMemoryMappedFiles       = True;        // Set to False, to use the mo-file as independent copy in memory (you can update the file while it is in use)
-  ReReadMoFileOnSameLanguage = True;       // Set to True, to reread mo-file if the current language is selected again
-
-const
-  // Subversion source code version control version information
-  VCSVersion = '$LastChangedRevision$';
-
-type
-  EGnuGettext = class(Exception);
-  EGGProgrammingError = class(EGnuGettext);
-  EGGComponentError = class(EGnuGettext);
-  EGGIOError = class(EGnuGettext);
-  EGGAnsi2WideConvError = class(EGnuGettext);
-
-// This function will turn resourcestring hooks on or off, eventually with BPL file support.
-// Please do not activate BPL file support when the package is in design mode.
-const
-  AutoCreateHooks = True;
-
-procedure HookIntoResourceStrings(Enabled: boolean = True;
-  SupportPackages: boolean = False);
-
- (*****************************************************************************)
- (*                                                                           *)
- (*  CLASS based implementation.                                              *)
- (*  Use TGnuGettextInstance to have more than one language                   *)
- (*  in your application at the same time                                     *)
- (*                                                                           *)
- (*****************************************************************************)
-
-{$ifdef MSWINDOWS}
-{$ifndef DELPHIXE3OROLDER}
-{$WARN UNSAFE_TYPE OFF}
-{$WARN UNSAFE_CODE OFF}
-{$WARN UNSAFE_CAST OFF}
-{$endif}
-{$endif}
-
-type
-  TOnDebugLine = procedure(Sender: TObject; const Line: string; var Discard: boolean) of
-    object;  // Set Discard to false if output should still go to ordinary debug log
-  TGetPluralForm = function(Number: longint): integer;
-  TDebugLogger   = procedure(line: ansistring) of object;
-
-{*------------------------------------------------------------------------------
-  Handles .mo files, in separate files or inside the exe file.
-  Don't use this class. It's for internal use.
--------------------------------------------------------------------------------}
-  TMoFile=
-    class /// Threadsafe. Only constructor and destructor are writing to memory
-    private
-      doswap: boolean;
-    public
-      Users:Integer; /// Reference count. If it reaches zero, this object should be destroyed.
-      constructor Create (const filename: FilenameString;
-                          const Offset: int64; Size: int64;
-                          const xUseMemoryMappedFiles: Boolean);
-      destructor Destroy; override;
-      function gettext(const msgid: RawUtf8String;var found:boolean): RawUtf8String; // uses mo file and utf-8
-      property isSwappedArchitecture:boolean read doswap;
-    private
-      N, O, T: Cardinal; /// Values defined at http://www.linuxselfhelp.com/gnu/gettext/html_chapter/gettext_6.html
-      startindex,startstep:integer;
-      FUseMemoryMappedFiles: Boolean;
-    mo:      THandle;
-    momapping: THandle;
-    momemoryHandle: PAnsiChar;
-    momemory: PAnsiChar;
-    function autoswap32(i: cardinal): cardinal;
-    function CardinalInMem(baseptr: PAnsiChar; Offset: cardinal): cardinal;
-  end;
-
-{*------------------------------------------------------------------------------
-  Handles all issues regarding a specific domain.
-  Don't use this class. It's for internal use.
--------------------------------------------------------------------------------}
-  TDomain = class
-  private
-    Enabled:    boolean;
-    vDirectory: FilenameString;
-    procedure setDirectory(const dir: FilenameString);
-  public
-    DebugLogger: TDebugLogger;
-    Domain:      DomainString;
-    property Directory: FilenameString Read vDirectory Write setDirectory;
-    constructor Create;
-    destructor Destroy; override;
-    // Set parameters
-    procedure SetLanguageCode(const langcode: LanguageString);
-    procedure SetFilename(const filename: FilenameString);
-    // Bind this domain to a specific file
-    // Get information
-    procedure GetListOfLanguages(list: TStrings);
-    function GetTranslationProperty(Propertyname: ComponentNameString): TranslatedUnicodeString;
-    function gettext(const msgid: RawUtf8String): RawUtf8String;
-    // uses mo file and utf-8
-  private
-    mofile:  TMoFile;
-    SpecificFilename: FilenameString;
-    curlang: LanguageString;
-    OpenHasFailedBefore: boolean;
-    procedure OpenMoFile;
-    procedure CloseMoFile;
-  end;
-
-{*------------------------------------------------------------------------------
-  Helper class for invoking events.
--------------------------------------------------------------------------------}
-  TExecutable = class
-    procedure Execute; virtual; abstract;
-  end;
-
-{*------------------------------------------------------------------------------
-  The main translation engine.
--------------------------------------------------------------------------------}
-  TGnuGettextInstance = class
-  private
-    fOnDebugLine:  TOnDebugLine;
-    CreatorThread: cardinal;  /// Only this thread can use LoadResString
-  public
-    Enabled: boolean;      /// Set this to false to disable translations
-    DesignTimeCodePage: integer;
-    /// See MultiByteToWideChar() in Win32 API for documentation
-    constructor Create;
-    destructor Destroy; override;
-    procedure UseLanguage(LanguageCode: LanguageString);
-    procedure GetListOfLanguages(const domain: DomainString; list: TStrings);
-    // Puts list of language codes, for which there are translations in the specified domain, into list
-    {$ifndef UNICODE}
-    function gettext(const szMsgId: ansistring): TranslatedUnicodeString; overload; virtual;
-    function ngettext(const singular,plural:ansistring;Number:longint):TranslatedUnicodeString; overload; virtual;
-    {$endif}
-    function gettext(const szMsgId: MsgIdString): TranslatedUnicodeString; overload; virtual;
-    function gettext_NoExtract(const szMsgId: MsgIdString): TranslatedUnicodeString;
-    function gettext_NoOp(const szMsgId: MsgIdString): TranslatedUnicodeString;
-    function ngettext(const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString; overload; virtual;
-    function ngettext_NoExtract(const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString;
-    function GetCurrentLanguage:LanguageString;
-    function GetTranslationProperty (const Propertyname:ComponentNameString):TranslatedUnicodeString;
-    function GetTranslatorNameAndEmail:TranslatedUnicodeString;
-
-    // Form translation tools, these are not threadsafe. All TP_ procs must be called just before TranslateProperites()
-    procedure TP_Ignore(AnObject: TObject; const Name: ComponentNameString);
-    procedure TP_IgnoreClass(IgnClass: TClass);
-    procedure TP_IgnoreClassProperty(IgnClass: TClass; propertyname: ComponentNameString);
-    procedure TP_GlobalIgnoreClass(IgnClass: TClass);
-    procedure TP_GlobalIgnoreClassProperty(IgnClass: TClass; propertyname: ComponentNameString);
-    procedure TP_GlobalHandleClass(HClass: TClass; Handler: TTranslator);
-    procedure TranslateProperties(AnObject: TObject; textdomain: DomainString = '');
-    procedure TranslateComponent(AnObject: TComponent; const TextDomain: DomainString = '');
-    procedure RetranslateComponent(AnObject: TComponent; const TextDomain: DomainString = '');
-
-    // Multi-domain functions
-    {$ifndef UNICODE}
-    function dgettext(const szDomain: DomainString; const szMsgId: ansistring): TranslatedUnicodeString; overload; virtual;
-    function dngettext(const szDomain: DomainString; const singular,plural:ansistring;Number:longint):TranslatedUnicodeString; overload; virtual;
-    {$endif}
-    function dgettext(const szDomain: DomainString;
-      const szMsgId: MsgIdString): TranslatedUnicodeString; overload; virtual;
-    function dgettext_NoExtract(const szDomain: DomainString;
-      const szMsgId: MsgIdString): TranslatedUnicodeString;
-    function dngettext(const szDomain: DomainString;
-      const singular, plural: MsgIdString; Number: longint): TranslatedUnicodeString;
-      overload; virtual;
-    function dngettext_NoExtract(const szDomain: DomainString;
-      const singular, plural: MsgIdString; Number: longint): TranslatedUnicodeString;
-    procedure textdomain(const szDomain: DomainString);
-    function getcurrenttextdomain: DomainString;
-    procedure bindtextdomain(const szDomain: DomainString;
-      const szDirectory: FilenameString);
-    procedure bindtextdomainToFile(const szDomain: DomainString;
-      const filename: FilenameString); // Also works with files embedded in exe file
-
-    // Windows API functions
-    function LoadResString(ResStringRec: PResStringRec): UnicodeString;
-
-    // Output all log info to this file. This may only be called once.
-    procedure DebugLogToFile(const filename: FilenameString; append: boolean = False);
-    procedure DebugLogPause(PauseEnabled: boolean);
-    property OnDebugLine: TOnDebugLine Read fOnDebugLine Write fOnDebugLine;
-    // If set, all debug output goes here
-      {$ifndef UNICODE}
-    // Conversion according to design-time character set
-    function ansi2wideDTCP(const s: ansistring): MsgIdString;
-    // Convert using Design Time Code Page
-      {$endif}
-  protected
-    procedure TranslateStrings(sl: TStrings; const TextDomain: DomainString);
-
-    // Override these three, if you want to inherited from this class
-    // to create a new class that handles other domain and language dependent
-    // issues
-    procedure WhenNewLanguage(const LanguageID: LanguageString);
-      virtual;         // Override to know when language changes
-    procedure WhenNewDomain(const TextDomain: DomainString); virtual;
-    // Override to know when text domain changes. Directory is purely informational
-    procedure WhenNewDomainDirectory(const TextDomain: DomainString;
-      const Directory: FilenameString); virtual;
-    // Override to know when any text domain's directory changes. It won't be called if a domain is fixed to a specific file.
-  private
-    curlang:      LanguageString;
-    curGetPluralForm: TGetPluralForm;
-    curmsgdomain: DomainString;
-    savefileCS:   TMultiReadExclusiveWriteSynchronizer;
-    savefile:     TextFile;
-    savememory:   TStringList;
-    DefaultDomainDirectory: FilenameString;
-    domainlist:   TStringList;     /// List of domain names. Objects are TDomain.
-    TP_IgnoreList: TStringList;
-    /// Temporary list, reset each time TranslateProperties is called
-    TP_ClassHandling: TList;
-    /// Items are TClassMode. If a is derived from b, a comes first
-    TP_GlobalClassHandling: TList;
-    /// Items are TClassMode. If a is derived from b, a comes first
-    TP_Retranslator: TExecutable; /// Cast this to TTP_Retranslator
-    FWhenNewLanguageListeners: TInterfaceList;  /// List of all registered WhenNewLanguage listeners
-    {$ifdef DXGETTEXTDEBUG}
-    DebugLogCS:TMultiReadExclusiveWriteSynchronizer;
-    DebugLog:TStream;
-    DebugLogOutputPaused:Boolean;
-    {$endif}
-    function TP_CreateRetranslator: TExecutable;  // Must be freed by caller!
-    procedure FreeTP_ClassHandlingItems;
-      {$ifdef DXGETTEXTDEBUG}
-      procedure DebugWriteln(line: ansistring);
-      {$endif}
-    procedure TranslateProperty(AnObject: TObject; PropInfo: PPropInfo;
-      TodoList: TStrings; const TextDomain: DomainString);
-    function Getdomain(const domain: DomainString;
-      const DefaultDomainDirectory: FilenameString;
-      const CurLang: LanguageString): TDomain;
-    // Translates a single property of an object
-  end;
-
-const
-  LOCALE_SISO639LANGNAME = $59;    // Used by Lazarus software development tool
-  {$NODEFINE LOCALE_SISO639LANGNAME}
-  LOCALE_SISO3166CTRYNAME = $5A;   // Used by Lazarus software development tool
-  {$NODEFINE LOCALE_SISO3166CTRYNAME }
-
-var
-  DefaultInstance: TGnuGettextInstance;
-/// Default instance of the main API for singlethreaded applications.
-
-implementation
-
-{$ifndef MSWINDOWS}
-{$ifndef LINUX}
-  'This version of gnugettext.pas is only meant to be compiled with Kylix 3,'
-  'Delphi 6, Delphi 7 and later versions. If you use other versions, please'
-  'get the gnugettext.pas version from the Delphi 5 directory.'
-{$endif}
-{$endif}
-
- (**************************************************************************)
- // Some comments on the implementation:
- // This unit should be independent of other units where possible.
- // It should have a small footprint in any way.
- (**************************************************************************)
- // TMultiReadExclusiveWriteSynchronizer is used instead of TCriticalSection
- // because it makes this unit independent of the SyncObjs unit
- (**************************************************************************)
-
-{$B-,R+,I+,Q+}
-
-type
-  TTP_RetranslatorItem = class
-    obj:      TObject;
-    Propname: ComponentNameString;
-    OldValue: TranslatedUnicodeString;
-  end;
-
-  TTP_Retranslator = class(TExecutable)
-    TextDomain: DomainString;
-    Instance:   TGnuGettextInstance;
-    constructor Create;
-    destructor Destroy; override;
-    procedure Remember(obj: TObject; PropName: ComponentNameString;
-      OldValue: TranslatedUnicodeString);
-    procedure Execute; override;
-  private
-    list: TList;
-  end;
-
-  TEmbeddedFileInfo = class
-    offset, size: int64;
-  end;
-
-  TFileLocator = class // This class finds files even when embedded inside executable
-    constructor Create;
-    destructor Destroy; override;
-    function FindSignaturePos(const signature: RawByteString; str: TFileStream): Int64;
-    procedure Analyze;  // List files embedded inside executable
-    function FileExists(filename: FilenameString): boolean;
-    function GetMoFile(filename: FilenameString; DebugLogger: TDebugLogger): TMoFile;
-    procedure ReleaseMoFile(mofile: TMoFile);
-  private
-    basedirectory: FilenameString;
-    filelist: TStringList;
-    //Objects are TEmbeddedFileInfo. Filenames are relative to .exe file
-    MoFilesCS: TMultiReadExclusiveWriteSynchronizer;
-    MoFiles: TStringList; // Objects are filenames+offset, objects are TMoFile
-    function ReadInt64(str: TStream): int64;
-  end;
-
-  TGnuGettextComponentMarker = class(TComponent)
-  public
-    LastLanguage: LanguageString;
-    Retranslator: TExecutable;
-    destructor Destroy; override;
-  end;
-
-  TClassMode = class
-    HClass: TClass;
-    SpecialHandler: TTranslator;
-    PropertiesToIgnore: TStringList; // This is ignored if Handler is set
-    constructor Create;
-    destructor Destroy; override;
-  end;
-
-  TRStrinfo = record
-    strlength, stroffset: cardinal;
-  end;
-  TStrInfoArr = array[0..10000000] of TRStrinfo;
-  PStrInfoArr = ^TStrInfoArr;
-  TCharArray5 = array[0..4] of ansichar;
-
-  THook =  // Replaces a runtime library procedure with a custom procedure
-    class
-  public
-    constructor Create(OldProcedure, NewProcedure: pointer; FollowJump: boolean = False);
-    destructor Destroy; override;  // Restores unhooked state
-    procedure Reset(FollowJump: boolean = False);
-    // Disables and picks up patch points again
-    procedure Disable;
-    procedure Enable;
-  private
-    oldproc, newproc: Pointer;
-    Patch:    TCharArray5;
-    Original: TCharArray5;
-    PatchPosition: PAnsiChar;
-    procedure Shutdown; // Same as destroy, except that object is not destroyed
-  end;
-
-var
-  // System information
-  Win32PlatformIsUnicode: boolean = False;
-
-  // Information about files embedded inside .exe file
-  FileLocator: TFileLocator;
-
-  // Hooks into runtime library functions
-  ResourceStringDomainListCS: TMultiReadExclusiveWriteSynchronizer;
-  ResourceStringDomainList: TStringList;
-  ComponentDomainListCS:TMultiReadExclusiveWriteSynchronizer;
-  ComponentDomainList:TStringList;
-  HookLoadResString: THook;
-  HookLoadStr:    THook;
-  HookFmtLoadStr: THook;
-
-function GGGetEnvironmentVariable(const Name: WideString): WideString;
-var
-  Len: integer;
-  W:   WideString;
-begin
-  Result := '';
-  SetLength(W, 1);
-  Len := GetEnvironmentVariableW(PWideChar(Name), PWideChar(W), 1);
-  if Len > 0 then
-  begin
-    SetLength(Result, Len - 1);
-    GetEnvironmentVariableW(PWideChar(Name), PWideChar(Result), Len);
-  end;
-end;
-
-function StripCRRawMsgId(s: RawUtf8String): RawUtf8String;
-var
-  i: integer;
-begin
-  i := 1;
-  while i <= length(s) do
-  begin
-    if s[i] = #13 then
-      Delete(s, i, 1)
-    else
-      Inc(i);
-  end;
-  Result := s;
-end;
-
-function EnsureLineBreakInTranslatedString(s: RawUtf8String): RawUtf8String;
-{$ifdef MSWINDOWS}
-var
-  i: integer;
-{$endif}
-begin
-  {$ifdef MSWINDOWS}
-  Assert(sLinebreak = AnsiString(#13#10));
-  i := 1;
-  while i <= length(s) do
-  begin
-    if (s[i] = #10) and (MidStr(s, i - 1, 1) <> #13) then
-    begin
-      insert(#13, s, i);
-      Inc(i, 2);
-    end
-    else
-      Inc(i);
-  end;
-  {$endif}
-  Result := s;
-end;
-
-function IsWriteProp(Info: PPropInfo): boolean;
-begin
-  Result := Assigned(Info) and (Info^.SetProc <> nil);
-end;
-
-function ResourceStringGettext(MsgId: MsgIdString): TranslatedUnicodeString;
-var
-  i: integer;
-begin
-  if (MsgID = '') or (ResourceStringDomainListCS = nil) then
-  begin
-    // This only happens during very complicated program startups that fail,
-    // or when Msgid=''
-    Result := MsgId;
-    exit;
-  end;
-  ResourceStringDomainListCS.BeginRead;
-  try
-    for i := 0 to ResourceStringDomainList.Count - 1 do
-    begin
-      Result := dgettext(ResourceStringDomainList.Strings[i], MsgId);
-      if Result <> MsgId then
-        break;
-    end;
-  finally
-    ResourceStringDomainListCS.EndRead;
-  end;
-end;
-
-function ComponentGettext(MsgId: MsgIdString; Instance: TGnuGettextInstance = nil): TranslatedUnicodeString;
-var
-  i:integer;
-begin
-  if (MsgID='') or (ComponentDomainListCS=nil) then begin
-    // This only happens during very complicated program startups that fail,
-    // or when Msgid=''
-    Result:=MsgId;
-    exit;
-  end;
-  ComponentDomainListCS.BeginRead;
-  try
-    for i:=0 to ComponentDomainList.Count-1 do begin
-      if Assigned(Instance) then
-        Result:=Instance.dgettext(ComponentDomainList.Strings[i], MsgId)
-      else
-        Result:=dgettext(ComponentDomainList.Strings[i], MsgId);
-      if Result<>MsgId then
-        break;
-    end;
-  finally
-    ComponentDomainListCS.EndRead;
-  end;
-end;
-
-function gettext(const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  Result := DefaultInstance.gettext(szMsgId);
-end;
-
-function gettext_NoExtract(const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  // This one is very useful for translating text in variables.
-  // This can sometimes be necessary, and by using this function,
-  // the source code scanner will not trigger warnings.
-  Result := gettext(szMsgId);
-end;
-
-function gettext_NoOp(const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  //*** With this function Strings can be added to the po-file without beeing
-  //    ResourceStrings (dxgettext will add the string and this function will
-  //    return it without a change)
-  //    see gettext manual
-  //      4.7 - Special Cases of Translatable Strings
-  //      http://www.gnu.org/software/hello/manual/gettext/Special-cases.html#Special-cases
-  Result := DefaultInstance.gettext_NoOp(szMsgId);
-end;
-
-{*------------------------------------------------------------------------------
-  This is the main translation procedure used in programs. It takes a parameter,
-  looks it up in the translation dictionary, and returns the translation.
-  If no translation is found, the parameter is returned.
-
-  @param szMsgId The text, that should be displayed if no translation is found.
--------------------------------------------------------------------------------}
-function _(const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  Result := DefaultInstance.gettext(szMsgId);
-end;
-
-{*------------------------------------------------------------------------------
-  Translates a text, using a specified translation domain.
-  If no translation is found, the parameter is returned.
-
-  @param szDomain Which translation domain that should be searched for a translation.
-  @param szMsgId The text, that should be displayed if no translation is found.
--------------------------------------------------------------------------------}
-function dgettext(const szDomain: DomainString;
-  const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  Result := DefaultInstance.dgettext(szDomain, szMsgId);
-end;
-
-function dngettext(const szDomain: DomainString; const singular, plural: MsgIdString;
-  Number: longint): TranslatedUnicodeString;
-begin
-  Result := DefaultInstance.dngettext(szDomain, singular, plural, Number);
-end;
-
-function ngettext(const singular, plural: MsgIdString;
-  Number: longint): TranslatedUnicodeString;
-begin
-  Result := DefaultInstance.ngettext(singular, plural, Number);
-end;
-
-procedure textdomain(const szDomain: Domainstring);
-begin
-  DefaultInstance.textdomain(szDomain);
-end;
-
-procedure SetGettextEnabled(Enabled: boolean);
-begin
-  DefaultInstance.Enabled := Enabled;
-end;
-
-function getcurrenttextdomain: DomainString;
-begin
-  Result := DefaultInstance.getcurrenttextdomain;
-end;
-
-procedure bindtextdomain(const szDomain: DomainString;
-  const szDirectory: FilenameString);
-begin
-  DefaultInstance.bindtextdomain(szDomain, szDirectory);
-end;
-
-procedure TP_Ignore(AnObject: TObject; const Name: FilenameString);
-begin
-  DefaultInstance.TP_Ignore(AnObject, Name);
-end;
-
-procedure TP_GlobalIgnoreClass(IgnClass: TClass);
-begin
-  DefaultInstance.TP_GlobalIgnoreClass(IgnClass);
-end;
-
-procedure TP_IgnoreClass(IgnClass: TClass);
-begin
-  DefaultInstance.TP_IgnoreClass(IgnClass);
-end;
-
-procedure TP_IgnoreClassProperty(IgnClass: TClass;
-  const propertyname: ComponentNameString);
-begin
-  DefaultInstance.TP_IgnoreClassProperty(IgnClass, propertyname);
-end;
-
-procedure TP_GlobalIgnoreClassProperty(IgnClass: TClass;
-  const propertyname: ComponentNameString);
-begin
-  DefaultInstance.TP_GlobalIgnoreClassProperty(IgnClass, propertyname);
-end;
-
-procedure TP_GlobalHandleClass(HClass: TClass; Handler: TTranslator);
-begin
-  DefaultInstance.TP_GlobalHandleClass(HClass, Handler);
-end;
-
-procedure TranslateComponent(AnObject: TComponent; const TextDomain: DomainString = '');
-begin
-  DefaultInstance.TranslateComponent(AnObject, TextDomain);
-end;
-
-procedure RetranslateComponent(AnObject: TComponent;
-  const TextDomain: DomainString = '');
-begin
-  DefaultInstance.RetranslateComponent(AnObject, TextDomain);
-end;
-
-{$ifdef MSWINDOWS}
-
- // These constants are only used in Windows 95
- // Thanks to Frank Andreas de Groot for this table
-const
-  IDAfrikaans = $0436;
-  IDAlbanian = $041C;
-  IDArabicAlgeria = $1401;
-  IDArabicBahrain = $3C01;
-  IDArabicEgypt = $0C01;
-  IDArabicIraq = $0801;
-  IDArabicJordan = $2C01;
-  IDArabicKuwait = $3401;
-  IDArabicLebanon = $3001;
-  IDArabicLibya = $1001;
-  IDArabicMorocco = $1801;
-  IDArabicOman = $2001;
-  IDArabicQatar = $4001;
-  IDArabic   = $0401;
-  IDArabicSyria = $2801;
-  IDArabicTunisia = $1C01;
-  IDArabicUAE = $3801;
-  IDArabicYemen = $2401;
-  IDArmenian = $042B;
-  IDAssamese = $044D;
-  IDAzeriCyrillic = $082C;
-  IDAzeriLatin = $042C;
-  IDBasque   = $042D;
-  IDByelorussian = $0423;
-  IDBengali  = $0445;
-  IDBulgarian = $0402;
-  IDBurmese  = $0455;
-  IDCatalan  = $0403;
-  IDChineseHongKong = $0C04;
-  IDChineseMacao = $1404;
-  IDSimplifiedChinese = $0804;
-  IDChineseSingapore = $1004;
-  IDTraditionalChinese = $0404;
-  IDCroatian = $041A;
-  IDCzech    = $0405;
-  IDDanish   = $0406;
-  IDBelgianDutch = $0813;
-  IDDutch    = $0413;
-  IDEnglishAUS = $0C09;
-  IDEnglishBelize = $2809;
-  IDEnglishCanadian = $1009;
-  IDEnglishCaribbean = $2409;
-  IDEnglishIreland = $1809;
-  IDEnglishJamaica = $2009;
-  IDEnglishNewZealand = $1409;
-  IDEnglishPhilippines = $3409;
-  IDEnglishSouthAfrica = $1C09;
-  IDEnglishTrinidad = $2C09;
-  IDEnglishUK = $0809;
-  IDEnglishUS = $0409;
-  IDEnglishZimbabwe = $3009;
-  IDEstonian = $0425;
-  IDFaeroese = $0438;
-  IDFarsi    = $0429;
-  IDFinnish  = $040B;
-  IDBelgianFrench = $080C;
-  IDFrenchCameroon = $2C0C;
-  IDFrenchCanadian = $0C0C;
-  IDFrenchCotedIvoire = $300C;
-  IDFrench   = $040C;
-  IDFrenchLuxembourg = $140C;
-  IDFrenchMali = $340C;
-  IDFrenchMonaco = $180C;
-  IDFrenchReunion = $200C;
-  IDFrenchSenegal = $280C;
-  IDSwissFrench = $100C;
-  IDFrenchWestIndies = $1C0C;
-  IDFrenchZaire = $240C;
-  IDFrisianNetherlands = $0462;
-  IDGaelicIreland = $083C;
-  IDGaelicScotland = $043C;
-  IDGalician = $0456;
-  IDGeorgian = $0437;
-  IDGermanAustria = $0C07;
-  IDGerman   = $0407;
-  IDGermanLiechtenstein = $1407;
-  IDGermanLuxembourg = $1007;
-  IDSwissGerman = $0807;
-  IDGreek    = $0408;
-  IDGujarati = $0447;
-  IDHebrew   = $040D;
-  IDHindi    = $0439;
-  IDHungarian = $040E;
-  IDIcelandic = $040F;
-  IDIndonesian = $0421;
-  IDItalian  = $0410;
-  IDSwissItalian = $0810;
-  IDJapanese = $0411;
-  IDKannada  = $044B;
-  IDKashmiri = $0460;
-  IDKazakh   = $043F;
-  IDKhmer    = $0453;
-  IDKirghiz  = $0440;
-  IDKonkani  = $0457;
-  IDKorean   = $0412;
-  IDLao      = $0454;
-  IDLatvian  = $0426;
-  IDLithuanian = $0427;
-  IDMacedonian = $042F;
-  IDMalaysian = $043E;
-  IDMalayBruneiDarussalam = $083E;
-  IDMalayalam = $044C;
-  IDMaltese  = $043A;
-  IDManipuri = $0458;
-  IDMarathi  = $044E;
-  IDMongolian = $0450;
-  IDNepali   = $0461;
-  IDNorwegianBokmol = $0414;
-  IDNorwegianNynorsk = $0814;
-  IDOriya    = $0448;
-  IDPolish   = $0415;
-  IDBrazilianPortuguese = $0416;
-  IDPortuguese = $0816;
-  IDPunjabi  = $0446;
-  IDRhaetoRomanic = $0417;
-  IDRomanianMoldova = $0818;
-  IDRomanian = $0418;
-  IDRussianMoldova = $0819;
-  IDRussian  = $0419;
-  IDSamiLappish = $043B;
-  IDSanskrit = $044F;
-  IDSerbianCyrillic = $0C1A;
-  IDSerbianLatin = $081A;
-  IDSesotho  = $0430;
-  IDSindhi   = $0459;
-  IDSlovak   = $041B;
-  IDSlovenian = $0424;
-  IDSorbian  = $042E;
-  IDSpanishArgentina = $2C0A;
-  IDSpanishBolivia = $400A;
-  IDSpanishChile = $340A;
-  IDSpanishColombia = $240A;
-  IDSpanishCostaRica = $140A;
-  IDSpanishDominicanRepublic = $1C0A;
-  IDSpanishEcuador = $300A;
-  IDSpanishElSalvador = $440A;
-  IDSpanishGuatemala = $100A;
-  IDSpanishHonduras = $480A;
-  IDMexicanSpanish = $080A;
-  IDSpanishNicaragua = $4C0A;
-  IDSpanishPanama = $180A;
-  IDSpanishParaguay = $3C0A;
-  IDSpanishPeru = $280A;
-  IDSpanishPuertoRico = $500A;
-  IDSpanishModernSort = $0C0A;
-  IDSpanish  = $040A;
-  IDSpanishUruguay = $380A;
-  IDSpanishVenezuela = $200A;
-  IDSutu     = $0430;
-  IDSwahili  = $0441;
-  IDSwedishFinland = $081D;
-  IDSwedish  = $041D;
-  IDTajik    = $0428;
-  IDTamil    = $0449;
-  IDTatar    = $0444;
-  IDTelugu   = $044A;
-  IDThai     = $041E;
-  IDTibetan  = $0451;
-  IDTsonga   = $0431;
-  IDTswana   = $0432;
-  IDTurkish  = $041F;
-  IDTurkmen  = $0442;
-  IDUkrainian = $0422;
-  IDUrdu     = $0420;
-  IDUzbekCyrillic = $0843;
-  IDUzbekLatin = $0443;
-  IDVenda    = $0433;
-  IDVietnamese = $042A;
-  IDWelsh    = $0452;
-  IDXhosa    = $0434;
-  IDZulu     = $0435;
-
-function GetWindowsLanguage: WideString;
-var
-  langid: cardinal;
-  langcode: WideString;
-  CountryName: array[0..4] of widechar;
-  LanguageName: array[0..4] of widechar;
-  works: boolean;
-begin
-  // The return value of GetLocaleInfo is compared with 3 = 2 characters and a zero
-  works := 3 = GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME,
-    LanguageName, SizeOf(LanguageName));
-  works := works and (3 = GetLocaleInfoW(LOCALE_USER_DEFAULT,
-    LOCALE_SISO3166CTRYNAME, CountryName, SizeOf(CountryName)));
-  if works then
-  begin
-    // Windows 98, Me, NT4, 2000, XP and newer
-    LangCode := PWideChar(@(LanguageName[0]));
-    if lowercase(LangCode) = 'no' then
-      LangCode := 'nb';
-    LangCode := LangCode + '_' + PWideChar(@CountryName[0]);
-  end
-  else
-  begin
-    // This part should only happen on Windows 95.
-    langid := GetThreadLocale;
-    case langid of
-      IDBelgianDutch: langcode := 'nl_BE';
-      IDBelgianFrench: langcode := 'fr_BE';
-      IDBrazilianPortuguese: langcode := 'pt_BR';
-      IDDanish: langcode     := 'da_DK';
-      IDDutch: langcode      := 'nl_NL';
-      IDEnglishUK: langcode  := 'en_GB';
-      IDEnglishUS: langcode  := 'en_US';
-      IDFinnish: langcode    := 'fi_FI';
-      IDFrench: langcode     := 'fr_FR';
-      IDFrenchCanadian: langcode := 'fr_CA';
-      IDGerman: langcode     := 'de_DE';
-      IDGermanLuxembourg: langcode := 'de_LU';
-      IDGreek: langcode      := 'el_GR';
-      IDIcelandic: langcode  := 'is_IS';
-      IDItalian: langcode    := 'it_IT';
-      IDKorean: langcode     := 'ko_KO';
-      IDNorwegianBokmol: langcode := 'nb_NO';
-      IDNorwegianNynorsk: langcode := 'nn_NO';
-      IDPolish: langcode     := 'pl_PL';
-      IDPortuguese: langcode := 'pt_PT';
-      IDRussian: langcode    := 'ru_RU';
-      IDSpanish, IDSpanishModernSort: langcode := 'es_ES';
-      IDSwedish: langcode    := 'sv_SE';
-      IDSwedishFinland: langcode := 'sv_FI';
-      else
-        langcode := 'C';
-    end;
-  end;
-  Result := langcode;
-end;
-
-{$endif}
-
-{$ifndef UNICODE}
-function LoadResStringA(ResStringRec: PResStringRec): ansistring;
-begin
-  Result := DefaultInstance.LoadResString(ResStringRec);
-end;
-
-{$endif}
-
-function GetTranslatorNameAndEmail: TranslatedUnicodeString;
-begin
-  Result := DefaultInstance.GetTranslatorNameAndEmail;
-end;
-
-procedure UseLanguage(LanguageCode: LanguageString);
-begin
-  DefaultInstance.UseLanguage(LanguageCode);
-end;
-
-type
-  PStrData = ^TStrData;
-
-  TStrData = record
-    Ident: integer;
-    Str:   string;
-  end;
-
-function SysUtilsEnumStringModules(Instance: NativeInt; Data: Pointer): boolean;
-{$IFDEF MSWINDOWS}
-var
-  Buffer: array [0..1023] of char; // WideChar in Delphi 2008, AnsiChar before that
-begin
-  with PStrData(Data)^ do
-  begin
-    SetString(Str, Buffer,
-      LoadString(Instance, Ident, @Buffer[0], sizeof(Buffer)));
-    Result := Str = '';
-  end;
-end;
-
-{$ENDIF}
-
-{$IFDEF LINUX}
-var
-  rs:TResStringRec;
-  Module:HModule;
-begin
-  Module:=Instance;
-  rs.Module:=@Module;
-  with PStrData(Data)^ do begin
-    rs.Identifier:=Ident;
-    Str:=System.LoadResString(@rs);
-    Result:=Str='';
-  end;
-end;
-{$ENDIF}
-
-function SysUtilsFindStringResource(Ident: integer): string;
-var
-  StrData: TStrData;
-  tmp :TEnumModuleFunc;
-begin
-  StrData.Ident := Ident;
-  StrData.Str   := '';
-  tmp := SysUtilsEnumStringModules;
-  EnumResourceModules(tmp, Pointer(@StrData));
-  Result := StrData.Str;
-end;
-
-function SysUtilsLoadStr(Ident: integer): string;
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DefaultInstance.DebugWriteln ('Sysutils.LoadRes('+IntToStr(ident)+') called');
-  {$endif}
-  Result := ResourceStringGettext(SysUtilsFindStringResource(Ident));
-end;
-
-function SysUtilsFmtLoadStr(Ident: integer; const Args: array of const): string;
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DefaultInstance.DebugWriteln ('Sysutils.FmtLoadRes('+IntToStr(ident)+',Args) called');
-  {$endif}
-  FmtStr(Result, ResourceStringGettext(SysUtilsFindStringResource(Ident)), Args);
-end;
-
-function LoadResString(ResStringRec: PResStringRec): WideString;
-begin
-  Result := DefaultInstance.LoadResString(ResStringRec);
-end;
-
-function LoadResStringW(ResStringRec: PResStringRec): UnicodeString;
-begin
-  Result := DefaultInstance.LoadResString(ResStringRec);
-end;
-
-
-
-function GetCurrentLanguage: LanguageString;
-begin
-  Result := DefaultInstance.GetCurrentLanguage;
-end;
-
-{ TDomain }
-
-procedure TDomain.CloseMoFile;
-begin
-  if mofile <> nil then
-  begin
-    FileLocator.ReleaseMoFile(mofile);
-    mofile := nil;
-  end;
-  OpenHasFailedBefore := False;
-end;
-
-destructor TDomain.Destroy;
-begin
-  CloseMoFile;
-  inherited;
-end;
-
-{$ifdef mswindows}
-function GetLastWinError: WideString;
-var
-  errcode: cardinal;
-begin
-  SetLength(Result, 2000);
-  errcode := GetLastError();
-  FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, nil, errcode, 0,
-    PWideChar(Result), 2000, nil);
-  Result := PWideChar(Result);
-end;
-
-{$endif}
-
-procedure TDomain.OpenMoFile;
-var
-  filename: FilenameString;
-begin
-  // Check if it is already open
-  if mofile <> nil then
-    exit;
-
-  // Check if it has been attempted to open the file before
-  if OpenHasFailedBefore then
-    exit;
-
-  if SpecificFilename <> '' then
-  begin
-    filename := SpecificFilename;
-    {$ifdef DXGETTEXTDEBUG}
-    DebugLogger ('Domain '+domain+' is bound to specific file '+filename);
-    {$endif}
-  end
-  else
-  begin
-    filename := Directory + curlang + PathDelim + 'LC_MESSAGES' +
-      PathDelim + domain + '.mo';
-    if (not FileLocator.FileExists(filename)) and (not fileexists(filename)) then
-    begin
-      {$ifdef DXGETTEXTDEBUG}
-      DebugLogger ('Domain '+domain+': File does not exist, neither embedded or in file system: '+filename);
-      {$endif}
-      filename := Directory + MidStr(curlang, 1, 2) + PathDelim +
-        'LC_MESSAGES' + PathDelim + domain + '.mo';
-      {$ifdef DXGETTEXTDEBUG}
-      DebugLogger ('Domain '+domain+' will attempt to use this file: '+filename);
-      {$endif}
-    end
-    else
-    begin
-      {$ifdef DXGETTEXTDEBUG}
-      if FileLocator.FileExists(filename) then
-        DebugLogger ('Domain '+domain+' will attempt to use this embedded file: '+filename)
-      else
-        DebugLogger ('Domain '+domain+' will attempt to use this file that was found on the file system: '+filename);
-      {$endif}
-    end;
-  end;
-  if (not FileLocator.FileExists(filename)) and (not fileexists(filename)) then
-  begin
-    {$ifdef DXGETTEXTDEBUG}
-    DebugLogger ('Domain '+domain+' failed to locate the file: '+filename);
-    {$endif}
-    OpenHasFailedBefore := True;
-    exit;
-  end;
-  {$ifdef DXGETTEXTDEBUG}
-  DebugLogger ('Domain '+domain+' now accesses the file.');
-  {$endif}
-  mofile := FileLocator.GetMoFile(filename, DebugLogger);
-
-  {$ifdef DXGETTEXTDEBUG}
-  if mofile.isSwappedArchitecture then
-    DebugLogger ('.mo file is swapped (comes from another CPU architecture)');
-  {$endif}
-
-  // Check, that the contents of the file is utf-8
-  if pos('CHARSET=UTF-8', uppercase(GetTranslationProperty('Content-Type'))) = 0 then
-  begin
-    CloseMoFile;
-    {$ifdef DXGETTEXTDEBUG}
-    DebugLogger ('The translation for the language code '+curlang+' (in '+filename+') does not have charset=utf-8 in its Content-Type. Translations are turned off.');
-    {$endif}
-    {$ifdef MSWINDOWS}
-    MessageBoxW(0, PWideChar(WideString('The translation for the language code ' +
-      curlang + ' (in ' + filename +
-      ') does not have charset=utf-8 in its Content-Type. Translations are turned off.')),
-      'Localization problem', MB_OK);
-    {$else}
-    writeln (stderr,'The translation for the language code '+curlang+' (in '+filename+') does not have charset=utf-8 in its Content-Type. Translations are turned off.');
-    {$endif}
-    Enabled := False;
-  end;
-end;
-
-{$IFDEF UNICODE}
-function utf8decode (s:RawByteString):UnicodeString; inline;
-begin
-  Result:=UTF8ToWideString(s);
-end;
-{$endif}
-
-function TDomain.GetTranslationProperty(
-  Propertyname: ComponentNameString): TranslatedUnicodeString;
-var
-  sl: TStringList;
-  i:  integer;
-  s:  string;
-begin
-  Propertyname := uppercase(Propertyname) + ': ';
-  sl := TStringList.Create;
-  try
-    sl.Text := utf8decode(gettext(''));
-    for i := 0 to sl.Count - 1 do
-    begin
-      s := sl.Strings[i];
-      if uppercase(MidStr(s, 1, length(Propertyname))) = Propertyname then
-      begin
-        Result := trim(MidStr(s, length(PropertyName) + 1, maxint));
-
-        {$ifdef DXGETTEXTDEBUG}
-        DebugLogger ('GetTranslationProperty('+PropertyName+') returns '''+Result+'''.');
-        {$endif}
-        exit;
-      end;
-    end;
-  finally
-    FreeAndNil(sl);
-  end;
-  Result := '';
-  {$ifdef DXGETTEXTDEBUG}
-  DebugLogger ('GetTranslationProperty('+PropertyName+') did not find any value. An empty string is returned.');
-  {$endif}
-end;
-
-procedure TDomain.setDirectory(const dir: FilenameString);
-begin
-  vDirectory := IncludeTrailingPathDelimiter(dir);
-  SpecificFilename := '';
-  CloseMoFile;
-end;
-
-procedure AddDomainForResourceString(const domain: DomainString);
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DefaultInstance.DebugWriteln ('Extra domain for resourcestring: '+domain);
-  {$endif}
-  ResourceStringDomainListCS.BeginWrite;
-  try
-    if ResourceStringDomainList.IndexOf(domain) = -1 then
-      ResourceStringDomainList.Add(domain);
-  finally
-    ResourceStringDomainListCS.EndWrite;
-  end;
-end;
-
-procedure RemoveDomainForResourceString(const domain: DomainString);
-var
-  i: integer;
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DefaultInstance.DebugWriteln ('Remove domain for resourcestring: '+domain);
-  {$endif}
-  ResourceStringDomainListCS.BeginWrite;
-  try
-    i := ResourceStringDomainList.IndexOf(domain);
-    if i <> -1 then
-      ResourceStringDomainList.Delete(i);
-  finally
-    ResourceStringDomainListCS.EndWrite;
-  end;
-end;
-
-procedure AddDomainForComponent (const domain:DomainString);
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DefaultInstance.DebugWriteln ('Extra domain for component: '+domain);
-  {$endif}
-  ComponentDomainListCS.BeginWrite;
-  try
-    if ComponentDomainList.IndexOf(domain)=-1 then
-      ComponentDomainList.Add (domain);
-  finally
-    ComponentDomainListCS.EndWrite;
-  end;
-end;
-
-procedure RemoveDomainForComponent (const domain:DomainString);
-var
-  i:integer;
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DefaultInstance.DebugWriteln ('Remove domain for component: '+domain);
-  {$endif}
-  ComponentDomainListCS.BeginWrite;
-  try
-    i:=ComponentDomainList.IndexOf(domain);
-    if i<>-1 then
-      ComponentDomainList.Delete (i);
-  finally
-    ComponentDomainListCS.EndWrite;
-  end;
-end;
-
-procedure TDomain.SetLanguageCode(const langcode: LanguageString);
-begin
-  CloseMoFile;
-  curlang := langcode;
-end;
-
-function GetPluralForm2EN(Number: integer): integer;
-begin
-  Number := abs(Number);
-  if Number = 1 then
-    Result := 0
-  else
-    Result := 1;
-end;
-
-function GetPluralForm1(Number: integer): integer;
-begin
-  Result := 0;
-end;
-
-function GetPluralForm2FR(Number: integer): integer;
-begin
-  Number := abs(Number);
-  if (Number = 1) or (Number = 0) then
-    Result := 0
-  else
-    Result := 1;
-end;
-
-function GetPluralForm3LV(Number: integer): integer;
-begin
-  Number := abs(Number);
-  if (Number mod 10 = 1) and (Number mod 100 <> 11) then
-    Result := 0
-  else
-  if Number <> 0 then
-    Result := 1
-  else
-    Result := 2;
-end;
-
-function GetPluralForm3GA(Number: integer): integer;
-begin
-  Number := abs(Number);
-  if Number = 1 then
-    Result := 0
-  else if Number = 2 then
-    Result := 1
-  else
-    Result := 2;
-end;
-
-function GetPluralForm3LT(Number: integer): integer;
-var
-  n1, n2: byte;
-begin
-  Number := abs(Number);
-  n1     := Number mod 10;
-  n2     := Number mod 100;
-  if (n1 = 1) and (n2 <> 11) then
-    Result := 0
-  else
-  if (n1 >= 2) and ((n2 < 10) or (n2 >= 20)) then
-    Result := 1
-  else
-    Result := 2;
-end;
-
-function GetPluralForm3PL(Number: integer): integer;
-var
-  n1, n2: byte;
-begin
-  Number := abs(Number);
-  n1     := Number mod 10;
-  n2     := Number mod 100;
-
-  if Number = 1 then
-    Result := 0
-  else if (n1 >= 2) and (n1 <= 4) and ((n2 < 10) or (n2 >= 20)) then
-    Result := 1
-  else
-    Result := 2;
-end;
-
-function GetPluralForm3RU(Number: integer): integer;
-var
-  n1, n2: byte;
-begin
-  Number := abs(Number);
-  n1     := Number mod 10;
-  n2     := Number mod 100;
-  if (n1 = 1) and (n2 <> 11) then
-    Result := 0
-  else
-  if (n1 >= 2) and (n1 <= 4) and ((n2 < 10) or (n2 >= 20)) then
-    Result := 1
-  else
-    Result := 2;
-end;
-
-function GetPluralForm3SK(Number: integer): integer;
-begin
-  Number := abs(Number);
-  if number = 1 then
-    Result := 0
-  else if (number < 5) and (number <> 0) then
-    Result := 1
-  else
-    Result := 2;
-end;
-
-function GetPluralForm4SL(Number: integer): integer;
-var
-  n2: byte;
-begin
-  Number := abs(Number);
-  n2     := Number mod 100;
-  if n2 = 1 then
-    Result := 0
-  else
-  if n2 = 2 then
-    Result := 1
-  else
-  if (n2 = 3) or (n2 = 4) then
-    Result := 2
-  else
-    Result := 3;
-end;
-
-procedure TDomain.GetListOfLanguages(list: TStrings);
-var
-  sr:   TSearchRec;
-  more: boolean;
-  filename, path: FilenameString;
-  langcode: LanguageString;
-  i, j: integer;
-begin
-  list.Clear;
-
-  // Iterate through filesystem
-  more := FindFirst(Directory + '*', faAnyFile, sr) = 0;
-  try
-    while more do
-    begin
-      if (sr.Attr and faDirectory <> 0) and (sr.Name <> '.') and (sr.Name <> '..') then
-      begin
-        filename := Directory + sr.Name + PathDelim + 'LC_MESSAGES' +
-          PathDelim + domain + '.mo';
-        if fileexists(filename) then
-        begin
-          langcode := lowercase(sr.Name);
-          if list.IndexOf(langcode) = -1 then
-            list.Add(langcode);
-        end;
-      end;
-      more := FindNext(sr) = 0;
-    end;
-  finally
-    FindClose(sr);
-  end;
-
-  // Iterate through embedded files
-  for i := 0 to FileLocator.filelist.Count - 1 do
-  begin
-    filename := FileLocator.basedirectory + FileLocator.filelist.Strings[i];
-    path := Directory;
-    {$ifdef MSWINDOWS}
-    path := uppercase(path);
-    filename := uppercase(filename);
-    {$endif}
-    j := length(path);
-    if MidStr(filename, 1, j) = path then
-    begin
-      path := PathDelim + 'LC_MESSAGES' + PathDelim + domain + '.mo';
-      {$ifdef MSWINDOWS}
-      path := uppercase(path);
-      {$endif}
-      if MidStr(filename, length(filename) - length(path) + 1, length(path)) = path then
-      begin
-        langcode := lowercase(MidStr(filename, j + 1, length(filename) -
-          length(path) - j));
-        langcode := LeftStr(langcode, 3) + uppercase(MidStr(langcode, 4, maxint));
-        if list.IndexOf(langcode) = -1 then
-          list.Add(langcode);
-      end;
-    end;
-  end;
-end;
-
-procedure TDomain.SetFilename(const filename: FilenameString);
-begin
-  CloseMoFile;
-  vDirectory := '';
-  SpecificFilename := filename;
-end;
-
-function TDomain.gettext(const msgid: RawUtf8String): RawUtf8String;
-var
-  found: boolean;
-begin
-  if not Enabled then
-  begin
-    Result := msgid;
-    exit;
-  end;
-  if (mofile = nil) and (not OpenHasFailedBefore) then
-    OpenMoFile;
-  if mofile = nil then
-  begin
-    {$ifdef DXGETTEXTDEBUG}
-    DebugLogger('.mo file is not open. Not translating "'+msgid+'"');
-    {$endif}
-    Result := msgid;
-  end
-  else
-  begin
-    Result := mofile.gettext(msgid, found);
-    {$ifdef DXGETTEXTDEBUG}
-    if found then
-      DebugLogger ('Found in .mo ('+Domain+'): "'+utf8encode(msgid)+'"->"'+utf8encode(Result)+'"')
-    else
-      DebugLogger ('Translation not found in .mo file ('+Domain+') : "'+utf8encode(msgid)+'"');
-    {$endif}
-  end;
-end;
-
-constructor TDomain.Create;
-begin
-  inherited Create;
-  Enabled := True;
-end;
-
-{ TGnuGettextInstance }
-
-procedure TGnuGettextInstance.bindtextdomain(const szDomain: DomainString;
-  const szDirectory: FilenameString);
-var
-  dir: FilenameString;
-begin
-  dir := IncludeTrailingPathDelimiter(szDirectory);
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('Text domain "'+szDomain+'" is now located at "'+dir+'"');
-  {$endif}
-  getdomain(szDomain, DefaultDomainDirectory, CurLang).Directory := dir;
-  WhenNewDomainDirectory(szDomain, szDirectory);
-end;
-
-constructor TGnuGettextInstance.Create;
-begin
-  CreatorThread := GetCurrentThreadId;
-  {$ifdef MSWindows}
-  DesignTimeCodePage := CP_ACP;
-  {$endif}
-  {$ifdef DXGETTEXTDEBUG}
-  DebugLogCS:=TMultiReadExclusiveWriteSynchronizer.Create;
-  DebugLog:=TMemoryStream.Create;
-  DebugWriteln('Debug log started '+DateTimeToStr(Now));
-  DebugWriteln('GNU gettext module version: '+VCSVersion);
-  DebugWriteln('');
-  {$endif}
-  curGetPluralForm := GetPluralForm2EN;
-  Enabled      := True;
-  curmsgdomain := DefaultTextDomain;
-  savefileCS   := TMultiReadExclusiveWriteSynchronizer.Create;
-  domainlist   := TStringList.Create;
-  TP_IgnoreList := TStringList.Create;
-  TP_IgnoreList.Sorted := True;
-  TP_GlobalClassHandling := TList.Create;
-  TP_ClassHandling := TList.Create;
-
-  // Set some settings
-  DefaultDomainDirectory := IncludeTrailingPathDelimiter(
-    extractfilepath(ExecutableFilename)) + 'locale';
-
-  UseLanguage('');
-
-  bindtextdomain(DefaultTextDomain, DefaultDomainDirectory);
-  textdomain(DefaultTextDomain);
-
-  // Add default properties to ignore
-  TP_GlobalIgnoreClassProperty(TComponent, 'Name');
-  TP_GlobalIgnoreClassProperty(TCollection, 'PropName');
-end;
-
-destructor TGnuGettextInstance.Destroy;
-begin
-  if savememory <> nil then
-  begin
-    savefileCS.BeginWrite;
-    try
-      CloseFile(savefile);
-    finally
-      savefileCS.EndWrite;
-    end;
-    FreeAndNil(savememory);
-  end;
-  FreeAndNil(savefileCS);
-  FreeAndNil(TP_IgnoreList);
-  while TP_GlobalClassHandling.Count <> 0 do
-  begin
-    TObject(TP_GlobalClassHandling.Items[0]).Free;
-    TP_GlobalClassHandling.Delete(0);
-  end;
-  FreeAndNil(TP_GlobalClassHandling);
-  FreeTP_ClassHandlingItems;
-  FreeAndNil(TP_ClassHandling);
-  while domainlist.Count <> 0 do
-  begin
-    domainlist.Objects[0].Free;
-    domainlist.Delete(0);
-  end;
-  FreeAndNil(domainlist);
-  {$ifdef DXGETTEXTDEBUG}
-  FreeAndNil (DebugLog);
-  FreeAndNil (DebugLogCS);
-  {$endif}
-  inherited;
-end;
-
-{$ifndef UNICODE}
-function TGnuGettextInstance.dgettext(const szDomain: DomainString;
-  const szMsgId: ansistring): TranslatedUnicodeString;
-begin
-  Result := dgettext(szDomain, ansi2wideDTCP(szMsgId));
-end;
-
-{$endif}
-
-function TGnuGettextInstance.dgettext(const szDomain: DomainString;
-  const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  if not Enabled then
-  begin
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('Translation has been disabled. Text is not being translated: '+szMsgid);
-    {$endif}
-    Result := szMsgId;
-  end
-  else
-  begin
-    Result := UTF8Decode(EnsureLineBreakInTranslatedString(
-      getdomain(szDomain, DefaultDomainDirectory, CurLang).gettext(
-      StripCRRawMsgId(utf8encode(szMsgId)))));
-
-    {$ifdef DXGETTEXTDEBUG}
-    if (szMsgId<>'') and (Result='') then
-      DebugWriteln (Format('Error: Translation of %s was an empty string. This may never occur.',[szMsgId]));
-    {$endif}
-  end;
-end;
-
-function TGnuGettextInstance.dgettext_NoExtract(const szDomain: DomainString;
-  const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  // This one is very useful for translating text in variables.
-  // This can sometimes be necessary, and by using this function,
-  // the source code scanner will not trigger warnings.
-  Result := dgettext(szDomain, szMsgId);
-end;
-
-function TGnuGettextInstance.GetCurrentLanguage: LanguageString;
-begin
-  Result := curlang;
-end;
-
-function TGnuGettextInstance.getcurrenttextdomain: DomainString;
-begin
-  Result := curmsgdomain;
-end;
-
-{$ifndef UNICODE}
-function TGnuGettextInstance.gettext(
-  const szMsgId: ansistring): TranslatedUnicodeString;
-begin
-  Result := dgettext(curmsgdomain, szMsgId);
-end;
-{$endif}
-
-function TGnuGettextInstance.gettext(
-  const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  Result := dgettext(curmsgdomain, szMsgId);
-end;
-
-function TGnuGettextInstance.gettext_NoExtract(
-  const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  // This one is very useful for translating text in variables.
-  // This can sometimes be necessary, and by using this function,
-  // the source code scanner will not trigger warnings.
-  Result:=gettext (szMsgId);
-end;
-
-function TGnuGettextInstance.gettext_NoOp(const szMsgId: MsgIdString): TranslatedUnicodeString;
-begin
-  //*** With this function Strings can be added to the po-file without beeing
-  //    ResourceStrings (dxgettext will add the string and this function will
-  //    return it without a change)
-  //    see gettext manual
-  //      4.7 - Special Cases of Translatable Strings
-  //      http://www.gnu.org/software/hello/manual/gettext/Special-cases.html#Special-cases
-  Result := TranslatedUnicodeString(szMsgId);
-end;
-
-procedure TGnuGettextInstance.textdomain(const szDomain: DomainString);
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('Changed text domain to "'+szDomain+'"');
-  {$endif}
-  curmsgdomain := szDomain;
-  WhenNewDomain(szDomain);
-end;
-
-function TGnuGettextInstance.TP_CreateRetranslator: TExecutable;
-var
-  ttpr: TTP_Retranslator;
-begin
-  ttpr   := TTP_Retranslator.Create;
-  ttpr.Instance := self;
-  TP_Retranslator := ttpr;
-  Result := ttpr;
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('A retranslator was created.');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.TP_GlobalHandleClass(HClass: TClass;
-  Handler: TTranslator);
-var
-  cm: TClassMode;
-  i:  integer;
-begin
-  for i := 0 to TP_GlobalClassHandling.Count - 1 do
-  begin
-    cm := TObject(TP_GlobalClassHandling.Items[i]) as TClassMode;
-    if cm.HClass = HClass then
-      raise EGGProgrammingError.Create(
-        'You cannot set a handler for a class that has already been assigned otherwise.');
-    if HClass.InheritsFrom(cm.HClass) then
-    begin
-      // This is the place to insert this class
-      cm := TClassMode.Create;
-      cm.HClass := HClass;
-      cm.SpecialHandler := Handler;
-      TP_GlobalClassHandling.Insert(i, cm);
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('A handler was set for class '+HClass.ClassName+'.');
-      {$endif}
-      exit;
-    end;
-  end;
-  cm := TClassMode.Create;
-  cm.HClass := HClass;
-  cm.SpecialHandler := Handler;
-  TP_GlobalClassHandling.Add(cm);
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('A handler was set for class '+HClass.ClassName+'.');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.TP_GlobalIgnoreClass(IgnClass: TClass);
-var
-  cm: TClassMode;
-  i:  integer;
-begin
-  for i := 0 to TP_GlobalClassHandling.Count - 1 do
-  begin
-    cm := TObject(TP_GlobalClassHandling.Items[i]) as TClassMode;
-    if cm.HClass = IgnClass then
-      raise EGGProgrammingError.Create(
-        'You cannot add a class to the ignore list that is already on that list: ' +
-        IgnClass.ClassName +
-        '. You should keep all TP_Global functions in one place in your source code.');
-    if IgnClass.InheritsFrom(cm.HClass) then
-    begin
-      // This is the place to insert this class
-      cm := TClassMode.Create;
-      cm.HClass := IgnClass;
-      TP_GlobalClassHandling.Insert(i, cm);
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('Globally, class '+IgnClass.ClassName+' is being ignored.');
-      {$endif}
-      exit;
-    end;
-  end;
-  cm := TClassMode.Create;
-  cm.HClass := IgnClass;
-  TP_GlobalClassHandling.Add(cm);
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('Globally, class '+IgnClass.ClassName+' is being ignored.');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.TP_GlobalIgnoreClassProperty(IgnClass: TClass;
-  propertyname: ComponentNameString);
-var
-  cm:     TClassMode;
-  i, idx: integer;
-begin
-  propertyname := uppercase(propertyname);
-  for i := 0 to TP_GlobalClassHandling.Count - 1 do
-  begin
-    cm := TObject(TP_GlobalClassHandling.Items[i]) as TClassMode;
-    if cm.HClass = IgnClass then
-    begin
-      if Assigned(cm.SpecialHandler) then
-        raise EGGProgrammingError.Create(
-          'You cannot ignore a class property for a class that has a handler set.');
-      if not cm.PropertiesToIgnore.Find(propertyname, idx) then
-        cm.PropertiesToIgnore.Add(propertyname);
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
-      {$endif}
-      exit;
-    end;
-    if IgnClass.InheritsFrom(cm.HClass) then
-    begin
-      // This is the place to insert this class
-      cm := TClassMode.Create;
-      cm.HClass := IgnClass;
-      cm.PropertiesToIgnore.Add(propertyname);
-      TP_GlobalClassHandling.Insert(i, cm);
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
-      {$endif}
-      exit;
-    end;
-  end;
-  cm := TClassMode.Create;
-  cm.HClass := IgnClass;
-  cm.PropertiesToIgnore.Add(propertyname);
-  TP_GlobalClassHandling.Add(cm);
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.TP_Ignore(AnObject: TObject;
-  const Name: ComponentNameString);
-begin
-  TP_IgnoreList.Add(uppercase(Name));
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('On object with class name '+AnObject.ClassName+', ignore is set on '+name);
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.TranslateComponent(AnObject: TComponent;
-  const TextDomain: DomainString);
-var
-  comp: TGnuGettextComponentMarker;
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('======================================================================');
-  DebugWriteln ('TranslateComponent() was called for a component with name '+AnObject.Name+'.');
-  {$endif}
-  comp := AnObject.FindComponent('GNUgettextMarker') as TGnuGettextComponentMarker;
-  if comp = nil then
-  begin
-    comp      := TGnuGettextComponentMarker.Create(nil);
-    comp.Name := 'GNUgettextMarker';
-    comp.Retranslator := TP_CreateRetranslator;
-    TranslateProperties(AnObject, TextDomain);
-    AnObject.InsertComponent(comp);
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('This is the first time, that this component has been translated. A retranslator component has been created for this component.');
-    {$endif}
-  end
-  else
-  begin
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('This is not the first time, that this component has been translated.');
-    {$endif}
-    if comp.LastLanguage <> curlang then
-    begin
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('ERROR: TranslateComponent() was called twice with different languages. This indicates an attempt to switch language at runtime, but by using TranslateComponent every time. This API has changed - please use RetranslateComponent() instead.');
-      {$endif}
-      {$ifdef mswindows}
-      MessageBox(0,
-        'This application tried to switch the language, but in an incorrect way. The programmer needs to replace a call to TranslateComponent with a call to RetranslateComponent(). The programmer should see the changelog of gnugettext.pas for more information.', 'Error', MB_OK);
-      {$else}
-      writeln (stderr,'This application tried to switch the language, but in an incorrect way. The programmer needs to replace a call to TranslateComponent with a call to RetranslateComponent(). The programmer should see the changelog of gnugettext.pas for more information.');
-      {$endif}
-    end
-    else
-    begin
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('ERROR: TranslateComponent has been called twice, but with the same language chosen. This is a mistake, but in order to prevent that the application breaks, no exception is raised.');
-      {$endif}
-    end;
-  end;
-  comp.LastLanguage := curlang;
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('======================================================================');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.TranslateProperty(AnObject: TObject;
-  PropInfo: PPropInfo; TodoList: TStrings; const TextDomain: DomainString);
-var
-  ppi: PPropInfo;
-  ws:  TranslatedUnicodeString;
-  old: TranslatedUnicodeString;
-  compmarker: TComponent;
-  obj: TObject;
-  Propname: ComponentNameString;
-begin
-  PropName := string(PropInfo^.Name);
-  try
-    // Translate certain types of properties
-    case PropInfo^.PropType^.Kind of
-      {$IFDEF UNICODE}
-      // All dfm files returning tkUString
-      tkString, tkLString, tkWString, tkUString:
-      {$ELSE}
-      tkString, tkLString, tkWString:
-      {$ENDIF}
-      begin
-          {$ifdef DXGETTEXTDEBUG}
-          DebugWriteln ('Translating '+AnObject.ClassName+'.'+PropName);
-          {$endif}
-        case PropInfo^.PropType^.Kind of
-          tkString, tkLString:
-            old := GetStrProp(AnObject, PropName);
-          tkWString:
-            old := GetStrProp(AnObject, PropName);
-            tkUString :
-              old := GetStrProp(AnObject, PropName);
-          else
-            raise Exception.Create(
-              'Internal error: Illegal property type. This problem needs to be solved by a programmer, try to find a workaround.');
-        end;
-          {$ifdef DXGETTEXTDEBUG}
-          if old='' then
-            DebugWriteln ('(Empty, not translated)')
-          else
-            DebugWriteln ('Old value: "'+old+'"');
-          {$endif}
-        if (old <> '') and (IsWriteProp(PropInfo)) then
-        begin
-          if TP_Retranslator <> nil then
-            (TP_Retranslator as TTP_Retranslator).Remember(AnObject, PropName, old);
-            if textdomain = '' then
-              ws := ComponentGettext(old)
-            else
-          ws := dgettext(textdomain, old);
-          if ws <> old then
-          begin
-            ppi := GetPropInfo(AnObject, Propname);
-            if ppi <> nil then
-            begin
-              SetWideStrProp(AnObject, ppi, ws);
-            end
-            else
-            begin
-                {$ifdef DXGETTEXTDEBUG}
-                DebugWriteln ('ERROR: Property disappeared: '+Propname+' for object of type '+AnObject.ClassName);
-                {$endif}
-            end;
-          end;
-        end;
-      end { case item };
-      tkClass:
-      begin
-        obj := GetObjectProp(AnObject, PropName);
-        if obj <> nil then
-        begin
-          if obj is TComponent then
-          begin
-            compmarker := TComponent(obj).FindComponent('GNUgettextMarker');
-            if Assigned(compmarker) then
-              exit;
-          end;
-          TodoList.AddObject('', obj);
-        end;
-      end { case item };
-    end { case };
-  except
-    on E: Exception do
-      raise EGGComponentError.Create('Property cannot be translated.' +
-        sLineBreak + 'Add TP_GlobalIgnoreClassProperty(' + AnObject.ClassName +
-        ',''' + PropName + ''') to your source code or use' +
-        sLineBreak + 'TP_Ignore (self,''.' + PropName +
-        ''') to prevent this message.' + sLineBreak + 'Reason: ' + e.Message);
-  end;
-end;
-
-procedure TGnuGettextInstance.TranslateProperties(AnObject: TObject;
-  textdomain: DomainString = '');
-var
-  TodoList: TStringList; // List of Name/TObject's that is to be processed
-  DoneList: TStringList;
-  // List of hex codes representing pointers to objects that have been done
-  i, j, Count: integer;
-  PropList: PPropList;
-  UPropName: ComponentNameString;
-  PropInfo: PPropInfo;
-  compmarker, comp: TComponent;
-  cm, currentcm: TClassMode;
-  // currentcm is nil or contains special information about how to handle the current object
-  ObjectPropertyIgnoreList: TStringList;
-  objid: string;
-  Name:  ComponentNameString;
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('----------------------------------------------------------------------');
-  DebugWriteln ('TranslateProperties() was called for an object of class '+AnObject.ClassName+' with domain "'+textdomain+'".');
-  {$endif}
-  if textdomain = '' then
-    textdomain := curmsgdomain;
-  if TP_Retranslator <> nil then
-    (TP_Retranslator as TTP_Retranslator).TextDomain := textdomain;
-  {$ifdef FPC}
-  DoneList:=TCSStringList.Create;
-  TodoList:=TCSStringList.Create;
-  ObjectPropertyIgnoreList:=TCSStringList.Create;
-  {$else}
-  DoneList := TStringList.Create;
-  TodoList := TStringList.Create;
-  ObjectPropertyIgnoreList := TStringList.Create;
-  {$endif}
-  try
-    TodoList.AddObject('', AnObject);
-    DoneList.Sorted     := True;
-    ObjectPropertyIgnoreList.Sorted := True;
-    ObjectPropertyIgnoreList.Duplicates := dupIgnore;
-    ObjectPropertyIgnoreList.CaseSensitive := False;
-    DoneList.Duplicates := dupError;
-    DoneList.CaseSensitive := True;
-
-    while TodoList.Count <> 0 do
-    begin
-      AnObject := TodoList.Objects[0];
-      Name     := TodoList.Strings[0];
-      TodoList.Delete(0);
-      if (AnObject <> nil) and (AnObject is TPersistent) then
-      begin
-        // Make sure each object is only translated once
-        Assert(sizeof(integer) = sizeof(TObject));
-        objid := IntToHex(integer(AnObject), 8);
-        if DoneList.Find(objid, i) then
-        begin
-          continue;
-        end
-        else
-        begin
-          DoneList.Add(objid);
-        end;
-
-        ObjectPropertyIgnoreList.Clear;
-
-        // Find out if there is special handling of this object
-        currentcm := nil;
-        // First check the local handling instructions
-        for j := 0 to TP_ClassHandling.Count - 1 do
-        begin
-          cm := TObject(TP_ClassHandling.Items[j]) as TClassMode;
-          if AnObject.InheritsFrom(cm.HClass) then
-          begin
-            if cm.PropertiesToIgnore.Count <> 0 then
-            begin
-              ObjectPropertyIgnoreList.AddStrings(cm.PropertiesToIgnore);
-            end
-            else
-            begin
-              // Ignore the entire class
-              currentcm := cm;
-              break;
-            end;
-          end;
-        end;
-        // Then check the global handling instructions
-        if currentcm = nil then
-          for j := 0 to TP_GlobalClassHandling.Count - 1 do
-          begin
-            cm := TObject(TP_GlobalClassHandling.Items[j]) as TClassMode;
-            if AnObject.InheritsFrom(cm.HClass) then
-            begin
-              if cm.PropertiesToIgnore.Count <> 0 then
-              begin
-                ObjectPropertyIgnoreList.AddStrings(cm.PropertiesToIgnore);
-              end
-              else
-              begin
-                // Ignore the entire class
-                currentcm := cm;
-                break;
-              end;
-            end;
-          end;
-        if currentcm <> nil then
-        begin
-          ObjectPropertyIgnoreList.Clear;
-          // Ignore or use special handler
-          if Assigned(currentcm.SpecialHandler) then
-          begin
-            currentcm.SpecialHandler(AnObject);
-            {$ifdef DXGETTEXTDEBUG}
-            DebugWriteln ('Special handler activated for '+AnObject.ClassName);
-            {$endif}
-          end
-          else
-          begin
-            {$ifdef DXGETTEXTDEBUG}
-            DebugWriteln ('Ignoring object '+AnObject.ClassName);
-            {$endif}
-          end;
-          continue;
-        end;
-
-        Count := GetPropList(AnObject, PropList);
-        try
-          for j := 0 to Count - 1 do
-          begin
-            PropInfo := PropList[j];
-            {$IFDEF UNICODE}
-            if not (PropInfo^.PropType^.Kind in [tkString, tkLString, tkWString, tkClass, tkUString]) then
-            {$ELSE}
-            if not (PropInfo^.PropType^.Kind in [tkString, tkLString,
-              tkWString, tkClass]) then
-            {$ENDIF}
-              continue;
-            UPropName := uppercase(string(PropInfo^.Name));
-            // Ignore properties that are meant to be ignored
-            if ((currentcm = nil) or (not
-              currentcm.PropertiesToIgnore.Find(UPropName, i))) and
-              (not TP_IgnoreList.Find(Name + '.' + UPropName, i)) and
-              (not ObjectPropertyIgnoreList.Find(UPropName, i)) then
-            begin
-              TranslateProperty(AnObject, PropInfo, TodoList, TextDomain);
-            end;  // if
-          end;  // for
-        finally
-          if Count <> 0 then
-            FreeMem(PropList);
-        end;
-        if AnObject is TStrings then
-        begin
-          if ((AnObject as TStrings).Text <> '') and (TP_Retranslator <> nil) then
-            (TP_Retranslator as TTP_Retranslator).Remember(AnObject,
-              'Text', (AnObject as TStrings).Text);
-          TranslateStrings(AnObject as TStrings, TextDomain);
-        end;
-        // Check for TCollection
-        if AnObject is TCollection then
-        begin
-          for i := 0 to (AnObject as TCollection).Count - 1 do
-          begin
-            // Only add the object if it's not totally ignored already
-            if not Assigned(currentcm) or not AnObject.InheritsFrom(
-              currentcm.HClass) then
-              TodoList.AddObject('', (AnObject as TCollection).Items[i]);
-          end;
-        end;
-        if AnObject is TComponent then
-        begin
-          for i := 0 to TComponent(AnObject).ComponentCount - 1 do
-          begin
-            comp := TComponent(AnObject).Components[i];
-            if (not TP_IgnoreList.Find(uppercase(comp.Name), j)) then
-            begin
-              // Only add the object if it's not totally ignored or translated already
-              if not Assigned(currentcm) or not
-                AnObject.InheritsFrom(currentcm.HClass) then
-              begin
-                compmarker := comp.FindComponent('GNUgettextMarker');
-                if not Assigned(compmarker) then
-                  TodoList.AddObject(uppercase(comp.Name), comp);
-              end;
-            end;
-          end;
-        end;
-      end { if AnObject<>nil };
-    end { while todolist.count<>0 };
-  finally
-    FreeAndNil(todolist);
-    FreeAndNil(ObjectPropertyIgnoreList);
-    FreeAndNil(DoneList);
-  end;
-  FreeTP_ClassHandlingItems;
-  TP_IgnoreList.Clear;
-  TP_Retranslator := nil;
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('----------------------------------------------------------------------');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.UseLanguage(LanguageCode: LanguageString);
-var
-  i, p: integer;
-  dom:  TDomain;
-  l2:   string;
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln('UseLanguage('''+LanguageCode+'''); called');
-  {$endif}
-
-  if LanguageCode = '' then
-  begin
-    LanguageCode := GGGetEnvironmentVariable('LANG');
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('LANG env variable is '''+LanguageCode+'''.');
-    {$endif}
-    {$ifdef MSWINDOWS}
-    if LanguageCode = '' then
-    begin
-      LanguageCode := GetWindowsLanguage;
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('Found Windows language code to be '''+LanguageCode+'''.');
-      {$endif}
-    end;
-    {$endif}
-    p := pos('.', LanguageCode);
-    if p <> 0 then
-      LanguageCode := LeftStr(LanguageCode, p - 1);
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('Language code that will be set is '''+LanguageCode+'''.');
-    {$endif}
-  end;
-
-  curlang := LanguageCode;
-  for i := 0 to domainlist.Count - 1 do
-  begin
-    dom := domainlist.Objects[i] as TDomain;
-    dom.SetLanguageCode(curlang);
-  end;
-
-  l2 := lowercase(LeftStr(curlang, 2));
-  if (l2 = 'en') or (l2 = 'de') then
-    curGetPluralForm := GetPluralForm2EN
-  else
-  if (l2 = 'hu') or (l2 = 'ko') or (l2 = 'zh') or (l2 = 'ja') or (l2 = 'tr') then
-    curGetPluralForm := GetPluralForm1
-  else
-  if (l2 = 'fr') or (l2 = 'fa') or (lowercase(curlang) = 'pt_br') then
-    curGetPluralForm := GetPluralForm2FR
-  else
-  if (l2 = 'lv') then
-    curGetPluralForm := GetPluralForm3LV
-  else
-  if (l2 = 'ga') then
-    curGetPluralForm := GetPluralForm3GA
-  else
-  if (l2 = 'lt') then
-    curGetPluralForm := GetPluralForm3LT
-  else
-  if (l2 = 'ru') or (l2 = 'uk') or (l2 = 'hr') then
-    curGetPluralForm := GetPluralForm3RU
-  else
-  if (l2 = 'cs') or (l2 = 'sk') then
-    curGetPluralForm := GetPluralForm3SK
-  else
-  if (l2 = 'pl') then
-    curGetPluralForm := GetPluralForm3PL
-  else
-  if (l2 = 'sl') then
-    curGetPluralForm := GetPluralForm4SL
-  else
-  begin
-    curGetPluralForm := GetPluralForm2EN;
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('Plural form for the language was not found. English plurality system assumed.');
-    {$endif}
-  end;
-
-  WhenNewLanguage(curlang);
-
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln('');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.TranslateStrings(sl: TStrings;
-  const TextDomain: DomainString);
-var
-  line: string;
-  i: integer;
-  s:TStringList;
-  slAsTStringList:TStringList;
-begin
-  if sl.Count > 0 then
-  begin
-    sl.BeginUpdate;
-    try
-      s := TStringList.Create;
-      try
-        s.Assign(sl);
-        for i := 0 to s.Count - 1 do
-        begin
-          line := s.Strings[i];
-          if line <> '' then
-            s.Strings[i] := dgettext(TextDomain, line);
-        end;
-        sl.Assign(s);
-      finally
-        FreeAndNil(s);
-      end;
-    finally
-      sl.EndUpdate;
-    end;
-  end;
-end;
-
-function TGnuGettextInstance.GetTranslatorNameAndEmail: TranslatedUnicodeString;
-begin
-  Result := GetTranslationProperty('LAST-TRANSLATOR');
-end;
-
-function TGnuGettextInstance.GetTranslationProperty(
-  const Propertyname: ComponentNameString): TranslatedUnicodeString;
-begin
-  Result := getdomain(curmsgdomain, DefaultDomainDirectory,
-    CurLang).GetTranslationProperty(Propertyname);
-end;
-
-function TGnuGettextInstance.dngettext(const szDomain: DomainString;
-  const singular, plural: MsgIdString; Number: integer): TranslatedUnicodeString;
-var
-  org:   MsgIdString;
-  trans: TranslatedUnicodeString;
-  idx:   integer;
-  p:     integer;
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('dngettext translation (domain '+szDomain+', number is '+IntTostr(Number)+') of '+singular+'/'+plural);
-  {$endif}
-  org   := singular + #0 + plural;
-  trans := dgettext(szDomain, org);
-  if org = trans then
-  begin
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('Translation was equal to english version. English plural forms assumed.');
-    {$endif}
-    idx := GetPluralForm2EN(Number);
-  end
-  else
-    idx := curGetPluralForm(Number);
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('Index '+IntToStr(idx)+' will be used');
-  {$endif}
-  while True do
-  begin
-    p := pos(#0, trans);
-    if p = 0 then
-    begin
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('Last translation used: '+utf8encode(trans));
-      {$endif}
-      Result := trans;
-      exit;
-    end;
-    if idx = 0 then
-    begin
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('Translation found: '+utf8encode(trans));
-      {$endif}
-      Result := LeftStr(trans, p - 1);
-      exit;
-    end;
-    Delete(trans, 1, p);
-    Dec(idx);
-  end;
-end;
-
-function TGnuGettextInstance.dngettext_NoExtract(const szDomain: DomainString;
-  const singular, plural: MsgIdString; Number: integer): TranslatedUnicodeString;
-begin
-  // This one is very useful for translating text in variables.
-  // This can sometimes be necessary, and by using this function,
-  // the source code scanner will not trigger warnings.
-  Result := dngettext(szDomain, singular, plural, Number);
-end;
-
-{$ifndef UNICODE}
-function TGnuGettextInstance.ngettext(const singular, plural: ansistring;
-  Number: integer): TranslatedUnicodeString;
-begin
-  Result := dngettext(curmsgdomain, singular, plural, Number);
-end;
-
-{$endif}
-
-function TGnuGettextInstance.ngettext(const singular, plural: MsgIdString;
-  Number: integer): TranslatedUnicodeString;
-begin
-  Result := dngettext(curmsgdomain, singular, plural, Number);
-end;
-
-function TGnuGettextInstance.ngettext_NoExtract(const singular, plural: MsgIdString;
-  Number: integer): TranslatedUnicodeString;
-begin
-  // This one is very useful for translating text in variables.
-  // This can sometimes be necessary, and by using this function,
-  // the source code scanner will not trigger warnings.
-  Result := ngettext(singular, plural, Number);
-end;
-
-procedure TGnuGettextInstance.WhenNewDomain(const TextDomain: DomainString);
-begin
-  // This is meant to be empty.
-end;
-
-procedure TGnuGettextInstance.WhenNewLanguage(const LanguageID: LanguageString);
-begin
-  // This is meant to be empty.
-end;
-
-procedure TGnuGettextInstance.WhenNewDomainDirectory(const TextDomain: DomainString;
-  const Directory: FilenameString);
-begin
-  // This is meant to be empty.
-end;
-
-procedure TGnuGettextInstance.GetListOfLanguages(const domain: DomainString;
-  list: TStrings);
-begin
-  getdomain(Domain, DefaultDomainDirectory, CurLang).GetListOfLanguages(list);
-end;
-
-procedure TGnuGettextInstance.bindtextdomainToFile(const szDomain: DomainString;
-  const filename: FilenameString);
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('Text domain "'+szDomain+'" is now bound to file named "'+filename+'"');
-  {$endif}
-  getdomain(szDomain, DefaultDomainDirectory, CurLang).SetFilename(filename);
-end;
-
-procedure TGnuGettextInstance.DebugLogPause(PauseEnabled: boolean);
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DebugLogOutputPaused:=PauseEnabled;
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.DebugLogToFile(const filename: FilenameString;
-  append: boolean = False);
-{$ifdef DXGETTEXTDEBUG}
-var
-  fs:TFileStream;
-  marker:ansistring;
-{$endif}
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  // Creates the file if needed
-  if (not fileexists(filename)) or (not append) then
-    fileclose (filecreate (filename));
-
-  // Open file
-  fs:=TFileStream.Create (filename,fmOpenWrite or fmShareDenyWrite);
-  if append then
-    fs.Seek(0,soFromEnd);
-
-  // Write header if appending
-  if fs.Position<>0 then begin
-    marker:=sLineBreak+'==========================================================================='+sLineBreak;
-    fs.WriteBuffer(marker[1],length(marker));
-  end;
-
-  // Copy the memorystream contents to the file
-  DebugLog.Seek(0,soFromBeginning);
-  fs.CopyFrom(DebugLog,0);
-
-  // Make DebugLog point to the filestream
-  FreeAndNil (DebugLog);
-  DebugLog:=fs;
-  {$endif}
-end;
-
-{$ifdef DXGETTEXTDEBUG}
-procedure TGnuGettextInstance.DebugWriteln(line: ansistring);
-Var
-  Discard: Boolean;
-begin
-  Assert (DebugLogCS<>nil);
-  Assert (DebugLog<>nil);
-
-  DebugLogCS.BeginWrite;
-  try
-    if DebugLogOutputPaused then
-      exit;
-
-    if Assigned (fOnDebugLine) then begin
-      Discard := True;
-      fOnDebugLine (Self, Line, Discard);
-      If Discard then Exit;
-    end;
-
-    line:=line+sLineBreak;
-
-    // Ensure that memory usage doesn't get too big.
-    if (DebugLog is TMemoryStream) and (DebugLog.Position>1000000) then begin
-      line:=sLineBreak+sLineBreak+sLineBreak+sLineBreak+sLineBreak+
-            'Debug log halted because memory usage grew too much.'+sLineBreak+
-            'Specify a filename to store the debug log in or disable debug loggin in gnugettext.pas.'+
-            sLineBreak+sLineBreak+sLineBreak+sLineBreak+sLineBreak;
-      DebugLogOutputPaused:=True;
-    end;
-    DebugLog.WriteBuffer(line[1],length(line));
-  finally
-    DebugLogCS.EndWrite;
-  end;
-end;
-{$endif}
-
-function TGnuGettextInstance.Getdomain(const domain: DomainString;
-  const DefaultDomainDirectory: FilenameString; const CurLang: LanguageString): TDomain;
-  // Retrieves the TDomain object for the specified domain.
-  // Creates one, if none there, yet.
-var
-  idx: integer;
-begin
-  idx := domainlist.IndexOf(Domain);
-  if idx = -1 then
-  begin
-    Result := TDomain.Create;
-    {$ifdef DXGETTEXTDEBUG}
-    Result.DebugLogger:=DebugWriteln;
-    {$endif}
-    Result.Domain := Domain;
-    Result.Directory := DefaultDomainDirectory;
-    Result.SetLanguageCode(curlang);
-    domainlist.AddObject(Domain, Result);
-  end
-  else
-  begin
-    Result := domainlist.Objects[idx] as TDomain;
-  end;
-end;
-
-function TGnuGettextInstance.LoadResString(ResStringRec: PResStringRec): UnicodeString;
-{$ifdef MSWINDOWS}
-var
-  Len:    integer;
-  {$IFDEF UNICODE}
-  Buffer: array [0..1023] of widechar;
-  {$else}
-  Buffer: array [0..1023] of ansichar;
-  {$endif}
-{$endif}
-{$ifdef LINUX }
-const
-  ResStringTableLen = 16;
-type
-  ResStringTable = array [0..ResStringTableLen-1] of LongWord;
-var
-  Handle: TResourceHandle;
-  Tab: ^ResStringTable;
-  ResMod: HMODULE;
-{$endif }
-begin
-  if ResStringRec = nil then
-    exit;
-  if ResStringRec.Identifier >= 64 * 1024 then
-  begin
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('LoadResString was given an invalid ResStringRec.Identifier');
-    {$endif}
-    Result := 'ERROR';
-    exit;
-  end
-  else
-  begin
-    {$ifdef LINUX}
-    // This works with Unicode if the Linux has utf-8 character set
-    // Result:=System.LoadResString(ResStringRec);
-    ResMod:=FindResourceHInstance(ResStringRec^.Module^);
-    Handle:=FindResource(ResMod,
-      PAnsiChar(ResStringRec^.Identifier div ResStringTableLen), PAnsiChar(6));   // RT_STRING
-    Tab:=Pointer(LoadResource(ResMod, Handle));
-    if Tab=nil then
-      Result:=''
-    else
-      Result:=PWideChar(PAnsiChar(Tab)+Tab[ResStringRec^.Identifier mod ResStringTableLen]);
-    {$endif}
-    {$ifdef MSWINDOWS}
-    if not Win32PlatformIsUnicode then
-    begin
-      SetString(Result, Buffer,
-        LoadString(FindResourceHInstance(ResStringRec.Module^),
-        ResStringRec.Identifier, Buffer, SizeOf(Buffer)));
-    end
-    else
-    begin
-      Result := '';
-      Len    := 0;
-      while Length(Result) <= Len + 1 do
-      begin
-        if Length(Result) = 0 then
-          SetLength(Result, 1024)
-        else
-          SetLength(Result, Length(Result) * 2);
-        Len := LoadStringW(FindResourceHInstance(ResStringRec.Module^),
-          ResStringRec.Identifier, PWideChar(Result), Length(Result));
-      end;
-      SetLength(Result, Len);
-    end;
-    {$endif}
-  end;
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('Loaded resourcestring: '+utf8encode(Result));
-  {$endif}
-  if CreatorThread <> GetCurrentThreadId then
-  begin
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('LoadResString was called from an invalid thread. Resourcestring was not translated.');
-    {$endif}
-  end
-  else
-    Result := ResourceStringGettext(Result);
-end;
-
-procedure TGnuGettextInstance.RetranslateComponent(AnObject: TComponent;
-  const TextDomain: DomainString);
-var
-  comp: TGnuGettextComponentMarker;
-begin
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('======================================================================');
-  DebugWriteln ('RetranslateComponent() was called for a component with name '+AnObject.Name+'.');
-  {$endif}
-  comp := AnObject.FindComponent('GNUgettextMarker') as TGnuGettextComponentMarker;
-  if comp = nil then
-  begin
-    {$ifdef DXGETTEXTDEBUG}
-    DebugWriteln ('Retranslate was called on an object that has not been translated before. An Exception is being raised.');
-    {$endif}
-    raise EGGProgrammingError.Create(
-      'Retranslate was called on an object that has not been translated before. Please use TranslateComponent() before RetranslateComponent().');
-  end
-  else
-  begin
-    if comp.LastLanguage <> curlang then
-    begin
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('The retranslator is being executed.');
-      {$endif}
-      comp.Retranslator.Execute;
-    end
-    else
-    begin
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('The language has not changed. The retranslator is not executed.');
-      {$endif}
-    end;
-  end;
-  comp.LastLanguage := curlang;
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('======================================================================');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.TP_IgnoreClass(IgnClass: TClass);
-var
-  cm: TClassMode;
-  i:  integer;
-begin
-  for i := 0 to TP_ClassHandling.Count - 1 do
-  begin
-    cm := TObject(TP_ClassHandling.Items[i]) as TClassMode;
-    if cm.HClass = IgnClass then
-      raise EGGProgrammingError.Create(
-        'You cannot add a class to the ignore list that is already on that list: ' +
-        IgnClass.ClassName + '.');
-    if IgnClass.InheritsFrom(cm.HClass) then
-    begin
-      // This is the place to insert this class
-      cm := TClassMode.Create;
-      cm.HClass := IgnClass;
-      TP_ClassHandling.Insert(i, cm);
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('Locally, class '+IgnClass.ClassName+' is being ignored.');
-      {$endif}
-      exit;
-    end;
-  end;
-  cm := TClassMode.Create;
-  cm.HClass := IgnClass;
-  TP_ClassHandling.Add(cm);
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('Locally, class '+IgnClass.ClassName+' is being ignored.');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.TP_IgnoreClassProperty(IgnClass: TClass;
-  propertyname: ComponentNameString);
-var
-  cm: TClassMode;
-  i:  integer;
-begin
-  propertyname := uppercase(propertyname);
-  for i := 0 to TP_ClassHandling.Count - 1 do
-  begin
-    cm := TObject(TP_ClassHandling.Items[i]) as TClassMode;
-    if cm.HClass = IgnClass then
-    begin
-      if Assigned(cm.SpecialHandler) then
-        raise EGGProgrammingError.Create(
-          'You cannot ignore a class property for a class that has a handler set.');
-      cm.PropertiesToIgnore.Add(propertyname);
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
-      {$endif}
-      exit;
-    end;
-    if IgnClass.InheritsFrom(cm.HClass) then
-    begin
-      // This is the place to insert this class
-      cm := TClassMode.Create;
-      cm.HClass := IgnClass;
-      cm.PropertiesToIgnore.Add(propertyname);
-      TP_ClassHandling.Insert(i, cm);
-      {$ifdef DXGETTEXTDEBUG}
-      DebugWriteln ('Locally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
-      {$endif}
-      exit;
-    end;
-  end;
-  cm := TClassMode.Create;
-  cm.HClass := IgnClass;
-  cm.PropertiesToIgnore.Add(propertyname);
-  TP_GlobalClassHandling.Add(cm);
-  {$ifdef DXGETTEXTDEBUG}
-  DebugWriteln ('Locally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
-  {$endif}
-end;
-
-procedure TGnuGettextInstance.FreeTP_ClassHandlingItems;
-begin
-  while TP_ClassHandling.Count <> 0 do
-  begin
-    TObject(TP_ClassHandling.Items[0]).Free;
-    TP_ClassHandling.Delete(0);
-  end;
-end;
-
-{$ifndef UNICODE}
-function TGnuGettextInstance.ansi2wideDTCP(const s: ansistring): MsgIdString;
-{$ifdef MSWindows}
-var
-  len: integer;
-{$endif}
-begin
-{$ifdef MSWindows}
-  if DesignTimeCodePage = CP_ACP then
-  begin
-    // No design-time codepage specified. Using runtime codepage instead.
-{$endif}
-    Result := s;
-{$ifdef MSWindows}
-  end
-  else
-  begin
-    len := length(s);
-    if len = 0 then
-      Result := ''
-    else
-    begin
-      SetLength(Result, len);
-      len := MultiByteToWideChar(DesignTimeCodePage, 0, pansichar(s),
-        len, pwidechar(Result), len);
-      if len = 0 then
-        raise EGGAnsi2WideConvError.Create(
-          'Cannot convert string to widestring:' + sLineBreak + s);
-      SetLength(Result, len);
-    end;
-  end;
-{$endif}
-end;
-
-{$endif}
-
-{$ifndef UNICODE}
-function TGnuGettextInstance.dngettext(const szDomain: DomainString;
-  const singular, plural: ansistring; Number: integer): TranslatedUnicodeString;
-begin
-  Result := dngettext(szDomain, ansi2wideDTCP(singular), ansi2wideDTCP(plural), Number);
-end;
-
-{$endif}
-
-{ TClassMode }
-
-constructor TClassMode.Create;
-begin
-  PropertiesToIgnore := TStringList.Create;
-  PropertiesToIgnore.Sorted := True;
-  PropertiesToIgnore.Duplicates := dupError;
-  PropertiesToIgnore.CaseSensitive := False;
-end;
-
-destructor TClassMode.Destroy;
-begin
-  FreeAndNil(PropertiesToIgnore);
-  inherited;
-end;
-
-{ TFileLocator }
-
-function TFileLocator.FindSignaturePos(const signature: RawByteString;
-  str: TFileStream): Int64;
-// Finds the position of signature in the file.
-const
-  bufsize=100000;
-var
-  a:RawByteString;
-  b:RawByteString;
-  offset:integer;
-  rd,p:Integer;
-begin
-  if signature='' then
-  begin
-    Result := 0;
-    Exit;
-  end;
-
-  offset:=0;
-  str.Seek(0, soFromBeginning);
-
-  SetLength (a, bufsize);
-  SetLength (b, bufsize);
-  str.Read(a[1],bufsize);
-  
-  while true do begin
-    rd:=str.Read(b[1],bufsize);
-    p:=pos(signature,a+b);
-    if (p<>0) then begin // do not check p < bufsize+100 here!
-      Result:=offset+p-1;
-      exit;
-    end;
-    if rd<>bufsize then begin
-      // Prematurely ended without finding anything
-      Result:=0;
-      exit;
-    end;
-    a:=b;
-    offset:=offset+bufsize;
-  end;
-  Result:=0;
-end;
-
-procedure TFileLocator.Analyze;
-var
-  s:      ansistring;
-  i:      integer;
-  offset: int64;
-  fs:     TFileStream;
-  fi:     TEmbeddedFileInfo;
-  filename: FilenameString;
-  filename8bit: ansistring;
-begin
-  s      := '6637DB2E-62E1-4A60-AC19-C23867046A89'#0#0#0#0#0#0#0#0;
-  s      := MidStr(s, length(s) - 7, 8);
-  offset := 0;
-  for i := 8 downto 1 do
-    offset := offset shl 8 + Ord(s[i]);
-  if offset = 0 then
-    exit;
-  BaseDirectory := ExtractFilePath(ExecutableFilename);
-  try
-    fs := TFileStream.Create(ExecutableFilename, fmOpenRead or fmShareDenyNone);
-    try
-      while True do
-      begin
-        fs.Seek(offset, soFromBeginning);
-        offset := ReadInt64(fs);
-        if offset = 0 then
-          exit;
-        fi := TEmbeddedFileInfo.Create;
-        try
-          fi.Offset := ReadInt64(fs);
-          fi.Size   := ReadInt64(fs);
-          SetLength(filename8bit, offset - fs.position);
-          fs.ReadBuffer(filename8bit[1], offset - fs.position);
-          filename := trim(string(filename8bit));
-          if PreferExternal and SysUtils.fileexists(basedirectory + filename) then
-          begin
-            // Disregard the internal version and use the external version instead
-            FreeAndNil(fi);
-          end
-          else
-            filelist.AddObject(filename, fi);
-        except
-          FreeAndNil(fi);
-          raise;
-        end;
-      end;
-    finally
-      FreeAndNil(fs);
-    end;
-  except
-    {$ifdef DXGETTEXTDEBUG}
-    raise;
-    {$endif}
-  end;
-end;
-
-constructor TFileLocator.Create;
-begin
-  MoFilesCS := TMultiReadExclusiveWriteSynchronizer.Create;
-  MoFiles   := TStringList.Create;
-  filelist  := TStringList.Create;
-  {$ifdef LINUX}
-  filelist.Duplicates:=dupError;
-  filelist.CaseSensitive:=True;
-  {$endif}
-  MoFiles.Sorted := True;
-  MoFiles.Duplicates := dupError;
-  MoFiles.CaseSensitive := False;
-  {$ifdef MSWINDOWS}
-  filelist.Duplicates := dupError;
-  filelist.CaseSensitive := False;
-  {$endif}
-  filelist.Sorted := True;
-end;
-
-destructor TFileLocator.Destroy;
-begin
-  while filelist.Count <> 0 do
-  begin
-    filelist.Objects[0].Free;
-    filelist.Delete(0);
-  end;
-  FreeAndNil(filelist);
-  FreeAndNil(MoFiles);
-  FreeAndNil(MoFilesCS);
-  inherited;
-end;
-
-function TFileLocator.FileExists(filename: FilenameString): boolean;
-var
-  idx: integer;
-begin
-  if LeftStr(filename, length(basedirectory)) = basedirectory then
-  begin
-    // Cut off basedirectory if the file is located beneath that base directory
-    filename := MidStr(filename, length(basedirectory) + 1, maxint);
-  end;
-  Result := filelist.Find(filename, idx);
-end;
-
-function TFileLocator.GetMoFile(filename: FilenameString; DebugLogger: TDebugLogger): TMoFile;
-var
-  fi:      TEmbeddedFileInfo;
-  idx:     integer;
-  idxname: FilenameString;
-  Offset, Size: int64;
-  realfilename: FilenameString;
-begin
-  // Find real filename
-  offset := 0;
-  size   := 0;
-  realfilename := filename;
-  if LeftStr(filename, length(basedirectory)) = basedirectory then
-  begin
-    filename := MidStr(filename, length(basedirectory) + 1, maxint);
-    idx      := filelist.IndexOf(filename);
-    if idx <> -1 then
-    begin
-      fi     := filelist.Objects[idx] as TEmbeddedFileInfo;
-      realfilename := ExecutableFilename;
-      offset := fi.offset;
-      size   := fi.size;
-      {$ifdef DXGETTEXTDEBUG}
-      DebugLogger ('Instead of '+filename+', using '+realfilename+' from offset '+IntTostr(offset)+', size '+IntToStr(size));
-      {$endif}
-    end;
-  end;
-
-
-  {$ifdef DXGETTEXTDEBUG}
-  DebugLogger ('Reading .mo data from file '''+filename+'''');
-  {$endif}
-
-  // Find TMoFile object
-  MoFilesCS.BeginWrite;
-  try
-    idxname := realfilename + ' //\\ ' + IntToStr(offset);
-    if MoFiles.Find(idxname, idx) then
-    begin
-      Result := MoFiles.Objects[idx] as TMoFile;
-    end
-    else
-    begin
-      Result:=TMoFile.Create (realfilename, Offset, Size, UseMemoryMappedFiles);
-      MoFiles.AddObject(idxname, Result);
-    end;
-    Inc(Result.Users);
-  finally
-    MoFilesCS.EndWrite;
-  end;
-end;
-
-function TFileLocator.ReadInt64(str: TStream): int64;
-begin
-  Assert(sizeof(Result) = 8);
-  str.ReadBuffer(Result, 8);
-end;
-
-procedure TFileLocator.ReleaseMoFile(mofile: TMoFile);
-var
-  i: integer;
-begin
-  Assert(mofile <> nil);
-
-  MoFilesCS.BeginWrite;
-  try
-    Dec(mofile.Users);
-    if mofile.Users <= 0 then
-    begin
-      i := MoFiles.Count - 1;
-      while i >= 0 do
-      begin
-        if MoFiles.Objects[i] = mofile then
-        begin
-          MoFiles.Delete(i);
-          FreeAndNil(mofile);
-          break;
-        end;
-        Dec(i);
-      end;
-    end;
-  finally
-    MoFilesCS.EndWrite;
-  end;
-end;
-
-{ TTP_Retranslator }
-
-constructor TTP_Retranslator.Create;
-begin
-  list := TList.Create;
-end;
-
-destructor TTP_Retranslator.Destroy;
-var
-  i: integer;
-begin
-  for i := 0 to list.Count - 1 do
-    TObject(list.Items[i]).Free;
-  FreeAndNil(list);
-  inherited;
-end;
-
-procedure TTP_Retranslator.Execute;
-var
-  i:    integer;
-  sl:   TStrings;
-  item: TTP_RetranslatorItem;
-  newvalue: TranslatedUnicodeString;
-  comp: TGnuGettextComponentMarker;
-  ppi:  PPropInfo;
-begin
-  for i := 0 to list.Count - 1 do
-  begin
-    item := TObject(list.items[i]) as TTP_RetranslatorItem;
-    if item.obj is TComponent then
-    begin
-      comp := TComponent(item.obj).FindComponent('GNUgettextMarker') as
-        TGnuGettextComponentMarker;
-      if Assigned(comp) and (self <> comp.Retranslator) then
-      begin
-        comp.Retranslator.Execute;
-        Continue;
-      end;
-    end;
-    if item.obj is TStrings then
-    begin
-      // Since we don't know the order of items in sl, and don't have
-      // the original .Objects[] anywhere, we cannot anticipate anything
-      // about the current sl.Strings[] and sl.Objects[] values. We therefore
-      // have to discard both values. We can, however, set the original .Strings[]
-      // value into the list and retranslate that.
-      sl := TStringList.Create;
-      try
-        sl.Text := item.OldValue;
-        Instance.TranslateStrings(sl, textdomain);
-        (item.obj as TStrings).BeginUpdate;
-        try
-          (item.obj as TStrings).Text := sl.Text;
-        finally
-          (item.obj as TStrings).EndUpdate;
-        end;
-      finally
-        FreeAndNil(sl);
-      end;
-    end else begin
-      if (textdomain = '') or (textdomain = DefaultTextDomain) then
-        newValue := ComponentGettext(item.OldValue, instance)
-      else
-        newValue := instance.dgettext(textdomain,item.OldValue);
-      ppi:=GetPropInfo(item.obj, item.Propname);
-      if ppi<>nil then begin
-        SetWideStrProp(item.obj, ppi, newValue);
-      end else begin
-        {$ifdef DXGETTEXTDEBUG}
-        Instance.DebugWriteln ('ERROR: On retranslation, property disappeared: '+item.Propname+' for object of type '+item.obj.ClassName);
-        {$endif}
-      end;
-    end;
-  end;
-end;
-
-procedure TTP_Retranslator.Remember(obj: TObject; PropName: ComponentNameString;
-  OldValue: TranslatedUnicodeString);
-var
-  item: TTP_RetranslatorItem;
-begin
-  item     := TTP_RetranslatorItem.Create;
-  item.obj := obj;
-  item.Propname := Propname;
-  item.OldValue := OldValue;
-  list.Add(item);
-end;
-
-{ TGnuGettextComponentMarker }
-
-destructor TGnuGettextComponentMarker.Destroy;
-begin
-  FreeAndNil(Retranslator);
-  inherited;
-end;
-
-{ THook }
-
-constructor THook.Create(OldProcedure, NewProcedure: pointer;
-  FollowJump: boolean = False);
-  { Idea and original code from Igor Siticov }
-  { Modified by Jacques Garcia Vazquez and Lars Dybdahl }
-begin
-  {$ifndef CPU386}
-  raise Exception.Create(
-    'This procedure only works on Intel i386 compatible processors.');
-  {$endif}
-
-  oldproc := OldProcedure;
-  newproc := NewProcedure;
-
-  Reset(FollowJump);
-end;
-
-destructor THook.Destroy;
-begin
-  Shutdown;
-  inherited;
-end;
-
-procedure THook.Disable;
-begin
-  Assert(PatchPosition <> nil,
-    'Patch position in THook was nil when Disable was called');
-  PatchPosition[0] := Original[0];
-  PatchPosition[1] := Original[1];
-  PatchPosition[2] := Original[2];
-  PatchPosition[3] := Original[3];
-  PatchPosition[4] := Original[4];
-end;
-
-procedure THook.Enable;
-begin
-  Assert(PatchPosition <> nil, 'Patch position in THook was nil when Enable was called');
-  PatchPosition[0] := Patch[0];
-  PatchPosition[1] := Patch[1];
-  PatchPosition[2] := Patch[2];
-  PatchPosition[3] := Patch[3];
-  PatchPosition[4] := Patch[4];
-end;
-
-procedure THook.Reset(FollowJump: boolean);
-var
-  offset: integer;
-  {$ifdef LINUX}
-  p:pointer;
-  pagesize:integer;
-  {$endif}
-  {$ifdef MSWindows}
-  ov:     cardinal;
-  {$endif}
-begin
-  if PatchPosition <> nil then
-    Shutdown;
-
-  patchPosition := OldProc;
-  if FollowJump and (word(OldProc^) = $25FF) then
-  begin
-    // This finds the correct procedure if a virtual jump has been inserted
-    // at the procedure address
-///    Inc(integer(patchPosition), 2); // skip the jump
-    patchPosition := patchPosition + 2;
-    patchPosition := pansiChar(Pointer(pointer(patchPosition)^)^);
-  end;
-  offset := integer(NewProc) - integer(pointer(patchPosition)) - 5;
-
-  Patch[0] := ansichar($E9);
-  Patch[1] := ansichar(offset and 255);
-  Patch[2] := ansichar((offset shr 8) and 255);
-  Patch[3] := ansichar((offset shr 16) and 255);
-  Patch[4] := ansichar((offset shr 24) and 255);
-
-  Original[0] := PatchPosition[0];
-  Original[1] := PatchPosition[1];
-  Original[2] := PatchPosition[2];
-  Original[3] := PatchPosition[3];
-  Original[4] := PatchPosition[4];
-
-  {$ifdef MSWINDOWS}
-  if not VirtualProtect(Pointer(PatchPosition), 5, PAGE_EXECUTE_READWRITE, @ov) then
-    RaiseLastOSError;
-  {$endif}
-  {$ifdef LINUX}
-  pageSize:=sysconf (_SC_PAGE_SIZE);
-  p:=pointer(PatchPosition);
-  p:=pointer((integer(p) + PAGESIZE-1) and not (PAGESIZE-1) - pageSize);
-  if mprotect (p, pageSize, PROT_READ + PROT_WRITE + PROT_EXEC) <> 0 then
-    RaiseLastOSError;
-  {$endif}
-end;
-
-procedure THook.Shutdown;
-begin
-  Disable;
-  PatchPosition := nil;
-end;
-
-procedure HookIntoResourceStrings(Enabled: boolean = True;
-  SupportPackages: boolean = False);
-begin
-  HookLoadResString.Reset(SupportPackages);
-  HookLoadStr.Reset(SupportPackages);
-  HookFmtLoadStr.Reset(SupportPackages);
-  if Enabled then
-  begin
-    HookLoadResString.Enable;
-    HookLoadStr.Enable;
-    HookFmtLoadStr.Enable;
-  end;
-end;
-
-{ TMoFile }
-
-function TMoFile.autoswap32(i: cardinal): cardinal;
-var
-  cnv1, cnv2: record
-    case integer of
-      0: (arr: array[0..3] of byte);
-      1: (int: cardinal);
-  end;
-begin
-  if doswap then
-  begin
-    cnv1.int    := i;
-    cnv2.arr[0] := cnv1.arr[3];
-    cnv2.arr[1] := cnv1.arr[2];
-    cnv2.arr[2] := cnv1.arr[1];
-    cnv2.arr[3] := cnv1.arr[0];
-    Result      := cnv2.int;
-  end
-  else
-    Result := i;
-end;
-
-function TMoFile.CardinalInMem(baseptr: PansiChar; Offset: cardinal): cardinal;
-var
-  pc: ^cardinal;
-begin
-  Inc(baseptr, offset);
-  pc     := Pointer(baseptr);
-  Result := pc^;
-  if doswap then
-    autoswap32(Result);
-end;
-
-constructor TMoFile.Create(const filename: FilenameString;
-                           const Offset: int64; Size: int64;
-                           const xUseMemoryMappedFiles: Boolean);
-var
-  i:cardinal;
-  nn:integer;
-  mofile:TFileStream;
-begin
-  if sizeof(i) <> 4 then
-    raise EGGProgrammingError.Create('TDomain in gnugettext is written for an architecture that has 32 bit integers.');
-
-  {$ifdef mswindows}
-  FUseMemoryMappedFiles := xUseMemoryMappedFiles;
-  {$endif}
-
-  {$ifdef linux}
-  FUseMemoryMappedFiles := False;
-  {$endif}
-
-  if FUseMemoryMappedFiles then
-  begin
-    // Map the mo file into memory and let the operating system decide how to cache
-    mo:=createfile (PChar(filename),GENERIC_READ,FILE_SHARE_READ,nil,OPEN_EXISTING,0,0);
-    if mo=INVALID_HANDLE_VALUE then
-      raise EGGIOError.Create ('Cannot open file '+filename);
-    momapping:=CreateFileMapping (mo, nil, PAGE_READONLY, 0, 0, nil);
-    if momapping=0 then
-      raise EGGIOError.Create ('Cannot create memory map on file '+filename);
-    momemoryHandle:=MapViewOfFile (momapping,FILE_MAP_READ,0,0,0);
-    if momemoryHandle=nil then begin
-      raise EGGIOError.Create ('Cannot map file '+filename+' into memory. Reason: '+GetLastWinError);
-    end;
-    momemory:=momemoryHandle+offset;
-  end
-  else
-  begin
-    // Read the whole file into memory
-    mofile:=TFileStream.Create (filename, fmOpenRead or fmShareDenyNone);
-    try
-      if (size = 0) then
-        size := mofile.Size;
-      Getmem (momemoryHandle, size);
-      momemory := momemoryHandle;
-      mofile.Seek(offset, soBeginning);
-      mofile.ReadBuffer(momemory^, size);
-    finally
-      FreeAndNil(mofile);
-    end;
-  end;
-
-  // Check the magic number
-  doswap := False;
-  i      := CardinalInMem(momemory, 0);
-  if (i <> $950412DE) and (i <> $DE120495) then
-    raise EGGIOError.Create('This file is not a valid GNU gettext mo file: ' + filename);
-  doswap := (i = $DE120495);
-
-
-  // Find the positions in the file according to the file format spec
-  CardinalInMem(momemory, 4);
-  // Read the version number, but don't use it for anything.
-  N := CardinalInMem(momemory, 8);    // Get string count
-  O := CardinalInMem(momemory, 12);   // Get offset of original strings
-  T := CardinalInMem(momemory, 16);   // Get offset of translated strings
-
-  // Calculate start conditions for a binary search
-  nn := N;
-  startindex := 1;
-  while nn <> 0 do
-  begin
-    nn := nn shr 1;
-    startindex := startindex shl 1;
-  end;
-  startindex := startindex shr 1;
-  startstep  := startindex shr 1;
-end;
-
-destructor TMoFile.Destroy;
-begin
-  if FUseMemoryMappedFiles then
-  begin
-    UnMapViewOfFile (momemoryHandle);
-    CloseHandle (momapping);
-    CloseHandle (mo);
-  end
-  else
-  begin
-    FreeMem (momemoryHandle);
-  end;
-
-  inherited;
-end;
-
-function TMoFile.gettext(const msgid: RawUtf8String; var found: boolean): RawUtf8String;
-var
-  i, step: cardinal;
-  offset, pos: cardinal;
-  CompareResult: integer;
-  msgidptr, a, b: PAnsiChar;
-  abidx: integer;
-  size, msgidsize: integer;
-begin
-  found     := False;
-  msgidptr  := PAnsiChar(msgid);
-  msgidsize := length(msgid);
-
-  // Do binary search
-  i    := startindex;
-  step := startstep;
-  while True do
-  begin
-    // Get string for index i
-    pos    := O + 8 * (i - 1);
-    offset := CardinalInMem(momemory, pos + 4);
-    size   := CardinalInMem(momemory, pos);
-    a      := msgidptr;
-    b      := momemory + offset;
-    abidx  := size;
-    if msgidsize < abidx then
-      abidx := msgidsize;
-    CompareResult := 0;
-    while abidx <> 0 do
-    begin
-      CompareResult := integer(byte(a^)) - integer(byte(b^));
-      if CompareResult <> 0 then
-        break;
-      Dec(abidx);
-      Inc(a);
-      Inc(b);
-    end;
-    if CompareResult = 0 then
-      CompareResult := msgidsize - size;
-    if CompareResult = 0 then
-    begin  // msgid=s
-           // Found the msgid
-      pos    := T + 8 * (i - 1);
-      offset := CardinalInMem(momemory, pos + 4);
-      size   := CardinalInMem(momemory, pos);
-      SetString(Result, momemory + offset, size);
-      found := True;
-      break;
-    end;
-    if step = 0 then
-    begin
-      // Not found
-      Result := msgid;
-      break;
-    end;
-    if CompareResult < 0 then
-    begin  // msgid<s
-      if i < 1 + step then
-        i := 1
-      else
-        i := i - step;
-      step := step shr 1;
-    end
-    else
-    begin  // msgid>s
-      i := i + step;
-      if i > N then
-        i := N;
-      step := step shr 1;
-    end;
-  end;
-end;
-
-var
-  param0: string;
-
-initialization
-  {$ifdef DXGETTEXTDEBUG}
-  {$ifdef MSWINDOWS}
-  MessageBox (0,'gnugettext.pas debugging is enabled. Turn it off before releasing this piece of software.','Information',MB_OK);
-  {$endif}
-  {$ifdef LINUX}
-  writeln (stderr,'gnugettext.pas debugging is enabled. Turn it off before releasing this piece of software.');
-  {$endif}
-  {$endif}
-  {$ifdef FPC}
-    {$ifdef LINUX}
-      SetLocale(LC_ALL, '');
-      SetCWidestringManager;
-    {$endif LINUX}
-  {$endif FPC}
-  // Get DLL/shared object filename
-  SetLength(ExecutableFilename, 300); // MAX_PATH ?
-  {$ifdef MSWINDOWS}
-  SetLength(ExecutableFilename, GetModuleFileName(HInstance,
-    PChar(ExecutableFilename), Length(ExecutableFilename)));
-  {$endif}
-  {$ifdef LINUX}
-  if ModuleIsLib or ModuleIsPackage then
-  begin
-    // This line has not been tested on Linux, yet, but should work.
-    SetLength(ExecutableFilename, GetModuleFileName(0, PChar(ExecutableFilename),
-      Length(ExecutableFilename)));
-  end else
-    ExecutableFilename:=Paramstr(0);
-  {$endif}
-  FileLocator:=TFileLocator.Create;
-  FileLocator.Analyze;
-  ResourceStringDomainList := TStringList.Create;
-  ResourceStringDomainList.Add(DefaultTextDomain);
-  ResourceStringDomainListCS:=TMultiReadExclusiveWriteSynchronizer.Create;
-  ComponentDomainList:=TStringList.Create;
-  ComponentDomainList.Add(DefaultTextDomain);
-  ComponentDomainListCS:=TMultiReadExclusiveWriteSynchronizer.Create;
-  DefaultInstance:=TGnuGettextInstance.Create;
-  {$ifdef MSWINDOWS}
-  Win32PlatformIsUnicode := (Win32Platform = VER_PLATFORM_WIN32_NT);
-  {$endif}
-
-  // replace Borlands LoadResString with gettext enabled version:
-  {$ifdef UNICODE}
-  HookLoadResString:=THook.Create (@system.LoadResString, @LoadResStringW);
-  {$else}
-  HookLoadResString := THook.Create(@system.LoadResString, @LoadResStringA);
-  {$endif}
-  HookLoadStr := THook.Create(@SysUtils.LoadStr, @SysUtilsLoadStr);
-  HookFmtLoadStr := THook.Create(@SysUtils.FmtLoadStr, @SysUtilsFmtLoadStr);
-  param0 := lowercase(extractfilename(ParamStr(0)));
-  if (param0 <> 'delphi32.exe') and (param0 <> 'kylix') and (param0 <> 'bds.exe') then
-    HookIntoResourceStrings(AutoCreateHooks, False);
-  param0 := '';
-
-finalization
-  FreeAndNil (DefaultInstance);
-  FreeAndNil (ResourceStringDomainListCS);
-  FreeAndNil (ResourceStringDomainList);
-  FreeAndNil (ComponentDomainListCS);
-  FreeAndNil (ComponentDomainList);
-  FreeAndNil (HookFmtLoadStr);
-  FreeAndNil (HookLoadStr);
-  FreeAndNil (HookLoadResString);
-  FreeAndNil (FileLocator);
-
-end.
-

BIN
Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/default.mo


+ 17 - 17
Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/default.po

@@ -2,17 +2,17 @@ msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "POT-Creation-Date: 2023-01-02 19:19+0300\n"
-"PO-Revision-Date: 2023-01-02 19:30+0300\n"
+"PO-Revision-Date: 2024-05-23 13:47+0300\n"
 "Last-Translator: \n"
 "Language-Team: \n"
 "Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.8.6\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
+"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Poedit 3.4.4\n"
 "X-Poedit-Basepath: ../../../Source\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 "X-Poedit-SearchPath-0: .\n"
 
 #. dmGLSViewer..odTextures..DefaultExt
@@ -79,7 +79,7 @@ msgstr ""
 #. GLAbout..PanelTop..StaticTextVersion..Caption
 #: fGLAbout.dfm:173
 msgid "Info"
-msgstr ""
+msgstr "Инфо"
 
 #. GLAbout..PanelMiddle..LabelCopyright..Caption
 #: fGLAbout.dfm:190
@@ -129,7 +129,7 @@ msgstr ""
 #. GLDialog..PanelBottom..ButtonCancel..Caption
 #: fGLDialog.dfm:61
 msgid "Cancel"
-msgstr ""
+msgstr "Отмена"
 
 #. GLDialog..PanelBottom..ButtonHelp..Caption
 #. MainForm..ActionManager..acHelpContents..Category
@@ -140,7 +140,7 @@ msgstr ""
 #: fGLDialog.dfm:70 fMain.dfm:1946 fMain.dfm:1953 fMain.dfm:1960 fMain.dfm:1966
 #: fMain.dfm:1971
 msgid "Help"
-msgstr ""
+msgstr "Справка"
 
 #. GLOptions..Caption
 #: fGLOptions.dfm:3
@@ -170,7 +170,7 @@ msgstr "Английский"
 #. GLOptions..PanelMiddle..RadioGroupLanguage....Items.Strings
 #: fGLOptions.dfm:37
 msgid "Russian"
-msgstr ""
+msgstr "Русский"
 
 #. GLOptions..PanelMiddle..RadioGroupLanguage....Items.Strings
 #: fGLOptions.dfm:38
@@ -199,7 +199,7 @@ msgstr ""
 
 #: fGLOptions.pas:148
 msgid "Reload to change language"
-msgstr ""
+msgstr "Перезагрузите для изменения языка"
 
 #. MainForm..Caption
 #: fMain.dfm:4
@@ -318,7 +318,7 @@ msgstr "&Сохранить как..."
 #. MainForm..ActionManager..........Caption
 #: fMain.dfm:1046 fMain.dfm:1379 fMain.dfm:1616
 msgid "S&ave Textures..."
-msgstr ""
+msgstr "Сохранить текстуру"
 
 #. MainForm..ActionManager..............Caption
 #. MainForm..ActionManager..............Caption
@@ -395,7 +395,7 @@ msgstr ""
 #. MainForm..ActionManager..........Caption
 #: fMain.dfm:1123 fMain.dfm:1295 fMain.dfm:1444 fMain.dfm:1684
 msgid "&Hidden Lines"
-msgstr ""
+msgstr "Скрытые линии"
 
 #. MainForm..ActionManager..............Caption
 #. MainForm..ActionManager..........Caption
@@ -433,7 +433,7 @@ msgstr ""
 #. MainForm..ActionManager..........Caption
 #: fMain.dfm:1152 fMain.dfm:1470
 msgid "&View"
-msgstr ""
+msgstr "Вид"
 
 #. MainForm..ActionManager..............Caption
 #. MainForm..ActionManager..............Caption
@@ -527,13 +527,13 @@ msgstr ""
 #. MainForm..ActionManager..............Caption
 #: fMain.dfm:1240 fMain.dfm:1582
 msgid "&About..."
-msgstr ""
+msgstr "&О программе"
 
 #. MainForm..ActionManager..........Caption
 #. MainForm..ActionManager..........Caption
 #: fMain.dfm:1242 fMain.dfm:1584
 msgid "&Help"
-msgstr ""
+msgstr "&Справка"
 
 #. MainForm..ActionManager..................Caption
 #: fMain.dfm:1478
@@ -648,7 +648,7 @@ msgstr ""
 #. MainForm..ActionManager..acToolsOptions..Caption
 #: fMain.dfm:1790
 msgid "Options..."
-msgstr ""
+msgstr "Опции..."
 
 #. MainForm..ActionManager..acToolsOptions..Hint
 #: fMain.dfm:1791
@@ -747,7 +747,7 @@ msgstr ""
 #. MainForm..ActionManager..acFileOpen..Caption
 #: fMain.dfm:1905
 msgid "&Open..."
-msgstr ""
+msgstr "&Открыть..."
 
 #. MainForm..ActionManager..acFileOpen..Hint
 #: fMain.dfm:1907
@@ -896,7 +896,7 @@ msgstr "Правка"
 #. MainForm..ActionManager..acEditUndo..Caption
 #: fMain.dfm:1999
 msgid "&Undo"
-msgstr ""
+msgstr "&Отмена"
 
 #. MainForm..ActionManager..acEditUndo..Hint
 #: fMain.dfm:2000

BIN
Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/examples.mo


BIN
Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/glsvewer.mo


BIN
Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/glsviewer.mo


BIN
Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/languages.mo


+ 6 - 6
Examples/AdvDemos/GLSViewer/Locale/ru/LC_MESSAGES/languages.po

@@ -10,15 +10,15 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLScene Languages\n"
 "POT-Creation-Date: 2023-01-01 16:26\n"
-"PO-Revision-Date: 2023-01-02 19:30+0300\n"
+"PO-Revision-Date: 2024-05-23 13:27+0300\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Language: ru\n"
 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
-"Last-Translator: \n"
-"Language-Team: \n"
-"X-Generator: Poedit 1.8.6\n"
+"X-Generator: Poedit 3.4.4\n"
 
 msgid "Arabic"
 msgstr "Арабский"
@@ -48,7 +48,7 @@ msgstr "Итальянский"
 
 #. Language of Iran
 msgid "Persian"
-msgstr ""
+msgstr "Персидский"
 
 #. Language of Japan
 msgid "Japanese"

+ 2 - 1
Examples/AdvDemos/GLSViewer/Source/fGLAbout.dfm

@@ -129,7 +129,7 @@ inherited GLAbout: TGLAbout
     ExplicitWidth = 498
     ExplicitHeight = 89
     object LabelVersion: TLabel
-      Left = 102
+      Left = 94
       Top = 63
       Width = 50
       Height = 20
@@ -141,6 +141,7 @@ inherited GLAbout: TGLAbout
       Font.Name = 'MS Sans Serif'
       Font.Style = []
       ParentFont = False
+      ExplicitLeft = 102
     end
     object LabelGeoblock: TLabel
       Left = 102

+ 2 - 4
Examples/AdvDemos/GLSViewer/Source/fGLForm.pas

@@ -17,7 +17,7 @@ uses
   Vcl.Menus,
   Vcl.Actnlist,
 
-  GnuGettext;
+  gnuGettext;
 
 type
   TGLForm = class(TForm)
@@ -45,9 +45,9 @@ procedure TGLForm.FormCreate(Sender: TObject);
 begin
   inherited;
   SetLanguage;
-  TranslateComponent(Self);
 end;
 
+//----------------------------------------------------------
 procedure TGLForm.SetLanguage;
 var
   LocalePath : TFileName;
@@ -114,8 +114,6 @@ begin
   //TP_GlobalIgnoreClass(TGLMaterialLibrary);
   //TP_GlobalIgnoreClass(TListBox);
   //TP_GlobalIgnoreClassProperty(TAction, 'Category');
-
-  //LoadNewResourceModule(Language);//when using ITE, ENU for English USA
 end;
 
 

+ 14 - 9
Examples/AdvDemos/GLSViewer/Source/fGLOptions.dfm

@@ -3,19 +3,22 @@ inherited GLOptions: TGLOptions
   Caption = 'Options'
   ClientHeight = 394
   ClientWidth = 521
+  StyleElements = [seFont, seClient, seBorder]
   OnClose = FormClose
-  ExplicitWidth = 545
-  ExplicitHeight = 458
+  ExplicitWidth = 537
+  ExplicitHeight = 433
   TextHeight = 20
   inherited PanelTop: TPanel
     Width = 521
-    ExplicitWidth = 492
+    StyleElements = [seFont, seClient, seBorder]
+    ExplicitWidth = 513
   end
   inherited PanelMiddle: TPanel
     Width = 521
     Height = 318
-    ExplicitWidth = 521
-    ExplicitHeight = 318
+    StyleElements = [seFont, seClient, seBorder]
+    ExplicitWidth = 513
+    ExplicitHeight = 293
     object Label1: TLabel [0]
       Left = 296
       Top = 33
@@ -27,8 +30,9 @@ inherited GLOptions: TGLOptions
       Width = 519
       Height = 316
       TabOrder = 2
-      ExplicitWidth = 519
-      ExplicitHeight = 316
+      StyleElements = [seFont, seClient, seBorder]
+      ExplicitWidth = 511
+      ExplicitHeight = 291
     end
     object CheckBoxAxis: TCheckBox
       Left = 96
@@ -74,8 +78,9 @@ inherited GLOptions: TGLOptions
   inherited PanelBottom: TPanel
     Top = 353
     Width = 521
-    ExplicitTop = 353
-    ExplicitWidth = 492
+    StyleElements = [seFont, seClient, seBorder]
+    ExplicitTop = 328
+    ExplicitWidth = 513
     inherited ButtonOK: TButton
       OnClick = ButtonOKClick
     end

+ 2 - 3
Examples/AdvDemos/GLSViewer/Source/fGLSViewer.pas

@@ -63,6 +63,7 @@ uses
   GLS.MeshBuilder,
   GLS.Navigator,
   GLS.Utils,
+  GLS.GeomObjects,
   GLS.SimpleNavigation,
 
   fGLForm,
@@ -70,8 +71,7 @@ uses
   fGLOptions,
   fGLDialog,
   dImages,
-  dDialogs,
-  GLS.GeomObjects;
+  dDialogs;
 
 type
   TFormGLSViewer = class(TGLForm)
@@ -1076,7 +1076,6 @@ begin
     GLPoints.Colors.AddPoint(Color);
   end;
 //  dcWorld.Remove(GLPoints, False);
-//  GLPoints := TGLPoints(dcWorld.AddNewChild(TGLPoints));
 end;
 
 (*

+ 16 - 7
Examples/Demos/bench/megaglasscube/fMegaglassD.dfm

@@ -1,25 +1,34 @@
 object FormMegaglasscube: TFormMegaglasscube
   Left = 198
   Top = 107
+  Margins.Left = 5
+  Margins.Top = 5
+  Margins.Right = 5
+  Margins.Bottom = 5
   Caption = 'Megaglasscube'
-  ClientHeight = 350
-  ClientWidth = 498
+  ClientHeight = 613
+  ClientWidth = 872
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
+  Font.Height = -19
   Font.Name = 'MS Sans Serif'
   Font.Style = []
   OnCreate = FormCreate
-  TextHeight = 13
+  PixelsPerInch = 168
+  TextHeight = 24
   object GLSceneViewer1: TGLSceneViewer
     Left = 0
     Top = 0
-    Width = 498
-    Height = 350
+    Width = 872
+    Height = 613
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = GLCamera1
     Buffer.BackgroundColor = clBlack
-    FieldOfView = 148.109207153320300000
+    FieldOfView = 161.469665527343800000
     PenAsTouch = False
     Align = alClient
     TabOrder = 0

+ 47 - 0
Examples/Demos/collisions/BoxSphere/BoxSphereC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">BoxSphereC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>BoxSphereC</SanitizedProjectName>
         <_TCHARMapping>wchar_t</_TCHARMapping>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -99,6 +119,14 @@
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -128,6 +156,9 @@
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <Defines>_DEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -137,6 +168,9 @@
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <Defines>NDEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="BoxSphereC.cpp">
             <BuildOrder>0</BuildOrder>
@@ -947,6 +981,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1017,6 +1054,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1027,6 +1068,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1240,10 +1285,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">False</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 1 - 0
Examples/Demos/collisions/BoxSphere/BoxSphereD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">BoxSphereD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>

+ 271 - 135
Examples/Demos/collisions/BoxSphere/fBoxSphereD.dfm

@@ -1,13 +1,17 @@
 object FormBoxSphere: TFormBoxSphere
   Left = 281
   Top = 115
+  Margins.Left = 5
+  Margins.Top = 5
+  Margins.Right = 5
+  Margins.Bottom = 5
   Caption = 'Box Sphere Intersection'
-  ClientHeight = 470
-  ClientWidth = 745
+  ClientHeight = 823
+  ClientWidth = 1318
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
+  Font.Height = -19
   Font.Name = 'Arial'
   Font.Style = []
   KeyPreview = True
@@ -16,69 +20,101 @@ object FormBoxSphere: TFormBoxSphere
   OnKeyPress = FormKeyPress
   OnMouseWheel = FormMouseWheel
   OnResize = FormResize
-  TextHeight = 14
+  PixelsPerInch = 168
+  TextHeight = 22
   object Viewer: TGLSceneViewer
-    Left = 180
+    Left = 315
     Top = 0
-    Width = 565
-    Height = 470
+    Width = 1003
+    Height = 823
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = GLCamera1
     Buffer.BackgroundColor = clTeal
-    FieldOfView = 155.977050781250000000
+    FieldOfView = 166.144287109375000000
     PenAsTouch = False
     Align = alClient
     OnMouseDown = ViewerMouseDown
     OnMouseMove = ViewerMouseMove
     TabOrder = 0
-    ExplicitWidth = 557
   end
   object Panel2: TPanel
     Left = 0
     Top = 0
-    Width = 180
-    Height = 470
+    Width = 315
+    Height = 823
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alLeft
     TabOrder = 1
     object Label5: TLabel
-      Left = 10
-      Top = 134
-      Width = 56
-      Height = 14
+      Left = 18
+      Top = 235
+      Width = 99
+      Height = 22
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Sphere pos'
     end
     object Label3: TLabel
-      Left = 16
-      Top = 8
-      Width = 59
-      Height = 14
+      Left = 28
+      Top = 14
+      Width = 104
+      Height = 22
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Box position'
     end
     object Label4: TLabel
-      Left = 96
-      Top = 8
-      Width = 48
-      Height = 14
+      Left = 168
+      Top = 14
+      Width = 83
+      Height = 22
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Box scale'
     end
     object Label1: TLabel
-      Left = 8
-      Top = 384
-      Width = 33
-      Height = 14
+      Left = 14
+      Top = 672
+      Width = 59
+      Height = 22
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Result:'
     end
     object Label7: TLabel
-      Left = 96
-      Top = 136
-      Width = 68
-      Height = 14
+      Left = 168
+      Top = 238
+      Width = 118
+      Height = 22
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Sphere radius'
     end
     object CheckBox06: TCheckBox
-      Left = 8
-      Top = 291
-      Width = 80
-      Height = 17
+      Left = 14
+      Top = 509
+      Width = 140
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Grid'
       Checked = True
       State = cbChecked
@@ -86,10 +122,14 @@ object FormBoxSphere: TFormBoxSphere
       OnClick = CheckBox04Click
     end
     object CheckBox04: TCheckBox
-      Left = 8
-      Top = 242
-      Width = 80
-      Height = 19
+      Left = 14
+      Top = 424
+      Width = 140
+      Height = 33
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Box visible'
       Checked = True
       State = cbChecked
@@ -97,19 +137,27 @@ object FormBoxSphere: TFormBoxSphere
       OnClick = CheckBox04Click
     end
     object CheckBox05: TCheckBox
-      Left = 8
-      Top = 267
-      Width = 80
-      Height = 17
+      Left = 14
+      Top = 467
+      Width = 140
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Axis'
       TabOrder = 2
       OnClick = CheckBox04Click
     end
     object CheckBox07: TCheckBox
-      Left = 8
-      Top = 314
-      Width = 97
-      Height = 17
+      Left = 14
+      Top = 550
+      Width = 170
+      Height = 29
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Sphere visible '
       Checked = True
       State = cbChecked
@@ -117,205 +165,293 @@ object FormBoxSphere: TFormBoxSphere
       OnClick = CheckBox04Click
     end
     object Edit1: TEdit
-      Left = 10
-      Top = 25
-      Width = 56
-      Height = 22
+      Left = 18
+      Top = 44
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 4
       Text = '12'
       OnChange = Edit1Change
     end
     object Edit2: TEdit
-      Left = 10
-      Top = 48
-      Width = 56
-      Height = 22
+      Left = 18
+      Top = 84
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 5
       Text = '9'
       OnChange = Edit1Change
     end
     object Edit3: TEdit
-      Left = 10
-      Top = 72
-      Width = 56
-      Height = 22
+      Left = 18
+      Top = 126
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 6
       Text = '6'
       OnChange = Edit1Change
     end
     object UpDown1: TUpDown
-      Left = 66
-      Top = 25
-      Width = 22
-      Height = 22
+      Left = 116
+      Top = 44
+      Width = 38
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit1
       Min = -100
       Position = 12
       TabOrder = 7
     end
     object UpDown2: TUpDown
-      Left = 66
-      Top = 48
-      Width = 22
-      Height = 22
+      Left = 116
+      Top = 84
+      Width = 38
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit2
       Min = -100
       Position = 9
       TabOrder = 8
     end
     object UpDown3: TUpDown
-      Left = 66
-      Top = 72
-      Width = 22
-      Height = 22
+      Left = 116
+      Top = 126
+      Width = 38
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit3
       Min = -100
       Position = 6
       TabOrder = 9
     end
     object Edit4: TEdit
-      Left = 91
-      Top = 24
-      Width = 56
-      Height = 22
+      Left = 159
+      Top = 42
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 10
       Text = '10'
       OnChange = Edit1Change
     end
     object Edit5: TEdit
-      Left = 91
-      Top = 48
-      Width = 56
-      Height = 22
+      Left = 159
+      Top = 84
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 11
       Text = '10'
       OnChange = Edit1Change
     end
     object Edit6: TEdit
-      Left = 91
-      Top = 72
-      Width = 56
-      Height = 22
+      Left = 159
+      Top = 126
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 12
       Text = '10'
       OnChange = Edit1Change
     end
     object UpDown4: TUpDown
-      Left = 147
-      Top = 24
-      Width = 22
-      Height = 22
+      Left = 257
+      Top = 42
+      Width = 39
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit4
       Position = 10
       TabOrder = 13
     end
     object UpDown5: TUpDown
-      Left = 147
-      Top = 48
-      Width = 22
-      Height = 22
+      Left = 257
+      Top = 84
+      Width = 39
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit5
       Position = 10
       TabOrder = 14
     end
     object UpDown6: TUpDown
-      Left = 147
-      Top = 72
-      Width = 22
-      Height = 22
+      Left = 257
+      Top = 126
+      Width = 39
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit6
       Position = 10
       TabOrder = 15
     end
     object Edit7: TEdit
-      Left = 10
-      Top = 152
-      Width = 56
-      Height = 22
+      Left = 18
+      Top = 266
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 16
       Text = '7'
       OnChange = Edit1Change
     end
     object Edit8: TEdit
-      Left = 10
-      Top = 176
-      Width = 56
-      Height = 22
+      Left = 18
+      Top = 308
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 17
       Text = '-1'
       OnChange = Edit1Change
     end
     object Edit9: TEdit
-      Left = 10
-      Top = 200
-      Width = 56
-      Height = 22
+      Left = 18
+      Top = 350
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 18
       Text = '6'
       OnChange = Edit1Change
     end
     object UpDown7: TUpDown
-      Left = 66
-      Top = 152
-      Width = 22
-      Height = 22
+      Left = 116
+      Top = 266
+      Width = 38
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit7
       Min = -100
       Position = 7
       TabOrder = 19
     end
     object UpDown8: TUpDown
-      Left = 66
-      Top = 176
-      Width = 22
-      Height = 22
+      Left = 116
+      Top = 308
+      Width = 38
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit8
       Min = -100
       Position = -1
       TabOrder = 20
     end
     object UpDown9: TUpDown
-      Left = 66
-      Top = 200
-      Width = 22
-      Height = 22
+      Left = 116
+      Top = 350
+      Width = 38
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit9
       Min = -100
       Position = 6
       TabOrder = 21
     end
     object Edit10: TEdit
-      Left = 93
-      Top = 152
-      Width = 56
-      Height = 22
+      Left = 163
+      Top = 266
+      Width = 98
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       TabOrder = 22
       Text = '5'
       OnChange = Edit1Change
     end
     object UpDown10: TUpDown
-      Left = 149
-      Top = 152
-      Width = 22
-      Height = 22
+      Left = 261
+      Top = 266
+      Width = 38
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Associate = Edit10
       Position = 5
       TabOrder = 23
     end
     object Button3: TButton
-      Left = 40
-      Top = 344
-      Width = 75
-      Height = 25
+      Left = 70
+      Top = 602
+      Width = 131
+      Height = 44
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Recalc'
       TabOrder = 24
       OnClick = Button3Click
     end
     object Button4: TButton
-      Left = 11
-      Top = 98
-      Width = 158
-      Height = 25
+      Left = 19
+      Top = 172
+      Width = 277
+      Height = 43
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Random box rotation'
       Default = True
       TabOrder = 25

+ 47 - 0
Examples/Demos/collisions/OcclusionQuery/OcclusionQueryC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">OcclusionQueryC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>OcclusionQueryC</SanitizedProjectName>
         <_TCHARMapping>wchar_t</_TCHARMapping>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -99,6 +119,14 @@
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -131,6 +159,9 @@
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <Defines>_DEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -140,6 +171,9 @@
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <Defines>NDEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="fOcclusionQueryC.cpp">
             <Form>Form1</Form>
@@ -956,6 +990,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1026,6 +1063,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1036,6 +1077,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1249,10 +1294,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">False</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 5 - 0
Examples/Demos/collisions/OcclusionQuery/OcclusionQueryD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">OcclusionQueryD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -814,6 +815,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1107,6 +1111,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 47 - 0
Examples/Demos/collisions/RayBox/RayBoxC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">RayBoxC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>RayBoxC</SanitizedProjectName>
         <_TCHARMapping>wchar_t</_TCHARMapping>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -99,6 +119,14 @@
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -130,6 +158,9 @@
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <Defines>_DEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -139,6 +170,9 @@
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <Defines>NDEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="fRayBoxC.cpp">
             <Form>Form1</Form>
@@ -955,6 +989,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1025,6 +1062,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1035,6 +1076,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1248,10 +1293,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">False</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 5 - 0
Examples/Demos/collisions/RayBox/RayBoxD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">RayBoxD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -813,6 +814,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1106,6 +1110,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 1 - 1
Examples/Demos/collisions/RayBox/fRayBoxC.cpp

@@ -30,7 +30,7 @@ void __fastcall TForm1::FormCreate(TObject *Sender)
   RayStart = AffineVectorMake(Random()*2 -1, Random()*2 -1, Random()*2 -1);
 }
 //---------------------------------------------------------------------------
-void __fastcall TForm1::Button1Click(TObject *Sender)
+void __fastcall TForm1::ButtonTestClick(TObject *Sender)
 {
   TAffineVector iPnt, afScale ;
 	// Change pos.

+ 65 - 32
Examples/Demos/collisions/RayBox/fRayBoxC.dfm

@@ -1,28 +1,37 @@
 object Form1: TForm1
   Left = 0
   Top = 0
+  Margins.Left = 5
+  Margins.Top = 5
+  Margins.Right = 5
+  Margins.Bottom = 5
   Caption = 'Ray Box'
-  ClientHeight = 390
-  ClientWidth = 518
+  ClientHeight = 683
+  ClientWidth = 921
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
+  Font.Height = -19
   Font.Name = 'Tahoma'
   Font.Style = []
   OnCreate = FormCreate
   OnKeyPress = FormKeyPress
   OnMouseWheel = FormMouseWheel
   OnResize = FormResize
-  TextHeight = 13
+  PixelsPerInch = 168
+  TextHeight = 23
   object Viewer: TGLSceneViewer
     Left = 0
-    Top = 41
-    Width = 518
-    Height = 349
+    Top = 72
+    Width = 921
+    Height = 611
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = GLCamera1
     Buffer.BackgroundColor = clBlack
-    FieldOfView = 148.022491455078100000
+    FieldOfView = 161.410064697265600000
     PenAsTouch = False
     Align = alClient
     OnMouseDown = ViewerMouseDown
@@ -32,39 +41,59 @@ object Form1: TForm1
   object Panel1: TPanel
     Left = 0
     Top = 0
-    Width = 518
-    Height = 41
+    Width = 921
+    Height = 72
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alTop
     TabOrder = 1
     object Label1: TLabel
-      Left = 296
-      Top = 12
-      Width = 34
-      Height = 13
+      Left = 518
+      Top = 21
+      Width = 58
+      Height = 23
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Result:'
     end
     object LabelFPS: TLabel
-      Left = 488
-      Top = 12
-      Width = 18
-      Height = 13
+      Left = 854
+      Top = 21
+      Width = 31
+      Height = 23
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'FPS'
     end
-    object Button1: TButton
-      Left = 8
-      Top = 8
-      Width = 75
-      Height = 25
+    object ButtonTest: TButton
+      Left = 14
+      Top = 14
+      Width = 131
+      Height = 44
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Test!'
       Default = True
       TabOrder = 0
-      OnClick = Button1Click
+      OnClick = ButtonTestClick
     end
     object CheckBox1: TCheckBox
-      Left = 99
-      Top = 12
-      Width = 70
-      Height = 17
+      Left = 173
+      Top = 21
+      Width = 123
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'View box'
       Checked = True
       State = cbChecked
@@ -72,10 +101,14 @@ object Form1: TForm1
       OnClick = CheckBox1Click
     end
     object CheckBox2: TCheckBox
-      Left = 178
-      Top = 12
-      Width = 112
-      Height = 17
+      Left = 312
+      Top = 21
+      Width = 196
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Change pos scale'
       Checked = True
       State = cbChecked

+ 2 - 2
Examples/Demos/collisions/RayBox/fRayBoxC.h

@@ -24,7 +24,7 @@ __published:	// IDE-managed Components
 	TPanel *Panel1;
 	TLabel *Label1;
 	TLabel *LabelFPS;
-	TButton *Button1;
+	TButton *ButtonTest;
 	TCheckBox *CheckBox1;
 	TCheckBox *CheckBox2;
 	TGLScene *GLScene;
@@ -41,7 +41,7 @@ __published:	// IDE-managed Components
 	TTimer *Timer1;
 	TGLMaterialLibrary *GLMaterialLibrary;
 	void __fastcall FormCreate(TObject *Sender);
-	void __fastcall Button1Click(TObject *Sender);
+	void __fastcall ButtonTestClick(TObject *Sender);
 	void __fastcall CheckBox1Click(TObject *Sender);
 	void __fastcall GLCadencerProgress(TObject *Sender, const double deltaTime, const double newTime);
 	void __fastcall Timer1Timer(TObject *Sender);

+ 5 - 0
Examples/Demos/collisions/Raycast/RayCastD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">RayCastD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -813,6 +814,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1106,6 +1110,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 47 - 0
Examples/Demos/collisions/Raycast/RaycastC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">RaycastC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>RaycastC</SanitizedProjectName>
         <_TCHARMapping>wchar_t</_TCHARMapping>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -99,6 +119,14 @@
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -132,6 +160,9 @@
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <Defines>_DEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -141,6 +172,9 @@
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <Defines>NDEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="fRaycastC.cpp">
             <Form>Form1</Form>
@@ -957,6 +991,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1027,6 +1064,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1037,6 +1078,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1250,10 +1295,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">False</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 80 - 39
Examples/Demos/collisions/Raycast/fRayCastD.dfm

@@ -1,51 +1,76 @@
 object FormRayCast: TFormRayCast
   Left = 170
   Top = 79
+  Margins.Left = 5
+  Margins.Top = 5
+  Margins.Right = 5
+  Margins.Bottom = 5
   AutoSize = True
   Caption = 'Ray Cast'
-  ClientHeight = 258
-  ClientWidth = 505
+  ClientHeight = 452
+  ClientWidth = 884
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
+  Font.Height = -19
   Font.Name = 'Arial'
   Font.Style = []
   Position = poScreenCenter
-  TextHeight = 14
+  PixelsPerInch = 168
+  TextHeight = 22
   object Bevel2: TBevel
-    Left = 280
-    Top = 49
-    Width = 225
-    Height = 209
+    Left = 490
+    Top = 86
+    Width = 394
+    Height = 366
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
   end
   object Bevel1: TBevel
     Left = 0
-    Top = 49
-    Width = 225
-    Height = 209
+    Top = 86
+    Width = 394
+    Height = 366
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
   end
   object PaintBox1: TPaintBox
-    Left = 288
-    Top = 56
-    Width = 209
-    Height = 193
+    Left = 504
+    Top = 98
+    Width = 366
+    Height = 338
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
   end
   object GLSceneViewer1: TGLSceneViewer
-    Left = 8
-    Top = 57
-    Width = 209
-    Height = 193
+    Left = 14
+    Top = 100
+    Width = 366
+    Height = 338
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = GLCamera1
-    FieldOfView = 125.219512939453100000
+    FieldOfView = 147.037460327148400000
     PenAsTouch = False
     TabOrder = 0
   end
   object BUCast: TButton
-    Left = 232
-    Top = 89
-    Width = 41
-    Height = 25
+    Left = 406
+    Top = 156
+    Width = 72
+    Height = 44
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Caption = 'Cast!'
     TabOrder = 1
     OnClick = BUCastClick
@@ -53,50 +78,66 @@ object FormRayCast: TFormRayCast
   object Panel1: TPanel
     Left = 0
     Top = 0
-    Width = 505
-    Height = 49
+    Width = 884
+    Height = 86
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alTop
     BevelOuter = bvNone
     TabOrder = 2
     object Label1: TLabel
       Left = 0
       Top = 0
-      Width = 505
-      Height = 22
+      Width = 884
+      Height = 39
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Align = alTop
       Alignment = taCenter
       AutoSize = False
       Caption = 'RayCasting demo/testbed'
       Font.Charset = DEFAULT_CHARSET
       Font.Color = clWindowText
-      Font.Height = -13
+      Font.Height = -23
       Font.Name = 'Arial'
       Font.Style = [fsBold]
       ParentFont = False
       Layout = tlCenter
     end
     object Label2: TLabel
-      Left = 8
-      Top = 32
-      Width = 100
-      Height = 14
+      Left = 14
+      Top = 56
+      Width = 171
+      Height = 22
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'OpenGL scene view'
       Font.Charset = DEFAULT_CHARSET
       Font.Color = clWindowText
-      Font.Height = -11
+      Font.Height = -19
       Font.Name = 'Arial'
       Font.Style = []
       ParentFont = False
     end
     object Label3: TLabel
-      Left = 288
-      Top = 32
-      Width = 136
-      Height = 14
+      Left = 504
+      Top = 56
+      Width = 233
+      Height = 22
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'RayCasted/RayTraced view'
       Font.Charset = DEFAULT_CHARSET
       Font.Color = clWindowText
-      Font.Height = -11
+      Font.Height = -19
       Font.Name = 'Arial'
       Font.Style = []
       ParentFont = False

+ 47 - 0
Examples/Demos/collisions/TriangleBox/TriangleBoxC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>3</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">TriangleBoxC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>TriangleBoxC</SanitizedProjectName>
         <_TCHARMapping>wchar_t</_TCHARMapping>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -100,6 +120,14 @@
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
         <BT_BuildType>Debug</BT_BuildType>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -132,6 +160,9 @@
         <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
         <LinkPackageImports>rtl.bpi;vcl.bpi;fmx.bpi;xmlrtl.bpi;vclimg.bpi;GLScene_RT.bpi</LinkPackageImports>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -143,6 +174,9 @@
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
         <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="fMainC.cpp">
             <Form>Form1</Form>
@@ -953,6 +987,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1023,6 +1060,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1033,6 +1074,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1246,10 +1291,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">True</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 5 - 0
Examples/Demos/collisions/TriangleBox/TriangleBoxD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">TriangleBoxD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -810,6 +811,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1103,6 +1107,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 1 - 0
Examples/Demos/collisions/boxedin/BoxedinD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">BoxedinD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>

+ 47 - 0
Examples/Demos/collisions/boxedin/boxedinC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">boxedinC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>boxedinC</SanitizedProjectName>
         <ILINK_LibraryPath>D:\GLScene\Samples\CPP\Demos\collisions\boxedin\;$(ILINK_LibraryPath)</ILINK_LibraryPath>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -99,6 +119,14 @@
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -131,6 +159,9 @@
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <Defines>_DEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -142,6 +173,9 @@
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <Defines>NDEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="boxedinC.cpp">
             <BuildOrder>0</BuildOrder>
@@ -957,6 +991,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1027,6 +1064,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1037,6 +1078,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1250,10 +1295,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">False</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 82 - 41
Examples/Demos/collisions/boxedin/fBoxedinD.dfm

@@ -1,27 +1,36 @@
 object FormBoxedin: TFormBoxedin
   Left = 62
   Top = 15
+  Margins.Left = 5
+  Margins.Top = 5
+  Margins.Right = 5
+  Margins.Bottom = 5
   Caption = 'Boxedin'
-  ClientHeight = 423
-  ClientWidth = 568
+  ClientHeight = 740
+  ClientWidth = 994
   Color = clGray
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
+  Font.Height = -19
   Font.Name = 'MS Sans Serif'
   Font.Style = []
   Position = poScreenCenter
   OnCreate = FormCreate
-  TextHeight = 13
+  PixelsPerInch = 168
+  TextHeight = 24
   object GLSceneViewer2: TGLSceneViewer
     Left = 0
-    Top = 65
-    Width = 568
-    Height = 358
+    Top = 114
+    Width = 994
+    Height = 626
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = GLCamera2
     Buffer.BackgroundColor = 8404992
     Buffer.ShadeModel = smFlat
-    FieldOfView = 148.786758422851600000
+    FieldOfView = 161.848007202148400000
     PenAsTouch = False
     Align = alClient
     TabOrder = 0
@@ -29,61 +38,93 @@ object FormBoxedin: TFormBoxedin
   object Panel1: TPanel
     Left = 0
     Top = 0
-    Width = 568
-    Height = 65
+    Width = 994
+    Height = 114
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alTop
     BevelOuter = bvNone
     TabOrder = 1
-    ExplicitWidth = 560
     object Label1: TLabel
-      Left = 282
-      Top = 5
-      Width = 32
-      Height = 13
+      Left = 494
+      Top = 9
+      Width = 56
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Label1'
     end
     object Label2: TLabel
-      Left = 282
-      Top = 24
-      Width = 32
-      Height = 13
+      Left = 494
+      Top = 42
+      Width = 56
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Label2'
     end
     object Label3: TLabel
-      Left = 282
-      Top = 43
-      Width = 32
-      Height = 13
+      Left = 494
+      Top = 75
+      Width = 56
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Label3'
     end
     object Label4: TLabel
-      Left = 160
-      Top = 5
-      Width = 37
-      Height = 13
+      Left = 280
+      Top = 9
+      Width = 66
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Velocity'
     end
     object LabelFPS: TLabel
-      Left = 424
-      Top = 24
-      Width = 20
-      Height = 13
+      Left = 742
+      Top = 42
+      Width = 36
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'FPS'
     end
     object TrackBar1: TTrackBar
-      Left = 89
-      Top = 24
-      Width = 176
-      Height = 25
+      Left = 156
+      Top = 42
+      Width = 308
+      Height = 44
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Max = 50
       Position = 1
       TabOrder = 0
+      ThumbLength = 35
     end
     object Button1: TButton
-      Left = 8
-      Top = 24
-      Width = 75
-      Height = 25
+      Left = 14
+      Top = 42
+      Width = 131
+      Height = 44
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Reset'
       TabOrder = 1
       OnClick = Button1Click
@@ -92,7 +133,7 @@ object FormBoxedin: TFormBoxedin
   object GLScene1: TGLScene
     Left = 48
     Top = 88
-    object GLLightSource1: TGLLightSource
+    object LightSource1: TGLLightSource
       Ambient.Color = {000000001283003F9CC4403F0000803F}
       ConstAttenuation = 1.000000000000000000
       Diffuse.Color = {1283003F1283003F1283003F0000803F}
@@ -144,7 +185,7 @@ object FormBoxedin: TFormBoxedin
       Slices = 24
       Stacks = 24
     end
-    object GLLightSource2: TGLLightSource
+    object LightSource2: TGLLightSource
       Ambient.Color = {000000001283803E1283003F0000803F}
       ConstAttenuation = 1.000000000000000000
       Diffuse.Color = {BEC0403FBEC0403FBEC0403F0000803F}

+ 2 - 2
Examples/Demos/collisions/boxedin/fBoxedinD.pas

@@ -32,7 +32,7 @@ uses
 type
   TFormBoxedin = class(TForm)
     GLScene1: TGLScene;
-    GLLightSource1: TGLLightSource;
+    LightSource1: TGLLightSource;
     DummyCube1: TGLDummyCube;
     FreeForm1: TGLFreeForm;
     Sphere1: TGLSphere;
@@ -43,7 +43,7 @@ type
     Timer1: TTimer;
     DummyCube2: TGLDummyCube;
     Sphere2: TGLSphere;
-    GLLightSource2: TGLLightSource;
+    LightSource2: TGLLightSource;
     Panel1: TPanel;
     Label1: TLabel;
     Label2: TLabel;

+ 5 - 0
Examples/Demos/collisions/facevsface/FacevsFaceD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">FacevsFaceD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -814,6 +815,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1107,6 +1111,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 47 - 0
Examples/Demos/collisions/facevsface/FacevsfaceC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">FacevsfaceC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>FacevsfaceC</SanitizedProjectName>
         <_TCHARMapping>wchar_t</_TCHARMapping>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -99,6 +119,14 @@
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -128,6 +156,9 @@
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <Defines>_DEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -137,6 +168,9 @@
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <Defines>NDEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="FacevsfaceC.cpp">
             <BuildOrder>0</BuildOrder>
@@ -941,6 +975,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1011,6 +1048,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1021,6 +1062,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1234,10 +1279,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">False</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 106 - 66
Examples/Demos/collisions/facevsface/fFacevsFaceD.dfm

@@ -1,38 +1,50 @@
 object FormFacevsFace: TFormFacevsFace
   Left = 322
   Top = 162
+  Margins.Left = 5
+  Margins.Top = 5
+  Margins.Right = 5
+  Margins.Bottom = 5
   BorderWidth = 3
   Caption = 'Face vs Face'
-  ClientHeight = 558
-  ClientWidth = 797
+  ClientHeight = 977
+  ClientWidth = 1409
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
+  Font.Height = -19
   Font.Name = 'MS Sans Serif'
   Font.Style = []
   Position = poScreenCenter
   OnCreate = FormCreate
   OnMouseWheel = FormMouseWheel
   OnShow = FormShow
-  TextHeight = 13
+  PixelsPerInch = 168
+  TextHeight = 24
   object Splitter1: TSplitter
-    Left = 678
+    Left = 1201
     Top = 0
-    Width = 4
-    Height = 406
+    Width = 7
+    Height = 711
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alRight
-    ExplicitLeft = 317
-    ExplicitHeight = 229
+    MinSize = 53
   end
   object GLSceneViewer1: TGLSceneViewer
-    Left = 121
+    Left = 212
     Top = 0
-    Width = 557
-    Height = 406
+    Width = 989
+    Height = 711
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = GLCamera2
     Buffer.BackgroundColor = 8404992
-    FieldOfView = 53.815586090087890000
+    FieldOfView = 83.258186340332030000
     PenAsTouch = False
     Align = alClient
     OnMouseDown = GLSceneViewer1MouseDown
@@ -42,47 +54,71 @@ object FormFacevsFace: TFormFacevsFace
   object Panel1: TPanel
     Left = 0
     Top = 0
-    Width = 121
-    Height = 406
+    Width = 212
+    Height = 711
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alLeft
     BevelOuter = bvLowered
     TabOrder = 1
-    ExplicitHeight = 229
     object Shape1: TShape
-      Left = 88
-      Top = 10
-      Width = 25
-      Height = 25
+      Left = 154
+      Top = 18
+      Width = 44
+      Height = 43
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
+      Pen.Width = 2
       Shape = stCircle
     end
     object Label1: TLabel
-      Left = 8
-      Top = 8
-      Width = 61
-      Height = 13
+      Left = 14
+      Top = 14
+      Width = 109
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Collision test:'
     end
     object LATime: TLabel
-      Left = 8
-      Top = 24
-      Width = 73
-      Height = 13
+      Left = 14
+      Top = 42
+      Width = 128
+      Height = 23
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Alignment = taRightJustify
       AutoSize = False
       Caption = 'LATime'
     end
     object Label2: TLabel
-      Left = 8
-      Top = 96
-      Width = 103
-      Height = 13
+      Left = 14
+      Top = 168
+      Width = 186
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Teapot collision mode'
     end
     object cbCollisionMode: TRadioGroup
-      Left = 8
-      Top = 112
-      Width = 105
-      Height = 105
+      Left = 14
+      Top = 196
+      Width = 184
+      Height = 184
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       ItemIndex = 4
       Items.Strings = (
         'cbmPoint'
@@ -96,55 +132,59 @@ object FormFacevsFace: TFormFacevsFace
   end
   object Panel2: TPanel
     Left = 0
-    Top = 406
-    Width = 797
-    Height = 152
+    Top = 711
+    Width = 1409
+    Height = 266
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alBottom
     TabOrder = 2
-    ExplicitTop = 229
-    ExplicitWidth = 531
     object StringGrid1: TStringGrid
       Left = 1
       Top = 1
-      Width = 795
-      Height = 150
+      Width = 1407
+      Height = 264
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Align = alClient
       ColCount = 6
-      DefaultColWidth = 90
-      DefaultRowHeight = 20
+      DefaultColWidth = 158
+      DefaultRowHeight = 35
       RowCount = 6
       TabOrder = 0
-      ExplicitLeft = 8
-      ExplicitTop = 8
-      ExplicitWidth = 553
-      ExplicitHeight = 137
       ColWidths = (
-        90
-        90
-        90
-        90
-        90
-        90)
+        158
+        158
+        158
+        158
+        158
+        158)
       RowHeights = (
-        20
-        20
-        20
-        20
-        20
-        20)
+        35
+        35
+        35
+        35
+        35
+        35)
     end
   end
   object Memo1: TMemo
-    Left = 682
+    Left = 1208
     Top = 0
-    Width = 115
-    Height = 406
+    Width = 201
+    Height = 711
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alRight
     Lines.Strings = (
       'Memo1')
     TabOrder = 3
-    ExplicitLeft = 416
-    ExplicitHeight = 229
   end
   object GLScene1: TGLScene
     Left = 184

+ 1 - 0
Examples/Demos/collisions/meshhit/MeshHitD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">MeshHitD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>

+ 47 - 0
Examples/Demos/collisions/meshhit/MeshhitC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">MeshhitC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>MeshhitC</SanitizedProjectName>
         <IncludePath>D:\GLScene\Samples\CPP\Demos\collisions\meshhit\;$(IncludePath)</IncludePath>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -99,6 +119,14 @@
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -128,6 +156,9 @@
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <Defines>_DEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -137,6 +168,9 @@
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <Defines>NDEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="fMainC.cpp">
             <Form>Form1</Form>
@@ -947,6 +981,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1017,6 +1054,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1027,6 +1068,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1240,10 +1285,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">False</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 43 - 22
Examples/Demos/collisions/meshhit/fMeshHitD.dfm

@@ -1,53 +1,74 @@
 object FormMeshHit: TFormMeshHit
   Left = 108
   Top = 101
+  Margins.Left = 5
+  Margins.Top = 5
+  Margins.Right = 5
+  Margins.Bottom = 5
   Caption = 'Mesh Hit'
-  ClientHeight = 277
-  ClientWidth = 562
+  ClientHeight = 485
+  ClientWidth = 998
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
+  Font.Height = -19
   Font.Name = 'MS Sans Serif'
   Font.Style = []
   Position = poScreenCenter
   OnCreate = FormCreate
-  TextHeight = 13
+  PixelsPerInch = 168
+  TextHeight = 24
   object Label1: TLabel
-    Left = 8
-    Top = 8
-    Width = 78
-    Height = 13
+    Left = 14
+    Top = 14
+    Width = 141
+    Height = 24
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Caption = 'Orthogonal View'
   end
   object Label2: TLabel
-    Left = 280
-    Top = 8
-    Width = 82
-    Height = 13
+    Left = 490
+    Top = 14
+    Width = 145
+    Height = 24
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Caption = 'Perspective View'
   end
   object GLSceneViewer1: TGLSceneViewer
-    Left = 8
-    Top = 24
-    Width = 265
-    Height = 241
+    Left = 14
+    Top = 42
+    Width = 464
+    Height = 422
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = GLCamera1
     Buffer.BackgroundColor = clGray
-    FieldOfView = 170.512069702148400000
+    FieldOfView = 174.573181152343800000
     PenAsTouch = False
     OnMouseDown = GLSceneViewer1MouseDown
     OnMouseMove = GLSceneViewer1MouseMove
     TabOrder = 0
   end
   object GLSceneViewer2: TGLSceneViewer
-    Left = 285
-    Top = 27
-    Width = 265
-    Height = 241
+    Left = 499
+    Top = 47
+    Width = 464
+    Height = 422
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = GLCamera2
     Buffer.BackgroundColor = clGray
-    FieldOfView = 134.929183959960900000
+    FieldOfView = 153.337402343750000000
     PenAsTouch = False
     OnMouseDown = GLSceneViewer2MouseDown
     OnMouseMove = GLSceneViewer2MouseMove

+ 48 - 0
Examples/Demos/collisions/octree/OctreeC.cbproj

@@ -10,6 +10,7 @@
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
+        <ProjectName Condition="'$(ProjectName)'==''">OctreeC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -24,6 +25,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -41,6 +47,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -58,6 +70,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>OctreeC</SanitizedProjectName>
         <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
@@ -85,6 +103,9 @@
         <FinalOutputDir>.</FinalOutputDir>
         <TASM_AdditionalSwitches> /w2</TASM_AdditionalSwitches>
         <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
+        <Icon_MainIcon>$(BDS)\bin\cbuilder_PROJECTICON.ico</Icon_MainIcon>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -116,6 +137,14 @@
         <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath);$(ILINK_LibraryPath)</ILINK_LibraryPath>
         <DCC_AdditionalSwitches> -M -V</DCC_AdditionalSwitches>
@@ -145,6 +174,9 @@
         <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
         <LinkPackageImports>rtl.bpi;vcl.bpi;fmx.bpi;xmlrtl.bpi;vclimg.bpi;GLScene_RT.bpi</LinkPackageImports>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <BCC_OptimizationLevel>Level2</BCC_OptimizationLevel>
         <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath);$(ILINK_LibraryPath)</ILINK_LibraryPath>
@@ -162,6 +194,9 @@
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
         <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="fMainC.cpp">
             <BuildOrder>2</BuildOrder>
@@ -253,6 +288,7 @@
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">True</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
             <Deployment Version="4">
                 <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx32\libcgcrtl.dylib" Class="DependencyModule">
@@ -991,6 +1027,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1061,6 +1100,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1071,6 +1114,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1284,6 +1331,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 5 - 0
Examples/Demos/collisions/octree/OctreeD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">OctreeD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -813,6 +814,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1106,6 +1110,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 47 - 0
Examples/Demos/collisions/sphere/SphereC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>3</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">SphereC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>SphereC</SanitizedProjectName>
         <_TCHARMapping>wchar_t</_TCHARMapping>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
@@ -100,6 +120,14 @@
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
         <BT_BuildType>Debug</BT_BuildType>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -132,6 +160,9 @@
         <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
         <LinkPackageImports>rtl.bpi;vcl.bpi;fmx.bpi;xmlrtl.bpi;vclimg.bpi;GLScene_RT.bpi</LinkPackageImports>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -143,6 +174,9 @@
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
         <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="fMainC.cpp">
             <Form>Form1</Form>
@@ -953,6 +987,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1023,6 +1060,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1033,6 +1074,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1246,10 +1291,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">True</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 5 - 0
Examples/Demos/collisions/sphere/SphereD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">SphereD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -812,6 +813,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1105,6 +1109,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 86 - 61
Examples/Demos/glslshaders/BumpShader/fBumpShaderD.dfm

@@ -1,54 +1,67 @@
 object FormBumpShader: TFormBumpShader
   Left = 261
   Top = 176
+  Margins.Left = 5
+  Margins.Top = 5
+  Margins.Right = 5
+  Margins.Bottom = 5
   Caption = 'GLSL Bump Shader'
-  ClientHeight = 605
-  ClientWidth = 856
+  ClientHeight = 1059
+  ClientWidth = 1498
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
+  Font.Height = -19
   Font.Name = 'MS Sans Serif'
   Font.Style = []
   Position = poScreenCenter
   OnClose = FormClose
   OnCreate = FormCreate
   OnMouseWheel = FormMouseWheel
-  TextHeight = 13
+  PixelsPerInch = 168
+  TextHeight = 24
   object Viewer: TGLSceneViewer
     Left = 0
     Top = 0
-    Width = 685
-    Height = 605
+    Width = 1199
+    Height = 1059
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = Camera
     Buffer.BackgroundColor = clBackground
     Buffer.ContextOptions = [roDoubleBuffer, roStencilBuffer, roRenderToWindow]
     Buffer.AntiAliasing = aaNone
     Buffer.DepthPrecision = dp24bits
     Buffer.ColorDepth = cd24bits
-    FieldOfView = 155.745819091796900000
+    FieldOfView = 166.003082275390600000
     PenAsTouch = False
     Align = alClient
     OnMouseDown = ViewerMouseDown
     OnMouseMove = ViewerMouseMove
     TabOrder = 0
-    ExplicitWidth = 478
-    ExplicitHeight = 438
   end
   object Panel1: TPanel
-    Left = 685
+    Left = 1199
     Top = 0
-    Width = 171
-    Height = 605
+    Width = 299
+    Height = 1059
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alRight
     TabOrder = 1
-    ExplicitLeft = 475
-    ExplicitHeight = 437
     object LightMovingCheckBox: TCheckBox
-      Left = 8
-      Top = 8
-      Width = 97
-      Height = 17
+      Left = 14
+      Top = 14
+      Width = 170
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Light is Moving'
       Checked = True
       Color = clBtnFace
@@ -57,18 +70,26 @@ object FormBumpShader: TFormBumpShader
       TabOrder = 0
     end
     object RollPitchTurnCheckBox: TCheckBox
-      Left = 8
-      Top = 31
-      Width = 161
-      Height = 17
+      Left = 14
+      Top = 54
+      Width = 282
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Roll / Pitch / Turn Enabled'
       TabOrder = 1
     end
     object ShaderEnabledCheckBox: TCheckBox
-      Left = 8
-      Top = 72
-      Width = 97
-      Height = 17
+      Left = 14
+      Top = 126
+      Width = 170
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Shader Enabled'
       Checked = True
       State = cbChecked
@@ -76,19 +97,27 @@ object FormBumpShader: TFormBumpShader
       OnClick = ShaderEnabledCheckBoxClick
     end
     object MultiLightShaderCheckBox: TCheckBox
-      Left = 8
-      Top = 88
-      Width = 106
-      Height = 17
+      Left = 14
+      Top = 154
+      Width = 186
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'MultiLight Shader'
       TabOrder = 3
       OnClick = MultiLightShaderCheckBoxClick
     end
     object UseSpecularTextureCheckBox: TCheckBox
-      Left = 8
-      Top = 128
-      Width = 121
-      Height = 17
+      Left = 14
+      Top = 224
+      Width = 212
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Use Specular Texture'
       Checked = True
       State = cbChecked
@@ -96,10 +125,14 @@ object FormBumpShader: TFormBumpShader
       OnClick = UseSpecularTextureCheckBoxClick
     end
     object UseNormalTextureCheckBox: TCheckBox
-      Left = 8
-      Top = 144
-      Width = 121
-      Height = 17
+      Left = 14
+      Top = 252
+      Width = 212
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Use Normal Texture'
       Checked = True
       State = cbChecked
@@ -107,10 +140,14 @@ object FormBumpShader: TFormBumpShader
       OnClick = UseNormalTextureCheckBoxClick
     end
     object ShowNotGLSceneObjectsCheckBox: TCheckBox
-      Left = 6
-      Top = 176
-      Width = 131
-      Height = 17
+      Left = 11
+      Top = 308
+      Width = 229
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Show not GLS objects'
       Checked = True
       State = cbChecked
@@ -196,59 +233,47 @@ object FormBumpShader: TFormBumpShader
       ObjectsSorting = osRenderBlendedLast
       ShowAxes = True
       CubeSize = 1.000000000000000000
-      object Sphere_little: TGLActor
+      object actSphere_lit: TGLActor
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Earth'
         Position.Coordinates = {0000000000001643000000000000803F}
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
       end
-      object Sphere_big: TGLActor
+      object actSphere_big: TGLActor
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Earth'
         Position.Coordinates = {00000000000016C3000000000000803F}
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
       end
-      object Teapot: TGLActor
+      object actTeapot: TGLActor
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Earth'
         Position.Coordinates = {000016C300000000000000000000803F}
-        Visible = False
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
       end
-      object Fighter: TGLActor
+      object actFighter: TGLActor
         Position.Coordinates = {00001643000000000000AA420000803F}
         Visible = False
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
         MaterialLibrary = TrinityMatlib
       end
-      object GLCube: TGLCube
+      object Cube: TGLCube
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Earth'
         Visible = False
         CubeSize = {000096420000964200009642}
       end
-      object GLDodecahedron: TGLDodecahedron
+      object Dodecahedron: TGLDodecahedron
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Earth'
         Position.Coordinates = {00001643000016C3000000000000803F}
         Scale.Coordinates = {0000C8420000C8420000C84200000000}
         Visible = False
       end
-      object GLSphere: TGLSphere
-        Material.MaterialLibrary = MaterialLibrary
-        Material.LibMaterialName = 'Earth'
-        Direction.Coordinates = {00000000000080BF0000000000000000}
-        Position.Coordinates = {000016C300001643000000000000803F}
-        Up.Coordinates = {00000000000000000000803F00000000}
-        Visible = False
-        Radius = 50.000000000000000000
-        Slices = 64
-        Stacks = 64
-      end
     end
     object Camera: TGLCamera
       DepthOfView = 500.000000000000000000
@@ -311,7 +336,7 @@ object FormBumpShader: TFormBumpShader
     SpecularPower = 6.000000000000000000
     SpecularSpread = 1.500000000000000000
     LightPower = 1.000000000000000000
-    Left = 56
+    Left = 224
     Top = 16
   end
   object TrinityMatlib: TGLMaterialLibrary

+ 43 - 46
Examples/Demos/glslshaders/BumpShader/fBumpShaderD.pas

@@ -53,10 +53,10 @@ type
     LightMovingCheckBox: TCheckBox;
     GUICube: TGLDummyCube;
     WorldCube: TGLDummyCube;
-    Fighter: TGLActor;
-    Teapot: TGLActor;
-    Sphere_big: TGLActor;
-    Sphere_little: TGLActor;
+    actFighter: TGLActor;
+    actTeapot: TGLActor;
+    actSphere_big: TGLActor;
+    actSphere_lit: TGLActor;
     MaterialLibrary: TGLMaterialLibrary;
     RollPitchTurnCheckBox: TCheckBox;
     ShaderEnabledCheckBox: TCheckBox;
@@ -68,9 +68,8 @@ type
     UseNormalTextureCheckBox: TCheckBox;
     MyBumpShader: TGLSLBumpShader;
     TrinityMatlib: TGLMaterialLibrary;
-    GLCube: TGLCube;
-    GLDodecahedron: TGLDodecahedron;
-    GLSphere: TGLSphere;
+    Cube: TGLCube;
+    Dodecahedron: TGLDodecahedron;
     ShowNotGLSceneObjectsCheckBox: TCheckBox;
     procedure FormCreate(Sender: TObject);
     procedure CadencerProgress(Sender: TObject; const DeltaTime, newTime: Double);
@@ -103,38 +102,38 @@ begin
   //First loading modelexts
   var Path: TFileName := GetCurrentAssetPath();
   SetCurrentDir(Path  + '\modelext');
-  Fighter.LoadFromFile('TRINITYrage.smd'); //Fighter
-  Fighter.AddDataFromFile('walk.smd');
-  Fighter.Animations[1].MakeSkeletalTranslationStatic;
-  Fighter.AddDataFromFile('run.smd');
-  Fighter.Animations[2].MakeSkeletalTranslationStatic;
-  Fighter.AddDataFromFile('long_jump.smd');
-  Fighter.AddDataFromFile('jump.smd');
-  Fighter.AddDataFromFile('look_left_right.smd');
-  Fighter.Animations[5].MakeSkeletalRotationDelta;
-  Fighter.SwitchToAnimation(1);
+  actFighter.LoadFromFile('TRINITYrage.smd'); //Fighter
+  actFighter.AddDataFromFile('walk.smd');
+  actFighter.Animations[1].MakeSkeletalTranslationStatic;
+  actFighter.AddDataFromFile('run.smd');
+  actFighter.Animations[2].MakeSkeletalTranslationStatic;
+  actFighter.AddDataFromFile('long_jump.smd');
+  actFighter.AddDataFromFile('jump.smd');
+  actFighter.AddDataFromFile('look_left_right.smd');
+  actFighter.Animations[5].MakeSkeletalRotationDelta;
+  actFighter.SwitchToAnimation(1);
 (*
   // or use a quake md2 model
-  Fighter.LoadFromFile('waste.md2'); //Fighter
-  Fighter.SwitchToAnimation(0, True);
-  Fighter.AnimationMode := aamLoop;
-  Fighter.Scale.Scale(3);
+  actFighter.LoadFromFile('waste.md2'); //Fighter
+  actFighter.SwitchToAnimation(0, True);
+  actFighter.AnimationMode := aamLoop;
+  actFighter.Scale.Scale(3);
 *)
-  Fighter.AnimationMode := aamLoop;
-  Fighter.Scale.Scale(3);
-//  Fighter.MeshObjects.BuildTangentSpace;
+  actFighter.AnimationMode := aamLoop;
+  actFighter.Scale.Scale(3);
+//  actFighter.MeshObjects.BuildTangentSpace;
 
   // Loading static models
   SetCurrentDir(Path  + '\model');
-  Teapot.LoadFromFile('Teapot.3ds'); //Teapot
-  Teapot.Scale.Scale(0.8);
-  //  Teapot.MeshObjects.BuildTangentSpace; does not have texture coordinates...
-  Sphere_big.LoadFromFile('Sphere_big.3DS'); //Sphere_big
-  Sphere_big.Scale.Scale(70);
-  Sphere_big.MeshObjects.BuildTangentSpace;
-  Sphere_little.LoadFromFile('Sphere.3ds'); //Sphere_little
-  Sphere_little.Scale.Scale(4);
-  Sphere_little.MeshObjects.BuildTangentSpace;
+  actTeapot.LoadFromFile('Teapot.3ds'); //Teapot
+  actTeapot.Scale.Scale(0.8);
+  // actTeapotTeapot.MeshObjects.BuildTangentSpace; does not have texture coordinates...
+  actSphere_big.LoadFromFile('Sphere_big.3DS'); //Sphere_big
+  actSphere_big.Scale.Scale(70);
+  actSphere_big.MeshObjects.BuildTangentSpace;
+  actSphere_lit.LoadFromFile('Sphere.3ds'); //Sphere_little
+  actSphere_lit.Scale.Scale(4);
+  actSphere_lit.MeshObjects.BuildTangentSpace;
 
   // Then load textures
   SetCurrentDir(Path + '\map');
@@ -218,11 +217,10 @@ end;
 procedure TFormBumpShader.ShowNotGLSceneObjectsCheckBoxClick(
   Sender: TObject);
 begin
-  Teapot.Visible := ShowNotGLSceneObjectsCheckBox.Checked;
-  Fighter.Visible := ShowNotGLSceneObjectsCheckBox.Checked;
-  GLCube.Visible := ShowNotGLSceneObjectsCheckBox.Checked;
-  GLDodecahedron.Visible := ShowNotGLSceneObjectsCheckBox.Checked;
-  GLSphere.Visible := ShowNotGLSceneObjectsCheckBox.Checked;
+  actTeapot.Visible := ShowNotGLSceneObjectsCheckBox.Checked;
+  actFighter.Visible := ShowNotGLSceneObjectsCheckBox.Checked;
+  Cube.Visible := ShowNotGLSceneObjectsCheckBox.Checked;
+  Dodecahedron.Visible := ShowNotGLSceneObjectsCheckBox.Checked;
 end;
 
 procedure TFormBumpShader.CadencerProgress(Sender: TObject; const DeltaTime, newTime: Double);
@@ -231,14 +229,13 @@ begin
 
   if RollPitchTurnCheckBox.Checked then
   begin
-    Sphere_big.Turn(DeltaTime * 40);
-    Sphere_big.Roll(DeltaTime * 40);
-    Sphere_little.Pitch(DeltaTime * 20);
-    Fighter.Roll(DeltaTime * 20);
-    Teapot.Roll(-DeltaTime * 10);
-    GLCube.Pitch(-DeltaTime * 10);
-    GLDodecahedron.Pitch(DeltaTime * 10);
-    GLSphere.Roll(-DeltaTime * 10);
+    actSphere_big.Turn(DeltaTime * 40);
+    actSphere_big.Roll(DeltaTime * 40);
+    actSphere_lit.Pitch(DeltaTime * 20);
+    actFighter.Roll(DeltaTime * 20);
+    actTeapot.Roll(-DeltaTime * 10);
+    Cube.Pitch(-DeltaTime * 10);
+    Dodecahedron.Pitch(DeltaTime * 10);
   end;
 end;
 

+ 5 - 0
Examples/Demos/glslshaders/DiffuseShader/DiffuseShaderD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">DiffuseShaderD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -813,6 +814,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1106,6 +1110,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 13 - 13
Examples/Demos/glslshaders/DiffuseShader/fDiffuseShaderD.dfm

@@ -188,7 +188,7 @@ object FormDiffuseShader: TFormDiffuseShader
       object GLSphere1: TGLSphere
         Material.FrontProperties.Diffuse.Color = {E6E5653F8180003DCDCC4C3F0000803F}
         Material.FrontProperties.Emission.Color = {F4F3733FEEED6D3F000000000000803F}
-        Radius = 10.000000000000000000
+        Radius = 1.000000000000000000
       end
     end
     object LightCube2: TGLDummyCube
@@ -200,7 +200,6 @@ object FormDiffuseShader: TFormDiffuseShader
         ConstAttenuation = 1.000000000000000000
         Diffuse.Color = {DCD8583FC6BF3F3FDCD8583F0000803F}
         LightStyle = lsParallel
-        Shining = False
         Specular.Color = {0000803F0000003F0000003F0000803F}
         SpotCutOff = 180.000000000000000000
         SpotDirection.Coordinates = {0000C842000096430000C84200000000}
@@ -238,17 +237,18 @@ object FormDiffuseShader: TFormDiffuseShader
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
       end
-      object Sphere_big: TGLActor
+      object Sphere: TGLActor
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Earth'
-        Position.Coordinates = {00000000000016C3000000000000803F}
+        Position.Coordinates = {0000000000001643000000000000803F}
+        Scale.Coordinates = {CDCCCC3DCDCCCC3DCDCCCC3D00000000}
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
       end
-      object Sphere_little: TGLActor
+      object Sphere_big: TGLActor
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Earth'
-        Position.Coordinates = {0000000000001643000000000000803F}
+        Position.Coordinates = {00000000000016C3000000000000803F}
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
       end
@@ -267,8 +267,8 @@ object FormDiffuseShader: TFormDiffuseShader
     Scene = Scene
     MaxDeltaTime = 0.020000000000000000
     OnProgress = CadencerProgress
-    Left = 24
-    Top = 56
+    Left = 136
+    Top = 14
   end
   object MaterialLibrary: TGLMaterialLibrary
     Materials = <
@@ -293,12 +293,12 @@ object FormDiffuseShader: TFormDiffuseShader
         Material.Texture.TextureMode = tmModulate
         Material.Texture.Disabled = False
       end>
-    Left = 24
-    Top = 88
+    Left = 52
+    Top = 158
   end
   object DiffuseSpecularShader: TGLSLDiffuseSpecularShader
     LightPower = 1.000000000000000000
-    Left = 56
+    Left = 294
     Top = 16
   end
   object GLSimpleNavigation1: TGLSimpleNavigation
@@ -318,7 +318,7 @@ object FormDiffuseShader: TFormDiffuseShader
         ShiftState = [ssRight]
         Action = snaMoveAroundTarget
       end>
-    Left = 56
-    Top = 56
+    Left = 294
+    Top = 112
   end
 end

+ 4 - 4
Examples/Demos/glslshaders/DiffuseShader/fDiffuseShaderD.pas

@@ -55,7 +55,7 @@ type
     Fighter: TGLActor;
     Teapot: TGLActor;
     Sphere_big: TGLActor;
-    Sphere_little: TGLActor;
+    Sphere: TGLActor;
     MaterialLibrary: TGLMaterialLibrary;
     ShaderEnabledCheckBox: TCheckBox;
     TurnPitchrollCheckBox: TCheckBox;
@@ -102,8 +102,8 @@ begin
   Teapot.Scale.Scale(0.8);
   Sphere_big.LoadFromFile('Sphere_big.3DS'); // Sphere_big
   Sphere_big.Scale.Scale(70);
-  Sphere_little.LoadFromFile('Sphere.3ds'); // Sphere_little
-  Sphere_little.Scale.Scale(4);
+  Sphere.LoadFromFile('Sphere.3ds'); // Sphere_little
+  Sphere.Scale.Scale(4);
 
   // Loading textures
   SetCurrentDir(Path + '\map');
@@ -128,7 +128,7 @@ begin
   begin
     Sphere_big.Pitch(40 * deltaTime);
     Fighter.Turn(40 * deltaTime);
-    Sphere_little.Roll(40 * deltaTime);
+    Sphere.Roll(40 * deltaTime);
     Teapot.Roll(-20 * deltaTime);
   end;
 end;

+ 5 - 0
Examples/Demos/glslshaders/LiningShaders/LiningShadersD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">LiningShadersD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -812,6 +813,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1105,6 +1109,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 25 - 24
Examples/Demos/glslshaders/LiningShaders/fLiningShaderD.dfm

@@ -26,7 +26,7 @@ object FormLiningShader: TFormLiningShader
     Margins.Top = 6
     Margins.Right = 6
     Margins.Bottom = 6
-    Camera = GLCamera1
+    Camera = Camera
     Buffer.AntiAliasing = aa4xHQ
     FieldOfView = 159.017044067382800000
     PenAsTouch = False
@@ -34,6 +34,7 @@ object FormLiningShader: TFormLiningShader
     OnMouseDown = GLSceneViewer1MouseDown
     OnMouseMove = GLSceneViewer1MouseMove
     TabOrder = 0
+    ExplicitLeft = -11
   end
   object Panel1: TPanel
     Left = 668
@@ -234,16 +235,16 @@ object FormLiningShader: TFormLiningShader
   end
   object GLScene1: TGLScene
     ObjectsSorting = osRenderFarthestFirst
-    Left = 8
+    Left = 22
     Top = 8
-    object GLLightSource1: TGLLightSource
+    object LightSource: TGLLightSource
       Ambient.Color = {0000803F0000803F0000803F0000803F}
       ConstAttenuation = 1.000000000000000000
       Position.Coordinates = {00002041000000410000E0400000803F}
       Specular.Color = {0000803F0000803F0000803F0000803F}
       SpotCutOff = 180.000000000000000000
     end
-    object Torus1: TGLTorus
+    object Torus: TGLTorus
       Material.MaterialLibrary = GLMaterialLibrary1
       Material.LibMaterialName = 'LibMaterial2'
       Direction.Coordinates = {000000000000803F0000000000000000}
@@ -253,11 +254,11 @@ object FormLiningShader: TFormLiningShader
       StopAngle = 360.000000000000000000
       Parts = [toSides, toStartDisk, toStopDisk]
     end
-    object Sphere1: TGLSphere
+    object Sphere: TGLSphere
       ShowAxes = True
       Radius = 0.500000000000000000
     end
-    object GLAnnulusOutlined: TGLAnnulus
+    object AnnulusOutlined: TGLAnnulus
       Material.MaterialLibrary = GLMaterialLibrary1
       Material.LibMaterialName = 'LibMaterial'
       Position.Coordinates = {0000E04000000000000000000000803F}
@@ -268,7 +269,7 @@ object FormLiningShader: TFormLiningShader
       TopInnerRadius = 0.300000011920929000
       TopRadius = 0.500000000000000000
     end
-    object GLAnnulusPink: TGLAnnulus
+    object AnnulusPink: TGLAnnulus
       Material.MaterialLibrary = GLMaterialLibrary1
       Material.LibMaterialName = 'LibMaterial4'
       Position.Coordinates = {0000E0C000000000000000000000803F}
@@ -279,7 +280,7 @@ object FormLiningShader: TFormLiningShader
       TopInnerRadius = 0.300000011920929000
       TopRadius = 0.500000000000000000
     end
-    object GLAnnulusDotted: TGLAnnulus
+    object AnnulusDotted: TGLAnnulus
       Material.MaterialLibrary = GLMaterialLibrary1
       Material.LibMaterialName = 'LibMaterial1'
       Position.Coordinates = {00000000000000000000E0C00000803F}
@@ -290,22 +291,22 @@ object FormLiningShader: TFormLiningShader
       TopInnerRadius = 0.300000011920929000
       TopRadius = 0.500000000000000000
     end
-    object GLCubeGreen: TGLCube
+    object CubeGreen: TGLCube
       Material.MaterialLibrary = GLMaterialLibrary1
       Material.LibMaterialName = 'LibMaterial5'
       Position.Coordinates = {00000000000000000000E0400000803F}
       Scale.Coordinates = {00000040000000400000004000000000}
     end
-    object GLCubeTransparent: TGLCube
+    object CubeTransparent: TGLCube
       Material.MaterialLibrary = GLMaterialLibrary1
       Material.LibMaterialName = 'LibMaterial3'
       Position.Coordinates = {0000000000008040000000000000803F}
       CubeSize = {000040400000404000004040}
     end
-    object GLCamera1: TGLCamera
+    object Camera: TGLCamera
       DepthOfView = 100.000000000000000000
       FocalLength = 50.000000000000000000
-      TargetObject = Torus1
+      TargetObject = Torus
       Position.Coordinates = {00006041000020410000C0400000803F}
     end
   end
@@ -351,15 +352,15 @@ object FormLiningShader: TFormLiningShader
         Material.BlendingMode = bmTransparency
         Shader = GLHiddenLineShader5
       end>
-    Left = 8
-    Top = 40
+    Left = 22
+    Top = 124
   end
   object GLOutlineShader1: TGLOutlineShader
     LineColor.Color = {0000803F00000000000000000000803F}
     LineSmooth = True
     LineWidth = 4.000000000000000000
-    Left = 8
-    Top = 72
+    Left = 106
+    Top = 380
   end
   object GLHiddenLineShader1: TGLHiddenLineShader
     FrontLine.Width = 1.000000000000000000
@@ -368,7 +369,7 @@ object FormLiningShader: TFormLiningShader
     BackLine.Width = 2.000000000000000000
     LineSmooth = True
     Solid = True
-    Left = 40
+    Left = 446
     Top = 8
   end
   object GLHiddenLineShader2: TGLHiddenLineShader
@@ -378,8 +379,8 @@ object FormLiningShader: TFormLiningShader
     BackLine.Pattern = 65280
     LineSmooth = True
     SurfaceLit = False
-    Left = 40
-    Top = 40
+    Left = 124
+    Top = 65534
   end
   object GLHiddenLineShader3: TGLHiddenLineShader
     FrontLine.Width = 5.000000000000000000
@@ -387,8 +388,8 @@ object FormLiningShader: TFormLiningShader
     BackLine.Width = 5.000000000000000000
     BackLine.Color.Color = {0000003F0000003F0000003F9A99993E}
     LineSmooth = True
-    Left = 40
-    Top = 72
+    Left = 586
+    Top = 16
   end
   object GLHiddenLineShader4: TGLHiddenLineShader
     FrontLine.Width = 2.000000000000000000
@@ -396,7 +397,7 @@ object FormLiningShader: TFormLiningShader
     BackLine.Width = 1.000000000000000000
     BackLine.Color.Color = {E4DB5B3FEBE0E03E9A93133F0000803F}
     LineSmooth = True
-    Left = 72
+    Left = 226
     Top = 8
   end
   object GLHiddenLineShader5: TGLHiddenLineShader
@@ -409,7 +410,7 @@ object FormLiningShader: TFormLiningShader
     Solid = True
     BackgroundColor.Color = {938C0C3E938E0E3F938C0C3E3333333F}
     SurfaceLit = False
-    Left = 72
-    Top = 40
+    Left = 310
+    Top = 12
   end
 end

+ 11 - 11
Examples/Demos/glslshaders/LiningShaders/fLiningShaderD.pas

@@ -27,15 +27,15 @@ type
   TFormLiningShader = class(TForm)
     GLScene1: TGLScene;
     GLSceneViewer1: TGLSceneViewer;
-    GLCamera1: TGLCamera;
-    GLLightSource1: TGLLightSource;
-    Torus1: TGLTorus;
-    Sphere1: TGLSphere;
+    Camera: TGLCamera;
+    LightSource: TGLLightSource;
+    Torus: TGLTorus;
+    Sphere: TGLSphere;
     GLMaterialLibrary1: TGLMaterialLibrary;
-    GLAnnulusOutlined: TGLAnnulus;
-    GLAnnulusPink: TGLAnnulus;
-    GLCubeGreen: TGLCube;
-    GLCubeTransparent: TGLCube;
+    AnnulusOutlined: TGLAnnulus;
+    AnnulusPink: TGLAnnulus;
+    CubeGreen: TGLCube;
+    CubeTransparent: TGLCube;
     GLOutlineShader1: TGLOutlineShader;
     GLHiddenLineShader1: TGLHiddenLineShader;
     GLHiddenLineShader2: TGLHiddenLineShader;
@@ -51,7 +51,7 @@ type
     Label2: TLabel;
     Label3: TLabel;
     GLHiddenLineShader5: TGLHiddenLineShader;
-    GLAnnulusDotted: TGLAnnulus;
+    AnnulusDotted: TGLAnnulus;
     Bevel1: TBevel;
     Panel2: TPanel;
     CheckBox5: TCheckBox;
@@ -132,9 +132,9 @@ procedure TFormLiningShader.GLSceneViewer1MouseMove(Sender: TObject; Shift: TShi
   X, Y: Integer);
 begin
   if Shift = [ssLeft] then
-    GLCamera1.MoveAroundTarget(my - Y, mx - X)
+    Camera.MoveAroundTarget(my - Y, mx - X)
   else if Shift = [ssRight] then
-    GLCamera1.RotateTarget(my - Y, mx - X);
+    Camera.RotateTarget(my - Y, mx - X);
   mx := X;
   my := Y;
 end;

+ 25 - 0
Examples/Demos/glslshaders/Mandelbrot/MandelbrotD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">MandelbrotD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -118,6 +119,8 @@
         <DCCReference Include="fMandelbrotD.pas">
             <Form>Form1</Form>
         </DCCReference>
+        <None Include="..\..\..\..\Assets\Shader\Mandelbrot.frag"/>
+        <None Include="..\..\..\..\Assets\Shader\Mandelbrot.vert"/>
         <BuildConfiguration Include="Base">
             <Key>Base</Key>
         </BuildConfiguration>
@@ -151,7 +154,25 @@
                 <Platform value="Win64">True</Platform>
             </Platforms>
             <Deployment Version="4">
+                <DeployFile LocalName="..\..\..\..\Assets\Shader\Mandelbrot.frag" Configuration="Debug" Class="ProjectFile">
+                    <Platform Name="Win32">
+                        <RemoteDir>.\</RemoteDir>
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
+                <DeployFile LocalName="..\..\..\..\Assets\Shader\Mandelbrot.vert" Configuration="Debug" Class="ProjectFile">
+                    <Platform Name="Win32">
+                        <RemoteDir>.\</RemoteDir>
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
                 <DeployFile LocalName="MandelbrotD.exe" Configuration="Debug" Class="ProjectOutput"/>
+                <DeployFile LocalName="MandelbrotD.exe" Configuration="Debug" Class="ProjectOutput">
+                    <Platform Name="Win32">
+                        <RemoteName>MandelbrotD.exe</RemoteName>
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
                 <DeployFile LocalName="Shaders\Mandelbrot.frag" Configuration="Debug" Class="ProjectFile"/>
                 <DeployFile LocalName="Shaders\Mandelbrot.vert" Configuration="Debug" Class="ProjectFile"/>
                 <DeployFile LocalName="\MandelbrotD.exe" Configuration="Debug" Class="ProjectOutput"/>
@@ -809,6 +830,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1102,6 +1126,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 5 - 0
Examples/Demos/glslshaders/Ocean/OceanD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">OceanD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -814,6 +815,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1107,6 +1111,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 5 - 0
Examples/Demos/glslshaders/PostShader/PostShaderD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">PostShaderD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -831,6 +832,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1124,6 +1128,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 4 - 4
Examples/Demos/glslshaders/PostShader/fPostShaderD.dfm

@@ -859,7 +859,7 @@ object FormPostShader: TFormPostShader
     end
     object WorldCube: TGLDummyCube
       CubeSize = 1.000000000000000000
-      object Fighter: TGLActor
+      object actFighter: TGLActor
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Fighter'
         Position.Coordinates = {00001643000000000000A0410000803F}
@@ -867,21 +867,21 @@ object FormPostShader: TFormPostShader
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
       end
-      object Teapot: TGLActor
+      object actTeapot: TGLActor
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Fighter'
         Position.Coordinates = {000016C300000000000000000000803F}
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
       end
-      object Sphere_big: TGLActor
+      object actSphere_big: TGLActor
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Earth'
         Position.Coordinates = {00000000000016C3000000000000803F}
         Interval = 100
         AutoCentering = [macCenterX, macCenterY, macCenterZ]
       end
-      object Sphere_little: TGLActor
+      object actSphere_lit: TGLActor
         Material.MaterialLibrary = MaterialLibrary
         Material.LibMaterialName = 'Earth'
         Position.Coordinates = {0000000000001643000000000000803F}

+ 19 - 19
Examples/Demos/glslshaders/PostShader/fPostShaderD.pas

@@ -53,10 +53,10 @@ type
     LightMovingCheckBox: TCheckBox;
     GUICube: TGLDummyCube;
     WorldCube: TGLDummyCube;
-    Fighter: TGLActor;
-    Teapot: TGLActor;
-    Sphere_big: TGLActor;
-    Sphere_little: TGLActor;
+    actFighter: TGLActor;
+    actTeapot: TGLActor;
+    actSphere_big: TGLActor;
+    actSphere_lit: TGLActor;
     MaterialLibrary: TGLMaterialLibrary;
     TurnPitchrollCheckBox: TCheckBox;
     Panel2: TPanel;
@@ -156,22 +156,22 @@ begin
   // First load animated models with textures
   var Path: TFileName := GetCurrentAssetPath();
   SetCurrentDir(Path  + '\modelext');
-  Fighter.LoadFromFile('waste.md2'); // Fighter
-  Fighter.SwitchToAnimation(0, True);
-  Fighter.AnimationMode := aamLoop;
-  Fighter.Scale.Scale(2);
+  actFighter.LoadFromFile('waste.md2'); // Fighter
+  actFighter.SwitchToAnimation(0, True);
+  actFighter.AnimationMode := aamLoop;
+  actFighter.Scale.Scale(2);
   MaterialLibrary.LibMaterialByName('Fighter').Material.Texture.Image.LoadFromFile('Waste.jpg');
 
   // Loading static models
   SetCurrentDir(Path  + '\model');
-  Teapot.LoadFromFile('Teapot.3ds'); // Teapot (no texture coordinates)
-  Teapot.Scale.Scale(0.8);
+  actTeapot.LoadFromFile('Teapot.3ds'); // Teapot (no texture coordinates)
+  actTeapot.Scale.Scale(0.8);
 
-  Sphere_big.LoadFromFile('Sphere_big.3DS');
-  Sphere_big.Scale.Scale(70);
+  actSphere_big.LoadFromFile('Sphere_big.3DS');
+  actSphere_big.Scale.Scale(70);
 
-  Sphere_little.LoadFromFile('Sphere.3ds');
-  Sphere_little.Scale.Scale(4);
+  actSphere_lit.LoadFromFile('Sphere.3ds');
+  actSphere_lit.Scale.Scale(4);
 
   SetCurrentDir(Path  + '\map');
   MaterialLibrary.LibMaterialByName('Earth').Material.Texture.Image.LoadFromFile('earth.jpg');
@@ -264,11 +264,11 @@ begin
   Viewer.Invalidate;
   if TurnPitchrollCheckBox.Checked then
   begin
-    Fighter.Roll(20 * deltaTime);
-    Sphere_big.Pitch(40 * deltaTime);
-    Sphere_big.Turn(40 * deltaTime);
-    Sphere_little.Roll(40 * deltaTime);
-    Teapot.Roll(-20 * deltaTime);
+    actFighter.Roll(20 * deltaTime);
+    actSphere_big.Pitch(40 * deltaTime);
+    actSphere_big.Turn(40 * deltaTime);
+    actSphere_lit.Roll(40 * deltaTime);
+    actTeapot.Roll(-20 * deltaTime);
   end;
   if NightVisionShader.Enabled then
     NightVisionShader.ElapsedTime := newTime; // 20*deltaTime;

+ 5 - 0
Examples/Demos/glslshaders/ShadersLab/ShadersLabD.dproj

@@ -9,6 +9,7 @@
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
+        <ProjectName Condition="'$(ProjectName)'==''">ShadersLabD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -818,6 +819,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1111,6 +1115,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1063 - 501
Examples/Demos/glslshaders/ShadersLab/fShaderLabD.dfm


+ 49 - 46
Examples/Demos/glslshaders/ShadersLab/fShaderLabD.pas

@@ -62,14 +62,14 @@ type
     Cadencer: TGLCadencer;
     World: TGLDummyCube;
     Camera: TGLCamera;
-    GLLightSource1: TGLLightSource;
-    GLSphere1: TGLSphere;
-    PageControl1: TPageControl;
+    LightSource1: TGLLightSource;
+    Sphere: TGLSphere;
+    PageControl: TPageControl;
     TabSheet1: TTabSheet;
     chkAnimScene: TCheckBox;
     chkLightmoving: TCheckBox;
     chkFurShader: TCheckBox;
-    LightCube: TGLDummyCube;
+    LightCube1: TGLDummyCube;
     lblFurDistance: TLabel;
     tbFurLength: TTrackBar;
     TabSheet2: TTabSheet;
@@ -87,7 +87,7 @@ type
     TabSheet4: TTabSheet;
     chkIvoryShader: TCheckBox;
     LightCube2: TGLDummyCube;
-    GLLightSource2: TGLLightSource;
+    LightSource2: TGLLightSource;
     Label10: TLabel;
     Label11: TLabel;
     cbxFurBlendSrc: TComboBox;
@@ -101,7 +101,7 @@ type
     tbLatticeLightPower: TTrackBar;
     TabSheet5: TTabSheet;
     chkGoochShader: TCheckBox;
-    GLTorus1: TGLTorus;
+    Torus: TGLTorus;
     lblFurLength: TLabel;
     Label7: TLabel;
     tbFurMaxLength: TTrackBar;
@@ -308,7 +308,7 @@ type
     procedure FormDestroy(Sender: TObject);
     procedure chkFurShaderClick(Sender: TObject);
     procedure CadencerProgress(Sender: TObject; const deltaTime, newTime: Double);
-    procedure LightCubeProgress(Sender: TObject; const deltaTime, newTime: Double);
+    procedure LightCube1Progress(Sender: TObject; const deltaTime, newTime: Double);
     procedure tbFurLengthChange(Sender: TObject);
     procedure tbLatticeScaleXChange(Sender: TObject);
     procedure chkLatticeShaderClick(Sender: TObject);
@@ -502,12 +502,12 @@ begin
 
   FreeForm.Material.MaterialLibrary := MaterialLibrary;
   FreeForm.Material.LibMaterialName := 'ShaderMaterial';
-  GLTorus1.Material.MaterialLibrary := MaterialLibrary;
-  GLTorus1.Material.LibMaterialName := 'ShaderMaterial';
-  GLTorus1.Visible := False;
-  GLSphere1.Material.MaterialLibrary := MaterialLibrary;
-  GLSphere1.Material.LibMaterialName := 'ShaderMaterial';
-  GLSphere1.Visible := False;
+  Torus.Material.MaterialLibrary := MaterialLibrary;
+  Torus.Material.LibMaterialName := 'ShaderMaterial';
+  Torus.Visible := False;
+  Sphere.Material.MaterialLibrary := MaterialLibrary;
+  Sphere.Material.LibMaterialName := 'ShaderMaterial';
+  Sphere.Visible := False;
 
   MaterialLibrary.LibMaterialByName('MainTexture').Material.Texture.Image.LoadFromFile
     ('bigtiger.jpg');
@@ -589,19 +589,6 @@ begin
   v := 0.0;
 end;
 
-procedure TFormShaderLab.FormDestroy(Sender: TObject);
-begin
-  Cadencer.Enabled := False;
-  FurShader.Free;
-  LatticeShader.Free;
-  IvoryShader.Free;
-  GoochShader.Free;
-  ErosionShader.Free;
-  SEMShader.Free;
-  VertexDisplacementShader.Free;
-  GlassShader.Free;
-end;
-
 procedure TFormShaderLab.FormResize(Sender: TObject);
 begin
   ScreenBackGround.Width := Viewer.Width;
@@ -792,8 +779,8 @@ begin
   case cbxObjects.ItemIndex of
     0:
       begin
-        GLSphere1.Visible := False;
-        GLTorus1.Visible := False;
+        Sphere.Visible := False;
+        Torus.Visible := False;
         FreeForm.LoadFromFile('suzanne-blender.obj');
         GlassShader.OwnerObject := FreeForm;
         FreeForm.Visible := true;
@@ -801,57 +788,57 @@ begin
       end;
     1:
       begin
-        GLSphere1.Visible := False;
-        GLTorus1.Visible := False;
+        Sphere.Visible := False;
+        Torus.Visible := False;
         FreeForm.LoadFromFile('torus-knot2.obj');
         GlassShader.OwnerObject := FreeForm;
         FreeForm.Visible := true;
       end;
     2:
       begin
-        GLSphere1.Visible := False;
-        GLTorus1.Visible := False;
+        Sphere.Visible := False;
+        Torus.Visible := False;
         FreeForm.LoadFromFile('pyramid.obj');
         GlassShader.OwnerObject := FreeForm;
         FreeForm.Visible := true;
       end;
     3:
       begin
-        GLSphere1.Visible := False;
-        GLTorus1.Visible := False;
+        Sphere.Visible := False;
+        Torus.Visible := False;
         FreeForm.LoadFromFile('rectangle_spiral.obj');
         GlassShader.OwnerObject := FreeForm;
         FreeForm.Visible := true;
       end;
     4:
       begin
-        GLSphere1.Visible := False;
-        GLTorus1.Visible := False;
+        Sphere.Visible := False;
+        Torus.Visible := False;
         FreeForm.LoadFromFile('geode.obj');
         GlassShader.OwnerObject := FreeForm;
         FreeForm.Visible := true;
       end;
     5:
       begin
-        GLSphere1.Visible := False;
-        GLTorus1.Visible := False;
+        Sphere.Visible := False;
+        Torus.Visible := False;
         FreeForm.LoadFromFile('syamil_19.obj');
         GlassShader.OwnerObject := FreeForm;
         FreeForm.Visible := true;
       end;
     6:
       begin
-        GLSphere1.Visible := False;
+        Sphere.Visible := False;
         FreeForm.Visible := False;
-        GLTorus1.Visible := true;
-        GlassShader.OwnerObject := GLTorus1;
+        Torus.Visible := true;
+        GlassShader.OwnerObject := Torus;
       end;
     7:
       begin
-        GLTorus1.Visible := False;
+        Torus.Visible := False;
         FreeForm.Visible := False;
-        GLSphere1.Visible := true;
-        GlassShader.OwnerObject := GLSphere1;
+        Sphere.Visible := true;
+        GlassShader.OwnerObject := Sphere;
 
       end;
   end;
@@ -1013,10 +1000,10 @@ begin
     LightCube2.MoveObjectAround(Camera.TargetObject, sin(newTime) * deltaTime * 20, deltaTime * 10);
 end;
 
-procedure TFormShaderLab.LightCubeProgress(Sender: TObject; const deltaTime, newTime: Double);
+procedure TFormShaderLab.LightCube1Progress(Sender: TObject; const deltaTime, newTime: Double);
 begin
   if chkLightmoving.Checked then
-    LightCube.MoveObjectAround(Camera.TargetObject, sin(newTime) * deltaTime * 10, deltaTime * 20);
+    LightCube1.MoveObjectAround(Camera.TargetObject, sin(newTime) * deltaTime * 10, deltaTime * 20);
 end;
 
 procedure TFormShaderLab.Shape10MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState;
@@ -1219,6 +1206,9 @@ begin
   end;
 end;
 
+//========================================================================
+//
+//========================================================================
 procedure TFormShaderLab.tbErosionAmbientFChange(Sender: TObject);
 begin
   ErosionShader.AmbientFactor := tbErosionAmbientF.Position / 100;
@@ -1489,4 +1479,17 @@ begin
   lblVDTurb.Caption := FloatToStrF(VertexDisplacementShader.TurbulenceFactor, ffFixed, 5, 3);
 end;
 
+procedure TFormShaderLab.FormDestroy(Sender: TObject);
+begin
+  Cadencer.Enabled := False;
+  FurShader.Free;
+  LatticeShader.Free;
+  IvoryShader.Free;
+  GoochShader.Free;
+  ErosionShader.Free;
+  SEMShader.Free;
+  VertexDisplacementShader.Free;
+  GlassShader.Free;
+end;
+
 end.

+ 0 - 7
Examples/Demos/glslshaders/Shadertoy/ShadertoyD.dproj

@@ -94,7 +94,6 @@
         <DCCReference Include="fShadertoyD.pas">
             <Form>FormEiffie</Form>
         </DCCReference>
-        <None Include="..\..\..\..\Assets\Shader\eiffie_too-early.fp"/>
         <BuildConfiguration Include="Base">
             <Key>Base</Key>
         </BuildConfiguration>
@@ -128,12 +127,6 @@
                 <Platform value="Win64">False</Platform>
             </Platforms>
             <Deployment Version="4">
-                <DeployFile LocalName="..\..\..\..\Assets\Shader\eiffie_too-early.fp" Configuration="Debug" Class="ProjectFile">
-                    <Platform Name="Win32">
-                        <RemoteDir>.\</RemoteDir>
-                        <Overwrite>true</Overwrite>
-                    </Platform>
-                </DeployFile>
                 <DeployFile LocalName="ShadertoyD.exe" Configuration="Debug" Class="ProjectOutput"/>
                 <DeployFile LocalName="ShadertoyD.exe" Configuration="Debug" Class="ProjectOutput">
                     <Platform Name="Win32">

+ 5 - 0
Examples/Demos/glslshaders/SkyboxShader/SkyboxShaderD.dproj

@@ -9,6 +9,7 @@
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>20.1</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <ProjectName Condition="'$(ProjectName)'==''">SkyboxShaderD</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -791,6 +792,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1084,6 +1088,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 71 - 34
Examples/Demos/sprites/imposter/fImposterD.dfm

@@ -1,65 +1,94 @@
 object FormImposter: TFormImposter
   Left = 110
   Top = 65
+  Margins.Left = 5
+  Margins.Top = 5
+  Margins.Right = 5
+  Margins.Bottom = 5
   Caption = 'Imposter'
-  ClientHeight = 333
-  ClientWidth = 537
+  ClientHeight = 583
+  ClientWidth = 954
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
+  Font.Height = -19
   Font.Name = 'MS Sans Serif'
   Font.Style = []
   Position = poScreenCenter
   OnCreate = FormCreate
-  TextHeight = 13
+  PixelsPerInch = 168
+  TextHeight = 24
   object GLSceneViewer1: TGLSceneViewer
     Left = 0
     Top = 0
-    Width = 390
-    Height = 333
+    Width = 697
+    Height = 583
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Camera = GLCamera1
     Buffer.ContextOptions = [roDoubleBuffer, roRenderToWindow, roDestinationAlpha]
-    FieldOfView = 134.394241333007800000
+    FieldOfView = 152.993667602539100000
     PenAsTouch = False
     Align = alClient
     OnMouseMove = GLSceneViewer1MouseMove
     TabOrder = 0
   end
   object Panel1: TPanel
-    Left = 390
+    Left = 697
     Top = 0
-    Width = 147
-    Height = 333
+    Width = 257
+    Height = 583
+    Margins.Left = 5
+    Margins.Top = 5
+    Margins.Right = 5
+    Margins.Bottom = 5
     Align = alRight
     BevelOuter = bvLowered
     TabOrder = 1
     object LabelTexSize: TLabel
-      Left = 8
-      Top = 8
-      Width = 38
-      Height = 13
+      Left = 14
+      Top = 14
+      Width = 69
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'TexSize'
     end
     object Label2: TLabel
-      Left = 8
-      Top = 80
-      Width = 58
-      Height = 13
+      Left = 14
+      Top = 140
+      Width = 105
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Sample Size'
     end
     object LabelFPS: TLabel
-      Left = 6
-      Top = 120
-      Width = 20
-      Height = 13
+      Left = 11
+      Top = 210
+      Width = 36
+      Height = 24
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'FPS'
     end
     object CBShowTeapot: TCheckBox
-      Left = 8
-      Top = 32
-      Width = 97
-      Height = 17
+      Left = 14
+      Top = 56
+      Width = 170
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Show Teapot'
       Checked = True
       State = cbChecked
@@ -67,10 +96,14 @@ object FormImposter: TFormImposter
       OnClick = CBShowTeapotClick
     end
     object CBShowImposter: TCheckBox
-      Left = 8
-      Top = 52
-      Width = 97
-      Height = 17
+      Left = 14
+      Top = 91
+      Width = 170
+      Height = 30
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Caption = 'Show Imposters'
       Checked = True
       State = cbChecked
@@ -78,10 +111,14 @@ object FormImposter: TFormImposter
       OnClick = CBShowImposterClick
     end
     object CBSampleSize: TComboBox
-      Left = 72
-      Top = 76
-      Width = 49
-      Height = 21
+      Left = 126
+      Top = 133
+      Width = 86
+      Height = 32
+      Margins.Left = 5
+      Margins.Top = 5
+      Margins.Right = 5
+      Margins.Bottom = 5
       Style = csDropDownList
       ItemIndex = 3
       TabOrder = 2

+ 0 - 13
Examples/Demos/utilities/Language/Deutsch.ini

@@ -1,13 +0,0 @@
-[Text]
-mOption=Option
-mLanguage=Sprache
-mEnglish=Englisch
-mRussian=Russisch
-mDeutsch=Deutsch
-mHelp=?
-Form1Caption=Deutsch Sprache Applikation
-GroupBox1=GroupBox
-Button=Taste
-label=etikett
-Panel1=Gremium
-AboutScene=GLScene ist ein OpenGL-basierte 3D-Bibliothek fur Delphi/C++Builder

+ 0 - 13
Examples/Demos/utilities/Language/English.ini

@@ -1,13 +0,0 @@
-[Text]
-mOption=Option
-mLanguage=Language
-mEnglish=English
-mRussian=Ðóññêèé
-mDeutsch=Deutsch
-mHelp=Help
-Form1Caption=English Language Application
-GroupBox1=GroupBox
-Button=Button
-label=label
-Panel1=Panel
-AboutScene=GLScene is an OpenGL based 3D library for Delphi & C++Builder

+ 0 - 13
Examples/Demos/utilities/Language/LanguageD.dpr

@@ -1,13 +0,0 @@
-program LanguageD;
-
-uses
-  Forms,
-  fLanguageD in 'fLanguageD.pas' {Form1};
-
-{$R *.res}
-
-begin
-  Application.Initialize;
-  Application.CreateForm(TForm1, Form1);
-  Application.Run;
-end.

+ 0 - 1115
Examples/Demos/utilities/Language/LanguageD.dproj

@@ -1,1115 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-    <PropertyGroup>
-        <ProjectGuid>{B1CAE1CD-CB39-4DA8-81A3-F9CA0AD42A69}</ProjectGuid>
-        <MainSource>LanguageD.dpr</MainSource>
-        <Base>True</Base>
-        <Config Condition="'$(Config)'==''">Debug</Config>
-        <TargetedPlatforms>3</TargetedPlatforms>
-        <AppType>Application</AppType>
-        <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>20.1</ProjectVersion>
-        <Platform Condition="'$(Platform)'==''">Win32</Platform>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
-        <Base_Win32>true</Base_Win32>
-        <CfgParent>Base</CfgParent>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
-        <Base_Win64>true</Base_Win64>
-        <CfgParent>Base</CfgParent>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
-        <Cfg_1>true</Cfg_1>
-        <CfgParent>Base</CfgParent>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
-        <Cfg_1_Win64>true</Cfg_1_Win64>
-        <CfgParent>Cfg_1</CfgParent>
-        <Cfg_1>true</Cfg_1>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
-        <Cfg_2>true</Cfg_2>
-        <CfgParent>Base</CfgParent>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
-        <Cfg_2_Win32>true</Cfg_2_Win32>
-        <CfgParent>Cfg_2</CfgParent>
-        <Cfg_2>true</Cfg_2>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
-        <Cfg_2_Win64>true</Cfg_2_Win64>
-        <CfgParent>Cfg_2</CfgParent>
-        <Cfg_2>true</Cfg_2>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Base)'!=''">
-        <DCC_N>false</DCC_N>
-        <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=</VerInfo_Keys>
-        <VerInfo_Locale>1049</VerInfo_Locale>
-        <DCC_E>false</DCC_E>
-        <DCC_S>false</DCC_S>
-        <DCC_ImageBase>00400000</DCC_ImageBase>
-        <DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
-        <DCC_F>false</DCC_F>
-        <SanitizedProjectName>LanguageD</SanitizedProjectName>
-        <DCC_K>false</DCC_K>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Base_Win32)'!=''">
-        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
-        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
-        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
-        <VerInfo_Locale>1033</VerInfo_Locale>
-        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
-        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
-        <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
-        <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Base_Win64)'!=''">
-        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
-        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
-        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
-        <VerInfo_Locale>1033</VerInfo_Locale>
-        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
-        <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
-        <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_1)'!=''">
-        <DCC_DebugInformation>0</DCC_DebugInformation>
-        <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
-        <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
-        <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
-        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
-        <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_2)'!=''">
-        <DCC_Optimize>false</DCC_Optimize>
-        <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-        <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
-        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
-        <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
-        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
-        <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
-        <VerInfo_Locale>1033</VerInfo_Locale>
-        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
-        <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
-        <BT_BuildType>Debug</BT_BuildType>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
-        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
-        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
-        <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
-        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
-        <VerInfo_Locale>1033</VerInfo_Locale>
-        <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
-        <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
-        <BT_BuildType>Debug</BT_BuildType>
-        <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
-    </PropertyGroup>
-    <ItemGroup>
-        <DelphiCompile Include="$(MainSource)">
-            <MainSource>MainSource</MainSource>
-        </DelphiCompile>
-        <DCCReference Include="fLanguageD.pas">
-            <Form>Form1</Form>
-        </DCCReference>
-        <BuildConfiguration Include="Base">
-            <Key>Base</Key>
-        </BuildConfiguration>
-        <BuildConfiguration Include="Release">
-            <Key>Cfg_1</Key>
-            <CfgParent>Base</CfgParent>
-        </BuildConfiguration>
-        <BuildConfiguration Include="Debug">
-            <Key>Cfg_2</Key>
-            <CfgParent>Base</CfgParent>
-        </BuildConfiguration>
-    </ItemGroup>
-    <ProjectExtensions>
-        <Borland.Personality>Delphi.Personality.12</Borland.Personality>
-        <Borland.ProjectType/>
-        <BorlandProject>
-            <Delphi.Personality>
-                <Source>
-                    <Source Name="MainSource">LanguageD.dpr</Source>
-                </Source>
-                <Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k280.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp280.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k280.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp280.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
-                </Excluded_Packages>
-            </Delphi.Personality>
-            <Platforms>
-                <Platform value="Win32">True</Platform>
-                <Platform value="Win64">True</Platform>
-            </Platforms>
-            <Deployment Version="4">
-                <DeployFile LocalName="Win32\Debug\LanguageD.exe" Configuration="Debug" Class="ProjectOutput"/>
-                <DeployClass Name="AdditionalDebugSymbols">
-                    <Platform Name="iOSSimulator">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSX32">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Win32">
-                        <Operation>0</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidClasses">
-                    <Platform Name="Android">
-                        <RemoteDir>classes</RemoteDir>
-                        <Operation>64</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>classes</RemoteDir>
-                        <Operation>64</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidFileProvider">
-                    <Platform Name="Android">
-                        <RemoteDir>res\xml</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\xml</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidLibnativeArmeabiFile">
-                    <Platform Name="Android">
-                        <RemoteDir>library\lib\armeabi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\armeabi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidLibnativeArmeabiv7aFile">
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidLibnativeMipsFile">
-                    <Platform Name="Android">
-                        <RemoteDir>library\lib\mips</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\mips</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidServiceOutput">
-                    <Platform Name="Android">
-                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\arm64-v8a</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidServiceOutput_Android32">
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidSplashImageDef">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidSplashImageDefV21">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-anydpi-v21</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-anydpi-v21</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidSplashStyles">
-                    <Platform Name="Android">
-                        <RemoteDir>res\values</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidSplashStylesV21">
-                    <Platform Name="Android">
-                        <RemoteDir>res\values-v21</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values-v21</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="AndroidSplashStylesV31">
-                    <Platform Name="Android">
-                        <RemoteDir>res\values-v31</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values-v31</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_AdaptiveIcon">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-anydpi-v26</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-anydpi-v26</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_AdaptiveIconBackground">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_AdaptiveIconForeground">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_AdaptiveIconMonochrome">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_AdaptiveIconV33">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-anydpi-v33</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-anydpi-v33</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_Colors">
-                    <Platform Name="Android">
-                        <RemoteDir>res\values</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_ColorsDark">
-                    <Platform Name="Android">
-                        <RemoteDir>res\values-night-v21</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values-night-v21</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_DefaultAppIcon">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_LauncherIcon144">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_LauncherIcon192">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_LauncherIcon36">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-ldpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-ldpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_LauncherIcon48">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-mdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-mdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_LauncherIcon72">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-hdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-hdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_LauncherIcon96">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_NotificationIcon24">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-mdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-mdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_NotificationIcon36">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-hdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-hdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_NotificationIcon48">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_NotificationIcon72">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_NotificationIcon96">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_SplashImage426">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-small</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-small</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_SplashImage470">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-normal</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-normal</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_SplashImage640">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-large</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-large</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_SplashImage960">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-xlarge</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xlarge</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_Strings">
-                    <Platform Name="Android">
-                        <RemoteDir>res\values</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_VectorizedNotificationIcon">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-anydpi-v24</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-anydpi-v24</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_VectorizedSplash">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_VectorizedSplashDark">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-night-anydpi-v21</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-night-anydpi-v21</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_VectorizedSplashV31">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-anydpi-v31</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-anydpi-v31</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="Android_VectorizedSplashV31Dark">
-                    <Platform Name="Android">
-                        <RemoteDir>res\drawable-night-anydpi-v31</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-night-anydpi-v31</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="DebugSymbols">
-                    <Platform Name="iOSSimulator">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSX32">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Win32">
-                        <Operation>0</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="DependencyFramework">
-                    <Platform Name="OSX32">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                        <Extensions>.framework</Extensions>
-                    </Platform>
-                    <Platform Name="OSX64">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                        <Extensions>.framework</Extensions>
-                    </Platform>
-                    <Platform Name="OSXARM64">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                        <Extensions>.framework</Extensions>
-                    </Platform>
-                    <Platform Name="Win32">
-                        <Operation>0</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="DependencyModule">
-                    <Platform Name="iOSDevice32">
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="iOSDevice64">
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="OSX32">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="OSX64">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="OSXARM64">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="Win32">
-                        <Operation>0</Operation>
-                        <Extensions>.dll;.bpl</Extensions>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Required="true" Name="DependencyPackage">
-                    <Platform Name="iOSDevice32">
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="iOSDevice64">
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="OSX32">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="OSX64">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="OSXARM64">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                        <Extensions>.dylib</Extensions>
-                    </Platform>
-                    <Platform Name="Win32">
-                        <Operation>0</Operation>
-                        <Extensions>.bpl</Extensions>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="File">
-                    <Platform Name="Android">
-                        <Operation>0</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <Operation>0</Operation>
-                    </Platform>
-                    <Platform Name="iOSDevice32">
-                        <Operation>0</Operation>
-                    </Platform>
-                    <Platform Name="iOSDevice64">
-                        <Operation>0</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <Operation>0</Operation>
-                    </Platform>
-                    <Platform Name="OSX32">
-                        <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
-                        <Operation>0</Operation>
-                    </Platform>
-                    <Platform Name="OSX64">
-                        <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
-                        <Operation>0</Operation>
-                    </Platform>
-                    <Platform Name="OSXARM64">
-                        <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
-                        <Operation>0</Operation>
-                    </Platform>
-                    <Platform Name="Win32">
-                        <Operation>0</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectAndroidManifest">
-                    <Platform Name="Android">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectOSXDebug">
-                    <Platform Name="OSX64">
-                        <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSXARM64">
-                        <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectOSXEntitlements">
-                    <Platform Name="OSX32">
-                        <RemoteDir>..\</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSX64">
-                        <RemoteDir>..\</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSXARM64">
-                        <RemoteDir>..\</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectOSXInfoPList">
-                    <Platform Name="OSX32">
-                        <RemoteDir>Contents</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSX64">
-                        <RemoteDir>Contents</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSXARM64">
-                        <RemoteDir>Contents</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectOSXResource">
-                    <Platform Name="OSX32">
-                        <RemoteDir>Contents\Resources</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSX64">
-                        <RemoteDir>Contents\Resources</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSXARM64">
-                        <RemoteDir>Contents\Resources</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Required="true" Name="ProjectOutput">
-                    <Platform Name="Android">
-                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\arm64-v8a</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSDevice32">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSDevice64">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Linux64">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSX32">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSX64">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="OSXARM64">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Win32">
-                        <Operation>0</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectOutput_Android32">
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectUWPManifest">
-                    <Platform Name="Win32">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Win64">
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectiOSDeviceDebug">
-                    <Platform Name="iOSDevice32">
-                        <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectiOSEntitlements">
-                    <Platform Name="iOSDevice32">
-                        <RemoteDir>..\</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectiOSInfoPList">
-                    <Platform Name="iOSDevice32">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSDevice64">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectiOSLaunchScreen">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
-                        <Operation>64</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
-                        <Operation>64</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="ProjectiOSResource">
-                    <Platform Name="iOSDevice32">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSDevice64">
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="UWP_DelphiLogo150">
-                    <Platform Name="Win32">
-                        <RemoteDir>Assets</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Win64">
-                        <RemoteDir>Assets</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="UWP_DelphiLogo44">
-                    <Platform Name="Win32">
-                        <RemoteDir>Assets</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="Win64">
-                        <RemoteDir>Assets</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iOS_AppStore1024">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPad_AppIcon152">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPad_AppIcon167">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPad_Launch2x">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPad_LaunchDark2x">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPad_Notification40">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPad_Setting58">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPad_SpotLight80">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_AppIcon120">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_AppIcon180">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_Launch2x">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_Launch3x">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_LaunchDark2x">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_LaunchDark3x">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_Notification40">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_Notification60">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_Setting58">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_Setting87">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_Spotlight120">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <DeployClass Name="iPhone_Spotlight80">
-                    <Platform Name="iOSDevice64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                    <Platform Name="iOSSimARM64">
-                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
-                </DeployClass>
-                <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
-                <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
-                <ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
-                <ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
-                <ProjectRoot Platform="iOSSimARM64" Name="$(PROJECTNAME).app"/>
-                <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
-                <ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
-                <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
-                <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
-                <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
-                <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
-                <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
-            </Deployment>
-        </BorlandProject>
-        <ProjectFileVersion>12</ProjectFileVersion>
-    </ProjectExtensions>
-    <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
-    <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
-    <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
-</Project>

+ 0 - 13
Examples/Demos/utilities/Language/Russian.ini

@@ -1,13 +0,0 @@
-[Text]
-mOption=oпции
-mLanguage=Язык
-mEnglish=English
-mRussian=русский
-mDeutsch=Deutsch
-mHelp=правка
-Form1Caption=приложение на русском языке
-GroupBox1=ѓрупЃокс
-Button=кнопка
-label=метка
-Panel1=панель
-AboutScene=GLScene это библиотека 3D графики на базе OpenGL для Delphi/C++Builder

+ 0 - 87
Examples/Demos/utilities/Language/fLanguageD.dfm

@@ -1,87 +0,0 @@
-object Form1: TForm1
-  Left = 245
-  Top = 173
-  Caption = 'Language demo'
-  ClientHeight = 283
-  ClientWidth = 496
-  Color = clBtnFace
-  Font.Charset = DEFAULT_CHARSET
-  Font.Color = clWindowText
-  Font.Height = -11
-  Font.Name = 'MS Sans Serif'
-  Font.Style = []
-  Menu = MainMenu1
-  OnCreate = FormCreate
-  TextHeight = 13
-  object AboutScene: TMemo
-    Left = 296
-    Top = 4
-    Width = 179
-    Height = 274
-    Lines.Strings = (
-      'AboutGLScene')
-    TabOrder = 0
-  end
-  object GroupBox1: TGroupBox
-    Left = 0
-    Top = 4
-    Width = 296
-    Height = 274
-    Caption = 'GroupBox1'
-    TabOrder = 1
-    object Label1: TLabel
-      Left = 102
-      Top = 100
-      Width = 32
-      Height = 13
-      Caption = 'Label1'
-      Color = clBtnFace
-      ParentColor = False
-    end
-    object Button: TButton
-      Left = 22
-      Top = 28
-      Width = 75
-      Height = 25
-      Caption = 'Button'
-      TabOrder = 0
-    end
-    object Panel1: TPanel
-      Left = 142
-      Top = 172
-      Width = 128
-      Height = 50
-      Caption = 'Panel1'
-      TabOrder = 1
-    end
-  end
-  object MainMenu1: TMainMenu
-    Left = 168
-    Top = 72
-    object mOption: TMenuItem
-      Caption = 'Option'
-      object mLanguage: TMenuItem
-        Caption = 'Language'
-        object mEnglish: TMenuItem
-          Caption = 'English'
-          OnClick = mEnglishClick
-        end
-        object mRussian: TMenuItem
-          Caption = 'Russian'
-          OnClick = mRussianClick
-        end
-        object mDeutsch: TMenuItem
-          Caption = 'Deutsch'
-          OnClick = mDeutschClick
-        end
-      end
-    end
-    object mHelp: TMenuItem
-      Caption = 'Help'
-    end
-  end
-  object GLSLanguage1: TGLSLanguage
-    Left = 168
-    Top = 32
-  end
-end

+ 0 - 89
Examples/Demos/utilities/Language/fLanguageD.pas

@@ -1,89 +0,0 @@
-unit fLanguageD;
-
-interface
-
-uses
-  System.Classes,
-  System.SysUtils,
-  Vcl.Forms,
-  Vcl.Controls,
-  Vcl.Graphics,
-  Vcl.Dialogs,
-  Vcl.Menus,
-  Vcl.StdCtrls,
-  Vcl.ExtCtrls,
-
-  GLS.Scene,
-  GLS.Objects,
-  GLS.Language;
-
-type
-
-  TForm1 = class(TForm)
-    Button: TButton;
-    GLSLanguage1: TGLSLanguage;
-    GroupBox1: TGroupBox;
-    Label1: TLabel;
-    MainMenu1: TMainMenu;
-    AboutScene: TMemo;
-    mLanguage: TMenuItem;
-    mEnglish: TMenuItem;
-    mRussian: TMenuItem;
-    mOption: TMenuItem;
-    Panel1: TPanel;
-    mDeutsch: TMenuItem;
-    mHelp: TMenuItem;
-    procedure FormCreate(Sender: TObject);
-    procedure mEnglishClick(Sender: TObject);
-    procedure mRussianClick(Sender: TObject);
-    procedure mDeutschClick(Sender: TObject);
-  private
-    procedure SetLanguage(const AFile: string);
-  public
-  end;
-
-var
-  Form1: TForm1;
-
-implementation
-
-{$R *.dfm}
-
-procedure TForm1.FormCreate(Sender: TObject);
-begin
-  SetLanguage('English.ini');
-end;
-
-procedure TForm1.SetLanguage(const AFile: string);
-begin
-  GLSLanguage1.LoadLanguageFromFile(AFile);
-  mOption.Caption := GLSLanguage1.Translate('mOption');
-  mLanguage.Caption := GLSLanguage1.Translate('mLanguage');
-  mEnglish.Caption := GLSLanguage1.Translate('mEnglish');
-  mRussian.Caption := GLSLanguage1.Translate('mRussian');
-  mHelp.Caption := GLSLanguage1.Translate('mHelp');
-  Form1.Caption := GLSLanguage1.Translate('Form1Caption');
-  GroupBox1.Caption := GLSLanguage1.Translate('GroupBox1');
-  Button.Caption := GLSLanguage1.Translate('Button');
-  Label1.Caption := GLSLanguage1.Translate('label1');
-  Panel1.Caption := GLSLanguage1.Translate('Panel1');
-  AboutScene.Clear;
-  AboutScene.Lines.Add(GLSLanguage1.Translate('AboutScene'));
-end;
-
-procedure TForm1.mRussianClick(Sender: TObject);
-begin
-  SetLanguage('Russian.ini');
-end;
-
-procedure TForm1.mEnglishClick(Sender: TObject);
-begin
-  SetLanguage('English.ini');
-end;
-
-procedure TForm1.mDeutschClick(Sender: TObject);
-begin
-  SetLanguage('Deutsch.ini');
-end;
-
-end.

+ 47 - 0
Examples/Demos/utilities/ScreenSaver/ScreenSaverC.cbproj

@@ -9,6 +9,7 @@
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
+        <ProjectName Condition="'$(ProjectName)'==''">ScreenSaverC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -23,6 +24,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -40,6 +46,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -57,6 +69,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>ScreenSaverC</SanitizedProjectName>
         <_TCHARMapping>wchar_t</_TCHARMapping>
@@ -75,6 +93,8 @@
         <BCC_wpar>false</BCC_wpar>
         <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
         <BCC_ExtendedErrorInfo>true</BCC_ExtendedErrorInfo>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <PackageImports>IndyIPClient;GLScene_Sounds_RT;frx17;fs17;GLScene_Physics_RT;GLScene_Cg_RT;bindcompfmx;DBXSqliteDriver;vcldbx;GLScene_Physics_RT;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;TeeDB;bindcomp;inetdb;inetdbbde;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DBXOdbcDriver;DataSnapServer;Tee;GLScene_RT;DataSnapProviderClient;xmlrtl;DBXSybaseASEDriver;ibxpress;DbxCommonDriver;vclimg;GLScene_Sounds_RT;IndyProtocols;DBXMySQLDriver;dbxcds;MetropolisUILiveTile;bindengine;vclactnband;vcldb;soaprtl;bindcompdbx;vcldsnap;bindcompvcl;FMXTee;TeeUI;vclie;DBXDb2Driver;vcltouch;bcbsmp;websnap;DBXOracleDriver;CustomIPTransport;vclribbon;VclSmp;dsnap;DBXInformixDriver;IndyIPServer;fmxase;vcl;DataSnapConnectors;IndyCore;GLScene_Sounds_RT;DBXMSSQLDriver;CodeSiteExpressPkg;CloudService;DBXFirebirdDriver;dsnapcon;frxDB17;inet;fsDB17;fmxobj;IndyIPCommon;FmxTeeUI;vclx;frxe17;inetdbxpress;webdsnap;DBXSybaseASADriver;fmxdae;bdertl;dbexpress;DataSnapIndy10ServerTransport;adortl;bcbie;$(PackageImports)</PackageImports>
@@ -99,6 +119,14 @@
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
         <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
@@ -132,6 +160,9 @@
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <Defines>_DEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
     </PropertyGroup>
@@ -141,6 +172,9 @@
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <Defines>NDEBUG;$(Defines)</Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="fScreenSaver1C.cpp">
             <Form>Form1</Form>
@@ -942,6 +976,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1012,6 +1049,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1022,6 +1063,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1235,10 +1280,12 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">False</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 48 - 0
Examples/Demos/utilities/fontgen/FontgenC.cbproj

@@ -10,6 +10,7 @@
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
+        <ProjectName Condition="'$(ProjectName)'==''">FontgenC</ProjectName>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -24,6 +25,11 @@
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Base)'=='true') or '$(Base_Win64x)'!=''">
+        <Base_Win64x>true</Base_Win64x>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
         <Cfg_1>true</Cfg_1>
         <CfgParent>Base</CfgParent>
@@ -41,6 +47,12 @@
         <Cfg_1>true</Cfg_1>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64x)'!=''">
+        <Cfg_1_Win64x>true</Cfg_1_Win64x>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
         <Cfg_2>true</Cfg_2>
         <CfgParent>Base</CfgParent>
@@ -58,6 +70,12 @@
         <Cfg_2>true</Cfg_2>
         <Base>true</Base>
     </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64x' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64x)'!=''">
+        <Cfg_2_Win64x>true</Cfg_2_Win64x>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Base)'!=''">
         <SanitizedProjectName>FontgenC</SanitizedProjectName>
         <DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
@@ -84,6 +102,9 @@
         <FinalOutputDir>.</FinalOutputDir>
         <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
         <TASM_AdditionalSwitches> /w2</TASM_AdditionalSwitches>
+        <Icon_MainIcon>$(BDS)\bin\cbuilder_PROJECTICON.ico</Icon_MainIcon>
+        <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
+        <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Base_Win32)'!=''">
         <OutputExt>exe</OutputExt>
@@ -108,6 +129,14 @@
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64x)'!=''">
+        <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <BT_BuildType>Debug</BT_BuildType>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <DCC_AdditionalSwitches> -M -V</DCC_AdditionalSwitches>
         <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath);$(ILINK_LibraryPath)</ILINK_LibraryPath>
@@ -131,6 +160,9 @@
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <BCC_Defines>_DEBUG;$(BCC_Defines);$(BCC_Defines)</BCC_Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <BCC_OptimizationLevel>Level2</BCC_OptimizationLevel>
         <DCC_AdditionalSwitches> -M -$O+</DCC_AdditionalSwitches>
@@ -146,6 +178,9 @@
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <BCC_Defines>NDEBUG;$(BCC_Defines);$(BCC_Defines)</BCC_Defines>
     </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64x)'!=''">
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+    </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="fFontgenC.cpp">
             <BuildOrder>2</BuildOrder>
@@ -255,6 +290,7 @@
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">False</Platform>
+                <Platform value="Win64x">False</Platform>
             </Platforms>
             <Deployment Version="4">
                 <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx32\libcgcrtl.dylib" Class="DependencyModule">
@@ -978,6 +1014,9 @@
                     <Platform Name="Win64">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -1048,6 +1087,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="UWP_CppLogo44">
                     <Platform Name="Win32">
@@ -1058,6 +1101,10 @@
                         <RemoteDir>Assets</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Win64x">
+                        <RemoteDir>Assets</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="iOS_AppStore1024">
                     <Platform Name="iOSDevice64">
@@ -1271,6 +1318,7 @@
                 <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="Win64x" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 3 - 15
Examples/Demos/utilities/utilities.groupproj

@@ -30,9 +30,6 @@
         <Projects Include="keymap\KeymapD.dproj">
             <Dependencies/>
         </Projects>
-        <Projects Include="Language\LanguageD.dproj">
-            <Dependencies/>
-        </Projects>
         <Projects Include="recorder\RecorderD.dproj">
             <Dependencies/>
         </Projects>
@@ -131,15 +128,6 @@
     <Target Name="KeymapD:Make">
         <MSBuild Projects="keymap\KeymapD.dproj" Targets="Make"/>
     </Target>
-    <Target Name="LanguageD">
-        <MSBuild Projects="Language\LanguageD.dproj"/>
-    </Target>
-    <Target Name="LanguageD:Clean">
-        <MSBuild Projects="Language\LanguageD.dproj" Targets="Clean"/>
-    </Target>
-    <Target Name="LanguageD:Make">
-        <MSBuild Projects="Language\LanguageD.dproj" Targets="Make"/>
-    </Target>
     <Target Name="RecorderD">
         <MSBuild Projects="recorder\RecorderD.dproj"/>
     </Target>
@@ -168,13 +156,13 @@
         <MSBuild Projects="ScreenSaver\ScreenSaverC.cbproj" Targets="Make"/>
     </Target>
     <Target Name="Build">
-        <CallTarget Targets="ArchiverD;ArchiveEditD;FontgenD;FontgenC;GLInfosD;HTFViewerD;HTFPackD;JoystickD;KeymapD;LanguageD;RecorderD;ScreenSaverD;ScreenSaverC"/>
+        <CallTarget Targets="ArchiverD;ArchiveEditD;FontgenD;FontgenC;GLInfosD;HTFViewerD;HTFPackD;JoystickD;KeymapD;RecorderD;ScreenSaverD;ScreenSaverC"/>
     </Target>
     <Target Name="Clean">
-        <CallTarget Targets="ArchiverD:Clean;ArchiveEditD:Clean;FontgenD:Clean;FontgenC:Clean;GLInfosD:Clean;HTFViewerD:Clean;HTFPackD:Clean;JoystickD:Clean;KeymapD:Clean;LanguageD:Clean;RecorderD:Clean;ScreenSaverD:Clean;ScreenSaverC:Clean"/>
+        <CallTarget Targets="ArchiverD:Clean;ArchiveEditD:Clean;FontgenD:Clean;FontgenC:Clean;GLInfosD:Clean;HTFViewerD:Clean;HTFPackD:Clean;JoystickD:Clean;KeymapD:Clean;RecorderD:Clean;ScreenSaverD:Clean;ScreenSaverC:Clean"/>
     </Target>
     <Target Name="Make">
-        <CallTarget Targets="ArchiverD:Make;ArchiveEditD:Make;FontgenD:Make;FontgenC:Make;GLInfosD:Make;HTFViewerD:Make;HTFPackD:Make;JoystickD:Make;KeymapD:Make;LanguageD:Make;RecorderD:Make;ScreenSaverD:Make;ScreenSaverC:Make"/>
+        <CallTarget Targets="ArchiverD:Make;ArchiveEditD:Make;FontgenD:Make;FontgenC:Make;GLInfosD:Make;HTFViewerD:Make;HTFPackD:Make;JoystickD:Make;KeymapD:Make;RecorderD:Make;ScreenSaverD:Make;ScreenSaverC:Make"/>
     </Target>
     <Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
 </Project>

+ 1 - 1
Packages/GLScene_RT.dpk

@@ -150,7 +150,6 @@ contains
   GLS.Isolines in '..\Source\GLS.Isolines.pas',
   GLS.Isosurface in '..\Source\GLS.Isosurface.pas',
   GLS.Joystick in '..\Source\GLS.Joystick.pas',
-  GLS.Language in '..\Source\GLS.Language.pas',
   GLS.LensFlare in '..\Source\GLS.LensFlare.pas',
   GLS.LinePFX in '..\Source\GLS.LinePFX.pas',
   GLS.Logger in '..\Source\GLS.Logger.pas',
@@ -256,6 +255,7 @@ contains
   GLS.OpenGLTokens in '..\Source\GLS.OpenGLTokens.pas',
   GLS.PipelineTransformation in '..\Source\GLS.PipelineTransformation.pas',
   GLS.Polynomials in '..\Source\GLS.Polynomials.pas',
+  gnugettext in '..\Source\gnugettext.pas',
   PasGLTF in '..\Source\PasGLTF.pas',
   PasJSON in '..\Source\PasJSON.pas',
   PasDblStrUtils in '..\Source\PasDblStrUtils.pas',

+ 1 - 1
Packages/GLScene_RT.dproj

@@ -265,7 +265,6 @@
         <DCCReference Include="..\Source\GLS.Isolines.pas"/>
         <DCCReference Include="..\Source\GLS.Isosurface.pas"/>
         <DCCReference Include="..\Source\GLS.Joystick.pas"/>
-        <DCCReference Include="..\Source\GLS.Language.pas"/>
         <DCCReference Include="..\Source\GLS.LensFlare.pas"/>
         <DCCReference Include="..\Source\GLS.LinePFX.pas"/>
         <DCCReference Include="..\Source\GLS.Logger.pas"/>
@@ -371,6 +370,7 @@
         <DCCReference Include="..\Source\GLS.OpenGLTokens.pas"/>
         <DCCReference Include="..\Source\GLS.PipelineTransformation.pas"/>
         <DCCReference Include="..\Source\GLS.Polynomials.pas"/>
+        <DCCReference Include="..\Source\gnugettext.pas"/>
         <DCCReference Include="..\Source\PasGLTF.pas"/>
         <DCCReference Include="..\Source\PasJSON.pas"/>
         <DCCReference Include="..\Source\PasDblStrUtils.pas"/>

+ 0 - 297
Source/GLS.Language.pas

@@ -1,297 +0,0 @@
-//
-// The graphics engine GLScene https://github.com/glscene
-//
-unit GLS.Language;
-
-(*
-  Language created to localize your application.
-  In Delphi, the text is encoded using Ansi cp1251 and can not be encoded \ decoding.
-  In Lazarus has the ability to upload text from any encoding.
-*)
-
-interface
-
-{$I GLS.Scene.inc}
-
-uses
-  System.Classes,
-  System.IniFiles,
-  System.SysUtils,
-  GLS.Utils;
-
-type
-
-  TGLLanguageEntry = record
-    ID: String; //**< identifier
-    Text: String; //**< translation
-  end;
-
-  TGLLanguageEntryArray = array of TGLLanguageEntry;
-
-  (* Class TGLLanguage is used only for downloading and translation,
-    as in the final product it's no need for the text processing *)
-  TGLLanguage = class
-  private
-    FCurrentLanguageFile: String;
-    Entry: TGLLanguageEntryArray; //**< Entrys of Chosen Language
-  public
-    function FindID(const ID: String): integer;
-    function Translate(const ID: String): String;
-    procedure LoadLanguageFromFile(const Language: String);
-    property CurrentLanguageFile: String read FCurrentLanguageFile;
-  end;
-
-  (* Advanced class is designed for loading and processing,
-    will be useful for language editors *)
-  TGLLanguageExt = class(TGLLanguage)
-  private
-    function GetEntry(Index: integer): TGLLanguageEntry;
-    procedure SetEntry(Index: integer; const aValue: TGLLanguageEntry);
-    function GetCount: integer;
-  public
-    procedure AddConst(const ID: String; const Text: String);
-    procedure AddConsts(aValues: TStrings);
-    procedure ChangeConst(const ID: String; const Text: String);
-    property Items[Index: integer]: TGLLanguageEntry read GetEntry write SetEntry;
-    property Count: integer read GetCount;
-    procedure SaveLanguageFromFile(const Language: String); overload;
-    procedure SaveLanguageFromFile; overload;
-  end;
-
-  // Abstract class for control Language
-  TGLSLanguage = class(TComponent)
-  private
-    FLanguage: TGLLanguageExt;
-    FLanguageList: TStrings;
-    procedure SetLanguage(aValue: TGLLanguageExt);
-  public
-    constructor Create(AOwner: TComponent); override;
-    destructor Destroy; override;
-    procedure LoadLanguageFromFile(const Language: String);
-    procedure SaveLanguageFromFile(const Language: String); overload;
-    procedure SaveLanguageFromFile; overload;
-    function Translate(const ID: String): String;
-    property Language: TGLLanguageExt read FLanguage write SetLanguage;
-  end;
-
-//------------------------------------------------------------
-implementation
-//-----------------------------------------------------------------------
-
-uses
-  GLS.Logger;
-
-//----------------------------
-// TGLLanguage
-//----------------------------
-
-// Load the specified LanguageFile
-procedure TGLLanguage.LoadLanguageFromFile(const Language: String);
-var
-  IniFile: TMemIniFile;
-  E: integer; // entry
-  S: TStringList;
-  I: integer;
-begin
-  if Language = '' then
-    Exit;
-  if not FileExists(string(Language)) then
-  begin
-{$IFDEF USE_LOGGING}
-    GLSLogger.LogFatalError(ExtractFileName(string(Language)) +
-      ' Languagefile missing!');
-{$ENDIF}
-    Exit;
-  end;
-  SetLength(Entry, 0);
-  FCurrentLanguageFile := Language;
-  IniFile := TMemIniFile.Create(string(Language));
-  S := TStringList.Create;
-
-  IniFile.ReadSectionValues('Text', S);
-
-  // Problem Solving with symbols wrap (#13#10)
-  I := 0;
-  for E := 0 to S.Count - 1 do
-  begin
-    If S.Names[E] = '' then
-    begin
-      S.Strings[I] := S.Strings[I] + #13#10 + GetValueFromStringsIndex(S, E);
-    end
-    else
-      I := E;
-  end;
-
-  SetLength(Entry, S.Count);
-  for E := 0 to high(Entry) do
-    If S.Names[E] <> '' then
-    begin
-      Entry[E].ID := S.Names[E];
-      Entry[E].Text := GetValueFromStringsIndex(S, E);
-    end;
-  S.Free;
-  IniFile.Free;
-end;
-
-(* Find the index of ID an array of language entry.
-   @returns the index on success, -1 otherwise *)
-function TGLLanguage.FindID(const ID: String): integer;
-var
-  Index: integer;
-begin
-  for Index := 0 to High(Entry) do
-  begin
-    if UpperCase(string(ID)) = UpperCase(string(Entry[Index].ID)) then
-    begin
-      Result := Index;
-      Exit;
-    end;
-  end;
-  Result := -1;
-end;
-
-(*  Translate the Text.
-   If Text is an ID, text will be translated according to the current language
-   setting. If Text is not a known ID, it will be returned as is.
-   @param Text either an ID or an UTF-8 encoded string *)
-function TGLLanguage.Translate(const ID: String): String;
-var
-  EntryIndex: integer;
-begin
-  // fallback result in case Text is not a known ID
-  Result := ID;
-
-  // Check if ID exists
-  EntryIndex := FindID(ID);
-  if (EntryIndex >= 0) then
-  begin
-    Result := Entry[EntryIndex].Text;
-    Exit;
-  end;
-end;
-
-// Add a Constant ID that will be Translated but not Loaded from the LanguageFile
-procedure TGLLanguageExt.AddConst(const ID: String; const Text: String);
-begin
-  SetLength(Entry, Length(Entry) + 1);
-  Entry[high(Entry)].ID := ID;
-  Entry[high(Entry)].Text := Text;
-end;
-
-procedure TGLLanguageExt.AddConsts(aValues: TStrings);
-var
-  I: integer;
-begin
-  if aValues <> nil then
-    for I := 0 to aValues.Count - 1 do
-      If aValues.Names[I] <> '' then
-        AddConst(aValues.Names[I],GetValueFromStringsIndex(aValues, I));
-end;
-
-procedure TGLLanguageExt.ChangeConst(const ID: String;
-  const Text: String);
-var
-  I: integer;
-begin
-  for I := 0 to high(Entry) do
-  begin
-    if Entry[I].ID = ID then
-    begin
-      Entry[I].Text := Text;
-      Break;
-    end;
-  end;
-end;
-
-function TGLLanguageExt.GetEntry(Index: integer): TGLLanguageEntry;
-begin
-  Result := Entry[Index];
-end;
-
-procedure TGLLanguageExt.SetEntry(Index: integer; const aValue: TGLLanguageEntry);
-begin
-  Entry[Index] := aValue;
-end;
-
-function TGLLanguageExt.GetCount: integer;
-begin
-  Result := high(Entry) + 1;
-end;
-
-procedure TGLLanguageExt.SaveLanguageFromFile(const Language: String);
-var
-  IniFile: TMemIniFile;
-  E: integer; // entry
-begin
-  if Language = '' then
-    Exit;
-
-  IniFile := TMemIniFile.Create(string(Language));
-
-  for E := 0 to Count - 1 do
-  begin
-    IniFile.WriteString('Text', string(Items[E].ID), string(Items[E].Text));
-  end;
-  IniFile.UpdateFile;
-  IniFile.Free;
-end;
-
-procedure TGLLanguageExt.SaveLanguageFromFile;
-begin
-  SaveLanguageFromFile(CurrentLanguageFile);
-end;
-
-//----------------------------
-// TGLSLanguage
-//----------------------------
-
-constructor TGLSLanguage.Create(AOwner: TComponent);
-begin
-  inherited Create(AOwner);
-  FLanguage := TGLLanguageExt.Create;
-  FLanguageList := TStringList.Create;
-end;
-
-destructor TGLSLanguage.Destroy;
-begin
-  FLanguage.Free;
-  FLanguageList.Free;
-  inherited Destroy;
-end;
-
-procedure TGLSLanguage.LoadLanguageFromFile(const Language: String);
-begin
-  FLanguage.LoadLanguageFromFile(Language);
-end;
-
-procedure TGLSLanguage.SetLanguage(aValue: TGLLanguageExt);
-begin
-  if aValue <> nil then
-    FLanguage := aValue;
-end;
-
-procedure TGLSLanguage.SaveLanguageFromFile(const Language: String);
-begin
-  if Language = '' then
-    Exit;
-
-  FLanguage.SaveLanguageFromFile(Language);
-end;
-
-procedure TGLSLanguage.SaveLanguageFromFile;
-begin
-  FLanguage.SaveLanguageFromFile;
-end;
-
-function TGLSLanguage.Translate(const ID: String): String;
-begin
-  Result := FLanguage.Translate(ID);
-end;
-
-// ------------------------------------------------------------------------------
-initialization
-// -----------------------------------------------------------
-
-RegisterClass(TGLSLanguage);
-
-end.

+ 2 - 3
Source/GLS.Scene.pas

@@ -60,7 +60,7 @@ type
 const
   cDefaultProxyOptions = [pooEffects, pooObjects, pooTransformation];
   GLSCENE_REVISION = '$Revision: 2024$';
-  GLSCENE_VERSION = 'v2.4 %s';
+  GLSCENE_VERSION = 'v2.5 %s';
 
 type
 
@@ -80,8 +80,7 @@ type
      roDoubleBuffer: enables double-buffering.
      roRenderToWindows: ignored (legacy).
      roTwoSideLighting: enables two-side lighting model.
-     roStereo: enables stereo support in the driver (dunno if it works,
-         I don't have a stereo device to test...)
+     roStereo: enables stereo support in the driver (need to test with a stereo device...)
      roDestinationAlpha: request an Alpha channel for the rendered output
      roNoColorBuffer: don't request a color buffer (color depth setting ignored)
      roNoColorBufferClear: do not clear the color buffer automatically, if the

+ 1 - 3
Source/GLS.SceneRegister.pas

@@ -347,7 +347,6 @@ uses
   GLS.ProxyObjects,
   GLS.RenderContextInfo,
   GLS.ArchiveManager,
-  GLS.Language,
   GLS.Memo,
   GLS.SmoothNavigator,
   GLS.Utils,
@@ -1559,8 +1558,7 @@ begin
 	TGLFPSMovementManager, TGLMaterialScripter, TGLUserInterface, TGLNavigator,
 	TGLSmoothNavigator, TGLSmoothUserInterface, TGLTimeEventsMGR,
 	TGLApplicationFileIO, TGLVfsPAK, TGLSimpleNavigation, TGLGizmo,
-	TGLCameraController, TGLSLanguage, TGLSLogger, TGLSArchiveManager,
-	TGLJoystick, TGLScreenSaver, TGLSSynHiMemo]);
+	TGLCameraController, TGLSLogger, TGLSArchiveManager, TGLJoystick, TGLScreenSaver, TGLSSynHiMemo]);
 
   RegisterComponents('GLScene Terrain', [TGLBitmapHDS, TGLCustomHDS,
     TGLHeightTileFileHDS, TGLBumpmapHDS, TGLPerlinHDS, TGLTexturedHDS,

+ 1 - 2
Source/GLS.Utils.pas

@@ -38,9 +38,8 @@ var
   IsDesignTime: Boolean = False;
   vProjectTargetName: TProjectTargetNameFunc;
 
-// Get a current path to asset
+// Get current path to assets from dir examples
 function GetCurrentAssetPath(): TFileName;
-
 // Copies the values of Source to Dest (converting word values to integer values)
 procedure WordToIntegerArray(Source: PWordArray; Dest: PIntegerArray;
   Count: Cardinal);

+ 4433 - 0
Source/gnugettext.pas

@@ -0,0 +1,4433 @@
+{*------------------------------------------------------------------------------
+  GNU gettext translation system for Delphi, Kylix, C++ Builder and others.
+  All parts of the translation system are kept in this unit.
+
+  @author Lars B. Dybdahl and others
+  @version $LastChangedRevision: 220 $
+  @see http://dxgettext.po.dk/
+-------------------------------------------------------------------------------}
+unit gnugettext;
+(**************************************************************)
+(*                                                            *)
+(*  (C) Copyright by Lars B. Dybdahl and others               *)
+(*  E-mail: [email protected], phone +45 70201241               *)
+(*                                                            *)
+(*  Contributors: Peter Thornqvist, Troy Wolbrink,            *)
+(*                Frank Andreas de Groot, Igor Siticov,       *)
+(*                Jacques Garcia Vazquez, Igor Gitman,        *)
+(*                Arvid Winkelsdorf, Andreas Hausladen,       *)
+(*                Thomas Mueller (dummzeuch)                  *)
+(*                Olivier Sannier (obones)                    *)
+(*                Luebbe Onken (LO)                           *)
+(*                                                            *)
+(*  See http://dxgettext.po.dk/ for more information          *)
+(*                                                            *)
+(**************************************************************)
+
+// $HeadURL: https://svn.code.sf.net/p/dxgettext/code/trunk/dxgettext/sample/gnugettext.pas $
+
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// The names of any contributor may not be used to endorse or promote
+// products derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+interface
+
+// If the conditional define DXGETTEXTDEBUG is defined, debugging log is activated.
+// Use DefaultInstance.DebugLogToFile() to write the log to a file.
+{.$define DXGETTEXTDEBUG}
+
+// If the conditional define dx_ChangeProxyClassname is defined, THookedObjects.Proxify adds '!dx'
+// to the class name. Default: off
+{.$define dx_ChangeProxyClassname}
+
+// If the conditional dx_EMPTY_TO_EMPTY is defined translating an empty string results in an
+// empty string.
+// This can also be set at runtime by setting the EmptyToEmpty field of a TGnuGettextInstance
+// (e.g. the defaultInstance).
+// The default behaviour is to return the header entry as per
+// https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
+{.$define dx_EMPTY_TO_EMPTY}
+
+// Programs that are compiled with German Delphi will always show the German shortcut
+// keys in menus and hints because the German RTL resourcestrings are not translated.
+// This results in German menu shortcuts 'Strg+<X>', 'Umsch+<X>' to be shown instead of
+// 'Ctrl+<X>', 'Shift+<X>', even if the applications language is not German.
+//
+// This function hooks into Vcl.Menus.ShortCutToText and replaces the German consts with
+// their English counterparts if the current application language is *not* German.
+// Tested with Rad Studio 10.2 Tokyo and 10.3.1 Rio
+{.$define dx_German_Delphi_fix}
+
+// if the conditional define dx_SupportsResources is defined the .mo files
+// can also be added to the executable as Windows resources
+// Be warned: This has not been thoroughly tested.
+// Default is turned off.
+{.$define dx_SupportsResources}
+
+{$ifdef VER140}
+  // Delphi 6
+  {$DEFINE dx_Hinstance_is_Integer}
+  {$DEFINE dx_NativeInt_is_Integer}
+  {$DEFINE dx_NativeUInt_is_Cardinal}
+{$endif}
+{$ifdef VER150}
+  // Delphi 7
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_Hinstance_is_Integer}
+  {$DEFINE dx_NativeInt_is_Integer}
+  {$DEFINE dx_NativeUInt_is_Cardinal}
+{$endif}
+{$ifdef VER160}
+  // Delphi 8
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_Hinstance_is_Integer}
+  {$DEFINE dx_NativeInt_is_Integer}
+  {$DEFINE dx_NativeUInt_is_Cardinal}
+{$endif}
+{$ifdef VER170}
+  // Delphi 2005
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_Hinstance_is_Integer}
+  {$DEFINE dx_NativeInt_is_Integer}
+  {$DEFINE dx_NativeUInt_is_Cardinal}
+{$endif}
+{$ifdef VER180}
+  {$ifndef VER185}
+  // Delphi 2006
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_Hinstance_is_Integer}
+  {$DEFINE dx_NativeInt_is_Integer}
+  {$DEFINE dx_NativeUInt_is_Cardinal}
+  {$DEFINE dx_has_Inline}
+  {$endif}
+{$endif}
+{$ifdef VER185}
+  // Delphi 2007
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_Hinstance_is_Integer}
+  {$DEFINE dx_NativeInt_is_Integer}
+  {$DEFINE dx_NativeUInt_is_Cardinal}
+  {$DEFINE dx_has_Inline}
+{$endif}
+// there was no VER190 ??
+{$ifdef VER200}
+  // Delphi 2009, first version with Unicode
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_Hinstance_is_Integer}
+  {$DEFINE dx_NativeInt_is_Integer}
+  {$DEFINE dx_NativeUInt_is_Cardinal}
+  {$DEFINE dx_has_Inline}
+  {$DEFINE dx_StringList_has_OwnsObjects}
+  {$DEFINE dx_has_LpVoid}
+  {$DEFINE dx_has_StringBuilder}
+{$endif}
+{$ifdef VER210}
+  // Delphi 2010
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_Hinstance_is_Integer}
+  {$DEFINE dx_NativeInt_is_Integer}
+  {$DEFINE dx_NativeUInt_is_Cardinal}
+  {$DEFINE dx_has_Inline}
+  {$DEFINE dx_StringList_has_OwnsObjects}
+  {$DEFINE dx_has_LpVoid}
+  {$DEFINE dx_has_StringBuilder}
+{$endif}
+{$ifdef VER220}
+  // Delphi 2011/XE
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_Hinstance_is_Integer}
+  {$DEFINE dx_NativeInt_is_Integer}
+  {$DEFINE dx_NativeUInt_is_Cardinal}
+  {$DEFINE dx_has_Inline}
+  {$DEFINE dx_has_LpVoid}
+  {$DEFINE dx_StringList_has_OwnsObjects}
+  {$DEFINE dx_has_StringBuilder}
+{$endif}
+{$ifdef VER230}
+  // Delphi 2012/XE2
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_StringList_has_OwnsObjects}
+  {$DEFINE dx_has_Inline}
+  {$DEFINE dx_has_LpVoid}
+  {$DEFINE dx_has_VclThemes}
+  {$DEFINE dx_has_StringBuilder}
+  {$DEFINE dx_has_dotted_unitnames}
+{$endif}
+{$ifdef VER240}
+  // Delphi 2013/XE3
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_StringList_has_OwnsObjects}
+  {$DEFINE dx_GetStrProp_reads_unicode}
+  {$DEFINE dx_has_Inline}
+  {$DEFINE dx_has_LpVoid}
+  {$DEFINE dx_has_VclThemes}
+  {$DEFINE dx_has_StringBuilder}
+  {$DEFINE dx_has_dotted_unitnames}
+{$endif}
+{$if CompilerVersion >= 25}
+  // Delphi XE4 and up
+  {$DEFINE dx_has_Unsafe_Warnings}
+  {$DEFINE dx_has_WideStrings}
+  {$DEFINE dx_StringList_has_OwnsObjects}
+  {$DEFINE dx_GetStrProp_reads_unicode}
+  {$DEFINE dx_has_Inline}
+  {$DEFINE dx_has_LpVoid}
+  {$DEFINE dx_has_VclThemes}
+  {$DEFINE dx_midstr_in_AnsiStrings}
+  {$DEFINE dx_has_StringBuilder}
+  {$DEFINE dx_has_dotted_unitnames}
+{$ifend}
+
+{$ifdef dx_has_Unsafe_Warnings}
+  {$WARN UNSAFE_TYPE OFF}
+  {$WARN UNSAFE_CODE OFF}
+  {$WARN UNSAFE_CAST OFF}
+{$endif dx_has_Unsafe_Warnings}
+
+uses
+{$ifdef MSWINDOWS}
+  Windows,
+{$else}
+  Libc,
+{$ifdef FPC}
+  CWString,
+{$endif}
+{$endif}
+{$IFDEF dx_midstr_in_AnsiStrings}
+  System.AnsiStrings,
+{$ENDIF dx_midstr_in_AnsiStrings}
+{$IFDEF dx_has_WideStrings}
+  WideStrings,
+{$ENDIF dx_has_WideStrings}
+  Types, Classes, StrUtils, SysUtils, TypInfo;
+
+(*****************************************************************************)
+(*                                                                           *)
+(*  MAIN API                                                                 *)
+(*                                                                           *)
+(*****************************************************************************)
+
+type
+  {$IFNDEF UNICODE}
+  UnicodeString=WideString;
+  RawUtf8String=AnsiString;
+  RawByteString=AnsiString;
+  {$ELSE}
+  RawUtf8String=RawByteString;
+  {$ENDIF}
+  DomainString=string;
+  LanguageString=string;
+  ComponentNameString=string;
+  FilenameString=string;
+  MsgIdString=UnicodeString;
+  TranslatedUnicodeString=UnicodeString;
+
+// Main GNU gettext functions. See documentation for instructions on how to use them.
+function _(const szMsgId: MsgIdString): TranslatedUnicodeString;
+function gettext(const szMsgId: MsgIdString): TranslatedUnicodeString;
+function gettext_NoExtract(const szMsgId: MsgIdString): TranslatedUnicodeString;
+function gettext_NoOp(const szMsgId: MsgIdString): TranslatedUnicodeString;
+function dgettext(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString;
+function dgettext_NoExtract(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString;
+function dgettext_NoOp(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString;
+function dngettext(const szDomain: DomainString; const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+function ngettext(const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+function ngettext_NoExtract(const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+function pgettext(const szMsgCtxt,szMsgId: MsgIdString): TranslatedUnicodeString;
+function pdgettext(const szDomain: DomainString; const szMsgCtxt,szMsgId: MsgIdString): TranslatedUnicodeString;
+function pngettext(const szMsgCtxt,singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+function pdngettext(const szDomain: DomainString; const szMsgCtxt,singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+procedure textdomain(const szDomain: DomainString);
+function getcurrenttextdomain: DomainString;
+procedure bindtextdomain(const szDomain: DomainString; const szDirectory: FilenameString);
+
+// Set language to use
+///<summary>
+/// A LocaleName usually has the form ll_CC. Where ll is an ISO 639 two-letter language code,
+/// and CC is an ISO 3166 two-letter country code.
+/// For example, for German in Germany, ll is de, and CC is DE which results in de_DE </summary>
+procedure UseLanguage(LocaleName: LanguageString);
+function GetCurrentLanguage:LanguageString; deprecated; // use GetCurrentLocaleName instead
+///<summary>
+/// @Returns the full locale name in the form ll_CC </summary>
+function GetCurrentLocaleName: LanguageString;
+///<summary>
+/// @Returns the two letter language code of the current LocaleName </summary>
+function GetCurrentLanguageCode: LanguageString;
+///<summary>
+/// @Returns the two letter language code of the given LocaleName </summary>
+function LocaleNameToLanguageCode(const ALocaleName: LanguageString): LanguageString;
+
+// Translates a component (form, frame etc.) to the currently selected language.
+// Put TranslateComponent(self) in the OnCreate event of all your forms.
+// See the manual for documentation on these functions
+type
+  TTranslator=procedure (obj:TObject) of object;
+
+procedure TP_Ignore(AnObject:TObject; const name:ComponentNameString);
+procedure TP_IgnoreClass (IgnClass:TClass);
+procedure TP_IgnoreClassProperty (IgnClass:TClass;const propertyname:ComponentNameString);
+procedure TP_GlobalIgnoreClass (IgnClass:TClass);
+function TP_TryGlobalIgnoreClass (IgnClass:TClass): boolean;
+procedure TP_GlobalIgnoreClassProperty (IgnClass:TClass;const propertyname:ComponentNameString);
+procedure TP_GlobalHandleClass (HClass:TClass;Handler:TTranslator);
+procedure TP_Remember(AnObject: TObject; PropName:ComponentNameString; OldValue:TranslatedUnicodeString);
+procedure TranslateComponent(AnObject: TComponent; const TextDomain:DomainString='');
+procedure RetranslateComponent(AnObject: TComponent; const TextDomain:DomainString='');
+
+// Add more domains that resourcestrings can be extracted from. If a translation
+// is not found in the default domain, this domain will be searched, too.
+// This is useful for adding mo files for certain runtime libraries and 3rd
+// party component libraries
+procedure AddDomainForResourceString (const domain:DomainString);
+procedure RemoveDomainForResourceString (const domain:DomainString);
+
+// Add more domains that component strings can be extracted from. If a translation
+// is not found in the default domain, this domain will be searched, too.
+// This is useful when an application inherits components from a 3rd
+// party component libraries
+procedure AddDomainForComponent (const domain:DomainString);
+procedure RemoveDomainForComponent (const domain:DomainString);
+
+// Unicode-enabled way to get resourcestrings, automatically translated
+// Use like this: ws:=LoadResStringW(@NameOfResourceString);
+function LoadResString(ResStringRec: PResStringRec): widestring;
+function LoadResStringW(ResStringRec: PResStringRec): UnicodeString;
+function PLoadResString(const szMsgCtxt: MsgIdString; ResStringRec: PResStringRec): widestring;
+function PLoadResStringW(const szMsgCtxt: MsgIdString; ResStringRec: PResStringRec): UnicodeString;
+
+// This returns an empty string if not translated or translator name is not specified.
+function GetTranslatorNameAndEmail:TranslatedUnicodeString;
+
+
+(*****************************************************************************)
+(*                                                                           *)
+(*  ADVANCED FUNCTIONALITY                                                   *)
+(*                                                                           *)
+(*****************************************************************************)
+
+const
+  DefaultTextDomain = 'default';
+
+var
+  ExecutableFilename: FilenameString; // This is set to paramstr(0) or the name of the DLL you are creating.
+
+const
+  PreferExternal             = False;       // Set to true, to prefer external *.mo over embedded translation
+  UseMemoryMappedFiles       = True;        // Set to False, to use the mo-file as independent copy in memory (you can update the file while it is in use)
+  ReReadMoFileOnSameLanguage = False;       // Set to True, to reread mo-file if the current language is selected again
+
+const
+  // Subversion source code version control version information
+  VCSVersion='$LastChangedRevision: 220 $';
+
+type
+  EGnuGettext=class(Exception);
+  EGGProgrammingError=class(EGnuGettext);
+  EGGComponentError=class(EGnuGettext);
+  EGGIOError=class(EGnuGettext);
+  EGGAnsi2WideConvError=class(EGnuGettext);
+
+// This function will turn resourcestring hooks on or off, eventually with BPL file support.
+// Please do not activate BPL file support when the package is in design mode.
+const AutoCreateHooks=true;
+procedure HookIntoResourceStrings (enabled:boolean=true; SupportPackages:boolean=false);
+
+
+
+
+(*****************************************************************************)
+(*                                                                           *)
+(*  CLASS based implementation.                                              *)
+(*  Use TGnuGettextInstance to have more than one language                   *)
+(*  in your application at the same time                                     *)
+(*                                                                           *)
+(*****************************************************************************)
+
+type
+  TOnDebugLine = Procedure (Sender: TObject; const Line: String; var Discard: Boolean) of Object;  // Set Discard to false if output should still go to ordinary debug log
+  TGetPluralForm=function (Number:Longint):Integer;
+  TDebugLogger=procedure (line: string) of object;
+
+{*------------------------------------------------------------------------------
+  Handles .mo files, in separate files or inside the exe file.
+  Don't use this class. It's for internal use.
+-------------------------------------------------------------------------------}
+  TMoFile=
+    class /// Threadsafe. Only constructor and destructor are writing to memory
+    private
+      doswap: boolean;
+    public
+      Users:Integer; /// Reference count. If it reaches zero, this object should be destroyed.
+      constructor Create (const filename: FilenameString;
+                          const Offset: int64; Size: int64;
+                          const xUseMemoryMappedFiles: Boolean;
+                          const ResName: string);
+      destructor Destroy; override;
+      function gettext(const msgid: RawUtf8String;var found:boolean): RawUtf8String; // uses mo file and utf-8
+      property isSwappedArchitecture:boolean read doswap;
+    private
+      N, O, T: Cardinal; /// Values defined at http://www.linuxselfhelp.com/gnu/gettext/html_chapter/gettext_6.html
+      startindex,startstep:integer;
+      FUseMemoryMappedFiles: Boolean;
+      mo: THandle;
+      momapping: THandle;
+      momemoryHandle:PAnsiChar;
+      momemory: PAnsiChar;
+      function autoswap32(i: cardinal): cardinal;
+      function CardinalInMem(baseptr: PAnsiChar; Offset: Cardinal): Cardinal;
+    end;
+
+{*------------------------------------------------------------------------------
+  Handles all issues regarding a specific domain.
+  Don't use this class. It's for internal use.
+-------------------------------------------------------------------------------}
+  TDomain=
+    class
+    private
+      Enabled:boolean;
+      vDirectory: FilenameString;
+      procedure setDirectory(const dir: FilenameString);
+    public
+      DebugLogger:TDebugLogger;
+      Domain: DomainString;
+      property Directory: FilenameString read vDirectory write setDirectory;
+      constructor Create;
+      destructor Destroy; override;
+      // Set parameters
+      procedure SetLanguageCode (const langcode:LanguageString);
+      procedure SetFilename (const filename:FilenameString); // Bind this domain to a specific file
+      // Get information
+      procedure GetListOfLanguages(list:TStrings);
+      function GetTranslationProperty(Propertyname: ComponentNameString): TranslatedUnicodeString;
+      function gettext(const msgid: RawUtf8String): RawUtf8String; // uses mo file and utf-8
+    private
+      mofile:TMoFile;
+      SpecificFilename:FilenameString;
+      curlang: LanguageString;
+      OpenHasFailedBefore: boolean;
+      procedure OpenMoFile;
+      procedure CloseMoFile;
+    end;
+
+{*------------------------------------------------------------------------------
+  Helper class for invoking events.
+-------------------------------------------------------------------------------}
+  TExecutable=
+    class
+      procedure Execute; virtual; abstract;
+    end;
+
+{*------------------------------------------------------------------------------
+  Interface to implement if you want to register as a language change listener
+-------------------------------------------------------------------------------}
+  IGnuGettextInstanceWhenNewLanguageListener = interface
+    procedure WhenNewLanguage (const LanguageID:LanguageString);
+  end;
+
+{*------------------------------------------------------------------------------
+  The main translation engine.
+-------------------------------------------------------------------------------}
+  TGnuGettextInstance=
+    class
+    private
+      fOnDebugLine:TOnDebugLine;
+    public
+      Enabled:Boolean;      /// Set this to false to disable translations
+      ///<summary>
+      /// Set this to true, if you want the empty string to be "translated" to an empty string.
+      /// The default behaviour is to return the po file header.
+      /// https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
+      /// "An empty untranslated-string is reserved to contain the header entry with the meta
+      ///  information (see Header Entry). This header entry should be the first entry of the file.
+      ///  The empty untranslated-string is reserved for this purpose and must not be
+      ///  used anywhere else. </summary>
+      EmptyToEmpty: Boolean;
+      DesignTimeCodePage:Integer;  /// See MultiByteToWideChar() in Win32 API for documentation
+      SearchAllDomains: Boolean;  /// Should gettext and ngettext look in all other known domains after the current one
+
+      ///<summary>
+      /// If LocaleName is not '', the instance will be initialized for the given language / locale </summary>
+      constructor Create(LocaleName: LanguageString = '');
+      destructor Destroy; override;
+      procedure UseLanguage(LocaleName: LanguageString);
+      procedure GetListOfLanguages (const domain:DomainString; list:TStrings); // Puts list of language codes, for which there are translations in the specified domain, into list
+      {$ifndef UNICODE}
+      function gettext(const szMsgId: ansistring): TranslatedUnicodeString; overload; virtual;
+      function ngettext(const singular,plural:ansistring;Number:longint):TranslatedUnicodeString; overload; virtual;
+      {$endif}
+      function gettext(const szMsgId: MsgIdString): TranslatedUnicodeString; overload; virtual;
+      function gettext_NoExtract(const szMsgId: MsgIdString): TranslatedUnicodeString;
+      function gettext_NoOp(const szMsgId: MsgIdString): TranslatedUnicodeString;
+      function ngettext(const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString; overload; virtual;
+      function ngettext_NoExtract(const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString;
+      function GetCurrentLanguage:LanguageString; deprecated; // use GetCurentLocaleName instead
+      function GetCurrentLanguageCode:LanguageString;
+      function GetCurrentLocaleName:LanguageString;
+      function GetTranslationProperty (const Propertyname:ComponentNameString):TranslatedUnicodeString;
+      function GetTranslatorNameAndEmail:TranslatedUnicodeString;
+
+      // Form translation tools, these are not threadsafe. All TP_ procs must be called just before TranslateProperites()
+      procedure TP_Ignore(AnObject:TObject; const name:ComponentNameString);
+      procedure TP_IgnoreClass (IgnClass:TClass);
+      procedure TP_IgnoreClassProperty (IgnClass:TClass;propertyname:ComponentNameString);
+      function TP_TryGlobalIgnoreClass (IgnClass:TClass): boolean;
+      procedure TP_GlobalIgnoreClass (IgnClass:TClass);
+      procedure TP_GlobalIgnoreClassProperty (IgnClass:TClass;propertyname:ComponentNameString);
+      procedure TP_GlobalHandleClass (HClass:TClass;Handler:TTranslator);
+      procedure TP_Remember(AnObject: TObject; PropName:ComponentNameString; OldValue:TranslatedUnicodeString);
+      procedure TranslateProperties(AnObject: TObject; textdomain:DomainString='');
+      procedure TranslateComponent(AnObject: TComponent; const TextDomain:DomainString='');
+      procedure RetranslateComponent(AnObject: TComponent; const TextDomain:DomainString='');
+
+      // Multi-domain functions
+      {$ifndef UNICODE}
+      function dgettext(const szDomain: DomainString; const szMsgId: ansistring): TranslatedUnicodeString; overload; virtual;
+      function dngettext(const szDomain: DomainString; const singular,plural:ansistring;Number:longint):TranslatedUnicodeString; overload; virtual;
+      {$endif}
+      function dgettext(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString; overload; virtual;
+      function dgettext_NoExtract(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString;
+      function dgettext_NoOp(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString;
+      function dngettext(const szDomain: DomainString; const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString; overload; virtual;
+      function dngettext_NoExtract(const szDomain: DomainString; const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString;
+      procedure textdomain(const szDomain: DomainString);
+      function getcurrenttextdomain: DomainString;
+      procedure bindtextdomain(const szDomain: DomainString; const szDirectory: FilenameString);
+      procedure bindtextdomainToFile (const szDomain: DomainString; const filename: FilenameString); // Also works with files embedded in exe file
+
+      // particular translations (context parameter)
+      function pgettext(const szMsgCtxt,szMsgId: MsgIdString): TranslatedUnicodeString;
+      function pdgettext(const szDomain: DomainString; const szMsgCtxt,szMsgId: MsgIdString): TranslatedUnicodeString;
+      function pngettext(const szMsgCtxt,singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+      function pdngettext(const szDomain: DomainString; const szMsgCtxt,singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+
+      // Windows API functions
+      function LoadResString(ResStringRec: PResStringRec): UnicodeString;
+      function PLoadResString(const szMsgCtxt: MsgIdString; ResStringRec: PResStringRec): UnicodeString;
+
+      // Output all log info to this file. This may only be called once.
+      procedure DebugLogToFile (const filename:FilenameString; append:boolean=false);
+      procedure DebugLogPause (PauseEnabled:boolean);
+      property  OnDebugLine: TOnDebugLine read fOnDebugLine write fOnDebugLine; // If set, all debug output goes here
+      {$ifndef UNICODE}
+      // Conversion according to design-time character set
+      function ansi2wideDTCP (const s:AnsiString):MsgIdString;  // Convert using Design Time Code Page
+      {$endif}
+
+      procedure RegisterWhenNewLanguageListener(Listener: IGnuGettextInstanceWhenNewLanguageListener);
+      procedure UnregisterWhenNewLanguageListener(Listener: IGnuGettextInstanceWhenNewLanguageListener);
+    protected
+      procedure TranslateStrings (sl:TStrings;const TextDomain:DomainString);
+      {$IFDEF dx_has_WideStrings}
+      procedure TranslateWideStrings (sl: TWideStrings;const TextDomain:DomainString);
+      {$ENDIF dx_has_WideStrings}
+
+      // Override these three, if you want to inherited from this class
+      // to create a new class that handles other domain and language dependent
+      // issues
+      procedure WhenNewLanguage (const LanguageID:LanguageString); virtual;         // Override to know when language changes
+      procedure WhenNewDomain (const TextDomain:DomainString); virtual; // Override to know when text domain changes. Directory is purely informational
+      procedure WhenNewDomainDirectory (const TextDomain:DomainString;const Directory:FilenameString); virtual; // Override to know when any text domain's directory changes. It won't be called if a domain is fixed to a specific file.
+    private
+      curlang: LanguageString;
+      curGetPluralForm:TGetPluralForm;
+      curmsgdomain: DomainString;
+      savefileCS: TMultiReadExclusiveWriteSynchronizer;
+      savefile: TextFile;
+      savememory: TStringList;
+      DefaultDomainDirectory:FilenameString;
+      domainlist: TStringList;     /// List of domain names. Objects are TDomain.
+      TP_IgnoreList:TStringList;   /// Temporary list, reset each time TranslateProperties is called
+      TP_ClassHandling:TList;      /// Items are TClassMode. If a is derived from b, a comes first
+      TP_GlobalClassHandling:TList;      /// Items are TClassMode. If a is derived from b, a comes first
+      TP_Retranslator:TExecutable; /// Cast this to TTP_Retranslator
+      fWhenNewLanguageListeners: TInterfaceList;  /// List of all registered WhenNewLanguage listeners
+      {$ifdef DXGETTEXTDEBUG}
+      DebugLogCS:TMultiReadExclusiveWriteSynchronizer;
+      DebugLog:TStream;
+      DebugLogOutputPaused:Boolean;
+      {$endif}
+      function TP_CreateRetranslator:TExecutable;  // Must be freed by caller!
+      procedure FreeTP_ClassHandlingItems;
+      function ClassIsIgnored(AClass:TClass): Boolean;
+      {$ifdef DXGETTEXTDEBUG}
+      procedure DebugWriteln(Line: string);
+      {$endif}
+      procedure TranslateProperty(AnObject: TObject; PropInfo: PPropInfo;
+        TodoList: TStrings; const TextDomain:DomainString);  // Translates a single property of an object
+      function Getdomain(const domain:DomainString; const DefaultDomainDirectory:FilenameString;
+        const LocaleName: LanguageString): TDomain;
+
+      function GetResString(ResStringRec: PResStringRec): UnicodeString;
+      function ResourceStringGettext(MsgId: MsgIdString): TranslatedUnicodeString;
+      procedure pgettext_fixup(const szLookup,szMsgId: MsgIdString; var szTranslation: MsgIdString); {$ifdef dx_has_Inline}inline;{$endif}
+    end;
+
+const
+  LOCALE_SISO639LANGNAME = $59;    // Used by Lazarus software development tool
+  {$EXTERNALSYM LOCALE_SISO639LANGNAME}
+  LOCALE_SISO3166CTRYNAME = $5A;   // Used by Lazarus software development tool
+  {$EXTERNALSYM LOCALE_SISO3166CTRYNAME}
+  GETTEXT_CONTEXT_GLUE = #4;
+
+var
+  DefaultInstance:TGnuGettextInstance;  /// Default instance of the main API for singlethreaded applications.
+
+implementation
+
+{$IFDEF dx_has_dotted_unitnames}
+{$ifdef dx_has_VclThemes or dx_German_Delphi_fix}
+uses
+{$ifdef dx_has_VclThemes}
+  Vcl.Themes{$ifdef dx_German_Delphi_fix},{$endif}
+{$endif}
+{$ifdef dx_German_Delphi_fix}
+  Vcl.Consts,
+  Vcl.Menus
+{$endif dx_German_Delphi_fix}
+  ;
+{$endif dx_has_VclThemes or dx_German_Delphi_fix}
+{$ELSE ~dx_has_dotted_unitnames}
+{$ifdef dx_German_Delphi_fix}
+uses
+  Consts,
+  Menus;
+{$endif dx_has_VclThemes or dx_German_Delphi_fix}
+{$ENDIF dx_has_dotted_unitnames}
+
+{$ifndef MSWINDOWS}
+{$ifndef LINUX}
+  'This version of gnugettext.pas is only meant to be compiled with Kylix 3,'
+  'Delphi 6, Delphi 7 and later versions. If you use other versions, please'
+  'get the gnugettext.pas version from the Delphi 5 directory.'
+{$endif}
+{$endif}
+
+{$ifdef dx_NativeUInt_is_Cardinal}
+type
+  NativeUInt = cardinal;
+{$endif}
+
+(**************************************************************************)
+// Some comments on the implementation:
+// This unit should be independent of other units where possible.
+// It should have a small footprint in any way.
+(**************************************************************************)
+// TMultiReadExclusiveWriteSynchronizer is used instead of TCriticalSection
+// because it makes this unit independent of the SyncObjs unit
+(**************************************************************************)
+
+{$B-,R+,I+,Q+}
+
+type
+  TTP_RetranslatorItem=
+    class
+      obj:TObject;
+      Propname:ComponentNameString;
+      OldValue:TranslatedUnicodeString;
+    end;
+  TTP_Retranslator=
+    class (TExecutable)
+      TextDomain:DomainString;
+      Instance:TGnuGettextInstance;
+      constructor Create;
+      destructor Destroy; override;
+      procedure Remember (obj:TObject; PropName:ComponentNameString; OldValue:TranslatedUnicodeString);
+      procedure Execute; override;
+    private
+      list:TList;
+    end;
+  TEmbeddedFileInfo=
+    class
+      offset,size:int64;
+    end;
+{$IFDEF dx_SupportsResources}
+  TResourceFileInfo = class
+  public
+    ResourceName: string;
+    constructor Create(const _ResourceName: string);
+  end;
+{$ENDIF dx_SupportsResources}
+  TFileLocator=
+    class // This class finds files even when embedded inside executable
+      constructor Create;
+      destructor Destroy; override;
+      function FindSignaturePos(const signature: RawByteString; str: TFileStream): Int64;
+      procedure Analyze;  // List files embedded inside executable
+      function FileExists (filename:FilenameString):boolean;
+      function GetMoFile (filename:FilenameString;DebugLogger:TDebugLogger):TMoFile;
+      procedure ReleaseMoFile (mofile:TMoFile);
+    private
+      basedirectory:FilenameString;
+      filelist:TStringList; //Objects are TEmbeddedFileInfo. Filenames are relative to .exe file
+{$IFDEF dx_SupportsResources}
+      FResourceList: TStringList; // Objects are TResourceFileInfo, Filenames are relative to .exe file
+{$ENDIF dx_SupportsResources}
+      MoFilesCS:TMultiReadExclusiveWriteSynchronizer;
+      MoFiles:TStringList; // Objects are filenames+offset, objects are TMoFile
+      function ReadInt64 (str:TStream):int64;
+    end;
+  TGnuGettextComponentMarker=
+    class (TComponent)
+    public
+      LastLanguage:LanguageString;
+      Retranslator:TExecutable;
+      destructor Destroy; override;
+    end;
+  TClassMode=
+    class
+      HClass:TClass;
+      SpecialHandler:TTranslator;
+      PropertiesToIgnore:TStringList; // This is ignored if Handler is set
+      constructor Create;
+      destructor Destroy; override;
+    end;
+  TRStrinfo = record
+    strlength, stroffset: cardinal;
+  end;
+  TStrInfoArr = array[0..10000000] of TRStrinfo;
+  PStrInfoArr = ^TStrInfoArr;
+  TCharArray5=array[0..4] of ansichar;
+  THook=  // Replaces a runtime library procedure with a custom procedure
+    class
+    public
+      constructor Create (OldProcedure, NewProcedure: pointer; FollowJump:boolean=false);
+      destructor Destroy; override;  // Restores unhooked state
+      procedure Reset (FollowJump:boolean=false); // Disables and picks up patch points again
+      procedure Disable;
+      procedure Enable;
+    private
+      oldproc,newproc:Pointer;
+      Patch:TCharArray5;
+      Original:TCharArray5;
+      PatchPosition:PAnsiChar;
+      procedure Shutdown; // Same as destroy, except that object is not destroyed
+    end;
+
+  PProxyClassData = ^TProxyClassData;
+  TProxyClassData = record
+    SelfPtr: TClass;
+    IntfTable: Pointer;
+    AutoTable: Pointer;
+    InitTable: Pointer;
+    TypeInfo: PTypeInfo;
+    FieldTable: Pointer;
+    MethodTable: Pointer;
+    DynamicTable: Pointer;
+    ClassName: PShortString;
+    InstanceSize: Integer;
+    Parent: ^TClass;
+  end;
+
+  THookedObjects=
+    class(TList)
+    private
+      interceptorClassDatas:TList;
+
+      function findInterceptorClassData(aClass:TClass):Pointer;
+
+      procedure BeforeDestructionHook;
+      function GetBeforeDestructionHookAddress: Pointer;
+    public
+      constructor Create;
+      destructor Destroy; override;
+
+      procedure Proxify(obj:TObject);
+      procedure Unproxify(obj:TObject);
+    end;
+
+var
+  // System information
+  Win32PlatformIsUnicode:boolean=False;
+
+  // Information about files embedded inside .exe file
+  FileLocator:TFileLocator;
+
+  // Hooks into runtime library functions
+  ResourceStringDomainListCS:TMultiReadExclusiveWriteSynchronizer;
+  ResourceStringDomainList:TStringList;
+  ComponentDomainListCS:TMultiReadExclusiveWriteSynchronizer;
+  ComponentDomainList:TStringList;
+  HookLoadResString:THook;
+  HookLoadStr:THook;
+  HookFmtLoadStr:THook;
+{$ifdef dx_German_Delphi_fix}
+  HookShortCutToText:THook;
+{$endif dx_German_Delphi_fix}
+  HookedObjects:THookedObjects;
+  KnownRetranslators:TList;
+
+// Helper functions to make the ugly ifdefs more readable
+function doGetWideStrProp(AnObject:TObject; Propname:ComponentNameString):TranslatedUnicodeString;
+begin
+{$IFDEF dx_GetStrProp_reads_unicode}
+  Result := GetStrProp(AnObject, PropName);
+{$ELSE}
+  Result := GetWideStrProp(AnObject, PropName)
+{$ENDIF}
+end;
+
+{$IFDEF UNICODE}
+function doGetUnicodeStrProp(AnObject:TObject; Propname:ComponentNameString):TranslatedUnicodeString;
+begin
+{$IFDEF dx_GetStrProp_reads_unicode}
+  Result := GetStrProp(AnObject, PropName);
+{$ELSE}
+  Result := GetUnicodeStrProp(AnObject, PropName)
+{$ENDIF}
+end;
+{$ENDIF UNICODE}
+
+function GGGetEnvironmentVariable(const Name:widestring):widestring;
+var
+  Len: integer;
+  W : WideString;
+begin
+  Result := '';
+  SetLength(W,1);
+  Len := Windows.GetEnvironmentVariableW(PWideChar(Name), PWideChar(W), 1);
+  if Len > 0 then begin
+    SetLength(Result, Len - 1);
+    Windows.GetEnvironmentVariableW(PWideChar(Name), PWideChar(Result), Len);
+  end;
+end;
+
+function StripCRRawMsgId (s:RawUtf8String):RawUtf8String;
+var
+  i:integer;
+begin
+  i:=1;
+  while i<=length(s) do begin
+    if s[i]=#13 then delete (s,i,1) else inc (i);
+  end;
+  Result:=s;
+end;
+
+{$ifdef dx_midstr_in_AnsiStrings}
+function MidStr(const AText: RawUtf8String; const AStart, ACount: Integer): RawUtf8String; overload; inline;
+begin
+  Result := System.AnsiStrings.MidStr(AText, AStart, ACount);
+end;
+{$endif dx_midstr_in_AnsiStrings}
+
+function EnsureLineBreakInTranslatedString (s:RawUtf8String):RawUtf8String;
+{$ifdef MSWINDOWS}
+var
+  i:integer;
+{$endif}
+begin
+  {$ifdef MSWINDOWS}
+  Assert (sLinebreak=ansistring(#13#10));
+  i:=1;
+  while i<=length(s) do begin
+    if (s[i]=#10) and (MidStr(s,i-1,1)<>#13) then begin
+      insert (#13,s,i);
+      inc (i,2);
+    end else
+      inc (i);
+  end;
+  {$endif}
+  Result:=s;
+end;
+
+function IsWriteProp(Info: PPropInfo): Boolean;
+begin
+  Result := Assigned(Info) and (Info^.SetProc <> nil);
+end;
+
+function ResourceStringGettext(MsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  Result := DefaultInstance.ResourceStringGettext(MsgId);
+end;
+
+function ComponentGettext(MsgId: MsgIdString; Instance: TGnuGettextInstance = nil): TranslatedUnicodeString;
+var
+  i:integer;
+begin
+  if (MsgID='') or (ComponentDomainListCS=nil) then begin
+    // This only happens during very complicated program startups that fail,
+    // or when Msgid=''
+    Result:=MsgId;
+    exit;
+  end;
+
+  // First, get the value from the default domain
+  if Assigned(Instance) then
+    Result:=Instance.dgettext(Instance.curmsgdomain, MsgId)
+  else
+    Result:=dgettext(DefaultInstance.curmsgdomain, MsgId);
+  if Result<>MsgId then
+    exit;
+
+  // If it was not in the default domain, then go through the others
+  ComponentDomainListCS.BeginRead;
+  try
+    for i:=0 to ComponentDomainList.Count-1 do begin
+      if Assigned(Instance) then
+        Result:=Instance.dgettext(ComponentDomainList.Strings[i], MsgId)
+      else
+        Result:=dgettext(ComponentDomainList.Strings[i], MsgId);
+      if Result<>MsgId then
+        break;
+    end;
+  finally
+    ComponentDomainListCS.EndRead;
+  end;
+end;
+
+function gettext(const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  Result := DefaultInstance.gettext(szMsgId);
+end;
+
+function gettext_NoExtract(const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  // This one is very useful for translating text in variables.
+  // This can sometimes be necessary, and by using this function,
+  // the source code scanner will not trigger warnings.
+  Result := gettext(szMsgId);
+end;
+
+function gettext_NoOp(const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  //*** With this function Strings can be added to the po-file without beeing
+  //    ResourceStrings (dxgettext will add the string and this function will
+  //    return it without a change)
+  //    see gettext manual
+  //      4.7 - Special Cases of Translatable Strings
+  //      http://www.gnu.org/software/hello/manual/gettext/Special-cases.html#Special-cases
+  Result := DefaultInstance.gettext_NoOp(szMsgId);
+end;
+
+{*------------------------------------------------------------------------------
+  This is the main translation procedure used in programs. It takes a parameter,
+  looks it up in the translation dictionary, and returns the translation.
+  If no translation is found, the parameter is returned.
+
+  @param szMsgId The text, that should be displayed if no translation is found.
+-------------------------------------------------------------------------------}
+function _(const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  Result:=DefaultInstance.gettext(szMsgId);
+end;
+
+{*------------------------------------------------------------------------------
+  Translates a text, using a specified translation domain.
+  If no translation is found, the parameter is returned.
+
+  @param szDomain Which translation domain that should be searched for a translation.
+  @param szMsgId The text, that should be displayed if no translation is found.
+-------------------------------------------------------------------------------}
+function dgettext(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  Result:=DefaultInstance.dgettext(szDomain, szMsgId);
+end;
+
+function dgettext_NoExtract(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  // This one is very useful for translating text in variables.
+  // This can sometimes be necessary, and by using this function,
+  // the source code scanner will not trigger warnings.
+  Result := dgettext(szDomain, szMsgId);
+end;
+
+function dgettext_NoOp(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  //*** With this function Strings can be added to the po-file without being
+  //    ResourceStrings (dxgettext will add the string and this function will
+  //    return it without a change)
+  //    see gettext manual
+  //      4.7 - Special Cases of Translatable Strings
+  //      http://www.gnu.org/software/hello/manual/gettext/Special-cases.html#Special-cases
+  Result := DefaultInstance.dgettext_NoOp(szDomain, szMsgId);
+end;
+
+function dngettext(const szDomain: DomainString; const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+begin
+  Result:=DefaultInstance.dngettext(szDomain,singular,plural,Number);
+end;
+
+function ngettext(const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+begin
+  Result:=DefaultInstance.ngettext(singular,plural,Number);
+end;
+
+function ngettext_NoExtract(const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+begin
+  // This one is very useful for translating text in variables.
+  // This can sometimes be necessary, and by using this function,
+  // the source code scanner will not trigger warnings.
+  Result := ngettext(singular, plural, Number);
+end;
+
+function pgettext(const szMsgCtxt,szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  Result:=DefaultInstance.pgettext(szMsgCtxt,szMsgId);
+end;
+
+function pdgettext(const szDomain: DomainString; const szMsgCtxt,szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  Result:=DefaultInstance.pdgettext(szDomain,szMsgCtxt,szMsgId);
+end;
+
+function pngettext(const szMsgCtxt,singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+begin
+  Result:=DefaultInstance.pngettext(szMsgCtxt,singular,plural,Number);
+end;
+
+function pdngettext(const szDomain: DomainString; const szMsgCtxt,singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+begin
+  Result:=DefaultInstance.pdngettext(szDomain,szMsgCtxt,singular,plural,Number);
+end;
+
+procedure textdomain(const szDomain: Domainstring);
+begin
+  DefaultInstance.textdomain(szDomain);
+end;
+
+procedure SetGettextEnabled (enabled:boolean);
+begin
+  DefaultInstance.Enabled:=enabled;
+end;
+
+function getcurrenttextdomain: DomainString;
+begin
+  Result:=DefaultInstance.getcurrenttextdomain;
+end;
+
+procedure bindtextdomain(const szDomain: DomainString; const szDirectory: FilenameString);
+begin
+  DefaultInstance.bindtextdomain(szDomain, szDirectory);
+end;
+
+procedure TP_Ignore(AnObject:TObject; const name:FilenameString);
+begin
+  DefaultInstance.TP_Ignore(AnObject, name);
+end;
+
+procedure TP_GlobalIgnoreClass (IgnClass:TClass);
+begin
+  DefaultInstance.TP_GlobalIgnoreClass(IgnClass);
+end;
+
+function TP_TryGlobalIgnoreClass (IgnClass:TClass): boolean;
+begin
+  Result := DefaultInstance.TP_TryGlobalIgnoreClass (IgnClass);
+end;
+
+procedure TP_IgnoreClass (IgnClass:TClass);
+begin
+  DefaultInstance.TP_IgnoreClass(IgnClass);
+end;
+
+procedure TP_IgnoreClassProperty (IgnClass:TClass;const propertyname:ComponentNameString);
+begin
+  DefaultInstance.TP_IgnoreClassProperty(IgnClass,propertyname);
+end;
+
+procedure TP_GlobalIgnoreClassProperty (IgnClass:TClass;const propertyname:ComponentNameString);
+begin
+  DefaultInstance.TP_GlobalIgnoreClassProperty(IgnClass,propertyname);
+end;
+
+procedure TP_GlobalHandleClass (HClass:TClass;Handler:TTranslator);
+begin
+  DefaultInstance.TP_GlobalHandleClass (HClass, Handler);
+end;
+
+procedure TP_Remember(AnObject: TObject; PropName:ComponentNameString; OldValue:TranslatedUnicodeString);
+begin
+  DefaultInstance.TP_Remember(AnObject, PropName, OldValue);
+end;
+
+procedure TranslateComponent(AnObject: TComponent; const TextDomain:DomainString='');
+begin
+  DefaultInstance.TranslateComponent(AnObject, TextDomain);
+end;
+
+procedure RetranslateComponent(AnObject: TComponent; const TextDomain:DomainString='');
+begin
+  DefaultInstance.RetranslateComponent(AnObject, TextDomain);
+end;
+
+{$ifdef MSWINDOWS}
+
+// These constants are only used in Windows 95
+// Thanks to Frank Andreas de Groot for this table
+const
+  IDAfrikaans                 = $0436;  IDAlbanian                  = $041C;
+  IDArabicAlgeria             = $1401;  IDArabicBahrain             = $3C01;
+  IDArabicEgypt               = $0C01;  IDArabicIraq                = $0801;
+  IDArabicJordan              = $2C01;  IDArabicKuwait              = $3401;
+  IDArabicLebanon             = $3001;  IDArabicLibya               = $1001;
+  IDArabicMorocco             = $1801;  IDArabicOman                = $2001;
+  IDArabicQatar               = $4001;  IDArabic                    = $0401;
+  IDArabicSyria               = $2801;  IDArabicTunisia             = $1C01;
+  IDArabicUAE                 = $3801;  IDArabicYemen               = $2401;
+  IDArmenian                  = $042B;  IDAssamese                  = $044D;
+  IDAzeriCyrillic             = $082C;  IDAzeriLatin                = $042C;
+  IDBasque                    = $042D;  IDByelorussian              = $0423;
+  IDBengali                   = $0445;  IDBulgarian                 = $0402;
+  IDBurmese                   = $0455;  IDCatalan                   = $0403;
+  IDChineseHongKong           = $0C04;  IDChineseMacao              = $1404;
+  IDSimplifiedChinese         = $0804;  IDChineseSingapore          = $1004;
+  IDTraditionalChinese        = $0404;  IDCroatian                  = $041A;
+  IDCzech                     = $0405;  IDDanish                    = $0406;
+  IDBelgianDutch              = $0813;  IDDutch                     = $0413;
+  IDEnglishAUS                = $0C09;  IDEnglishBelize             = $2809;
+  IDEnglishCanadian           = $1009;  IDEnglishCaribbean          = $2409;
+  IDEnglishIreland            = $1809;  IDEnglishJamaica            = $2009;
+  IDEnglishNewZealand         = $1409;  IDEnglishPhilippines        = $3409;
+  IDEnglishSouthAfrica        = $1C09;  IDEnglishTrinidad           = $2C09;
+  IDEnglishUK                 = $0809;  IDEnglishUS                 = $0409;
+  IDEnglishZimbabwe           = $3009;  IDEstonian                  = $0425;
+  IDFaeroese                  = $0438;  IDFarsi                     = $0429;
+  IDFinnish                   = $040B;  IDBelgianFrench             = $080C;
+  IDFrenchCameroon            = $2C0C;  IDFrenchCanadian            = $0C0C;
+  IDFrenchCotedIvoire         = $300C;  IDFrench                    = $040C;
+  IDFrenchLuxembourg          = $140C;  IDFrenchMali                = $340C;
+  IDFrenchMonaco              = $180C;  IDFrenchReunion             = $200C;
+  IDFrenchSenegal             = $280C;  IDSwissFrench               = $100C;
+  IDFrenchWestIndies          = $1C0C;  IDFrenchZaire               = $240C;
+  IDFrisianNetherlands        = $0462;  IDGaelicIreland             = $083C;
+  IDGaelicScotland            = $043C;  IDGalician                  = $0456;
+  IDGeorgian                  = $0437;  IDGermanAustria             = $0C07;
+  IDGerman                    = $0407;  IDGermanLiechtenstein       = $1407;
+  IDGermanLuxembourg          = $1007;  IDSwissGerman               = $0807;
+  IDGreek                     = $0408;  IDGujarati                  = $0447;
+  IDHebrew                    = $040D;  IDHindi                     = $0439;
+  IDHungarian                 = $040E;  IDIcelandic                 = $040F;
+  IDIndonesian                = $0421;  IDItalian                   = $0410;
+  IDSwissItalian              = $0810;  IDJapanese                  = $0411;
+  IDKannada                   = $044B;  IDKashmiri                  = $0460;
+  IDKazakh                    = $043F;  IDKhmer                     = $0453;
+  IDKirghiz                   = $0440;  IDKonkani                   = $0457;
+  IDKorean                    = $0412;  IDLao                       = $0454;
+  IDLatvian                   = $0426;  IDLithuanian                = $0427;
+  IDMacedonian                = $042F;  IDMalaysian                 = $043E;
+  IDMalayBruneiDarussalam     = $083E;  IDMalayalam                 = $044C;
+  IDMaltese                   = $043A;  IDManipuri                  = $0458;
+  IDMarathi                   = $044E;  IDMongolian                 = $0450;
+  IDNepali                    = $0461;  IDNorwegianBokmol           = $0414;
+  IDNorwegianNynorsk          = $0814;  IDOriya                     = $0448;
+  IDPolish                    = $0415;  IDBrazilianPortuguese       = $0416;
+  IDPortuguese                = $0816;  IDPunjabi                   = $0446;
+  IDRhaetoRomanic             = $0417;  IDRomanianMoldova           = $0818;
+  IDRomanian                  = $0418;  IDRussianMoldova            = $0819;
+  IDRussian                   = $0419;  IDSamiLappish               = $043B;
+  IDSanskrit                  = $044F;  IDSerbianCyrillic           = $0C1A;
+  IDSerbianLatin              = $081A;  IDSesotho                   = $0430;
+  IDSindhi                    = $0459;  IDSlovak                    = $041B;
+  IDSlovenian                 = $0424;  IDSorbian                   = $042E;
+  IDSpanishArgentina          = $2C0A;  IDSpanishBolivia            = $400A;
+  IDSpanishChile              = $340A;  IDSpanishColombia           = $240A;
+  IDSpanishCostaRica          = $140A;  IDSpanishDominicanRepublic  = $1C0A;
+  IDSpanishEcuador            = $300A;  IDSpanishElSalvador         = $440A;
+  IDSpanishGuatemala          = $100A;  IDSpanishHonduras           = $480A;
+  IDMexicanSpanish            = $080A;  IDSpanishNicaragua          = $4C0A;
+  IDSpanishPanama             = $180A;  IDSpanishParaguay           = $3C0A;
+  IDSpanishPeru               = $280A;  IDSpanishPuertoRico         = $500A;
+  IDSpanishModernSort         = $0C0A;  IDSpanish                   = $040A;
+  IDSpanishUruguay            = $380A;  IDSpanishVenezuela          = $200A;
+  IDSutu                      = $0430;  IDSwahili                   = $0441;
+  IDSwedishFinland            = $081D;  IDSwedish                   = $041D;
+  IDTajik                     = $0428;  IDTamil                     = $0449;
+  IDTatar                     = $0444;  IDTelugu                    = $044A;
+  IDThai                      = $041E;  IDTibetan                   = $0451;
+  IDTsonga                    = $0431;  IDTswana                    = $0432;
+  IDTurkish                   = $041F;  IDTurkmen                   = $0442;
+  IDUkrainian                 = $0422;  IDUrdu                      = $0420;
+  IDUzbekCyrillic             = $0843;  IDUzbekLatin                = $0443;
+  IDVenda                     = $0433;  IDVietnamese                = $042A;
+  IDWelsh                     = $0452;  IDXhosa                     = $0434;
+  IDZulu                      = $0435;
+
+function GetWindowsLanguage: WideString;
+var
+  langid: Cardinal;
+  langcode: WideString;
+  CountryName: array[0..4] of widechar;
+  LanguageName: array[0..4] of widechar;
+  works: boolean;
+begin
+  // The return value of GetLocaleInfo is compared with 3 = 2 characters and a zero
+  works := 3 = GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME, LanguageName, SizeOf(LanguageName));
+  works := works and (3 = GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, CountryName, SizeOf(CountryName)));
+  if works then begin
+    // Windows 98, Me, NT4, 2000, XP and newer
+    LangCode := PWideChar(@(LanguageName[0]));
+    if lowercase(LangCode)='no' then LangCode:='nb';
+    LangCode:=LangCode + '_' + PWideChar(@CountryName[0]);
+  end else begin
+    // This part should only happen on Windows 95.
+    langid := GetThreadLocale;
+    case langid of
+      IDBelgianDutch: langcode := 'nl_BE';
+      IDBelgianFrench: langcode := 'fr_BE';
+      IDBrazilianPortuguese: langcode := 'pt_BR';
+      IDDanish: langcode := 'da_DK';
+      IDDutch: langcode := 'nl_NL';
+      IDEnglishUK: langcode := 'en_GB';
+      IDEnglishUS: langcode := 'en_US';
+      IDFinnish: langcode := 'fi_FI';
+      IDFrench: langcode := 'fr_FR';
+      IDFrenchCanadian: langcode := 'fr_CA';
+      IDGerman: langcode := 'de_DE';
+      IDGermanLuxembourg: langcode := 'de_LU';
+      IDGreek: langcode := 'el_GR';
+      IDIcelandic: langcode := 'is_IS';
+      IDItalian: langcode := 'it_IT';
+      IDKorean: langcode := 'ko_KO';
+      IDNorwegianBokmol: langcode := 'nb_NO';
+      IDNorwegianNynorsk: langcode := 'nn_NO';
+      IDPolish: langcode := 'pl_PL';
+      IDPortuguese: langcode := 'pt_PT';
+      IDRussian: langcode := 'ru_RU';
+      IDSpanish, IDSpanishModernSort: langcode := 'es_ES';
+      IDSwedish: langcode := 'sv_SE';
+      IDSwedishFinland: langcode := 'sv_FI';
+    else
+      langcode := 'C';
+    end;
+  end;
+  Result := langcode;
+end;
+{$endif}
+
+{$ifndef UNICODE}
+function LoadResStringA(ResStringRec: PResStringRec): ansistring;
+begin
+  Result:=DefaultInstance.LoadResString(ResStringRec);
+end;
+{$endif}
+
+function GetTranslatorNameAndEmail:TranslatedUnicodeString;
+begin
+  Result:=DefaultInstance.GetTranslatorNameAndEmail;
+end;
+
+procedure UseLanguage(LocaleName: LanguageString);
+begin
+  DefaultInstance.UseLanguage(LocaleName);
+end;
+
+type
+{$ifdef dx_Hinstance_is_Integer}
+  THInstanceType = Integer;
+{$else dx_Hinstance_is_Integer}
+  THInstanceType = NativeInt;
+{$endif dx_Hinstance_is_Integer}
+
+{$ifdef dx_NativeInt_is_Integer}
+  TNativeInt = Integer;
+{$else dx_NativeInt_is_Integer}
+  TNativeInt = NativeInt;
+{$endif dx_NativeInt_is_Integer}
+
+type
+  PStrData = ^TStrData;
+  TStrData = record
+    Ident: TNativeInt;
+    Str: String;
+  end;
+
+function SysUtilsEnumStringModules(Instance: THInstanceType; Data: Pointer): Boolean;
+{$IFDEF MSWINDOWS}
+var
+  Buffer: array [0..1023] of Char; // WideChar in Delphi 2009, AnsiChar before that
+begin
+  with PStrData(Data)^ do begin
+    SetString(Str, Buffer,
+      LoadString(Instance, Ident, @Buffer[0], Length(Buffer)));
+    Result := Str = '';
+  end;
+end;
+{$ENDIF}
+{$IFDEF LINUX}
+var
+  rs:TResStringRec;
+  Module:HModule;
+begin
+  Module:=Instance;
+  rs.Module:=@Module;
+  with PStrData(Data)^ do begin
+    rs.Identifier:=Ident;
+    Str:=System.LoadResString(@rs);
+    Result:=Str='';
+  end;
+end;
+{$ENDIF}
+
+function SysUtilsFindStringResource(Ident: TNativeInt): string;
+var
+  StrData: TStrData;
+begin
+  StrData.Ident := Ident;
+  StrData.Str := '';
+  EnumResourceModules(SysUtilsEnumStringModules, @StrData);
+  Result := StrData.Str;
+end;
+
+function SysUtilsLoadStr(Ident: Integer): string;
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DefaultInstance.DebugWriteln ('Sysutils.LoadRes('+IntToStr(ident)+') called');
+  {$endif}
+  Result := ResourceStringGettext(SysUtilsFindStringResource(Ident));
+end;
+
+function SysUtilsFmtLoadStr(Ident: Integer; const Args: array of const): string;
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DefaultInstance.DebugWriteln ('Sysutils.FmtLoadRes('+IntToStr(ident)+',Args) called');
+  {$endif}
+  FmtStr(Result, ResourceStringGettext(SysUtilsFindStringResource(Ident)),Args);
+end;
+
+function LoadResString(ResStringRec: PResStringRec): widestring;
+begin
+  Result:=DefaultInstance.LoadResString(ResStringRec);
+end;
+
+function LoadResStringW(ResStringRec: PResStringRec): UnicodeString;
+begin
+  Result:=DefaultInstance.LoadResString(ResStringRec);
+end;
+
+function PLoadResString(const szMsgCtxt: MsgIdString; ResStringRec: PResStringRec): widestring;
+begin
+  Result:=DefaultInstance.PLoadResString(szMsgCtxt,ResStringRec);
+end;
+
+function PLoadResStringW(const szMsgCtxt: MsgIdString; ResStringRec: PResStringRec): UnicodeString;
+begin
+  Result:=DefaultInstance.PLoadResString(szMsgCtxt,ResStringRec);
+end;
+
+function GetCurrentLanguage:LanguageString;
+begin
+  Result:=GetCurrentLocaleName;
+end;
+
+function GetCurrentLocaleName: LanguageString;
+begin
+  Result:=DefaultInstance.GetCurrentLocaleName;
+end;
+
+function GetCurrentLanguageCode: LanguageString;
+begin
+  Result := LocaleNameToLanguageCode(GetCurrentLocaleName);
+end;
+
+function LocaleNameToLanguageCode(const ALocaleName: LanguageString): LanguageString;
+begin
+  Result := LowerCase(LeftStr(ALocaleName, 2));
+end;
+
+{ TDomain }
+
+procedure TDomain.CloseMoFile;
+begin
+  if mofile<>nil then begin
+    FileLocator.ReleaseMoFile(mofile);
+    mofile:=nil;
+  end;
+  OpenHasFailedBefore:=False;
+end;
+
+destructor TDomain.Destroy;
+begin
+  CloseMoFile;
+  inherited;
+end;
+
+{$ifdef mswindows}
+function GetLastWinError:widestring;
+var
+  errcode:Cardinal;
+begin
+  SetLength (Result,2000);
+  errcode:=GetLastError();
+  Windows.FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM,nil,errcode,0,PWideChar(Result),2000,nil);
+  Result:=PWideChar(Result);
+end;
+{$endif}
+
+procedure TDomain.OpenMoFile;
+var
+  filename: FilenameString;
+begin
+  // Check if it is already open
+  if mofile<>nil then
+    exit;
+
+  // Check if it has been attempted to open the file before
+  if OpenHasFailedBefore then
+    exit;
+
+  if SpecificFilename<>'' then begin
+    filename:=SpecificFilename;
+    {$ifdef DXGETTEXTDEBUG}
+    DebugLogger ('Domain '+domain+' is bound to specific file '+filename);
+    {$endif}
+  end else begin
+    filename := Directory + curlang + PathDelim + 'LC_MESSAGES' + PathDelim + domain + '.mo';
+    if (not FileLocator.FileExists(filename)) and (not fileexists(filename)) then begin
+      {$ifdef DXGETTEXTDEBUG}
+      DebugLogger ('Domain '+domain+': File does not exist, neither embedded or in file system: '+filename);
+      {$endif}
+      filename := Directory + MidStr(curlang, 1, 2) + PathDelim + 'LC_MESSAGES' + PathDelim + domain + '.mo';
+      {$ifdef DXGETTEXTDEBUG}
+      DebugLogger ('Domain '+domain+' will attempt to use this file: '+filename);
+      {$endif}
+    end else begin
+      {$ifdef DXGETTEXTDEBUG}
+      if FileLocator.FileExists(filename) then
+        DebugLogger ('Domain '+domain+' will attempt to use this embedded file: '+filename)
+      else
+        DebugLogger ('Domain '+domain+' will attempt to use this file that was found on the file system: '+filename);
+      {$endif}
+    end;
+  end;
+  if (not FileLocator.FileExists(filename)) and (not fileexists(filename)) then begin
+    {$ifdef DXGETTEXTDEBUG}
+    DebugLogger ('Domain '+domain+' failed to locate the file: '+filename);
+    {$endif}
+    OpenHasFailedBefore:=True;
+    exit;
+  end;
+  {$ifdef DXGETTEXTDEBUG}
+  DebugLogger ('Domain '+domain+' now accesses the file.');
+  {$endif}
+  mofile:=FileLocator.GetMoFile(filename, DebugLogger);
+
+  {$ifdef DXGETTEXTDEBUG}
+  if mofile.isSwappedArchitecture then
+    DebugLogger ('.mo file is swapped (comes from another CPU architecture)');
+  {$endif}
+
+  // Check, that the contents of the file is utf-8
+  if pos('CHARSET=UTF-8',uppercase(GetTranslationProperty('Content-Type')))=0 then begin
+    CloseMoFile;
+    {$ifdef DXGETTEXTDEBUG}
+    DebugLogger ('The translation for the language code '+curlang+' (in '+filename+') does not have charset=utf-8 in its Content-Type. Translations are turned off.');
+    {$endif}
+    {$ifdef MSWINDOWS}
+    MessageBoxW(0,PWideChar(widestring('The translation for the language code '+curlang+' (in '+filename+') does not have charset=utf-8 in its Content-Type. Translations are turned off.')),'Localization problem',MB_OK);
+    {$else}
+    writeln (stderr,'The translation for the language code '+curlang+' (in '+filename+') does not have charset=utf-8 in its Content-Type. Translations are turned off.');
+    {$endif}
+    Enabled:=False;
+  end;
+end;
+
+{$IFDEF UNICODE}
+function utf8decode (s:RawByteString):UnicodeString; {$ifdef dx_has_Inline}inline;{$endif}
+begin
+  Result:=UTF8ToUnicodeString(s);
+end;
+{$endif}
+
+function TDomain.GetTranslationProperty(
+  Propertyname: ComponentNameString): TranslatedUnicodeString;
+var
+  sl:TStringList;
+  i:integer;
+  s:string;
+begin
+  Propertyname:=uppercase(Propertyname)+': ';
+  sl:=TStringList.Create;
+  try
+    sl.Text:=utf8decode(gettext(''));
+    for i:=0 to sl.Count-1 do begin
+      s:=sl.Strings[i];
+      if uppercase(MidStr(s,1,length(Propertyname)))=Propertyname then begin
+        Result:=trim(MidStr(s,length(PropertyName)+1,maxint));
+
+        {$ifdef DXGETTEXTDEBUG}
+        DebugLogger ('GetTranslationProperty('+PropertyName+') returns '''+Result+'''.');
+        {$endif}
+        exit;
+      end;
+    end;
+  finally
+    FreeAndNil (sl);
+  end;
+  Result:='';
+  {$ifdef DXGETTEXTDEBUG}
+  DebugLogger ('GetTranslationProperty('+PropertyName+') did not find any value. An empty string is returned.');
+  {$endif}
+end;
+
+procedure TDomain.setDirectory(const dir: FilenameString);
+begin
+  vDirectory := IncludeTrailingPathDelimiter(dir);
+  SpecificFilename:='';
+  CloseMoFile;
+end;
+
+procedure AddDomainForResourceString (const domain:DomainString);
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DefaultInstance.DebugWriteln ('Extra domain for resourcestring: '+domain);
+  {$endif}
+  ResourceStringDomainListCS.BeginWrite;
+  try
+    if ResourceStringDomainList.IndexOf(domain)=-1 then
+      ResourceStringDomainList.Add (domain);
+  finally
+    ResourceStringDomainListCS.EndWrite;
+  end;
+end;
+
+procedure RemoveDomainForResourceString (const domain:DomainString);
+var
+  i:integer;
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DefaultInstance.DebugWriteln ('Remove domain for resourcestring: '+domain);
+  {$endif}
+  ResourceStringDomainListCS.BeginWrite;
+  try
+    i:=ResourceStringDomainList.IndexOf(domain);
+    if i<>-1 then
+      ResourceStringDomainList.Delete (i);
+  finally
+    ResourceStringDomainListCS.EndWrite;
+  end;
+end;
+
+procedure AddDomainForComponent (const domain:DomainString);
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DefaultInstance.DebugWriteln ('Extra domain for component: '+domain);
+  {$endif}
+  ComponentDomainListCS.BeginWrite;
+  try
+    if ComponentDomainList.IndexOf(domain)=-1 then
+      ComponentDomainList.Add (domain);
+  finally
+    ComponentDomainListCS.EndWrite;
+  end;
+end;
+
+procedure RemoveDomainForComponent (const domain:DomainString);
+var
+  i:integer;
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DefaultInstance.DebugWriteln ('Remove domain for component: '+domain);
+  {$endif}
+  ComponentDomainListCS.BeginWrite;
+  try
+    i:=ComponentDomainList.IndexOf(domain);
+    if i<>-1 then
+      ComponentDomainList.Delete (i);
+  finally
+    ComponentDomainListCS.EndWrite;
+  end;
+end;
+
+procedure TDomain.SetLanguageCode(const langcode: LanguageString);
+begin
+  CloseMoFile;
+  curlang:=langcode;
+end;
+
+function GetPluralForm2EN(Number: Integer): Integer;
+begin
+  Number:=abs(Number);
+  if Number=1 then Result:=0 else Result:=1;
+end;
+
+function GetPluralForm1(Number: Integer): Integer;
+begin
+  Result:=0;
+end;
+
+function GetPluralForm2FR(Number: Integer): Integer;
+begin
+  Number:=abs(Number);
+  if (Number=1) or (Number=0) then Result:=0 else Result:=1;
+end;
+
+function GetPluralForm3LV(Number: Integer): Integer;
+begin
+  Number:=abs(Number);
+  if (Number mod 10=1) and (Number mod 100<>11) then
+    Result:=0
+  else
+    if Number<>0 then Result:=1
+                 else Result:=2;
+end;
+
+function GetPluralForm3GA(Number: Integer): Integer;
+begin
+  Number:=abs(Number);
+  if Number=1 then Result:=0
+  else if Number=2 then Result:=1
+  else Result:=2;
+end;
+
+function GetPluralForm3LT(Number: Integer): Integer;
+var
+  n1,n2:byte;
+begin
+  Number:=abs(Number);
+  n1:=Number mod 10;
+  n2:=Number mod 100;
+  if (n1=1) and (n2<>11) then
+    Result:=0
+  else
+    if (n1>=2) and ((n2<10) or (n2>=20)) then Result:=1
+    else Result:=2;
+end;
+
+function GetPluralForm3PL(Number: Integer): Integer;
+var
+  n1,n2:byte;
+begin
+  Number:=abs(Number);
+  n1:=Number mod 10;
+  n2:=Number mod 100;
+
+  if Number=1 then Result:=0
+  else if (n1>=2) and (n1<=4) and ((n2<10) or (n2>=20)) then Result:=1
+  else Result:=2;
+end;
+
+function GetPluralForm3RU(Number: Integer): Integer;
+var
+  n1,n2:byte;
+begin
+  Number:=abs(Number);
+  n1:=Number mod 10;
+  n2:=Number mod 100;
+  if (n1=1) and (n2<>11) then
+    Result:=0
+  else
+    if (n1>=2) and (n1<=4) and ((n2<10) or (n2>=20)) then Result:=1
+    else Result:=2;
+end;
+
+function GetPluralForm3SK(Number: Integer): Integer;
+begin
+  Number:=abs(Number);
+  if number=1 then Result:=0
+  else if (number<5) and (number<>0) then Result:=1
+  else Result:=2;
+end;
+
+function GetPluralForm4SL(Number: Integer): Integer;
+var
+  n2:byte;
+begin
+  Number:=abs(Number);
+  n2:=Number mod 100;
+  if n2=1 then Result:=0
+  else
+  if n2=2 then Result:=1
+  else
+  if (n2=3) or (n2=4) then Result:=2
+  else
+    Result:=3;
+end;
+
+procedure TDomain.GetListOfLanguages(list: TStrings);
+var
+  sr:TSearchRec;
+  more:boolean;
+  filename, path:FilenameString;
+  langcode:LanguageString;
+  i, j:integer;
+begin
+  list.Clear;
+
+  // Iterate through filesystem
+  more:=FindFirst (Directory+'*',faAnyFile,sr)=0;
+  try
+    while more do begin
+      if (sr.Attr and faDirectory<>0) and (sr.name<>'.') and (sr.name<>'..') then begin
+        filename := Directory + sr.Name + PathDelim + 'LC_MESSAGES' + PathDelim + domain + '.mo';
+        if fileexists(filename) then begin
+          langcode:=lowercase(sr.name);
+          if list.IndexOf(langcode)=-1 then
+            list.Add(langcode);
+        end;
+      end;
+      more:=FindNext (sr)=0;
+    end;
+  finally
+    FindClose (sr);
+  end;
+
+  // Iterate through embedded files
+  for i:=0 to FileLocator.filelist.Count-1 do begin
+    filename:=FileLocator.basedirectory+FileLocator.filelist.Strings[i];
+    path:=Directory;
+    {$ifdef MSWINDOWS}
+    path:=uppercase(path);
+    filename:=uppercase(filename);
+    {$endif}
+    j:=length(path);
+    if MidStr(filename,1,j)=path then begin
+      path:=PathDelim + 'LC_MESSAGES' + PathDelim + domain + '.mo';
+      {$ifdef MSWINDOWS}
+      path:=uppercase(path);
+      {$endif}
+      if MidStr(filename,length(filename)-length(path)+1,length(path))=path then begin
+        langcode:=lowercase(MidStr(filename,j+1,length(filename)-length(path)-j));
+        langcode:=LeftStr(langcode,3)+uppercase(MidStr(langcode,4,maxint));
+        if list.IndexOf(langcode)=-1 then
+          list.Add(langcode);
+      end;
+    end;
+  end;
+end;
+
+procedure TDomain.SetFilename(const filename: FilenameString);
+begin
+  CloseMoFile;
+  vDirectory := '';
+  SpecificFilename:=filename;
+end;
+
+function TDomain.gettext(const msgid: RawUtf8String): RawUtf8String;
+var
+  found:boolean;
+begin
+  if not Enabled then begin
+    Result:=msgid;
+    exit;
+  end;
+  if (mofile=nil) and (not OpenHasFailedBefore) then
+    OpenMoFile;
+  if mofile=nil then begin
+    {$ifdef DXGETTEXTDEBUG}
+    DebugLogger('.mo file is not open. Not translating "'+string(msgid)+'"');
+    {$endif}
+    Result := msgid;
+  end else begin
+    Result:=mofile.gettext(msgid,found);
+    {$ifdef DXGETTEXTDEBUG}
+    if found then
+      DebugLogger ('Found in .mo ('+Domain+'): "'+string(utf8encode(msgid))+'"->"'+string(utf8encode(Result))+'"')
+    else
+      DebugLogger ('Translation not found in .mo file ('+Domain+') : "'+string(utf8encode(msgid))+'"');
+    {$endif}
+  end;
+end;
+
+constructor TDomain.Create;
+begin
+  inherited Create;
+  Enabled:=True;
+end;
+
+{ TGnuGettextInstance }
+
+procedure TGnuGettextInstance.bindtextdomain(const szDomain:DomainString;
+  const szDirectory: FilenameString);
+var
+  dir:FilenameString;
+begin
+  dir:=IncludeTrailingPathDelimiter(szDirectory);
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('Text domain "'+szDomain+'" is now located at "'+dir+'"');
+  {$endif}
+  getdomain(szDomain,DefaultDomainDirectory,CurLang).Directory := dir;
+  WhenNewDomainDirectory (szDomain, szDirectory);
+end;
+
+constructor TGnuGettextInstance.Create(LocaleName: LanguageString = '');
+begin
+  {$ifdef dx_EMPTY_TO_EMPTY}
+  EmptyToEmpty := True;
+  {$endif}
+
+  {$ifdef MSWindows}
+  DesignTimeCodePage:=CP_ACP;
+  {$endif}
+  {$ifdef DXGETTEXTDEBUG}
+  DebugLogCS:=TMultiReadExclusiveWriteSynchronizer.Create;
+  DebugLog:=TMemoryStream.Create;
+  DebugWriteln('Debug log started '+DateTimeToStr(Now));
+  DebugWriteln('GNU gettext module version: '+VCSVersion);
+  DebugWriteln('');
+  {$endif}
+  curGetPluralForm:=GetPluralForm2EN;
+  Enabled:=True;
+  SearchAllDomains:=False;
+  curmsgdomain:=DefaultTextDomain;
+  savefileCS := TMultiReadExclusiveWriteSynchronizer.Create;
+  domainlist := TStringList.Create;
+  TP_IgnoreList:=TStringList.Create;
+  TP_IgnoreList.Sorted:=True;
+  TP_GlobalClassHandling:=TList.Create;
+  TP_ClassHandling:=TList.Create;
+  fWhenNewLanguageListeners := TInterfaceList.Create;
+
+  // Set some settings
+  DefaultDomainDirectory := IncludeTrailingPathDelimiter(extractfilepath(ExecutableFilename))+'locale';
+
+  UseLanguage(LocaleName);
+
+  bindtextdomain(DefaultTextDomain, DefaultDomainDirectory);
+  textdomain(DefaultTextDomain);
+
+  // Add default properties to ignore
+  TP_GlobalIgnoreClassProperty(TComponent,'Name');
+  TP_GlobalIgnoreClassProperty(TCollection,'PropName');
+end;
+
+destructor TGnuGettextInstance.Destroy;
+begin
+  if savememory <> nil then begin
+    savefileCS.BeginWrite;
+    try
+      CloseFile(savefile);
+    finally
+      savefileCS.EndWrite;
+    end;
+    FreeAndNil(savememory);
+  end;
+  FreeAndNil (savefileCS);
+  FreeAndNil (TP_IgnoreList);
+  while TP_GlobalClassHandling.Count<>0 do begin
+    TObject(TP_GlobalClassHandling.Items[0]).Free;
+    TP_GlobalClassHandling.Delete(0);
+  end;
+  FreeAndNil (TP_GlobalClassHandling);
+  FreeTP_ClassHandlingItems;
+  FreeAndNil (TP_ClassHandling);
+  while domainlist.Count <> 0 do begin
+    domainlist.Objects[0].Free;
+    domainlist.Delete(0);
+  end;
+  FreeAndNil(domainlist);
+  fWhenNewLanguageListeners.Free;
+  {$ifdef DXGETTEXTDEBUG}
+  FreeAndNil (DebugLog);
+  FreeAndNil (DebugLogCS);
+  {$endif}
+  inherited;
+end;
+
+{$ifndef UNICODE}
+function TGnuGettextInstance.dgettext(const szDomain: DomainString; const szMsgId: ansistring): TranslatedUnicodeString;
+begin
+  Result:=dgettext(szDomain, ansi2wideDTCP(szMsgId));
+end;
+{$endif}
+
+function TGnuGettextInstance.dgettext(const szDomain: DomainString;
+  const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  if not Enabled then begin
+    {$ifdef DXGETTEXTDEBUG}
+    DebugWriteln ('Translation has been disabled. Text is not being translated: '+szMsgid);
+    {$endif}
+    Result:=szMsgId;
+  end else begin
+    if EmptyToEmpty and (szMsgId = '') then begin
+      Result := '';
+    end else begin
+      Result:=UTF8Decode(EnsureLineBreakInTranslatedString(getdomain(szDomain,DefaultDomainDirectory,CurLang).gettext(StripCRRawMsgId(utf8encode(szMsgId)))));
+
+      {$ifdef DXGETTEXTDEBUG}
+      if (szMsgId<>'') and (Result='') then
+        DebugWriteln (Format('Error: Translation of %s was an empty string. This may never occur.',[szMsgId]));
+      {$endif}
+    end;
+  end;
+end;
+
+function TGnuGettextInstance.dgettext_NoExtract(const szDomain: DomainString;
+  const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  // This one is very useful for translating text in variables.
+  // This can sometimes be necessary, and by using this function,
+  // the source code scanner will not trigger warnings.
+  Result:=dgettext(szDomain,szMsgId);
+end;
+
+function TGnuGettextInstance.dgettext_NoOp(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  Result := gettext_NoOp( szMsgId);
+end;
+
+function TGnuGettextInstance.GetCurrentLanguage: LanguageString;
+begin
+  Result:=GetCurrentLocaleName;
+end;
+
+function TGnuGettextInstance.GetCurrentLanguageCode: LanguageString;
+begin
+  Result := LocaleNameToLanguageCode(GetCurrentLocaleName);
+end;
+
+function TGnuGettextInstance.GetCurrentLocaleName: LanguageString;
+begin
+  Result:=curlang;
+end;
+
+function TGnuGettextInstance.getcurrenttextdomain: DomainString;
+begin
+  Result := curmsgdomain;
+end;
+
+{$ifndef UNICODE}
+function TGnuGettextInstance.gettext(
+  const szMsgId: ansistring): TranslatedUnicodeString;
+var
+  domain: DomainString;
+  domainIndex: Integer;
+begin
+  Result := dgettext(curmsgdomain, szMsgId);
+  if SearchAllDomains and (szMsgId <> '') then begin
+    domainIndex := 0;
+    while (Result = szMsgId) and (domainIndex < domainlist.count) do begin
+      domain := domainlist[domainIndex];
+      Result := dgettext(domain, szMsgId);
+      Inc(domainIndex);
+    end;
+  end;
+end;
+{$endif}
+
+function TGnuGettextInstance.gettext(
+  const szMsgId: MsgIdString): TranslatedUnicodeString;
+var
+  domain: DomainString;
+  domainIndex: Integer;
+begin
+  Result := dgettext(curmsgdomain, szMsgId);
+  if SearchAllDomains and (szMsgId <> '') then begin
+    domainIndex := 0;
+    while (Result = szMsgId) and (domainIndex < domainlist.count) do begin
+      domain := domainlist[domainIndex];
+      Result := dgettext(domain, szMsgId);
+      Inc(domainIndex);
+    end;
+  end;
+end;
+
+function TGnuGettextInstance.gettext_NoExtract(
+  const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  // This one is very useful for translating text in variables.
+  // This can sometimes be necessary, and by using this function,
+  // the source code scanner will not trigger warnings.
+  Result:=gettext (szMsgId);
+end;
+
+function TGnuGettextInstance.gettext_NoOp(const szMsgId: MsgIdString): TranslatedUnicodeString;
+begin
+  //*** With this function Strings can be added to the po-file without being
+  //    ResourceStrings (dxgettext will add the string and this function will
+  //    return it without a change)
+  //    see gettext manual
+  //      4.7 - Special Cases of Translatable Strings
+  //      http://www.gnu.org/software/hello/manual/gettext/Special-cases.html#Special-cases
+  Result := TranslatedUnicodeString(szMsgId);
+end;
+
+procedure TGnuGettextInstance.pgettext_fixup(const szLookup,szMsgId: MsgIdString; var szTranslation: MsgIdString);
+begin
+  if szTranslation = szLookup then
+    szTranslation := szMsgId;
+end;
+
+function TGnuGettextInstance.pgettext(const szMsgCtxt,szMsgId: MsgIdString): TranslatedUnicodeString;
+var
+  lookup: MsgIdString;
+begin
+  lookup := szMsgCtxt + GETTEXT_CONTEXT_GLUE + szMsgId;
+  Result := gettext(lookup);
+  pgettext_fixup(lookup, szMsgId, Result);
+end;
+
+function TGnuGettextInstance.pdgettext(const szDomain: DomainString; const szMsgCtxt,szMsgId: MsgIdString): TranslatedUnicodeString;
+var
+  lookup: MsgIdString;
+begin
+  lookup := szMsgCtxt + GETTEXT_CONTEXT_GLUE + szMsgId;
+  Result := dgettext(szDomain, lookup);
+  pgettext_fixup(lookup, szMsgId, Result);
+end;
+
+function TGnuGettextInstance.pngettext(const szMsgCtxt,singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+var
+  lookup: MsgIdString;
+begin
+  lookup := szMsgCtxt + GETTEXT_CONTEXT_GLUE + singular;
+  Result := ngettext(lookup, plural, Number);
+  pgettext_fixup(lookup, singular, Result);
+end;
+
+function TGnuGettextInstance.pdngettext(const szDomain: DomainString; const szMsgCtxt,singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString;
+var
+  lookup: MsgIdString;
+begin
+  lookup := szMsgCtxt + GETTEXT_CONTEXT_GLUE + singular;
+  Result := dngettext(szDomain, lookup, plural, Number);
+  pgettext_fixup(lookup, singular, Result);
+end;
+
+procedure TGnuGettextInstance.textdomain(const szDomain: DomainString);
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('Changed text domain to "'+szDomain+'"');
+  {$endif}
+  curmsgdomain := szDomain;
+  WhenNewDomain (szDomain);
+end;
+
+function TGnuGettextInstance.TP_CreateRetranslator : TExecutable;
+var
+  ttpr:TTP_Retranslator;
+begin
+  ttpr:=TTP_Retranslator.Create;
+  ttpr.Instance:=self;
+  TP_Retranslator:=ttpr;
+  Result:=ttpr;
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('A retranslator was created.');
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.TP_GlobalHandleClass(HClass: TClass;
+  Handler: TTranslator);
+var
+  cm:TClassMode;
+  i:integer;
+begin
+  for i:=0 to TP_GlobalClassHandling.Count-1 do begin
+    cm:=TObject(TP_GlobalClassHandling.Items[i]) as TClassMode;
+    if cm.HClass=HClass then
+      raise EGGProgrammingError.Create ('You cannot set a handler for a class that has already been assigned otherwise.');
+    if HClass.InheritsFrom(cm.HClass) then begin
+      // This is the place to insert this class
+      cm:=TClassMode.Create;
+      cm.HClass:=HClass;
+      cm.SpecialHandler:=Handler;
+      TP_GlobalClassHandling.Insert(i,cm);
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('A handler was set for class '+HClass.ClassName+'.');
+      {$endif}
+      exit;
+    end;
+  end;
+  cm:=TClassMode.Create;
+  cm.HClass:=HClass;
+  cm.SpecialHandler:=Handler;
+  TP_GlobalClassHandling.Add(cm);
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('A handler was set for class '+HClass.ClassName+'.');
+  {$endif}
+end;
+
+function TGnuGettextInstance.TP_TryGlobalIgnoreClass (IgnClass:TClass): boolean;
+var
+  cm:TClassMode;
+  i:integer;
+begin
+  Result := false;
+  for i:=0 to TP_GlobalClassHandling.Count-1 do begin
+    cm:=TObject(TP_GlobalClassHandling.Items[i]) as TClassMode;
+    if cm.HClass=IgnClass then
+      exit; // class already in ignore list
+    if IgnClass.InheritsFrom(cm.HClass) then begin
+      // This is the place to insert this class
+      cm:=TClassMode.Create;
+      cm.HClass:=IgnClass;
+      TP_GlobalClassHandling.Insert(i,cm);
+      Result := true;
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('Globally, class '+IgnClass.ClassName+' is being ignored.');
+      {$endif}
+      exit;
+    end;
+  end;
+  cm:=TClassMode.Create;
+  cm.HClass:=IgnClass;
+  TP_GlobalClassHandling.Add(cm);
+  Result := true;
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('Globally, class '+IgnClass.ClassName+' is being ignored.');
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.TP_GlobalIgnoreClass(IgnClass: TClass);
+begin
+  if not TP_TryGlobalIgnoreClass(IgnClass) then
+    raise EGGProgrammingError.Create ('You cannot add a class to the ignore list that is already on that list: '+IgnClass.ClassName+'. You should keep all TP_Global functions in one place in your source code.');
+end;
+
+procedure TGnuGettextInstance.TP_GlobalIgnoreClassProperty(
+  IgnClass: TClass; propertyname: ComponentNameString);
+var
+  cm:TClassMode;
+  i,idx:integer;
+begin
+  propertyname:=uppercase(propertyname);
+  for i:=0 to TP_GlobalClassHandling.Count-1 do begin
+    cm:=TObject(TP_GlobalClassHandling.Items[i]) as TClassMode;
+    if cm.HClass=IgnClass then begin
+      if Assigned(cm.SpecialHandler) then
+        raise EGGProgrammingError.Create ('You cannot ignore a class property for a class that has a handler set.');
+      if not cm.PropertiesToIgnore.Find(propertyname,idx) then
+        cm.PropertiesToIgnore.Add(propertyname);
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
+      {$endif}
+      exit;
+    end;
+    if IgnClass.InheritsFrom(cm.HClass) then begin
+      // This is the place to insert this class
+      cm:=TClassMode.Create;
+      cm.HClass:=IgnClass;
+      cm.PropertiesToIgnore.Add(propertyname);
+      TP_GlobalClassHandling.Insert(i,cm);
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
+      {$endif}
+      exit;
+    end;
+  end;
+  cm:=TClassMode.Create;
+  cm.HClass:=IgnClass;
+  cm.PropertiesToIgnore.Add(propertyname);
+  TP_GlobalClassHandling.Add(cm);
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.TP_Ignore(AnObject: TObject;
+  const name: ComponentNameString);
+begin
+  TP_IgnoreList.Add(uppercase(name));
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('On object with class name '+AnObject.ClassName+', ignore is set on '+name);
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.TranslateComponent(AnObject: TComponent;
+  const TextDomain: DomainString);
+var
+  comp:TGnuGettextComponentMarker;
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('======================================================================');
+  DebugWriteln ('TranslateComponent() was called for a component with name '+AnObject.Name+'.');
+  {$endif}
+  comp:=AnObject.FindComponent('GNUgettextMarker') as TGnuGettextComponentMarker;
+  if comp=nil then begin
+    comp:=TGnuGettextComponentMarker.Create (nil);
+    comp.Name:='GNUgettextMarker';
+    comp.Retranslator:=TP_CreateRetranslator;
+    TranslateProperties (AnObject, TextDomain);
+    AnObject.InsertComponent(comp);
+    {$ifdef DXGETTEXTDEBUG}
+    DebugWriteln ('This is the first time, that this component has been translated. A retranslator component has been created for this component.');
+    {$endif}
+  end else begin
+    {$ifdef DXGETTEXTDEBUG}
+    DebugWriteln ('This is not the first time, that this component has been translated.');
+    {$endif}
+    if comp.LastLanguage<>curlang then begin
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('ERROR: TranslateComponent() was called twice with different languages. This indicates an attempt to switch language at runtime, but by using TranslateComponent every time. This API has changed - please use RetranslateComponent() instead.');
+      {$endif}
+      {$ifdef mswindows}
+      MessageBox (0,'This application tried to switch the language, but in an incorrect way. The programmer needs to replace a call to TranslateComponent with a call to RetranslateComponent(). The programmer should see the changelog of gnugettext.pas for more information.','Error',MB_OK);
+      {$else}
+      writeln (stderr,'This application tried to switch the language, but in an incorrect way. The programmer needs to replace a call to TranslateComponent with a call to RetranslateComponent(). The programmer should see the changelog of gnugettext.pas for more information.');
+      {$endif}
+    end else begin
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('ERROR: TranslateComponent has been called twice, but with the same language chosen. This is a mistake, but in order to prevent that the application breaks, no exception is raised.');
+      {$endif}
+    end;
+  end;
+  comp.LastLanguage:=curlang;
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('======================================================================');
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.TranslateProperty (AnObject:TObject; PropInfo:PPropInfo; TodoList:TStrings; const TextDomain:DomainString);
+var
+  ppi:PPropInfo;
+  ws: TranslatedUnicodeString;
+  old: TranslatedUnicodeString;
+  compmarker:TComponent;
+  obj:TObject;
+  Propname:ComponentNameString;
+begin
+  PropName:=string(PropInfo^.Name);
+  try
+    // Translate certain types of properties
+    case PropInfo^.PropType^.Kind of
+      {$IFDEF UNICODE}
+      // All dfm files returning tkUString
+      tkString, tkLString, tkWString, tkUString:
+      {$ELSE}
+      tkString, tkLString, tkWString:
+      {$ENDIF}
+        begin
+          {$ifdef DXGETTEXTDEBUG}
+          DebugWriteln ('Translating '+AnObject.ClassName+'.'+PropName);
+          {$endif}
+          case PropInfo^.PropType^.Kind of
+            tkString, tkLString :
+              old := GetStrProp(AnObject, PropName);
+            tkWString :
+              old := doGetWideStrProp(AnObject, Propname);
+            {$IFDEF UNICODE}
+            tkUString :
+              old := doGetUnicodeStrProp(AnObject, Propname);
+            {$ENDIF}
+          else
+            raise Exception.Create ('Internal error: Illegal property type. This problem needs to be solved by a programmer, try to find a workaround.');
+          end;
+          {$ifdef DXGETTEXTDEBUG}
+          if old='' then
+            DebugWriteln ('(Empty, not translated)')
+          else
+            DebugWriteln ('Old value: "'+old+'"');
+          {$endif}
+          if (old <> '') and (IsWriteProp(PropInfo)) then begin
+            if TP_Retranslator<>nil then
+              (TP_Retranslator as TTP_Retranslator).Remember(AnObject, PropName, old);
+            if textdomain = '' then
+              ws := ComponentGettext(old, Self)
+            else
+              ws := dgettext(textdomain,old);
+            if ws <> old then begin
+              ppi:=GetPropInfo(AnObject, Propname);
+              if ppi<>nil then begin
+                SetWideStrProp(AnObject, ppi, ws);
+              end else begin
+                {$ifdef DXGETTEXTDEBUG}
+                DebugWriteln ('ERROR: Property disappeared: '+Propname+' for object of type '+AnObject.ClassName);
+                {$endif}
+              end;
+            end;
+          end;
+        end { case item };
+      tkClass:
+        begin
+          obj:=GetObjectProp(AnObject, PropName);
+          if obj<>nil then begin
+            if obj is TComponent then begin
+              compmarker := TComponent(obj).FindComponent('GNUgettextMarker');
+              if Assigned(compmarker) then
+                exit;
+            end;
+            TodoList.AddObject ('',obj);
+          end;
+        end { case item };
+      end { case };
+  except
+    on E:Exception do
+      raise EGGComponentError.Create ('Property cannot be translated.'+sLineBreak+
+        'Add TP_GlobalIgnoreClassProperty('+AnObject.ClassName+','''+PropName+''') to your source code or use'+sLineBreak+
+        'TP_Ignore (self,''.'+PropName+''') to prevent this message.'+sLineBreak+
+        'Reason: '+e.Message);
+  end;
+end;
+
+function ObjectHasAssignedAction(AnObject: TObject; PropList: PPropList; Count: Integer; var ActionProperty: TObject): Boolean;
+var
+  I: Integer;
+  PropInfo: PPropInfo;
+  Obj: TObject;
+begin
+  Result := False;
+  I := 0;
+  while not Result and (I < Count) do
+  begin
+    PropInfo := PropList[I];
+    if (PropInfo^.PropType^.Kind = tkClass) then
+    begin
+      Obj := GetObjectProp(AnObject, string(PropInfo.Name));
+      Result := Obj is TBasicAction;
+      if Result then
+        ActionProperty := Obj;
+    end;
+
+    Inc(I);
+  end;
+end;
+
+function TGnuGettextInstance.ClassIsIgnored(AClass:TClass): Boolean;
+var
+  cm:TClassMode;
+  i:integer;
+begin
+  for i:=0 to TP_GlobalClassHandling.Count-1 do begin
+    cm:=TObject(TP_GlobalClassHandling.Items[i]) as TClassMode;
+    if AClass.InheritsFrom(cm.HClass) and (cm.PropertiesToIgnore.Count = 0) then
+    begin
+      Result := True;
+      exit;
+    end;
+  end;
+  for i:=0 to TP_ClassHandling.Count-1 do begin
+    cm:=TObject(TP_ClassHandling.Items[i]) as TClassMode;
+    if AClass.InheritsFrom(cm.HClass) then
+    begin
+      Result := True;
+      exit;
+    end;
+  end;
+  Result := False;
+end;
+
+procedure TGnuGettextInstance.TranslateProperties(AnObject: TObject; textdomain:DomainString='');
+var
+  TodoList:TStringList; // List of Name/TObject's that is to be processed
+  DoneList:TStringList; // List of hex codes representing pointers to objects that have been done
+  i, j, Count: integer;
+  PropList: PPropList;
+  UPropName: ComponentNameString;
+  PropInfo: PPropInfo;
+  compmarker,
+  comp:TComponent;
+  cm,
+  currentcm:TClassMode; // currentcm is nil or contains special information about how to handle the current object
+  ObjectPropertyIgnoreList:TStringList;
+  objid:string;
+  Name:ComponentNameString;
+  ActionProperty:TObject;
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('----------------------------------------------------------------------');
+  DebugWriteln ('TranslateProperties() was called for an object of class '+AnObject.ClassName+' with domain "'+textdomain+'".');
+  {$endif}
+
+  if TP_Retranslator<>nil then
+    if textdomain = '' then
+      (TP_Retranslator as TTP_Retranslator).TextDomain:=curmsgdomain
+    else
+      (TP_Retranslator as TTP_Retranslator).TextDomain:=textdomain;
+  {$ifdef FPC}
+  DoneList:=TCSStringList.Create;
+  TodoList:=TCSStringList.Create;
+  ObjectPropertyIgnoreList:=TCSStringList.Create;
+  {$else}
+  DoneList:=TStringList.Create;
+  TodoList:=TStringList.Create;
+  ObjectPropertyIgnoreList:=TStringList.Create;
+  {$endif}
+  try
+    TodoList.AddObject('', AnObject);
+    DoneList.Sorted:=True;
+    ObjectPropertyIgnoreList.Sorted:=True;
+    ObjectPropertyIgnoreList.Duplicates:=dupIgnore;
+    ObjectPropertyIgnoreList.CaseSensitive:=False;
+    DoneList.Duplicates:=dupError;
+    DoneList.CaseSensitive:=True;
+
+    while TodoList.Count<>0 do begin
+      AnObject:=TodoList.Objects[0];
+      Name:=TodoList.Strings[0];
+      TodoList.Delete(0);
+      if (AnObject<>nil) and (AnObject is TPersistent) then begin
+        // Make sure each object is only translated once
+        Assert (sizeof({$IFDEF CPUx64}NativeInt{$ELSE}Integer{$ENDIF CPUx64})=sizeof(TObject));
+        objid:=IntToHex({$IFDEF CPUx64}NativeInt{$ELSE}Integer{$ENDIF CPUx64}(AnObject),8);
+        if DoneList.Find(objid,i) then begin
+          continue;
+        end else begin
+          DoneList.Add(objid);
+        end;
+
+        ObjectPropertyIgnoreList.Clear;
+
+        // Find out if there is special handling of this object
+        currentcm:=nil;
+        // First check the local handling instructions
+        for j:=0 to TP_ClassHandling.Count-1 do begin
+          cm:=TObject(TP_ClassHandling.Items[j]) as TClassMode;
+          if AnObject.InheritsFrom(cm.HClass) then begin
+            if cm.PropertiesToIgnore.Count<>0 then begin
+              ObjectPropertyIgnoreList.AddStrings(cm.PropertiesToIgnore);
+            end else begin
+              // Ignore the entire class
+              currentcm:=cm;
+              break;
+            end;
+          end;
+        end;
+        // Then check the global handling instructions
+        if currentcm=nil then
+        for j:=0 to TP_GlobalClassHandling.Count-1 do begin
+          cm:=TObject(TP_GlobalClassHandling.Items[j]) as TClassMode;
+          if AnObject.InheritsFrom(cm.HClass) then begin
+            if cm.PropertiesToIgnore.Count<>0 then begin
+              ObjectPropertyIgnoreList.AddStrings(cm.PropertiesToIgnore);
+            end else begin
+              // Ignore the entire class
+              currentcm:=cm;
+              break;
+            end;
+          end;
+        end;
+        if currentcm<>nil then begin
+          ObjectPropertyIgnoreList.Clear;
+          // Ignore or use special handler
+          if Assigned(currentcm.SpecialHandler) then begin
+            currentcm.SpecialHandler (AnObject);
+            {$ifdef DXGETTEXTDEBUG}
+            DebugWriteln ('Special handler activated for '+AnObject.ClassName);
+            {$endif}
+          end else begin
+            {$ifdef DXGETTEXTDEBUG}
+            DebugWriteln ('Ignoring object '+AnObject.ClassName);
+            {$endif}
+          end;
+          continue;
+        end;
+
+        Count := GetPropList(AnObject, PropList);
+        try
+          if ObjectHasAssignedAction(AnObject, PropList, Count, ActionProperty) and not ClassIsIgnored(ActionProperty.ClassType) then
+            Continue;
+
+          for j := 0 to Count - 1 do begin
+            PropInfo := PropList[j];
+            {$IFDEF UNICODE}
+            if not (PropInfo^.PropType^.Kind in [tkString, tkLString, tkWString, tkClass, tkUString]) then
+            {$ELSE}
+            if not (PropInfo^.PropType^.Kind in [tkString, tkLString, tkWString, tkClass]) then
+            {$ENDIF}
+              continue;
+            UPropName:=uppercase(string(PropInfo^.Name));
+            // Ignore properties that are meant to be ignored
+            if ((currentcm=nil) or (not currentcm.PropertiesToIgnore.Find(UPropName,i))) and
+               (not TP_IgnoreList.Find(Name+'.'+UPropName,i)) and
+               (not ObjectPropertyIgnoreList.Find(UPropName,i)) then begin
+              TranslateProperty (AnObject,PropInfo,TodoList,TextDomain);
+            end;  // if
+          end;  // for
+        finally
+          if Count<>0 then
+            FreeMem (PropList);
+        end;
+        {$IFDEF dx_has_WideStrings}
+        if AnObject is TWideStrings then begin
+          if ((AnObject as TWideStrings).Text<>'') and (TP_Retranslator<>nil) then
+            (TP_Retranslator as TTP_Retranslator).Remember(AnObject, 'Text', (AnObject as TWideStrings).Text);
+          TranslateWideStrings (AnObject as TWideStrings,TextDomain);
+        end;
+        {$ENDIF dx_has_WideStrings}
+        if AnObject is TStrings then begin
+          if ((AnObject as TStrings).Text<>'') and (TP_Retranslator<>nil) then
+            (TP_Retranslator as TTP_Retranslator).Remember(AnObject, 'Text', (AnObject as TStrings).Text);
+          TranslateStrings (AnObject as TStrings,TextDomain);
+        end;
+        // Check for TCollection
+        if AnObject is TCollection then begin
+          for i := 0 to (AnObject as TCollection).Count - 1 do begin
+            // Only add the object if it's not totally ignored already
+            if not Assigned(currentcm) or not AnObject.InheritsFrom(currentcm.HClass) then
+              TodoList.AddObject('',(AnObject as TCollection).Items[i]);
+          end;
+        end;
+        if AnObject is TComponent then begin
+          for i := 0 to TComponent(AnObject).ComponentCount - 1 do begin
+            comp:=TComponent(AnObject).Components[i];
+            if (not TP_IgnoreList.Find(uppercase(comp.Name),j)) then begin
+              // Only add the object if it's not totally ignored or translated already
+              if not Assigned(currentcm) or not AnObject.InheritsFrom(currentcm.HClass) then begin
+                compmarker := comp.FindComponent('GNUgettextMarker');
+                if not Assigned(compmarker) then
+                  TodoList.AddObject(uppercase(comp.Name),comp);
+              end;
+            end;
+          end;
+        end;
+      end { if AnObject<>nil };
+    end { while todolist.count<>0 };
+  finally
+    FreeAndNil (todolist);
+    FreeAndNil (ObjectPropertyIgnoreList);
+    FreeAndNil (DoneList);
+  end;
+  FreeTP_ClassHandlingItems;
+  TP_IgnoreList.Clear;
+  TP_Retranslator:=nil;
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('----------------------------------------------------------------------');
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.UnregisterWhenNewLanguageListener(
+  Listener: IGnuGettextInstanceWhenNewLanguageListener);
+begin
+  fWhenNewLanguageListeners.Remove(Listener);
+end;
+
+procedure TGnuGettextInstance.UseLanguage(LocaleName: LanguageString);
+var
+  i,p:integer;
+  dom:TDomain;
+  l2:string;
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln('UseLanguage('''+LocaleName+'''); called');
+  {$endif}
+
+  if LocaleName='' then begin
+    LocaleName:=GGGetEnvironmentVariable('LANG');
+    {$ifdef DXGETTEXTDEBUG}
+    DebugWriteln ('LANG env variable is '''+LocaleName+'''.');
+    {$endif}
+    {$ifdef MSWINDOWS}
+    if LocaleName='' then begin
+      LocaleName:=GetWindowsLanguage;
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('Found Windows language code to be '''+LocaleName+'''.');
+      {$endif}
+    end;
+    {$endif}
+    p:=pos('.',LocaleName);
+    if p<>0 then
+      LocaleName:=LeftStr(LocaleName,p-1);
+    {$ifdef DXGETTEXTDEBUG}
+    DebugWriteln ('Language code that will be set is '''+LocaleName+'''.');
+    {$endif}
+  end;
+
+  curlang := LocaleName;
+  for i:=0 to domainlist.Count-1 do begin
+    dom:=domainlist.Objects[i] as TDomain;
+    dom.SetLanguageCode (curlang);
+  end;
+
+  l2:=lowercase(LeftStr(curlang,2));
+  if (l2='en') or (l2='de') then curGetPluralForm:=GetPluralForm2EN else
+  if (l2='hu') or (l2='ko') or (l2='zh') or (l2='ja') or (l2='tr') then curGetPluralForm:=GetPluralForm1 else
+  if (l2='fr') or (l2='fa') or (lowercase(curlang)='pt_br') then curGetPluralForm:=GetPluralForm2FR else
+  if (l2='lv') then curGetPluralForm:=GetPluralForm3LV else
+  if (l2='ga') then curGetPluralForm:=GetPluralForm3GA else
+  if (l2='lt') then curGetPluralForm:=GetPluralForm3LT else
+  if (l2='ru') or (l2='uk') or (l2='hr') then curGetPluralForm:=GetPluralForm3RU else
+  if (l2='cs') or (l2='sk') then curGetPluralForm:=GetPluralForm3SK else
+  if (l2='pl') then curGetPluralForm:=GetPluralForm3PL else
+  if (l2='sl') then curGetPluralForm:=GetPluralForm4SL else begin
+    curGetPluralForm:=GetPluralForm2EN;
+    {$ifdef DXGETTEXTDEBUG}
+    DebugWriteln ('Plural form for the language was not found. English plurality system assumed.');
+    {$endif}
+  end;
+
+  WhenNewLanguage (curlang);
+
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln('');
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.TranslateStrings(sl: TStrings;const TextDomain:DomainString);
+var
+  line: string;
+  i: integer;
+  tempSL: TStringList;
+  {$ifdef dx_StringList_has_OwnsObjects}
+  slAsTStringList: TStringList;
+  originalOwnsObjects: Boolean;
+  {$endif dx_StringList_has_OwnsObjects}
+begin
+  if sl.Count > 0 then begin
+    {$ifdef dx_StringList_has_OwnsObjects}
+    // From D2009 onward, the TStringList class has an OwnsObjects property, just like
+    // TObjectList has. This means that if we call Clear on the given
+    // list in the sl parameter, we could destroy the objects it contains.
+    // To avoid this we must disable OwnsObjects while we replace the strings, but
+    // only if sl is a TStringList instance and if using Delphi 2009 or later.
+    originalOwnsObjects := False; // avoid warning
+    if sl is TStringList then
+      slAsTStringList := TStringList(sl)
+    else
+      slAsTStringList := nil;
+    {$endif dx_StringList_has_OwnsObjects}
+
+    sl.BeginUpdate;
+    try
+      tempSL:=TStringList.Create;
+      try
+        // don't use Assign here as it will propagate the Sorted property (among others)
+        // in versions of Delphi from Delphi XE onward
+        tempSL.AddStrings(sl);
+
+        for i:=0 to tempSL.Count-1 do begin
+          line:=tempSL.Strings[i];
+          if line<>'' then
+            if (TextDomain = '') or (TextDomain = DefaultTextDomain) then
+              tempSL.Strings[i]:=ComponentGettext(line, Self)
+            else
+              tempSL.Strings[i]:=dgettext(TextDomain,line);
+        end;
+
+        //DH Fix 2013-09-19: Only refill sl if changed
+        if sl.Text<>tempSL.Text then
+        begin
+          {$ifdef dx_StringList_has_OwnsObjects}
+          if Assigned(slAsTStringList) then begin
+            originalOwnsObjects := slAsTStringList.OwnsObjects;
+            slAsTStringList.OwnsObjects := False;
+          end;
+          {$endif dx_StringList_has_OwnsObjects}
+          try
+            {$ifdef dx_StringList_has_OwnsObjects}
+            if Assigned(slAsTStringList) and slAsTStringList.Sorted then
+            begin
+              // TStringList doesn't release the objects in PutObject, so we use this to get
+              // sl.Clear to not destroy the objects in classes that inherit from TStringList
+              // but do a ClearObject in Clear.
+              //
+              // todo: Check whether this should be
+              //   if sl is TStringList then
+              // instead.
+              if sl.ClassType <> TStringList then
+                for I := 0 to sl.Count - 1 do
+                  sl.Objects[I] := nil;
+
+              // same here, we don't use assign because we don't want to modify the properties of the orignal string list
+              sl.Clear;
+              sl.AddStrings(tempSL);
+            end
+            else
+            {$endif dx_StringList_has_OwnsObjects}
+            begin
+              for i := 0 to sl.Count - 1 do
+                sl[i] := tempSL[i];
+            end;
+          finally
+            {$ifdef dx_StringList_has_OwnsObjects}
+            if Assigned(slAsTStringList) then
+              slAsTStringList.OwnsObjects := originalOwnsObjects;
+            {$endif dx_StringList_has_OwnsObjects}
+          end;
+        end;
+      finally
+        FreeAndNil (tempSL);
+      end;
+    finally
+      sl.EndUpdate;
+    end;
+  end;
+end;
+
+{$IFDEF dx_has_WideStrings}
+procedure TGnuGettextInstance.TranslateWideStrings(sl: TWideStrings;
+  const TextDomain: DomainString);
+var
+  line: string;
+  i: integer;
+  tempSL:TWideStringList;
+  {$ifdef dx_StringList_has_OwnsObjects}
+  slAsTWideStringList:TWideStringList;
+  originalOwnsObjects: Boolean;
+  {$endif dx_StringList_has_OwnsObjects}
+begin
+  if sl.Count > 0 then begin
+    {$ifdef dx_StringList_has_OwnsObjects}
+    // From D2009 onward, the TWideStringList class has an OwnsObjects property, just like
+    // TObjectList has. This means that if we call Clear on the given
+    // list in the sl parameter, we could destroy the objects it contains.
+    // To avoid this we must disable OwnsObjects while we replace the strings, but
+    // only if sl is a TWideStringList instance and if using Delphi 2009 or later.
+    originalOwnsObjects := False; // avoid warning
+    if sl is TWideStringList then
+      slAsTWideStringList := TWideStringList(sl)
+    else
+      slAsTWideStringList := nil;
+    {$endif dx_StringList_has_OwnsObjects}
+
+    sl.BeginUpdate;
+    try
+      tempSL:=TWideStringList.Create;
+      try
+        // don't use Assign here as it will propagate the Sorted property (among others)
+        // in versions of Delphi from Delphi XE ownard
+        tempSL.AddStrings(sl);
+
+        for i:=0 to tempSL.Count-1 do begin
+          line:=tempSL.Strings[i];
+          if line<>'' then
+            if TextDomain = '' then
+              tempSL.Strings[i]:=ComponentGettext(line, Self)
+            else
+              tempSL.Strings[i]:=dgettext(TextDomain,line);
+        end;
+
+        //DH Fix 2013-09-19: Only refill sl if changed
+        if sl.Text<>tempSL.Text then
+        begin
+          {$ifdef dx_StringList_has_OwnsObjects}
+          if Assigned(slAsTWideStringList) then begin
+            originalOwnsObjects := slAsTWideStringList.OwnsObjects;
+            slAsTWideStringList.OwnsObjects := False;
+          end;
+          {$endif dx_StringList_has_OwnsObjects}
+          try
+            {$ifdef dx_StringList_has_OwnsObjects}
+            if Assigned(slAsTWideStringList) and slAsTWideStringList.Sorted then
+            begin
+              // TWideStringList doesn't release the objects in PutObject, so we use this to get
+              // sl.Clear to not destroy the objects in classes that inherit from TWideStringList
+              // but do a ClearObject in Clear.
+              //
+              // todo: Check whether this should be
+              //   if sl is TWideStringList then
+              // instead.
+              if sl.ClassType <> TWideStringList then
+                for I := 0 to sl.Count - 1 do
+                  sl.Objects[I] := nil;
+
+              // same here, we don't use assign because we don't want to modify the properties of the orignal string list
+              sl.Clear;
+              sl.AddStrings(tempSL);
+            end
+            else
+            {$endif dx_StringList_has_OwnsObjects}
+            begin
+              for i := 0 to sl.Count - 1 do
+                sl[i] := tempSL[i];
+            end;
+          finally
+            {$ifdef dx_StringList_has_OwnsObjects}
+            if Assigned(slAsTWideStringList) then
+              slAsTWideStringList.OwnsObjects := originalOwnsObjects;
+            {$endif dx_StringList_has_OwnsObjects}
+          end;
+        end;
+      finally
+        FreeAndNil (tempSL);
+      end;
+    finally
+      sl.EndUpdate;
+    end;
+  end;
+end;
+{$ENDIF dx_has_WideStrings}
+
+function TGnuGettextInstance.GetTranslatorNameAndEmail: TranslatedUnicodeString;
+begin
+  Result:=GetTranslationProperty('LAST-TRANSLATOR');
+end;
+
+function TGnuGettextInstance.GetTranslationProperty(
+  const Propertyname: ComponentNameString): TranslatedUnicodeString;
+begin
+  Result:=getdomain(curmsgdomain,DefaultDomainDirectory,CurLang).GetTranslationProperty (Propertyname);
+end;
+
+function TGnuGettextInstance.dngettext(const szDomain: DomainString; const singular, plural: MsgIdString;
+  Number: Integer): TranslatedUnicodeString;
+var
+  org:MsgIdString;
+  trans:TranslatedUnicodeString;
+  idx:integer;
+  p:integer;
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('dngettext translation (domain '+szDomain+', number is '+IntTostr(Number)+') of '+singular+'/'+plural);
+  {$endif}
+  org:=singular+#0+plural;
+  trans:=dgettext(szDomain,org);
+  if org=trans then begin
+    {$ifdef DXGETTEXTDEBUG}
+    DebugWriteln ('Translation was equal to english version. English plural forms assumed.');
+    {$endif}
+    idx:=GetPluralForm2EN(Number)
+  end else
+    idx:=curGetPluralForm(Number);
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('Index '+IntToStr(idx)+' will be used');
+  {$endif}
+  while true do begin
+    p:=pos(#0,trans);
+    if p=0 then begin
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('Last translation used: '+string(utf8encode(trans)));
+      {$endif}
+      Result:=trans;
+      exit;
+    end;
+    if idx=0 then begin
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('Translation found: '+string(utf8encode(trans)));
+      {$endif}
+      Result:=LeftStr(trans,p-1);
+      exit;
+    end;
+    delete (trans,1,p);
+    dec (idx);
+  end;
+end;
+
+function TGnuGettextInstance.dngettext_NoExtract(const szDomain: DomainString;
+  const singular, plural: MsgIdString;
+  Number: Integer): TranslatedUnicodeString;
+begin
+  // This one is very useful for translating text in variables.
+  // This can sometimes be necessary, and by using this function,
+  // the source code scanner will not trigger warnings.
+  Result:=dngettext(szDomain,singular,plural,Number);
+end;
+
+{$ifndef UNICODE}
+function TGnuGettextInstance.ngettext(const singular, plural: ansistring;
+  Number: Integer): TranslatedUnicodeString;
+var
+  domain: DomainString;
+  domainIndex: Integer;
+begin
+  Result := dngettext(curmsgdomain, singular, plural, Number);
+  if SearchAllDomains then begin
+    domainIndex := 0;
+    while (Result <> singular) and (Result <> plural) and (domainIndex < domainlist.count) do begin
+      domain := domainlist[domainIndex];
+      Result := dngettext(domain, singular, plural, Number);
+      Inc(domainIndex);
+    end;
+  end;
+end;
+{$endif}
+
+function TGnuGettextInstance.ngettext(const singular, plural: MsgIdString;
+  Number: Integer): TranslatedUnicodeString;
+var
+  domain: DomainString;
+  domainIndex: Integer;
+begin
+  Result := dngettext(curmsgdomain, singular, plural, Number);
+  if SearchAllDomains then begin
+    domainIndex := 0;
+    while (Result <> singular) and (Result <> plural) and (domainIndex < domainlist.count) do begin
+      domain := domainlist[domainIndex];
+      Result := dngettext(domain, singular, plural, Number);
+      Inc(domainIndex);
+    end;
+  end;
+end;
+
+function TGnuGettextInstance.ngettext_NoExtract(const singular,
+  plural: MsgIdString; Number: Integer): TranslatedUnicodeString;
+begin
+  // This one is very useful for translating text in variables.
+  // This can sometimes be necessary, and by using this function,
+  // the source code scanner will not trigger warnings.
+  Result:=ngettext(singular,plural,Number);
+end;
+
+procedure TGnuGettextInstance.WhenNewDomain(const TextDomain: DomainString);
+begin
+  // This is meant to be empty.
+end;
+
+procedure TGnuGettextInstance.WhenNewLanguage(const LanguageID: LanguageString);
+var
+  I: Integer;
+begin
+  for I := 0 to fWhenNewLanguageListeners.Count - 1 do
+    IGnuGettextInstanceWhenNewLanguageListener(fWhenNewLanguageListeners[I]).WhenNewLanguage(LanguageID);
+end;
+
+procedure TGnuGettextInstance.WhenNewDomainDirectory(const TextDomain:DomainString; const Directory: FilenameString);
+begin
+  // This is meant to be empty.
+end;
+
+procedure TGnuGettextInstance.GetListOfLanguages(const domain: DomainString;
+  list: TStrings);
+begin
+  getdomain(Domain,DefaultDomainDirectory,CurLang).GetListOfLanguages(list);
+end;
+
+procedure TGnuGettextInstance.bindtextdomainToFile(const szDomain:DomainString; const filename: FilenameString);
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('Text domain "'+szDomain+'" is now bound to file named "'+filename+'"');
+  {$endif}
+  getdomain(szDomain,DefaultDomainDirectory,CurLang).SetFilename (filename);
+end;
+
+procedure TGnuGettextInstance.DebugLogPause(PauseEnabled: boolean);
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DebugLogOutputPaused:=PauseEnabled;
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.DebugLogToFile(const filename: FilenameString; append:boolean=false);
+{$ifdef DXGETTEXTDEBUG}
+var
+  fs:TFileStream;
+  marker:ansistring;
+{$endif}
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  // Create the file if needed
+  if (not fileexists(filename)) or (not append) then
+    fileclose (filecreate (filename));
+
+  // Open file
+  fs:=TFileStream.Create (filename,fmOpenWrite or fmShareDenyWrite);
+  if append then
+    fs.Seek(0,soFromEnd);
+
+  // Write header if appending
+  if fs.Position<>0 then begin
+    marker:=sLineBreak+'==========================================================================='+sLineBreak;
+    fs.WriteBuffer(marker[1],length(marker));
+  end;
+
+  // Copy the memorystream contents to the file
+  if DebugLog <> nil then
+  begin
+    DebugLog.Seek(0,soFromBeginning);
+    fs.CopyFrom(DebugLog,0);
+  end;
+
+  // Make DebugLog point to the filestream
+  FreeAndNil (DebugLog);
+  DebugLog:=fs;
+  {$endif}
+end;
+
+{$ifdef DXGETTEXTDEBUG}
+procedure TGnuGettextInstance.DebugWriteln(Line: string);
+Var
+  Discard: Boolean;
+  ALine: AnsiString;
+begin
+  Assert (DebugLogCS<>nil);
+  Assert (DebugLog<>nil);
+
+  DebugLogCS.BeginWrite;
+  try
+    if DebugLogOutputPaused then
+      exit;
+
+    if Assigned (fOnDebugLine) then begin
+      Discard := True;
+      fOnDebugLine (Self, Line, Discard);
+      If Discard then Exit;
+    end;
+
+    ALine := AnsiString(Line);
+    ALine:=ALine+sLineBreak;
+
+    // Ensure that memory usage doesn't get too big.
+    if (DebugLog is TMemoryStream) and (DebugLog.Position>1000000) then begin
+      ALine:=sLineBreak+sLineBreak+sLineBreak+sLineBreak+sLineBreak+
+            'Debug log halted because memory usage grew too much.'+sLineBreak+
+            'Specify a filename to store the debug log in or disable debug loggin in gnugettext.pas.'+
+            sLineBreak+sLineBreak+sLineBreak+sLineBreak+sLineBreak;
+      DebugLogOutputPaused:=True;
+    end;
+    DebugLog.WriteBuffer(ALine[1],length(ALine));
+  finally
+    DebugLogCS.EndWrite;
+  end;
+end;
+{$endif}
+
+function TGnuGettextInstance.Getdomain(const domain:DomainString; const DefaultDomainDirectory:FilenameString;
+  const LocaleName: LanguageString): TDomain;
+// Retrieves the TDomain object for the specified domain.
+// Creates one, if none there, yet.
+var
+  idx: integer;
+begin
+  idx := domainlist.IndexOf(Domain);
+  if idx = -1 then begin
+    Result := TDomain.Create;
+    {$ifdef DXGETTEXTDEBUG}
+    Result.DebugLogger:=DebugWriteln;
+    {$endif}
+    Result.Domain := Domain;
+    Result.Directory := DefaultDomainDirectory;
+    Result.SetLanguageCode(LocaleName);
+    domainlist.AddObject(Domain, Result);
+  end else begin
+    Result := domainlist.Objects[idx] as TDomain;
+  end;
+end;
+
+function TGnuGettextInstance.GetResString(ResStringRec: PResStringRec): UnicodeString;
+{$ifdef MSWINDOWS}
+var
+  Len: Integer;
+  Buffer: array [0..1023] of char;
+{$endif}
+{$ifdef LINUX }
+const
+  ResStringTableLen = 16;
+type
+  ResStringTable = array [0..ResStringTableLen-1] of LongWord;
+var
+  Handle: TResourceHandle;
+  Tab: ^ResStringTable;
+  ResMod: HMODULE;
+{$endif }
+begin
+  if ResStringRec=nil then
+    exit;
+  if ResStringRec.Identifier>=64*1024 then begin
+    {$ifdef DXGETTEXTDEBUG}
+    DebugWriteln ('LoadResString was given an invalid ResStringRec.Identifier');
+    {$endif}
+    Result:='ERROR';
+    exit;
+  end;
+  {$ifdef LINUX}
+  // This works with Unicode if the Linux has utf-8 character set
+  // Result:=System.LoadResString(ResStringRec);
+  ResMod:=FindResourceHInstance(ResStringRec^.Module^);
+  Handle:=FindResource(ResMod,
+    PAnsiChar(ResStringRec^.Identifier div ResStringTableLen), PAnsiChar(6));   // RT_STRING
+  Tab:=Pointer(LoadResource(ResMod, Handle));
+  if Tab=nil then
+    Result:=''
+  else
+    Result:=PWideChar(PAnsiChar(Tab)+Tab[ResStringRec^.Identifier mod ResStringTableLen]);
+  {$endif}
+  {$ifdef MSWINDOWS}
+  if not Win32PlatformIsUnicode then begin
+    SetString(Result, Buffer,
+      LoadString(FindResourceHInstance(ResStringRec.Module^),
+        ResStringRec.Identifier, Buffer, Length(Buffer)))
+  end else begin
+    Result := '';
+    Len := 0;
+    While Length(Result)<=Len+1 do begin
+      if Length(Result) = 0 then
+        SetLength(Result, 1024)
+      else
+        SetLength(Result, Length(Result) * 2);
+      Len := LoadStringW(FindResourceHInstance(ResStringRec.Module^),
+        ResStringRec.Identifier, PWideChar(Result), Length(Result));
+    end;
+    SetLength(Result, Len);
+  end;
+  {$endif}
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('Loaded resourcestring: '+string(utf8encode(Result)));
+  {$endif}
+end;
+
+function TGnuGettextInstance.ResourceStringGettext(MsgId: MsgIdString): TranslatedUnicodeString;
+var
+  i:integer;
+begin
+  if (MsgID='') or (ResourceStringDomainListCS=nil) then begin
+    // This only happens during very complicated program startups that fail,
+    // or when Msgid=''
+    Result:=MsgId;
+    exit;
+  end;
+  ResourceStringDomainListCS.BeginRead;
+  try
+    for i:=0 to ResourceStringDomainList.Count-1 do begin
+      Result:=dgettext(ResourceStringDomainList.Strings[i], MsgId);
+      if Result<>MsgId then
+        break;
+    end;
+  finally
+    ResourceStringDomainListCS.EndRead;
+  end;
+end;
+
+function TGnuGettextInstance.LoadResString(
+  ResStringRec: PResStringRec): UnicodeString;
+begin
+  Result:=ResourceStringGettext(GetResString(ResStringRec));
+end;
+
+function TGnuGettextInstance.PLoadResString(const szMsgCtxt: MsgIdString; ResStringRec: PResStringRec): UnicodeString;
+begin
+  Result:=PGettext(szMsgCtxt, GetResString(ResStringRec));
+end;
+
+procedure TGnuGettextInstance.RegisterWhenNewLanguageListener(
+  Listener: IGnuGettextInstanceWhenNewLanguageListener);
+begin
+  fWhenNewLanguageListeners.Add(Listener);
+end;
+
+procedure TGnuGettextInstance.RetranslateComponent(AnObject: TComponent;
+  const TextDomain: DomainString);
+var
+  comp:TGnuGettextComponentMarker;
+begin
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('======================================================================');
+  DebugWriteln ('RetranslateComponent() was called for a component with name '+AnObject.Name+'.');
+  {$endif}
+  comp:=AnObject.FindComponent('GNUgettextMarker') as TGnuGettextComponentMarker;
+  if comp=nil then
+  begin
+    {$ifdef DXGETTEXTDEBUG}
+    DebugWriteln ('Retranslate was called on an object that has not been translated before. An Exception is being raised.');
+    {$endif}
+    raise EGGProgrammingError.Create ('Retranslate was called on an object that has not been translated before. Please use TranslateComponent() before RetranslateComponent().');
+  end
+  else
+  begin
+    //*** if param ReReadMoFileOnSameLanguage is set, use the ReTranslate
+    //    function nevertheless if the current language is the same like the
+    //    new (-> reread the current .mo-file from the file system).
+    if ReReadMoFileOnSameLanguage or
+       (comp.LastLanguage <> curlang) then
+    begin
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('The retranslator is being executed.');
+      {$endif}
+      comp.Retranslator.Execute;
+    end
+    else
+    begin
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('The language has not changed. The retranslator is not executed.');
+      {$endif}
+    end;
+  end;
+  comp.LastLanguage:=curlang;
+
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('======================================================================');
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.TP_IgnoreClass(IgnClass: TClass);
+var
+  cm:TClassMode;
+  i:integer;
+begin
+  for i:=0 to TP_ClassHandling.Count-1 do begin
+    cm:=TObject(TP_ClassHandling.Items[i]) as TClassMode;
+    if cm.HClass=IgnClass then
+      raise EGGProgrammingError.Create ('You cannot add a class to the ignore list that is already on that list: '+IgnClass.ClassName+'.');
+    if IgnClass.InheritsFrom(cm.HClass) then begin
+      // This is the place to insert this class
+      cm:=TClassMode.Create;
+      cm.HClass:=IgnClass;
+      TP_ClassHandling.Insert(i,cm);
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('Locally, class '+IgnClass.ClassName+' is being ignored.');
+      {$endif}
+      exit;
+    end;
+  end;
+  cm:=TClassMode.Create;
+  cm.HClass:=IgnClass;
+  TP_ClassHandling.Add(cm);
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('Locally, class '+IgnClass.ClassName+' is being ignored.');
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.TP_IgnoreClassProperty(IgnClass: TClass;
+  propertyname: ComponentNameString);
+var
+  cm:TClassMode;
+  i:integer;
+begin
+  propertyname:=uppercase(propertyname);
+  for i:=0 to TP_ClassHandling.Count-1 do begin
+    cm:=TObject(TP_ClassHandling.Items[i]) as TClassMode;
+    if cm.HClass=IgnClass then begin
+      if Assigned(cm.SpecialHandler) then
+        raise EGGProgrammingError.Create ('You cannot ignore a class property for a class that has a handler set.');
+      cm.PropertiesToIgnore.Add(propertyname);
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
+      {$endif}
+      exit;
+    end;
+    if IgnClass.InheritsFrom(cm.HClass) then begin
+      // This is the place to insert this class
+      cm:=TClassMode.Create;
+      cm.HClass:=IgnClass;
+      cm.PropertiesToIgnore.Add(propertyname);
+      TP_ClassHandling.Insert(i,cm);
+      {$ifdef DXGETTEXTDEBUG}
+      DebugWriteln ('Locally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
+      {$endif}
+      exit;
+    end;
+  end;
+  cm:=TClassMode.Create;
+  cm.HClass:=IgnClass;
+  cm.PropertiesToIgnore.Add(propertyname);
+  TP_GlobalClassHandling.Add(cm);
+  {$ifdef DXGETTEXTDEBUG}
+  DebugWriteln ('Locally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.');
+  {$endif}
+end;
+
+procedure TGnuGettextInstance.TP_Remember(AnObject: TObject;
+  PropName: ComponentNameString; OldValue: TranslatedUnicodeString);
+begin
+  if Assigned(TP_Retranslator) then
+    (TP_Retranslator as TTP_Retranslator).Remember(AnObject, PropName, OldValue)
+  else
+    raise EGGProgrammingError.Create ('You can only call TP_Remember when doing the initial translation (TP_Retranslator is not set).');
+end;
+
+procedure TGnuGettextInstance.FreeTP_ClassHandlingItems;
+begin
+  while TP_ClassHandling.Count<>0 do begin
+    TObject(TP_ClassHandling.Items[0]).Free;
+    TP_ClassHandling.Delete(0);
+  end;
+end;
+
+{$ifndef UNICODE}
+function TGnuGettextInstance.ansi2wideDTCP(const s: ansistring): MsgIdString;
+{$ifdef MSWindows}
+var
+  len:integer;
+{$endif}
+begin
+{$ifdef MSWindows}
+  if DesignTimeCodePage=CP_ACP then begin
+    // No design-time codepage specified. Using runtime codepage instead.
+{$endif}
+    Result:=s;
+{$ifdef MSWindows}
+  end else begin
+    len:=length(s);
+    if len=0 then
+      Result:=''
+    else begin
+      SetLength (Result,len);
+      len:=MultiByteToWideChar(DesignTimeCodePage,0,pansichar(s),len,pwidechar(Result),len);
+      if len=0 then
+        raise EGGAnsi2WideConvError.Create ('Cannot convert string to widestring:'+sLineBreak+s);
+      SetLength (Result,len);
+    end;
+  end;
+{$endif}
+end;
+{$endif}
+
+{$ifndef UNICODE}
+function TGnuGettextInstance.dngettext(const szDomain: DomainString; const singular,
+  plural: ansistring; Number: Integer): TranslatedUnicodeString;
+begin
+  Result:=dngettext (szDomain, ansi2wideDTCP(singular), ansi2wideDTCP(plural), Number);
+end;
+{$endif}
+
+{ TClassMode }
+
+constructor TClassMode.Create;
+begin
+  PropertiesToIgnore:=TStringList.Create;
+  PropertiesToIgnore.Sorted:=True;
+  PropertiesToIgnore.Duplicates:=dupError;
+  PropertiesToIgnore.CaseSensitive:=False;
+end;
+
+destructor TClassMode.Destroy;
+begin
+  FreeAndNil (PropertiesToIgnore);
+  inherited;
+end;
+
+{ TFileLocator }
+
+function TFileLocator.FindSignaturePos(const signature: RawByteString;
+  str: TFileStream): Int64;
+// Finds the position of signature in the file.
+const
+  bufsize=100000;
+var
+  a:RawByteString;
+  b:RawByteString;
+  offset:integer;
+  rd,p:Integer;
+begin
+  if signature='' then
+  begin
+    Result := 0;
+    Exit;
+  end;
+
+  offset:=0;
+  str.Seek(0, soFromBeginning);
+
+  SetLength (a, bufsize);
+  SetLength (b, bufsize);
+  str.ReadBuffer(a[1],bufsize);
+
+  while true do begin
+    rd:=str.Read(b[1],bufsize);
+    p:=pos(signature,a+b);
+    if (p<>0) then begin // do not check p < bufsize+100 here!
+      Result:=offset+p-1;
+      exit;
+    end;
+    if rd<>bufsize then begin
+      // Prematurely ended without finding anything
+      Result:=0;
+      exit;
+    end;
+    a:=b;
+    offset:=offset+bufsize;
+  end;
+{$IF CompilerVersion<34}
+  // this causes a hint in Delphi 10.4 and newer
+  Result:=0;
+{$IFEND}
+end;
+
+procedure TFileLocator.Analyze;
+var
+  HeaderSize,
+  PrefixSize: Integer;
+  dummysig,
+  headerpre,
+  headerbeg,
+  headerend:RawByteString;
+  i:integer;
+  headerbeginpos,
+  headerendpos:integer;
+  offset,
+  tableoffset:int64;
+  fs:TFileStream;
+  fi:TEmbeddedFileInfo;
+  filename:FilenameString;
+  filename8bit:RawByteString;
+const
+  // DetectionSignature: used solely to detect gnugettext usage by assemble
+  DetectionSignature: array[0..35] of AnsiChar='2E23E563-31FA-4C24-B7B3-90BE720C6B1A';
+  // Embedded Header Begin Signature (without dynamic prefix written by assemble)
+  BeginHeaderSignature: array[0..35] of AnsiChar='BD7F1BE4-9FCF-4E3A-ABA7-3443D11AB362';
+  // Embedded Header End Signature (without dynamic prefix written by assemble)
+  EndHeaderSignature: array[0..35] of AnsiChar='1C58841C-D8A0-4457-BF54-D8315D4CF49D';
+  // Assemble Prefix (do not put before the Header Signatures!)
+  SignaturePrefix: array[0..2] of AnsiChar='DXG'; // written from assemble
+begin
+  // Attn: Ensure all Signatures have the same size!
+  HeaderSize := High(BeginHeaderSignature) - Low(BeginHeaderSignature) + 1;
+  PrefixSize := High(SignaturePrefix) - Low(SignaturePrefix) + 1;
+
+  // dummy usage of DetectionSignature (otherwise not compiled into exe)
+  SetLength(dummysig, HeaderSize);
+  for i := 0 to HeaderSize-1 do
+    dummysig[i+1] := DetectionSignature[i];
+
+  // copy byte by byte (D2009+ compatible)
+  SetLength(headerpre, PrefixSize);
+  for i:= 0 to PrefixSize-1 do
+    headerpre[i+1] := SignaturePrefix[i];
+
+  SetLength(headerbeg, HeaderSize);
+  for i:= 0 to HeaderSize-1 do
+    headerbeg[i+1] := BeginHeaderSignature[i];
+
+  SetLength(headerend, HeaderSize);
+  for i:= 0 to HeaderSize-1 do
+    headerend[i+1] := EndHeaderSignature[i];
+
+  BaseDirectory:=ExtractFilePath(ExecutableFilename);
+  try
+    fs:=TFileStream.Create(ExecutableFilename,fmOpenRead or fmShareDenyNone);
+    try
+      // try to find new header begin and end signatures
+      headerbeginpos := FindSignaturePos(headerpre+headerbeg, fs);
+      headerendpos := FindSignaturePos(headerpre+headerend, fs);
+
+      if (headerbeginpos > 0) and (headerendpos > 0) then
+      begin
+        // adjust positions (to the end of each signature)
+        headerbeginpos := headerbeginpos + HeaderSize + PrefixSize;
+
+        // get file table offset (8 byte, stored directly before the end header)
+        fs.Seek(headerendpos - 8, soFromBeginning);
+        // get relative offset and convert to absolute offset during runtime
+        tableoffset := headerbeginpos + ReadInt64(fs);
+
+        // go to beginning of embedded block
+        fs.Seek(headerbeginpos, soFromBeginning);
+
+        offset := tableoffset;
+        Assert(sizeof(offset)=8);
+        while (true) and (fs.Position<headerendpos) do begin
+          fs.Position := offset;
+          offset:=ReadInt64(fs);
+          if offset=0 then
+            exit;
+          offset:=headerbeginpos+offset;
+          fi:=TEmbeddedFileInfo.Create;
+          try
+            // get embedded file info (adjusting dynamic to real offsets now)
+            fi.Offset:=headerbeginpos+ReadInt64(fs);
+            fi.Size:=ReadInt64(fs);
+            SetLength (filename8bit, offset-fs.position);
+            fs.ReadBuffer (filename8bit[1], offset-fs.position);
+            filename:=trim(utf8decode(filename8bit));
+            if PreferExternal and sysutils.fileexists(basedirectory+filename) then begin
+              // Disregard the internal version and use the external version instead
+              FreeAndNil (fi);
+            end else
+              filelist.AddObject(filename,fi);
+          except
+            FreeAndNil (fi);
+            raise;
+          end;
+        end;
+      end;
+    finally
+      FreeAndNil (fs);
+    end;
+  except
+    {$ifdef DXGETTEXTDEBUG}
+    raise;
+    {$endif}
+  end;
+end;
+
+constructor TFileLocator.Create;
+begin
+  MoFilesCS:=TMultiReadExclusiveWriteSynchronizer.Create;
+
+  MoFiles:=TStringList.Create;
+  MoFiles.Sorted:=True;
+  MoFiles.Duplicates:=dupError;
+  MoFiles.CaseSensitive:=False;
+
+  filelist:=TStringList.Create;
+  filelist.Duplicates:=dupError;
+  { TODO : what if it's neither LINUX nor MSWINDOWS? }
+  {$ifdef LINUX}
+  filelist.CaseSensitive:=True;
+  {$endif}
+  {$ifdef MSWINDOWS}
+  filelist.CaseSensitive:=False;
+  {$endif}
+  filelist.Sorted:=True;
+
+  {$IFDEF dx_SupportsResources}
+  FResourceList := TStringList.Create;
+  FResourceList.Duplicates := dupError;
+  FResourceList.CaseSensitive := False;
+  FResourceList.Sorted := True;
+{$ENDIF dx_SupportsResources}
+end;
+
+destructor TFileLocator.Destroy;
+var
+  Idx: integer;
+begin
+{$IFDEF dx_SupportsResources}
+  if Assigned(FResourceList) then begin
+    while FResourceList.Count > 0 do begin
+      Idx := FResourceList.Count - 1;
+      FResourceList.Objects[Idx].Free;
+      FResourceList.Delete(Idx);
+    end;
+    FreeAndNil(FResourceList);
+  end;
+{$ENDIF dx_SupportsResources}
+
+  for Idx := 0 to filelist.Count-1  do
+    FileList.Objects[Idx].Free;
+  FreeAndNil (filelist);
+
+  FreeAndNil (MoFiles);
+  FreeAndNil (MoFilesCS);
+  inherited;
+end;
+
+function TFileLocator.FileExists(filename: FilenameString): boolean;
+var
+  idx:integer;
+{$IFDEF dx_SupportsResources}
+  ResName: string;
+  HResInfo: HRSRC;
+{$ENDIF dx_SupportsResources}
+begin
+  if LeftStr(filename,length(basedirectory))=basedirectory then begin
+    // Cut off basedirectory if the file is located beneath that base directory
+    filename:=MidStr(filename,length(basedirectory)+1,maxint);
+  end;
+  Result:=filelist.Find(filename,idx);
+
+{$IFDEF dx_SupportsResources}
+  if not Result then begin
+    Result := FResourceList.Find(filename, Idx);
+    if not Result then begin
+      ResName := UpperCase(filename);
+      ResName := StringReplace(ResName,  '/', '_', [rfReplaceAll]);
+      ResName := StringReplace(ResName,  '\', '_', [rfReplaceAll]);
+      ResName := StringReplace(ResName, '_LC_MESSAGES_', '_', [rfReplaceAll]);
+      ResName := StringReplace(ResName, '.MO', '', [rfReplaceAll]);
+      HResInfo := FindResource(hInstance, PChar(ResName), RT_RCDATA);
+      Result := (HResInfo <> 0);
+      if Result then
+        FResourceList.AddObject(filename, TResourceFileInfo.Create(ResName));
+    end;
+  end;
+{$ENDIF dx_SupportsResources}
+end;
+
+function TFileLocator.GetMoFile(filename: FilenameString; DebugLogger:TDebugLogger): TMoFile;
+var
+  fi:TEmbeddedFileInfo;
+  idx:integer;
+  idxname:FilenameString;
+  Offset, Size: Int64;
+  realfilename:FilenameString;
+  ResName: string;
+begin
+  // Find real filename
+  offset:=0;
+  size:=0;
+  Resname := '';
+  realfilename:=filename;
+  if LeftStr(filename,length(basedirectory))=basedirectory then begin
+    filename:=MidStr(filename,length(basedirectory)+1,maxint);
+    idx:=filelist.IndexOf(filename);
+    if idx<>-1 then begin
+      fi:=filelist.Objects[idx] as TEmbeddedFileInfo;
+      realfilename:=ExecutableFilename;
+      offset:=fi.offset;
+      size:=fi.size;
+      {$ifdef DXGETTEXTDEBUG}
+      DebugLogger ('Instead of '+filename+', using '+realfilename+' from offset '+IntTostr(offset)+', size '+IntToStr(size));
+      {$endif}
+    end
+{$IFDEF dx_SupportsResources}
+    else begin
+      Idx := FResourceList.IndexOf(filename);
+      if Idx <> -1 then begin
+        realfilename := ExecutableFilename;
+        ResName := (FResourceList.Objects[Idx] as TResourceFileInfo).ResourceName;
+  {$ifdef DXGETTEXTDEBUG}
+      DebugLogger ('Instead of '+filename+', using resource '+ResName+' from '+realfilename);
+  {$endif}
+      end;
+    end;
+{$ENDIF dx_SupportsResources}
+  end;
+
+
+  {$ifdef DXGETTEXTDEBUG}
+  DebugLogger ('Reading .mo data from file '''+filename+'''');
+  {$endif}
+
+  // Find TMoFile object
+  MoFilesCS.BeginWrite;
+  try
+{$IFDEF dx_SupportsResources}
+    if ResName <> '' then begin
+      idxname := realfilename + ' //\\ ' + ResName;
+    end else
+{$ENDIF dx_SupportsResources}
+      idxname:=realfilename+' //\\ '+IntToStr(offset);
+    if MoFiles.Find(idxname, idx) then begin
+      Result:=MoFiles.Objects[idx] as TMoFile;
+    end else begin
+      Result:=TMoFile.Create (realfilename, Offset, Size, UseMemoryMappedFiles, ResName);
+      MoFiles.AddObject(idxname, Result);
+    end;
+    Inc (Result.Users);
+  finally
+    MoFilesCS.EndWrite;
+  end;
+end;
+
+function TFileLocator.ReadInt64(str: TStream): int64;
+begin
+  Assert (sizeof(Result)=8);
+  str.ReadBuffer(Result,8);
+end;
+
+procedure TFileLocator.ReleaseMoFile(mofile: TMoFile);
+var
+  i:integer;
+begin
+  Assert (mofile<>nil);
+
+  MoFilesCS.BeginWrite;
+  try
+    dec (mofile.Users);
+    if mofile.Users<=0 then begin
+      i:=MoFiles.Count-1;
+      while i>=0 do begin
+        if MoFiles.Objects[i]=mofile then begin
+          MoFiles.Delete(i);
+          FreeAndNil (mofile);
+          break;
+        end;
+        dec (i);
+      end;
+    end;
+  finally
+    MoFilesCS.EndWrite;
+  end;
+end;
+
+{ TTP_Retranslator }
+
+constructor TTP_Retranslator.Create;
+begin
+  list:=TList.Create;
+  KnownRetranslators.Add(Self);
+end;
+
+destructor TTP_Retranslator.Destroy;
+var
+  i:integer;
+begin
+  for i:=0 to list.Count-1 do
+    TObject(list.Items[i]).Free;
+  FreeAndNil (list);
+
+  // some times, we are finalized before the main form's unit
+  if Assigned(KnownRetranslators) then
+    KnownRetranslators.Remove(Self);
+
+  inherited;
+end;
+
+procedure RemoveFromKnowRetranslators(obj: TObject); {$ifdef dx_has_Inline}inline;{$endif}
+var
+  retranslatorIndex:Integer;
+  retranslator:TTP_Retranslator;
+  itemIndex:Integer;
+  item:TTP_RetranslatorItem;
+begin
+  for retranslatorIndex:=0 to KnownRetranslators.Count-1 do
+  begin
+    retranslator:=TTP_Retranslator(KnownRetranslators.List[retranslatorIndex]);
+    itemIndex:=0;
+    while itemIndex<retranslator.list.Count do
+    begin
+      item:=TTP_RetranslatorItem(retranslator.list.List[itemIndex]);
+      if item.obj=obj then
+      begin
+        item.Free;
+        retranslator.list.delete(itemIndex);
+      end
+      else
+      begin
+        inc(itemIndex);
+      end;
+    end;
+  end;
+end;
+
+procedure TTP_Retranslator.Execute;
+var
+  i:integer;
+  sl:TStrings;
+  item:TTP_RetranslatorItem;
+  newvalue:TranslatedUnicodeString;
+  comp:TGnuGettextComponentMarker;
+  ppi:PPropInfo;
+begin
+  for i:=0 to list.Count-1 do begin
+    item:=TObject(list.items[i]) as TTP_RetranslatorItem;
+    if item.obj is TComponent then begin
+      comp:=TComponent(item.obj).FindComponent('GNUgettextMarker') as TGnuGettextComponentMarker;
+      if Assigned(comp) and (self<>comp.Retranslator) then begin
+        comp.Retranslator.Execute;
+        Continue;
+      end;
+    end;
+    if item.obj is TStrings then begin
+      // Since we don't know the order of items in sl, and don't have
+      // the original .Objects[] anywhere, we cannot anticipate anything
+      // about the current sl.Strings[] and sl.Objects[] values. We therefore
+      // have to discard both values. We can, however, set the original .Strings[]
+      // value into the list and retranslate that.
+      sl:=TStringList.Create;
+      try
+        sl.Text:=item.OldValue;
+        Instance.TranslateStrings(sl,textdomain);
+        (item.obj as TStrings).BeginUpdate;
+        try
+          (item.obj as TStrings).Text:=sl.Text;
+        finally
+          (item.obj as TStrings).EndUpdate;
+        end;
+      finally
+        FreeAndNil (sl);
+      end;
+    end else begin
+      if (textdomain = '') or (textdomain = DefaultTextDomain) then
+        newValue := ComponentGettext(item.OldValue, instance)
+      else
+        newValue := instance.dgettext(textdomain,item.OldValue);
+      ppi:=GetPropInfo(item.obj, item.Propname);
+      if ppi<>nil then begin
+        SetWideStrProp(item.obj, ppi, newValue);
+      end else begin
+        {$ifdef DXGETTEXTDEBUG}
+        Instance.DebugWriteln ('ERROR: On retranslation, property disappeared: '+item.Propname+' for object of type '+item.obj.ClassName);
+        {$endif}
+      end;
+    end;
+  end;
+end;
+
+procedure TTP_Retranslator.Remember(obj: TObject; PropName: ComponentNameString;
+  OldValue: TranslatedUnicodeString);
+var
+  item:TTP_RetranslatorItem;
+begin
+  item:=TTP_RetranslatorItem.Create;
+  item.obj:=obj;
+  item.Propname:=Propname;
+  item.OldValue:=OldValue;
+  list.Add(item);
+
+  // As we are storing a reference to an object in our list, we must be notified
+  // when that object is deleted.
+  // The only way to do that for any instance of TObject is to hook into
+  // BeforeDestruction via the virtual method table.
+  HookedObjects.Proxify(obj);
+end;
+
+{ TGnuGettextComponentMarker }
+
+destructor TGnuGettextComponentMarker.Destroy;
+begin
+  FreeAndNil (Retranslator);
+  inherited;
+end;
+
+{ THook }
+
+constructor THook.Create(OldProcedure, NewProcedure: pointer; FollowJump:boolean=false);
+{ Idea and original code from Igor Siticov }
+{ Modified by Jacques Garcia Vazquez and Lars Dybdahl }
+begin
+  {$ifndef CPU386}
+  {$ifndef CPUx64}
+  raise Exception.Create ('This procedure only works on Intel i386 or x64 compatible processors.');
+  {$endif}
+  {$endif}
+
+  oldproc:=OldProcedure;
+  newproc:=NewProcedure;
+
+  Reset (FollowJump);
+end;
+
+destructor THook.Destroy;
+begin
+  Shutdown;
+  inherited;
+end;
+
+procedure THook.Disable;
+begin
+  Assert (PatchPosition<>nil,'Patch position in THook was nil when Disable was called');
+  PatchPosition[0]:=Original[0];
+  PatchPosition[1]:=Original[1];
+  PatchPosition[2]:=Original[2];
+  PatchPosition[3]:=Original[3];
+  PatchPosition[4]:=Original[4];
+end;
+
+procedure THook.Enable;
+begin
+  Assert (PatchPosition<>nil,'Patch position in THook was nil when Enable was called');
+  PatchPosition[0]:=Patch[0];
+  PatchPosition[1]:=Patch[1];
+  PatchPosition[2]:=Patch[2];
+  PatchPosition[3]:=Patch[3];
+  PatchPosition[4]:=Patch[4];
+end;
+
+procedure THook.Reset(FollowJump: boolean);
+var
+  offset:integer;
+  {$ifdef LINUX}
+  p:pointer;
+  pagesize:integer;
+  {$endif}
+  {$ifdef MSWindows}
+  ov: cardinal;
+  {$endif}
+begin
+  if PatchPosition<>nil then
+    Shutdown;
+
+  patchPosition := OldProc;
+  if FollowJump and (Word(OldProc^) = $25FF) then begin
+    // This finds the correct procedure if a virtual jump has been inserted
+    // at the procedure address
+    Inc(patchPosition, 2); // skip the jump
+    {$IFDEF CPUX64}
+    patchPosition := pansiChar(Pointer(patchPosition + 4 + PInteger(patchPosition)^)^);
+    {$ELSE}
+    patchPosition := pansiChar(Pointer(pointer(patchPosition)^)^);
+    {$ENDIF CPUX64}
+  end;
+  offset:=pansiChar(NewProc)-pansiChar(pointer(patchPosition))-5;
+
+  Patch[0] := ansichar($E9);
+  Patch[1] := ansichar(offset and 255);
+  Patch[2] := ansichar((offset shr 8) and 255);
+  Patch[3] := ansichar((offset shr 16) and 255);
+  Patch[4] := ansichar((offset shr 24) and 255);
+
+  Original[0]:=PatchPosition[0];
+  Original[1]:=PatchPosition[1];
+  Original[2]:=PatchPosition[2];
+  Original[3]:=PatchPosition[3];
+  Original[4]:=PatchPosition[4];
+
+  {$ifdef MSWINDOWS}
+  if not VirtualProtect(Pointer(PatchPosition), 5, PAGE_EXECUTE_READWRITE, @ov) then
+    RaiseLastOSError;
+  {$endif}
+  {$ifdef LINUX}
+  pageSize:=sysconf (_SC_PAGE_SIZE);
+  p:=pointer(PatchPosition);
+  p:=pointer((pansichar(p) + PAGESIZE-1) and not (PAGESIZE-1) - pageSize);
+  if mprotect (p, pageSize, PROT_READ + PROT_WRITE + PROT_EXEC) <> 0 then
+    RaiseLastOSError;
+  {$endif}
+end;
+
+procedure THook.Shutdown;
+begin
+  Disable;
+  PatchPosition:=nil;
+end;
+
+procedure HookIntoResourceStrings (enabled:boolean=true; SupportPackages:boolean=false);
+begin
+  HookLoadResString.Reset (SupportPackages);
+  HookLoadStr.Reset (SupportPackages);
+  HookFmtLoadStr.Reset (SupportPackages);
+  if enabled then begin
+    HookLoadResString.Enable;
+    HookLoadStr.Enable;
+    HookFmtLoadStr.Enable;
+  end;
+end;
+
+{ TMoFile }
+
+function TMoFile.autoswap32(i: cardinal): cardinal;
+var
+  cnv1, cnv2:
+    record
+      case integer of
+        0: (arr: array[0..3] of byte);
+        1: (int: cardinal);
+    end;
+begin
+  if doswap then begin
+    cnv1.int := i;
+    cnv2.arr[0] := cnv1.arr[3];
+    cnv2.arr[1] := cnv1.arr[2];
+    cnv2.arr[2] := cnv1.arr[1];
+    cnv2.arr[3] := cnv1.arr[0];
+    Result := cnv2.int;
+  end else
+    Result := i;
+end;
+
+function TMoFile.CardinalInMem(baseptr: PansiChar; Offset: Cardinal): Cardinal;
+var pc:^Cardinal;
+begin
+  inc (baseptr,offset);
+  pc:=Pointer(baseptr);
+  Result:=pc^;
+  if doswap then
+    autoswap32(Result);
+end;
+
+constructor TMoFile.Create(const filename: FilenameString;
+                           const Offset: int64; Size: int64;
+                           const xUseMemoryMappedFiles: Boolean;
+                           const ResName: string);
+var
+  i:cardinal;
+  nn:integer;
+  mofile:TStream;
+begin
+  if sizeof(i) <> 4 then
+    raise EGGProgrammingError.Create('TDomain in gnugettext is written for an architecture that has 32 bit integers.');
+
+  {$ifdef mswindows}
+  FUseMemoryMappedFiles := xUseMemoryMappedFiles;
+  {$endif}
+
+  {$ifdef linux}
+  FUseMemoryMappedFiles := False;
+  {$endif}
+
+{$IFDEF dx_SupportsResources}
+  if ResName <> '' then begin
+    // Read the whole file into memory
+    mofile:=TResourceStream.Create(HInstance, ResName, RT_RCDATA);
+    try
+      size := mofile.Size;
+      Getmem (momemoryHandle, size);
+      momemory := momemoryHandle;
+      mofile.ReadBuffer(momemory^, size);
+    finally
+      FreeAndNil(mofile);
+    end;
+  end else
+{$endif dx_SupportsResources}
+  if FUseMemoryMappedFiles then
+  begin
+    // Map the mo file into memory and let the operating system decide how to cache
+    mo:=createfile (PChar(filename),GENERIC_READ,FILE_SHARE_READ,nil,OPEN_EXISTING,0,0);
+    if mo=INVALID_HANDLE_VALUE then
+      raise EGGIOError.Create ('Cannot open file '+filename);
+    momapping:=CreateFileMapping (mo, nil, PAGE_READONLY, 0, 0, nil);
+    if momapping=0 then
+      raise EGGIOError.Create ('Cannot create memory map on file '+filename);
+    momemoryHandle:=MapViewOfFile (momapping,FILE_MAP_READ,0,0,0);
+    if momemoryHandle=nil then begin
+      raise EGGIOError.Create ('Cannot map file '+filename+' into memory. Reason: '+GetLastWinError);
+    end;
+    momemory:=momemoryHandle+offset;
+  end
+  else
+  begin
+    // Read the whole file into memory
+    mofile:=TFileStream.Create (filename, fmOpenRead or fmShareDenyNone);
+    try
+      if (size = 0) then
+        size := mofile.Size;
+      Getmem (momemoryHandle, size);
+      momemory := momemoryHandle;
+      mofile.Position := offset;
+      mofile.ReadBuffer(momemory^, size);
+    finally
+      FreeAndNil(mofile);
+    end;
+  end;
+
+  // Check the magic number
+  doswap:=False;
+  i:=CardinalInMem(momemory,0);
+  if (i <> $950412DE) and (i <> $DE120495) then
+    raise EGGIOError.Create('This file is not a valid GNU gettext mo file: ' + filename);
+  doswap := (i = $DE120495);
+
+
+  // Find the positions in the file according to the file format spec
+  CardinalInMem(momemory,4);       // Read the version number, but don't use it for anything.
+  N:=CardinalInMem(momemory,8);    // Get string count
+  O:=CardinalInMem(momemory,12);   // Get offset of original strings
+  T:=CardinalInMem(momemory,16);   // Get offset of translated strings
+
+  // Calculate start conditions for a binary search
+  nn := N;
+  startindex := 1;
+  while nn <> 0 do begin
+    nn := nn shr 1;
+    startindex := startindex shl 1;
+  end;
+  startindex := startindex shr 1;
+  startstep := startindex shr 1;
+end;
+
+destructor TMoFile.Destroy;
+begin
+  if FUseMemoryMappedFiles then
+  begin
+    UnMapViewOfFile (momemoryHandle);
+    CloseHandle (momapping);
+    CloseHandle (mo);
+  end
+  else
+  begin
+    FreeMem (momemoryHandle);
+  end;
+
+  inherited;
+end;
+
+function TMoFile.gettext(const msgid: RawUtf8String;var found:boolean): RawUtf8String;
+var
+  i, step: cardinal;
+  offset, pos: cardinal;
+  CompareResult:integer;
+  msgidptr,a,b:PAnsiChar;
+  abidx:integer;
+  size, msgidsize:integer;
+begin
+  found:=false;
+  msgidptr:=PAnsiChar(msgid);
+  msgidsize:=length(msgid);
+
+  // Do binary search
+  i:=startindex;
+  step:=startstep;
+  while true do begin
+    // Get string for index i
+    pos:=O+8*(i-1);
+    offset:=CardinalInMem (momemory,pos+4);
+    size:=CardinalInMem (momemory,pos);
+    a:=msgidptr;
+    b:=momemory+offset;
+    abidx:=size;
+    if msgidsize<abidx then
+      abidx:=msgidsize;
+    CompareResult:=0;
+    while abidx<>0 do begin
+      CompareResult:=integer(byte(a^))-integer(byte(b^));
+      if CompareResult<>0 then
+        break;
+      dec (abidx);
+      inc (a);
+      inc (b);
+    end;
+    if CompareResult=0 then
+      CompareResult:=msgidsize-size;
+    if CompareResult=0 then begin  // msgid=s
+      // Found the msgid
+      pos:=T+8*(i-1);
+      offset:=CardinalInMem (momemory,pos+4);
+      size:=CardinalInMem (momemory,pos);
+      SetString (Result,momemory+offset,size);
+      found:=True;
+      break;
+    end;
+    if step=0 then begin
+      // Not found
+      Result:=msgid;
+      break;
+    end;
+    if CompareResult<0 then begin  // msgid<s
+      if i < 1+step then
+        i := 1
+      else
+        i := i - step;
+      step := step shr 1;
+    end else begin  // msgid>s
+      i := i + step;
+      if i > N then
+        i := N;
+      step := step shr 1;
+    end;
+  end;
+end;
+
+{ THookedObjects }
+
+function getClassData(aClass:TClass):PProxyClassData; overload; {$ifdef dx_has_Inline}inline;{$endif}
+begin
+  Result:=PProxyClassData((PAnsiChar(aClass) + vmtSelfPtr));
+end;
+
+function getClassData(obj:TObject):PProxyClassData; overload; {$ifdef dx_has_Inline}inline;{$endif}
+begin
+  Result:=getClassData(obj.ClassType);
+end;
+
+function GetBeforeDestructionVmtAddress(AClass: TClass): PPointer; overload;
+asm
+  {$IFDEF CPU386}
+  lea eax, eax + VMTOFFSET TObject.BeforeDestruction
+  {$ENDIF CPU386}
+  {$IFDEF CPUx64}
+  lea rax, rcx + VMTOFFSET TObject.BeforeDestruction
+  {$ENDIF CPUx64}
+end;
+
+procedure THookedObjects.BeforeDestructionHook;
+type
+  TOriginalBeforeDestruction = procedure of object;
+var
+  method:TMethod;
+begin
+  // NOTE: this method is declared inside THookedObjects to have access
+  // to Self, but because it is used as a hook for other classes' BeforeDestruction,
+  // Self will not be an instance of THookedObjects but one of the hooked class.
+
+  // remove ourselves from known retranslators
+  RemoveFromKnowRetranslators(Self);
+
+  // call the inherited BeforeDestruction
+  // we must do it via the parent class type because simply writing
+  // inherited BeforeDestruction will be resolved at compile time to
+  // TObject.BeforeDestruction which is not what we want
+  method.Code:=GetBeforeDestructionVmtAddress(getClassData(ClassType)^.Parent^)^;
+  method.Data:=Self;
+  TOriginalBeforeDestruction(method);
+
+  // Remove from hooked objects (Remember, Self is not a THookedObjects instance)
+  HookedObjects.Remove(Self);
+end;
+
+constructor THookedObjects.Create;
+begin
+  inherited Create;
+
+  interceptorClassDatas:=TList.Create;
+end;
+
+destructor THookedObjects.Destroy;
+var
+  i:Integer;
+begin
+  for i:=0 to Count-1 do
+    Unproxify(TObject(Items[i]));
+
+  for i:=0 to interceptorClassDatas.Count-1 do
+    FreeMem(interceptorClassDatas[i]);
+  interceptorClassDatas.Free;
+
+  inherited Destroy;
+end;
+
+function THookedObjects.GetBeforeDestructionHookAddress: Pointer;
+type
+  TBeforeDestructionHook=procedure of object;
+var
+  m:TBeforeDestructionHook;
+begin
+  m:=BeforeDestructionHook;
+  Result:=TMethod(m).Code;
+end;
+
+function THookedObjects.findInterceptorClassData(aClass:TClass):Pointer;
+var
+  i:Integer;
+  proxyClassData:Pointer;
+begin
+  i:=0;
+  Result:=nil;
+  while (i<interceptorClassDatas.Count) and (Result=nil) do
+  begin
+    proxyClassData:=interceptorClassDatas[i];
+    if (PProxyClassData(proxyClassData)^.Parent^=aClass) or (PProxyClassData(proxyClassData)^.SelfPtr=aClass) then
+      Result:=proxyClassData;
+
+    Inc(i);
+  end;
+end;
+
+{$ifdef dx_has_VclThemes}
+type
+  TCustomStyleEngineAccess=
+    class(TCustomStyleEngine)
+    public
+      class property RegisteredStyleHooks;
+    end;
+{$endif dx_has_VclThemes}
+
+procedure THookedObjects.Proxify(obj:TObject);
+const
+  growthCapacity=50;
+var
+  proxyClass:TClass;
+  proxyClassData:Pointer;
+  objClassData:PProxyClassData;
+  size,classOfs:Integer;
+  beforeDestructionVmtAddr:PPointer;
+  hookedClassNameLength:Cardinal;
+begin
+  if IndexOf(obj)<0 then
+  begin
+    classOfs:=-vmtSelfPtr;
+    proxyClassData:=findInterceptorClassData(obj.ClassType);
+    if proxyClassData=nil then
+    begin
+      // According to Allen Bauer, we know that the ClassName is stored right after the
+      // virtual method pointers.
+      // So to figure out the size, we take the difference between the start of the VMT
+      // and the location of ClassName.
+      // See the following link for reference:
+      // http://stackoverflow.com/questions/760513/where-can-i-find-information-on-the-structure-of-the-delphi-vmt
+      objClassData:=getClassData(obj.ClassType);
+      hookedClassNameLength:=Length(objClassData.ClassName^)+3;
+      if hookedClassNameLength>255 then
+        hookedClassNameLength:=255;
+      size:=NativeUInt(objClassData.ClassName)-NativeUInt(objClassData)+hookedClassNameLength+2;
+
+      proxyClassData:=AllocMem(size);
+      interceptorClassDatas.Add(proxyClassData);
+
+      proxyClass:=TClass(PAnsiChar(proxyClassData) + classOfs);
+
+      // Copy everything from the original class data then do the following adjustments:
+      // - Parent points to the address of the original data SelfPtr.
+      // - SelfPtr points to ourselves
+      // - ClassName points at the end of our structure to respect compiler layout (see above)
+      // - ClassName gets a suffix as it helps when debugging
+      System.Move(objClassData^, proxyClassData^, size);
+      PProxyClassData(proxyClassData)^.Parent:=@(objClassData^.SelfPtr);
+      PProxyClassData(proxyClassData)^.SelfPtr:=proxyClass;
+{$IFDEF dx_ChangeProxyClassname}
+      PProxyClassData(proxyClassData)^.ClassName:=PShortString(PAnsiChar(proxyClassData)+size-hookedClassNameLength-2);
+      SetLength(PProxyClassData(proxyClassData)^.ClassName^,hookedClassNameLength);
+      System.Move(AnsiString('!dx'#0),(PAnsiChar(PProxyClassData(proxyClassData)^.ClassName)+hookedClassNameLength+1-3)^,4);
+{$ENDIF}
+
+      // Place our BeforeDestruction virtual method in the metaclass VMT
+      beforeDestructionVmtAddr:=GetBeforeDestructionVmtAddress(proxyClass);
+      beforeDestructionVmtAddr^:=GetBeforeDestructionHookAddress;
+
+      {$ifdef dx_has_VclThemes}
+      // As we replace the metaclass for the object, the style engine will not
+      // know about our new metaclass, and thus we must tell it it exists.
+      if TCustomStyleEngineAccess.RegisteredStyleHooks.ContainsKey(obj.ClassType) and
+         not TCustomStyleEngineAccess.RegisteredStyleHooks.ContainsKey(proxyClass) then
+        TCustomStyleEngine.RegisterStyleHook(proxyClass, TCustomStyleEngineAccess.RegisteredStyleHooks[obj.ClassType].Last);
+      {$endif dx_has_VclThemes}
+    end
+    else
+    begin
+      proxyClass:=TClass(PAnsiChar(proxyClassData) + classOfs);
+    end;
+
+    PPointer(obj)^:=proxyClass;
+    Add(obj);
+  end;
+end;
+
+procedure THookedObjects.Unproxify(obj:TObject);
+begin
+  PPointer(obj)^:=getClassData(obj)^.Parent^;
+end;
+{$ifdef dx_German_Delphi_fix}
+function VclMenusShortCutToText(ShortCut: TShortCut): string;
+{$IfDEF dx_has_StringBuilder}
+var
+  sbShortCut: TStringBuilder;
+begin
+  HookShortCutToText.Disable;
+  try
+    // Call original function to get shortcut
+{$IFDEF dx_has_dotted_unitnames}
+    Result := Vcl.Menus.ShortCutToText(ShortCut);
+{$ELSE ~dx_has_dotted_unitnames}
+    Result := Menus.ShortCutToText(ShortCut);
+{$ENDIF dx_has_dotted_unitnames}
+
+    // Shortcuts are in German by default, so
+    // if currently used language is not German: replace the German names by English names
+    if not SameText(GetCurrentLanguageCode, 'de') then
+      begin
+        // Use a Stringbuilder as it is way more performant in replace operations than StringReplace
+        sbShortCut := TStringBuilder.Create(Result);
+        try
+          // Replace German shortcut names
+{$IFDEF dx_has_dotted_unitnames}
+          sbShortCut.
+            Replace(Vcl.Consts.SmkcBkSp, 'BkSp'). // 'Rueck'
+            Replace(Vcl.Consts.SmkcEnter, 'Enter'). // 'Eingabe'
+            Replace(Vcl.Consts.SmkcSpace, 'Space'). // 'Leer'
+            Replace(Vcl.Consts.SmkcPgUp, 'PgUp'). // 'BildAuf'
+            Replace(Vcl.Consts.SmkcPgDn, 'PgDn'). // 'BildAb'
+            Replace(Vcl.Consts.SmkcEnd, 'End'). // 'Ende'
+            Replace(Vcl.Consts.SmkcHome, 'Home'). // 'Pos1'
+            Replace(Vcl.Consts.SmkcLeft, 'Left'). // 'Links'
+            Replace(Vcl.Consts.SmkcUp, 'Up'). // 'Auf'
+            Replace(Vcl.Consts.SmkcRight, 'Right'). // 'Rechts'
+            Replace(Vcl.Consts.SmkcDown, 'Down'). // 'Ab'
+            Replace(Vcl.Consts.SmkcIns, 'Ins'). // 'Einfg'
+            Replace(Vcl.Consts.SmkcDel, 'Del'). // 'Entf'
+            Replace(Vcl.Consts.SmkcShift, 'Shift+'). // 'Umsch+'
+            Replace(Vcl.Consts.SmkcCtrl, 'Ctrl+'); // 'Strg+'
+{$ELSE ~dx_has_dotted_unitnames}
+          sbShortCut.
+            Replace(Consts.SmkcBkSp, 'BkSp'). // 'Rueck'
+            Replace(Consts.SmkcEnter, 'Enter'). // 'Eingabe'
+            Replace(Consts.SmkcSpace, 'Space'). // 'Leer'
+            Replace(Consts.SmkcPgUp, 'PgUp'). // 'BildAuf'
+            Replace(Consts.SmkcPgDn, 'PgDn'). // 'BildAb'
+            Replace(Consts.SmkcEnd, 'End'). // 'Ende'
+            Replace(Consts.SmkcHome, 'Home'). // 'Pos1'
+            Replace(Consts.SmkcLeft, 'Left'). // 'Links'
+            Replace(Consts.SmkcUp, 'Up'). // 'Auf'
+            Replace(Consts.SmkcRight, 'Right'). // 'Rechts'
+            Replace(Consts.SmkcDown, 'Down'). // 'Ab'
+            Replace(Consts.SmkcIns, 'Ins'). // 'Einfg'
+            Replace(Consts.SmkcDel, 'Del'). // 'Entf'
+            Replace(Consts.SmkcShift, 'Shift+'). // 'Umsch+'
+            Replace(Consts.SmkcCtrl, 'Ctrl+'); // 'Strg+'
+{$ENDIF dx_has_dotted_unitnames}
+          Result := sbShortCut.ToString;
+        finally
+          sbShortCut.Free;
+        end;
+      end;
+  finally
+    HookShortCutToText.Enable;
+  end;
+end;
+{$ELSE ~ dx_has_StringBuilder}
+begin
+  HookShortCutToText.Disable;
+  try
+    // Call original function to get shortcut
+    Result := Menus.ShortCutToText(ShortCut);
+
+    // Shortcuts are in German by default, so
+    // if currently used language is not German: replace the German names by English names
+    if not SameText(GetCurrentLanguageCode, 'de') then
+      begin
+        Result := StringReplace(Result, Consts.SmkcBkSp, 'BkSp', []); // 'Rueck'
+        Result := StringReplace(Result, Consts.SmkcEnter, 'Enter', []); // 'Eingabe'
+        Result := StringReplace(Result, Consts.SmkcSpace, 'Space', []); // 'Leer'
+        Result := StringReplace(Result, Consts.SmkcPgUp, 'PgUp', []); // 'BildAuf'
+        Result := StringReplace(Result, Consts.SmkcPgDn, 'PgDn', []); // 'BildAb'
+        Result := StringReplace(Result, Consts.SmkcEnd, 'End', []); // 'Ende'
+        Result := StringReplace(Result, Consts.SmkcHome, 'Home', []); // 'Pos1'
+        Result := StringReplace(Result, Consts.SmkcLeft, 'Left', []); // 'Links'
+        Result := StringReplace(Result, Consts.SmkcUp, 'Up', []); // 'Auf'
+        Result := StringReplace(Result, Consts.SmkcRight, 'Right', []); // 'Rechts'
+        Result := StringReplace(Result, Consts.SmkcDown, 'Down', []); // 'Ab'
+        Result := StringReplace(Result, Consts.SmkcIns, 'Ins', []); // 'Einfg'
+        Result := StringReplace(Result, Consts.SmkcDel, 'Del', []); // 'Entf'
+        Result := StringReplace(Result, Consts.SmkcShift, 'Shift+', []); // 'Umsch+'
+        Result := StringReplace(Result, Consts.SmkcCtrl, 'Ctrl+', []); // 'Strg+'
+      end;
+  finally
+    HookShortCutToText.Enable;
+  end;
+end;
+{$ENDIF dx_has_StringBuilder}
+{$endif dx_German_Delphi_fix}
+
+{$IFDEF dx_SupportsResources}
+{ TResourceFileInfo }
+
+constructor TResourceFileInfo.Create(const _ResourceName: string);
+begin
+  inherited Create;
+  ResourceName := _ResourceName;
+end;
+{$ENDIF dx_SupportsResources}
+
+var
+  param0:string;
+
+initialization
+  {$ifdef DXGETTEXTDEBUG}
+  {$ifdef MSWINDOWS}
+  MessageBox (0,'gnugettext.pas debugging is enabled. Turn it off before releasing this piece of software.','Information',MB_OK);
+  {$endif}
+  {$ifdef LINUX}
+  writeln (stderr,'gnugettext.pas debugging is enabled. Turn it off before releasing this piece of software.');
+  {$endif}
+  {$endif}
+  {$ifdef FPC}
+    {$ifdef LINUX}
+      SetLocale(LC_ALL, '');
+      SetCWidestringManager;
+    {$endif LINUX}
+  {$endif FPC}
+  // Get DLL/shared object filename
+  SetLength(ExecutableFilename, 300); // MAX_PATH ?
+  {$ifdef MSWINDOWS}
+  SetLength(ExecutableFilename, GetModuleFileName(HInstance,
+    PChar(ExecutableFilename), Length(ExecutableFilename)));
+  {$endif}
+  {$ifdef LINUX}
+  if ModuleIsLib or ModuleIsPackage then
+  begin
+    // This line has not been tested on Linux, yet, but should work.
+    SetLength(ExecutableFilename, GetModuleFileName(0, PChar(ExecutableFilename),
+      Length(ExecutableFilename)));
+  end else
+    ExecutableFilename:=Paramstr(0);
+  {$endif}
+  FileLocator:=TFileLocator.Create;
+  FileLocator.Analyze;
+  ResourceStringDomainList:=TStringList.Create;
+  ResourceStringDomainList.Add(DefaultTextDomain);
+  ResourceStringDomainListCS:=TMultiReadExclusiveWriteSynchronizer.Create;
+  ComponentDomainList:=TStringList.Create;
+  ComponentDomainList.Add(DefaultTextDomain);
+  ComponentDomainListCS:=TMultiReadExclusiveWriteSynchronizer.Create;
+  DefaultInstance:=TGnuGettextInstance.Create;
+  {$ifdef MSWINDOWS}
+  Win32PlatformIsUnicode := (Win32Platform = VER_PLATFORM_WIN32_NT);
+  {$endif}
+
+  // replace Borlands LoadResString with gettext enabled version:
+  {$ifdef UNICODE}
+  HookLoadResString:=THook.Create (@system.LoadResString, @LoadResStringW);
+  {$else}
+  HookLoadResString:=THook.Create (@system.LoadResString, @LoadResStringA);
+  {$endif}
+  HookLoadStr:=THook.Create (@sysutils.LoadStr, @SysUtilsLoadStr);
+  HookFmtLoadStr:=THook.Create (@sysutils.FmtLoadStr, @SysUtilsFmtLoadStr);
+{$ifdef dx_German_Delphi_fix}
+  // Create hook for Vcl.Menus.ShortCutToText to translate shortcut strings.
+{$IFDEF dx_has_dotted_unitnames}
+  HookShortCutToText := THook.Create(@Vcl.Menus.ShortCutToText, @VclMenusShortCutToText);
+{$ELSE ~dx_has_dotted_unitnames}
+  HookShortCutToText := THook.Create(@Menus.ShortCutToText, @VclMenusShortCutToText);
+{$ENDIF dx_has_dotted_unitnames}
+{$endif dx_German_Delphi_fix}
+  param0:=lowercase(extractfilename(paramstr(0)));
+  if (param0<>'delphi32.exe') and (param0<>'kylix') and (param0<>'bds.exe') then
+    begin
+      HookIntoResourceStrings (AutoCreateHooks,false);
+{$ifdef dx_German_Delphi_fix}
+      HookShortCutToText.Enable;
+{$endif dx_German_Delphi_fix}
+    end;
+  param0:='';
+
+  HookedObjects:=THookedObjects.Create;
+  KnownRetranslators:=TList.Create;
+
+finalization
+  FreeAndNil (DefaultInstance);
+  FreeAndNil (ResourceStringDomainListCS);
+  FreeAndNil (ResourceStringDomainList);
+  FreeAndNil (ComponentDomainListCS);
+  FreeAndNil (ComponentDomainList);
+  FreeAndNil (HookFmtLoadStr);
+  FreeAndNil (HookLoadStr);
+  FreeAndNil (HookLoadResString);
+  FreeAndNil (FileLocator);
+  FreeAndNil (HookedObjects);
+  FreeAndNil (KnownRetranslators);
+{$ifdef dx_German_Delphi_fix}
+  FreeAndNil (HookShortCutToText);
+{$endif dx_German_Delphi_fix}
+
+end.
+

+ 0 - 0
_cleanofdebug.cmd → _cleandebug.cmd


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.