Hi there. I have build a little program to analize the uses usage and so the complexity of a program/unit.
Hi there. I have build a little program to analize the uses usage and so the complexity of a program/unit.
See the Screenshot below.
File can be found on http://www.b-s-t.de/usesanalyzer
Commants are welcome. See it as alpha-version. :-)
There is only an executable inside the ZIP.
ReplyDeleteyes - little bit suspect
ReplyDelete/sub
ReplyDelete/sub ☺
ReplyDeleteHey its Delphi. No need for more.
ReplyDeleteBernd Scheufens Looks very interesting. Is there source? Many people (myself included) won't run "random" EXEs.
ReplyDeleteWhat did you use to parse the code - DelphiAST?
David Millington No source sorry. Parsing is done by regular expression because I only need the "uses" statements. Don't you think that all software is "random" ? :-) Some hint where to store a preview? Don't want to spend much time on that.
ReplyDeleteBernd Scheufens No, not all software is random. If I download an installer from a company, and it's code-signed, and I've run it through VirusTotal, I'm very happy with it. But if it's from someone I don't know, I don't.
ReplyDeleteI distribute software: https://parnassus.co/delphi-tools/ and all those things are followed for the programs I distribute. Ie, I assume that whoever downloads them is installing on a development machine they keep clean and even mostly internet-separated, as mine is, and do my utmost to ensure the programs I distribute are safe.
I'm afraid I don't understand what you mean about storing a preview...?
Took a chance, inside a VM. Entered a search path, but it doesn't like the path and gives no meaningful feedback to suggest what it does not like.
ReplyDeleteNot very intuitive interface. Wants one or more search paths entered into a memo, then click on Load Files menu item.
Since I could not make it work, I have no more to offer.
/sub
ReplyDeleteBernd Scheufens we are not allowed to run untrusted programs on our source code, but if I have the source, I could see that there is nothing suspicious and compile it on my own.
ReplyDeleteGood place for stuff like this is github or bitbucket.
Ok guys, I understand :-)
ReplyDeleteWe build the software for internal use only, but I thought it would be useful for others.
Especially because it often shows dependencies you never thought of.
I will work a little bit on the interface and have a look for a nice installer.
If you want to automatically organize the graph you can use the layout-algorithm I once wrote: https://github.com/VilleKrumlinde/zgameeditor/blob/master/tools/ZDesigner/3rdparty/SugiyamaLayout.pas
ReplyDeleteThanks. I had a peek look to it. Circles in the graph are not possible, isn't it?
ReplyDeleteBut that happens very often in uses statements and can be easily found with our software.
It does deal with cycles. It is very robust. See example of usage here (TMyLayout class): https://github.com/VilleKrumlinde/zgameeditor/blob/master/tools/ZDesigner/frmMeshEdit.pas
ReplyDeleteWhat works best for me is: DelphiUnitDependancyScanner, export to GraphML and view/layout/analyze with yEd.
ReplyDeleteIs that more of what you expect:
ReplyDeletehttp://www.b-s-t.de/usesanalyzer
But please. I don't want to sell the product. :-)
I had a look to google regarding the signing of software, but found not much. Especialy if you dont want to spend money for that. Maybe someone has a hint for me. We only make inhouse software, so we never had the question.
Ville Krumlinde
ReplyDeleteI tried the Sugiyama Layout. It works very nice for trees. But with graphs, that looks like a web, the results is not satisfying. Also with many nodes and circular references I get an 'layout faild' error
Bernd Scheufens About "fail" message you can just increase the cycle limit at line 367. The code was originally designed for this project where it is used to display relations between units and classes: http://essmodel.sourceforge.net/
ReplyDeleteIt crashes on our source code. Is there a way I can generate a debug log?
ReplyDeleteGiovanni Van Geel "Crashes" means you get an exception? I accedently switched off madexcept in the released settings. That yould help now. Sorry.
ReplyDeleteGiovanni Van Geel Ville Krumlinde
ReplyDeleteI fixed a bug with many files and implemented the sugiyama layout. You find the new version 1.0 at www.b-s-t.de/usesanalyzer/SetupUsesAnalyzer.1.0.exe
Thanks for your help!
That seemed to fix it. Tnx!
ReplyDeleteonly exe and my windows and norton killed it right after download...
ReplyDeleteFrank Lauter
ReplyDeleteI build the exe with Inno Setup. We have two scanner here and all is fine.... ??
Frank Lauter, Bernd Scheufens Try VirusTotal. It's owned by Google and scans with about fifty different virus scanners. https://www.virustotal.com
ReplyDeleteDavid Millington Frank Lauter
ReplyDeleteVirustotal has nothing to complain. Thanks David.