Instalación
Notas generales para la instalación de la versión 4.0 de KVIrc
Requisitos mínimos
Para compilar KVIrc 4.0 necesitas al menos lo siguiente:
- Qt GUI Toolkit 4.6 - http://qt-project.org
- CMake 2.6.4 - http://www.cmake.org
- C++ compiler - http://gcc.gnu.org
- Pthread
- Dynamic Linker
- KDE (Opcional) - http://www.kde.org
- GNU gettext (Opcional) - http://www.gnu.org/software/gettext
- OpenSSL (Opcional) - http://www.openssl.org
- Perl (Opcional) - http://www.perl.com
- Sound System
Qt GUI Toolkit
Si tu distro tiene KDE instalado entonces Qt ya está instalado. Si no, simplemente instala qt4 desde los repositorios de tu distro.
Antes de ejecutar Cmake asegúrate de que la variable de entorno $QTDIR apunta al lugar correcto. Esto ayudará buscando la versión correcta de Qt.
Puedes configurarlo con el comando:
# export QTDIR="tu directorio qt"
En mi sistema, qt está instalado en /usr/lib64/qt así que ejecuto:
# export QTDIR=/usr/lib64/qt
Para comprobar si tienes la versión correcta de Qt, simplemente ejecuta:
# qmake -v
En mi sistema la salida es:
QMake version 2.01a
Using Qt version 4.7.2 in /usr/lib64/qt/lib
Si tienes varias versiones de Qt4 instaladas en tu sistema y quieres usar una versión específica, exportando QTDIR no será suficiente. Ya que el módulo CMake que busca Qt4 usa qmake en sí para determinar el directorio de la librería Qt4, puedes configurar tu PATH para que CMake use la versión de qmake que prefieras:
#PATH=/opt/qt4.7/bin/:$PATH cmake ..
Ten en cuenta que compilar con soporte de KDE4 forzará a kvirc a vincularse contra la versión de Qt4 que KDE4 está usando, y esto podría dar problemas vinculando. Desactivar el soporte de KDE4 es la única solución conocida ahora mismo.
Ten en cuenta también que tendrás que anular las librerías Qt usadas cuando ejecutes KVIrc:
#LD_LIBRARY_PATH=/opt/qt4.7/lib/ kvirc4
CMake
Esto normalmente ya está incluido en las distros más actuales.
Para comprobar qué Cmake tienes, simplemente ejecuta
# cmake --version
En mi sistema la salida es:
cmake version 2.8.3
C++ Compiler
Necesitas un compilador C++ decente. Normalmente en linux es gcc de las GNU tools. Es preferible usar gcc 4.3.
Para comprobar tu versión de gcc, ejecuta:
# gcc -v
En mi sistema la salida es:
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/4.5.2/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../gcc-4.5.2/configure --prefix=/usr --libdir=/usr/lib64
--mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap
--enable-languages=ada,c,c++,fortran,java,objc,lto --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-libssp --enable-lto
--with-python-dir=/lib64/python2.6/site-packages --disable-libunwind-exceptions
--enable-__cxa_atexit --with-gnu-ld --verbose --disable-multilib
--target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
gcc version 4.5.2 (GCC)
Pthread Implementation
Esto está normalmente incluido en tu distro y probablemente ya esté instalado. La librería se llama libpthread.so.
Puedes buscarla con el comando "find":
# find / -name libpthread.so
En mi sistema la salida es:
# /usr/lib64/libpthread.so
Si no lo tienes (CMake te lo dirá) puedes descargarlo desde tu mirror GNU favorito.
El script configure también fallará si la librería está oculta en cualquier lugar de tu sistema (por ejemplo, no está en /lib, /usr/lib o /usr/local/lib): probablemente debas morverla.
Dynamic Linker Interface
Necesitas la librería de interfaz de vinculador dinámico libdl.so.
Esto normalmente ya está instalado en tu sistema, así que no te preocupes hasta que configure te lo pida. Algunos sistemas tienen la interfaz incorporada en libc.
KDE (Opcional)
Si quieres compilar el soporte de integración de KDE necesitas obviamente KDE.
El paquete kdelibs debería bastar.
Antes de ejecutar Cmake asegúrate de que la variable $KDEDIR apunta al lugar correcto.
Puedes configurarlo con el comando:
# export KDEDIR="tu directorio kde"
En mi caso KDE está instalado en /usr así que uso:
# export KDEDIR=/usr
GNU gettext (Opcional)
Si quieres que las traducciones a idiomas que no sean el inglés funcionen necesitas el paquete GNU gettext. En particular gettext usa el programa msgfmt.
Esto normalmente ya está incluido en tu distro y probablemente ya estará instalado. Puedes comprobarlo con:
# msgfmt --version
KVIrc no se quejará si el comando anterior falta: simplemente se saltará la creación de los archivos de traducción.
Si el comando anterior falla necesitas instalar el paquete gettext si quieres un idioma que no sea el inglés.
OpenSSL (Opcional)
Si quieres que el soporte de SSL sea compilado necesitas la librería OpenSSL y las cabeceras (libssl.so y openssl/ssl.h).
Perl (Opcional)
Si quieres generar la documentación on-line también necesitas Perl: cualquier versión funcionará (supongo).
Si quieres soporte que el scripting en Perl sea compilado necesitas una instalación de Perl funcional. Tu libperl.so DEBE estar compilado con la opción MULTIPLICITY..
Puedes comprobarlo con perl -V
La manera en que el software externo puede embeber Perl ha cambiado entre Perl 5.8 y 5.10; KVIrc debería funcionar correctamente con Perl >= 5.004, pero 5.10 es lo más recomendable, ya que actualizaciones futuras pueden romper la compatibilidad.
Sound System (Opcional)
Si quieres que DCC VOICE soporte el códec gsm, necesitas una copia reciente de libgsm.
Esto no es estrictamente requerido en el momento de la compilación ya que KVIrc buscará la librería en tiempo de ejecución, y sólo si se ha pedido un DCC VOICE con el códec gsm.
Puedes buscar libgsm usando el comando 'find'.:
# find / -name libgsm*
En mi sistema la salida es:
# /usr/lib64/libgsm.so
Esta librería está incluída en la mayoría de las distribuciones. Algunas distribuciones vienen solo con la versión estática de la librería "libgsm.a": si el find previo devolvió algo similar a "/usr/lib/libgsm.a" , debes crear manualmente el archivo compartido ejecutando:
# cd /usr/lib64
# ld --whole-archive -shared -o libgsm.so.1 libgsm.a
# ln -s libgsm.so.1 libgsm.so
# ldconfig
Si no la tienes instalada, deberías echarle un vistazo al CD de tu distribución, o descargarla de Internet.
Si quieres que el plugin /snd reproduzca varios formatos de audio necesitas o un sistema de sonido como phonon, un demonio como osd ejecutándose o una librería audiofile razonablemente reciente. Si esto, KVIrc sólo será capaz de reproducir archivos *.au.
Configurando el entorno
Como KVIrc 4.0 usa CMake como sistema de compilación, tenemos que usarlo para crear los Makefile's para el programa make.
Para hacerlo, recomendamos la compilación "fuera-de-las-fuentes": compilar todos los archivos sin ensuciar las fuentes.
# mkdir release
# cd release
# cmake [tus opciones] ..
De esta manera acabas de crear un entorno fuera de las fuentes útil para tener un directorio de trabajo limpio.
Ten en cuenta que los puntos del final son requeridos o Cmake NO creará el entorno adecuado.
Las reglas CMake soportan ciertas opciones. Si no las especificas, CMake intentará hacer un entorno bueno para ti :)
Para usar esas opciones, tienes que pasarles un valor booleano o una cadena.
Por ejemplo, para instalar en /usr en lugar de en /usr/local y desactivar el soporte de Phonon, el comando sería:
# cmake -DCMAKE_INSTALL_PREFIX=/usr -DWANT_PHONON=0 ..
Aquí hay una lista con explicaciones:
- -DWANT_DEBUG (default: OFF)
Compila el ejecutable con símbolos de depuración.
Útil para reportar bugs. - -DWANT_STRIP (default: OFF)
Available only if debug is disabled, this flag disables objects stripping before installation.
(Object stripping discards symbols from object files, lowering their size on disk, at the expense of more complicated or rather impossible debugging.) - -DWANT_VERBOSE(default: OFF)
Genera una salida verbosa al compilar. - -DCMAKE_INSTALL_PREFIX=PATH (default: a system-dependant directory)
Instalará todo bajo el directorio /path - -DLIB_SUFFIX=SUFFIX (default: empty)
Instalará libkvilib y los módulos de kvirc en ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}. Por defecto es un sufijo vacío. Usado mayormente para distros de 64 bits (-DLIB_SUFFIX=64). - -DMANDIR=DIRECTORY (default: $CMAKE_INSTALL_PREFIX/share/man)
This will install man pages to DIRECTORY. - -DCOEXISTENCE (default: OFF)
If enabled, appends version information to kvirc and libkvilib, so that different KVIrc versions can cohexist in the same system. - -DUSE_ENV_FLAGS (default: OFF)
When enabled, KVIrc install rules won't try to figure out and set CMAKE_C(XX)_FLAGS. Instead, it will let CMake use the ones from environment variables.
Activating this flag will override the value of -DWANT_DEBUG. - -DCMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT (default: OFF, not cached
This will re-initialize the installation path to a good default.
Following compilations should use the correct path value cached by CMake.
This flag is useful to solve OS X install problems. - -DWANT_UNIVERSAL_BINARY (default: OFF)
Enables or disables the compilation of universal binaries for the OS X platform. - -DWANT_PHONON (default: ON)
Enables or disables Phonon audio backend support. - -DWANT_OSS (default: ON)
Enables or disables OpenSoundSystem audio backend support.
If disabled, Audiofile support will be disabled as well - -DWANT_AUDIOFILE (default: ON)
Enables or disables Audiofile audio backend support. - -DWANT_ESD (default: ON)
Enables or disables ESounD audio backend support. - -DWANT_QTDBUS (default: ON)
Enables or disables Qt-DBus support. - -DWANT_QTWEBKIT (default: ON)
Enables or disables Qt-WebKit support. - -DWANT_KDE4 (default: ON)
Enables or disables KDE4 support. - -DWANT_SSL (default: ON)
Enables or disables the crypto functions support using OpenSSL. - -DWANT_CRYPT (default: ON)
Enables or disables the cryptographic engines and the whole cryptography/text transformation support. Produces a slightly smaller executable - -DWANT_IPV6 (default: ON)
Enables or disables the IPv6 support.
Even if you have a plain IPv4-only connection, you might want to keep the IPv6 support: you will be able to lookup IPv6 hostnames. - -DWANT_TRANSPARENCY (default: ON)
This option enables or disables pseudo and real transparency support.
The pseudo transparency support makes the KVIrc windows look like semi-transparent (this is NOT real transparency: this is just a nice-looking hack). Transparency uses compositing and needs proper hardware support to work.
If KDE support is enabled, KVIrc will have an option that makes all windows use a faded KDE desktop background image as background. Without KDE support you will be able to choose a fake background image and use it as background. (You can still choose your desktop wallpaper: this will (more-or-less) work in all the window managers).
It is cool-looking but usually eats some memory and makes the executable slightly bigger, when enabled. Especially when moving objects around, CPU consumption may get high as well.
You thus disable transparency here. - -DWANT_PERL (default: ON)
Enables or disables Perl support.
You will not be able to use Perl scripts inside of KVIrc.
You still can execute Perl scripts outside of KVIrc, i.e. with the exec() command.
Note that Perl support will be checked anyway, and used to generate the documentation if present. - -DWANT_PYTHON (default: ON)
Enables or disables python support.
You will not be able to use python scripts inside of KVIrc. - -DWANT_IPC (default: ON)
Enables or disables support for inter-process communication.
You will be not able to send remote commands to running KVIrc sessions: this basically means that every time you run the KVIrc executable, a new session will be started.
If you don't use this switch, a new session will be started only if no session is running on the same display or "new session" has been forced by a commandline switch.
If a session is already running, the commandline will be passed to that session via IPC (X-event-based communication).
This option saves some KB of the KVIrc executable, so if you're really short in memory, you might use it, otherwise, IPC is a nice feature. - -DWANT_GETTEXT (default: ON)
Enables or disables the use of GetText to generate translation files. - -DWANT_DOXYGEN (default: ON)
Enables or disables developers docs generation through Doxygen. - -DWANT_GSM (default: ON)
Enables or disables the usage of the GSM library. This will disable the DCC VOICE GSM codec but might help when the compilation stops complaining of something related to GSM :) - -DWANT_IGNORE_SIGALARM (default: OFF)
Under Solaris, both usleep() and threads implementation are based on SIGALARM. KVIrc uses both, and this could lead to some spontaneous application quits. This option enables a workaround for this problem. - -DWANT_DCC_VOICE (default: ON)
Enables or disables the DCC VOICE sound support. This might help if you have problems in compilation of src/modules/dcc/voice.cpp.
It will disable the sound support (and thus make DCC VOICE not usable). - -DWANT_DCC_VIDEO (default: OFF)
Enables or disables EXPERIMENTAL DCC VIDEO support. - -DWANT_OGG_THEORA (default: OFF)
Enables or disables EXPERIMENTAL Ogg/Theora Support for DCC video. - -DWANT_DCC_CANVAS (default: OFF)
Enables or disables OBSOLETE DCC CANVAS support. - -DWANT_MEMORY_PROFILE (default: OFF)
Enables or disables memory allocation profiling.
Don't set it, unless you are a developer and know what you are doing.
It will have high impact on executable size and most notably speed.
Please do not use this. - -DWANT_MEMORY_CHECKS (default: OFF)
Enables or disables malloc() memory checks. This will print a nice message if your system goes out of memory.
It can't save you from buying new RAM, but at least you will know that your system went out of memory and it is not a proper KVIrc fault.
Most systems do actually already notice you when you are out of RAM (i.e. Linux and the OOM killer.)
Most probably you will not need to enable this flag. - -DMANUAL_REVISION (default: empty)
Manually set a revision number if subversion is not found on your system.
This is useful mostly on windows.
Please do not specify useless information here, as it will make debugging harder and you won't profit from it. - -DWANT_PIZZA (default: OFF)
Add some pizza for dinner :) - -DWANT_BEER (default: OFF)
Add some beers to chat :) - -DWANT_GTKSTYLE (default: OFF)
QGtkStyle is a QT backend that uses native Gtk widgets. In recent Gtk versions some insane choices are hardcoded and impossible to workaround (example: icons can't be shown in menus, label background color is fixed).
By default we disable QGtkStyle since it messes up with KVIrc internal themeing engine creating bad problems (like unreadable white text on a white background).
Some users wants to use it anyway and sometimes we like to check if GTK developers quit smoking pot, so this option let you enable the QGtkStyle engine.
Please don't report any theme-related bug if you enabled this option: we already know it's broken, but nobody's gonna fix it.
Modo interactivo
El sistema de compilación CMake también da un modo interactivo de configurar el entorno antes de compilar.
De nuevo, te recomendamos usar el método de compilación "fuera-del-código": compílalo todo sin ensuciar las fuentes.
# mkdir release
# cd release
# ccmake ..
Ahora que estás en modo interactivo, simplemente sigue las instrucciones en pantalla para configurar tu entorno de compilación.
Compilando
Este paso es fácil :)
Cruza los dedos y ejecuta:
# make
Si tu make no es de GNU (ésto pasa en FreeBSD por ejemplo) deberías usar "gmake" en su lugar.
El proceso de compilación tardará de 3-4 minutos a algunas horas dependiendo de la capacidad y la carga del equipo.
Si tienes una CPU lenta pero tienes varios ordenadores en red, podrías considerar usar distcc para distribuir la compilación.
Una vez que la compilación ha sido exitosa, ejecuta:
# make install
Igual que antes, usa "gmake install" si tu make no es de GNU.
Ésto instalará el ejecutable en /usr/local/bin (si no has especificado una opción -DCMAKE_INSTALL_PREFIX distinta en las reglas Cmake), las librerías en /usr/local/lib (si no has especificado una opción -DLIB_SUFFIX distinta en las reglas Cmake) y los datos compartidos /usr/local/share/kvirc.
Asegúrate de que /usr/local/lib está en tu /etc/ld.so.conf, y si no está ahí, ponlo ahí y ejecuta:
# ldconfig
Si has decidido usar el soporte KDE la instalación puede haber puesto todos estos archivos en $KDEDIR en lugar de en /usr/local.
En este caso, todo está bien ya que KDE requiere que su directorio de librerías esté en /etc/ld.so.conf
Compilando en Mac OSX
Hay un HOWTO de compilación e instalación para sistemas OS X en el directorio doc/. Se llama INSTALL-MacOS.txt
Compilando en Win32
Hay un HOWTO de compilación e instalación para sistemas OS X en el directorio doc/. Se llama INSTALL-Win32.txt
Instalación de nivel hacker
# mkdir release && cd release
# cmake ..
# make install
Creando un paquete de KVIrc
CMake soporta el argumento DESTDIR.
Así que, si quieres hacer un paquete para tu distro, simplemente tienes que pasarlo en la etapa "make install": tus archivos irán a la ruta elegida.
La sintaxis es:
# make install DESTDIR=/tmp/kvirc-4.0
Después de este paso, simplemente sigue las reglas de tu distribución para hacer un buen paquete.
Alternativamente, puedes usar el soporte experimental de CPack incluido en CMakeLists.txt para hacer un paquete: en este caso, lee la documentación de CPack.
¡Diviértete!
# kvirc &
Eso es todo, amigos.