Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 03/21/24 in all areas

  1. Lars Fosdal

    A gem from the past (Goto)

    Fun observations on the GoTo topic: https://jerf.org/iri/post/2024/goto/
  2. Elliot Hillary

    DelphiLint v1.0.0 released!

    To uninstall from your IDE, you remove it like any other package through Components > Install Packages. If you’d like to totally remove all traces of DelphiLint from your system, deleting the folder %APPDATA%\DelphiLint will do the trick. Although, if you’re uninstalling because you want to install a newer version of DelphiLint instead, there’s no need to do any of this - the install script automatically uninstalls any old versions.
  3. I was sure I got rid of all Goto usage in my code. But I found this example today : for i := 0 to Length(vArray) - 1 do begin if vArray[i].SkipThisLine then goto labelSkipThisLine; ... ... labelSkipThisLine: // no code, do nothing with this data line end; This is probably close to 20 years old code, and never failed! I almost want to leave it there, just as a reminder it took me almost 20 years to get past the beginner level 🙂
  4. Angus Robertson

    ICS V9.1 announced

    ICS V9.1 has been released at: https://wiki.overbyte.eu/wiki/index.php/ICS_Download ICS is a free internet component library for Delphi 7, 2006 to 2010, XE to XE8, 10, 10.1, 10.2, 10.3, 10.4, 11 and 12 and C++ Builder 10.4, 11 and 12. ICS supports VCL and FMX, Win32, Win64 and MacOS 32-bit targets. Beware Mac OS-X and C++ have not been tested recently due to lack of support from such users. The distribution zip includes the latest OpenSSL 3.0.13. 3.1.5 and 3.2.1, for Win32 and Win64. The highlights of V9.1 were posted in this topic two weeks ago, and are included in the download page. The full release notes for V9.1 are at https://wiki.overbyte.eu/wiki/index.php/ICS_V9.1 There is also a new page https://wiki.overbyte.eu/wiki/index.php/Updating_projects_to_V9.1 to help with migrating existing projects. The main ICS readme9.txt has the installation section rewritten to explain the new common groups and packages used for Delphi 10.4 and later, so you won't find any dedicated ICS packages for Delphi 11 or 12. The readme now also explains all defines in the .\Source\Include\OverbyteIcsDefs.inc file that control how OpenSSL is loaded. All ICS active samples are available as prebuilt executables, to allow ease of testing without needing to install ICS and build them all. There are four separate zip files split into clients, servers, tools and miscellaneous samples which can be downloaded from https://wiki.overbyte.eu/wiki/index.php/ICS_Samples Angus
  5. Anders Melander

    A gem from the past (Goto)

    True, but don't say that out loud. sEE, i'M uSiNg GoToS; iM A hiGhLy SkIlLeD pRoGraMmEr!
  6. Sherlock

    DelphiLint v1.0.0 released!

    For your assets on the Releases page please, please don't use the Codenames only. I just sat in front of my Delphi with an open project and could not quickly find out if the ubiquitous number 12 represents the elusive city of Alexandria or Athens, unsure of which of your Assets to download. If you must waste space by using Codenames, then please at least waste two spaces more by adding the version you mean to address....or to satisfy my Monkness scrap the Codenames altogether.
  7. Hey Y'All, We are officially in the 16 to 17 seconds: $ time ./bin/sbalazs /tmp/measurements-1_000_000_000.txt 32 {...} real 0m16.422s user 3m46.669s sys 1m29.654s Only 15 to 16 seconds to go Cheers, Gus
  8. Dave Nottage

    Creating dylibs for iOS

    https://stackoverflow.com/a/36041595/3164070
  9. Rollo62

    DRM video player

    The ExoPlayer in its old form is deprecated, does this Alcinoe library also works in the new Media3-Version?
  10. Before anyone gets too upset, my perspective is based on dealing with legacy code you have come into. There are numerous advantages to encapsulating global variables. Not only do you establish a measure of access control, but if you expose them as properties with getters and setters, you can easily set breakpoints to discover points of interaction. Equally, you could introduce logging. But even without those benefits, you will be altering the calling code to reference MyGlobals.SomeState, rather than simply SomeState. Once you have accomplished that tedious task, it is also a simple matter to search for all such references by searching on MyGlobals. Other benefits will become apparent as you work through things.
  11. VoSs2o0o

    DelphiLint v1.0.0 released!

    Thank you for your fast support, it is working now! Also this is a very impessive Tool. I will next try it with the SC-Server to have more control over the rules. It will be a Standardtool for me, when i make it to add/remove/tweak some rules... Anyway it is still helpful in the Offline-Configuration.
  12. Dave Nottage

    Browse for Image, Android

    Browsing outside of the application itself requires intents. You could use Kastri, which has this Files Selector demo.
  13. Stefan Glienke

    DelphiLint v1.0.0 released!

    Is it still not possible to create self-contained executables with Java? If so it would be nice because that would remove the requirement for the JRE.
  14. Pat Foley

    Viewing All the Digits of Pi in Real Time with Delphi

    In you missed it Two Pie day or Tau June 28 is coming! https://tauday.com/tau-manifesto Article about using Tau in schools.
  15. Der schöne Günther

    Delphi and "Use only memory safe languages"

    and ... Rust which is often quoted in relation to memory-safety. Linux: It has been a (small) part of the Linux kernel since 6.1 Rust — The Linux Kernel documentation Windows:
  16. Angus Robertson

    ICS V9.1 Highlights

    ICS V9.1 is almost ready for release. Although there are no new components, there are many other SSL/TLS changes that will affect existing applications, but make ICS easier to use and support for the future. Before the final release in a week or two, I'd appreciate some feedback from user installing V9.1 using the new packages, and update one or more old SSL/TLS applications, it may help future users if I can improve the documentation. Please read readme9.txt and these note about V9.1 carefully when upgrading existing applications, you may get build errors that need minor code changes. But new applications should need be easier to create. 1 - Delphi 10.4 and later now use the same install groups and packages, IcsInstallFmx, IcsInstallVcl and IcsInstallVclFmx, making support a lot easier. Version specific groups remain for Delphi 10.3 and earlier, with new groups D(X)InstallVcl for VCL only replacing the old OverbyteIcs(X) groups, again to simplify support. 2 - The old samples directory has gone and many of the older and little used samples have been archived to a separate download. The active samples used to test and demonstrate all ICS components are now split into the following paths, in the ICS root directory: demos-delphi-vcl - 45 VCL samples for Windows. demos-delphi-extra - four VCL samples that need third party components to build. demos-delphi-fmx - seven FMX samples for Windows, not yet tested on MacOS. demos-cpp-vcl - all old C++ samples that have not been tested for 10 years, need help. demos-data - data files for samples, such as web pages. All these samples can now be built for Win32 and Win64 platforms. 3 - To ease development, linking and future support, some new units have been added by splitting existing units with multiple components, unfortunately this means many existing projects will need one or more of the new units adding to their uses section. Apologies for the pain, but this should have been done a long time ago. The main change is splitting out much of the SSL/TLS related code from the massive OverbyteIcsWSocket unit to a new unit OverbyteIcsSslBase. 4 - Distribution of the ICS OpenSSL files has changed. Earlier ICS versions required the OpenSSL DLLs to be distributed with applications, and a root CA bundle file to verify SSL/TLS connections, and these needed to be loaded using code. There was little standardisation over where the OpenSSL DLLs were located, applications tended to keep their own copies alongside other executables, leading to multiple DLL copies and needing the public variable GSSL_DLL_DIR set to a specific directory before OpenSSL was loaded. Likewise, root CA bundle directories had to be distributed with applications and loaded with code. ICS V9.1 allows five different ways of loading OpenSSL: 1 - DLLs linked into application as resource files 2 - DLLs loaded from common directory C:\ProgramData\ICS-OpenSSL\ 3 - OpenSSL DCU linked into application using commercial YuOpenSSL 4 - DLLs loaded from location specified in public variable GSSL_DLL_DIR 5 - DLLs loaded according to path, may be found anywhere on PC Which method ICS uses to load OpenSSL depends upon several defines in the .\Source\Include\OverbyteIcsDefs.inc file, please see the readme9.txt file for details. ICS currently includes resource files for three different OpenSSL releases, 3.0`13. 3.1.5 and 3.2.1, which version is linked is controlled by a define. If the OpenSSL DLLs are linked into the application, they are extracted to a version subdirectory, ie C:\ProgramData\ICS-OpenSSL\3012\ so different applications can use different OpenSSL versions. This happens only once if the files have not already been extracted. When updating existing projects without using any new defines, the ICS old behaviour of methods 3, 4 and 5 above remain with no changes needed. 5 - A common IcsSslRootCAStore component is now created at application start-up, to avoid different components needing their own CA stores to verify SSL/TLS certificates, and for applications to load those stores. The three different CA stores included with ICS are now supplied as resource files, with a define determining which is linked into applications. Another define causes OpenSSL and this store to be loaded at application startup, so OpenSSL is available for all components, without it needing to be loaded again, perhaps repeatedly. Without new defines, a CA Store can be loaded manually into IcsSslRootCAStore. The ICS servers use CA Stores now use IcsSslRootCAStore and no longer load any files specified. 6 - All SSL/TLS servers need a certificate and private key to start, even when testing. Previously ICS supplied some self signed certificates for testing, and also created such certificates automatically if they were missing or if the server was about to order a Let's Encrypt certificate. Accessing such servers for testing using browsers raised various warnings. ICS now has it's own SSL root certificate 'ICS Root CA' and two intermediates, 'ICS Intermediate' and 'ICS Intermediate Short', the last of which includes a private key so can be used to automatically sign new certificates by ICS server applications, rather than just self signed certificates as before. If the 'ICS Root CA' certificate is installed in the Window Store and browser stores, it should stop certificate warnings appearing. ICS applications automatically trust the ICS root, so will give no warnings. The short intermediate has a maximum 100 day expiry, so new versions will be issued regularly. There is a single function CreateSelfSignCertEx that created signed certificates, and another IcsInstallIcsRoot that installs the ICS root into the Windows Store, so easy to use. It is possible to replace the ICS root with your own private root certificate and have servers create their own certificates against that root, for internal networks. 7 - The TSslHttpRest component now allows TRestParams to be created as content type 'Form-Data Body' to create MIME multipart/form-data parameters that may include new TParamType of RPTypeFile that specifies a file name whose binary content will be added to the parameters as a file upload, allowing multiple files and extra parameters. TRestParams are now built into a TStream rather than a string to allow larger parameter sizes, tested up to 8GB. The ICS web server samples have improved MIME decoding to accept massive uploads. 8 - Several client and server components have a new property NoSSL which if set will prevent those components using SSL/TLS for HTTPS or FTPS, even if the application is linked with OpenSSL code. Beware the IcsSslRootCAStore component must not be initialised by the application. 9 - Updating projects to V9.1: Applications that have TSslContext on a form will need to be opened so the new unit OverbyteIcsSslBase is automatically added to the users clause. Units that reference TX509Base or TX509List mostly for the OnSslHandshakeDone event, may need OverbyteIcsSslBase adding manually if they don't also have TSslContext. The other new units are OverbyteIcsHtmlUtils (for TextToHtmlText, IcsHtmlValuesToUnicode, IcsFindHtmlCharset, IcsFindHtmlCodepage, IcsContentCodepage and IcsHtmlToStr), OverbyteIcsDnsHttps (for TDnsQueryHttp and IcsDomNameCacheHttps) and OverbyteIcsSslUtils (for TOcspHttp). Applications that use IcsExtractURLEncodedValue, ExtractURLEncodedParamList or GetCookieValue may need OverbyteIcsUrl adding to projects. When updating projects using a TSslContext component, setting the new property UseSharedCAStore to True causes the properties CAFile, CALines and CAPath to be ignored, and the new IcsSslRootCAStore component will be used instead, being automatically initialised if not done at program start-up. Don't use UseSharedCAStore for server components. High level ICS components such as TSslHttpRest that have an internal TSslContext component all set UseSharedCAStore and ignore properties like SslRootFile to load a root CA bundle. If a specific bundle is required, it may be loaded to IcsSslRootCAStore. With V9,1, the global variables GSSLEAY_DLL_IgnoreNew and GSSLEAY_DLL_IgnoreOld are ignored since only different minor versions of OpenSSL 3 are supported. V9.1 can be downloaded from SVN at https://svn.overbyte.be/svn/icsv9/ or the overnight zip at https://wiki.overbyte.eu/wiki/index.php/ICS_Download Angus
  17. Sorry, I think this topic should now be closed. He is going around in circles installing random packages not designed for his compiler, then wasting our time repeatedly asking why they don't work. And ignoring all our efforts to install ICS properly. He needs professional help, but this is not the correct place. I will no longer be responding. Angus
  18. Please read my previous message again. Do not attach screen shots and copies of our files to these messages. Even your text file named errors has no error information, just more source code. If you want support, you need to report the actual compiler errors, not just send copies of code I wrote back to us. Angus
  19. That is not even required. I have now found Inno Setup does it all for you. We are getting way out of Delphi topic here, but this is what I now have in Inno Setup, and it does it all: Tools>Configure Sign Tools: signtool="C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\signtool" sign /a /fd SHA256 $f [Setup] SignTool=SignTool [Files] Source: "*.exe"; DestDir: "{userappdata}\SARTrack\exe"; Flags: recursesubdirs ignoreversion signonce Source: "*"; Excludes: "*.exe"; DestDir: "{userappdata}\SARTrack\exe"; Flags: recursesubdirs ignoreversion (where \SARTrack\exe is my destination dir) This signs *all* executables, then it signs itself.
  20. Jonah Jeleniewski

    SonarDelphi v1.0.0 released!

    Not to detract from your point here, just wanted to note that Community edition isn't a cloud service - it's a free self-hosted application. In other words, you're not under SonarSource's thumb when using it.
  21. programmerdelphi2k

    Bugs - where to write to fix it?

    you can create yourself "helpers" too... if the class/type dont have it... Vcl.Grids, Vcl.StdCtrls; type TSGMyHelper = class helper for TStringGrid type TMyHack = class(TStringGrid); procedure MyRowMove(IdxFrom, IdxTo: integer); end; TForm1 = class(TForm) StringGrid1: TStringGrid; Button1: TButton; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} { TSGMyHelper } procedure TSGMyHelper.MyRowMove(IdxFrom, IdxTo: integer); begin TMyHack(Self).RowMoved(IdxFrom, IdxTo); end; { Form1 } procedure TForm1.FormCreate(Sender: TObject); begin for var i: integer := 0 to (StringGrid1.RowCount - 1) do StringGrid1.Cells[1, i] := 'hello ' + i.ToString; end; procedure TForm1.Button1Click(Sender: TObject); begin StringGrid1.MyRowMove(3, 1); end; end.
  22. Attila Kovacs

    Bugs - where to write to fix it?

    As we have learned from other highly qualified individuals, VCL has not been abandoned; rather, it was completed a long time ago.
  23. Source attached. I use this code in most of my open source/freeware tools. Features: Fades image in/out on show/hide. Can be moved with the mouse. Automatically hidden when deactivated. A text can be displayed on top of the image. Text can be scrolled to create vertical banner. Can play a audio resource while visible. Can also be used as an "About box". Things to note: Splash does not "stay on top" when running in the debugger. This is by design. Doesn't handle HighDPI scaling well (image isn't scaled). SplashDemo.zip
  24. David Heffernan

    Delphi-neon, any thought?

    Jokes aside, any user that feels that the testing could be broadened can write some tests and submit a PR.
  25. David Heffernan

    Delphi-neon, any thought?

    Tested 42 and Lorem ipsum, that seems pretty complete to me. 😉
×