Jump to content

Cristian Peța

Members
  • Content Count

    329
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Cristian Peța

  1. Cristian Peța

    Debug for Win64 - blue dots are shifted

    Thank you. In this project I have included units from packages that for sure are not rebuilt for x64. Building the project works because I have included all the files from packages but there are old .dcu files from building the packages. Will try tomorrow to rebuild all packages also for x64. Usually I'm doing this only for x32. I need to debug for x64 because it behaves different from x32 and debugging with messages and so on is so painful and slow.
  2. Cristian Peța

    Thread and free

    The first will not ensure that lTstrings will be freed. I would use the second but with TThread.Synchronize() because Queue() will continue the execution and lTstrings will be freed most probably before it will be used.
  3. Cristian Peța

    Help me to fix compilation error for iOS

    I also had issues with iOS platform in the past and solution was to install MacOS platform too.
  4. Cristian Peța

    Connection to registration server

    Do you have same WAN IP on both machines? There was a case where someone used a VPN internet connection and his WAN IP was from other country and who knows for what this IP was used for and rejected by some server firewalls.
  5. Cristian Peța

    Android app - reading barcodes/QR codes

    Attached. Wanted to try also with Delphi 11.3.1 but something is wrong in my environment because also an empty app do not install (package invalid). No time to dig just now into this. aTestApp.dpr P.S. But nothing special regarding FMX or Android. Just added "..\" to all files and new units to the project.
  6. Cristian Peța

    Android app - reading barcodes/QR codes

    Just tried with Delphi 10.4.2 the demo project aTestApp and is working very nice on Android 13. But dpr do need to be a little updated because some folders moved and there are some new library units not included into the project.
  7. Cristian Peța

    Android app - reading barcodes/QR codes

    I suppose the test app is crashing. But you need the library and it is not so hard to use. fScanBitmap is a FMX.Graphics.TBitmap ScanManager := TScanManager.Create(TBarcodeFormat.Auto, nil); try ReadResult := ScanManager.Scan(fScanBitmap); finally ReadResult.Free; ScanManager.Free; end;
  8. This probably means that there is no memory leak but memory fragmentation. You have 118MB memory split into thousands of block separated by small free blocks. @PizzaProgram if fragmentation then this can be solved by running as 64 bit. Are you not using 4 GB? {$SetPEFlags $0020} // Winapi.Windows.IMAGE_FILE_LARGE_ADDRESS_AWARE { App can handle >2gb addresses } Or better try 64 bit if possible.
  9. Cristian Peța

    User Drawing of Lines and Curves

    Path1.Data.FlattenToPolygon will return an array of points. Use DistanceFromPointToLine procedure LineEcuation(var a, b, c: Double; x1, y1, x2, y2: Double); begin if Abs(x1*y2 - x2*y1) < 1E-20 then begin if (Abs(x1) > 1E-20) or (Abs(x2) > 1E-20) then begin//Ecuation a*x + y = 0 if (Abs(x1) > 1E-20) then a := -y1 / x1 else a := -y2 / x2; b := 1; c := 0; end else begin//Ecuation x = 0 a := 1; b := 0; c := 0; end; end else begin//Ecuation a*x + b*y + 1 = 0 b := (x2 - x1) / (x1*y2 - x2*y1); a := (y1 - y2) / (x1*y2 - x2*y1); c := 1; end; end; //X0, Y0 point //Xd1, Yd1, Xd2, Yd2 - points of the line function DistanceFromPointToLine(X0, Y0, Xd1, Yd1, Xd2, Yd2: Double): Double; var a, b, c: Double; begin LineEcuation(a, b, c, Xd1, Yd1, Xd2, Yd2); Result := Abs(a * X0 + b * Y0 + c) / Hypot(a, b); end; I also think so.
  10. Cristian Peța

    Splitting up quotes doesn't work anymore

    For years I asked me how are you doing this. Now i know. Then I found a solution that I supposed you are using: if you still see the message that you want to quote after starting your message then you can go to that post, insert the text and press "Quote selection". It will insert the quote where the cursor is in you new message. I have not tried if this works going back on an other page.
  11. If not encrypted is working (it is?) then must to be the encryption-decryption that is changing something.
  12. It is because calling convention Right-to-left parameter order?
  13. Project1.dpr.20: s := ReadChar1 + ReadChar2; 0008E605 E8BEFFFFFF call $0008e5c8 0008E60A 8BD0 mov edx,eax 0008E60C 8D45EC lea eax,[ebp-$14] 0008E60F E8289CFEFF call $0007823c 0008E614 8B45EC mov eax,[ebp-$14] 0008E617 50 push eax 0008E618 E897FFFFFF call $0008e5b4 0008E61D 8BD0 mov edx,eax 0008E61F 8D45E8 lea eax,[ebp-$18] 0008E622 E8159CFEFF call $0007823c 0008E627 8B55E8 mov edx,[ebp-$18] 0008E62A 8D45FC lea eax,[ebp-$04] 0008E62D 59 pop ecx 0008E62E E8B59DFEFF call $000783e8 First call to $0008E5C8 is ReadChar2. It is with '5'. Project1.dpr.10: begin 0008E5C8 55 push ebp 0008E5C9 8BEC mov ebp,esp 0008E5CB 51 push ecx Project1.dpr.11: Result := '5'; 0008E5CC 66C745FE3500 mov word ptr [ebp-$02],$0035 Project1.dpr.12: end; 0008E5D2 668B45FE mov ax,[ebp-$02] 0008E5D6 59 pop ecx 0008E5D7 5D pop ebp 0008E5D8 C3 ret 0008E5D9 8D4000 lea eax,[eax+$00]
  14. But ReadChar2 is called first and will read the first char from file
  15. Probably I do not understand something and you code do not compile for me. This is working as expected for me. It will show "OK". PS. Now I understand: ReadChar2 is called first and will read the first char from file. uses System.SysUtils; function ReadChar1: Char; begin Result := 'P'; end; function ReadChar2: Char; begin Result := '5'; end; procedure ReadHeader(out _w, _h, _Depth: Integer); const PGM_Magic_Number = 'P5'; var s: string; begin s := ReadChar1 + ReadChar2; if s <> PGM_Magic_Number then raise Exception.Create('File is not a valid PGM file:') else Writeln('OK'); end; var _w, _h, _Depth: Integer; begin ReadHeader(_w, _h, _Depth); Readln; end.
  16. Cristian Peța

    Unigui and TShape

    There is TUniImage.ClientEvents.ExtEvents.mousemouve where you can write some JavaScript. In this script you can call to execute the TUniImage.OnAjaxEvent event calling ajaxRequest(sender, 'eventname', ['param1=value1']) from JavaScript
  17. Cristian Peța

    TParallel Version and TTask Version

    TParallel.For will not start 1000 threads so fast like a for loop but will use a thread pool and wait for a thread to finish before starting an other.
  18. I think your last statement here: "We've spent today testing Fork and GitKraken and landed on GitKraken Pro due to the issue tracker integrations and built in GitFlow support - which really simplify doing proper branching for features, fixes and releases. "
  19. Cristian Peța

    Update an application automatically

    I managed to do it. Some information here:
  20. Cristian Peța

    Windows App Store icon sizes - unplated?

    We changed the border to be more grey (right image) and it was accepted as transparent (unplated) for MSIX installations. For non MSIX install the left icon is transparent.
  21. Cristian Peța

    Update an application automatically

    @Keesver I used appinstaller and updates are working well (installing and updates without admin elevation) but I didn't managed to show transparent icon on taskbar. I posted in other thread what I was doing if you have some suggestions:
  22. Cristian Peța

    Windows App Store icon sizes - unplated?

    Strange... if I change the 44x44 logo to have more black, it will show transparent in taskbar. I discovered this accidentally trying do alter the image to be sure it's the right one. A little black will not suffice. Something more than 1/3.
  23. Cristian Peța

    Windows App Store icon sizes - unplated?

    @Rafael Dipold have you done something different than in that article? It isn't working for me. I didn't used Delphi IDE because it's calling makeappx.exe with /f (mapping file) and I used /d (content directory) I have the same file with two names in Assets: Logo44x44.png and Logo44x44.targetsize-44_altform-unplated.png The Root folder is every time new created and filled with all necessary files then: C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\makepri.exe" createconfig /cf priconfig.xml /dq en-US 'Platform (pv)' not specified. Default is Windows 10. Writing PRI config file to priconfig.xml ... Successfully Completed C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\makepri.exe" new /pr "C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" /cf priconfig.xml Output location of PRI file(s) is detected to be under the project root. If previously generated PRI file(s) are present, these may be re-indexed and lead to unexpected results. Index Pass Completed. AlternateForm Qualifiers: UNPLATED TargetSize Qualifiers: 150,44 Finished building Version: 1.0 Resource Map Name: winarhi.winarhi15s Named Resources: 27 Resource File: resources.pri Version: 1.0 Resource Candidates: 29 AlternateForm Qualifiers: UNPLATED TargetSize Qualifiers: 150,44 Successfully Completed C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\makeappx.exe" pack /d "C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" /p "C:\Delphi\WA15\WinArhi\!Executabil Showroom\!FINAL\WinArhi_15_Showroom.msix" Microsoft (R) MakeAppx Tool Copyright (C) 2013 Microsoft. All rights reserved. The path (/p) parameter is: "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\!FINAL\WinArhi_15_Showroom.msix" The content directory (/d) parameter is: "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" Enumerating files from directory "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" Packing 30 file(s) in "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" (content directory) to "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\!FINAL\WinArhi_15_Showroom.msix" (output file name). Memory limit defaulting to 5368131584 bytes. Memory limit defaulting to 4294967296 bytes. Using "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root\AppxManifest.xml" as the manifest for the package. ....... ....... Package creation succeeded.
  24. Cristian Peța

    Delphi 11.1 compiled under MacOS Ventura

    because this i said "Just compiling is not an issue". If you have all the pieces.... He asked about compiling. Producing an app for Mac is an other thing.
  25. Cristian Peța

    Delphi 11.1 compiled under MacOS Ventura

    Just tried on Delphi 10.1 and building for iOS Device works without a Mac. I suppose building for Mac or in newer Delphi versions also works. Deploy does not work because there you need XCode.
×