Jump to content

Patrick PREMARTIN

Members
  • Content Count

    297
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Patrick PREMARTIN

  1. Patrick PREMARTIN

    FMX learning resources?

    Hi In general FMX works like the VCL for desktop platforms. The main differences are : - positions are single instead of integer (position.x, position.y instead of Top/Left) - Text replace Caption property everywhere (instead of for a TForm) - each visual component is a container - many more alignments than for VCL components - the components are styled and can be completely changed with styles (but don't try that to start). - no TDBxxx components, use LiveBindings to link data to visual components - for macOS the first option of the TMainMenu is fusion with macOS App menu, add an empty one (and hide/remove in FormCreate it if its not macOS) if you want the classic "file" option To debug / deploy to macOs you need a Mac available locally or on Internet and PAServer installed on it. I've done many things on FireMonkey with a lot of open source projects on GitHub (not only games đŸ˜‰ ). Replay videos (in French) of my Twitch live coding streams are available, but you can check this series (the page is in French, the videos are in English) : https://apprendre-delphi.fr/coding-bootcamp-2023.html To the books list I had the "Delphi Programming Projects" from William Duarte. For other samples then the ones available with Delphi you have this code repository https://github.com/FMXExpress/Cross-Platform-Samples and some others I've listed on https://github.com/DeveloppeurPascal/Delphi-samples/blob/main/OtherDelphiSampleRepositories.md If you have a first project to create, give us some tips, we will find the available resources around it.
  2. Patrick PREMARTIN

    What FireMonkey style do you use and like ?

    Hi If you use FireMonkey and the styles, can you tell me which are your preferred styles for light and dark theme ? I like the Polar and Impressive but it's time I decide what styles I propose on each tools I publish. "all" is of course not the good answer because of EXE weight.
  3. Patrick PREMARTIN

    What FireMonkey style do you use and like ?

    Thanks for the link to this project @havrlisan It's a very interesting solution to bypass current FMX implementation of styles. For my projects I prefer to use standard features to share source codes, but I add this one to my "projects to try" list.
  4. Patrick PREMARTIN

    What FireMonkey style do you use and like ?

    Hi I've included the Dark/Light themes by default, but I have problems with the contrast of the dark one on my monitor (or with my eyes). It's the reason why I've added Polar et Impressive styles, but perhaps an other one is preferred. We are so many to have "monitors, eyes or colors problems". đŸ˜‰
  5. Patrick PREMARTIN

    Check If File is what he claim to be

    For images, in the old times, we opened the file and tried to get its size. If it work the image was saved to avoid using the original file. Of course it can change the image quality and it supposed the loading/getsize feature has no security issue.
  6. Hi From the contacts I have from time to time following presentations or training courses, it seems that I'm better known for the video game coding part of my hobby than for the other stuff. It's true that I find it more fun (especially to stream on Twitch), but I also have utilities for Delphi developers created to simplify my life that I make available as binaries and source code on my GitHub account. App Stores Screen Captures Generator : to generate all the needed images from your screen captures when you have to publish your softwares on current app stores Copyright Pascal Projects : to add a copyright text in the header of each PAS/DPR files of a folder tree DProj To Windows Setup : to generate the Windows setup from Delphi deployment wizard data. It uses Inno Setup to create the install program and Exe Bulk Signing to sign the exe files. Exe Bulk Signing : a local and network signing program for Windows executables (exe+msix). It has an API you can use to integrate it in your projects like I did with "DProj To Windows Setup". Folder to FMX Image List : to create a FireMonkey TImageList to copy paste in your project or in a data module unit from all images in a folder tree. It fills the multires bitmaps depending on file names. Google Play Developer Banner Generator : to create a picture to use has your Play Store developer banner composed by a random collage of images you add to your project. I use it with icons of my Android apps. HTML Writer : to simply get HTML source code or WYSIWYG HTML content. I use Delphi HTML Components library in this program to have the WYSYWYG HTML editor and a memo for the source code tab item. Pic Mob Generator : my icons generator from basics layers or images, SVG, paths or rectangles. It export JPEG&PNG images, ICO and ICNS files. For the SVG I used RiverSoftAVG SVG Component Library, but next release will use Skia4Delphi. SM Code Generator : I use it in some multi players games, for EXE Bulk Signing API and client projects. The program generates Delphi code you only have to use in your projects to have a client / server solution to exchange formatted messages over IP. The library uses standard TCP sockets from Embarcadero (with no external dependencies). SVG Folder to Delphi Unit : to import SVG files as Pascal strings in your projects. I use it in some games with Skia4Delphi to show icons or sprites. The program generates a unit (compatible with Delphi 12.X and higher) with SVG found in a folder. Some of these programs are available from GetIt. The others will be submitted before the end of the year. The download links are on their GitHub repositories and will be added to their websites (which should be redirected to GitHub in the meantime). If you need changes in these programs or have suggestions, be free to tell here or as issues on their repositories. I'm also looking for ideas of simple tools to develop during live coding streams to show Delphi or web solutions. They are distributed as shareware programs. Contributions and sponsoring are welcome but not obligatory, and there are no program restrictions in the absence of a valid license. All features are available for free.
  7. Patrick PREMARTIN

    Some open sourced tools for Delphi developers

    I've just released HTML Writer v1.1 Changes : - added styles choice (light, dark, impressive, polar) - added languages choice (en/fr available, but this project has not many texts) - CilTseg has been enabled for activating the license and checking for new updates - the WYSIWYG editor has been updated with latest version of Delphi HTML Components Now this program uses my FMX Tools Starter Kit project. It's still a work in progress but you can check it on GitHub too. Like for the Gamolf FMX Game Starter Kit a more friendly documentation and some tutorials will be available one day (hope "soon" but who knows). The source code is available on https://github.com/DeveloppeurPascal/HTML-Writer You can download the binaries for Windows and Mac from the "releases" section.
  8. Depending on what you are developing you should have : - an private ID for the user - an private ID for the application/software/site/... - an private ID for the device Users or admins should be allow to stop access to each one. For each API call you should sign the content of the call and identify the user/app/device or both with one public ID, sign with private ID and perhaps a public/priv key or one time code for the API endpoint. Of course all API call must be secured at least over https. Use API access levels depending on the app or the user or both. All keys/token must be stored encrypted locally and never published in a code repository (even private). And if you do things in JS, never put your keys in the code. Users have access to it and can show anything. (never do JS things with a private API in a public site, it's an open door to your content)
  9. Patrick PREMARTIN

    Looking but not finding...

    "We" have some (real) job offers in France but I suppose it's not of any help because they want local workers. Is there anything "we" (as Delphi lovers, MVPs and others) can do to help showing and sharing job offers or demands ? (it's one of the numerous topics I'd like to help on to increase Delphi visibility)
  10. Patrick PREMARTIN

    Mars TemplateServerDaemon

    Hi What branch or release of Mars do you use ?
  11. Patrick PREMARTIN

    12.3 or 13/14 as next?

    I vote for a nocode quantum IDE. Why limiting to a number of bits ? It's so MS Dos !
  12. Patrick PREMARTIN

    12.3 or 13/14 as next?

    Not sure we have an access to previous opened projects in the Open Tools API , but you can create an extension for the Welcome page if you want. You have a sample in the RAD Studio samples folder.
  13. Patrick PREMARTIN

    12.3 or 13/14 as next?

    Don't be afraid of IDE changes if anything happen in 12.3. Marco spoiled a little at the end of the birthday webinar. Just read between lines and don't forgot that no roadmap is public. Nothing is sure until an official announce. You can simply wait for Mars 13th webinar.
  14. Patrick PREMARTIN

    Delphi Community Edition

    The problem is perhaps linked to the license activation and a conflict with the Berlin license (even if it should not). Check in the LicenseManager what is registered and remove all unnecessary licenses (including the CE license). Uninstall the CE version, reboot and try a new installation.
  15. Patrick PREMARTIN

    Delphi TOIOBE index lifted in May 2022?

    Don't forget TIOBE is based on "search for answers". Python is the top because programming in Python is a nightmare when you start having library dependencies problems (and in IA you will have problems). PHP is a simple language. It doesn't evolve a lot and the users look for frameworks, not the langage itself. For Delphi the reason is perhaps the number of newcomers and the regular updates which awake "old" programmers. And of course the activity of the community in general.
  16. Patrick PREMARTIN

    Delphi TOIOBE index lifted in May 2022?

    Can we say "happy birthday Delphi" 4 days before the D day ?
  17. Patrick PREMARTIN

    Does anyone know a delphi component that can play videos from a stream

    Hi You can use FFmpeg (perhaps with http://www.delphiffmpeg.com/) or VLC (check https://github.com/HemulGM repositories) if you want. Boian Mitov has a video stream player in his components packs (https://mitov.com/products/videolab).
  18. Right, I use the camera stream. This page explains what Android expect (for the gallery): https://developer.android.com/about/versions/14/changes/partial-photo-video-access And this one for the TakePhotoFromCamera API : https://developpeur-pascal.fr/utiliser-l-action-standard-takephotofromcamera-pour-les-applications-android-9-et-plus.html where I use the same permissions, but you also need the "secured file sharing" right from Project / Options / Rights / Android32&64
  19. procedure TfrmMain.GoToPhotoScreen(AskPermission: boolean); begin if AskPermission then TPermissionsService.DefaultService.RequestPermissions (['android.permission.CAMERA'], procedure(const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray) var i: integer; begin for i := 0 to length(AGrantResults) - 1 do if (AGrantResults[i] = TPermissionStatus.Denied) then raise exception.create ('Permission nécessaire pour prendre une photo.'); GoToPhotoScreen(false); end, procedure(const APermissions: TClassicStringDynArray; const APostRationaleProc: TProc) begin TDialogService.showmessage ('Il est nécessaire d''avoir cette autorisation pour prendre une photo.', procedure(Const AModalResult: TModalResult) begin if assigned(APostRationaleProc) then APostRationaleProc; end); end) else begin MaskPath.data.data := FCurrentProject.MaskPath.data.data; ActiveLaCamera(tconfig.CameraType); CurrentScreen := rPhotoScreen; end; end; You need something like this code from https://github.com/DeveloppeurPascal/Fie-Frapic/blob/main/src/fMain.pas and the good permissions for your manifest. The TakePhoto call is in "ActiveLaCamera() but you can put it in the ELSE part of this code.
  20. Hi Do you ask for Android permissions to take a photo in your projects options and in your code ? The standard actions only call the APIs, they don't ask for the permissions for us.
  21. Patrick PREMARTIN

    How to create Windows Store APPX in Delphi with USB token?

    Hi If you want to publish your APPX or MSIX file to Microsoft Store, you don't need to sign it. For Ad-Hoc deployment it's an other problem. At this time RAD Studio can only sign programs and create signed MSIX/APPX files only with a PFX file. Embarcadero has not integrated the tokens or cloud certificates but some issues are opened on the quality portal. You have a few solutions if you want to distribute programs by yourself with or without creating an APPX/MSIX. To solve this problem for me I've created Exe Bulk Signing (available from GetIt) and DProj 2 Windows Setup projects (available in shareware or open sourced from GitHub). The first one manage the signing. The second one use Inno Setup and Exe Bulk Signing to package and sign a 32 bits and a 64 bits installer from the deployment wizard options in your project. Of course you can use many other packaging solutions to create a setup.exe program or an APPX/MSIX depending on the software used.
  22. This "Delphi Programming for Beginners" could also help you how Delphi and Pascal language work : https://www.dropbox.com/scl/fi/kh9qih54jgfbohejfmmww/Delphi-Programming-for-beginners-Yuriy-Kalmykov.pdf?rlkey=nv258b6gu7eufb674itnl4h39&dl=1
  23. Ok, let's check this two guides redacted for new Delphi&Pascal developers : - Programming with Delphi : https://docwiki.embarcadero.com/RADStudio/en/Programming_with_Delphi_Index - Developing Database Applications : https://docwiki.embarcadero.com/RADStudio/en/Developing_Database_Applications_Index They are old, but still up to date except for the database part where you are invited to use FireDAC, but if your project is old, you should have this deprecated knowledge in mind. (if you look on the Internet you should find the PDF release of them from Delphi 7 of after)
  24. You can also read the "Delphi Language Guide" from https://docwiki.embarcadero.com/RADStudio/en/Delphi_Language_Guide_Index
  25. Just a question to @PhilBoy : you say Object Pascal, but do you know if it is in Delphi, Lazarus or an other environment ? Let's suppose it's Delphi, do you know what was the development version ? The language don't differ a lot between releases, but used libraries does.
Ă—