Ian Branch 127 Posted August 18, 2022 (edited) Hi Team, D11.1.1. I am trying to create my own local .bpl with some odd components I have picked up over time. I have the .bpl building and installing OK. The components appear and work as desired. The issue I have is that the component .dcu files keep getting rebuilt every time I build an App with them in it. 😞 I thought that I could just relocate the relevant .pas files and the .dcu files in the local .bpl directory would get used but when I go to build the Apps Delphi tells me it can't find the files, presumably the .pas files because when I put the .pas files back with their .dcu counterparts all is fine. I have clearly missed some nuance in constructing my .bpl or something in the component files. Appreciate some guidance/education... Regards & TIA, Ian Edited August 18, 2022 by Ian Branch Share this post Link to post
Anders Melander 1784 Posted August 18, 2022 There are undoubtedly different opinions about this but I would say that you should completely separate design- and compile-time stuff. Build and install your design-time package and never mind where the dcu files for that are located. Just don't have them output to the same folder as the source. I would probably place them (via the package project options) in a sub-folder of the package source but you could just as well delete them once the package is installed because they are only needed to build the package. Reference the source files directly, or via the search path, in your project and have the dcu's output to the project dcu folder. Do not include the dcu output folder in your project search path. Share this post Link to post
Remy Lebeau 1398 Posted August 18, 2022 15 hours ago, Ian Branch said: The issue I have is that the component .dcu files keep getting rebuilt every time I build an App with them in it. 😞 Using a .bpl in an app, you should NOT have to use the .pas/.dcu files directly in the app. If your app is still building/requiring the .pas/.dcu files, then it is not correctly referencing the component unit(s) from the .bpl. 1 Share this post Link to post
SwiftExpat 65 Posted August 19, 2022 I found this today and I think it is what you are trying to achieve or at least might help you in the right direction. https://blog.grijjy.com/2021/04/05/build-speed/ Share this post Link to post
Anders Melander 1784 Posted August 19, 2022 40 minutes ago, SwiftExpat said: might help you in the right direction Nope. Have you read the section "How to handle source code changes"? O.M.<expletive>G. Share this post Link to post
SwiftExpat 65 Posted August 19, 2022 4 hours ago, Anders Melander said: Have you read the section I skimmed it only and thought it relevant to the original question, at least in theory. 4 hours ago, Anders Melander said: O.M.<expletive>G. Every time I have tried to save time with this, I end up with the infamous dcu built with version x dcu error, along with all the random errors in the IDE with things out of sync. I ended up purchasing the fastest clock CPU I could get and am happy enough. I just let it build the DCU's when necessary (TMS also does this so I figure if they did not come up with a more reliable solution, I would not either.) Share this post Link to post
David Heffernan 2345 Posted August 19, 2022 I still don't really understand why people use packages other than for IDE plugins and components. Share this post Link to post
Ian Branch 127 Posted August 19, 2022 1 minute ago, David Heffernan said: for IDE plugins and components. :-) Which is what I am trying to implement. Share this post Link to post
Bill Meyer 337 Posted August 19, 2022 7 hours ago, Anders Melander said: Have you read the section "How to handle source code changes"? O.M.<expletive>G. That about covers it. Share this post Link to post