How to: build a cab-file with TWO exe files?

  • Thread starter Thread starter Boris Nienke
  • Start date Start date
B

Boris Nienke

Hi,

i have two small projects in my project-map.
But when i build a CAB-File it's only one Cab-File for each project.

But i like to have ONE Cab-File for ALL projects in this map. The
Exe-Files should be installed to the same directory etc.

i have looked at the INF-File but don't know how to add a second exe
file.

so how to?

thanks

Boris
 
The only way to do this is by manually editing the INF file from one of the
two projects to include the additional files. The steps required are:-
Add a uniquely numbered entry into the SourceDisksNames section to identify
the output folder of the second project .e.g.
[SourceDisksNames]
1=,"Common1",,"C:\Documents and Settings\Peter\My Documents\Visual Studio
Projects\Project1\obj\Release\"
2=,"Common2",,"C:\Documents and Settings\Peter\My Documents\Visual Studio
Projects\Project1\"
3=,"Common3",,"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\"
22=,"Project2",,"C:\Documents and Settings\Peter\My Documents\Visual Studio
Projects\Project2\obj\Release\"

(22 is the next available free identifier in this inf file)

Then add your second exe to the SourceDisksFiles section
[SourceDisksFiles]
Project1.exe=1
Project2.exe=22

(here the identifier must match the id of the folder where the source file
is location - 22)

Next add the second exe to the Files.Common section
[Files.Common]
Project1.exe,,,0
Project2.exe,,,0

Finally if you want start-menu shortcuts to both executables add an extra
entry in the Shortcuts section
[Shortcuts]
Project1,0,Project1.exe,%CE11%
Project2,0,Project2.exe,%CE11%


Finally save the INF file and rebuild the cab files with the BuildCab.bat
file located in the same folder (Project1/obj/Release/)
If your second project has other content files or dlls you will need to use
the same approach to add these in too.

Peter
 
Thanks a lot! It worked!

wow... this is way complicated... strange... so many tools and then do
everything by yourself ;)

Boris
 
wow... this is way complicated... strange... so many tools and then do
everything by yourself ;)

You gotta leave your Delphi habits at the door <g>

Cheers,
Lars
 
Back
Top