Reputation: 1
I am using automated build and installer project to create msi file in TFS 2008. There I need to create a big folder structure having thousands of file and having size of hundreds of MB on user machine when user installs using MSI file. Using TFS installer project, if I add individual file then my installer.vdproj becomes really big and unmaintainable.
So is there a good way to handle these bunch of files as single unit? I can think of compression mechanism for now, which has two parts: -
How to compress the files into a cab file(in MSBulid process may be)? It seems the makecab command only takes one file at a time?
How to modify installer project so that cab file is part of MSI and on user's machine the cab file is uncompressed to create the folder structure? can I have cab file as well as MSI (so that cab file is not part of MSI) ? rest of the dlls go into MSI.
Thanks
Upvotes: 0
Views: 1113
Reputation: 28100
Tools from the Windows Install SDK such as MSIFILER.EXE can be easily scripted to load a whole directory of files (for example) into the MSI's file store or the CAB.
In your case, you would want to configure the script to be run as a post-build event, so that first you build the setup project's MSI then the script modifies it.
You are correct that makecab.exe only takes one file at a time. You can use a CMD shell FOR-loop to add them one-by-one (e.g. FOR /F %%file IN ('dir /b /s') DO makecab %%file output.cab
). Personally, I prefer archive tools like 7-zip which are also scriptable from the command line.
There are several methods to add the files to the Windows Installer package (e.g. WiImport.vbs, MAKEMSI, or manually)...
..but maybe you don't want to do that. I think it might be better to just include the archive (zip, cab, whatever) and create a custom action in the setup project to extract it during the install.
Upvotes: 1