Maintenance - How to update ext app's dll dirs
-
I am not sure if this question should go here... I have an application that makes use of several libraries (dll and lib) of another application that will most probably change in the future. The problem I´m facing is how to update my application so it looks for the new libraries in the new directories. For example: currently when building the solution (MSVS2005) the directories are specified in the properties
Additional dependencies: \ExtApp_1_0\LibDir
,Additional Include Directories: \ExtApp_1_0\Include
. How to change this to\ExtApp_2_0\LibDir
and\ExtApp_2_0\Include
? The solutions I can think of are: 1. Distribute the code (it´ll be distributed anyway) with a recompile manual, explaining how to change dirs manually and rebuild. - Not so nice. 2. Create a .bat file that asks the new paths and performs the rebuild. - Tried it, found it too complicated. 3. Retrieve the libraries at runtime. The setup program asks for the dirs. Reinstall when a new version comes up - I supposse possible with the dlls? how? I´m not asking for a solution, just some ideas. Anything helps! :) -
I am not sure if this question should go here... I have an application that makes use of several libraries (dll and lib) of another application that will most probably change in the future. The problem I´m facing is how to update my application so it looks for the new libraries in the new directories. For example: currently when building the solution (MSVS2005) the directories are specified in the properties
Additional dependencies: \ExtApp_1_0\LibDir
,Additional Include Directories: \ExtApp_1_0\Include
. How to change this to\ExtApp_2_0\LibDir
and\ExtApp_2_0\Include
? The solutions I can think of are: 1. Distribute the code (it´ll be distributed anyway) with a recompile manual, explaining how to change dirs manually and rebuild. - Not so nice. 2. Create a .bat file that asks the new paths and performs the rebuild. - Tried it, found it too complicated. 3. Retrieve the libraries at runtime. The setup program asks for the dirs. Reinstall when a new version comes up - I supposse possible with the dlls? how? I´m not asking for a solution, just some ideas. Anything helps! :)piul wrote:
just some ideas
I avoid situations where one app relies on parts of some other app like that. How can you be sure the combination is what you expect it to be? How can you be sure you have tested the combination already? I much prefer to distribute my apps and all their dependencies in one go; in .NET that typically means the DLLs your app needs are all part of the same distribution and end up in a single location, independent of what the customers do to their other apps. If you can't do all that, you probably need to look for the required DLLs in some known places (either a list or a limited disk scan, not nice), then load them dynamically. I wouldn't trust such scheme for the long term. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
piul wrote:
just some ideas
I avoid situations where one app relies on parts of some other app like that. How can you be sure the combination is what you expect it to be? How can you be sure you have tested the combination already? I much prefer to distribute my apps and all their dependencies in one go; in .NET that typically means the DLLs your app needs are all part of the same distribution and end up in a single location, independent of what the customers do to their other apps. If you can't do all that, you probably need to look for the required DLLs in some known places (either a list or a limited disk scan, not nice), then load them dynamically. I wouldn't trust such scheme for the long term. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
Thanks for the reply. The problem is the other application is a propietary piece of software (some mathematical calculation), and therefore I cannot distribute it along with my application. The user will be required to copy all the dlls (the license of which he's got separately) to the application's dir. Or maybe the installation program will do that, I'm not sure yet. Could a solution be, an installer that asks for the location of the dlls and then copies them? So when the new version comes you would only need to reinstall?..
-
Thanks for the reply. The problem is the other application is a propietary piece of software (some mathematical calculation), and therefore I cannot distribute it along with my application. The user will be required to copy all the dlls (the license of which he's got separately) to the application's dir. Or maybe the installation program will do that, I'm not sure yet. Could a solution be, an installer that asks for the location of the dlls and then copies them? So when the new version comes you would only need to reinstall?..
how about having the location of the dll be user configurable via (choose one): 1) environment variable (such as path or something similar) 2) text-based configuration file for your application 3) registry entry all of these methods would allow the user to change the configuration without having to reinstall, just need to make sure you tell the user about how to use this in a manual or readme file p.s. making a local copy of someone else's dll is considered bad practice, why not just use it from the location (maybe you have your reasons, but something to think about)?