Function | Package: windows | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## set-exe-icons

Arguments: existing-exe new-exe icon-name icon-file

This function is useful for replacing the application icon inside an executable file for delivery. It copies the executable at existing-exe to the path specified by new-exe, replacing the embedded icon resource whose name is icon-name with the icon from icon-file.

The newer function set-exe-icons-nt is preferable to this one if you are on the NT branch of Windows (which includes win2000 and XP).

existing-exe should be a pathname or path namestring that specifies the .exe executable file whose application icon is to be replaced.

new-exe should be a pathname or path namestring at which to create a copy of existing-exe with the replacement icon. (existing-exe is not modified.)

icon-name should be the name of the icon resource to be replaced. In an Allegro CL executable file (either a development lisp or a generated application), the application icon is named "ACLICON". This is the icon that will appear in the Windows taskbar and alt-tab window when the application is running, and in the File Explorer and Start Menu to represent the .exe file.

icon-file should be a pathname or path namestring that specifies a .ico icon file. The file should contain either one or two images, where each one is 4 bits-per-pixel and either 32 by 32 or 16 by 16 pixels large. The newer function set-exe-icons-nt does not have this restriction, though it works only on the NT branch of Windows. That function is also more robust and is therefore preferable when running NT.

The following example would copy myapp.exe to temp.exe, replacing the Franz icon in temp.exe with the custom icon defined in myicon.ico.

    (win:set-exe-icons "c:/foo/myapp.exe" "c:/foo/temp.exe"
                       "ACLICON" "c:/foo/myicon.ico")

See the description of the icon-file keyword argument to generate-application, described in delivery.htm for more information on setting the icon for an application on Windows. Either this function of the related win:set-exe-icons-nt function (as appropriate for the operating system) will be called. See also win:set-application-icon.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version