Jump to content

TurboMagic

Members
  • Content Count

    235
  • Joined

  • Last visited

  • Days Won

    9

TurboMagic last won the day on December 29 2022

TurboMagic had the most liked content!

Community Reputation

91 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. TurboMagic

    Creating dylibs for iOS

    So the recommendation is still the one from the stack overflow post: to build a static lib, which results in a .a file?
  2. TurboMagic

    Creating dylibs for iOS

    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.
  3. TurboMagic

    Creating dylibs for iOS

    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?
  4. TurboMagic

    Creating dylibs for iOS

    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?
  5. TurboMagic

    Creating dylibs for iOS

    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.
  6. TurboMagic

    Creating dylibs for iOS

    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)
  7. TurboMagic

    Using a timer in an Android SharedObject

    While Marco's blog post is nicely written it's not excactly what I'd need. Threading is not really new to me, but I would have the need to wait in there or so. But the Kastri Timer is something I really should look at. Thanks for bringing that one up!
  8. TurboMagic

    Using a timer in an Android SharedObject

    Thanks for these links. The first one I know and already tried, but it crashes as well, but I need to try to understand their soruce better. I had thought to give TTimer a 2nd try as that one might be easier to understand. The 2nd link is really new to me.
  9. 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
  10. TurboMagic

    Firebird 3.0 problem

    I'm on 4.0.x now and will look at the change log document for V5.0 soon.
  11. TurboMagic

    Firebird 3.0 problem

    I still have my backup problem. Back then I started to implement a small test application. Today I added database opening, closing and reading out of some data capabilities for further testing/investigation. That test works as follows and doesn't show the error: 1. Open database 2. Read out some data 3. Perform a backup If I do similar things it failed with that XNET error. During implementing the test program I found out that this: FDriverLink.DriverID := 'FB'; was in the code instead of this: FDriverLink.DriverID := 'IB'; I changed my real application now and guess what? It works! 😉 Must have been a leftover from the times where dbExpress had been used and no FB driver existed yet.
  12. TurboMagic

    Delphi Code Coverage Wizard Plus V2.1 released

    GetIt publication of a V2.1.1 has been done now, but one user from German DP reported some problem I cannot reproduce yet. I could install it via GetIt in 12.0 (had only Parnassus IDE plugins installed in that installation so far) and run it while he seemed to get some compilation error. Maybe somebody has a "plain"/"virgin" 11.x installation he can test on? Suspicion is that older Delphi versions require some Edge SDK stuff (as available in GetIt) isntalled which nowadays is included in RTL or so already... Enjoy TurboMagic
  13. TurboMagic

    Firebird 3.0 problem

    Sigh! That was the idea of my own small backup/restore test app I developed using code from the main app. But when using that it always works 😞 Ok, one thing is left to check: these auto reconnect options of the DB connection. But I doubt that's the issue, but need to check.
  14. TurboMagic

    Firebird 3.0 problem

    Strange. When I call offline on the DB connection and then run the backup from the same application I get this xnet error. But when I call offline on the DB connection followed by exit as next statement and place a breakpoint on that, I can run that application so it stops on the exit statement and then perform a backup from a separate test application which uses the same code to perform the backup and the backup works. Why doesn't it work when I call that from the same application?
  15. TurboMagic

    Firebird 3.0 problem

    Thanks for the offline/online hint! I'll look at this later!
×