

TurboMagic
Members-
Content Count
255 -
Joined
-
Last visited
-
Days Won
9
Everything posted by TurboMagic
-
Hello, if you haven't noticed yet: with 12.3 Embarcadero also released a new additional tool for subscription owners via GetIt package manager (Tools/GetIt package manager). It is called "The Android SDK manager GUI" and can be used to update Android SDK/NDK etc. in a graphical way. It is a replacement for the graphical SDK manager the Android SDK once contained, which cot replaced by a cumbersome batch file (yes, the batch file is good for automation, but otherwise cumbersome). The SDK manager GUI can also export the selected configuration and import it on another PC, great for easy synchronisation of development machines. What the tool doesn't do is to update the paths in the IDE and it is unfortunately not added to the menu in the IDE.
-
New additional tool for Android available in 12.3
TurboMagic replied to TurboMagic's topic in Cross-platform
Good news: V1.10 was finally released via GetIt a few days ago finally. It should workfor more users than V1.00 did as some bugs got fixed and it can handle the licenses a user has to agree now as well. It will present them and one can opt to agree or decline. Another small addition is a help popup describing the available command line parameters for this tool. -
Hello, I have a TfrxChartview TChart on a FastReports report. It contains a bar series and I'd like to find out the length of the marks added to the bars in order to be able to move their y-position if they do not fit on the bar itsself (as they would overlap with the bottom axis then). Additionally one needs to find out the bar length for this. The latter one seems to work somehow. The retrieval of the marks dimensions doesn't work as it does in a small VCL test application where the chart is sitting on a form. There you can use this one: Chart.Series[si].Marks.Positions.Position[i].Bounds.Width But when using the chart on a FastReports report Chart.Chart.Series[si].Marks.Positions.Position is nil. The values have been added via Chart.Chart.SeriesData.YSource, as the data is not comming from a database. Any ideas?
-
Hello, I've got a 2D TChart with 2 bar series in Delphi 12.3 (included Standard edition oif TChart). Both are set to Stack -> Side all, because the 1st series shall use the left axis, the 2nd series shall use the right axis. Bottom axis label format has been set to text and when clicking a button in the application I add a few bars for both series like this: Chart.Series[0].Add(5, 'Bar name1 Series 1'); Chart.Series[1].Add(500, 'Bar name1 Series 2'); It displays the labels on the bars of the 1st series but never on the 2nd series. Attached is my test application. Another question would be if it is possible to have a custom setting for the Marks position for an individual bar of a series. Or asked otherwise: as can seen in my demo I aligned the marks so that they are painted over the bar from the upper end of the bar. This is good, except for bars with a 0 value as the 0 is the painted into the bottom axis. I wanted to avoid that one for such bars but keep the mark painted over the bar and not on top of it. Last question: I cannot seem to register a login for the support forums on steema.com. I do not find a way to do so and the admin contact page is disabled as well. Anybody any clue whether this is intentional or how to desl with this? ChartTest.zip
-
Ok, for a regular TChart on a form that stuff works. But I forgot to tell, that this is a TfrxChartview on a Fast Reports report. I'll create another post for the problems I have there now.
-
Thanks for all this information! Will ty it out as soon as I get back to this project after pentacoste!
-
If the issue has not been reported to Steema I doubt we'll get it fixed.
-
New additional tool for Android available in 12.3
TurboMagic replied to TurboMagic's topic in Cross-platform
I must second fisipjm! Sorry for that! But if things work out as they should (afaik somebody was/is on holiday which is needed for that) there should be an improved V1.10 available in the near future. -
New additional tool for Android available in 12.3
TurboMagic replied to TurboMagic's topic in Cross-platform
Thus is unfortunatelly not in my hands. The ball is in EMBT's field 😉 But I was informed that the required engineer was on holiday and will be tasked with publishing this as soon as he's back. Do you have any immediate need for this tool in the new version? If so contact me. -
Hello, in order to decide how to properly fix this issue in DEC (Delphi Encryption Compendium) I would like to look up the exact original definition of the KDF algorithms for the case of an empty key/password being given as argument. Unfortunately that is in some IEEE paper/standard, which is behind a paywal. Is there anybody having access to IEEE P1363? Here's the DEC issue: https://github.com/MHumm/DelphiEncryptionCompendium/issues/76 Cheers TurboMagic
-
Reading and changing capabilities of Android Camera2 API
TurboMagic posted a topic in Cross-platform
Hello, I'm currently playing with Kastri's Camera demo, which is based on the Android Camera2 API. Now I'm struggeling with getting capabilities of the camera used and later on I even need to change some settings. After finding out how the basic structure of this demo works I added this method to get some capabilities as string to get started: function TPlatformCamera.GetCapabilities: string; var LCharacteristics : JCameraCharacteristics; Orientation : Integer; Obj : JObject; IntArray : TJavaObjectArray<integer>; i : Integer; begin LCharacteristics := FCameraManager.getCameraCharacteristics(FSelectedCamera); Obj := LCharacteristics.get(TJCameraCharacteristics.JavaClass.LENS_FACING); Orientation := TJInteger.Wrap(Obj).intValue; if (Orientation = TJCameraMetadata.JavaClass.LENS_FACING_FRONT) then Result := 'Camera: front' + sLineBreak else Result := 'Camera: back' + sLineBreak; Obj := LCharacteristics.get(TJCameraCharacteristics.JavaClass.CONTROL_AE_AVAILABLE_ANTIBANDING_MODES); end; FSelectedCamera is a JString and assigned where the component goes through the list of available cameras and selects the desired one. Reading which camera is selected already seems to work, since this just returns a simple integer value. But how to deal with CONTROL_AE_AVAILABLE_ANTIBANDING_MODES, which, according to the API docs API docs returns int[], which is some kind of array? How to access this from Delphi? And even more: CONTROL_AE_COMPENSATION_RANGE, which returns an array (with two elements) of Range<Integer>? And CONTROL_AE_COMPENSATION_STEP which returns a Rational? I haven't found the definition of this Rational type in Androidapi.JNI.JavaTypes or Androidapi.JNIBridge. -
TBitmap to TBytes for ESC/POS Thermal Printer
TurboMagic replied to at3s's topic in RTL and Delphi Object Pascal
If you want to print bitmaps to an ESC/POS printer via sending raw ESP/POS commands you need to send 1 column and 8 rows of the image per byte. Means: there is a command which you tell how many columns youl will send and then you send one byte for each column containing the data for 8 rows bitwise encoded. So if you send bytes with the most significant bit and the last significant bit set but no other bits set with that command you'd get two lines in parallel. But the question would be why to do it that way? Why not use TPrinter's capabilities? -
Well, you get something for free! And for quite a lot of folks its good enough. It's also more up to date than previous community editions were.
-
Hello, I'm using D12.1, FireDAC and Firebird 5.0 embedded. I try to create a backup using TFDIBBackup but that fails with this failure message: "Unable to complete network request to host "xnet://Global [FireDAC][Phys][FB]invalid service handle [FireDAC][Phys][FB]invalid service handle" I can successfully create a backup using gbak from command line though. I'm also quite sure creating a backup from my application works when Firebird server is installed. Here's my TFDIBBackup initialization code: constructor TDBBackup.Create(const DatabaseFileName : string; const VendorLib : string); begin inherited Create; FFBDriverLink := TFDPhysFBDriverLink.Create(nil); FFBDriverLink.VendorLib := VendorLib; FFBDriverLink.Embedded := true; FFBBackup := TFDIBBackup.Create(nil); FFBBackup.ConnectTimeout := 0; FFBBackup.Database := DatabaseFileName; FFBBackup.DriverLink := FFBDriverLink; FFBBackup.Password := c_DBPassword; FFBBackup.QueryTimeout := 2; FFBBackup.UserName := c_DBUserName; FFBBackup.Verbose := true; FFBBackup.Protocol := TIBProtocol.ipLocal; FFBBackup.AfterExecute := OnBackupFinishedInternal; FFBBackup.OnProgress := OnBackupProgressInternal; FFBBackup.OnError := OnBackupErrorInternal; FIsBackupRestoreActive := false; end; Vendor lib points to a fbclient.dll which exists and has the other libraries for embedded in the same directory and all other fbclient.dlls on the system are the exact same version and have the exact same other files in their directory: fbclient.dll firebird.conf firebird.msg gbak.exe gfix.exe ib_util.dll icudt63.dll icudt63l.dat icuin63.dll icuuc63.dll isql.exe msvcp140.dll vcruntime140.dll intl\fbintl.conf intl\fbintl.dll plugins\chacha.dll plugins\engine13.dll What am I'm doing wrong? Regular DB SQL queries via FireDac work just fine. Cheers TurboMagic
-
A solution was found now: The FBDriverLink of the FDConnection used in the application must have Embedded := true as well!
-
Hello, this is the same issue as the one described in the German DP (https://www.delphipraxis.net/215286-port-nicht-erzeugt-2.html), but there I don't get any further ideas. So I hope somebody here can help me. I have some application written in Delphi 10.3.3 which provides two endpoints and has worked in the past. One endpoint delivers a simplistic status website and the other can be used to query data via REST. For both the user can configure the port and whether to use HTTPS or not. If HTTPS is used a self signed certivicate is used and the application provides V1.0.2j of the OpenSSL libraries. Now I have the reproduceable case that the port for the REST interface is never created (says netstat -p TCP on the cmd.exe console) and the one for the status website some times is but most of the times isn't. The code for creating both DataSnap server instances is identical and looks like this: if FMyServiceEnabled and (not FRESTServer.Active) then begin FRESTServer.Bindings.Clear; FRESTServer.DefaultPort := FMyServicePort; FRESTServer.Active := True; log.Send(LevelBlue, cCategory, 'REST Server gestartet. Port: ' + FMyServicePort.ToString); end; if FStatusWebsite and (not FWebServer.Active) then begin FWebServer.Bindings.Clear; FWebServer.DefaultPort := FStatusPort; FWebServer.Active := True; log.Send(LevelBlue, cCategory, 'Web Server gestartet. Port: ' + FStatusPort.ToString); end; When looking into the logs generated, they show that this code was actually run. The issue happens on a customers PC and on my own machine as well. With another tool suggested by somebody in German DP (writing in EN 😉 ) I was able to see that both bind ahnd listen are called on the socket. But netstat doesn't show it... What can cause this and how to further diagnose this? Esp. what data snap does?
-
Painting in VirtualStringTree gets stuck/frozen when scrolling
TurboMagic replied to RaelB's topic in Delphi Third-Party
How is your text output handled within the VST? It could be that you're doing tings in OnGetText which are a bit time consuming. -
Hello, if somebody is interested or needs to convert his JavaDoc comments to XMLDOC he might find use of my new little command line utility. It can be found here: https://github.com/MHumm/JavaDoc2XMLDOC Yes, I'm aware that it currently only converts summary, description, parameters and returns sections of JavaDoc and that it is written in procedural style (ok, code got longer than anticipated but it's structured code and contains XMLDOC comments 😉 ). License is Apache 2.0. So you can modify it if necessary.
-
I have some code written in Delphi which should be reused in mobile projects which are unfortunately not written in Delphi. I have found out that for Android you can create a shared object .so. Strangely not via using the DLL project type but by using the normal cross platform GUI type and then stripping off the GUI support. Now the question is, can I achieve something similar for iOS? Can I create a dynamic or static library some other iOS programming environment can consume? I just found this help topic: https://docwiki.embarcadero.com/RADStudio/Sydney/en/API_(*.bpl,_*.dylib,_*.so) Would that be a way? (I haven't developed any packages yet and I would only want to export procedural stuff)
-
So the recommendation is still the one from the stack overflow post: to build a static lib, which results in a .a file?
-
Sorry, but it's now still unclear how to handle iOS in this regards (I don't have the toolchain for this one yet): 1. Can Delphi create a dylib for iOS somebody else wih some other language could consume? (the StackOverflow post doesn't talk about dylibs) I know that it can for Android if creating a normal FMX app and stripping the FMX part out of that. But for iOS? 2. What would speak against .a files? What's the downside of those getting linked into the application of the person consuming those? I simply need to create something somebodfy else in some different language has to use and that needs to work on Android and on iOS. And before investing time into some implementation which will not work on iOS at the end I wanted to get clarification about that one.
-
Another question turned up now: from the shared objects (.so) I can create for Android I know, that I need to create one for 32 bit and one for 64 bit and need to place them into the right folders on the target device via deployment manager. Both have the same name though. Now what about .a files? When I generate them for 32 and 64 bit they will get output in the ios32 and ios64 or Android32 and Android64 subolders I guess. But the user of them using a different programming environment,, how has he to handle them? Place them into bitnnes/cpu dependant folders and have something conditional in his application so the right variant will be linked in?
-
Thanks for the answer! Does this mean this is "self contained"? That's how I understood this. For as non package developer it always sounded like packages require that you provide the used RTL packages as well, but I guess this is not the case here?
-
Thanks for the reply. As I haven't done any iOS development yet I don't have a MAC yet and thus wanted to investigate first whether it is possible for iOS at all. For Android it is possible but as written not via a library/DLL project! That won't properly work! As described one needs to generate a FMX project for this, as each of those generates an SO and then you strip out the FMX part and only grab the generated SO, which in a normal FMX project would be packed into the APK/AAB.
-
Hello, this question is quite low level. For the purpose of being used from some completely different programming language on Android I'm trying to check if I can rework a Windows DLL of mine into a shared object. I can create a shared object (.so) already, for this one has to be aware that the library project type in Delphi which would create a DLL on Windows won't create a .SO on Android. I consider this a bug or at least a missing feature. But you can create a .SO by creating an FMX project and throw out the use of the default generated form (and everything in the begin / end block of the DPR). The resulting SO can be used if the functions/procedures are called dynamically. Next step would be to get a timer up and running. I tried the FMX time, but that didn't work, it crashes as soon as I want to create it (segfault 11). So I looked into how this one is implemented and copied that code into my application (to have as few connections with RTL and FMX as possible). But it crashes on creation as well. I looked what is done under the hood and it is this: The timer needs a JHandler and this shall be fetched via Androidapi.Helpers.TAndroidHelper, which has a MainHandler class property. This accesses a FMainHandler field and if that is nil, it is initialized, but that needs a TJLooper. As far as I understood (see https://developer.android.com/reference/android/os/Handler) this is the equivalent of the Windows message loop. Can I replicate that somehow in my SO? What would I have to do to get this working? My test project is attached. If you want to try it, compile the libSOTest.so first, then run libSOTestGUI. Best regards TurboMagic SOTest.zip