Jump to content

dmitrybv

Members
  • Content Count

    89
  • Joined

  • Last visited

Everything posted by dmitrybv

  1. The rsvars.bat file contains the following line: @SET PATH=%FrameworkDir%;%FrameworkSDKDir%;C:\RADStudio\23.0\bin;C:\RADStudio\23.0\bin64;C:\RADStudio\23.0\cmake;%PATH% As far as I understand, this command adds new paths to the PATH. How safe is it to call rsvars.bat many times? I need to compile my packages for all Delphi versions starting from 2009. Can the PATH variable overflow after a certain number of rsvars.bat calls? Or not? Or is there a way to reset all variables set in the rsvars.bat file?
  2. It looks like you need to specify the dcc32.exe version via the BDS environment variable. @SET BDS=C:\RADStudio\22.0 @SET FrameworkDir=C:\Windows\Microsoft.NET\Framework\v4.0.30319 @SET FrameworkVersion=v4.5 %FrameworkDir%\MSBuild EhLib.Rtl.dproj /t:Build /p:Config=Release /p:platform=Win32 %FrameworkDir%\MSBuild EhLib.Rtl.dproj /t:Build /p:Config=Release /p:platform=Win64 %FrameworkDir%\MSBuild EhLib.Rtl.dproj /t:Build /p:Config=Release /p:platform=Android64 %FrameworkDir%\MSBuild EhLib.Rtl.dproj /t:Build /p:Config=Release /p:platform=Linux64 %FrameworkDir%\MSBuild EhLib.Rtl.dproj /t:Build /p:Config=Release /p:platform=OSX64
  3. Good afternoon. I have created a library package for cross-platform work on Windows, Android, Linux, macOS, iOS. My package compiles and runs error-free on all platforms. But when I tried to compile the package for different platforms using the command-line compiler, I encountered compilation errors. Here is the result of the experiments ----Win32: Compilation via the RAD Studio IDE - No errors. Compilation via dcc32.exe C:\RADStudio\23.0\Bin\dcc32.exe -B -JPHNE -JL EhLib.Rtl.dpk … 316157 lines, 6.00 seconds, 2562852 bytes code, 3508 bytes data. No Errors. ----Win64: Compilation via the RAD Studio IDE - No errors. Compilation via dcc64.exe C:\RADStudio\23.0\Bin\dcc64.exe -$Y- -$L- -$D- -B -JPHNE -JL -NSData.Win;Bde;Vcl;Vcl.Imaging;Data;Winapi;System;System.Win;Datasnap;Xml;Xml.Win EhLib.Rtl.dpk No Errors. ---- Android64 Compilation via the RAD Studio IDE - No errors. Compilation via dccaarm64.exe C:\RADStudio\23.0\Bin\dccaarm64.exe -$Y- -$L- -$D- -B -NSData.Win;Bde;Vcl;Vcl.Imaging;Data;Winapi;System;System.Win;Datasnap;Xml;Xml.Win EhLib.Rtl.dpk No Errors. ---- Linux64 Compilation via the RAD Studio IDE - No errors. Compilation via dcclinux64.exe C:\RADStudio\23.0\Bin\dcclinux64.exe -$Y- -$L- -$D- -B -NSData.Win;Bde;Vcl;Vcl.Imaging;Data;Winapi;System;System.Win;Datasnap;Xml;Xml.Win EhLib.Rtl.dpk Embarcadero Delphi for Linux 64 bit compiler version 35.0 Copyright (c) 1983,2022 Embarcadero Technologies, Inc. Linker command line: C:\RADStudio\22.0\Bin\ld-linux.exe -o bplEhLib.Rtl280.so -e _ZN5Ehlib3Rtl14initializationEv --gc-sections --version-script EhLib.Rtl.vsr -shared --no-undefined --export-dynamic -z noexecstack -z relro --build-id --eh-frame-hdr -m elf_x86_64 --dynamic-linker /lib64/ld-linux-x86-64.so.2 -s @EhLib.Rtl.lnk -lgcc_s -lrtlhelper_PIC -lc -ldl -lpthread -lz -l:bplrtl280.so -l:bplxmlrtl280.so -l:bpldbrtl280.so -rpath $ORIGIN Error: E2597 C:\RADStudio\22.0\Bin\ld-linux.exe: error: cannot find -lgcc_s C:\RADStudio\22.0\Bin\ld-linux.exe: error: cannot find -lrtlhelper_PIC C:\RADStudio\22.0\Bin\ld-linux.exe: error: cannot find -lc C:\RADStudio\22.0\Bin\ld-linux.exe: error: cannot find -ldl C:\RADStudio\22.0\Bin\ld-linux.exe: error: cannot find -lpthread C:\RADStudio\22.0\Bin\ld-linux.exe: error: cannot find -lz C:\RADStudio\22.0\Bin\ld-linux.exe: error: cannot find bplrtl280.so C:\RADStudio\22.0\Bin\ld-linux.exe: error: cannot find bplxmlrtl280.so C:\RADStudio\22.0\Bin\ld-linux.exe: error: cannot find bpldbrtl280.so c:\radstudio\22.0\lib\linux64\release\SysInit.o(.data+0x0): error: undefined reference to '__init_record_System' c:\radstudio\22.0\lib\linux64\release\SysInit.o:SysInit:function Sysinit::__malloc(NativeUInt): error: undefined reference to 'malloc' c:\radstudio\22.0\lib\linux64\release\SysInit.o:SysInit:function Sysinit::__free(void*): error: undefined reference to 'free' … C:\Users\Public\Documents\Embarcadero\Studio\22.0\Components\EhLib\Src\EhLib.Rtl.dpk.o:.EhLib.Rtl:_ZN5Ehlib3Rtl0E: error: undefined reference to 'Xml::Xmldoc::Finalization()' Fatal: F2588 Linker error code: 1 ($00000001) ---- OSX64 Compilation via the RAD Studio IDE - No errors. Compilation via dccosx64.exe C:\RADStudio\23.0\Bin\dccosx64.exe -$Y- -$L- -$D- -B NSData.Win;Bde;Vcl;Vcl.Imaging;Data;Winapi;System;System.Win;Datasnap;Xml;Xml.Win EhLib.Rtl.dpk Embarcadero Delphi for Mac OS X 64 bit compiler version 36.0 Copyright (c) 1983,2024 Embarcadero Technologies, Inc. Rtl\MemTableDataEh.pas(674) Warning: W1075 Overloading a similar index type by declaring an array property 'Items' + Rtl\MemTableDataEh.pas(674) Related member: property TOrderByList.Items[Integer]: TOrderByItemEh; + Rtl\MemTableDataEh.pas(674) Related member: property TObjectList.Items[NativeInt]: TObject; Linker command line: C:\RADStudio\23.0\bin\ld.exe -arch x86_64 -o bplEhLib.Rtl280.dylib -e __ZN5Ehlib3Rtl14initializationEv -dead_strip -dead_strip_dylibs -mark_dead_strippable_dylib -exported_symbols_list EhLib.Rtl.exp -dylib -export_dynamic -S -x -macosx_version_min 10.14 -rpath $ORIGIN -install_name @rpath/bplEhLib.Rtl280.dylib -filelist EhLib.Rtl.lnk Error: E2597 ld: warning: directory not found for option '-L/usr/lib' ld: warning: directory not found for option '-F/System/Library/Frameworks/' ld: file not found: librtlhelper.a Fatal: F2588 Linker error code: 1 ($00000001) ---- Result Thus, using parameters similar to dcc32, it is not possible to compile through programs dcclinux64.exe , dccosx64.exe . Is it necessary for dcclinux64.exe dccosx64.exe should I specify any additional parameters?
  4. Good day. By default, when compiling packages in Release and Debug mode, the following files are created *.dcu, *.bpl, *.dcp. If you enable generation of C++ files, then *.lib, *.bpi files are also created. Usually *.dcu files are moved to the \$(Platform)\$(Config) folder *.bpl files are moved to the $(BDSCOMMONDIR)\Dcp folder *.dcp, *.lib, *.bpi files are moved to the $(BDSCOMMONDIR)\Bpl folder But since the $(BDSCOMMONDIR)\Dcp and $(BDSCOMMONDIR)\Bpl folders do not provide subfolders for Release and Debug configuration, how does the IDE separate *.bpl, *.dcp, *.lib, *.bpi files for Release and Debug configuration?
  5. Hello How to move a group of files and folders while minimizing the number of intermediate errors? I need to move a group of files and folders so that in case of an error, either all the files and folders remain in their old place. Probably, I need to somehow check each file for blocking by another process and block all the files myself during the move.
  6. Some of my customers get the message >dcc32.exe MyLib.dpk >This version of the product does not support command line compiling when compiling via dcc32.exe. I use dcc32.exe to compile and get the library binaries in my Installer.exe program How to determine that dcc32.exe does not support command line compiling so that Installer can correctly detect the problem and stop installing the library? dcc32.exe returns echo %ERRORLEVEL% = 0.
  7. Good day. I use Embarcadero RAD Studio 11 Version 28.0.48361.3236 If I create a new Android 64-bit application in RAD Studio 11, it runs on the phone without errors. If I try to run the old application, I get the error [PAClient Error] Error: E7688 Error in c:\radstudio\22.0\lib\android\Debug\activity-1.7.2.dex.jar: [PAClient Error] Error: E7688 java.nio.file.NoSuchFileException: c:\radstudio\22.0\lib\android\Debug\activity-1.7.2.dex.jar In my folder c:\radstudio\22.0\lib\android\Debug\ there is only the file activity-1.1.0.dex.jar. My old project Project1.dproj contains the lines <EnabledSysJars>activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex .jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0 .dex.jar ;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex .jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;…</ EnabledSysJars> If you create a new project, then the <EnabledSysJars> section contains a link to the activity-1.1.0.dex.jar file. <EnabledSysJars>activity-1.1.0.dex.jar;annotation-1.2.0.dex.jar;appcompat-1.2.0.dex.jar; Maybe I need to update the <EnabledSysJars> section somehow.
  8. Yes. Following this procedure fixes the error. Thank you.
  9. Hello Embarcadero® Delphi 10.4 Version 27.0.40680.4203 Please tell me how to correctly add a platform to a run-time package. I have Windows, macOS, Linux (+FmxLinux), iOS, Android platforms installed. But the Add Platform menu item for the package is unavailable in the IDE. The packages were created in Delphi 10.3 with Win32 and Win64 platforms. After opening groupproj in Delphi 10.4, I saw that the IDE converted dproj files from version <ProjectVersion>18.8</ProjectVersion> to version <ProjectVersion>19.2</ProjectVersion> and Even inside the dproj file, text for the Android, Android64, iOSDevice64, iOSSimulator, OSX64 platforms is visible, but they are not visible in the IDE.
  10. I'd rather recreate the packages without using the upgrade package feature when opening a package from a previous version of RAD Studio. In this case, RAD Studio allows you to add platforms.
  11. Embarcadero® Delphi 10.4 Version 27.0.40680.4203 Q1. Why is the Package output directory setting specified for the Android 64-bit platform? Nothing is written there when compiling a package. Perhaps *.a files should be written to the Bpl\$Platform folder? Accordingly, when compiling a dependent package, an error is returned E2202 Required package 'EhLib.Rtl' not found Q2. Why, when creating a default package, does the system specify the IMAGEBASE parameter for the Android platform if it is Specific to a platform?
  12. Embarcadero® RAD Studio 12 Version 29.0.51961.7529 If you create an empty Form in the FMX project, then create a descendant of this Form Then place a TGrid component on the Descendant Form Then open the Items Editor for TGrid and add several columns, then the Delete button in the Items Editor window becomes unavailable, and it is always unavailable so that it is not possible to delete columns from the TGrid component. Most likely the problem is related to the code unit FMX.Design.Items; … btnDelete.Enabled := Editable and (Designer.GetAncestorDesigner = nil) and (ItemsTree.Selected <> nil);
  13. Hello How to set which platforms my component supports? I found the System.Classes.ComponentPlatformsAttribute attribute, but it seems that there are other ways. For example, the TDataSource component does not have the ComponentPlatformsAttribute attribute set, but the Hint component palette shows that TDataSource supports all available platforms.
  14. If a FMX Frame is created from a class that is a descendant of the TFrame class, the designer starts saving non-existent properties in the fmx file. For example, in my project, a frame saves the ClientHeight and ClientWidth properties in the file, although there are no such properties in the TFrame class. As a result, when trying to place a frame on a form, an error occurs: ‘Cannot paste a from or datamodule into another form or module’. When trying to create a Frame at run-time, an error occurs: Project Project1.exe raised exception class EReadError with message 'Property ClientHeight does not exist'. I attach screenshots and a demo project. unit UnitBaseFrame; interface uses SysUtils, System.Classes, System.StartUpCopy, FMX.Forms, FMX.TabControl; type { TBaseInTabFrame } TBaseInTabFrame = class(TFrame) private public constructor Create(AOwner: TComponent); override; destructor Destroy; override; end; implementation { TBaseInTabFrame } constructor TBaseInTabFrame.Create(AOwner: TComponent); begin inherited Create(AOwner); end; destructor TBaseInTabFrame.Destroy; begin inherited Destroy; end; end. unit UnitInheritedFrame; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, UnitBaseFrame, FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls; type TInheritedFrame = class(TBaseInTabFrame) private { Private declarations } public { Public declarations } end; implementation {$R *.fmx} end. object InheritedFrame: TInheritedFrame Left = 0 Top = 0 ClientHeight = 480 ClientWidth = 640 FormFactor.Width = 320 FormFactor.Height = 480 FormFactor.Devices = [Desktop, iPhone, iPad] DesignerMasterStyle = 0 end 2024-08-26-FrameInheriting.zip
  15. There is information that when adding a new platform to the list of target platforms of the package, all components of the package are considered fully functional on these platforms.
  16. - Embarcadero RAD Studio 12 Version 29.0.51961.7529 The debugger does not fall into interface methods. In RAD Studio 12, when I press F7, the debugger does not fall into interface methods. RAD Studio 10.4 falls normally. For example, if you set a breakpoint on line FCaptured.MouseClick(Button, Shift, P.X, P.Y); Or Obj.MouseClick(Button, Shift, P.X, P.Y); In the method procedure TCommonCustomForm.MouseUp(Button: TMouseButton; Shift: TShiftState; AFormX, AFormY: Single; DoClick: Boolean = True); Obj is IControl; and FCaptured is IControl; then the RAD Studio 12 debugger on F7 does not go to debugging the method procedure TControl.MouseClick(Button: TMouseButton; Shift: TShiftState; X, Y: Single); I can't understand if this is a feature or a bug or a setting. Addition: It seems that the problem only occurs in the Target Platform mode – Windows 64-bit. In Windows 32-bit mode, the debugger falls into the method.
  17. dmitrybv

    Does FMX designer support frame inheritance?

    Yes, you are right. Changing the line object InheritedFrame: TInheritedFrame to inherited InheritedFrame: TInheritedFrame fixes the problem with the ClientHeight, ClientWidth properties in the fmx file. That is, Frames only support visual inheritance. Although for a Form, if there is no fmx file in the base form, it is not necessary to use inherited.
  18. dmitrybv

    Does FMX designer support frame inheritance?

    1. This file was created by RAD Studio designer. I did not modify it manually. 2. Why do I need inherited here if the base class - TBaseInTabFrame does not have an fmx file? 3. I created a new frame TInheritedFrame, then in the unit file UnitInheritedFrame, I changed the line TInheritedFrame = class(TFrame) to TInheritedFrame = class(TBaseInTabFrame), because I need to have several basic methods for all frames of my project in the base class TBaseInTabFrame.
  19. Hello. Is there any set of recommendations on how to correctly perform checks and write code in a project that will compile under Windows Desktop and Android Mobile? For example, how to open windows correctly and organize the transition back and forth if the full-screen mobile mode is working. What to use instead of MainMenu and PopupMenu in mobile applications?
  20. Are there methods in the TValue class or in Rtti to convert a string to the desired simple type (Like Integer, Float, DateTime)? TValue has a method that converts a simple value to a string - TValue.ToString, but there is no reverse method TValue.FromString. I tried using StrValue.Cast<Integer>(); but this method throws 'Invalid class typecast' exception. procedure TFormSimpleDraw2.Button3Click(Sender: TObject); var StrValue: TValue; IntValue: TValue; Str: String; begin IntValue := 10; StrValue := IntValue.ToString(); // IntValue := TValue.FromString(Str); IntValue := StrValue.Cast<Integer>(); end;
  21. Should TValue.AsVariant for TBcd type return Custom Variant of TFMTBcdVariantType? Is there a connection between the TFMTBcdVariantType and TValue types. I would like TValue.AsVariant for type TBcd to create a Variant with type TFMTBcdVariantType (TFMTBcdVarData) and return a Custom Variant. Currently this code returns an 'Invalid class typecast' exception. How to correctly check that for a certain 'record' type there is a corresponding Custom Variant type and when calling TValue.AsVariant the creation of the corresponding Custom Variant value is called? Here is a code example: uses System.SysUtils, System.Types, TypInfo, System.UITypes, System.Classes, System.Variants, .... System.Generics.Collections, System.Rtti, Data.FmtBcd, type TListItemObj = class(TPersistent) private FSecondName: String; FFirstName: String; FAge: Integer; FBigUInt: UInt64; FFmtBcd: TBcd; public property FirstName: String read FFirstName write FFirstName; property SecondName: String read FSecondName write FSecondName; property Age: Integer read FAge write FAge; property BigUInt: UInt64 read FBigUInt write FBigUInt; property FmtBcd: TBcd read FFmtBcd write FFmtBcd; end; procedure TForm1.Button1Click(Sender: TObject); var LType: TRttiType; AllProps: TArray<TRttiProperty>; Prop: TRttiProperty; RttiContext: TRttiContext; ValValue: TValue; VarValue: Variant; ListItem: TListItemObj; begin ListItem := TListItemObj.Create; with ListItem do begin FirstName := 'P'; SecondName := 'C'; Age := 33; BigUInt := 12345678900987654321; FmtBcd := 112233445566778899.000011; end; RttiContext := TRttiContext.Create; LType := RttiContext.GetType(TListItemObj); AllProps := LType.GetProperties(); for Prop in AllProps do begin ValValue := Prop.GetValue(ListItem); VarValue := ValValue.AsVariant; end; ListItem.Free; end;
  22. When I try to install my Fmx package in RAD Studio IDE I get the following error. [dcc32 Fatal Error] F2084 Internal Error: AV50ECCF6F(50E50000)-R3C4F6564-0 I don’t even understand how I can get closer to understanding the cause of this error. I select the package DclEhLibFmx.dproj Click Context Menu – Install I'm getting this error.
  23. Hello. When installing RAD Studio, the ListCollectionsSampleProject.dpr project is added to the C:\Users\Public\Documents\Embarcadero\Studio\23.0\Samples\Object Pascal\Multi-Device Samples\User Interface\ListCollections folder, which shows how to create and link collections to control TListBox. How to correctly add the TBindNavigator component to the Form in this project so that you can use it to move through the list from the TListBox? The TBindNavigator control has a DataSource property of type TBaseLinkingBindSource. But the Form does not have a component that would inherit from TBaseLinkingBindSource. So TBindNavigator.DataSource cannot be assigned anything. Although TListBox is supposed to communicate with data through a descendant of TBaseLinkingBindSource, the project uses the TBindList component. But it cannot be assigned to the TBindNavigator.DataSource property.
  24. 1. I wonder why the FMX developers changed the logic of the FreeNotification method in the TFmxObject class so much. The `TComponent.FreeNotification` method adds a component to the list of components that will receive a message when deleted. The `TFmxObject.FreeNotification` method sends the opRemove message. 2. The `TFmxObject.AddFreeNotify` method does not check that the component is already present in the list. In this way, you can accumulate a huge number of references to the same object. How can I configure the algorithm so that my object is added only once?
  25. Hello Should the debugger stop at breakpoints in the program sources in Debug + Android 64-bit mode? Build Configuration (Debug) Target Platforms (Android 64-bit) It doesn’t stop for me and highlights the breakpoint as inaccessible.
×