How to package a c++ program

        Have you ever had such an experience that you want to send your written C++ program to your friends to see your results, but after sending it to TA, most of them have been opened.

        This article will tell you how to package and install C++ programs, so without further ado, let’s start

1. Package software installation

        First, install the packaging software that comes with vs2022: Microsoft Visual Studio Installer Projects 2022.

        1. Open the project you wrote

        2. Click "Extension"

        3. Click "Manage Extensions"

        4. Search for "Microsoft Visual Studio Installer Projects 2022" in the search bar of the pop-up window.

        5. Click to download

         6. After downloading, click "Modify" -> then click "End Tasks"

Two, packing

        1. Right-click the solution -> Add -> New Project

         2. Create a new Setup Project

4. Continue

        1. Right-click "Solution" -> click "Open Folder in File Explorer" ->

         2. Copy the opened path

        Right-click Application Foluder->Add->file, copy the address in, select all

        4. Right-click Application Foluder->Add->Project Output

        5. Enter the address just copied, and then select all 

        6. Click OK

        7. Right click on the main output -> Create Shortcut to main output... Create a shortcut

        8. Put this shortcut in User's Desktop

5. Start packing

        1. Regenerate the Setup Project

         

        2. Click Install

6. Install on another computer

        Copy the two files in the picture to another folder and send them to others, and then click setup.exe

 

 

Guess you like

Origin blog.csdn.net/hhshbdsj/article/details/126343239