PDA

View Full Version : How do I install a subset of the VS redistributables?



alexgo
11-24-2008, 01:38 AM
Hi, I know that I can easily include the VS redistributables in my installer by using the core prerequisites feature and the Redistributable Manager. However, we are trying to reduce our download size. The VS 2008 redistributables package is currently 1.8 MB, but the components we use in this package represent less than half this size.

MSDN talks about "merge modules" as a way to deploy subsets of this package. Is something like this doable with SetupBuilder 6?

I also tried to deploy the components we need as private assemblies (i.e. installed in the app folder). The problem is that we have a few subfolders with dll's, and I found that I need to copy the c runtime private assembly into every subfolder that has a dll. I hesitate to have such duplication.

Does anyone have any idea how this can be done cleanly?

Thanks,
Alex

linder
11-24-2008, 02:06 AM
Alex,

"Merge Modules" are a feature provided by the Microsoft Windows Installer MSI technology which enables the encapsulation of a component or set of related components and their resources, and the subsequent "merging" of this module with install packages which require the component or component-set.

Native Win32 .exe installers do not support MSM. However, the upcoming SetupBuilder 7 will have a feature to convert standard Windows Installer Merge Modules (.msm) into native Windows Installer runtime package for native Win32 SetupBuilder installer applications.

But IMO, converting the VS 2008 merge module into a deployable .MSI runtime would not reduce your installer size.

Friedrich

alexgo
11-24-2008, 04:25 PM
Hi Friedrich,

Thanks for the reply.

The reduction in installer size comes from the removal of VS redistributable modules that we don't need. For example, we don't need ATL and localized MFC. The compressed size of the VS redistributable modules we do need comes to about 800KB, as compared to the total size of the whole redistributable installer of 1.8 MB for VS 2008 RTM and 4MB for SP1.

I believe the recommendation in MSDN is to create a *new* merge module that contains only the redist modules you need. I look forward to SetupBuilder 7 where I can make use of merge modules.

In the meantime, is there anything I can do with SetupBuilder 6 to achieve the same effect? The workaround I've made so far is to install private assemblies of the modules we need (e.g. c/c++ runtime) in one folder, then because of the nature of private assemblies, I copy these to every subfolder that has c/c++-based dlls. If SetupBuilder has functionality to let me install shared assemblies in WinSXS, I'd rather use that than my ugly workaround.

Thanks,
Alex

linder
11-25-2008, 12:16 AM
Alex,

I don't think the recommendation in MSDN is to create a *new* merge module. You can use the "official" self-extracting VS redistributable package (.exe) or the Microsoft_VC90_CRT_x86.msm (and others) merge module(s). to deploy the runtimes. The MSM is for MSI based installations, the .exe can be used for non-MSI installations.

If you have Managed Assemblies that are shared with other applications then SetupBuilder allows you to install into the Global Assembly Cache (the central repository of all shared assemblies).

Does this help?

Friedrich

alexgo
11-25-2008, 01:26 AM
Hi Friedrich. Yes, that is very helpful. If there are existing merge modules that split up the VS redistributables into smaller parts, then we can use that. We can therefore just install the CRT msm for example, which wouldn't include ATL, etc. That is definitely the way to go when SetupBuilder 7 ships.

You haven't answered my questions about what I can do before SetupBuilder 7 ships. I need a working installer within a few weeks. Any ideas on what I can do with SetupBuilder 6 that achieves the same goal, without having to copy CRT private assemblies onto all folders that contain c/c++-based modules?

Alternatively, would you recommend shipping an installer built using the current SetupBuilder 7 Beta builds? I haven't tried it yet, so I don't know how reliable it is so far.

Thanks for the very prompt responses by the way. I'm very impressed with LinderSoft's customer service.

-Alex

linder
11-25-2008, 01:54 AM
Hi Alex,

Thank you for your kind words!

From the technical point of view, there is no difference between the official MSM and EXE VC redistributable packages. And I don't know whether the VS 2008 MSM is a configurable merge module that allows you to "disable" ATL distribution.

It is recommended to use the standard vcredist_x86.exe to deploy the (release version) of the Visual C++ library DLLs as shared assemblies. You only have to run vcredist_x86.exe on the target computer and this will install all Visual C++ libraries as shared assemblies (installed in the WinSxS folder). You can do this from SB6 and SB7.

By the way, ATL support in the redistributable package adds only 257 KB to the installer.

SetupBuilder 7 already works very stable and both SB6 and SB7 share the same source code tree. But SB7 is beta software and although we tested the program thoroughly before distributing, the possibility remains that an unknown bug could surface.

Friedrich

linder
11-25-2008, 02:06 AM
Alex,

By the way, there is a "Global Assembly Cache Demo.sb6" demo project that demonstrate the installation of an assembly into the GAC.

Friedrich