Application Icon/es
│
Deutsch (de) │
English (en) │
español (es) │
日本語 (ja) │
português (pt) │
El icono de aplicación es el que se muestra en la ventana principal donde tenemos la aplicación (si creamos un acceso directo se obtiene por defecto el mismo icono con la flecha de acceso directo), y puede controlarse mediante los parámetros de Application.ico.
Para cambiar el icono del ejecutable es necesario utilizar una técnica que varía según la plataforma que estemos utilizando. En Lazarus 0.9.27 - 0.9.28.2 ... se ha añadido soporte para el mismo con el diálogo de Opciones de Proyecto, pero normalmente no funcion con Linux porque requiere llamar a una aplicación para establecer el icono.
Soporte IDE para el icono de la aplicación
Simplemente establece el icono a utilizar el el diálogo de opciones de proyecto, accesible el el menú proyecto. Funciona para Windows y Mac OS X.
Técnicas específicas de cada plataforma
Windows
1. Crear un nuevo fichero llamado "project.rc (por ejemplo) conteniendo:
MAINICON ICON "editor.ico"
Por ejemplo en la versión 0.9.28.2 el fichero para project1.rc viene así:
project1.rc
&#define RT_MANIFEST 24 &#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 //#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2 //#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "project1.manifest2 MAINICON ICON "proyect1.ico"
2. Incluye en el fichero de proyecto proyecto *.lpr la siguiente instrucción:
{$R project.rc}
Funciona con la versión 0.9.24 y siguientes.
Setting the Application Icon on Mac OS X
Under Mac OS X it is necessary to set an icon for the Application Bundle. This is done by adding a field to the Info.plist file, like this:
<key>CFBundleIconFile</key> <string>iconfile.icns</string>
Where iconfile.icns is located inside MyBundle.app/Contents/Resources
You can find instructions to create an icns file here
Linux
Under Linux application icons are located in special directories which are different on each Window Manager. The structure inside that directory, however, is standarized and described on the Icon Theme Specification
K Desktop Environment (KDE)
You can find the directory for application icons for use by all users and for each user using the command:
kde-config --path icon
This should print a list of colon-separated paths to stdout.
GNOME
You can find the directory for application icons for use by all users and for each user using the command:
gnome-config --datadir
This should print a path to stdout, inside which is found a directory called pixmaps that attends to the Icon Theme Specification.