dkounal 3 Posted December 18, 2020 I can not afford any more the "Can not load package" error message after installations that use DCC command line. I have a long library path with many components installed and an error like the following is presented again: warning MSB6002: The command-line for the "DCC" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "DCC" into multiple calls with fewer parameters per call. this mean that I should remove paths from library path in the IDE and try to compile again and return them back.... a bit annoying.... Also, I hate to go to every combobox selection to add a path. The attached program reads registry and allows you to enable or disable library paths, add paths to all configs or remove from all configs. When saving it produces an .ini file with all paths (even these that are not enabled) to be used in the next time it runs No responsibility for anything, use it at your own risk, keep a backup of 'CurrentUser\SOFTWARE\Embarcadero\BDS\xxx\Library\' before using it, source at request, have a nice day! LibManager.zip Share this post Link to post
Guest Posted December 18, 2020 (edited) My killer tip: (I always use games and software that insist on creating their subfolders in system folders such as: Programs Files (x86 or not), among other places, such as: 😄 \ User \ .... ( long tree of folders) Install the software normally MSWindows has a very useful tool for these moments, its name: MKLINK I create my "Link Symbolic" for folders with very long names or that are in a tree of many levels. MKLINK / d / j "name-to-new-link-symbolic" "c:\name-target-directory" Of course, firstly, I create one root-folder in any other place (or disk) to copy all in the directory that will be replaced. ex.: C:\Program Files\My Company\My Software\My Version\etc... ---> will stay: C:\Program Files\MyShortName first, I'll COPY all sub-folder and files --> C:\Program Files\My Company\*.* to D:\MKLinks\MyCompany now it's possible delete all in this folder ...\My Company\*.* - include it! CD C:\Program Files MKLINK /d /j "My Company" "D:\MKLinks\MyCompany" It's ready! in my PATH = %PATH%;"C:\Program Files\My Company" NOTE: use the absolute path, including the drive letter! Normally, the software try find your files and sub-folders in particular folder, then, is necessary usar the original name for first-root folder this way, I decrease the "bytes" of my "PATH" variable. for me it works, so it must work for others too! Of course, here is simple sample! Normally, I have my games on Drive"E", and, all folders with saves, config, etc... in my Drive"D". Then, I can delete, format, etc... my Drive"E", and my "saves-game" is in safety! For RAD Studio, I have same tatic: RAD Studio in C:\Emb\Studio\200 Component Suites in: C:\Emb\FR (to FastReport) etc... The secret is: DONT USE SYSTEM FOLDERS LIKE "Programs Files...." - when it's possible! Edited December 19, 2020 by Guest Share this post Link to post
dkounal 3 Posted December 19, 2020 (edited) That's a good solution too, for many other situations. Agreed and thank you. One day, the limit arrives to this solution, too. I have 3 to 5 letters dirs, but installation programs still change path in updates and add again the path they want..... Not all the components are used at the same time. I can not afford to install and de-install them, to go behind each update to see what happened. I needed something else. Now the limit is the IDE itself. Edited December 19, 2020 by dkounal Share this post Link to post
Guest Posted December 19, 2020 yeah, you know: the developers create long tree-folders because in they machine, all it's works! but... in another pc, is another history! thanks to Microsoft we have big folder-names in big folder-tree Share this post Link to post
dummzeuch 1505 Posted December 19, 2020 Another option is to use relative paths and have all libraries as a subdirectory of the project. As they belong into source control anyway, we are using svn:external for that. Works fine for libraries and less well for components since the IDE does not support it really and most component installers insist on using a global directory. 1 Share this post Link to post
David Heffernan 2345 Posted December 19, 2020 1 minute ago, dummzeuch said: Another option is to use relative paths and have all libraries as a subdirectory of the project. As they belong into source control anyway, we are using svn:external for that. Works fine for libraries and less well for components since the IDE does not support it really and most component installers insist on using a global directory. This seems like a much better approach to me. And as soon as you have to deal with different versions of a library, then aren't you forced this route? Share this post Link to post
dummzeuch 1505 Posted December 19, 2020 4 hours ago, David Heffernan said: This seems like a much better approach to me. And as soon as you have to deal with different versions of a library, then aren't you forced this route? As I wrote: This works find for libraries. Components are a problem, because they are installed globally. There are various solutions for that too, e.g. custom registry branches, but they are a pain in the lower back anyway. Share this post Link to post
Anders Melander 1783 Posted December 19, 2020 4 hours ago, David Heffernan said: This seems like a much better approach to me. And as soon as you have to deal with different versions of a library, then aren't you forced this route? Indeed. All paths relative and everything it source control. This also makes it trivial to build the project on a build server. At my current client the main product used to have dependencies on 5-6 different Git repositories and a bunch of 3rd party libraries that wasn't under source control. One person was responsible for figuring out what revision to checkout from the different repositories and what version of the 3rd party libraries to install and then build a version that could be sent to QA or deployed to the customers. And of course there were no relative paths. It was a nightmare. I moved everything into Git, made the dependent repositories submodules of the project repository, adding the source of the 3rd party libraries (also as submodules) and made all the paths relative. It took a few days to set up and now we have a fresh build after each commit. 26 minutes ago, dummzeuch said: Components are a problem, because they are installed globally. There are various solutions for that too, e.g. custom registry branches, but they are a pain in the lower back anyway. Wouldn't it be great if the project package configuration actually worked like most people expect it to (i.e. only load the packages specified in the project settings) and we could specify a (relative) path to the packages? I wouldn't even mind if I had to restart Delphi to switch from one project to the next. It would be better than the current situation. Share this post Link to post
David Heffernan 2345 Posted December 19, 2020 18 minutes ago, Anders Melander said: Wouldn't it be great if the project package configuration actually worked like most people expect it to (i.e. only load the packages specified in the project settings) and we could specify a (relative) path to the packages? I wouldn't even mind if I had to restart Delphi to switch from one project to the next. It would be better than the current situation. It's kinda lame that they still haven't addressed this. It's been an issue since Delphi 1. The tech exists. They can already dynamically load and unload packages. 1 Share this post Link to post
Uwe Raabe 2057 Posted December 19, 2020 That is exactly what I tried to address with Package Magician. Unfortunately some poorly programmed packages just refuse to unload correctly, which sabotages the task of Package Magician. 2 Share this post Link to post
Anders Melander 1783 Posted December 19, 2020 3 hours ago, Uwe Raabe said: That is exactly what I tried to address with Package Magician. Yes, exactly like that. Now you just need to convince Embarcadero to integrate it with the IDE. I haven't tried it yet as I wasn't too happy about adding one problem (an external dependency) to fix another one. I'll give it a try now anyway. 3 hours ago, Uwe Raabe said: Unfortunately some poorly programmed packages just refuse to unload correctly, which sabotages the task of Package Magician. I guess that should be fixed by the authors. Did you try to make that happen? Share this post Link to post
Guest Posted December 19, 2020 (edited) @Dave Nottage and @dummzeuch thanks your thanks Edited December 19, 2020 by Guest Share this post Link to post
dummzeuch 1505 Posted December 20, 2020 17 hours ago, Uwe Raabe said: That is exactly what I tried to address with Package Magician. Unfortunately some poorly programmed packages just refuse to unload correctly, which sabotages the task of Package Magician. Now that you mentioned it, I remember that I always wanted to try that tool as soon as I move to a more recent Delphi version... Share this post Link to post