Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)
I am guessing, that there must be something in initialization sections of units (SysUtils and Classes), which cause that some code is included, right? Can I somehow to avoid this grow of size (for example I need from Classes only TFPList)? Not in an easy way at the moment, I don't expect it to change anytime soon. The problem is probably the streaming system that the compiler can't easily determine if it is used runtime. This also has resourcestrings as errors, uses typeinfo etc etc. I also see interface related support probably because tcomponent also implements interfaces. What I can say is, that in initialization sections are touched: SysUtils: WidestringManager, Exceptions, FormatSettings Classes: TCriticalSection, TList, TThreadList, TComponent (IUnknown,IDispatch, RegisterInitComponentHandler() -> var InitHandlerList), Interface (var GlobalNameSpace: IReadWriteSync) So we see that classes like TComponent and also interfaces are touched, but they are used only in conjuction with initilizing some global variables like InitHandlerList, GlobalNameSpace. But these variables are never used in my library. Only again in finalization sections of above mentioned units. Does it means, that smart-linking can not remove this code due to usage of this global variables in finalization section (resp. initialization sections)? Probably it is too hard task for linker to determine which code is realy not needed ... WPO in this regard can not help? -Laco. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)
On 06/04/2021 09:33, LacaK via fpc-pascal wrote: > So we see that classes like TComponent and also interfaces are touched, > but they are used only in conjuction with initilizing some global > variables like InitHandlerList, GlobalNameSpace. > > But these variables are never used in my library. Only again in > finalization sections of above mentioned units. They are used in your library as far as the linker is concerned, because the init and finalisation sections are code like any other code. > Does it means, that smart-linking can not remove this code due to usage > of this global variables in finalization section (resp. initialization > sections)? Indeed. > Probably it is too hard task for linker to determine which code is realy > not needed ... WPO in this regard can not help? No. There is no way for WPO to know what side effects the initialisation of those variables could have. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)
May be, that important word is here "referenced" code. Once some code (procedure, class) is referenced then this code is linked / included. It does not play role if it is really required by program / library ... right? L. So we see that classes like TComponent and also interfaces are touched, but they are used only in conjuction with initilizing some global variables like InitHandlerList, GlobalNameSpace. But these variables are never used in my library. Only again in finalization sections of above mentioned units. They are used in your library as far as the linker is concerned, because the init and finalisation sections are code like any other code. Does it means, that smart-linking can not remove this code due to usage of this global variables in finalization section (resp. initialization sections)? Indeed. Probably it is too hard task for linker to determine which code is realy not needed ... WPO in this regard can not help? No. There is no way for WPO to know what side effects the initialisation of those variables could have. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Directory Tree
Does FPC include any tools to display a directory tree, similar to the way files and folders are normally displayed, but I want to make my own custom entries. Have the branches expand and collapse etc.. It doesn't have to be graphical, it can be text based. Or Am I going to be better off going graphical with Lazarus for something like this? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Directory Tree
On 2021-04-06 12:29, James Richters via fpc-pascal wrote: Does FPC include any tools to display a directory tree, similar to the way files and folders are normally displayed, but I want to make my own custom entries. Have the branches expand and collapse etc.. It doesn't have to be graphical, it can be text based. Or Am I going to be better off going graphical with Lazarus for something like this? Lazarus shall be a more appropriate choice for a graphical output. If talking about text output, FPC package FV (FreeVision) contains an object TDirListBox which allows traversing the directory tree, but it doesn't provide a generic feature of collapsing / expanding (you can expand just one directory). Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Minimal size of compiled library (DLL under Windows)
On 2021-04-06 12:22, LacaK via fpc-pascal wrote: May be, that important word is here "referenced" code. Once some code (procedure, class) is referenced then this code is linked / included. It does not play role if it is really required by program / library ... right? It is impossible for a linker to know whether code is "really required". It doesn't know what code does. It only knows whether or not it (theoretically) can get executed. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Directory Tree
Is there any documentation or a sample program for TDirListBox? I tried doing a search but only found a page that showed it's functions and procedures, but no real explanation on what they are supposed to do. James >FPC package FV (FreeVision) contains an object TDirListBox which allows >traversing the directory tree, but it doesn't provide a generic feature of >collapsing / expanding (you can expand just one directory). ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Directory Tree
As far as I understand, you are searching for a general tree component like TTreeView in Lazarus, but for FreeVision, running in text mode in console ? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Directory Tree
On 2021-04-06 14:43, James Richters wrote: Is there any documentation or a sample program for TDirListBox? I tried doing a search but only found a page that showed it's functions and procedures, but no real explanation on what they are supposed to do. The functionality is used within the text mode IDE (sources are in package IDE). In particular TChDirDialog (still part of FV, in particular) is invoked using File / ChDir and it contains TDirListBox as one of its subcomponents. The respective implementation is in the include file fpmfile.inc (search for PChDirDialog). It's rather simple (but it might be enhanced in a possible descendent, of course). Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] lazarus ide space/dot display
does anyone knows how avoid display dot point for space between 2 words? Thanks in advance ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] lazarus ide space/dot display
On 06/04/2021 18:26, jean-françois Jouvet via fpc-pascal wrote: does anyone knows how avoid display dot point for space between 2 words? Thanks in advance Menu: Tools > Options Page: Editor > General > Miscellaneous: Turn off "Show special characters" That will turn off tabs and spaces anywhere. There is no fine tuning. However instead of turning them off, you can change the color. Page: Editor > Display > Color: In the color tree: Text > Visualized special chars ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Directory Tree
On Tue, Apr 6, 2021 at 12:29 PM James Richters via fpc-pascal wrote: > Or Am I going to be better off going graphical with Lazarus for something > like this? TShellTreeView in Lazarus should do exactly what you want. It's not console though. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Directory Tree
I'm developing a new application where the user will need to select items from a tree structure.. I'm trying to figure out how to do the tree at all, and allow the user to select multiple files and/or folders. If the tree is going to be too complicated in text mode, then maybe I'll have to figure out Lazarus and go that way. I haven't even started the project yet, but this tree selection with the ability to expand or collapse branches is going to be a big part of it, so I'm trying to see what's available. James -Original Message- From: fpc-pascal On Behalf Of Jean SUZINEAU via fpc-pascal Sent: Tuesday, April 6, 2021 8:46 AM To: fpc-pascal@lists.freepascal.org Cc: Jean SUZINEAU Subject: Re: [fpc-pascal] Directory Tree As far as I understand, you are searching for a general tree component like TTreeView in Lazarus, but for FreeVision, running in text mode in console ? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal