DPStano
Members-
Content Count
42 -
Joined
-
Last visited
-
Days Won
1
Everything posted by DPStano
-
Does anyone know about free SAX parser (just pascal based, not COM interop)? thx
-
function LCMapStringEx(const Text: string; Locale: LCID; MapFlag: DWORD): string; var pDes: PChar; len, len2: Integer; begin if Text = '' then begin Result := ''; Exit; end; len := Length(Text); len2 := len * 2 + 2; GetMem(pDes, len2); //half -> full try FillChar(pDes^, len2, 0); LCMapString(Locale, MapFlag, PChar(Text), len, pDes, len2 - 1); Result := string(pDes); finally FreeMem(pDes); end; end; Result := LCMapStringEx(Text, LANG_TURKISH, LCMAP_UPPERCASE);
-
Delphi compiled EXE are flagged as malware by anti virus software
DPStano replied to Jaska's topic in General Help
Signing with EV certificate helps like magic, we have been fighting with antivirus software for years, and from my testing there is a problem with some functions in system.pas (not sure which one it's been years) that are imported even never used (almost none existent unused code removal in delphi) that trigger antivirus heuristic. -
cnpack formater is probably the best one out there, I'm using it daily to format code containing inlines without any problem.
-
Is there MQTT connection feature in RAD Studio v10.4?
DPStano replied to TimCruise's topic in Delphi IDE and APIs
https://github.com/bkeevil/mqtt/issues/26 -
Is there MQTT connection feature in RAD Studio v10.4?
DPStano replied to TimCruise's topic in Delphi IDE and APIs
that one looks good https://github.com/bkeevil/mqtt I was planning to use it but don't know if is actually usable -
Ref to function used as interface?
DPStano replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
https://stackoverflow.com/questions/39955052/how-are-anonymous-methods-implemented-under-the-hood https://sergworks.wordpress.com/2010/01/27/anonimous-methods-in-delphi-the-internals/ -
Database workbench because it has one handy feature it can debug stored procedures ...
-
What is part of your contiuos integration?
DPStano replied to Mike Torrettinni's topic in General Help
you have to track code changes and some changelog info together, when there are more like 100 commits in each release you are not able to look at every commit and write some info to release notes so normally you would have a file like changelog.md and every change should be written there before the merge, but when you are working on multiple branches with multiple developers its pain for constant rebase and conflict solving (you are constantly rewriting same line) so you will end up with multiple changelog.md files or ideally will move changelog from any tracked git file and now you have like two options write changelog to commit message or merge request description ... first one is simpler for processing so we started with that... and it working nicely ... and before new version release all commit's changelog lines are processed and some nice markdown file is created and uploaded to the web. -
What is part of your contiuos integration?
DPStano replied to Mike Torrettinni's topic in General Help
the changelog is part of commit message like commit title [changelog] - bla bla bla - bla each mr has to have at least one commit with changelog with fixed structure, it will not stop pipeline just auto label merge request with "missing-changelog" or something like that... -
What is part of your contiuos integration?
DPStano replied to Mike Torrettinni's topic in General Help
we are using gitflow + merge request CI pipeline(Gitlab runner) looks like - precheck like changelog/tags validation - build - prepare resources like versioninfo, build info, theme, licences, changelog .... - build dcc32 - postprocessing (like dfm packing clearing) - tests - updater and update - setups inno + msi - deploy (based on branch like upload to web for testerd when mr is merged to develop ...) -
it looks that embarcadero fired all programmers ... it shouldn't be called 11 but maybe 10.4 patch 5 what about something useful for programmers, like code profiler, usable debugger, usable code navigation, code refactoring, and so on ... where are features from roadmap like language extensions? how desperate they had to be when you see "Rich Edit component update removes XP dependencies " in the changelog
-
Is there an elegant way in Delphi to prevent instantiating a class?
DPStano replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
can ctor be private? strict private constructor Create; end; -
Trojan:Script/Sabsik.TE.A!ml detected (false positive of course)
DPStano replied to Clément's topic in RTL and Delphi Object Pascal
we are fighting against AV daily and after talking to few AV companies and their engineers all say there is no difference between unsigned and signed binary even with EV certificate. -
Anybody changing FileVersion directly in dproj file?
DPStano replied to Mike Torrettinni's topic in General Help
it's one of the reasons, next one is that xml(dproj) is one of the worst formats when you have to rebase branch and resolve conflict, and borland/embarcadero moved it to another level, delphi it is constantly changing dproj (switch to debug build -> dproj changes -> switch back and it changes even more, add a new file and you have like thousands new changes and so on) so we stripped all ballast(90%) from dproj and locked it for changes and we separated version info to own rc but version info section has to have the same encoding as defined inside https://docs.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block and we were constantly changing it from utf-8 to win1250 and back, fields like company name and the product description were almost always broken ... so we switched to simple powershell script that makes everything that we need in the right encoding all the time and it has to take version info from somewhere and dpr was good candidate for it couse it already contained header with similar info... -
Anybody changing FileVersion directly in dproj file?
DPStano replied to Mike Torrettinni's topic in General Help
@Mike Torrettinni It's our own custom syntax to define version info without touching *.dproj, these lines are parsed by *.ps1 script called from prebuild event https://docwiki.embarcadero.com/RADStudio/Sydney/en/Creating_Build_Events that creates res file https://docwiki.embarcadero.com/RADStudio/Sydney/en/Resource_file_(Delphi) that is linked to project during the build. -
Anybody changing FileVersion directly in dproj file?
DPStano replied to Mike Torrettinni's topic in General Help
we have even hard rule to not commit dproj ... delphi modifies dproj without reason, and it's really annoying to resolve conflicts all the time, we created simple script in PowerShell that runs before build and creates resources with version info based on a custom comment in dpr like program Test; {@FileVersion=2.0.0} {@FileDescription=} {@InternalName=} {@Comments=} {@CompanyName=} {@LegalCopyright=} {@LegalTrademarks=} {@OriginalFilename=} {@PrivateBuild=} {@ProductName=@InternalName} {@ProductVersion=@FileVersion} uses -
Delphi Daily WTF / Antipattern / Stupid code thread
DPStano replied to Tommi Prami's topic in RTL and Delphi Object Pascal
the worst I saw was 2,5k LOC to make a deep copy of the Form instead of creating new instance. -
do you have libeay32.dll and ssleay32.dll near exe?
-
I would not expect much from a neural network trained on that few pascal repos hosted on github 😄
-
does anybody have definitions for functions in wcnmapi.dll https://docs.microsoft.com/en-us/windows/win32/api/wcmapi/ ... I tried to use nestlib c header translator but seems to have problems with parsing
-
I have program like E: Extended; E := 36678971.91; Writeln(FormatFloat('0.##########', E, FloatFormatSettings)); result is 36678971.91 SizeOf(Extended) > 10, GetPrecisionMode -> pmExtended, GetRoundMode ->rmNearest but when I compile it with CI dcc32.exe with almost same params the result is 36678971.9099999994, SizeOf(Extended) > 10, GetPrecisionMode -> pmDouble, GetRoundMode ->rmNearest I thought that precision mode will make it different but no when I SetPrecisionMode(pmExtended) result will not change Does anybody have any idea what is happening?
-
I found what is interfering there was background loading of TWebBrowser that changes precision in FPU Control Word thx all
-
as I thought simple app returns 36678971.91 (built with CI) ... now I have like 2kk lines of legacy code with 2kk lines of external dependencies ... so back to the question is there any function besides SetPrecisionMode and SetRoundMode that can have an impact on floating points numbers?
-
Delphi is 10.3.0, app is 32bit (my build and CI too), OS is Windows10 and Windows server 2016 (CI)