Difference between revisions of "Application Icon/es"

From Free Pascal wiki
Jump to navigationJump to search
(New page: {{Application Icon}} The application icon is usually displayed on the main window of the application, and it can be controlled by setting Application.Icon To change the icon of the execu...)
 
Line 1: Line 1:
 
{{Application Icon}}
 
{{Application Icon}}
  
The application icon is usually displayed on the main window of the application, and it can be controlled by setting Application.Icon
+
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.
  
To change the icon of the executable itself, it is necessary to employ a platform-dependent technique. In Lazarus 0.9.27 support for this was added to the Project Options dialog, but it currently doesn't work for Linux because it requires calling an application to set the icon.
+
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.
  
 
__TOC__
 
__TOC__
  
==IDE support for the Application Icon==
+
== Soporte IDE para el icono de la aplicación ==
  
Just set the icon in the Project Options dialog, accessible in the Project menu.
+
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.
  
Works for Windows and Mac OS X.
+
== Técnicas específicas de cada plataforma ==
 
 
==Platform-specific techniques==
 
  
 
===Windows===
 
===Windows===
  
1. Create a new file named "project.rc" (for example) containing:
+
1. Crear un nuevo fichero llamada "project.rc (por ejemplo) conteniendo:
  
 
   MAINICON ICON "editor.ico"  
 
   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
 +
  
 
2. Include in you project *.lpr file the following instruction:
 
2. Include in you project *.lpr file the following instruction:

Revision as of 11:39, 28 January 2010

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 llamada "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

  1. define RT_MANIFEST 24


2. Include in you project *.lpr file the following instruction:

  {$R project.rc} 

Work with version 0.9.24 and above.

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.