This page is suited for advanced users: it describes how you can use HTML Executable to create and compile publications (even silently) without navigating through the steps, but with command line switches (useful for daily and automated builds for instance).
Command line switches are specified with a forward slash and are sometimes followed by a value. For instance, `/C` is a valid switch. If you are specifying files or folders with spaces in them, you should enclose them in quotation marks. For example, `/U "C:\Program Files\My Folder" /C`.
You can pass parameters to HTML Executable when you launch it manually (for instance with the "Run" command from the Windows Start menu). For example, the following command line opens a project file: `HEBUILD.EXE "c:\mywork\myproject\myproject.hepx"`. HTML Executable will open and read the settings from the project. All you have to do is press the Compile button and the publication will be created.
HTML Executable supports several command line switches for project files:
•`/b`: Loads the project and shows the Output page.
•`/c`: Forces HTML Executable to compile the publication whose project file was specified.
•`/q`: Forces HTML Executable to exit after a successful compilation.
•`/s`: Forces HTML Executable to run silently (no progress bar).
You can combine these switches. For example, `HEBUILD.EXE "c:\mywork\myproject\myproject.hepx" /c/q/s` will force HTML Executable to compile the publication silently and then exit.
HTML Executable introduces a specific file type called "directive file". These files, given the extension .hed, are text-based and contain instructions for HTML Executable to create a publication. Directive files are useful for external applications which need to create publications or to create automatic building processes.
Directive files work like the old Windows configuration (.ini extension) files. They contain at least two sections: "General" and "Source".
The "General" section includes several parameters:
•Title (required): Defines the title for the application.
•NewProjectFile: Specifies the path to the project file that HTML Executable should create when compiling the application.
•SourceFolder: Indicates the path to the source folder.
•DefHomepage: Path to the default homepage of your publication.
•HTML5Engine (required): Specifies the HTML5 rendering engine. Values: 0: WebView2 (Microsoft Edge engine), 1: Latest CEF (Chromium), 2: CEF (Chromium V87) with old Flash support, 3: CEF V109 with MP4 support (requires MP4 patent licensing).
•Output (required): Defines the path to the executable file that HTML Executable will create.
•ProjectTemplate: If you would like to build your project starting from an existing project, then specify the full path to this project file.
•TOCXML: Full path to an external XML file with a Table of Contents template previously exported with HTML Executable.
•SubFolders: Defines whether HTML Executable should include sub-folders when adding folders and wildcards.
•KeepExistingProjectFiles: 0 or 1. Tells HTML Executable whether it should keep the existing files or reset the file list when adding files specified by the directive file.
•OutputLog: If you would like to save the compilation log to an HTML file, then specify the full path to this file.
•StartPrompt: Modify the prompt to be displayed at startup.
•EndPrompt: Modify the prompt to be displayed at end.
•WinTitle: Points to the title of the main window.
•MainDlgText: Sets the text for the main dialog box (SFX publications only).
•FileDesc: Sets the publication's file description in the Version Information resource.
•FileVerNum: Sets the publication's file version number in the Version Information resource.
•ProdVerNum: Sets the publication's product version number in the Version Information resource.
•MergeRuntime: If set to 1, then the runtime module will be merged into the publication .exe file.
•ResetGUID: If set to 1, then HTML Executable generates a new GUID for the publication.
•GlobalPassword: Optionally defines the global password for the publication.
•ExpirationDate: Optionally defines an expiration date. Must be in the following format: yyyy/mm/dd.
The "Source" section is an additional list of files that should be included. It can contain wildcards. It must be an ordered list: each entry begins with its number in the list and points to a path or a file. Please note that all files from the source folder are already automatically added. You do not need to specify them with the Source section.
Without using the command line, select the "File|Open Directive File" menu command. Otherwise, you need to specify the path to the directive file thanks to the command line. For example, the following command lines will execute a directive file: `HEBUILD.EXE "c:\mywork\myproject\file.hed"`. HTML Executable will open and read the settings from the directive file. All you have to do is press the Compile button and the package c:\mywork\myproject\output\myarc.exe will be created.
In addition, HTML Executable supports command line switches for directive files:
•`/c`: Forces HTML Executable to compile the publication according to the directive file specified previously.
•`/s`: Will hide HTML Executable when compiling (silent compilation).
•`/q`: Will force HTML Executable to exit after a successful compilation.
You can combine these switches. For example, `HEBUILD.EXE "c:\mywork\myproject\file.hed" /c/s/q` will lead HTML Executable to compile c:\mywork\myproject\output\myarc.exe silently and then exit.