Leaderboard
Popular Content
Showing content with the highest reputation since 06/12/25 in Posts
-
TOML is a "config file format for humans", that has gained a lot of traction in the python and rust communities among others. It is basically the INI file format on steroids. It compares quite well to alternative formats such as JSON, YAML and XML. Compared to JSON is way more readable and compact. Since I could not find any Delphi library for processing TOML, I have created my own: toml-delphi. Features: TOML v1.0.0 compliant. Passes all 734 (valid/invalid) official validation tests. Fast. Single stream tokenizer and lexer that doesn't use regex. Converts TOML documents to Delphi's RTL's TJSONObject, thus allowing for easy traversal, manipulation and query of the generated documents. Includes TTOMLWriter for converting TJSONObjects back to TOML. Provides for easy (de)serialization of Delphi objects and records from/to TOML. This is the interface of the main unit: TJSONObjectHelper = class helper for TJSONObject function ToTOML(MultilineStrings: Boolean = False; Indent: Integer = 4): string; procedure StreamTOML(Stream: TStream; MultilineStrings: Boolean = False; Indent: Integer = 4); procedure SaveTOMLtoFile(const FileName: string; MultilineStrings: Boolean = False; Indent: Integer = 4); class function FromTOML(const Contents: string): TJSONObject; overload; class function FromTOML(Contents: TBytes): TJSONObject; overload; class function FromTOML(Stream: TStream): TJSONObject; overload; class function FromTOMLFile(const FileName: string): TJSONObject; end; ETOMLSerializer = class(Exception); TTOMLSerializer = class class function Serialize<T>(const AValue: T): string; overload; class function Deserialize<T>(const ATOML: string): T; overload; end; Example usage: You can convert TOML source to TJSONObject using one of the FromTOML functions. For example to parse a TOML file you use: var JsonObject := TJSONObject.FromTOMLFile(FileName); //or for parsing a TOML string: var JsonObject := TJSONObject.FromTOML(TOMLstring); To convert a TJSONObject to TOML you use one of the methods ToTOML, StreamTOML or SaveTOMLToFile. For example: TOMLString := JsonObject.ToTOML; // or JsonObject.SaveTOMLToFile(FileName); Example serialization: type TTestRec = record IntValue: Integer; FloatValue: double; StringValue: string; DateValue: TDateTime; ArrayValue: TArray<string>; end; procedure TestSerializer; var Rec: TTestRec; TOMLString: string; begin Rec.IntValue := 123; Rec.FloatValue := 3.14; Rec.StringValue := 'abc'; Rec.DateValue := Now; Rec.ArrayValue := ['A', 'B', 'C']; Writeln('Serialized record:'); WriteLn('=================='); TOMLString := TTOMLSerializer.Serialize(Rec); Writeln(TOMLString); Writeln('Record deserialized and serialized again:'); Writeln('========================================='); Rec := TTOMLSerializer.Deserialize<TTestRec>(TOMLString); TOMLString := TTOMLSerializer.Serialize(Rec); Writeln(TOMLString); end; Output: Serialized record: ================== IntValue = 123 FloatValue = 3.14 StringValue = "abc" DateValue = "2025-06-18T05:37:02.110+03:00" ArrayValue = [ "A", "B", "C" ] Record deserialized and serialized again: ========================================= IntValue = 123 FloatValue = 3.14 StringValue = "abc" DateValue = "2025-06-18T05:37:02.110+03:00" ArrayValue = [ "A", "B", "C" ] I hope you find it useful.
-
Feature Request for the Delphi Language (Rethink or Eliminate the Concept of Units)
Dalija Prasnikar replied to dmitrybv's topic in Algorithms, Data Structures and Class Design
This has only been an issue if you make a mess out of your code design. In rare situations where you do need circular references using implementation section in one unit will suffice. I doubt that proposed changes would bring too much overall benefit and they would require extensive rework of the existing compiler architecture. There is existing feature which would be more beneficial for code organization: class helpers. Currently there is only a single supported helper in scope and having multiple ones would allow breaking down more complex code and organizing it into separate files. Implementing those would be a much simpler task, consistent with the existing architecture. -
How upgrading from Delphi 7 to Delphi 12 eliminated 15 monthly support tickets and unlocked Linux deployment In May 2024, we were contacted by a European leader in natural gas measurement systems. Their software was partly built in Delphi 7 and partly in C#. It had become difficult to maintain. The company wanted to migrate to Delphi 12, modernize the UI, and enable Linux deployment, without breaking existing functionality. Our team faced and handled the following challenges: The project relied on Delphi 7. That version lacked full Unicode support. The framework used ANSI strings by default, and this created critical limitations for modern global applications. The legacy app only ran on 32-bit Windows, using outdated Win32 APIs and hardcoded paths (C:\Data\). This prevented deployment on Linux cloud servers (AWS/Ubuntu). The app was built on obsolete BDE components and unsupported libraries. Here's what we did: ✅ Migrated from Delphi 7 to Delphi 12 ✅ Replaced BDE and Indy 9 with FireDAC and Indy 10 ✅ Refactored code for cross-platform compatibility ✅ Delivered a modernized UI with preserved workflow familiarity We achieved: - 15 support tickets per month were reduced to zero - Windows-only application is now cross-platform - Overall, the application is more prepared for future challenges A few months later, the client returned for an estimate to migrate other Delphi projects to a web-based platform. If you want to see the full story, with the challenges and solutions broken down, follow the link https://www.softacom.com/cases/modernizing-industrial-software-with-delphi-12/
-
@dummzeuch With the permission of the original author the license has now been changed to the MIT one.
-
Smart Setup is a unified tool for installing and building Delphi packages, whether they come from TMS or elsewhere. See: https://www.tmssoftware.com/site/blog.asp?post=1360
-
[Info & Feedback] DelphiGenAI v1.1.0 — Sharing Updates and an Educational Approach
Maxidonkey posted a topic in I made this
Hi everyone, I wanted to share the main updates in version 1.1.0 of DelphiGenAI (OpenAI wrapper for Delphi) here—mainly to offer what I can to the community, and maybe get some feedback if anyone feels like weighing in on my approach. Main Updates Compatibility with the Latest OpenAI Features (including Remote MCP & Code interpreter) Ready-to-Use Templates Two archives (TestGenAI_VCL.zip and TestGenAI_FMX.zip) let you copy and paste any snippet from the documentation and test it out, with no complicated setup. Variety of Code Snippets For each feature: synchronous, asynchronous (event/callback), and asynchronous with async/await. The idea is to allow everyone to compare the approaches and pick the one that fits them best. Documentation That’s Directly Usable All markdown examples can be tested as-is within the supplied templates. A Gradual Learning Path The aim: make it easier to learn about AI in Delphi, whatever your starting level, and to keep things as accessible as possible. About This Approach I’m not an experienced “Delphi old-timer” and I don’t know the community very well yet; that’s why I chose to offer several approaches (synchronous, asynchronous, and async/await) for each example. But maybe that’s not really necessary—maybe some would prefer strictly asynchronous, or even just synchronous? I’d be interested in your thoughts or experiences on this (no pressure—just curious, and trying to do what's most helpful). Also Tried on Other Wrappers I’ve used the same principle in a Delphi wrapper for Deepseek. Depending on the feedback I get here, I’ll decide whether to take this approach with a few other wrappers I’ve put up on Github. Thanks in advance for reading, and best wishes to all. -
I've just uploaded an update to my project https://github.com/rmesch/Bitmaps2Video-for-Media-Foundation What it does: Contains a VCL-class which encodes a series of bitmaps and video-clips together with an audio-file to video. The result is an .mp4-file with H264 or H265 compression together with AAC-audio. It uses windows mediafoundation, which is usually contained in windows. Hardware-encoding is supported, if your graphics-card can do it. Requires: Headers for mediafoundation from FactoryXCode: https://github.com/FactoryXCode/MfPack Windows 10 or higher Encoder (MF-Transform) for H264/H265, usually come with the graphics-driver Delphi XE7 or higher, if I haven't messed it up again, I've only got the CE and Delphi2006 (Win32 and Win64 should be working, but Win64 recently crashes for me with "The session was disconnected".) The demo-project shows some uses: Record a series of canvas-drawings to video Make a slideshow from image-files (.bmp,.jpg,.png,.gif) with music (.wav, .mp3, .wmv, ...) and 2 kinds of transitions Insert a videoclip into a slideshow (anything that windows can decode should work) Transcode a video-file including the first audio-stream. Improvements: I think I now better understand how to feed frames to the encoder. With the right settings it makes stutter-free videos with good audio-video-synchronization. It's now usable for me in my "big" project, and I no longer need to rely on ffmpeg - dlls. More info in changes.txt. Just try it, if you're interested, I'd be glad. Renate
-
I'm working on a project like that; New units are named consistently after strict rules so we can easily locate the relevant unit. Old units are named after whatever the developer had time to type (and apparently he was always in a rush). So I introduced a "magic" key that when pressed at run-time displays the name of the active form/frame. It's basically just a TApplicationEvents.OnShortCut on the main form: procedure TFormAnynymizedToProtectTheGuilty.ApplicationEventsShortCut(var Message: TWMKey; var Handled: Boolean); begin {$ifdef DEBUG} if (Menus.ShortCutFromMessage(Message) = ShortCut(VK_F1, [ssAlt])) then begin if (Screen.ActiveCustomForm <> nil) then begin var Msg := ''; // Find frames in the form var Control := Screen.ActiveControl; while (Control <> nil) and (Control <> Screen.ActiveCustomForm) do begin if (Control is TFrame) then Msg := Msg + Format('Embedded frame: %s in %s.pas', [Control.ClassName, Control.UnitName]) + #13 else if (Control is TForm) then Msg := Msg + Format('Embedded form: %s in %s.pas', [Control.ClassName, Control.UnitName]) + #13; Control := Control.Parent; end; Msg := Msg + Format('Active form: %s in %s.pas', [Screen.ActiveCustomForm.ClassName, Screen.ActiveCustomForm.UnitName]); TaskMessageDlg('YOU ARE IN A MAZE OF TWISTY LITTLE PASSAGES, ALL ALIKE.', Msg, mtInformation, [mbOK], 0); end; Handled := True; end; {$endif DEBUG} end;
-
Code signing certificates have become so expensive...
Vincent Parrett replied to RaelB's topic in Delphi Third-Party
With Signtool Yes, however with Signotaur you do not. -
Fair enough! I was searching for “application run parameters” and other more general things - I should’ve just searched for cleaninstall! Curiously, if you type cleaninstall into the search box in the docwiki, it initially says “Nothing matches the search” until you actually press return, which also caught me out. That’s my excuse anyway 😂
-
🔧 [JOB] Part-Time Delphi Developer (VCL / Win32) – Support & Mentorship Role Location: Remote (U.S. preferred, but open) Commitment: Part-time (5–10 hrs/week) Project Type: Ongoing support + mentoring role We’re looking for an experienced Delphi developer (VCL / Win32 only) to help support and sustain a well-established, industry-specific engineering software package used for retaining wall and geotechnical design. The application has been actively developed and maintained by the original developer (who’s still involved), but we’re now looking to add a second experienced Delphi developer to: Assist with ongoing support and small enhancements Help document and organize the codebase into a shared source control repository (Git) Collaborate with the original developer on architecture and long-term sustainability Mentor a junior team member (with technical aptitude) as they begin learning Delphi and the codebase We’re not looking to rewrite the software — just to maintain it, support it, and prepare for long-term continuity. The original developer has been incredibly generous with his knowledge and is ready to help onboard someone gradually. 🧰 Tech Stack & Context: Delphi VCL (Win32 only — no FireMonkey) Long-running proprietary engineering app (wall design, CAD integration, etc.) Some external modules involve MathCAD and AutoCAD scripting We’re setting up a Git-based source control repository internally for collaboration ✅ Ideal Candidate: 5+ years of Delphi (VCL) experience Comfortable reading and documenting legacy code Good communicator; able to mentor or explain logic to others U.S.-based preferred for communication ease, but flexible for the right person Bonus: experience with AutoCAD integrations, MathCAD, or engineering tools ⏱ Availability: Part-time: ~5–10 hours per week, with flexibility Occasional check-ins with our team (main developer + junior mentee) 💼 To Apply: Email tim@earthretention.com with: A brief intro or CV Your hourly rate or fee structure A note on your experience with Delphi VCL and any mentoring/legacy experience This is a great opportunity for a seasoned Delphi developer looking to support a stable, well-built product with a thoughtful team — no chaos, no rewrites, just clean continuity. Looking forward to hearing from you. — Tim Winders COO, Earth Retention / CTi Software
-
- delphi vcl
- win32
- (and 10 more)
-
No, it does not support OpenSSL 3.x or TLS 1.3 at this time. But, you can use a 3rd party SSLIOHandler that does, such as TaurusTLS (https://github.com/JPeterMugaas/taurustls). Security requirements change all the time. They have to update their systems every so often to keep up. There is much more to HTTP/S than just URLs. Yes. Yes, it does, at least on the client side, and has for 8 years now.
-
For now, there are very serious limitations you need to consider when using emNewInterpreterOwnGIL to achieve true parallelism. See for instance the limitations in What’s new in Python 3.14 — Python 3.14.0b3 documentation. Even the innocent looking print command is not thread-safe. And almost nothing can be share between the interpreters. Also there are limitations about what you can import, and P4D modules are not yet considered safe for use with emNewInterpreterOwnGIL. This is changing with the forthcoming python 3.14. It will include a new module concurrent.interpreters that exposes the interpreters with their own GIL to pure python code. There will also be an addition of ways to communicate between the interpreters using queues. See PEP 734. So for example you could store your output to such a queue and print it when everything is finished. But all the above is cutting edge and unless you really need it you should avoid it, If you decide to use it then make sure you fully understand the limitations and implications. I will try to make P4D modules compatible with emNewInterpreterOwnGIL and that would at least give you the option to say add output to a Delphi string list (or something similar) protected with a global lock on the Delphi side. Note that all the above are not related to the free-threading version of Python, which in itself is another story altogether.
-
Extreme slow-down in Windows FMX app UI since upgrading to 12.1
Patrick PREMARTIN replied to domus's topic in FMX
I open the issue https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-3711 You can follow it by enabling the notifications after login on this URL (quality.embarcadero.com). The difference between TThread.Queue() and TThread.ForceQueue() happens in the main thread : in the first case the code is executed, in the second it's delayed to next message processing iteration. Unfortunately, the behavior is not the same on Mac and Windows and in this project the form is only refreshed on macOS, for Windows it's done at the end. -
Define conditional symbol in .dpr
dummzeuch replied to Vandrovnik's topic in RTL and Delphi Object Pascal
You cannot define a symbol in the .dpr file to be available in the units (it will be available in the .dpr file itself though). You must put it into the .dproj file (Project -> Options). Alternatively you can define it in an include file and include that file in all units that require the symbol. That latter approach is used by most libraries because a library cannot add anything to the project options. -
Source: https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1577 https://quality.embarcadero.com/browse/RSP-44096 https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1754 https://www.delphipraxis.net/214473-warnung-vor-winmd.html ......................
-
My only problem with that is the license: GPL simply makes it useless for me. But since it's based on another GPL library you probably didn't have a choice.
-
I know it's not the same but one of the FMX demos in the WebView4Delphi project shows how to embed a Monaco editor : https://github.com/microsoft/monaco-editor https://github.com/salvadordf/WebView4Delphi/tree/main/demos/Delphi_FMX/MonacoEditor
-
TECNativeMap is a 100% Delphi mapping component that uses neither browser nor javascript, and is available on all Delphi-supported platforms. Compatible since Delphi 7 for VCL and XE3 for Firemonkey. Download the trial version for Delphi 12
-
Delphi bindings to libxml2 and libxslt libraries. One of the most important goals of the project is the cross-platform replacement of MSXML 6.0. Therefore, where possible, the library should follow the W3C DOM model, but compatibility with MSXML is a priority. Library For details, see readme on GITHUB https://github.com/apokroy/LX2 P.S. The library is still at an early stage of development, therefore, changes to the API are possible.
-
You might try also the CompressionQuality property, 60% instead of 90% should reduce the size in bytes (losing quality of course) https://engineertips.wordpress.com/2021/11/27/delphi-resize-jpeg/ The Webp format is an alternative, it gets smaller size vs jpeg with the same quality, and there are Delphi libraries to do so in vcl (and fmx) https://github.com/Wykerd/delphi-webp
-
promise Introducing My Delphi TFuture PPL For Thread Safe UI
Dalija Prasnikar replied to bravesofts's topic in I made this
The whole point of Delphi Future implementation is to be a blocking call. Now, we can discuss whether this kind of design is useful or not and in which circumstances. However, your improved Future is mostly useless. Instead of creating a future and then resolving it in additional task (you are involving two threads here) you should just run the code in the task and that is it. Simply use TTask.Run( procedure begin var LValue := (...); TThread.Queue(nil, procedure begin LogReply('Result: ' + LValue.ToString); // update UI on main thread that service the TTask end); end); No need to overcomplicate things. -
I tried "-doallmywork"but no effect.
-
Feature Request for the Delphi Language (Rethink or Eliminate the Concept of Units)
Uwe Raabe replied to dmitrybv's topic in Algorithms, Data Structures and Class Design
Well, in this case you can. I did a lot of refactoring such code myself during the last decades. The constraint you suggested to remove is a good indicator of progress in such an endeavor. -
A stable Delphi is also important to me. That's why I do my best to help Embarcadero achieve this.