Tutorial 14: Making A Setup or Deployment Package of a Microsoft Windows Program in C++ By Russell Pitts
Bring up the project you are working on as a Microsoft Windows Form Application which you wish to distribute. Here for the sake of simplicity I will use a simple project that has a button on it and a label called “HelloWorld”. If the button is clicked a message appears in the label that says hello. It looks as follows:
On the button is the simple code:
Rebuild the Project so the project and its files are saved. Now go to File>New Project>Other Project types>Setup and Deployment>Setup Wizard as shown in the following figure:
Under Solution, select “Add to Solution” and then enter OK. In the setup Wizard, 1 of 5, that follows enter Next...
In the next window, 2 of 5, go with the default and select Next:
In the next window, 3 of 5, select Primary output from HelloWorld and Resource Satellite DLL's from HelloWorld and select Finish.
Open the Solution explorer for the project and right click on Setup1 and select build as is shown in the following figure:
Navigate in Windows Explorer to the debug folder of Setup1 of your HelloWorld Project as illustrated in the following figure and copy the entire debug folder
Then paste the debug folder someplace else and change the name of the debug folder to Setup. These two files Setup1.msi and setup.exe in this folder are all you need to install the package.
Bring up the project you are working on as a Microsoft Windows Form Application which you wish to distribute. Here for the sake of simplicity I will use a simple project that has a button on it and a label called “HelloWorld”. If the button is clicked a message appears in the label that says hello. It looks as follows:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
label1->Text="Hello!";
}
|
0 comments:
Post a Comment