This section explains various ways you can customize the appearance and behavior of published EXEs.
You can customize the icon of your published EXE and the icon associated with the Vizard graphics window by specifying the viz.window.icon option in your script. Simply place your icon file in your script directory and add the following code (replacing 'icon.ico' with the name of your icon file) :
When the published EXE is launched, it needs to unpack your script to a temporary directory before executing it. While the EXE is being unpacked, it will display a small popup box with the message "Vizard launching, please wait...". The popup box will also have an entry in the Windows taskbar with the title "Vizard launching". You can customize the popup message and title using the viz.publish.load_message and viz.publish.load_title options. The following code shows how to set a custom loading message for your published EXE:
If you do not want the popup box to be displayed in the taskbar, then set the viz.publish.load_title option to an empty string. If you want to prevent the popup box from being displayed, you can set the viz.publish.load_message option to an empty string.
As mentioned above, published EXEs are unpacked to a temporary directory before executing the embedded script. After the script executes, the published EXE will delete the temporary directory. If your published EXE contains large files, then they will be unpacked and deleted every time the EXE is executed, increasing the startup time of your EXE. You can prevent this from happening by creating persistent EXEs.
A persistent published EXE will unpack all the script files to a fixed directory and will not delete them after finishing. Subsequent executions of your published EXE will use these existing files, instead of unpacking them, which can greatly speed up the startup time of your EXE. If a new version of your published EXE is created and executed, it will automatically delete the files from the older version and unpack the newer files.
To enable a persistent published EXE you must specify a few options. First, you must enable publish persistence by setting the viz.publish.persistent option to 1. Since persistent EXEs unpack the files to a fixed directory, you must specify the name of this directory through the viz.publish.product and viz.publish.company options. The following code shows how to setup a persistent published EXE:
When unpacking a persistent EXE, the default directory for unpacking will be <temp>/<company>/<product>. Creating a published EXE using the above code will cause your script files to be unpacked to the directory %TEMP%/MyCompany/MyApp (where %TEMP% is the location of the users temp directory). You can change the persistent folder using the viz.publish.persist_folder option. The value of this option must begin with either <temp> or <appdata>. The <temp> tag will be replaced with the users temp folder and <appdata> will be replaced by the users local application data folder.
For example, if you wanted the EXE to unpack into the product name folder in the application data directory, you would use the following option value: