How to create an EXE file to run the program. How to create an executable (.exe) file. What to include in the EXE

Content
1.How to compile EXE
1.1 Compilation technology
1.2 Related files
2.What needs to be included in the EXE

1.How to compile EXE
1.1 Compilation technology
Epigraph:
"Oh yes Pushkin, oh yes..."
A.S. Pushkin

The technology for compiling EXE in Visual FoxPro is quite simple. We will not be distracted by such extreme methods as entering commands like BUILD PROJECT, BUILD APP, BUILD EXE , but we will limit ourselves to the conveniences provided by the VFP graphical interface.
So, to create an EXE we need to click the button in the project manager "BUILD...". By selecting the option in the dialog box that opens Win32 executable/COM server (EXE) we press OK. ALL. ;-)
“How is everything?” - you ask - “How about what name to save the file under?”
I agree... It is necessary to indicate, otherwise everything will be in vain.
By the way, I think it would be useful to remind you that in order for the compilation process to be successful, you need to fill the project manager with files of your program, one of which must be as main (in the project manager the name of this file is in bold), i.e. . the file that will be executed first. By default, the first program file (*.prg) or form file (*.scx) included in the project is installed as the main program.
In general, everything is quite simple! Just..?
Now about the sad...

1.2 Related files
Epigraph:
"...and when you turn it on, it doesn't work!"
M. Zhvanetsky

All the hassles of the application compilation stage are already over, and you, proud of the awareness of your own superiority over mere mortals, rush by leaps and bounds to the customer, install your application, simultaneously describing to him (the customer) how cool everything will be for him now, and counting in your mind which screw you need to buy something to have leftover for beer, suddenly you come across the fact that your super-duper program doesn’t make any money. Sad. It's a shame. And most importantly, you won’t have a new hard drive or whatever you planned to buy from your fee...

The thing is that the .exe we compiled is not a self-contained executable file. This pseudo-executable requires support libraries (.dlls) to function properly. I won’t go into much detail about this, but will simply give the names of the files necessary for the application to work properly.
In principle, up to version 6 inclusive, you can use the standard one to transfer the application to the client machine. Setup Wizard, which independently prescribes everything, and in subsequent ones - InstallShield(or another installer).
All the files below are the minimum required set of files for different versions of VFP (based on materials):

VFP 8.0 msvcr70.dll, vfp8r.dll, vfp8rrus.dll, gdiplus.dll VFP 7.0 msvcr70.dll, vfp7r.dll, vfp7rrus.dll VFP 6.0 vfp6r.dll, vfp6renu.dll, vfp6rrus.dll VFP 5.0 vfpole50. dll, vfpodbc .dll, vfp500.dll, vfp5rus.dll, Foxpro.int
The above set of libraries must be placed in the program directory or in the Windows system directory. These directories are different for different versions of Windows:

Win9x, WinMe c:\Windows\SYSTEM WinNT,Win2000,WinXP c:\Windows\SYSTEM32

2.What needs to be included in the EXE
Epigraph:
"To include or not to include?"
drunk electrician

Everything stated below is the personal opinion of the author, which you can ignore. But when doing it your way, remember: banging your head into a concrete wall is much more painful than taking advantage of a break made before you.
By default, the finished .exe includes all the files necessary for the application to work - programs, forms, menus, libraries, classes, etc. except for database and table files (such files can be identified by the crossed out circle next to the file name in the project manager). All files included in the .exe will become unmodifiable (read-only) after compilation. It is clear that table files (*.dbf) should not be included since they are subject to constant operations of changing and adding data, but sometimes there are cases when it is necessary to hide some static data from the user, but provide access to it by the program itself. I can’t think of a better place than the “insides” of an exe-man.
It is also quite a common situation when you need to “find”, or temporarily, change a report file, or when you have a whole set of reports that are unique for each user. Well, really, imagine: ten operators and ten reports each, and all this in *.exe. The only solution in this situation is to exclude these reports from the final file and supply them with the application.
In any case, the decision about which files to exclude and which to leave is up to you.

That's it, the beer is over, we need to go to the grocery store.

Best regards, Vladislav Kulak

Another example in which it is also best to make an exe file is a photo presentation. High quality photos in 2000x3000 pixel format take up to 3.5 MB in size. When creating or slideshows using many, the file sizes will be simply huge. In addition, the slideshow output must match the resolution of the specific monitor. In such a situation, it is better to create the exe file correctly, i.e. set the Render Size parameter. It is active by default with a value of 800x600 pixels. It needs up to 1200x900 pixels.

Viewing photographic material measuring 2000x3000 pixels on a screen with a resolution of, for example, 1280x1024 pixels often leads to an increase in load on the computer processor, which can cause the picture to jerk when changing and moving. To reduce the load and file size, the best solution is to adjust the image inserted into the slide so that it is the same size, but without compression. When adjusting photos, you additionally need to increase the sharpness of the images within 20-25%.

To create a slide show in exe format, you can use the menu in the presentation program. Select the “Create” function, go to “Create exe show”. On the “Output Options” tab that appears, select “Output Quality” - “High”. Next, install or disable the menu in creating a slide show. In the adjacent “Show Selection” tab, you need to uncheck the “Enable introductory show on the tab” and “Splash screen when starting the show” checkboxes. After this, activate the “Create” command. The resulting exe file of a presentation or slide show can be burned to a CD or DVD. Any CD burning program is suitable for this.

Video on the topic

Today, many products have been created that allow you to create installation files, or simply compile all files into the “exe” format. To carry out this operation, you need to adhere to certain rules. To do this you will need the Smart Install Maker program. This is a free and closed source program. It provides users with a simple and powerful tool for creating highly efficient installations on 32-bit Microsoft Windows operating systems.

You will need

  • Personal Computer. Smart Install Maker program.

Instructions

Launch the program. You will see several windows, namely: file, project, service, help. Also, by default, the program opens a window in front of you in which you need to enter the necessary data and specify the files to compile the installation file.

First of all, specify the project name. It will be displayed when installing the "exe" file. It is also necessary to specify parameters such as version, company name, caption, compression type, and storage location. Enter your preferred values ​​in the appropriate controls.

Click on the "Files" tab. You need to select all the files that will be packaged in the installation package. However, it is worth considering that the time it takes to generate the resulting file directly depends on the amount of data added to it.

Go to the "Settings" tab. Here you are asked to set parameters such as “Program name”, “Uninstaller name”, “Title”. All these parameters are also set at the discretion of the user. There is also such an item as “Open a web page during installation.” That is, when installing the "exe" file, you can automatically set the opening of any web page.

Press the “Done” button. The process of compiling all files will go through. Once you have created the installation package, it will be located in the C:/setup directory. In order for the installation file to be saved in another location on the local disk, or even on a removable disk, when setting all the parameters in the “Save as” column, you need to specify the saving path.

Video on the topic

Sources:

  • Smart Install Maker

Executable program modules designed to run under operating systems of the Windows family are PE format files, usually having the exe extension. In order to create an exe-format program, you need to compile the source code in some programming language with a compiler capable of generating executable PE modules. For example, you can use the Microsoft Visual C++ 6.0 IDE and its included compiler to create exe programs.

You will need

  • - Microsoft Visual C++ 6.0.

Instructions

Start creating a new project in Microsoft Visual C++. Press Ctrl+N or select "File" in the main application menu, and then click on "New...".

Select the type of project to create and its location. In the "New" dialog list, specify the project type corresponding to the application being created. Select the "Win32 Console Application" item if you need to create a program whose output will be sent to a text console. Select the "Win32 Application" item to create an application project that has a graphical interface implemented using the Win API (this project can later be adapted to use WTL). Select "MFC AppWizard (exe)" to get a GUI application project built on the MFC framework. In the "Project name" field, enter the name of the project. In the Location field, select the directory in which all created files will be placed. Click "OK" button.

Create a project. After clicking "OK" in the previous dialog, a wizard will open prompting you to enter additional options. The number and type of wizard pages depends on the type of project. Follow the wizard's instructions to specify the required options. However, you can immediately click the "Finish" button in order to get a project with the default option values.

Add the necessary resources to the project, develop an interface. Use the Resources tab of the project window to include bitmaps, icons, menus, toolbars, dialogs, etc. in your application. Use the Conversation Resource Editor to create much of the user interface.

Write the program code. Complete the code generated by the project creation wizard by implementing logic, logic that serves the interface, logic for working with external data, abstraction levels for the interaction of application components, etc.

Build the application. Press F7 or select "Build" from the "Build" menu. Wait for the compilation and linking process to complete. Make sure there are no errors.

Find the created exe module. Select "Project" and "Settings..." from the menu or press Alt+F7. In the "Project Settings" dialog, switch to the "Link" tab. Find out the location of the executable module from the contents of the "Output file name" field.

Test the created program. Go to the directory with the exe module. Run it. Make sure the program functions as expected.

Video on the topic

As a rule, many novice users have questions related to creating their own installation packages, which, when unpacked, will create separate directories and copy all the packed information there.

You will need

  • - Internet;

Instructions

To do this, you need to install specialized software on your computer. The best option for beginners is a software package called Smart Install Maker. Download this software from the official developer website sminstall.com and install it on your computer. Such programs should always be installed on the system disk of a personal computer, that is, exactly where the operating system is located.

Once the program is installed, click on the shortcut that will be located on your computer desktop. You need to start a new project that will create your own installation files. Click on the "Project" tab and click on the "Create New" button. Next, you need to fill out all the fields provided by the program.

First of all, fill in all the text information that will be displayed when unpacking the installation file. You need to specify fields such as “Program name”, “Title”, “File name”, “Log file name” and much more. If you need users to also receive additional information about the program you packaged, you can specify the site to which the user will be redirected during installation. To do this, check the box next to “Open Internet page”.

Specify the paths to the files that need to be packaged in the installation archive. If the volume is too large, packaging will take a lot of time. Once everything is ready, click on the green button at the top of the program, and the process of packing all the files, as well as all the information that you filled in in this program, will begin. In the future, you can use the program to create other installation files, for example, your own program written in some programming language.

Video on the topic

Users often ask questions about how to create their own exe applications. As a rule, this requires learning special programming languages. However, the installation application can be created using standard software.

You will need

  • - Smart Install Maker program.

Instructions

You won't need to know the basics of programming to create your own installable application. At this point in time, a large variety of software has been developed that allows you to create such programs. One such utility is Smart Install Maker. This is a universal program that allows you to create a complete installation file in a few minutes. You can pack various files into it, compile from programming languages, and much more.

Download this software from the manufacturer's official website ru.sminstall.com. Install the program into the system local disk on your personal computer. Try to install in the directory where the installed operating system is located. Once the installation process is complete, a shortcut will appear on the desktop with which you can launch the program. Double-click the left mouse button to open the program window.

As a rule, this program is installed on . You can always change the language in the settings. Go to the “Information” tab. You need to fill in lines such as “Program Name”, “Company Name”, “Program Version” and many others. Try to write in clear language, without abbreviations. Next, click on the “Files” tab. Specify all the files that need to be compiled using the program. These can be standard photo files, or files that were created during the programming process.

Anyone who has written programs in Pascal has ever had the question:
How to transfer your creation to another person without a compiler weighing about 40 megabytes and without source code?

Of course, you can explain to the recipient how and in what way your project needs to be compiled, but not everyone will do this.
Because people may have more important things to do or those that bring them joy and pleasure, for example, VKontakte gatherings or games...

Therefore, all developers who release their program into the world create an executable file “.exe”, and do not throw away the source code.

How to make an executable file.exe from Pascal ABC.net code?

Open your code in "PascalABC.NET"

From the top menu of the window, select “Service” -> “Settings...”

In the settings window that opens, select the section "Compiler functions"

In the Compiler Options section:
Disable the checkbox that says: “Delete EXE file after execution”
Check the box “Generate output files to folder”
By clicking the button "Review…" select the location where the exe file will be created (this can be done on the desktop or in the program folder)
Don't forget to press the button "OK" to apply the new settings.

This completes the settings.

Now run your program and look at the location you specified by clicking on the button"Review…".

Today, many products have been created that allow you to create installation files, or simply compile all files into the “exe” format. To carry out this operation, you need to adhere to certain rules. To do this you will need the Smart Install Maker program. This is a free and closed source program. It provides users with a simple and powerful tool for creating highly efficient installations on 32-bit Microsoft Windows operating systems.

You will need

  • Personal Computer. Smart Install Maker program.

Instructions

  • Download the program from the official website ru.sminstall.com. Smart Install Maker has rich functionality for creating beautiful and reliable installation packages for Microsoft Windows. This program will help you create a complete installation file.
  • Install Smart Install Maker. Try to install the program in the "C" drive directory, since all subsequent compilations will be saved on the system drive.
  • Launch the program. You will see several windows, namely: file, project, settings, service, help. Also, by default, the program opens a window in front of you in which you need to enter the necessary data and specify the files to compile the installation file.
  • First of all, specify the project name. It will be displayed when installing the "exe" file. It is also necessary to specify parameters such as version, company name, caption, compression type, and storage location. Enter your preferred values ​​in the appropriate controls.
  • Click on the "Files" tab. You need to select all the files that will be packaged in the installation package. However, it is worth considering that the time it takes to generate the resulting file directly depends on the amount of data added to it.
  • Go to the "Settings" tab. Here you are asked to set parameters such as “Program name”, “Uninstaller name”, “Title”. All these parameters are also set at the discretion of the user. There is also such an item as “Open a web page during installation.” That is, when installing the "exe" file, you can automatically set the opening of any web page.
  • Press the “Done” button. The process of compiling all files will go through. Once you have created the installation package, it will be located in the C:/setup directory. In order for the installation file to be saved in another location on the local disk, or even on a removable disk, when setting all the parameters in the “Save as” column, you need to specify the saving path.
  • EXE is a format that no software can do without. It performs all processes of launching or installing programs. It can be either a full-fledged application or part of it.

    There are two options for creating an EXE file. The first is the use of programming environments, and the second is the use of special installers, with the help of which various “repacks” and packages are created that can be installed in one click. Below we will look at both options using examples.

    Method 1: Visual Studio Community

    Let's consider the process of creating a simple program based on a programming language "Visual C++" and compiling it in Visual Studio Community.

    1. Launch the application, go to the menu "File", then click on the item "Create", and then in the list that opens to "Project".
    2. A window opens "Creating a Project", in which you need to first click on the inscription "Templates", and then "Visual C++". Next, select "Win32 Console Application", set the name and location of the project. By default, it is saved in the Visual Studio Community working directory, in the system folder "My Documents", but you can choose a different directory if you wish. After completing the settings, click "OK".
    3. Starts "Win32 Application Configuration Wizard", in which we simply click "Further".
    4. In the next window we define the application parameters. In particular, we choose "Console application", and in the field "Extra options""Empty Project", while unchecking "Precompiled Header".
    5. A project is launched in which you need to add an area for writing code. To do this, in the tab "Solution Explorer" right-click on the inscription "Resource Files". A context menu appears, in which we sequentially click on "Add" And "Create element".
    6. In the window that opens "Add new element" select an item "C++ file". Next, set the name of the code file for the future application and its extension ".With". To change the storage folder, click on "Review".
    7. A browser opens, in which we specify the location and click on "Select folder".
    8. As a result, a tab appears with the title "Source.c", in which code text is typed and edited.
    9. Next, you need to copy the code text and paste it into the area shown in the image. Let's take the following as an example:
    10. #include
      #include

      int main(int argc, char* argv) (
      printf("Hello, World!");
      _getch();
      return 0;
      }

      Note: The code above is just an example. Instead, you must use your own code to create a program in Visual C++.

    11. To build the project, click on "Start Debugging" on the drop down menu "Debugging". You can just press a key "F5".
    12. After which a notification pops up warning that the current project is out of date. Here you need to click on "Yes".
    13. When compilation is complete, the application displays a console window that says "Hello, World!".
    14. We can view the created file in EXE format using Windows Explorer in the project folder.

    Method 2: Installers

    To automate the software installation process, so-called installers are becoming increasingly popular. With their help, software is created whose main task is to simplify the process of deploying software on a computer. Let's look at the process of creating an EXE file using Smart Install Maker as an example.

    1. We launch the program and in the tab "Information" edit the name of the future application. In field "Save as" Click on the folder icon to determine the location where the output file will be saved.
    2. Explorer opens, in which we select the desired location and click "Save".
    3. Go to the tab "Files", where you need to add files from which the package will later be assembled. This is done by clicking on the icon «+» at the bottom of the interface. It is also possible to add an entire directory by clicking on the icon that shows a folder with a plus sign.
    4. Next, a file selection window opens, where you need to click on the folder icon.
    5. In the browser that opens, we designate the desired application (in our case, this is "Torrent", you can have any other) and click on "Open".
    6. As a result, in the window "Add a note" The file is displayed indicating its location. Leave the remaining options as default and click "OK".
    7. The procedure for adding the source object to the application occurs and a corresponding entry appears in a special area of ​​the software.
    8. Next, click "Requirements" and a tab opens where you need to check the list of supported operating systems. Leave a check mark in the fields "Windows XP" and everything that comes below it. Leave the recommended values ​​in all other fields.
    9. Then open the tab "Dialogues" by clicking on the corresponding inscription on the left side of the interface. Here we leave everything as default. In order for the installation to take place in the background, you can check the box "Hidden installation".

    10. Once all the settings are complete, start the compilation by clicking on the down arrow icon.
    11. The specified process occurs and its current status is displayed in the window. Once compilation is complete, you can test the created package or close the window altogether by clicking the appropriate buttons.
    12. The compiled software can be found using Windows Explorer in the folder that was specified during setup.

    Thus, in this article we found out that an EXE file can be created using both specialized program development environments, such as Visual Studio Community, and special installers, for example, Smart Install Maker.