External Files

See also File Properties Editor

Large source files like media and archive files may be kept outside of the publication so their loading time is highly decreased. In fact, all files that were first compiled in the publication .exe must be unpacked in memory in order to be accessible by the runtime viewer. This unpacking step then requires time and especially for very large files. To reduce this loading time, you can leave your files unpacked: the runtime viewer in this case does not need to unpack them anymore, just to load them.

External files must be deployed with the publication .exe file, so this option is especially useful if you plan to distribute your publication on standard media supports like CDs, DVDs...

To set a file as external, select it in the File Manager and click on Properties. The "File Properties" window is displayed; turn on "Keep the selected file(s) external".
You are then prompted to enter the future path to the external file.

Path to the folder where the file will be available

When the runtime viewer needs to read the external file, it must first load it and thus it requires a path to the existing external file. Since these external files must be deployed with the publication .exe file, you will generally place them in the same folder as the publication .exe file or one of its subfolders. In this field, you have to enter the full path to the external file. Since you can't always guess the path of the latter on the end user's computer, HTML Executable provides you with a %PATH% variable. This variable denotes the path to the publication .exe file. Therefore you can now tell the runtime viewer the external file's relative path.

  • the external file will be in the same folder as the publication .exe file: just enter "%PATH%" without the quotes.
  • the external file will be in a subfolder (say "MyFolder1"): enter "%PATH%\MyFolder1" without the quotes.

The %PATH% variable will never include the final path backslash \ so do not forget to insert it for subfolders: %PATH%\Subfolder is correct while %PATH%Subfolder is wrong.
Note that you can also have several subfolders: "%PATH%\MyFolder1\MyFolder2\MyFolder3"

Example:

Take this set of files; [root] is the path to the root folder that contains the publication. It can have any values.

[root]\MYPUB.EXE is the publication .exe file built by HTML Executable.
It will require the five following external files:

  • [root]\docs\INFO1.PDF
  • [root]\docs\INFO2.PDF
  • [root]\MAP.PDF
  • [root]\video\codec1\VIDEO1.AVI
  • [root]\video\codec1\VIDEO2.AVI

You could imagine that [root] will be the root of a CD that you will distribute. You cannot guess the letter to the CD drive on the user computer, so you will need to use the %PATH% variable and enter the following values in the full path's field:

[root]\docs\INFO1.PDF->%PATH%\docs
[root]\docs\INFO2.PDF->%PATH%\docs
[root]\MAP.PDF->%PATH%
[root]\video\codec1\VIDEO1.AVI->%PATH%\video\codec1
[root]\video\codec1\VIDEO2.AVI->%PATH%\video\codec1

Notes:

  • Do not insert filenames in the full path field: %PATH%\docs is correct, %PATH%\docs\INFO1.PDF is wrong.
  • HTML Executable will automatically exclude external files from compilation, but they will remain in the file list.
  • Only media files should be kept external: for instance you should not use this feature for HTML pages.