Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. Maintenance - How to update ext app's dll dirs

Maintenance - How to update ext app's dll dirs

Scheduled Pinned Locked Moved Windows API
tutorialquestionannouncementhelpworkspace
4 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    piul
    wrote on last edited by
    #1

    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! :)

    L 1 Reply Last reply
    0
    • P piul

      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! :)

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      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.

      P 1 Reply Last reply
      0
      • L Luc Pattyn

        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.

        P Offline
        P Offline
        piul
        wrote on last edited by
        #3

        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?..

        A 1 Reply Last reply
        0
        • P piul

          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?..

          A Offline
          A Offline
          Albert Holguin
          wrote on last edited by
          #4

          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)?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups