ExeOutput for PHP is designed to generate the smallest possible application files, primarily through file compression.
Compressing Application EXE Files #
If you plan to distribute your application online, we recommend compressing it to minimize its size and download time. Several methods are available:
Compress the final
.EXEfile with UPX: UPX is a free executable packer available at upx.sourceforge.net. ExeOutput for PHP can automatically call UPX if you enable this option.Note
For legal reasons, UPX is not included with ExeOutput for PHP. You must download the program from upx.sourceforge.net and extract the archive into the
UPXsubfolder (e.g.,C:\Program Files\ExeOutput for PHP\UPX). Alternatively, use the Web Update utility (“Check for updates” option) to automatically install this add-on.Finally, if you enable Obsidium API support, UPX compression will be ignored.
Distribute the final
.EXEfile using an installer: You can use Paquet Builder to create an installer for your.EXEfile, optimized for online distribution.
Do Not Cache CEF Files Locally #
Chromium Embedded Framework (CEF) runtime files are large (approximately 50 MB), which typically results in several seconds of decompression during application startup. To eliminate this decompression step and speed up loading, the application will decompress and store CEF runtime files in a shared cache folder the first time it runs. If the runtime files already exist, they are used directly without re-decompression.
Learn more about the CEF engine.
If you prefer not to store CEF runtime files (e.g., to save disk space) on the user’s computer, you can enable the Do not cache CEF files locally option. However, this will cause the application to take longer to load on subsequent runs.
The cache folder is shared across all applications built with ExeOutput for PHP. By default, the cache folder path is:
C:\ProgramData\GDG Software\ExeOutput for PHP App Cache\CEFXXXX
where XXXX represents the version number of the Chromium Embedded Framework used in ExeOutput for PHP.
A different name will be used if you have configured a custom name for the storage folder (see below).
Leaving CEF Runtime Files Outside the EXE #
ExeOutput for PHP does not compile the essential Chromium Embedded Framework runtime files into your application’s .EXE file, saving approximately 40 MB in size. However, the application will not function if these files are missing, and you will encounter the error message: missing CEF3 files!
You can use this option only if you are certain to install these files yourself. For example, these files can be installed automatically using the exocefruntimeXXXX.exe installer available in the Redist subfolder of your ExeOutput for PHP installation. Alternatively, you can find them in the CEFRuntime subfolder of your ExeOutput for PHP installation. The files must be placed in the shared cache folder (see the section above).
Portable Applications #
ExeOutput for PHP can create portable versions of your applications.
- No installation is required; your application is stored on a removable device, such as a USB flash drive, allowing it to be used on multiple computers.
- User preferences and application settings are stored with the software (i.e., they are written to the USB drive). Thus, users retain their preferences even when running the application on different PCs.
- The Windows Registry is not used.
- No permanent modifications are made to any PC after the application is used.
Portable applications create one data file in addition to their .EXE file:
- The state file (user preferences, global variables, etc.) is named:
[name of the EXE].userpref
The state file is saved in the same folder as the .EXE file. Consequently, the storage device must not be read-only. If the application is unable to write the file in the same folder as its .EXE file, it will use the default location on the hard disk. The default location is a subfolder in the User Data directory, which you can customize.
If you do not create a portable version, you can specify a custom name for the storage folder where the application will store its settings. By default, it will be a subfolder in the User Data directory. You can obtain the full path at runtime from the global variable HEPubStorageLocation.
Explore Storage Folder
To easily access this folder for testing and debugging, you can click the Explore Storage Folder button on the Deployment page. This will open the storage folder for the last compiled application in Windows Explorer.
Warning
Avoid using expiration features for portable applications. Portable applications store their settings on the USB drive. Consequently, trial settings are also saved on the drive, allowing users to easily reset their trial period by removing the settings files.