Merge module files into different locations

前端 未结 4 1408
北恋
北恋 2021-01-24 01:54

I\'d like to parse merge module files into two different locations. Is it possible?

    
          


        
相关标签:
4条回答
  • 2021-01-24 02:36

    It depends on what you mean by different locations. You can build a merge module with 4 files, each in their own component and directory. One could go to the CommonFilesFolder; another to the SystemFolder; another to...you get the idea. So it's potentially easy if you make each file its own component in its own directory. However you've got them all under TARGETDIR, so you're going the wrong direction. You just define the other directory and that other component and file and you might be done, unless there's more to the question than meets the eye.

    0 讨论(0)
  • 2021-01-24 02:37

    Merge modules are for installing common runtimes and genuinly shared files. Typically C and C++ runtimes and other, similar libraries that should be available in the latest version for all applications.

    Your files look like they are part of your application folder, with the exception of msvcr110.dll which you should remove and allow to be loaded from the system folder.

    If the remaining files have no per-machine registration (COM for example or COM Interop), you can duplicate them in several folders without interference, yes, but why not load them from a shared location inside your own application folder structure?

    • %ProgramFiles%\My Company\My Shared Runtimes
    • %ProgramFiles%\My Company\My Apps\My App 1\
    • %ProgramFiles%\My Company\My Apps\My App 2\

    These sample folders you "own" and you can deploy things here however you like. Not so for shared, system folders. You could make your own merge module for shared components between your applications into "My Shared Runtimes" and make your applications aware of the shared location "....\MySharedRuntimes\"

    0 讨论(0)
  • 2021-01-24 02:40

    There is a concept for that, it is called a retargetable merge module. I have avoided used it - the concept doesn't seem right to me. I have not tried to make one with Wix.

    I think you could combine a Wix include file (simple sample) with the new auto-generated component guids to deploy such duplicated files reliably by adding an Include statement where appropriate. You must not hard code the guids in this case, but let them be auto generated by the Wix compiler and linker.

    Also have a read of WixLibs (Wix library files): http://robmensching.com/blog/posts/2008/10/10/what-are-.wixlibs-and-why-would-you-use-them/

    Wix documentation; http://wixtoolset.org/documentation/manual/v3/overview/files.html

    0 讨论(0)
  • 2021-01-24 02:50

    I would suggest contacting me privately for a few 30-60 minute conversation on MSI, component rules, Merge Modules and file set theory. It's too much to write. In a nutshell I would advise more merge modules.

    0 讨论(0)
提交回复
热议问题