![]() |
Re: Freware: Programm zur Ermittlung von Unit-Abhängigkeiten
Zitat:
Werden die Dateien mit einem # gekennzeichnet, so hat er nix gefunden. Das lässt sich aber leicht beheben, in dem die Pfade in der *.dpr explizit angegeben werden: Beisp.
Delphi-Quellcode:
(Die Pfadangaben werden dann natürlich im gesammten Projekt verwendet.)
program Project1;
... uses Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'SubDir\Unit2.pas', Unit3 in '..\shared\Unit3.pas', {Form3} Unit4 in 'c:\temp\test\Unit4.pas' {Form4}; ... Ansonsten sollte er alle Bezieungen (auch untereinander) anzeigen. Es werden alle uses bereiche berücksichtigt (interface und implementation) Das Beispiel im 1. Beitrag (Project1) hat ja auch Abhängigkeiten unter den Units. Zitat:
|
Re: Freware: Programm zur Ermittlung von Unit-Abhängigkeiten
Liste der Anhänge anzeigen (Anzahl: 1)
Also gefunden hat er die ja (angeblich), nur scheint er nicht in den weiteren _Units zu suchen
Code:
* Classes
* Controls * ExtCtrls * Forms * Math * PSAPI * StdCtrls * SysUtils * Windows F:\UCC\FNS_Binary.pas F:\UCC\FNS_Consts.pas F:\UCC\FNS_Debug.pas F:\UCC\FNS_Forms.pas F:\UCC\FNS_Init.pas F:\UCC\FNS_Languages.pas F:\UCC\FNS_Log.pas F:\UCC\FNS_MathB.pas F:\UCC\FNS_Memory.pas F:\UCC\FNS_MemoryUT.pas F:\UCC\FNS_Messages.pas F:\UCC\FNS_ReInit.pas F:\UCC\FNS_Security.pas F:\UCC\FNS_Strings.pas F:\UCC\FNS_System.pas F:\UCC\FNS_Thread.pas F:\UCC\FNS_Types.pas F:\UCC\FNS_Unicode.pas F:\UCC\FNS_ValueConvert.pas F:\UCC\MSC_WinError.pas F:\UCC\TestU.pas
Code:
(nur das Häkchen bei delphi lib fehlt)
DiGraph Uses {
// dot file created by unit dependency scanner v1.0 // programmed by MaBuSE, member of [url]www.delphipraxis.net[/url] // [url]http://www.delphipraxis.net/topic84612_freware+programm+zur+ermittlung+von+unitabhaengigkeiten.html[/url] graph [ratio="0.7"]; "Test.dpr" [shape=box, style=filled, color=lightgray]; "Test.dpr" -> "FNS_Init.pas"; "Test.dpr" -> "FNS_ReInit.pas"; "Test.dpr" -> "TestU.pas"; "TestU.pas" -> "FNS_Consts.pas"; "TestU.pas" -> "FNS_Types.pas"; "TestU.pas" -> "FNS_Memory.pas"; "TestU.pas" -> "FNS_System.pas"; "TestU.pas" -> "FNS_Messages.pas"; "TestU.pas" -> "FNS_Languages.pas"; "TestU.pas" -> "FNS_Forms.pas"; "TestU.pas" -> "FNS_MathB.pas"; "TestU.pas" -> "FNS_Log.pas"; "TestU.pas" -> "FNS_Binary.pas"; "TestU.pas" -> "FNS_Debug.pas"; "TestU.pas" -> "FNS_MemoryUT.pas"; "TestU.pas" -> "FNS_Security.pas"; "TestU.pas" -> "FNS_Strings.pas"; "TestU.pas" -> "FNS_Unicode.pas"; "TestU.pas" -> "FNS_ValueConvert.pas"; "TestU.pas" -> "FNS_Thread.pas"; "TestU.pas" -> "MSC_WinError.pas"; } OK, den einen Pfeil entdeckt hab ... man muß sich das nur in Groß ansehn :roll: Aber wie gesagt, alle Dateien im selben Verzeichnis und er durchsucht die nicht. Dafür hab ich aber ein großes Bild mir schönen perfekt geraden Linien (nicht so'n paar krumme Dinger wie bei euch :tongue: ) Ach ja, die test.dot/.jpg ... wenn die schon im Projektverzeichnis landen, dann wäre es eigentlich nett, wenn die wie die getestete Datei heißen (falls es nicht schon eine Datei mit dem Namen gibt) [add] QUOTE in CODE geändert (weniger scrollen) Und dann noch das ... in der TestU.pas steht Folgendes:
Delphi-Quellcode:
Und in den (nicht getesteten) anderen Units auch mal sowas:
Uses Classes, Controls, Forms, StdCtrls, ExtCtrls, Math, PSAPI, Windows, SysUtils,
FNS_Consts, FNS_Types, FNS_Memory, FNS_System, FNS_Messages, FNS_Languages, FNS_Forms, FNS_MathB, FNS_Log, FNS_Binary{, FNS_Colors{, FNS_DateTime}, FNS_Debug{, FNS_Files{, FNS_Hash{, FNS_Hints}, FNS_MemoryUT{, FNS_MemoryUT2}, FNS_Security, FNS_Strings{, FNS_Sys}, FNS_Unicode{, MSC_WinError}, FNS_ValueConvert, FNS_Thread{, FNS_SpeedZip{, FNS_XPStyle}, MSC_WinError;
Delphi-Quellcode:
Uses {$IFDEF UseWindows}Windows,{$ENDIF} FNS_Consts, FNS_Types;
|
Re: Freware: Programm zur Ermittlung von Unit-Abhängigkeiten
Zitat:
Aber warum geht er nicht in die Units rein :gruebel: (Benutz mal die Debug Version vom UnitScanner s. Erster Beitrag) |
Re: Freware: Programm zur Ermittlung von Unit-Abhängigkeiten
Wenn ich mir angucke was in der Liste steht, dann schon :roll:
|
Re: Freware: Programm zur Ermittlung von Unit-Abhängigkeiten
Zitat:
Ist ein Bug in dem Parsing meines Scanners. :wall: Ich verwende in meinen Programmen ausschliesslich { und // als Kommentare. Du verwendest (* ... *) ! Das hatte ich nicht getestet und deswegen funktioniert es auch nicht :mrgreen: Ich habe im Editor Suchen/Ersetzen über alle Dateien (* -> { und *) -> } gemacht und dann ging es. Den Bug fixe ich aber erst nach meinem Urlaub !!! So, ich stehe nun bis 10.07.2006 nicht mehr zur Verfügung. Ihr dürft aber weiterhin posten ;-) Ich werde es dann am 10.07. lesen und beantworten. Viel Spaß |
Re: Freware: Programm zur Ermittlung von Unit-Abhängigkeiten
Zitat:
Zitat:
Ich hab halt die Kommentare in (* *) und hinter // und dann kommt es mal vor, daß diese dann samt dem QuellCode darum per { } ausgeblendet wird. Es würde also zu Problemchen kommen, wenn du das da auch nur ersetzt :zwinker: (die verschiedenen "KommentarDinger" müssen halt immer einzeln behandelt und in der Abfrage verschachtelt werden) |
Re: Freware: Programm zur Ermittlung von Unit-Abhängigkeiten
Einen Letzen bevor ich nun Heim geh.
Ihr kennt sicherlich alle folgendes Project1.dpr und Unit1.dpr:
Delphi-Quellcode:
program Project1;
uses Forms, Unit1 in 'Unit1.pas' {Form1}; {$R *.res} begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end.
Delphi-Quellcode:
Wenn man nun die Unit-Abhänigkeiten der RTL und VCL von Delphi an diesem Beispiel darstellt,
unit Unit1;
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs; type TForm1 = class(TForm) private { Private-Deklarationen } public { Public-Deklarationen } end; var Form1: TForm1; implementation {$R *.dfm} end. kann man sehen, wie "viel" eigentlich in so einem "leeren" Delphi Projekt drin steckt. (Und warum die Project1.exe so groß ist und die non-vcl Projekte so klein sind.) (Bild anklicken um die 1027x768 Version zu sehen) Mit dem folgendem Dot File kann sich jeder die "große" Version des Diagramms erzeugen:
Code:
oder
dot -Tjpg -oProject1.jpg Project1.dot
Code:
Hier ist die Project1.dot:
dot -Tpng -oProject1.png Project1.dot
Code:
DiGraph Uses {
// dot file created by unit dependency scanner v1.0 // programmed by MaBuSE, member of [url]www.delphipraxis.net[/url] // [url]http://www.delphipraxis.net/topic84612_freware+programm+zur+ermittlung+von+unitabhaengigkeiten.html[/url] graph [ratio="0.7"]; "Project1.dpr" [shape=box, style=filled, color=lightgray]; "Project1.dpr" -> "Forms.pas"; "Project1.dpr" -> "Unit1.pas"; "Forms.pas" -> "Messages.pas"; "Forms.pas" -> "Windows.pas"; "Forms.pas" -> "SysUtils.pas"; "Forms.pas" -> "Classes.pas"; "Forms.pas" -> "Graphics.pas"; "Forms.pas" -> "Menus.pas"; "Forms.pas" -> "Controls.pas"; "Forms.pas" -> "Imm.pas"; "Forms.pas" -> "ActnList.pas"; "Forms.pas" -> "MultiMon.pas"; "Forms.pas" -> "HelpIntfs.pas"; "Forms.pas" -> "Messages.pas"; "Forms.pas" -> "Windows.pas"; "Forms.pas" -> "SysUtils.pas"; "Forms.pas" -> "Classes.pas"; "Forms.pas" -> "Graphics.pas"; "Forms.pas" -> "Menus.pas"; "Forms.pas" -> "Controls.pas"; "Forms.pas" -> "Imm.pas"; "Forms.pas" -> "ActnList.pas"; "Forms.pas" -> "MultiMon.pas"; "Forms.pas" -> "HelpIntfs.pas"; "Forms.pas" -> "ActiveX.pas"; "Forms.pas" -> "Math.pas"; "Forms.pas" -> "Printers.pas"; "Forms.pas" -> "Consts.pas"; "Forms.pas" -> "RTLConsts.pas"; "Forms.pas" -> "CommCtrl.pas"; "Forms.pas" -> "FlatSB.pas"; "Forms.pas" -> "StdActns.pas"; "Forms.pas" -> "WinHelpViewer.pas"; "Forms.pas" -> "Themes.pas"; "Messages.pas" -> "Windows.pas"; "Windows.pas" -> "Types.pas"; "SysUtils.pas" -> "Windows.pas"; "SysUtils.pas" -> "Types.pas"; "SysUtils.pas" -> "SysConst.pas"; "Graphics.pas" -> "Windows.pas"; "Graphics.pas" -> "Windows.pas"; "Graphics.pas" -> "SysUtils.pas"; "Graphics.pas" -> "Classes.pas"; "Graphics.pas" -> "Windows.pas"; "Graphics.pas" -> "SysUtils.pas"; "Graphics.pas" -> "Classes.pas"; "Menus.pas" -> "Windows.pas"; "Menus.pas" -> "SysUtils.pas"; "Menus.pas" -> "Classes.pas"; "Menus.pas" -> "Contnrs.pas"; "Menus.pas" -> "Messages.pas"; "Menus.pas" -> "Graphics.pas"; "Menus.pas" -> "ImgList.pas"; "Menus.pas" -> "ActnList.pas"; "Menus.pas" -> "Windows.pas"; "Menus.pas" -> "SysUtils.pas"; "Menus.pas" -> "Classes.pas"; "Menus.pas" -> "Contnrs.pas"; "Menus.pas" -> "Messages.pas"; "Menus.pas" -> "Graphics.pas"; "Menus.pas" -> "ImgList.pas"; "Menus.pas" -> "ActnList.pas"; "Menus.pas" -> "Controls.pas"; "Menus.pas" -> "Forms.pas"; "Menus.pas" -> "Consts.pas"; "Menus.pas" -> "Themes.pas"; "Contnrs.pas" -> "SysUtils.pas"; "Contnrs.pas" -> "Classes.pas"; "Contnrs.pas" -> "RTLConsts.pas"; "Contnrs.pas" -> "Math.pas"; "Math.pas" -> "SysUtils.pas"; "Math.pas" -> "Types.pas"; "ImgList.pas" -> "Windows.pas"; "ImgList.pas" -> "Classes.pas"; "ImgList.pas" -> "Graphics.pas"; "ImgList.pas" -> "CommCtrl.pas"; "ImgList.pas" -> "SysUtils.pas"; "ImgList.pas" -> "Consts.pas"; "ImgList.pas" -> "Forms.pas"; "ImgList.pas" -> "ActiveX.pas"; "ActiveX.pas" -> "Messages.pas"; "ActiveX.pas" -> "Windows.pas"; "ActiveX.pas" -> "Messages.pas"; "ActiveX.pas" -> "Types.pas"; "ActiveX.pas" -> "Windows.pas"; "ActnList.pas" -> "Classes.pas"; "ActnList.pas" -> "Messages.pas"; "ActnList.pas" -> "ImgList.pas"; "ActnList.pas" -> "Contnrs.pas"; "ActnList.pas" -> "SysUtils.pas"; "ActnList.pas" -> "Windows.pas"; "ActnList.pas" -> "Forms.pas"; "ActnList.pas" -> "Menus.pas"; "ActnList.pas" -> "Consts.pas"; "ActnList.pas" -> "Graphics.pas"; "ActnList.pas" -> "Controls.pas"; "Themes.pas" -> "Windows.pas"; "Themes.pas" -> "Classes.pas"; "Themes.pas" -> "Messages.pas"; "Themes.pas" -> "Graphics.pas"; "Themes.pas" -> "UxTheme.pas"; "Themes.pas" -> "CommCtrl.pas"; "Themes.pas" -> "Controls.pas"; "Themes.pas" -> "SysUtils.pas"; "Themes.pas" -> "ComCtrls.pas"; "UxTheme.pas" -> "Windows.pas"; "UxTheme.pas" -> "CommCtrl.pas"; "UxTheme.pas" -> "SyncObjs.pas"; "SyncObjs.pas" -> "Windows.pas"; "SyncObjs.pas" -> "Messages.pas"; "SyncObjs.pas" -> "SysUtils.pas"; "SyncObjs.pas" -> "Classes.pas"; "ComCtrls.pas" -> "Messages.pas"; "ComCtrls.pas" -> "Windows.pas"; "ComCtrls.pas" -> "SysUtils.pas"; "ComCtrls.pas" -> "CommCtrl.pas"; "ComCtrls.pas" -> "Classes.pas"; "ComCtrls.pas" -> "Controls.pas"; "ComCtrls.pas" -> "Forms.pas"; "ComCtrls.pas" -> "Menus.pas"; "ComCtrls.pas" -> "Graphics.pas"; "ComCtrls.pas" -> "StdCtrls.pas"; "ComCtrls.pas" -> "RichEdit.pas"; "ComCtrls.pas" -> "ToolWin.pas"; "ComCtrls.pas" -> "ImgList.pas"; "ComCtrls.pas" -> "ExtCtrls.pas"; "ComCtrls.pas" -> "ListActns.pas"; "ComCtrls.pas" -> "ShlObj.pas"; "StdCtrls.pas" -> "Messages.pas"; "StdCtrls.pas" -> "Windows.pas"; "StdCtrls.pas" -> "SysUtils.pas"; "StdCtrls.pas" -> "Classes.pas"; "StdCtrls.pas" -> "Controls.pas"; "StdCtrls.pas" -> "Forms.pas"; "StdCtrls.pas" -> "Menus.pas"; "StdCtrls.pas" -> "Graphics.pas"; "StdCtrls.pas" -> "Consts.pas"; "StdCtrls.pas" -> "RTLConsts.pas"; "StdCtrls.pas" -> "ActnList.pas"; "StdCtrls.pas" -> "Themes.pas"; "RichEdit.pas" -> "Messages.pas"; "RichEdit.pas" -> "Windows.pas"; "ToolWin.pas" -> "Windows.pas"; "ToolWin.pas" -> "Messages.pas"; "ToolWin.pas" -> "Classes.pas"; "ToolWin.pas" -> "Controls.pas"; "ToolWin.pas" -> "Forms.pas"; "ToolWin.pas" -> "SysUtils.pas"; "ExtCtrls.pas" -> "Messages.pas"; "ExtCtrls.pas" -> "Windows.pas"; "ExtCtrls.pas" -> "SysUtils.pas"; "ExtCtrls.pas" -> "Classes.pas"; "ExtCtrls.pas" -> "Controls.pas"; "ExtCtrls.pas" -> "Forms.pas"; "ExtCtrls.pas" -> "Menus.pas"; "ExtCtrls.pas" -> "Graphics.pas"; "ExtCtrls.pas" -> "StdCtrls.pas"; "ExtCtrls.pas" -> "Messages.pas"; "ExtCtrls.pas" -> "Windows.pas"; "ExtCtrls.pas" -> "SysUtils.pas"; "ExtCtrls.pas" -> "Classes.pas"; "ExtCtrls.pas" -> "Controls.pas"; "ExtCtrls.pas" -> "Forms.pas"; "ExtCtrls.pas" -> "Menus.pas"; "ExtCtrls.pas" -> "Graphics.pas"; "ExtCtrls.pas" -> "StdCtrls.pas"; "ExtCtrls.pas" -> "Consts.pas"; "ExtCtrls.pas" -> "Dialogs.pas"; "ExtCtrls.pas" -> "Themes.pas"; "Dialogs.pas" -> "Windows.pas"; "Dialogs.pas" -> "Messages.pas"; "Dialogs.pas" -> "SysUtils.pas"; "Dialogs.pas" -> "CommDlg.pas"; "Dialogs.pas" -> "Printers.pas"; "Dialogs.pas" -> "Classes.pas"; "Dialogs.pas" -> "Graphics.pas"; "Dialogs.pas" -> "Controls.pas"; "Dialogs.pas" -> "Forms.pas"; "Dialogs.pas" -> "StdCtrls.pas"; "Dialogs.pas" -> "Windows.pas"; "Dialogs.pas" -> "Messages.pas"; "Dialogs.pas" -> "SysUtils.pas"; "Dialogs.pas" -> "CommDlg.pas"; "Dialogs.pas" -> "Printers.pas"; "Dialogs.pas" -> "Classes.pas"; "Dialogs.pas" -> "Graphics.pas"; "Dialogs.pas" -> "Controls.pas"; "Dialogs.pas" -> "Forms.pas"; "Dialogs.pas" -> "StdCtrls.pas"; "Dialogs.pas" -> "ExtCtrls.pas"; "Dialogs.pas" -> "Consts.pas"; "Dialogs.pas" -> "Dlgs.pas"; "Dialogs.pas" -> "Math.pas"; "CommDlg.pas" -> "Windows.pas"; "CommDlg.pas" -> "Messages.pas"; "CommDlg.pas" -> "ShlObj.pas"; "ShlObj.pas" -> "Windows.pas"; "ShlObj.pas" -> "ActiveX.pas"; "ShlObj.pas" -> "CommCtrl.pas"; "ShlObj.pas" -> "ShellAPI.pas"; "ShlObj.pas" -> "RegStr.pas"; "ShlObj.pas" -> "Messages.pas"; "ShlObj.pas" -> "WinInet.pas"; "ShlObj.pas" -> "UrlMon.pas"; "ShellAPI.pas" -> "Windows.pas"; "WinInet.pas" -> "Windows.pas"; "UrlMon.pas" -> "Windows.pas"; "UrlMon.pas" -> "ActiveX.pas"; "Printers.pas" -> "Windows.pas"; "Printers.pas" -> "WinSpool.pas"; "Printers.pas" -> "SysUtils.pas"; "Printers.pas" -> "Classes.pas"; "Printers.pas" -> "Graphics.pas"; "Printers.pas" -> "Forms.pas"; "Printers.pas" -> "Consts.pas"; "WinSpool.pas" -> "Windows.pas"; "ListActns.pas" -> "Classes.pas"; "ListActns.pas" -> "Controls.pas"; "ListActns.pas" -> "ActnList.pas"; "ListActns.pas" -> "ImgList.pas"; "ListActns.pas" -> "SysUtils.pas"; "ListActns.pas" -> "ComCtrls.pas"; "ListActns.pas" -> "Consts.pas"; "ListActns.pas" -> "RTLConsts.pas"; "Imm.pas" -> "Windows.pas"; "HelpIntfs.pas" -> "SysUtils.pas"; "HelpIntfs.pas" -> "Classes.pas"; "HelpIntfs.pas" -> "Contnrs.pas"; "HelpIntfs.pas" -> "Windows.pas"; "HelpIntfs.pas" -> "RTLConsts.pas"; "HelpIntfs.pas" -> "Contnrs.pas"; "HelpIntfs.pas" -> "RTLConsts.pas"; "FlatSB.pas" -> "Windows.pas"; "StdActns.pas" -> "SysUtils.pas"; "StdActns.pas" -> "Classes.pas"; "StdActns.pas" -> "ActnList.pas"; "StdActns.pas" -> "StdCtrls.pas"; "StdActns.pas" -> "Forms.pas"; "StdActns.pas" -> "Dialogs.pas"; "StdActns.pas" -> "Windows.pas"; "StdActns.pas" -> "Messages.pas"; "StdActns.pas" -> "Consts.pas"; "StdActns.pas" -> "Clipbrd.pas"; "StdActns.pas" -> "StrUtils.pas"; "StdActns.pas" -> "ShellAPI.pas"; "Clipbrd.pas" -> "Windows.pas"; "Clipbrd.pas" -> "Messages.pas"; "Clipbrd.pas" -> "Classes.pas"; "Clipbrd.pas" -> "Graphics.pas"; "Clipbrd.pas" -> "Windows.pas"; "Clipbrd.pas" -> "Messages.pas"; "Clipbrd.pas" -> "Classes.pas"; "Clipbrd.pas" -> "Graphics.pas"; "Clipbrd.pas" -> "SysUtils.pas"; "Clipbrd.pas" -> "Forms.pas"; "Clipbrd.pas" -> "Consts.pas"; "StrUtils.pas" -> "SysUtils.pas"; "StrUtils.pas" -> "Types.pas"; "StrUtils.pas" -> "Windows.pas"; "WinHelpViewer.pas" -> "Classes.pas"; "WinHelpViewer.pas" -> "HelpIntfs.pas"; "WinHelpViewer.pas" -> "SysUtils.pas"; "WinHelpViewer.pas" -> "Windows.pas"; "WinHelpViewer.pas" -> "HelpIntfs.pas"; "WinHelpViewer.pas" -> "SysUtils.pas"; "Unit1.pas" -> "Windows.pas"; "Unit1.pas" -> "Messages.pas"; "Unit1.pas" -> "SysUtils.pas"; "Unit1.pas" -> "Variants.pas"; "Unit1.pas" -> "Classes.pas"; "Unit1.pas" -> "Graphics.pas"; "Unit1.pas" -> "Controls.pas"; "Unit1.pas" -> "Forms.pas"; "Unit1.pas" -> "Dialogs.pas"; "Variants.pas" -> "Types.pas"; "Variants.pas" -> "SysUtils.pas"; "Variants.pas" -> "Windows.pas"; "Variants.pas" -> "SysConst.pas"; "Variants.pas" -> "VarUtils.pas"; "VarUtils.pas" -> "SysUtils.pas"; "VarUtils.pas" -> "Types.pas"; "VarUtils.pas" -> "SysConst.pas"; "VarUtils.pas" -> "Windows.pas"; } |
Re: Freware: Programm zur Ermittlung von Unit-Abhängigkeiten
Zitat:
So und nun tschuess... |
Re: Freware: Programm zur Ermittlung von Unit-Abhängigkeiten
Ein Vorschlag für die nächste Version:
Auch die selbst definierten globalen Suchpfade durchsuchen, bevor ein # gesetzt wird. ;) Aber sonst ist es echt klasse, das Programm! :) Grüße Faux |
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:27 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz