It can be useful to export a project to a single Windows .EXE file. It can be a convenient way to distribute projects, especially since it can be run directly from a ZIP file without needing to extract it first. Some academic environments also require submitting a single .EXE file for student work. Construct has built-in support for exporting to a single executable file for Windows. To use this feature, follow these steps:
- Export your project and choose the Windows (WebView2) option
- In the Windows options dialog, make sure Bundle is set to Single file
- Proceed with the export as normal. When Construct produces the resulting ZIP file, extract the ZIP to a new empty folder on your computer.
- Now run the file named PackToSingleExecutable.exe. This is a helper tool that performs the final steps of embedding files to produce a single executable file. You may need to approve a Windows security prompt.
- In the subfolder for the exported platform (typically x64 for Intel-compatible exports) you should now find a single executable file with the name of your project. You can transfer just that file alone to another computer, and double-click to run it. You should see your full project running!
Note that when running a project as a single executable file, it may be slower to launch than other bundle modes, so this may not be a suitable option for large projects. However unlike some other technologies it does not need to first extract all the embedded files to a temporary directory - it can directly access the embedded files, which should still provide reasonably fast launch times.
To learn more about Windows exports, see the guide Exporting to Windows with the WebView2 wrapper.