You can use two different methods for generating a distribution unit. These two methods apply to all three types of distribution units (setup, cabinet, and .zip).
You can create distribution units two different ways in the Microsoft development environment. You can:
The first method is to use the "in-place" packaging configuration of a Visual J++ project. You can specify in the property pages of the Visual J++ project that when the project is built, the outputs of the project should be placed in a setup, cabinet, or .zip file. You can only add one in-place packaging configuration to each Visual J++ project.
The second method is to create a distribution unit project. A distribution unit project can contain the outputs of many projects. You can add as many distribution unit projects to your overall project or solution as you like. You can add different types of distribution unit projects to your solution, as well.
Tip To see the properties for a distribution unit project, right-click the project and point to Properties. To see the properties of an in-place packaging configuration of a Visual J++ project, right-click the Visual J++ project, and point to Properties. On the Properties dialog box, choose the Output Format tab and click Advanced.
With the Microsoft development environment, you use "outputs" of a project to control the files placed in a distribution unit or to control the deployed files. The "outputs" of a project are the set of files that are required at run time to run the project. For example, the outputs of a Visual J++ applet project would be the HTML pages and Java class files. The outputs of a Visual J++ project can be set by the user on the Project Properties Deployment Property tab, where the user can specify either the file types (for example, *.class) or file names. So, if you are creating a cabinet file by adding one or more Visual J++ projects to a cabinet project, you can control which specific files end up in the cabinet project by modifying the file types or names on the Deployment Property tab for that Visual J++ project.
The in-place packaging configuration provides a simple method to quickly package the components you are building in a Visual J++ project. You can specify that when the project is built, the outputs of the project should be placed in a cabinet, Zip Archive, or setup distribution unit. You can specify this on the Visual J++ project's property pages. You cannot create more than one in-place distribution unit per project, however.
Specifically, to create an in-place packaging configuration, you simply select the project's properties, and on the Output Format property tab, specify the following.
You can also set the properties specific to the type of distribution unit you choose. You can reach the appropriate property pages by going to the Output Format page, and then clicking Advanced.
Once these properties are set, a distribution unit will be built each time the project is built. The distribution unit is also available as a deployable output of the project.
With the Microsoft development environment, you can package many projects into a single distribution unit, such as a cabinet, Zip, or setup executable. This way, you can distribute the outputs of several projects with a single file.
Distribution unit projects are development environment projects whose only purpose is to generate .cab, .zip, or setup (.exe) files. There are three types of packaging projects: cabinet, setup executable, and Zip Archive projects. These projects can be added to a solution (by selecting Add Project and in the Add Project dialog box, selecting Visual Studio, and then clicking the Distribution Units node).
Distribution unit projects can contain the following two kinds of information.
The project outputs contain references indicating:
For example, when you build "MyCabinetProject," any projects will be built, and the outputs of both projects will be put into a cabinet file generated by "MyCabinetProject."
You can also add files to a distribution unit that are included when you build the distribution unit. These files may or may not require building on their own.
For example, when you build "MyCabinetProject," a file such as "flowers.bmp" and "readme.txt" will be put into the cabinet file generated by "MyCabinetProject."